<pre>
Comment:
LineComment
BlockComment
Javadoc
</pre>

@param comment the comment being recorded (cannot be <code>null</code>)
@param parentNode the {@link Node parent node} (cannot be <code>null</code>)
@throws Exception if there is a problem
978845
protected void record( final Comment comment,
                           final Node parentNode ) throws Exception {
        Node commentNode = null;
        String commentType = null;

        if (comment.isDocComment()) {
            commentNode = parentNode.addNode(ClassFileSequencerLexicon.JAVADOC, ClassFileSequencerLexicon.JAVADOC);
        } else {
            commentNode = parentNode.addNode(ClassFileSequencerLexicon.COMMENT, ClassFileSequencerLexicon.COMMENT);

            if (comment.isBlockComment()) {
                commentType = ClassFileSequencerLexicon.CommentType.BLOCK.toString();
            } else if (comment.isLineComment()) {
                commentType = ClassFileSequencerLexicon.CommentType.LINE.toString();
            } else {
                assert false;
                LOGGER.error(JavaFileI18n.unhandledCommentType, comment.getClass().getName());
            }

            commentNode.setProperty(ClassFileSequencerLexicon.COMMENT_TYPE, commentType);
        }

        final String code = getSourceCode(comment.getStartPosition(), comment.getLength());

        if (!StringUtil.isBlank(code)) {
            commentNode.setProperty(ClassFileSequencerLexicon.COMMENT, code);
        }

        recordSourceReference(comment, commentNode);
    }
357926
public boolean nextLineExceptComments() throws IOException {
    while(nextLine()) {
      if(comment == null || !comment.reset(buf).matches()) {
        tokenizer.initialize(buf, 0, buf.length());
        return true;
      }
    }
    return false;
  }
584036
function isCommentAtParentStart(token, nodeType) {
            const parent = getParentNodeOfToken(token);

            return parent && isParentNodeType(parent, nodeType) &&
                    token.loc.start.line - parent.loc.start.line === 1;
        }
922598
public static void setInternalComments(Node node, ParserRuleContext parserRuleContext, AdapterParameters adapterParameters) {
        BufferedTokenStream tokens = adapterParameters.getTokens();

        if (node == null || parserRuleContext == null || tokens == null) {
            throw new IllegalArgumentException("Parameters must not be null");
        }

        Token startToken = parserRuleContext.getStart();
        Token stopToken = parserRuleContext.getStop();

        List<Token> commentTokens;
        List<Comment> internalCommentList = new LinkedList<Comment>();

        // Checking to the right of the start token will check inside the statement
        commentTokens = tokens.getHiddenTokensToRight(startToken.getTokenIndex(), Java7Lexer.COMMENTS);
        if (commentTokens != null) {
            for (Token commentToken : commentTokens) {

                // Skip already claimed comments (prevents comment repeats)
                if (adapterParameters.isCommentTokenClaimed(commentToken.getTokenIndex())) {
                    continue;
                } else {
                    // Claim it
                    adapterParameters.claimCommentToken(commentToken.getTokenIndex());
                }

                if (commentToken.getText().startsWith("/**")) {
                    JavadocComment javadocComment = new JavadocComment(commentToken.getText());
                    internalCommentList.add(javadocComment);
                } else if (commentToken.getText().startsWith("/*")) {
                    BlockComment blockComment = new BlockComment(commentToken.getText());
                    internalCommentList.add(blockComment);
                } else if (commentToken.getText().startsWith("//")) {
                    LineComment lineComment = new LineComment(commentToken.getText());
                    internalCommentList.add(lineComment);
                }
            }
        }

        if (internalCommentList.size() > 0) {
            if (node.getInternalComments() != null) {
                node.getInternalComments().addAll(internalCommentList);
            } else {
                node.setInternalComments(internalCommentList);
            }
        }
    }
80921
public void comment(String comment) throws SAXException
    {
        flushPending();

        // Ignore if a lexical handler has not been set
        if (m_lexHandler != null)
        {
            final int len = comment.length();
            if (len > m_charsBuff.length)
            {
               m_charsBuff = new char[len*2 + 1];              
            }
            comment.getChars(0,len, m_charsBuff, 0);            
            m_lexHandler.comment(m_charsBuff, 0, len);
            // time to fire off comment event
            if (m_tracer != null)
                super.fireCommentEvent(m_charsBuff, 0, len);
        }

    }
