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 255449 - inaccuracy tests: unstable results in DDD and Clucene
Summary: inaccuracy tests: unstable results in DDD and Clucene
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: PC Solaris
: P1 normal (vote)
Assignee: Alexander Simon
URL:
Keywords: 81_HR_FIX
Depends on:
Blocks:
 
Reported: 2015-09-21 13:15 UTC by soldatov
Modified: 2015-10-14 11:59 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2015-09-21 13:15:14 UTC
On sparc in ddd-3.3.12 project we doesn't expect any unresolved identifier.

In "VSLLib.C" test failed in 4 of 7 times.
In "plotter.C" test failed in 5 of 7 times.

bash-4.1$ cat 1509*/DDD | grep -v ", Invalid identifiers = 0," | grep "^Name"
Name = ddd-3.3.12/ddd/Graph.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 1, Errors (Internal API) = 1, Lines = 590
Name = ddd-3.3.12/ddd/plotter.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 0, Errors (Internal API) = 1, Lines = 1506
Name = ddd-3.3.12/ddd/VSLLib.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 3, Errors (Internal API) = 1, Lines = 892
Name = ddd-3.3.12/ddd/plotter.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 0, Errors (Internal API) = 1, Lines = 1506
Name = ddd-3.3.12/ddd/value-read.C, Errors = 0, Warnings = 0, Invalid identifiers = 10, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 0, Errors (Internal API) = 10, Lines = 1074
Name = ddd-3.3.12/ddd/Graph.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 1, Errors (Internal API) = 1, Lines = 590
Name = ddd-3.3.12/ddd/VSLLib.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 3, Errors (Internal API) = 1, Lines = 892
Name = ddd-3.3.12/ddd/plotter.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 0, Errors (Internal API) = 1, Lines = 1506
Name = ddd-3.3.12/ddd/VSLLib.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 3, Errors (Internal API) = 1, Lines = 892
Name = ddd-3.3.12/ddd/plotter.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 0, Errors (Internal API) = 1, Lines = 1506
Name = ddd-3.3.12/ddd/VSLLib.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 3, Errors (Internal API) = 1, Lines = 892
Name = ddd-3.3.12/ddd/WhatNextCB.C, Errors = 0, Warnings = 0, Invalid identifiers = 8, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 0, Errors (Internal API) = 9, Lines = 247
Name = ddd-3.3.12/ddd/plotter.C, Errors = 0, Warnings = 0, Invalid identifiers = 1, Expected failures = 0, Invalid identifiers (Warnings) = 0, Other Annotations = 0, Errors (Internal API) = 1, Lines = 1506
Comment 1 soldatov 2015-09-21 13:35:46 UTC
failed files in latest build:

bash-4.1$ cat 150918_101647/DDD | grep -v ", Invalid identifiers = 0," | grep "Unable to resolve identifier"
ddd-3.3.12/ddd/VSLLib.C 869 Unable to resolve identifier i.
ddd-3.3.12/ddd/WhatNextCB.C 184 Unable to resolve identifier info.
ddd-3.3.12/ddd/WhatNextCB.C 185 Unable to resolve identifier info.
ddd-3.3.12/ddd/WhatNextCB.C 216 Unable to resolve identifier info.
ddd-3.3.12/ddd/WhatNextCB.C 223 Unable to resolve identifier info.
ddd-3.3.12/ddd/WhatNextCB.C 231 Unable to resolve identifier info.
ddd-3.3.12/ddd/WhatNextCB.C 233 Unable to resolve identifier p.
ddd-3.3.12/ddd/WhatNextCB.C 234 Unable to resolve identifier p.
ddd-3.3.12/ddd/WhatNextCB.C 239 Unable to resolve identifier p.
ddd-3.3.12/ddd/plotter.C 774 Unable to resolve identifier i.
Comment 2 soldatov 2015-09-21 13:37:06 UTC
previous build:

bash-4.1$ cat 150917_012231/DDD | grep -v ", Invalid identifiers = 0," | grep "Unable to resolve identifier"
ddd-3.3.12/ddd/VSLLib.C 869 Unable to resolve identifier i.
ddd-3.3.12/ddd/plotter.C 774 Unable to resolve identifier i.
Comment 3 soldatov 2015-09-22 09:55:34 UTC
I found such such scenario in order to illustrate random results.

Prepare project
- Unpack clucene-core-0.9.21.tar.bz2
- Create project in automatic mode

Check project
- Start IDE with fresh user directory
- Open project
- Call "Code Assistance|Test Error Highlighting" context menu item
- Wait report
==>
50 errors (Unable to resolve identifier bits)
74 errors (Unable to resolve identifier bits)
27 errors
Comment 4 soldatov 2015-09-22 10:17:50 UTC
Results on my local machine.

