CloneSet258


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16450.956method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
116199
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java
216216
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java
316234
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java
416252
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java
Clone Instance
1
Line Count
16
Source Line
199
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java

                        public boolean visit(org.eclipse.jdt.core.dom.CompilationUnit compilationUnit) {
                                if (checkMalformedNodes(compilationUnit)) {
                                        return true; // abort sorting of current element
                                }
                                ListRewrite listRewrite = rewriter.getListRewrite(compilationUnit, org.eclipse.jdt.core.dom.CompilationUnit.TYPES_PROPERTY);
                                List types = compilationUnit.types();
                                final int length = types.size();
                                if (length > 1) {
                                        final List myCopy = new ArrayList();
                                        myCopy.addAll(types);
                                        Collections.sort(myCopy, SortElementsOperation.this.comparator);
                                        for (int i = 0; i < length; i++) {
                                                listRewrite.replace((ASTNode) types.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null);
                                        }
                                }
                                return true;
                        }


Clone Instance
2
Line Count
16
Source Line
216
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java

                        public boolean visit(AnnotationTypeDeclaration annotationTypeDeclaration) {
                                if (checkMalformedNodes(annotationTypeDeclaration)) {
                                        return true; // abort sorting of current element
                                }
                                ListRewrite listRewrite = rewriter.getListRewrite(annotationTypeDeclaration, AnnotationTypeDeclaration.BODY_DECLARATIONS_PROPERTY);
                                List bodyDeclarations = annotationTypeDeclaration.bodyDeclarations();
                                final int length = bodyDeclarations.size();
                                if (length > 1) {
                                        final List myCopy = new ArrayList();
                                        myCopy.addAll(bodyDeclarations);
                                        Collections.sort(myCopy, SortElementsOperation.this.comparator);
                                        for (int i = 0; i < length; i++) {
                                                listRewrite.replace((ASTNode) bodyDeclarations.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null);
                                        }
                                }
                                return true;
                        }


Clone Instance
3
Line Count
16
Source Line
234
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java

                        public boolean visit(AnonymousClassDeclaration anonymousClassDeclaration) {
                                if (checkMalformedNodes(anonymousClassDeclaration)) {
                                        return true; // abort sorting of current element
                                }
                                ListRewrite listRewrite = rewriter.getListRewrite(anonymousClassDeclaration, AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY);
                                List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
                                final int length = bodyDeclarations.size();
                                if (length > 1) {
                                        final List myCopy = new ArrayList();
                                        myCopy.addAll(bodyDeclarations);
                                        Collections.sort(myCopy, SortElementsOperation.this.comparator);
                                        for (int i = 0; i < length; i++) {
                                                listRewrite.replace((ASTNode) bodyDeclarations.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null);
                                        }
                                }
                                return true;
                        }


Clone Instance
4
Line Count
16
Source Line
252
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java

                        public boolean visit(TypeDeclaration typeDeclaration) {
                                if (checkMalformedNodes(typeDeclaration)) {
                                        return true; // abort sorting of current element
                                }
                                ListRewrite listRewrite = rewriter.getListRewrite(typeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY);
                                List bodyDeclarations = typeDeclaration.bodyDeclarations();
                                final int length = bodyDeclarations.size();
                                if (length > 1) {
                                        final List myCopy = new ArrayList();
                                        myCopy.addAll(bodyDeclarations);
                                        Collections.sort(myCopy, SortElementsOperation.this.comparator);
                                        for (int i = 0; i < length; i++) {
                                                listRewrite.replace((ASTNode) bodyDeclarations.get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null);
                                        }
                                }
                                return true;
                        }


Clone AbstractionParameter Count: 5Parameter Bindings

public boolean visit( [[#variable9681d000]]  [[#variable9681cfa0]]) {
  if (checkMalformedNodes( [[#variable9681cfa0]])) {
    return true; // abort sorting of current element
  }
  ListRewrite listRewrite = rewriter.getListRewrite( [[#variable9681cfa0]],  [[#variable9681cf20]]. [[#variable9681ce80]]);
  List  [[#variable9681ce00]]= [[#variable9681cfa0]]. [[#variable9681ce00]]();
  final int length = [[#variable9681ce00]].size();
  if (length > 1) {
    final List myCopy = new ArrayList();
    myCopy.addAll( [[#variable9681ce00]]);
    Collections.sort(myCopy, SortElementsOperation.this.comparator);
    for (int i = 0; i < length; i++) {
      listRewrite.replace((ASTNode)  [[#variable9681ce00]].get(i), rewriter.createMoveTarget((ASTNode) myCopy.get(i)), null);
    }
  }
  return true;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9681d000]]
TypeDeclaration 
12[[#9681d000]]
AnonymousClassDeclaration 
13[[#9681d000]]
AnnotationTypeDeclaration 
14[[#9681d000]]
org.eclipse.jdt.core.dom.CompilationUnit 
21[[#9681cfa0]]
typeDeclaration 
22[[#9681cfa0]]
anonymousClassDeclaration 
23[[#9681cfa0]]
annotationTypeDeclaration 
24[[#9681cfa0]]
compilationUnit 
31[[#9681cf20]]
TypeDeclaration 
32[[#9681cf20]]
AnonymousClassDeclaration 
33[[#9681cf20]]
AnnotationTypeDeclaration 
34[[#9681cf20]]
org.eclipse.jdt.core.dom.CompilationUnit 
41[[#9681ce80]]
BODY_DECLARATIONS_PROPERTY 
42[[#9681ce80]]
BODY_DECLARATIONS_PROPERTY 
43[[#9681ce80]]
BODY_DECLARATIONS_PROPERTY 
44[[#9681ce80]]
TYPES_PROPERTY 
51[[#9681ce00]]
bodyDeclarations 
52[[#9681ce00]]
bodyDeclarations 
53[[#9681ce00]]
bodyDeclarations 
54[[#9681ce00]]
types