Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 3 | 0.983 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 92 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java |
2 | 14 | 110 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java |
| ||||
/* * Record a local declaration - regular method should have been created a block body */ public RecoveredElement add(LocalDeclaration localDeclaration, int bracketBalanceValue) { /* do not consider a type starting passed the type end (if set) it must be belonging to an enclosing type */ if (fieldDeclaration.declarationSourceEnd != 0 && localDeclaration.declarationSourceStart > fieldDeclaration.declarationSourceEnd) { if (parent == null) return this ; // ignore return this.parent.add(localDeclaration, bracketBalanceValue); } /* method body should have been created */ Block block = new Block(0); block.sourceStart = ((Initializer) fieldDeclaration).sourceStart; RecoveredElement element = this.add(block, 1); return element.add(localDeclaration, bracketBalanceValue); } |
| ||||
/* * Record a statement - regular method should have been created a block body */ public RecoveredElement add(Statement statement, int bracketBalanceValue) { /* do not consider a statement starting passed the initializer end (if set) it must be belonging to an enclosing type */ if (fieldDeclaration.declarationSourceEnd != 0 && statement.sourceStart > fieldDeclaration.declarationSourceEnd) { if (parent == null) return this ; // ignore return this.parent.add(statement, bracketBalanceValue); } /* initializer body should have been created */ Block block = new Block(0); block.sourceStart = ((Initializer) fieldDeclaration).sourceStart; RecoveredElement element = this.add(block, 1); return element.add(statement, bracketBalanceValue); } |
| |||
/* * Record a local declaration - regular method should have been created a block body */ /* * Record a statement - regular method should have been created a block body */ public RecoveredElement add( [[#variable5b6e0e40]] [[#variable5b6e0dc0]], int bracketBalanceValue) { /* do not consider a type starting passed the type end (if set) it must be belonging to an enclosing type */ /* do not consider a statement starting passed the initializer end (if set) it must be belonging to an enclosing type */ if (fieldDeclaration.declarationSourceEnd != 0 && [[#variable5b6e0dc0]]. [[#variable5b6e0d40]] > fieldDeclaration.declarationSourceEnd) { if (parent == null) return this ; // ignore return this.parent.add( [[#variable5b6e0dc0]], bracketBalanceValue); } /* method body should have been created */ /* initializer body should have been created */ Block block = new Block(0); block.sourceStart = ((Initializer) fieldDeclaration).sourceStart; RecoveredElement element = this.add(block, 1); return element.add( [[#variable5b6e0dc0]], bracketBalanceValue); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#5b6e0e40]] | LocalDeclaration |
1 | 2 | [[#5b6e0e40]] | Statement |
2 | 1 | [[#5b6e0dc0]] | localDeclaration |
2 | 2 | [[#5b6e0dc0]] | statement |
3 | 1 | [[#5b6e0d40]] | declarationSourceStart |
3 | 2 | [[#5b6e0d40]] | sourceStart |