nus-yam/ex-repair huggingface dataset:
Program: 141595
Project: 141595
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  if (!r.isPlayer(cs)) {
    return;
  }
  if (!r.checkArgs(args,0)) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  Player p=(Player)cs;
  ItemStack stack=p.getItemInHand();
  if (stack == null || stack.getType() == null || stack.getType().equals(Material.AIR)) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  try {
    String s=r.getFinalArg(args,0);
    if (s.startsWith("String_Node_Str")) {
      stack=Bukkit.getUnsafe().modifyItemStack(stack,s);
    }
 else {
      MetaItemStack meta=new MetaItemStack(stack);
      meta.parseStringMeta(cs,r.perm(cs,"String_Node_Str",false,false),args,0);
      stack=meta.getItemStack();
    }
  }
 catch (  Exception e) {
    r.sendMes(cs,"String_Node_Str");
  }
  p.setItemInHand(stack);
  r.sendMes(cs,"String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  if (!r.isPlayer(cs)) {
    return;
  }
  if (!r.checkArgs(args,0)) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  Player p=(Player)cs;
  ItemStack stack=p.getItemInHand();
  if (stack == null || stack.getType() == null || stack.getType().equals(Material.AIR)) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  try {
    String s=r.getFinalArg(args,0);
    if (s.startsWith("String_Node_Str")) {
      stack=Bukkit.getUnsafe().modifyItemStack(stack,s);
    }
 else {
      MetaItemStack meta=new MetaItemStack(stack);
      try {
        meta.parseStringMeta(cs,r.perm(cs,"String_Node_Str",false,false),args,0);
      }
 catch (      IllegalArgumentException ex) {
        if (ex.getMessage() != null && ex.getMessage().contains("String_Node_Str")) {
          r.sendMes(cs,"String_Node_Str");
          return;
        }
        return;
      }
      stack=meta.getItemStack();
    }
  }
 catch (  Exception e) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  p.setItemInHand(stack);
  r.sendMes(cs,"String_Node_Str");
}
Program: 141596
Project: 141596
Buggy source:
public void addEnchantment(CommandSender cs,boolean allowUnsafe,Enchantment enchantment,int level){
  if (enchantment == null) {
    return;
  }
  if (this.stack.getType().equals(Material.ENCHANTED_BOOK)) {
    EnchantmentStorageMeta meta=(EnchantmentStorageMeta)this.stack.getItemMeta();
    if (level == 0) {
      meta.removeStoredEnchant(enchantment);
    }
 else {
      meta.addStoredEnchant(enchantment,level,allowUnsafe);
    }
    this.stack.setItemMeta(meta);
  }
 else   if (level == 0) {
    this.stack.removeEnchantment(enchantment);
  }
 else   if (allowUnsafe) {
    this.stack.addUnsafeEnchantment(enchantment,level);
  }
 else {
    try {
      this.stack.addEnchantment(enchantment,level);
    }
 catch (    IllegalArgumentException e) {
      if (cs != null) {
        r.sendMes(cs,"String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
public void addEnchantment(CommandSender cs,boolean allowUnsafe,Enchantment enchantment,int level){
  if (enchantment == null) {
    return;
  }
  if (this.stack.getType().equals(Material.ENCHANTED_BOOK)) {
    EnchantmentStorageMeta meta=(EnchantmentStorageMeta)this.stack.getItemMeta();
    if (level == 0) {
      meta.removeStoredEnchant(enchantment);
    }
 else {
      meta.addStoredEnchant(enchantment,level,allowUnsafe);
    }
    this.stack.setItemMeta(meta);
  }
 else   if (level == 0) {
    this.stack.removeEnchantment(enchantment);
  }
 else   if (allowUnsafe) {
    this.stack.addUnsafeEnchantment(enchantment,level);
  }
 else {
    this.stack.addEnchantment(enchantment,level);
  }
}
Program: 141597
Project: 141597
Buggy source:
@SuppressWarnings("String_Node_Str") public void parseStringMeta(CommandSender sender,boolean allowUnsafe,String[] string,int fromArg){
  if (string[fromArg].startsWith("String_Node_Str")) {
    this.stack=Bukkit.getServer().getUnsafe().modifyItemStack(this.stack,Joiner.on(' ').join(Arrays.asList(string).subList(fromArg,string.length)));
  }
 else {
    for (int i=fromArg; i < string.length; i++) {
      addStringMeta(sender,allowUnsafe,string[i]);
    }
    if (this.validFirework) {
      FireworkEffect effect=this.builder.build();
      FireworkMeta fmeta=(FireworkMeta)this.stack.getItemMeta();
      fmeta.addEffect(effect);
      this.stack.setItemMeta(fmeta);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void parseStringMeta(CommandSender sender,boolean allowUnsafe,String[] string,int fromArg) throws Exception {
  if (string[fromArg].startsWith("String_Node_Str")) {
    this.stack=Bukkit.getServer().getUnsafe().modifyItemStack(this.stack,Joiner.on(' ').join(Arrays.asList(string).subList(fromArg,string.length)));
  }
 else {
    for (int i=fromArg; i < string.length; i++) {
      addStringMeta(sender,allowUnsafe,string[i]);
    }
    if (this.validFirework) {
      FireworkEffect effect=this.builder.build();
      FireworkMeta fmeta=(FireworkMeta)this.stack.getItemMeta();
      fmeta.addEffect(effect);
      this.stack.setItemMeta(fmeta);
    }
  }
}
Program: 141599
Project: 141599
Buggy source:
public String getNick(){
  if (nickname != null) {
    return nickname;
  }
  Config data=getPlayerConfig();
  if (data.get("String_Node_Str") == null) {
    return null;
  }
  String nick=ChatColor.translateAlternateColorCodes('&',data.getString("String_Node_Str"));
  if (getPlayer().isOnline()) {
    getPlayer().getPlayer().setDisplayName(nickname.replace("String_Node_Str","String_Node_Str"));
  }
  if (getPlayer().isOnline() && r.perm((CommandSender)getPlayer(),"String_Node_Str",false,false)) {
    nick=nick.replaceAll("String_Node_Str",r.getRandomChatColor() + "String_Node_Str");
  }
  nickname=nick + ChatColor.RESET;
  save();
  return nick + ChatColor.RESET;
}

Fixed version (ground truth):
public String getNick(){
  if (nickname != null) {
    return nickname;
  }
  Config data=getPlayerConfig();
  if (data.get("String_Node_Str") == null) {
    return null;
  }
  String nick=ChatColor.translateAlternateColorCodes('&',data.getString("String_Node_Str"));
  if (getPlayer().isOnline()) {
    getPlayer().getPlayer().setDisplayName(nick.replace("String_Node_Str","String_Node_Str"));
  }
  if (getPlayer().isOnline() && r.perm((CommandSender)getPlayer(),"String_Node_Str",false,false)) {
    nick=nick.replaceAll("String_Node_Str",r.getRandomChatColor() + "String_Node_Str");
  }
  nickname=nick + ChatColor.RESET;
  save();
  return nick + ChatColor.RESET;
}
Program: 141600
Project: 141600
Buggy source:
@Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  StringBuilder s=new StringBuilder("String_Node_Str");
  for (  World w : Bukkit.getWorlds()) {
    if (r.checkArgs(args,0) && !w.getName().equalsIgnoreCase(args[0])) {
      continue;
    }
    Integer c=0;
    for (    Chunk chunk : w.getLoadedChunks()) {
      try {
        chunk.unload(true,true);
      }
 catch (      Exception ex) {
        r.log("String_Node_Str" + chunk.getX() + "String_Node_Str"+ chunk.getZ());
        return;
      }
      c++;
    }
    c=c - w.getLoadedChunks().length;
    Integer e=0;
    Integer d=0;
    for (    Entity en : w.getEntities()) {
      if (en instanceof Monster) {
        if (en.getTicksLived() > 200) {
          en.playEffect(EntityEffect.DEATH);
          en.remove();
          e++;
        }
      }
      if (en instanceof Item) {
        Item item=(Item)en;
        if (item.getTicksLived() > 200) {
          if (!item.isValid()) {
            en.remove();
          }
          d++;
        }
      }
    }
    s.append(r.mes("String_Node_Str","String_Node_Str",w.getName(),"String_Node_Str",c,"String_Node_Str",e,"String_Node_Str",d));
  }
  cs.sendMessage(s.toString());
}

Fixed version (ground truth):
@Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  StringBuilder s=new StringBuilder("String_Node_Str");
  for (  World w : Bukkit.getWorlds()) {
    if (r.checkArgs(args,0) && !w.getName().equalsIgnoreCase(args[0])) {
      continue;
    }
    Integer c=0;
    for (    Chunk chunk : w.getLoadedChunks()) {
      try {
        chunk.unload(true,true);
      }
 catch (      Exception ex) {
        r.log("String_Node_Str" + chunk.getX() + "String_Node_Str"+ chunk.getZ());
        return;
      }
      c++;
    }
    c=c - w.getLoadedChunks().length;
    Integer e=0;
    Integer d=0;
    for (    Entity en : w.getEntities()) {
      if (en instanceof Monster) {
        if (en.getTicksLived() > 200 && en.getCustomName() == null) {
          en.playEffect(EntityEffect.DEATH);
          en.remove();
          e++;
        }
      }
      if (en instanceof Item) {
        Item item=(Item)en;
        if (item.getTicksLived() > 200) {
          if (!item.isValid()) {
            en.remove();
          }
          d++;
        }
      }
    }
    s.append(r.mes("String_Node_Str","String_Node_Str",w.getName(),"String_Node_Str",c,"String_Node_Str",e,"String_Node_Str",d));
  }
  cs.sendMessage(s.toString());
}
Program: 141602
Project: 141602
Buggy source:
/** 
 * Gets an ItemStack from the given node
 * @param item Node representing an ItemStack
 * @return ItemStack of null
 */
private ItemStack getItemStack(final Map<String,Object> item){
  final ItemStack is=ItemUtil.searchItem((String)item.get("String_Node_Str"));
  if (is == null) {
    return null;
  }
  if (item.containsKey("String_Node_Str")) {
    is.setAmount((int)item.get("String_Node_Str"));
  }
  if (item.containsKey("String_Node_Str")) {
    is.setDurability(((Integer)item.get("String_Node_Str")).shortValue());
  }
  MetaItemStack ism=new MetaItemStack(is);
  for (  String s : item.keySet()) {
    if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")) {
      continue;
    }
    ism.addStringMeta(null,true,s + "String_Node_Str" + item.get(s).toString().replaceAll("String_Node_Str","String_Node_Str"));
  }
  return ism.getItemStack();
}

Fixed version (ground truth):
/** 
 * Gets an ItemStack from the given node
 * @param item Node representing an ItemStack
 * @return ItemStack of null
 */
private ItemStack getItemStack(final Map<String,Object> item){
  final ItemStack is=ItemUtil.searchItem((String)item.get("String_Node_Str"));
  if (is == null) {
    return null;
  }
  if (item.containsKey("String_Node_Str")) {
    is.setAmount((int)item.get("String_Node_Str"));
  }
  if (item.containsKey("String_Node_Str")) {
    is.setDurability(((Number)item.get("String_Node_Str")).shortValue());
  }
  MetaItemStack ism=new MetaItemStack(is);
  for (  String s : item.keySet()) {
    if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")) {
      continue;
    }
    ism.addStringMeta(null,true,s + "String_Node_Str" + item.get(s).toString().replaceAll("String_Node_Str","String_Node_Str"));
  }
  return ism.getItemStack();
}
Program: 141604
Project: 141604
Buggy source:
@Override public Object put(String key,Object value){
  return wrapOutgoing(original.put((String)key,unwrapIncoming(value)));
}

Fixed version (ground truth):
@Override public Object put(String key,Object value){
  return wrapOutgoing(original.put(key,unwrapIncoming(value)));
}
Program: 141605
Project: 141605
Buggy source:
/** 
 * Retrieve the NBT type from a given NMS NBT tag.
 * @param nms - the native NBT tag.
 * @return The corresponding type.
 */
private NbtType getNbtType(Object nms){
  int type=(Byte)invokeMethod(NBT_GET_TYPE,nms);
  return NBT_ENUM.get(type);
}

Fixed version (ground truth):
/** 
 * Retrieve the NBT type from a given NMS NBT tag.
 * @param nms - the native NBT tag.
 * @return The corresponding type.
 */
private NbtType getNbtType(Object nms){
  int type=(int)invokeMethod(NBT_GET_TYPE,nms);
  return NBT_ENUM.get(type);
}
Program: 141607
Project: 141607
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.isPlayer(cs)) {
    return;
  }
  Player p=(Player)cs;
  if (!r.perm(p,"String_Node_Str",false,true)) {
    return;
  }
  Class type=Fireball.class;
  if (args.length > 0) {
    if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=SmallFireball.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=Arrow.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=WitherSkull.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=Egg.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=Snowball.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=ThrownExpBottle.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=LargeFireball.class;
    }
  }
  Vector direction=p.getEyeLocation().getDirection().multiply(2);
  Projectile projectile=(Projectile)p.getWorld().spawn(p.getEyeLocation().add(direction.getX(),direction.getY(),direction.getZ()),type);
  projectile.setShooter(p);
  projectile.setVelocity(direction);
  projectile.setBounce(true);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.isPlayer(cs)) {
    return;
  }
  Player p=(Player)cs;
  if (!r.perm(p,"String_Node_Str",false,true)) {
    return;
  }
  Class type=Fireball.class;
  if (args.length > 0) {
    if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=SmallFireball.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=Arrow.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=WitherSkull.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=Egg.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=Snowball.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=ThrownExpBottle.class;
    }
 else     if (args[0].equalsIgnoreCase("String_Node_Str")) {
      type=LargeFireball.class;
    }
  }
  Vector direction=p.getEyeLocation().getDirection().multiply(2);
  Projectile projectile=(Projectile)p.getWorld().spawn(p.getEyeLocation().add(direction.getX(),direction.getY(),direction.getZ()),type);
  projectile.setShooter(p);
  projectile.setVelocity(direction);
}
Program: 141611
Project: 141611
Buggy source:
@Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  if (!r.checkArgs(args,0)) {
    if (!r.isPlayer(cs)) {
      return;
    }
    Player p=(Player)cs;
    p.setFoodLevel(20);
    p.setSaturation(10F);
    r.sendMes(cs,"String_Node_Str");
  }
 else {
    Player p=r.searchPlayer(args[0]);
    if (p == null) {
      r.sendMes(cs,"String_Node_Str","String_Node_Str",args[0]);
      return;
    }
    p.setFoodLevel(20);
    p.setSaturation(10F);
    r.sendMes(cs,"String_Node_Str","String_Node_Str",p.getName());
    r.sendMes(cs,"String_Node_Str","String_Node_Str",cs.getName());
  }
}

Fixed version (ground truth):
@Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  if (!r.checkArgs(args,0)) {
    if (!r.isPlayer(cs)) {
      return;
    }
    Player p=(Player)cs;
    p.setFoodLevel(20);
    p.setSaturation(10F);
    r.sendMes(cs,"String_Node_Str");
  }
 else {
    if (!r.perm(cs,"String_Node_Str",false,true)) {
      return;
    }
    Player p=r.searchPlayer(args[0]);
    if (p == null) {
      r.sendMes(cs,"String_Node_Str","String_Node_Str",args[0]);
      return;
    }
    p.setFoodLevel(20);
    p.setSaturation(10F);
    r.sendMes(cs,"String_Node_Str","String_Node_Str",p.getName());
    r.sendMes(cs,"String_Node_Str","String_Node_Str",cs.getName());
  }
}
Program: 141612
Project: 141612
Buggy source:
@Override public void run(final CommandSender cs,String label,String[] args){
  String command=label;
  String pageStr=args.length > 0 ? args[0] : null;
  String chapterPageStr=args.length > 1 ? args[1] : null;
  UText input=new TextInput(cs);
  UText output;
  if (input.getLines().isEmpty()) {
    if ((r.isInt(pageStr)) || (pageStr == null)) {
      output=new HelpInput(cs,"String_Node_Str");
    }
 else {
      output=new HelpInput(cs,pageStr.toLowerCase(Locale.ENGLISH));
      command=command.concat("String_Node_Str").concat(pageStr);
      pageStr=chapterPageStr;
    }
    chapterPageStr=null;
  }
 else {
    output=input;
  }
  TextPager pager=new TextPager(output);
  pager.showPage(pageStr,chapterPageStr,command,cs);
}

