try { setNumberValue(v.toString()); } catch (RuntimeException e) { }
try { FileServer.getFileServer().closeFile(FILENAME); } catch (IOException e) { // do nothing }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/property/NumberProperty.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/util/accesslog/SharedTCLogParser.java
Method name: void setObjectValue(Object) Method name: void close()
Number of AST nodes: 2 Number of AST nodes: 2
1
try {
1
try {
2
				setNumberValue(v.toString());
2
			FileServer.getFileServer().closeFile(FILENAME);
3
			} catch (RuntimeException e) {
3
		} catch (IOException e) {
4
			
4
			// do nothing
5
}
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.1
Clones locationClones are in different classes
Number of node comparisons4
  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 fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    try
    3
    try
    1
    try
    Differences
    Expression1Expression2Difference
    java.lang.RuntimeExceptionjava.io.IOExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.RuntimeExceptionjava.io.IOExceptionSUBCLASS_TYPE_MISMATCH
    1
    try
    4
    setNumberValue(v.toString());
    4
    setNumberValue(v.toString());
    2
    FileServer.getFileServer().closeFile(FILENAME);
    Differences
    Expression1Expression2Difference
    setNumberValuecloseFileMETHOD_INVOCATION_NAME_MISMATCH
    v.toString()FILENAMETYPE_COMPATIBLE_REPLACEMENT
    FileServer.getFileServer()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression setNumberValue(v.toString()) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression setNumberValue(v.toString()) is a void method call, and thus it cannot be parameterized
    Expression FileServer.getFileServer().closeFile(FILENAME) is a void method call, and thus it cannot be parameterized
    Expression setNumberValue(v.toString()) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression setNumberValue(v.toString()) is a void method call, and thus it cannot be parameterized
    Expression FileServer.getFileServer().closeFile(FILENAME) is a void method call, and thus it cannot be parameterized
    2
    FileServer.getFileServer().closeFile(FILENAME);
    Precondition Violations (6)
    Row Violation
    1Expression setNumberValue(v.toString()) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    2Expression setNumberValue(v.toString()) is a void method call, and thus it cannot be parameterized
    3Expression FileServer.getFileServer().closeFile(FILENAME) is a void method call, and thus it cannot be parameterized
    4Expression setNumberValue(v.toString()) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    5Expression setNumberValue(v.toString()) is a void method call, and thus it cannot be parameterized
    6Expression FileServer.getFileServer().closeFile(FILENAME) is a void method call, and thus it cannot be parameterized