nus-yam/ex-repair huggingface dataset:
Program: 96555
Project: 96555
Buggy source:
private void checkTypeProperty(String world){
  String worldString=world;
  if (!world.equalsIgnoreCase("String_Node_Str")) {
    world=MULTI_WORLD_KEY + "String_Node_Str" + world+ "String_Node_Str";
  }
  if (configWP.getProperty(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY) == null) {
    configWP.setProperty(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE);
    configWP.save();
    if (worldString.equalsIgnoreCase("String_Node_Str")) {
      this.adoptPrice=DEFAULT_ADOPT_PRICE;
    }
 else {
      this.adoptPriceWorlds.put(worldString,DEFAULT_ADOPT_PRICE);
    }
  }
 else   if (!WPBlockListener.checkItem(configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE) + "String_Node_Str")) {
    configWP.setProperty(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE);
    configWP.save();
    if (worldString.equalsIgnoreCase("String_Node_Str")) {
      this.adoptType=DEFAULT_ADOPT_TYPE;
    }
 else {
      this.adoptTypeWorlds.put(worldString,DEFAULT_ADOPT_TYPE);
    }
  }
}

Fixed version (ground truth):
private void checkTypeProperty(String world){
  String worldString=world;
  if (!world.equalsIgnoreCase("String_Node_Str")) {
    world=MULTI_WORLD_KEY + "String_Node_Str" + world+ "String_Node_Str";
  }
  if (configWP.getProperty(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY) == null) {
    configWP.setProperty(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE);
    configWP.save();
    if (worldString.equalsIgnoreCase("String_Node_Str")) {
      this.adoptType=DEFAULT_ADOPT_TYPE;
    }
 else {
      this.adoptTypeWorlds.put(worldString,DEFAULT_ADOPT_TYPE);
    }
  }
 else   if (!WPBlockListener.checkItem(configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE) + "String_Node_Str")) {
    configWP.setProperty(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE);
    configWP.save();
    if (worldString.equalsIgnoreCase("String_Node_Str")) {
      this.adoptType=DEFAULT_ADOPT_TYPE;
    }
 else {
      this.adoptTypeWorlds.put(worldString,DEFAULT_ADOPT_TYPE);
    }
  }
}
Program: 96556
Project: 96556
Buggy source:
private void sendWolfPrice(Player p,String world){
  if (hasPermission(p,PERM_ADOPT)) {
    if (world.equalsIgnoreCase("String_Node_Str")) {
      String everywhere="String_Node_Str";
      log.info(this.adoptPriceWorlds.keySet().toString());
      for (      String s : this.adoptPriceWorlds.keySet()) {
        getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(s),this.adoptTypeWorlds.get(s),"String_Node_Str" + ChatColor.AQUA + s+ ChatColor.WHITE+ "String_Node_Str");
        everywhere="String_Node_Str";
      }
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,ChatColor.AQUA + everywhere + ChatColor.WHITE+ "String_Node_Str");
    }
 else     if (adoptPriceWorlds.containsKey(world) && adoptTypeWorlds.containsKey(world)) {
      getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(world),this.adoptTypeWorlds.get(world),"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
 else {
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void sendWolfPrice(Player p,String world){
  if (hasPermission(p,PERM_ADOPT)) {
    if (world.equalsIgnoreCase("String_Node_Str")) {
      String everywhere="String_Node_Str";
      log.info(this.adoptPriceWorlds.keySet().toString());
      log.info("String_Node_Str" + this.adoptPriceWorlds.size());
      log.info("String_Node_Str" + this.adoptTypeWorlds.size());
      log.info("String_Node_Str" + this.adoptLimitWorlds.size());
      log.info("String_Node_Str" + this.adoptAgroWorlds.size());
      log.info(this.adoptPriceWorlds.keySet().toString());
      log.info(this.adoptPriceWorlds.keySet().toString());
      for (      String s : this.adoptPriceWorlds.keySet()) {
        getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(s),this.adoptTypeWorlds.get(s),"String_Node_Str" + ChatColor.AQUA + s+ ChatColor.WHITE+ "String_Node_Str");
        everywhere="String_Node_Str";
      }
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,ChatColor.AQUA + everywhere + ChatColor.WHITE+ "String_Node_Str");
    }
 else     if (adoptPriceWorlds.containsKey(world) && adoptTypeWorlds.containsKey(world)) {
      getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(world),this.adoptTypeWorlds.get(world),"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
 else {
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
  }
}
Program: 96557
Project: 96557
Buggy source:
public void spawnWolf(Player p,String aggro){
  p.sendMessage("String_Node_Str");
  Wolf w=(Wolf)p.getWorld().spawnCreature(p.getLocation(),CreatureType.WOLF);
  if (aggro != null && aggro.equals(ADOPT_FRIEND)) {
    EntityWolf newMcwolf=((CraftWolf)w).getHandle();
    newMcwolf.a(p.getName());
    newMcwolf.d(true);
    newMcwolf.b(false);
  }
 else   if (aggro != null && aggro.equals(ADOPT_ANGRY)) {
    w.setAngry(true);
  }
}

Fixed version (ground truth):
public void spawnWolf(Player p,String aggro){
  Wolf w=(Wolf)p.getWorld().spawnCreature(p.getLocation(),CreatureType.WOLF);
  if (aggro != null && aggro.equals(ADOPT_FRIEND)) {
    EntityWolf newMcwolf=((CraftWolf)w).getHandle();
    newMcwolf.a(p.getName());
    newMcwolf.d(true);
    newMcwolf.b(false);
    p.sendMessage(chatPrefix + "String_Node_Str");
  }
 else   if (aggro != null && aggro.equals(ADOPT_ANGRY)) {
    w.setAngry(true);
    p.sendMessage(chatPrefixError + "String_Node_Str");
  }
 else {
    p.sendMessage(chatPrefix + "String_Node_Str");
  }
}
Program: 96558
Project: 96558
Buggy source:
private void loadConfiguration(){
  configWP=new Configuration(new File(this.getDataFolder(),WOLF_POUND_CONFIG));
  configWP.load();
  checkPriceProperty("String_Node_Str");
  checkAggroProperty("String_Node_Str");
  checkTypeProperty("String_Node_Str");
  checkLimitProperty("String_Node_Str");
  Map<String,ConfigurationNode> nodes=configWP.getNodes(ADOPT_KEY + "String_Node_Str" + MULTI_WORLD_KEY);
  if (nodes != null && nodes.size() > 0) {
    for (    String s : nodes.keySet()) {
      checkPriceProperty(s);
      checkTypeProperty(s);
      checkLimitProperty(s);
      checkAggroProperty(s);
      String world=MULTI_WORLD_KEY + "String_Node_Str" + s+ "String_Node_Str";
      this.adoptAggro=configWP.getString(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_AGGRO);
      this.adoptPriceWorlds.put(s,configWP.getDouble(ADOPT_KEY + "String_Node_Str" + world+ PRICE_KEY,DEFAULT_ADOPT_PRICE));
      this.adoptTypeWorlds.put(s,configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE));
      this.adoptLimitWorlds.put(s,configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ LIMIT_KEY,DEFAULT_ADOPT_LIMIT));
    }
  }
  this.adoptAggro=configWP.getString(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_AGGRO);
  this.adoptPrice=configWP.getDouble(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_PRICE);
  this.adoptType=configWP.getInt(ADOPT_KEY + "String_Node_Str" + TYPE_KEY,DEFAULT_ADOPT_TYPE);
  this.adoptLimit=configWP.getInt(ADOPT_KEY + "String_Node_Str" + LIMIT_KEY,DEFAULT_ADOPT_LIMIT);
}

