Alt tag
There is only one Dr. Chanchal Roy (PhD), whose clone-detecting software research has influenced computer scientists around the world. (Photo illustration: Chris Putnam)

The clone detector

Award-winning USask researcher fights software bugs at the source

News

by Chris Putnam

No one can spot a clone like Dr. Chanchal Roy (PhD).

On May 3, the associate professor in the Department of Computer Science was presented with a 2019 New Researcher Award from the University of Saskatchewan (USask). It was the fifth major research award in less than a year for Roy—who studies, among other problems, how to recognize clones.

“Finding similarity is a fundamental problem for any science,” said Roy, a faculty member in the College of Arts and Science.

The clones Roy researches are pieces of computer code, not living things—although his work draws on some of the same technologies used in biology.

Countless scientific fields have benefitted from Big Data and machine learning techniques developed by computer scientists. Roy turns those techniques inward, using them to create tools that help fellow computer scientists write better and more reliable code.

His internationally acclaimed work has the potential to boost the Canadian economy and even save lives.

Chanchal Roy
Dr. Chanchal Roy (PhD), an associate professor in the Department of Computer Science, is the winner of a 2019 New Researcher Award from the University of Saskatchewan.


It starts with software clones: duplicated fragments of code in software systems.

Clones are usually created deliberately by software developers who copy and paste code, either to save time or to recycle old code they know to be reliable.

“We cannot forbid that, but we can assist them to overcome the issues and consequences,” said Roy, whose research is supported by a Natural Sciences and Engineering Research Council of Canada Accelerator Grant.

The most serious consequences of software cloning involve bugs. If a fragment of code contains a bug, duplicating it also duplicates the error. Because up to half of the code in some software systems is made up of clones, these cloned bugs spread widely.

Additionally, when developers update their software, they might change some instances of clones and not others, resulting in inconsistencies and the creation of even more bugs.

“Bugs are very, very bad,” said Roy. “Just in 2017—I’m talking about one year—only 606 software bugs cost around $1.7 trillion, with 3.7 billion people and 340 companies affected.”

The damages are not just economic. Software errors have contributed to automotive collisions and airline crashes that have resulted in hundreds of deaths.

Roy’s greatest research achievements have been in the area of clone management: developing better ways to detect, avoid and remove buggy software clones.

In 2007, when Roy was working on his PhD at Queen’s University, the topic of software clones was a nearly dead area of study. A technical report he co-authored that year with his PhD supervisor James Cordy has been credited with revitalizing the subject, which is now a major topic in computer science journals and at conferences around the world.

Since coming to USask in 2009, Roy and his students have continued to drive the field forward. Roy’s laboratory has pioneered new techniques and tools for detecting software clones, as well as methods for measuring the effectiveness of such tools. These methods have been widely adopted by researchers and industry members.

The ultimate goal, said Roy, is to create a fully automatic system that helps programmers practice “safe cloning.”

“Safe cloning means you let people clone if they need to, and if there are consequences of cloning, you help them overcome it,” he explained.

Such a system would detect when a programmer is editing a clone, predict the consequences of the change and recommend solutions. Providing that information to developers in real time would reduce software maintenance costs and prevent bugs from being created.

Roy’s work on detecting similarity has many other applications. One of these is code completion—a system that can read code as it is being written and offer the programmer suggestions of what to write next, speeding up development.

An early version of a code completion tool developed in Roy’s lab is already being used by a local industry partner.

Roy is also closely involved in two major USask research projects funded by Canada First Research Excellence Fund grants—one with Global Water Futures and another with the Plant Phenotyping and Imaging Research Centre—where he focuses on managing Big Data.

Recognition for Roy’s work has poured in during the last year. In 2018, two computer science conferences presented him with Most Influential Paper awards in acknowledgement of the impact of his contributions over the previous decade. He later received the College of Arts and Science New Scientist Research Award and the national CS-Can/Info-Can Outstanding Young Computer Science Researcher Prize. Finally, he was given the USask New Researcher Award this spring: the university's top honour for faculty researchers early in their careers.

Roy said he is “very happy and proud” to have received so many honours, and grateful to everyone who contributed to his achievements.

“In particular, I am thankful to my students, my colleagues, support staff, and the leadership of the university, my international peers, my family and friends,” said Roy.


Related Articles

A farewell to the original USask linear accelerator

Sixty years ago, it transformed the university. Now, it is being replaced.

USask alum’s art part of Truth and Reconciliation stamp series

Residential school survivor and acclaimed artist Adrian Stimson (MFA’06) has helped create a powerful stamp series to commemorate the National Day for Truth and Reconciliation.

Putting patients first

USask graduate and honorary degree recipient Dr. Richard Ehman (BSc’74, MD’79, DSc’00), a Mayo Clinic radiologist and researcher, reflects on his university education and his impactful career in medical imaging