[Demonstration 1]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    SharedPreferences sp = getSharedPreferences("Login", MODE_PRIVATE);
    String name = sp.getString("name", "");
    TextView textUser = (TextView) findViewById(R.id.user);
    if (name != null)
        textUser.setText(name);
    else {
        Intent log = new Intent(this, MainpageActivity.class);
        startActivity(log);
    }
    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG).setAction("Action", null).show();
        }
    });
    Button start = (Button) findViewById(R.id.start);
    start.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent i = new Intent(MainActivity.this, Game2.class);
            startActivity(i);
        }
    });
    Button difficult = (Button) findViewById(R.id.difficulty);
    difficult.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent i = new Intent(MainActivity.this, Difficulty.class);
            startActivity(i);
        }
    });
    Button help = (Button) findViewById(R.id.help);
    help.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent i = new Intent(MainActivity.this, Help.class);
            startActivity(i);
        }
    });
}

[Buggy Hunk]
if(name!=null)textUser.setText(name);

[Patch]
if(name!="")textUser.setText(name);

[Demonstration 2]

[Buggy Method]
@Transactional
@Override
public void save(Environment entity) {
    if (entity.isAcquiescent()) {
        environmentDAO.updateToNormal(entity.getApplication().getAppID());
    }
    environmentDAO.merge(entity);
}

[Buggy Hunk]
environmentDAO.merge(entity);

[Patch]
environmentDAO.merge(entity, "envName", "domain", "pushURL", "acquiescent");

[Demonstration 3]

[Buggy Method]
public Option getOption(T obj) {
    for (Option<T> opt : this) if (obj == opt.getKey())
        return opt;
    return null;
}

[Buggy Hunk]
public Option getOption(T obj)

[Patch]
public Option<T> getOption(T obj)