Patch Miner
Are You Finding and Fixing the Same Bugs Over and Over?
Have bugs that might be replicated within your code base because of copy-paste, versioning, branching? Want to find these bugs just once, but fix them everywhere? With Patch Miner, you can automate finding every instance of a bug—it’s the fast, accurate way to “find once, fix everywhere.”
Why Other Solutions Can’t Help You “Find Once, Fix Everywhere”
If you’ve ever tried to manually locate all instances of a bug across multiple branches and versions, you probably know that it’s a time-consuming, error-prone process. What’s more, it won’t scale if your code base is large.
Realizing this, most development organizations have built in-house tools to help developers locate all instances of the bug within the various branches and versions.
Some of these tools use information on file names and versions from SCM systems to try to locate replicated bugs. However, using file names to track down replicated bugs isn’t reliable, since file names can change between versions.
Other tools use keyword search or regular expression search. Search-based approaches have several drawbacks.
- It’s hard to figure out the right query that gets the results you want.
- The results are usually too noisy, since the search lacks context.
- You can’t be certain that the results are complete. For instance, it’s likely you’ll miss cases where someone has copy-pasted the buggy code snippet into another area, and then modified it—say, for example, by changing a variable name that you’ve specified in the query keyword or expression.
So if you want to find all instances of a bug—regardless of whether file names have changed or whether when code has been modified—current solutions aren’t the answer.
The Answer is Patch Miner—Based on Fast, Fuzzy Search
To find every instance of a bug, across all versions and branches, you need a solution that:
- Takes a code snippet as input, so that you don’t have to create complicated queries
- Supports fuzzy search, so that it returns not just all identical matches, but also all fuzzy matches
- Is fast, no matter how big the code base.
Patch Miner, an application that’s part of the Code Insight suite, is the answer. It’s based on Code Insight’s powerful fuzzy search capability, and is the fast, accurate way to:
- Find all the branches, versions, and product lines where a critical bug fix should be applied
- Verify that a critical fix has been applied to a set of branches

