Skip to main content
notice

Master Thesis Defense: Guo Qiao

April 13, 2015
|


Speaker: Guo Qiao

Supervisor: Dr. N. Tsantalis

Examining Committee: Drs. J. Rilling, E. Shihab, A. Krzyzak (Chair)

Title: Mining and Analysis of Control Structure Variant Clones

Date: Monday, April 13, 2015

Time: 13:00

Place: EV 3.309

ABSTRACT

Code duplication (software clones) is a very common phenomenon in existing software systems and is also considered as an indication of poor software maintainability. In the recent years, the detection of clones has drawn considerable attention. The majority of the existing clone detection techniques focus on the syntactic similarity of code fragments. More specifically, they support the detection of Type-1 clones (i.e., identical code fragments except for variations in white space, layout, and comments), Type-2 clones (i.e., structurally/syntactically identical fragments except for variations in identifiers, literals, types, layout and comments), and Type-3 clones (i.e., copied fragments with statements changed, added or removed in addition to variations in identifiers, literals, types, layout and comments).

However, recent studies have shown that when developers implement the same functionality, their code solutions may differ substantially in terms of their syntactical structure. This is because developers follow different programming styles or language features when implementing, for instance, control structures, such as loops and conditionals. From the perspective of clone management, different strategies are required to detect and refactor these control structure variant clones. Thus, there is a clear need of functionality-aware clone mining approaches, which are able to distinguish functional clones from syntactical clones.

In this thesis, we propose a method for mining control structure variant clones. More specifically, the proposed approach can mine clones which use different, but functionally equivalent control structures to implement functionally similar iterations and conditionals. We evaluate our method on 6 open-source systems by manually inspecting the mined clones and computing the precision and recall of our technique. Moreover, we create a publicly available benchmark of control structure variant clones. Based on the clones we found, we also propose some improvements to tackle the limitations of JDeodorant in the refactoring of control structure variant clones.




Back to top

© Concordia University