Fixed version (ground truth):
@Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  String command=label;
  String pageStr=args.length > 0 ? args[0] : null;
  String chapterPageStr=args.length > 1 ? args[1] : null;
  UText input=new TextInput(cs);
  UText output;
  if (input.getLines().isEmpty()) {
    if ((r.isInt(pageStr)) || (pageStr == null)) {
      output=new HelpInput(cs,"String_Node_Str");
    }
 else {
      output=new HelpInput(cs,pageStr.toLowerCase(Locale.ENGLISH));
      command=command.concat("String_Node_Str").concat(pageStr);
      pageStr=chapterPageStr;
    }
    chapterPageStr=null;
  }
 else {
    output=input;
  }
  TextPager pager=new TextPager(output);
  pager.showPage(pageStr,chapterPageStr,command,cs);
}
Program: 141618
Project: 141618
Buggy source:
@Override public void run(final CommandSender cs,String label,String[] args){
  if (r.checkArgs(args,0) == false) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  OfflinePlayer banp=r.searchOfflinePlayer(args[0]);
  if (banp == null || (!banp.hasPlayedBefore() && !banp.isOnline())) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",args[0]);
    return;
  }
  Long time=0L;
  if (r.checkArgs(args,1) == false) {
  }
 else   if (DateUtil.parseDateDiff(args[1],true) != -1) {
    time=DateUtil.parseDateDiff(args[1],true);
  }
  if (!r.perm(cs,"String_Node_Str",false,false) && !r.perm(cs,"String_Node_Str",false,false) && time == 0L) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  if (!r.perm(cs,"String_Node_Str",false,false) && !r.perm(cs,"String_Node_Str",false,false) && time != 0L) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  UC.getPlayer(banp).setDeaf(true,time);
  if (time == 0L) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",banp.getName());
  }
 else {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",banp.getName(),"String_Node_Str",DateUtil.format(time + System.currentTimeMillis()));
  }
  if (banp.isOnline()) {
    Player banp2=(Player)banp;
    r.sendMes(banp2,"String_Node_Str");
  }
  return;
}

