nus-yam/ex-repair huggingface dataset:
Program: 183901
Project: 183901
Buggy source:
public boolean setUseGlobalBlockBlacklist(CommandSender sender,String[] args){
  hasPermission=checkPerm(sender,"String_Node_Str");
  if (!hasPermission) {
    return false;
  }
  if (args.length < 4) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (this.server.getWorld(args[1]) == null) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (ConfigBuffer.MobMap.containsKey(args[2])) {
    if (args[3].equals("String_Node_Str")) {
      config.set("String_Node_Str" + args[1] + "String_Node_Str"+ args[2]+ "String_Node_Str",true);
      cb.plugin.sendNospawnMessage(sender,args[2] + "String_Node_Str",ChatColor.GREEN);
      saveConfig();
      cb.readConfig();
    }
 else     if (args[3].equals("String_Node_Str")) {
      config.set("String_Node_Str" + args[1] + "String_Node_Str"+ args[2]+ "String_Node_Str",false);
      cb.plugin.sendNospawnMessage(sender,args[2] + "String_Node_Str",ChatColor.GREEN);
      saveConfig();
      cb.readConfig();
    }
    return true;
  }
 else {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str" + args[2] + "String_Node_Str",ChatColor.RED);
    return false;
  }
}

Fixed version (ground truth):
public boolean setUseGlobalBlockBlacklist(CommandSender sender,String[] args){
  hasPermission=checkPerm(sender,"String_Node_Str");
  String mob=Character.toUpperCase(args[2].charAt(0)) + args[2].substring(1,args[2].length()).toLowerCase();
  if (args[2].toLowerCase().equals("String_Node_Str")) {
    mob="String_Node_Str";
  }
  if (!hasPermission) {
    return false;
  }
  if (args.length < 4) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (this.server.getWorld(args[1]) == null) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (ConfigBuffer.MobMap.containsKey(mob)) {
    if (args[3].equals("String_Node_Str")) {
      config.set("String_Node_Str" + args[1] + "String_Node_Str"+ mob+ "String_Node_Str",true);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str" + args[1]+ "String_Node_Str",ChatColor.GREEN);
      saveConfig();
      cb.readConfig();
    }
 else     if (args[3].equals("String_Node_Str")) {
      config.set("String_Node_Str" + args[1] + "String_Node_Str"+ mob+ "String_Node_Str",false);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str" + args[1]+ "String_Node_Str",ChatColor.GREEN);
      saveConfig();
      cb.readConfig();
    }
    return true;
  }
 else {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str" + mob + "String_Node_Str",ChatColor.RED);
    return false;
  }
}
Program: 183902
Project: 183902
Buggy source:
public static boolean has(Player player,String node){
  if (player.isOp()) {
    return true;
  }
 else   if (PermissionsMode == PermissionsType.NONE) {
    return false;
  }
 else   if (PermissionsMode == PermissionsType.Vault) {
    ((Permission)Permissions).has(player,node);
  }
 else   if (PermissionsMode == PermissionsType.BukkitPermissions) {
    player.hasPermission(node);
  }
  return false;
}

Fixed version (ground truth):
public static boolean has(Player player,String node){
  if (player.isOp()) {
    return true;
  }
 else   if (PermissionsMode == PermissionsType.NONE) {
    return false;
  }
 else   if (PermissionsMode == PermissionsType.Vault) {
    return ((Permission)Permissions).has(player,node);
  }
 else   if (PermissionsMode == PermissionsType.BukkitPermissions) {
    return player.hasPermission(node);
  }
  return false;
}
Program: 183903
Project: 183903
Buggy source:
private String ConvertMobname(String s){
  String ret="String_Node_Str";
  s=s.toLowerCase();
  if (s.contains("String_Node_Str")) {
    String[] s_arr=s.split("String_Node_Str");
    char[] ch_arr1, ch_arr2;
    ch_arr1=s_arr[0].toCharArray();
    ch_arr2=s_arr[1].toCharArray();
    if ((int)ch_arr1[0] < 97) {
      ch_arr1[0]=(char)((int)ch_arr1[0] + 32);
    }
    if ((int)ch_arr2[0] < 97) {
      ch_arr2[0]=(char)((int)ch_arr2[0] + 32);
    }
    for (    char c : ch_arr1) {
      ret+=c;
    }
    ret+="String_Node_Str";
    for (    char c : ch_arr2) {
      ret+=c;
    }
  }
 else {
    char[] ch_arr1=s.toCharArray();
    if ((int)ch_arr1[0] < 97) {
      ch_arr1[0]=(char)((int)ch_arr1[0] + 32);
    }
    for (    char c : ch_arr1) {
      ret+=c;
    }
  }
  return ret;
}

Fixed version (ground truth):
private String ConvertMobname(String s){
  String ret;
  s=s.toLowerCase();
  if (s.contains("String_Node_Str")) {
    String[] s_arr=s.split("String_Node_Str");
    ret=Character.toUpperCase(s_arr[0].charAt(0)) + s_arr[0].substring(1,s_arr[0].length()).toLowerCase() + "String_Node_Str"+ Character.toUpperCase(s_arr[1].charAt(0))+ s_arr[1].substring(1,s_arr[1].length()).toLowerCase();
  }
 else {
    ret=Character.toUpperCase(s.charAt(0)) + s.substring(1,s.length()).toLowerCase();
  }
  return ret;
}
Program: 183904
Project: 183904
Buggy source:
private boolean setConf(CommandSender sender,String[] args,String operation){
  String mob=Character.toUpperCase(args[2].charAt(0)) + args[2].substring(1,args[2].length()).toLowerCase();
  if (args[2].toLowerCase().equals("String_Node_Str")) {
    mob="String_Node_Str";
  }
  String w=args[1];
  if (this.server.getWorld(args[1]) == null) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (ConfigBuffer.MobMap.containsKey(mob)) {
    if (operation.equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + w + "String_Node_Str"+ mob+ "String_Node_Str",true);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str",ChatColor.GREEN);
    }
 else     if (operation.equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + w + "String_Node_Str"+ mob+ "String_Node_Str",false);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str",ChatColor.GREEN);
    }
 else     if (operation.equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + w + "String_Node_Str"+ mob+ "String_Node_Str",Integer.parseInt(args[3]));
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str" + args[3]+ "String_Node_Str",ChatColor.GREEN);
    }
    saveConfig();
    cb.readConfig();
    return true;
  }
 else {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str" + args[2] + "String_Node_Str",ChatColor.RED);
    return false;
  }
}

