Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
27 | 2 | 4 | 0.970 | executable_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 26 | 312 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultCommentMapper.java |
2 | 27 | 448 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultCommentMapper.java |
| ||||
{ // may be equals => then no scan is necessary this.scanner.resetTo(end + 1, previousStart); try { int token = this.scanner.getNextToken(); if (token != TerminalTokens.TokenNameWHITESPACE || this.scanner.currentPosition != previousStart) { // stop search on condition 3) // if first comment fails, then there's no extended position in fact if (idx == endIdx) { return nodeStart; } break; } } catch (InvalidInputException e) { // Should not happen, but return no extended position... return nodeStart; } // verify that there's no more than one line between node/comments char[] gap = this.scanner.getCurrentIdentifierSource(); int nbrLine = 0; int pos = -1; while ((pos = CharOperation.indexOf('\n', gap, pos + 1)) >= 0) { nbrLine++; } if (nbrLine > 1) { // stop search on condition 4) break; } } |
| ||||
{ this.scanner.resetTo(previousEnd, commentStart); try { int token = this.scanner.getNextToken(); if (token != TerminalTokens.TokenNameWHITESPACE || this.scanner.currentPosition != commentStart) { // stop search on condition 2) // if first index fails, then there's no extended position in fact... if (idx == startIdx) { return nodeEnd; } // otherwise we get the last index of trailing comment => break break; } } catch (InvalidInputException e) { // Should not happen, but return no extended position... return nodeEnd; } // verify that there's no more than one line between node/comments char[] gap = this.scanner.getCurrentIdentifierSource(); int nbrLine = 0; int pos = -1; while ((pos = CharOperation.indexOf('\n', gap, pos + 1)) >= 0) { nbrLine++; } if (nbrLine > 1) { // stop search on condition 3) break; } } |
| |||
{ // may be equals => then no scan is necessary this.scanner.resetTo( [[#variable4e1fb460]], [[#variable4e1fb3e0]]); try { int token = this.scanner.getNextToken(); if (token != TerminalTokens.TokenNameWHITESPACE || this.scanner.currentPosition != [[#variable4e1fb3e0]]) { // stop search on condition 2) // if first index fails, then there's no extended position in fact... // stop search on condition 3) // if first comment fails, then there's no extended position in fact if (idx == [[#variable4e1fb340]]) { return [[#variable4e1fb280]]; } // otherwise we get the last index of trailing comment => break break; } } catch (InvalidInputException e) { // Should not happen, but return no extended position... return [[#variable4e1fb280]]; } // verify that there's no more than one line between node/comments char[] gap = this.scanner.getCurrentIdentifierSource(); int nbrLine = 0; int pos = -1; while ((pos = CharOperation.indexOf('\n', gap, pos + 1)) >= 0) { nbrLine++; } if (nbrLine > 1) { // stop search on condition 3) // stop search on condition 4) break; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#4e1fb460]] | previousEnd |
1 | 2 | [[#4e1fb460]] | end + 1 |
2 | 1 | [[#4e1fb3e0]] | commentStart |
2 | 2 | [[#4e1fb3e0]] | previousStart |
3 | 1 | [[#4e1fb340]] | startIdx |
3 | 2 | [[#4e1fb340]] | endIdx |
4 | 1 | [[#4e1fb280]] | nodeEnd |
4 | 2 | [[#4e1fb280]] | nodeStart |