Not logged in.

Contribution Details

Type Conference or Workshop Paper
Scope Discipline-based scholarship
Published in Proceedings No
Title Detecting Similar Java Classes Using Tree Algorithms
Organization Unit
  • Tobias Sager
  • Abraham Bernstein
  • Martin Pinzger
  • Christoph Kiefer
Item Subtype Original Work
Refereed Yes
Status Published in final form
Page Range 65 - 71
Event Title Proceedings of the International Workshop on Mining Software Repositories
Place of Publication Shanghai, China
Publisher ACM
Abstract Text Similarity analysis of source code is helpful during development to provide, for instance, better support for code reuse. Consider a development environment that analyzes code while typing and that suggests similar code examples or existing implementations from a source code repository. Mining software repositories by means of similarity measures enables and enforces reusing existing code and reduces the developing effort needed by creating a shared knowledge base of code fragments. In information retrieval similarity measures are often used to find documents similar to a given query document. This paper extends this idea to source code repositories. It introduces our approach to detect similar Java classes in software projects using tree similarity algorithms. We show how our approach allows to find similar Java classes based on an evaluation of three tree-based similarity measures in the context of five user-defined test cases as well as a preliminary software evolution analysis of a medium-sized Java project. Initial results of our technique indicate that it (1) is indeed useful to identify similar Java classes, (2) successfully identifies the ex ante and expost versions of refactored classes, and (3) provides some interesting insights into within-version and between-version dependencies of classes within a Java project.
Export BibTeX