CloneSet192


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22320.979method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
122250
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/HashUtilities.java
222287
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/HashUtilities.java
322324
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/HashUtilities.java
Next
Last
Clone Instance
1
Line Count
22
Source Line
250
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/HashUtilities.java

/**
 * Computes a hash code for a {@link BooleanList}.  In the latest version
 * of JCommon, the {@link BooleanList} class should implement the hashCode()
 * method correctly, but we compute it here anyway so that we can work with 
 * older versions of JCommon (back to 1.0.0).
 * 
 * @param pre  the seed value.
 * @param list  the list (<code>null</code> permitted).
 * 
 * @return The hash code.
 * 
 * @since 1.0.9
 */
public static int hashCode(int pre, BooleanList list) {
  if (list == null) {
    return pre;
  }
  int result = 127;
  int size = list.size();
  result = HashUtilities.hashCode(result, size);
  // for efficiency, we just use the first, last and middle items to
  // compute a hashCode...
  if (size > 0) {
    result = HashUtilities.hashCode(result, list.getBoolean(0));
    if (size > 1) {
      result = HashUtilities.hashCode(result, list.getBoolean(size - 1));
      if (size > 2) {
        result = HashUtilities.hashCode(result, list.getBoolean(size / 2));
      }
    }
  }
  return 37 * pre + result;
}


Next
Previous
Clone Instance
2
Line Count
22
Source Line
287
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/HashUtilities.java

/**
 * Computes a hash code for a {@link PaintList}.  In the latest version
 * of JCommon, the {@link PaintList} class should implement the hashCode()
 * method correctly, but we compute it here anyway so that we can work with 
 * older versions of JCommon (back to 1.0.0).
 * 
 * @param pre  the seed value.
 * @param list  the list (<code>null</code> permitted).
 * 
 * @return The hash code.
 * 
 * @since 1.0.9
 */
public static int hashCode(int pre, PaintList list) {
  if (list == null) {
    return pre;
  }
  int result = 127;
  int size = list.size();
  result = HashUtilities.hashCode(result, size);
  // for efficiency, we just use the first, last and middle items to
  // compute a hashCode...
  if (size > 0) {
    result = HashUtilities.hashCode(result, list.getPaint(0));
    if (size > 1) {
      result = HashUtilities.hashCode(result, list.getPaint(size - 1));
      if (size > 2) {
        result = HashUtilities.hashCode(result, list.getPaint(size / 2));
      }
    }
  }
  return 37 * pre + result;
}


First
Previous
Clone Instance
3
Line Count
22
Source Line
324
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/HashUtilities.java

/**
 * Computes a hash code for a {@link StrokeList}.  In the latest version
 * of JCommon, the {@link StrokeList} class should implement the hashCode()
 * method correctly, but we compute it here anyway so that we can work with 
 * older versions of JCommon (back to 1.0.0).
 * 
 * @param pre  the seed value.
 * @param list  the list (<code>null</code> permitted).
 * 
 * @return The hash code.
 * 
 * @since 1.0.9
 */
public static int hashCode(int pre, StrokeList list) {
  if (list == null) {
    return pre;
  }
  int result = 127;
  int size = list.size();
  result = HashUtilities.hashCode(result, size);
  // for efficiency, we just use the first, last and middle items to
  // compute a hashCode...
  if (size > 0) {
    result = HashUtilities.hashCode(result, list.getStroke(0));
    if (size > 1) {
      result = HashUtilities.hashCode(result, list.getStroke(size - 1));
      if (size > 2) {
        result = HashUtilities.hashCode(result, list.getStroke(size / 2));
      }
    }
  }
  return 37 * pre + result;
}


Clone AbstractionParameter Count: 2Parameter Bindings

/**
     * Computes a hash code for a {@link StrokeList}.  In the latest version
     * of JCommon, the {@link StrokeList} class should implement the hashCode()
     * method correctly, but we compute it here anyway so that we can work with 
     * older versions of JCommon (back to 1.0.0).
     * 
     * @param pre  the seed value.
     * @param list  the list (<code>null</code> permitted).
     * 
     * @return The hash code.
     * 
     * @since 1.0.9
     */
/**
     * Computes a hash code for a {@link PaintList}.  In the latest version
     * of JCommon, the {@link PaintList} class should implement the hashCode()
     * method correctly, but we compute it here anyway so that we can work with 
     * older versions of JCommon (back to 1.0.0).
     * 
     * @param pre  the seed value.
     * @param list  the list (<code>null</code> permitted).
     * 
     * @return The hash code.
     * 
     * @since 1.0.9
     */
/**
     * Computes a hash code for a {@link BooleanList}.  In the latest version
     * of JCommon, the {@link BooleanList} class should implement the hashCode()
     * method correctly, but we compute it here anyway so that we can work with 
     * older versions of JCommon (back to 1.0.0).
     * 
     * @param pre  the seed value.
     * @param list  the list (<code>null</code> permitted).
     * 
     * @return The hash code.
     * 
     * @since 1.0.9
     */
public static int hashCode(int pre, [[#variable1aafd440]] list) {
  if (list == null) {
    return pre;
  }
  int result = 127;
  int size = list.size();
  result = HashUtilities.hashCode(result, size);
  // for efficiency, we just use the first, last and middle items to
  // compute a hashCode...
  if (size > 0) {
    result = HashUtilities.hashCode(result, list. [[#variable1aafd5c0]](0));
    if (size > 1) {
      result = HashUtilities.hashCode(result, list. [[#variable1aafd5c0]](size - 1));
      if (size > 2) {
        result = HashUtilities.hashCode(result, list. [[#variable1aafd5c0]](size / 2));
      }
    }
  }
  return 37 * pre + result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1aafd440]]
BooleanList 
12[[#1aafd440]]
PaintList 
13[[#1aafd440]]
StrokeList 
21[[#1aafd5c0]]
getBoolean 
22[[#1aafd5c0]]
getPaint 
23[[#1aafd5c0]]
getStroke