private void removeMethodOCNI(MethodDeclaration method) {
    int methodStart = method.getStartPosition();
    String src = unit.getSource().substring(methodStart, methodStart + method.getLength());
    if (src.contains("/*-[")) {
      int ocniStart = methodStart + src.indexOf("/*-[");
      Iterator<Comment> commentsIter = unit.getCommentList().iterator();
      while (commentsIter.hasNext()) {
        Comment comment = commentsIter.next();
        if (comment.isBlockComment() && comment.getStartPosition() == ocniStart) {
          commentsIter.remove();
          break;
        }
      }
    }
  }
private void removeMethodOCNI ( MethodDeclaration method ) { int methodStart = method . getStartPosition ( ) ; String src = unit . getSource ( ) . substring ( methodStart , methodStart + method . getLength ( ) ) ; if ( src . contains ( "/*-[" ) ) { int ocniStart = methodStart + src . indexOf ( "/*-[" ) ; Iterator < Comment > commentsIter = unit . getCommentList ( ) . iterator ( ) ; while ( commentsIter . hasNext ( ) ) { Comment comment = commentsIter . next ( ) ; if ( comment . isBlockComment ( ) && comment . getStartPosition ( ) == ocniStart ) { commentsIter . remove ( ) ; break ; } } } }
Remove the OCNI comment associated with a native method, if it exists.