if (delay > 0) { try { Thread.sleep(delay); } catch (Exception e) { } }
try { retVal = Integer.parseInt(prop.getStringValue()); } catch (NumberFormatException e) { }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/JMeterThread.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/ThroughputController.java
Method name: void startScheduler() Method name: int getMaxThroughputAsInt()
Number of AST nodes: 3 Number of AST nodes: 2
1
if (delay > 0) {
2
			try {
3
				Thread.sleep(delay
1
try {
4
);
2
				retVal = Integer.parseInt(prop.getStringValue());
5
			} catch (Exception e) {
3
			} catch (NumberFormatException e) {
6
			}
4
			}
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.1
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    try
    3
    try
    5
    try
    Differences
    Expression1Expression2Difference
    java.lang.Exceptionjava.lang.NumberFormatExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.Exceptionjava.lang.NumberFormatExceptionSUBCLASS_TYPE_MISMATCH
    5
    try
    4
    Thread.sleep(delay);
    4
    Thread.sleep(delay);
    Preondition Violations
    Unmatched statement Thread.sleep(delay); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                  
                                                                                                        
    6
    retVal = Integer.parseInt(prop.getStringValue());
    Preondition Violations
    Unmatched statement retVal=Integer.parseInt(prop.getStringValue()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    6
    retVal = Integer.parseInt(prop.getStringValue());
    Precondition Violations (2)
    Row Violation
    1Unmatched statement Thread.sleep(delay); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2Unmatched statement retVal=Integer.parseInt(prop.getStringValue()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted