Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
9 | 7 | 6 | 0.956 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 9 | 277 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java |
2 | 9 | 599 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java |
3 | 9 | 624 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java |
4 | 9 | 744 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java |
5 | 9 | 938 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java |
6 | 9 | 1261 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java |
7 | 9 | 2091 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java |
| ||||
/** * Returns whether the given node and the other object object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ public boolean match(ArrayCreation node, Object other) { if ( !(other instanceof ArrayCreation)) { return false; } ArrayCreation o = (ArrayCreation) other; return ( safeSubtreeMatch(node.getType(), o.getType()) && safeSubtreeListMatch(node.dimensions(), o.dimensions()) && safeSubtreeMatch(node.getInitializer(), o.getInitializer())); } |
| ||||
/** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ public boolean match(CompilationUnit node, Object other) { if ( !(other instanceof CompilationUnit)) { return false; } CompilationUnit o = (CompilationUnit) other; return ( safeSubtreeMatch(node.getPackage(), o.getPackage()) && safeSubtreeListMatch(node.imports(), o.imports()) && safeSubtreeListMatch(node.types(), o.types())); } |
| ||||
/** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ public boolean match(ConditionalExpression node, Object other) { if ( !(other instanceof ConditionalExpression)) { return false; } ConditionalExpression o = (ConditionalExpression) other; return ( safeSubtreeMatch(node.getExpression(), o.getExpression()) && safeSubtreeMatch(node.getThenExpression(), o.getThenExpression()) && safeSubtreeMatch(node.getElseExpression(), o.getElseExpression())); } |
| ||||
/** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> * @since 3.1 */ public boolean match(EnhancedForStatement node, Object other) { if ( !(other instanceof EnhancedForStatement)) { return false; } EnhancedForStatement o = (EnhancedForStatement) other; return ( safeSubtreeMatch(node.getParameter(), o.getParameter()) && safeSubtreeMatch(node.getExpression(), o.getExpression()) && safeSubtreeMatch(node.getBody(), o.getBody())); } |
| ||||
/** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ public boolean match(IfStatement node, Object other) { if ( !(other instanceof IfStatement)) { return false; } IfStatement o = (IfStatement) other; return ( safeSubtreeMatch(node.getExpression(), o.getExpression()) && safeSubtreeMatch(node.getThenStatement(), o.getThenStatement()) && safeSubtreeMatch(node.getElseStatement(), o.getElseStatement())); } |
| ||||
/** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> * @since 3.0 */ public boolean match(MethodRef node, Object other) { if ( !(other instanceof MethodRef)) { return false; } MethodRef o = (MethodRef) other; return ( safeSubtreeMatch(node.getQualifier(), o.getQualifier()) && safeSubtreeMatch(node.getName(), o.getName()) && safeSubtreeListMatch(node.parameters(), o.parameters())); } |
| ||||
/** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ public boolean match(TryStatement node, Object other) { if ( !(other instanceof TryStatement)) { return false; } TryStatement o = (TryStatement) other; return ( safeSubtreeMatch(node.getBody(), o.getBody()) && safeSubtreeListMatch(node.catchClauses(), o.catchClauses()) && safeSubtreeMatch(node.getFinally(), o.getFinally())); } |
| |||
/** * Returns whether the given node and the other object object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ /** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ /** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> * @since 3.1 */ /** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> * @since 3.0 */ public boolean match( [[#variable957bf820]] node, Object other) { if ( !(other instanceof [[#variable957bf820]])) { return false; } [[#variable957bf820]] o = ( [[#variable957bf820]]) other; return (safeSubtreeMatch(node. [[#variable957bf7a0]](), o. [[#variable957bf7a0]]()) && [[#variable957bf700]](node. [[#variable957bf680]](), o. [[#variable957bf680]]()) && [[#variable957bf600]](node. [[#variable957bf560]](), o. [[#variable957bf560]]())); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#957bf820]] | ArrayCreation |
1 | 2 | [[#957bf820]] | CompilationUnit |
1 | 3 | [[#957bf820]] | ConditionalExpression |
1 | 4 | [[#957bf820]] | EnhancedForStatement |
1 | 5 | [[#957bf820]] | IfStatement |
1 | 6 | [[#957bf820]] | MethodRef |
1 | 7 | [[#957bf820]] | TryStatement |
2 | 1 | [[#957bf7a0]] | getType |
2 | 2 | [[#957bf7a0]] | getPackage |
2 | 3 | [[#957bf7a0]] | getExpression |
2 | 4 | [[#957bf7a0]] | getParameter |
2 | 5 | [[#957bf7a0]] | getExpression |
2 | 6 | [[#957bf7a0]] | getQualifier |
2 | 7 | [[#957bf7a0]] | getBody |
3 | 1 | [[#957bf700]] | safeSubtreeListMatch |
3 | 2 | [[#957bf700]] | safeSubtreeListMatch |
3 | 3 | [[#957bf700]] | safeSubtreeMatch |
3 | 4 | [[#957bf700]] | safeSubtreeMatch |
3 | 5 | [[#957bf700]] | safeSubtreeMatch |
3 | 6 | [[#957bf700]] | safeSubtreeMatch |
3 | 7 | [[#957bf700]] | safeSubtreeListMatch |
4 | 1 | [[#957bf680]] | dimensions |
4 | 2 | [[#957bf680]] | imports |
4 | 3 | [[#957bf680]] | getThenExpression |
4 | 4 | [[#957bf680]] | getExpression |
4 | 5 | [[#957bf680]] | getThenStatement |
4 | 6 | [[#957bf680]] | getName |
4 | 7 | [[#957bf680]] | catchClauses |
5 | 1 | [[#957bf600]] | safeSubtreeMatch |
5 | 2 | [[#957bf600]] | safeSubtreeListMatch |
5 | 3 | [[#957bf600]] | safeSubtreeMatch |
5 | 4 | [[#957bf600]] | safeSubtreeMatch |
5 | 5 | [[#957bf600]] | safeSubtreeMatch |
5 | 6 | [[#957bf600]] | safeSubtreeListMatch |
5 | 7 | [[#957bf600]] | safeSubtreeMatch |
6 | 1 | [[#957bf560]] | getInitializer |
6 | 2 | [[#957bf560]] | types |
6 | 3 | [[#957bf560]] | getElseExpression |
6 | 4 | [[#957bf560]] | getBody |
6 | 5 | [[#957bf560]] | getElseStatement |
6 | 6 | [[#957bf560]] | parameters |
6 | 7 | [[#957bf560]] | getFinally |