Fixed version (ground truth):
@Override public void run(final CommandSender cs,String label,String[] args){
  if (r.checkArgs(args,0) == false) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  OfflinePlayer banp=r.searchOfflinePlayer(args[0]);
  if (banp == null || (!banp.hasPlayedBefore() && !banp.isOnline())) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",args[0]);
    return;
  }
  Long time=0L;
  if (r.checkArgs(args,1) == false) {
  }
 else   if (DateUtil.parseDateDiff(args[1]) != -1) {
    time=DateUtil.parseDateDiff(args[1]);
  }
  if (!r.perm(cs,"String_Node_Str",false,false) && !r.perm(cs,"String_Node_Str",false,false) && time == 0L) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  if (!r.perm(cs,"String_Node_Str",false,false) && !r.perm(cs,"String_Node_Str",false,false) && time != 0L) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  UC.getPlayer(banp).setDeaf(true,time);
  if (time == 0L) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",banp.getName());
  }
 else {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",banp.getName(),"String_Node_Str",DateUtil.format(time + System.currentTimeMillis()));
  }
  if (banp.isOnline()) {
    Player banp2=(Player)banp;
    r.sendMes(banp2,"String_Node_Str");
  }
  return;
}
Program: 141619
Project: 141619
Buggy source:
@Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  if (!r.isPlayer(cs)) {
    return;
  }
  if (!r.checkArgs(args,0)) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  Player p=(Player)cs;
  Enchantment ench=EnchantmentDatabase.getByName(args[0]);
  if (ench == null) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",args[0]);
    return;
  }
  ItemStack stack=p.getItemInHand();
  if (stack == null || stack.getType() == null || stack.getType().equals(Material.AIR)) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  String name=ench.getName().replace("String_Node_Str","String_Node_Str").toLowerCase();
  Integer level=1;
  if (r.checkArgs(args,1) == true && r.isInt(args[1])) {
    level=Integer.parseInt(args[1]);
  }
  if (level < 0) {
    level=0;
  }
  if (level == 0) {
    stack.removeEnchantment(ench);
  }
 else {
    MetaItemStack stack2=new MetaItemStack(stack);
    stack2.addEnchantment(cs,true,ench,level);
    p.setItemInHand(stack2.getItemStack());
  }
  r.sendMes(cs,"String_Node_Str","String_Node_Str",name,"String_Node_Str",level,"String_Node_Str",ItemUtil.getName(stack).toLowerCase());
}

Fixed version (ground truth):
@Override public void run(final CommandSender cs,String label,String[] args){
  if (!r.perm(cs,"String_Node_Str",false,true)) {
    return;
  }
  if (!r.isPlayer(cs)) {
    return;
  }
  if (!r.checkArgs(args,0)) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  Player p=(Player)cs;
  Enchantment ench=EnchantmentDatabase.getByName(args[0]);
  if (ench == null) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",args[0]);
    return;
  }
  ItemStack stack=p.getItemInHand();
  if (stack == null || stack.getType() == null || stack.getType().equals(Material.AIR)) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  String name=ench.getName().replace("String_Node_Str","String_Node_Str").toLowerCase();
  Integer level=1;
  if (r.checkArgs(args,1) == true && r.isInt(args[1])) {
    level=Integer.parseInt(args[1]);
  }
  if (level < 0) {
    level=0;
  }
  if (level == 0) {
    stack.removeEnchantment(ench);
  }
 else {
    MetaItemStack stack2=new MetaItemStack(stack);
    stack2.addEnchantment(true,ench,level);
    p.setItemInHand(stack2.getItemStack());
  }
  r.sendMes(cs,"String_Node_Str","String_Node_Str",name,"String_Node_Str",level,"String_Node_Str",ItemUtil.getName(stack).toLowerCase());
}
Program: 141621
Project: 141621
Buggy source:
@Override public void run(final CommandSender cs,String label,String[] args){
  if (r.checkArgs(args,0) == false) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  OfflinePlayer t=r.searchOfflinePlayer(args[0]);
  if (t == null) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",args[0]);
    return;
  }
  Long time=0L;
  if (r.checkArgs(args,1) == false) {
  }
 else   if (DateUtil.parseDateDiff(args[1],true) != -1) {
    time=DateUtil.parseDateDiff(args[1],true);
  }
  if (!r.perm(cs,"String_Node_Str",false,false) && !r.perm(cs,"String_Node_Str",false,false) && time == 0L) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  if (!r.perm(cs,"String_Node_Str",false,false) && !r.perm(cs,"String_Node_Str",false,false) && time != 0L) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  UC.getPlayer(t).setFrozen(true,time);
  if (time == 0L) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",t.getName());
  }
 else {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",t.getName(),"String_Node_Str",DateUtil.format(time + System.currentTimeMillis()));
  }
  if (t.isOnline()) {
    Player banp2=(Player)t;
    r.sendMes(banp2,"String_Node_Str");
  }
  return;
}

