public void visitLineNumber(int line, Label start) { // Record initial information about this line of code currentLine = line; classData.addLine(currentLine, myName, myDescriptor); currentJump = 0; currentSwitch = 0; lineLabels.put(start, new Integer(line)); //removed because the MethodNode doesn't reproduce visitLineNumber where they are but at the end of the file :-(( //therefore we don't need them //We can directly instrument the visit line number here, but it is better to leave all instrumentation in the second pass //therefore we just collects what label is the line ... //super.visitLineNumber(line, start); }
classData.addLine(tpd.getLineNumber(), ((LineTouchPointDescriptor) tpd).getMethodName(), ((LineTouchPointDescriptor) tpd)
private LineData getOrCreateLine(int classLine) { LineData ld = classData.getLineData(classLine); if (ld == null) { ld = classData.addLine(classLine, null, null); } return ld; } }
classData.addLine(tpd.getLineNumber(), ((LineTouchPointDescriptor) tpd).getMethodName(), ((LineTouchPointDescriptor) tpd)
private LineData getOrCreateLine(int classLine) { LineData ld = classData.getLineData(classLine); if (ld == null) { ld = classData.addLine(classLine, null, null); } return ld; } }
result.addLine( lld.getLineNumber(), lld.getMethodName(), lld.getMethodDescriptor() ); if ( diffHits > 0 ) { result.touch( lld.getLineNumber(), diffHits );
public void putLineTouchPoint(int classLine, int counterId, String methodName, String methodDescription) { updateLine(classLine); LineData ld = classData.addLine(classLine, methodName, methodDescription); ld.touch(res[counterId]); }
/** * Increment the number of hits for a particular line of code. * * @param lineNumber the line of code to increment the number of hits. * @param hits how many times the piece was called */ public void touch(int lineNumber, int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touch(hits); } finally { lock.unlock(); } }
public void putLineTouchPoint(int classLine, int counterId, String methodName, String methodDescription) { updateLine(classLine); LineData ld = classData.addLine(classLine, methodName, methodDescription); ld.touch(res[counterId]); }
/** * Increments the number of hits for particular hit counter of particular switch branch on particular line number. * * @param lineNumber The line of code where the branch is * @param switchNumber The switch on the line to change the hit counter * @param branch The hit counter * @param hits how many times the piece was called */ public void touchSwitch(int lineNumber, int switchNumber, int branch, int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchSwitch(switchNumber, branch, hits); } finally { lock.unlock(); } }
/** * Increment the number of hits for a particular line of code. * * @param lineNumber the line of code to increment the number of hits. * @param hits how many times the piece was called */ public void touch(int lineNumber, int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touch(hits); } finally { lock.unlock(); } }
/** * Increment the number of hits for a particular line of code. * * @param lineNumber the line of code to increment the number of hits. */ public void touch(int lineNumber) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touch(); } finally { lock.unlock(); } }
/** * Increments the number of hits for particular hit counter of particular branch on particular line number. * * @param lineNumber The line of code where the branch is * @param branchNumber The branch on the line to change the hit counter * @param branch The hit counter (true or false) * @param hits how many times the piece was called */ public void touchJump(int lineNumber, int branchNumber, boolean branch, int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchJump(branchNumber, branch, hits); } finally { lock.unlock(); } }
/** * Increments the number of hits for particular hit counter of particular branch on particular line number. * * @param lineNumber The line of code where the branch is * @param branchNumber The branch on the line to change the hit counter * @param branch The hit counter (true or false) */ public void touchJump(int lineNumber, int branchNumber, boolean branch) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchJump(branchNumber, branch); } finally { lock.unlock(); } }
/** * Increments the number of hits for particular hit counter of particular switch branch on particular line number. * * @param lineNumber The line of code where the branch is * @param switchNumber The switch on the line to change the hit counter * @param branch The hit counter * @param hits how many times the piece was called */ public void touchSwitch(int lineNumber, int switchNumber, int branch, int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchSwitch(switchNumber, branch, hits); } finally { lock.unlock(); } }
/** * Increments the number of hits for particular hit counter of particular branch on particular line number. * * @param lineNumber The line of code where the branch is * @param branchNumber The branch on the line to change the hit counter * @param branch The hit counter (true or false) * @param hits how many times the piece was called */ public void touchJump(int lineNumber, int branchNumber, boolean branch, int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchJump(branchNumber, branch, hits); } finally { lock.unlock(); } }
/** * Increments the number of hits for particular hit counter of particular switch branch on particular line number. * * @param lineNumber The line of code where the branch is * @param switchNumber The switch on the line to change the hit counter * @param branch The hit counter */ public void touchSwitch(int lineNumber, int switchNumber, int branch) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchSwitch(switchNumber, branch); } finally { lock.unlock(); } }
public void instrument( String file, int line ) { if ( isExcluded( file ) ) { getLogger().debug("ignoring " + file); } else { ClassData classData = coverageProjectData.getOrCreateClassData( ApparatUtil.toClassname( file ) ); classData.setSourceFileName( getSourceFilePath( file ) ); classData.addLine( line, null, null ); } } };
public void instrument( String file, int line ) { if ( isExcluded( file ) ) { getLogger().debug("ignoring " + file); } else { ClassData classData = coverageProjectData.getOrCreateClassData( ApparatUtil.toClassname( file ) ); classData.setSourceFileName( getSourceFilePath( file ) ); classData.addLine( line, null, null ); } } };