A Technique to Detect Change-Coupled Files Using the Similarity of Change Types and Commit Time

Jung Il Kim, Eun Joo Lee · KIPS Transactions on Software and Data Engineering · 2014

변경 결합도는 두 요소들 사이의 향후 변경 연관성을 알려준다. 만약, 소스 파일들이 자주 함께 변경된다면, 그 소스 파일들의 변경 결합도는 높다고 볼 수 있으며, 나중에 다시 함께 변경될 확률이 높다. 일반적으로 소스 파일들 사이의 변경 결합도는 공통 변경 횟수에 기반하여 정의되었다. 그런데 연관성이 낮은 변경들이 일괄적으로 함께 커밋되는 경우, 즉 뒤얽힌 변경(tangled change)과 같은 경우들이 빈번히 발생한다. 따라서 함께 변경된 횟수만으로 소스 파일의 변경 결합도를 결정하는 것은 한계가 있다. 본 논문에서는 기존의 방법을 보완하기 위해, 소스 파일의 변경 시간뿐 아니라 소스 코드 변경 유형의 유사성을 함께 고려하는 것을 제안하였다. 이를 위하여, 우선 추출된 변경 유형 정보를 이용하여 변경 유형 빈도 벡터를 정의하고, 다음에 코사인 유사도 측정을 통해서 각 소스 파일 버전에서 적용된 코드 변경 유사성을 계산한다. 이후 Eclipse 프로젝트인 JDT와 CDT에 대한 사례 연구를 통해 제안된 방법의 효용성을 보였다. Change coupling is a measure to show how strongly change-related two entities are. When two source files have been frequently changed together, they are regarded as change-coupled files and they will probably be changed together in the near future. In the previous studies, the change coupling between two files is defined with the number of common changed time, that is, common commit time of the files. However, the frequency-based technique has limitations because of 'tangled changes', which frequently happens in the development environments with version control systems. The tangled change means that several code hunks have been changed at the same time, though they have no relation with each other. In this paper, the change types of the code hunks are also used to define change coupling, in addition to the common commit time of target files. First, the frequency vector based on change types are defined with the extracted change types, and then, the similarity of change patterns are calculated using the cosine similarity measure. We conducted experiments on open source project Eclipse JDT and CDT for case studies. The result shows that the applicability of the proposed method, compared to the previous studies.

Read the paper · More papers on PaperTik