CloneSet416


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
38201.000switch_groups[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1381163
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java
2381124
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe2.java
Clone Instance
1
Line Count
38
Source Line
1163
Source File
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java

                                        case TerminalTokens.TokenNameCOMMENT_BLOCK:
                                                this.printBlockComment(this.scanner.getRawTokenSource(), false);
                                                currentTokenStartPosition = this.scanner.currentPosition;
                                                hasComment = true;
                                                break;
                                        case TerminalTokens.TokenNameCOMMENT_JAVADOC:
                                                this.printBlockComment(this.scanner.getRawTokenSource(), true);
                                                currentTokenStartPosition = this.scanner.currentPosition;
                                                hasComment = true;
                                                break;
                                        case TerminalTokens.TokenNameCOMMENT_LINE:
                                                this.printCommentLine(this.scanner.getRawTokenSource());
                                                currentTokenStartPosition = this.scanner.currentPosition;
                                                break;
                                        case TerminalTokens.TokenNameWHITESPACE:
                                                addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
                                                int count = 0;
                                                char[] whiteSpaces = this.scanner.getCurrentTokenSource();
                                                for (int i = 0, max = whiteSpaces.length; i < max; i++) {
                                                        switch (whiteSpaces[i]) {
                                                                case '\r':
                                                                        if ((i + 1) < max) {
                                                                                if (whiteSpaces[i + 1] == '\n') {
                                                                                        i++;
                                                                                }
                                                                        }
                                                                        count++;
                                                                        break;
                                                                case '\n':
                                                                        count++;
                                                              }
                                                }
                                                if (count >= 1 && hasComment) {
                                                        printNewLine();
                                                }
                                                currentTokenStartPosition = this.scanner.currentPosition;
                                                hasComment = false;
                                                break;


Clone Instance
2
Line Count
38
Source Line
1124
Source File
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe2.java

                                        case TerminalTokens.TokenNameCOMMENT_BLOCK:
                                                this.printBlockComment(this.scanner.getRawTokenSource(), false);
                                                currentTokenStartPosition = this.scanner.currentPosition;
                                                hasComment = true;
                                                break;
                                        case TerminalTokens.TokenNameCOMMENT_JAVADOC:
                                                this.printBlockComment(this.scanner.getRawTokenSource(), true);
                                                currentTokenStartPosition = this.scanner.currentPosition;
                                                hasComment = true;
                                                break;
                                        case TerminalTokens.TokenNameCOMMENT_LINE:
                                                this.printCommentLine(this.scanner.getRawTokenSource());
                                                currentTokenStartPosition = this.scanner.currentPosition;
                                                break;
                                        case TerminalTokens.TokenNameWHITESPACE:
                                                addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
                                                int count = 0;
                                                char[] whiteSpaces = this.scanner.getCurrentTokenSource();
                                                for (int i = 0, max = whiteSpaces.length; i < max; i++) {
                                                        switch (whiteSpaces[i]) {
                                                                case '\r':
                                                                        if ((i + 1) < max) {
                                                                                if (whiteSpaces[i + 1] == '\n') {
                                                                                        i++;
                                                                                }
                                                                        }
                                                                        count++;
                                                                        break;
                                                                case '\n':
                                                                        count++;
                                                              }
                                                }
                                                if (count >= 1 && hasComment) {
                                                        printNewLine();
                                                }
                                                currentTokenStartPosition = this.scanner.currentPosition;
                                                hasComment = false;
                                                break;


Clone AbstractionParameter Count: 0Parameter Bindings

case TerminalTokens.TokenNameCOMMENT_BLOCK:
  this.printBlockComment(this.scanner.getRawTokenSource(), false);
  currentTokenStartPosition = this.scanner.currentPosition;
  hasComment = true;
  break;
case TerminalTokens.TokenNameCOMMENT_JAVADOC:
  this.printBlockComment(this.scanner.getRawTokenSource(), true);
  currentTokenStartPosition = this.scanner.currentPosition;
  hasComment = true;
  break;
case TerminalTokens.TokenNameCOMMENT_LINE:
  this.printCommentLine(this.scanner.getRawTokenSource());
  currentTokenStartPosition = this.scanner.currentPosition;
  break;
case TerminalTokens.TokenNameWHITESPACE:
  addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
  int count = 0;
  char[] whiteSpaces = this.scanner.getCurrentTokenSource();
  for (int i = 0, max = whiteSpaces.length; i < max; i++) {
    switch (whiteSpaces[i]) {
      case '\r':
        if ((i + 1) < max) {
          if (whiteSpaces[i + 1] == '\n') {
            i++;
          }
        }
        count++;
        break;
      case '\n':
        count++;
    }
  }
  if (count >= 1 && hasComment) {
    printNewLine();
  }
  currentTokenStartPosition = this.scanner.currentPosition;
  hasComment = false;
  break;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None