1250-15-16

Number result = null; BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject( row, column); if (item != null) { result = item.getMinOutlier(); } return result;
Number result = null; BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject( rowKey, columnKey); if (item != null) { result = item.getMinOutlier(); } 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 getMinOutlier(int, int)` |  | Method name: `Number getMinOutlier(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

                    row, column);↵

3

                    rowKey, columnKey);↵

4

            if (item != null) {↵

4

            if (item != null) {↵

5

                result = item.getMinOutlier();↵

5

                result = item.getMinOutlier();↵

6

            }↵

6

            }↵

7

            return result;

7

            return result;

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1
Clones location | Clones are declared in the same class
Number of node comparisons | 13

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 5
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 0.6
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   1

       Number result = null;

   1

       Number result = null;

   2

       BoxAndWhiskerItem item = (BoxAndWhiskerItem)this.data.getObject(row, column);

   2 | BoxAndWhiskerItem item = (BoxAndWhiskerItem)this.data.getObject(row, column);
   2 | BoxAndWhiskerItem item = (BoxAndWhiskerItem)this.data.getObject(rowKey, columnKey);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   row | rowKey | VARIABLE_NAME_MISMATCH
   int | java.lang.Comparable | VARIABLE_TYPE_MISMATCH

   Preondition Violations
   Type int of variable row does not match with type java.lang.Comparable of variable rowKey

   2

       BoxAndWhiskerItem item = (BoxAndWhiskerItem)this.data.getObject(rowKey, columnKey);

   3

       if (item != null)

   3

       if (item != null)

   4

       result = item.getMinOutlier();

   4

       result = item.getMinOutlier();

   5

       return result;

   5

       return result;

   Precondition Violations (1)
   Row | Violation
   --- | ---
   1 | Type int of variable row does not match with type java.lang.Comparable of variable rowKey