CloneSet629


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16220.953executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
116890
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java
216909
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java
Clone Instance
1
Line Count
16
Source Line
890
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java

                                                              {
                                final ASTNode type = node;
                                while (node != null && !(node instanceof MethodDeclaration) && !(node instanceof VariableDeclarationFragment))
                                        node = node.getParent();
                                if (node != null) {
                                        final int delta = node.getStartPosition() + node.getLength() - type.getStartPosition();
                                        if (node instanceof MethodDeclaration)
                                                binding = ((MethodDeclaration) node).resolveBinding();
                                        else if (node instanceof VariableDeclarationFragment)
                                                binding = ((VariableDeclarationFragment) node).resolveBinding();
                                        if (binding != null) {
                                                node = target.findDeclaringNode(binding.getKey());
                                                if (node instanceof MethodDeclaration || node instanceof VariableDeclarationFragment) {
                                                        node = NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
                                                        if (node instanceof SimpleName)
                                                                rewriteTypeOccurrence(estimate, rewrite, node, group);
                                                }
                                        }
                                }
                                                              }


Clone Instance
2
Line Count
16
Source Line
909
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java

                                                                  {
                                final ASTNode name = node;
                                while (node != null && !(node instanceof MethodDeclaration) && !(node instanceof VariableDeclarationFragment))
                                        node = node.getParent();
                                if (node != null) {
                                        final int delta = node.getStartPosition() + node.getLength() - name.getStartPosition();
                                        if (node instanceof MethodDeclaration)
                                                binding = ((MethodDeclaration) node).resolveBinding();
                                        else if (node instanceof VariableDeclarationFragment)
                                                binding = ((VariableDeclarationFragment) node).resolveBinding();
                                        if (binding != null) {
                                                node = target.findDeclaringNode(binding.getKey());
                                                if (node instanceof SimpleName || node instanceof MethodDeclaration || node instanceof VariableDeclarationFragment) {
                                                        node = NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
                                                        if (node instanceof SimpleName)
                                                                rewriteTypeOccurrence(estimate, rewrite, node, group);
                                                }
                                        }
                                }
                                                                  }


Clone AbstractionParameter Count: 2Parameter Bindings

{
  final ASTNode  [[#variablea46192e0]]= node;
  while (node != null && !(node instanceof MethodDeclaration) && !(node instanceof VariableDeclarationFragment))
    node = node.getParent();
  if (node != null) {
    final int delta = node.getStartPosition() + node.getLength() -  [[#variablea46192e0]].getStartPosition();
    if (node instanceof MethodDeclaration)
      binding = ((MethodDeclaration) node).resolveBinding();
    else
      if (node instanceof VariableDeclarationFragment)
        binding = ((VariableDeclarationFragment) node).resolveBinding();
    if (binding != null) {
      node = target.findDeclaringNode(binding.getKey());
      if ( [[#variablea4619340]]|| node instanceof VariableDeclarationFragment) {
        node = NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
        if (node instanceof SimpleName)
          rewriteTypeOccurrence(estimate, rewrite, node, group);
      }
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#a46192e0]]
name 
12[[#a46192e0]]
type 
21[[#a4619340]]
node instanceof SimpleName || node instanceof MethodDeclaration 
22[[#a4619340]]
node instanceof MethodDeclaration