CloneSet139


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
58210.999statement_sequence[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1612219
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java
2582396
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java
Clone Instance
1
Line Count
61
Source Line
2219
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java

                                int[] addedTokens = null;
                    int addedTokenCount = 0;
                    if (this.recoveryScanner != null) {
                        addedTokens = new int[Parser.scope_rhs.length - Parser.scope_suffix[ - nameIndex]];
                    }

                                for (int i = Parser.scope_suffix[ - nameIndex]; Parser.scope_rhs[i] != 0; i++) {
                                        buf.append(Parser.readableName[Parser.scope_rhs[i]]);
                                        if (Parser.scope_rhs[i + 1] != 0) // any more symbols to print?
                                                buf.append(' ');

                                        if (addedTokens != null) {
                                int tmpAddedToken = Parser.reverse_index[Parser.scope_rhs[i]];
                                if (tmpAddedToken > -1) {
                                        int length = addedTokens.length;
                                        if (addedTokenCount == length) {
                                                System.arraycopy(addedTokens, 0, addedTokens = new int[length * 2], 0, length);
                                        }
                                        addedTokens[addedTokenCount++ ] = tmpAddedToken;
                                }
                                else   {
                                        int[] template = getNTermTemplate(-tmpAddedToken);
                                        if (template != null) {
                                                for (int j = 0; j < template.length; j++) {
                                                                        int length = addedTokens.length;
                                                        if (addedTokenCount == length) {
                                                                System.arraycopy(addedTokens, 0, addedTokens = new int[length * 2], 0, length);
                                                        }
                                                        addedTokens[addedTokenCount++ ] = template[j];
                                                }
                                        }
                                        else   {
                                                addedTokenCount = 0;
                                                addedTokens = null;
                                        }
                                }
                                        }
                                }
                                if (addedTokenCount > 0) {
                        System.arraycopy(addedTokens, 0, addedTokens = new int[addedTokenCount], 0, addedTokenCount);

                        int completedToken = -1;
                        if (scopeNameIndex != 0) {
                                completedToken = -Parser.reverse_index[scopeNameIndex];
                        }
                        this.recoveryScanner.insertTokens(addedTokens, completedToken, errorEnd);
                                }
                                if (scopeNameIndex != 0) {
                                        if (this.reportProblem)problemReporter().parseErrorInsertToComplete(
                                                errorStart, 
                                                errorEnd, 
                                                buf.toString(), 
                                                Parser.readableName[scopeNameIndex]                        );
                                }
                                else   {
                                        if (this.reportProblem)problemReporter().parseErrorInsertToCompleteScope(
                                                errorStart, 
                                                errorEnd, 
                                                buf.toString()                                                  );
                                }
                                break;


Clone Instance
2
Line Count
58
Source Line
2396
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java

                    int[] addedTokens = null;
                    int addedTokenCount = 0;
                    if (this.recoveryScanner != null) {
                        addedTokens = new int[Parser.scope_rhs.length - Parser.scope_suffix[ - nameIndex]];
                    }

                    for (int i = Parser.scope_suffix[ - nameIndex]; Parser.scope_rhs[i] != 0; i++) {

                        buf.append(Parser.readableName[Parser.scope_rhs[i]]);
                        if (Parser.scope_rhs[i + 1] != 0)
                             buf.append(' ');

                        if (addedTokens != null) {
                                int tmpAddedToken = Parser.reverse_index[Parser.scope_rhs[i]];
                                if (tmpAddedToken > -1) {
                                        int length = addedTokens.length;
                                        if (addedTokenCount == length) {
                                                System.arraycopy(addedTokens, 0, addedTokens = new int[length * 2], 0, length);
                                        }
                                        addedTokens[addedTokenCount++ ] = tmpAddedToken;
                                }
                                else   {
                                        int[] template = getNTermTemplate(-tmpAddedToken);
                                        if (template != null) {
                                                for (int j = 0; j < template.length; j++) {
                                                                        int length = addedTokens.length;
                                                        if (addedTokenCount == length) {
                                                                System.arraycopy(addedTokens, 0, addedTokens = new int[length * 2], 0, length);
                                                        }
                                                        addedTokens[addedTokenCount++ ] = template[j];
                                                }
                                        }
                                        else   {
                                                addedTokenCount = 0;
                                                addedTokens = null;
                                        }
                                }
                        }
                    }
                    if (addedTokenCount > 0) {
                        System.arraycopy(addedTokens, 0, addedTokens = new int[addedTokenCount], 0, addedTokenCount);
                        int completedToken = -1;
                        if (scopeNameIndex != 0) {
                                completedToken = -Parser.reverse_index[scopeNameIndex];
                        }
                        this.recoveryScanner.insertTokens(addedTokens, completedToken, errorEnd);
                    }
                    if (scopeNameIndex != 0) {
                        if (this.reportProblem)problemReporter().parseErrorInsertToComplete(
                                                errorStart, 
                                                errorEnd, 
                                                buf.toString(), 
                                                Parser.readableName[scopeNameIndex]        );
                    }
                    else   {
                        if (this.reportProblem)problemReporter().parseErrorInsertToCompletePhrase(
                                                errorStart, 
                                                errorEnd, 
                                                buf.toString()                                   );
                    }
                    break;


Clone AbstractionParameter Count: 1Parameter Bindings

int[] addedTokens = null;
int addedTokenCount = 0;
if (this.recoveryScanner != null) {
  addedTokens = new int[Parser.scope_rhs.length - Parser.scope_suffix[ -nameIndex]];
}
for (int i = Parser.scope_suffix[ -nameIndex]; Parser.scope_rhs[i] != 0; i++) {
  buf.append(Parser.readableName[Parser.scope_rhs[i]]);
  if (Parser.scope_rhs[i + 1] != 0) // any more symbols to print?
    buf.append(' ');
  if (addedTokens != null) {
    int tmpAddedToken = Parser.reverse_index[Parser.scope_rhs[i]];
    if (tmpAddedToken > -1) {
      int length = addedTokens.length;
      if (addedTokenCount == length) {
        System.arraycopy(addedTokens, 0, addedTokens = new int[length * 2], 0, length);
      }
      addedTokens[addedTokenCount++ ] = tmpAddedToken;
    }
    else {
      int[] template = getNTermTemplate(-tmpAddedToken);
      if (template != null) {
        for (int j = 0; j < template.length; j++) {
          int length = addedTokens.length;
          if (addedTokenCount == length) {
            System.arraycopy(addedTokens, 0, addedTokens = new int[length * 2], 0, length);
          }
          addedTokens[addedTokenCount++ ] = template[j];
        }
      }
      else {
        addedTokenCount = 0;
        addedTokens = null;
      }
    }
  }
}
if (addedTokenCount > 0) {
  System.arraycopy(addedTokens, 0, addedTokens = new int[addedTokenCount], 0, addedTokenCount);
  int completedToken = -1;
  if (scopeNameIndex != 0) {
    completedToken = -Parser.reverse_index[scopeNameIndex];
  }
  this.recoveryScanner.insertTokens(addedTokens, completedToken, errorEnd);
}
if (scopeNameIndex != 0) {
  if (this.reportProblem)
    problemReporter().parseErrorInsertToComplete(errorStart, errorEnd, buf.toString(), Parser.readableName[scopeNameIndex]);
}
else {
  if (this.reportProblem)
    problemReporter(). [[#variableb61d6a40]](errorStart, errorEnd, buf.toString());
}
break;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b61d6a40]]
parseErrorInsertToCompletePhrase 
12[[#b61d6a40]]
parseErrorInsertToCompleteScope