Bug 247747 - Find Usages cannot find method usages after changing it body
Find Usages cannot find method usages after changing it body
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: Code Model
8.1
All All
: P3 (vote)
: 8.2
Assigned To: Alexander Simon
issues@cnd
82patch1-verified
:
: 268872 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-06 19:56 UTC by petrk
Modified: 2016-12-08 10:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Sample project to reproduce the bug (5.92 KB, application/gzip)
2014-10-06 19:56 UTC, petrk
Details
proposed patch (3.58 KB, patch)
2016-11-08 14:31 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo