[Demonstration 1]

[Buggy Method]
public static void main(String[] args) throws InterruptedException {
    // TODO Auto-generated method stub
    int i = 0;
    while (true) {
        //每隔两秒log输出一下当前系统时间戳
        Long d = new Date().getTime();
        System.out.println(i++);
        logger.info(String.valueOf(i));
        /*            if (i%300 == 0)
            	Thread.sleep(5000);  */
        if (i == 300) {
            return;
        }
    }
}

[Buggy Hunk]
logger.info(String.valueOf(i));

[Patch]
logger.info(String.valueOf(i)+"*******************************");

[Demonstration 2]

[Buggy Method]
public boolean add(int index, T value) {
    int currentIndex = 0;
    LNode<T> temp = head;
    LNode<T> next = new LNode<T>(value);
    if (currentIndex == 0) {
        next.setNext(head);
        head = next;
    } else {
        while (currentIndex + 1 < index && temp.getNext() != null) {
            currentIndex++;
            temp = temp.getNext();
        }
        if (currentIndex + 1 != index)
            throw new IndexOutOfBoundsException();
        if (temp == tail)
            tail = next;
        next.setNext(temp.getNext());
        temp.setNext(next);
        size++;
    }
    return true;
}

[Buggy Hunk]
if (currentIndex == 0){

[Patch]
if (index == 0){

[Demonstration 3]

[Buggy Method]
@Override
public final XmlStringBuilder toXML() {
    XmlStringBuilder xml = new XmlStringBuilder(this);
    addExtraAttributes(xml);
    if (candidates.isEmpty() && infos.isEmpty()) {
        xml.closeEmptyElement();
    } else {
        xml.rightAngleBracket();
        xml.append(candidates);
        xml.optElement(info);
        xml.closeElement(this);
    }
    return xml;
}

[Buggy Hunk]
if (candidates.isEmpty() && infos.isEmpty()) {

[Patch]
if (candidates.isEmpty() && info == null) {