CloneSet 142

# CloneSet142

Previous CloneSet | Next CloneSet | Back to Main Report

Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length]
--- | --- | --- | --- | ---
53 | 2 | 2 | 0.986 | class_body_declarations[3]

Clone Abstraction | Parameter Bindings

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

1

53

449

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedAreaRenderer.java

2

53

495

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.java

Next
Last

Clone Instance
1

Line Count
53

Source Line
449

Source File

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedAreaRenderer.java

    /**
     * Returns a pair of "stack" values calculated as the mean of the two
     * specified stack value pairs.
     *
     * @param stack1  the first stack pair.
     * @param stack2  the second stack pair.
     *
     * @return A pair of average stack values.
     */
    private double[] averageStackValues(double[] stack1, double[] stack2) {
      double[] result = new double[2];
      result[0] = (stack1[0] + stack2[0]) / 2.0;
      result[1] = (stack1[1] + stack2[1]) / 2.0;
      return result;
    }

    /**
     * Calculates adjusted stack values from the supplied values.  The value is
     * the mean of the supplied values, unless either of the supplied values
     * is zero, in which case the adjusted value is zero also.
     *
     * @param stack1  the first stack pair.
     * @param stack2  the second stack pair.
     *
     * @return A pair of average stack values.
     */
    private double[] adjustedStackValues(double[] stack1, double[] stack2) {
      double[] result = new double[2];
      if (stack1[0] == 0.0 || stack2[0] == 0.0) {
        result[0] = 0.0;
      }
      else {
        result[0] = (stack1[0] + stack2[0]) / 2.0;
      }
      if (stack1[1] == 0.0 || stack2[1] == 0.0) {
        result[1] = 0.0;
      }
      else {
        result[1] = (stack1[1] + stack2[1]) / 2.0;
      }
      return result;
    }

    /**
     * Checks this instance for equality with an arbitrary object.
     *
     * @param obj  the object (<code>null</code> not permitted).
     *
     * @return A boolean.
     */
    public boolean equals(Object obj) {
      if (obj == this ) {
        return true;
      }
      if ( !(obj instanceof StackedAreaRenderer)) {
        return false;
      }
      StackedAreaRenderer that = (StackedAreaRenderer) obj;
      if (this.renderAsPercentages != that.renderAsPercentages) {
        return false;
      }
      return super.equals(obj);
    }

First
Previous

Clone Instance
2

Line Count
53

Source Line
495

Source File

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.java

    /**
     * Returns a pair of "stack" values calculated as the mean of the two
     * specified stack value pairs.
     *
     * @param stack1  the first stack pair.
     * @param stack2  the second stack pair.
     *
     * @return A pair of average stack values.
     */
    private double[] averageStackValues(double[] stack1, double[] stack2) {
      double[] result = new double[2];
      result[0] = (stack1[0] + stack2[0]) / 2.0;
      result[1] = (stack1[1] + stack2[1]) / 2.0;
      return result;
    }

    /**
     * Calculates adjusted stack values from the supplied values.  The value is
     * the mean of the supplied values, unless either of the supplied values
     * is zero, in which case the adjusted value is zero also.
     *
     * @param stack1  the first stack pair.
     * @param stack2  the second stack pair.
     *
     * @return A pair of average stack values.
     */
    private double[] adjustedStackValues(double[] stack1, double[] stack2) {
      double[] result = new double[2];
      if (stack1[0] == 0.0 || stack2[0] == 0.0) {
        result[0] = 0.0;
      }
      else {
        result[0] = (stack1[0] + stack2[0]) / 2.0;
      }
      if (stack1[1] == 0.0 || stack2[1] == 0.0) {
        result[1] = 0.0;
      }
      else {
        result[1] = (stack1[1] + stack2[1]) / 2.0;
      }
      return result;
    }

    /**
     * Tests this renderer for equality with an arbitrary object.
     *
     * @param obj  the object (<code>null</code> permitted).
     *
     * @return A boolean.
     */
    public boolean equals(Object obj) {
      if (obj == this ) {
        return true;
      }
      if ( !(obj instanceof StackedXYAreaRenderer2)) {
        return false;
      }
      StackedXYAreaRenderer2 that = (StackedXYAreaRenderer2) obj;
      if (this.roundXCoordinates != that.roundXCoordinates) {
        return false;
      }
      return super.equals(obj);
    }

Clone Abstraction | Parameter Count: 2 | Parameter Bindings

    /**
         * Returns a pair of "stack" values calculated as the mean of the two
         * specified stack value pairs.
         *
         * @param stack1  the first stack pair.
         * @param stack2  the second stack pair.
         *
         * @return A pair of average stack values.
         */
    private double[] averageStackValues(double[] stack1, double[] stack2) {
      double[] result = new double[2];
      result[0] = (stack1[0] + stack2[0]) / 2.0;
      result[1] = (stack1[1] + stack2[1]) / 2.0;
      return result;
    }

    /**
         * Calculates adjusted stack values from the supplied values.  The value is
         * the mean of the supplied values, unless either of the supplied values
         * is zero, in which case the adjusted value is zero also.
         *
         * @param stack1  the first stack pair.
         * @param stack2  the second stack pair.
         *
         * @return A pair of average stack values.
         */
    private double[] adjustedStackValues(double[] stack1, double[] stack2) {
      double[] result = new double[2];
      if (stack1[0] == 0.0 || stack2[0] == 0.0) {
        result[0] = 0.0;
      }
      else {
        result[0] = (stack1[0] + stack2[0]) / 2.0;
      }
      if (stack1[1] == 0.0 || stack2[1] == 0.0) {
        result[1] = 0.0;
      }
      else {
        result[1] = (stack1[1] + stack2[1]) / 2.0;
      }
      return result;
    }

    /**
         * Tests this renderer for equality with an arbitrary object.
         *
         * @param obj  the object (<code>null</code> permitted).
         *
         * @return A boolean.
         */
    /**
         * Checks this instance for equality with an arbitrary object.
         *
         * @param obj  the object (<code>null</code> not permitted).
         *
         * @return A boolean.
         */
    public boolean equals(Object obj) {
      if (obj == this ) {
        return true;
      }
      if ( !(obj instanceof [[#variable1aa684e0]])) {
        return false;
      }
       [[#variable1aa684e0]] that = ( [[#variable1aa684e0]]) obj;
      if (this. [[#variable1aa68bc0]]!= that. [[#variable1aa68bc0]]) {
        return false;
      }
      return super.equals(obj);
    }

CloneAbstraction

Parameter Bindings
Parameter Index | Clone Instance | Parameter Name | Value
--- | --- | --- | ---

1

1

`[[#1aa684e0]]`

    StackedAreaRenderer

1

2

`[[#1aa684e0]]`

    StackedXYAreaRenderer2

2

1

`[[#1aa68bc0]]`

    renderAsPercentages

2

2

`[[#1aa68bc0]]`

    roundXCoordinates