CloneSet307


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
48230.988class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
15295
plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
248183
plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
Clone Instance
1
Line Count
52
Source Line
95
Source File
plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java

protected void consumeClassHeaderName1() {
        // ClassHeaderName ::= Modifiersopt 'class' 'Identifier'
        TypeDeclaration typeDecl;
        if (this.nestedMethod[this.nestedType] == 0) {
                if (this.nestedType != 0) {
                        typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
                        typeDecl.bits |= ASTNode.IsMemberType;
                }
                else   {
                        typeDecl = new CodeSnippetTypeDeclaration(this.compilationUnit.compilationResult);
                }
        }
        else   {
                // Record that the block has a declaration for local types
                typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
                typeDecl.bits |= ASTNode.IsLocalType;
                markEnclosingMemberWithLocalType();
                blockReal();
        }
        //highlight the name of the type
        long pos = this.identifierPositionStack[this.identifierPtr];
        typeDecl.sourceEnd = (int) pos;
        typeDecl.sourceStart = (int) (pos >>> 32);
        typeDecl.name = this.identifierStack[this.identifierPtr-- ];
        this.identifierLengthPtr--;
        //compute the declaration source too
        typeDecl.declarationSourceStart = this.intStack[this.intPtr-- ];
        this.intPtr--;
        // 'class' and 'interface' push an int position
        typeDecl.modifiersSourceStart = this.intStack[this.intPtr-- ];
        typeDecl.modifiers = this.intStack[this.intPtr-- ];
        if (typeDecl.modifiersSourceStart >= 0) {
                typeDecl.declarationSourceStart = typeDecl.modifiersSourceStart;
        }
        typeDecl.bodyStart = typeDecl.sourceEnd + 1;
        pushOnAstStack(typeDecl);

        this.listLength = 0; // will be updated when reading super-interfaces
        // recovery
        if (this.currentElement != null) {
                this.lastCheckPoint = typeDecl.bodyStart;
                this.currentElement = this.currentElement.add(typeDecl, 0);
                this.lastIgnoredToken = -1;
        }
        // javadoc
        typeDecl.javadoc = this.javadoc;
        this.javadoc = null;
}

protected void consumeEmptyStatement() {
        super.consumeEmptyStatement();
        /* recovery */
        recordLastStatementIfNeeded();
}


Clone Instance
2
Line Count
48
Source Line
183
Source File
plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java

protected void consumeInterfaceHeaderName1() {
        // InterfaceHeaderName ::= Modifiersopt 'interface' 'Identifier'
        TypeDeclaration typeDecl;
        if (this.nestedMethod[this.nestedType] == 0) {
                if (this.nestedType != 0) {
                        typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
                        typeDecl.bits |= ASTNode.IsMemberType;
                }
                else   {
                        typeDecl = new CodeSnippetTypeDeclaration(this.compilationUnit.compilationResult);
                }
        }
        else   {
                // Record that the block has a declaration for local types
                typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
                typeDecl.bits |= ASTNode.IsLocalType;
                markEnclosingMemberWithLocalType();
                blockReal();
        }
        //highlight the name of the type
        long pos = this.identifierPositionStack[this.identifierPtr];
        typeDecl.sourceEnd = (int) pos;
        typeDecl.sourceStart = (int) (pos >>> 32);
        typeDecl.name = this.identifierStack[this.identifierPtr-- ];
        this.identifierLengthPtr--;
        //compute the declaration source too
        typeDecl.declarationSourceStart = this.intStack[this.intPtr-- ];
        this.intPtr--;
        // 'class' and 'interface' push an int position
        typeDecl.modifiersSourceStart = this.intStack[this.intPtr-- ];
        typeDecl.modifiers = this.intStack[this.intPtr-- ];
        if (typeDecl.modifiersSourceStart >= 0) {
                typeDecl.declarationSourceStart = typeDecl.modifiersSourceStart;
        }
        typeDecl.bodyStart = typeDecl.sourceEnd + 1;
        pushOnAstStack(typeDecl);
        this.listLength = 0; // will be updated when reading super-interfaces
        // recovery
        if (this.currentElement != null) { // is recovering
                this.lastCheckPoint = typeDecl.bodyStart;
                this.currentElement = this.currentElement.add(typeDecl, 0);
                this.lastIgnoredToken = -1;
        }
        // javadoc
        typeDecl.javadoc = this.javadoc;
        this.javadoc = null;
}

protected void consumeInternalCompilationUnit() {
        // InternalCompilationUnit ::= PackageDeclaration
        // InternalCompilationUnit ::= PackageDeclaration ImportDeclarations ReduceImports
        // InternalCompilationUnit ::= ImportDeclarations ReduceImports
}


Clone AbstractionParameter Count: 3Parameter Bindings

protected void [[#variable97ee8060]]() {
  // InterfaceHeaderName ::= Modifiersopt 'interface' 'Identifier'
  // ClassHeaderName ::= Modifiersopt 'class' 'Identifier'
  TypeDeclaration typeDecl;
  if (this.nestedMethod[this.nestedType] == 0) {
    if (this.nestedType != 0) {
      typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
      typeDecl.bits |= ASTNode.IsMemberType;
    }
    else {
      typeDecl = new CodeSnippetTypeDeclaration(this.compilationUnit.compilationResult);
    }
  }
  else {
    // Record that the block has a declaration for local types
    typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
    typeDecl.bits |= ASTNode.IsLocalType;
    markEnclosingMemberWithLocalType();
    blockReal();
  }
  //highlight the name of the type
  long pos = this.identifierPositionStack[this.identifierPtr];
  typeDecl.sourceEnd = (int) pos;
  typeDecl.sourceStart = (int) (pos >>> 32);
  typeDecl.name = this.identifierStack[this.identifierPtr-- ];
  this.identifierLengthPtr--;
  //compute the declaration source too
  typeDecl.declarationSourceStart = this.intStack[this.intPtr-- ];
  this.intPtr--;
  // 'class' and 'interface' push an int position
  typeDecl.modifiersSourceStart = this.intStack[this.intPtr-- ];
  typeDecl.modifiers = this.intStack[this.intPtr-- ];
  if (typeDecl.modifiersSourceStart >= 0) {
    typeDecl.declarationSourceStart = typeDecl.modifiersSourceStart;
  }
  typeDecl.bodyStart = typeDecl.sourceEnd + 1;
  pushOnAstStack(typeDecl);
  this.listLength = 0; // will be updated when reading super-interfaces
  // recovery
  if (this.currentElement != null) { // is recovering
    this.lastCheckPoint = typeDecl.bodyStart;
    this.currentElement = this.currentElement.add(typeDecl, 0);
    this.lastIgnoredToken = -1;
  }
  // javadoc
  typeDecl.javadoc = this.javadoc;
  this.javadoc = null;
}

protected void [[#variablec27a65c0]]() [[#variablec27a6560]]
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#97ee8060]]
consumeInterfaceHeaderName1 
12[[#97ee8060]]
consumeClassHeaderName1 
21[[#c27a65c0]]
consumeInternalCompilationUnit 
22[[#c27a65c0]]
consumeEmptyStatement 
31[[#c27a6560]]
{
// InternalCompilationUnit ::= PackageDeclaration
// InternalCompilationUnit ::= PackageDeclaration ImportDeclarations ReduceImports
// InternalCompilationUnit ::= ImportDeclarations ReduceImports
} 
32[[#c27a6560]]
{
  super.consumeEmptyStatement();
  /* recovery */
  recordLastStatementIfNeeded();
}