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 231307 - Regression, cannot click on entries in code-coverage report
Summary: Regression, cannot click on entries in code-coverage report
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Codecoverage (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P1 normal with 7 votes (vote)
Assignee: Martin Schovanek
: 237596 (view as bug list)
Depends on:
Reported: 2013-06-15 16:40 UTC by _ gtzabari
Modified: 2014-01-23 21:36 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Example file source with incorrectly reported coverage (46.43 KB, image/png)
2013-07-16 19:35 UTC, František Mantlík
The same file presented in Jacoco HTML report (131.23 KB, image/png)
2013-07-16 19:37 UTC, František Mantlík
HTML Statistics of the same file (105.44 KB, image/png)
2013-07-16 19:39 UTC, František Mantlík

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2013-06-15 16:40:25 UTC
Product Version: NetBeans IDE Dev (Build 201306132301)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

1. Add Jacoco to a Maven project:


2. Run unit tests
3. Right click on Project -> Code Coverage -> Show Report ...
4. In the past it was possible to select entries in this dialog or double-click on them to open the associated source code. Now, the selection gets lost shortly after the entry gets highlighted.
Comment 1 _ gtzabari 2013-06-15 16:43:23 UTC
Also, the percent coverage seems to be wrong (used to work in the past). Now even if a file has roughly 90% code-coverage the plugin claims only 36% coverage.

As far as I can recall, I only changed two things:

1. Upgraded to newer version of Jacoco
2. Adds <includes> filters to both prepare-agent and prepare-package:

Comment 2 František Mantlík 2013-07-16 19:35:04 UTC
Created attachment 137243 [details]
Example file source with incorrectly reported coverage
Comment 3 František Mantlík 2013-07-16 19:37:48 UTC
Created attachment 137244 [details]
The same file presented in Jacoco HTML report
Comment 4 František Mantlík 2013-07-16 19:39:26 UTC
Created attachment 137245 [details]
HTML Statistics of the same file
Comment 5 František Mantlík 2013-07-16 19:50:25 UTC
I can confirm the same problem with both non-functional opening of the sources and incorrect statistics.

Attached find three screenshots concerning the same sample source file from one of my RCP maven projects:

1. Source code coverage presented by Netbeans reporting coverage of 17.24 %.

2. Source coverage of the same file from the Jacoco HTML report generated in the same run. The coverage expressed by coloring of lines of code is the same as expected.

3. HTML statistics of the same file (by methods) from the Jacoco HTML report. As can be seen from the report, only 3 out of 8 lines are missed, i.e. line coverage should be 62.5 % instead of 17.24 % reported by Netbeans.

In addition, double-click on the corresponding line of the summary statistics in Netbeans does not open the source code. On the other hand, if the source file is opened manualy e.g. from the Projects window, it's coverage presented by coloured lines is correct.

My configuration: Windows 7 64 bit, Java 1.7.0_25, Netbeans Dev 201307152300.
Comment 6 _ gtzabari 2013-07-16 19:55:19 UTC
Increased priority to P1 as the plugin is no longer usable in its current state, and according to regressions are P1.
Comment 7 Petr Jiricka 2013-07-17 07:27:35 UTC
Cc'ing Milos as the owner of Maven integration, so this issue does not go unnoticed.
Comment 8 Milos Kleint 2013-07-17 12:09:59 UTC
I haven't found any deviation in the results when running with different versions of jacoco plugin.

this changeset could be the cause of the trouble:

one difference between the html report jacoco provides and the IDE's report is that we appear reporting lines, while the html report covers instructions, eg.

in my sample project I got this in the jacoco.xml file:

      <counter type="INSTRUCTION" missed="7" covered="4"/>
      <counter type="LINE" missed="3" covered="2"/>

IDE reports 40% (1/(3+2)*2) coverage (after applying the fix changeset below), while the html reports states 36% (1/(7+4)*4)

this changeset appears to fix the problem of percentages, not sure what it breaks though (I could not spot anything in my sample setup). Please test in one of the upcoming dev builds and let me know if the issue can be closed)
Comment 9 Quality Engineering 2013-07-18 02:35:29 UTC
Integrated into 'main-silver', will be available in build *201307172300* on (upload may still be in progress)

User: Milos Kleint <>
Log: #231307 lineCount appears to mean number of entries with coverage info only (as per coverage tool's xml)
Comment 10 _ gtzabari 2013-07-18 20:12:42 UTC

The numbers look correct now (build 201307172300) but the first issue (unable to click on report entries) remains unfixed. Please see the bug description for this.
Comment 11 František Mantlík 2013-07-19 12:08:28 UTC
For me everything works fine at Dev 201307182300. Percentages are OK and double-clicking on the report bar opens corresponding source.

Thank you Milos for quick fix.
Comment 12 _ gtzabari 2013-07-19 17:02:16 UTC

The bug is still not fixed for me.

If you examine Milos' fix you will notice that he did not even touch that functionality.

I just re-tested under:

Product Version: NetBeans IDE Dev (Build 201307182300)
Java: 1.7.0_40-ea; Java HotSpot(TM) 64-Bit Server VM 24.0-b52
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-ea-b33
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)

and I am still having the same problem.
Comment 13 František Mantlík 2013-07-19 18:11:18 UTC
gtzabari, you are right. After another run of Netbeans dev 201307182300 I can not open source files anymore by clicking on coverage report rows. Unfortunately, I am not able to reproduce my previous successful situation reported in the Comment 11 when click-to-open-source feature worked for me immediately after installation of the dev 201307182300.

I will do further investigation. In case I would be able to find a successful/unsuccessful reproducible sequence, I will make a comment here, of course.
Comment 14 airborn 2013-11-18 00:04:52 UTC
Is related to this one? If so, there is additional IDE LOG for this issue attached there.
Comment 15 František Mantlík 2013-11-21 16:19:30 UTC
Problem with opening sources by double-clicking on the report persists for IDE 7.4 Patch 1.

Tested on:
Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on amd64; Cp1250; cs_CZ (nb)
Comment 16 František Mantlík 2013-11-22 12:05:39 UTC
*** Bug 237596 has been marked as a duplicate of this bug. ***
Comment 17 ConanBrink 2014-01-23 21:36:22 UTC
I have the same problem (unable to select a file from the coverage report in 7.4), and I'm not using Jacoco.  I'm using a 64-bit Java7 JDK and netbeans 7.4.  My project is a maven project using cobertura to generate coverage information.

I've also noticed another regression with regard to the behavior of the coverage report, but it may not be related, so I won't conflate the two here.

  Product Version         = NetBeans IDE 7.4 (Build 201310111528) (#6523d6792981)
  Operating System        = Windows 7 version 6.1 running on amd64
  Java; VM; Vendor        = 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_25-b17
  Java Home               = C:\Program Files\Java\jdk1.7.0_25\jre
  System Locale; Encoding = en_US (nb); Cp1252