if (obj == this) { return true; } if (!(obj instanceof BubbleXYItemLabelGenerator)) { return false; } if (!super.equals(obj)) { return false; } BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true;
if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/BubbleXYItemLabelGenerator.java File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/StandardXYZToolTipGenerator.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 12 Number of AST nodes: 12
1
if (obj == this) {
1
if (obj == this) {
2
            return true;
2
            return true;
3
        }
3
        }
4
        if (!(obj instanceof BubbleXYItemLabelGenerator)) {
4
        if (!(obj instanceof StandardXYZToolTipGenerator)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        if (!super.equals(obj)) {
7
        if (!super.equals(obj)) {
8
            return false;
8
            return false;
9
        }
9
        }
10
        BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator) obj;
10
        StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj;
11
        if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) {
11
        if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) {
12
            return false;
12
            return false;
13
        }
13
        }
14
        if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) {
14
        if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) {
15
            return false;
15
            return false;
16
        }
16
        }
17
        return true;
17
        return true;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)2.4
Clones locationClones are in different classes having the same super class
Number of node comparisons62
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (obj == this)
    1
    if (obj == this)
    2
    return true;
    2
    return true;
    3
    if (!(obj instanceof BubbleXYItemLabelGenerator))
    3
    if (!(obj instanceof BubbleXYItemLabelGenerator))
    3
    if (!(obj instanceof StandardXYZToolTipGenerator))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.labels.BubbleXYItemLabelGeneratororg.jfree.chart.labels.StandardXYZToolTipGeneratorSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof StandardXYZToolTipGenerator))
    4
    return false;
    4
    return false;
    5
    if (!super.equals(obj))
    5
    if (!super.equals(obj))
    5
    if (!super.equals(obj))
    Preondition Violations
    Super method call if(!super.equals(obj)) cannot be extracted from method
    Super method call if(!super.equals(obj)) cannot be extracted from method
    5
    if (!super.equals(obj))
    6
    return false;
    6
    return false;
    7
    BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator)obj;
    7
    BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator)obj;
    7
    StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator)obj;
    Differences
    Expression1Expression2Difference
    org.jfree.chart.labels.BubbleXYItemLabelGeneratororg.jfree.chart.labels.StandardXYZToolTipGeneratorSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.labels.BubbleXYItemLabelGeneratororg.jfree.chart.labels.StandardXYZToolTipGeneratorSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.labels.BubbleXYItemLabelGeneratororg.jfree.chart.labels.StandardXYZToolTipGeneratorSUBCLASS_TYPE_MISMATCH
    7
    StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator)obj;
    8
    if (!ObjectUtilities.equal(this.zFormat, that.zFormat))
    8
    if (!ObjectUtilities.equal(this.zFormat, that.zFormat))
    8
    if (!ObjectUtilities.equal(this.zFormat, that.zFormat))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.labels.BubbleXYItemLabelGeneratororg.jfree.chart.labels.StandardXYZToolTipGeneratorSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression that.zFormat cannot be unified with expression that.zFormat , because common superclass org.jfree.chart.labels.AbstractXYItemLabelGenerator does not declare member(s) private java.text.NumberFormat zFormat
    8
    if (!ObjectUtilities.equal(this.zFormat, that.zFormat))
    9
    return false;
    9
    return false;
    10
    if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat))
    10
    if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat))
    10
    if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.labels.BubbleXYItemLabelGeneratororg.jfree.chart.labels.StandardXYZToolTipGeneratorSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression that.zDateFormat cannot be unified with expression that.zDateFormat , because common superclass org.jfree.chart.labels.AbstractXYItemLabelGenerator does not declare member(s) private java.text.DateFormat zDateFormat
    10
    if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat))
    11
    return false;
    11
    return false;
    12
    return true;
    12
    return true;
    Precondition Violations (4)
    Row Violation
    1Super method call if(!super.equals(obj)) cannot be extracted from method
    2Super method call if(!super.equals(obj)) cannot be extracted from method
    3Expression that.zFormat cannot be unified with expression that.zFormat , because common superclass org.jfree.chart.labels.AbstractXYItemLabelGenerator does not declare member(s) private java.text.NumberFormat zFormat
    4Expression that.zDateFormat cannot be unified with expression that.zDateFormat , because common superclass org.jfree.chart.labels.AbstractXYItemLabelGenerator does not declare member(s) private java.text.DateFormat zDateFormat