Rectangle2D plotArea = new Rectangle2D.Double(22, 33, 500, 500); RectangleEdge edge = RectangleEdge.BOTTOM; // set axis bounds to be both greater than 1 this.axis.setRange(10, 20); checkPointsToValue(edge, plotArea); // check for bounds interval that includes 1 this.axis.setRange(0.5, 10); checkPointsToValue(edge, plotArea); // check for bounds interval that includes 1 this.axis.setRange(0.2, 20); checkPointsToValue(edge, plotArea); // check for both bounds smaller than 1 this.axis.setRange(0.2, 0.7); checkPointsToValue(edge, plotArea);
Rectangle2D plotArea = new Rectangle2D.Double(22, 33, 500, 500); RectangleEdge edge = RectangleEdge.BOTTOM; // set axis bounds to be both greater than 1 this.axis.setRange(10, 20); checkPointsToJava2D(edge, plotArea); // check for bounds interval that includes 1 this.axis.setRange(0.5, 10); checkPointsToJava2D(edge, plotArea); // check for bounds interval that includes 1 this.axis.setRange(0.2, 20); checkPointsToJava2D(edge, plotArea); // check for both bounds smaller than 1 this.axis.setRange(0.2, 0.7); checkPointsToJava2D(edge, plotArea);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/axis/junit/LogarithmicAxisTests.java File path: /jfreechart-1.0.10/tests/org/jfree/chart/axis/junit/LogarithmicAxisTests.java
Method name: void testJava2DToValue() Method name: void testValueToJava2D()
Number of AST nodes: 10 Number of AST nodes: 10
1
Rectangle2D plotArea = new Rectangle2D.Double(22, 33, 500, 500);
1
Rectangle2D plotArea = new Rectangle2D.Double(22, 33, 500, 500);
2
          RectangleEdge edge = RectangleEdge.BOTTOM;
2
          RectangleEdge edge = RectangleEdge.BOTTOM;
3
          // set axis bounds to be both greater than 1
3
          // set axis bounds to be both greater than 1
4
          this.axis.setRange(10, 20);
4
          this.axis.setRange(10, 20);
5
          checkPointsToValue(edge, plotArea);
5
          checkPointsToJava2D(edge, plotArea);
6
          // check for bounds interval that includes 1
6
          // check for bounds interval that includes 1
7
          this.axis.setRange(0.5, 10);
7
          this.axis.setRange(0.5, 10);
8
          checkPointsToValue(edge, plotArea);
8
          checkPointsToJava2D(edge, plotArea);
9
          // check for bounds interval that includes 1
9
          // check for bounds interval that includes 1
10
          this.axis.setRange(0.2, 20);
10
          this.axis.setRange(0.2, 20);
11
          checkPointsToValue(edge, plotArea);
11
          checkPointsToJava2D(edge, plotArea);
12
          // check for both bounds smaller than 1
12
          // check for both bounds smaller than 1
13
          this.axis.setRange(0.2, 0.7);
13
          this.axis.setRange(0.2, 0.7);
14
          checkPointsToValue(edge, plotArea);
