CloneSet1375


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24210.987class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12475
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/TokenScanner.java
224104
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/TokenScanner.java
Clone Instance
1
Line Count
24
Source Line
75
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/TokenScanner.java

        /**
         * @return Returns the length of the current token
         */
        public int getCurrentLength() {
                return getCurrentEndOffset() - getCurrentStartOffset();
        }

        /**
         * Reads the next token.
         * @param ignoreComments If set, comments will be overread
         * @return Return the token id.
         * @exception CoreException Thrown when the end of the file has been reached (code END_OF_FILE)
         * or a lexical error was detected while scanning (code LEXICAL_ERROR)
         */
        public int readNext(boolean ignoreComments) throws CoreException {
                int curr = 0;
                do {
                        try {
                                curr = this.scanner.getNextToken();
                                if (curr == ITerminalSymbols.TokenNameEOF) {
                                        throw new CoreException(createError(END_OF_FILE, "End Of File", null)); //$NON-NLS-1$
                                }
                        } catch (InvalidInputException e) {
                                throw new CoreException(createError(LEXICAL_ERROR, e.getMessage(), e));
                          }
                }
                while (  ignoreComments && isComment(curr));
                return curr;
        }


Clone Instance
2
Line Count
24
Source Line
104
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/TokenScanner.java

        /**
         * @return Returns the length of the current token
         */
        public int getCurrentLength() {
                return getCurrentEndOffset() - getCurrentStartOffset();
        }

        /**
         * Reads the next token.
         * @param ignoreComments If set, comments will be overread
         * @return Return the token id.
         * @exception CoreException Thrown when the end of the file has been reached (code END_OF_FILE)
         * or a lexical error was detected while scanning (code LEXICAL_ERROR)
         */
        public int readNext(boolean ignoreComments) throws CoreException {
                int curr = 0;
                do {
                        try {
                                curr = fScanner.getNextToken();
                                if (curr == ITerminalSymbols.TokenNameEOF) {
                                        throw new CoreException(createError(END_OF_FILE, "End Of File", null)); //$NON-NLS-1$
                                }
                        } catch (InvalidInputException e) {
                                throw new CoreException(createError(LEXICAL_ERROR, e.getMessage(), e));
                          }
                }
                while (  ignoreComments && isComment(curr));
                return curr;
        }


Clone AbstractionParameter Count: 1Parameter Bindings

/**
         * @return Returns the length of the current token
         */
public int getCurrentLength() {
  return getCurrentEndOffset() - getCurrentStartOffset();
}

/**
         * Reads the next token.
         * @param ignoreComments If set, comments will be overread
         * @return Return the token id.
         * @exception CoreException Thrown when the end of the file has been reached (code END_OF_FILE)
         * or a lexical error was detected while scanning (code LEXICAL_ERROR)
         */
public int readNext(boolean ignoreComments) throws CoreException {
  int curr = 0;
  do {
    try {
      curr = [[#variable56fe78e0]].getNextToken();
      if (curr == ITerminalSymbols.TokenNameEOF) {
        throw new CoreException(createError(END_OF_FILE, "End Of File", null)); //$NON-NLS-1$
      }
    }
    catch (InvalidInputException e) {
      throw new CoreException(createError(LEXICAL_ERROR, e.getMessage(), e));
    }
  }
  while (ignoreComments && isComment(curr));
  return curr;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#56fe78e0]]
this.scanner 
12[[#56fe78e0]]
fScanner