StringBuffer result = new StringBuffer(); if (this.showBase) { result.append(this.baseLabel); result.append(this.powerLabel); } result.append(this.formatter.format(calculateLog(number))); return result;
StringBuffer result = new StringBuffer(); if (this.showBase) { result.append(this.baseLabel); result.append("^"); } result.append(this.formatter.format(calculateLog(number))); return result;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/util/LogFormat.java File path: /jfreechart-1.0.10/src/org/jfree/chart/util/LogFormat.java
Method name: StringBuffer format(double, StringBuffer, FieldPosition) Method name: StringBuffer format(long, StringBuffer, FieldPosition)
Number of AST nodes: 6 Number of AST nodes: 6
1
StringBuffer result = new StringBuffer();
1
StringBuffer result = new StringBuffer();
2
        if (this.showBase) {
2
        if (this.showBase) {
3
            result.append(this.baseLabel);
3
            result.append(this.baseLabel);
4
            result.append(this.powerLabel);
4
            result.append("^");
5
        }
5
        }
6
        result.append(this.formatter.format(calculateLog(number)));
6
        result.append(this.formatter.format(calculateLog(number)));
7
        return result;
7
        return result;
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 declared in the same class
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    StringBuffer result = new StringBuffer();
    1
    StringBuffer result = new StringBuffer();
    2
    if (this.showBase)
    2
    if (this.showBase)
    3
    result.append(this.baseLabel);
    3
    result.append(this.baseLabel);
    4
    result.append(this.powerLabel);
    4
    result.append(this.powerLabel);
    4
    result.append("^");
    Differences
    Expression1Expression2Difference
    this.powerLabel"^"TYPE_COMPATIBLE_REPLACEMENT
    4
    result.append("^");
    5
    result.append(this.formatter.format(calculateLog(number)));
    5
    result.append(this.formatter.format(calculateLog(number)));
    5
    result.append(this.formatter.format(calculateLog(number)));
    Differences
    Expression1Expression2Difference
    doublelongVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type double of variable number does not match with type long of variable number
    5
    result.append(this.formatter.format(calculateLog(number)));
    6
    return result;
    6
    return result;
    Precondition Violations (1)
    Row Violation
    1Type double of variable number does not match with type long of variable number