nus-yam/ex-repair huggingface dataset:
Program: 83568
Project: 83568
Buggy source:
/** 
 * method called by bukkit when the plugin is enabled.
 */
@Override public void onEnable(){
  try {
    roadsDirectory=new File(getDataFolder(),"String_Node_Str");
    pillarsDirectory=new File(getDataFolder(),"String_Node_Str");
    if (!roadsDirectory.exists() || !pillarsDirectory.exists()) {
      FileManager.copyDefaultRessources(getDataFolder(),"String_Node_Str","String_Node_Str","String_Node_Str");
    }
    loadRoads();
    loadPillars();
    undoSave=new File(getDataFolder(),"String_Node_Str");
    playerListener.unSerializeRoadsUndos(undoSave);
    this.getConfig().options().copyDefaults(true);
    if (!getConfig().contains("String_Node_Str")) {
      this.saveDefaultConfig();
      this.reloadConfig();
      this.getConfig().set("String_Node_Str","String_Node_Str" + getDescription().getVersion() + "String_Node_Str");
    }
 else     if (!getConfig().getString("String_Node_Str").equalsIgnoreCase(getDescription().getVersion())) {
      this.saveDefaultConfig();
      this.reloadConfig();
      this.getConfig().set("String_Node_Str","String_Node_Str" + getDescription().getVersion() + "String_Node_Str");
    }
    this.saveConfig();
  }
 catch (  IOException ex) {
    log.log(Level.SEVERE,"String_Node_Str");
    return;
  }
  if (!eventRegistered) {
    PluginManager pm=getServer().getPluginManager();
    pm.registerEvents(this.playerListener,this);
    eventRegistered=true;
    log.log(Level.INFO,"String_Node_Str" + getDescription().getVersion() + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * method called by bukkit when the plugin is enabled.
 */
@Override public void onEnable(){
  try {
    roadsDirectory=new File(getDataFolder(),"String_Node_Str");
    pillarsDirectory=new File(getDataFolder(),"String_Node_Str");
    if (!roadsDirectory.exists() || !pillarsDirectory.exists()) {
      FileManager.copyDefaultRessources(getDataFolder(),"String_Node_Str","String_Node_Str","String_Node_Str");
    }
    loadRoads();
    loadPillars();
    undoSave=new File(getDataFolder(),"String_Node_Str");
    playerListener.unSerializeRoadsUndos(undoSave);
    if (!getConfig().contains("String_Node_Str")) {
      this.saveDefaultConfig();
      this.getConfig().set("String_Node_Str","String_Node_Str" + getDescription().getVersion());
    }
 else     if (!getConfig().getString("String_Node_Str").equalsIgnoreCase(getDescription().getVersion())) {
      this.saveDefaultConfig();
      this.getConfig().set("String_Node_Str","String_Node_Str" + getDescription().getVersion());
    }
    this.getConfig().options().copyDefaults(true);
    this.saveConfig();
  }
 catch (  IOException ex) {
    log.log(Level.SEVERE,"String_Node_Str");
    return;
  }
  if (!eventRegistered) {
    PluginManager pm=getServer().getPluginManager();
    pm.registerEvents(this.playerListener,this);
    eventRegistered=true;
    log.log(Level.INFO,"String_Node_Str" + getDescription().getVersion() + "String_Node_Str");
  }
}
Program: 83569
Project: 83569
Buggy source:
/** 
 * method called by bukkit when the plugin is enabled.
 */
@Override public void onEnable(){
  try {
    roadsDirectory=new File(getDataFolder(),"String_Node_Str");
    pillarsDirectory=new File(getDataFolder(),"String_Node_Str");
    if (!roadsDirectory.exists() || !pillarsDirectory.exists()) {
      FileManager.copyDefaultRessources(getDataFolder(),"String_Node_Str","String_Node_Str","String_Node_Str");
    }
    loadRoads();
    loadPillars();
    undoSave=new File(getDataFolder(),"String_Node_Str");
    playerListener.unSerializeRoadsUndos(undoSave);
    File configFile=new File(getDataFolder(),"String_Node_Str");
    if (!configFile.exists()) {
      FileManager.copyDefaultRessource(getDataFolder(),"String_Node_Str","String_Node_Str");
    }
    config=YamlConfiguration.loadConfiguration(configFile);
    messages=new Messages(this,config);
  }
 catch (  IOException ex) {
    log.log(Level.SEVERE,"String_Node_Str");
    return;
  }
  if (!eventRegistered) {
    PluginManager pm=getServer().getPluginManager();
    pm.registerEvents(this.playerListener,this);
    eventRegistered=true;
    log.log(Level.INFO,"String_Node_Str" + getDescription().getVersion() + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * method called by bukkit when the plugin is enabled.
 */
@Override public void onEnable(){
  try {
    roadsDirectory=new File(getDataFolder(),"String_Node_Str");
    pillarsDirectory=new File(getDataFolder(),"String_Node_Str");
    if (!roadsDirectory.exists() || !pillarsDirectory.exists()) {
      FileManager.copyDefaultRessources(getDataFolder(),"String_Node_Str","String_Node_Str","String_Node_Str");
    }
    loadRoads();
    loadPillars();
    undoSave=new File(getDataFolder(),"String_Node_Str");
    playerListener.unSerializeRoadsUndos(undoSave);
    getConfig().options().copyDefaults(true);
    config=getConfig();
    messages=new Messages(this,config);
  }
 catch (  IOException ex) {
    log.log(Level.SEVERE,"String_Node_Str");
    return;
  }
  if (!eventRegistered) {
    PluginManager pm=getServer().getPluginManager();
    pm.registerEvents(this.playerListener,this);
    eventRegistered=true;
    log.log(Level.INFO,"String_Node_Str" + getDescription().getVersion() + "String_Node_Str");
  }
}
Program: 83571
Project: 83571
Buggy source:
/** 
 * Loads all the settings for the program. If the version information doesn't match up or the config is the wrong lenght, the default values are written.
 */
public void loadSettings(){
  String version;
  FileHandler FH=new FileHandler();
  if (!FH.pathExists("String_Node_Str")) {
    writeDefaultConfig();
    settings=new String[config.length];
    settings=config;
  }
 else {
    String[] dat=FH.read("String_Node_Str");
    if (dat.length == config.length) {
      version=dat[0];
      if (!version.equals("String_Node_Str" + GiantTrees.getVersion())) {
        GiantTrees.logInfo("String_Node_Str");
        writeDefaultConfig();
        settings=new String[config.length];
        settings=config;
      }
 else {
        settings=new String[dat.length];
        settings=dat;
      }
    }
 else {
      GiantTrees.logSevere("String_Node_Str");
      writeDefaultConfig();
      settings=new String[config.length];
      settings=config;
    }
  }
}

Fixed version (ground truth):
/** 
 * Loads all the settings for the program. If the version information doesn't match up or the config is the wrong lenght, the default values are written.
 */
public void loadSettings(){
  String version;
  FileHandler FH=new FileHandler();
  if (!FH.pathExists("String_Node_Str")) {
    writeDefaultConfig();
    settings=new String[config.length];
    settings=config;
  }
 else {
    String[] dat=FH.read("String_Node_Str");
    if (dat.length == config.length) {
      version=dat[0];
      if (!version.equals("String_Node_Str" + GiantTrees.getSettingsVersion())) {
        GiantTrees.logInfo("String_Node_Str");
        writeDefaultConfig();
        settings=new String[config.length];
        settings=config;
      }
 else {
        settings=new String[dat.length];
        settings=dat;
      }
    }
 else {
      GiantTrees.logSevere("String_Node_Str");
      writeDefaultConfig();
      settings=new String[config.length];
      settings=config;
    }
  }
}
Program: 83572
Project: 83572
Buggy source:
/** 
 * Finds the surface of the world, returns null if it can't be built on or gets to the bottom
 * @param world world
 * @param x x location of chunk
 * @param z z location of chunk
 * @return location of surface
 */
private Location getSurface(World world,int x,int z){
  x=(int)(Math.random() * 16 + x);
  z=(int)(Math.random() * 16 + z);
  Location loc=new Location(world,x,0,z);
  int id=0;
  for (int y=127; y > 0; y--) {
    loc=new Location(world,x,y,z);
    id=loc.getBlock().getTypeId();
    if (id != 0) {
      if (id == 8 || id == 19 || id == 10 || id == 11 || id == 51 || id == 7) {
        loc=null;
        break;
      }
 else       if (id != 17 && id != 18 && id != 81 && id != 83 && id != 37 && id != 38 && id != 39 && id != 40 && id != 86 && id != 31 && id != 32) {
        break;
      }
    }
    if (y == 1) {
      loc=null;
      break;
    }
  }
  return loc;
}

Fixed version (ground truth):
/** 
 * Finds the surface of the world, returns null if it can't be built on or gets to the bottom
 * @param world world
 * @param x x location of chunk
 * @param z z location of chunk
 * @return location of surface
 */
private Location getSurface(World world,int x,int z){
  x=(int)(Math.random() * 16 + x);
  z=(int)(Math.random() * 16 + z);
  Location loc=new Location(world,x,0,z);
  int id=0;
  for (int y=world.getMaxHeight() - 1; y > 0; y--) {
    loc=new Location(world,x,y,z);
    id=loc.getBlock().getTypeId();
    if (id != 0) {
      if (id == 8 || id == 19 || id == 10 || id == 11 || id == 51 || id == 7) {
        loc=null;
        break;
      }
 else       if (id != 17 && id != 18 && id != 81 && id != 83 && id != 37 && id != 38 && id != 39 && id != 40 && id != 86 && id != 31 && id != 32) {
        break;
      }
    }
    if (y == 1) {
      loc=null;
      break;
    }
  }
  return loc;
}
Program: 83573
Project: 83573
Buggy source:
/** 
 * Changes one block in-game
 */
public void run(){
  if (spot < blockList.size()) {
    Block block;
    Material material;
    block=blockList.get(spot);
    material=typeList.get(spot);
    block.setType(material);
    if (material.getId() == meta.getLogType().getId() && meta.hasLogMeta()) {
      block.setData(meta.getLogMeta());
    }
    if (material.getId() == meta.getLeafType().getId() && meta.hasLeafMeta()) {
      block.setData(meta.getLeafMeta());
    }
    spot++;
    if (spot == blockList.size()) {
      done=true;
    }
  }
}

Fixed version (ground truth):
/** 
 * Changes one block in-game
 */
public void run(){
  if (spot < blockList.size()) {
    block=blockList.get(spot);
    material=typeList.get(spot);
    block.setType(material);
    if (material.getId() == meta.getLogType().getId() && meta.hasLogMeta()) {
      block.setData(meta.getLogMeta());
    }
    if (material.getId() == meta.getLeafType().getId() && meta.hasLeafMeta()) {
      block.setData(meta.getLeafMeta());
    }
    spot++;
    if (spot == blockList.size()) {
      done=true;
    }
  }
}
Program: 83574
Project: 83574
Buggy source:
private void updateRunning(float deltaTime){
  if (Gdx.app.getType() == Application.ApplicationType.Android) {
    if (Gdx.input.getX() < 480 / 2) {
      world.paddleP1.position.y=Gdx.input.getY() / 10;
    }
    if (Gdx.input.getX() > 480 / 2) {
      world.paddleP2.position.y=Gdx.input.getY() / 10;
    }
  }
 else {
    float accel1=0;
    float accel2=0;
    if (Gdx.input.isKeyPressed(Keys.DPAD_UP))     accel2=20;
    if (Gdx.input.isKeyPressed(Keys.DPAD_DOWN))     accel2=-20;
    if (Gdx.input.isKeyPressed(Keys.W))     accel1=20;
    if (Gdx.input.isKeyPressed(Keys.S))     accel1=-20;
    world.update(deltaTime,accel1,accel2);
  }
  if (world.scoreP1 != player1Score || world.scoreP2 != player2Score) {
    player1Score=world.scoreP1;
    player2Score=world.scoreP2;
    player1ScoreString="String_Node_Str" + player1Score;
    player2ScoreString="String_Node_Str" + player2Score;
  }
  fpslogger.log();
}

Fixed version (ground truth):
private void updateRunning(float deltaTime){
  if (Gdx.app.getType() == Application.ApplicationType.Android) {
    if (Gdx.input.getX() < 480 / 2) {
      world.paddleP1.position.y=32 - (Gdx.input.getY() / 10);
    }
    if (Gdx.input.getX() > 480 / 2) {
      world.paddleP2.position.y=32 - (Gdx.input.getY() / 10);
    }
    world.update(deltaTime,0,0);
  }
 else {
    float accel1=0;
    float accel2=0;
    if (Gdx.input.isKeyPressed(Keys.DPAD_UP))     accel2=20;
    if (Gdx.input.isKeyPressed(Keys.DPAD_DOWN))     accel2=-20;
    if (Gdx.input.isKeyPressed(Keys.W))     accel1=20;
    if (Gdx.input.isKeyPressed(Keys.S))     accel1=-20;
    world.update(deltaTime,accel1,accel2);
  }
  if (world.scoreP1 != player1Score || world.scoreP2 != player2Score) {
    player1Score=world.scoreP1;
    player2Score=world.scoreP2;
    player1ScoreString="String_Node_Str" + player1Score;
    player2ScoreString="String_Node_Str" + player2Score;
  }
  fpslogger.log();
}
Program: 83575
Project: 83575
Buggy source:
public void presentRunning(){
  Assets.font.draw(batcher,player1ScoreString,16,300);
  Assets.font.draw(batcher,player2ScoreString,450,300);
}

Fixed version (ground truth):
public void presentRunning(){
  Assets.font.draw(batcher,player1ScoreString,36,300);
  Assets.font.draw(batcher,player2ScoreString,420,300);
}
Program: 83576
Project: 83576
Buggy source:
public void checkGameOver(){
}

Fixed version (ground truth):
public void checkGameOver(){
  if (scoreP1 > 15 || scoreP2 > 15) {
    state=WORLD_STATE_GAME_END;
  }
}
Program: 83577
Project: 83577
Buggy source:
public void updateBall(float deltaTime){
  if (ball.position.y >= WORLD_HEIGHT)   ball.velocity.y=ball.velocity.y * -1;
  if (ball.position.y <= 0)   ball.velocity.y=ball.velocity.y * -1;
  if (ball.position.x >= WORLD_WIDTH) {
    scoreP1++;
    ball.score();
  }
  if (ball.position.x <= 0) {
    scoreP2++;
    ball.score();
  }
  ball.update(deltaTime);
}

Fixed version (ground truth):
public void updateBall(float deltaTime){
  ball.update(deltaTime);
  if (ball.position.y >= WORLD_HEIGHT && ball.velocity.y > 0)   ball.velocity.y=ball.velocity.y * -1;
  if (ball.position.y <= 0 && ball.velocity.y < 0)   ball.velocity.y=ball.velocity.y * -1;
  if (ball.position.x >= WORLD_WIDTH) {
    scoreP1++;
    ball.score();
  }
  if (ball.position.x <= 0) {
    scoreP2++;
    ball.score();
  }
}
Program: 83578
Project: 83578
Buggy source:
public void checkCollisions(){
  if (OverlapTester.overlapRectangles(paddleP1.bounds,ball.bounds)) {
    ball.velocity.x=ball.velocity.x * -1;
  }
  if (OverlapTester.overlapRectangles(paddleP2.bounds,ball.bounds)) {
    ball.velocity.x=ball.velocity.x * -1;
  }
}

Fixed version (ground truth):
public void checkCollisions(){
  if (OverlapTester.overlapRectangles(paddleP1.bounds,ball.bounds) && ball.velocity.x < 0) {
    ball.velocity.x=ball.velocity.x * -1;
  }
  if (OverlapTester.overlapRectangles(paddleP2.bounds,ball.bounds) && ball.velocity.x > 0) {
    ball.velocity.x=ball.velocity.x * -1;
  }
}
Program: 83579
Project: 83579
Buggy source:
@SuppressWarnings("String_Node_Str") public void cancel(){
  try {
    _serverSocket.close();
  }
 catch (  IOException e) {
    Logger.Log("String_Node_Str" + e.getMessage());
  }
  try {
    _socket.close();
  }
 catch (  IOException e) {
    Logger.Log("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void cancel(){
  try {
    if (_serverSocket != null) {
      _serverSocket.close();
    }
  }
 catch (  IOException e) {
    Logger.Log("String_Node_Str" + e.getMessage());
  }
  try {
    if (_socket != null) {
      _socket.close();
    }
  }
 catch (  IOException e) {
    Logger.Log("String_Node_Str" + e.getMessage());
  }
}
Program: 83581
Project: 83581
Buggy source:
@Override public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener){
  listener.getLogger().println("String_Node_Str");
  PrintStream logger=listener.getLogger();
  FilePath metricFile=new FilePath(build.getWorkspace(),outputFilePath);
  try {
    if (!metricFile.exists()) {
      listener.getLogger().println(String.format("String_Node_Str",outputFilePath));
      build.setResult(Result.FAILURE);
      return false;
    }
  }
 catch (  IOException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  InterruptedException ie) {
    ie.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  Throwable t) {
    t.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
  PmccabeFileParser parser=new PmccabeFileParser(metricFile);
  try {
    PmccabeReport report=parser.parse();
    build.addAction(new PmccabeAction(build,report));
  }
 catch (  IOException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
  listener.getLogger().println("String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener){
  listener.getLogger().println("String_Node_Str");
  FilePath workspace=build.getWorkspace();
  PrintStream logger=listener.getLogger();
  FilePath metricFile=new FilePath(build.getWorkspace(),outputFilePath);
  try {
    if (!metricFile.exists()) {
      listener.getLogger().println(String.format("String_Node_Str",outputFilePath));
      build.setResult(Result.FAILURE);
      return false;
    }
  }
 catch (  IOException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  InterruptedException ie) {
    ie.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  Throwable t) {
    t.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
  PmccabeFileParser parser=new PmccabeFileParser(metricFile);
  try {
    PmccabeReport report=workspace.act(parser);
    build.addAction(new PmccabeAction(build,report));
  }
 catch (  IOException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  InterruptedException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
  listener.getLogger().println("String_Node_Str");
  return true;
}
Program: 83582
Project: 83582
Buggy source:
@Override public void onWorldSave(WorldSaveEvent event){
  plugin.savePlaytime();
  plugin.saveRent();
}

Fixed version (ground truth):
@Override public void onWorldSave(WorldSaveEvent event){
  plugin.savePlaytime();
}
Program: 83584
Project: 83584
Buggy source:
public void onDisable(){
  savePlaytime();
  saveRent();
  permissionHandler=null;
  Ranks.clear();
  Abilities.clear();
  StartTime.clear();
  PlayTime.clear();
  RentedAbilities.clear();
  RentedRanks.clear();
  getServer().getScheduler().cancelTasks(this);
  log.info("String_Node_Str");
}

Fixed version (ground truth):
public void onDisable(){
  getServer().getScheduler().cancelTasks(this);
  savePlaytime();
  saveRent();
  permissionHandler=null;
  Ranks.clear();
  Abilities.clear();
  StartTime.clear();
  PlayTime.clear();
  RentedAbilities.clear();
  RentedRanks.clear();
  log.info("String_Node_Str");
}
Program: 83587
Project: 83587
Buggy source:
@SuppressWarnings("String_Node_Str") public void loadRent(){
  File path=new File(mainDirectory + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str");
  if (path.exists()) {
    try {
      ObjectInputStream obj=new ObjectInputStream(new FileInputStream(path.getPath()));
      RentedRanks=(List<PurchasedRank>)obj.readObject();
    }
 catch (    FileNotFoundException e) {
      ThrowSimpleError(e);
    }
catch (    IOException e) {
      ThrowSimpleError(e);
    }
catch (    ClassNotFoundException e) {
      ThrowSimpleError(e);
    }
  }
  path=new File(mainDirectory + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str");
  if (path.exists()) {
    try {
      ObjectInputStream obj=new ObjectInputStream(new FileInputStream(path.getPath()));
      RentedAbilities=(List<PurchasedAbility>)obj.readObject();
    }
 catch (    FileNotFoundException e) {
      ThrowSimpleError(e);
    }
catch (    IOException e) {
      ThrowSimpleError(e);
    }
catch (    ClassNotFoundException e) {
      ThrowSimpleError(e);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void loadRent(){
  File path=new File(mainDirectory + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str");
  if (path.exists()) {
    try {
      ObjectInputStream obj=new ObjectInputStream(new FileInputStream(path.getPath()));
      RentedRanks=(List<PurchasedRank>)obj.readObject();
    }
 catch (    FileNotFoundException e) {
      ThrowSimpleError(e);
    }
catch (    IOException e) {
      ThrowSimpleError(e);
    }
catch (    ClassNotFoundException e) {
      ThrowSimpleError(e);
    }
  }
  path=new File(mainDirectory + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str");
  if (path.exists()) {
    DebugPrint("String_Node_Str");
    try {
      ObjectInputStream obj=new ObjectInputStream(new FileInputStream(path.getPath()));
      RentedAbilities=(List<PurchasedAbility>)obj.readObject();
    }
 catch (    FileNotFoundException e) {
      ThrowSimpleError(e);
    }
catch (    IOException e) {
      ThrowSimpleError(e);
    }
catch (    ClassNotFoundException e) {
      ThrowSimpleError(e);
    }
  }
}
Program: 83590
Project: 83590
Buggy source:
private boolean checkSpreadValidity(Block block){
  int n=0;
  if ((block.getRelative(BlockFace.EAST).getType() == Material.LAVA || block.getRelative(BlockFace.EAST).getType() == Material.STATIONARY_LAVA) && block.getRelative(BlockFace.EAST).getData() == 0x0) {
    n++;
  }
  if ((block.getRelative(BlockFace.WEST).getType() == Material.LAVA || block.getRelative(BlockFace.WEST).getType() == Material.STATIONARY_LAVA) && block.getRelative(BlockFace.WEST).getData() == 0x0) {
    n++;
  }
  if ((block.getRelative(BlockFace.NORTH).getType() == Material.LAVA || block.getRelative(BlockFace.NORTH).getType() == Material.STATIONARY_LAVA) && block.getRelative(BlockFace.NORTH).getData() == 0x0) {
    n++;
  }
  if ((block.getRelative(BlockFace.SOUTH).getType() == Material.LAVA || block.getRelative(BlockFace.SOUTH).getType() == Material.STATIONARY_LAVA) && block.getRelative(BlockFace.SOUTH).getData() == 0x0) {
    n++;
  }
  if (n >= 2) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean checkSpreadValidity(Block block){
  int n=0;
  if ((block.getRelative(BlockFace.EAST).getType() == Material.LAVA || block.getRelative(BlockFace.EAST).getType() == Material.STATIONARY_LAVA) && block.getRelative(BlockFace.EAST).getData() == 0x0) {
    n++;
  }
  if ((block.getRelative(BlockFace.WEST).getType() == Material.LAVA || block.getRelative(BlockFace.WEST).getType() == Material.STATIONARY_LAVA) && block.getRelative(BlockFace.WEST).getData() == 0x0) {
    n++;
  }
  if ((block.getRelative(BlockFace.NORTH).getType() == Material.LAVA || block.getRelative(BlockFace.NORTH).getType() == Material.STATIONARY_LAVA) && block.getRelative(BlockFace.NORTH).getData() == 0x0) {
    n++;
  }
  if ((block.getRelative(BlockFace.SOUTH).getType() == Material.LAVA || block.getRelative(BlockFace.SOUTH).getType() == Material.STATIONARY_LAVA) && block.getRelative(BlockFace.SOUTH).getData() == 0x0) {
    n++;
  }
  if (block.getRelative(BlockFace.DOWN).getType() == Material.AIR)   return false;
  if (n >= 2) {
    return true;
  }
 else {
    return false;
  }
}
Program: 83592
Project: 83592
Buggy source:
/** 
 * This method prepares the environment for loading rdf and handling failures
 * @param _tripleFile the name a file containing the triples to be loaded into the Blueprints managed graph.
 * @param _subRefNodeName the reference node for this collection.
 * @param _context the object of the triple.
 * @see net.justtrade.rest.handlers.graph.ManagementIndexHelper#getCollectionRefVertex(String,IndexableGraph,boolean)
 */
public void injectRDF(String _tripleFile,String _subRefNodeName,RexsterResourceContext _context){
  final String sMETHOD="String_Node_Str";
  String tripleFile=_tripleFile.trim();
  if (tripleFile.startsWith(FILE_SEPARATOR))   tripleFile=tripleFile.substring(1);
  TransactionalGraph tranGraph=(TransactionalGraph)_context.getRexsterApplicationGraph().getGraph();
  try {
    logger.info(sMETHOD + "String_Node_Str" + _tripleFile+ "String_Node_Str");
    writeToGraphStore(_subRefNodeName,_tripleFile,tranGraph);
    logger.info(sMETHOD + "String_Node_Str" + _tripleFile+ "String_Node_Str");
  }
 catch (  MalformedURLException mfuex) {
    logger.error(sMETHOD + "String_Node_Str" + mfuex.getLocalizedMessage()+ "String_Node_Str"+ mfuex.getStackTrace());
  }
catch (  Exception ex) {
    logger.error(sMETHOD + "String_Node_Str" + ex.getLocalizedMessage()+ "String_Node_Str");
  }
  RDF_Analyzer.analyzeModelData();
}

Fixed version (ground truth):
/** 
 * This method prepares the environment for loading rdf and handling failures
 * @param _tripleFile the name a file containing the triples to be loaded into the Blueprints managed graph.
 * @param _subRefNodeName the reference node for this collection.
 * @param _context the object of the triple.
 * @see net.justtrade.rest.handlers.graph.ManagementIndexHelper#getCollectionRefVertex(String,IndexableGraph,boolean)
 */
public void injectRDF(String _tripleFile,String _subRefNodeName,RexsterResourceContext _context){
  final String sMETHOD="String_Node_Str";
  String tripleFile=_tripleFile.trim();
  if (tripleFile.startsWith(FILE_SEPARATOR))   tripleFile=tripleFile.substring(1);
  TransactionalGraph tranGraph=(TransactionalGraph)_context.getRexsterApplicationGraph().getGraph();
  try {
    logger.info(sMETHOD + "String_Node_Str" + tripleFile+ "String_Node_Str");
    writeToGraphStore(_subRefNodeName,tripleFile,tranGraph);
    logger.info(sMETHOD + "String_Node_Str" + tripleFile+ "String_Node_Str");
  }
 catch (  MalformedURLException mfuex) {
    logger.error(sMETHOD + "String_Node_Str" + mfuex.getLocalizedMessage()+ "String_Node_Str"+ mfuex.getStackTrace());
  }
catch (  Exception ex) {
    logger.error(sMETHOD + "String_Node_Str" + ex.getLocalizedMessage()+ "String_Node_Str");
  }
  RDF_Analyzer.analyzeModelData();
}
Program: 83594
Project: 83594
Buggy source:
private void drawNumber(GL10 gl,float x,float y,float number,float alpha,float r,float g,float b,int precision){
  String str=(number == (long)number) ? String.format("String_Node_Str",(long)number) : String.format((precision >= 0 ? "String_Node_Str" + precision + "String_Node_Str" : "String_Node_Str"),number);
  if (number == 0) {
    alpha*=0.5;
  }
  for (int i=str.length() - 1; i >= 0; i--) {
    char c=str.charAt(i);
    Painter p=mPeriodPainter;
    if (c >= '0' && c <= '9') {
      p=mDigitPainters[c - '0'];
    }
 else     if (c == '-') {
      p=mMinusPainter;
    }
    p.draw(gl,x,y,DIGIT_WIDTH,DIGIT_HEIGHT,0,alpha,r,g,b);
    x-=DIGIT_WIDTH + LETTER_SPACING;
    number/=10;
  }
}

Fixed version (ground truth):
private void drawNumber(GL10 gl,float x,float y,float number,float alpha,float r,float g,float b,int precision){
  String str=(number == (long)number) ? String.format("String_Node_Str",(long)number) : String.format((precision >= 0 ? "String_Node_Str" + precision + "String_Node_Str" : "String_Node_Str"),number);
  if (number == 0) {
    alpha*=0.5;
  }
  for (int i=str.length() - 1; i >= 0; i--) {
    char c=str.charAt(i);
    Painter p=mPeriodPainter;
    if (c >= '0' && c <= '9') {
      p=mDigitPainters[c - '0'];
    }
 else     if (c == '-') {
      p=mMinusPainter;
    }
    p.draw(gl,x,y,DIGIT_WIDTH,DIGIT_HEIGHT,0,alpha,r,g,b);
    x-=DIGIT_WIDTH + DIGIT_SPACING;
    number/=10;
  }
}
Program: 83595
Project: 83595
Buggy source:
private Point2 collide(float centerX,float centerY,float radius,float radiusSquared){
  Point2 closest=null;
  float q=(mDimension == X) ? centerX : centerY;
  if (q + radius < mMinVal || q - radius > mMaxVal) {
    return closest;
  }
  if (isLeaf) {
    for (int i=mMinIndex; i < mMaxIndex; i++) {
      Point2 point=mPoints[i];
      float dx=point.x - centerX;
      float dy=point.y - centerY;
      boolean inSquare=(-radius <= dx && dx <= radius) && (-radius <= dy && dy <= radius);
      if (inSquare) {
        float distanceSquared=(dx * dx) + (dy * dy);
        if (distanceSquared < radiusSquared) {
          radiusSquared=distanceSquared;
          closest=point;
        }
      }
    }
  }
 else {
    closest=low.collide(centerX,centerY,radius,radiusSquared);
    if (closest != null) {
      radiusSquared=closest.distanceToSquared(centerX,centerY);
      radius=(float)Math.sqrt(radiusSquared);
    }
    Point2 rightClosest=high.collide(centerX,centerY,radius,radiusSquared);
    if (rightClosest != null) {
      closest=rightClosest;
    }
  }
  return closest;
}

Fixed version (ground truth):
private Point2 collide(float centerX,float centerY,float radius,float radiusSquared){
  Point2 closest=null;
  float q=(mDimension == X) ? centerX : centerY;
  float minVal=(mDimension == X) ? mMinX : mMinY;
  float maxVal=(mDimension == X) ? mMaxX : mMaxY;
  if (q + radius < minVal || q - radius > maxVal) {
    return closest;
  }
  if (isLeaf) {
    for (int i=mMinIndex; i < mMaxIndex; i++) {
      Point2 point=mPoints[i];
      float dx=point.x - centerX;
      float dy=point.y - centerY;
      boolean inSquare=(-radius <= dx && dx <= radius) && (-radius <= dy && dy <= radius);
      if (inSquare) {
        float distanceSquared=(dx * dx) + (dy * dy);
        if (distanceSquared < radiusSquared) {
          radiusSquared=distanceSquared;
          closest=point;
        }
      }
    }
  }
 else {
    closest=low.collide(centerX,centerY,radius,radiusSquared);
    if (closest != null) {
      radiusSquared=closest.distanceToSquared(centerX,centerY);
      radius=(float)Math.sqrt(radiusSquared);
    }
    Point2 rightClosest=high.collide(centerX,centerY,radius,radiusSquared);
    if (rightClosest != null) {
      closest=rightClosest;
    }
  }
  return closest;
}
Program: 83596
Project: 83596
Buggy source:
private void resetMinMaxValues(){
  boolean first=true;
  for (int i=mMinIndex; i < mMaxIndex; i++) {
    float q=(mDimension == X) ? mPoints[i].x : mPoints[i].y;
    if (first) {
      mMinVal=q;
      mMaxVal=q;
      first=false;
    }
 else     if (q < mMinVal) {
      mMinVal=q;
    }
 else     if (q > mMaxVal) {
      mMaxVal=q;
    }
  }
}

Fixed version (ground truth):
private void resetMinMaxValues(){
  boolean first=true;
  for (int i=mMinIndex; i < mMaxIndex; i++) {
    float q=(mDimension == X) ? mPoints[i].x : mPoints[i].y;
    if (first) {
      mMinX=mMaxX=mPoints[i].x;
      mMinY=mMaxY=mPoints[i].y;
      first=false;
    }
 else {
      mMinX=Math.min(mMinX,mPoints[i].x);
      mMaxX=Math.max(mMaxX,mPoints[i].x);
      mMinY=Math.min(mMinY,mPoints[i].y);
      mMaxY=Math.max(mMaxY,mPoints[i].y);
    }
  }
}
Program: 83597
Project: 83597
Buggy source:
public boolean remove(Point2 point){
  assert(mIsValid);
  boolean removed=false;
  if (isLeaf) {
    for (int i=mMinIndex; i < mMaxIndex && !removed; i++) {
      if (mPoints[i].equals(point)) {
        mMaxIndex--;
        mPoints[i]=mPoints[mMaxIndex];
        mPoints[mMaxIndex]=null;
        removed=true;
      }
    }
  }
 else {
    float q=(low.mDimension == X) ? point.x : point.y;
    if (q >= low.mMinVal && q <= low.mMaxVal) {
      removed=low.remove(point);
    }
 else     if (q >= high.mMinVal && q <= high.mMaxVal) {
      removed=high.remove(point);
    }
  }
  return removed;
}

Fixed version (ground truth):
public boolean remove(Point2 point){
  assert(mIsValid);
  boolean removed=false;
  if (isLeaf) {
    for (int i=mMinIndex; i < mMaxIndex && !removed; i++) {
      if (mPoints[i].equals(point)) {
        mMaxIndex--;
        mPoints[i]=mPoints[mMaxIndex];
        mPoints[mMaxIndex]=null;
        removed=true;
      }
    }
  }
 else {
    float q=(low.mDimension == X) ? point.x : point.y;
    float lowMinVal=(low.mDimension == X) ? low.mMinX : low.mMinY;
    float lowMaxVal=(low.mDimension == X) ? low.mMaxX : low.mMaxY;
    float highMinVal=(low.mDimension == X) ? high.mMinX : high.mMinY;
    float highMaxVal=(low.mDimension == X) ? high.mMaxX : high.mMaxY;
    if (q >= lowMinVal && q <= lowMaxVal) {
      removed=low.remove(point);
    }
 else     if (q >= highMinVal && q <= highMaxVal) {
      removed=high.remove(point);
    }
  }
  return removed;
}
Program: 83598
Project: 83598
Buggy source:
private void print(int depth){
  PLog.v("String_Node_Str",String.format("String_Node_Str",spaces.substring(0,depth * 2),(isLeaf ? "String_Node_Str" : "String_Node_Str"),(mDimension == X ? "String_Node_Str" : "String_Node_Str"),mMinVal,mMaxVal,mMinIndex,mMaxIndex - 1));
  if (isLeaf) {
    for (int i=mMinIndex; i < mMaxIndex; i++) {
      PLog.v("String_Node_Str",String.format("String_Node_Str",spaces.substring(0,depth * 2),i,mPoints[i].x,mPoints[i].y,mPoints[i].id));
    }
  }
 else {
    depth++;
    low.print(depth);
    high.print(depth);
  }
}

Fixed version (ground truth):
private void print(int depth){
  PLog.v("String_Node_Str",String.format("String_Node_Str",spaces.substring(0,depth * 2),(isLeaf ? "String_Node_Str" : "String_Node_Str"),(mDimension == X ? "String_Node_Str" : "String_Node_Str"),(mDimension == X ? mMinX : mMinY),(mDimension == X ? mMaxX : mMaxY),mMinIndex,mMaxIndex - 1));
  if (isLeaf) {
    for (int i=mMinIndex; i < mMaxIndex; i++) {
      PLog.v("String_Node_Str",String.format("String_Node_Str",spaces.substring(0,depth * 2),i,mPoints[i].x,mPoints[i].y,mPoints[i].id));
    }
  }
 else {
    depth++;
    low.print(depth);
    high.print(depth);
  }
}
Program: 83599
Project: 83599
Buggy source:
public float getMaxVal(){
  return mMaxVal;
}

Fixed version (ground truth):
public float getMaxVal(){
  return mDimension == X ? mMaxX : mMaxY;
}
Program: 83600
Project: 83600
Buggy source:
public float getMinVal(){
  return mMinVal;
}

Fixed version (ground truth):
public float getMinVal(){
  return mDimension == X ? mMinX : mMinY;
}
Program: 83601
Project: 83601
Buggy source:
private Quadtree reset(Point2[] points,int minIndex,int maxIndex){
  mPoints=points;
  mMinIndex=minIndex;
  mMaxIndex=maxIndex;
  isLeaf=(mMaxIndex - mMinIndex) <= MAX_LEAF_SIZE;
  resetMinMaxValues();
  if (!isLeaf) {
    int pivotIndex=partition(!mDimension,mPoints,mMinIndex,mMaxIndex);
    if (pivotIndex <= mMinIndex || pivotIndex >= mMaxIndex) {
      isLeaf=true;
    }
 else {
      if (low == null) {
        low=Quadtree.create(!mDimension,mEntrySize,mPoints);
      }
      if (high == null) {
        high=Quadtree.create(!mDimension,mEntrySize,mPoints);
      }
      low.reset(mPoints,mMinIndex,pivotIndex);
      high.reset(mPoints,pivotIndex,mMaxIndex);
    }
  }
  if (isLeaf) {
    if (low != null) {
      low.recycle();
      low=null;
    }
    if (high != null) {
      high.recycle();
      high=null;
    }
  }
  mIsValid=true;
  return this;
}

Fixed version (ground truth):
private Quadtree reset(Point2[] points,int minIndex,int maxIndex){
  mPoints=points;
  mMinIndex=minIndex;
  mMaxIndex=maxIndex;
  isLeaf=(mMaxIndex - mMinIndex) <= MAX_LEAF_SIZE;
  mDepth=0;
  resetMinMaxValues();
  if (!isLeaf) {
    int pivotIndex=partition(!mDimension,mPoints,mMinIndex,mMaxIndex);
    if (pivotIndex <= mMinIndex || pivotIndex >= mMaxIndex) {
      isLeaf=true;
    }
 else {
      if (low == null) {
        low=Quadtree.create(!mDimension,mEntrySize,mPoints);
      }
      if (high == null) {
        high=Quadtree.create(!mDimension,mEntrySize,mPoints);
      }
      low.reset(mPoints,mMinIndex,pivotIndex);
      high.reset(mPoints,pivotIndex,mMaxIndex);
      mDepth=Math.max(low.mDepth,high.mDepth) + 1;
    }
  }
  if (isLeaf) {
    if (low != null) {
      low.recycle();
      low=null;
    }
    if (high != null) {
      high.recycle();
      high=null;
    }
  }
  mIsValid=true;
  return this;
}
Program: 83602
Project: 83602
Buggy source:
@Override public void onDrawFrame(GL10 gl){
  gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
  gl.glViewport(0,0,(int)mScreenWidth,(int)mScreenHeight);
  float minDimension=mScreenWidth < mScreenHeight ? mScreenWidth : mScreenHeight;
  float maxDimension=mScreenWidth > mScreenHeight ? mScreenWidth : mScreenHeight;
  float rotationDegrees=-mRotation * 90;
  float buttonSize=maxDimension / 8;
  if (!Pax.sBlackBackground) {
    float halfWidth=mScreenWidth / 2;
    float halfHeight=mScreenHeight / 2;
    mBackgroundPainter.drawFillBounds(gl,-halfWidth,halfWidth,-halfHeight,halfHeight,rotationDegrees,1f);
  }
  float flip=1;
  float buttonXPos=flip * 0;
  float buttonYPos=flip * (mRotation % 2 == 0 ? mScreenHeight : mScreenWidth) / 3;
  float glowSize=(float)(buttonSize * 4);
  if (!mPlayerOneAI) {
    mSmokePainter.draw(gl,-buttonXPos,-buttonYPos,glowSize,glowSize,0,1f);
  }
  if (!mPlayerTwoAI) {
    mSmokePainter.draw(gl,buttonXPos,buttonYPos,glowSize,glowSize,0,1f);
  }
  mBlueButtonPainter.draw(gl,-buttonXPos,-buttonYPos,buttonSize,buttonSize,180,1f);
  mRedButtonPainter.draw(gl,buttonXPos,buttonYPos,buttonSize,buttonSize,0,1f);
  mTitlePainter.draw(gl,0,0,minDimension / 2,minDimension / 2,rotationDegrees,1f);
  drawCountdown(gl,maxDimension,flip,rotationDegrees);
}

Fixed version (ground truth):
@Override public void onDrawFrame(GL10 gl){
  gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
  gl.glViewport(0,0,(int)mScreenWidth,(int)mScreenHeight);
  float minDimension=mScreenWidth < mScreenHeight ? mScreenWidth : mScreenHeight;
  float maxDimension=mScreenWidth > mScreenHeight ? mScreenWidth : mScreenHeight;
  float rotationDegrees=-mRotation * 90;
  float buttonSize=maxDimension / 8;
  if (!Pax.sBlackBackground) {
    float halfWidth=mScreenWidth / 2;
    float halfHeight=mScreenHeight / 2;
    mBackgroundPainter.drawFillBounds(gl,-halfWidth,halfWidth,-halfHeight,halfHeight,rotationDegrees,1f);
  }
  float buttonXPos=0;
  float buttonYPos=(mRotation % 2 == 0 ? mScreenHeight : mScreenWidth) / 3;
  float glowSize=(float)(buttonSize * 4);
  if (!mPlayerOneAI) {
    mSmokePainter.draw(gl,-buttonXPos,-buttonYPos,glowSize,glowSize,0,1f);
  }
  if (!mPlayerTwoAI) {
    mSmokePainter.draw(gl,buttonXPos,buttonYPos,glowSize,glowSize,0,1f);
  }
  mBlueButtonPainter.draw(gl,-buttonXPos,-buttonYPos,buttonSize,buttonSize,180,1f);
  mRedButtonPainter.draw(gl,buttonXPos,buttonYPos,buttonSize,buttonSize,0,1f);
  mTitlePainter.draw(gl,0,0,minDimension / 2,minDimension / 2,rotationDegrees,1f);
  drawCountdown(gl,maxDimension,rotationDegrees);
}
Program: 83603
Project: 83603
Buggy source:
private void drawCountdown(GL10 gl,float maxDimension,float flip,float rotationDegrees){
  if (mActivity.mTimerIsRunning) {
    long msLeft=mActivity.mGameStartTime - SystemClock.uptimeMillis();
    if (msLeft > 0) {
      float numberSize=maxDimension / 20;
      float numberXPos=flip * ((mRotation % 2 == 0) ? 0 : -maxDimension / 6);
      float numberYPos=flip * ((mRotation % 2 != 0) ? 0 : -maxDimension / 6);
      float alpha=((float)(msLeft % 1000)) / 1000;
      int secondsLeft=(int)Math.ceil(((float)msLeft) / 1000);
      mNumberPainters[secondsLeft].draw(gl,numberXPos,numberYPos,numberSize,numberSize,rotationDegrees,alpha);
    }
  }
}

Fixed version (ground truth):
private void drawCountdown(GL10 gl,float maxDimension,float rotationDegrees){
  if (mActivity.mTimerIsRunning) {
    long msLeft=mActivity.mGameStartTime - SystemClock.uptimeMillis();
    if (msLeft > 0) {
      float flip=(mRotation < 2) ? 1 : -1;
      float numberSize=maxDimension / 20;
      float numberXPos=flip * ((mRotation % 2 == 0) ? 0 : -maxDimension / 6);
      float numberYPos=flip * ((mRotation % 2 != 0) ? 0 : -maxDimension / 6);
      float alpha=((float)(msLeft % 1000)) / 1000;
      int secondsLeft=(int)Math.ceil(((float)msLeft) / 1000);
      mNumberPainters[secondsLeft].draw(gl,numberXPos,numberYPos,numberSize,numberSize,rotationDegrees,alpha);
    }
  }
}
Program: 83604
Project: 83604
Buggy source:
private void drawButtons(GL10 gl){
  for (int player=0; player < Game.NUM_PLAYERS; player++) {
    float buildIndicatorRotation=(player == 0) ? 0 : 180;
    Painter[] buildTargetPainters=(player == 0) ? mBuildTargetPaintersBlue : mBuildTargetPaintersRed;
    float flip=((player == 1) ^ (mRotation >= 2)) ? -1 : 1;
    float dx=mGameWidth / 4;
    float dy=0;
    float x=flip * (dx - mGameWidth) / 2;
    float y=flip * (mButtonSize - mGameHeight) / 2;
    if ((player == 1) ^ (mRotation >= 2)) {
      dx=-dx;
      dy=-dy;
    }
    for (int i=0; i < 4; i++) {
      float buildProgress=mGame.mPlayers[player].money / Player.BuildCosts[i];
      if (buildProgress > 1) {
        buildProgress=1;
      }
      float buttonMinY=y - flip * mButtonSize / 2;
      float buttonMaxY=y + flip * mButtonSize / 2;
      float buttonMinX=x - dx / 2;
      float buttonMaxX=x + dx / 2;
      float progressMaxX=buttonMinX + flip * mButtonSize / 3;
      float progressMaxY=buttonMinY + flip * mButtonSize * buildProgress;
      if (i == mGame.mPlayers[player].mBuildTarget.ordinal()) {
        mHighlight.drawFillBounds(gl,buttonMinX,buttonMaxX,buttonMinY,buttonMaxY,0,0.2f);
        mHighlight.drawFillBounds(gl,buttonMinX,progressMaxX,buttonMinY,progressMaxY,0,0.2f);
      }
      buildTargetPainters[i].draw(gl,x,y,mButtonSize,mButtonSize,buildIndicatorRotation,1f);
      x+=dx;
      y+=dy;
    }
  }
}

Fixed version (ground truth):
private void drawButtons(GL10 gl){
  for (int player=0; player < Game.NUM_PLAYERS; player++) {
    float buildIndicatorRotation=(player == 0) ? 0 : 180;
    Painter[] buildTargetPainters=(player == 0) ? mBuildTargetPaintersBlue : mBuildTargetPaintersRed;
    float flip=(player == 1) ? -1 : 1;
    float dx=mGameWidth / 4;
    float dy=0;
    float x=flip * (dx - mGameWidth) / 2;
    float y=flip * (mButtonSize - mGameHeight) / 2;
    dx*=flip;
    dy*=flip;
    for (int i=0; i < 4; i++) {
      float buildProgress=mGame.mPlayers[player].money / Player.BuildCosts[i];
      if (buildProgress > 1) {
        buildProgress=1;
      }
      float buttonMinY=y - flip * mButtonSize / 2;
      float buttonMaxY=y + flip * mButtonSize / 2;
      float buttonMinX=x - dx / 2;
      float buttonMaxX=x + dx / 2;
      float progressMaxX=buttonMinX + flip * mButtonSize / 3;
      float progressMaxY=buttonMinY + flip * mButtonSize * buildProgress;
      if (i == mGame.mPlayers[player].mBuildTarget.ordinal()) {
        mHighlight.drawFillBounds(gl,buttonMinX,buttonMaxX,buttonMinY,buttonMaxY,0,0.2f);
        mHighlight.drawFillBounds(gl,buttonMinX,progressMaxX,buttonMinY,progressMaxY,0,0.2f);
      }
      buildTargetPainters[i].draw(gl,x,y,mButtonSize,mButtonSize,buildIndicatorRotation,1f);
      x+=dx;
      y+=dy;
    }
  }
}
Program: 83605
Project: 83605
Buggy source:
@Override public void onDrawFrame(GL10 gl){
  gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
  gl.glViewport(0,0,(int)mScreenWidth,(int)mScreenHeight);
  float minDimension=mScreenWidth < mScreenHeight ? mScreenWidth : mScreenHeight;
  float maxDimension=mScreenWidth > mScreenHeight ? mScreenWidth : mScreenHeight;
  float rotationDegrees=-mRotation * 90;
  float buttonSize=maxDimension / 8;
  if (!Pax.sBlackBackground) {
    float halfWidth=mScreenWidth / 2;
    float halfHeight=mScreenHeight / 2;
    mBackgroundPainter.drawFillBounds(gl,-halfWidth,halfWidth,-halfHeight,halfHeight,rotationDegrees,1f);
  }
  float flip=(mRotation >= 2) ? -1 : 1;
  float buttonXPos=flip * 0;
  float buttonYPos=flip * (mRotation % 2 == 0 ? mScreenHeight : mScreenWidth) / 3;
  float glowSize=(float)(buttonSize * 4);
  if (!mPlayerOneAI) {
    mSmokePainter.draw(gl,-buttonXPos,-buttonYPos,glowSize,glowSize,0,1f);
  }
  if (!mPlayerTwoAI) {
    mSmokePainter.draw(gl,buttonXPos,buttonYPos,glowSize,glowSize,0,1f);
  }
  mBlueButtonPainter.draw(gl,-buttonXPos,-buttonYPos,buttonSize,buttonSize,180,1f);
  mRedButtonPainter.draw(gl,buttonXPos,buttonYPos,buttonSize,buttonSize,0,1f);
  mTitlePainter.draw(gl,0,0,minDimension / 2,minDimension / 2,rotationDegrees,1f);
  drawCountdown(gl,maxDimension,flip,rotationDegrees);
}

Fixed version (ground truth):
@Override public void onDrawFrame(GL10 gl){
  gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
  gl.glViewport(0,0,(int)mScreenWidth,(int)mScreenHeight);
  float minDimension=mScreenWidth < mScreenHeight ? mScreenWidth : mScreenHeight;
  float maxDimension=mScreenWidth > mScreenHeight ? mScreenWidth : mScreenHeight;
  float rotationDegrees=-mRotation * 90;
  float buttonSize=maxDimension / 8;
  if (!Pax.sBlackBackground) {
    float halfWidth=mScreenWidth / 2;
    float halfHeight=mScreenHeight / 2;
    mBackgroundPainter.drawFillBounds(gl,-halfWidth,halfWidth,-halfHeight,halfHeight,rotationDegrees,1f);
  }
  float flip=1;
  float buttonXPos=flip * 0;
  float buttonYPos=flip * (mRotation % 2 == 0 ? mScreenHeight : mScreenWidth) / 3;
  float glowSize=(float)(buttonSize * 4);
  if (!mPlayerOneAI) {
    mSmokePainter.draw(gl,-buttonXPos,-buttonYPos,glowSize,glowSize,0,1f);
  }
  if (!mPlayerTwoAI) {
    mSmokePainter.draw(gl,buttonXPos,buttonYPos,glowSize,glowSize,0,1f);
  }
  mBlueButtonPainter.draw(gl,-buttonXPos,-buttonYPos,buttonSize,buttonSize,180,1f);
  mRedButtonPainter.draw(gl,buttonXPos,buttonYPos,buttonSize,buttonSize,0,1f);
  mTitlePainter.draw(gl,0,0,minDimension / 2,minDimension / 2,rotationDegrees,1f);
  drawCountdown(gl,maxDimension,flip,rotationDegrees);
}
Program: 83606
Project: 83606
Buggy source:
@Override public boolean onTouchEvent(MotionEvent event){
  int action=event.getAction() & MotionEvent.ACTION_MASK;
  if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_POINTER_DOWN) {
    for (int i=0; i < event.getPointerCount(); i++) {
      int xSection=(int)(event.getX(i) * 3 / getWidth());
      int ySection=(int)(event.getY(i) * 3 / getHeight());
      int section=(mRotation % 2 == 0 ? ySection : xSection);
      if (section == 1) {
        openOptionsMenu();
      }
 else {
        if (section == 0) {
          mActivity.mPlayerTwoAI=false;
        }
 else {
          mActivity.mPlayerOneAI=false;
        }
        mActivity.startTimer();
        setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onTouchEvent(MotionEvent event){
  int action=event.getAction() & MotionEvent.ACTION_MASK;
  if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_POINTER_DOWN) {
    for (int i=0; i < event.getPointerCount(); i++) {
      int xSection=(int)(event.getX(i) * 3 / getWidth());
      int ySection=(int)(event.getY(i) * 3 / getHeight());
      int section=(mRotation % 2 == 0 ? ySection : xSection);
      if (mRotation >= 2) {
        section=2 - section;
      }
      if (section == 1) {
        openOptionsMenu();
      }
 else {
        if (section == 0) {
          mActivity.mPlayerTwoAI=false;
        }
 else {
          mActivity.mPlayerOneAI=false;
        }
        mActivity.startTimer();
        setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
      }
    }
  }
  return true;
}