@article{oai:ipsj.ixsq.nii.ac.jp:00106388, author = {山中, 裕樹 and 崔, 恩瀞 and 吉田, 則裕 and 井上, 克郎 and Yuki, Yamanaka and Eunjong, Choi and Norihiro, Yoshida and Katsuro, Inoue}, issue = {10}, journal = {情報処理学会論文誌}, month = {Oct}, note = {ソフトウェア保守における問題の1つとしてコードクローン(ソースコード中に存在する同一または類似した部分を持つコード片)が指摘されている.これまでの研究において様々なコードクローン検出手法が提案されてきたが,多くの手法がプログラムの構造的な類似性のみに着目している.また,プログラムの意味的な処理の類似性に着目した手法では,検出時間に膨大な時間がかかるという問題点がある.そこで本研究では,情報検索技術を利用した関数クローン(関数単位のコードクローン)の検出手法を提案する.関数単位のコードクローンは処理の内容がまとまっているため,コード片単位のコードクローンに比べてライブラリ化などの集約の対象になりやすいと考えられる.本手法では,ソースコード中の識別子や予約語に利用される単語に対して重み付けを行うことによって,関数を特徴ベクトルに変換する.そして,特徴ベクトル間の類似度を求めることによって関数クローンの検出を行う.評価実験では,既存のコードクローン検出手法と比較を行い,高速に高い精度で検出を行うことができた., A code clone (i.e., code fragment that has identical or similar fragment to it in the source code) is one of the major problems for software maintenance. So far, a lot of approaches have been developed on the detection of code clones. Several of them focus on semantic similarities based on control and data flow analyses, however they lack the scalability for large-scale source code. In this study, we propose an approach to detect function clones using information retrieval techniques. The proposed approach generates a feature vector for each function based on the occurrence of identifiers and reserved keywords, and then performs clustering of generated vectors. Finally, a set of functions corresponding to vectors in each cluster is detected as a set of semantic clones. As a case study, we applied the proposed approach to open source software systems. The result shows that the proposed approach is able to perform faster and more precise detection of function clones compared to the existing approach based on the similarity between abstract memory states.}, pages = {2245--2255}, title = {情報検索技術に基づく高速な関数クローン検出}, volume = {55}, year = {2014} }