401-1-2

super.add(subplot, weight); ValueAxis l_range = super.getRangeAxis(); subplot.setRangeAxis(0, l_range, false); super.setRangeAxis(l_range); if (null == l_range) { return; } l_range.configure();
super.add(subplot, weight); ValueAxis l_range = super.getRangeAxis(); subplot.setRangeAxis(0, l_range, false); super.setRangeAxis(l_range); if (null == l_range) { return; } l_range.configure();

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/experimental/org/jfree/experimental/chart/plot/CombinedCategoryPlot.java |  | File path: /jfreechart-1.0.10/experimental/org/jfree/experimental/chart/plot/CombinedXYPlot.java
Method name: `void add(CategoryPlot, int)` |  | Method name: `void add(XYPlot, int)`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    super.add(subplot, weight);↵

1

    super.add(subplot, weight);↵

2

            ValueAxis l_range = super.getRangeAxis();↵

2

            ValueAxis l_range = super.getRangeAxis();↵

3

            subplot.setRangeAxis(0, l_range, false);↵

3

            subplot.setRangeAxis(0, l_range, false);↵

4

            super.setRangeAxis(l_range);↵

4

            super.setRangeAxis(l_range);↵

5

            if (null == l_range) {↵

5

            if (null == l_range) {↵

6

                return;↵

6

                return;↵

7

            }↵

7

            }↵

8

            l_range.configure();

8

            l_range.configure();

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 in different classes having the same super class
Number of node comparisons | 17

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 7
   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) | 1.1
   Clone type | Type 2

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

   1

       super.add(subplot, weight);

   1 | super.add(subplot, weight);
   1 | super.add(subplot, weight);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.plot.CategoryPlot | org.jfree.chart.plot.XYPlot | SUBCLASS_TYPE_MISMATCH

   1

       super.add(subplot, weight);

   2

       ValueAxis l_range = super.getRangeAxis();

   2

       ValueAxis l_range = super.getRangeAxis();

   3

       subplot.setRangeAxis(0, l_range, false);

   3 | subplot.setRangeAxis(0, l_range, false);
   3 | subplot.setRangeAxis(0, l_range, false);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.plot.CategoryPlot | org.jfree.chart.plot.XYPlot | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression subplot cannot be unified with expression subplot , because common superclass org.jfree.chart.plot.Plot does not declare member(s) public void setRangeAxis(int, org.jfree.chart.axis.ValueAxis, boolean)

   3

       subplot.setRangeAxis(0, l_range, false);

   4

       super.setRangeAxis(l_range);

   4

       super.setRangeAxis(l_range);

   5

       if (null == l_range)

   5

       if (null == l_range)

   6

       return;

   6

       return;

   7

       l_range.configure();

   7

       l_range.configure();

   Precondition Violations (1)
   Row | Violation
   --- | ---
   1 | Expression subplot cannot be unified with expression subplot , because common superclass org.jfree.chart.plot.Plot does not declare member(s) public void setRangeAxis(int, org.jfree.chart.axis.ValueAxis, boolean)