CloneSet1238


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19210.997class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1192399
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
2294038
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
Clone Instance
1
Line Count
19
Source Line
2399
Source File
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
        }
}


Clone Instance
2
Line Count
29
Source Line
4038
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java

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
        }
}


Clone AbstractionParameter Count: 1Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b1a7db20]]
consumeConstructorHeader 
12[[#b1a7db20]]
consumeMethodHeader