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.
If a .java file has more than one top level class, and the file is compiled (so .class files for all classes in the java file exist), find in files searches in top level class files (not java files). Example: class org.netbeans.modules.web.core.jsploader.jakarta.ManglerImpl contains a top-level class ClassFileData. When searching for string "ClassFileData", occurrences in ClassFileData.class are reported.
After the .java file is compiled, the "ClassFileData.class" becomes a separate data object - it is not recognize as a part of ManglerImpl (this is a matter of java module I think). The class object has its own node in explorer now. The searching algorithm just scans data objects (all in general) - that is why it scans "ClassFileData.class" too. (You can set restrictions on types of objects you want to search anyway.) Should this report be re-assigned to java module?
You could help to set option Parse class file (Project options|Java sources) to true and restart IDE then. Then in Explorer will not appear class file nodes from compiled other top-level classes and so they will not be used for search.
Yes, it is indeed a sideefect of the option Petr Slegr mentioned being turned off. This is the default setting because it may slow down the whole IDE.
Resolved for 3.3.x or earlier, no new info since then -> closing.
Resolved for 3.4.x or earlier, no new info since then -> closing.