| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 43 | 2 | 2 | 0.991 | class_body_declarations[3] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 43 | 697 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java |
| 2 | 43 | 661 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java |
| ||||
/*
* @see ASTVisitor#visit(InfixExpression)
*/
public boolean visit(InfixExpression node) {
node.getLeftOperand().accept(this );
this.buffer.append(' '); // for cases like x= i - -1; or x= i++ + ++i;
this.buffer.append(node.getOperator().toString());
this.buffer.append(' ');
node.getRightOperand().accept(this );
final List extendedOperands = node.extendedOperands();
if (extendedOperands.size() != 0) {
this.buffer.append(' ');
for (Iterator it = extendedOperands.iterator(); it.hasNext();) {
this.buffer.append(node.getOperator().toString()).append(' ');
Expression e = (Expression) it.next();
e.accept(this );
}
}
return false;
}
/*
* @see ASTVisitor#visit(InstanceofExpression)
*/
public boolean visit(InstanceofExpression node) {
node.getLeftOperand().accept(this );
this.buffer.append(" instanceof "); //$NON-NLS-1$
node.getRightOperand().accept(this );
return false;
}
/*
* @see ASTVisitor#visit(Initializer)
*/
public boolean visit(Initializer node) {
if (node.getJavadoc() != null) {
node.getJavadoc().accept(this );
}
if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) {
printModifiers(node.getModifiers());
}
if (node.getAST().apiLevel() >= AST.JLS3) {
printModifiers(node.modifiers());
}
node.getBody().accept(this );
return false;
}
|
| ||||
/*
* @see ASTVisitor#visit(InfixExpression)
*/
public boolean visit(InfixExpression node) {
node.getLeftOperand().accept(this );
this.fBuffer.append(' '); // for cases like x= i - -1; or x= i++ + ++i;
this.fBuffer.append(node.getOperator().toString());
this.fBuffer.append(' ');
node.getRightOperand().accept(this );
final List extendedOperands = node.extendedOperands();
if (extendedOperands.size() != 0) {
this.fBuffer.append(' ');
for (Iterator it = extendedOperands.iterator(); it.hasNext();) {
this.fBuffer.append(node.getOperator().toString()).append(' ');
Expression e = (Expression) it.next();
e.accept(this );
}
}
return false;
}
/*
* @see ASTVisitor#visit(InstanceofExpression)
*/
public boolean visit(InstanceofExpression node) {
node.getLeftOperand().accept(this );
this.fBuffer.append(" instanceof "); //$NON-NLS-1$
node.getRightOperand().accept(this );
return false;
}
/*
* @see ASTVisitor#visit(Initializer)
*/
public boolean visit(Initializer node) {
if (node.getJavadoc() != null) {
node.getJavadoc().accept(this );
}
if (node.getAST().apiLevel() == AST.JLS2) {
printModifiers(node.getModifiers());
}
if (node.getAST().apiLevel() >= AST.JLS3) {
printModifiers(node.modifiers());
}
node.getBody().accept(this );
return false;
}
|
| |||
/*
* @see ASTVisitor#visit(InfixExpression)
*/
public boolean visit(InfixExpression node) {
node.getLeftOperand().accept(this );
this. [[#variable64c61620]].append(' '); // for cases like x= i - -1; or x= i++ + ++i;
this. [[#variable64c61620]].append(node.getOperator().toString());
this. [[#variable64c61620]].append(' ');
node.getRightOperand().accept(this );
final List extendedOperands = node.extendedOperands();
if (extendedOperands.size() != 0) {
this. [[#variable64c61620]].append(' ');
for (Iterator it = extendedOperands.iterator(); it.hasNext();) {
this. [[#variable64c61620]].append(node.getOperator().toString()).append(' ');
Expression e = (Expression) it.next();
e.accept(this );
}
}
return false;
}
/*
* @see ASTVisitor#visit(InstanceofExpression)
*/
public boolean visit(InstanceofExpression node) {
node.getLeftOperand().accept(this );
this. [[#variable64c61620]].append(" instanceof "); //$NON-NLS-1$
node.getRightOperand().accept(this );
return false;
}
/*
* @see ASTVisitor#visit(Initializer)
*/
public boolean visit(Initializer node) {
if (node.getJavadoc() != null) {
node.getJavadoc().accept(this );
}
if (node.getAST().apiLevel() == AST. [[#variable64c614a0]]) {
printModifiers(node.getModifiers());
}
if (node.getAST().apiLevel() >= AST.JLS3) {
printModifiers(node.modifiers());
}
node.getBody().accept(this );
return false;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#64c61620]] | buffer |
| 1 | 2 | [[#64c61620]] | fBuffer |
| 2 | 1 | [[#64c614a0]] | JLS2_INTERNAL |
| 2 | 2 | [[#64c614a0]] | JLS2 |