Open source code contribution review quality assessment method and device based on context awareness

The open source code contribution comments are evaluated through a situation-aware method, combined with developer information and revision process, and the problem of uneven quality of code contribution comments is solved, improving the effectiveness of comments and developer participation.

CN114996404BActive Publication Date: 2024-12-27NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210636340.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-07
Publication Date
2024-12-27
Estimated Expiration
2042-06-07

AI Technical Summary

Technical Problem

In open source software projects, the quality of code contribution comments is uneven, making it difficult for developers to understand the intention of revision. Unfriendly comments may undermine the enthusiasm of developers, and the existing comment mechanism is not adaptable.

Method used

Using a context-aware approach, the code contribution comment text is evaluated through sentiment analysis, structural analysis and component analysis, and combined with developer information and revision process information, reference scores are generated, comment quality is evaluated, and quality improvement suggestions are provided.

Benefits of technology

It improves the effectiveness of code contribution comments, helps managers generate higher-quality revision requests, enhances developer participation, and achieves multi-dimensional evaluation and quality improvement of code contribution comments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996404B_ABST
    Figure CN114996404B_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for evaluating the quality of open source code contribution comments based on contextual awareness. The method comprises: forming basic score information of the comment text by performing sentiment analysis, structural analysis and component analysis on the comment text inputted by the target open source code contribution, and then performing developer perception and revision process perception on the target open source code contribution itself submitted by the developer, obtaining contextual awareness information of the quality evaluation of the open source code contribution, and then obtaining reference score information of the comment based on the contextual awareness information, and comparing it with the basic score information of the manager's comment text, so as to achieve a comprehensive evaluation of the comment text. The present invention proposes multi-dimensional contextual awareness for open source code contribution evaluation, which provides rich contextual information for quality evaluation. The context-oriented quality evaluation of open source code contribution comments can improve the effectiveness of the comments and realize a mechanism for evaluating code contribution comments on the open source platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for evaluating the quality of open source code contribution reviews based on context awareness. Background Art

[0002] The efficiency of the code contribution (i.e., Pull-request) mechanism attracts more and more developers to participate in the development of open source software projects. However, the quality of the massive code contributions varies greatly. Some code contributions submitted by developers may have various problems. Therefore, project managers usually check the code contributions submitted by developers and make specific modification suggestions in the form of comments. Then the developers update the code contributions according to the comments of the managers, and iterate until the managers are satisfied. It can be seen that the quality of the manager's comments on the code contributions plays an important role in the revision process of the code contributions. For example, problems such as unclear expressions and incomplete elements may cause developers to be unable to effectively understand the manager's revision intentions, and then additional conversations are needed for clarification. In addition, the unfriendly tone in the comments may discourage developers from participating in the contribution for free, causing them to give up revising the code contributions. Therefore, in the current open source community, the code contribution comment mechanism has the problem of poor adaptability. Summary of the invention

[0003] Based on this, it is necessary to provide a context-aware open source code contribution review quality assessment method, device, computer equipment and storage medium that can evaluate code contribution reviews in response to the above technical problems.

[0004] A method for evaluating the quality of open source code contribution reviews based on context awareness, the method comprising:

[0005] Obtaining comment texts contributed by the target open source code, and analyzing and processing the comment texts to obtain basic score information of the comments; the basic score information of the comments includes a sentiment characteristic score, a structural characteristic score, and a component characteristic score of the comment text; wherein a higher sentiment characteristic score indicates a more positive comment, a higher structural characteristic score indicates a clearer comment structure, and a higher component characteristic score indicates a richer comment component;

[0006] Obtaining corresponding developer information and development process information according to the target open source code contribution, and obtaining context-aware information for open source code contribution quality assessment according to the developer information and the development process information;

[0007] Obtain reference score information for commenting on the target open source code contribution according to the context perception information and preset standard comment comparison data; the reference score information includes a reference sentiment characteristic score, a reference structure characteristic score, and a reference component characteristic score; wherein, the developer information of a developer with less experience has higher corresponding reference structure characteristic scores and reference component characteristic scores; the development process information of a development process with a higher revision cost has higher corresponding reference sentiment characteristic scores;

