Semantic Clone Detection via Probabilistic Software Modeling

08/11/2020
by   Hannes Thaller, et al.
0

Semantic clone detection is the process of finding program elements with similar or equal runtime behavior. For example, detecting the semantic equality between the recursive and iterative implementation of the factorial computation. Semantic clone detection is the de facto technical boundary of clone detectors. This boundary was tested over the last years with interesting new approaches. This work contributes a semantic clone detection approach that detects clones with 0 Detection via Probabilistic Software Modeling (SCD-PSM) as a stable and precise solution to semantic clone detection. PSM builds a probabilistic model of a program that is capable of evaluating and generating runtime data. SCD-PSM leverages this model and its model elements to finding behaviorally equal model elements. This behavioral equality is then generalized to semantic equality of the original program elements. It uses the likelihood between model elements as a distance metric. Then, it employs the likelihood ratio significance test to decide whether this distance is significant, given a pre-specified and controllable false-positive rate. The output of SCD-PSM are pairs of program elements (i.e., methods), their distance, and a decision whether they are clones or not. SCD-PSM yields excellent results with a Matthews Correlation Coefficient greater 0.9. These results are obtained on classical semantic clone detection problems such as detecting recursive and iterative versions of an algorithm, but also on complex problems used in coding competitions.

READ FULL TEXT
research
01/21/2020

Towards Semantic Clone Detection via Probabilistic Software Modeling

Semantic clones are program components with similar behavior, but differ...
research
01/21/2020

Towards Fault Localization via Probabilistic Software Modeling

Software testing helps developers to identify bugs. However, awareness o...
research
12/17/2019

Probabilistic Software Modeling: A Data-driven Paradigm for Software Analysis

Software systems are complex, and behavioral comprehension with the incr...
research
06/23/2018

Probabilistic Software Modeling

Software Engineering and the implementation of software has become a cha...
research
07/29/2018

Information Distance Revisited

We consider the notion of information distance between two objects x and...
research
07/19/2022

Automated Black-Box Boundary Value Detection

The input domain of software systems can typically be divided into sub-d...

Please sign up or login with your details

Forgot password? Click here to reset