void (@NotNull CoverageSuitesBundle suite, List<String> testNames) { suite.restoreCoverageData(); final ProjectData data = suite.getCoverageData(); if (data == null) return; mySubCoverageIsActive = true; final Map<String, Set<Integer>> executionTrace = new HashMap<>(); for (CoverageSuite coverageSuite : suite.getSuites()) { suite.getCoverageEngine().collectTestLines(testNames, coverageSuite, executionTrace); } final ProjectData projectData = new ProjectData(); for (Map.Entry<String, Set<Integer>> entry : executionTrace.entrySet()) { String className = entry.getKey(); Set<Integer> lineNumbers = entry.getValue(); ClassData classData = projectData.getOrCreateClassData(className); ClassData oldData = data.getClassData(className); LOG.assertTrue(oldData != null, "missed className: \"" + className + "\""); final Object[] oldLines = oldData.getLines(); LOG.assertTrue(oldLines != null); int newLength = Math.max(oldLines.length, 1 + lineNumbers.stream().mapToInt(Integer::intValue).max().orElse(-1)); LineData[] lines = new LineData[newLength]; for (int line : lineNumbers) { String methodSig = null; if (line < oldLines.length) { final LineData oldLineData = oldData.getLineData(line); if (oldLineData != null) { methodSig = oldLineData.getMethodSignature(); } } final LineData lineData = new LineData(line, methodSig); if (methodSig != null) { classData.registerMethodSignature(lineData); } lineData.setStatus(LineCoverage.FULL); lines[line] = lineData; } classData.setLines(lines); classData.setFullyAnalysed(false); } suite.setCoverageData(projectData); }