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 54085 - Root node reports more found nodes than the number of nodes actually found
Summary: Root node reports more found nodes than the number of nodes actually found
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords:
Depends on:
Blocks: 54037
  Show dependency tree
 
Reported: 2005-01-27 13:52 UTC by Marian Petras
Modified: 2005-01-28 07:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot - only 2 of 4 found nodes displayed (12.05 KB, image/png)
2005-01-27 13:59 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2005-01-27 13:52:45 UTC
When searching using the "Find in Projects..."
actions, the Search Results window may not display
all of the found nodes. But the root node of
results displays a correct number. See the
attached screenshot.
Comment 1 Marian Petras 2005-01-27 13:59:16 UTC
Created attachment 20000 [details]
screenshot - only 2 of 4 found nodes displayed
Comment 2 Marian Petras 2005-01-27 15:40:24 UTC
I found the cause of the disharmony between reported number of found
nodes and the actual number of found nodes. The cause is that some
nodes are found multiple times - number of nodes is incremented each
time (a node is found) but when when the same node is found the second
time, it is not added to the list.

The core problem is that a single node can be found twice.

A simple way of how to workaround the disharmony is to check whether
the node just found has been already found and not increment the
number of nodes if it has been found.