if (useAnchor) { // get the source coordinate - this plot has always a VERTICAL // orientation double sourceX = source.getX(); double anchorX = this.domainAxis.java2DToValue(sourceX, info.getDataArea(), RectangleEdge.BOTTOM); this.domainAxis.resizeRange(factor, anchorX); } else { this.domainAxis.resizeRange(factor); }
if (useAnchor) { // get the source coordinate - this plot has always a VERTICAL // orientation double sourceX = source.getX(); double anchorX = this.axis.java2DToValue(sourceX, info.getDataArea(), RectangleEdge.BOTTOM); this.axis.resizeRange(factor, anchorX); } else { this.axis.resizeRange(factor); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/FastScatterPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PolarPlot.java
Method name: void zoomDomainAxes(double, PlotRenderingInfo, Point2D, boolean) Method name: void zoomRangeAxes(double, PlotRenderingInfo, Point2D, boolean)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (useAnchor) {
1
if (useAnchor) {
2
            // get the source coordinate - this plot has always a VERTICAL
2
            // get the source coordinate - this plot has always a VERTICAL
3
            // orientation
3
            // orientation
4
            double sourceX = source.getX();
4
            double sourceX = source.getX();
5
            double anchorX = this.domainAxis.java2DToValue(sourceX, 
5
            double anchorX = this.axis.java2DToValue(sourceX,
6
                    info.getDataArea(), RectangleEdge.BOTTOM);
6
                    info.getDataArea(), RectangleEdge.BOTTOM);
7
            this.domainAxis.resizeRange(factor, anchorX);
7
            this.axis.resizeRange(factor, anchorX);
8
        }
8
        }
9
        else {
9
        else {
10
            this.domainAxis.resizeRange(factor);
10
            this.axis.resizeRange(factor);
11
        }
11
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons25
  1. {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)11.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (useAnchor)
    1
    if (useAnchor)
    2
    double sourceX = source.getX();
    2
    double sourceX = source.getX();
    3
    double anchorX = this.domainAxis.java2DToValue(sourceX, info.getDataArea(), RectangleEdge.BOTTOM);
    3
    double anchorX = this.domainAxis.java2DToValue(sourceX, info.getDataArea(), RectangleEdge.BOTTOM);
    3
    double anchorX = this.axis.java2DToValue(sourceX, info.getDataArea(), RectangleEdge.BOTTOM);
    Differences
    Expression1Expression2Difference
    domainAxisaxisVARIABLE_NAME_MISMATCH
    3
    double anchorX = this.axis.java2DToValue(sourceX, info.getDataArea(), RectangleEdge.BOTTOM);
    4
    this.domainAxis.resizeRange(factor, anchorX);
    4
    this.domainAxis.resizeRange(factor, anchorX);
    4
    this.axis.resizeRange(factor, anchorX);
    Differences
    Expression1Expression2Difference
    domainAxisaxisVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.domainAxis cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression this.axis cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    this.axis.resizeRange(factor, anchorX);
    else
    else
    5
    this.domainAxis.resizeRange(factor);
    5
    this.domainAxis.resizeRange(factor);
    5
    this.axis.resizeRange(factor);
    Differences
    Expression1Expression2Difference
    domainAxisaxisVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.domainAxis cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression this.axis cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5
    this.axis.resizeRange(factor);
    Precondition Violations (4)
    Row Violation
    1Expression this.domainAxis cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression this.axis cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression this.domainAxis cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression this.axis cannot be parameterized, because it has dependencies to/from statements that will be extracted