nus-yam/ex-repair huggingface dataset:
Program: 98262
Project: 98262
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void playerMove(PlayerMoveEvent event){
  Player player=event.getPlayer();
  AutoRefMatch match=plugin.getMatch(player.getWorld());
  if (match == null)   return;
  AutoRefPlayer apl=match.getPlayer(player);
  if (apl == null)   return;
  AutoRefTeam team=apl.getTeam();
  if (team == null)   return;
  double d=team.distanceToClosestRegion(event.getTo());
  double fallspeed=event.getFrom().getY() - event.getTo().getY();
  if (player.getGameMode() != GameMode.SURVIVAL || match.inStartRegion(event.getTo()))   return;
  if (apl != null && match.inStartRegion(event.getFrom()) && !match.inStartRegion(event.getTo())) {
    if (match.getCurrentState() != eMatchStatus.PLAYING) {
      player.teleport(team.getSpawnLocation());
      player.setVelocity(new org.bukkit.util.Vector());
      player.setFallDistance(0.0f);
    }
 else     player.getInventory().clear();
  }
 else   if (d > 0.3) {
    if (player.isSneaking() && d < SNEAK_DISTANCE && fallspeed < FREEFALL_THRESHOLD)     ;
 else     if (apl.getExitLocation() == null) {
      apl.setExitLocation(player.getLocation());
      for (      Player ref : match.getReferees())       ref.sendMessage(String.format("String_Node_Str",apl.getName()));
    }
  }
 else   if (apl.getExitLocation() != null) {
    if (apl.getExitLocation().distance(player.getLocation()) > VOID_SAFE_TRAVEL_DISTANCE) {
      player.setLastDamageCause(AutoRefPlayer.VOID_DEATH);
      player.setHealth(0);
    }
    apl.setExitLocation(null);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void playerMove(PlayerMoveEvent event){
  Player player=event.getPlayer();
  AutoRefMatch match=plugin.getMatch(player.getWorld());
  if (match == null)   return;
  AutoRefPlayer apl=match.getPlayer(player);
  if (apl == null)   return;
  AutoRefTeam team=apl.getTeam();
  if (team == null)   return;
  double d=team.distanceToClosestRegion(event.getTo());
  double fallspeed=event.getFrom().getY() - event.getTo().getY();
  if (player.getGameMode() != GameMode.SURVIVAL || match.inStartRegion(event.getTo()))   return;
  if (apl != null && match.inStartRegion(event.getFrom()) && !match.inStartRegion(event.getTo())) {
    if (match.getCurrentState() != eMatchStatus.PLAYING) {
      player.teleport(team.getSpawnLocation());
      player.setVelocity(new org.bukkit.util.Vector());
      player.setFallDistance(0.0f);
    }
 else     player.getInventory().clear();
  }
 else   if (d > 0.3) {
    if (player.isSneaking() && d < SNEAK_DISTANCE && fallspeed < FREEFALL_THRESHOLD)     ;
 else     if (fallspeed == 0.0 && d > 0.5 && !player.isDead()) {
      player.setLastDamageCause(AutoRefPlayer.VOID_DEATH);
      player.setHealth(0);
    }
  }
}
Program: 98263
Project: 98263
Buggy source:
public double distanceToRegion(Location v){
  double x=v.getX(), y=v.getY(), z=v.getZ();
  Vector3 mx=getMaximumPoint(), mn=getMinimumPoint();
  return CuboidRegion.multimax(0,mn.x - x,x - mx.x - 1,mn.y - y,y - mx.y - 1,mn.z - z,z - mx.z - 1);
}

Fixed version (ground truth):
public double distanceToRegion(Location v){
  if (v == null)   return Double.POSITIVE_INFINITY;
  double x=v.getX(), y=v.getY(), z=v.getZ();
  Vector3 mx=getMaximumPoint(), mn=getMinimumPoint();
  return CuboidRegion.multimax(0,mn.x - x,x - mx.x - 1,mn.y - y,y - mx.y - 1,mn.z - z,z - mx.z - 1);
}
Program: 98264
Project: 98264
Buggy source:
public Set<Player> getReferees(){
  Set<Player> refs=Sets.newHashSet();
  for (  Player p : world.getPlayers())   if (p.hasPermission("String_Node_Str"))   refs.add(p);
  refs.removeAll(getPlayers());
  return refs;
}

Fixed version (ground truth):
public Set<Player> getReferees(){
  Set<Player> refs=Sets.newHashSet();
  for (  Player p : world.getPlayers())   if (p.hasPermission("String_Node_Str"))   refs.add(p);
  for (  AutoRefPlayer apl : getPlayers())   if (apl.getPlayer() != null)   refs.remove(apl.getPlayer());
  return refs;
}
Program: 98265
Project: 98265
Buggy source:
private void EventType(String scls){
  this.scls=scls;
}

Fixed version (ground truth):
private void EventType(String eventClass,EventVisibility visibility){
  this.eventClass=eventClass;
  this.visibility=visibility;
}
Program: 98266
Project: 98266
Buggy source:
public void addEvent(TranscriptEvent event){
  AutoReferee plugin=AutoReferee.getInstance();
  transcript.add(event);
  for (  Player player : getReferees())   player.sendMessage(event.toString());
  if (plugin.getConfig().getBoolean("String_Node_Str",false))   plugin.getLogger().info(event.toString());
}

Fixed version (ground truth):
public void addEvent(TranscriptEvent event){
  AutoReferee plugin=AutoReferee.getInstance();
  transcript.add(event);
  Collection<Player> recipients=null;
switch (event.getType().getVisibility()) {
case REFEREES:
    recipients=getReferees();
  break;
case ALL:
recipients=getWorld().getPlayers();
break;
}
if (recipients != null) for (Player player : recipients) player.sendMessage(colorMessage(event.getMessage()));
if (plugin.getConfig().getBoolean("String_Node_Str",false)) plugin.getLogger().info(event.toString());
}
Program: 98267
Project: 98267
Buggy source:
@SuppressWarnings("String_Node_Str") private void loadWorldConfiguration(){
  worldConfigFile=new File(world.getWorldFolder(),"String_Node_Str");
  worldConfig=YamlConfiguration.loadConfiguration(worldConfigFile);
  InputStream defConfigStream=AutoReferee.getInstance().getResource("String_Node_Str");
  if (defConfigStream != null)   worldConfig.setDefaults(YamlConfiguration.loadConfiguration(defConfigStream));
  worldConfig.options().copyDefaults(true);
  worldConfig.options().header(AutoReferee.getInstance().getDescription().getFullName());
  worldConfig.options().copyHeader(false);
  teams=new HashSet<AutoRefTeam>();
  startMechanisms=new HashSet<StartMechanism>();
  for (  Map<?,?> map : worldConfig.getMapList("String_Node_Str"))   teams.add(AutoRefTeam.fromMap((Map<String,Object>)map,this));
  for (  String sm : worldConfig.getStringList("String_Node_Str"))   startMechanisms.add(StartMechanism.unserialize(world,sm));
  if (worldConfig.isString("String_Node_Str"))   startRegion=CuboidRegion.fromCoords(worldConfig.getString("String_Node_Str"));
  if (worldConfig.isString("String_Node_Str"))   startTime=AutoReferee.parseTimeString(worldConfig.getString("String_Node_Str"));
  mapName=worldConfig.getString("String_Node_Str","String_Node_Str");
  allowFriendlyFire=worldConfig.getBoolean("String_Node_Str",false);
  allowCraft=worldConfig.getBoolean("String_Node_Str",false);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void loadWorldConfiguration(){
  worldConfigFile=new File(world.getWorldFolder(),"String_Node_Str");
  worldConfig=YamlConfiguration.loadConfiguration(worldConfigFile);
  InputStream defConfigStream=AutoReferee.getInstance().getResource("String_Node_Str");
  if (defConfigStream != null)   worldConfig.setDefaults(YamlConfiguration.loadConfiguration(defConfigStream));
  worldConfig.options().copyDefaults(true);
  worldConfig.options().header(AutoReferee.getInstance().getDescription().getFullName());
  worldConfig.options().copyHeader(false);
  teams=new HashSet<AutoRefTeam>();
  startMechanisms=new HashSet<StartMechanism>();
  for (  Map<?,?> map : worldConfig.getMapList("String_Node_Str"))   teams.add(AutoRefTeam.fromMap((Map<String,Object>)map,this));
  for (  String sm : worldConfig.getStringList("String_Node_Str"))   startMechanisms.add(StartMechanism.unserialize(world,sm));
  if (worldConfig.isString("String_Node_Str"))   startRegion=CuboidRegion.fromCoords(worldConfig.getString("String_Node_Str"));
  if (worldConfig.isString("String_Node_Str"))   startTime=AutoReferee.parseTimeString(worldConfig.getString("String_Node_Str"));
  mapName=worldConfig.getString("String_Node_Str","String_Node_Str");
  mapAuthors=worldConfig.getStringList("String_Node_Str");
  allowFriendlyFire=worldConfig.getBoolean("String_Node_Str",false);
  allowCraft=worldConfig.getBoolean("String_Node_Str",false);
}
Program: 98268
Project: 98268
Buggy source:
@Override public String toString(){
  return String.format("String_Node_Str",this.getTimestamp(),this.message);
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format("String_Node_Str",this.getTimestamp(),this.getMessage());
}
Program: 98269
Project: 98269
Buggy source:
public void writeStats(PrintWriter fw){
  String pname=this.getPlayerName();
  String accuracyInfo="String_Node_Str";
  if (shotsFired > 0)   accuracyInfo="String_Node_Str" + Integer.toString(100 * shotsHit / shotsFired) + "String_Node_Str";
  fw.println("String_Node_Str" + pname + "String_Node_Str"+ Integer.toString(this.totalKills)+ "String_Node_Str"+ Integer.toString(this.totalDeaths)+ "String_Node_Str"+ accuracyInfo);
  for (  Map.Entry<String,Integer> kill : this.kills.entrySet())   fw.println("String_Node_Str" + pname + "String_Node_Str"+ kill.getKey()+ "String_Node_Str"+ kill.getValue().toString()+ "String_Node_Str");
  for (  Map.Entry<DamageCause,Integer> death : this.deaths.entrySet())   fw.println("String_Node_Str" + death.getKey().toString() + "String_Node_Str"+ pname+ "String_Node_Str"+ death.getValue().toString()+ "String_Node_Str");
  for (  Map.Entry<DamageCause,Integer> damage : this.damage.entrySet())   fw.println("String_Node_Str" + damage.getKey().toString() + "String_Node_Str"+ pname+ "String_Node_Str"+ damage.getValue().toString()+ "String_Node_Str");
}

Fixed version (ground truth):
public void writeStats(PrintWriter fw){
  String pname=this.getPlayerName();
  fw.println(String.format("String_Node_Str",pname,totalKills,totalDeaths,getAccuracy()));
  for (  Map.Entry<AutoRefPlayer,Integer> kill : this.kills.entrySet())   fw.println(String.format("String_Node_Str",pname,kill.getKey().getPlayerName(),kill.getValue()));
  for (  Map.Entry<DamageCause,Integer> death : this.deaths.entrySet())   fw.println(String.format("String_Node_Str",death.getKey().toString(),pname,death.getValue()));
  for (  Map.Entry<DamageCause,Integer> damage : this.damage.entrySet())   fw.println(String.format("String_Node_Str",damage.getKey().toString(),pname,damage.getValue()));
}
Program: 98270
Project: 98270
Buggy source:
public void registerKill(PlayerDeathEvent e){
  if (e.getEntity().getKiller() != getPlayer())   return;
  String pname=e.getEntity().getName();
  kills.put(pname,1 + kills.get(pname));
  ++totalKills;
}

Fixed version (ground truth):
public void registerKill(PlayerDeathEvent e){
  if (e.getEntity().getKiller() != getPlayer())   return;
  AutoRefPlayer apl=getTeam().getMatch().getPlayer(e.getEntity());
  kills.put(apl,1 + kills.get(apl));
  ++totalKills;
}
Program: 98271
Project: 98271
Buggy source:
public void registerDeath(PlayerDeathEvent e){
  if (e.getEntity() != getPlayer())   return;
  AutoRefPlayer.DamageCause dc=AutoRefPlayer.DamageCause.fromDamageEvent(e.getEntity().getLastDamageCause());
  deaths.put(dc,1 + deaths.get(dc));
  ++totalDeaths;
  AutoRefMatch match=getTeam().getMatch();
  Location loc=e.getEntity().getLocation();
  match.addEvent(new TranscriptEvent(match,TranscriptEvent.EventType.PLAYER_DEATH,String.format("String_Node_Str",getPlayerName(),dc),loc,this,dc.p));
}

Fixed version (ground truth):
public void registerDeath(PlayerDeathEvent e){
  if (e.getEntity() != getPlayer())   return;
  AutoRefPlayer.DamageCause dc=AutoRefPlayer.DamageCause.fromDamageEvent(e.getEntity().getLastDamageCause());
  deaths.put(dc,1 + deaths.get(dc));
  ++totalDeaths;
  AutoRefMatch match=getTeam().getMatch();
  Location loc=e.getEntity().getLocation();
  match.addEvent(new TranscriptEvent(match,TranscriptEvent.EventType.PLAYER_DEATH,e.getDeathMessage(),loc,this,dc.p));
}
Program: 98272
Project: 98272
Buggy source:
public void hasSeen(AutoRefPlayer apl){
  long ctime=location.getWorld().getFullTime();
  if (lastSeen > 0 && ctime - lastSeen < SEEN_COOLDOWN)   return;
  String message=String.format("String_Node_Str",apl.getPlayerName(),blockdata.getRawName());
  getMatch().addEvent(new TranscriptEvent(apl.getTeam().getMatch(),TranscriptEvent.EventType.OBJECTIVE_FOUND,message,location,apl,blockdata));
  lastSeen=ctime;
}

Fixed version (ground truth):
public void hasSeen(AutoRefPlayer apl){
  long ctime=location.getWorld().getFullTime();
  if (lastSeen > 0 && ctime - lastSeen < SEEN_COOLDOWN)   return;
  if (apl != null) {
    String message=String.format("String_Node_Str",apl.getPlayerName(),blockdata.getRawName());
    getMatch().addEvent(new TranscriptEvent(apl.getTeam().getMatch(),TranscriptEvent.EventType.OBJECTIVE_FOUND,message,location,apl,blockdata));
  }
  lastSeen=ctime;
}
Program: 98274
Project: 98274
Buggy source:
@EventHandler(priority=EventPriority.MONITOR,ignoreCancelled=true) public void blockInteract(PlayerInteractEvent event){
  Player pl=event.getPlayer();
  if (event.hasBlock()) {
    AutoRefMatch match=plugin.getMatch(event.getClickedBlock().getWorld());
    AutoRefPlayer apl=match == null ? null : match.getPlayer(pl);
    if (match != null && apl != null) {
      Location loc=event.getClickedBlock().getLocation();
      for (      AutoRefTeam.SourceInventory sinv : apl.getTeam().targetChests.values())       if (loc.equals(sinv.location))       sinv.hasSeen(apl);
      match.checkWinConditions(null);
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR,ignoreCancelled=true) public void blockInteract(PlayerInteractEvent event){
  Player pl=event.getPlayer();
  if (event.hasBlock()) {
    AutoRefMatch match=plugin.getMatch(event.getClickedBlock().getWorld());
    AutoRefPlayer apl=match == null ? null : match.getPlayer(pl);
    if (match != null && apl != null) {
      Location loc=event.getClickedBlock().getLocation();
      for (      SourceInventory sinv : apl.getTeam().targetChests.values())       if (loc.equals(sinv.location))       sinv.hasSeen(apl);
      match.checkWinConditions(null);
    }
  }
}
Program: 98275
Project: 98275
Buggy source:
public void matchComplete(AutoRefTeam t){
  this.broadcast(t.getName() + "String_Node_Str");
  setCurrentState(eMatchStatus.COMPLETED);
  for (  AutoRefPlayer apl : getPlayers()) {
    apl.getPlayer().setGameMode(GameMode.CREATIVE);
    apl.getPlayer().getInventory().clear();
  }
  addEvent(new TranscriptEvent(this,TranscriptEvent.EventType.MATCH_END,"String_Node_Str",null,null,null));
  setWinningTeam(t);
  logPlayerStats(null);
  int termDelay=AutoReferee.getInstance().getConfig().getInt("String_Node_Str",COMPLETED_SECONDS);
  AutoReferee.getInstance().getServer().getScheduler().scheduleSyncDelayedTask(AutoReferee.getInstance(),new MatchEndTask(),termDelay * 20L);
}

Fixed version (ground truth):
public void matchComplete(AutoRefTeam t){
  this.broadcast(t.getName() + "String_Node_Str");
  setCurrentState(eMatchStatus.COMPLETED);
  for (  AutoRefPlayer apl : getPlayers()) {
    Player pl=apl.getPlayer();
    if (pl == null)     continue;
    pl.setGameMode(GameMode.CREATIVE);
    pl.getInventory().clear();
  }
  addEvent(new TranscriptEvent(this,TranscriptEvent.EventType.MATCH_END,"String_Node_Str",null,null,null));
  setWinningTeam(t);
  logPlayerStats(null);
  AutoReferee plugin=AutoReferee.getInstance();
  int termDelay=plugin.getConfig().getInt("String_Node_Str",COMPLETED_SECONDS);
  plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,new MatchEndTask(),termDelay * 20L);
}
Program: 98276
Project: 98276
Buggy source:
public void join(Player pl){
  AutoRefPlayer apl=new AutoRefPlayer(pl,this);
  if (players.contains(apl))   return;
  players.add(apl);
  pl.teleport(getSpawnLocation());
  pl.setGameMode(GameMode.SURVIVAL);
  if (match.getCurrentState().ordinal() >= eMatchStatus.PLAYING.ordinal())   return;
  String colorName=getPlayerName(pl);
  match.broadcast(colorName + "String_Node_Str" + getName());
  match.checkTeamsReady();
}

Fixed version (ground truth):
public void join(Player pl){
  AutoRefPlayer apl=new AutoRefPlayer(pl,this);
  if (players.contains(apl))   return;
  players.add(apl);
  if (match != null && match.getCurrentState() != eMatchStatus.PLAYING)   pl.teleport(getSpawnLocation());
  pl.setGameMode(GameMode.SURVIVAL);
  if (match.getCurrentState().ordinal() >= eMatchStatus.PLAYING.ordinal())   return;
  String colorName=getPlayerName(pl);
  match.broadcast(colorName + "String_Node_Str" + getName());
  match.checkTeamsReady();
}
Program: 98277
Project: 98277
Buggy source:
public void hasSeen(AutoRefPlayer apl){
  if (seen)   return;
  String message=String.format("String_Node_Str",apl.getPlayerName(),blockdata.getRawName());
  getMatch().addEvent(new TranscriptEvent(apl.getTeam().getMatch(),TranscriptEvent.EventType.OBJECTIVE_FOUND,message,location,apl,blockdata));
  seen=true;
}

Fixed version (ground truth):
public void hasSeen(AutoRefPlayer apl){
  long ctime=location.getWorld().getFullTime();
  if (lastSeen > 0 && ctime - lastSeen < SEEN_COOLDOWN)   return;
  String message=String.format("String_Node_Str",apl.getPlayerName(),blockdata.getRawName());
  getMatch().addEvent(new TranscriptEvent(apl.getTeam().getMatch(),TranscriptEvent.EventType.OBJECTIVE_FOUND,message,location,apl,blockdata));
  lastSeen=ctime;
}
Program: 98278
Project: 98278
Buggy source:
public void doRenderLiving(EntityLiving entityliving,double d,double d1,double d2,float f,float f1){
  renderChocobo((EntityChocobo)entityliving,d,d1,d2,f,f1);
}

Fixed version (ground truth):
@Override public void doRenderLiving(EntityLiving entityliving,double d,double d1,double d2,float f,float f1){
  renderChocobo((EntityChocobo)entityliving,d,d1,d2,f,f1);
}
Program: 98279
Project: 98279
Buggy source:
public void doRender(Entity entity,double d,double d1,double d2,float f,float f1){
  renderChocobo((EntityChocobo)entity,d,d1,d2,f,f1);
}

Fixed version (ground truth):
@Override public void doRender(Entity entity,double d,double d1,double d2,float f,float f1){
  renderChocobo((EntityChocobo)entity,d,d1,d2,f,f1);
}
Program: 98280
Project: 98280
Buggy source:
protected void preRenderCallback(EntityLiving entityliving,float f){
  preRenderScale((EntityChocobo)entityliving,f);
}

Fixed version (ground truth):
@Override protected void preRenderCallback(EntityLivingBase entityliving,float f){
  preRenderScale((EntityChocobo)entityliving,f);
}
Program: 98281
Project: 98281
Buggy source:
protected void preRenderScale(EntityChocobo entitychocobo,float f){
  float scaleFactor=0.65F;
  GL11.glScalef(scaleFactor,scaleFactor,scaleFactor);
  if (entitychocobo.riddenByEntity != null) {
    GL11.glTranslated(0.5,0.0,-0.5);
  }
}

Fixed version (ground truth):
protected void preRenderScale(EntityChocobo entitychocobo,float f){
  float scaleFactor=0.8F;
  GL11.glScalef(scaleFactor,scaleFactor,scaleFactor);
  if (entitychocobo.riddenByEntity != null) {
    GL11.glTranslated(0.5,0.0,-0.5);
  }
}
Program: 98282
Project: 98282
Buggy source:
public EntityChocoboBlack(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canJumpHigh=Constants.CHOCOBO_BLACK_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_BLACK_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_BLACK_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_BLACK_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboBlack(World world){
  super(world);
  this.color=chocoboColor.BLACK;
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canJumpHigh=Constants.CHOCOBO_BLACK_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_BLACK_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_BLACK_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_BLACK_AIRSPEEDFACT;
}
Program: 98283
Project: 98283
Buggy source:
public EntityChocoboBlue(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canCrossWater=true;
  this.canClimb=false;
  this.canJumpHigh=Constants.CHOCOBO_BLUE_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_BLUE_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_BLUE_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_BLUE_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboBlue(World world){
  super(world);
  this.color=chocoboColor.BLUE;
  this.setHealth(this.getMaxHealth());
  this.canCrossWater=true;
  this.canClimb=false;
  this.canJumpHigh=Constants.CHOCOBO_BLUE_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_BLUE_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_BLUE_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_BLUE_AIRSPEEDFACT;
}
Program: 98284
Project: 98284
Buggy source:
@Override public chocoboColor getBabyAnimalColor(EntityAgeable otherAnimalParent){
  if (otherAnimalParent instanceof EntityChocobo) {
    EntityChocobo otherParent=(EntityChocobo)otherAnimalParent;
    boolean bothFedGold=this.fedGold && otherParent.fedGold;
    int randColor=rand.nextInt(100);
    chocoboColor chicoboColor=chocoboColor.BLUE;
switch (otherParent.color) {
case YELLOW:
      if (randColor < 50) {
        chicoboColor=chocoboColor.YELLOW;
      }
    break;
case BLUE:
  if (bothFedGold) {
    if (randColor > 60) {
      chicoboColor=chocoboColor.WHITE;
    }
 else     if (randColor > 30) {
      chicoboColor=chocoboColor.BLUE;
    }
  }
 else {
    if (randColor > 80) {
      chicoboColor=chocoboColor.WHITE;
    }
 else     if (randColor > 40) {
      chicoboColor=chocoboColor.BLUE;
    }
  }
break;
case BLACK:
case WHITE:
if (bothFedGold) {
if (randColor > 70) {
  chicoboColor=chocoboColor.YELLOW;
}
 else if (randColor > 35) {
  chicoboColor=otherParent.color;
}
}
 else {
if (randColor > 90) {
  chicoboColor=chocoboColor.YELLOW;
}
 else if (randColor > 45) {
  chicoboColor=otherParent.color;
}
}
break;
}
return chicoboColor;
}
 else {
return null;
}
}

Fixed version (ground truth):
@Override public chocoboColor getBabyAnimalColor(EntityAgeable otherAnimalParent){
  if (otherAnimalParent instanceof EntityChocobo) {
    EntityChocobo otherParent=(EntityChocobo)otherAnimalParent;
    boolean bothFedGold=this.fedGold && otherParent.fedGold;
    int randColor=rand.nextInt(100);
    chocoboColor chicoboColor=chocoboColor.BLUE;
    System.out.println("String_Node_Str" + randColor);
switch (otherParent.color) {
case YELLOW:
      if (randColor < 50) {
        chicoboColor=chocoboColor.YELLOW;
      }
    break;
case BLUE:
  if (bothFedGold) {
    if (randColor > 60) {
      chicoboColor=chocoboColor.WHITE;
    }
 else     if (randColor > 30) {
      chicoboColor=chocoboColor.BLUE;
    }
  }
 else {
    if (randColor > 80) {
      chicoboColor=chocoboColor.WHITE;
    }
 else     if (randColor > 40) {
      chicoboColor=chocoboColor.BLUE;
    }
  }
break;
case BLACK:
case WHITE:
if (bothFedGold) {
if (randColor > 70) {
  chicoboColor=chocoboColor.YELLOW;
}
 else if (randColor > 35) {
  chicoboColor=otherParent.color;
}
}
 else {
if (randColor > 90) {
  chicoboColor=chocoboColor.YELLOW;
}
 else if (randColor > 45) {
  chicoboColor=otherParent.color;
}
}
break;
}
System.out.println("String_Node_Str" + chicoboColor);
return chicoboColor;
}
 else {
return null;
}
}
Program: 98285
Project: 98285
Buggy source:
public EntityChocoboGold(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canFly=true;
  this.canJumpHigh=Constants.CHOCOBO_GOLD_CANJUMPHIGH;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_GOLD_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_GOLD_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_GOLD_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboGold(World world){
  super(world);
  this.color=chocoboColor.GOLD;
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canFly=true;
  this.canJumpHigh=Constants.CHOCOBO_GOLD_CANJUMPHIGH;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_GOLD_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_GOLD_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_GOLD_AIRSPEEDFACT;
}
Program: 98286
Project: 98286
Buggy source:
public EntityChocoboGreen(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canCrossWater=false;
  this.canJumpHigh=Constants.CHOCOBO_GREEN_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_GREEN_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_GREEN_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_GREEN_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboGreen(World world){
  super(world);
  this.color=chocoboColor.GREEN;
  this.setHealth(this.getMaxHealth());
  this.canCrossWater=false;
  this.canJumpHigh=Constants.CHOCOBO_GREEN_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_GREEN_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_GREEN_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_GREEN_AIRSPEEDFACT;
}
Program: 98287
Project: 98287
Buggy source:
@Override public chocoboColor getBabyAnimalColor(EntityAgeable otherAnimalParent){
  if (otherAnimalParent instanceof EntityChocobo) {
    EntityChocobo otherParent=(EntityChocobo)otherAnimalParent;
    boolean bothFedGold=this.fedGold && otherParent.fedGold;
    int randColor=rand.nextInt(100);
    chocoboColor chicoboColor=chocoboColor.GREEN;
switch (otherParent.color) {
case YELLOW:
      if (randColor < 50) {
        chicoboColor=chocoboColor.YELLOW;
      }
    break;
case BLUE:
  if (bothFedGold) {
    if (randColor > 60) {
      chicoboColor=chocoboColor.WHITE;
    }
 else     if (randColor > 30) {
      chicoboColor=chocoboColor.BLUE;
    }
  }
 else {
    if (randColor > 80) {
      chicoboColor=chocoboColor.WHITE;
    }
 else     if (randColor > 40) {
      chicoboColor=chocoboColor.BLUE;
    }
  }
break;
case BLACK:
case WHITE:
if (bothFedGold) {
if (randColor > 70) {
  chicoboColor=chocoboColor.YELLOW;
}
 else if (randColor > 35) {
  chicoboColor=otherParent.color;
}
}
 else {
if (randColor > 90) {
  chicoboColor=chocoboColor.YELLOW;
}
 else if (randColor > 45) {
  chicoboColor=otherParent.color;
}
}
break;
}
return chicoboColor;
}
 else {
return null;
}
}

Fixed version (ground truth):
@Override public chocoboColor getBabyAnimalColor(EntityAgeable otherAnimalParent){
  if (otherAnimalParent instanceof EntityChocobo) {
    EntityChocobo otherParent=(EntityChocobo)otherAnimalParent;
    boolean bothFedGold=this.fedGold && otherParent.fedGold;
    int randColor=rand.nextInt(100);
    chocoboColor chicoboColor=chocoboColor.GREEN;
    System.out.println("String_Node_Str" + randColor);
switch (otherParent.color) {
case YELLOW:
      if (randColor < 50) {
        chicoboColor=chocoboColor.YELLOW;
      }
    break;
case BLUE:
  if (bothFedGold) {
    if (randColor > 60) {
      chicoboColor=chocoboColor.WHITE;
    }
 else     if (randColor > 30) {
      chicoboColor=chocoboColor.BLUE;
    }
  }
 else {
    if (randColor > 80) {
      chicoboColor=chocoboColor.WHITE;
    }
 else     if (randColor > 40) {
      chicoboColor=chocoboColor.BLUE;
    }
  }
break;
case BLACK:
case WHITE:
if (bothFedGold) {
if (randColor > 70) {
  chicoboColor=chocoboColor.YELLOW;
}
 else if (randColor > 35) {
  chicoboColor=otherParent.color;
}
}
 else {
if (randColor > 90) {
  chicoboColor=chocoboColor.YELLOW;
}
 else if (randColor > 45) {
  chicoboColor=otherParent.color;
}
}
break;
}
System.out.println("String_Node_Str" + chicoboColor);
return chicoboColor;
}
 else {
return null;
}
}
Program: 98288
Project: 98288
Buggy source:
public EntityChocoboPink(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canFly=true;
  this.canJumpHigh=Constants.CHOCOBO_PINK_CANJUMPHIGH;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_PINK_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_PINK_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_PINK_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboPink(World world){
  super(world);
  this.color=chocoboColor.PINK;
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canFly=true;
  this.canJumpHigh=Constants.CHOCOBO_PINK_CANJUMPHIGH;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_PINK_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_PINK_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_PINK_AIRSPEEDFACT;
}
Program: 98289
Project: 98289
Buggy source:
public EntityChocoboPurple(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=false;
  this.canJumpHigh=Constants.CHOCOBO_PURPLE_CANJUMPHIGH;
  this.canFly=true;
  this.isImmuneToFire=true;
  this.landSpeedFactor=Constants.CHOCOBO_PURPLE_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_PURPLE_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_PURPLE_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboPurple(World world){
  super(world);
  this.color=chocoboColor.PURPLE;
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=false;
  this.canJumpHigh=Constants.CHOCOBO_PURPLE_CANJUMPHIGH;
  this.canFly=true;
  this.isImmuneToFire=true;
  this.landSpeedFactor=Constants.CHOCOBO_PURPLE_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_PURPLE_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_PURPLE_AIRSPEEDFACT;
}
Program: 98290
Project: 98290
Buggy source:
public EntityChocoboRed(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canFly=true;
  this.canJumpHigh=Constants.CHOCOBO_RED_CANJUMPHIGH;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_RED_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_RED_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_RED_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboRed(World world){
  super(world);
  this.color=chocoboColor.RED;
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canFly=true;
  this.canJumpHigh=Constants.CHOCOBO_RED_CANJUMPHIGH;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_RED_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_RED_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_RED_AIRSPEEDFACT;
}
Program: 98291
Project: 98291
Buggy source:
public EntityChocoboWhite(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canJumpHigh=Constants.CHOCOBO_WHITE_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_WHITE_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_WHITE_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_WHITE_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboWhite(World world){
  super(world);
  this.color=chocoboColor.WHITE;
  this.setHealth(this.getMaxHealth());
  this.canClimb=true;
  this.canCrossWater=true;
  this.canJumpHigh=Constants.CHOCOBO_WHITE_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_WHITE_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_WHITE_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_WHITE_AIRSPEEDFACT;
}
Program: 98292
Project: 98292
Buggy source:
public EntityChocoboYellow(World world){
  super(world);
  this.setHealth(this.getMaxHealth());
  this.canClimb=false;
  this.canCrossWater=false;
  this.canJumpHigh=Constants.CHOCOBO_YELLOW_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_YELLOW_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_YELLOW_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_YELLOW_AIRSPEEDFACT;
}

Fixed version (ground truth):
public EntityChocoboYellow(World world){
  super(world);
  this.color=chocoboColor.YELLOW;
  this.setHealth(this.getMaxHealth());
  this.canClimb=false;
  this.canCrossWater=false;
  this.canJumpHigh=Constants.CHOCOBO_YELLOW_CANJUMPHIGH;
  this.canFly=false;
  this.isImmuneToFire=false;
  this.landSpeedFactor=Constants.CHOCOBO_YELLOW_LANDSPEEDFACT;
  this.waterSpeedFactor=Constants.CHOCOBO_YELLOW_WATERSPEEDFACT;
  this.airbornSpeedFactor=Constants.CHOCOBO_YELLOW_AIRSPEEDFACT;
}
Program: 98293
Project: 98293
Buggy source:
@Override public ItemStack transferStackInSlot(EntityPlayer player,int slot){
  ItemStack iStackTarget=null;
  Slot slotObj=(Slot)this.inventorySlots.get(slot);
  if (slotObj != null && slotObj.getHasStack()) {
    ItemStack iStackSource=slotObj.getStack();
    iStackTarget=iStackSource.copy();
    int nSlots=this.chocoBagInv.getSizeInventory();
    if (slot < nSlots) {
      if (!this.mergeItemStack(iStackSource,nSlots,this.inventorySlots.size(),true)) {
        return null;
      }
    }
 else     if (!this.mergeItemStack(iStackSource,0,nSlots,false)) {
      return null;
    }
    if (iStackSource.stackSize == 0) {
      slotObj.putStack((ItemStack)null);
    }
 else {
      slotObj.onSlotChanged();
    }
  }
  return iStackTarget;
}

Fixed version (ground truth):
@Override public ItemStack transferStackInSlot(EntityPlayer player,int sourceSlotIdx){
  ItemStack targetItemStack=null;
  Slot sourceSlot=(Slot)this.inventorySlots.get(sourceSlotIdx);
  if (sourceSlot != null && sourceSlot.getHasStack()) {
    ItemStack sourceItemStack=sourceSlot.getStack();
    targetItemStack=sourceItemStack.copy();
    int nSlots=this.chocoBagInv.getSizeInventory();
    if (sourceSlotIdx < nSlots) {
      if (!this.mergeItemStack(sourceItemStack,nSlots,this.inventorySlots.size(),true)) {
        return null;
      }
    }
 else     if (!this.mergeItemStack(sourceItemStack,0,nSlots,false)) {
      return null;
    }
    if (sourceItemStack.stackSize == 0) {
      sourceSlot.putStack((ItemStack)null);
    }
 else {
      sourceSlot.onSlotChanged();
    }
  }
  return targetItemStack;
}
Program: 98294
Project: 98294
Buggy source:
@ForgeSubscribe public void onUseBonemeal(BonemealEvent event){
  if (event.ID == ModChocoCraft.gysahlStemBlock.blockID) {
    if (((BlockGysahlStem)ModChocoCraft.gysahlStemBlock).onBonemealUse(event.world,event.X,event.Y,event.Z)) {
      ChocoboPlayerHelper.useCurrentItem(event.entityPlayer);
    }
  }
}

Fixed version (ground truth):
@ForgeSubscribe public void onUseBonemeal(BonemealEvent event){
  if (event.ID == ModChocoCraft.gysahlStemBlock.blockID) {
    if (((BlockGysahlStem)ModChocoCraft.gysahlStemBlock).onBonemealUse(event.world,event.X,event.Y,event.Z)) {
      event.setResult(Result.ALLOW);
    }
  }
}
Program: 98295
Project: 98295
Buggy source:
@Override public void generate(Random random,int chunkX,int chunkZ,World world,IChunkProvider chunkGenerator,IChunkProvider chunkProvider){
  if (!world.isRemote && world.provider.isSurfaceWorld()) {
    if (random.nextInt(1000) <= ModChocoCraft.gysahlWorldGenRate) {
      int randPosX=chunkX * 16 + random.nextInt(16);
      int randPosZ=chunkZ * 16 + random.nextInt(16);
      int randPosY=world.getTopSolidOrLiquidBlock(randPosX,randPosX);
      new WorldGenFlowers(ModChocoCraft.gysahlGreenBlock.blockID).generate(world,random,randPosX,randPosY,randPosZ);
    }
  }
}

Fixed version (ground truth):
@Override public void generate(Random random,int chunkX,int chunkZ,World world,IChunkProvider chunkGenerator,IChunkProvider chunkProvider){
  if (!world.isRemote && world.provider.isSurfaceWorld()) {
    if (random.nextInt(1000) <= ModChocoCraft.gysahlWorldGenRate) {
      int randPosX=chunkX * 16 + random.nextInt(16);
      int randPosZ=chunkZ * 16 + random.nextInt(16);
      int randPosY=world.getTopSolidOrLiquidBlock(randPosX,randPosZ);
      new WorldGenFlowers(ModChocoCraft.gysahlGreenBlock.blockID).generate(world,random,randPosX,randPosY,randPosZ);
    }
  }
}
Program: 98299
Project: 98299
Buggy source:
private void addSmeltings(){
  GameRegistry.addSmelting(chocoboLegRawItem.itemID,new ItemStack(chocoboLegCookedItem),0.1F);
}

Fixed version (ground truth):
private void addSmeltings(){
  GameRegistry.addSmelting(chocoboLegRawItem.itemID,new ItemStack(chocoboLegCookedItem),0.1F);
  GameRegistry.addSmelting(gysahlPicklesRawItem.itemID,new ItemStack(gysahlPicklesItem),0.1F);
}
Program: 98300
Project: 98300
Buggy source:
public EntityAnimalChocobo(World world){
  super(world);
  this.hasAttacked=false;
  this.fleeingTick=0;
  this.breeding=0;
  this.setHidename(true);
  this.setWander(true);
  this.setTamed(false);
  this.setFollowing(false);
  this.setIsMale(this.getRandomIsMale());
  this.getNavigator().setAvoidsWater(true);
}

Fixed version (ground truth):
public EntityAnimalChocobo(World world){
  super(world);
  this.hasAttacked=false;
  this.fleeingTick=0;
  this.breeding=0;
  this.setHidename(true);
  this.setWander(true);
  this.setTamed(false);
  this.setFollowing(false);
  this.setIsMale(this.getRandomIsMale());
  this.getNavigator().setAvoidsWater(true);
  this.hasMate=false;
}
Program: 98301
Project: 98301
Buggy source:
@SuppressWarnings("String_Node_Str") protected Entity findPlayerToAttack(){
  if (this.fleeingTick > 0) {
    return null;
  }
  if (this.isInLove() && !this.isChild()) {
    List list=this.worldObj.getEntitiesWithinAABB(EntityChocobo.class,this.boundingBox.expand(8F,8F,8F));
    for (int i=0; i < list.size(); i++) {
      EntityAnimalChocobo otherChoco=(EntityAnimalChocobo)list.get(i);
      if (otherChoco != this) {
        boolean canMate=otherChoco.isInLove() && otherChoco.isMale() != this.isMale();
        if (canMate && !otherChoco.isChild()) {
          return otherChoco;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected Entity findPlayerToAttack(){
  if (this.fleeingTick > 0) {
    return null;
  }
  if (this.isInLove()) {
    List list=this.worldObj.getEntitiesWithinAABB(EntityChocobo.class,this.boundingBox.expand(8F,8F,8F));
    for (int i=0; i < list.size(); i++) {
      EntityChocobo otherChoco=(EntityChocobo)list.get(i);
      if (otherChoco != this) {
        boolean canMate=otherChoco.isInLove() && otherChoco.isMale() != this.isMale();
        if (canMate && !otherChoco.isChild()) {
          this.hasMate=true;
          otherChoco.hasMate=true;
          return otherChoco;
        }
      }
    }
  }
  return null;
}
Program: 98302
Project: 98302
Buggy source:
public void onLivingUpdate(){
  super.onLivingUpdate();
  if (this.isInLove()) {
    if (this.entityToAttack != null) {
      if (Side.CLIENT == FMLCommonHandler.instance().getEffectiveSide()) {
        ChocoboParticleHelper.showParticleAroundEntityFx("String_Node_Str",this);
      }
      if (!((EntityAnimalChocobo)this.entityToAttack).isInLove()) {
        this.entityToAttack=null;
      }
    }
  }
  if (Side.CLIENT == FMLCommonHandler.instance().getEffectiveSide()) {
    this.destPos+=(double)(this.onGround ? -1 : 4) * 0.3D;
    this.destPos=ChocoboMathHelper.clamp(this.destPos,0.0F,1.0F);
    if (!this.onGround) {
      this.wingRotDelta=ChocoboMathHelper.minLimit(this.wingRotDelta,1.0F);
    }
    this.wingRotDelta*=0.9D;
    if (!this.onGround && this.motionY < 0.0D) {
      this.motionY*=0.8D;
    }
    this.wingRotation+=this.wingRotDelta * 2.0F;
  }
  if (Side.SERVER == FMLCommonHandler.instance().getEffectiveSide()) {
    if (--this.timeUntilNextFeather <= 0) {
      int d100=this.rand.nextInt(100);
      if (d100 < ModChocoCraft.featherDropChance) {
        this.dropFeather();
      }
      this.timeUntilNextFeather=this.rand.nextInt(ModChocoCraft.featherDelayRandom) + ModChocoCraft.featherDelayStatic;
    }
  }
}

Fixed version (ground truth):
public void onLivingUpdate(){
  super.onLivingUpdate();
  if (this.isInLove()) {
    if (this.entityToAttack != null) {
      if (Side.CLIENT == FMLCommonHandler.instance().getEffectiveSide()) {
        ChocoboParticleHelper.showParticleAroundEntityFx("String_Node_Str",this);
      }
      if (this.entityToAttack instanceof EntityAnimalChocobo) {
        EntityAnimalChocobo otherChoco=(EntityAnimalChocobo)this.entityToAttack;
        if (!otherChoco.isInLove()) {
          this.entityToAttack=null;
          this.hasMate=false;
        }
      }
    }
  }
  if (Side.CLIENT == FMLCommonHandler.instance().getEffectiveSide()) {
    this.destPos+=(double)(this.onGround ? -1 : 4) * 0.3D;
    this.destPos=ChocoboMathHelper.clamp(this.destPos,0.0F,1.0F);
    if (!this.onGround) {
      this.wingRotDelta=ChocoboMathHelper.minLimit(this.wingRotDelta,1.0F);
    }
    this.wingRotDelta*=0.9D;
    if (!this.onGround && this.motionY < 0.0D) {
      this.motionY*=0.8D;
    }
    this.wingRotation+=this.wingRotDelta * 2.0F;
  }
  if (Side.SERVER == FMLCommonHandler.instance().getEffectiveSide()) {
    if (--this.timeUntilNextFeather <= 0) {
      int d100=this.rand.nextInt(100);
      if (d100 < ModChocoCraft.featherDropChance) {
        this.dropFeather();
      }
      this.timeUntilNextFeather=this.rand.nextInt(ModChocoCraft.featherDelayRandom) + ModChocoCraft.featherDelayStatic;
    }
  }
}
Program: 98303
Project: 98303
Buggy source:
/** 
 * Called when the entity is attacked.
 */
public boolean attackEntityFrom(DamageSource damagesource,int i){
  Entity entity=damagesource.getEntity();
  if (entity != null && entity == this.riddenByEntity) {
    return false;
  }
 else {
    return super.attackEntityFrom(damagesource,i);
  }
}

Fixed version (ground truth):
/** 
 * Called when the entity is attacked.
 */
public boolean attackEntityFrom(DamageSource damagesource,int i){
  if (null != damagesource) {
    Entity entity=damagesource.getEntity();
    if (entity != null && entity == this.riddenByEntity) {
      return false;
    }
 else {
      return super.attackEntityFrom(damagesource,i);
    }
  }
 else {
    return false;
  }
}
Program: 98304
Project: 98304
Buggy source:
public void onNeighborBlockChange(World world,int posX,int posY,int posZ,int par5){
  this.canStrawStay(world,posX,posY,posZ);
}

Fixed version (ground truth):
@Override public void onNeighborBlockChange(World world,int posX,int posY,int posZ,int par5){
  this.canStrawStay(world,posX,posY,posZ);
}
Program: 98305
Project: 98305
Buggy source:
/** 
 * Updates the blocks bounds based on its current state. Args: world, x, y, z
 */
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess,int par2,int par3,int par4){
  this.setBlockBounds(0.0F,0.0F,0.0F,1.0F,0.0625F,1.0F);
}

Fixed version (ground truth):
/** 
 * Updates the blocks bounds based on its current state. Args: world, x, y, z
 */
@Override public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess,int par2,int par3,int par4){
  this.setBlockBounds(0.0F,0.0F,0.0F,1.0F,0.0625F,1.0F);
}
Program: 98306
Project: 98306
Buggy source:
/** 
 * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
 */
public boolean canPlaceBlockAt(World world,int posX,int posY,int posZ){
  int atBlockId=world.getBlockId(posX,posY - 1,posZ);
  Block block=Block.blocksList[atBlockId];
  return block != null && (Block.blocksList[atBlockId].isOpaqueCube()) ? world.getBlockMaterial(posX,posY - 1,posZ).blocksMovement() : false;
}

Fixed version (ground truth):
/** 
 * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
 */
@Override public boolean canPlaceBlockAt(World world,int posX,int posY,int posZ){
  int atBlockId=world.getBlockId(posX,posY - 1,posZ);
  Block block=Block.blocksList[atBlockId];
  return block != null && (Block.blocksList[atBlockId].isOpaqueCube()) ? world.getBlockMaterial(posX,posY - 1,posZ).blocksMovement() : false;
}
Program: 98307
Project: 98307
Buggy source:
/** 
 * Returns the ID of the items to drop on destruction.
 */
public int idDropped(int par1,Random par2Random,int par3){
  return this.blockID;
}

Fixed version (ground truth):
/** 
 * Returns the ID of the items to drop on destruction.
 */
@Override public int idDropped(int par1,Random par2Random,int par3){
  return this.blockID;
}
Program: 98308
Project: 98308
Buggy source:
@SideOnly(Side.CLIENT) public Icon getBlockTextureFromSideAndMetadata(int i,int j){
  return this.blockIcon;
}

Fixed version (ground truth):
@SideOnly(Side.CLIENT) @Override public Icon getBlockTextureFromSideAndMetadata(int i,int j){
  return this.blockIcon;
}
Program: 98309
Project: 98309
Buggy source:
/** 
 * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
 */
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World,int par2,int par3,int par4){
  return null;
}

Fixed version (ground truth):
/** 
 * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
 */
@Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World,int par2,int par3,int par4){
  return null;
}
Program: 98310
Project: 98310
Buggy source:
/** 
 * Returns the quantity of items to drop on block destruction.
 */
public int quantityDropped(Random par1Random){
  return 1;
}

Fixed version (ground truth):
@Override public int quantityDropped(int meta,int fortune,Random random){
  return (meta & 7) + 1;
}
Program: 98311
Project: 98311
Buggy source:
/** 
 * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
 */
public boolean renderAsNormalBlock(){
  return false;
}

Fixed version (ground truth):
/** 
 * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
 */
@Override public boolean renderAsNormalBlock(){
  return false;
}
Program: 98312
Project: 98312
Buggy source:
/** 
 * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the block and l is the block's subtype/damage.
 */
public void harvestBlock(World world,EntityPlayer player,int posX,int posY,int posZ,int blockDamage){
  super.harvestBlock(world,player,posX,posY,posZ,blockDamage);
  world.setBlock(posX,posY,posZ,this.blockID,0,2);
}

Fixed version (ground truth):
/** 
 * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the block and l is the block's subtype/damage.
 */
@Override public void harvestBlock(World world,EntityPlayer player,int posX,int posY,int posZ,int blockDamage){
  super.harvestBlock(world,player,posX,posY,posZ,blockDamage);
  world.setBlockToAir(posX,posY,posZ);
}
Program: 98313
Project: 98313
Buggy source:
/** 
 * Ticks the block if it's been scheduled
 */
public void updateTick(World world,int posX,int posY,int posZ,Random random){
  if (world.getSavedLightValue(EnumSkyBlock.Block,posX,posY,posZ) > 11) {
    world.setBlock(posX,posY,posZ,this.blockID,0,2);
  }
}

Fixed version (ground truth):
/** 
 * Ticks the block if it's been scheduled
 */
@Override public void updateTick(World world,int posX,int posY,int posZ,Random random){
  if (world.getSavedLightValue(EnumSkyBlock.Block,posX,posY,posZ) > 11) {
    world.setBlock(posX,posY,posZ,this.blockID,0,2);
  }
}
Program: 98314
Project: 98314
Buggy source:
/** 
 * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
 */
public boolean isOpaqueCube(){
  return false;
}

Fixed version (ground truth):
/** 
 * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
 */
@Override public boolean isOpaqueCube(){
  return false;
}