if (this.positiveItemLabelPosition != null) { return this.positiveItemLabelPosition; } // otherwise look up the position table ItemLabelPosition position = (ItemLabelPosition) this.positiveItemLabelPositionList.get(series); if (position == null) { position = this.basePositiveItemLabelPosition; } return position;
if (this.negativeItemLabelPosition != null) { return this.negativeItemLabelPosition; } // otherwise look up the position list ItemLabelPosition position = (ItemLabelPosition) this.negativeItemLabelPositionList.get(series); if (position == null) { position = this.baseNegativeItemLabelPosition; } return position;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/AbstractRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/AbstractRenderer.java
Method name: ItemLabelPosition getSeriesPositiveItemLabelPosition(int) Method name: ItemLabelPosition getSeriesNegativeItemLabelPosition(int)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (this.positiveItemLabelPosition != null) {
1
if (this.negativeItemLabelPosition != null) {
2
            return this.positiveItemLabelPosition;
2
            return this.negativeItemLabelPosition;
3
        }
3
        }
4
        // otherwise look up the position table
4
        // otherwise look up the position list
5
        ItemLabelPosition position = (ItemLabelPosition)
5
        ItemLabelPosition position = (ItemLabelPosition)
6
            this.positiveItemLabelPositionList.get(series);
6
            this.negativeItemLabelPositionList.get(series);
7
        if (position == null) {
7
        if (position == null) {
8
            position = this.basePositiveItemLabelPosition;
8
            position = this.baseNegativeItemLabelPosition;
9
        }
9
        }
10
        return position;
10
        return position;
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.5
Clones locationClones are declared in the same class
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (this.positiveItemLabelPosition != null)
    1
    if (this.positiveItemLabelPosition != null)
    1
    if (this.negativeItemLabelPosition != null)
    Differences
    Expression1Expression2Difference
    positiveItemLabelPositionnegativeItemLabelPositionVARIABLE_NAME_MISMATCH
    1
    if (this.negativeItemLabelPosition != null)
    2
    return this.positiveItemLabelPosition;
    2
    return this.positiveItemLabelPosition;
    2
    return this.negativeItemLabelPosition;
    Differences
    Expression1Expression2Difference
    positiveItemLabelPositionnegativeItemLabelPositionVARIABLE_NAME_MISMATCH
    2
    return this.negativeItemLabelPosition;
    3
    ItemLabelPosition position = (ItemLabelPosition)this.positiveItemLabelPositionList.get(series);
    3
    ItemLabelPosition position = (ItemLabelPosition)this.positiveItemLabelPositionList.get(series);
    3
    ItemLabelPosition position = (ItemLabelPosition)this.negativeItemLabelPositionList.get(series);
    Differences
    Expression1Expression2Difference
    positiveItemLabelPositionListnegativeItemLabelPositionListVARIABLE_NAME_MISMATCH
    3
    ItemLabelPosition position = (ItemLabelPosition)this.negativeItemLabelPositionList.get(series);
    4
    if (position == null)
    4
    if (position == null)
    5
    position = this.basePositiveItemLabelPosition;
    5
    position = this.basePositiveItemLabelPosition;
    5
    position = this.baseNegativeItemLabelPosition;
    Differences
    Expression1Expression2Difference
    basePositiveItemLabelPositionbaseNegativeItemLabelPositionVARIABLE_NAME_MISMATCH
    5
    position = this.baseNegativeItemLabelPosition;
    6
    return position;
    6
    return position;
    Precondition Violations (0)
    Row Violation