Investigating the Impact of Code Comment Inconsistency on Bug Introducing

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Radmanesh, Shiva, Imani, Aaron, Ahmed, Iftekhar, Moshirpour, Mohammad
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910606905311232
author Radmanesh, Shiva
Imani, Aaron
Ahmed, Iftekhar
Moshirpour, Mohammad
author_facet Radmanesh, Shiva
Imani, Aaron
Ahmed, Iftekhar
Moshirpour, Mohammad
contents Code comments are essential for clarifying code functionality, improving readability, and facilitating collaboration among developers. Despite their importance, comments often become outdated, leading to inconsistencies with the corresponding code. This can mislead developers and potentially introduce bugs. Our research investigates the impact of code-comment inconsistency on bug introduction using large language models, specifically GPT-3.5. We first compare the performance of the GPT-3.5 model with other state-of-the-art methods in detecting these inconsistencies, demonstrating the superiority of GPT-3.5 in this domain. Additionally, we analyze the temporal evolution of code-comment inconsistencies and their effect on bug proneness over various timeframes using GPT-3.5 and Odds ratio analysis. Our findings reveal that inconsistent changes are around 1.5 times more likely to lead to a bug-introducing commit than consistent changes, highlighting the necessity of maintaining consistent and up-to-date comments in software development. This study provides new insights into the relationship between code-comment inconsistency and software quality, offering a comprehensive analysis of its impact over time, demonstrating that the impact of code-comment inconsistency on bug introduction is highest immediately after the inconsistency is introduced and diminishes over time.
format Preprint
id arxiv_https___arxiv_org_abs_2409_10781
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Investigating the Impact of Code Comment Inconsistency on Bug Introducing
Radmanesh, Shiva
Imani, Aaron
Ahmed, Iftekhar
Moshirpour, Mohammad
Software Engineering
Code comments are essential for clarifying code functionality, improving readability, and facilitating collaboration among developers. Despite their importance, comments often become outdated, leading to inconsistencies with the corresponding code. This can mislead developers and potentially introduce bugs. Our research investigates the impact of code-comment inconsistency on bug introduction using large language models, specifically GPT-3.5. We first compare the performance of the GPT-3.5 model with other state-of-the-art methods in detecting these inconsistencies, demonstrating the superiority of GPT-3.5 in this domain. Additionally, we analyze the temporal evolution of code-comment inconsistencies and their effect on bug proneness over various timeframes using GPT-3.5 and Odds ratio analysis. Our findings reveal that inconsistent changes are around 1.5 times more likely to lead to a bug-introducing commit than consistent changes, highlighting the necessity of maintaining consistent and up-to-date comments in software development. This study provides new insights into the relationship between code-comment inconsistency and software quality, offering a comprehensive analysis of its impact over time, demonstrating that the impact of code-comment inconsistency on bug introduction is highest immediately after the inconsistency is introduced and diminishes over time.
title Investigating the Impact of Code Comment Inconsistency on Bug Introducing
topic Software Engineering
url https://arxiv.org/abs/2409.10781