arrow
Return

Automatically detecting the scopes of source code comments

delete2019-07-01
delete16
delete
OA
AI
H
Huanchao Chen
黄袁 cover
黄袁 (Yuan Huang)
Z
Zhiyong Liu
X
Xiangping Chen *
F
Fan Zhou
X
Xiaonan Luo
DOI:10.1016/j.jss.2019.03.010delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
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. (C) 2019 The Authors. Published by Elsevier Inc.
Keywords:
Comment scope detection
Machine learning
Software repositories
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

Journal of Systems and Software cover
Journal of Systems and Software
IF:
4.1
Papers:
5.5K
Citations:
8.4K

Organization

S
Sun Yat Sen University
Scholars:
9.9W
Papers: 7.2W
Citations: 95
G
Guilin University of Electronic Technology
Scholars:
7.4K
Papers: 5.2K
Citations: 5.4K
Cited Papers

Cited Papers

Soft tissue tumors of the urinary bladder
err2007-07-01
err0
PREAI
errSarah Lott; Antonio Lopez-Beltran; Rodolfo Montironi; Gregory T. MacLennan; Liang Cheng
errShare
errSave
Estimation of phase derivative from a single fringe pattern using Riesz transforms
err2017-04-12
err0
PREAI
errYassine Tounsi; Sara Zada; Desire Muhire; Ahmed Siari; Abdelkrim Nassim
errShare
errSave
Roles of Nicotinamide Adenine Dinucleotide (NAD+) in Biological Systems
err2018-01-19
err0
errOAAI
errPalmiro Poltronieri; Nataša Čerekovic
errShare
errSave
Mesoscale physical variability affects zooplankton production in the Labrador Sea
err2009-05-01
err0
PREAI
errL. Yebra; R.P. Harris; E.J.H. Head; I. Yashayaev; L.R. Harris; A.G. Hirst
errShare
errSave
Understanding the Milieu Experiences of Patients on an Acute Inpatient Psychiatric Unit
err2010-08-01
err0
PREAI
errCatherine A. Thibeault; Kenneth Trudeau; Marguerite d’Entremont; Teresa Brown
errShare
errSave
Learning from Imbalanced Data
err2009-09-01
err5.5K
PREAI
errHe, Haibo; Garcia, Edwardo A.
errShare
errSave
Variable selection using random forests
err2010-10-01
err1.8K
errOAAI
errGenuer, Robin; Poggi, Jean-Michel; Tuleau-Malot, Christine
errShare
errSave
researcher View more