1778-2-3

low = Math.max(low, dataArea.getMinX()); high = Math.min(high, dataArea.getMaxX()); rect = new Rectangle2D.Double(low, dataArea.getMinY(), high - low, dataArea.getHeight());
low = Math.max(low, dataArea.getMinY()); high = Math.min(high, dataArea.getMaxY()); rect = new Rectangle2D.Double(dataArea.getMinX(), low, dataArea.getWidth(), high - low);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java
Method name: `void drawDomainMarker(Graphics2D, XYPlot, ValueAxis, Marker, Rectangle2D)` |  | Method name: `void drawRangeMarker(Graphics2D, XYPlot, ValueAxis, Marker, Rectangle2D)`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    low = Math.max(low, dataArea.getMinX());↵

1

    low = Math.max(low, dataArea.getMinY());↵

2

                    high = Math.min(high, dataArea.getMaxX());↵

2

                    high = Math.min(high, dataArea.getMaxY());↵

3

                    rect = new Rectangle2D.Double(low,↵

3

                    rect = new Rectangle2D.Double(dataArea.getMinX(),↵

4

                            dataArea.getMinY(), high - low,↵

4

                            low, dataArea.getWidth(),↵

5

                            dataArea.getHeight());

5

                            high - low);

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.0
Clones location | Clones are declared in the same class
Number of node comparisons | 9

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 3
   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.0
   Clone type | Type 2

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

   46

       low = Math.max(low, dataArea.getMinX());

   46 | low = Math.max(low, dataArea.getMinX());
   46 | low = Math.max(low, dataArea.getMinY());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getMinX | getMinY | METHOD_INVOCATION_NAME_MISMATCH

   46

       low = Math.max(low, dataArea.getMinY());

   47

       high = Math.min(high, dataArea.getMaxX());

   47 | high = Math.min(high, dataArea.getMaxX());
   47 | high = Math.min(high, dataArea.getMaxY());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getMaxX | getMaxY | METHOD_INVOCATION_NAME_MISMATCH

   47

       high = Math.min(high, dataArea.getMaxY());

   48

       rect = new Rectangle2D.Double(low, dataArea.getMinY(), high - low, dataArea.getHeight());

   48 | rect = new Rectangle2D.Double(low, dataArea.getMinY(), high - low, dataArea.getHeight());
   48 | rect = new Rectangle2D.Double(dataArea.getMinX(), low, dataArea.getWidth(), high - low);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   low | dataArea.getMinX() | TYPE_COMPATIBLE_REPLACEMENT
   dataArea.getMinY() | low | TYPE_COMPATIBLE_REPLACEMENT
   high - low | dataArea.getWidth() | TYPE_COMPATIBLE_REPLACEMENT
   dataArea.getHeight() | high - low | TYPE_COMPATIBLE_REPLACEMENT

   Preondition Violations
   Expression low cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression low cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression high - low cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression high - low cannot be parameterized, because it has dependencies to/from statements that will be extracted

   48

       rect = new Rectangle2D.Double(dataArea.getMinX(), low, dataArea.getWidth(), high - low);

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Expression low cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression low cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression high - low cannot be parameterized, because it has dependencies to/from statements that will be extracted
   4 | Expression high - low cannot be parameterized, because it has dependencies to/from statements that will be extracted