Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
17 | 3 | 4 | 0.965 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 17 | 713 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java |
2 | 17 | 744 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java |
3 | 17 | 774 | 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; } |
| ||||
/** * 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; } |
| ||||
/** * 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; } |
| |||
/** * 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#92c097a0]] | FieldDeclaration |
1 | 2 | [[#92c097a0]] | MethodDeclaration |
1 | 3 | [[#92c097a0]] | TypeDeclaration |
2 | 1 | [[#917edc40]] | getFields |
2 | 2 | [[#917edc40]] | getMethods |
2 | 3 | [[#917edc40]] | getTypes |
3 | 1 | [[#92c08ca0]] | fieldCount |
3 | 2 | [[#92c08ca0]] | methodCount |
3 | 3 | [[#92c08ca0]] | typeCount |
4 | 1 | [[#917edc60]] | fields |
4 | 2 | [[#917edc60]] | methods |
4 | 3 | [[#917edc60]] | memberTypes |