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 214793 - Find Usages - bad results [find 0 occurences]
Summary: Find Usages - bad results [find 0 occurences]
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 216871 (view as bug list)
Depends on: 214926
Blocks:
  Show dependency tree
 
Reported: 2012-06-26 13:38 UTC by asenk
Modified: 2012-09-10 11:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Bad results, screenshots (187.16 KB, image/png)
2012-06-26 13:47 UTC, asenk
Details
messages.log (57.71 KB, text/x-log)
2012-06-26 13:56 UTC, asenk
Details
FU -correct result, no nodes (68.25 KB, image/png)
2012-07-09 09:05 UTC, asenk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description asenk 2012-06-26 13:38:46 UTC
Product Version: NetBeans IDE Dev (Build 201206260002)
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)

Sometimes "Find usages" doesn't find any occurrences of a method, even though there is some. This problem is reproducible only on W7 in virtual box, but I am able to reproduce it manually and with NetBeans Functional tests.

Unfortunately there are no certain steps to reproduce but you can try these:
1.Start IDE, create AnagramGame sample project and open StaticWorldLibrary.java
2.Invoke pop-up menu on getScrambledWord method and select Find usages
3.Find (Results are ok)

4.Use refresh button or invoke the pop-up menu again
5.Change scope or change "Find Usages" to "Find Usages and Overriding Methods"
6.Find

7.Repeat steps 4-6 for several times and then try to Find usages of some other method.

I will add an screenshot that clarifies the problem. I will also add message.log, there are some warnings. 

Is there any switch that add some logging that can help you?
Comment 1 asenk 2012-06-26 13:47:38 UTC
Created attachment 121377 [details]
Bad results, screenshots
Comment 2 asenk 2012-06-26 13:56:42 UTC
Created attachment 121381 [details]
messages.log
Comment 3 asenk 2012-06-27 13:35:22 UTC
Not a stopper for 7.2, but it should be fixed in 7.2.1.
Comment 4 Ralph Ruijs 2012-06-28 13:18:04 UTC
Caused by fix of #211748
Comment 5 Ralph Ruijs 2012-07-04 12:08:21 UTC
Changeset: c48a55de4d73
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2012-07-04 14:06
Message:   Issue #214793 - Find Usages - bad results [find 0 occurences]
Comment 6 Quality Engineering 2012-07-08 02:53:06 UTC
Integrated into 'main-golden', will be available in build *201207080002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c48a55de4d73
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #214793 - Find Usages - bad results [find 0 occurences]
Comment 7 asenk 2012-07-09 09:04:42 UTC
Product Version: NetBeans IDE Dev (Build 201207090002)
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)

Reopen.

"Find Usages" returns the correct number of usages, but sometimes there are no nodes in result window.
Comment 8 asenk 2012-07-09 09:05:51 UTC
Created attachment 121819 [details]
FU -correct result, no nodes
Comment 9 asenk 2012-07-09 11:12:19 UTC
The problem is with scope:Current File

Steps to reproduce:
1.Create AnagramGame project
2.Open com.toy.anagrams.lib.StaticWordLibrary.java 
3. Select getScrambledWord(int idx) method
4.Find Usages -> Find
5.Click on "Refresh the refactoring data" button
6.Change the scope of FU on "current file"
7.Find

Result: The number of occurrences is bad (is the same as it was in previous result) and there are no result nodes
Comment 10 Ralph Ruijs 2012-08-07 12:11:20 UTC
Changeset: bfdd778e53be
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2012-08-07 14:08
Message:   
Issue #214793 - Find Usages - bad results [find 0 occurences]
Comment 11 Ralph Ruijs 2012-08-08 14:22:17 UTC
Sorry, last fix breaks the number of occurrences when changing view.
Comment 12 Ralph Ruijs 2012-08-09 09:29:08 UTC
changeset   : 9002266942ef
author      : Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date        : Thu Aug 09 11:20:52 CEST 2012
summary     : Issue #214793 - Find Usages - bad results [find 0 occurences]
Comment 13 Quality Engineering 2012-08-10 02:24:22 UTC
Integrated into 'main-golden', will be available in build *201208100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bfdd778e53be
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #214793 - Find Usages - bad results [find 0 occurences]
Comment 14 Jiri Prox 2012-08-14 15:10:03 UTC
*** Bug 216871 has been marked as a duplicate of this bug. ***
Comment 15 Quality Engineering 2012-08-15 01:40:53 UTC
Integrated into 'main-golden', will be available in build *201208150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9002266942ef
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #214793 - Find Usages - bad results [find 0 occurences]
Comment 16 asenk 2012-08-15 07:54:18 UTC
verified in trunk

Product Version: NetBeans IDE Dev (Build 201208150001)
Java: 1.7.0_06; Java HotSpot(TM) Client VM 23.2-b09
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Comment 17 Quality Engineering 2012-09-01 11:12:17 UTC
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/5cac3c83a286
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #214793 - Find Usages - bad results [find 0 occurences]