TY - GEN
T1 - Duplication for the removal of duplication
AU - Ettinger, Ran
AU - Tyszberowicz, Shmuel
N1 - Publisher Copyright:
© 2016 IEEE.
PY - 2016/5/20
Y1 - 2016/5/20
N2 - A semantics-preserving code-motion refactoring transformation by Komondoor and Horwitz (KH) had been shown to be effective in the elimination of type-3 clones, partly thanks to its successful combination of statement reordering with duplication of predicates. According to a recent clone refactorability definition by Tsantalis, however, such a transformation is considered unacceptable whenever the given code fragments contain any statement that cannot be moved. We propose an adaptation of the KH transformation that yields refactorable results according to the definition of Tsantalis. An evaluation of this approach on real-world type-3 clones from the Java portion of the Tiarks benchmark produces promising results, demonstrating how code motion with the duplication of predicates forms an effective step towards the removal of duplication in source code.
AB - A semantics-preserving code-motion refactoring transformation by Komondoor and Horwitz (KH) had been shown to be effective in the elimination of type-3 clones, partly thanks to its successful combination of statement reordering with duplication of predicates. According to a recent clone refactorability definition by Tsantalis, however, such a transformation is considered unacceptable whenever the given code fragments contain any statement that cannot be moved. We propose an adaptation of the KH transformation that yields refactorable results according to the definition of Tsantalis. An evaluation of this approach on real-world type-3 clones from the Java portion of the Tiarks benchmark produces promising results, demonstrating how code motion with the duplication of predicates forms an effective step towards the removal of duplication in source code.
KW - duplication elimination
KW - method extraction
KW - refactoring
UR - http://www.scopus.com/inward/record.url?scp=84978177132&partnerID=8YFLogxK
U2 - 10.1109/SANER.2016.62
DO - 10.1109/SANER.2016.62
M3 - Conference contribution
AN - SCOPUS:84978177132
T3 - 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
SP - 53
EP - 59
BT - 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
PB - Institute of Electrical and Electronics Engineers
T2 - 10th International Workshop on Software Clones, IWSC 2016
Y2 - 15 March 2016
ER -