Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
58 | 2 | 1 | 0.999 | statement_sequence[7] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 61 | 2219 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java |
2 | 58 | 2396 | 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; |
| ||||
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; |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b61d6a40]] | parseErrorInsertToCompletePhrase |
1 | 2 | [[#b61d6a40]] | parseErrorInsertToCompleteScope |