CloneSet 192

# CloneSet192

Previous CloneSet | Next CloneSet | Back to Main Report

Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length]
--- | --- | --- | --- | ---
22 | 3 | 2 | 0.979 | method_declaration

Clone Abstraction | Parameter Bindings

Clone Instance (Click to see clone) | Line Count | Source Line | Source File
--- | --- | --- | ---

1

22

250

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/HashUtilities.java

2

22

287

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/HashUtilities.java

3

22

324

    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 Abstraction | Parameter Count: 2 | Parameter 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
--- | --- | --- | ---

1

1

`[[#1aafd440]]`

    BooleanList

1

2

`[[#1aafd440]]`

    PaintList

1

3

`[[#1aafd440]]`

    StrokeList

2

1

`[[#1aafd5c0]]`

    getBoolean

2

2

`[[#1aafd5c0]]`

    getPaint

2

3

`[[#1aafd5c0]]`

    getStroke