Fixed version (ground truth):
private void loadConfiguration(){
  configWP=new Configuration(new File(this.getDataFolder(),WOLF_POUND_CONFIG));
  configWP.load();
  checkPriceProperty("String_Node_Str");
  checkAggroProperty("String_Node_Str");
  checkTypeProperty("String_Node_Str");
  checkLimitProperty("String_Node_Str");
  Map<String,ConfigurationNode> nodes=configWP.getNodes(ADOPT_KEY + "String_Node_Str" + MULTI_WORLD_KEY);
  if (nodes != null && nodes.size() > 0) {
    for (    String s : nodes.keySet()) {
      checkPriceProperty(s);
      checkTypeProperty(s);
      checkLimitProperty(s);
      checkAggroProperty(s);
      String world=MULTI_WORLD_KEY + "String_Node_Str" + s+ "String_Node_Str";
      this.adoptAggro=configWP.getString(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_AGGRO);
      this.adoptPriceWorlds.put(s,configWP.getDouble(ADOPT_KEY + "String_Node_Str" + world+ PRICE_KEY,DEFAULT_ADOPT_PRICE));
      this.adoptTypeWorlds.put(s,configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE));
      this.adoptLimitWorlds.put(s,configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ LIMIT_KEY,DEFAULT_ADOPT_LIMIT));
    }
  }
  this.adoptAggro=configWP.getString(ADOPT_KEY + "String_Node_Str" + AGGRO_KEY,DEFAULT_ADOPT_AGGRO);
  this.adoptPrice=configWP.getDouble(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_PRICE);
  this.adoptType=configWP.getInt(ADOPT_KEY + "String_Node_Str" + TYPE_KEY,DEFAULT_ADOPT_TYPE);
  this.adoptLimit=configWP.getInt(ADOPT_KEY + "String_Node_Str" + LIMIT_KEY,DEFAULT_ADOPT_LIMIT);
}
Program: 96559
Project: 96559
Buggy source:
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (event.hasBlock() && event.getClickedBlock().getState() instanceof Sign && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
    if (plugin.blockIsValidWolfSign(event.getClickedBlock()) && plugin.hasPermission(p,WolfPound.PERM_USE)) {
      if (checkSignParams(event.getClickedBlock(),1,p)) {
        double price=getPrice(event.getClickedBlock(),1,p);
        int item=getType(event.getClickedBlock(),1,p);
        String agro=getAgro(event.getClickedBlock(),2,p);
        if (plugin.bank.isUsingEcon(item) && plugin.bank.hasMoney(p,price,item)) {
          plugin.bank.payForWolf(p,price,item);
          if (price > 0) {
            plugin.bank.showRecipt(p,price,item);
          }
          plugin.spawnWolf(p,agro);
        }
 else         if (!plugin.bank.isUsingEcon(item)) {
          plugin.spawnWolf(p,agro);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (event.hasBlock() && event.getClickedBlock().getState() instanceof Sign && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
    if (plugin.blockIsValidWolfSign(event.getClickedBlock()) && plugin.hasPermission(p,WolfPound.PERM_USE)) {
      if (checkSignParams(event.getClickedBlock(),1,p)) {
        double price=getPrice(event.getClickedBlock(),1,p);
        int item=getType(event.getClickedBlock(),1,p);
        String aggro=getAggro(event.getClickedBlock(),2,p);
        if (plugin.bank.isUsingEcon(item) && plugin.bank.hasMoney(p,price,item)) {
          plugin.bank.payForWolf(p,price,item);
          if (price > 0) {
            plugin.bank.showRecipt(p,price,item);
          }
          plugin.spawnWolf(p,aggro);
        }
 else         if (!plugin.bank.isUsingEcon(item)) {
          plugin.spawnWolf(p,aggro);
        }
      }
    }
  }
}
Program: 96560
Project: 96560
Buggy source:
/** 
 * Allows the user to adopt a wolf
 * @param p The player
 * @param wolves How many wolves
 */
private void adoptWolf(Player p,int wolves){
  String world=p.getWorld().getName();
  double price=this.adoptPrice;
  int type=this.adoptType;
  int limit=this.adoptLimit;
  String agro=this.adoptAgro;
  if (this.adoptPriceWorlds.containsKey(world)) {
    price=this.adoptPriceWorlds.get(world);
    limit=this.adoptLimitWorlds.get(world);
    type=this.adoptTypeWorlds.get(world);
    agro=this.adoptAgroWorlds.get(world);
  }
  if (limit >= 0) {
    wolves=(wolves > limit) ? limit : wolves;
  }
  if (hasPermission(p,PERM_ADOPT) && bank.hasMoney(p,price * wolves,type)) {
    bank.payForWolf(p,price * wolves,type);
    if (price > 0) {
      bank.showRecipt(p,price * wolves,type);
    }
    for (int i=0; i < wolves; i++) {
      spawnWolf(p,agro);
    }
  }
}

Fixed version (ground truth):
/** 
 * Allows the user to adopt a wolf
 * @param p The player
 * @param wolves How many wolves
 */
private void adoptWolf(Player p,int wolves){
  String world=p.getWorld().getName();
  double price=this.adoptPrice;
  int type=this.adoptType;
  int limit=this.adoptLimit;
  String aggro=this.adoptAggro;
  if (this.adoptPriceWorlds.containsKey(world)) {
    price=this.adoptPriceWorlds.get(world);
    limit=this.adoptLimitWorlds.get(world);
    type=this.adoptTypeWorlds.get(world);
    aggro=this.adoptAggroWorlds.get(world);
  }
  if (limit >= 0) {
    wolves=(wolves > limit) ? limit : wolves;
  }
  if (hasPermission(p,PERM_ADOPT) && bank.hasMoney(p,price * wolves,type)) {
    bank.payForWolf(p,price * wolves,type);
    if (price > 0) {
      bank.showRecipt(p,price * wolves,type);
    }
    for (int i=0; i < wolves; i++) {
      spawnWolf(p,aggro);
    }
  }
}
Program: 96562
Project: 96562
Buggy source:
public void spawnWolf(Player p,String agro){
  p.sendMessage("String_Node_Str");
  Wolf w=(Wolf)p.getWorld().spawnCreature(p.getLocation(),CreatureType.WOLF);
  if (agro != null && agro.equals(ADOPT_FRIEND)) {
    EntityWolf newMcwolf=((CraftWolf)w).getHandle();
    newMcwolf.a(p.getName());
    newMcwolf.d(true);
    newMcwolf.b(false);
  }
 else   if (agro != null && agro.equals(ADOPT_ANGRY)) {
    w.setAngry(true);
  }
}

Fixed version (ground truth):
public void spawnWolf(Player p,String aggro){
  p.sendMessage("String_Node_Str");
  Wolf w=(Wolf)p.getWorld().spawnCreature(p.getLocation(),CreatureType.WOLF);
  if (aggro != null && aggro.equals(ADOPT_FRIEND)) {
    EntityWolf newMcwolf=((CraftWolf)w).getHandle();
    newMcwolf.a(p.getName());
    newMcwolf.d(true);
    newMcwolf.b(false);
  }
 else   if (aggro != null && aggro.equals(ADOPT_ANGRY)) {
    w.setAngry(true);
  }
}
Program: 96563
Project: 96563
Buggy source:
private void loadConfiguration(){
  configWP=new Configuration(new File(this.getDataFolder(),WOLF_POUND_CONFIG));
  configWP.load();
  checkPriceProperty("String_Node_Str");
  checkAgroProperty("String_Node_Str");
  checkTypeProperty("String_Node_Str");
  checkLimitProperty("String_Node_Str");
  Map<String,ConfigurationNode> nodes=configWP.getNodes(ADOPT_KEY + "String_Node_Str" + MULTI_WORLD_KEY);
  if (nodes != null && nodes.size() > 0) {
    for (    String s : nodes.keySet()) {
      checkPriceProperty(s);
      checkTypeProperty(s);
      checkLimitProperty(s);
      checkAgroProperty(s);
      String world=MULTI_WORLD_KEY + "String_Node_Str" + s+ "String_Node_Str";
      this.adoptAgro=configWP.getString(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_AGRO);
      this.adoptPriceWorlds.put(s,configWP.getDouble(ADOPT_KEY + "String_Node_Str" + world+ PRICE_KEY,DEFAULT_ADOPT_PRICE));
      this.adoptTypeWorlds.put(s,configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE));
      this.adoptLimitWorlds.put(s,configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ LIMIT_KEY,DEFAULT_ADOPT_LIMIT));
    }
  }
  this.adoptAgro=configWP.getString(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_AGRO);
  this.adoptPrice=configWP.getDouble(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_PRICE);
  this.adoptType=configWP.getInt(ADOPT_KEY + "String_Node_Str" + TYPE_KEY,DEFAULT_ADOPT_TYPE);
  this.adoptLimit=configWP.getInt(ADOPT_KEY + "String_Node_Str" + LIMIT_KEY,DEFAULT_ADOPT_LIMIT);
}

Fixed version (ground truth):
private void loadConfiguration(){
  configWP=new Configuration(new File(this.getDataFolder(),WOLF_POUND_CONFIG));
  configWP.load();
  checkPriceProperty("String_Node_Str");
  checkAggroProperty("String_Node_Str");
  checkTypeProperty("String_Node_Str");
  checkLimitProperty("String_Node_Str");
  Map<String,ConfigurationNode> nodes=configWP.getNodes(ADOPT_KEY + "String_Node_Str" + MULTI_WORLD_KEY);
  if (nodes != null && nodes.size() > 0) {
    for (    String s : nodes.keySet()) {
      checkPriceProperty(s);
      checkTypeProperty(s);
      checkLimitProperty(s);
      checkAggroProperty(s);
      String world=MULTI_WORLD_KEY + "String_Node_Str" + s+ "String_Node_Str";
      this.adoptAggro=configWP.getString(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_AGGRO);
      this.adoptPriceWorlds.put(s,configWP.getDouble(ADOPT_KEY + "String_Node_Str" + world+ PRICE_KEY,DEFAULT_ADOPT_PRICE));
      this.adoptTypeWorlds.put(s,configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ TYPE_KEY,DEFAULT_ADOPT_TYPE));
      this.adoptLimitWorlds.put(s,configWP.getInt(ADOPT_KEY + "String_Node_Str" + world+ LIMIT_KEY,DEFAULT_ADOPT_LIMIT));
    }
  }
  this.adoptAggro=configWP.getString(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_AGGRO);
  this.adoptPrice=configWP.getDouble(ADOPT_KEY + "String_Node_Str" + PRICE_KEY,DEFAULT_ADOPT_PRICE);
  this.adoptType=configWP.getInt(ADOPT_KEY + "String_Node_Str" + TYPE_KEY,DEFAULT_ADOPT_TYPE);
  this.adoptLimit=configWP.getInt(ADOPT_KEY + "String_Node_Str" + LIMIT_KEY,DEFAULT_ADOPT_LIMIT);
}
Program: 96564
Project: 96564
Buggy source:
private void sendWolfPrice(Player p,String world){
  if (hasPermission(p,PERM_ADOPT)) {
    if (world.equalsIgnoreCase("String_Node_Str")) {
      String everywhere="String_Node_Str";
      log.info(this.adoptPriceWorlds.keySet().toString());
      log.info("String_Node_Str" + this.adoptPriceWorlds.size());
      log.info("String_Node_Str" + this.adoptTypeWorlds.size());
      log.info("String_Node_Str" + this.adoptLimitWorlds.size());
      log.info("String_Node_Str" + this.adoptAgroWorlds.size());
      log.info(this.adoptPriceWorlds.keySet().toString());
      log.info(this.adoptPriceWorlds.keySet().toString());
      for (      String s : this.adoptPriceWorlds.keySet()) {
        getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(s),this.adoptTypeWorlds.get(s),"String_Node_Str" + ChatColor.AQUA + s+ ChatColor.WHITE+ "String_Node_Str");
        everywhere="String_Node_Str";
      }
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,ChatColor.AQUA + everywhere + ChatColor.WHITE+ "String_Node_Str");
    }
 else     if (adoptPriceWorlds.containsKey(world) && adoptTypeWorlds.containsKey(world)) {
      getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(world),this.adoptTypeWorlds.get(world),"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
 else {
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void sendWolfPrice(Player p,String world){
  if (hasPermission(p,PERM_ADOPT)) {
    if (world.equalsIgnoreCase("String_Node_Str")) {
      String everywhere="String_Node_Str";
      for (      String s : this.adoptPriceWorlds.keySet()) {
        getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(s),this.adoptTypeWorlds.get(s),"String_Node_Str" + ChatColor.AQUA + s+ ChatColor.WHITE+ "String_Node_Str");
        everywhere="String_Node_Str";
      }
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,ChatColor.AQUA + everywhere + ChatColor.WHITE+ "String_Node_Str");
    }
 else     if (adoptPriceWorlds.containsKey(world) && adoptTypeWorlds.containsKey(world)) {
      getHumanReadablePriceMessage(p,this.adoptPriceWorlds.get(world),this.adoptTypeWorlds.get(world),"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
 else {
      getHumanReadablePriceMessage(p,this.adoptPrice,this.adoptType,"String_Node_Str" + ChatColor.AQUA + world+ ChatColor.WHITE+ "String_Node_Str");
    }
  }
}
Program: 96565
Project: 96565
Buggy source:
/** 
 * Does the user have the amount of money specified?
 * @param p The Player
 * @param m The amount of money to check if the player has
 * @return true if the player has at least m money, false if not
 */
public boolean hasMoney(Player p,double m,int type){
  boolean playerHasEnough=false;
  if (m == 0 || (isUsing(Bank.None) && type == -1)) {
    playerHasEnough=true;
  }
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    playerHasEnough=(item.getTypeId() == type && item.getAmount() >= m);
  }
 else   if (isUsing(Bank.iConomy)) {
    playerHasEnough=iConomy.getBank().getAccount(p.getName()).hasEnough(m);
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    playerHasEnough=BOSEcon.getPlayerMoney(p.getName()) >= m;
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    playerHasEnough=(user.getMoney() >= m);
  }
  if (!playerHasEnough) {
    userIsTooPoor(p,type);
  }
  return playerHasEnough;
}

Fixed version (ground truth):
/** 
 * Does the user have the amount of money specified?
 * @param p The Player
 * @param m The amount of money to check if the player has
 * @return true if the player has at least m money, false if not
 */
public boolean hasMoney(Player p,double m,int type){
  boolean playerHasEnough=false;
  if (m == 0 || (isUsing(Bank.None) && type == -1)) {
    playerHasEnough=true;
  }
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    playerHasEnough=(item.getTypeId() == type && item.getAmount() >= m);
    plugin.log.info("String_Node_Str");
    plugin.log.info("String_Node_Str" + item.getAmount());
    plugin.log.info("String_Node_Str" + m);
  }
 else   if (isUsing(Bank.iConomy)) {
    playerHasEnough=iConomy.getBank().getAccount(p.getName()).hasEnough(m);
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    playerHasEnough=BOSEcon.getPlayerMoney(p.getName()) >= m;
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    playerHasEnough=(user.getMoney() >= m);
  }
  if (!playerHasEnough) {
    userIsTooPoor(p,type);
  }
  return playerHasEnough;
}
Program: 96566
Project: 96566
Buggy source:
public void showRecipt(Player p,double price,int item){
  String moneyName="String_Node_Str";
  if (item != -1) {
    ItemStack is=new ItemStack(item);
    moneyName=is.getType().toString();
  }
  if (isUsing(Bank.Essentials) || isUsing(Bank.None)) {
    return;
  }
 else   if (isUsing(Bank.iConomy)) {
    moneyName=iConomy.getBank().getCurrency();
  }
 else   if (isUsing(Bank.BOSEconomy)) {
  }
  p.sendMessage(ChatColor.WHITE + "String_Node_Str" + ChatColor.RED+ "String_Node_Str"+ price+ "String_Node_Str"+ moneyName);
}