Fixed version (ground truth):
private boolean setConf(CommandSender sender,String[] args,String operation){
  String mob=Character.toUpperCase(args[2].charAt(0)) + args[2].substring(1,args[2].length()).toLowerCase();
  if (args[2].toLowerCase().equals("String_Node_Str")) {
    mob="String_Node_Str";
  }
  String w=args[1];
  if (this.server.getWorld(args[1]) == null) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (MobExists(sender,args[2])) {
    if (operation.equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + w + "String_Node_Str"+ mob+ "String_Node_Str",true);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str",ChatColor.GREEN);
    }
 else     if (operation.equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + w + "String_Node_Str"+ mob+ "String_Node_Str",false);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str",ChatColor.GREEN);
    }
 else     if (operation.equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + w + "String_Node_Str"+ mob+ "String_Node_Str",Integer.parseInt(args[3]));
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str" + args[3]+ "String_Node_Str",ChatColor.GREEN);
    }
    saveConfig();
    cb.readConfig();
    return true;
  }
 else {
    return false;
  }
}
Program: 183906
Project: 183906
Buggy source:
public boolean setUseGlobalBlockBlacklist(CommandSender sender,String[] args){
  hasPermission=checkPerm(sender,"String_Node_Str");
  String mob=Character.toUpperCase(args[2].charAt(0)) + args[2].substring(1,args[2].length()).toLowerCase();
  if (args[2].toLowerCase().equals("String_Node_Str")) {
    mob="String_Node_Str";
  }
  if (!hasPermission) {
    return false;
  }
  if (args.length < 4) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (this.server.getWorld(args[1]) == null) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (ConfigBuffer.MobMap.containsKey(mob)) {
    if (args[3].equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + args[1] + "String_Node_Str"+ mob+ "String_Node_Str",true);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str" + args[1]+ "String_Node_Str",ChatColor.GREEN);
      saveConfig();
      cb.readConfig();
    }
 else     if (args[3].equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + args[1] + "String_Node_Str"+ mob+ "String_Node_Str",false);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str" + args[1]+ "String_Node_Str",ChatColor.GREEN);
      saveConfig();
      cb.readConfig();
    }
    return true;
  }
 else {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str" + mob + "String_Node_Str",ChatColor.RED);
    return false;
  }
}

