BarRenderer r = new BarRenderer(); r.setPositiveItemLabelPosition(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT)); assertEquals(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT), r.getPositiveItemLabelPosition(0, 0));
BarRenderer r = new BarRenderer(); r.setNegativeItemLabelPosition(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT)); assertEquals(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT), r.getNegativeItemLabelPosition(0, 0));
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/junit/AbstractRendererTests.java File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/junit/AbstractRendererTests.java
Method name: void testSetPositiveItemLabelPosition() Method name: void testSetNegativeItemLabelPosition()
Number of AST nodes: 3 Number of AST nodes: 3
1
BarRenderer r = new BarRenderer();
1
BarRenderer r = new BarRenderer();
2
        r.setPositiveItemLabelPosition(new ItemLabelPosition(
2
        r.setNegativeItemLabelPosition(new ItemLabelPosition(
3
                ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT));
3
                ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT));
4
        assertEquals(new ItemLabelPosition(
4
        assertEquals(new ItemLabelPosition(
5
                ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT), 
5
                ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT), 
6
                r.getPositiveItemLabelPosition(0, 0));
6
                r.getNegativeItemLabelPosition(0, 0));
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 comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    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
    BarRenderer r = new BarRenderer();
    1
    BarRenderer r = new BarRenderer();
    2
    r.setPositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT));
    2
    r.setPositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT));
    2
    r.setNegativeItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT));
    Differences
    Expression1Expression2Difference
    setPositiveItemLabelPositionsetNegativeItemLabelPositionMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression r.setPositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1,TextAnchor.BASELINE_LEFT)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r.setNegativeItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1,TextAnchor.BASELINE_LEFT)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r.setPositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1,TextAnchor.BASELINE_LEFT)) is a void method call, and thus it cannot be parameterized
    Expression r.setNegativeItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1,TextAnchor.BASELINE_LEFT)) is a void method call, and thus it cannot be parameterized
    2
    r.setNegativeItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT));
    3
    assertEquals(new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT), r.getPositiveItemLabelPosition(0, 0));
    3
    assertEquals(new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT), r.getPositiveItemLabelPosition(0, 0));
    3
    assertEquals(new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT), r.getNegativeItemLabelPosition(0, 0));
    Differences
    Expression1Expression2Difference
    getPositiveItemLabelPositiongetNegativeItemLabelPositionMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression r.getPositiveItemLabelPosition(0,0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r.getNegativeItemLabelPosition(0,0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    assertEquals(new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.BASELINE_LEFT), r.getNegativeItemLabelPosition(0, 0));
    Precondition Violations (6)
    Row Violation
    1Expression r.setPositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1,TextAnchor.BASELINE_LEFT)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression r.setNegativeItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1,TextAnchor.BASELINE_LEFT)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression r.setPositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1,TextAnchor.BASELINE_LEFT)) is a void method call, and thus it cannot be parameterized
    4Expression r.setNegativeItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.INSIDE1,TextAnchor.BASELINE_LEFT)) is a void method call, and thus it cannot be parameterized
    5Expression r.getPositiveItemLabelPosition(0,0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression r.getNegativeItemLabelPosition(0,0) cannot be parameterized, because it has dependencies to/from statements that will be extracted