[Demonstration 1]

[Buggy Method]
public List<String> getVideoFiles() {
    List<String> videoFiles = new ArrayList<String>();
    ;
    SQLiteDatabase db = this.getReadableDatabase();
    Cursor cursor = db.rawQuery("select video from mode", null);
    cursor.moveToFirst();
    String video = null;
    // fetch all guide_voice, video, bg, fg, blur img
    while (cursor.isAfterLast() == false) {
        video = cursor.getString(cursor.getColumnIndex("video"));
        if (video.length() != 0 && video != null && video != "null") {
            // add to List
            videoFiles.add(video);
        }
        cursor.moveToNext();
    }
    return videoFiles;
}

[Buggy Hunk]
List<String> videoFiles = new ArrayList<String>();;

[Patch]
List<String> videoFiles = new ArrayList<String>();

[Demonstration 2]

[Buggy Method]
public List<NameValuePair> parse(String line) {
    boolean inQuote = false;
    boolean inNamedArg = false;
    Character lastQuote = null;
    List<NameValuePair> results = Lists.newLinkedList();
    String currentArgName = null;
    StringBuilder currentSegment = new StringBuilder();
    for (int i = 0; i < line.length(); i++) {
        char currentChar = line.charAt(i);
        // If this character is an escape and the next character is a valid quote, then add the quote character to the current segment
        if (currentChar == escapeCharacter && i + 1 < line.length() && isQuote(line.charAt(i + 1))) {
            currentSegment.append(line.charAt(++i));
        } else if (isQuote(currentChar)) {
            if (inQuote) {
                // If segment is quoted and this is a closing quote, then close off this segment
                if (lastQuote == currentChar) {
                    lastQuote = null;
                    inQuote = false;
                    if (currentSegment.length() > 0) {
                        results.add(new BasicNameValuePair(inNamedArg ? currentArgName : "", currentSegment.toString()));
                        inNamedArg = false;
                        currentArgName = null;
                        currentSegment = new StringBuilder();
                    }
                } else {
                    // Otherwise, this is a quote character that wasn't used to open this segment so just add it.
                    currentSegment.append(currentChar);
                }
            } else {
                // If not currently in a quote, open a new segment
                if (!inNamedArg && currentSegment.length() > 0) {
                    results.add(new BasicNameValuePair("", currentSegment.toString()));
                    currentSegment = new StringBuilder();
                }
                lastQuote = currentChar;
                inQuote = true;
            }
        } else if (!inQuote && !inNamedArg && currentSegment.length() > 0 && currentChar == '=') {
            inNamedArg = true;
            currentArgName = currentSegment.toString();
            currentSegment = new StringBuilder();
        } else if (String.valueOf(currentChar).matches(separatorCharSetRegex)) {
            // If this is a separator, separate the segment if not in quotes
            if (inQuote) {
                currentSegment.append(currentChar);
            } else {
                if (currentSegment.length() > 0) {
                    results.add(new BasicNameValuePair(inNamedArg ? currentArgName : "", currentSegment.toString()));
                    inNamedArg = false;
                    currentArgName = null;
                    currentSegment = new StringBuilder();
                }
            }
        } else {
            // Otherwise, this is a regular character, just add to current segment
            currentSegment.append(currentChar);
        }
    }
    if (currentSegment.length() > 0) {
        results.add(new BasicNameValuePair("", currentSegment.toString()));
    }
    if (inQuote) {
        throw new IllegalArgumentException("Quotes are unbalanced.");
    }
    return results;
}

[Buggy Hunk]
results.add(new BasicNameValuePair("", currentSegment.toString()));

[Patch]
results.add(new BasicNameValuePair(inNamedArg ? currentArgName : "", currentSegment.toString()));

[Demonstration 3]

[Buggy Method]
public static void b() {
    Atracker.currentAtrackerMaster().trackerInfo("b", "kkkk", LEVEL.START);
    ;
}

[Buggy Hunk]
Atracker.currentAtrackerMaster().trackerInfo("b", "kkkk", LEVEL.START);;

[Patch]
Atracker.currentAtrackerMaster().trackerInfo("b", "kkkk", LEVEL.TRACK);;