CloneSet226


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
55210.989statement_sequence[8]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1557748
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
2557838
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
Clone Instance
1
Line Count
55
Source Line
7748
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java

        if (size1 != 0) {
                typeDecl.fields = new FieldDeclaration[size1];
        }
        if (size2 != 0) {
                typeDecl.methods = new AbstractMethodDeclaration[size2];
                if (hasAbstractMethods) typeDecl.bits |= ASTNode.HasAbstractMethods;
        }
        if (size3 != 0) {
                typeDecl.memberTypes = new TypeDeclaration[size3];
        }

        //arrays fill up
        size1 = size2 = size3 = 0;
        int flagI = flag[0], start = 0;
        int length2;
        for (int end = 0; end <= length; end++) //<HERE> the plus one allows to 
                {
                if (flagI != flag[end]) //treat the last element as a ended flag.....
                        { //array copy
                        switch (flagI) {
                                case 1:
                                        size1 += (length2 = end - start);
                                        System.arraycopy(
                                                this.astStack, 
                                                this.astPtr + start + 1, 
                                                typeDecl.fields, 
                                                size1 - length2, 
                                                length2 );
                                        break;
                                case 2:
                                        size2 += (length2 = end - start);
                                        System.arraycopy(
                                                this.astStack, 
                                                this.astPtr + start + 1, 
                                                typeDecl.methods, 
                                                size2 - length2, 
                                                length2 );
                                        break;
                                case 3:
                                        size3 += (length2 = end - start);
                                        System.arraycopy(
                                                this.astStack, 
                                                this.astPtr + start + 1, 
                                                typeDecl.memberTypes, 
                                                size3 - length2, 
                                                length2 );
                                        break;
                              }
                        flagI = flag[start = end];
                }
        }

        if (typeDecl.memberTypes != null) {
                for (int i = typeDecl.memberTypes.length - 1; i >= 0; i--) {
                        typeDecl.memberTypes[i].enclosingType = typeDecl;
                }
        }


Clone Instance
2
Line Count
55
Source Line
7838
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java

   //arrays creation
   if (size1 != 0) {
      enumDeclaration.fields = new FieldDeclaration[size1];
   }
   if (size2 != 0) {
      enumDeclaration.methods = new AbstractMethodDeclaration[size2];
      if (hasAbstractMethods) enumDeclaration.bits |= ASTNode.HasAbstractMethods;
   }
   if (size3 != 0) {
      enumDeclaration.memberTypes = new TypeDeclaration[size3];
   }

   //arrays fill up
   size1 = size2 = size3 = 0;
   int flagI = flag[0], start = 0;
   int length2;
   for (int end = 0; end <= length; end++) //<HERE> the plus one allows to 
      {
      if (flagI != flag[end]) //treat the last element as a ended flag.....
         { //array copy
         switch (flagI) {
            case 1:
               size1 += (length2 = end - start);
               System.arraycopy(
                  this.astStack, 
                  this.astPtr + start + 1, 
                  enumDeclaration.fields, 
                  size1 - length2, 
                  length2      );
               break;
            case 2:
               size2 += (length2 = end - start);
               System.arraycopy(
                  this.astStack, 
                  this.astPtr + start + 1, 
                  enumDeclaration.methods, 
                  size2 - length2, 
                  length2      );
               break;
            case 3:
               size3 += (length2 = end - start);
               System.arraycopy(
                  this.astStack, 
                  this.astPtr + start + 1, 
                  enumDeclaration.memberTypes, 
                  size3 - length2, 
                  length2      );
               break;
          }
         flagI = flag[start = end];
      }
   }

   if (enumDeclaration.memberTypes != null) {
      for (int i = enumDeclaration.memberTypes.length - 1; i >= 0; i--) {
         enumDeclaration.memberTypes[i].enclosingType = enumDeclaration;
      }
   }


Clone AbstractionParameter Count: 1Parameter Bindings

//arrays creation
if (size1 != 0) {
   [[#variable5b7b49e0]].fields = new FieldDeclaration[size1];
}
if (size2 != 0) {
   [[#variable5b7b49e0]].methods = new AbstractMethodDeclaration[size2];
  if (hasAbstractMethods)
     [[#variable5b7b49e0]].bits |= ASTNode.HasAbstractMethods;
}
if (size3 != 0) {
   [[#variable5b7b49e0]].memberTypes = new TypeDeclaration[size3];
}
//arrays fill up
size1 = size2 = size3 = 0;
int flagI = flag[0], start = 0;
int length2;
for (int end = 0; end <= length; end++) //<HERE> the plus one allows to 
{
  if (flagI != flag[end]) //treat the last element as a ended flag.....
  { //array copy
    switch (flagI) {
      case 1:
        size1 += (length2 = end - start);
        System.arraycopy(this.astStack, this.astPtr + start + 1,  [[#variable5b7b49e0]].fields, size1 - length2, length2);
        break;
      case 2:
        size2 += (length2 = end - start);
        System.arraycopy(this.astStack, this.astPtr + start + 1,  [[#variable5b7b49e0]].methods, size2 - length2, length2);
        break;
      case 3:
        size3 += (length2 = end - start);
        System.arraycopy(this.astStack, this.astPtr + start + 1,  [[#variable5b7b49e0]].memberTypes, size3 - length2, length2);
        break;
    }
    flagI = flag[start = end];
  }
}
if ( [[#variable5b7b49e0]].memberTypes != null) {
  for (int i = [[#variable5b7b49e0]].memberTypes.length - 1; i >= 0; i--) {
     [[#variable5b7b49e0]].memberTypes[i].enclosingType = [[#variable5b7b49e0]];
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5b7b49e0]]
enumDeclaration 
12[[#5b7b49e0]]
typeDecl