当前位置: X-MOL 学术IEEE Trans. Reliab. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Learning Code Context Information to Predict Comment Locations
IEEE Transactions on Reliability ( IF 5.0 ) Pub Date : 2020-03-01 , DOI: 10.1109/tr.2019.2931725
Yuan Huang , Xinyu Hu , Nan Jia , Xiangping Chen , Yingfei Xiong , Zibin Zheng

Code commenting is a common programming practice of practical importance to help developers review and comprehend source code. In our developer survey, commenting has become an important, yet often-neglected activity when programming. Moreover, there is a lack of formal and automatic way in current practice to remind developers where to comment in the source code. To provide informative guidance on commenting during development, we propose a novel method CommentSuggester to recommend developers regarding appropriate commenting locations in the source code. Because commenting is closely related to the context information of source code, we identify this important factor to determine comment positions and extract it as structural context features, syntactic context features, and semantic context features. Subsequently, machine learning techniques are applied to identify possible commenting locations in the source code. We evaluated CommentSuggester using large datasets from dozens of open-source software systems in GitHub. The encouraging experimental results and user study demonstrated the feasibility and effectiveness of our commenting suggestion method.

中文翻译:

学习代码上下文信息来预测评论位置

代码注释是一种具有实际重要性的常见编程实践,可帮助开发人员查看和理解源代码。在我们的开发人员调查中,评论已成为编程时一项重要但经常被忽视的活动。而且,目前的实践中也缺乏正式和自动的方式来提醒开发人员在源代码中注释的位置。为了在开发过程中提供有关评论的信息指导,我们提出了一种新方法 CommentSuggester 来向开发人员推荐源代码中适当的评论位置。由于注释与源代码的上下文信息密切相关,我们识别出这一重要因素来确定注释位置,并将其提取为结构上下文特征、句法上下文特征和语义上下文特征。随后,机器学习技术用于识别源代码中可能的注释位置。我们使用来自 GitHub 中数十个开源软件系统的大型数据集对 CommentSuggester 进行了评估。令人鼓舞的实验结果和用户研究证明了我们的评论建议方法的可行性和有效性。
更新日期:2020-03-01
down
wechat
bug