[Demonstration 1]

[Buggy Method]
public void addTag(Tag tag) {
    this.tags.add(tag);
    sortTags();
}

[Buggy Hunk]
public void addTag(Tag tag) {

[Patch]
public void addTag(final Tag tag) {

[Demonstration 2]

[Buggy Method]
@Override
public TreeSet<Tag> getRankingTags(List<Topic> topK) throws IOException, SolrServerException {
    TreeSet<Tag> tags = new TreeSet<>(new TagComparator());
    List<Tag> lists = getAllTags();
    double maxScore = 0;
    for (Tag tag : lists) {
        tag.setTagRawCount(questionRepository.getTotalTermFrequency(tag.getTagName()));
        tag.calculateITScore(topK, lists.size());
        maxScore = Math.max(maxScore, tag.getScore());
        tags.add(tag);
    }
    for (Tag tag : tags) {
        tag.normalizeScore(maxScore);
    }
    return tags;
}

[Buggy Hunk]
tag.calculateITScore(topK, lists.size());

[Patch]
tag.calculateITScore(topK, lists.size(), questionRepository);

[Demonstration 3]

[Buggy Method]
private void deleteCase1(final Node node, final int level, final int deletePosition) {
    if (level == height - 1 && node.length > M / 2) {
        deleteLeafPosition(node, deletePosition);
    } else {
        deleteCase2(node, level, deletePosition);
    }
}

[Buggy Hunk]
deleteLeafPosition(node, deletePosition);

[Patch]
deletePositionWithRightChild(node, deletePosition);