Source:
<code>private void readExecutionData(File jacocoExecutionData, SensorContext context) { if (jacocoExecutionData == null || !jacocoExecutionData.isFile()) { JaCoCoExtensions.LOG.info("Project coverage is set to 0% as no JaCoCo execution data has been dumped: {}", jacocoExecutionData); jacocoExecutionData = null; } ExecutionDataVisitor executionDataVisitor = new ExecutionDataVisitor(); try { jacocoReportReader = new JacocoReportReader(jacocoExecutionData).readJacocoReport(executionDataVisitor, executionDataVisitor); } catch (IOException e) { <START> throw new SonarException("An error occured while reading JaCoCo report", e); <END> } boolean collectedCoveragePerTest = readCoveragePerTests(context, executionDataVisitor); CoverageBuilder coverageBuilder = jacocoReportReader.analyzeFiles(executionDataVisitor.getMerged(), classFilesCache.values()); int analyzedResources = 0; for (ISourceFileCoverage coverage : coverageBuilder.getSourceFiles()) { Resource resource = getResource(coverage, context); if (resource != null) { CoverageMeasuresBuilder builder = analyzeFile(resource, coverage); saveMeasures(context, resource, builder.createMeasures()); analyzedResources++; } } if (analyzedResources == 0) { JaCoCoExtensions.LOG.warn("Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?"); } else if (collectedCoveragePerTest) { JaCoCoExtensions.LOG.info("Information about coverage per test has been collected."); } else if (jacocoExecutionData != null) { JaCoCoExtensions.LOG.info("No information about coverage per test."); } }</code><technical_language>@benzonico again: error message failure read file is inconsistent - JaCoCoReportMerger. Code simplified, if pull catch of IOException JacocoReportReader - places, exception handled; single place, message constructed</technical_language>

Target:
private void readExecutionData(File jacocoExecutionData, SensorContext context) { if (jacocoExecutionData == null || !jacocoExecutionData.isFile()) { JaCoCoExtensions.LOG.info("Project coverage is set to 0% as no JaCoCo execution data has been dumped: {}", jacocoExecutionData); jacocoExecutionData = null; } ExecutionDataVisitor executionDataVisitor = new ExecutionDataVisitor(); jacocoReportReader = new JacocoReportReader(jacocoExecutionData).readJacocoReport(executionDataVisitor, executionDataVisitor); boolean collectedCoveragePerTest = readCoveragePerTests(context, executionDataVisitor); CoverageBuilder coverageBuilder = jacocoReportReader.analyzeFiles(executionDataVisitor.getMerged(), classFilesCache.values()); int analyzedResources = 0; for (ISourceFileCoverage coverage : coverageBuilder.getSourceFiles()) { Resource resource = getResource(coverage, context); if (resource != null) { CoverageMeasuresBuilder builder = analyzeFile(resource, coverage); saveMeasures(context, resource, builder.createMeasures()); analyzedResources++; } } if (analyzedResources == 0) { JaCoCoExtensions.LOG.warn("Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?"); } else if (collectedCoveragePerTest) { JaCoCoExtensions.LOG.info("Information about coverage per test has been collected."); } else if (jacocoExecutionData != null) { JaCoCoExtensions.LOG.info("No information about coverage per test."); } }