[Demonstration 1]

[Buggy Method]
public CommandContainerBuilder executeCommand(Command command) {
    if (command != null) {
        throw new IllegalStateException("Can only execute one command.");
    }
    options.command = command;
    return this;
}

[Buggy Hunk]
if (command != null) {

[Patch]
if (options.command != null) {

[Demonstration 2]

[Buggy Method]
public final ContactListDialog newInstance(final Context context, final String title, final Object[] elements) {
    Bundle args = new Bundle();
    args.putString("title", title);
    ContactListDialog fragment = new ContactListDialog();
    fragment.context = context;
    fragment.setArguments(args);
    fragment.elements = elements;
    return fragment;
}

[Buggy Hunk]
public final ContactListDialog newInstance(final Context context, final String title, final Object[] elements) {

[Patch]
public static ContactListDialog newInstance(final Context context, final String title, final Object[] elements) {

[Demonstration 3]

[Buggy Method]
public void selectDrawerItem(MenuItem menuItem) {
    Fragment fragment;
    switch(menuItem.getItemId()) {
        case R.id.nav_first_fragment:
            fragment = new MovieListFragment();
            break;
        case R.id.nav_second_fragment:
            fragment = new HomeFragment();
            break;
        case R.id.nav_third_fragment:
            fragment = new HomeFragment();
            break;
        default:
            fragment = new HomeFragment();
    }
    changeFragment(fragment, true);
    menuItem.setChecked(true);
    setTitle(menuItem.getTitle());
    mDrawer.closeDrawers();
}

[Buggy Hunk]
fragment = new HomeFragment();

[Patch]
fragment = new RecentItemsFragment();