mlsanityData to 7 Oct 2026

SemaDiff: Identifying Semantic-Changing Commits with Generated Code and Tests

arXiv 2607.13111 ↗First posted 14 Jul 2026cs.SE cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

Distinguishing semantic-preserving commits from changing ones remains an open challenge in software repository mining. While existing approaches detect refactoring commits accurately, they cannot ensure that a commit is purely semantic-preserving, without any interleaving behaviour-changing modification. This limitation can impact several tasks, such as debugging, fault localisation, bug dataset construction, rollback analysis, and bug fixes backporting. To fill this gap, we propose SemaDiff, a novel approach for identifying semantic-preserving commits through behaviour-based analysis; comparison of similar test execution on pre- and post-commit versions. As code impacted by the refactoring is often hard to test and different accross both versions, we propose generating additional calling methods to that code, which serve as testing target. Given a commit, SemaDiff analyses the diff to identify modified code and extracts unchanged dependent code that calls it. It then generates an additional dependent class using a large language model to exercise the changed code in both versions, and automatically generates tests for the dependent code. This way, we obtain the same tests for the different code versions, enabling the behavioural-difference detection. The commit is classified as semantic-preserving only if all generated tests produce identical outcomes across the two versions. To evaluate SemaDiff, we construct and annotate manually a dataset of 183 commits, gathered from well-known open-source Java projects. The obtained results show that SemaDiff distinguishes accurately semantic-preserving from -- changing commits in about 76% of the cases, with a 100% precision in semantic-changing commit detection.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 12 of its 42 references that are in the map. First posted on arXiv 14 Jul 2026.

Builds on

12 of 42 references.

References · 12

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  2. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  3. 2024DeepSeek LLM: Scaling Open-Source Language Models with Longtermismcited by 621
  4. 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
  5. 2024Test-Driven Development for Code Generationcited by 32
  6. 2015Untangling Fine-Grained Code Changescited by 10
  7. 2024ChangeGuard: Validating Code Changes via Pairwise Learning-Guided Executioncited by 6
  8. 2017RefDiff: Detecting Refactorings in Version Historiescited by 5
  9. 2020On the Relationship between Refactoring Actions and Bugs: A Differentiated Replicationcited by 5
  10. 2024Detecting Refactoring Commits in Machine Learning Python Projects: A Machine Learning-Based Approachcited by 4
  11. 2026A Differential Fuzzing-Based Evaluation of Functional Equivalence in LLM-Generated Code Refactoringscited by 3
  12. 2026How well LLM-based test generation techniques perform with newer LLM versions?cited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.