Towards Semantic Clone Detection via Probabilistic Software Modeling
This addresses a critical issue for software developers and maintainers in identifying functionally equivalent code, though it appears incremental as it builds on existing probabilistic modeling approaches.
The paper tackles the problem of detecting semantic clones in software, which are program components with similar behavior but different text, by introducing Probabilistic Software Modeling (PSM) that models methods as probabilistic networks to analyze structure and runtime behavior. Results indicate high precision and low error rates in detecting clones without syntactic similarity.
Semantic clones are program components with similar behavior, but different textual representation. Semantic similarity is hard to detect, and semantic clone detection is still an open issue. We present semantic clone detection via Probabilistic Software Modeling (PSM) as a robust method for detecting semantically equivalent methods. PSM inspects the structure and runtime behavior of a program and synthesizes a network of Probabilistic Models (PMs). Each PM in the network represents a method in the program and is capable of generating and evaluating runtime events. We leverage these capabilities to accurately find semantic clones. Results show that the approach can detect semantic clones in the complete absence of syntactic similarity with high precision and low error rates.