USask graduate researcher Avijit Bhattacharjee’s research aims to create a resource for software developers to make the coding process more understandable and efficient. (Photo: Submitted)

Building a tool for more efficient software coding: USask research

University of Saskatchewan (USask) College of Arts and Science graduate researcher Avijit Bhattacharjee has set out to find a solution to software bugs with a tool that helps developers to read, understand and document computer code. This way, software can be produced quickly, efficiently and increasingly error-free.

Unfortunately, software errors (bugs) can have massive economic impacts, with only 606 bugs costing $1.7 trillion worldwide in 2017, affecting 3.7 billion people and over 300 companies,” said Bhattacharjee.

Software bugs have the potential to put humans in dangerous situations. Glitches in flight control software can lead to fatal plane crashes or errors in self-driving car programs can cause an increased risk of accidents.

“The ratio of reading versus writing code is almost nine to one. Therefore, by guiding developers to read code more effectively and efficiently, we can minimize developers’ time, ultimately reducing software cost and encouraging more bug-free software.”

To combat bugs during the software developing process, Bhattacharjee and research supervisors Dr. Banani Roy (PhD) and Dr. Kevin Schneider (PhD) from the USask Department of Computer Science are developing a tool to aid developers in reading and writing better code.

The team has been working alongside the USask Global Institute for Water Security, where their source code tool has been used to maintain and develop the Cold Region Hydrological Model (CRHM) software program that is used to predict potential fluxes and states of water and energy in the environment.

Bhattacharjee also developed the back end of the USask Global Water Futures Nutrient App, which allows farmers and scientists across North America to measure water quality by using their phone cameras and low-cost water test kits. The app can measure nutrient concentrations in freshwater and provide water contamination alerts.

In both cases, it is vitally important the information provided to environmental decision makers is as accurate as possible.

“We created an Abstract Code Summary (ACS) tree, an indexed data structure for searching and exploring the codebase in a guided way,” said Bhattacharjee.

The ACS tree provides a way for computer science students and experienced developers to effectively navigate complex computer code and as a result improve their ability to make modifications quickly and reduce errors.

“Our user study suggests that the ACS tree can help developers do software maintenance tasks efficiently and effectively, which allows them to produce, migrate, and maintain quality software that is sustainable, reliable, scalable, and cost-effective.”

The ACS tree is created by building graphs of relationships between functions in a computer program—referred to as call graphs—and provides a resource for developers to help them locate and document relevant source code for further development or future projects.

The study is the first of its kind to provide a multi-perspective view of computer source code using natural language processing techniques—a way to teach computers to understand human languages—and to be conducted with an exclusive focus on water security.

After helping upgrade the CRHM water modelling system while working on his master’s thesis, Bhattacharjee—who currently works as a software engineer at XGen AI—now plans to continue developing the software tool so that it understands additional programming languages and integrates with other computer platforms.

“The impact and importance of having an interactive software tool that can support software developers in understanding source code of poorly documented software systems drives me to move forward with the research.”

The research is funded by the Natural Sciences and Engineering Research Council of Canada.

This article first ran as part of the 2022 Young Innovators series, an initiative of the USask Research Profile and Impact office in partnership with the Saskatoon StarPhoenix.

Share this story