| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 17 | 2 | 5 | 0.961 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 17 | 1043 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java |
| 2 | 17 | 1061 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java |
| ||||
public FieldBinding getUpdatedFieldBinding(FieldBinding targetField, ReferenceBinding newDeclaringClass) {
if (this.synthetics == null)
this.synthetics = new HashMap[4];
if (this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL] == null)
this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL] = new HashMap(5);
Hashtable fieldMap = (Hashtable) this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL].get(targetField);
if (fieldMap == null) {
fieldMap = new Hashtable(5);
this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL].put(targetField, fieldMap);
}
FieldBinding updatedField = (FieldBinding) fieldMap.get(newDeclaringClass);
if (updatedField == null) {
updatedField = new FieldBinding(targetField, newDeclaringClass);
fieldMap.put(newDeclaringClass, updatedField);
}
return updatedField;
}
|
| ||||
public MethodBinding getUpdatedMethodBinding(MethodBinding targetMethod, ReferenceBinding newDeclaringClass) {
if (this.synthetics == null)
this.synthetics = new HashMap[4];
if (this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL] == null)
this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL] = new HashMap(5);
Hashtable methodMap = (Hashtable) this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL].get(targetMethod);
if (methodMap == null) {
methodMap = new Hashtable(5);
this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL].put(targetMethod, methodMap);
}
MethodBinding updatedMethod = (MethodBinding) methodMap.get(newDeclaringClass);
if (updatedMethod == null) {
updatedMethod = new MethodBinding(targetMethod, newDeclaringClass);
methodMap.put(newDeclaringClass, updatedMethod);
}
return updatedMethod;
}
|
| |||
public [[#variable98747780]] [[#variable987476e0]]( [[#variable98747780]] [[#variable98747680]], ReferenceBinding newDeclaringClass) {
if (this.synthetics == null)
this.synthetics = new HashMap[4];
if (this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL] == null)
this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL] = new HashMap(5);
Hashtable [[#variable98747640]]= (Hashtable) this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL].get( [[#variable98747680]]);
if ( [[#variable98747640]]== null) {
[[#variable98747640]]= new Hashtable(5);
this.synthetics[SourceTypeBinding.RECEIVER_TYPE_EMUL].put( [[#variable98747680]], [[#variable98747640]]);
}
[[#variable98747780]] [[#variable987475a0]]= ( [[#variable98747780]]) [[#variable98747640]].get(newDeclaringClass);
if ( [[#variable987475a0]]== null) {
[[#variable987475a0]]= new [[#variable98747780]]( [[#variable98747680]], newDeclaringClass);
[[#variable98747640]].put(newDeclaringClass, [[#variable987475a0]]);
}
return [[#variable987475a0]];
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#98747780]] | FieldBinding |
| 1 | 2 | [[#98747780]] | MethodBinding |
| 2 | 1 | [[#987476e0]] | getUpdatedFieldBinding |
| 2 | 2 | [[#987476e0]] | getUpdatedMethodBinding |
| 3 | 1 | [[#98747680]] | targetField |
| 3 | 2 | [[#98747680]] | targetMethod |
| 4 | 1 | [[#98747640]] | fieldMap |
| 4 | 2 | [[#98747640]] | methodMap |
| 5 | 1 | [[#987475a0]] | updatedField |
| 5 | 2 | [[#987475a0]] | updatedMethod |