講演抄録/キーワード |
講演名 |
2007-07-24 10:00
ソースコードにおけるコメントの頻度と保守性の関係解析 ○岡崎博和・阿萬裕久(愛媛大) KBSE2007-9 |
抄録 |
(和) |
本稿はソースコードの変更率(保守容易性に関する尺度)とコメントの頻度に着目している.コメント文にはソースコードの理解を助ける働きがあり,コード中へ適切に記述していくことで開発者によるコードの自己レビューが推進される.それによりコード中に含まれるフォールトが検出されやすくなり,ソースコードの品質向上も期待される.これまでの研究では,ソースコードにおけるコメント文の行数と保守容易性との間について統計的に有意な関係が見出されている.本稿ではさらなる解析として,オープンソースソフトウェア{\rm Eclipse}におけるバージョンアップ$4,521$件について統計解析を行い,中規模以上のソースコード({\rm LOC} $\geq 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 $\geq 67$). However the higher frequency of comment description is corresponded to the lower maintainability. |
キーワード |
(和) |
コメント文 / 保守性 / メトリクス / コメントの頻度 / コードレビュー / / / |
(英) |
comment statement / maintainability / metric / comment frequency / code review / / / |
文献情報 |
信学技報, vol. 107, no. 159, KBSE2007-9, pp. 1-6, 2007年7月. |
資料番号 |
KBSE2007-9 |
発行日 |
2007-07-17 (KBSE) |
ISSN |
Print edition: ISSN 0913-5685 Online edition: ISSN 2432-6380 |
著作権に ついて |
技術研究報告に掲載された論文の著作権は電子情報通信学会に帰属します.(許諾番号:10GA0019/12GB0052/13GB0056/17GB0034/18GB0034) |
PDFダウンロード |
KBSE2007-9 |