CloneSet671


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
17340.965class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
117713
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
217744
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
317774
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
Clone Instance
1
Line Count
17
Source Line
713
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java

        /**
         * Returns the ordered list of field declarations of this type 
         * declaration. For a class declaration, these are the
         * field declarations; for an interface declaration, these are
         * the constant declarations.
         * <p>
         * This convenience method returns this node's body declarations
         * with non-fields filtered out. Unlike <code>bodyDeclarations</code>,
         * this method does not return a live result.
         * </p>
         * 
         * @return the (possibly empty) list of field declarations
         */
        public FieldDeclaration[] getFields() {
                List bd = bodyDeclarations();
                int fieldCount = 0;
                for (Iterator it = bd.listIterator(); it.hasNext();)  {
                        if (it.next() instanceof FieldDeclaration) {
                                fieldCount++;
                        }
                }
                FieldDeclaration[] fields = new FieldDeclaration[fieldCount];
                int next = 0;
                for (Iterator it = bd.listIterator(); it.hasNext();)  {
                        Object decl = it.next();
                        if (decl instanceof FieldDeclaration) {
                                fields[next++ ] = (FieldDeclaration) decl;
                        }
                }
                return fields;
        }


Clone Instance
2
Line Count
17
Source Line
744
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java

        /**
         * Returns the ordered list of method declarations of this type 
         * declaration.
         * <p>
         * This convenience method returns this node's body declarations
         * with non-methods filtered out. Unlike <code>bodyDeclarations</code>,
         * this method does not return a live result.
         * </p>
         * 
         * @return the (possibly empty) list of method (and constructor) 
         *    declarations
         */
        public MethodDeclaration[] getMethods() {
                List bd = bodyDeclarations();
                int methodCount = 0;
                for (Iterator it = bd.listIterator(); it.hasNext();)  {
                        if (it.next() instanceof MethodDeclaration) {
                                methodCount++;
                        }
                }
                MethodDeclaration[] methods = new MethodDeclaration[methodCount];
                int next = 0;
                for (Iterator it = bd.listIterator(); it.hasNext();)  {
                        Object decl = it.next();
                        if (decl instanceof MethodDeclaration) {
                                methods[next++ ] = (MethodDeclaration) decl;
                        }
                }
                return methods;
        }


Clone Instance
3
Line Count
17
Source Line
774
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java

        /**
         * Returns the ordered list of member type declarations of this type 
         * declaration.
         * <p>
         * This convenience method returns this node's body declarations
         * with non-types filtered out. Unlike <code>bodyDeclarations</code>,
         * this method does not return a live result.
         * </p>
         * 
         * @return the (possibly empty) list of member type declarations
         */
        public TypeDeclaration[] getTypes() {
                List bd = bodyDeclarations();
                int typeCount = 0;
                for (Iterator it = bd.listIterator(); it.hasNext();)  {
                        if (it.next() instanceof TypeDeclaration) {
                                typeCount++;
                        }
                }
                TypeDeclaration[] memberTypes = new TypeDeclaration[typeCount];
                int next = 0;
                for (Iterator it = bd.listIterator(); it.hasNext();)  {
                        Object decl = it.next();
                        if (decl instanceof TypeDeclaration) {
                                memberTypes[next++ ] = (TypeDeclaration) decl;
                        }
                }
                return memberTypes;
        }


Clone AbstractionParameter Count: 4Parameter Bindings

/**
         * Returns the ordered list of field declarations of this type 
         * declaration. For a class declaration, these are the
         * field declarations; for an interface declaration, these are
         * the constant declarations.
         * <p>
         * This convenience method returns this node's body declarations
         * with non-fields filtered out. Unlike <code>bodyDeclarations</code>,
         * this method does not return a live result.
         * </p>
         * 
         * @return the (possibly empty) list of field declarations
         */
/**
         * Returns the ordered list of method declarations of this type 
         * declaration.
         * <p>
         * This convenience method returns this node's body declarations
         * with non-methods filtered out. Unlike <code>bodyDeclarations</code>,
         * this method does not return a live result.
         * </p>
         * 
         * @return the (possibly empty) list of method (and constructor) 
         *    declarations
         */
/**
         * Returns the ordered list of member type declarations of this type 
         * declaration.
         * <p>
         * This convenience method returns this node's body declarations
         * with non-types filtered out. Unlike <code>bodyDeclarations</code>,
         * this method does not return a live result.
         * </p>
         * 
         * @return the (possibly empty) list of member type declarations
         */
public [[#variable92c097a0]][]  [[#variable917edc40]]() {
  List bd = bodyDeclarations();
  int  [[#variable92c08ca0]]= 0;
  for (Iterator it = bd.listIterator(); it.hasNext();) {
    if (it.next() instanceof [[#variable92c097a0]]) {
       [[#variable92c08ca0]]++;
    }
  }
   [[#variable92c097a0]][]  [[#variable917edc60]]= new [[#variable92c097a0]][ [[#variable92c08ca0]]];
  int next = 0;
  for (Iterator it = bd.listIterator(); it.hasNext();) {
    Object decl = it.next();
    if (decl instanceof [[#variable92c097a0]]) {
       [[#variable917edc60]][next++ ] = ( [[#variable92c097a0]]) decl;
    }
  }
  return [[#variable917edc60]];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#92c097a0]]
FieldDeclaration 
12[[#92c097a0]]
MethodDeclaration 
13[[#92c097a0]]
TypeDeclaration 
21[[#917edc40]]
getFields 
22[[#917edc40]]
getMethods 
23[[#917edc40]]
getTypes 
31[[#92c08ca0]]
fieldCount 
32[[#92c08ca0]]
methodCount 
33[[#92c08ca0]]
typeCount 
41[[#917edc60]]
fields 
42[[#917edc60]]
methods 
43[[#917edc60]]
memberTypes