@article{oai:ipsj.ixsq.nii.ac.jp:00148210, author = {中山, 直輝 and 吉田, 則裕 and 藤原, 賢二 and 飯田, 元 and 高田, 光隆 and 高田, 広章 and Naoki, Nakayama and Norihiro, Yoshida and Kenji, Fujiwara and Hajimu, Iida and Mitsutaka, Takada and Hiroaki, Takada}, issue = {2}, journal = {情報処理学会論文誌}, month = {Feb}, note = {コードクローンは,ソースコード中に存在するコード片のうち,同一プロジェクト内に等価な部分を持つものを指し,主に開発者が行うコピーアンドペーストによって混入する.コピーアンドペーストによるコード片の再利用は,欠陥混入の原因となる恐れがあることから,コードクローン検出ツールを利用して欠陥を発見する手法が提案されている.それらの手法の多くはコードクローン内に存在する欠陥を対象としているが,コードクローンに起因する欠陥はコードクローン外にも存在するため,開発者はコードクローン内外の両方を検査する必要がある.しかし,コードクローン内外のコード片における欠陥混入傾向の差異は明らかになっておらず,コードクローン外を効率的に検査する手法も確立されていない.そこで本研究では,オープンソースソフトウェアの開発履歴を用いて,コードクローン内外における欠陥混入傾向をコード片とコードクローンの位置関係に基づき定量的に調査した.その結果,コードクローン近傍のコード片において欠陥が多く混入する傾向が見られた., Code clone is a duplicate code fragment in the source code of software, and usually generated when developer conducts copy-and-paste. Since reuse of code fragment by copy-and-paste is considered to be a possible reason of introducing or spreading defects, methods of code review based on code clone analysis have been proposed by several previous researches. Although most of them can detect only the defect within cloned code fragment, it is necessary for developers to review both cloned and non-cloned code fragments because clone related defects might exist in non-cloned code fragment as well. However, there is no clarification regarding the tendency of defect occurrence within cloned code fragment or non-cloned code fragment. Moreover, method of code review for efficiently detecting defects in non-cloned fragment has not been established yet. For addressing these issues, this research quantitatively investigated the tendency of defect occurrence within cloned code fragment or non-cloned code fragment based on the positional relationship between code clone and code fragment by using development histories of open source software. The investigation result shows that defects tend to be involved in code fragments neighboring code clones.}, pages = {681--693}, title = {コードクローンとの位置関係に基づく欠陥混入傾向の調査}, volume = {57}, year = {2016} }