What really makes this tool stand out is that it is language agnostic, and doesn’t even need the source code! It will figure out what the other program is doing and implement that check with my own application.
The basis of this is in good design – that I’ve decoupled my classes so that for example my image processing class only deals with just that – processing images. Now I’m not the first person to process images and there are hundreds to thousands of projects that do this. Have I thought of all use cases? Not a chance – but if you took all the projects you should have a really robust set of use cases.
Code Phage relies on this – that I have a defect that someone else has coded correctly. It would need a database of these applications and the inputs that work for each.
Now with this dataset, I provide it an input that runs successfully in my application, the baseline, and an input that crashes it. Code Phage will search its database to find where both inputs are successfully processed. This stage is known as Donor Selection.
With a Donor application selected, Code Phage maps out the branching the application takes as it processes the baseline input. The idea is that when the error input is processed, the donor application will deviate from the baseline at a check that my application is not processing.
The genius of this program then comes into play, the researchers were able to map this process branching independent of the donor application, and by performing the same process branching on the recipient code, i.e. my application,it can pin point where this additional branching is required. Finally it can convert this branching logic into my specific language and update the source code successfully.
As the trend doings further decoupling, moving towards micro-services etc, this will really take developers out of the weeds of their programs and allow the to concentrate far more on the design and flow of their application.