TCSE logo 
 Sigsoft logo
Sustainability badge
Tue 29 Apr 2025 14:50 - 15:10 at 210 - APR Session 3 Chair(s): Tegawendé F. Bissyandé, Chao Peng

This paper presents a method to automatically fix implicit data loss warnings in large C++ projects using Large Language Models (LLMs). Our approach uses the Language Server Protocol (LSP) to gather context, Tree-sitter to extract relevant code, and LLMs to make decisions and generate fixes. The method evaluates the necessity of range checks concerning performance implications and generates appropriate fixes. We tested this method in a large C++ project, resulting in a 92.73% acceptance rate of the fixes by human developers during the code review. Our LLM-generated fixes reduced the number of warning fix changes that introduced additional instructions due to range checks and exception handling by 39.09% compared to a baseline fix strategy. This result was 13.56% behind the optimal solutions created by human developers. These findings demonstrate that our LLM-based approach can reduce the manual effort to address compiler warnings while maintaining code quality and performance in a real-world scenario. Our automated approach shows promise for integration into existing development workflows, potentially improving code maintenance practices in complex C++ software projects.

Tue 29 Apr

Displayed time zone: Eastern Time (US & Canada) change

14:00 - 15:30
APR Session 3APR at 210
Chair(s): Tegawendé F. Bissyandé University of Luxembourg, Chao Peng ByteDance
14:00
30m
Other
Discussion
APR
Chao Peng ByteDance
14:30
20m
Talk
Bogus Bugs, Duplicates, and Revealing Comments: Data Quality Issues in NPR
APR
Julian Prenner Free University of Bozen-Bolzano, Romain Robbes CNRS, LaBRI, University of Bordeaux
14:50
20m
Talk
LLM-Based Repair of C++ Implicit Data Loss Compiler Warnings: An Industrial Case Study
APR
Chansong You SAP Labs Korea, Hyun Deok Choi SAP Labs Korea, Jingun Hong SAP Labs Korea
15:10
20m
Talk
Scholia - An XAI Framework for APR
APR
Nethum Lamahewage University of Moratuwa, Sri Lanka, Nimantha Cooray University of Moratuwa, Sri Lanka, Ridwan Salihin Shariffdeen National University of Singapore, Sandareka Wickramanayake University of Moratuwa, Sri Lanka, Nisansa de Silva University of Moratuwa, Sri Lanka
:
:
:
: