CloneSet142


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
53220.986class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
153449
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedAreaRenderer.java
253495
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 AbstractionParameter Count: 2Parameter 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
11[[#1aa684e0]]
StackedAreaRenderer 
12[[#1aa684e0]]
StackedXYAreaRenderer2 
21[[#1aa68bc0]]
renderAsPercentages 
22[[#1aa68bc0]]
roundXCoordinates