講演名 2007-07-24
ソースコードにおけるコメントの頻度と保守性の関係解析
岡崎 博和, 阿萬 裕久,
PDFダウンロードページ PDFダウンロードページへ
抄録(和) 本稿はソースコードの変更率(保守容易性に関する尺度)とコメントの頻度に着目している.コメント文にはソースコードの理解を助ける働きがあり,コード中へ適切に記述していくことで開発者によるコードの自己レビューが推進される.それによりコード中に含まれるフォールトが検出されやすくなり,ソースコードの品質向上も期待される.これまでの研究では,ソースコードにおけるコメント文の行数と保守容易性との間について統計的に有意な関係が見出されている.本稿ではさらなる解析として,オープンソースソフトウェアEclipseにおけるバージョンアップ4,521件について統計解析を行い,中規模以上のソースコード(LOC≧67)において,コメント文の量が多ければソースコードの変更率は低くなる傾向が確認されている.ただし,その中でもコメント記述の頻度が高い場合においては,逆にソースコードの変更率が高くなる傾向も得られている.
抄録(英) Comment statements are important in understanding a source code. A thorough writing of comments in a source code leads the developers to more carefully review of the code by themselves, which would aid to detect software faults, and those careful review could preserve high quality of the code. A previous study has shown that a source code including more comments would have more maintainability. While the study has focused on only a comment density, a comment frequency would be important measure as well. As a further study, this paper performs a statistical analysis with 4,521 version-upgrade cases in one open-source software "Eclipse". The empirical results show that more comments are related to more maintainability, in middle or large scale code (LOC≧67). However the higher frequency of comment description is corresponded to the lower maintainability.
キーワード(和) コメント文 / 保守性 / メトリクス / コメントの頻度 / コードレビュー
キーワード(英) comment statement / maintainability / metric / comment frequency / code review
資料番号 KBSE2007-9
発行日

研究会情報
研究会 KBSE
開催期間 2007/7/17(から1日開催)
開催地(和)
開催地(英)
テーマ(和)
テーマ(英)
委員長氏名(和)
委員長氏名(英)
副委員長氏名(和)
副委員長氏名(英)
幹事氏名(和)
幹事氏名(英)
幹事補佐氏名(和)
幹事補佐氏名(英)

講演論文情報詳細
申込み研究会 Knowledge-Based Software Engineering (KBSE)
本文の言語 JPN
タイトル(和) ソースコードにおけるコメントの頻度と保守性の関係解析
サブタイトル(和)
タイトル(英) A Study on Relationship between Comment Frequency and Source Code Maintainability
サブタイトル(和)
キーワード(1)(和/英) コメント文 / comment statement
キーワード(2)(和/英) 保守性 / maintainability
キーワード(3)(和/英) メトリクス / metric
キーワード(4)(和/英) コメントの頻度 / comment frequency
キーワード(5)(和/英) コードレビュー / code review
第 1 著者 氏名(和/英) 岡崎 博和 / Hirokazu OKAZAKI
第 1 著者 所属(和/英) 愛媛大学大学院理工学研究科電子情報工学専攻
Graduate School of Science and Engineering, Ehime University
第 2 著者 氏名(和/英) 阿萬 裕久 / Hirohisa AMAN
第 2 著者 所属(和/英) 愛媛大学大学院理工学研究科電子情報工学専攻
Graduate School of Science and Engineering, Ehime University
発表年月日 2007-07-24
資料番号 KBSE2007-9
巻番号(vol) vol.107
号番号(no) 159
ページ範囲 pp.-
ページ数 6
発行日