/*
Writes an xml comment with the data enclosed

(non-Javadoc)

@see javax.xml.stream.XMLStreamWriter#writeComment(java.lang.String)
432707
public void writeComment(String data) throws XMLStreamException {
		if (preserveComment) {
			try {
				this.checkPendingATEvents();
				// TODO improve EXI API
				char[] chars = data.toCharArray();
				encoder.encodeComment(chars, 0, chars.length);
			} catch (Exception e) {
				throw new XMLStreamException(e.getLocalizedMessage(), e);
			}
		}
	}
527213
private int _readXMLComment (final Line firstLine, final int start)
  {
    Line line = firstLine;
    if (start + 3 < line.m_sValue.length ())
    {
      if (line.m_sValue.charAt (2) == '-' && line.m_sValue.charAt (3) == '-')
      {
        int pos = start + 4;
        while (line != null)
        {
          while (pos < line.m_sValue.length () && line.m_sValue.charAt (pos) != '-')
          {
            pos++;
          }
          if (pos == line.m_sValue.length ())
          {
            line = line.m_aNext;
            pos = 0;
          }
          else
          {
            if (pos + 2 < line.m_sValue.length ())
            {
              if (line.m_sValue.charAt (pos + 1) == '-' && line.m_sValue.charAt (pos + 2) == '>')
              {
                m_aXmlEndLine = line;
                return pos + 3;
              }
            }
            pos++;
          }
        }
      }
    }
    return -1;
  }
862003
protected void serializeComment(Comment node) throws SAXException {
        // comments=true
        if ((fFeatures & COMMENTS) != 0) {
            String data = node.getData();

            // well-formed=true
            if ((fFeatures & WELLFORMED) != 0) {
                isCommentWellFormed(data);
            }

            if (fLexicalHandler != null) {
                // apply the LSSerializer filter after the operations requested by the 
                // DOMConfiguration parameters have been applied 
                if (!applyFilter(node, NodeFilter.SHOW_COMMENT)) {
                    return;
                }

                fLexicalHandler.comment(data.toCharArray(), 0, data.length());
            }
        }
    }
698860
public void addComment(String tag, String comment) {
        String nt = normaliseTag(tag);
        if(! comments.containsKey(nt)) {
            comments.put(nt, new ArrayList<String>());
        }
        comments.get(nt).add(comment);
    }
733798
private void _comment() throws
      IOException,
      CssException
  {
    if (debug)
    {
      checkState(reader.curChar == '/' && reader.peek() == '*');
    }
    /*
       * badcomment1 \/\*[^*]*\*+([^/*][^*]*\*+)* badcomment2
       * \/\*[^*]*(\*+[^/*][^*]*)* comment \/\*[^*]*\*+([^/*][^*]*\*+)*\/
       *
       *
       * "comments can not nest" just close at first occurrence of comment
       * close and let the grammar level handle reporting
       */

    builder.type = Type.COMMENT;

    reader.next(); // '*'

    while (true)
    {
      Mark mark = reader.mark();
      int ch = reader.next();
      if (ch == -1)
      {
        builder.error(SCANNER_PREMATURE_EOF, reader);
        reader.unread(ch, mark);
        break;
      }
      else if (ch == '*' && reader.peek() == '/')
      {
        reader.next();
        break;
      }
      else
      {
        builder.append(ch);
      }
    }

    if (debug && builder.errors.size() < 1)
    {
      checkState('/' == reader.curChar && '*' == reader.prevChar);
    }

  }
131313
public static void addComment(TapElement element, String comment) {
        if (comment != null && comment.trim().length() > 0) {
            element.setComment(new Comment(comment, true));
        }
    }
927822
public static StringBuffer appendComment(StringBuffer buffer, String comment)
	{
		StringBuffer _buffer = initStringBufferIfNecessary(buffer);
		return doAppendComment(_buffer, comment);
	}
195069
def extract_cncomment_xml(comment):
    

    comment = comment.replace(' xmlns="http://www.asam.net/mdf/v4"', "")
    try:
        comment = ET.fromstring(comment)
        match = comment.find(".//TX")
        if match is None:
            common_properties = comment.find(".//common_properties")
            if common_properties is not None:
                comment = []
                for e in common_properties:
                    field = f'{e.get("name")}: {e.text}'
                    comment.append(field)
                comment = "\n".join(field)
            else:
                comment = ""
        else:
            comment = match.text or ""
    except ET.ParseError:
        pass

    return comment
1224112
Comment comment() {
        if (comment == null) {
            String d = documentation();
            if (env.javaScriptScanner != null) {
                env.javaScriptScanner.parse(d, new JavaScriptScanner.Reporter() {
                    @Override
                    public void report() {
                        env.error(DocImpl.this, "javadoc.JavaScript_in_comment");
                        throw new FatalError();
                    }
                });
            }
            if (env.doclint != null
                    && treePath != null
                    && env.shouldCheck(treePath.getCompilationUnit())
                    && d.equals(getCommentText(treePath))) {
                env.doclint.scan(treePath);
            }
            comment = new Comment(this, d);
        }
        return comment;
    }
384749
public void editComment(String commentId, String commentText) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_EDIT_COMMENT);

        parameters.put("comment_id", commentId);
        parameters.put("comment_text", commentText);

        // Note: This method requires an HTTP POST request.
        Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        // This method has no specific response - It returns an empty
        // sucess response if it completes without error.
    }
1137374
def comment (self, s, **args):
        
        self.write(u"-- ")
        self.writeln(s=s, **args)
809663
public void write(XMLStreamWriter writer) throws XMLStreamException {
      for (Attribute<?> attr : attributes.values()) {
         if (attr.isPersistent())
            attr.write(writer, attr.getAttributeDefinition().xmlName());
      }
   }
612136
def write_comment(self, comment):
        
        self._FITS.write_comment(self._ext+1, str(comment))
1209829
public void write(XMLStreamWriter writer, String xmlElementName) throws XMLStreamException {
      if (isModified()) {
         writer.writeStartElement(xmlElementName);
         write(writer);
         writer.writeEndElement();
      }
   }
329153
public void addInlineDeprecatedComment(Element e, DocTree tag, Content htmltree) {
        CommentHelper ch = utils.getCommentHelper(e);
        addCommentTags(e, ch.getBody(configuration, tag), true, false, htmltree);
    }
411624
public void comment(String data) throws SAXException
    {
        m_docIsEmpty = false;
        
        final int length = data.length();
        if (length > m_charsBuff.length)
        {
            m_charsBuff = new char[length * 2 + 1];
        }
        data.getChars(0, length, m_charsBuff, 0);
        comment(m_charsBuff, 0, length);
    }
1335677
def _comment(self, element):
        """"""
        for v in _get_xml_version(element):
            self.versions[v].comment = element.text