brunyuriy / quick-fix-scout

Automatically exported from code.google.com/p/quick-fix-scout
Other
1 stars 1 forks source link

UI Bug: Handling multiple Problem Locations #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In SpeculationGrabber.java, there is an assertion code as follows:

// The problem locations can be zero if the user invokes quick fix where no 
compilation errors are present.
// Sometimes I get two problem locations. What does that mean?
assert locations.length <= 1: "Was expecting one problem location, got " + 
locations.length;

I have found a deterministic test case that returns me 2 problem locations 
(AbstractType.java in ProposalTest project). 

This needs to be handled properly.

Original issue reported on code.google.com by kivancmu...@gmail.com on 13 Dec 2011 at 9:27

GoogleCodeExporter commented 9 years ago
It turns out that my UI implementation does not handle multiple error 
locations, and that is why SpeculationGrabber (though can handle multiple error 
locations), also was asserting this.

I have updated the UI implementation to also handle multiple error locations. 
Error locations were being used to compute whether a fix is global best fix or 
not (i.e., whether it will fix the current error too, or not). Now, I promote 
whatever best fix that resolves at least one of the error locations returned to 
me by the Quick Fix Processes as a global best proposal. 

While doing this implementation, I also realized a bug that causes duplication 
of the proposals in Eclipse itself. I have also implemented the workaround for 
that bug (so that QFS won't show duplicates).

Original comment by kivancmu...@gmail.com on 13 Dec 2011 at 10:28

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 0adff0cdcfa1.

Original comment by kivancmu...@gmail.com on 13 Dec 2011 at 10:40