| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 48 | 3 | 3 | 0.975 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 48 | 1106 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java |
| 2 | 47 | 1161 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java |
| 3 | 47 | 1216 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java |
| ||||
/**
* Iteration for a package member type
*
*/
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) {
if (this.ignoreFurtherInvestigation)
return;
try {
if (visitor.visit(this, unitScope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, this.scope);
}
if (this.superclass != null)
this.superclass.traverse(visitor, this.scope);
if (this.superInterfaces != null) {
int length = this.superInterfaces.length;
for (int i = 0; i < length; i++)
this.superInterfaces[i].traverse(visitor, this.scope);
}
if (this.typeParameters != null) {
int length = this.typeParameters.length;
for (int i = 0; i < length; i++) {
this.typeParameters[i].traverse(visitor, this.scope);
}
}
if (this.memberTypes != null) {
int length = this.memberTypes.length;
for (int i = 0; i < length; i++)
this.memberTypes[i].traverse(visitor, this.scope);
}
if (this.fields != null) {
int length = this.fields.length;
for (int i = 0; i < length; i++) {
FieldDeclaration field;
if ((field = this.fields[i]).isStatic()) {
field.traverse(visitor, this.staticInitializerScope);
}
else {
field.traverse(visitor, this.initializerScope);
}
}
}
if (this.methods != null) {
int length = this.methods.length;
for (int i = 0; i < length; i++)
this.methods[i].traverse(visitor, this.scope);
}
}
visitor.endVisit(this, unitScope);
} catch (AbortType e) {
// silent abort
}
}
|
| ||||
/**
* Iteration for a local innertype
*/
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (this.ignoreFurtherInvestigation)
return;
try {
if (visitor.visit(this, blockScope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, this.scope);
}
if (this.superclass != null)
this.superclass.traverse(visitor, this.scope);
if (this.superInterfaces != null) {
int length = this.superInterfaces.length;
for (int i = 0; i < length; i++)
this.superInterfaces[i].traverse(visitor, this.scope);
}
if (this.typeParameters != null) {
int length = this.typeParameters.length;
for (int i = 0; i < length; i++) {
this.typeParameters[i].traverse(visitor, this.scope);
}
}
if (this.memberTypes != null) {
int length = this.memberTypes.length;
for (int i = 0; i < length; i++)
this.memberTypes[i].traverse(visitor, this.scope);
}
if (this.fields != null) {
int length = this.fields.length;
for (int i = 0; i < length; i++) {
FieldDeclaration field;
if ((field = this.fields[i]).isStatic()) {
// local type cannot have static fields
}
else {
field.traverse(visitor, this.initializerScope);
}
}
}
if (this.methods != null) {
int length = this.methods.length;
for (int i = 0; i < length; i++)
this.methods[i].traverse(visitor, this.scope);
}
}
visitor.endVisit(this, blockScope);
} catch (AbortType e) {
// silent abort
}
}
|
| ||||
/**
* Iteration for a member innertype
*
*/
public void traverse(ASTVisitor visitor, ClassScope classScope) {
if (this.ignoreFurtherInvestigation)
return;
try {
if (visitor.visit(this, classScope)) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, this.scope);
}
if (this.superclass != null)
this.superclass.traverse(visitor, this.scope);
if (this.superInterfaces != null) {
int length = this.superInterfaces.length;
for (int i = 0; i < length; i++)
this.superInterfaces[i].traverse(visitor, this.scope);
}
if (this.typeParameters != null) {
int length = this.typeParameters.length;
for (int i = 0; i < length; i++) {
this.typeParameters[i].traverse(visitor, this.scope);
}
}
if (this.memberTypes != null) {
int length = this.memberTypes.length;
for (int i = 0; i < length; i++)
this.memberTypes[i].traverse(visitor, this.scope);
}
if (this.fields != null) {
int length = this.fields.length;
for (int i = 0; i < length; i++) {
FieldDeclaration field;
if ((field = this.fields[i]).isStatic()) {
field.traverse(visitor, this.staticInitializerScope);
}
else {
field.traverse(visitor, this.initializerScope);
}
}
}
if (this.methods != null) {
int length = this.methods.length;
for (int i = 0; i < length; i++)
this.methods[i].traverse(visitor, this.scope);
}
}
visitor.endVisit(this, classScope);
} catch (AbortType e) {
// silent abort
}
}
|
| |||
/**
* Iteration for a package member type
*
*/
/**
* Iteration for a local innertype
*/
/**
* Iteration for a member innertype
*
*/
public void traverse(ASTVisitor visitor, [[#variableb57bed60]] [[#variableb57bf520]]) {
if (this.ignoreFurtherInvestigation)
return;
try {
if (visitor.visit(this, [[#variableb57bf520]])) {
if (this.annotations != null) {
int annotationsLength = this.annotations.length;
for (int i = 0; i < annotationsLength; i++)
this.annotations[i].traverse(visitor, this.scope);
}
if (this.superclass != null)
this.superclass.traverse(visitor, this.scope);
if (this.superInterfaces != null) {
int length = this.superInterfaces.length;
for (int i = 0; i < length; i++)
this.superInterfaces[i].traverse(visitor, this.scope);
}
if (this.typeParameters != null) {
int length = this.typeParameters.length;
for (int i = 0; i < length; i++) {
this.typeParameters[i].traverse(visitor, this.scope);
}
}
if (this.memberTypes != null) {
int length = this.memberTypes.length;
for (int i = 0; i < length; i++)
this.memberTypes[i].traverse(visitor, this.scope);
}
if (this.fields != null) {
int length = this.fields.length;
for (int i = 0; i < length; i++) {
FieldDeclaration field;
if ((field = this.fields[i]).isStatic())
[[#variableb57bf680]]
else {
field.traverse(visitor, this.initializerScope);
}
}
}
if (this.methods != null) {
int length = this.methods.length;
for (int i = 0; i < length; i++)
this.methods[i].traverse(visitor, this.scope);
}
}
visitor.endVisit(this, [[#variableb57bf520]]);
}
catch (AbortType e) {
// silent abort
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b57bed60]] | CompilationUnitScope |
| 1 | 2 | [[#b57bed60]] | BlockScope |
| 1 | 3 | [[#b57bed60]] | ClassScope |
| 2 | 1 | [[#b57bf520]] | unitScope |
| 2 | 2 | [[#b57bf520]] | blockScope |
| 2 | 3 | [[#b57bf520]] | classScope |
| 3 | 1 | [[#b57bf680]] | {
field.traverse(visitor, this.staticInitializerScope);
} |
| 3 | 2 | [[#b57bf680]] | {
// local type cannot have static fields
} |
| 3 | 3 | [[#b57bf680]] | {
field.traverse(visitor, this.staticInitializerScope);
} |