The Impact of Compiler Warnings on Code Quality in C++ ProjectsICPCICPC Full paper
Modern compilers often offer a variety of warning flags, which developers can enable to get feedback on code that, while syntactically correct, may be problematic. In the case of C++, one example of such “correct but problematic” code is code that leads to undefined behavior (UB). The usage of compiler warnings has long been suspected as a way to decrease bugs and increase code quality. However, empirical evidence that supports this hypothesis is rare. In this study, we present evidence from a study of 127 open source C++ projects. We categorize their usage of compiler warnings into five groups based on which warning flags are being used, and analyse the relationship between compiler warnings and five quality metrics (bugs, critical issues, vulnerabilities, code smells, and technical debt) using Bayesian analysis. We conclude that, in general, compiler warnings indeed correlate with, and potentially cause, higher code quality, with the clearest impact being on the number of critical issues in a project. Using stricter warning flags expectantly correlates with higher code quality in our study objects. However, there are substantial differences between projects, which we attribute to the project’s individual development culture. That is, while warnings matter, other factors such as quality culture, are likely to be even more important to source code quality.
Tue 16 AprDisplayed time zone: Lisbon change
11:00 - 12:30 | Bugs, Defects, and Code QualityResearch Track / / Early Research Achievements (ERA) / Replications and Negative Results (RENE) at Sophia de Mello Breyner Andresen Chair(s): Alberto Martin-Lopez Software Institute - USI, Lugano | ||
11:00 10mTalk | What the Fix? A Study of ASAT Rules DocumentationICPCICPC Full paper Research Track Corentin Latappy Univ. Bordeaux, CNRS, Bordeaux INP, LaBRI, UMR 5800, Promyze, Thomas Degueule CNRS, Jean-Rémy Falleri Bordeaux INP, Romain Robbes CNRS, LaBRI, University of Bordeaux, Xavier Blanc Univ. Bordeaux, Bordeaux INP, CNRS, LaBRI, UMR5800, Cédric Teyton Promyze, Bordeaux, France Pre-print | ||
11:10 10mTalk | SolaSim: Clone Detection for Solana Smart Contracts via Program RepresentationICPCICPC Full paper Research Track Che Wang Peking University, China, Yue Li Peking University, Jianbo Gao Peking University, Ke Wang Peking University, Jiashuo Zhang Peking University, China, Zhi Guan Peking University, Zhong Chen | ||
11:20 10mTalk | The Impact of Compiler Warnings on Code Quality in C++ ProjectsICPCICPC Full paper Research Track Albin Johansson Chalmers University of Technology, Carl Holmberg Chalmers University of Technology, Francisco Gomes de Oliveira Neto Chalmers | University of Gothenburg, Philipp Leitner Chalmers | University of Gothenburg | ||
11:30 10mTalk | Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning AttacksICPCICPC Full paper Research Track Domenico Cotroneo University of Naples Federico II, Cristina Improta University of Naples Federico II, Pietro Liguori University of Naples Federico II, Roberto Natella Federico II University of Naples Pre-print | ||
11:40 10mTalk | A Just-in-time Software Defect Localization Method based on Code Graph RepresentationICPCICPC Full paperVirtual-Talk Research Track Huan Zhang Central South University, Wei-Huan Min Central South University, Zhao Wei Tencent, Li Kuang School of Computer Science and Engineering, Central South University, Hong-Hao Gao Shanghai University, Huai-Kou Miao Shanghai University | ||
11:50 10mTalk | SICode: Embedding-Based Subgraph Isomorphism Identification for Bug DetectionICPCICPC Full paper Research Track Yuanjun Gong Renmin University of China, Jianglei Nie Renmin University of China, Wei You Renmin University of China, Wenchang Shi Renmin University of China, China, Jianjun Huang Renmin University of China, Bin Liang Renmin University of China, China, Jian Zhang Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences | ||
12:00 10mTalk | Tuning Code Smell Prediction Models: A Replication StudyICPCICPC RENE Paper Replications and Negative Results (RENE) Henrique Gomes Nunes Federal University of Minas Gerais (UFMG), Amanda Santana Federal University of Minas Gerais (UFMG), Eduardo Figueiredo Federal University of Minas Gerais, Brazil, Heitor Augustus Xavier Costa Federal University of Lavras | ||
12:10 8mTalk | Studying Vulnerable Code Entities in RICPCICPC ERA Paper Early Research Achievements (ERA) Zixiao Zhao University of British Columbia, Millon Madhur Das Indian Institute of Technology Kharagpur, Fatemeh Hendijani Fard University of British Columbia | ||
12:18 12mTalk | Bugs, Defects, and Code Quality: Panel with SpeakersICPC Discussion |