Number result = null; BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject( rowKey, columnKey); if (item != null) { result = item.getMinRegularValue(); } return result;
Number result = null; BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject( row, column); if (item != null) { result = item.getMaxRegularValue(); } 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 getMinRegularValue(Comparable, Comparable) Method name: Number getMaxRegularValue(int, int)
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
                row, column);
4
        if (item != null) {
4
        if (item != null) {
5
            result = item.getMinRegularValue();
5
            result = item.getMaxRegularValue();
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)4.7
    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);
    2
    BoxAndWhiskerItem item = (BoxAndWhiskerItem)this.data.getObject(row, column);
    Differences
    Expression1Expression2Difference
    rowKeyrowVARIABLE_NAME_MISMATCH
    java.lang.ComparableintVARIABLE_TYPE_MISMATCH
    columnKeycolumnVARIABLE_NAME_MISMATCH
    java.lang.ComparableintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Comparable of variable rowKey does not match with type int of variable row
    Type java.lang.Comparable of variable columnKey does not match with type int of variable column
    2
    BoxAndWhiskerItem item = (BoxAndWhiskerItem)this.data.getObject(row, column);
    3
    if (item != null)
    3
    if (item != null)
    4
    result = item.getMinRegularValue();
    4
    result = item.getMinRegularValue();
    4
    result = item.getMaxRegularValue();
    Differences
    Expression1Expression2Difference
    getMinRegularValuegetMaxRegularValueMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression item.getMinRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression item.getMaxRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    result = item.getMaxRegularValue();
    5
    return result;
    5
    return result;
    Precondition Violations (4)
    Row Violation
    1Type java.lang.Comparable of variable rowKey does not match with type int of variable row
    2Type java.lang.Comparable of variable columnKey does not match with type int of variable column
    3Expression item.getMinRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression item.getMaxRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted