[Demonstration 1]

[Buggy Method]
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeObject(hiToBitmap);
}

[Buggy Hunk]
out.writeObject(hiToBitmap);

[Patch]
out.writeObject(highToBitmap);

[Demonstration 2]

[Buggy Method]
public Object readResolve() {
    if (graphConfiguration == null) {
        graphConfiguration = new ArrayList<>();
    }
    if (getParserUniqueName() == null || getParserUniqueName() == null) {
        logger.log(Level.FINE, "Entering 1.x compatibility block, assigning name: Default");
        setParserUniqueName("Default");
    }
    return this;
}

[Buggy Hunk]
if (getParserUniqueName() == null || getParserUniqueName() == null) {

[Patch]
if (getParserUniqueName() == null) {

[Demonstration 3]

[Buggy Method]
public boolean isSemanticsValid() throws Exception {
    if (this.semantics == null) {
        this.generateSpecificSemantics();
    }
    final SpecificSemantics sem = SpecificSemantics.instantiate(this.semantics);
    String run = "run System for " + ConfigurationManager.getAlloyRunScope();
    String scopes = " but ";
    final int ws = AlloyUtil.getWinScope(this.semantics);
    scopes += ws + " Window";
    final int aws = AlloyUtil.getAWScope(this.semantics);
    final int vs = AlloyUtil.getValueScope(this.semantics);
    final int iws = AlloyUtil.getIWScope(this.semantics);
    final int sws = AlloyUtil.getSWScope(this.semantics);
    if (aws > -1) {
        scopes += "," + aws + " Action_widget";
    }
    if (iws > -1) {
        scopes += "," + iws + " Input_widget";
    }
    if (sws > -1) {
        scopes += "," + sws + " Selectable_widget";
    }
    if (vs > -1) {
        scopes += "," + (vs + (ConfigurationManager.getAlloyRunScope() * 2 / 3)) + " Value";
    }
    run = run + scopes;
    // System.out.println("validating");
    sem.addRun_command(run);
    // System.out.println(sem);
    // System.out.println(sem.toString());
    final Module mod = AlloyUtil.compileAlloyModel(sem.toString());
    return AlloyUtil.runCommand(mod, mod.getAllCommands().get(0)).satisfiable();
}

[Buggy Hunk]
scopes += "," + (vs + (ConfigurationManager.getAlloyRunScope() * 2 / 3)) + " Value";

[Patch]
scopes += "," + (vs + (ConfigurationManager.getAlloyRunScope() * 1 / 2)) + " Value";