Bug 186415

Summary: [search] Search for package declarations should not return duplicate elements
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jerome_lanneluc
Version: 3.3Flags: jerome_lanneluc: review+
Target Milestone: 3.3 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch
none
New proposed patch none

Description Frederic Fusier CLA 2007-05-10 13:17:45 EDT
Using 3.3 M7 but already exists since at least 3.2.

This bug is the follow-up of bug 185452 comment 3... While searching for package declaration, lot of duplicates are reported. This is not a consequence of the fix for bug 183062, duplicate matches were already reported since at least 3.2.
Comment 1 Frederic Fusier CLA 2007-05-10 13:49:48 EDT
Created attachment 66723 [details]
Proposed patch
Comment 2 Frederic Fusier CLA 2007-05-10 13:56:06 EDT
Here are the numbers for the testGotoPackage performance test:
3.2:    273.3ms +/- 2.6ms
3.3 M7: 483.2ms +/- 1.6ms
patch:  264ms +/- 2.8ms

For the testSearchPackageDeclarationsWorkspace performance test:
3.2:    614ms +/- 2.4ms
3.3 M7: 528.2ms +/- 12.5ms
patch:  289ms +/- 2.5ms

So, fixing this problem will obviously improve results for bug 185452...
Comment 3 Frederic Fusier CLA 2007-05-10 13:58:59 EDT
Jerome, I'm not sure if the 2 performance tests will be really added, but I have kept them in the patch to be able to rerun them if we need to get more numbers...
Comment 4 Jerome Lanneluc CLA 2007-05-11 10:19:54 EDT
I think the change that consists in using fragment.getJavaProject() is not needed. It should be using javaProject as before.
Other than that the patch looks good.
Comment 5 Frederic Fusier CLA 2007-05-11 12:05:24 EDT
Created attachment 66891 [details]
New proposed patch

New patch not including the unnecessary change.
Comment 6 Frederic Fusier CLA 2007-05-11 12:08:36 EDT
Released for 3.3 RC1 in HEAD stream.

Note that I have released Search perf tests changes but only one test is activated (search package declarations on a workspace scope). I've also released corresponding change in perf_32x branch.
Comment 7 Maxime Daniel CLA 2007-05-15 05:58:57 EDT
Verified for 3.3 RC1 using build I20070515-0010.