Statistics by file%n  Errors    %    Lines   Per 1K lines
       7  26%      722     9.70  /export/files/sources/clucene-core-0.9.21/src/CLucene/index/MultiReader.cpp
       6  23%      141    42.55  /export/files/sources/clucene-core-0.9.21/src/CLucene/util/subinputstream.h
       5  19%      227    22.03  /export/files/sources/clucene-core-0.9.21/src/CLucene/search/MultiSearcher.cpp
       3  11%      431     6.96  /export/files/sources/clucene-core-0.9.21/src/CLucene/index/TermInfosReader.cpp
       3  11%      363     8.26  /export/files/sources/clucene-core-0.9.21/src/CLucene/search/BooleanQuery.cpp
       2   7%      507     3.94  /export/files/sources/clucene-core-0.9.21/src/CLucene/queryParser/QueryParser.cpp
      26         50838     0.51

Statistics by file%n  Errors    %    Lines   Per 1K lines
      27  51%      529    51.04  /export/files/sources/clucene-core-0.9.21/src/CLucene/search/FieldCacheImpl.cpp
      13  25%      155    83.87  /export/files/sources/clucene-core-0.9.21/src/CLucene/util/bufferedstream.h
       5   9%      352    14.20  /export/files/sources/clucene-core-0.9.21/src/CLucene/search/IndexSearcher.cpp
       4   7%      150    26.67  /export/files/sources/clucene-core-0.9.21/src/CLucene/search/WildcardTermEnum.cpp
       2   3%      507     3.94  /export/files/sources/clucene-core-0.9.21/src/CLucene/queryParser/QueryParser.cpp
       1   1%      174     5.75  /export/files/sources/clucene-core-0.9.21/src/CLucene/search/Hits.cpp
      52         50838     1.02
Comment 5 Vladimir Kvashin 2015-09-22 17:59:17 UTC
I'm able to reproduce this, although my cnd version differs (it is built from http://hg.netbeans.org/cnd-main/rev/3bef22060c50)

I see that

1) so far all unresolved were local variables, very simple constructs, e.g.
  int ch = prev; // ch is unresolved
  for ( int32_t i=0; c==0 && i<comparatorsLen; ++i ) // i is unresolved

2) 2-st time after IDE restart I have some unstable unresolved identifiers. Next time I invoke Code Assistance > Test Error Highlighting, I see zero unresolved ids (and subsequent tries get zero as well).
Comment 6 Vladimir Kvashin 2015-09-22 18:31:56 UTC
One more observation: if I switch off all error and syntax highlighting,
then this unstable unresolved ids get away.
Comment 7 Vladimir Kvashin 2015-09-29 11:48:18 UTC
And one more observation: we have the same problem with -J-Dapt.use.clank=false.
I've just checked.
Comment 8 DimaZh 2015-09-30 14:51:14 UTC
A show-stopper.
Comment 9 Jiri Kovalsky 2015-10-01 15:22:23 UTC
Updating TM accordingly.
Comment 10 Alexander Simon 2015-10-05 10:59:26 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/0e74f4fb8fbc
Comment 11 Alexander Simon 2015-10-05 11:53:29 UTC
Vladimir V.,
please, review the fix.
Vladimir S.,
please, verify the fix.
Comment 12 Vladimir Voskresensky 2015-10-05 12:15:54 UTC
The fix is reviewed. It is safe and correct.

Please, remove trace from commit:
   1.113 +                } else {
   1.114 +                    System.err.println("");
Comment 13 Alexander Simon 2015-10-05 12:23:43 UTC
(In reply to Vladimir Voskresensky from comment #12)
> The fix is reviewed. It is safe and correct.
> 
> Please, remove trace from commit:
>    1.113 +                } else {
>    1.114 +                    System.err.println("");

Thanks,
fixed in change set:
http://hg.netbeans.org/cnd-main/rev/0d4b44d8341f
Comment 14 Vladimir Voskresensky 2015-10-05 12:34:45 UTC
Reviewed. Looks good.
Comment 15 soldatov 2015-10-05 12:36:07 UTC
I rechecked clucene-core-0.9.21 project 3 times. Now I don't see any errors on my local machine.
Comment 16 Quality Engineering 2015-10-06 01:23:35 UTC
Integrated into 'main-silver', will be available in build *201510060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0e74f4fb8fbc
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #255449 inaccuracy tests: unstable results in DDD and Clucene
Comment 17 Alexander Simon 2015-10-06 07:02:45 UTC
Fixed in release81:
0e74f4fb8fbc transplanted to 97e5d22fc8f5
0d4b44d8341f transplanted to 631f64ff58ec
Comment 18 soldatov 2015-10-14 11:59:28 UTC
verified in RC2 build (scenario from Comment 3)