CloneSet127


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
50420.996class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
150622
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
250728
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
350840
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
450909
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
Clone Instance
1
Line Count
50
Source Line
622
Source File
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java

protected void consumeStaticImportOnDemandDeclarationName() {
        // TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
        /* push an ImportRef build from the last name 
        stored in the identifier stack. */

        int index;

        /* no need to take action if not inside assist identifiers */
        if ((index = indexOfAssistIdentifier()) < 0) {
                super.consumeStaticImportOnDemandDeclarationName();
                return;
        }
        /* retrieve identifiers subset and whole positions, the assist node positions
                should include the entire replaced source. */
        int length = identifierLengthStack[identifierLengthPtr];
        char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
        identifierLengthPtr--;
        identifierPtr -= length;
        long[] positions = new long[length];
        System.arraycopy(
                identifierPositionStack, 
                identifierPtr + 1, 
                positions, 
                0, 
                length  );

        /* build specific assist node on import statement */
        ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccStatic);
        reference.onDemand = true;
        assistNode = reference;
        this.lastCheckPoint = reference.sourceEnd + 1;

        pushOnAstStack(reference);

        if (currentToken == TokenNameSEMICOLON) {
                reference.declarationSourceEnd = scanner.currentPosition - 1;
        }
        else   {
                reference.declarationSourceEnd = (int) positions[length - 1];
        }
        //endPosition is just before the ;
        reference.declarationSourceStart = intStack[intPtr-- ];
        // flush annotations defined prior to import statements
        reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
        // recovery
        if (currentElement != null) {
                lastCheckPoint = reference.declarationSourceEnd + 1;
                currentElement = currentElement.add(reference, 0);
                lastIgnoredToken = -1;
                restartRecovery = true; // used to avoid branching back into the regular automaton              
        }
}


Clone Instance
2
Line Count
50
Source Line
728
Source File
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java

protected void consumeTypeImportOnDemandDeclarationName() {
        // TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
        /* push an ImportRef build from the last name 
        stored in the identifier stack. */

        int index;

        /* no need to take action if not inside assist identifiers */
        if ((index = indexOfAssistIdentifier()) < 0) {
                super.consumeTypeImportOnDemandDeclarationName();
                return;
        }
        /* retrieve identifiers subset and whole positions, the assist node positions
                should include the entire replaced source. */
        int length = identifierLengthStack[identifierLengthPtr];
        char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
        identifierLengthPtr--;
        identifierPtr -= length;
        long[] positions = new long[length];
        System.arraycopy(
                identifierPositionStack, 
                identifierPtr + 1, 
                positions, 
                0, 
                length  );

        /* build specific assist node on import statement */
        ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccDefault);
        reference.onDemand = true;
        assistNode = reference;
        this.lastCheckPoint = reference.sourceEnd + 1;

        pushOnAstStack(reference);

        if (currentToken == TokenNameSEMICOLON) {
                reference.declarationSourceEnd = scanner.currentPosition - 1;
        }
        else   {
                reference.declarationSourceEnd = (int) positions[length - 1];
        }
        //endPosition is just before the ;
        reference.declarationSourceStart = intStack[intPtr-- ];
        // flush comments defined prior to import statements
        reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
        // recovery
        if (currentElement != null) {
                lastCheckPoint = reference.declarationSourceEnd + 1;
                currentElement = currentElement.add(reference, 0);
                lastIgnoredToken = -1;
                restartRecovery = true; // used to avoid branching back into the regular automaton              
        }
}


Clone Instance
3
Line Count
50
Source Line
840
Source File
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java

protected void consumeStaticImportOnDemandDeclarationName() {
        // TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
        /* push an ImportRef build from the last name 
        stored in the identifier stack. */

        int index;

        /* no need to take action if not inside assist identifiers */
        if ((index = indexOfAssistIdentifier()) < 0) {
                super.consumeStaticImportOnDemandDeclarationName();
                return;
        }
        /* retrieve identifiers subset and whole positions, the assist node positions
                should include the entire replaced source. */
        int length = identifierLengthStack[identifierLengthPtr];
        char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
        identifierLengthPtr--;
        identifierPtr -= length;
        long[] positions = new long[length];
        System.arraycopy(
                identifierPositionStack, 
                identifierPtr + 1, 
                positions, 
                0, 
                length  );

        /* build specific assist node on import statement */
        ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccStatic);
        reference.onDemand = true;
        assistNode = reference;
        this.lastCheckPoint = reference.sourceEnd + 1;

        pushOnAstStack(reference);

        if (currentToken == TokenNameSEMICOLON) {
                reference.declarationSourceEnd = scanner.currentPosition - 1;
        }
        else   {
                reference.declarationSourceEnd = (int) positions[length - 1];
        }
        //endPosition is just before the ;
        reference.declarationSourceStart = intStack[intPtr-- ];
        // flush annotations defined prior to import statements
        reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
        // recovery
        if (currentElement != null) {
                lastCheckPoint = reference.declarationSourceEnd + 1;
                currentElement = currentElement.add(reference, 0);
                lastIgnoredToken = -1;
                restartRecovery = true; // used to avoid branching back into the regular automaton              
        }
}


