CloneSet992


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18240.991class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1181274
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java
2181346
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java
Clone Instance
1
Line Count
18
Source Line
1274
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java

                /*
                 * @see org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlighting#consumes(org.eclipse.jdt.internal.ui.javaeditor.SemanticToken)
                 */
                public boolean consumes(SemanticToken token) {

                        // 1: match types
                        SimpleName name = token.getNode();
                        ASTNode node = name.getParent();
                        int nodeType = node.getNodeType();
                        if (nodeType != ASTNode.SIMPLE_TYPE && nodeType != ASTNode.THIS_EXPRESSION && nodeType != ASTNode.QUALIFIED_TYPE &&  nodeType != ASTNode.QUALIFIED_NAME && nodeType != ASTNode.TYPE_DECLARATION)
                                return false;
                        while (nodeType == ASTNode.QUALIFIED_NAME) {
                                node = node.getParent();
                                nodeType = node.getNodeType();
                                if (nodeType == ASTNode.IMPORT_DECLARATION)
                                        return false;
                        }

                        // 2: match classes
                        IBinding binding = token.getBinding();
                        return binding instanceof ITypeBinding && ((ITypeBinding) binding).isClass();
                }


Clone Instance
2
Line Count
18
Source Line
1346
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java

                /*
                 * @see org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlighting#consumes(org.eclipse.jdt.internal.ui.javaeditor.SemanticToken)
                 */
                public boolean consumes(SemanticToken token) {

                        // 1: match types
                        SimpleName name = token.getNode();
                        ASTNode node = name.getParent();
                        int nodeType = node.getNodeType();
                        if (nodeType != ASTNode.SIMPLE_TYPE && nodeType != ASTNode.QUALIFIED_TYPE && nodeType != ASTNode.QUALIFIED_NAME && nodeType != ASTNode.QUALIFIED_NAME && nodeType != ASTNode.ENUM_DECLARATION)
                                return false;
                        while (nodeType == ASTNode.QUALIFIED_NAME) {
                                node = node.getParent();
                                nodeType = node.getNodeType();
                                if (nodeType == ASTNode.IMPORT_DECLARATION)
                                        return false;
                        }

                        // 2: match enums
                        IBinding binding = token.getBinding();
                        return binding instanceof ITypeBinding && ((ITypeBinding) binding).isEnum();
                }


Clone AbstractionParameter Count: 4Parameter Bindings

/*
                 * @see org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlighting#consumes(org.eclipse.jdt.internal.ui.javaeditor.SemanticToken)
                 */
public boolean consumes(SemanticToken token) {
  // 1: match types
  SimpleName name = token.getNode();
  ASTNode node = name.getParent();
  int nodeType = node.getNodeType();
  if (nodeType != ASTNode.SIMPLE_TYPE && nodeType != ASTNode. [[#variable945c4040]]&& nodeType != ASTNode. [[#variable5873b800]]&& nodeType != ASTNode.QUALIFIED_NAME && nodeType != ASTNode. [[#variablea39a1ec0]])
    return false;
  while (nodeType == ASTNode.QUALIFIED_NAME) {
    node = node.getParent();
    nodeType = node.getNodeType();
    if (nodeType == ASTNode.IMPORT_DECLARATION)
      return false;
  }
  // 2: match classes
  // 2: match enums
  IBinding binding = token.getBinding();
  return binding instanceof ITypeBinding && ((ITypeBinding) binding). [[#variablea39a1f20]]();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#945c4040]]
THIS_EXPRESSION 
12[[#945c4040]]
QUALIFIED_TYPE 
21[[#5873b800]]
QUALIFIED_TYPE 
22[[#5873b800]]
QUALIFIED_NAME 
31[[#a39a1ec0]]
TYPE_DECLARATION 
32[[#a39a1ec0]]
ENUM_DECLARATION 
41[[#a39a1f20]]
isClass 
42[[#a39a1f20]]
isEnum