Method setObj = Interpreter.getMethod("set", new Class[] { string, object });//$NON-NLS-1$ Method setInt = Interpreter.getMethod("set", new Class[] { string, int.class });//$NON-NLS-1$ Method source = Interpreter.getMethod("source", new Class[] { string });
Method eval = Interpreter.getMethod("eval", new Class[] { string });//$NON-NLS-1$ Method setObj = Interpreter.getMethod("set", new Class[] { string, object });//$NON-NLS-1$ Method setInt = Interpreter.getMethod("set", new Class[] { string, int.class });
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/BeanShellServer.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/BeanShellServer.java
Method name: void run() Method name: void run()
Number of AST nodes: 3 Number of AST nodes: 3
1
Method eval = Interpreter.getMethod("eval", new Class[] { string });//$NON-NLS-1$
1
Method setObj = Interpreter.getMethod("set", new Class[] { string, object });//$NON-NLS-1$
2
			Method setObj = Interpreter.getMethod("set", new Class[] { string, object });//$NON-NLS-1$
2
			Method setInt = Interpreter.getMethod("set", new Class[] { string, int.class });//$NON-NLS-1$
3
			Method setInt = Interpreter.getMethod("set", new Class[] { string, int.class });
3
			Method source = Interpreter.getMethod("source", new Class[] { string });
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 comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    8
    Method setObj = Interpreter.getMethod("set", new Class[] {string, object});
    8
    Method setObj = Interpreter.getMethod("set", new Class[] {string, object});
    7
    Method eval = Interpreter.getMethod("eval", new Class[] {string});
    Differences
    Expression1Expression2Difference
    setObjevalVARIABLE_NAME_MISMATCH
    "set""eval"LITERAL_VALUE_MISMATCH
    {string,object}{string}ARRAY_INITIALIZER_EXPRESSION_NUMBER_MISMATCH
    7
    Method eval = Interpreter.getMethod("eval", new Class[] {string});
    9
    Method setInt = Interpreter.getMethod("set", new Class[] {string, int.class});
    9
    Method setInt = Interpreter.getMethod("set", new Class[] {string, int.class});
    8
    Method setObj = Interpreter.getMethod("set", new Class[] {string, object});
    Differences
    Expression1Expression2Difference
    setIntsetObjVARIABLE_NAME_MISMATCH
    8
    Method setObj = Interpreter.getMethod("set", new Class[] {string, object});
    10
    Method source = Interpreter.getMethod("source", new Class[] {string});
    10
    Method source = Interpreter.getMethod("source", new Class[] {string});
    9
    Method setInt = Interpreter.getMethod("set", new Class[] {string, int.class});
    Differences
    Expression1Expression2Difference
    sourcesetIntVARIABLE_NAME_MISMATCH
    "source""set"LITERAL_VALUE_MISMATCH
    {string}{string,int.class}ARRAY_INITIALIZER_EXPRESSION_NUMBER_MISMATCH
    9
    Method setInt = Interpreter.getMethod("set", new Class[] {string, int.class});
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables setObj, setInt, source , while Clone fragment #2 returns variables setObj, setInt, eval