CloneSet1214


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32230.979class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
132549
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java
232679
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java
Clone Instance
1
Line Count
32
Source Line
549
Source File
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;
        }


Clone Instance
2
Line Count
32
Source Line
679
Source File
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java

        /** 
         * @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;
        }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * @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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bf220500]]
allMethods 
12[[#bf220500]]
allFields 
21[[#bf220460]]
fAllMethods 
22[[#bf220460]]
fAllFields 
31[[#bf220400]]
methods 
32[[#bf220400]]
fields