Number result = null; BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject( rowKey, columnKey); if (item != null) { result = item.getQ1(); } return result;
Number result = null; BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject( rowKey, columnKey); if (item != null) { result = item.getQ3(); } return result;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultBoxAndWhiskerCategoryDataset.java File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultBoxAndWhiskerCategoryDataset.java
Method name: Number getQ1Value(Comparable, Comparable) Method name: Number getQ3Value(Comparable, Comparable)
Number of AST nodes: 5 Number of AST nodes: 5
1
Number result = null;
1
Number result = null;
2
        BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(
2
        BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(
3
                rowKey, columnKey);
3
                rowKey, columnKey);
4
        if (item != null) {
4
        if (item != null) {
5
            result = item.getQ1();
5
            result = item.getQ3();
6
        }
6
        }
7
        return result;
7
        return result;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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. {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)4.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Number result = null;
    1
    Number result = null;
    2
    BoxAndWhiskerItem item = (BoxAndWhiskerItem)this.data.getObject(rowKey, columnKey);
    2
    BoxAndWhiskerItem item = (BoxAndWhiskerItem)this.data.getObject(rowKey, columnKey);
    3
    if (item != null)
    3
    if (item != null)
    4
    result = item.getQ1();
    4
    result = item.getQ1();
    4
    result = item.getQ3();
    Differences
    Expression1Expression2Difference
    getQ1getQ3METHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression item.getQ1() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression item.getQ3() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    result = item.getQ3();
    5
    return result;
    5
    return result;
    Precondition Violations (2)
    Row Violation
    1Expression item.getQ1() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression item.getQ3() cannot be parameterized, because it has dependencies to/from statements that will be extracted