CloneSet129


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
33330.951method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
133295
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/category/CategoryToPieDataset.java
235408
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/DefaultKeyedValues.java
335311
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/general/DefaultPieDataset.java
Next
Last
Clone Instance
1
Line Count
33
Source Line
295
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/category/CategoryToPieDataset.java

/**
 * Tests this dataset for equality with an arbitrary object, returning
 * <code>true</code> if <code>obj</code> is a dataset containing the same
 * keys and values in the same order as this dataset.
 * 
 * @param obj  the object to test (<code>null</code> permitted).
 * 
 * @return A boolean.
 */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof PieDataset)) {
    return false;
  }
  PieDataset that = (PieDataset) obj;
  int count = getItemCount();
  if (that.getItemCount() != count) {
    return false;
  }
  for (int i = 0; i < count; i++) {
    Comparable k1 = getKey(i);
    Comparable k2 = that.getKey(i);
    if ( !k1.equals(k2)) {
      return false;
    }
    Number v1 = getValue(i);
    Number v2 = that.getValue(i);
    if (v1 == null) {
      if (v2 != null) {
        return false;
      }
    }
    else {
      if ( !v1.equals(v2)) {
        return false;
      }
    }
  }
  return true;
}


Next
Previous
Clone Instance
2
Line Count
35
Source Line
408
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/DefaultKeyedValues.java

/**
 * Tests if this object is equal to another.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof KeyedValues)) {
    return false;
  }
  KeyedValues that = (KeyedValues) obj;
  int count = getItemCount();
  if (count != that.getItemCount()) {
    return false;
  }
  for (int i = 0; i < count; i++) {
    Comparable k1 = getKey(i);
    Comparable k2 = that.getKey(i);
    if ( !k1.equals(k2)) {
      return false;
    }
    Number v1 = getValue(i);
    Number v2 = that.getValue(i);
    if (v1 == null) {
      if (v2 != null) {
        return false;
      }
    }
    else {
      if ( !v1.equals(v2)) {
        return false;
      }
    }
  }
  return true;
}


First
Previous
Clone Instance
3
Line Count
35
Source Line
311
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/general/DefaultPieDataset.java

/**
 * Tests if this object is equal to another.
 *
 * @param obj  the other object.
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof PieDataset)) {
    return false;
  }
  PieDataset that = (PieDataset) obj;
  int count = getItemCount();
  if (that.getItemCount() != count) {
    return false;
  }
  for (int i = 0; i < count; i++) {
    Comparable k1 = getKey(i);
    Comparable k2 = that.getKey(i);
    if ( !k1.equals(k2)) {
      return false;
    }
    Number v1 = getValue(i);
    Number v2 = that.getValue(i);
    if (v1 == null) {
      if (v2 != null) {
        return false;
      }
    }
    else {
      if ( !v1.equals(v2)) {
        return false;
      }
    }
  }
  return true;
}


Clone AbstractionParameter Count: 3Parameter Bindings

/**
     * Tests this dataset for equality with an arbitrary object, returning
     * <code>true</code> if <code>obj</code> is a dataset containing the same
     * keys and values in the same order as this dataset.
     * 
     * @param obj  the object to test (<code>null</code> permitted).
     * 
     * @return A boolean.
     */
/**
     * Tests if this object is equal to another.
     *
     * @param obj  the object (<code>null</code> permitted).
     *
     * @return A boolean.
     */
/**
     * Tests if this object is equal to another.
     *
     * @param obj  the other object.
     *
     * @return A boolean.
     */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof [[#variable1aa661c0]])) {
    return false;
  }
   [[#variable1aa661c0]] that = ( [[#variable1aa661c0]]) obj;
  int count = getItemCount();
  if ( [[#variable1aa53f20]]!= [[#variable1aa48e80]]) {
    return false;
  }
  for (int i = 0; i < count; i++) {
    Comparable k1 = getKey(i);
    Comparable k2 = that.getKey(i);
    if ( !k1.equals(k2)) {
      return false;
    }
    Number v1 = getValue(i);
    Number v2 = that.getValue(i);
    if (v1 == null) {
      if (v2 != null) {
        return false;
      }
    }
    else {
      if ( !v1.equals(v2)) {
        return false;
      }
    }
  }
  return true;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1aa661c0]]
PieDataset 
12[[#1aa661c0]]
KeyedValues 
13[[#1aa661c0]]
PieDataset 
21[[#1aa53f20]]
that.getItemCount() 
22[[#1aa53f20]]
count 
23[[#1aa53f20]]
that.getItemCount() 
31[[#1aa48e80]]
count 
32[[#1aa48e80]]
that.getItemCount() 
33[[#1aa48e80]]
count