Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
9 | 3 | 2 | 0.973 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 9 | 1963 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java |
2 | 9 | 2427 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java |
3 | 7 | 2461 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java |
| ||||
//=============================== STATEMENTS =========================== /** * Creates a new unparented local variable declaration statement node * owned by this AST, for the given variable declaration fragment. * By default, there are no modifiers and the base type is unspecified * (but legal). * <p> * This method can be used to convert a variable declaration fragment * (<code>VariableDeclarationFragment</code>) into a statement * (<code>Statement</code>) by wrapping it. Additional variable * declaration fragments can be added afterwards. * </p> * * @param fragment the variable declaration fragment * @return a new unparented variable declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * <li>the variable declaration fragment is null</li> * </ul> */ public VariableDeclarationStatement newVariableDeclarationStatement(VariableDeclarationFragment fragment) { if (fragment == null) { throw new IllegalArgumentException(); } VariableDeclarationStatement result = new VariableDeclarationStatement(this ); result.fragments().add(fragment); return result; } |
| ||||
/** * Creates a new unparented local variable declaration expression node * owned by this AST, for the given variable declaration fragment. By * default, there are no modifiers and the base type is unspecified * (but legal). * <p> * This method can be used to convert a variable declaration fragment * (<code>VariableDeclarationFragment</code>) into an expression * (<code>Expression</code>) by wrapping it. Additional variable * declaration fragments can be added afterwards. * </p> * * @param fragment the first variable declaration fragment * @return a new unparented variable declaration expression node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * <li>the given fragment is null</li> * <li>a cycle in would be created</li> * </ul> */ public VariableDeclarationExpression newVariableDeclarationExpression(VariableDeclarationFragment fragment) { if (fragment == null) { throw new IllegalArgumentException(); } VariableDeclarationExpression result = new VariableDeclarationExpression(this ); result.fragments().add(fragment); return result; } |
| ||||
/** * Creates a new unparented field declaration node owned by this AST, * for the given variable declaration fragment. By default, there are no * modifiers, no doc comment, and the base type is unspecified * (but legal). * <p> * This method can be used to wrap a variable declaration fragment * (<code>VariableDeclarationFragment</code>) into a field declaration * suitable for inclusion in the body of a type declaration * (<code>FieldDeclaration</code> implements <code>BodyDeclaration</code>). * Additional variable declaration fragments can be added afterwards. * </p> * * @param fragment the variable declaration fragment * @return a new unparented field declaration node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * <li>the given fragment is null</li> * </ul> */ public FieldDeclaration newFieldDeclaration(VariableDeclarationFragment fragment) { if (fragment == null) { throw new IllegalArgumentException(); } FieldDeclaration result = new FieldDeclaration(this ); result.fragments().add(fragment); return result; } |
| |||
//=============================== STATEMENTS =========================== /** * Creates a new unparented local variable declaration statement node * owned by this AST, for the given variable declaration fragment. * By default, there are no modifiers and the base type is unspecified * (but legal). * <p> * This method can be used to convert a variable declaration fragment * (<code>VariableDeclarationFragment</code>) into a statement * (<code>Statement</code>) by wrapping it. Additional variable * declaration fragments can be added afterwards. * </p> * * @param fragment the variable declaration fragment * @return a new unparented variable declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * <li>the variable declaration fragment is null</li> * </ul> */ /** * Creates a new unparented local variable declaration expression node * owned by this AST, for the given variable declaration fragment. By * default, there are no modifiers and the base type is unspecified * (but legal). * <p> * This method can be used to convert a variable declaration fragment * (<code>VariableDeclarationFragment</code>) into an expression * (<code>Expression</code>) by wrapping it. Additional variable * declaration fragments can be added afterwards. * </p> * * @param fragment the first variable declaration fragment * @return a new unparented variable declaration expression node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * <li>the given fragment is null</li> * <li>a cycle in would be created</li> * </ul> */ /** * Creates a new unparented field declaration node owned by this AST, * for the given variable declaration fragment. By default, there are no * modifiers, no doc comment, and the base type is unspecified * (but legal). * <p> * This method can be used to wrap a variable declaration fragment * (<code>VariableDeclarationFragment</code>) into a field declaration * suitable for inclusion in the body of a type declaration * (<code>FieldDeclaration</code> implements <code>BodyDeclaration</code>). * Additional variable declaration fragments can be added afterwards. * </p> * * @param fragment the variable declaration fragment * @return a new unparented field declaration node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * <li>the given fragment is null</li> * </ul> */ public [[#variable6194c9a0]] [[#variable6194c900]](VariableDeclarationFragment fragment) { if (fragment == null) { throw new IllegalArgumentException(); } [[#variable6194c9a0]] result = new [[#variable6194c9a0]](this ); result.fragments().add(fragment); return result; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6194c9a0]] | VariableDeclarationStatement |
1 | 2 | [[#6194c9a0]] | VariableDeclarationExpression |
1 | 3 | [[#6194c9a0]] | FieldDeclaration |
2 | 1 | [[#6194c900]] | newVariableDeclarationStatement |
2 | 2 | [[#6194c900]] | newVariableDeclarationExpression |
2 | 3 | [[#6194c900]] | newFieldDeclaration |