CloneSet418


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
20220.961executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
120686
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility2.java
220707
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility2.java
Clone Instance
1
Line Count
20
Source Line
686
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility2.java

                                                                               {
                                IMethodBinding[] candidates = getDelegateCandidates(typeBounds[index], binding);
                                for (int candidate = 0; candidate < candidates.length; candidate++) {
                                        match = false;
                                        final IMethodBinding methodBinding = candidates[candidate];
                                        for (int offset = 0; offset < methods.size() && !match; offset++) {
                                                if (Bindings.areOverriddenMethods((IMethodBinding) methods.get(offset), methodBinding))
                                                        match = true;
                                        }
                                        if ( !match) {
                                                tuples.add(new IBinding[] {
                                                                            fieldBinding, methodBinding
                                                                          } );
                                                methods.add(methodBinding);
                                        }
                                }
                                final ITypeBinding superclass = typeBounds[index].getSuperclass();
                                if (superclass != null)
                                        getDelegatableMethods(ast, tuples, methods, fieldBinding, superclass, binding);
                                ITypeBinding[] superInterfaces = typeBounds[index].getInterfaces();
                                for (int offset = 0; offset < superInterfaces.length; offset++)
                                        getDelegatableMethods(ast, tuples, methods, fieldBinding, superInterfaces[offset], binding);
                                                                               }


Clone Instance
2
Line Count
20
Source Line
707
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility2.java

                       {
                        IMethodBinding[] candidates = getDelegateCandidates(typeBinding, binding);
                        for (int index = 0; index < candidates.length; index++) {
                                match = false;
                                final IMethodBinding methodBinding = candidates[index];
                                for (int offset = 0; offset < methods.size() && !match; offset++) {
                                        if (Bindings.areOverriddenMethods((IMethodBinding) methods.get(offset), methodBinding))
                                                match = true;
                                }
                                if ( !match) {
                                        tuples.add(new IBinding[] {
                                                                    fieldBinding, methodBinding
                                                                  } );
                                        methods.add(methodBinding);
                                }
                        }
                        final ITypeBinding superclass = typeBinding.getSuperclass();
                        if (superclass != null)
                                getDelegatableMethods(ast, tuples, methods, fieldBinding, superclass, binding);
                        ITypeBinding[] superInterfaces = typeBinding.getInterfaces();
                        for (int offset = 0; offset < superInterfaces.length; offset++)
                                getDelegatableMethods(ast, tuples, methods, fieldBinding, superInterfaces[offset], binding);
                       }


Clone AbstractionParameter Count: 2Parameter Bindings

{
  IMethodBinding[] candidates = getDelegateCandidates( [[#variablebf931e20]], binding);
  for (int  [[#variablebf931da0]]= 0; [[#variablebf931da0]] < candidates.length; [[#variablebf931da0]]++) {
    match = false;
    final IMethodBinding methodBinding = candidates[ [[#variablebf931da0]]];
    for (int offset = 0; offset < methods.size() && !match; offset++) {
      if (Bindings.areOverriddenMethods((IMethodBinding) methods.get(offset), methodBinding))
        match = true;
    }
    if ( !match) {
      tuples.add(new IBinding[] {
                                  fieldBinding,
                                  methodBinding
                                } );
      methods.add(methodBinding);
    }
  }
  final ITypeBinding superclass = [[#variablebf931e20]].getSuperclass();
  if (superclass != null)
    getDelegatableMethods(ast, tuples, methods, fieldBinding, superclass, binding);
  ITypeBinding[] superInterfaces = [[#variablebf931e20]].getInterfaces();
  for (int offset = 0; offset < superInterfaces.length; offset++)
    getDelegatableMethods(ast, tuples, methods, fieldBinding, superInterfaces[offset], binding);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bf931e20]]
typeBounds[index] 
12[[#bf931e20]]
typeBinding 
21[[#bf931da0]]
candidate 
22[[#bf931da0]]
index