How can I change comment text to "DELETED" instead of actually deleting the comment?
I use module Comment Delete, rewritten for Drupal 7.
Here is the code that is responsible for what you need:

$num_replies = db_query('SELECT COUNT(cid) FROM {comment} WHERE pid = :cid AND status = :status', array(':cid' =&gt; $comment-&gt;cid, ':status' =&gt; COMMENT_PUBLISHED))-&gt;fetchField();
if ($num_replies) {
  $comment-&gt;comment_body[LANGUAGE_NONE][0]['value'] = t('[The comment subject/body has been deleted, all replies will remain]');
  comment_save($comment);
  drupal_set_message(t('The comment subject/body has been deleted, all replies will remain.'));
}
else {
  comment_delete($comment-&gt;cid);
  drupal_set_message(t('The comment has been deleted.'));
}