| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 73 | 2 | 3 | 0.991 | class_body_declarations[5] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 73 | 1484 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java |
| 2 | 73 | 1431 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java |
| ||||
/*
* @see ASTVisitor#visit(TypeDeclarationStatement)
*/
public boolean visit(TypeDeclarationStatement node) {
if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) {
node.internalGetTypeDeclaration().accept(this );
}
if (node.getAST().apiLevel() >= AST.JLS3) {
node.getDeclaration().accept(this );
}
return false;
}
/*
* @see ASTVisitor#visit(TypeLiteral)
*/
public boolean visit(TypeLiteral node) {
node.getType().accept(this );
this.buffer.append(".class"); //$NON-NLS-1$
return false;
}
/*
* @see ASTVisitor#visit(TypeParameter)
* @since 3.1
*/
public boolean visit(TypeParameter node) {
node.getName().accept(this );
if ( !node.typeBounds().isEmpty()) {
this.buffer.append(" extends "); //$NON-NLS-1$
for (Iterator it = node.typeBounds().iterator(); it.hasNext();) {
Type t = (Type) it.next();
t.accept(this );
if (it.hasNext()) {
this.buffer.append(" & "); //$NON-NLS-1$
}
}
}
return false;
}
/*
* @see ASTVisitor#visit(VariableDeclarationExpression)
*/
public boolean visit(VariableDeclarationExpression node) {
if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) {
printModifiers(node.getModifiers());
}
if (node.getAST().apiLevel() >= AST.JLS3) {
printModifiers(node.modifiers());
}
node.getType().accept(this );
this.buffer.append(" "); //$NON-NLS-1$
for (Iterator it = node.fragments().iterator(); it.hasNext();) {
VariableDeclarationFragment f = (VariableDeclarationFragment) it.next();
f.accept(this );
if (it.hasNext()) {
this.buffer.append(", "); //$NON-NLS-1$
}
}
return false;
}
/*
* @see ASTVisitor#visit(VariableDeclarationFragment)
*/
public boolean visit(VariableDeclarationFragment node) {
node.getName().accept(this );
for (int i = 0; i < node.getExtraDimensions(); i++) {
this.buffer.append("[]"); //$NON-NLS-1$
}
if (node.getInitializer() != null) {
this.buffer.append("="); //$NON-NLS-1$
node.getInitializer().accept(this );
}
return false;
}
|
| ||||
/*
* @see ASTVisitor#visit(TypeDeclarationStatement)
*/
public boolean visit(TypeDeclarationStatement node) {
if (node.getAST().apiLevel() == AST.JLS2) {
node.getTypeDeclaration().accept(this );
}
if (node.getAST().apiLevel() >= AST.JLS3) {
node.getDeclaration().accept(this );
}
return false;
}
/*
* @see ASTVisitor#visit(TypeLiteral)
*/
public boolean visit(TypeLiteral node) {
node.getType().accept(this );
this.fBuffer.append(".class"); //$NON-NLS-1$
return false;
}
/*
* @see ASTVisitor#visit(TypeParameter)
* @since 3.0
*/
public boolean visit(TypeParameter node) {
node.getName().accept(this );
if ( !node.typeBounds().isEmpty()) {
this.fBuffer.append(" extends "); //$NON-NLS-1$
for (Iterator it = node.typeBounds().iterator(); it.hasNext();) {
Type t = (Type) it.next();
t.accept(this );
if (it.hasNext()) {
this.fBuffer.append(" & "); //$NON-NLS-1$
}
}
}
return false;
}
/*
* @see ASTVisitor#visit(VariableDeclarationExpression)
*/
public boolean visit(VariableDeclarationExpression node) {
if (node.getAST().apiLevel() == AST.JLS2) {
printModifiers(node.getModifiers());
}
if (node.getAST().apiLevel() >= AST.JLS3) {
printModifiers(node.modifiers());
}
node.getType().accept(this );
this.fBuffer.append(" "); //$NON-NLS-1$
for (Iterator it = node.fragments().iterator(); it.hasNext();) {
VariableDeclarationFragment f = (VariableDeclarationFragment) it.next();
f.accept(this );
if (it.hasNext()) {
this.fBuffer.append(", "); //$NON-NLS-1$
}
}
return false;
}
/*
* @see ASTVisitor#visit(VariableDeclarationFragment)
*/
public boolean visit(VariableDeclarationFragment node) {
node.getName().accept(this );
for (int i = 0; i < node.getExtraDimensions(); i++) {
this.fBuffer.append("[]"); //$NON-NLS-1$
}
if (node.getInitializer() != null) {
this.fBuffer.append("="); //$NON-NLS-1$
node.getInitializer().accept(this );
}
return false;
}
|
| |||
/*
* @see ASTVisitor#visit(TypeDeclarationStatement)
*/
public boolean visit(TypeDeclarationStatement node) {
if (node.getAST().apiLevel() == AST. [[#variable950df480]]) {
node. [[#variable950df460]]().accept(this );
}
if (node.getAST().apiLevel() >= AST.JLS3) {
node.getDeclaration().accept(this );
}
return false;
}
/*
* @see ASTVisitor#visit(TypeLiteral)
*/
public boolean visit(TypeLiteral node) {
node.getType().accept(this );
this. [[#variable950df440]].append(".class"); //$NON-NLS-1$
return false;
}
/*
* @see ASTVisitor#visit(TypeParameter)
* @since 3.1
*/
/*
* @see ASTVisitor#visit(TypeParameter)
* @since 3.0
*/
public boolean visit(TypeParameter node) {
node.getName().accept(this );
if ( !node.typeBounds().isEmpty()) {
this. [[#variable950df440]].append(" extends "); //$NON-NLS-1$
for (Iterator it = node.typeBounds().iterator(); it.hasNext();) {
Type t = (Type) it.next();
t.accept(this );
if (it.hasNext()) {
this. [[#variable950df440]].append(" & "); //$NON-NLS-1$
}
}
}
return false;
}
/*
* @see ASTVisitor#visit(VariableDeclarationExpression)
*/
public boolean visit(VariableDeclarationExpression node) {
if (node.getAST().apiLevel() == AST. [[#variable950df480]]) {
printModifiers(node.getModifiers());
}
if (node.getAST().apiLevel() >= AST.JLS3) {
printModifiers(node.modifiers());
}
node.getType().accept(this );
this. [[#variable950df440]].append(" "); //$NON-NLS-1$
for (Iterator it = node.fragments().iterator(); it.hasNext();) {
VariableDeclarationFragment f = (VariableDeclarationFragment) it.next();
f.accept(this );
if (it.hasNext()) {
this. [[#variable950df440]].append(", "); //$NON-NLS-1$
}
}
return false;
}
/*
* @see ASTVisitor#visit(VariableDeclarationFragment)
*/
public boolean visit(VariableDeclarationFragment node) {
node.getName().accept(this );
for (int i = 0; i < node.getExtraDimensions(); i++) {
this. [[#variable950df440]].append("[]"); //$NON-NLS-1$
}
if (node.getInitializer() != null) {
this. [[#variable950df440]].append("="); //$NON-NLS-1$
node.getInitializer().accept(this );
}
return false;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#950df480]] | JLS2_INTERNAL |
| 1 | 2 | [[#950df480]] | JLS2 |
| 2 | 1 | [[#950df460]] | internalGetTypeDeclaration |
| 2 | 2 | [[#950df460]] | getTypeDeclaration |
| 3 | 1 | [[#950df440]] | buffer |
| 3 | 2 | [[#950df440]] | fBuffer |