ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i); if (rangeAxis != null) { if (useAnchor) { // get the relevant source coordinate given the plot // orientation double sourceY = source.getY(); if (this.orientation == PlotOrientation.HORIZONTAL) { sourceY = source.getX(); } double anchorY = rangeAxis.java2DToValue(sourceY, info.getDataArea(), getRangeAxisEdge()); rangeAxis.resizeRange(factor, anchorY); } else { rangeAxis.resizeRange(factor); } }
ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i); if (rangeAxis != null) { if (useAnchor) { // get the relevant source coordinate given the plot // orientation double sourceY = source.getY(); if (this.orientation == PlotOrientation.HORIZONTAL) { sourceY = source.getX(); } double anchorY = rangeAxis.java2DToValue(sourceY, info.getDataArea(), getRangeAxisEdge()); rangeAxis.resizeRange(factor, anchorY); } else { rangeAxis.resizeRange(factor); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
Method name: void zoomRangeAxes(double, PlotRenderingInfo, Point2D, boolean) Method name: void zoomRangeAxes(double, PlotRenderingInfo, Point2D, boolean)
Number of AST nodes: 9 Number of AST nodes: 9
1
ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
1
ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);
2
            if (rangeAxis != null) {
2
            if (rangeAxis != null) {
3
                if (useAnchor) {
3
                if (useAnchor) {
4
                    // get the relevant source coordinate given the plot
4
                    // get the relevant source coordinate given the plot
5
                    // orientation
5
                    // orientation
6
                    double sourceY = source.getY();
6
                    double sourceY = source.getY();
7
                    if (this.orientation == PlotOrientation.HORIZONTAL) {
7
                    if (this.orientation == PlotOrientation.HORIZONTAL) {
8
                        sourceY = source.getX();
8
                        sourceY = source.getX();
9
                    }
9
                    }
10
                    double anchorY = rangeAxis.java2DToValue(sourceY,
10
                    double anchorY = rangeAxis.java2DToValue(sourceY,
11
                            info.getDataArea(), getRangeAxisEdge());
11
                            info.getDataArea(), getRangeAxisEdge());
12
                    rangeAxis.resizeRange(factor, anchorY);
12
                    rangeAxis.resizeRange(factor, anchorY);
13
                }
13
                }
14
                else {
14
                else {
15
                    rangeAxis.resizeRange(factor);
15
                    rangeAxis.resizeRange(factor);
16
                }
16
                }
17
            }
17
            }
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.6
Clones locationClones are in different classes having the same super class
Number of node comparisons32
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)54.9
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    2
    ValueAxis rangeAxis = (ValueAxis)this.rangeAxes.get(i);
    2
    ValueAxis rangeAxis = (ValueAxis)this.rangeAxes.get(i);
    3
    if (rangeAxis != null)
    3
    if (rangeAxis != null)
    4
    if (useAnchor)
    4
    if (useAnchor)
    5
    double sourceY = source.getY();
    5
    double sourceY = source.getY();
    6
    if (this.orientation == PlotOrientation.HORIZONTAL)
    6
    if (this.orientation == PlotOrientation.HORIZONTAL)
    7
    sourceY = source.getX();
    7
    sourceY = source.getX();
    8
    double anchorY = rangeAxis.java2DToValue(sourceY, info.getDataArea(), getRangeAxisEdge());
    8
    double anchorY = rangeAxis.java2DToValue(sourceY, info.getDataArea(), getRangeAxisEdge());
    9
    rangeAxis.resizeRange(factor, anchorY);
    9
    rangeAxis.resizeRange(factor, anchorY);
    else
    else
    10
    rangeAxis.resizeRange(factor);
    10
    rangeAxis.resizeRange(factor);
    Precondition Violations (0)
    Row Violation