Fixed version (ground truth):
public void showRecipt(Player p,double price,int item){
  String moneyName="String_Node_Str";
  if (item != -1) {
    ItemStack is=new ItemStack(item);
    moneyName=is.getType().toString();
  }
 else   if (isUsing(Bank.Essentials) || isUsing(Bank.None)) {
    return;
  }
 else   if (isUsing(Bank.iConomy)) {
    moneyName=iConomy.getBank().getCurrency();
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    if (price == 1) {
      moneyName=BOSEcon.getMoneyName();
    }
 else {
      moneyName=BOSEcon.getMoneyNamePlural();
    }
  }
  p.sendMessage(ChatColor.WHITE + "String_Node_Str" + ChatColor.DARK_RED+ "String_Node_Str"+ price+ "String_Node_Str"+ moneyName);
}
Program: 96567
Project: 96567
Buggy source:
public WPBankAdapter(Bank bank,BOSEconomy econ){
  this.bankType=bank;
  BOSEcon=econ;
}

Fixed version (ground truth):
public WPBankAdapter(Bank bank,final WolfPound plugin,BOSEconomy econ){
  this.bankType=bank;
  this.BOSEcon=econ;
  this.plugin=plugin;
}
Program: 96568
Project: 96568
Buggy source:
public boolean payForWolf(Player p,double cost,int type){
  if (cost == 0 || (isUsing(Bank.None) && type == -1))   return true;
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    int finalamount=item.getAmount() - (int)cost;
    p.getItemInHand().setAmount(finalamount);
  }
 else   if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean payForWolf(Player p,double cost,int type){
  if (cost == 0 || (isUsing(Bank.None) && type == -1))   return true;
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    int finalamount=item.getAmount() - (int)cost;
    plugin.log.info("String_Node_Str");
    plugin.log.info("String_Node_Str" + item.getAmount());
    plugin.log.info("String_Node_Str" + finalamount);
    p.getItemInHand().setAmount(0);
  }
 else   if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}
