| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 9 | 2 | 5 | 0.960 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 9 | 77 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/SimpleSet.java |
| 2 | 9 | 50 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/StringSet.java |
| ||||
public boolean includes(Object object) {
int length = values.length;
int index = (object.hashCode()& 0x7fffffff) % length;
Object current;
while ((current = values[index]) != null) {
if (current.equals(object)) return true;
if ( ++index == length)index = 0;
}
return false;
}
|
| ||||
public boolean includes(String value) {
int length = values.length;
int index = (value.hashCode()& 0x7fffffff) % length;
String current;
while ((current = this.values[index]) != null) {
if (value.equals(current)) return true;
if ( ++index == length)index = 0;
}
return false;
}
|
| |||
public boolean includes( [[#variableba04dc20]] [[#variableba04db80]]) {
int length = values.length;
int index = ( [[#variableba04db80]].hashCode()&0x7fffffff) % length;
[[#variableba04dc20]] current;
while ((current = [[#variableba04db20]][index]) != null) {
if ( [[#variableba04dac0]].equals( [[#variableba04da40]]))
return true;
if ( ++index == length)
index = 0;
}
return false;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#ba04dc20]] | Object |
| 1 | 2 | [[#ba04dc20]] | String |
| 2 | 1 | [[#ba04db80]] | object |
| 2 | 2 | [[#ba04db80]] | value |
| 3 | 1 | [[#ba04db20]] | values |
| 3 | 2 | [[#ba04db20]] | this.values |
| 4 | 1 | [[#ba04dac0]] | current |
| 4 | 2 | [[#ba04dac0]] | value |
| 5 | 1 | [[#ba04da40]] | object |
| 5 | 2 | [[#ba04da40]] | current |