CloneSet290


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18210.962method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
118200
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultMultiValueCategoryDataset.java
218228
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultMultiValueCategoryDataset.java
Next
Last
Clone Instance
1
Line Count
18
Source Line
200
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultMultiValueCategoryDataset.java

/**
 * Returns the average value for the specified item.
 *
 * @param row  the row key.
 * @param column  the column key.
 * 
 * @return The average value.
 */
public Number getValue(Comparable row, Comparable column) {
  List l = (List) this.data.getObject(row, column);
  double average = 0.0;
  int count = 0;
  if (l != null && l.size() > 0) {
    for (int i = 0; i < l.size(); i++) {
      Number n = (Number) l.get(i);
      average += n.doubleValue();
      count += 1;
    }
    if (count > 0) {
      average = average / count;
    }
  }
  if (count == 0) {
    return null;
  }
  return new Double(average);
}


First
Previous
Clone Instance
2
Line Count
18
Source Line
228
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultMultiValueCategoryDataset.java

/**
 * Returns the average value for the specified item.
 *
 * @param row  the row index.
 * @param column  the column index.
 * 
 * @return The average value.
 */
public Number getValue(int row, int column) {
  List l = (List) this.data.getObject(row, column);
  double average = 0.0;
  int count = 0;
  if (l != null && l.size() > 0) {
    for (int i = 0; i < l.size(); i++) {
      Number n = (Number) l.get(i);
      average += n.doubleValue();
      count += 1;
    }
    if (count > 0) {
      average = average / count;
    }
  }
  if (count == 0) {
    return null;
  }
  return new Double(average);
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
     * Returns the average value for the specified item.
     *
     * @param row  the row index.
     * @param column  the column index.
     * 
     * @return The average value.
     */
/**
     * Returns the average value for the specified item.
     *
     * @param row  the row key.
     * @param column  the column key.
     * 
     * @return The average value.
     */
public Number getValue( [[#variable1a8a3360]] row, [[#variable1a8a3360]] column) {
  List l = (List) this.data.getObject(row, column);
  double average = 0.0;
  int count = 0;
  if (l != null && l.size() > 0) {
    for (int i = 0; i < l.size(); i++) {
      Number n = (Number) l.get(i);
      average += n.doubleValue();
      count += 1;
    }
    if (count > 0) {
      average = average / count;
    }
  }
  if (count == 0) {
    return null;
  }
  return new Double(average);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1a8a3360]]
Comparable 
12[[#1a8a3360]]
int