Program: 96569
Project: 96569
Buggy source:
/** 
 * Grab the iConomy plugin from the Plugin Manager.
 */
public boolean setEconPlugin(){
  Plugin testiConomy=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testBOSE=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testEssentials=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  if (testiConomy != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.iConomy);
    return true;
  }
 else   if (testBOSE != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.BOSEconomy,(BOSEconomy)testBOSE);
    return true;
  }
 else   if (testEssentials != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.Essentials);
    return true;
  }
 else {
    bank=new WPBankAdapter(WPBankAdapter.Bank.None);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Grab the iConomy plugin from the Plugin Manager.
 */
public boolean setEconPlugin(){
  Plugin testiConomy=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testBOSE=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testEssentials=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  if (testiConomy != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.iConomy,this);
    return true;
  }
 else   if (testBOSE != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.BOSEconomy,this,(BOSEconomy)testBOSE);
    return true;
  }
 else   if (testEssentials != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.Essentials,this);
    return true;
  }
 else {
    bank=new WPBankAdapter(WPBankAdapter.Bank.None,this);
    return false;
  }
}
Program: 96570
Project: 96570
Buggy source:
/** 
 * Does the user have the amount of money specified?
 * @param p The Player
 * @param m The amount of money to check if the player has
 * @return true if the player has at least m money, false if not
 */
