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 184428 - [69cat] Duplicated entries in "Search results"
Summary: [69cat] Duplicated entries in "Search results"
Status: RESOLVED DUPLICATE of bug 188185
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Victor Vasilyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-19 09:49 UTC by aldobrucale
Modified: 2010-09-14 11:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (75.12 KB, image/png)
2010-04-21 09:23 UTC, aldobrucale
Details
Screenshot (46.50 KB, image/png)
2010-04-21 09:25 UTC, aldobrucale
Details
Screenshot of junit window (79.55 KB, image/png)
2010-04-22 09:26 UTC, aldobrucale
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aldobrucale 2010-04-19 09:49:16 UTC
[ BUILD # : 201004190200 ]
[ JDK VERSION : 1.6.* ]

All the entries in the "Search results" panel are duplicated
Comment 1 Marian Mirilovic 2010-04-19 12:34:30 UTC
works in NB 6.9 Beta - so it must be recent regression in trunk
Comment 2 Victor Vasilyev 2010-04-20 00:01:37 UTC
(In reply to comment #0)
> All the entries in the "Search results" panel are duplicated

I can't reproduce it.

What a project did you have (Java, PHP, ...)?
Does this bug have a relation to the .form files?
Comment 3 aldobrucale 2010-04-20 09:39:52 UTC
It was a global search in java se and RCP projects. No relation with .form files. I have also previously seen duplicated rows in the JUnit test results widow (and I swear I was sober), may this be related? I do not think the bug has anything to do with .form files. This is not the first time it happens, so I guess it may happen again: is there any command line switch I could turn on to make the debug file more verbose on this subject?
Comment 4 Victor Vasilyev 2010-04-20 12:52:21 UTC
(In reply to comment #3)

AFAIU it is random bug, and duplication of nodes only occasionally occurs. Right?

We need to find a part of the implementation that is responsible for this bug.
I think, we can exclude underlying models from consideration and be focused on the tree views only, because a model in the Search will throw an exception if a matching object already exists in the model.

> I have also previously seen duplicated rows in the JUnit test results
> widow (and I swear I was sober), may this be related?
I trust you. Although I haven't seen this bug and didn't hear about it before.
Seems it is valuable comment, because in both cases (i.e. Search and JUnit) the JTree is used to display results, and the Nodes API is involved in the processes.
It gives me an idea that there is a bug in either implementation displaying tree nodes or a common approach initiating it in both JUnit and Search.

> is there any command line switch I could turn on
> to make the debug file more verbose on this subject?
Unfortunately, I don't know the switches that could be helpful in this case.

Can the buggy tree be repaired after redraw, i.e. after sequential minimizing and maximizing of the internal window containing the tree view, after sequential collapsing and expanding tree nodes, etc.?

Also, please, publish here your configuration visible in the dialog Help/About.
Comment 5 aldobrucale 2010-04-20 13:32:37 UTC
No, It's happening for every search I do. This morning I have updated nb to the latest dev version, deleted the userdir and restarted but it's still happening. With many open projects and search for a common string (such as "String") the second instance appears some instants after the first one. In some case it does not appear, but some of the rows are repeated four times (and clicking all instances opens the same file).

Redrawing doesn't change the situation - it really feels as if the model would contain duplicated entries.

I cannot reproduce the problem for JUnit tests (it was the entry for a failed test to be duplicated).

Here is the configuration info:

Product Version: NetBeans IDE Dev (Build 201004200200)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Linux version 2.6.31-20-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/aldo/.netbeans/dev
Comment 6 Victor Vasilyev 2010-04-20 14:53:59 UTC
Could you please, make and attach to this bug a screenshot where duplication of the nodes is visible in the "Search Results" window.
May be it will give more ideas why the bug happens.
Comment 7 aldobrucale 2010-04-21 09:23:38 UTC
Created attachment 97773 [details]
Screenshot

As you can see, most entries are duplicated (the ones which appear four times are those which also have a .form file). Today the first 20 entries are not duplicated.
Comment 8 aldobrucale 2010-04-21 09:25:29 UTC
Created attachment 97774 [details]
Screenshot
Comment 9 aldobrucale 2010-04-22 09:26:51 UTC
Created attachment 97843 [details]
Screenshot of junit window

It has happened again on a test results window. Right-clicking the second of the two "XmlUtilTest" nodes does not show the popup menu with "Go to Source", the other one does. The popup menu is also shown for the children of both nodes.
Comment 10 Victor Vasilyev 2010-05-13 21:56:25 UTC
Both Search results window and Test results window rely on the javax.swing.JTree to display results. 
Seems the bug is outside of mentioned NetBeans modules, i.e. "JUnit" and "User Utilities (search package)", but I don't understand where. 

What a window system do you use (KDE, Gnome, ...)?
Probably this bug is only on the specific platform. 

AFAIU you use Sun's JDK (1.6.0_16). Right?
May be upgrade of the JDK can help.
Comment 11 Victor Vasilyev 2010-09-14 11:41:05 UTC

*** This bug has been marked as a duplicate of bug 188185 ***