In many software companies, developers often spend a significant amount of their time manually searching for faults, with studies showing this process can consume between 30% to 90% of total development time.
Birgit Hofer and Thomas Hirsch from the Institute of Software Technology at Graz University of Technology (TU Graz) have created a solution leveraging existing natural language processing techniques and metrics to streamline the identification of faulty code, thereby enhancing the debugging process.
“We first conducted surveys with developers to identify the main time-consuming aspects of debugging. Surprisingly, we found that the actual fixing of bugs isn’t the primary issue; rather, programmers often struggle to locate faults effectively and narrow down the search within the code,” explains Birgit Hofer.
With this insight, the researchers aimed to devise a scalable solution suitable for applications with extensive codebases.
While there are efficient model-based methods that convert a program into a logical representation (known as a model), these approaches are only viable for smaller programs due to the exponential increase in computing demands as code size grows.
In contrast, Hofer and Hirsch’s method quantifies specific software properties—such as code readability and complexity—allowing it to handle larger codebases, as the computational effort increases linearly. The process begins with a bug report, where testers or users describe the issue, including details about the software version, operating system, and steps leading up to the failure.
Using this bug report, the combination of natural language processing and metrics analyzes the entire codebase, focusing on classes, variable names, files, methods, and function calls.
The system identifies code sections that closely align with the bug report, providing developers with a ranked list of five to ten files likely related to the failure.
Additionally, developers receive insights into the most probable type of fault involved, facilitating quicker bug identification and resolution.
“The time of software developers is valuable, yet they frequently spend more of this time locating and fixing bugs than on developing new features,” notes Birgit Hofer.
“While various approaches exist to tackle this issue, we’ve explored how to combine and enhance them for commercial viability. We’ve established a functioning foundation, but further adaptation to meet individual company needs will be necessary for integration.”
NB// The debugging system is accessible via GitHub, where related papers and project repositories are available.