If you do not find what you are looking for here, try using the technical support resources offered by Quest Software.This section contains the following topics:
• Lines of code with identical statements show different results
• A statement that I think should be executable is non-executable (or vice versa)
• When there are multiple statements on the same line, the line is reported as hit even if some statements were not executed
• The total number of lines of code reported by JProbe does not match the number of lines in my source code
• The condition results for a line are not what I expect.
• An EJB class appears twice in my results
Identical source statements may be compiled differently by javac, or the line table generated by javac may have assigned the bytecode to source lines differently. For more information, see Nonintuitive Results for Some Source Code.
Your javac compiler makes a determination about whether a line of code is executable or not. JProbe cannot change this assessment. You will need to become familiar with your compiler’s behavior. For more information, see Nonintuitive Results for Some Source Code.
If a source line has any bytecode attributed to it by the line table generated by javac, JProbe considers the line executable.
Multiple statements will normally all contribute bytecode to the line, so execution of any of them causes JProbe to consider the line as hit.
if (isBad()) return; func()"
If isBad() is true, the statement calling func() will not be called, but the line will be considered hit. If isBad() is false, the return statement will not be executed, but the line will be considered hit.
The best way to resolve this (which is usually considered good programming practice anyway) is to put at most one statement per line:
if (isBad()) return; func();
When determining the total lines of code available, JProbe includes only code that is potentially executable, so blank lines and comments are ignored, as well as most lines that contain only an opening or closing brace. Other factors can affect the total. For more information, see Nonintuitive Results for Some Source Code.
The compiler can introduce conditions into the bytecode that do not explicitly exist in the source code. These hidden conditions affect the total number of possible outcomes. For more information, see Nonintuitive Results for Conditions.
Some J2EE application servers, such as BEA WebLogic 8.1, may load EJBs twice using different classloaders. JProbe treats these instances as different EJB classes and tracks Coverage data separately.