Quantitative Analysis of Relationships among Comment Description, Comment Out and Fault-Proneness in Open Source Software

Bibliographic Information

Other Title
  • オープンソースソフトウェアにおけるコメント記述及びコメントアウトとフォールト潜在との関係に関する定量分析

Description

一般にコメント文はソースコードを理解する上で有益な情報を提供する.しかしながら,理解性の低いコードや複雑なコードであってもコメント文の存在によってそれらの問題が目立たなくなる場合もある.リファクタリングの分野では,そういったコードの問題を “不吉な匂い” と呼んでおり,その場合にコメント文は “消臭剤” の役割を成すともいわれている.そこで,実際の傾向について考察するため,本論文では七種類のオープンソースソフトウェアに対してデータ収集と定量分析を行っている.その結果として次の傾向が確認されている:(1) コメント記述の多いコードほどフォールトの潜在率も高い傾向にある;(2) LOC に対するコメント記述の割合が 12.6% を超えるコードでのフォールト潜在率は,コメント記述の無いコードの約 2 倍である;(3) コメントアウトも併せて登場するコードではその可能性が更に高い.

Comment descriptions generally provide useful information for understanding the source code. However, some comments mask problematic code fragments which are complex and/or hard-to-understand. In the study of refactoring, such roblematic code fragments are called ``bad smell'' and the associated comments serve as ``air freshener.'' To investigate such impact of comments, this paper collects a lot of source code from seven major open source software and conducts quantitative analysis on their source code. The results show the followings: (1) A code having more comments is more fault-prone; (2) A code, whose ratio of comments to LOC is grater than 12.6%, is about double fault-prone than a code which has no comments; (3) The assurance of the above trend is higher when the code has not only many comments but also a comment-out.

Journal

Keywords

Details 詳細情報について

Report a problem

Back to top