Cleans the doc comment. Returns null if the doc comment is null.
194006
private static function clean($doc)
    {
        if ($doc === null) {
            return null;
        }

        $result = null;
        $lines = preg_split('/\r/', $doc);
        foreach ($lines as $line) {

            $line = preg_replace('/^\s*\* /', '', trim($line, "\n/* \t\x0B\0"));
            if ($line === '') {
                continue;
            }

            if ($result != null) {
                $result .= ' ';
            }
            $result .= $line;
        }

        return $result;
    }
252734
public <T> void cleanNullReferencesAll() {
		for (Map<Object, Reference<Object>> objectMap : classMaps.values()) {
			cleanMap(objectMap);
		}
	}
825549
private function skipHiddenCaptureDocComment() {
    $token = $this->iterator->current();
    // Skip whitespace and comment
    while ($token && ($token->getType() === T_COMMENT || $token->getType() === T_WHITESPACE)) {
      $this->skipped[] = $token;
      $token = $this->iterator->next();
    }
    while ($token && $token instanceof DocCommentNode) {
      $this->skippedDocComment = [];
      $this->docComment = $token;
      $token = $this->iterator->next();
      while ($token && ($token->getType() === T_COMMENT || $token->getType() === T_WHITESPACE)) {
        $this->skippedDocComment[] = $token;
        $token = $this->iterator->next();
      }
      if ($token && $token instanceof DocCommentNode) {
        // Merge skippedDocComment with skipped
        $this->skipped[] = $this->docComment;
        $this->skipped = array_merge($this->skipped, $this->skippedDocComment);
      }
    }
  }
935174
def delete_comment(self, resource_id, ent_id):
        
        self.requester.post(
            '/{endpoint}/{entity}/{id}/delete_comment?id={ent_id}',
            endpoint=self.endpoint, entity=self.entity,
            id=resource_id, ent_id=ent_id
        )
750543
def cleanup_nodes(doc):
    
    for node in doc.documentElement.childNodes:
        if node.nodeType == Node.TEXT_NODE and node.nodeValue.isspace():
            doc.documentElement.removeChild(node)
    return doc
1127010
def unshift_documents(comments)
      doc_comments, other_comments = comments.partition(&:document?)
      doc_comments.reverse_each { |comment| @comments.unshift(comment) }
      other_comments
    end
67482
private function cleanAnnotations($comment)
    {
        $comment = trim(
            preg_replace(
                '#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u',
                '$1',
                $comment
            )
        );

        // reg ex above is not able to remove */ from a single line docblock
        if (substr($comment, -2) == '*/') {
            $comment = trim(substr($comment, 0, -2));
        }

        // normalize strings
        $comment = str_replace(["\r\n", "\r"], "\n", $comment);

        return $comment;
    }
839591
def clean(ctx, dry_run=False):
    """"""
    basedir = ctx.sphinx.destdir or "build/docs"
    cleanup_dirs([basedir], dry_run=dry_run)
1020105
private String removeHeaderComments(String fileContent, SortedSet<Comment> comments) {
        String headerlessFileContent = fileContent;
        for (Comment comment : comments) {
            String commentValue = comment.getValue();
            if (headerlessFileContent.startsWith(commentValue)) {
                headerlessFileContent = headerlessFileContent.replace(commentValue, EMPTY_STRING);
                // remove all leading white spaces and new line characters
                while (StringUtils.isNotBlank(headerlessFileContent) && Character.isWhitespace(headerlessFileContent.charAt(0))) {
                    headerlessFileContent = headerlessFileContent.substring(1);
                }
            } else {
                // finished removing all header comments
                break;
            }
        }
        return headerlessFileContent;
    }
616136
function cleanDocs(docs) {
  for (var i = 0; i < docs.length; i++) {
    var doc = docs[i];
    if (doc._deleted) {
      delete doc._attachments; // ignore atts for deleted docs
    } else if (doc._attachments) {
      // filter out extraneous keys from _attachments
      var atts = Object.keys(doc._attachments);
      for (var j = 0; j < atts.length; j++) {
        var att = atts[j];
        doc._attachments[att] = pouchdbUtils.pick(doc._attachments[att],
          ['data', 'digest', 'content_type', 'length', 'revpos', 'stub']);
      }
    }
  }
}
1162998
function stripTrailingComment(line, comment) {

            // loc.column is zero-indexed
            return line.slice(0, comment.loc.start.column).replace(/\s+$/u, "");
        }
777006
@Override
  public void cleanup() {
    // @formatter:off
    this
      .setMLSupporter(null)
      .setStatisticsSupporter(null)
      .setIndexingHandler(null)
      .setJoinsHandler(null)
      .setMetaDataHandler(null)
      .setMiscellanyHandler(null)
      .setMissingDataHandler(null)
      .setMutabilityHandler(null)
      .setSqlHandler(null)
      .setPersistenceHandler(null)
      .setRepresentationHandler(null)
      .setReshapingHandler(null)
      .setSchemaHandler(null)
      .setStreamingDataHandler(null)
      .setTimeSeriesHandler(null)
      ;
    // @formatter:on
  }
207128
def _doCleanup(self):
        
        # pass on this if we're not configured yet
        if not self.configured_url:
            return

        d = self.changes.pruneChanges(self.master.config.changeHorizon)
        d.addErrback(log.err, 'while pruning changes')
        return d
258048
private String removeCommentsFromInput(BufferedReader in) throws IOException {
	  String l = in.readLine();
	  //remove lines that start with a comment
	  while(l.startsWith("#")){
	    l = in.readLine();
	  }
	  if(l.contains("#")){
	    l = l.substring(0, l.indexOf("#"));
	  }
	  return l.trim();
  }
579560
public static function cleanComment($comment, $glueSeparator = ',', $uniqueValues = true)
    {
        if (!is_scalar($comment) && !is_array($comment)) {
            return '';
        }
        return trim(str_replace('*/', '*[:slash:]', is_scalar($comment) ? $comment : implode($glueSeparator, $uniqueValues ? array_unique($comment) : $comment)));
    }
1159777
def clean_up
        @doc.css(".ess-separator").remove
        @doc.css("@title").remove
        @doc.css("@onclick").remove
        @doc.css("@tabindex").remove
        @doc.css(".ess-label-hits").remove
        @doc.css(".ess-clear").remove
      end
1075933
public function emptyTrash()
    {
        $this->loadModel('Comment.Comments');
        $this->Comments->deleteAll(['Comments.status' => 'trash', 'Comments.table_alias' => $this->_manageTable]);
        $this->Flash->success(__d('comment', 'All comments in trash were successfully removed!'));
        $this->title(__d('comment', 'Empty Trash'));
        $this->redirect($this->referer());
    }