This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 226803 - Find usages does not find all occurrences when using scope Open Projects
Summary: Find usages does not find all occurrences when using scope Open Projects
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: PC Linux
: P1 normal with 5 votes (vote)
Assignee: Ralph Ruijs
URL:
Keywords: REGRESSION
: 227055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-27 20:05 UTC by Michel Graciano
Modified: 2013-03-20 12:54 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample project (796.38 KB, application/octet-stream)
2013-02-27 20:20 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2013-02-27 20:05:31 UTC
If I test Find Usages with scope Open Projects and Current project, the results are different and not all results are find when using Open Projects (even if I have just one project opened).

I am using a huge Free Form project.

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b03
System: Linux version 3.0.0-17-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Michel Graciano 2013-02-27 20:20:55 UTC
Created attachment 131984 [details]
Sample project

To reproduce the issue, open the attached project and follow these steps:
1. Open class pkg.SharedClass and try to find the usages of the method 'method', using Open Projects scope;
2. The result should be 1 occurrence in the src/shared source root;
3. Now try the same find usages, with the scope Current project;
4. Will will have 2 occurrences, including one in src/client source root.

It is a P1 not just because it is a regression, but because it inducts users to error analysis mainly because Open Projects is the default option.
Comment 2 Ralph Ruijs 2013-02-28 12:13:11 UTC
Changeset: c91c940f5a69
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2013-02-28 13:07
Comment 3 Michel Graciano 2013-02-28 12:25:48 UTC
Ralph,
is it fixed? Can you point me the repository you pushed the fix?

Thanks
Comment 4 Ralph Ruijs 2013-02-28 12:36:53 UTC
(In reply to comment #3)
> Ralph,
> is it fixed? Can you point me the repository you pushed the fix?
> 
> Thanks

I'm still waiting on hudson to finish all the tests, but it should be fixed.

http://hg.netbeans.org/jet-main/rev/c91c940f5a69
Comment 5 Michel Graciano 2013-02-28 12:40:02 UTC
I will test it too as soon as it hits main repository.

Thanks in advance.
Comment 6 Michel Graciano 2013-02-28 19:54:56 UTC
Please, consider it for patch 1. I will verify it as soon as it hits the main repository.
Comment 7 Marian Mirilovic 2013-02-28 19:58:00 UTC
(In reply to comment #6)
> Please, consider it for patch 1. I will verify it as soon as it hits the main
> repository.

I agree. 

Michel, please verify in trunk as soon as it gets out in a new daily build. Thanks in advance.
Comment 8 Michel Graciano 2013-03-01 12:20:39 UTC
I don't know how to proceed exactly here now. The issue itself is fixed, but the fix looks like to do not be as good as expected. The expected order of the source roots in the result are different that 7.2, looks it is backwards. I am reopening for evaluation, but maybe should I file a new issue?
Comment 9 Michel Graciano 2013-03-01 12:26:34 UTC
Forget it. I don't know why, but after restarting the IDE, it is working as expected.
Comment 10 Michel Graciano 2013-03-01 12:26:49 UTC
v. Build 20130301-3424da0dbe67
Comment 11 Michel Graciano 2013-03-01 12:29:15 UTC
Feel free to transplant it to patch 1 branch :)
Comment 12 Quality Engineering 2013-03-02 01:51:23 UTC
Integrated into 'main-golden', will be available in build *201303012300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c91c940f5a69
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #226803 - Find usages does not find all occurrences when using scope Open Projects
Comment 13 Ralph Ruijs 2013-03-06 15:07:44 UTC
*** Bug 227055 has been marked as a duplicate of this bug. ***
Comment 14 Michel Graciano 2013-03-06 17:06:03 UTC
Any news about integrate it for patch 1?
Comment 16 Quality Engineering 2013-03-11 01:11:12 UTC
Integrated into 'releases', will be available in build *201303102200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/a281f1f0eec2
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #226803 - Find usages does not find all occurrences when using scope Open Projects
Comment 17 Jiri Prox 2013-03-20 07:35:59 UTC
unfortunately I can still reproduce it with patched 7.3 and in daily build 


Product Version: NetBeans IDE Dev (Build 201303172300)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b19
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b78
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev



Product Version: NetBeans IDE 7.3 (Build 201303172200)
Java: 1.7.0_15; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b03
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\7.3
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\7.3
Comment 18 Ralph Ruijs 2013-03-20 12:52:26 UTC
(In reply to comment #17)
> unfortunately I can still reproduce it with patched 7.3 and in daily build 

The issue has been fixed all scenarios but one, if the freeform project has selected "Separate Classpath for Each Source Package Folder" in the project properties.

I created a separate issue for this; #227717
Comment 19 Jiri Prox 2013-03-20 12:54:56 UTC
verified