1130-7-8

Font labelFont = marker.getLabelFont(); g2.setFont(labelFont); g2.setPaint(marker.getLabelPaint()); Point2D coordinates = calculateRangeMarkerTextAnchorPoint( g2, orientation, dataArea, line.getBounds2D(), marker.getLabelOffset(), LengthAdjustmentType.EXPAND, anchor); TextUtilities.drawAlignedString(label, g2, (float) coordinates.getX(), (float) coordinates.getY(), marker.getLabelTextAnchor());
Font labelFont = marker.getLabelFont(); g2.setFont(labelFont); g2.setPaint(marker.getLabelPaint()); Point2D coordinates = calculateRangeMarkerTextAnchorPoint( g2, orientation, dataArea, rect, marker.getLabelOffset(), marker.getLabelOffsetType(), anchor); TextUtilities.drawAlignedString(label, g2, (float) coordinates.getX(), (float) coordinates.getY(), marker.getLabelTextAnchor());

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 drawRangeMarker(Graphics2D, XYPlot, ValueAxis, Marker, Rectangle2D)` |  | Method name: `void drawRangeMarker(Graphics2D, XYPlot, ValueAxis, Marker, Rectangle2D)`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    Font labelFont = marker.getLabelFont();↵

1

    Font labelFont = marker.getLabelFont();↵

2

                    g2.setFont(labelFont);↵

2

                    g2.setFont(labelFont);↵

3

                    g2.setPaint(marker.getLabelPaint());↵

3

                    g2.setPaint(marker.getLabelPaint());↵

4

                    Point2D coordinates = calculateRangeMarkerTextAnchorPoint(↵

4

                    Point2D coordinates = calculateRangeMarkerTextAnchorPoint(↵

5

                            g2, orientation, dataArea, line.getBounds2D(),↵

5

                            g2, orientation, dataArea, rect,↵

6

                            marker.getLabelOffset(),↵

6

                            marker.getLabelOffset(),↵

7

                            LengthAdjustmentType.EXPAND,↵

7

     marker.getLabelOffsetType(),↵

8

     anchor);↵

8

                            anchor);↵

9

                    TextUtilities.drawAlignedString(label, g2,↵

9

                    TextUtilities.drawAlignedString(label, g2,↵

10

                            (float) coordinates.getX(), (float) coordinates.getY(),↵

10

                            (float) coordinates.getX(), (float) coordinates.getY(),↵

11

                            marker.getLabelTextAnchor());

11

                            marker.getLabelTextAnchor());

See real code fragment |  | See real code fragment

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

1. {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.0
   Clone type | Type 2

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

   22

       Font labelFont = marker.getLabelFont();

   87

       Font labelFont = marker.getLabelFont();

   23

       g2.setFont(labelFont);

   88

       g2.setFont(labelFont);

   24

       g2.setPaint(marker.getLabelPaint());

   89

       g2.setPaint(marker.getLabelPaint());

   25

       Point2D coordinates = calculateRangeMarkerTextAnchorPoint(g2, orientation, dataArea, line.getBounds2D(), marker.getLabelOffset(), LengthAdjustmentType.EXPAND, anchor);

   25 | Point2D coordinates = calculateRangeMarkerTextAnchorPoint(g2, orientation, dataArea, line.getBounds2D(), marker.getLabelOffset(), LengthAdjustmentType.EXPAND, anchor);
   90 | Point2D coordinates = calculateRangeMarkerTextAnchorPoint(g2, orientation, dataArea, rect, marker.getLabelOffset(), marker.getLabelOffsetType(), anchor);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   line.getBounds2D() | rect | TYPE_COMPATIBLE_REPLACEMENT
   LengthAdjustmentType.EXPAND | marker.getLabelOffsetType() | TYPE_COMPATIBLE_REPLACEMENT

   90

       Point2D coordinates = calculateRangeMarkerTextAnchorPoint(g2, orientation, dataArea, rect, marker.getLabelOffset(), marker.getLabelOffsetType(), anchor);

   26

       TextUtilities.drawAlignedString(label, g2, (float)coordinates.getX(), (float)coordinates.getY(), marker.getLabelTextAnchor());

   91

       TextUtilities.drawAlignedString(label, g2, (float)coordinates.getX(), (float)coordinates.getY(), marker.getLabelTextAnchor());

   Precondition Violations (0)
   Row | Violation
   --- | ---