[Demonstration 1]

[Buggy Method]
@Override
public void initialize(URL location, ResourceBundle resources) {
    saveDataEntryFieldsIntoSet();
    if (bl == null) {
        bl = BL.getInstance();
    }
    // fetch all photographers from DB into the photographerList
    List<PhotographerModel> photographerModels = null;
    try {
        photographerModels = (List) bl.getPhotographers();
    } catch (Exception e) {
        e.printStackTrace();
    }
    if (photographerList == null) {
        photographerList = PhotographerListPM.getInstance(photographerModels);
    }
    updatePhotographersList();
    makeTextfieldsEditable(false);
    editButton.setDisable(true);
    saveButton.setDisable(true);
    deleteButton.setDisable(true);
}

[Buggy Hunk]
photographerModels = (List) bl.getPhotographers();

[Patch]
photographerModels = (List<PhotographerModel>) bl.getPhotographers();

[Demonstration 2]

[Buggy Method]
@Override
public OffloadableData run(OffloadableData offloadableData) {
    int N = (Integer) offloadableData.getData("nqueen_data");
    int[] a = new int[N];
    enumerate(a, 0);
    offloadableData.putData("result_data", counter);
    return offloadableData;
}

[Buggy Hunk]
offloadableData.putData("result_data", counter);

[Patch]
offloadableData.putData("result_data", String.valueOf(counter));