synchronized (counterLock) { globalIteration++; runThisTime = decide(globalNumExecutions, globalIteration); if (runThisTime) { globalNumExecutions++; } }
iteration++; runThisTime = decide(numExecutions, iteration); if (runThisTime) { numExecutions++; }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/ThroughputController.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/ThroughputController.java
Method name: void iterationStart(LoopIterationEvent) Method name: void iterationStart(LoopIterationEvent)
Number of AST nodes: 5 Number of AST nodes: 4
1
synchronized (counterLock) {
2
				globalIteration++;
1
iteration++;
3
				runThisTime = decide(globalNumExecutions, globalIteration);
2
			runThisTime = decide(numExecutions, iteration);
4
				if (runThisTime) {
3
			if (runThisTime) {
5
					globalNumExecutions++;
4
				numExecutions++;
6
				}
5
			
7
			}
6
}
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.0
Clones locationClones are in the same method
Number of node comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    globalIteration++;
    3
    globalIteration++;
    7
    iteration++;
    Differences
    Expression1Expression2Difference
    globalIterationiterationVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression globalIteration is a field being modified, and thus it cannot be parameterized
    Expression iteration is a field being modified, and thus it cannot be parameterized
    7
    iteration++;
    4
    runThisTime = decide(globalNumExecutions, globalIteration);
    4
    runThisTime = decide(globalNumExecutions, globalIteration);
    8
    runThisTime = decide(numExecutions, iteration);
    Differences
    Expression1Expression2Difference
    globalNumExecutionsnumExecutionsVARIABLE_NAME_MISMATCH
    globalIterationiterationVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression globalIteration cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression iteration cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8
    runThisTime = decide(numExecutions, iteration);
    5
    if (runThisTime)
    9
    if (runThisTime)
    6
    globalNumExecutions++;
    6
    globalNumExecutions++;
    10
    numExecutions++;
    Differences
    Expression1Expression2Difference
    globalNumExecutionsnumExecutionsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression globalNumExecutions is a field being modified, and thus it cannot be parameterized
    Expression numExecutions is a field being modified, and thus it cannot be parameterized
    10
    numExecutions++;
    Precondition Violations (6)
    Row Violation
    1Expression globalIteration is a field being modified, and thus it cannot be parameterized
    2Expression iteration is a field being modified, and thus it cannot be parameterized
    3Expression globalIteration cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression iteration cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression globalNumExecutions is a field being modified, and thus it cannot be parameterized
    6Expression numExecutions is a field being modified, and thus it cannot be parameterized