CloneSet 179

# CloneSet179

Previous CloneSet | Next CloneSet | Back to Main Report

Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length]
--- | --- | --- | --- | ---
37 | 2 | 3 | 0.968 | statement_sequence[5]

Clone Abstraction | Parameter Bindings

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

1

37

364

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/DefaultKeyedValues2D.java

2

36

321

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/KeyedObjects2D.java

Next
Last

Clone Instance
1

Line Count
37

Source Line
364

Source File

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/DefaultKeyedValues2D.java

    for (int item = 0, itemCount = row.getItemCount(); item < itemCount; item++) {
      if (row.getValue(item) != null) {
        allNull = false;
        break;
      }
    }
    if (allNull) {
      this.rowKeys.remove(rowIndex);
      this.rows.remove(rowIndex);
    }
    // 2. check whether the column is now empty.
    allNull = true;
    //int columnIndex = getColumnIndex(columnKey);
    for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) {
      row = (DefaultKeyedValues) this.rows.get(item);
      int columnIndex = row.getIndex(columnKey);
      if (columnIndex >= 0 && row.getValue(columnIndex) != null) {
        allNull = false;
        break;
      }
    }
    if (allNull) {
      for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) {
        row = (DefaultKeyedValues) this.rows.get(item);
        int columnIndex = row.getIndex(columnKey);
        if (columnIndex >= 0) {
          row.removeValue(columnIndex);
        }
      }
      this.columnKeys.remove(columnKey);
    }

First
Previous

Clone Instance
2

Line Count
36

Source Line
321

Source File

    E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/KeyedObjects2D.java

    for (int item = 0, itemCount = row.getItemCount(); item < itemCount; item++) {
      if (row.getObject(item) != null) {
        allNull = false;
        break;
      }
    }
    if (allNull) {
      this.rowKeys.remove(rowIndex);
      this.rows.remove(rowIndex);
    }
    // 2. check whether the column is now empty.
    allNull = true;
    for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) {
      row = (KeyedObjects) this.rows.get(item);
      int colIndex = row.getIndex(columnKey);
      if (colIndex >= 0 && row.getObject(colIndex) != null) {
        allNull = false;
        break;
      }
    }
    if (allNull) {
      for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) {
        row = (KeyedObjects) this.rows.get(item);
        int colIndex = row.getIndex(columnKey);
        if (colIndex >= 0) {
          row.removeValue(colIndex);
        }
      }
      this.columnKeys.remove(columnKey);
    }

Clone Abstraction | Parameter Count: 3 | Parameter Bindings

    for (int item = 0, itemCount = row.getItemCount(); item < itemCount; item++) {
      if (row. [[#variable1aad9960]](item) != null) {
        allNull = false;
        break;
      }
    }
    if (allNull) {
      this.rowKeys.remove(rowIndex);
      this.rows.remove(rowIndex);
    }
    // 2. check whether the column is now empty.
    allNull = true;
    //int columnIndex = getColumnIndex(columnKey);
    for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) {
      row = ( [[#variable1aad9c40]]) this.rows.get(item);
      int  [[#variable1aade140]]= row.getIndex(columnKey);
      if ( [[#variable1aade140]]>= 0 && row. [[#variable1aad9960]]( [[#variable1aade140]]) != null) {
        allNull = false;
        break;
      }
    }
    if (allNull) {
      for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) {
        row = ( [[#variable1aad9c40]]) this.rows.get(item);
        int  [[#variable1aade140]]= row.getIndex(columnKey);
        if ( [[#variable1aade140]]>= 0) {
          row.removeValue( [[#variable1aade140]]);
        }
      }
      this.columnKeys.remove(columnKey);
    }

CloneAbstraction

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

1

1

`[[#1aad9960]]`

    getValue

1

2

`[[#1aad9960]]`

    getObject

2

1

`[[#1aad9c40]]`

    DefaultKeyedValues

2

2

`[[#1aad9c40]]`

    KeyedObjects

3

1

`[[#1aade140]]`

    columnIndex

3

2

`[[#1aade140]]`

    colIndex