[Demonstration 1]

[Buggy Method]
public static void updateLanguage(Context context, String newLanguage) {
    Configuration configuration = new Configuration();
    String language = WAILSettings.getLanguage(context);
    String lang = lang(language);
    String newLang = lang(newLanguage);
    if (TextUtils.isEmpty(language) && newLanguage == null) {
        configuration.locale = Locale.getDefault();
    } else if (newLanguage != null) {
        configuration.locale = new Locale(newLang);
        WAILSettings.setLanguage(context, newLanguage);
    } else if (!TextUtils.isEmpty(language)) {
        configuration.locale = new Locale(lang);
    }
    context.getResources().updateConfiguration(configuration, null);
    if (newLang != null && !lang.equals(newLang)) {
        Intent intent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        context.startActivity(intent);
    }
}

[Buggy Hunk]
if (newLang != null && !lang.equals(newLang)) {

[Patch]
if (newLang != null && !newLang.equals(lang)) {

[Demonstration 2]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ((SpeculumApplication) getApplication()).createMainComponent(this).inject(this);
    Assent.setActivity(this, this);
    String objectKey = getIntent().getStringExtra(Constants.CONFIGURATION_IDENTIFIER);
    Configuration configuration = (Configuration) objectStore.pop(objectKey);
    boolean didLoadOldConfig = getIntent().getBooleanExtra(Constants.SAVED_CONFIGURATION_IDENTIFIER, false);
    ViewStub viewStub = configuration.isSimpleLayout() ? (ViewStub) findViewById(R.id.stub_simple) : (ViewStub) findViewById(R.id.stub_verbose);
    if (null != viewStub)
        viewStub.inflate();
    ButterKnife.bind(this);
    //never sleep
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    if (didLoadOldConfig)
        showConfigurationSnackbar();
    presenter.setConfiguration(configuration);
}

[Buggy Hunk]
Configuration configuration = (Configuration) objectStore.pop(objectKey);

[Patch]
Configuration configuration = (Configuration) objectStore.get(objectKey);

[Demonstration 3]

[Buggy Method]
public ArrayList<Post> getPosts(Profile profile, SearchFilter filter, int from) throws TimeoutException {
    if (filter == null)
        filter = new SearchFilter();
    this.elasticSearch.setFilter(filter);
    filter.addFieldValue(new FieldValue("posterId", profile.getId())).sortByDate();
    ArrayList<Post> result = this.elasticSearch.getNext(0);
    this.elasticSearch.setFilter(null);
    return result;
}

[Buggy Hunk]
ArrayList<Post> result = this.elasticSearch.getNext(0);

[Patch]
ArrayList<Post> result = this.elasticSearch.getNext(from);