Font labelFont = marker.getLabelFont(); g2.setFont(labelFont); g2.setPaint(marker.getLabelPaint()); Point2D coordinates = calculateRangeMarkerTextAnchorPoint( g2, orientation, dataArea, path.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 = calculateDomainMarkerTextAnchorPoint( g2, orientation, dataArea, line.getBounds2D(), marker.getLabelOffset(), LengthAdjustmentType.EXPAND, 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/category/BarRenderer3D.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java
Method name: void drawRangeMarker(Graphics2D, CategoryPlot, ValueAxis, Marker, Rectangle2D) Method name: void drawDomainMarker(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 = calculateDomainMarkerTextAnchorPoint(
5
                        g2, orientation, dataArea, path.getBounds2D(),
5
                        g2, orientation, dataArea, line.getBounds2D(),
6
                        marker.getLabelOffset(),
6
                        marker.getLabelOffset(),
7
 LengthAdjustmentType.EXPAND,
7
                        LengthAdjustmentType.EXPAND,
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());
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons25
  1. {Non-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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    35
    Font labelFont = marker.getLabelFont();
    22
    Font labelFont = marker.getLabelFont();
    36
    g2.setFont(labelFont);
    23
    g2.setFont(labelFont);
    37
    g2.setPaint(marker.getLabelPaint());
    24
    g2.setPaint(marker.getLabelPaint());
    38
    Point2D coordinates = calculateRangeMarkerTextAnchorPoint(g2, orientation, dataArea, path.getBounds2D(), marker.getLabelOffset(), LengthAdjustmentType.EXPAND, anchor);
    38
    Point2D coordinates = calculateRangeMarkerTextAnchorPoint(g2, orientation, dataArea, path.getBounds2D(), marker.getLabelOffset(), LengthAdjustmentType.EXPAND, anchor);
    25
    Point2D coordinates = calculateDomainMarkerTextAnchorPoint(g2, orientation, dataArea, line.getBounds2D(), marker.getLabelOffset(), LengthAdjustmentType.EXPAND, anchor);
    Differences
    Expression1Expression2Difference
    pathlineVARIABLE_NAME_MISMATCH
    java.awt.geom.GeneralPathjava.awt.geom.Line2DSUBCLASS_TYPE_MISMATCH
    calculateRangeMarkerTextAnchorPointcalculateDomainMarkerTextAnchorPointMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression calculateDomainMarkerTextAnchorPoint(g2,orientation,dataArea,line.getBounds2D(),marker.getLabelOffset(),LengthAdjustmentType.EXPAND,anchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25
    Point2D coordinates = calculateDomainMarkerTextAnchorPoint(g2, orientation, dataArea, line.getBounds2D(), marker.getLabelOffset(), LengthAdjustmentType.EXPAND, anchor);
    39
    TextUtilities.drawAlignedString(label, g2, (float)coordinates.getX(), (float)coordinates.getY(), marker.getLabelTextAnchor());
    26
    TextUtilities.drawAlignedString(label, g2, (float)coordinates.getX(), (float)coordinates.getY(), marker.getLabelTextAnchor());
    Precondition Violations (1)
    Row Violation
    1Expression calculateDomainMarkerTextAnchorPoint(g2,orientation,dataArea,line.getBounds2D(),marker.getLabelOffset(),LengthAdjustmentType.EXPAND,anchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted