File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Which fix is better? - Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Which fix is better? - Java" Watch "Which fix is better? - Java" New topic

Which fix is better? - Java

Dongsun Kim

Joined: Aug 05, 2012
Posts: 1
I am recently working on an automatic patch generation tool. When there is a bug, this tool localizes fault locations and tries to automatically create a proper patch to fix the bug.

By the way, sometimes, this tool might generate several different fixes for a single defect. In this case, it is difficult to determine which one is better than others.

For example, the following two patches can fix Mozilla BUG #114493 (

Patch #1

Patch #2

Which one is better?
FYI, the bug report explains more details about the bug (see

In fact, I have more cases like this.
Would you please visit the following link and let me which fix is better:

Winston Gutkowski

Joined: Mar 17, 2011
Posts: 8942

Dongsun Kim wrote:Which one is better?

Ooof. You've taken on a task and a half. And furthermore, I suspect, one that already has a 3rd party solution; particularly for specific products (like Mozilla).

1. I doubt whether all bug fixes boil down to a simple "either/or" choice. Indeed, some may involve several 'fixes' that have to be implemented at once.
2. I'm afraid that nobody is going through a list of bug fixes (of which there may be thousands) to determine which one is "right" for you. And even if some kind soul did: What if they're WRONG?

I have a feeling that you're going to need to (a) re-think your approach, or (b) lower your sights.


Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here
Darryl Burke

Joined: May 03, 2008
Posts: 5115

Dongsun, please BeForthrightWhenCrossPostingToOtherSites

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: Which fix is better? - Java
It's not a secret anymore!