nus-yam/ex-repair huggingface dataset:
Program: 178995
Project: 178995
Buggy source:
public PersistentWorkSession(String id,EntityManagerFactory emf,AnnotationDictionary dictionary){
  if (id == null || id.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (SessionRegistry.getSession(id) != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (emf == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.emf=emf;
  this.sessionId=id;
  if (dictionary != null) {
    this.dictionary=dictionary;
  }
 else {
    dictionary=new AnnotationDictionary(){
      @Override public void build(){
      }
    }
;
    dictionary.setScanned(true);
  }
  SessionRegistry.addSession(this);
  workItems=new LinkedBlockingQueue<WorkItem>();
  executor=Executors.newFixedThreadPool(10);
  em=new ThreadLocal<EntityManager>();
  acquireCounter=new ThreadLocal<Integer>();
  future=executor.submit((Runnable)this);
}

Fixed version (ground truth):
public PersistentWorkSession(String id,EntityManagerFactory emf,AnnotationDictionary dictionary){
  if (id == null || id.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (SessionRegistry.getSession(id) != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (emf == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.emf=emf;
  this.sessionId=id;
  if (dictionary != null) {
    this.dictionary=dictionary;
  }
 else {
    dictionary=new AnnotationDictionary(){
      @Override public void build(){
      }
    }
;
    dictionary.setScanned(true);
  }
  SessionRegistry.addSession(this);
  workItems=new LinkedBlockingQueue<WorkItem>();
  executor=Executors.newFixedThreadPool(10);
  em=new ThreadLocal<EntityManager>();
  acquireCounter=new ThreadLocal<Integer>();
  tokenOut=new ThreadLocal<Boolean>();
  future=executor.submit((Runnable)this);
}
Program: 178997
Project: 178997
Buggy source:
@Override public void sendToken(WorkToken token,Node fromNode){
  TokenFromNode tokenFromNode=new TokenFromNode();
  tokenFromNode.setToken(token);
  BusinessProcess process=fromNode.getProcess();
  tokenFromNode.setProcessInstanceId(process.getInstanceId());
  tokenFromNode.setProcessDefinitionId(process.getDefinitionId());
  tokenFromNode.setNodeId(fromNode.getNodeId());
  workItems.add(tokenFromNode);
}

Fixed version (ground truth):
@Override public void sendToken(WorkToken token,Node fromNode){
  tokenOut.set(true);
  if (!isRunner()) {
    fromNode=(Node)merge(fromNode);
  }
  TokenFromNode tokenFromNode=new TokenFromNode();
  tokenFromNode.setToken(token);
  BusinessProcess process=fromNode.getProcess();
  tokenFromNode.setProcessInstanceId(process.getInstanceId());
  tokenFromNode.setProcessDefinitionId(process.getDefinitionId());
  tokenFromNode.setNodeId(fromNode.getNodeId());
  workItems.add(tokenFromNode);
}
Program: 178998
Project: 178998
Buggy source:
private void persistList(final List<Object> entities){
  if (isRunner()) {
    for (    Object o : entities) {
      em.get().persist(o);
    }
  }
 else {
    final LinkedBlockingQueue<String> kicker=new LinkedBlockingQueue<String>();
    executor.execute(new Runnable(){
      @Override public void run(){
        acquireEntityManager();
        beginTransaction();
        for (        Object o : entities) {
          em.get().persist(o);
        }
        commitTransaction();
        releaseEntityManager();
        kicker.add("String_Node_Str");
      }
    }
);
    try {
      String result=null;
      int retries=40;
      while (result == null && retries > 0) {
        --retries;
        result=kicker.poll(500,TimeUnit.MILLISECONDS);
      }
    }
 catch (    InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
}

Fixed version (ground truth):
private void persistList(final List<Object> entities){
  if (isRunner()) {
    for (    Object o : entities) {
      em.get().persist(o);
    }
  }
 else {
    final LinkedBlockingQueue<String> kicker=new LinkedBlockingQueue<String>();
    executor.execute(new Runnable(){
      @Override public void run(){
        acquireEntityManager();
        beginTransaction();
        for (        Object o : entities) {
          em.get().persist(o);
        }
        commitTransaction();
        for (        Object o : entities) {
          em.get().detach(o);
        }
        releaseEntityManager();
        kicker.add("String_Node_Str");
      }
    }
);
    try {
      String result=null;
      int retries=40;
      while (result == null && retries > 0) {
        --retries;
        result=kicker.poll(500,TimeUnit.MILLISECONDS);
      }
    }
 catch (    InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
}
Program: 178999
Project: 178999
Buggy source:
@Test public void testHelloWorld() throws Exception {
  long processId=session.createProcess("String_Node_Str");
  Assert.assertTrue(processId > 0);
  EntityManager em=emf.createEntityManager();
  BusinessProcess process=em.find(HelpDeskProcess.class,processId);
  Assert.assertNotNull(process);
  em.detach(process);
  em.close();
  System.out.println("String_Node_Str");
  Thread.sleep(2000);
  Assert.assertTrue(session.isRunning());
  List<UserTask> userTasks=session.getUserTasks();
  Assert.assertTrue(userTasks.size() == 1);
  UserTask userTask=userTasks.get(0);
  Assert.assertTrue(userTask.getTaskState() == TaskState.Created);
}

Fixed version (ground truth):
@Test public void testHelloWorld() throws Exception {
  long processId=session.createProcess("String_Node_Str");
  Assert.assertTrue(processId > 0);
  EntityManager em=emf.createEntityManager();
  BusinessProcess process=em.find(BusinessProcess.class,processId);
  Assert.assertNotNull(process);
  em.detach(process);
  em.close();
  System.out.println("String_Node_Str");
  Thread.sleep(2000);
  Assert.assertTrue(session.isRunning());
  List<UserTask> userTasks=session.getUserTasks();
  Assert.assertTrue(userTasks.size() == 1);
  UserTask userTask=userTasks.get(0);
  Assert.assertTrue(userTask.getTaskState() == TaskState.Created);
}
Program: 179000
Project: 179000
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.welcome:
    new AlertDialog.Builder(this).setTitle("String_Node_Str").setMessage("String_Node_Str").setNeutralButton("String_Node_Str",new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int which){
      }
    }
).show();
  return true;
case R.id.credits:
Intent myIntent=new Intent(Main.this,Credits.class);
Main.this.startActivity(myIntent);
return true;
case R.id.links:
Intent myIntent2=new Intent(Main.this,News.class);
Main.this.startActivity(myIntent2);
return true;
case R.id.todo:
Intent myIntent3=new Intent(Main.this,ToDoListActivity.class);
Main.this.startActivity(myIntent3);
case R.id.feedback:
String feedbackURL="String_Node_Str";
Intent browserIntent=new Intent(Intent.ACTION_VIEW,Uri.parse(feedbackURL));
startActivity(browserIntent);
default :
return super.onOptionsItemSelected(item);
}
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.welcome:
    new AlertDialog.Builder(this).setTitle("String_Node_Str").setMessage("String_Node_Str").setNeutralButton("String_Node_Str",new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int which){
      }
    }
).show();
  return true;
case R.id.credits:
Intent myIntent=new Intent(Main.this,Credits.class);
Main.this.startActivity(myIntent);
return true;
case R.id.links:
Intent myIntent2=new Intent(Main.this,News.class);
Main.this.startActivity(myIntent2);
return true;
case R.id.todo:
Intent myIntent3=new Intent(Main.this,ToDoListActivity.class);
Main.this.startActivity(myIntent3);
return true;
case R.id.feedback:
String feedbackURL="String_Node_Str";
Intent browserIntent=new Intent(Intent.ACTION_VIEW,Uri.parse(feedbackURL));
Main.this.startActivity(browserIntent);
return true;
default :
return super.onOptionsItemSelected(item);
}
}
Program: 179001
Project: 179001
Buggy source:
public List<Warp> listWarps(Player player){
  List<Warp> list=new ArrayList<Warp>();
  for (  Warp warp : warps.values()) {
    if (warp.canWarpHere(User.getUser(player))) {
      list.add(warp);
    }
  }
  return list;
}

Fixed version (ground truth):
public List<Warp> listWarps(Player player){
  List<Warp> list=new ArrayList<Warp>();
  for (  Warp warp : warps.values()) {
    try {
      if (warp.canWarpHere(User.getUser(player))) {
        list.add(warp);
      }
    }
 catch (    Exception e) {
    }
  }
  return list;
}
Program: 179004
Project: 179004
Buggy source:
@Override public boolean inGroup(String player,String group){
  return PermissionUser.matchUser(player).inGroup(getPermissionManager().getGroupFile().getGroup(group));
}

Fixed version (ground truth):
@Override public boolean inGroup(String player,String group){
  return PermissionUser.matchUserIgnoreCase(player).inGroup(getPermissionManager().getGroupFile().getGroup(group));
}
Program: 179006
Project: 179006
Buggy source:
public String ownsHere(Player player,Location location){
  boolean inLot=false;
  for (  String LotID : lots.keySet()) {
    if (getLot(LotID).withinLot(location)) {
      inLot=true;
      PermissionUser user=PermissionUser.matchUser(player.getName());
      if (user == null) {
        return "String_Node_Str";
      }
      if (getLot(LotID).isOwner(player) || user.hasPerm("String_Node_Str")) {
        return getLot(LotID).getLotID();
      }
    }
  }
  if (inLot) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String ownsHere(Player player,Location location){
  boolean inLot=false;
  for (  String LotID : lots.keySet()) {
    if (getLot(LotID).withinLot(location)) {
      inLot=true;
      PermissionUser user=PermissionUser.matchUserIgnoreCase(player.getName());
      if (user == null) {
        return "String_Node_Str";
      }
      if (getLot(LotID).isOwner(player) || user.hasPerm("String_Node_Str")) {
        return getLot(LotID).getLotID();
      }
    }
  }
  if (inLot) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}
Program: 179008
Project: 179008
Buggy source:
public void Unban(String[] args,User user){
  if (args.length != 1) {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
    return;
  }
  PermissionUser puser2;
  if ((puser2=PermissionUser.matchUser(args[0])) == null && !Bukkit.getPlayerExact(args[0]).isBanned()) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (puser2.isBanned() == null && !Bukkit.getPlayerExact(puser2.getName()).isBanned()) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (puser2 != null) {
    BenCmd.getPermissionManager().getActionLog().log(new ActionLogEntry(ActionLogType.UNBAN_MAN,puser2.getName(),user.getName()));
    BenCmd.getPermissionManager().getActionFile().removeAction(puser2.isBanned());
  }
  user.sendMessage(ChatColor.GREEN + "String_Node_Str");
}

Fixed version (ground truth):
public void Unban(String[] args,User user){
  if (args.length != 1) {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
    return;
  }
  PermissionUser puser2;
  if ((puser2=PermissionUser.matchUserIgnoreCase(args[0])) == null && !Bukkit.getPlayerExact(args[0]).isBanned()) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (puser2.isBanned() == null && !Bukkit.getPlayerExact(puser2.getName()).isBanned()) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (puser2 != null) {
    BenCmd.getPermissionManager().getActionLog().log(new ActionLogEntry(ActionLogType.UNBAN_MAN,puser2.getName(),user.getName()));
    BenCmd.getPermissionManager().getActionFile().removeAction(puser2.isBanned());
  }
  user.sendMessage(ChatColor.GREEN + "String_Node_Str");
}
Program: 179009
Project: 179009
Buggy source:
public void Note(String[] args,User user){
  if (args.length < 2) {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
    return;
  }
  PermissionUser puser2;
  if ((puser2=PermissionUser.matchUser(args[0])) == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  String m="String_Node_Str";
  for (int i=1; i < args.length; i++) {
    if (m.isEmpty()) {
      m+=args[i];
    }
 else {
      m+="String_Node_Str" + args[i];
    }
  }
  BenCmd.getPermissionManager().getActionLog().log(new ActionLogEntry(ActionLogType.NOTE,puser2.getName(),user.getName(),m));
  user.sendMessage(ChatColor.GREEN + "String_Node_Str" + puser2.getName()+ "String_Node_Str");
}

Fixed version (ground truth):
public void Note(String[] args,User user){
  if (args.length < 2) {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
    return;
  }
  PermissionUser puser2;
  if ((puser2=PermissionUser.matchUserIgnoreCase(args[0])) == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  String m="String_Node_Str";
  for (int i=1; i < args.length; i++) {
    if (m.isEmpty()) {
      m+=args[i];
    }
 else {
      m+="String_Node_Str" + args[i];
    }
  }
  BenCmd.getPermissionManager().getActionLog().log(new ActionLogEntry(ActionLogType.NOTE,puser2.getName(),user.getName(),m));
  user.sendMessage(ChatColor.GREEN + "String_Node_Str" + puser2.getName()+ "String_Node_Str");
}
Program: 179010
Project: 179010
Buggy source:
public void Unjail(String[] args,User user){
  if (args.length != 1) {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
    return;
  }
  PermissionUser puser2;
  if ((puser2=PermissionUser.matchUser(args[0])) == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (puser2.isJailed() == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  BenCmd.getPermissionManager().getActionLog().log(new ActionLogEntry(ActionLogType.UNJAIL_MAN,puser2.getName(),user.getName()));
  BenCmd.getPermissionManager().getActionFile().removeAction(puser2.isJailed());
  User user2;
  if ((user2=User.matchUser(args[0])) != null) {
    user2.sendMessage(ChatColor.GREEN + "String_Node_Str");
    user2.spawn();
  }
 else {
    BenCmd.getPermissionManager().getActionFile().addAction(puser2.getName(),ActionType.LEAVEJAIL,-1);
  }
  user.sendMessage(ChatColor.GREEN + "String_Node_Str");
}

Fixed version (ground truth):
public void Unjail(String[] args,User user){
  if (args.length != 1) {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
    return;
  }
  PermissionUser puser2;
  if ((puser2=PermissionUser.matchUserIgnoreCase(args[0])) == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (puser2.isJailed() == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  BenCmd.getPermissionManager().getActionLog().log(new ActionLogEntry(ActionLogType.UNJAIL_MAN,puser2.getName(),user.getName()));
  BenCmd.getPermissionManager().getActionFile().removeAction(puser2.isJailed());
  User user2;
  if ((user2=User.matchUser(args[0])) != null) {
    user2.sendMessage(ChatColor.GREEN + "String_Node_Str");
    user2.spawn();
  }
 else {
    BenCmd.getPermissionManager().getActionFile().addAction(puser2.getName(),ActionType.LEAVEJAIL,-1);
  }
  user.sendMessage(ChatColor.GREEN + "String_Node_Str");
}
Program: 179013
Project: 179013
Buggy source:
public void Unmute(String[] args,User user){
  if (args.length != 1) {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
    return;
  }
  PermissionUser puser2;
  if ((puser2=PermissionUser.matchUser(args[0])) == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (puser2.isMuted() == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  BenCmd.getPermissionManager().getActionLog().log(new ActionLogEntry(ActionLogType.UNMUTE_MAN,puser2.getName(),user.getName()));
  BenCmd.getPermissionManager().getActionFile().removeAction(puser2.isMuted());
  User user2;
  if ((user2=User.matchUser(args[0])) != null) {
    user2.sendMessage(ChatColor.GREEN + "String_Node_Str");
  }
  user.sendMessage(ChatColor.GREEN + "String_Node_Str");
}

Fixed version (ground truth):
public void Unmute(String[] args,User user){
  if (args.length != 1) {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
    return;
  }
  PermissionUser puser2;
  if ((puser2=PermissionUser.matchUserIgnoreCase(args[0])) == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (puser2.isMuted() == null) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  BenCmd.getPermissionManager().getActionLog().log(new ActionLogEntry(ActionLogType.UNMUTE_MAN,puser2.getName(),user.getName()));
  BenCmd.getPermissionManager().getActionFile().removeAction(puser2.isMuted());
  User user2;
  if ((user2=User.matchUser(args[0])) != null) {
    user2.sendMessage(ChatColor.GREEN + "String_Node_Str");
  }
  user.sendMessage(ChatColor.GREEN + "String_Node_Str");
}
Program: 179014
Project: 179014
Buggy source:
public static PermissionUser matchUser(String name){
  for (  Object oUser : BenCmd.getPermissionManager().getUserFile().listUsers().values()) {
    if (((InternalUser)oUser).getName().equals(name)) {
      return new PermissionUser((InternalUser)oUser);
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @deprecated Use matchUserIgnoreCase(String name) instead!
 */
public static PermissionUser matchUser(String name){
  for (  Object oUser : BenCmd.getPermissionManager().getUserFile().listUsers().values()) {
    if (((InternalUser)oUser).getName().equals(name)) {
      return new PermissionUser((InternalUser)oUser);
    }
  }
  return null;
}
Program: 179015
Project: 179015
Buggy source:
public void PublicProtect(String[] args,User user){
  if (!user.hasPerm("String_Node_Str")) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    BenCmd.getPlugin().logPermFail();
    return;
  }
  Block pointedAt=((Player)user.getHandle()).getTargetBlock(null,4);
  if (args.length == 1) {
    this.Lock(pointedAt,user,true);
  }
 else   if (args.length == 2) {
    PermissionUser p=PermissionUser.matchUser(args[1]);
    if (p != null) {
      this.Lock(pointedAt,user,p,true);
    }
 else {
      user.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void PublicProtect(String[] args,User user){
  if (!user.hasPerm("String_Node_Str")) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    BenCmd.getPlugin().logPermFail();
    return;
  }
  Block pointedAt=((Player)user.getHandle()).getTargetBlock(null,4);
  if (args.length == 1) {
    this.Lock(pointedAt,user,true);
  }
 else   if (args.length == 2) {
    PermissionUser p=PermissionUser.matchUserIgnoreCase(args[1]);
    if (p != null) {
      this.Lock(pointedAt,user,p,true);
    }
 else {
      user.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
  }
}
Program: 179017
Project: 179017
Buggy source:
public void AddProtect(String[] args,User user){
  if (!user.hasPerm("String_Node_Str")) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    BenCmd.getPlugin().logPermFail();
    return;
  }
  Block pointedAt=((Player)user.getHandle()).getTargetBlock(null,4);
  if (args.length == 1) {
    this.Lock(pointedAt,user,false);
  }
 else   if (args.length == 2) {
    PermissionUser p=PermissionUser.matchUser(args[1]);
    if (p != null) {
      this.Lock(pointedAt,user,p,false);
    }
 else {
      user.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void AddProtect(String[] args,User user){
  if (!user.hasPerm("String_Node_Str")) {
    user.sendMessage(ChatColor.RED + "String_Node_Str");
    BenCmd.getPlugin().logPermFail();
    return;
  }
  Block pointedAt=((Player)user.getHandle()).getTargetBlock(null,4);
  if (args.length == 1) {
    this.Lock(pointedAt,user,false);
  }
 else   if (args.length == 2) {
    PermissionUser p=PermissionUser.matchUserIgnoreCase(args[1]);
    if (p != null) {
      this.Lock(pointedAt,user,p,false);
    }
 else {
      user.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    user.sendMessage(ChatColor.YELLOW + "String_Node_Str");
  }
}
Program: 179020
Project: 179020
Buggy source:
public void broadcastMessage(String message){
  for (  User u : inChannel) {
    u.sendMessage(message);
  }
  for (  User u : spies) {
    u.sendMessage(ChatColor.GRAY + name + "String_Node_Str"+ message);
  }
}

Fixed version (ground truth):
public void broadcastMessage(String message){
  for (  User u : inChannel) {
    u.sendMessage(message);
  }
  for (  User u : spies) {
    u.sendMessage(ChatColor.GRAY + name + "String_Node_Str"+ message);
  }
  BenCmd.log(message);
}
Program: 179023
Project: 179023
Buggy source:
public void onBlockBreak(BlockBreakEvent event){
  lotBreakCheck(event);
  bookshelfBreak(event);
  dcudDestroy(event);
  lockDestroyCheck(event);
  logBlockBreak(event);
  jailedDestroyCheck(event);
}

Fixed version (ground truth):
public void onBlockBreak(BlockBreakEvent event){
  if (!enabled) {
    return;
  }
  lotBreakCheck(event);
  bookshelfBreak(event);
  dcudDestroy(event);
  lockDestroyCheck(event);
  logBlockBreak(event);
  jailedDestroyCheck(event);
}
Program: 179024
Project: 179024
Buggy source:
public void onSignChange(SignChangeEvent event){
  signLog(event);
}

Fixed version (ground truth):
public void onSignChange(SignChangeEvent event){
  if (!enabled) {
    return;
  }
  signLog(event);
}
Program: 179025
Project: 179025
Buggy source:
public static void destroyInstance(){
  instance=null;
}

Fixed version (ground truth):
public static void destroyInstance(){
  instance.enabled=false;
  instance=null;
}
Program: 179026
Project: 179026
Buggy source:
public void onBlockPlace(BlockPlaceEvent event){
  lotPlaceCheck(event);
  newPortalCheck(event);
  logBlockPlace(event);
  jailedPlaceCheck(event);
}

Fixed version (ground truth):
public void onBlockPlace(BlockPlaceEvent event){
  if (!enabled) {
    return;
  }
  lotPlaceCheck(event);
  newPortalCheck(event);
  logBlockPlace(event);
  jailedPlaceCheck(event);
}
Program: 179027
Project: 179027
Buggy source:
public void onBlockRedstoneChange(BlockRedstoneEvent event){
  unlDispRedstone(event);
}

Fixed version (ground truth):
public void onBlockRedstoneChange(BlockRedstoneEvent event){
  if (!enabled) {
    return;
  }
  unlDispRedstone(event);
}
Program: 179028
Project: 179028
Buggy source:
public void onBlockIgnite(BlockIgniteEvent event){
  igniteCheck(event);
}

Fixed version (ground truth):
public void onBlockIgnite(BlockIgniteEvent event){
  if (!enabled) {
    return;
  }
  igniteCheck(event);
}
Program: 179029
Project: 179029
Buggy source:
public void onBlockBurn(BlockBurnEvent event){
  burnCheck(event);
}

Fixed version (ground truth):
public void onBlockBurn(BlockBurnEvent event){
  if (!enabled) {
    return;
  }
  burnCheck(event);
}
Program: 179030
Project: 179030
Buggy source:
public void onEntityDeath(EntityDeathEvent event){
  pvpDie(event);
  playerDie(event);
  mobDrop(event);
  endermanDropBlock(event);
}

Fixed version (ground truth):
public void onEntityDeath(EntityDeathEvent event){
  if (!enabled) {
    return;
  }
  pvpDie(event);
  playerDie(event);
  mobDrop(event);
  endermanDropBlock(event);
}
Program: 179031
Project: 179031
Buggy source:
public static void destroyInstance(){
  instance=null;
}

Fixed version (ground truth):
public static void destroyInstance(){
  instance.enabled=false;
  instance=null;
}
Program: 179032
Project: 179032
Buggy source:
public void onEndermanPickup(EndermanPickupEvent event){
  endermanGriefTake(event);
}

Fixed version (ground truth):
public void onEndermanPickup(EndermanPickupEvent event){
  if (!enabled) {
    return;
  }
  endermanGriefTake(event);
}
Program: 179033
Project: 179033
Buggy source:
public void onEntityTarget(EntityTargetEvent event){
  endermanPassive(event);
  creeperPassive(event);
}

Fixed version (ground truth):
public void onEntityTarget(EntityTargetEvent event){
  if (!enabled) {
    return;
  }
  endermanPassive(event);
  creeperPassive(event);
}
Program: 179034
Project: 179034
Buggy source:
public void onExplosionPrime(ExplosionPrimeEvent event){
  tntExplode(event);
}

Fixed version (ground truth):
public void onExplosionPrime(ExplosionPrimeEvent event){
  if (!enabled) {
    return;
  }
  tntExplode(event);
}
Program: 179035
Project: 179035
Buggy source:
public void onEndermanPlace(EndermanPlaceEvent event){
  endermanGriefPlace(event);
}

Fixed version (ground truth):
public void onEndermanPlace(EndermanPlaceEvent event){
  if (!enabled) {
    return;
  }
  endermanGriefPlace(event);
}
Program: 179036
Project: 179036
Buggy source:
public static void destroyInstance(){
  instance=null;
}

Fixed version (ground truth):
public static void destroyInstance(){
  instance.enabled=false;
  instance=null;
}
Program: 179037
Project: 179037
Buggy source:
public void onInventoryCraft(InventoryCraftEvent event){
  User user=User.getUser(event.getPlayer());
  Material m=event.getResult().getType();
  if (user.hasPerm("String_Node_Str" + m.getId(),false) && !user.hasPerm("String_Node_Str")) {
    if (BenCmd.getSpoutConnector().enabled(event.getPlayer())) {
      BenCmd.getSpoutConnector().sendNotification(event.getPlayer(),"String_Node_Str","String_Node_Str",m);
    }
 else {
      user.sendMessage(ChatColor.RED + "String_Node_Str");
      user.sendMessage(ChatColor.RED + "String_Node_Str");
    }
    event.setCancelled(true);
    return;
  }
}

Fixed version (ground truth):
public void onInventoryCraft(InventoryCraftEvent event){
  if (!enabled) {
    return;
  }
  User user=User.getUser(event.getPlayer());
  Material m=event.getResult().getType();
  if (user.hasPerm("String_Node_Str" + m.getId(),false) && !user.hasPerm("String_Node_Str")) {
    if (BenCmd.getSpoutConnector().enabled(event.getPlayer())) {
      BenCmd.getSpoutConnector().sendNotification(event.getPlayer(),"String_Node_Str","String_Node_Str",m);
    }
 else {
      user.sendMessage(ChatColor.RED + "String_Node_Str");
      user.sendMessage(ChatColor.RED + "String_Node_Str");
    }
    event.setCancelled(true);
    return;
  }
}
Program: 179038
Project: 179038
Buggy source:
public void onPlayerKick(PlayerKickEvent event){
  kickFinalize(event);
}

Fixed version (ground truth):
public void onPlayerKick(PlayerKickEvent event){
  if (!enabled) {
    return;
  }
  kickFinalize(event);
}
Program: 179039
Project: 179039
Buggy source:
public void onPlayerQuit(PlayerQuitEvent event){
  quitFinalize(event);
}

Fixed version (ground truth):
public void onPlayerQuit(PlayerQuitEvent event){
  if (!enabled) {
    return;
  }
  quitFinalize(event);
}
Program: 179040
Project: 179040
Buggy source:
public void onPlayerTeleport(PlayerTeleportEvent event){
  sendSkins(event.getPlayer(),event.getTo());
  flyTeleport(event);
}

Fixed version (ground truth):
public void onPlayerTeleport(PlayerTeleportEvent event){
  if (!enabled) {
    return;
  }
  sendSkins(event.getPlayer(),event.getTo());
  flyTeleport(event);
}
Program: 179041
Project: 179041
Buggy source:
public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event){
  lotBucketEmpty(event);
  jailBucketEmpty(event);
  logBucket(event);
}

Fixed version (ground truth):
public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event){
  if (!enabled) {
    return;
  }
  lotBucketEmpty(event);
  jailBucketEmpty(event);
  logBucket(event);
}
Program: 179042
Project: 179042
Buggy source:
public void onPlayerMove(PlayerMoveEvent event){
  sendSkins(event.getPlayer(),event.getTo());
  areaMoveCheck(event);
}

Fixed version (ground truth):
public void onPlayerMove(PlayerMoveEvent event){
  if (!enabled) {
    return;
  }
  sendSkins(event.getPlayer(),event.getTo());
  areaMoveCheck(event);
}
Program: 179043
Project: 179043
Buggy source:
public void onPlayerChat(PlayerChatEvent event){
  chat(event);
}

Fixed version (ground truth):
public void onPlayerChat(PlayerChatEvent event){
  if (!enabled) {
    return;
  }
  chat(event);
}
Program: 179044
Project: 179044
Buggy source:
public void onPlayerLogin(PlayerLoginEvent event){
  loginCheck(event);
}

Fixed version (ground truth):
public void onPlayerLogin(PlayerLoginEvent event){
  if (!enabled) {
    return;
  }
  loginCheck(event);
}
Program: 179045
Project: 179045
Buggy source:
public void onPlayerBucketFill(PlayerBucketFillEvent event){
  lotBucketFill(event);
  jailBucketFill(event);
}

Fixed version (ground truth):
public void onPlayerBucketFill(PlayerBucketFillEvent event){
  if (!enabled) {
    return;
  }
  lotBucketFill(event);
  jailBucketFill(event);
}
Program: 179046
Project: 179046
Buggy source:
public static void destroyInstance(){
  instance=null;
}

Fixed version (ground truth):
public static void destroyInstance(){
  instance.enabled=false;
  instance=null;
}
Program: 179047
Project: 179047
Buggy source:
public void onPlayerInteract(PlayerInteractEvent event){
  logWand(event);
  if (event.isCancelled()) {
    return;
  }
  bookshelfInteract(event);
  lockInteract(event);
  disposalChestInteract(event);
  strikeBind(event);
  lotSelectInteract(event);
  chestOpenLog(event);
}

Fixed version (ground truth):
public void onPlayerInteract(PlayerInteractEvent event){
  if (!enabled) {
    return;
  }
  logWand(event);
  if (event.isCancelled()) {
    return;
  }
  bookshelfInteract(event);
  lockInteract(event);
  disposalChestInteract(event);
  strikeBind(event);
  lotSelectInteract(event);
  chestOpenLog(event);
}
Program: 179048
Project: 179048
Buggy source:
public void onPlayerDropItem(PlayerDropItemEvent event){
  jailDropCheck(event);
}

Fixed version (ground truth):
public void onPlayerDropItem(PlayerDropItemEvent event){
  if (!enabled) {
    return;
  }
  jailDropCheck(event);
}
Program: 179049
Project: 179049
Buggy source:
public void onPlayerJoin(PlayerJoinEvent event){
  userInit(event);
}

Fixed version (ground truth):
public void onPlayerJoin(PlayerJoinEvent event){
  if (!enabled) {
    return;
  }
  userInit(event);
}
Program: 179050
Project: 179050
Buggy source:
public void onPlayerRespawn(PlayerRespawnEvent event){
  pvpRespawn(event);
}

Fixed version (ground truth):
public void onPlayerRespawn(PlayerRespawnEvent event){
  if (!enabled) {
    return;
  }
  pvpRespawn(event);
}
Program: 179051
Project: 179051
Buggy source:
public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
  npcInteractEntity(event);
}

Fixed version (ground truth):
public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
  if (!enabled) {
    return;
  }
  npcInteractEntity(event);
}
Program: 179052
Project: 179052
Buggy source:
public void onPlayerPortal(PlayerPortalEvent event){
  checkPortal(event);
  flyPortal(event);
}

Fixed version (ground truth):
public void onPlayerPortal(PlayerPortalEvent event){
  if (!enabled) {
    return;
  }
  checkPortal(event);
  flyPortal(event);
}
Program: 179053
Project: 179053
Buggy source:
public void onPlayerPickupItem(PlayerPickupItemEvent event){
  jailPickupCheck(event);
}

Fixed version (ground truth):
public void onPlayerPickupItem(PlayerPickupItemEvent event){
  if (!enabled) {
    return;
  }
  jailPickupCheck(event);
}
Program: 179054
Project: 179054
Buggy source:
public static void destroyInstance(){
  instance=null;
}

Fixed version (ground truth):
public static void destroyInstance(){
  instance.enabled=false;
  instance=null;
}
Program: 179055
Project: 179055
Buggy source:
public void onButtonClick(ButtonClickEvent event){
  buttonNPC(event);
  buttonStatus(event);
}

Fixed version (ground truth):
public void onButtonClick(ButtonClickEvent event){
  if (!enabled) {
    return;
  }
  buttonNPC(event);
  buttonStatus(event);
}
Program: 179056
Project: 179056
Buggy source:
@Override public void onSpoutCraftEnable(SpoutCraftEnableEvent event){
  SpoutPlayer p=SpoutManager.getPlayer(event.getPlayer());
  if (p.isSpoutCraftEnabled()) {
    for (    NPC n : BenCmd.getNPCFile().allNPCs()) {
      if (n.isSpawned()) {
        p.sendPacket(new PacketSkinURL(n.getEntityId(),n.getSkinURL()));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onSpoutCraftEnable(SpoutCraftEnableEvent event){
  if (!enabled) {
    return;
  }
  SpoutPlayer p=SpoutManager.getPlayer(event.getPlayer());
  if (p.isSpoutCraftEnabled()) {
    for (    NPC n : BenCmd.getNPCFile().allNPCs()) {
      if (n.isSpawned()) {
        p.sendPacket(new PacketSkinURL(n.getEntityId(),n.getSkinURL()));
      }
    }
  }
}
Program: 179057
Project: 179057
Buggy source:
public static void destroyInstance(){
  instance=null;
}

Fixed version (ground truth):
public static void destroyInstance(){
  instance.enabled=false;
  instance=null;
}
Program: 179058
Project: 179058
Buggy source:
public void onChunkLoad(ChunkLoadEvent event){
  for (  NPC npc : BenCmd.getNPCFile().inChunk(event.getChunk())) {
    npc.spawn();
  }
}

Fixed version (ground truth):
public void onChunkLoad(ChunkLoadEvent event){
  if (!enabled) {
    return;
  }
  for (  NPC npc : BenCmd.getNPCFile().inChunk(event.getChunk())) {
    npc.spawn();
  }
}
Program: 179059
Project: 179059
Buggy source:
public static void destroyInstance(){
  instance=null;
}

Fixed version (ground truth):
public static void destroyInstance(){
  instance.enabled=false;
  instance=null;
}
Program: 179060
Project: 179060
Buggy source:
public void onChunkUnload(ChunkUnloadEvent event){
  if (event.isCancelled()) {
    return;
  }
  for (  NPC npc : BenCmd.getNPCFile().inChunk(event.getChunk())) {
    npc.despawn();
  }
}

Fixed version (ground truth):
public void onChunkUnload(ChunkUnloadEvent event){
  if (!enabled) {
    return;
  }
  if (event.isCancelled()) {
    return;
  }
  for (  NPC npc : BenCmd.getNPCFile().inChunk(event.getChunk())) {
    npc.despawn();
  }
}
Program: 179061
Project: 179061
Buggy source:
public void onWorldLoad(WorldLoadEvent event){
  BenCmd.getNPCFile().reloadNPCs();
}

Fixed version (ground truth):
public void onWorldLoad(WorldLoadEvent event){
  if (!enabled) {
    return;
  }
  BenCmd.getNPCFile().reloadNPCs();
}
Program: 179062
Project: 179062
Buggy source:
public void onWorldUnload(WorldUnloadEvent event){
  BenCmd.getNPCFile().reloadNPCs();
}

Fixed version (ground truth):
public void onWorldUnload(WorldUnloadEvent event){
  if (!enabled) {
    return;
  }
  BenCmd.getNPCFile().reloadNPCs();
}
Program: 179063
Project: 179063
Buggy source:
public boolean withinLot(Location loc){
  if (this.DISABLED) {
    return false;
  }
  if (this.GLOBALLOT) {
    return true;
  }
  if (this.getWorld() != loc.getWorld()) {
    return false;
  }
  if (BenCmd.getLots().isBetween(corner1.getBlockX(),loc.getBlockX(),corner2.getBlockX()) && BenCmd.getLots().isBetween(corner1.getBlockZ(),loc.getBlockZ(),corner2.getBlockZ()) && BenCmd.getLots().isBetween(corner1.getBlockY(),loc.getBlockY(),corner2.getBlockY())) {
    return true;
  }
 else   return false;
}

Fixed version (ground truth):
public boolean withinLot(Location loc){
  if (this.DISABLED) {
    return false;
  }
  if (this.GLOBALLOT && loc.getWorld() == World) {
    return true;
  }
  if (this.getWorld() != loc.getWorld()) {
    return false;
  }
  if (BenCmd.getLots().isBetween(corner1.getBlockX(),loc.getBlockX(),corner2.getBlockX()) && BenCmd.getLots().isBetween(corner1.getBlockZ(),loc.getBlockZ(),corner2.getBlockZ()) && BenCmd.getLots().isBetween(corner1.getBlockY(),loc.getBlockY(),corner2.getBlockY())) {
    return true;
  }
 else   return false;
}
Program: 179066
Project: 179066
Buggy source:
public Lot(String key,String value) throws NumberFormatException {
  World=Bukkit.getWorld(value.split("String_Node_Str")[3]);
  if (World == null) {
    DISABLED=true;
    originalWorld=value.split("String_Node_Str")[3];
    World=Bukkit.getWorlds().get(0);
  }
  LotID=key.split("String_Node_Str")[0];
  SubID=key.split("String_Node_Str")[1];
  FullID=key;
  corner1=new Location(World,Double.parseDouble(value.split("String_Node_Str")[0]),Integer.parseInt(value.split("String_Node_Str")[1]),Integer.parseInt(value.split("String_Node_Str")[2]));
  corner2=new Location(World,Integer.parseInt(value.split("String_Node_Str")[4]),Integer.parseInt(value.split("String_Node_Str")[5]),Integer.parseInt(value.split("String_Node_Str")[6]));
  if (corner1.getX() == 1.1) {
    GLOBALLOT=true;
  }
  if (SubID.equalsIgnoreCase("String_Node_Str")) {
    owner=value.split("String_Node_Str")[8];
    group=value.split("String_Node_Str")[9];
    guests=new ArrayList<String>();
    int i=10;
    while (i < value.split("String_Node_Str").length) {
      guests.add(value.split("String_Node_Str")[i]);
      i++;
    }
  }
}

Fixed version (ground truth):
public Lot(String key,String value) throws NumberFormatException {
  World=Bukkit.getWorld(value.split("String_Node_Str")[3]);
  if (World == null) {
    DISABLED=true;
    originalWorld=value.split("String_Node_Str")[3];
    World=Bukkit.getWorlds().get(0);
  }
  LotID=key.split("String_Node_Str")[0];
  SubID=key.split("String_Node_Str")[1];
  FullID=key;
  corner1=new Location(World,Double.parseDouble(value.split("String_Node_Str")[0]),Double.parseDouble(value.split("String_Node_Str")[1]),Double.parseDouble(value.split("String_Node_Str")[2]));
  corner2=new Location(World,Double.parseDouble(value.split("String_Node_Str")[4]),Double.parseDouble(value.split("String_Node_Str")[5]),Double.parseDouble(value.split("String_Node_Str")[6]));
  if (corner1.getX() == 1.1) {
    GLOBALLOT=true;
  }
  if (SubID.equalsIgnoreCase("String_Node_Str")) {
    owner=value.split("String_Node_Str")[8];
    group=value.split("String_Node_Str")[9];
    guests=new ArrayList<String>();
    int i=10;
    while (i < value.split("String_Node_Str").length) {
      guests.add(value.split("String_Node_Str")[i]);
      i++;
    }
  }
}
Program: 179067
Project: 179067
Buggy source:
public void saveLot(Lot lot,boolean saveFile){
  Location corner1, corner2;
  corner1=lot.getCorner1();
  corner2=lot.getCorner2();
  String LotID=lot.getFullID();
  String value="String_Node_Str";
  value+=corner1.getX() + "String_Node_Str";
  value+=corner1.getY() + "String_Node_Str";
  value+=corner1.getZ() + "String_Node_Str";
  if (lot.DISABLED) {
    value+=lot.originalWorld + "String_Node_Str";
  }
 else {
    value+=lot.World.getName() + "String_Node_Str";
  }
  value+=corner2.getX() + "String_Node_Str";
  value+=corner2.getY() + "String_Node_Str";
  value+=corner2.getZ() + "String_Node_Str";
  if (lot.DISABLED) {
    value+=lot.originalWorld + "String_Node_Str";
  }
 else {
    value+=lot.World.getName() + "String_Node_Str";
  }
  if (lot.getSubID().equalsIgnoreCase("String_Node_Str")) {
    String owner=lot.getOwner();
    String group=lot.getLotGroup();
    List<String> guests=lot.guests;
    value+="String_Node_Str" + owner + "String_Node_Str";
    value+=group;
    int i=0;
    while (i < guests.size()) {
      value+="String_Node_Str" + guests.get(i);
      i++;
    }
  }
  getFile().put(LotID,value);
  if (saveFile)   saveFile();
}

Fixed version (ground truth):
public void saveLot(Lot lot,boolean saveFile){
  Location corner1, corner2;
  corner1=lot.getCorner1();
  corner2=lot.getCorner2();
  String LotID=lot.getFullID();
  String value="String_Node_Str";
  value+=corner1.getX() + "String_Node_Str";
  value+=corner1.getY() + "String_Node_Str";
  value+=corner1.getZ() + "String_Node_Str";
  if (lot.DISABLED) {
    value+=lot.originalWorld + "String_Node_Str";
  }
 else {
    value+=lot.World.getName() + "String_Node_Str";
  }
  value+=corner2.getX() + "String_Node_Str";
  value+=corner2.getY() + "String_Node_Str";
  value+=corner2.getZ() + "String_Node_Str";
  if (lot.DISABLED) {
    value+=lot.originalWorld;
  }
 else {
    value+=lot.World.getName();
  }
  if (lot.getSubID().equalsIgnoreCase("String_Node_Str")) {
    String owner=lot.getOwner();
    String group=lot.getLotGroup();
    List<String> guests=lot.guests;
    value+="String_Node_Str" + owner + "String_Node_Str";
    value+=group;
    int i=0;
    while (i < guests.size()) {
      value+="String_Node_Str" + guests.get(i);
      i++;
    }
  }
  getFile().put(LotID,value);
  if (saveFile)   saveFile();
}
Program: 179068
Project: 179068
Buggy source:
public void trimToLastHour(){
  for (  RecordEntry e : entries) {
    if (new Date().getTime() - e.getTime() > 60000) {
      entries.remove(e);
    }
  }
}

Fixed version (ground truth):
public void trimToLastHour(){
  for (  RecordEntry e : entries) {
    if (new Date().getTime() - e.getTime() > 3600000) {
      entries.remove(e);
    }
  }
}
Program: 179070
Project: 179070
Buggy source:
public static void faceLocation(EntityNPC enpc,Vec3D loc2){
  Location loc=enpc.getBukkitEntity().getLocation();
  double xDiff=loc2.a - loc.getX();
  double yDiff=loc2.b - loc.getY();
  double zDiff=loc2.c - loc.getZ();
  double DistanceXZ=Math.sqrt(xDiff * xDiff + zDiff * zDiff);
  double DistanceY=Math.sqrt(DistanceXZ * DistanceXZ + yDiff * yDiff);
  double yaw=(Math.acos(xDiff / DistanceXZ) * 180 / Math.PI);
  double pitch=(Math.acos(yDiff / DistanceY) * 180 / Math.PI) - 90;
  if (zDiff < 0.0) {
    yaw=yaw + (Math.abs(180 - yaw) * 2);
  }
  enpc.setLocation(loc.getX(),loc.getY(),loc.getZ(),(float)yaw - 90,(float)pitch);
}

Fixed version (ground truth):
public static void faceLocation(EntityNPC enpc,Vec3D loc2){
  Location loc=new Location(enpc.world.getWorld(),enpc.locX,enpc.locY,enpc.locZ);
  double xDiff=loc2.a - loc.getX();
  double yDiff=loc2.b - loc.getY();
  double zDiff=loc2.c - loc.getZ();
  double DistanceXZ=Math.sqrt(xDiff * xDiff + zDiff * zDiff);
  double DistanceY=Math.sqrt(DistanceXZ * DistanceXZ + yDiff * yDiff);
  double yaw=(Math.acos(xDiff / DistanceXZ) * 180 / Math.PI);
  double pitch=(Math.acos(yDiff / DistanceY) * 180 / Math.PI) - 90;
  if (zDiff < 0.0) {
    yaw=yaw + (Math.abs(180 - yaw) * 2);
  }
  yaw-=90;
  enpc.yaw=(float)yaw;
  enpc.pitch=(float)pitch;
}
Program: 179071
Project: 179071
Buggy source:
public LargeBankInventory(BankInventory inv1){
  super(inv1);
  inv2=new TileEntityBankChest();
  inv2.setName(super.p + "String_Node_Str");
  lc=new InventoryLargeChest(super.p + "String_Node_Str",chest,inv2);
}

Fixed version (ground truth):
public LargeBankInventory(BankInventory inv1){
  super(inv1);
  inv2=new TileEntityBankChest();
  inv2.setName("String_Node_Str");
  lc=new InventoryLargeChest("String_Node_Str",chest,inv2);
}
Program: 179072
Project: 179072
Buggy source:
public void info(Player p,NPC n){
  if (plugin.spoutcraft && plugin.spoutconnect.enabled(p)) {
    plugin.spoutconnect.showNPCScreen(p,n);
  }
 else {
    p.sendMessage(ChatColor.GRAY + "String_Node_Str" + n.getID());
    if (n instanceof BankerNPC) {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
 else     if (n instanceof BankManagerNPC) {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
 else     if (n instanceof BlacksmithNPC) {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
 else     if (n instanceof StaticNPC) {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
 else {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
    p.sendMessage(ChatColor.GRAY + "String_Node_Str" + n.getName());
    p.sendMessage(ChatColor.GRAY + "String_Node_Str" + ((StaticNPC)n).getSkinURL());
  }
}

Fixed version (ground truth):
public void info(Player p,NPC n){
  if (plugin.spoutcraft && plugin.spoutconnect.enabled(p)) {
    plugin.spoutconnect.showNPCScreen(p,n);
  }
 else {
    p.sendMessage(ChatColor.GRAY + "String_Node_Str" + n.getID());
    if (n instanceof BankerNPC) {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
 else     if (n instanceof BankManagerNPC) {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
 else     if (n instanceof BlacksmithNPC) {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
 else     if (n instanceof StaticNPC) {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
 else {
      p.sendMessage(ChatColor.GRAY + "String_Node_Str");
    }
    p.sendMessage(ChatColor.GRAY + "String_Node_Str" + n.getName());
    p.sendMessage(ChatColor.GRAY + "String_Node_Str" + n.getSkinURL());
  }
}
Program: 179073
Project: 179073
Buggy source:
public void onEntityDamage(EntityDamageEvent e){
  if (e instanceof EntityDamageByEntityEvent) {
    EntityDamageByEntityEvent event=(EntityDamageByEntityEvent)e;
    if (event.getDamager() instanceof Player && event.getEntity() instanceof Player) {
      if (((CraftPlayer)event.getDamager()).getHandle() instanceof EntityNPC) {
        if (plugin.isGod((Player)event.getEntity()))         event.setCancelled(true);
        return;
      }
      NPC npc=plugin.npcs.getNPC((EntityNPC)((CraftPlayer)event.getEntity()).getHandle());
      if (npc instanceof Damageable) {
        ((Damageable)npc).onDamage(event.getDamager(),event.getDamage());
        return;
      }
      event.setCancelled(!(inPVP((Player)event.getDamager()) != null && inPVP((Player)event.getEntity()) != null));
    }
  }
 else   if (e instanceof EntityDamageByProjectileEvent) {
    if (e.getEntity().equals(((CraftArrow)((EntityDamageByProjectileEvent)e).getDamager()).getShooter())) {
      e.setCancelled(true);
      return;
    }
  }
}

Fixed version (ground truth):
public void onEntityDamage(EntityDamageEvent e){
  if (e instanceof EntityDamageByEntityEvent) {
    EntityDamageByEntityEvent event=(EntityDamageByEntityEvent)e;
    if (event.getDamager() instanceof Player && event.getEntity() instanceof Player) {
      if (((CraftPlayer)event.getDamager()).getHandle() instanceof EntityNPC) {
        if (plugin.isGod((Player)event.getEntity()))         event.setCancelled(true);
        return;
      }
      if (((CraftPlayer)event.getEntity()).getHandle() instanceof EntityNPC) {
        NPC npc=plugin.npcs.getNPC((EntityNPC)((CraftPlayer)event.getEntity()).getHandle());
        if (npc instanceof Damageable) {
          ((Damageable)npc).onDamage(event.getDamager(),event.getDamage());
          return;
        }
      }
      event.setCancelled(!(inPVP((Player)event.getDamager()) != null && inPVP((Player)event.getEntity()) != null));
    }
  }
 else   if (e instanceof EntityDamageByProjectileEvent) {
    if (e.getEntity().equals(((CraftArrow)((EntityDamageByProjectileEvent)e).getDamager()).getShooter())) {
      e.setCancelled(true);
      return;
    }
  }
}
Program: 179075
Project: 179075
Buggy source:
public boolean canUse(User user){
  if (neededPermission.equalsIgnoreCase("String_Node_Str")) {
    return true;
  }
  return user.hasPerm(neededPermission);
}

Fixed version (ground truth):
public boolean canUse(User user){
  if (neededPermission.equalsIgnoreCase("String_Node_Str")) {
    return true;
  }
  for (  String p : neededPermission.split("String_Node_Str")) {
    if (user.hasPerm(p)) {
      return true;
    }
  }
  return false;
}