[0008] The quality of the review text is evaluated according to the reference score information and the basic score information of the review.

[0009] In one of the embodiments, the method further includes: obtaining a comment text of the target open source code contribution from a comment input box;

[0010] Extracting sentiment polarity information and attitude type information from the comment text through a sentiment analysis algorithm, and then obtaining a sentiment characteristic score of the comment text;

[0011] By analyzing the length, number of paragraphs, and whether the content is graded and divided into paragraphs of the review text, a structural characteristic score of the review text is obtained;

[0012] Obtaining a component characteristic score of the comment text by identifying whether the comment text contains links and code block elements and the number of such elements;

[0013] The emotional characteristic score, the structural characteristic score and the component characteristic score constitute the basic score information of the review text.

[0014] In one of the embodiments, it further includes: determining developer information of a developer based on the target open source code contribution;

[0015] Determine whether the developer is a core member of the project and whether the current code contribution is the developer's first contribution to the current project based on the developer information, obtain the developer's historical contribution count and contribution acceptance rate on the platform, and further obtain the developer's experience information;

[0016] Determine which revision the current revision is in according to the development process information, obtain the workload and working time paid by the developer in the current and previous revisions, and further obtain revision cost information of the development process;

[0017] The developer information and the development process information constitute context-aware information for open source code contribution quality assessment.

[0018] In one of the embodiments, the method further includes: obtaining an evaluation result of the comment text;

[0019] According to the evaluation results, marking quality problems existing in the evaluation text;

[0020] Based on the evaluation results, quality improvement suggestions for the evaluation text are generated.

[0021] In one of the embodiments, it also includes: respectively comparing the reference emotional characteristic score, reference structural characteristic score and reference component characteristic score in the reference score information with the emotional characteristic score, structural characteristic score and component characteristic score in the basic score information to obtain an evaluation result of the review text; wherein, when the score in the basic score information is lower than the score in the reference score information by a preset threshold, it is determined that there is a quality problem with the corresponding evaluation item.

[0022] In one of the embodiments, it further includes: obtaining the evaluation result;

[0023] If the evaluation result indicates that the evaluation text has quality problems, an icon is displayed floatingly at the edge of the comment text; the floating icon has different colors to reflect different color levels of the comment quality problems;

[0024] When the floating display icon is clicked, a prompt box pops up to list the detailed information of each existing quality problem one by one.

[0025] In one embodiment, the method further includes: obtaining specific information of the evaluation results and quality problems therein;

[0026] If the quality problem is a common quality problem, the platform will pre-configure the improvement plan information for the common quality problem, as well as reference example information, and display it next to the problem;

[0027] If the quality problem belongs to a pre-set project-defined quality problem, then pre-configured improvement plan information for the project-defined quality problem is obtained and displayed next to the problem.

[0028] A context-aware open source code contribution review quality assessment device, the device comprising:

[0029] A basic score information determination module is used to obtain the comment text of the target open source code contribution, and analyze and process the comment text to obtain the basic score information of the comment; the basic score information of the comment includes the sentiment characteristic score, structural characteristic score and component characteristic score of the comment text; wherein, the higher the sentiment characteristic score, the more positive the comment; the higher the structural characteristic score, the clearer the comment structure; and the higher the component characteristic score, the richer the components contained in the comment;

[0030] A context-aware information determination module, configured to obtain corresponding developer information and development process information according to the target open source code contribution, and obtain context-aware information for open source code contribution quality assessment according to the developer information and the development process information;

[0031] A reference score information determination module is used to obtain reference score information for commenting on the target open source code contribution according to the context perception information and preset standard comment comparison data; the reference score information includes a reference sentiment characteristic score, a reference structure characteristic score, and a reference component characteristic score; wherein, the developer information of a developer with less experience has higher corresponding reference structure characteristic scores and reference component characteristic scores; the development process information of a development process with a higher revision cost has higher corresponding reference sentiment characteristic scores;

