An Empirical Analysis of the Impact of Comment Statements on Fault-Proneness of Small-Size Module

Hirohisa Aman
{"title":"An Empirical Analysis of the Impact of Comment Statements on Fault-Proneness of Small-Size Module","authors":"Hirohisa Aman","doi":"10.1109/APSEC.2012.108","DOIUrl":null,"url":null,"abstract":"Code size metrics are commonly useful in predicting fault-prone modules, and the larger module tends to be more faulty. In other words, small-size modules are considered to have lower risks of fault. However, since the majority of modules in a software are often small-size, many ``small but faulty'' modules have been found in the real world. Hence, another fault-prone module prediction method, intended for small-size module, is also required. Such a new method for small-size module should use metrics other than code size since all modules are small size. This paper focuses on ``comments'' written in the source code from a novel perspective of size-independent metrics, comments have not been drawn much attention in the field of fault-prone module prediction. The empirical study collects 11,512 small-size modules, whose LOC are less than the median, from three major open source software, and analyzes the relationship between the lines of comments and the fault-proneness in the set of small-size modules. The empirical results show the followings: 1) A module in which some comments are written is more likely to be faulty than non-commented ones, the fault rate of commented modules is about 1.8-3.5 times higher than that of non-commented ones. 2) Writing one to four lines of comments would be thresholds of the above tendency.","PeriodicalId":364411,"journal":{"name":"2012 19th Asia-Pacific Software Engineering Conference","volume":"9 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-12-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"12","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2012 19th Asia-Pacific Software Engineering Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/APSEC.2012.108","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 12

Abstract

Code size metrics are commonly useful in predicting fault-prone modules, and the larger module tends to be more faulty. In other words, small-size modules are considered to have lower risks of fault. However, since the majority of modules in a software are often small-size, many ``small but faulty'' modules have been found in the real world. Hence, another fault-prone module prediction method, intended for small-size module, is also required. Such a new method for small-size module should use metrics other than code size since all modules are small size. This paper focuses on ``comments'' written in the source code from a novel perspective of size-independent metrics, comments have not been drawn much attention in the field of fault-prone module prediction. The empirical study collects 11,512 small-size modules, whose LOC are less than the median, from three major open source software, and analyzes the relationship between the lines of comments and the fault-proneness in the set of small-size modules. The empirical results show the followings: 1) A module in which some comments are written is more likely to be faulty than non-commented ones, the fault rate of commented modules is about 1.8-3.5 times higher than that of non-commented ones. 2) Writing one to four lines of comments would be thresholds of the above tendency.
评论语句对小模块错误倾向影响的实证分析
代码大小度量通常用于预测容易出错的模块,较大的模块往往出错更多。换句话说,小尺寸的模块被认为具有较低的故障风险。然而,由于软件中的大多数模块通常都是小尺寸的,因此在现实世界中发现了许多“小而有缺陷”的模块。因此,还需要另一种针对小尺寸模块的易损模块预测方法。由于所有模块都是小尺寸的,因此这种针对小尺寸模块的新方法应该使用代码大小以外的度量。本文从一个新颖的大小无关度量的角度关注写在源代码中的“注释”,注释在易发故障模块预测领域还没有引起太多的关注。实证研究从三大开源软件中收集了LOC小于中位数的11,512个小模块,分析了小模块集合中注释行数与故障倾向性的关系。实证结果表明:1)有评论的模块比没有评论的模块更容易出现故障,有评论的模块的故障率大约是没有评论的模块的1.8-3.5倍。2)写一到四行评论将是上述趋势的阈值。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信