본문 바로가기
KERD
논문KCI 등재

코드클론 표본 집합체 자동 생성기

Automatic Generation of Code-clone Reference Corpus

0

조회

0

다운로드

0

인용

0

참고문헌

키워드

주제분류컴퓨터학

초록

프로그램 내의 코드클론을 찾아주는 도구나 기술들을 평가하기 위해서는 해당 도구가 탐지하는 못하는 클론이 있는지 확인해야 한다. 이를 위해서 샘플 소스코드에 대해서 코드클론을 모두 모아놓은 표준 표본 집합체가 필요하다. 그런데 기존의 코드클론 표본 집합체는 여러 클론탐지 도구의 결과들을 참조해 수작업으로구축하지만 평가 기준으로 사용하기에는 빠져있는 표본이 많다. 본 연구에서는 자동으로 코드클론 표본 집합체를 생성하는 방법을 제안하고 도구를 구현하였다. 이 도구는 프로그램 소스를 핵심구문트리로 변환한 뒤, 트리를 샅샅이 비교하여 클론 패턴을 찾아낸다. 본 도구는 오탐이 없으며, 특정한 패턴을 제외하고 미탐도 없어서 코드클론 표본 집합체를 자동으로 생성하기 적합하다. 실험결과 상용도구인 CloneDR에서 찾아낸 클론을모두 포함하면서 2-3배 더 많은 클론들을 찾아내었고, Bellon의 기존 표본 집합체의 클론들을 거의 대부분 포함(93-100%)하면서 자동 구축한 표본 집합체의 크기가 훨씬 크다.

Abstract

To evaluate the quality of clone detection tools, we should know how many clones the tool misses. Hence we need to have the standard code-clone reference corpus for a carefully chosen set of sample source codes. The reference corpus available so far has been built by manually collecting clones from the results of various existing tools. This paper presents a tree-pattern-based clone detection tool that can be used for automatic generation of reference corpus. Our tool is compared with CloneDR for precision and Bellon's reference corpus for recall. Our tool finds no false positives and 2 to 3 times more clones than CloneDR. Compared to Bellon's reference corpus, our tools shows the 93%-to-100% recall rate and detects far more clones.

참고문헌 (11)

  1. Baxter, I., "Clone Detection Using Abstract Syntax Trees", In ICSM, pp.368~377 (1998)
  2. Bellon, S., "Comparison and Evaluation of Clone Detection Tools", IEEE TSE, 33(9), pp.577~591 (2007)
  3. Burd, E., "Evaluating CLone Detection Tools for Use during Preventative Maintenance", In ICSM, pp.35~43 (2002)
  4. Giesecke. Simon, "Generic modelling of code clones", Proceeding of Duplication, Redundancy, and Similarity in Software (2006)
  5. Kapser, C., "Supporting the Analysis of Clones in Software Systems: A Case Study", Journal of Software Maintenance and Evolution:Research and Practice, 18(2), pp.61~82 (2006)
  6. Lee, Hyo-Sub, "Tree-pattern- based duplicate code detection", In DSMM, pp.7~12 (2009)
  7. Liu, C., "GPLAG: Detection of Software Plagiarism by Program Dependence Graph Analysis", In KDD, pp.872~881 (2006)
  8. Plotkin, G. D., "A note on inductive generalization", Machine Intelligence, 5, pp.153~163 (1970)
  9. Reynolds, J. C., "Transformational systems and the algebraic structure of atomic formulas", Machine Intelligence, 5, pp.135~151 (1970)
  10. A survey on software clone detection research, "Roy, C.K.", 115~, pp.Queen's School of computing TR 2007-541 (2007)
  11. Roy, C. K., "Comparison and Evaluation of Code Clone Detection Techniques and Tools: A Qualitative Approach", Journal of Software Maintenance and Evolution, 21(2), pp.143~169 (2009)

이 간행물의 다른 논문 (6건)