[0032] The review quality evaluation module is used to evaluate the quality of the review text according to the reference score information and the basic score information of the review.

[0033] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0034] Obtaining comment texts contributed by the target open source code, and analyzing and processing the comment texts to obtain basic score information of the comments; the basic score information of the comments includes a sentiment characteristic score, a structural characteristic score, and a component characteristic score of the comment text; wherein a higher sentiment characteristic score indicates a more positive comment, a higher structural characteristic score indicates a clearer comment structure, and a higher component characteristic score indicates a richer comment component;

[0035] Obtaining corresponding developer information and development process information according to the target open source code contribution, and obtaining context-aware information for open source code contribution quality assessment according to the developer information and the development process information;

[0036] Obtain reference score information for commenting on the target open source code contribution according to the context perception information and preset standard comment comparison data; the reference score information includes a reference sentiment characteristic score, a reference structure characteristic score, and a reference component characteristic score; wherein, the developer information of a developer with less experience has higher corresponding reference structure characteristic scores and reference component characteristic scores; the development process information of a development process with a higher revision cost has higher corresponding reference sentiment characteristic scores;

[0037] The quality of the review text is evaluated according to the reference score information and the basic score information of the review.

[0038] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0039] Obtaining comment texts contributed by the target open source code, and analyzing and processing the comment texts to obtain basic score information of the comments; the basic score information of the comments includes a sentiment characteristic score, a structural characteristic score, and a component characteristic score of the comment text; wherein a higher sentiment characteristic score indicates a more positive comment, a higher structural characteristic score indicates a clearer comment structure, and a higher component characteristic score indicates a richer comment component;

[0040] Obtaining corresponding developer information and development process information according to the target open source code contribution, and obtaining context-aware information for open source code contribution quality assessment according to the developer information and the development process information;

[0041] Obtain reference score information for commenting on the target open source code contribution according to the context perception information and preset standard comment comparison data; the reference score information includes a reference sentiment characteristic score, a reference structure characteristic score, and a reference component characteristic score; wherein, the developer information of a developer with less experience has higher corresponding reference structure characteristic scores and reference component characteristic scores; the development process information of a development process with a higher revision cost has higher corresponding reference sentiment characteristic scores;

[0042] The quality of the review text is evaluated according to the reference score information and the basic score information of the review.

[0043] The above-mentioned method, device, computer equipment and storage medium for evaluating the quality of open source code contribution comments based on contextual awareness, through sentiment analysis, structural analysis and component analysis of the comment text input by the manager for the target open source code contribution submitted by the developer, form the basic score information of the comment text, and then perform developer perception and revision process perception on the target open source code contribution submitted by the developer itself, to obtain the contextual awareness information of the quality evaluation of the open source code contribution, and then obtain the reference score information of the comment based on the contextual awareness information, and compare it with the basic score information of the manager's comment text, so as to achieve a comprehensive evaluation of the comment text. The present invention proposes multi-dimensional contextual awareness for open source code contribution evaluation, provides rich contextual information for quality evaluation, and the context-oriented quality evaluation of open source code contribution comments can improve the effectiveness of the comments, and realizes a mechanism for evaluating code contribution comments on the open source platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flowchart of a method for evaluating the quality of open source code contribution reviews based on context awareness in one embodiment;

[0045] Figure 2 A flowchart of a method for evaluating the quality of open source code contribution reviews based on context awareness in another embodiment;

[0046] Figure 3 A structural block diagram of an open source code contribution review quality assessment device based on context awareness in one embodiment;

[0047] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] The context-aware open source code contribution review quality assessment method provided in this application can be applied in the following application environments. On the open source platform, developers submit code contributions, and project managers check the code contributions submitted by developers and put forward modification suggestions in the form of comments. Developers update the code contributions according to the manager's comments until the manager is satisfied. Among them, the terminal takes the open source collaborative development platform that is to implement the manager's comment quality assessment mechanism as the starting point, and executes a context-aware open source code contribution review quality assessment method to evaluate the quality of the comments entered by the manager, so as to help the manager generate higher quality revision requests and improve the effectiveness of the revision comments.

