Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
19 | 2 | 1 | 0.997 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 19 | 2399 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java |
2 | 29 | 4038 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java |
| ||||
protected void consumeConstructorHeader() { // ConstructorHeader ::= ConstructorHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt AbstractMethodDeclaration method = (AbstractMethodDeclaration) this.astStack[this.astPtr]; if (this.currentToken == TokenNameLBRACE) { method.bodyStart = this.scanner.currentPosition; } // recovery if (this.currentElement != null) { if (this.currentToken == TokenNameSEMICOLON) { // for invalid constructors method.modifiers |= ExtraCompilerModifiers.AccSemicolonBody; method.declarationSourceEnd = this.scanner.currentPosition - 1; method.bodyEnd = this.scanner.currentPosition - 1; if (this.currentElement.parseTree() == method && this.currentElement.parent != null) { this.currentElement = this.currentElement.parent; } } this.restartRecovery = true; // used to avoid branching back into the regular automaton } } |
| ||||
protected void consumeMethodHeader() { // MethodHeader ::= MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims ThrowsClauseopt // AnnotationMethodHeader ::= AnnotationMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims AnnotationMethodHeaderDefaultValueopt // RecoveryMethodHeader ::= RecoveryMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims AnnotationMethodHeaderDefaultValueopt // RecoveryMethodHeader ::= RecoveryMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims MethodHeaderThrowsClause // retrieve end position of method declarator AbstractMethodDeclaration method = (AbstractMethodDeclaration) this.astStack[this.astPtr]; if (this.currentToken == TokenNameLBRACE) { method.bodyStart = this.scanner.currentPosition; } // recovery if (this.currentElement != null) { // if(method.isAnnotationMethod()) { // method.modifiers |= AccSemicolonBody; // method.declarationSourceEnd = this.scanner.currentPosition-1; // method.bodyEnd = this.scanner.currentPosition-1; // this.currentElement = this.currentElement.parent; // } else if (this.currentToken == TokenNameSEMICOLON /*&& !method.isAnnotationMethod()*/ ) { method.modifiers |= ExtraCompilerModifiers.AccSemicolonBody; method.declarationSourceEnd = this.scanner.currentPosition - 1; method.bodyEnd = this.scanner.currentPosition - 1; if (this.currentElement.parseTree() == method && this.currentElement.parent != null) { this.currentElement = this.currentElement.parent; } } this.restartRecovery = true; // used to avoid branching back into the regular automaton } } |
| |||
protected void [[#variableb1a7db20]]() { // ConstructorHeader ::= ConstructorHeaderName MethodHeaderParameters MethodHeaderThrowsClauseopt // MethodHeader ::= MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims ThrowsClauseopt // AnnotationMethodHeader ::= AnnotationMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims AnnotationMethodHeaderDefaultValueopt // RecoveryMethodHeader ::= RecoveryMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims AnnotationMethodHeaderDefaultValueopt // RecoveryMethodHeader ::= RecoveryMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims MethodHeaderThrowsClause // retrieve end position of method declarator AbstractMethodDeclaration method = (AbstractMethodDeclaration) this.astStack[this.astPtr]; if (this.currentToken == TokenNameLBRACE) { method.bodyStart = this.scanner.currentPosition; } // recovery if (this.currentElement != null) { // if(method.isAnnotationMethod()) { // method.modifiers |= AccSemicolonBody; // method.declarationSourceEnd = this.scanner.currentPosition-1; // method.bodyEnd = this.scanner.currentPosition-1; // this.currentElement = this.currentElement.parent; // } else if (this.currentToken == TokenNameSEMICOLON /*&& !method.isAnnotationMethod()*/ ) { // for invalid constructors method.modifiers |= ExtraCompilerModifiers.AccSemicolonBody; method.declarationSourceEnd = this.scanner.currentPosition - 1; method.bodyEnd = this.scanner.currentPosition - 1; if (this.currentElement.parseTree() == method && this.currentElement.parent != null) { this.currentElement = this.currentElement.parent; } } this.restartRecovery = true; // used to avoid branching back into the regular automaton } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b1a7db20]] | consumeConstructorHeader |
1 | 2 | [[#b1a7db20]] | consumeMethodHeader |