Fixed version (ground truth):
@Override public void run(final CommandSender cs,String label,String[] args){
  if (r.checkArgs(args,0) == false) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  OfflinePlayer t=r.searchOfflinePlayer(args[0]);
  if (t == null) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",args[0]);
    return;
  }
  Long time=0L;
  if (r.checkArgs(args,1) == false) {
  }
 else   if (DateUtil.parseDateDiff(args[1]) != -1) {
    time=DateUtil.parseDateDiff(args[1]);
  }
  if (!r.perm(cs,"String_Node_Str",false,false) && !r.perm(cs,"String_Node_Str",false,false) && time == 0L) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  if (!r.perm(cs,"String_Node_Str",false,false) && !r.perm(cs,"String_Node_Str",false,false) && time != 0L) {
    r.sendMes(cs,"String_Node_Str");
    return;
  }
  UC.getPlayer(t).setFrozen(true,time);
  if (time == 0L) {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",t.getName());
  }
 else {
    r.sendMes(cs,"String_Node_Str","String_Node_Str",t.getName(),"String_Node_Str",DateUtil.format(time + System.currentTimeMillis()));
  }
  if (t.isOnline()) {
    Player banp2=(Player)t;
    r.sendMes(banp2,"String_Node_Str");
  }
  return;
}
Program: 141622
Project: 141622
Buggy source:
public static void runUpdater(){
  if (!r.getCnfg().getBoolean("String_Node_Str")) {
    return;
  }
  Boolean dl=r.getCnfg().getBoolean("String_Node_Str");
  updater=new UltimateUpdater(r.getUC(),66979,UltimateCore.getPluginFile(),dl ? UpdateType.DEFAULT : UpdateType.NO_DOWNLOAD,true);
  Thread thr=new Thread(new Runnable(){
    @Override public void run(){
      updater.waitForThread();
      try {
        if (updater.getResult().equals(UpdateResult.UPDATE_AVAILABLE)) {
          r.log("String_Node_Str");
          r.log("String_Node_Str");
        }
      }
 catch (      Exception ex) {
        ErrorLogger.log(ex,"String_Node_Str");
      }
    }
  }
);
  thr.setName("String_Node_Str");
  thr.start();
}

