Copying and pasting code snippets, with or without intent, is a very common activity in software develop-ment. These have both positive and negative aspects because they save time, but cause an increase in costs forsoftware maintenance. However, often the copied code changes due to bug fixes or refactorings, which couldaffect clone detection. In this regard, this study aims to investigate whether the transformations performedby the compiler on the code can determine the appearance of a set of previously undetectable clones. Theproposed approach involves the extraction of software quality metrics on both decompiled and source codeto bring to light any differences due to the presence of undetectable clones on the source code. Experimentswere conducted on five open-source Java software systems. The results show that indeed compiler optimiza-tions lead to the appearance of a set of previously undetected clones, which can be called logical clones. Thisphenomenon in Java appears to be marginal as it amounts to 5% more clones than normal, therefore a statis-tically negligible result in small projects, but in the future, it would be interesting to extend the study to otherprogramming languages to evaluate any different cases.

Understanding Compiler Effects on Clone Detection Process

Iammarino, Martina;
2023-01-01

Abstract

Copying and pasting code snippets, with or without intent, is a very common activity in software develop-ment. These have both positive and negative aspects because they save time, but cause an increase in costs forsoftware maintenance. However, often the copied code changes due to bug fixes or refactorings, which couldaffect clone detection. In this regard, this study aims to investigate whether the transformations performedby the compiler on the code can determine the appearance of a set of previously undetectable clones. Theproposed approach involves the extraction of software quality metrics on both decompiled and source codeto bring to light any differences due to the presence of undetectable clones on the source code. Experimentswere conducted on five open-source Java software systems. The results show that indeed compiler optimiza-tions lead to the appearance of a set of previously undetected clones, which can be called logical clones. Thisphenomenon in Java appears to be marginal as it amounts to 5% more clones than normal, therefore a statis-tically negligible result in small projects, but in the future, it would be interesting to extend the study to otherprogramming languages to evaluate any different cases.
2023
Software Maintainability
Software Quality Metrics
Clones Detection
Decompiled Source-Code
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.12607/28683
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
social impact