Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
37 | 2 | 5 | 0.962 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 35 | 3895 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java |
2 | 37 | 4262 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java |
| ||||
/** * This method is used to set the right end position for expression * statement. The actual AST nodes don't include the trailing semicolon. * This method fixes the length of the corresponding node. */ protected void retrieveColonPosition(ASTNode node) { int start = node.getStartPosition(); int length = node.getLength(); int end = start + length; this.scanner.resetTo(end, this.compilationUnitSourceLength); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch (token) { case TerminalTokens.TokenNameCOLON: node.setSourceRange(start, this.scanner.currentPosition - start); return; } } } catch (InvalidInputException e) { // ignore } } /** * This method is used to retrieve the start position of the Ellipsis */ protected int retrieveEllipsisStartPosition(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch (token) { case TerminalTokens.TokenNameELLIPSIS: return this.scanner.startPosition - 1; } } } catch (InvalidInputException e) { // ignore } return -1; } |
| ||||
/* * This method is used to set the right end position for expression * statement. The actual AST nodes don't include the trailing semicolon. * This method fixes the length of the corresponding node. */ protected void retrieveSemiColonPosition(ASTNode node) { int start = node.getStartPosition(); int length = node.getLength(); int end = start + length; this.scanner.resetTo(end, this.compilationUnitSourceLength); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch (token) { case TerminalTokens.TokenNameSEMICOLON: node.setSourceRange(start, this.scanner.currentPosition - start); return; } } } catch (InvalidInputException e) { // ignore } } /** * This method is used to retrieve the start position of the block. * @return int the dimension found, -1 if none */ protected int retrieveStartBlockPosition(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch (token) { case TerminalTokens.TokenNameLBRACE: //110 return this.scanner.startPosition; } } } catch (InvalidInputException e) { // ignore } return -1; } |
| |||
/* * This method is used to set the right end position for expression * statement. The actual AST nodes don't include the trailing semicolon. * This method fixes the length of the corresponding node. */ /** * This method is used to set the right end position for expression * statement. The actual AST nodes don't include the trailing semicolon. * This method fixes the length of the corresponding node. */ protected void [[#variable57adf320]](ASTNode node) { int start = node.getStartPosition(); int length = node.getLength(); int end = start + length; this.scanner.resetTo(end, this.compilationUnitSourceLength); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch (token) { case TerminalTokens. [[#variable57adf280]]: node.setSourceRange(start, this.scanner.currentPosition - start); return; } } } catch (InvalidInputException e) { // ignore } } /** * This method is used to retrieve the start position of the block. * @return int the dimension found, -1 if none */ /** * This method is used to retrieve the start position of the Ellipsis */ protected int [[#variable57adf200]](int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch (token) { case TerminalTokens. [[#variable57adf1c0]]: //110 return [[#variable57adf1a0]]; } } } catch (InvalidInputException e) { // ignore } return -1; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#57adf320]] | retrieveSemiColonPosition |
1 | 2 | [[#57adf320]] | retrieveColonPosition |
2 | 1 | [[#57adf280]] | TokenNameSEMICOLON |
2 | 2 | [[#57adf280]] | TokenNameCOLON |
3 | 1 | [[#57adf200]] | retrieveStartBlockPosition |
3 | 2 | [[#57adf200]] | retrieveEllipsisStartPosition |
4 | 1 | [[#57adf1c0]] | TokenNameLBRACE |
4 | 2 | [[#57adf1c0]] | TokenNameELLIPSIS |
5 | 1 | [[#57adf1a0]] | this.scanner.startPosition |
5 | 2 | [[#57adf1a0]] | this.scanner.startPosition - 1 |