if (wait > 0) { try { Thread.sleep(wait); } catch (InterruptedException e1) { // ignore } } samples++; return null;
if (initialDelay > 0) { try { Thread.sleep(initialDelay); } catch (InterruptedException e) { } }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/junit/stubs/TestSampler.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/JMeterThread.java
Method name: SampleResult sample(Entry) Method name: void rampUpDelay()
Number of AST nodes: 5 Number of AST nodes: 3
1
if (wait > 0) {
1
if (initialDelay > 0) {
2
			try {
2
			try {
3
				Thread.sleep(wait);
3
				Thread.sleep(initialDelay);
4
			} catch (InterruptedException e1) {
4
			} catch (InterruptedException e) {
5
				// ignore
5
			
6
			}
7
		}
8
		samples++;
9
		return null;
6
}
7
		}
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 comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (wait > 0)
    1
    if (wait > 0)
    1
    if (initialDelay > 0)
    Differences
    Expression1Expression2Difference
    waitinitialDelayVARIABLE_NAME_MISMATCH
    longintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type long of variable wait does not match with type int of variable initialDelay
    1
    if (initialDelay > 0)
    2
    try
    2
    try
    2
    try
    Differences
    Expression1Expression2Difference
    e1eVARIABLE_NAME_MISMATCH
    2
    try
    3
    Thread.sleep(wait);
    3
    Thread.sleep(wait);
    3
    Thread.sleep(initialDelay);
    Differences
    Expression1Expression2Difference
    waitinitialDelayVARIABLE_NAME_MISMATCH
    longintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type long of variable wait does not match with type int of variable initialDelay
    3
    Thread.sleep(initialDelay);
    4
    samples++;
                              
    5
    return null;
    5
    return null;
    Preondition Violations
    Unmatched return null;
                                  
    Precondition Violations (3)
    Row Violation
    1Type long of variable wait does not match with type int of variable initialDelay
    2Type long of variable wait does not match with type int of variable initialDelay
    3Unmatched return null;