Number result = null; MeanAndStandardDeviation masd = (MeanAndStandardDeviation) this.data.getObject(row, column); if (masd != null) { result = masd.getMean(); } return result;
Number result = null; MeanAndStandardDeviation masd = (MeanAndStandardDeviation) this.data.getObject(rowKey, columnKey); if (masd != null) { result = masd.getMean(); } return result;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultStatisticalCategoryDataset.java File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultStatisticalCategoryDataset.java
Method name: Number getMeanValue(int, int) Method name: Number getMeanValue(Comparable, Comparable)
Number of AST nodes: 5 Number of AST nodes: 5
1
Number result = null;
1
Number result = null;
2
        MeanAndStandardDeviation masd = (MeanAndStandardDeviation) 
2
        MeanAndStandardDeviation masd = (MeanAndStandardDeviation) 
3
                this.data.getObject(row, column);
3
                this.data.getObject(rowKey, columnKey);
4
        if (masd != null) {
4
        if (masd != null) {
5
            result = masd.getMean();
5
            result = masd.getMean();
6
        }
6
        }
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 comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Number result = null;
    1
    Number result = null;
    2
    MeanAndStandardDeviation masd = (MeanAndStandardDeviation)this.data.getObject(row, column);
    2
    MeanAndStandardDeviation masd = (MeanAndStandardDeviation)this.data.getObject(row, column);
    2
    MeanAndStandardDeviation masd = (MeanAndStandardDeviation)this.data.getObject(rowKey, columnKey);
    Differences
    Expression1Expression2Difference
    rowrowKeyVARIABLE_NAME_MISMATCH
    intjava.lang.ComparableVARIABLE_TYPE_MISMATCH
    columncolumnKeyVARIABLE_NAME_MISMATCH
    intjava.lang.ComparableVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable row does not match with type java.lang.Comparable of variable rowKey
    Type int of variable column does not match with type java.lang.Comparable of variable columnKey
    2
    MeanAndStandardDeviation masd = (MeanAndStandardDeviation)this.data.getObject(rowKey, columnKey);
    3
    if (masd != null)
    3
    if (masd != null)
    4
    result = masd.getMean();
    4
    result = masd.getMean();
    5
    return result;
    5
    return result;
    Precondition Violations (2)
    Row Violation
    1Type int of variable row does not match with type java.lang.Comparable of variable rowKey
    2Type int of variable column does not match with type java.lang.Comparable of variable columnKey