[Demonstration 1]

[Buggy Method]
private Uri createMilestoneListToCSV(List<MilestonesDao> milestonesList) {
    String header = "\"Date\",\"Milestone\"\n";
    StringBuilder stringBuilder = new StringBuilder();
    for (MilestonesDao milestoneItem : milestonesList) {
        stringBuilder.append("\"" + milestoneItem.getDate() + "\",\"" + milestoneItem.getTitle() + "\",\"");
    }
    String combinedString = header + stringBuilder.toString();
    Log.d(TAG, "combined " + combinedString);
    File file = null;
    File root = Environment.getExternalStorageDirectory();
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy_MM_dd");
    if (root.canWrite()) {
        File dir = new File(root.getAbsolutePath() + "/MileStoneLogs");
        dir.mkdirs();
        file = new File(dir, simpleDateFormat.format(getStartTime()) + " to " + simpleDateFormat.format(getEndTime()) + "_milestones" + ".csv");
        FileOutputStream out = null;
        try {
            out = new FileOutputStream(file);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        try {
            out.write(combinedString.getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    return Uri.fromFile(file);
}

[Buggy Hunk]
+ milestoneItem.getTitle() + "\",\"");

[Patch]
+ milestoneItem.getTitle() + "\"\n");

[Demonstration 2]

[Buggy Method]
public void connect() {
    String host = control.view.tfSever.getText();
    String name = control.view.tfID.getText();
    if (host.equals(null) || name.equals(null)) {
        return;
    }
    try {
        socket = new Socket(host, PORT);
        in = new Scanner(socket.getInputStream());
        out = new PrintWriter(socket.getOutputStream());
    } catch (UnknownHostException uhe) {
        control.view.errors.setText(uhe.getMessage());
    } catch (IOException ioe) {
        control.view.errors.setText(ioe.getMessage());
    }
    thread = new ReadThread(in, control.view.result);
    thread.setName(name);
    thread.start();
    //change view
    control.view.sendButton.setEnabled(true);
    control.view.sendButton.setContentAreaFilled(true);
    control.view.setTitle(name);
    control.view.connectButton.setText("Disconnect");
    control.view.userInput.setText("");
}

[Buggy Hunk]
if (host.equals(null) || name.equals(null)) {

[Patch]
if (host.equals("") || name.equals("")) {

[Demonstration 3]

[Buggy Method]
@Override
public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
    FieldVisitor toDecorate = super.visitField(access, name, desc, signature, value);
    if ((access & Opcodes.ACC_STATIC) != 0) {
        Type type = Type.getType(desc);
        if (currentClass.getName().equals(type.getClassName())) {
            lookForGetter();
        }
    }
    return toDecorate;
}

[Buggy Hunk]
if (currentClass.getName().equals(type.getClassName())) {

[Patch]
if (currentClass.getName().equals(UMLParser.replaceDotsWithSlashes(type.getClassName()))) {