public boolean hasMoney(Player p,double m,int type){
  boolean playerHasEnough=false;
  if (m == 0 || isUsing(Bank.None))   playerHasEnough=true;
  if (type != -1) {
    ItemStack item=p.getItemInHand();
    playerHasEnough=(item.getTypeId() == type && item.getAmount() >= m);
  }
 else   if (isUsing(Bank.iConomy)) {
    playerHasEnough=iConomy.getBank().getAccount(p.getName()).hasEnough(m);
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    playerHasEnough=BOSEcon.getPlayerMoney(p.getName()) >= m;
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    playerHasEnough=(user.getMoney() >= m);
  }
  if (!playerHasEnough) {
    userIsTooPoor(p,type);
  }
  return playerHasEnough;
}

Fixed version (ground truth):
/** 
 * Does the user have the amount of money specified?
 * @param p The Player
 * @param m The amount of money to check if the player has
 * @return true if the player has at least m money, false if not
 */
public boolean hasMoney(Player p,double m,int type){
  boolean playerHasEnough=false;
  if (m == 0 || (isUsing(Bank.None) && type == -1)) {
    playerHasEnough=true;
  }
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    playerHasEnough=(item.getTypeId() == type && item.getAmount() >= m);
  }
 else   if (isUsing(Bank.iConomy)) {
    playerHasEnough=iConomy.getBank().getAccount(p.getName()).hasEnough(m);
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    playerHasEnough=BOSEcon.getPlayerMoney(p.getName()) >= m;
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    playerHasEnough=(user.getMoney() >= m);
  }
  if (!playerHasEnough) {
    userIsTooPoor(p,type);
  }
  return playerHasEnough;
}
Program: 96571
Project: 96571
Buggy source:
public boolean payForWolf(Player p,double cost,int type){
  if (cost == 0 || isUsing(Bank.None))   return true;
  if (type != -1) {
    ItemStack item=p.getItemInHand();
    int finalamount=item.getAmount() - (int)cost;
    p.getItemInHand().setAmount(finalamount);
  }
 else   if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean payForWolf(Player p,double cost,int type){
  if (cost == 0 || (isUsing(Bank.None) && type == -1))   return true;
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    int finalamount=item.getAmount() - (int)cost;
    p.getItemInHand().setAmount(finalamount);
  }
 else   if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}
