anchor.diff:      currentEditor.commentVisualsByLine = {};
       setAnnotations(currentEditor, $(editor).data('file-id'));
       currentEditor.on("guttermousedown", handleSidebarClick);
  -  });
  -
  -  function cleanupPopovers() {
  -    // remove all possible popovers
  -    $('.editor > .ace_gutter > .ace_gutter-layer > .ace_gutter-cell').popover('destroy');
  -  }
  +    currentEditor.on("guttermousemove", showPopover);
  +  });
   
     function preprocess(commentText) {
       // sanitize comments to deal with XSS attacks:
       commentText = $('div.sanitizer').text(commentText).html();
       // display original line breaks:
       return commentText.replace(/\n/g, '<br>');
  -  }
  -
  -  function clusterComments(comments) {
  -    var clusters = {};
  -    // comments need to be sorted to cluster them per line
  -    comments.sort(function (a, b) {
  -      return a.row - b.row;
  -    });
  -    while (comments.length > 0) {
  -      // new cluster of comments
  -      var cluster = [];
  -      var clusterRow = comments[0].row;
  -      // now collect all comments on this line
  -      while (comments.length > 0 && comments[0].row === clusterRow) {
  -          cluster.push(comments.shift());
  -      }
  -      // sort the comments by creation date
  -      cluster = cluster.sort(function (a, b) {
  -        return a.id - b.id;
  -      });
  -      clusters[clusterRow] = cluster;
  -    }
  -    return clusters;
     }
   
     function generateCommentHtmlContent(comments) {
  
positive.code:       method: 'POST',
        url:  "/comments"
      });
      jqxhr.done(function(response){
        setAnnotations(editor, file_id);
      });
      jqxhr.fail(ajaxError);
  
negative.code:     return htmlContent;
    }
  
    function buildPopover(comments, where) {
      // only display the newest three comments in preview
      var maxComments = 3;
      var htmlContent = generateCommentHtmlContent(comments.reverse().slice(0, maxComments));
      if (comments.length > maxComments) {
        // add a hint that there are more comments than shown here
        htmlContent += '<div class="popover-footer"><%= t('request_for_comments.click_for_more_comments') %></div>'
          .replace('${numComments}', String(comments.length - maxComments));
      }
      where.popover({
        content: htmlContent,
        html: true, // necessary to style comments. XSS is not possible due to comment pre-processing (sanitizing)
        trigger: 'manual', // can only be triggered by $(where).popover('show' | 'hide')
        container: 'body'
      });
    }
  