CloneSet840


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21210.992class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
121205
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java
221189
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java
Clone Instance
1
Line Count
21
Source Line
205
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java

        /*
         * @see ASTVisitor#visit(ArrayCreation)
         */
        public boolean visit(ArrayCreation node) {
                this.buffer.append("new "); //$NON-NLS-1$
                ArrayType at = node.getType();
                int dims = at.getDimensions();
                Type elementType = at.getElementType();
                elementType.accept(this );
                for (Iterator it = node.dimensions().iterator(); it.hasNext();)  {
                        this.buffer.append("["); //$NON-NLS-1$
                        Expression e = (Expression) it.next();
                        e.accept(this );
                        this.buffer.append("]"); //$NON-NLS-1$
                        dims--;
                }
                // add empty "[]" for each extra array dimension
                for (int i = 0; i < dims; i++) {
                        this.buffer.append("[]"); //$NON-NLS-1$
                }
                if (node.getInitializer() != null) {
                        node.getInitializer().accept(this );
                }
                return false;
        }


Clone Instance
2
Line Count
21
Source Line
189
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java

        /*
         * @see ASTVisitor#visit(ArrayCreation)
         */
        public boolean visit(ArrayCreation node) {
                this.fBuffer.append("new "); //$NON-NLS-1$
                ArrayType at = node.getType();
                int dims = at.getDimensions();
                Type elementType = at.getElementType();
                elementType.accept(this );
                for (Iterator it = node.dimensions().iterator(); it.hasNext();) {
                        this.fBuffer.append("["); //$NON-NLS-1$
                        Expression e = (Expression) it.next();
                        e.accept(this );
                        this.fBuffer.append("]"); //$NON-NLS-1$
                        dims--;
                }
                // add empty "[]" for each extra array dimension
                for (int i = 0; i < dims; i++) {
                        this.fBuffer.append("[]"); //$NON-NLS-1$
                }
                if (node.getInitializer() != null) {
                        node.getInitializer().accept(this );
                }
                return false;
        }


Clone AbstractionParameter Count: 1Parameter Bindings

/*
         * @see ASTVisitor#visit(ArrayCreation)
         */
public boolean visit(ArrayCreation node) {
  this. [[#variable78129ca0]].append("new "); //$NON-NLS-1$
  ArrayType at = node.getType();
  int dims = at.getDimensions();
  Type elementType = at.getElementType();
  elementType.accept(this );
  for (Iterator it = node.dimensions().iterator(); it.hasNext();) {
    this. [[#variable78129ca0]].append("["); //$NON-NLS-1$
    Expression e = (Expression) it.next();
    e.accept(this );
    this. [[#variable78129ca0]].append("]"); //$NON-NLS-1$
    dims--;
  }
  // add empty "[]" for each extra array dimension
  for (int i = 0; i < dims; i++) {
    this. [[#variable78129ca0]].append("[]"); //$NON-NLS-1$
  }
  if (node.getInitializer() != null) {
    node.getInitializer().accept(this );
  }
  return false;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#78129ca0]]
fBuffer 
12[[#78129ca0]]
buffer