Program: 96572
Project: 96572
Buggy source:
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (event.hasBlock() && event.getClickedBlock().getState() instanceof Sign && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
    if (plugin.blockIsValidWolfSign(event.getClickedBlock()) && plugin.hasPermission(p,WolfPound.PERM_USE)) {
      double price=0;
      int item=-1;
      if (checkSignParms(event.getClickedBlock(),1) > 0) {
        price=getPriceFromBlock(event.getClickedBlock(),1);
      }
      if (checkSignParms(event.getClickedBlock(),1) > 1) {
        item=getItemFromBlock(event.getClickedBlock(),1);
      }
      if (plugin.bank.hasMoney(p,price,item)) {
        plugin.bank.payForWolf(p,price,item);
        plugin.bank.showRecipt(p,price,item);
        plugin.spawnWolf(p);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (event.hasBlock() && event.getClickedBlock().getState() instanceof Sign && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
    if (plugin.blockIsValidWolfSign(event.getClickedBlock()) && plugin.hasPermission(p,WolfPound.PERM_USE)) {
      double price=0;
      int item=-1;
      if (checkSignParms(event.getClickedBlock(),1) > 0) {
        price=getPriceFromBlock(event.getClickedBlock(),1);
      }
      if (checkSignParms(event.getClickedBlock(),1) > 1) {
        item=getItemFromBlock(event.getClickedBlock(),1);
      }
      if (plugin.bank.isUsingEcon(item) && plugin.bank.hasMoney(p,price,item)) {
        plugin.bank.payForWolf(p,price,item);
        if (price > 0) {
          plugin.bank.showRecipt(p,price,item);
        }
        plugin.spawnWolf(p);
      }
 else       if (!plugin.bank.isUsingEcon(item)) {
        plugin.spawnWolf(p);
      }
    }
  }
}
Program: 96573
Project: 96573
Buggy source:
/** 
 * Grab the iConomy plugin from the Plugin Manager.
 */
public boolean setEconPlugin(){
  Plugin testiConomy=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testBOSE=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testEssentials=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  if (testiConomy != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.iConomy);
    return true;
  }
 else   if (testBOSE != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.BOSEconomy,(BOSEconomy)testBOSE);
    return true;
  }
 else   if (testEssentials != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.Essentials);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Grab the iConomy plugin from the Plugin Manager.
 */
public boolean setEconPlugin(){
  Plugin testiConomy=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testBOSE=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testEssentials=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  if (testiConomy != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.iConomy);
    return true;
  }
 else   if (testBOSE != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.BOSEconomy,(BOSEconomy)testBOSE);
    return true;
  }
 else   if (testEssentials != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.Essentials);
    return true;
  }
 else {
    bank=new WPBankAdapter(WPBankAdapter.Bank.None);
    return false;
  }
}
Program: 96574
Project: 96574
Buggy source:
private boolean changeSetting(String command,String value){
  if (command.equals("String_Node_Str")) {
    try {
      double newprice=Double.parseDouble(value);
      configWP.setProperty(ADOPT_PRICE_KEY,newprice);
      configWP.save();
      adoptPrice=newprice;
      return true;
    }
 catch (    NumberFormatException e) {
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean changeSetting(String command,String value){
  if (command.equals("String_Node_Str") || command.equals("String_Node_Str")) {
    try {
      double newprice=Double.parseDouble(value);
      configWP.setProperty(ADOPT_PRICE_KEY,newprice);
      configWP.save();
      adoptPrice=newprice;
      return true;
    }
 catch (    NumberFormatException e) {
    }
  }
 else   if (command.equals("String_Node_Str") || command.equals("String_Node_Str")) {
    int type=getItemInt(value);
    if (value.equalsIgnoreCase("String_Node_Str")) {
      type=-1;
    }
 else     if (type == -2) {
      return false;
    }
    configWP.setProperty(ADOPT_TYPE_KEY,type);
    configWP.save();
    this.adoptType=type;
    return true;
  }
  return false;
}
Program: 96575
Project: 96575
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  String commandName=command.getName().toLowerCase();
  if (commandName.equalsIgnoreCase("String_Node_Str")) {
    Player player=(Player)sender;
switch (args.length) {
case 0:
      adoptWolf(player,1);
    return true;
case 1:
  if (args[0].equals("String_Node_Str")) {
    sendWolfPrice(player);
    return true;
  }
adoptWolf(player,getWolfInt(args[0],player,"String_Node_Str"));
return true;
case 2:
if (changeSetting(args[0],args[1])) {
player.sendMessage("String_Node_Str");
}
 else {
player.sendMessage("String_Node_Str");
}
return true;
default :
player.sendMessage("String_Node_Str");
player.sendMessage("String_Node_Str");
player.sendMessage("String_Node_Str");
return false;
}
}
return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  String commandName=command.getName().toLowerCase();
  if (commandName.equalsIgnoreCase("String_Node_Str")) {
    Player player=(Player)sender;
switch (args.length) {
case 0:
      adoptWolf(player,1);
    return true;
case 1:
  if (args[0].equals("String_Node_Str")) {
    sendWolfPrice(player);
    return true;
  }
adoptWolf(player,getWolfInt(args[0],player,"String_Node_Str"));
return true;
case 2:
if (!hasPermission(player,PERM_CREATE)) {
return false;
}
if (changeSetting(args[0],args[1])) {
player.sendMessage("String_Node_Str");
}
 else {
player.sendMessage("String_Node_Str");
}
return true;
default :
player.sendMessage("String_Node_Str");
player.sendMessage("String_Node_Str");
player.sendMessage("String_Node_Str");
return false;
}
}
return false;
}
Program: 96576
Project: 96576
Buggy source:
/** 
 * Determines if the specified player has the permission. If no  permissions plugin is used or player is an op, always true
 * @param p Player
 * @param permission String permission
 * @return True if they do, false if not, also displays you dont have permission
 */
public boolean hasPermission(Player p,String permission){
  if (!usePermissions || p.isOp()) {
    return true;
  }
  if (!WolfPound.Permissions.has(p,permission)) {
    p.sendMessage("String_Node_Str" + permission + "String_Node_Str");
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Determines if the specified player has the permission. If no permissions plugin is used or player is an op, always true
 * @param p Player
 * @param permission String permission
 * @return True if they do, false if not, also displays you dont have permission
 */
public boolean hasPermission(Player p,String permission){
  if (!usePermissions || p.isOp()) {
    return true;
  }
  if (!WolfPound.Permissions.has(p,permission)) {
    p.sendMessage("String_Node_Str" + permission + "String_Node_Str");
    return false;
  }
  return true;
}
Program: 96577
Project: 96577
Buggy source:
private void sendWolfPrice(Player p){
  if (hasPermission(p,PERM_ADOPT))   p.sendMessage("String_Node_Str" + adoptPrice + "String_Node_Str");
}

Fixed version (ground truth):
private void sendWolfPrice(Player p){
  if (hasPermission(p,PERM_ADOPT))   if (this.adoptPrice == 0) {
    p.sendMessage("String_Node_Str");
  }
 else   if (this.adoptType == -1) {
    p.sendMessage("String_Node_Str" + adoptPrice + "String_Node_Str");
  }
 else {
    Material m=Material.getMaterial(adoptType);
    if (m != null) {
      p.sendMessage("String_Node_Str" + adoptPrice + "String_Node_Str"+ m.toString()+ "String_Node_Str");
    }
 else {
      p.sendMessage("String_Node_Str" + adoptPrice + "String_Node_Str");
    }
  }
}
Program: 96578
Project: 96578
Buggy source:
public boolean payForWolf(Player p,double cost,int type){
  if (cost == 0 || (isUsing(Bank.None) && type == -1))   return true;
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    int finalamount=item.getAmount() - (int)cost;
    plugin.log.info("String_Node_Str");
    plugin.log.info("String_Node_Str" + item.getAmount());
    plugin.log.info("String_Node_Str" + finalamount);
    p.getItemInHand().setAmount(0);
  }
 else   if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean payForWolf(Player p,double cost,int type){
  if (cost == 0 || (isUsing(Bank.None) && type == -1))   return true;
 else   if (type != -1) {
    ItemStack item=p.getItemInHand();
    int finalamount=item.getAmount() - (int)cost;
    plugin.log.info("String_Node_Str");
    plugin.log.info("String_Node_Str" + item.getAmount());
    plugin.log.info("String_Node_Str" + finalamount);
    if (finalamount > 0) {
      p.getItemInHand().setAmount(finalamount);
    }
 else {
      p.getInventory().remove(item);
    }
  }
 else   if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}
Program: 96579
Project: 96579
Buggy source:
public static void userIsTooPoor(Player p){
  p.sendMessage("String_Node_Str");
}

Fixed version (ground truth):
public void userIsTooPoor(Player p){
  p.sendMessage("String_Node_Str");
}
Program: 96580
Project: 96580
Buggy source:
/** 
 * Does the user have the amount of money specified?
 * @param p The Player
 * @param m The amount of money to check if the player has
 * @return true if the player has at least m money, false if not
 */
public static boolean hasMoney(Player p,double m){
  if (m == 0 || isUsing(Bank.None))   return true;
  if (isUsing(Bank.iConomy)) {
    return iConomy.getBank().getAccount(p.getName()).hasEnough(m);
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    return BOSEcon.getPlayerMoney(p.getName()) >= m;
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    return (user.getMoney() >= m);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Does the user have the amount of money specified?
 * @param p The Player
 * @param m The amount of money to check if the player has
 * @return true if the player has at least m money, false if not
 */
public boolean hasMoney(Player p,double m){
  boolean playerHasEnough=false;
  if (m == 0 || isUsing(Bank.None))   playerHasEnough=true;
  if (isUsing(Bank.iConomy)) {
    playerHasEnough=iConomy.getBank().getAccount(p.getName()).hasEnough(m);
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    playerHasEnough=BOSEcon.getPlayerMoney(p.getName()) >= m;
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    playerHasEnough=(user.getMoney() >= m);
  }
  if (!playerHasEnough) {
    userIsTooPoor(p);
  }
  return playerHasEnough;
}
Program: 96581
Project: 96581
Buggy source:
public static void showRecipt(Player p,double price){
  String moneyName="String_Node_Str";
  if (isUsing(Bank.Essentials) || isUsing(Bank.None)) {
    return;
  }
 else   if (isUsing(Bank.iConomy)) {
    moneyName=iConomy.getBank().getCurrency();
  }
 else   if (isUsing(Bank.BOSEconomy)) {
  }
  p.sendMessage(ChatColor.WHITE + "String_Node_Str" + ChatColor.RED+ "String_Node_Str"+ price+ "String_Node_Str"+ moneyName);
}

Fixed version (ground truth):
public void showRecipt(Player p,double price){
  String moneyName="String_Node_Str";
  if (isUsing(Bank.Essentials) || isUsing(Bank.None)) {
    return;
  }
 else   if (isUsing(Bank.iConomy)) {
    moneyName=iConomy.getBank().getCurrency();
  }
 else   if (isUsing(Bank.BOSEconomy)) {
  }
  p.sendMessage(ChatColor.WHITE + "String_Node_Str" + ChatColor.RED+ "String_Node_Str"+ price+ "String_Node_Str"+ moneyName);
}
Program: 96582
Project: 96582
Buggy source:
private static boolean isUsing(Bank banktype){
  return bankType == banktype;
}

Fixed version (ground truth):
private boolean isUsing(Bank banktype){
  return bankType == banktype;
}
Program: 96583
Project: 96583
Buggy source:
public static boolean payForWolf(Player p,double cost){
  if (cost == 0 || isUsing(Bank.None))   return true;
  if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean payForWolf(Player p,double cost){
  if (cost == 0 || isUsing(Bank.None))   return true;
  if (isUsing(Bank.iConomy)) {
    iConomy.getBank().getAccount(p.getName()).subtract(cost);
    return true;
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    int intPrice=(int)(-1 * cost);
    return BOSEcon.addPlayerMoney(p.getName(),intPrice,true);
  }
 else   if (isUsing(Bank.Essentials)) {
    User user=User.get(p);
    user.takeMoney(cost);
    return true;
  }
  return false;
}
Program: 96584
Project: 96584
Buggy source:
public static String getEconUsed(){
  if (isUsing(Bank.iConomy)) {
    return "String_Node_Str";
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    return "String_Node_Str";
  }
 else   if (isUsing(Bank.Essentials)) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String getEconUsed(){
  if (isUsing(Bank.iConomy)) {
    return "String_Node_Str";
  }
 else   if (isUsing(Bank.BOSEconomy)) {
    return "String_Node_Str";
  }
 else   if (isUsing(Bank.Essentials)) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}
Program: 96585
Project: 96585
Buggy source:
public static void setEconType(Bank banktype){
  bankType=banktype;
}

Fixed version (ground truth):
public void setEconType(Bank banktype){
  bankType=banktype;
}
Program: 96586
Project: 96586
Buggy source:
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (event.hasBlock() && event.getClickedBlock().getState() instanceof Sign && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
    if (plugin.blockIsValidWolfSign(event.getClickedBlock()) && plugin.hasPermission(p,WolfPound.PERM_USE)) {
      double price=getPriceFromBlock(event.getClickedBlock(),1);
      if (WPBankAdapter.hasMoney(p,price)) {
        WPBankAdapter.payForWolf(p,price);
        WPBankAdapter.showRecipt(p,price);
      }
 else {
        WPBankAdapter.userIsTooPoor(p);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onPlayerInteract(PlayerInteractEvent event){
  Player p=event.getPlayer();
  if (event.hasBlock() && event.getClickedBlock().getState() instanceof Sign && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
    if (plugin.blockIsValidWolfSign(event.getClickedBlock()) && plugin.hasPermission(p,WolfPound.PERM_USE)) {
      double price=getPriceFromBlock(event.getClickedBlock(),1);
      if (plugin.bank.hasMoney(p,price)) {
        plugin.bank.payForWolf(p,price);
        plugin.bank.showRecipt(p,price);
        plugin.spawnWolf(p);
      }
    }
  }
}
Program: 96587
Project: 96587
Buggy source:
/** 
 * Allows the user to adopt a wolf
 * @param p The player
 * @param wolves How many wolves
 */
private void adoptWolf(Player p,int wolves){
  if (hasPermission(p,PERM_ADOPT) && WPBankAdapter.hasMoney(p,adoptPrice * wolves)) {
    WPBankAdapter.payForWolf(p,adoptPrice * wolves);
    for (int i=0; i < wolves; i++) {
      spawnWolf(p);
    }
  }
}

Fixed version (ground truth):
/** 
 * Allows the user to adopt a wolf
 * @param p The player
 * @param wolves How many wolves
 */
private void adoptWolf(Player p,int wolves){
  if (hasPermission(p,PERM_ADOPT) && bank.hasMoney(p,adoptPrice * wolves)) {
    bank.payForWolf(p,adoptPrice * wolves);
    for (int i=0; i < wolves; i++) {
      spawnWolf(p);
    }
  }
}
Program: 96588
Project: 96588
Buggy source:
/** 
 * Grab the iConomy plugin from the Plugin Manager.
 */
public boolean setEconPlugin(){
  Plugin testiConomy=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testBOSE=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testEssentials=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  if (testiConomy != null) {
    WPBankAdapter.setEconType(WPBankAdapter.Bank.iConomy);
    return true;
  }
 else   if (testBOSE != null) {
    WPBankAdapter.BOSEcon=(BOSEconomy)testBOSE;
    WPBankAdapter.setEconType(WPBankAdapter.Bank.BOSEconomy);
    return true;
  }
 else   if (testEssentials != null) {
    WPBankAdapter.setEconType(WPBankAdapter.Bank.iConomy);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Grab the iConomy plugin from the Plugin Manager.
 */
public boolean setEconPlugin(){
  Plugin testiConomy=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testBOSE=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  Plugin testEssentials=this.getServer().getPluginManager().getPlugin("String_Node_Str");
  if (testiConomy != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.iConomy);
    return true;
  }
 else   if (testBOSE != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.BOSEconomy,(BOSEconomy)testBOSE);
    return true;
  }
 else   if (testEssentials != null) {
    bank=new WPBankAdapter(WPBankAdapter.Bank.Essentials);
    return true;
  }
  return false;
}