Clone Instance
4
Line Count
50
Source Line
909
Source File
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java

protected void consumeTypeImportOnDemandDeclarationName() {
        // TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
        /* push an ImportRef build from the last name 
        stored in the identifier stack. */

        int index;

        /* no need to take action if not inside assist identifiers */
        if ((index = indexOfAssistIdentifier()) < 0) {
                super.consumeTypeImportOnDemandDeclarationName();
                return;
        }
        /* retrieve identifiers subset and whole positions, the assist node positions
                should include the entire replaced source. */
        int length = identifierLengthStack[identifierLengthPtr];
        char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
        identifierLengthPtr--;
        identifierPtr -= length;
        long[] positions = new long[length];
        System.arraycopy(
                identifierPositionStack, 
                identifierPtr + 1, 
                positions, 
                0, 
                length  );

        /* build specific assist node on import statement */
        ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccDefault);
        reference.onDemand = true;
        assistNode = reference;
        this.lastCheckPoint = reference.sourceEnd + 1;

        pushOnAstStack(reference);

        if (currentToken == TokenNameSEMICOLON) {
                reference.declarationSourceEnd = scanner.currentPosition - 1;
        }
        else   {
                reference.declarationSourceEnd = (int) positions[length - 1];
        }
        //endPosition is just before the ;
        reference.declarationSourceStart = intStack[intPtr-- ];
        // flush comments defined prior to import statements
        reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
        // recovery
        if (currentElement != null) {
                lastCheckPoint = reference.declarationSourceEnd + 1;
                currentElement = currentElement.add(reference, 0);
                lastIgnoredToken = -1;
                restartRecovery = true; // used to avoid branching back into the regular automaton              
        }
}


Clone AbstractionParameter Count: 2Parameter Bindings

protected void [[#variableb9a5f700]]() {
  // TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
  // TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
  /* push an ImportRef build from the last name 
          stored in the identifier stack. */
  int index;
  /* no need to take action if not inside assist identifiers */
  if ((index = indexOfAssistIdentifier()) < 0) {
    super. [[#variableb9a5f700]]();
    return;
  }
  /* retrieve identifiers subset and whole positions, the assist node positions
                  should include the entire replaced source. */
  int length = identifierLengthStack[identifierLengthPtr];
  char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
  identifierLengthPtr--;
  identifierPtr -= length;
  long[] positions = new long[length];
  System.arraycopy(identifierPositionStack, identifierPtr + 1, positions, 0, length);
  /* build specific assist node on import statement */
  ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants. [[#variableb9a5f4e0]]);
  reference.onDemand = true;
  assistNode = reference;
  this.lastCheckPoint = reference.sourceEnd + 1;
  pushOnAstStack(reference);
  if (currentToken == TokenNameSEMICOLON) {
    reference.declarationSourceEnd = scanner.currentPosition - 1;
  }
  else {
    reference.declarationSourceEnd = (int) positions[length - 1];
  }
  //endPosition is just before the ;
  reference.declarationSourceStart = intStack[intPtr-- ];
  // flush annotations defined prior to import statements
  // flush comments defined prior to import statements
  reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
  // recovery
  if (currentElement != null) {
    lastCheckPoint = reference.declarationSourceEnd + 1;
    currentElement = currentElement.add(reference, 0);
    lastIgnoredToken = -1;
    restartRecovery = true; // used to avoid branching back into the regular automaton              
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b9a5f700]]
consumeStaticImportOnDemandDeclarationName 
12[[#b9a5f700]]
consumeTypeImportOnDemandDeclarationName 
13[[#b9a5f700]]
consumeStaticImportOnDemandDeclarationName 
14[[#b9a5f700]]
consumeTypeImportOnDemandDeclarationName 
21[[#b9a5f4e0]]
AccStatic 
22[[#b9a5f4e0]]
AccDefault 
23[[#b9a5f4e0]]
AccStatic 
24[[#b9a5f4e0]]
AccDefault