CloneSet109


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
52220.985class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
152396
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/ComparableObjectSeries.java
252685
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/xy/XYSeries.java
Next
Last
Clone Instance
1
Line Count
52
Source Line
396
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/ComparableObjectSeries.java

/**
 * Tests this series for equality with an arbitrary object.
 *
 * @param obj  the object to test against for equality 
 *             (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof ComparableObjectSeries)) {
    return false;
  }
  if ( !super.equals(obj)) {
    return false;
  }
  ComparableObjectSeries that = (ComparableObjectSeries) obj;
  if (this.maximumItemCount != that.maximumItemCount) {
    return false;
  }
  if (this.autoSort != that.autoSort) {
    return false;
  }
  if (this.allowDuplicateXValues != that.allowDuplicateXValues) {
    return false;
  }
  if ( !ObjectUtilities.equal(this.data, that.data)) {
    return false;
  }
  return true;
}

/**
 * Returns a hash code.
 * 
 * @return A hash code.
 */
public int hashCode() {
  int result = super.hashCode();
  // it is too slow to look at every data item, so let's just look at
  // the first, middle and last items...
  int count = getItemCount();
  if (count > 0) {
    ComparableObjectItem item = getDataItem(0);
    result = 29 * result + item.hashCode();
  }
  if (count > 1) {
    ComparableObjectItem item = getDataItem(count - 1);
    result = 29 * result + item.hashCode();
  }
  if (count > 2) {
    ComparableObjectItem item = getDataItem(count / 2);
    result = 29 * result + item.hashCode();
  }
  result = 29 * result + this.maximumItemCount;
  result = 29 * result + (this.autoSort ? 1: 0);
  result = 29 * result + (this.allowDuplicateXValues ? 1: 0);
  return result;
}


First
Previous
Clone Instance
2
Line Count
52
Source Line
685
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/xy/XYSeries.java

/**
 * Tests this series for equality with an arbitrary object.
 *
 * @param obj  the object to test against for equality
 *             (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof XYSeries)) {
    return false;
  }
  if ( !super.equals(obj)) {
    return false;
  }
  XYSeries that = (XYSeries) obj;
  if (this.maximumItemCount != that.maximumItemCount) {
    return false;
  }
  if (this.autoSort != that.autoSort) {
    return false;
  }
  if (this.allowDuplicateXValues != that.allowDuplicateXValues) {
    return false;
  }
  if ( !ObjectUtilities.equal(this.data, that.data)) {
    return false;
  }
  return true;
}

/**
 * Returns a hash code.
 *
 * @return A hash code.
 */
public int hashCode() {
  int result = super.hashCode();
  // it is too slow to look at every data item, so let's just look at
  // the first, middle and last items...
  int count = getItemCount();
  if (count > 0) {
    XYDataItem item = getDataItem(0);
    result = 29 * result + item.hashCode();
  }
  if (count > 1) {
    XYDataItem item = getDataItem(count - 1);
    result = 29 * result + item.hashCode();
  }
  if (count > 2) {
    XYDataItem item = getDataItem(count / 2);
    result = 29 * result + item.hashCode();
  }
  result = 29 * result + this.maximumItemCount;
  result = 29 * result + (this.autoSort ? 1: 0);
  result = 29 * result + (this.allowDuplicateXValues ? 1: 0);
  return result;
}


Clone AbstractionParameter Count: 2Parameter Bindings

/**
     * Tests this series for equality with an arbitrary object.
     *
     * @param obj  the object to test against for equality
     *             (<code>null</code> permitted).
     *
     * @return A boolean.
     */
/**
     * Tests this series for equality with an arbitrary object.
     *
     * @param obj  the object to test against for equality 
     *             (<code>null</code> permitted).
     *
     * @return A boolean.
     */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof [[#variable18bf8060]])) {
    return false;
  }
  if ( !super.equals(obj)) {
    return false;
  }
   [[#variable18bf8060]] that = ( [[#variable18bf8060]]) obj;
  if (this.maximumItemCount != that.maximumItemCount) {
    return false;
  }
  if (this.autoSort != that.autoSort) {
    return false;
  }
  if (this.allowDuplicateXValues != that.allowDuplicateXValues) {
    return false;
  }
  if ( !ObjectUtilities.equal(this.data, that.data)) {
    return false;
  }
  return true;
}

/**
     * Returns a hash code.
     *
     * @return A hash code.
     */
/**
     * Returns a hash code.
     * 
     * @return A hash code.
     */
public int hashCode() {
  int result = super.hashCode();
  // it is too slow to look at every data item, so let's just look at
  // the first, middle and last items...
  int count = getItemCount();
  if (count > 0) {
     [[#variable18bed040]] item = getDataItem(0);
    result = 29 * result + item.hashCode();
  }
  if (count > 1) {
     [[#variable18bed040]] item = getDataItem(count - 1);
    result = 29 * result + item.hashCode();
  }
  if (count > 2) {
     [[#variable18bed040]] item = getDataItem(count / 2);
    result = 29 * result + item.hashCode();
  }
  result = 29 * result + this.maximumItemCount;
  result = 29 * result + (this.autoSort ? 1: 0);
  result = 29 * result + (this.allowDuplicateXValues ? 1: 0);
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#18bf8060]]
ComparableObjectSeries 
12[[#18bf8060]]
XYSeries 
21[[#18bed040]]
ComparableObjectItem 
22[[#18bed040]]
XYDataItem