News & Events
The clone detector
There is only one Dr. Chanchal Roy (PhD), whose clone-detecting software research has influenced computer scientists around the world. (Photo illustration: Chris Putnam)
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.
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.
This story aligns with the following Think Big – Be Bold: Arts and Science 2025 plan goals:Excellence in RSAW
Posted on 2020-09-18
Dr. Natalia Stakhanova (PhD) and Dr. James Benson (PhD), from the College of Arts and Science, are among the recipients
Posted on 2020-09-16
Dr. James Till (BA’52, MA’54, PhD) and his research partner established the field of stem cell medicine
Posted on 2020-09-16
A newly launched research support and consulting hub in the College of Arts and Science offers a unique menu of research services within Canada
Posted on 2020-09-14
Predicting snowmelt in the mountain headwaters of the world’s major rivers is now vastly more accurate due to a new University of Saskatchewan computer simulation model that can improve forecasts of downstream river flow
Posted on 2020-09-14
The Certificate in Classical and Medieval Latin is one of 13 certificate programs currently on offer in the College of Arts and Science
Posted on 2020-09-11
A Radiant Life highlights the many outstanding contributions to Canada and the world of Sylvia Fedoruk (1927-2012), a trailblazing medical physicist at the University of Saskatchewan