Empirical Analysis of Fault-Proneness in Methods by Focusing on their Comment Lines

Hirohisa Aman, S. Amasaki, Takashi Sasaki, Minoru Kawahara
{"title":"Empirical Analysis of Fault-Proneness in Methods by Focusing on their Comment Lines","authors":"Hirohisa Aman, S. Amasaki, Takashi Sasaki, Minoru Kawahara","doi":"10.1109/APSEC.2014.93","DOIUrl":null,"url":null,"abstract":"This paper focuses on comments described in Java programs, and conducts an empirical analysis about relationships between comments and fault-proneness in the programs. The types of comments analyzed in this paper are comments described inside a method body (inner comments), and comments followed by a method declaration (documentation comments). Although both of them play important roles in the program comprehension, they seem to be described in different purposes, The inner comments are often added to present tips about code fragments, while the documentation comments usually work as a programmer's manual. In the field of code refactoring, well-written inner comments are said to be related to \"code smell\" since they may cover a lack of readability in a complicated code fragment. This paper analyzes the associations of comments with the code quality from the aspect of fault-proneness, with using four popular open source products. The empirical results show that a method having inner comments tends to be 1.8 - 3.0 times likely to be faulty. The key contribution of this work is to reveal the usefulness of inner comments to point at faulty methods.","PeriodicalId":380881,"journal":{"name":"2014 21st Asia-Pacific Software Engineering Conference","volume":"2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"12","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2014 21st Asia-Pacific Software Engineering Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/APSEC.2014.93","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 12

Abstract

This paper focuses on comments described in Java programs, and conducts an empirical analysis about relationships between comments and fault-proneness in the programs. The types of comments analyzed in this paper are comments described inside a method body (inner comments), and comments followed by a method declaration (documentation comments). Although both of them play important roles in the program comprehension, they seem to be described in different purposes, The inner comments are often added to present tips about code fragments, while the documentation comments usually work as a programmer's manual. In the field of code refactoring, well-written inner comments are said to be related to "code smell" since they may cover a lack of readability in a complicated code fragment. This paper analyzes the associations of comments with the code quality from the aspect of fault-proneness, with using four popular open source products. The empirical results show that a method having inner comments tends to be 1.8 - 3.0 times likely to be faulty. The key contribution of this work is to reveal the usefulness of inner comments to point at faulty methods.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
以评论行为中心的方法错误倾向实证分析
本文以Java程序中的注释为研究对象,实证分析了Java程序中注释与出错性之间的关系。本文分析的注释类型是在方法体中描述的注释(内部注释),以及紧跟在方法声明之后的注释(文档注释)。虽然它们在程序理解中都扮演着重要的角色,但它们似乎有不同的用途,内部注释经常被添加来表示关于代码片段的提示,而文档注释通常作为程序员的手册。在代码重构领域,据说编写良好的内部注释与“代码气味”有关,因为它们可能掩盖了复杂代码片段中缺乏可读性的问题。本文以四个流行的开源产品为例,从错误倾向的角度分析了注释与代码质量的关系。实证结果表明,带有内部注释的方法出错的可能性是其1.8 ~ 3.0倍。这项工作的关键贡献是揭示了内部注释对指出错误方法的有用性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
pIML -- An Interrupt Program Modelling Language for Real-Time and Embedded Systems What Community Contribution Pattern Says about Stability of Software Project? Guidelines for the Use of Function Block Diagram in Reactor Protection Systems Data Flow Based Integration Testing for Embedded System Using Interaction Model Model Checking of Software Product Lines in Presence of Nondeterminism and Probabilities
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1