Towards Overcoming Type Limitations in Semantic Clone Detection

Francesco Leone, Shingo Takada

Research output: Chapter in Book/Report/Conference proceedingConference contribution

2 Citations (Scopus)

Abstract

Currently available tools for semantic clone detection have serious type limitations related to objects, in particular related to instantiation and comparison. The trend in the recent research has focused on improving the performance rather than removing these constraints. This paper proposes a test-based approach for semantic clone detection in Java which overcomes these problems. The test-based approach consists in running two methods with the same input and comparing their outputs. For object instantiation, the approach uses EvoSuite, an automatic JUnit test generator, to create the tests with correct instantiations of all the needed classes, which are then modified to make them suitable for semantic clone detection. The output comparison uses the DeepHash function to obtain numerical values for objects, considering the values of each instance variable. The approach was evaluated with SemanticCloneBench. The results show that the proposed approach performs very well in terms of precision, achieving 94.4%, which is about 8% higher than the reported precision of SLACC, a recent semantic clone detector. Furthermore, out of 228 methods used for the evaluation, the approach was not able to perform the detection for only ten methods.

Original languageEnglish
Title of host publicationProceedings - 2022 IEEE 16th International Workshop on Software Clones, IWSC 2022
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages25-31
Number of pages7
ISBN (Electronic)9781665484473
DOIs
Publication statusPublished - 2022
Event16th IEEE International Workshop on Software Clones, IWSC 2022 - Limassol, Cyprus
Duration: 2022 Oct 22022 Oct 7

Publication series

NameProceedings - 2022 IEEE 16th International Workshop on Software Clones, IWSC 2022

Conference

Conference16th IEEE International Workshop on Software Clones, IWSC 2022
Country/TerritoryCyprus
CityLimassol
Period22/10/222/10/7

Keywords

  • output comparison
  • semantic code clones
  • test generation
  • type limitation

ASJC Scopus subject areas

  • Software
  • Safety, Risk, Reliability and Quality
  • Artificial Intelligence

Fingerprint

Dive into the research topics of 'Towards Overcoming Type Limitations in Semantic Clone Detection'. Together they form a unique fingerprint.

Cite this