if (running) { stopTest(); }
if (isFirst()) { fireIterationStart(); first = false; // TODO - should this use setFirst() ? }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/engine/StandardJMeterEngine.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/GenericController.java
Method name: void reset() Method name: void fireIterEvents()
Number of AST nodes: 2 Number of AST nodes: 3
1
if (running) {
1
if (
2
			stopTe
2
isFirst()) {
3
			fireIterationStart();
3
st();
4
			first = false; // TODO - should this use setFirst() ?
4
		}
5
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (running)
    1
    if (running)
    1
    if (isFirst())
    Differences
    Expression1Expression2Difference
    runningisFirst()TYPE_COMPATIBLE_REPLACEMENT
    1
    if (isFirst())
    2
    stopTest();
    2
    stopTest();
    2
    fireIterationStart();
    Differences
    Expression1Expression2Difference
    stopTestfireIterationStartMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression stopTest() is a void method call, and thus it cannot be parameterized
    Expression fireIterationStart() is a void method call, and thus it cannot be parameterized
    2
    fireIterationStart();
                                  
    3
    first = false;
    Preondition Violations
    Unmatched statement first=false; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    first = false;
    Precondition Violations (4)
    Row Violation
    1Expression stopTest() is a void method call, and thus it cannot be parameterized
    2Expression fireIterationStart() is a void method call, and thus it cannot be parameterized
    3Unmatched statement first=false; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4The refactoring of the clones is infeasible, because classes org.apache.jmeter.engine.StandardJMeterEngine and org.apache.jmeter.control.GenericController do not have a common superclass