[0050] In one embodiment, Figure 1 As shown, a method for evaluating the quality of open source code contribution comments based on context awareness is provided, comprising the following steps:

[0051] Step 102, obtaining the comment text of the target open source code contribution, and analyzing and processing the comment text to obtain basic score information of the comment.

[0052] The basic score information of a review includes the sentiment characteristic score, structural characteristic score and component characteristic score of the review text; among them, a higher sentiment characteristic score indicates a more positive review, a higher structural characteristic score indicates a clearer review structure, and a higher component characteristic score indicates that the review contains richer components.

[0053] The basic score information is an objective analysis of the review text input by the manager based on sentiment analysis, structural analysis and component analysis, and considers the characteristics of the review text itself from multiple dimensions.

[0054] Step 104: Obtain corresponding developer information and development process information according to the target open source code contribution, and obtain context-aware information for open source code contribution quality assessment according to the developer information and development process information.

[0055] Context awareness specifically includes developer awareness and revision process awareness, which is used to form modification suggestion requirements for the current developer and the current development process based on objective information about the developer and the revision process.

[0056] Step 106 , obtaining reference score information for commenting on the target open source code contribution based on the context awareness information and preset standard comment comparison data.

[0057] The reference score information includes a reference sentiment characteristic score, a reference structure characteristic score and a reference component characteristic score; among them, the developer information of a developer with less experience has higher corresponding reference structure characteristic scores and reference component characteristic scores; the development process information of a development process with a higher revision cost has higher corresponding reference sentiment characteristic scores.

[0058] The less contribution experience a developer has and the lower the contribution level, the clearer the structure and richer the content of the comments should be; the higher the number of revisions and the higher the revision cost, the more positive the emotional characteristics of the comments should be. The effectiveness of comments can be improved through context-oriented open source code contribution comment quality assessment.

[0059] Step 108 , evaluating the quality of the review text according to the reference score information and the basic score information of the review.

[0060] Based on contextual information and basic quality analysis results, the quality of reviews is comprehensively evaluated, and the severity of quality issues is reflected through data differences, which is objective and fair.

[0061] In the above-mentioned method for evaluating the quality of open source code contribution comments based on contextual awareness, sentiment analysis, structural analysis and component analysis are performed on the comment text input by the manager for the target open source code contribution submitted by the developer to form the basic score information of the comment text, and then the target open source code contribution submitted by the developer itself is perceived by the developer and the revision process is perceived to obtain the contextual awareness information of the quality evaluation of the open source code contribution, and then the reference score information of the comment based on the contextual awareness information is obtained, which is compared with the basic score information of the manager's comment text, so as to achieve a comprehensive evaluation of the comment text. The present invention proposes multi-dimensional contextual awareness for open source code contribution evaluation, which provides rich contextual information for quality evaluation. The context-oriented quality evaluation of open source code contribution comments can improve the effectiveness of the comments and realize the mechanism for evaluating code contribution comments on the open source platform.

[0062] In one of the embodiments, it also includes: obtaining the comment text of the target open source code contribution from the comment input box; extracting the sentiment polarity information and attitude type information in the comment text through a sentiment analysis algorithm, and then obtaining the sentiment characteristic score of the comment text; obtaining the structural characteristic score of the comment text by analyzing the length of the comment text, the number of paragraphs, whether the content is graded and listed in paragraphs, and other attributes; obtaining the component characteristic score of the comment text by identifying whether the comment text contains links, code block elements, etc. and their number; the basic score information of the comment text is composed of the sentiment characteristic score, the structural characteristic score, and the component characteristic score.

[0063] Emotional polarity includes positive, negative or neutral, and is assigned different scores; attitude types include joy, anger, disappointment, etc., and are assigned different scores.

