CloneSet333


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
39201.000statement_sequence[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
139282
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
238167
plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
Clone Instance
1
Line Count
39
Source Line
282
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java

                if (methodDecls != null) {
                        if (typeBinding.isInterface()) {
                                // we cannot create problem methods for an interface. So we have to generate a clinit
                                // which should contain all the problem
                                classFile.addProblemClinit(problemsCopy);
                                for (int i = 0, length = methodDecls.length; i < length; i++) {
                                        AbstractMethodDeclaration methodDecl = methodDecls[i];
                                        MethodBinding method = methodDecl.binding;
                                        if (method == null || method.isConstructor()) continue ;
                                        classFile.addAbstractMethod(methodDecl, method);
                                }
                        }
                        else   {
                                for (int i = 0, length = methodDecls.length; i < length; i++) {
                                        AbstractMethodDeclaration methodDecl = methodDecls[i];
                                        MethodBinding method = methodDecl.binding;
                                        if (method == null) continue ;
                                        if (method.isConstructor()) {
                                                classFile.addProblemConstructor(methodDecl, method, problemsCopy);
                                        }
                                        else   {
                                                classFile.addProblemMethod(methodDecl, method, problemsCopy);
                                        }
                                }
                        }
                        // add abstract methods
                        classFile.addDefaultAbstractMethods();
                }
                // propagate generation of (problem) member types
                if (typeDeclaration.memberTypes != null) {
                        for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
                                TypeDeclaration memberType = typeDeclaration.memberTypes[i];
                                if (memberType.binding != null) {
                                        classFile.recordNestedMemberAttribute(memberType.binding);
                                        ClassFile.createProblemType(memberType, unitResult);
                                }
                        }
                }
                classFile.addAttributes();
                unitResult.record(typeBinding.constantPoolName(), classFile);


Clone Instance
2
Line Count
38
Source Line
167
Source File
plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java

        if (methodDecls != null) {
                if (typeBinding.isInterface()) {
                        // we cannot create problem methods for an interface. So we have to generate a clinit
                        // which should contain all the problem
                        classFile.addProblemClinit(problemsCopy);
                        for (int i = 0, length = methodDecls.length; i < length; i++) {
                                AbstractMethodDeclaration methodDecl = methodDecls[i];
                                MethodBinding method = methodDecl.binding;
                                if (method == null || method.isConstructor()) continue ;
                                classFile.addAbstractMethod(methodDecl, method);
                        }
                }
                else   {
                        for (int i = 0, length = methodDecls.length; i < length; i++) {
                                AbstractMethodDeclaration methodDecl = methodDecls[i];
                                MethodBinding method = methodDecl.binding;
                                if (method == null) continue ;
                                if (method.isConstructor()) {
                                        classFile.addProblemConstructor(methodDecl, method, problemsCopy);
                                }
                                else   {
                                        classFile.addProblemMethod(methodDecl, method, problemsCopy);
                                }
                        }
                }
                // add abstract methods
                classFile.addDefaultAbstractMethods();
        }
        // propagate generation of (problem) member types
        if (typeDeclaration.memberTypes != null) {
                for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
                        TypeDeclaration memberType = typeDeclaration.memberTypes[i];
                        if (memberType.binding != null) {
                                classFile.recordNestedMemberAttribute(memberType.binding);
                                ClassFile.createProblemType(memberType, unitResult);
                        }
                }
        }
        classFile.addAttributes();
        unitResult.record(typeBinding.constantPoolName(), classFile);


Clone AbstractionParameter Count: 0Parameter Bindings

if (methodDecls != null) {
  if (typeBinding.isInterface()) {
    // we cannot create problem methods for an interface. So we have to generate a clinit
    // which should contain all the problem
    classFile.addProblemClinit(problemsCopy);
    for (int i = 0, length = methodDecls.length; i < length; i++) {
      AbstractMethodDeclaration methodDecl = methodDecls[i];
      MethodBinding method = methodDecl.binding;
      if (method == null || method.isConstructor())
        continue ;
      classFile.addAbstractMethod(methodDecl, method);
    }
  }
  else {
    for (int i = 0, length = methodDecls.length; i < length; i++) {
      AbstractMethodDeclaration methodDecl = methodDecls[i];
      MethodBinding method = methodDecl.binding;
      if (method == null)
        continue ;
      if (method.isConstructor()) {
        classFile.addProblemConstructor(methodDecl, method, problemsCopy);
      }
      else {
        classFile.addProblemMethod(methodDecl, method, problemsCopy);
      }
    }
  }
  // add abstract methods
  classFile.addDefaultAbstractMethods();
}
// propagate generation of (problem) member types
if (typeDeclaration.memberTypes != null) {
  for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
    TypeDeclaration memberType = typeDeclaration.memberTypes[i];
    if (memberType.binding != null) {
      classFile.recordNestedMemberAttribute(memberType.binding);
      ClassFile.createProblemType(memberType, unitResult);
    }
  }
}
classFile.addAttributes();
unitResult.record(typeBinding.constantPoolName(), classFile);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None