663276
public static Parser<Void> blockComment(Parser<Void> begin, Parser<Void> end, Parser<?> commented) {
    return Parsers.sequence(begin, end.not().next(commented).skipMany(), end);
  }
663867
public final void mDOCUMENT_COMMENT() throws RecognitionException {
        try {
            int _type = DOCUMENT_COMMENT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // BELScript.g:253:17: ( '#' (~ ( '\\n' | '\\r' ) )* )
            // BELScript.g:254:5: '#' (~ ( '\\n' | '\\r' ) )*
            {
            match('#'); 
            // BELScript.g:254:9: (~ ( '\\n' | '\\r' ) )*
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( ((LA1_0>='\u0000' && LA1_0<='\t')||(LA1_0>='\u000B' && LA1_0<='\f')||(LA1_0>='\u000E' && LA1_0<='\uFFFF')) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // BELScript.g:254:9: ~ ( '\\n' | '\\r' )
            	    {
            	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
            	        input.consume();

            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;}


            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);

            _channel=HIDDEN;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
503026
function insertComment(data) {
    var parent = stack.top;
    if (foster_parent_mode && isA(parent, tablesectionrowSet)) {
      fosterParent(function(doc) { return doc.createComment(data); });
    } else {
      // "If the adjusted insertion location is inside a template element,
      // let it instead be inside the template element's template contents"
      if (parent instanceof impl.HTMLTemplateElement) {
        parent = parent.content;
      }
      parent._appendChild(parent.ownerDocument.createComment(data));
    }
  }
227954
private void parseComment() throws Exception {
        boolean saved = expandPE;

        expandPE = false;
        parseUntil(endDelimComment);
        require('>');
        expandPE = saved;
        handler.comment(dataBuffer, 0, dataBufferPos);
        dataBufferPos = 0;
    }
55554
public void updateComment(int commentId, CommentUpdate comment) {
		getResourceFactory().getApiResource("/comment/" + commentId)
				.entity(comment, MediaType.APPLICATION_JSON_TYPE).put();
	}
1366183
public void buildMemberComments(XMLNode node, Content annotationDocTree) {
        if(! configuration.nocomment){
            writer.addComments((MemberDoc) members.get(currentMemberIndex),
                    annotationDocTree);
        }
    }
811533
public void comment(char[] ch, int start, int length) throws SAXException {
		if (dtdRange) {
			// DTD section
			if (preserveDTD) {
				this.docTypeText += "<!--" + new String(ch, start, length)
						+ "-->";
			}
		} else {
			if (preserveComment) {
				try {
					encoder.encodeComment(ch, start, length);
				} catch (Exception e) {
					throw new SAXException("comment", e);
				}
			}
		}
	}
87215
public void setComment(final boolean comment) throws IllegalArgumentException {
        // Cannot have children
        if (this.children.size() > 0) {
            throw new IllegalArgumentException("Cannot mark a " + Node.class.getSimpleName()
                + " with children as a comment");
        }

        // Set
        this.comment = comment;
    }
1320026
def comment(node):
    
    parent = node.parentNode
    comment = node.ownerDocument.createComment(node.toxml())
    parent.replaceChild(comment, node)
    return comment
681332
function findJSDocComment(comments, line) {

    if (comments) {
        for (var i = comments.length - 1; i >= 0; i--) {
            if (comments[i].type === "Block" && comments[i].value.charAt(0) === "*") {

                if (line - comments[i].loc.end.line <= 1) {
                    return comments[i];
                }
                break;
            }
        }
    }

    return null;
}
600404
private void removeCommentNodes(Document doc) {
        List<Node> toRemove = new ArrayList<>();
        NodeList children = doc.getChildNodes();
        for (int cn = 0; cn < children.getLength(); cn++) {
            Node child = children.item(cn);
            if (Node.COMMENT_NODE == child.getNodeType()) {
                toRemove.add(child);
            }
        }
        for (Node child : toRemove) {
            doc.removeChild(child);
        }
    }
2912
def _do_comment(self, node):
        '''
        '''
        if not _in_subset(self.subset, node): return
        if self.comments:
            W = self.write
            if self.documentOrder == _GreaterElement: W('\n')
            W('<!--')
            W(node.data)
            W('-->')
            if self.documentOrder == _LesserElement: W('\n')