[0064] In one of the embodiments, it also includes: determining the developer information of the developer based on the target open source code contribution; judging whether the developer is a core member of the project and whether this code contribution is the developer's first contribution to the current project based on the developer information, obtaining the number of historical contributions of the developer on the platform and the acceptance rate of the contribution, and further obtaining the developer's experience information; judging which revision the current revision is in based on the development process information, obtaining the workload and working time spent by the developer in the current and previous revisions, and further obtaining the revision cost information of the development process; the developer information and development process information constitute context-aware information for open source code contribution quality assessment.

[0065] In one of the embodiments, the method further includes: obtaining evaluation results of the review text; marking quality issues existing in the evaluation text according to the evaluation results; and generating quality improvement suggestions for the evaluation text according to the evaluation results.

[0066] In one of the embodiments, it also includes: comparing the reference emotional characteristic score, reference structural characteristic score and reference component characteristic score in the reference score information with the emotional characteristic score, structural characteristic score and component characteristic score in the basic score information, to obtain an evaluation result of the review text; wherein, when the score in the basic score information is lower than the score in the reference score information by reaching a preset threshold, it is determined that there is a quality problem with the corresponding evaluation item.

[0067] In one of the embodiments, it also includes: obtaining evaluation results; if the evaluation results indicate that there are quality problems with the evaluation text, a floating display icon is displayed on the edge of the comment text; the floating display icon has different colors to reflect different color levels of the comment quality problems; when the floating display icon is clicked, a prompt box pops up to list the specific information of each existing quality problem one by one.

[0068] In one of the embodiments, it also includes: obtaining specific information on the evaluation results and the quality problems therein; if the quality problem is a common quality problem, obtaining the improvement plan information pre-configured by the platform for common quality problems, as well as reference example information, and displaying it next to the problem; if the quality problem is a pre-set project-defined quality problem, obtaining the improvement plan information pre-configured for the project-defined quality problem, and displaying it next to the problem.

[0069] By automatically evaluating the quality of code contribution comments and making targeted improvement suggestions for existing problems, it can help managers generate higher-quality revision requests and improve the effectiveness of revision comments. At the same time, configurable open source code contribution review quality improvement helps projects set review improvement plans that meet their own needs.

[0070] In a specific embodiment, Figure 2 As shown, a method for evaluating the quality of open source code contribution comments based on context awareness is provided, including:

[0071] S1: Basic quality analysis of open source code contribution reviews

[0072] The platform has conducted three aspects of analysis on the text entered in the comment input box, as follows:

[0073] S1.1 Sentiment analysis: The sentiment polarity (positive, negative or neutral) and attitude type (such as joy, anger, disappointment, etc.) in the comment text are extracted through sentiment analysis technology.

[0074] S1.2 Structural analysis: The review text is assessed for clarity of structure by considering its length, number of paragraphs, and whether the content is graded and itemized.

[0075] S1.3 Component analysis: Determine whether the comments contain rich components by identifying various elements such as links and code blocks.

[0076] S2: Context-aware open source code contribution quality assessment

[0077] The platform collects information about developers who contribute code and the development process, and performs the following perceptions:

[0078] S2.1 Developer perception: First, confirm whether the developer is a core member of the project. In addition, confirm whether this code contribution is the developer’s first contribution, as well as the developer’s historical contribution count and acceptance rate.

[0079] S2.2 Revision process awareness: Calculate the number of revisions the current revision is in, the amount of work done by developers in the previous revisions, and the delay spent on each revision.

[0080] S3: Comprehensive quality analysis of open source code contribution reviews

[0081] The platform conducts a comprehensive assessment of the quality of comments by taking into account contextual information and basic quality analysis results, focusing on the following logical judgments:

[0082] S3.1 The less experienced a developer is and the lower their contribution level is, the more clearly structured and richer their comments should be.

[0083] S3.2 The higher the number of revision rounds and the higher the revision cost, the more positive the sentiment characteristics of the reviews should be.

