if (dataEncoding != null) { return dataEncoding; } return DEFAULT_ENCODING;
if (treePath != null) { return getTree(Arrays.asList(treePath)); } return this;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/samplers/SampleResult.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/HashTree.java
Method name: String getDataEncoding() Method name: HashTree getTree(Object[])
Number of AST nodes: 3 Number of AST nodes: 3
1
if (dataEncoding != null) {
1
if (treePath != null) {
2
			return dataEncoding;
2
			return getTree(Arrays.asList(treePath));
3
		}
3
		}
4
		return DEFAULT_ENCODING;
4
		return this;
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 comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (dataEncoding != null)
    1
    if (dataEncoding != null)
    1
    if (treePath != null)
    Differences
    Expression1Expression2Difference
    dataEncodingtreePathVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.Object[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable dataEncoding does not match with type java.lang.Object[] of variable treePath
    • Make classes java.lang.String and java.lang.Object[] extend a common superclass
    1
    if (treePath != null)
                                                                                          
    2
    return getTree(Arrays.asList(treePath));
    Preondition Violations
    Unmatched return getTree(Arrays.asList(treePath));
    2
    return getTree(Arrays.asList(treePath));
    2
    return dataEncoding;
    2
    return dataEncoding;
    Preondition Violations
    Unmatched return dataEncoding;
                                                  
                                  
    3
    return this;
    Preondition Violations
    Unmatched return this;
    3
    return this;
    3
    return DEFAULT_ENCODING;
    3
    return DEFAULT_ENCODING;
    Preondition Violations
    Unmatched return DEFAULT_ENCODING;
                                                          
    Precondition Violations (5)
    Row Violation
    1Type java.lang.String of variable dataEncoding does not match with type java.lang.Object[] of variable treePath
    2Unmatched return getTree(Arrays.asList(treePath));
    3Unmatched return dataEncoding;
    4Unmatched return this;
    5Unmatched return DEFAULT_ENCODING;