[Demonstration 1]

[Buggy Method]
public static void loadFile() {
    GameLogic gamelogic = scene.getGameLogic();
    Board boardinstance = gamelogic.getBoard();
    Scanner sc;
    int score2 = 0;
    try {
        sc = new Scanner(new File("savefile.txt"));
        String time = sc.nextLine();
        System.out.println(time);
        if (sc.hasNext()) {
            String score = sc.nextLine();
            score2 = Integer.parseInt(score);
            System.out.println(score);
        }
        Gem[][] board = new Gem[8][8];
        for (int row = 0; row < board.length; row++) {
            for (int col = 0; col < board.length; col++) {
                if (sc.hasNext()) {
                    String type = sc.nextLine();
                    System.out.println(type);
                    GemType gtype = GemType.typeFromString(type);
                    board[row][col] = new Gem(row, col, gtype);
                }
            }
        }
        String minutes = time.substring(0, time.indexOf(":"));
        String seconds = time.substring(time.length() - 2, time.length());
        System.out.println(minutes + " - " + seconds);
        int m = Integer.parseInt(minutes);
        int s = Integer.parseInt(seconds);
        int t = m * 60 + s;
        bejeweled.state.Time time2 = new bejeweled.state.Time(t);
        gamelogic.setTime(time2);
        gamelogic.setScore(score2);
        boardinstance.setGems(board);
    } catch (FileNotFoundException e) {
        System.out.println("Savefile was not found!");
    }
}

[Buggy Hunk]
gamelogic.setScore(score2);

[Patch]
gamelogic.getScoreObject().setScore(score2);

[Demonstration 2]

[Buggy Method]
@Override
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
    pos = position;
    Intent intent = new Intent(getApplicationContext(), WorkoutActivity.class);
    intent.putExtra("day", position);
    if (pos == 0) {
        startActivity(intent);
        Context context = getApplicationContext();
        CharSequence msg = "Calling Sunday Exercises";
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, msg, duration);
        toast.show();
    } else if (pos == 1) {
        startActivity(intent);
        Context context = getApplicationContext();
        CharSequence msg = "Calling Monday Exercises";
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, msg, duration);
        toast.show();
    } else if (pos == 2) {
        startActivity(intent);
        Context context = getApplicationContext();
        CharSequence msg = "Calling Tuesday Exercises";
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, msg, duration);
        toast.show();
    } else if (pos == 3) {
        startActivity(intent);
        Context context = getApplicationContext();
        CharSequence msg = "Calling Wednesday Exercises";
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, msg, duration);
        toast.show();
    } else if (pos == 4) {
        startActivity(intent);
        Context context = getApplicationContext();
        CharSequence msg = "Calling Thursday Exercises";
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, msg, duration);
        toast.show();
    } else if (pos == 5) {
        startActivity(intent);
        Context context = getApplicationContext();
        CharSequence msg = "Calling Friday Exercises";
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, msg, duration);
        toast.show();
    } else if (pos == 6) {
        startActivity(intent);
        Context context = getApplicationContext();
        CharSequence msg = "Calling Saturday Exercises";
        int duration = Toast.LENGTH_SHORT;
        Toast toast = Toast.makeText(context, msg, duration);
        toast.show();
    }
}

[Buggy Hunk]
intent.putExtra("day", position);

[Patch]
intent.putExtra(DAYOFWEEK, position);

[Demonstration 3]

[Buggy Method]
private Set<Gene> getGenesFromUniprot(edu.scripps.yates.utilities.proteomicsmodel.Protein protein) {
    if (protein.getPrimaryAccession().getAccessionType() != AccessionType.UNIPROT)
        return null;
    UniprotProteinRetriever upr = new UniprotProteinRetriever(null, UniprotProteinRetrievalSettings.getInstance().getUniprotReleasesFolder(), UniprotProteinRetrievalSettings.getInstance().isUseIndex());
    final String accession = protein.getAccession();
    final Map<String, edu.scripps.yates.utilities.proteomicsmodel.Protein> annotatedProtein = upr.getAnnotatedProtein(accession);
    if (annotatedProtein != null && !annotatedProtein.isEmpty()) {
        final String nonIsoFormaAcc = FastaParser.getNoIsoformAccession(accession);
        if (annotatedProtein.containsKey(accession) && annotatedProtein.get(accession) != null) {
            return annotatedProtein.get(accession).getGenes();
        } else if (annotatedProtein.containsKey(nonIsoFormaAcc)) {
            return annotatedProtein.get(nonIsoFormaAcc).getGenes();
        } else {
            log.info("check it out");
        }
    }
    return null;
}

[Buggy Hunk]
} else if (annotatedProtein.containsKey(nonIsoFormaAcc)) {

[Patch]
} else if (annotatedProtein.containsKey(nonIsoFormaAcc) && annotatedProtein.get(nonIsoFormaAcc) != null) {