Hi,
code coverage reports are created based on class files. Whatever classfiles you provide to the JaCoCo report generator will show up in the report. Typically you will supply all the application‘s class files of your current build.
Exec files are used to determine the coverage status of the class files in the report. Exec files contain the execution status of all classes loaded by the Java VM during execution. If the same class is contained multiple times in a exec file (append) the execution status is merged before the report is generated.
Execution data for class files (or class file versions) which are not part of the report are ignored and not shown in the report.
I hope this answers your questions,
-marc
1. It is set to append coverage to the exec file. If a certain class or method is deleted from the new code, but the old code still exists in the newly generated code coverage and cannot be counted? What is the solution?