Number result = null; BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item); if (stats != null) { result = stats.getQ1(); } return result;
Number result = null; BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item); if (stats != null) { result = stats.getMaxRegularValue(); } return result;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultBoxAndWhiskerXYDataset.java File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultBoxAndWhiskerXYDataset.java
Method name: Number getQ1Value(int, int) 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 stats = (BoxAndWhiskerItem) this.items.get(item);
2
        BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
3
        if (stats != null) {
3
        if (stats != null) {
4
            result = stats.getQ1();
4
            result = stats.getMaxRegularValue();
5
        }
5
        }
6
        return result;
6
        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.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Number result = null;
    1
    Number result = null;
    2
    BoxAndWhiskerItem stats = (BoxAndWhiskerItem)this.items.get(item);
    2
    BoxAndWhiskerItem stats = (BoxAndWhiskerItem)this.items.get(item);
    3
    if (stats != null)
    3
    if (stats != null)
    4
    result = stats.getQ1();
    4
    result = stats.getQ1();
    4
    result = stats.getMaxRegularValue();
    Differences
    Expression1Expression2Difference
    getQ1getMaxRegularValueMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression stats.getQ1() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression stats.getMaxRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    result = stats.getMaxRegularValue();
    5
    return result;
    5
    return result;
    Precondition Violations (2)
    Row Violation
    1Expression stats.getQ1() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression stats.getMaxRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted