[Demonstration 1]

[Buggy Method]
@Override
public void deletePathway(String classId, String pathwayGooruOid, User user) {
    final List<CollectionItem> collectionItems = this.getCollectionRepository().getCollectionItemByParentId(pathwayGooruOid, null, null);
    for (CollectionItem item : collectionItems) {
        this.deleteCollectionItem(item.getCollectionItemId(), user);
    }
    this.getCollectionService().deleteCollection(pathwayGooruOid, user);
    getAsyncExecutor().deleteFromCache("v2-class-data-" + classId + "*");
}

[Buggy Hunk]
this.deleteCollectionItem(item.getCollectionItemId(), user);

[Patch]
this.deleteCollectionItem(item.getCollectionItemId(), user, true);

[Demonstration 2]

[Buggy Method]
@Override
public int compare(String a, String b) {
    Integer x = base.get(a);
    Integer y = base.get(b);
    if (x.equals(y)) {
        return -1 * a.compareTo(b);
    }
    return -1 * x.compareTo(y);
}

[Buggy Hunk]
return -1 * a.compareTo(b);

[Patch]
return a.compareTo(b);

[Demonstration 3]

[Buggy Method]
private static boolean isnDiagonal(Node start, Node end) {
    return (start.x - end.x == 0 && start.y - end.y == 0) ? false : true;
}

[Buggy Hunk]
return (start.x-end.x==0&&start.y-end.y==0) ? false: true;

[Patch]
return ((start.x==end.x&&!(start.y==end.y))||((!(start.x==end.x)&&start.y==end.y))) ? true: false;