Podrobná bibliografie
| Název: |
Automatically detecting the scopes of source code comments. |
| Autoři: |
Chen, Huanchao1, Huang, Yuan1, Liu, Zhiyong1, Chen, Xiangping1,2 chenxp8@mail.sysu.edu.cn, Zhou, Fan1, Luo, Xiaonan3 |
| Zdroj: |
Journal of Systems & Software. Jul2019, Vol. 153, p45-63. 19p. |
| Témata: |
*SOFTWARE engineering, *OPEN source software, SOURCE code, JAVA programming language, PROGRAMMING language semantics, MACHINE learning |
| Abstrakt: |
Highlights • This work proposes the first method to detect the scopes of block/line comments • The detection of comment scopes can be modeled as a binary classification problem • We propose discriminative features in code and comments to characterize the scopes of comments. • We apply our method to two existing approaches in software engineering tasks and improve their performance. Abstract Comments convey useful information about the system functionalities and many methods for software engineering tasks take comments as an important source for many software engineering tasks such as code semantic analysis, code reuse and so on. However, unlike structural doc comments, it is challenging to identify the relationship between the functional semantics of the code and its corresponding textual descriptions nested inside the code and apply it to automatic analyzing and mining approaches in software engineering tasks efficiently. In this paper, we propose a general method for the detection of source code comment scopes. Based on machine learning, our method utilized features of code snippets and comments to detect the scopes of source code comments automatically in Java programs. On the dataset of comment-statement pairs from 4 popular open source projects, our method achieved a high accuracy of 81.45% in detecting the scopes of comments. Furthermore, the results demonstrated the feasibility and effectiveness of our comment scope detection method on new projects. Moreover, our method was applied to two specific software engineering tasks in our studies: analyzing software repositories for outdated comment detection and mining software repositories for comment generation. As a general approach, our method provided a solution to comment-code mapping. It improved the performance of baseline methods in both tasks, which demonstrated that our method is conducive to automatic analyzing and mining approaches on software repositories. [ABSTRACT FROM AUTHOR] |
|
Copyright of Journal of Systems & Software is the property of Elsevier B.V. and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.) |
| Databáze: |
Business Source Index |