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 247747

Summary: Find Usages cannot find method usages after changing it body
Product: cnd Reporter: petrk
Component: Code ModelAssignee: Alexander Simon <alexvsimon>
Status: VERIFIED FIXED    
Severity: normal CC: soldatov
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample project to reproduce the bug
proposed patch

Description petrk 2014-10-06 19:56:17 UTC
Created attachment 149751 [details]
Sample project to reproduce the bug

How to reproduce:
1) Open attached project
2) Open someheader.h
3) Try to find usages of 'someMethod' in 'SomeStruct'. Everything works for now.
4) Change body of 'someMethod' (add another "+0" to return statement)
5) Call find usages again => 0 usages will be found
Comment 1 Vladimir Voskresensky 2014-11-19 16:02:01 UTC
can you reproduce it after fixing issue #243770?
Comment 2 petrk 2014-11-19 16:24:54 UTC
yep
Comment 3 Alexander Simon 2016-11-08 13:45:59 UTC
It seems as if the bug #187567 has a wrong implementation of DeepReparsingUtils.finishPartialReparse() (see change set a54564466851).

Problem is:
- a signature is not changed but UID of declarations are changed.
- files that have referenced elements on old UID became invalid.

So the fix of the bug  #187567 is not full. Method finishPartialReparse should clear referenced elements that point to changed UIDs in all coherence files.
Comment 4 Alexander Simon 2016-11-08 14:31:12 UTC
Created attachment 162827 [details]
proposed patch

Vladimir V. please review the patch
Comment 5 Alexander Simon 2016-11-08 15:08:10 UTC
fixed in enum, branch release82, change set 6cb00f1e6b8b
Comment 6 Quality Engineering 2016-11-11 02:49:38 UTC
Integrated into 'main-silver', will be available in build *201611110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/282c8c612e92
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #247747 Find Usages cannot find method usages after changing it body
(transplanted from 6cb00f1e6b8b93b542d6abaa0de34730633acd74)
Comment 7 Alexander Simon 2016-12-05 09:34:20 UTC
*** Bug 268872 has been marked as a duplicate of this bug. ***
Comment 8 soldatov 2016-12-08 10:04:33 UTC
Verified in internal NetBeans 8,2 patch 1 build.