CloneSet62


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28220.982method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
127974
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/common/util/BasicEMap.java
2281003
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/common/util/BasicEMap.java
Next
Last
Clone Instance
1
Line Count
27
Source Line
974
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/common/util/BasicEMap.java

@Override public boolean contains(Object object) {
  if (BasicEMap.this.size > 0 && object instanceof Map.Entry) {
    BasicEMap.this.ensureEntryDataExists();
    @SuppressWarnings("unchecked")Map.Entry<K, V> otherEntry = (Map.Entry<K, V>) object;
    Object key = otherEntry.getKey();
    int hash = key == null ? 0: key.hashCode();
    int index = BasicEMap.this.indexOf(hash);
    BasicEList<Entry<K, V>> eList = entryData[index];
    if (eList != null) {
      @SuppressWarnings("unchecked")Entry<K, V> [] entries = (Entry<K, V> []) eList.data;
      int size = eList.size;
      for (int j = 0; j < size; ++j) {
        Entry<K, V> entry = entries[j];
        if (entry.getHash() == hash && entry.equals(otherEntry)) {
          return true;
        }
      }
    }
  }
  return false;
}


First
Previous
Clone Instance
2
Line Count
28
Source Line
1003
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/common/util/BasicEMap.java

@Override public boolean remove(Object object) {
  if (BasicEMap.this.size > 0 && object instanceof Map.Entry) {
    BasicEMap.this.ensureEntryDataExists();
    @SuppressWarnings("unchecked")Map.Entry<K, V> otherEntry = (Map.Entry<K, V>) object;
    Object key = otherEntry.getKey();
    int hash = key == null ? 0: key.hashCode();
    int index = BasicEMap.this.indexOf(hash);
    BasicEList<Entry<K, V>> eList = entryData[index];
    if (eList != null) {
      @SuppressWarnings("unchecked")Entry<K, V> [] entries = (Entry<K, V> []) eList.data;
      int size = eList.size;
      for (int j = 0; j < size; ++j) {
        Entry<K, V> entry = entries[j];
        if (entry.getHash() == hash && entry.equals(otherEntry)) {
          // BasicEMap.this.removeEntry(index, j);
          remove(otherEntry);
          return true;
        }
      }
    }
  }
  return false;
}


Clone AbstractionParameter Count: 2Parameter Bindings

@Override public boolean  [[#variable170d3ee0]](Object object) {
  if (BasicEMap.this.size > 0 && object instanceof Map.Entry) {
    BasicEMap.this.ensureEntryDataExists();
    @SuppressWarnings("unchecked")Map.Entry<K, V> otherEntry = (Map.Entry<K, V>) object;
    Object key = otherEntry.getKey();
    int hash = key == null ? 0: key.hashCode();
    int index = BasicEMap.this.indexOf(hash);
    BasicEList<Entry<K, V>> eList = entryData[index];
    if (eList != null) {
      @SuppressWarnings("unchecked")Entry<K, V> [] entries = (Entry<K, V> []) eList.data;
      int size = eList.size;
      for (int j = 0; j < size; ++j) {
        Entry<K, V> entry = entries[j];
        if (entry.getHash() == hash && entry.equals(otherEntry)) {
           [[#variable170d3e80]]
        }
      }
    }
  }
  return false;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#170d3ee0]]
contains 
12[[#170d3ee0]]
remove 
21[[#170d3e80]]
return true; 
22[[#170d3e80]]
// BasicEMap.this.removeEntry(index, j);
remove(otherEntry);
return true;