String maxIntVal = Integer.toString(Integer.MAX_VALUE); String minIntVal = Integer.toString(Integer.MIN_VALUE); checkSum(is,maxIntVal, new String[]{maxIntVal,"0"}); checkSum(is,minIntVal, new String[]{maxIntVal,"1"});
String maxLongVal = Long.toString(Long.MAX_VALUE); String minLongVal = Long.toString(Long.MIN_VALUE); checkSum(ls,maxLongVal, new String[]{maxLongVal,"0"}); checkSum(ls,minLongVal, new String[]{maxLongVal,"1"});
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/PackageTest.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/PackageTest.java
Method name: void sumTest() Method name: void sumTest()
Number of AST nodes: 4 Number of AST nodes: 4
1
String maxIntVal = Integer.toString(Integer.MAX_VALUE);
1
String maxLongVal = Long.toString(Long.MAX_VALUE);
2
    	String minIntVal = Integer.toString(Integer.MIN_VALUE);
2
    	String minLongVal = Long.toString(Long.MIN_VALUE);
3
    	checkSum(is,maxIntVal, new String[]{maxIntVal,"0"});
3
    	checkSum(ls,maxLongVal, new String[]{maxLongVal,"0"});
4
    	checkSum(is,minIntVal, new String[]{maxIntVal,"1"});
4
    	checkSum(ls,minLongVal, new String[]{maxLongVal,"1"});
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 comparisons16
  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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    String maxIntVal = Integer.toString(Integer.MAX_VALUE);
    7
    String maxIntVal = Integer.toString(Integer.MAX_VALUE);
    21
    String maxLongVal = Long.toString(Long.MAX_VALUE);
    Differences
    Expression1Expression2Difference
    maxIntValmaxLongValVARIABLE_NAME_MISMATCH
    java.lang.Integerjava.lang.LongSUBCLASS_TYPE_MISMATCH
    intlongVARIABLE_TYPE_MISMATCH
    java.lang.Integerjava.lang.LongSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static java.lang.String toString(int) , public static java.lang.String toString(long)
    Type int of variable Integer.MAX_VALUE does not match with type long of variable Long.MAX_VALUE
    Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static java.lang.String toString(int) , public static java.lang.String toString(long)
    21
    String maxLongVal = Long.toString(Long.MAX_VALUE);
    8
    String minIntVal = Integer.toString(Integer.MIN_VALUE);
    8
    String minIntVal = Integer.toString(Integer.MIN_VALUE);
    22
    String minLongVal = Long.toString(Long.MIN_VALUE);
    Differences
    Expression1Expression2Difference
    minIntValminLongValVARIABLE_NAME_MISMATCH
    java.lang.Integerjava.lang.LongSUBCLASS_TYPE_MISMATCH
    intlongVARIABLE_TYPE_MISMATCH
    java.lang.Integerjava.lang.LongSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static java.lang.String toString(int) , public static java.lang.String toString(long)
    Type int of variable Integer.MIN_VALUE does not match with type long of variable Long.MIN_VALUE
    Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static java.lang.String toString(int) , public static java.lang.String toString(long)
    22
    String minLongVal = Long.toString(Long.MIN_VALUE);
    9
    checkSum(is, maxIntVal, new String[] {maxIntVal, "0"});
    9
    checkSum(is, maxIntVal, new String[] {maxIntVal, "0"});
    23
    checkSum(ls, maxLongVal, new String[] {maxLongVal, "0"});
    Differences
    Expression1Expression2Difference
    islsVARIABLE_NAME_MISMATCH
    org.apache.jmeter.functions.IntSumorg.apache.jmeter.functions.LongSumSUBCLASS_TYPE_MISMATCH
    maxIntValmaxLongValVARIABLE_NAME_MISMATCH
    maxIntValmaxLongValVARIABLE_NAME_MISMATCH
    23
    checkSum(ls, maxLongVal, new String[] {maxLongVal, "0"});
    10
    checkSum(is, minIntVal, new String[] {maxIntVal, "1"});
    10
    checkSum(is, minIntVal, new String[] {maxIntVal, "1"});
    24
    checkSum(ls, minLongVal, new String[] {maxLongVal, "1"});
    Differences
    Expression1Expression2Difference
    islsVARIABLE_NAME_MISMATCH
    org.apache.jmeter.functions.IntSumorg.apache.jmeter.functions.LongSumSUBCLASS_TYPE_MISMATCH
    minIntValminLongValVARIABLE_NAME_MISMATCH
    maxIntValmaxLongValVARIABLE_NAME_MISMATCH
    24
    checkSum(ls, minLongVal, new String[] {maxLongVal, "1"});
    Precondition Violations (7)
    Row Violation
    1Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static java.lang.String toString(int) , public static java.lang.String toString(long)
    2Type int of variable Integer.MAX_VALUE does not match with type long of variable Long.MAX_VALUE
    3Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static java.lang.String toString(int) , public static java.lang.String toString(long)
    4Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static java.lang.String toString(int) , public static java.lang.String toString(long)
    5Type int of variable Integer.MIN_VALUE does not match with type long of variable Long.MIN_VALUE
    6Expression Integer cannot be unified with expression Long , because common superclass java.lang.Number does not declare member(s) public static java.lang.String toString(int) , public static java.lang.String toString(long)
    7Clone fragment #1 returns variables maxIntVal , while Clone fragment #2 returns variables