Bibliograph. Daten | Gröninger, Lars: Reasoning about Code Changes via Pairwise Learning-Guided Execution. Universität Stuttgart, Fakultät Informatik, Elektrotechnik und Informationstechnik, Masterarbeit Nr. 64 (2024). 69 Seiten, englisch.
|
| Kurzfassung | Code changes are an integral part of the development process of software. However, it is non-trivial to identify whether a given code change is semantics-preserving or semantics-changing, i.e., whether it maintains the behavior of the changed code or modifies it. Being able to tell for a given code change whether it preserves or changes semantics is beneficial, since it can help detect mistakes early. For example, a refactoring that changes the behavior of the affected code is most likely incorrect and similarly a bug fix that preserves the behavior does not fulfill its intended goal since the buggy behavior remains. To enable researcher and practitioners alike to automatically identify if a given code change maintains or modifies the changed code’s semantics, we propose LExecutorCC, an approach that utilizes learning-guided execution to perform dynamic analysis. LExecutorCC is able to automatically identify whether a given function-level code change is semantics-preserving or semantics-changing. This is done by dynamically executing the version of the function before the change and the version after the change and reasoning about their runtime behavior to detect deviations. We evaluate our approach on a dataset of function-level code changes collected from popular open-source projects, which we manually annotate. Our results show that LExecutorCC is able to correctly identify whether a given code change is semantics-preserving or semantics-changing with an accuracy of 78.1% and achieves a precision and recall of 77.1% and 69.5% respectively. Additionally, we create more evaluation datasets by applying transformations to the collected opensource functions. This includes using a refactoring tool that transforms code to be more idiomatic or asking large language models to improve the quality of the code. We evaluate LExecutorCC also on these datasets and find that many code changes obtained this way, even though they are meant to preserve the semantics, change the semantics instead.
|
| Abteilung(en) | Universität Stuttgart, Institut für Softwaretechnologie, Software Lab - Programmanalysen
|
| Betreuer | Pradel, Prof. Michael; Souza, Beatriz |
| Eingabedatum | 17. Dezember 2024 |
|---|