[0084] S4: Quality Issues Marking for Open Source Contribution Comments

[0085] The S4.1 platform first displays an icon floating on the edge of the comment to visually mark whether the comment has quality problems, and uses different colors to reflect the severity of the problem. For example, "green" can be used to indicate that the comment has no quality problems, while "red" can be used to indicate that the comment has serious quality problems.

[0086] S4.2 When the developer clicks the mark icon, the platform will pop up a prompt box to list each quality issue one by one.

[0087] S5: Suggestions for improving the quality of open source code contribution reviews

[0088] The S5.1 platform supports project managers in configuring corresponding improvement plans for common quality issues and allows them to provide reference examples.

[0089] The S5.2 platform generates specific improvement suggestions based on the quality issues in the comments and the configuration rules of the project and displays them next to the issues.

[0090] It should be understood that although Figure 1-2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0091] In one embodiment, Figure 3As shown, a context-aware open source code contribution review quality assessment device is provided, comprising: a basic score information determination module 302, a context-aware information determination module 304, a reference score information determination module 306 and a review quality assessment module 308, wherein:

[0092] The basic score information determination module 302 is used to obtain the comment text of the target open source code contribution, and analyze and process the comment text to obtain the basic score information of the comment; the basic score information of the comment includes the sentiment characteristic score, structure characteristic score and component characteristic score of the comment text; wherein, the higher the sentiment characteristic score, the more positive the comment; the higher the structure characteristic score, the clearer the comment structure; and the higher the component characteristic score, the richer the components contained in the comment;

[0093] A context-aware information determination module 304 is used to obtain corresponding developer information and development process information according to the target open source code contribution, and obtain context-aware information for open source code contribution quality assessment according to the developer information and development process information;

[0094] The reference score information determination module 306 is used to obtain reference score information for commenting on the target open source code contribution according to the context perception information and the preset standard comment comparison data; the reference score information includes a reference sentiment characteristic score, a reference structure characteristic score, and a reference component characteristic score; wherein, the developer information of a developer with less experience has a higher corresponding reference structure characteristic score and reference component characteristic score; the development process information of a development process with a higher revision cost has a higher corresponding reference sentiment characteristic score;

[0095] The review quality evaluation module 308 is used to evaluate the quality of the review text according to the reference score information and the basic score information of the review.

[0096] The basic score information determination module 302 is also used to obtain the comment text of the target open source code contribution from the comment input box; extract the sentiment polarity information and attitude type information in the comment text through the sentiment analysis algorithm, and then obtain the sentiment characteristic score of the comment text; obtain the structural characteristic score of the comment text by analyzing the length of the comment text, the number of paragraphs, and whether there is content classification and segmentation; obtain the component characteristic score of the comment text by identifying whether the comment text contains links, code block elements and their number; the basic score information of the comment text is composed of the sentiment characteristic score, the structural characteristic score and the component characteristic score.

[0097] The context-aware information determination module 304 is also used to determine the developer information of the developer based on the target open source code contribution; determine whether the developer is a core member of the project and whether this code contribution is the developer's first contribution to the current project based on the developer information, obtain the developer's historical contribution count and contribution acceptance rate on the platform, and further obtain the developer's experience information; determine which revision the current revision is in based on the development process information, obtain the workload and working time spent by the developer in the current and previous revisions, and further obtain the revision cost information of the development process; the developer information and development process information constitute the context-aware information for open source code contribution quality assessment.

[0098] The review quality assessment module 308 is also used to obtain the assessment results of the review text; mark the quality problems existing in the assessment text according to the assessment results; and generate quality improvement suggestions for the assessment text according to the assessment results.

[0099] The comment quality assessment module 308 is also used to compare the reference sentiment characteristic score, reference structural characteristic score and reference component characteristic score in the reference score information with the sentiment characteristic score, structural characteristic score and component characteristic score in the basic score information, to obtain the assessment result of the comment text; wherein, when the score in the basic score information is lower than the score in the reference score information by reaching a preset threshold, it is determined that there is a quality problem with the corresponding assessment item.

