Find Once, Fix Everywhere

You know that diagnosing and fixing the same bug over and over again is expensive—it costs developers valuable time that could be spent implementing new features, and hurts customer satisfaction. Therefore, your development organization requires that when you fix a critical bug, you have to make sure that you fix all instances of the bug—not just the instance of the bug that was found and reported.

"Find once, fix everywhere" is the right policy, but it can be challenging to implement when you have a high degree of replicated code due to multiple branches, versions, and product lines. For instance, how do you reliably propagate a fix you made in one branch to all the other branches, when the other branches are active, and code is being modified daily? How do you verify that a critical fix has been applied to a set of branches or versions? Or even to other product lines that share similar code?

Patch Miner, part of the Code Insight suite of source code analysis products, can help you "find once, fix everywhere." With Patch Miner, you can quickly and accurately find every instance of a bug, regardless of the size of the code base.

Patch List Page
Patch Miner Patch List Page
Step 1: After fixing the bug, you create and register the patch. Patch Miner partitions the patch into code snippets to support searching and lists your patch on the main Patch List page.
Patch Edit Page
Patch Miner Patch Edit Page
Step 2: When you view the patch using the web interface, there is a listing of each of the code snippets that constitute the patch. Here you can adjust snippet size or ignore snippets if necessary.
Patch Report Page
Patch Miner Patch Report Page
Step 3: Run a patch report. Search for the patch against a specific development branch, across multiple branches or multiple versions, and even across complete product lines. Searches are completed in a matter of seconds and can find all snapshots with "similar" snippets where the code may need to be patched.

Once you have located all the matches of interest, you can be certain that you now know all the locations that match the original—regardless of modifications such as the code being moved to a different file, or copy-pasted into a new method—and "find once, fix everywhere."