CloneSet710


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
37250.962class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1353895
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
2374262
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
Clone Instance
1
Line Count
35
Source Line
3895
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java

        /**
         * This method is used to set the right end position for expression
         * statement. The actual AST nodes don't include the trailing semicolon.
         * This method fixes the length of the corresponding node.
         */
        protected void retrieveColonPosition(ASTNode node) {
                int start = node.getStartPosition();
                int length = node.getLength();
                int end = start + length;
                this.scanner.resetTo(end, this.compilationUnitSourceLength);
                try {
                        int token;
                        while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
                                switch (token) {
                                        case TerminalTokens.TokenNameCOLON:
                                                node.setSourceRange(start, this.scanner.currentPosition - start);
                                                return;
                                      }
                        }
                } catch (InvalidInputException e) {
                        // ignore
                  }
        }

        /**
         * This method is used to retrieve the start position of the Ellipsis
         */
        protected int retrieveEllipsisStartPosition(int start, int end) {
                this.scanner.resetTo(start, end);
                try {
                        int token;
                        while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
                                switch (token) {
                                        case TerminalTokens.TokenNameELLIPSIS:
                                                return this.scanner.startPosition - 1;
                                      }
                        }
                } catch (InvalidInputException e) {
                        // ignore
                  }
                return -1;
        }


Clone Instance
2
Line Count
37
Source Line
4262
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java

        /*
         * This method is used to set the right end position for expression
         * statement. The actual AST nodes don't include the trailing semicolon.
         * This method fixes the length of the corresponding node.
         */
        protected void retrieveSemiColonPosition(ASTNode node) {
                int start = node.getStartPosition();
                int length = node.getLength();
                int end = start + length;
                this.scanner.resetTo(end, this.compilationUnitSourceLength);
                try {
                        int token;
                        while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
                                switch (token) {
                                        case TerminalTokens.TokenNameSEMICOLON:
                                                node.setSourceRange(start, this.scanner.currentPosition - start);
                                                return;
                                      }
                        }
                } catch (InvalidInputException e) {
                        // ignore
                  }
        }

        /**
         * This method is used to retrieve the start position of the block.
         * @return int the dimension found, -1 if none
         */
        protected int retrieveStartBlockPosition(int start, int end) {
                this.scanner.resetTo(start, end);
                try {
                        int token;
                        while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
                                switch (token) {
                                        case TerminalTokens.TokenNameLBRACE: //110
                                                return this.scanner.startPosition;
                                      }
                        }
                } catch (InvalidInputException e) {
                        // ignore
                  }
                return -1;
        }


Clone AbstractionParameter Count: 5Parameter Bindings

/*
         * This method is used to set the right end position for expression
         * statement. The actual AST nodes don't include the trailing semicolon.
         * This method fixes the length of the corresponding node.
         */
/**
         * This method is used to set the right end position for expression
         * statement. The actual AST nodes don't include the trailing semicolon.
         * This method fixes the length of the corresponding node.
         */
protected void [[#variable57adf320]](ASTNode node) {
  int start = node.getStartPosition();
  int length = node.getLength();
  int end = start + length;
  this.scanner.resetTo(end, this.compilationUnitSourceLength);
  try {
    int token;
    while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
      switch (token) {
        case TerminalTokens. [[#variable57adf280]]:
          node.setSourceRange(start, this.scanner.currentPosition - start);
          return;
      }
    }
  }
  catch (InvalidInputException e) {
  // ignore
  }
}

/**
         * This method is used to retrieve the start position of the block.
         * @return int the dimension found, -1 if none
         */
/**
         * This method is used to retrieve the start position of the Ellipsis
         */
protected int  [[#variable57adf200]](int start, int end) {
  this.scanner.resetTo(start, end);
  try {
    int token;
    while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
      switch (token) {
        case TerminalTokens. [[#variable57adf1c0]]: //110
          return [[#variable57adf1a0]];
      }
    }
  }
  catch (InvalidInputException e) {
  // ignore
  }
  return -1;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#57adf320]]
retrieveSemiColonPosition 
12[[#57adf320]]
retrieveColonPosition 
21[[#57adf280]]
TokenNameSEMICOLON 
22[[#57adf280]]
TokenNameCOLON 
31[[#57adf200]]
retrieveStartBlockPosition 
32[[#57adf200]]
retrieveEllipsisStartPosition 
41[[#57adf1c0]]
TokenNameLBRACE 
42[[#57adf1c0]]
TokenNameELLIPSIS 
51[[#57adf1a0]]
this.scanner.startPosition 
52[[#57adf1a0]]
this.scanner.startPosition - 1