14
          checkPointsToJava2D(edge, plotArea);
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.0
Clones locationClones are declared in the same class
Number of node comparisons82
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    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
    1
    Rectangle2D plotArea = new Rectangle2D.Double(22, 33, 500, 500);
    1
    Rectangle2D plotArea = new Rectangle2D.Double(22, 33, 500, 500);
    2
    RectangleEdge edge = RectangleEdge.BOTTOM;
    2
    RectangleEdge edge = RectangleEdge.BOTTOM;
    3
    this.axis.setRange(10, 20);
    3
    this.axis.setRange(10, 20);
    4
    checkPointsToValue(edge, plotArea);
    4
    checkPointsToValue(edge, plotArea);
    4
    checkPointsToJava2D(edge, plotArea);
    Differences
    Expression1Expression2Difference
    checkPointsToValuecheckPointsToJava2DMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression checkPointsToValue(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method checkPointsToValue
    Expression checkPointsToJava2D(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method checkPointsToJava2D
    Expression checkPointsToValue(edge,plotArea) is a void method call, and thus it cannot be parameterized
    Expression checkPointsToJava2D(edge,plotArea) is a void method call, and thus it cannot be parameterized
    4
    checkPointsToJava2D(edge, plotArea);
    5
    this.axis.setRange(0.5, 10);
    5
    this.axis.setRange(0.5, 10);
    6
    checkPointsToValue(edge, plotArea);
    6
    checkPointsToValue(edge, plotArea);
    6
    checkPointsToJava2D(edge, plotArea);
    Differences
    Expression1Expression2Difference
    checkPointsToValuecheckPointsToJava2DMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression checkPointsToValue(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method checkPointsToValue
    Expression checkPointsToJava2D(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method checkPointsToJava2D
    Expression checkPointsToValue(edge,plotArea) is a void method call, and thus it cannot be parameterized
    Expression checkPointsToJava2D(edge,plotArea) is a void method call, and thus it cannot be parameterized
    6
    checkPointsToJava2D(edge, plotArea);
    7
    this.axis.setRange(0.2, 20);
    7
    this.axis.setRange(0.2, 20);
    8
    checkPointsToValue(edge, plotArea);
    8
    checkPointsToValue(edge, plotArea);
    8
    checkPointsToJava2D(edge, plotArea);
    Differences
    Expression1Expression2Difference
    checkPointsToValuecheckPointsToJava2DMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression checkPointsToValue(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method checkPointsToValue
    Expression checkPointsToJava2D(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method checkPointsToJava2D
    Expression checkPointsToValue(edge,plotArea) is a void method call, and thus it cannot be parameterized
    Expression checkPointsToJava2D(edge,plotArea) is a void method call, and thus it cannot be parameterized
    8
    checkPointsToJava2D(edge, plotArea);
    9
    this.axis.setRange(0.2, 0.7);
    9
    this.axis.setRange(0.2, 0.7);
    10
    checkPointsToValue(edge, plotArea);
    10
    checkPointsToValue(edge, plotArea);
    10
    checkPointsToJava2D(edge, plotArea);
    Differences
    Expression1Expression2Difference
    checkPointsToValuecheckPointsToJava2DMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression checkPointsToValue(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method checkPointsToValue
    Expression checkPointsToJava2D(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method checkPointsToJava2D
    Expression checkPointsToValue(edge,plotArea) is a void method call, and thus it cannot be parameterized
    Expression checkPointsToJava2D(edge,plotArea) is a void method call, and thus it cannot be parameterized
    10
    checkPointsToJava2D(edge, plotArea);
    Precondition Violations (16)
    Row Violation
    1Expression checkPointsToValue(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression checkPointsToJava2D(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression checkPointsToValue(edge,plotArea) is a void method call, and thus it cannot be parameterized
    4Expression checkPointsToJava2D(edge,plotArea) is a void method call, and thus it cannot be parameterized
    5Expression checkPointsToValue(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression checkPointsToJava2D(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression checkPointsToValue(edge,plotArea) is a void method call, and thus it cannot be parameterized
    8Expression checkPointsToJava2D(edge,plotArea) is a void method call, and thus it cannot be parameterized
    9Expression checkPointsToValue(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression checkPointsToJava2D(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression checkPointsToValue(edge,plotArea) is a void method call, and thus it cannot be parameterized
    12Expression checkPointsToJava2D(edge,plotArea) is a void method call, and thus it cannot be parameterized
    13Expression checkPointsToValue(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression checkPointsToJava2D(edge,plotArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression checkPointsToValue(edge,plotArea) is a void method call, and thus it cannot be parameterized
    16Expression checkPointsToJava2D(edge,plotArea) is a void method call, and thus it cannot be parameterized