Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
32 | 2 | 3 | 0.979 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 32 | 549 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java |
2 | 32 | 679 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java |
| ||||
/** * @return Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. */ public List allMethods() { if (fAllMethods != null) return fAllMethods; /* Recursion: * The methods of its own (own methods() command); * All methods of the interfaces it implements; * If it is a class, all methods of it's superclass. */ // The name+signature combinations of methods are maintained in a set. HashSet resultSet = new HashSet(); // The methods of its own (own methods() command). resultSet.addAll(methods()); // All methods of the interfaces it implements. Iterator interfaces = interfaces().iterator(); InterfaceTypeImpl inter; while (interfaces.hasNext()) { inter = (InterfaceTypeImpl) interfaces.next(); resultSet.addAll(inter.allMethods()); } // If it is a class, all methods of it's superclass. if (this instanceof ClassType) { ClassType superclass = ((ClassType) this ).superclass(); if (superclass != null) resultSet.addAll(superclass.allMethods()); } fAllMethods = new ArrayList(resultSet); return fAllMethods; } |
| ||||
/** * @return Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. */ public List allFields() { if (fAllFields != null) return fAllFields; /* Recursion: * The fields of its own (own fields() command); * All fields of the interfaces it implements; * If it is a class, all fields of it's superclass. */ // The names of fields are maintained in a set, to avoid including fields that have been inherited double. HashSet resultSet = new HashSet(); // The fields of its own (own fields() command). resultSet.addAll(fields()); // All fields of the interfaces it implements. Iterator interfaces = interfaces().iterator(); InterfaceTypeImpl inter; while (interfaces.hasNext()) { inter = (InterfaceTypeImpl) interfaces.next(); resultSet.addAll(inter.allFields()); } // If it is a class, all fields of it's superclass. if (this instanceof ClassType) { ClassType superclass = ((ClassType) this ).superclass(); if (superclass != null) resultSet.addAll(superclass.allFields()); } fAllFields = new ArrayList(resultSet); return fAllFields; } |
| |||
/** * @return Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. */ /** * @return Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. */ public List [[#variablebf220500]]() { if ( [[#variablebf220460]]!= null) return [[#variablebf220460]]; /* Recursion: * The methods of its own (own methods() command); * All methods of the interfaces it implements; * If it is a class, all methods of it's superclass. */ // The name+signature combinations of methods are maintained in a set. /* Recursion: * The fields of its own (own fields() command); * All fields of the interfaces it implements; * If it is a class, all fields of it's superclass. */ // The names of fields are maintained in a set, to avoid including fields that have been inherited double. HashSet resultSet = new HashSet(); // The methods of its own (own methods() command). // The fields of its own (own fields() command). resultSet.addAll( [[#variablebf220400]]()); // All methods of the interfaces it implements. // All fields of the interfaces it implements. Iterator interfaces = interfaces().iterator(); InterfaceTypeImpl inter; while (interfaces.hasNext()) { inter = (InterfaceTypeImpl) interfaces.next(); resultSet.addAll(inter. [[#variablebf220500]]()); } // If it is a class, all methods of it's superclass. // If it is a class, all fields of it's superclass. if (this instanceof ClassType) { ClassType superclass = ((ClassType) this ).superclass(); if (superclass != null) resultSet.addAll(superclass. [[#variablebf220500]]()); } [[#variablebf220460]]= new ArrayList(resultSet); return [[#variablebf220460]]; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#bf220500]] | allMethods |
1 | 2 | [[#bf220500]] | allFields |
2 | 1 | [[#bf220460]] | fAllMethods |
2 | 2 | [[#bf220460]] | fAllFields |
3 | 1 | [[#bf220400]] | methods |
3 | 2 | [[#bf220400]] | fields |