[0100] The comment quality assessment module 308 is also used to obtain assessment results; if the assessment results indicate that there are quality problems with the assessment text, an icon will be displayed floatingly on the edge of the comment text; the floating display icon has different colors to reflect the different color levels of the comment quality problems; when the floating display icon is clicked, a prompt box pops up listing the specific information of each existing quality problem one by one.

[0101] The comment quality assessment module 308 is also used to obtain specific information about the assessment results and the quality problems therein; if the quality problem is a common quality problem, the platform's pre-configured improvement plan information for common quality problems and reference example information are obtained and displayed next to the problem; if the quality problem is a pre-set project-defined quality problem, the platform's pre-configured improvement plan information for the project-defined quality problem is obtained and displayed next to the problem.

[0102] For the specific limitations of the open source code contribution review quality assessment device based on contextual awareness, please refer to the limitations of the open source code contribution review quality assessment method based on contextual awareness above, which will not be repeated here. Each module in the above-mentioned open source code contribution review quality assessment device based on contextual awareness can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0103] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for evaluating the quality of open source code contribution reviews based on context awareness is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0104] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0105] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method embodiment when executing the computer program.

[0106] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.

[0107] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0108] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0109] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A context-aware open source code contribution review quality assessment method, characterized in that: The method comprises: Obtaining comment texts contributed by the target open source code, and analyzing and processing the comment texts to obtain basic score information of the comments; the basic score information of the comments includes a sentiment characteristic score, a structural characteristic score, and a component characteristic score of the comment text; wherein a higher sentiment characteristic score indicates a more positive comment, a higher structural characteristic score indicates a clearer comment structure, and a higher component characteristic score indicates a richer comment component; Obtaining corresponding developer information and development process information according to the target open source code contribution, and obtaining context-aware information for open source code contribution quality assessment according to the developer information and the development process information; Obtain reference score information for commenting on the target open source code contribution according to the context perception information and preset standard comment comparison data; the reference score information includes a reference sentiment characteristic score, a reference structure characteristic score, and a reference component characteristic score; wherein, the developer information of a developer with less experience has higher corresponding reference structure characteristic scores and reference component characteristic scores; the development process information of a development process with a higher revision cost has higher corresponding reference sentiment characteristic scores; The quality of the review text is evaluated according to the reference score information and the basic score information of the review.

2. The method according to claim 1, characterized in that Obtaining comment texts contributed to the target open source code, and analyzing and processing the comment texts to obtain basic score information of the comments; The basic score information of the review includes the sentiment characteristic score, structure characteristic score and component characteristic score of the review text, including: Get the comment text of the target open source code contribution from the comment input box; Extracting sentiment polarity information and attitude type information from the comment text through a sentiment analysis algorithm, and then obtaining a sentiment characteristic score of the comment text; By analyzing the length, number of paragraphs, and whether the content is graded and divided into paragraphs of the review text, a structural characteristic score of the review text is obtained; Obtaining a component characteristic score of the comment text by identifying whether the comment text contains links and code block elements and the number of such elements; The emotional characteristic score, the structural characteristic score and the component characteristic score constitute the basic score information of the review text.

3. The method according to claim 2, characterized in that Obtaining corresponding developer information and development process information according to the target open source code contribution, and obtaining context-aware information for open source code contribution quality assessment according to the developer information and the development process information, including: Determining developer information of a developer based on the target open source code contribution; Determine whether the developer is a core member of the project and whether the current code contribution is the developer's first contribution to the current project based on the developer information, obtain the developer's historical contribution count and contribution acceptance rate on the platform, and further obtain the developer's experience information; Determine which revision the current revision is in according to the development process information, obtain the workload and working time paid by the developer in the current and previous revisions, and further obtain revision cost information of the development process; The developer information and the development process information constitute context-aware information for open source code contribution quality assessment.

