[Demonstration 1]

[Buggy Method]
public static OfflinePlayer getOfflinePlayer(String playerNameOrUUID) {
    OfflinePlayer player = tryGetFromUUID(playerNameOrUUID);
    if (player != null) {
        return player;
    }
    player = Bukkit.getServer().getPlayer(playerNameOrUUID);
    if (player == null) {
        player = Bukkit.getServer().getOfflinePlayer(playerNameOrUUID);
    }
    if ((player != null) && !player.hasPlayedBefore()) {
        return null;
    }
    return player;
}

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

[Patch]
if (player != null && player.hasPlayedBefore()) {

[Demonstration 2]

[Buggy Method]
public void updateFitness(boolean hasWon, long elapsedTime) {
    timeList.add(elapsedTime);
    if (hasWon) {
        wins++;
    } else {
        losses++;
    }
    if (wins + losses >= NUM_GAMES_FOR_FITNESS_EVAL) {
        long avgTime = (long) 0.0;
        for (long time : timeList) {
            avgTime += time;
        }
        avgTime /= timeList.size();
        fitness = ((wins * 1.0) / ((wins + losses) * 1.0)) * .8 + ((double) avgTime / 500.0) * .2;
    }
}

[Buggy Hunk]
fitness = ((wins*1.0) / ((wins + losses)*1.0))*.8 + ((double)avgTime / 500.0)*.2;

[Patch]
fitness = (wins / (wins + losses))*0.8 + (avgTime / 500.0)*0.2;

[Demonstration 3]

[Buggy Method]
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    // Get the data item for this position
    Player player = getItem(position);
    // Check if an existing view is being reused, otherwise inflate the view
    if (convertView == null) {
        convertView = LayoutInflater.from(getContext()).inflate(R.layout.player_score, parent, false);
    }
    // Lookup view for data population
    TextView playerName = (TextView) convertView.findViewById(R.id.playerName);
    TextView playerScore = (TextView) convertView.findViewById(R.id.playerScore);
    // Populate the data into the template view using the data object
    playerName.setText(player.getName());
    playerScore.setText(player.getScore().toString());
    // Return the completed view to render on screen
    return convertView;
}

[Buggy Hunk]
playerScore.setText(player.getScore().toString());

[Patch]
playerScore.setText(player.getTopScore().toString());