Fixed version (ground truth):
public boolean setUseGlobalBlockBlacklist(CommandSender sender,String[] args){
  hasPermission=checkPerm(sender,"String_Node_Str");
  String mob=Character.toUpperCase(args[2].charAt(0)) + args[2].substring(1,args[2].length()).toLowerCase();
  if (args[2].toLowerCase().equals("String_Node_Str")) {
    mob="String_Node_Str";
  }
  if (!hasPermission) {
    return false;
  }
  if (args.length < 4) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (this.server.getWorld(args[1]) == null) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  if (MobExists(sender,mob)) {
    if (args[3].equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + args[1] + "String_Node_Str"+ mob+ "String_Node_Str",true);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str" + args[1]+ "String_Node_Str",ChatColor.GREEN);
      saveConfig();
      cb.readConfig();
    }
 else     if (args[3].equals("String_Node_Str")) {
      cb.config.set("String_Node_Str" + args[1] + "String_Node_Str"+ mob+ "String_Node_Str",false);
      cb.plugin.sendNospawnMessage(sender,mob + "String_Node_Str" + args[1]+ "String_Node_Str",ChatColor.GREEN);
      saveConfig();
      cb.readConfig();
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 183907
Project: 183907
Buggy source:
public boolean despawnMobs(CommandSender sender,String[] args){
  hasPermission=checkPerm(sender,"String_Node_Str");
  int killcount=0;
  if (!hasPermission) {
    return false;
  }
  List<Entity> le;
  if (args.length < 3) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  String mob=ConvertMobname(args[2]);
  String w=args[1];
  if (this.server.getWorld(args[1]) == null) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
 else {
    le=server.getWorld(w).getEntities();
  }
  if (!ConfigBuffer.MobMap.containsKey(mob)) {
    String mobtypes="String_Node_Str";
    for (    String s : ConfigBuffer.MobMap.keySet()) {
      mobtypes+=s + "String_Node_Str";
    }
    mobtypes=mobtypes.substring(mobtypes.length() - 2);
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str" + mobtypes,ChatColor.RED);
    return false;
  }
  for (  Entity e : le) {
    if (e.getType() == ConfigBuffer.MobMap.get(mob)) {
      e.remove();
      killcount++;
    }
  }
  cb.plugin.sendNospawnMessage(sender,"String_Node_Str" + killcount + "String_Node_Str"+ mob+ "String_Node_Str"+ w,ChatColor.GREEN);
  return true;
}

Fixed version (ground truth):
public boolean despawnMobs(CommandSender sender,String[] args){
  hasPermission=checkPerm(sender,"String_Node_Str");
  int killcount=0;
  if (!hasPermission) {
    return false;
  }
  List<Entity> le;
  if (args.length < 3) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
  String mob=ConvertMobname(args[2]);
  String w=args[1];
  if (this.server.getWorld(args[1]) == null) {
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str",ChatColor.RED);
    return false;
  }
 else {
    le=server.getWorld(w).getEntities();
  }
  if (mob.equals("String_Node_Str")) {
    for (    Entity e : le) {
      if (!(e instanceof Player)) {
        e.remove();
        killcount++;
      }
    }
    cb.plugin.sendNospawnMessage(sender,"String_Node_Str" + killcount + "String_Node_Str"+ w,ChatColor.GREEN);
    return true;
  }
  if (!MobExists(sender,mob))   return false;
  for (  Entity e : le) {
    if (e.getType() == ConfigBuffer.MobMap.get(mob)) {
      e.remove();
      killcount++;
    }
  }
  server.getScheduler().cancelTasks(cb.plugin);
  cb.plugin.mc.runSchedueler();
  cb.plugin.sendNospawnMessage(sender,"String_Node_Str" + killcount + "String_Node_Str"+ mob+ "String_Node_Str"+ w,ChatColor.GREEN);
  return true;
}
Program: 183908
Project: 183908
Buggy source:
public void runSchedueler(){
  server.getScheduler().scheduleSyncRepeatingTask(cb.plugin,new Runnable(){
    public void run(){
      for (      World w : server.getWorlds()) {
        for (        EntityType e : ConfigBuffer.MobMap.values()) {
          cb.worldSpawns.get(w).CurrentMobCount.put(e,0);
        }
        for (        LivingEntity e : w.getLivingEntities()) {
          cb.worldSpawns.get(w).CurrentMobCount.put(e.getType(),cb.worldSpawns.get(w).CurrentMobCount.get(e.getType()) + 1);
        }
      }
    }
  }
,0,((cb.CountTimer / 1000) * 20));
}

Fixed version (ground truth):
public void runSchedueler(){
  server.getScheduler().scheduleSyncRepeatingTask(cb.plugin,new Runnable(){
    public void run(){
      for (      World w : server.getWorlds()) {
        for (        EntityType e : ConfigBuffer.MobMap.values()) {
          cb.worldSpawns.get(w).CurrentMobCount.put(e,0);
        }
        for (        LivingEntity e : w.getLivingEntities()) {
          if (!(e instanceof Player)) {
            cb.worldSpawns.get(w).CurrentMobCount.put(e.getType(),(cb.worldSpawns.get(w).CurrentMobCount.get(e.getType()) + 1));
          }
        }
      }
    }
  }
,0,((cb.CountTimer / 1000) * 20));
}
Program: 183909
Project: 183909
Buggy source:
public void run(){
  for (  World w : server.getWorlds()) {
    for (    EntityType e : ConfigBuffer.MobMap.values()) {
      cb.worldSpawns.get(w).CurrentMobCount.put(e,0);
    }
    for (    LivingEntity e : w.getLivingEntities()) {
      cb.worldSpawns.get(w).CurrentMobCount.put(e.getType(),cb.worldSpawns.get(w).CurrentMobCount.get(e.getType()) + 1);
    }
  }
}

Fixed version (ground truth):
public void run(){
  for (  World w : server.getWorlds()) {
    for (    EntityType e : ConfigBuffer.MobMap.values()) {
      cb.worldSpawns.get(w).CurrentMobCount.put(e,0);
    }
    for (    LivingEntity e : w.getLivingEntities()) {
      if (!(e instanceof Player)) {
        cb.worldSpawns.get(w).CurrentMobCount.put(e.getType(),(cb.worldSpawns.get(w).CurrentMobCount.get(e.getType()) + 1));
      }
    }
  }
}
Program: 183910
Project: 183910
Buggy source:
public boolean isSpawnAllowed(EntityType type,Block block){
  if ((getCurrentTotalMobsCount() >= TotalMobLimit) && TotalMobLimit != 0) {
    return false;
  }
  if ((CurrentMobCount.get(type) >= MobLimit.get(type)) && MobLimit.get(type) != 0) {
    return false;
  }
  if (SpawnAllowed.containsKey(type) && SpawnAllowed.get(type)) {
    if (UseGlobalBlockBlacklist.get(type) != null && GlobalBlockBlacklist != null) {
      if (UseGlobalBlockBlacklist.get(type) && GlobalBlockBlacklist.contains(block.getTypeId())) {
        return false;
      }
    }
    if (BlockBlacklist.get(type) != null) {
      if (BlockBlacklist.get(type).contains(block.getTypeId())) {
        return false;
      }
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean isSpawnAllowed(EntityType type,Block block){
  if ((getCurrentTotalMobsCount() >= TotalMobLimit) && TotalMobLimit != 0) {
    NoSpawnDebugLogger.debugmsg("String_Node_Str" + getCurrentTotalMobsCount() + "String_Node_Str"+ TotalMobLimit+ "String_Node_Str");
    return false;
  }
  if ((CurrentMobCount.get(type) >= MobLimit.get(type)) && MobLimit.get(type) != 0) {
    NoSpawnDebugLogger.debugmsg("String_Node_Str" + type.getName() + "String_Node_Str"+ MobLimit.get(type)+ "String_Node_Str"+ CurrentMobCount.get(type)+ "String_Node_Str");
    return false;
  }
  if (SpawnAllowed.containsKey(type) && SpawnAllowed.get(type)) {
    if (UseGlobalBlockBlacklist.get(type) != null && GlobalBlockBlacklist != null) {
      if (UseGlobalBlockBlacklist.get(type) && GlobalBlockBlacklist.contains(block.getTypeId())) {
        NoSpawnDebugLogger.debugmsg("String_Node_Str" + type.getName() + "String_Node_Str");
        return false;
      }
    }
    if (BlockBlacklist.get(type) != null) {
      if (BlockBlacklist.get(type).contains(block.getTypeId())) {
        NoSpawnDebugLogger.debugmsg("String_Node_Str" + type.getName() + "String_Node_Str");
        return false;
      }
    }
    return true;
  }
 else {
    NoSpawnDebugLogger.debugmsg("String_Node_Str" + type.getName() + "String_Node_Str");
    return false;
  }
}
Program: 183911
Project: 183911
Buggy source:
public CommandHandler(Server server,ConfigBuffer cb,Configuration config){
  this.server=server;
  this.cb=cb;
  this.config=config;
}

Fixed version (ground truth):
public CommandHandler(Server server,ConfigBuffer cb){
  this.server=server;
  this.cb=cb;
  this.config=cb.plugin.getConfiguration();
}
Program: 183913
Project: 183913
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String commandLabel,String[] args){
  if (command.getName().equals("String_Node_Str")) {
    if (args[0].equals("String_Node_Str")) {
      return cmh.setMob(sender,args);
    }
 else     if (args[0].equals("String_Node_Str")) {
      return cmh.despawnMobs(sender,args);
    }
 else {
      return false;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String commandLabel,String[] args){
  if (command.getName().equals("String_Node_Str")) {
    if (args[0].equals("String_Node_Str")) {
      return cmh.setMob(sender,args);
    }
 else     if (args[0].equals("String_Node_Str")) {
      return cmh.despawnMobs(sender,args);
    }
 else {
      if (sender instanceof Player) {
        Player player=(Player)sender;
        player.sendMessage(args[0] + "String_Node_Str");
      }
      return false;
    }
  }
  return false;
}
Program: 183916
Project: 183916
Buggy source:
public NoSpawnWorldListener(ConfigBuffer cb,Configuration config){
  this.cb=cb;
  this.config=config;
}

Fixed version (ground truth):
public NoSpawnWorldListener(ConfigBuffer cb){
  this.cb=cb;
  this.config=cb.plugin.getConfiguration();
}
Program: 183917
Project: 183917
Buggy source:
public void addSample(double sample){
  sample=Model.airAbsoption(this.dist,sample);
  delayLine[currentSampleIndex]=delayLine[currentSampleIndex] + sample;
}

Fixed version (ground truth):
public void addSample(double sample){
  delayLine[currentSampleIndex]=delayLine[currentSampleIndex] + sample;
}
Program: 183918
Project: 183918
Buggy source:
public double getCurrentSample(){
  double ret=0.0;
  if (currentSampleIndex + 1 == delayLine.length - 1) {
    ret=(delayLine[delayLine.length - 1]) * 0.5;
    int index=(currentSampleIndex + 1) % (delayLine.length - 1);
    ret=ret + (delayLine[index] * 0.5);
  }
 else {
    int index=(currentSampleIndex + 1) % (delayLine.length - 1);
    ret=delayLine[index];
  }
  return ret;
}

Fixed version (ground truth):
public double getCurrentSample(){
  double ret=0.0;
  if (currentSampleIndex + 1 == delayLine.length - 1) {
    ret=(delayLine[delayLine.length - 1]) * 0.5;
    int index=(currentSampleIndex + 1) % (delayLine.length - 1);
    ret=ret + (delayLine[index] * 0.5);
  }
 else {
    int index=(currentSampleIndex + 1) % (delayLine.length - 1);
    ret=delayLine[index];
  }
  ret=Model.airAbsoption(this.dist,ret);
  return ret;
}
Program: 183919
Project: 183919
Buggy source:
public void keyPressed(){
  if (key == 's') {
    Processor proc=new Processor(this.model);
    Thread procThread=new Thread(proc);
    procThread.start();
  }
}

Fixed version (ground truth):
public void keyPressed(){
  if (key == 's') {
    Processor proc=new Processor(this.model);
    Thread procThread=new Thread(proc);
    procThread.start();
  }
  if (key == 'd') {
    drawDelaylines=drawDelaylines ^ true;
  }
}
Program: 183920
Project: 183920
Buggy source:
public void draw(){
  background(32);
  lights();
  pushMatrix();
  translate(width / 2,height / 2,0);
  rotateX(rotY);
  rotateY(rotX);
  scale(1.5f);
  for (int j=0; j < model.getSegmentCount(); j++) {
    Segment segment=model.getSegment(j);
    Face[] faces=segment.getFaces();
    drawFaces(faces);
  }
  scale(3.0f);
  stroke(0,0,255);
  Collection<Edge> edges=model.getGraph().getEdges();
  for (  Edge<Double> e : edges) {
    beginShape(LINES);
    Pair<Node> nodes=model.getGraph().getEndpoints(e);
    Node src=nodes.getFirst();
    Node dst=nodes.getSecond();
    if (!e.visited) {
      if (src.type == Node.NodeType.wall) {
        stroke(255,255,255);
      }
 else       if (dst.type == Node.NodeType.wall) {
        stroke(0,255,255);
      }
 else {
        stroke(255,255,0);
      }
    }
 else {
      stroke(255,0,0);
    }
    vertex(src.pos.x,src.pos.y,src.pos.z);
    vertex(dst.pos.x,dst.pos.y,dst.pos.z);
    endShape();
    if (dst.type == Node.NodeType.listener) {
      fill(255,0,0);
      pushMatrix();
      drawPoint(dst.pos);
      popMatrix();
    }
 else     if (src.type == Node.NodeType.source) {
      fill(0,255,0);
      pushMatrix();
      drawPoint(src.pos);
      popMatrix();
    }
  }
  popMatrix();
}

Fixed version (ground truth):
public void draw(){
  background(32);
  lights();
  pushMatrix();
  translate(width / 2,height / 2,0);
  rotateX(rotY);
  rotateY(rotX);
  scale(1.5f);
  for (int j=0; j < model.getSegmentCount(); j++) {
    Segment segment=model.getSegment(j);
    Face[] faces=segment.getFaces();
    drawFaces(faces);
  }
  scale(3.0f);
  stroke(0,0,255);
  Collection<Edge> edges=model.getGraph().getEdges();
  for (  Edge<Double> e : edges) {
    Pair<Node> nodes=model.getGraph().getEndpoints(e);
    Node src=nodes.getFirst();
    Node dst=nodes.getSecond();
    if (drawDelaylines) {
      pushMatrix();
      beginShape(LINES);
      if (!e.visited) {
        if (src.type == Node.NodeType.wall) {
          stroke(255,255,255);
        }
 else         if (dst.type == Node.NodeType.wall) {
          stroke(0,255,255);
        }
 else {
          stroke(255,255,0);
        }
      }
 else {
        stroke(255,0,0);
      }
      vertex(src.pos.x,src.pos.y,src.pos.z);
      vertex(dst.pos.x,dst.pos.y,dst.pos.z);
      endShape();
    }
    if (dst.type == Node.NodeType.listener) {
      fill(255,0,0);
      pushMatrix();
      drawPoint(dst.pos);
      popMatrix();
    }
 else     if (src.type == Node.NodeType.source) {
      fill(0,255,0);
      pushMatrix();
      drawPoint(src.pos);
      popMatrix();
    }
    if (drawDelaylines) {
      popMatrix();
    }
  }
  popMatrix();
}
Program: 183924
Project: 183924
Buggy source:
/** 
 * String representation of the node
 * @return all data in String form
 */
public String toString(){
  String out="String_Node_Str";
  String files="String_Node_Str";
  Iterator<String> listIt=this.getRelevantFiles().iterator();
  while (listIt.hasNext()) {
    String nextFile=listIt.next();
    nextFile=nextFile.substring(nextFile.lastIndexOf('/'));
    files+=nextFile + "String_Node_Str";
  }
  String use=user;
  if (use.length() < 8) {
    use+="String_Node_Str";
  }
  double rat=this.getRating() * 100000;
  rat=Math.round(rat);
  rat/=100000;
  out=revision + "String_Node_Str" + use+ "String_Node_Str"+ date+ "String_Node_Str"+ Integer.toString(numberOfRelevants)+ "String_Node_Str"+ Integer.toString(totalQuery)+ "String_Node_Str"+ Integer.toString(totalChanges)+ "String_Node_Str"+ rat+ "String_Node_Str"+ ratingComment+ "String_Node_Str"+ files;
  return out;
}

Fixed version (ground truth):
/** 
 * String representation of the node
 * @return all data in String form
 */
public String toString(){
  String out="String_Node_Str";
  String files="String_Node_Str";
  Iterator<String> listIt=this.getRelevantFiles().iterator();
  while (listIt.hasNext()) {
    String nextFile=listIt.next();
    nextFile=nextFile.substring(nextFile.lastIndexOf('/'));
    if (listIt.hasNext()) {
      files+=nextFile + "String_Node_Str";
    }
 else {
      files+=nextFile;
    }
  }
  String use=user;
  if (use.length() < 8) {
    use+="String_Node_Str";
  }
  double rat=this.getRating() * 100000;
  rat=Math.round(rat);
  rat/=100000;
  out=revision + "String_Node_Str" + use+ "String_Node_Str"+ date+ "String_Node_Str"+ Integer.toString(numberOfRelevants)+ "String_Node_Str"+ Integer.toString(totalQuery)+ "String_Node_Str"+ Integer.toString(totalChanges)+ "String_Node_Str"+ rat+ "String_Node_Str"+ ratingComment+ "String_Node_Str"+ files;
  return out;
}
Program: 183925
Project: 183925
Buggy source:
/** 
 * String representation of the node
 * @return all data in String form
 */
public String toString(){
  String out="String_Node_Str";
  String files="String_Node_Str";
  Iterator<String> listIt=this.getRelevantFiles().iterator();
  while (listIt.hasNext()) {
    String nextFile=listIt.next();
    nextFile=nextFile.substring(nextFile.lastIndexOf('/'));
    if (listIt.hasNext()) {
      files+=nextFile + "String_Node_Str";
    }
 else {
      files+=nextFile;
    }
  }
  String use=user;
  if (use.length() < 8) {
    use+="String_Node_Str";
  }
  double rat=this.getRating() * 100000;
  rat=Math.round(rat);
  rat/=100000;
  out=revision + "String_Node_Str" + use+ "String_Node_Str"+ date+ "String_Node_Str"+ Integer.toString(numberOfRelevants)+ "String_Node_Str"+ Integer.toString(totalQuery)+ "String_Node_Str"+ Integer.toString(totalChanges)+ "String_Node_Str"+ rat+ "String_Node_Str"+ ratingComment+ "String_Node_Str"+ files;
  return out;
}

Fixed version (ground truth):
/** 
 * String representation of the node
 * @return all data in String form
 */
public String toString(){
  String out="String_Node_Str";
  String files="String_Node_Str";
  Iterator<String> listIt=this.getRelevantFiles().iterator();
  while (listIt.hasNext()) {
    String nextFile=listIt.next();
    nextFile=nextFile.substring(nextFile.lastIndexOf('/') + 1);
    if (listIt.hasNext()) {
      files+=nextFile + "String_Node_Str";
    }
 else {
      files+=nextFile;
    }
  }
  String use=user;
  if (use.length() < 8) {
    use+="String_Node_Str";
  }
  double rat=this.getRating() * 100000;
  rat=Math.round(rat);
  rat/=100000;
  out=revision + "String_Node_Str" + use+ "String_Node_Str"+ date+ "String_Node_Str"+ Integer.toString(numberOfRelevants)+ "String_Node_Str"+ Integer.toString(totalQuery)+ "String_Node_Str"+ Integer.toString(totalChanges)+ "String_Node_Str"+ rat+ "String_Node_Str"+ ratingComment+ "String_Node_Str"+ files;
  return out;
}
Program: 183927
Project: 183927
Buggy source:
public T create(T model){
  String sql=createStatement.replace("String_Node_Str",C.eList(values(model)).map(new Function<Pair,String>(){
    @Override public String apply(    Pair t){
      return t.key;
    }
  }
).mkString("String_Node_Str"));
  sql(sql).executeUpdate();
  return findById(model.getId()).get();
}

Fixed version (ground truth):
public T create(T model){
  String sql=createStatement.replace("String_Node_Str",C.eList(values(model)).map(new Function<Pair,String>(){
    @Override public String apply(    Pair t){
      if (t.value.getClass().equals(String.class)) {
        return "String_Node_Str" + t.value.toString() + "String_Node_Str";
      }
      if (t.value.getClass().equals(Integer.class)) {
        return t.value.toString();
      }
      if (t.value.getClass().equals(Long.class)) {
        return t.value.toString();
      }
      if (t.value.getClass().equals(Double.class)) {
        return t.value.toString();
      }
      if (t.value.getClass().equals(Boolean.class)) {
        return ((Boolean)t.value) ? "String_Node_Str" : "String_Node_Str";
      }
      return "String_Node_Str" + t.value.toString() + "String_Node_Str";
    }
  }
).mkString("String_Node_Str"));
  sql(sql).executeUpdate();
  return findById(model.getId()).get();
}
Program: 183929
Project: 183929
Buggy source:
private List<Pair> values(T model){
  List<Pair> ret=new ArrayList<Pair>();
  Set<Field> fields=new HashSet<Field>(Arrays.asList(clazz.getDeclaredFields()));
  fields.addAll(Arrays.asList(clazz.getFields()));
  for (  Field field : fields) {
    field.setAccessible(true);
    for (    Extractor e : extractors) {
      if (e.name().toLowerCase().equals(field.getName().toLowerCase())) {
        try {
          ret.add(pair(e.name(),field.get(model)));
        }
 catch (        Exception ex) {
          ex.printStackTrace();
        }
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
private List<Pair> values(T model){
  List<Pair> ret=new ArrayList<Pair>();
  Set<Field> fields=new HashSet<Field>(Arrays.asList(clazz.getDeclaredFields()));
  fields.addAll(Arrays.asList(clazz.getFields()));
  for (  Extractor e : extractors) {
    for (    Field field : fields) {
      field.setAccessible(true);
      if (e.name().toLowerCase().equals(field.getName().toLowerCase())) {
        try {
          ret.add(pair(e.name(),field.get(model)));
        }
 catch (        Exception ex) {
          ex.printStackTrace();
        }
      }
    }
  }
  return ret;
}
Program: 183930
Project: 183930
Buggy source:
public T update(T model){
  String sql=updateStatement.replace("String_Node_Str",C.eList(values(model)).map(new Function<Pair,String>(){
    @Override public String apply(    Pair t){
      return t.key + "String_Node_Str" + t.value;
    }
  }
).mkString("String_Node_Str"));
  sql(sql).on(pair("String_Node_Str",model.getId())).executeUpdate();
  return findById(model.getId()).get();
}

Fixed version (ground truth):
public T update(T model){
  String sql=updateStatement.replace("String_Node_Str",C.eList(values(model)).map(new Function<Pair,String>(){
    @Override public String apply(    Pair t){
      if (t.value.getClass().equals(String.class)) {
        return t.key + "String_Node_Str" + "String_Node_Str"+ t.value.toString()+ "String_Node_Str";
      }
      if (t.value.getClass().equals(Integer.class)) {
        return t.key + "String_Node_Str" + t.value.toString();
      }
      if (t.value.getClass().equals(Long.class)) {
        return t.key + "String_Node_Str" + t.value.toString();
      }
      if (t.value.getClass().equals(Double.class)) {
        return t.key + "String_Node_Str" + t.value.toString();
      }
      if (t.value.getClass().equals(Boolean.class)) {
        return t.key + "String_Node_Str" + (((Boolean)t.value) ? "String_Node_Str" : "String_Node_Str");
      }
      return t.key + "String_Node_Str" + "String_Node_Str"+ t.value.toString()+ "String_Node_Str";
    }
  }
).mkString("String_Node_Str"));
  sql(sql).on(pair("String_Node_Str",model.getId())).executeUpdate();
  return findById(model.getId()).get();
}
Program: 183931
Project: 183931
Buggy source:
@Override public String apply(Pair t){
  return t.key + "String_Node_Str" + t.value;
}

Fixed version (ground truth):
@Override public String apply(Pair t){
  if (t.value.getClass().equals(String.class)) {
    return t.key + "String_Node_Str" + "String_Node_Str"+ t.value.toString()+ "String_Node_Str";
  }
  if (t.value.getClass().equals(Integer.class)) {
    return t.key + "String_Node_Str" + t.value.toString();
  }
  if (t.value.getClass().equals(Long.class)) {
    return t.key + "String_Node_Str" + t.value.toString();
  }
  if (t.value.getClass().equals(Double.class)) {
    return t.key + "String_Node_Str" + t.value.toString();
  }
  if (t.value.getClass().equals(Boolean.class)) {
    return t.key + "String_Node_Str" + (((Boolean)t.value) ? "String_Node_Str" : "String_Node_Str");
  }
  return t.key + "String_Node_Str" + "String_Node_Str"+ t.value.toString()+ "String_Node_Str";
}
Program: 183933
Project: 183933
Buggy source:
public static EnhancedList<Person> findAllBetween(int low,int high){
  return _.filter(_.age.between(low,high)).list();
}

Fixed version (ground truth):
public static List<Person> findAllBetween(final int low,final int high){
  return DB.withConnection(new Function<Connection,List<Person>>(){
    @Override public List<Person> apply(    Connection conn){
      return sql(conn,"String_Node_Str" + "String_Node_Str").on(pair("String_Node_Str",low),pair("String_Node_Str",high)).asList(getParser());
    }
  }
);
}
Program: 183934
Project: 183934
Buggy source:
public void broadcast(){
  enumerator=context.create(fromEnumerator,UUID.randomUUID().toString());
  enumerator.tell(Run.INSTANCE,internalIteratee);
}

Fixed version (ground truth):
public void broadcast(){
  enumerator=context.create(fromEnumerator,UUID.randomUUID().toString());
  fromEnumerator.context=context;
  fromEnumerator.enumerator=enumerator;
  fromEnumerator.iteratee=internalIteratee;
  enumerator.tell(Run.INSTANCE,internalIteratee);
  if (fromEnumerator instanceof CallbackPushEnumerator) {
    final CallbackPushEnumerator<T> p=(CallbackPushEnumerator<T>)fromEnumerator;
    context.schedule(p.every,p.unit,new Runnable(){
      @Override public void run(){
        Option<T> opt=p.callback.apply(Unit.unit());
        for (        T elem : opt) {
          p.push(elem);
        }
      }
    }
);
  }
}
Program: 183935
Project: 183935
Buggy source:
@Override public void run(){
  pushEnum.push(el);
}

Fixed version (ground truth):
@Override public void run(){
  Option<T> opt=p.callback.apply(Unit.unit());
  for (  T elem : opt) {
    p.push(elem);
  }
}
Program: 183936
Project: 183936
Buggy source:
public void push(T elem){
  pushQueue.offer(elem);
  try {
    if (enumerator != null) {
      enumerator.tell(Cont.INSTANCE,iteratee);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void push(T elem){
  pushQueue.offer(elem);
  try {
    if (enumerator != null) {
      enumerator.tell(Cont.INSTANCE,iteratee);
    }
 else {
      System.err.println("String_Node_Str" + elem.toString() + "String_Node_Str"+ enumerator);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 183937
Project: 183937
Buggy source:
public static <T>PushEnumerator<T> fromCallback(long every,TimeUnit unit,final Function<Unit,Option<T>> callback){
  final PushEnumerator<T> pushEnum=new PushEnumerator<T>();
  final ActorContext ctx=Actors.newContext();
  final ExecutorService exec=Executors.newCachedThreadPool();
  ctx.schedule(every,unit,new Runnable(){
    @Override public void run(){
      Option<T> opt=callback.apply(Unit.unit());
      for (      T elem : opt) {
        final T el=elem;
        Runnable r=new Runnable(){
          @Override public void run(){
            pushEnum.push(el);
          }
        }
;
        exec.execute(r);
      }
    }
  }
);
  return pushEnum;
}

Fixed version (ground truth):
public static <T>PushEnumerator<T> fromCallback(long every,TimeUnit unit,final Function<Unit,Option<T>> callback){
  return new CallbackPushEnumerator<T>(every,unit,callback);
}
Program: 183938
Project: 183938
Buggy source:
/** 
 * Method to loop the reception function to read all messages in the mailbox one by one.  Once launch, the loop will end with the stopActor method or with a poison pill.
 */
public final void loop(Action react){
  this.react=react;
  while (started.get()) {
    Message ret=mailbox.poll();
    if (ret != null) {
      if (ret.payload.getClass().equals(PoisonPill.class)) {
        stopActor();
      }
 else {
        sender=ret.sender;
        buzy.compareAndSet(false,true);
        react.apply(ret.payload);
        buzy.compareAndSet(true,false);
        sender=Option.none();
      }
    }
 else {
      try {
        Thread.sleep(1);
      }
 catch (      InterruptedException ex) {
        ex.printStackTrace();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Method to loop the reception function to read all messages in the mailbox one by one.  Once launch, the loop will end with the stopActor method or with a poison pill.
 */
public final void loop(Action react){
  this.react=react;
  while (started.get()) {
    Message ret=mailbox.poll();
    if (ret != null) {
      if (ret.payload.getClass().equals(PoisonPill.class)) {
        stopActor();
      }
 else {
        sender=ret.sender;
        buzy.compareAndSet(false,true);
        react.apply(ret.payload);
        buzy.compareAndSet(true,false);
        sender=Option.none();
      }
    }
 else {
      while (mailbox.isEmpty() && started.get()) {
        try {
          Thread.sleep(10);
        }
 catch (        InterruptedException ex) {
        }
      }
    }
  }
}
Program: 183939
Project: 183939
Buggy source:
public static void stopRemoting(){
  new Thread(){
    @Override public void run(){
      channel.unbind().awaitUninterruptibly();
      bootstrap.releaseExternalResources();
      remotingServerExecutor.shutdown();
      bossServerExecutor.shutdown();
      clientServerExecutor.shutdown();
      clientBossServerExecutor.shutdown();
      remotingServerExecutor.shutdownNow();
      bossServerExecutor.shutdownNow();
      clientServerExecutor.shutdownNow();
      clientBossServerExecutor.shutdownNow();
      remotingServerExecutor=Executors.newCachedThreadPool();
      bossServerExecutor=Executors.newCachedThreadPool();
      clientServerExecutor=Executors.newCachedThreadPool();
      clientBossServerExecutor=Executors.newCachedThreadPool();
    }
  }
.start();
}

Fixed version (ground truth):
public static void stopRemoting(){
  new Thread(){
    @Override public void run(){
      try {
        channel.unbind().awaitUninterruptibly();
      }
 catch (      Throwable t) {
      }
      try {
        bootstrap.releaseExternalResources();
      }
 catch (      Throwable t) {
      }
      try {
        remotingServerExecutor.shutdown();
        bossServerExecutor.shutdown();
        clientServerExecutor.shutdown();
        clientBossServerExecutor.shutdown();
        remotingServerExecutor.shutdownNow();
        bossServerExecutor.shutdownNow();
        clientServerExecutor.shutdownNow();
        clientBossServerExecutor.shutdownNow();
      }
 catch (      Throwable t) {
      }
      remotingServerExecutor=Executors.newCachedThreadPool();
      bossServerExecutor=Executors.newCachedThreadPool();
      clientServerExecutor=Executors.newCachedThreadPool();
      clientBossServerExecutor=Executors.newCachedThreadPool();
    }
  }
.start();
}
Program: 183940
Project: 183940
Buggy source:
@Override public ActorURL asRemoteURL(){
  return new RemoteActorURL(Actors.host,Actors.port,name);
}

Fixed version (ground truth):
@Override public ActorURL asRemoteURL(){
  return new RemoteActorURL(host,String.valueOf(port),name);
}
Program: 183941
Project: 183941
Buggy source:
@Override public ActorURL asLocalURL(){
  return new LocalActorURL(Actors.host,Actors.port,name);
}

Fixed version (ground truth):
@Override public ActorURL asLocalURL(){
  return new RemoteActorURL(host,String.valueOf(port),name);
}
Program: 183942
Project: 183942
Buggy source:
public void testChatRoom() throws Exception {
  User user1=new User("String_Node_Str");
  User user2=new User("String_Node_Str");
  User user3=new User("String_Node_Str");
  ChatRoom room=new ChatRoom();
  room.startActor();
  room.send(new Suscribe(user1));
  room.send(new Suscribe(user2));
  room.send(new Suscribe(user3));
  Thread.sleep(200);
  user1.send("String_Node_Str",room);
  Thread.sleep(200);
  user2.send("String_Node_Str",room);
  Thread.sleep(200);
  user3.send("String_Node_Str",room);
  Thread.sleep(200);
  room.send(new Unsuscribe(user1));
  Thread.sleep(200);
  room.send(new Unsuscribe(user2));
  Thread.sleep(200);
  room.send(new Unsuscribe(user3));
  Thread.sleep(200);
  userlatch.await();
  room.stopSession();
  room.stopActor();
  Actors.shutdownAll();
}

Fixed version (ground truth):
@Test @Ignore public void testChatRoom() throws Exception {
  User user1=new User("String_Node_Str");
  User user2=new User("String_Node_Str");
  User user3=new User("String_Node_Str");
  ChatRoom room=new ChatRoom();
  try {
    room.startActor();
    room.send(new Suscribe(user1));
    room.send(new Suscribe(user2));
    room.send(new Suscribe(user3));
    Thread.sleep(200);
    user1.send("String_Node_Str",room);
    Thread.sleep(200);
    user2.send("String_Node_Str",room);
    Thread.sleep(200);
    user3.send("String_Node_Str",room);
    Thread.sleep(200);
    room.send(new Unsuscribe(user1));
    Thread.sleep(200);
    room.send(new Unsuscribe(user2));
    Thread.sleep(200);
    room.send(new Unsuscribe(user3));
    Thread.sleep(200);
    userlatch.await();
  }
 catch (  Throwable t) {
  }
  try {
    room.stopSession();
    room.stopActor();
  }
 catch (  Throwable t) {
  }
  Actors.shutdownAll();
}
Program: 183943
Project: 183943
Buggy source:
public void testPingPong() throws Exception {
  Pong pong=new Pong();
  Ping ping=new Ping(pong);
  pong.startActor();
  ping.startActor();
  down.await();
  pong.stopActor();
  ping.stopActor();
  Actors.shutdownAll();
}

Fixed version (ground truth):
@Test @Ignore public void testPingPong() throws Exception {
  Pong pong=new Pong();
  Ping ping=new Ping(pong);
  try {
    pong.startActor();
    ping.startActor();
    down.await();
  }
 catch (  Throwable t) {
  }
  pong.stopActor();
  ping.stopActor();
  Actors.shutdownAll();
}
Program: 183944
Project: 183944
Buggy source:
/** 
 * Read only one message in the mailbox with the function.
 */
public final void react(Action<Object> react){
  this.react=react;
  Message ret=mailbox.poll();
  if (ret != null) {
    if (ret.payload.getClass().equals(PoisonPill.class)) {
      stopActor();
    }
 else {
      sender=ret.sender;
      buzy.compareAndSet(false,true);
      react.apply(ret.payload);
      buzy.compareAndSet(true,false);
      sender=Option.none();
    }
  }
}

Fixed version (ground truth):
/** 
 * Read only one message in the mailbox with the function.
 */
public final void react(Action<Object> react){
  this.react=react;
  waitIfMailboxIsEmpty();
  Message ret=mailbox.poll();
  if (ret != null) {
    if (ret.payload.getClass().equals(PoisonPill.class)) {
      stopActor();
    }
 else {
      sender=ret.sender;
      buzy.compareAndSet(false,true);
      react.apply(ret.payload);
      buzy.compareAndSet(true,false);
      sender=Option.none();
    }
  }
}
Program: 183945
Project: 183945
Buggy source:
/** 
 * Method to loop the reception function to read all messages in the mailbox one by one.  Once launch, the loop will end with the stopActor method or with a poison pill.
 */
public final void loop(Action react){
  this.react=react;
  while (started.get()) {
    Message ret=mailbox.poll();
    if (ret != null) {
      if (ret.payload.getClass().equals(PoisonPill.class)) {
        stopActor();
      }
 else {
        sender=ret.sender;
        buzy.compareAndSet(false,true);
        react.apply(ret.payload);
        buzy.compareAndSet(true,false);
        sender=Option.none();
      }
    }
 else {
      while (mailbox.isEmpty() && started.get()) {
        try {
          Thread.sleep(10);
        }
 catch (        InterruptedException ex) {
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Method to loop the reception function to read all messages in the mailbox one by one.  Once launch, the loop will end with the stopActor method or with a poison pill.
 */
public final void loop(Action react){
  this.react=react;
  while (started.get()) {
    waitIfMailboxIsEmpty();
    Message ret=mailbox.poll();
    if (ret != null) {
      if (ret.payload.getClass().equals(PoisonPill.class)) {
        stopActor();
      }
 else {
        sender=ret.sender;
        buzy.compareAndSet(false,true);
        react.apply(ret.payload);
        buzy.compareAndSet(true,false);
        sender=Option.none();
      }
    }
  }
}
Program: 183946
Project: 183946
Buggy source:
@Test @Ignore public void testChatRoom() throws Exception {
  User user1=new User("String_Node_Str");
  User user2=new User("String_Node_Str");
  User user3=new User("String_Node_Str");
  ChatRoom room=new ChatRoom();
  try {
    room.startActor();
    room.send(new Suscribe(user1));
    room.send(new Suscribe(user2));
    room.send(new Suscribe(user3));
    Thread.sleep(200);
    user1.send("String_Node_Str",room);
    Thread.sleep(200);
    user2.send("String_Node_Str",room);
    Thread.sleep(200);
    user3.send("String_Node_Str",room);
    Thread.sleep(200);
    room.send(new Unsuscribe(user1));
    Thread.sleep(200);
    room.send(new Unsuscribe(user2));
    Thread.sleep(200);
    room.send(new Unsuscribe(user3));
    Thread.sleep(200);
    userlatch.await();
  }
 catch (  Throwable t) {
  }
  try {
    room.stopSession();
    room.stopActor();
  }
 catch (  Throwable t) {
  }
  Actors.shutdownAll();
}

Fixed version (ground truth):
@Test public void testChatRoom() throws Exception {
  User user1=new User("String_Node_Str");
  User user2=new User("String_Node_Str");
  User user3=new User("String_Node_Str");
  ChatRoom room=new ChatRoom();
  try {
    room.startActor();
    room.send(new Suscribe(user1));
    room.send(new Suscribe(user2));
    room.send(new Suscribe(user3));
    Thread.sleep(200);
    user1.send("String_Node_Str",room);
    Thread.sleep(200);
    user2.send("String_Node_Str",room);
    Thread.sleep(200);
    user3.send("String_Node_Str",room);
    Thread.sleep(200);
    room.send(new Unsuscribe(user1));
    Thread.sleep(200);
    room.send(new Unsuscribe(user2));
    Thread.sleep(200);
    room.send(new Unsuscribe(user3));
    Thread.sleep(200);
    userlatch.await();
  }
 catch (  Throwable t) {
  }
  try {
    room.stopSession();
    room.stopActor();
  }
 catch (  Throwable t) {
  }
  Actors.shutdownAll();
}
Program: 183947
Project: 183947
Buggy source:
@Test @Ignore public void testPingPong() throws Exception {
  Pong pong=new Pong();
  Ping ping=new Ping(pong);
  try {
    pong.startActor();
    ping.startActor();
    down.await();
  }
 catch (  Throwable t) {
  }
  pong.stopActor();
  ping.stopActor();
  Actors.shutdownAll();
}

Fixed version (ground truth):
@Test public void testPingPong() throws Exception {
  Pong pong=new Pong();
  Ping ping=new Ping(pong);
  try {
    pong.startActor();
    ping.startActor();
    down.await();
  }
 catch (  Throwable t) {
  }
  pong.stopActor();
  ping.stopActor();
  Actors.shutdownAll();
}