4. The method according to claim 3, characterized in that After evaluating the quality of the review text according to the reference score information and the basic score information of the review, the method further includes: Obtaining an evaluation result of the comment text; According to the evaluation result, marking the quality problems existing in the review text; Based on the evaluation result, quality improvement suggestions for the review text are generated.

5. The method according to claim 4, characterized in that Evaluating the quality of the review text according to the reference score information and the basic score information of the review, and obtaining the evaluation result of the review text, including: The reference emotional characteristic score, reference structural characteristic score and reference component characteristic score in the reference score information are respectively compared with the emotional characteristic score, structural characteristic score and component characteristic score in the basic score information to obtain an evaluation result of the review text; wherein, when the score in the basic score information is lower than the score in the reference score information by reaching a preset threshold, it is determined that there is a quality problem with the corresponding evaluation item.

6. The method according to claim 5, characterized in that According to the evaluation results, quality problems existing in the review text are marked, including: Obtaining the evaluation result; If the evaluation result indicates that the review text has quality problems, an icon is displayed floatingly at the edge of the review text; the floating icon has different colors to reflect different color levels of the review quality problems; When the floating display icon is clicked, a prompt box pops up to list the detailed information of each existing quality problem one by one.

7. The method according to claim 6, characterized in that Generating quality improvement suggestions for the review text according to the evaluation results, including: Obtaining detailed information on the evaluation results and any quality issues therein; If the quality problem is a common quality problem, the platform will pre-configure the improvement plan information for the common quality problem, as well as reference example information, and display it next to the problem; If the quality problem belongs to a pre-set project-defined quality problem, then pre-configured improvement plan information for the project-defined quality problem is obtained and displayed next to the problem.

8. A context-aware open source code contribution review quality assessment device, characterized in that: The device comprises: A basic score information determination module is used to obtain the comment text of the target open source code contribution, and analyze and process the comment text to obtain the basic score information of the comment; the basic score information of the comment includes the sentiment characteristic score, structural characteristic score and component characteristic score of the comment text; wherein, the higher the sentiment characteristic score, the more positive the comment; the higher the structural characteristic score, the clearer the comment structure; and the higher the component characteristic score, the richer the components contained in the comment; A context-aware information determination module, configured to obtain corresponding developer information and development process information according to the target open source code contribution, and obtain context-aware information for open source code contribution quality assessment according to the developer information and the development process information; A reference score information determination module is used to obtain reference score information for commenting on the target open source code contribution according to the context perception information and preset standard comment comparison data; the reference score information includes a reference sentiment characteristic score, a reference structure characteristic score, and a reference component characteristic score; wherein, the developer information of a developer with less experience has higher corresponding reference structure characteristic scores and reference component characteristic scores; the development process information of a development process with a higher revision cost has higher corresponding reference sentiment characteristic scores; The review quality evaluation module is used to evaluate the quality of the review text according to the reference score information and the basic score information of the review.

9. The device according to claim 8, characterized in that The basic score information determination module is also used for: Get the comment text of the target open source code contribution from the comment input box; Extracting sentiment polarity information and attitude type information from the comment text through a sentiment analysis algorithm, and then obtaining a sentiment characteristic score of the comment text; By analyzing the length, number of paragraphs, and whether the content is graded and divided into paragraphs of the review text, a structural characteristic score of the review text is obtained; Obtaining a component characteristic score of the comment text by identifying whether the comment text contains links and code block elements and the number of such elements; The emotional characteristic score, the structural characteristic score and the component characteristic score constitute the basic score information of the review text.

10. The device according to claim 9, characterized in that The context awareness module is also used for: Determining developer information of a developer based on the target open source code contribution; Determine whether the developer is a core member of the project and whether the current code contribution is the developer's first contribution to the current project based on the developer information, obtain the developer's historical contribution count and contribution acceptance rate on the platform, and further obtain the developer's experience information; Determine which revision the current revision is in according to the development process information, obtain the workload and working time paid by the developer in the current and previous revisions, and further obtain revision cost information of the development process; The developer information and the development process information constitute context-aware information for open source code contribution quality assessment.