CloneSet2106


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
9230.965class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
19166
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ListRewrite.java
29199
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ListRewrite.java
Clone Instance
1
Line Count
9
Source Line
166
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ListRewrite.java

        /**
         * Inserts the given node into the list after the given element. 
         * The existing node must be in the list, either as an original or as a new
         * node that has been inserted.
         * The inserted node must either be brand new (not part of the original AST)
         * or a placeholder node (for example, one created by
         * {@link ASTRewrite#createCopyTarget(ASTNode)}, 
         * {@link ASTRewrite#createMoveTarget(ASTNode)}, 
         * or {@link ASTRewrite#createStringPlaceholder(String, int)}). The AST itself
     * is not actually modified in any way; rather, the rewriter just records
     * a note that this node has been inserted into the list.
         * 
         * @param node the node to insert
         * @param element the element after which the given node is to be inserted
         * @param editGroup the edit group in which to collect the corresponding
         * text edits, or <code>null</code> if ungrouped
         * @throws IllegalArgumentException if the node or element is null, 
         * or if the node is not part of this rewriter's AST, or if the inserted node
         * is not a new node (or placeholder), or if <code>element</code> is not a member
         * of the list (original or new), or if the described modification is
         * otherwise invalid
         */
        public void insertAfter(ASTNode node, ASTNode element, TextEditGroup editGroup) {
                if (node == null || element == null) {
                        throw new IllegalArgumentException();
                }
                int index = getEvent().getIndex(element, ListRewriteEvent.BOTH);
                if (index == -1) {
                        throw new IllegalArgumentException("Node does not exist"); //$NON-NLS-1$
                }
                internalInsertAt(node, index + 1, true, editGroup);
        }


Clone Instance
2
Line Count
9
Source Line
199
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ListRewrite.java

        /**
         * Inserts the given node into the list before the given element. 
         * The existing node must be in the list, either as an original or as a new
         * node that has been inserted.
         * The inserted node must either be brand new (not part of the original AST)
         * or a placeholder node (for example, one created by
         * {@link ASTRewrite#createCopyTarget(ASTNode)}, 
         * {@link ASTRewrite#createMoveTarget(ASTNode)}, 
         * or {@link ASTRewrite#createStringPlaceholder(String, int)}). The AST itself
     * is not actually modified in any way; rather, the rewriter just records
     * a note that this node has been inserted into the list.
         * 
         * @param node the node to insert
         * @param element the element before which the given node is to be inserted
         * @param editGroup the edit group in which to collect the corresponding
         * text edits, or <code>null</code> if ungrouped
         * @throws IllegalArgumentException if the node or element is null, 
         * or if the node is not part of this rewriter's AST, or if the inserted node
         * is not a new node (or placeholder), or if <code>element</code> is not a member
         * of the list (original or new), or if the described modification is
         * otherwise invalid
         */
        public void insertBefore(ASTNode node, ASTNode element, TextEditGroup editGroup) {
                if (node == null || element == null) {
                        throw new IllegalArgumentException();
                }
                int index = getEvent().getIndex(element, ListRewriteEvent.BOTH);
                if (index == -1) {
                        throw new IllegalArgumentException("Node does not exist"); //$NON-NLS-1$
                }
                internalInsertAt(node, index, false, editGroup);
        }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Inserts the given node into the list after the given element. 
         * The existing node must be in the list, either as an original or as a new
         * node that has been inserted.
         * The inserted node must either be brand new (not part of the original AST)
         * or a placeholder node (for example, one created by
         * {@link ASTRewrite#createCopyTarget(ASTNode)}, 
         * {@link ASTRewrite#createMoveTarget(ASTNode)}, 
         * or {@link ASTRewrite#createStringPlaceholder(String, int)}). The AST itself
     * is not actually modified in any way; rather, the rewriter just records
     * a note that this node has been inserted into the list.
         * 
         * @param node the node to insert
         * @param element the element after which the given node is to be inserted
         * @param editGroup the edit group in which to collect the corresponding
         * text edits, or <code>null</code> if ungrouped
         * @throws IllegalArgumentException if the node or element is null, 
         * or if the node is not part of this rewriter's AST, or if the inserted node
         * is not a new node (or placeholder), or if <code>element</code> is not a member
         * of the list (original or new), or if the described modification is
         * otherwise invalid
         */
/**
         * Inserts the given node into the list before the given element. 
         * The existing node must be in the list, either as an original or as a new
         * node that has been inserted.
         * The inserted node must either be brand new (not part of the original AST)
         * or a placeholder node (for example, one created by
         * {@link ASTRewrite#createCopyTarget(ASTNode)}, 
         * {@link ASTRewrite#createMoveTarget(ASTNode)}, 
         * or {@link ASTRewrite#createStringPlaceholder(String, int)}). The AST itself
     * is not actually modified in any way; rather, the rewriter just records
     * a note that this node has been inserted into the list.
         * 
         * @param node the node to insert
         * @param element the element before which the given node is to be inserted
         * @param editGroup the edit group in which to collect the corresponding
         * text edits, or <code>null</code> if ungrouped
         * @throws IllegalArgumentException if the node or element is null, 
         * or if the node is not part of this rewriter's AST, or if the inserted node
         * is not a new node (or placeholder), or if <code>element</code> is not a member
         * of the list (original or new), or if the described modification is
         * otherwise invalid
         */
public void [[#variable5e8db200]](ASTNode node, ASTNode element, TextEditGroup editGroup) {
  if (node == null || element == null) {
    throw new IllegalArgumentException();
  }
  int index = getEvent().getIndex(element, ListRewriteEvent.BOTH);
  if (index == -1) {
    throw new IllegalArgumentException("Node does not exist"); //$NON-NLS-1$
  }
  internalInsertAt(node,  [[#variable5e8dbbc0]],  [[#variable5e8dbc20]], editGroup);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5e8db200]]
insertAfter 
12[[#5e8db200]]
insertBefore 
21[[#5e8dbbc0]]
index + 1 
22[[#5e8dbbc0]]
index 
31[[#5e8dbc20]]
true 
32[[#5e8dbc20]]
false