Fixed version (ground truth):
public static void runUpdater(){
  if (!r.getCnfg().getBoolean("String_Node_Str")) {
    return;
  }
  Boolean dl=r.getCnfg().getBoolean("String_Node_Str");
  updater=new UltimateUpdater(r.getUC(),66979,UltimateCore.getPluginFile(),dl ? UpdateType.DEFAULT : UpdateType.NO_DOWNLOAD,true);
  Thread thr=new Thread(new Runnable(){
    @Override public void run(){
      updater.waitForThread();
      try {
        if (updater.getResult() == null || updater.getResult().equals(UpdateResult.UPDATE_AVAILABLE)) {
          r.log("String_Node_Str");
          r.log("String_Node_Str");
        }
      }
 catch (      Exception ex) {
        ErrorLogger.log(ex,"String_Node_Str");
      }
    }
  }
);
  thr.setName("String_Node_Str");
  thr.start();
}
Program: 141623
Project: 141623
Buggy source:
@Override public void run(){
  updater.waitForThread();
  try {
    if (updater.getResult().equals(UpdateResult.UPDATE_AVAILABLE)) {
      r.log("String_Node_Str");
      r.log("String_Node_Str");
    }
  }
 catch (  Exception ex) {
    ErrorLogger.log(ex,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  updater.waitForThread();
  try {
    if (updater.getResult() == null || updater.getResult().equals(UpdateResult.UPDATE_AVAILABLE)) {
      r.log("String_Node_Str");
      r.log("String_Node_Str");
    }
  }
 catch (  Exception ex) {
    ErrorLogger.log(ex,"String_Node_Str");
  }
}
Program: 141624
Project: 141624
Buggy source:
protected void saveProject(){
  File output=getSelectedOutputFile(ZIP_FILTER);
  if (output != null) {
    Appender app=Logger.getRootLogger().getAppender("String_Node_Str");
    String logFile=null;
    if (app instanceof FileAppender && app != null) {
      logFile=((FileAppender)app).getFile();
    }
 else {
      logger.error("String_Node_Str");
    }
    ZipProject zp=new ZipProject(indatafile,inlabelsfile,inpointsfile,logFile);
    try {
      if (new File(output.getCanonicalPath()).exists()) {
        new File(output.getCanonicalPath()).delete();
      }
      zp.saveTo(output.getCanonicalPath());
    }
 catch (    IOException e) {
      logger.error(e,e);
      JOptionPane.showMessageDialog(this,e.getMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
}

Fixed version (ground truth):
protected void saveProject(){
  File output=getSelectedOutputFile(ZIP_FILTER);
  if (output != null && !output.equals("String_Node_Str")) {
    Appender app=Logger.getRootLogger().getAppender("String_Node_Str");
    String logFile=null;
    if (app instanceof FileAppender && app != null) {
      logFile=((FileAppender)app).getFile();
    }
 else {
      logger.error("String_Node_Str");
    }
    ZipProject zp=new ZipProject(indatafile,inlabelsfile,inpointsfile,logFile);
    try {
      if (new File(output.getCanonicalPath()).exists()) {
        new File(output.getCanonicalPath()).delete();
      }
      zp.saveTo(output.getCanonicalPath());
    }
 catch (    IOException e) {
      logger.error(e,e);
      JOptionPane.showMessageDialog(this,e.getMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
}
Program: 141625
Project: 141625
Buggy source:
protected void openProject(){
  String input=getSelectedInputFile(ZIP_FILTER);
  if (input != null) {
    ZipProject zip;
    try {
      zip=new ZipProject(input);
      this.textfield_file.setText(zip.getDataInputFile());
      if (zip.getLabelInputFile() != null) {
        this.textfield_labels.setText(zip.getLabelInputFile());
      }
      this.textfield_points_file.setText(zip.getPointInputFile());
      File f=new File(input);
      setWorkspaceName(f.getName());
    }
 catch (    IOException e) {
      logger.error(e,e);
      JOptionPane.showMessageDialog(this,e.getMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
}

Fixed version (ground truth):
protected void openProject(){
  String input=getSelectedInputFile(ZIP_FILTER);
  if (input != null && !input.equals("String_Node_Str")) {
    ZipProject zip;
    try {
      zip=new ZipProject(input);
      this.textfield_file.setText(zip.getDataInputFile());
      if (zip.getLabelInputFile() != null) {
        this.textfield_labels.setText(zip.getLabelInputFile());
      }
      this.textfield_points_file.setText(zip.getPointInputFile());
      File f=new File(input);
      setWorkspaceName(f.getName());
    }
 catch (    IOException e) {
      logger.error(e,e);
      JOptionPane.showMessageDialog(this,e.getMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
}
Program: 141627
Project: 141627
Buggy source:
@Override public void onBackPressed(){
  Fragment fg=getFragmentManager().findFragmentByTag("String_Node_Str");
  if (fg != null) {
    if (!((SelectFragment)fg).onBackPressed()) {
      super.onBackPressed();
    }
  }
}

Fixed version (ground truth):
@Override public void onBackPressed(){
  Fragment fg=getFragmentManager().findFragmentByTag("String_Node_Str");
  if (fg != null && ((SelectFragment)fg).onBackPressed()) {
    return;
  }
  super.onBackPressed();
}
Program: 141628
Project: 141628
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  Log.i(TAG,"String_Node_Str");
  prefs=PreferenceManager.getDefaultSharedPreferences(this);
  audioManager=(AudioManager)getSystemService(Context.AUDIO_SERVICE);
  remoteControl=new RemoteControl(this,audioManager);
  hasAudioFocus=requestAudioFocus();
  if (!hasAudioFocus) {
    Log.e(TAG,"String_Node_Str");
  }
  receiverHelper=new ReceiverHelper(this);
  receiverHelper.registerReceivers();
  int bufferMs=prefs.getInt(Preferences.BUFFER_MS,DEFAULT_BUFFER_MS);
  if (bufferMs < MIN_BUFFER_MS) {
    bufferMs=MIN_BUFFER_MS;
  }
 else   if (bufferMs > MAX_BUFFER_MS) {
    bufferMs=MAX_BUFFER_MS;
  }
  sampleRate=Integer.parseInt(prefs.getString(Preferences.SAMPLING_RATE,"String_Node_Str"));
  if (Xmp.init(sampleRate,bufferMs)) {
    audioInitialized=true;
  }
  isAlive=false;
  isLoaded=false;
  paused=false;
  allSequences=prefs.getBoolean(Preferences.ALL_SEQUENCES,false);
  session=new MediaSessionWrapper(this,getPackageName());
  session.setActive(true);
  if (Build.VERSION.SDK_INT >= 21) {
    notifier=new LollipopNotifier(this,session.getSessionToken());
  }
 else {
    notifier=new LegacyNotifier(this);
  }
  watchdog=new Watchdog(10);
  watchdog.setOnTimeoutListener(new Watchdog.OnTimeoutListener(){
    public void onTimeout(){
      Log.e(TAG,"String_Node_Str");
      audioManager.abandonAudioFocus(PlayerService.this);
      stopSelf();
    }
  }
);
  watchdog.start();
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  Log.i(TAG,"String_Node_Str");
  prefs=PreferenceManager.getDefaultSharedPreferences(this);
  audioManager=(AudioManager)getSystemService(Context.AUDIO_SERVICE);
  remoteControl=new RemoteControl(this,audioManager);
  hasAudioFocus=requestAudioFocus();
  if (!hasAudioFocus) {
    Log.e(TAG,"String_Node_Str");
  }
  receiverHelper=new ReceiverHelper(this);
  receiverHelper.registerReceivers();
  int bufferMs=prefs.getInt(Preferences.BUFFER_MS,DEFAULT_BUFFER_MS);
  if (bufferMs < MIN_BUFFER_MS) {
    bufferMs=MIN_BUFFER_MS;
  }
 else   if (bufferMs > MAX_BUFFER_MS) {
    bufferMs=MAX_BUFFER_MS;
  }
  sampleRate=Integer.parseInt(prefs.getString(Preferences.SAMPLING_RATE,"String_Node_Str"));
  if (Xmp.init(sampleRate,bufferMs)) {
    audioInitialized=true;
  }
  isAlive=false;
  isLoaded=false;
  paused=false;
  allSequences=prefs.getBoolean(Preferences.ALL_SEQUENCES,false);
  if (Build.VERSION.SDK_INT >= 21) {
    notifier=new LollipopNotifier(this);
  }
 else {
    notifier=new LegacyNotifier(this);
  }
  watchdog=new Watchdog(10);
  watchdog.setOnTimeoutListener(new Watchdog.OnTimeoutListener(){
    public void onTimeout(){
      Log.e(TAG,"String_Node_Str");
      audioManager.abandonAudioFocus(PlayerService.this);
      stopSelf();
    }
  }
);
  watchdog.start();
}
Program: 141629
Project: 141629
Buggy source:
@Override public void onDestroy(){
  receiverHelper.unregisterReceivers();
  watchdog.stop();
  notifier.cancel();
  session.setActive(false);
  if (audioInitialized) {
    end(hasAudioFocus ? RESULT_OK : RESULT_NO_AUDIO_FOCUS);
  }
 else {
    end(RESULT_CANT_OPEN_AUDIO);
  }
  super.onDestroy();
}

Fixed version (ground truth):
@Override public void onDestroy(){
  receiverHelper.unregisterReceivers();
  watchdog.stop();
  notifier.cancel();
  if (audioInitialized) {
    end(hasAudioFocus ? RESULT_OK : RESULT_NO_AUDIO_FOCUS);
  }
 else {
    end(RESULT_CANT_OPEN_AUDIO);
  }
  super.onDestroy();
}
Program: 141630
Project: 141630
Buggy source:
public LollipopNotifier(final Service service,final MediaSession.Token token){
  super(service);
  this.token=token;
}

Fixed version (ground truth):
public LollipopNotifier(final Service service){
  super(service);
}
Program: 141631
Project: 141631
Buggy source:
@TargetApi(21) public void notify(String title,String info,final int index,final int type){
  if (title != null && title.trim().isEmpty()) {
    title="String_Node_Str";
  }
  final String indexText=formatIndex(index);
  if (type == TYPE_PAUSE) {
    info="String_Node_Str";
  }
  final Notification.Builder builder=new Notification.Builder(service).setContentTitle(title).setContentText(info).setContentInfo(indexText).setContentIntent(contentIntent).setSmallIcon(R.drawable.notification_icon).setLargeIcon(icon).setOngoing(true).setWhen(0).setStyle(new Notification.MediaStyle().setMediaSession(token).setShowActionsInCompactView(2)).setVisibility(Notification.VISIBILITY_PUBLIC).addAction(R.drawable.ic_action_previous,"String_Node_Str",prevIntent).addAction(R.drawable.ic_action_stop,"String_Node_Str",stopIntent);
  if (type == TYPE_PAUSE) {
    builder.addAction(R.drawable.ic_action_play,"String_Node_Str",pauseIntent);
    builder.setContentText("String_Node_Str");
  }
 else {
    builder.addAction(R.drawable.ic_action_pause,"String_Node_Str",pauseIntent);
  }
  builder.addAction(R.drawable.ic_action_next,"String_Node_Str",nextIntent);
  if (type == TYPE_TICKER) {
    if (queue.size() > 1) {
      builder.setTicker(title + "String_Node_Str" + indexText+ "String_Node_Str");
    }
 else {
      builder.setTicker(title);
    }
  }
  service.startForeground(NOTIFY_ID,builder.build());
}

Fixed version (ground truth):
@TargetApi(21) public void notify(String title,String info,final int index,final int type){
  if (title != null && title.trim().isEmpty()) {
    title="String_Node_Str";
  }
  final String indexText=formatIndex(index);
  if (type == TYPE_PAUSE) {
    info="String_Node_Str";
  }
  final Notification.Builder builder=new Notification.Builder(service).setContentTitle(title).setContentText(info).setContentInfo(indexText).setContentIntent(contentIntent).setSmallIcon(R.drawable.notification_icon).setLargeIcon(icon).setOngoing(true).setWhen(0).setStyle(new Notification.MediaStyle().setShowActionsInCompactView(2)).setVisibility(Notification.VISIBILITY_PUBLIC).addAction(R.drawable.ic_action_previous,"String_Node_Str",prevIntent).addAction(R.drawable.ic_action_stop,"String_Node_Str",stopIntent);
  if (type == TYPE_PAUSE) {
    builder.addAction(R.drawable.ic_action_play,"String_Node_Str",pauseIntent);
    builder.setContentText("String_Node_Str");
  }
 else {
    builder.addAction(R.drawable.ic_action_pause,"String_Node_Str",pauseIntent);
  }
  builder.addAction(R.drawable.ic_action_next,"String_Node_Str",nextIntent);
  if (type == TYPE_TICKER) {
    if (queue.size() > 1) {
      builder.setTicker(title + "String_Node_Str" + indexText+ "String_Node_Str");
    }
 else {
      builder.setTicker(title);
    }
  }
  service.startForeground(NOTIFY_ID,builder.build());
}
Program: 141632
Project: 141632
Buggy source:
public List<String> getFilenameList(final int location){
  final List<PlaylistItem> subItems=items.subList(location,items.size() - 1);
  final List<String> list=new ArrayList<String>();
  for (  final PlaylistItem item : subItems) {
    list.add(item.filename);
  }
  return list;
}

Fixed version (ground truth):
public List<String> getFilenameList(final int location){
  final List<PlaylistItem> subItems=items.subList(location,items.size());
  final List<String> list=new ArrayList<String>();
  for (  final PlaylistItem item : subItems) {
    list.add(item.filename);
  }
  return list;
}
Program: 141633
Project: 141633
Buggy source:
@Override public void onDestroy(){
  if (deleteDialog != null) {
    deleteDialog.cancel();
  }
  if (modPlayer != null) {
    try {
      modPlayer.unregisterCallback(playerCallback);
    }
 catch (    RemoteException e) {
      Log.e(TAG,"String_Node_Str");
    }
  }
  unregisterReceiver(screenReceiver);
  Log.i(TAG,"String_Node_Str");
  unbindService(connection);
  super.onDestroy();
}

Fixed version (ground truth):
@Override public void onDestroy(){
  if (deleteDialog != null) {
    deleteDialog.cancel();
  }
  if (modPlayer != null) {
    try {
      modPlayer.unregisterCallback(playerCallback);
    }
 catch (    RemoteException e) {
      Log.e(TAG,"String_Node_Str");
    }
  }
  unregisterReceiver(screenReceiver);
  try {
    unbindService(connection);
    Log.i(TAG,"String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    Log.i(TAG,"String_Node_Str");
  }
  super.onDestroy();
}
Program: 141634
Project: 141634
Buggy source:
@Override protected void onNewIntent(final Intent intent){
  boolean reconnect=false;
  Log.i(TAG,"String_Node_Str");
  String path=null;
  if (intent.getData() != null) {
    path=intent.getData().getPath();
  }
  fileArray=null;
  if (path != null) {
    fileArray=new String[1];
    fileArray[0]=path;
    shuffleMode=false;
    loopListMode=false;
    start=0;
  }
 else {
    final Bundle extras=intent.getExtras();
    if (extras != null) {
      fileArray=extras.getStringArray("String_Node_Str");
      shuffleMode=extras.getBoolean("String_Node_Str");
      loopListMode=extras.getBoolean("String_Node_Str");
      start=extras.getInt("String_Node_Str");
    }
 else {
      reconnect=true;
    }
  }
  final Intent service=new Intent(this,PlayerService.class);
  if (!reconnect) {
    Log.i(TAG,"String_Node_Str");
    startService(service);
  }
  if (!bindService(service,connection,0)) {
    Log.e(TAG,"String_Node_Str");
    finish();
  }
}

Fixed version (ground truth):
@Override protected void onNewIntent(final Intent intent){
  boolean reconnect=false;
  boolean fromHistory=false;
  Log.i(TAG,"String_Node_Str");
  if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
    Log.i(TAG,"String_Node_Str");
    fromHistory=true;
  }
  String path=null;
  if (intent.getData() != null) {
    path=intent.getData().getPath();
  }
  fileArray=null;
  if (path != null) {
    Log.i(TAG,"String_Node_Str");
    fileArray=new String[1];
    fileArray[0]=path;
    shuffleMode=false;
    loopListMode=false;
    start=0;
  }
 else   if (fromHistory) {
    Log.i(TAG,"String_Node_Str");
    final Intent browserIntent=new Intent(this,PlaylistMenu.class);
    browserIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    startActivity(browserIntent);
    finish();
    return;
  }
 else {
    final Bundle extras=intent.getExtras();
    if (extras != null) {
      fileArray=extras.getStringArray("String_Node_Str");
      shuffleMode=extras.getBoolean("String_Node_Str");
      loopListMode=extras.getBoolean("String_Node_Str");
      start=extras.getInt("String_Node_Str");
    }
 else {
      reconnect=true;
    }
  }
  final Intent service=new Intent(this,PlayerService.class);
  if (!reconnect) {
    Log.i(TAG,"String_Node_Str");
    startService(service);
  }
  if (!bindService(service,connection,0)) {
    Log.e(TAG,"String_Node_Str");
    finish();
    return;
  }
}
Program: 141636
Project: 141636
Buggy source:
public void onTimeout(){
  Log.e(TAG,"String_Node_Str");
  stopSelf();
}

Fixed version (ground truth):
public void onTimeout(){
  Log.e(TAG,"String_Node_Str");
  stopSelf();
  return;
}
Program: 141637
Project: 141637
Buggy source:
protected void end(){
  Log.i(TAG,"String_Node_Str");
  final int numClients=callbacks.beginBroadcast();
  for (int i=0; i < numClients; i++) {
    try {
      callbacks.getBroadcastItem(i).endPlayCallback();
    }
 catch (    RemoteException e) {
      Log.e(TAG,"String_Node_Str");
    }
  }
  callbacks.finishBroadcast();
  isAlive=false;
  Xmp.stopModule();
  paused=false;
  if (playThread != null && playThread.isAlive()) {
    try {
      playThread.join();
    }
 catch (    InterruptedException e) {
    }
  }
  Xmp.deinit();
  audio.release();
}

Fixed version (ground truth):
private void end(){
  Log.i(TAG,"String_Node_Str");
  final int numClients=callbacks.beginBroadcast();
  for (int i=0; i < numClients; i++) {
    try {
      callbacks.getBroadcastItem(i).endPlayCallback();
    }
 catch (    RemoteException e) {
      Log.e(TAG,"String_Node_Str");
    }
  }
  callbacks.finishBroadcast();
  isAlive=false;
  Xmp.stopModule();
  paused=false;
  Xmp.deinit();
  audio.release();
}
Program: 141641
Project: 141641
Buggy source:
static public Uid getBodyUID(String strBody){
  if (strBody.contains("String_Node_Str")) {
    String[] result=strBody.split("String_Node_Str");
    for (int i=0; i < result.length; i++) {
      if (result[i].contains("String_Node_Str"))       return new Uid(result[i + 1].trim());
    }
  }
  return null;
}

Fixed version (ground truth):
static public String getBodyUID(String strBody){
  if (strBody.contains("String_Node_Str")) {
    String[] result=strBody.split("String_Node_Str");
    for (int i=0; i < result.length; i++) {
      if (result[i].contains("String_Node_Str"))       return result[i + 1].trim();
    }
  }
  return null;
}
Program: 141642
Project: 141642
Buggy source:
protected String getNewOutlookItem(){
  Dispatch dipItem=Dispatch.call(ManageOutlook.dipOutlook,"String_Node_Str",new Variant(2)).toDispatch();
  String strNewItemEntryID=Dispatch.get(dipItem,"String_Node_Str").toString().trim();
  dipItem.safeRelease();
  return strNewItemEntryID;
}

Fixed version (ground truth):
protected String getNewOutlookItem(){
  Dispatch dipItem=Dispatch.call(ManageOutlook.dipOutlook,"String_Node_Str",new Variant(2)).toDispatch();
  Dispatch.call(dipItem,"String_Node_Str");
  String strNewItemEntryID=Dispatch.get(dipItem,"String_Node_Str").toString().trim();
  dipItem.safeRelease();
  return strNewItemEntryID;
}
Program: 141643
Project: 141643
Buggy source:
public void removeEntry(Entry entry){
  mEntries.remove(entry.getKey());
}

Fixed version (ground truth):
public void removeEntry(Entry entry){
  mEntries.remove(entry);
}
Program: 141646
Project: 141646
Buggy source:
@Override protected RepositoryNode getCurrentRepositoryNode(){
  return jobNode;
}

Fixed version (ground truth):
@Override public RepositoryNode getCurrentRepositoryNode(){
  return jobNode;
}
Program: 141647
Project: 141647
Buggy source:
@SuppressWarnings("String_Node_Str") private boolean updateBuildTypeForCTalendJob(NodeType currentNode){
  String processID=EmfModelUtils.findElementParameterByName("String_Node_Str",currentNode) == null ? null : EmfModelUtils.findElementParameterByName("String_Node_Str",currentNode).getValue();
  String processVersion=EmfModelUtils.findElementParameterByName("String_Node_Str",currentNode) == null ? null : EmfModelUtils.findElementParameterByName("String_Node_Str",currentNode).getValue();
  if (processID != null && processVersion != null) {
    ProcessItem item=ItemCacheManager.getProcessItem(processID,processVersion);
    if (item != null) {
      item.getProperty().getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE,"String_Node_Str");
      try {
        ProxyRepositoryFactory.getInstance().save(item);
      }
 catch (      PersistenceException e) {
        ExceptionHandler.process(e);
        return false;
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private boolean updateBuildTypeForCTalendJob(NodeType currentNode){
  String processID=EmfModelUtils.findElementParameterByName("String_Node_Str",currentNode) == null ? null : EmfModelUtils.findElementParameterByName("String_Node_Str",currentNode).getValue();
  String processVersion=EmfModelUtils.findElementParameterByName("String_Node_Str",currentNode) == null ? null : EmfModelUtils.findElementParameterByName("String_Node_Str",currentNode).getValue();
  if (processID != null && processVersion != null) {
    ProcessItem item=ItemCacheManager.getProcessItem(processID,processVersion);
    Project itemProject=ProjectManager.getInstance().getCurrentProject();
    if (item == null) {
      for (      Project refProject : ProjectManager.getInstance().getAllReferencedProjects()) {
        item=ItemCacheManager.getRefProcessItem(getProject(),processID);
        if (item != null) {
          itemProject=refProject;
          break;
        }
      }
    }
    if (item != null) {
      item.getProperty().getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE,"String_Node_Str");
      try {
        ProxyRepositoryFactory.getInstance().save(itemProject,item,true);
      }
 catch (      PersistenceException e) {
        ExceptionHandler.process(e);
        return false;
      }
      return true;
    }
  }
  return false;
}