[Demonstration 1]

[Buggy Method]
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();
    if (id == R.id.table) {
        Intent tobase = new Intent(MainActivity.this, TableActivity.class);
        startActivity(tobase);
    }
    if (id == R.id.remove_history) {
        if (list.isEmpty()) {
            Toast ERROR4 = Toast.makeText(getApplication(), R.string.error4, Toast.LENGTH_SHORT);
            ERROR4.show();
        } else {
            list.clear();
            adapter.notifyDataSetChanged();
        }
    }
    if (id == R.id.support) {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:roman@sezex.ru?subject=PXtoEM"));
        startActivity(intent);
    }
    if (id == R.id.info) {
        AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
        builder.setTitle(R.string.app_name).setCancelable(true).setMessage(getString(R.string.info)).setPositiveButton(R.string.web, new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int id) {
                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://sezex.ru/"));
                startActivity(intent);
            }
        }).setNegativeButton(R.string.source, new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int id) {
                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://github.com/sezoid/PXtoEM/"));
                startActivity(intent);
            }
        });
        AlertDialog Info = builder.create();
        Info.show();
    }
    return super.onOptionsItemSelected(item);
}

[Buggy Hunk]
R.string.error4, Toast.LENGTH_SHORT);

[Patch]
R.string.error4, Toast.LENGTH_LONG);

[Demonstration 2]

[Buggy Method]
@Override
public void delTeacher(Integer teacherId) {
    TeacherDTO dto = new TeacherDTO();
    dto.setId(teacherId);
    dto.setIsDeleted((short) 0);
    teacherDTOMapper.updateByPrimaryKeySelective(dto);
}

[Buggy Hunk]
dto.setIsDeleted((short)0);

[Patch]
dto.setIsDeleted((short)1);

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) throws SQLException {
    Connection conn = DriverManager.getConnection("jdbc:h2:./main");
    () -> {
    }.start();
    Statement stmt = conn.createStatement();
    stmt.execute("CREATE TABLE id IDENTITY, username VARCHAR, address VARCHAR, email VARCHAR");
}

[Buggy Hunk]
().start();

[Patch]
Server.createWebServer().start();