[Demonstration 1]

[Buggy Method]
private boolean checkDueDate() {
    boolean status = true;
    Date time = (Date) timeSpinner.getValue();
    Date jobDueDate = (Date) datePicker.getModel().getValue();
    if (time == null || jobDueDate == null) {
        SwingUtilities.invokeLater(new Runnable() {

            @Override
            public void run() {
                JOptionPane.showMessageDialog(null, "Invalid input for due date !!", "Error", JOptionPane.ERROR_MESSAGE);
            }
        });
        status = false;
    } else {
        Calendar c1 = Calendar.getInstance();
        Calendar c2 = Calendar.getInstance();
        c1.setTime(time);
        c2.setTime(jobDueDate);
        Calendar calTime = Calendar.getInstance();
        calTime.set(c2.get(Calendar.YEAR), c2.get(Calendar.MONTH), c2.get(Calendar.DAY_OF_MONTH), c1.get(Calendar.HOUR_OF_DAY), c1.get(Calendar.MINUTE), c1.get(Calendar.SECOND));
        if (calTime.getTimeInMillis() < System.currentTimeMillis()) {
            SwingUtilities.invokeLater(new Runnable() {

                @Override
                public void run() {
                    JOptionPane.showMessageDialog(null, "Please enter a due date after current Date.", "Error", JOptionPane.ERROR_MESSAGE);
                }
            });
            status = false;
        } else {
            populatingBatch.setDueDateByCustomer(calTime.getTime());
        }
    }
    return status;
}

[Buggy Hunk]
populatingBatch.setDueDateByCustomer(calTime.getTime());

[Patch]
populatingBatch.setExpectedDueDate(calTime.getTime().getTime());

[Demonstration 2]

[Buggy Method]
public void createRace(View view) {
    DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(this, "photocell_db", null);
    db = helper.getWritableDatabase();
    daoMaster = new DaoMaster(db);
    daoSession = daoMaster.newSession();
    raceDao = daoSession.getRaceDao();
    String type = spinner.getSelectedItem().toString();
    EditText editText = (EditText) findViewById(R.id.description);
    String description = editText.getText().toString();
    Race race = new Race(null, description, type);
    long RaceID = raceDao.insert(race);
    Timber.e("Created Race with ID: %s", RaceID);
    Timber.e("Created Race with Description: %s", race.getName());
    Timber.e("Created Race with Modus: %s", race.getType());
}

[Buggy Hunk]
Timber.e("Created Race with Description: %s", race.getName());

[Patch]
Timber.e("Created Race with Description: %s", race.getDescription());

[Demonstration 3]

[Buggy Method]
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
    holder.note.setText(alarms.get(position).getNote());
    holder.date.setText(formatDate(alarms.get(position).getDatetime()));
}

[Buggy Hunk]
holder.date.setText(formatDate(alarms.get(position).getDatetime()));

[Patch]
holder.date.setText(formatDate(holder.itemView.getContext(), alarms.get(position).getDatetime()));