nus-yam/ex-repair huggingface dataset:
Program: 16959
Project: 16959
Buggy source:
@Override public boolean playerJoin(Player p,Location loc){
  ArenaPlayerJoinEvent event=new ArenaPlayerJoinEvent(p,this);
  plugin.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) {
    return false;
  }
  takeFee(p);
  storePlayerData(p,loc);
  removePotionEffects(p);
  MAUtils.sitPets(p);
  setHealth(p,p.getMaxHealth());
  p.setFoodLevel(20);
  p.setGameMode(GameMode.SURVIVAL);
  movePlayerToLobby(p);
  arenaPlayerMap.put(p,new ArenaPlayer(p,this,plugin));
  if (MobArena.hasSpout && settings.getBoolean("String_Node_Str"))   Spouty.classSelectionScreen(plugin,this,p);
  autoStartTimer.start();
  Messenger.tellPlayer(p,Msg.JOIN_PLAYER_JOINED);
  if (autoStartTimer.isRunning()) {
    Messenger.tellPlayer(p,Msg.ARENA_AUTO_START,"String_Node_Str" + autoStartTimer.getRemaining());
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean playerJoin(Player p,Location loc){
  ArenaPlayerJoinEvent event=new ArenaPlayerJoinEvent(p,this);
  plugin.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) {
    return false;
  }
  takeFee(p);
  storePlayerData(p,loc);
  removePotionEffects(p);
  MAUtils.sitPets(p);
  setHealth(p,p.getMaxHealth());
  p.setFoodLevel(20);
  if (settings.getBoolean("String_Node_Str",false)) {
    p.setLevel(0);
    p.setExp(0.0f);
  }
  p.setGameMode(GameMode.SURVIVAL);
  movePlayerToLobby(p);
  arenaPlayerMap.put(p,new ArenaPlayer(p,this,plugin));
  if (MobArena.hasSpout && settings.getBoolean("String_Node_Str"))   Spouty.classSelectionScreen(plugin,this,p);
  autoStartTimer.start();
  Messenger.tellPlayer(p,Msg.JOIN_PLAYER_JOINED);
  if (autoStartTimer.isRunning()) {
    Messenger.tellPlayer(p,Msg.ARENA_AUTO_START,"String_Node_Str" + autoStartTimer.getRemaining());
  }
  return true;
}
Program: 16960
Project: 16960
Buggy source:
@Override public boolean startArena(){
  if (running || lobbyPlayers.isEmpty() || !readyPlayers.containsAll(lobbyPlayers)) {
    return false;
  }
  ArenaStartEvent event=new ArenaStartEvent(this);
  plugin.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) {
    return false;
  }
  storeContainerContents();
  arenaPlayers.addAll(lobbyPlayers);
  lobbyPlayers.clear();
  readyPlayers.clear();
  for (  Player p : randoms) {
    assignRandomClass(p);
  }
  randoms.clear();
  if (arenaPlayers.isEmpty()) {
    return false;
  }
  scoreboard.initialize();
  for (  Player p : arenaPlayers) {
    if (inSpec(p)) {
      specPlayers.remove(p);
      System.out.println("String_Node_Str" + p.getName() + "String_Node_Str");
      System.out.println("String_Node_Str");
    }
    p.teleport(region.getArenaWarp());
    p.setAllowFlight(false);
    p.setFlying(false);
    setHealth(p,p.getMaxHealth());
    p.setFoodLevel(20);
    assignClassPermissions(p);
    arenaPlayerMap.get(p).resetStats();
    scoreboard.addPlayer(p);
  }
  startSpawner();
  startBouncingSheep();
  running=true;
  spawnPets();
  limitManager.clearClassesInUse();
  rewardManager.reset();
  leaderboard.initialize();
  leaderboard.startTracking();
  Messenger.tellAll(this,Msg.ARENA_START);
  return true;
}

Fixed version (ground truth):
@Override public boolean startArena(){
  if (running || lobbyPlayers.isEmpty() || !readyPlayers.containsAll(lobbyPlayers)) {
    return false;
  }
  ArenaStartEvent event=new ArenaStartEvent(this);
  plugin.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) {
    return false;
  }
  storeContainerContents();
  arenaPlayers.addAll(lobbyPlayers);
  lobbyPlayers.clear();
  readyPlayers.clear();
  for (  Player p : randoms) {
    assignRandomClass(p);
  }
  randoms.clear();
  if (arenaPlayers.isEmpty()) {
    return false;
  }
  scoreboard.initialize();
  for (  Player p : arenaPlayers) {
    if (inSpec(p)) {
      specPlayers.remove(p);
      System.out.println("String_Node_Str" + p.getName() + "String_Node_Str");
      System.out.println("String_Node_Str");
    }
    p.teleport(region.getArenaWarp());
    p.setAllowFlight(false);
    p.setFlying(false);
    setHealth(p,p.getMaxHealth());
    p.setFoodLevel(20);
    if (settings.getBoolean("String_Node_Str",false)) {
      p.setLevel(0);
      p.setExp(0.0f);
    }
    assignClassPermissions(p);
    arenaPlayerMap.get(p).resetStats();
    scoreboard.addPlayer(p);
  }
  startSpawner();
  startBouncingSheep();
  running=true;
  spawnPets();
  limitManager.clearClassesInUse();
  rewardManager.reset();
  leaderboard.initialize();
  leaderboard.startTracking();
  Messenger.tellAll(this,Msg.ARENA_START);
  return true;
}
Program: 16961
Project: 16961
Buggy source:
private void restoreInvAndExp(Player p){
  inventoryManager.clearInventory(p);
  try {
    inventoryManager.restoreInv(p);
  }
 catch (  Exception e) {
    e.printStackTrace();
    Messenger.severe("String_Node_Str" + p.getName() + "String_Node_Str");
  }
  rewardManager.grantRewards(p);
  if (lobbyPlayers.contains(p) || !settings.getBoolean("String_Node_Str",false)) {
    playerData.get(p).restoreData();
  }
 else {
    p.setFoodLevel(playerData.get(p).food());
  }
}

Fixed version (ground truth):
private void restoreInvAndExp(Player p){
  inventoryManager.clearInventory(p);
  try {
    inventoryManager.restoreInv(p);
  }
 catch (  Exception e) {
    e.printStackTrace();
    Messenger.severe("String_Node_Str" + p.getName() + "String_Node_Str");
  }
  rewardManager.grantRewards(p);
  if (lobbyPlayers.contains(p) || !settings.getBoolean("String_Node_Str") || settings.getBoolean("String_Node_Str",false)|| settings.getBoolean("String_Node_Str",false)) {
    playerData.get(p).restoreData();
  }
 else {
    p.setFoodLevel(playerData.get(p).food());
  }
}
Program: 16962
Project: 16962
Buggy source:
public static String parseString(ItemStack stack){
  if (stack.getTypeId() == 0)   return null;
  String type=stack.getType().toString().toLowerCase();
  MaterialData md=stack.getData();
  byte data=(md != null ? md.getData() : 0);
  if (stack.getType() == Material.WOOL) {
    data=(byte)(15 - data);
  }
  int amount=stack.getAmount();
  Map<Enchantment,Integer> enchants=null;
  if (stack.getType() == Material.ENCHANTED_BOOK) {
    EnchantmentStorageMeta esm=(EnchantmentStorageMeta)stack.getItemMeta();
    enchants=esm.getStoredEnchants();
  }
 else {
    enchants=stack.getEnchantments();
  }
  String enchantments="String_Node_Str";
  for (  Entry<Enchantment,Integer> entry : enchants.entrySet()) {
    int id=entry.getKey().getId();
    int lvl=entry.getValue();
    enchantments+="String_Node_Str" + id + "String_Node_Str"+ lvl;
  }
  if (!enchantments.equals("String_Node_Str")) {
    enchantments=enchantments.substring(1);
  }
  String result=type;
  if (data != 0) {
    result+="String_Node_Str" + data;
  }
  if (amount > 1 || data != 0) {
    result+="String_Node_Str" + amount;
  }
  if (!enchantments.equals("String_Node_Str")) {
    result+="String_Node_Str" + enchantments;
  }
  return result;
}

Fixed version (ground truth):
public static String parseString(ItemStack stack){
  if (stack.getTypeId() == 0)   return null;
  String type=stack.getType().toString().toLowerCase();
  MaterialData md=stack.getData();
  short data=(md != null ? md.getData() : 0);
  if (stack.getType() == Material.WOOL) {
    data=(byte)(15 - data);
  }
 else   if (stack.getType() == Material.POTION) {
    data=stack.getDurability();
  }
  int amount=stack.getAmount();
  Map<Enchantment,Integer> enchants=null;
  if (stack.getType() == Material.ENCHANTED_BOOK) {
    EnchantmentStorageMeta esm=(EnchantmentStorageMeta)stack.getItemMeta();
    enchants=esm.getStoredEnchants();
  }
 else {
    enchants=stack.getEnchantments();
  }
  String enchantments="String_Node_Str";
  for (  Entry<Enchantment,Integer> entry : enchants.entrySet()) {
    int id=entry.getKey().getId();
    int lvl=entry.getValue();
    enchantments+="String_Node_Str" + id + "String_Node_Str"+ lvl;
  }
  if (!enchantments.equals("String_Node_Str")) {
    enchantments=enchantments.substring(1);
  }
  String result=type;
  if (data != 0) {
    result+="String_Node_Str" + data;
  }
  if (amount > 1 || data != 0) {
    result+="String_Node_Str" + amount;
  }
  if (!enchantments.equals("String_Node_Str")) {
    result+="String_Node_Str" + enchantments;
  }
  return result;
}
Program: 16963
Project: 16963
Buggy source:
/** 
 * Add an item to the items list. If the item is a weapon-type, its durability will be set to "infinite". If the item is a bone, the pets counter will be incremented.
 * @param stack an item
 */
public void addItem(ItemStack stack){
  if (stack == null)   return;
  if (isWeapon(stack)) {
    stack.setDurability(Short.MIN_VALUE);
  }
 else   if (stack.getType() == Material.BONE) {
    pets+=stack.getAmount();
  }
  items.add(stack);
}

Fixed version (ground truth):
/** 
 * Add an item to the items list. If the item is a weapon-type, its durability will be set to "infinite". If the item is a bone, the pets counter will be incremented.
 * @param stack an item
 */
public void addItem(ItemStack stack){
  if (stack == null)   return;
  if (isWeapon(stack)) {
    stack.setDurability(Short.MIN_VALUE);
  }
 else   if (stack.getType() == Material.BONE) {
    pets+=stack.getAmount();
  }
 else   if (stack.getAmount() > 64) {
    while (stack.getAmount() > 64) {
      items.add(new ItemStack(stack.getType(),64));
      stack.setAmount(stack.getAmount() - 64);
    }
  }
  items.add(stack);
}
Program: 16965
Project: 16965
Buggy source:
@Override public void setProtected(boolean value){
  protect=value;
}

Fixed version (ground truth):
@Override public void setProtected(boolean value){
  protect=value;
  settings.set("String_Node_Str",protect);
}
Program: 16966
Project: 16966
Buggy source:
@Override public boolean startArena(){
  if (running || lobbyPlayers.isEmpty() || !readyPlayers.containsAll(lobbyPlayers)) {
    return false;
  }
  ArenaStartEvent event=new ArenaStartEvent(this);
  plugin.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) {
    return false;
  }
  storeContainerContents();
  arenaPlayers.addAll(lobbyPlayers);
  lobbyPlayers.clear();
  readyPlayers.clear();
  for (  Player p : randoms) {
    assignRandomClass(p);
  }
  if (arenaPlayers.isEmpty()) {
    return false;
  }
  for (  Player p : arenaPlayers) {
    p.teleport(region.getArenaWarp());
    setHealth(p,20);
    p.setFoodLevel(20);
    assignClassPermissions(p);
    arenaPlayerMap.get(p).resetStats();
  }
  startSpawner();
  startBouncingSheep();
  running=true;
  spawnPets();
  rewardManager.reset();
  log.start();
  leaderboard.initialize();
  leaderboard.startTracking();
  Messenger.tellAll(this,Msg.ARENA_START);
  return true;
}

Fixed version (ground truth):
@Override public boolean startArena(){
  if (running || lobbyPlayers.isEmpty() || !readyPlayers.containsAll(lobbyPlayers)) {
    return false;
  }
  ArenaStartEvent event=new ArenaStartEvent(this);
  plugin.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) {
    return false;
  }
  storeContainerContents();
  arenaPlayers.addAll(lobbyPlayers);
  lobbyPlayers.clear();
  readyPlayers.clear();
  for (  Player p : randoms) {
    assignRandomClass(p);
  }
  if (arenaPlayers.isEmpty()) {
    return false;
  }
  for (  Player p : arenaPlayers) {
    p.teleport(region.getArenaWarp());
    setHealth(p,20);
    p.setFoodLevel(20);
    assignClassPermissions(p);
    arenaPlayerMap.get(p).resetStats();
  }
  startSpawner();
  startBouncingSheep();
  running=true;
  spawnPets();
  rewardManager.reset();
  if (isLogging())   log.start();
  leaderboard.initialize();
  leaderboard.startTracking();
  Messenger.tellAll(this,Msg.ARENA_START);
  return true;
}
Program: 16967
Project: 16967
Buggy source:
@Override public boolean endArena(){
  if (!running || !arenaPlayers.isEmpty()) {
    return false;
  }
  ArenaEndEvent event=new ArenaEndEvent(this);
  plugin.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) {
    return false;
  }
  boolean en=enabled;
  enabled=false;
  running=false;
  leaderboard.stopTracking();
  leaderboard.update();
  log.end();
  stopSpawner();
  Messenger.tellAll(this,Msg.ARENA_END,true);
  cleanup();
  if (settings.getBoolean("String_Node_Str",false)) {
    restoreRegion();
  }
  restoreContainerContents();
  enabled=en;
  return true;
}

Fixed version (ground truth):
@Override public boolean endArena(){
  if (!running || !arenaPlayers.isEmpty()) {
    return false;
  }
  ArenaEndEvent event=new ArenaEndEvent(this);
  plugin.getServer().getPluginManager().callEvent(event);
  if (event.isCancelled()) {
    return false;
  }
  boolean en=enabled;
  enabled=false;
  running=false;
  leaderboard.stopTracking();
  leaderboard.update();
  if (isLogging())   log.end();
  stopSpawner();
  Messenger.tellAll(this,Msg.ARENA_END,true);
  cleanup();
  if (settings.getBoolean("String_Node_Str",false)) {
    restoreRegion();
  }
  restoreContainerContents();
  enabled=en;
  return true;
}
Program: 16968
Project: 16968
Buggy source:
private boolean addRemoveClassPermission(String classname,String perm,boolean add){
  String path="String_Node_Str" + classname;
  if (config.getConfigSection(path) == null)   return false;
  ConfigSection section=config.getConfigSection(path);
  List<String> nodes=section.getStringList("String_Node_Str",null);
  if (nodes.contains(perm))   return false;
  if (add) {
    removeContradictions(nodes,perm);
    nodes.add(perm);
  }
 else {
    nodes.remove(perm);
  }
  section.set("String_Node_Str",nodes);
  config.save();
  loadClass(classname);
  return true;
}

Fixed version (ground truth):
private boolean addRemoveClassPermission(String classname,String perm,boolean add){
  classname=TextUtils.camelCase(classname);
  String path="String_Node_Str" + classname;
  if (config.getConfigSection(path) == null)   return false;
  ConfigSection section=config.getConfigSection(path);
  List<String> nodes=section.getStringList("String_Node_Str",null);
  if (nodes.contains(perm) && add)   return false;
 else   if (nodes.contains(perm) && !add)   nodes.remove(perm);
 else   if (!nodes.contains(perm) && add)   nodes.add(perm);
 else   if (!nodes.contains(perm) && !add)   return false;
  section.set("String_Node_Str",nodes);
  config.save();
  loadClass(classname);
  return true;
}
Program: 16970
Project: 16970
Buggy source:
@Override public void buildClassDistribution(Map<String,MutableInt> classDistribution){
  for (  Entry<String,MutableInt> entry : classDistribution.entrySet()) {
    int amount=entry.getValue().value();
    config.set(CLASSES + entry.getKey(),amount);
  }
}

Fixed version (ground truth):
@Override public void buildClassDistribution(Map<String,MutableInt> classDistribution){
  for (  Entry<String,MutableInt> entry : classDistribution.entrySet()) {
    int amount=entry.getValue().value();
    config.set(CLASSES + "String_Node_Str" + entry.getKey(),amount);
  }
}
Program: 16971
Project: 16971
Buggy source:
private void reset(){
  config.set(GENERAL,null);
  config.set(CLASSES,null);
  config.set(PLAYERS,null);
}

Fixed version (ground truth):
private void reset(){
  if (config.get(GENERAL) != null)   config.set(GENERAL,null);
  if (config.get(CLASSES) != null)   config.set(CLASSES,null);
  if (config.get(PLAYERS) != null)   config.set(PLAYERS,null);
}
Program: 16972
Project: 16972
Buggy source:
@Override public void buildPlayerEntry(ArenaLogPlayerEntry entry,List<ItemStack> rewards){
  String path=PLAYERS + entry.playername + "String_Node_Str";
  config.set(path + "String_Node_Str",entry.playername);
  config.set(path + "String_Node_Str",entry.classname);
  config.set(path + "String_Node_Str",entry.kills);
  config.set(path + "String_Node_Str",entry.dmgDone);
  config.set(path + "String_Node_Str",entry.dmgTaken);
  config.set(path + "String_Node_Str",entry.swings);
  config.set(path + "String_Node_Str",entry.hits);
  config.set(path + "String_Node_Str",entry.lastWave);
  config.set(path + "String_Node_Str",TimeUtils.toTime(entry.leaveTime - start));
  Map<String,MutableInt> summed=new HashMap<String,MutableInt>();
  for (  ItemStack stack : rewards) {
    if (stack == null)     continue;
    String type=(stack.getTypeId() == MobArena.ECONOMY_MONEY_ID ? "String_Node_Str" : stack.getType().toString().toLowerCase());
    if (!summed.containsKey(type)) {
      summed.put(type,new MutableInt());
    }
    summed.get(type).add(stack.getAmount());
  }
  for (  Entry<String,MutableInt> e : summed.entrySet()) {
    config.set(path + "String_Node_Str" + e.getKey(),e.getValue().value());
  }
}

Fixed version (ground truth):
@Override public void buildPlayerEntry(ArenaLogPlayerEntry entry,List<ItemStack> rewards){
  String path=PLAYERS + "String_Node_Str" + entry.playername+ "String_Node_Str";
  config.set(path + "String_Node_Str",entry.playername);
  config.set(path + "String_Node_Str",entry.classname);
  config.set(path + "String_Node_Str",entry.kills);
  config.set(path + "String_Node_Str",entry.dmgDone);
  config.set(path + "String_Node_Str",entry.dmgTaken);
  config.set(path + "String_Node_Str",entry.swings);
  config.set(path + "String_Node_Str",entry.hits);
  config.set(path + "String_Node_Str",entry.lastWave);
  config.set(path + "String_Node_Str",TimeUtils.toTime(entry.leaveTime - start));
  Map<String,MutableInt> summed=new HashMap<String,MutableInt>();
  for (  ItemStack stack : rewards) {
    if (stack == null)     continue;
    String type=(stack.getTypeId() == MobArena.ECONOMY_MONEY_ID ? "String_Node_Str" : stack.getType().toString().toLowerCase());
    if (!summed.containsKey(type)) {
      summed.put(type,new MutableInt());
    }
    summed.get(type).add(stack.getAmount());
  }
  for (  Entry<String,MutableInt> e : summed.entrySet()) {
    config.set(path + "String_Node_Str" + e.getKey(),e.getValue().value());
  }
}
Program: 16973
Project: 16973
Buggy source:
public void expandLobbyUp(int amount){
  l2.setY(Math.min(127D,l2.getY() + amount));
  set(RegionPoint.L2,l2);
}

Fixed version (ground truth):
public void expandLobbyUp(int amount){
  l2.setY(Math.min(arena.getWorld().getMaxHeight(),l2.getY() + amount));
  set(RegionPoint.L2,l2);
}
Program: 16974
Project: 16974
Buggy source:
public void expandUp(int amount){
  p2.setY(Math.min(127D,p2.getY() + amount));
  set(RegionPoint.P2,p2);
}

Fixed version (ground truth):
public void expandUp(int amount){
  p2.setY(Math.min(arena.getWorld().getMaxHeight(),p2.getY() + amount));
  set(RegionPoint.P2,p2);
}
Program: 16975
Project: 16975
Buggy source:
public static String parseString(ItemStack stack){
  if (stack.getTypeId() == 0)   return null;
  String type=stack.getType().toString().toLowerCase();
  MaterialData md=stack.getData();
  byte data=(md != null ? md.getData() : 0);
  if (stack.getType() == Material.WOOL) {
    data=(byte)(15 - data);
  }
  int amount=stack.getAmount();
  String enchantments="String_Node_Str";
  for (  Entry<Enchantment,Integer> entry : stack.getEnchantments().entrySet()) {
    int id=entry.getKey().getId();
    int lvl=entry.getValue();
    enchantments+="String_Node_Str" + id + "String_Node_Str"+ lvl;
  }
  if (!enchantments.equals("String_Node_Str")) {
    enchantments=enchantments.substring(2);
  }
  String result=type;
  if (data != 0) {
    result+="String_Node_Str" + data;
  }
  if (amount > 1 || data != 0) {
    result+="String_Node_Str" + amount;
  }
  if (!enchantments.equals("String_Node_Str")) {
    result+="String_Node_Str" + enchantments;
  }
  return result;
}

Fixed version (ground truth):
public static String parseString(ItemStack stack){
  if (stack.getTypeId() == 0)   return null;
  String type=stack.getType().toString().toLowerCase();
  MaterialData md=stack.getData();
  byte data=(md != null ? md.getData() : 0);
  if (stack.getType() == Material.WOOL) {
    data=(byte)(15 - data);
  }
  int amount=stack.getAmount();
  String enchantments="String_Node_Str";
  for (  Entry<Enchantment,Integer> entry : stack.getEnchantments().entrySet()) {
    int id=entry.getKey().getId();
    int lvl=entry.getValue();
    enchantments+="String_Node_Str" + id + "String_Node_Str"+ lvl;
  }
  if (!enchantments.equals("String_Node_Str")) {
    enchantments=enchantments.substring(1);
  }
  String result=type;
  if (data != 0) {
    result+="String_Node_Str" + data;
  }
  if (amount > 1 || data != 0) {
    result+="String_Node_Str" + amount;
  }
  if (!enchantments.equals("String_Node_Str")) {
    result+="String_Node_Str" + enchantments;
  }
  return result;
}
Program: 16976
Project: 16976
Buggy source:
private static Wave parseBossWave(Arena arena,String name,ConfigSection config){
  MACreature monster=getSingleMonster(config);
  if (monster == null) {
    Messenger.warning(WaveError.SINGLE_MONSTER_MISSING.format(name,arena.configName()));
    return null;
  }
  BossWave result=new BossWave(monster);
  String hlth=config.getString("String_Node_Str");
  BossHealth health=BossHealth.fromString(hlth);
  result.setHealth(health);
  String ablts=config.getString("String_Node_Str");
  if (ablts != null) {
    String[] parts=ablts.split("String_Node_Str");
    for (    String ability : parts) {
      Ability a=AbilityManager.fromString(ability.trim());
      if (a == null) {
        Messenger.warning(WaveError.BOSS_ABILITY.format(ability.trim(),name,arena.configName()));
        continue;
      }
      result.addBossAbility(a);
    }
  }
  int interval=config.getInt("String_Node_Str",3) * 20;
  result.setAbilityInterval(interval);
  return result;
}

Fixed version (ground truth):
private static Wave parseBossWave(Arena arena,String name,ConfigSection config){
  MACreature monster=getSingleMonster(config);
  if (monster == null) {
    Messenger.warning(WaveError.SINGLE_MONSTER_MISSING.format(name,arena.configName()));
    return null;
  }
  BossWave result=new BossWave(monster);
  String hlth=config.getString("String_Node_Str");
  BossHealth health=BossHealth.fromString(hlth);
  result.setHealth(health);
  String ablts=config.getString("String_Node_Str");
  if (ablts != null) {
    String[] parts=ablts.split("String_Node_Str");
    for (    String ability : parts) {
      Ability a=AbilityManager.fromString(ability.trim());
      if (a == null) {
        Messenger.warning(WaveError.BOSS_ABILITY.format(ability.trim(),name,arena.configName()));
        continue;
      }
      result.addBossAbility(a);
    }
  }
  result.setAbilityInterval(config.getInt("String_Node_Str",3) * 20);
  result.setAbilityAnnounce(config.getBoolean("String_Node_Str",true));
  return result;
}
Program: 16977
Project: 16977
Buggy source:
public BossWave(MACreature monster){
  this.monster=monster;
  this.bosses=new HashSet<MABoss>();
  this.abilities=new ArrayList<Ability>();
  this.activated=false;
  this.setType(WaveType.BOSS);
}

Fixed version (ground truth):
public BossWave(MACreature monster){
  this.monster=monster;
  this.bosses=new HashSet<MABoss>();
  this.abilities=new ArrayList<Ability>();
  this.activated=false;
  this.abilityAnnounce=false;
  this.setType(WaveType.BOSS);
}
Program: 16978
Project: 16978
Buggy source:
public void announceAbility(Ability ability,MABoss boss,Arena arena){
  AbilityInfo info=ability.getClass().getAnnotation(AbilityInfo.class);
  Messenger.tellAll(arena,Msg.WAVE_BOSS_ABILITY,info.name());
}

Fixed version (ground truth):
public void announceAbility(Ability ability,MABoss boss,Arena arena){
  if (getAbilityAnnounce()) {
    AbilityInfo info=ability.getClass().getAnnotation(AbilityInfo.class);
    Messenger.tellAll(arena,Msg.WAVE_BOSS_ABILITY,info.name());
  }
}
Program: 16979
Project: 16979
Buggy source:
public static String getDownloadTargetPath(ListEntryItem item){
  if (item.getUrl() == null) {
    return ExternalDirectory.getExternalRootDirectory() + item.getTitle();
  }
  return ExternalDirectory.getExternalRootDirectory() + URLPathDecoder.decode(item.getUrl());
}

Fixed version (ground truth):
public static String getDownloadTargetPath(ListEntryItem item){
  if (item.getUrl() == null) {
    return ExternalDirectory.getExternalRootDirectory() + "String_Node_Str" + item.getTitle();
  }
  return ExternalDirectory.getExternalRootDirectory() + "String_Node_Str" + URLPathDecoder.decode(item.getUrl());
}
Program: 16980
Project: 16980
Buggy source:
/** 
 * Takes care of state of external and throws a   {@link RuntimeException} if sdcard is unmounted
 * @return path to external storage
 */
public static String getExternalRootDirectory(){
  if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
    File extDir=new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "String_Node_Str");
    if (extDir.mkdirs() || extDir.exists()) {
      return extDir.getAbsolutePath();
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Takes care of state of external and throws a   {@link RuntimeException} if sdcard is unmounted
 * @return path to external storage
 */
private static String getExternalRootDirectory(){
  if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
    File extDir=new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "String_Node_Str");
    if (extDir.mkdirs() || extDir.exists()) {
      return extDir.getAbsolutePath();
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 16981
Project: 16981
Buggy source:
public static String getDownloadTargetPath(String url){
  return ExternalDirectory.getExternalRootDirectory() + URLPathDecoder.decode(url);
}

Fixed version (ground truth):
public static String getDownloadTargetPath(ListEntryItem item){
  if (item.getUrl() == null) {
    return ExternalDirectory.getExternalRootDirectory() + item.getTitle();
  }
  return ExternalDirectory.getExternalRootDirectory() + URLPathDecoder.decode(item.getUrl());
}
Program: 16982
Project: 16982
Buggy source:
public void addEntry(ListEntryItem entry){
  if (hideFilesFolders && entry.getTitle().startsWith("String_Node_Str")) {
    return;
  }
 else {
    entry.setFilePath(ExternalDirectory.getDownloadTargetPath(entry.getUrl()));
    if (entry.isDirectory()) {
      ExternalDirectory.createDirectory(entry.getFilePath());
    }
    items.add(entry);
    Collections.sort(items);
    notifyDataSetChanged();
  }
}

Fixed version (ground truth):
public void addEntry(ListEntryItem entry){
  if (hideFilesFolders && entry.getTitle().startsWith("String_Node_Str")) {
    return;
  }
 else {
    entry.setFilePath(ExternalDirectory.getDownloadTargetPath(entry));
    if (entry.isDirectory()) {
      ExternalDirectory.createDirectory(entry.getFilePath());
    }
    items.add(entry);
    Collections.sort(items);
    notifyDataSetChanged();
  }
}
Program: 16984
Project: 16984
Buggy source:
@Override public boolean onPreferenceClick(Preference preference){
  AlertDialog.Builder builder=new AlertDialog.Builder(context);
  builder.setMessage(getString(R.string.release_account_hint)).setTitle(getString(R.string.are_you_sure)).setCancelable(false).setPositiveButton(getString(R.string.release),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      SharedPreferences prefs=SettingsActivity.getSettings((ContextWrapper)context);
      Editor editor=prefs.edit();
      editor.remove("String_Node_Str");
      editor.remove("String_Node_Str");
      editor.commit();
      Intent backToSetup=new Intent(context,SetupActivity.class);
      startActivity(backToSetup);
      ((Activity)context).finish();
    }
  }
).setNegativeButton(getString(R.string.cancel),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      dialog.dismiss();
    }
  }
);
  AlertDialog alert=builder.create();
  alert.show();
  return true;
}

Fixed version (ground truth):
@Override public boolean onPreferenceClick(Preference preference){
  AlertDialog.Builder builder=new AlertDialog.Builder(context);
  builder.setMessage(getString(R.string.release_account_hint)).setTitle(getString(R.string.are_you_sure)).setCancelable(false).setPositiveButton(getString(R.string.release),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      SharedPreferences prefs=SettingsActivity.getSettings((ContextWrapper)context);
      Editor editor=prefs.edit();
      editor.remove("String_Node_Str");
      editor.remove("String_Node_Str");
      editor.commit();
      Intent backToSetup=new Intent(context,SetupActivity.class);
      backToSetup.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
      startActivity(backToSetup);
      ((Activity)context).finish();
    }
  }
).setNegativeButton(getString(R.string.cancel),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      dialog.dismiss();
    }
  }
);
  AlertDialog alert=builder.create();
  alert.show();
  return true;
}
Program: 16986
Project: 16986
Buggy source:
@Override protected void onPostExecute(Boolean successfully){
  loadingDialog.dismiss();
  if (successfully) {
    Intent browseData=new Intent(context,BrowsingActivity.class);
    browseData.putExtra("String_Node_Str",serverUrl + "String_Node_Str");
    browseData.putExtra("String_Node_Str",foldername);
    startActivity(browseData);
  }
 else {
    AlertDialog.Builder builder=new AlertDialog.Builder(context);
    builder.setMessage(getString(R.string.login_error)).setCancelable(false).setPositiveButton(getString(R.string.close),new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int which){
        ((Activity)context).finish();
      }
    }
);
    AlertDialog alert=builder.create();
    alert.show();
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(Boolean successfully){
  loadingDialog.dismiss();
  if (successfully) {
    Intent browseData=new Intent(context,BrowsingActivity.class);
    browseData.putExtra("String_Node_Str",serverUrl + "String_Node_Str");
    startActivity(browseData);
  }
 else {
    AlertDialog.Builder builder=new AlertDialog.Builder(context);
    builder.setMessage(getString(R.string.login_error)).setCancelable(false).setPositiveButton(getString(R.string.close),new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int which){
        ((Activity)context).finish();
      }
    }
);
    AlertDialog alert=builder.create();
    alert.show();
  }
}
Program: 16988
Project: 16988
Buggy source:
@Override public boolean onPreferenceChange(Preference preference,Object newValue){
  SharedPreferences prefs=getSettings((ContextWrapper)context);
  Editor editor=prefs.edit();
  if (hideFilesFolders.isChecked()) {
    editor.putBoolean("String_Node_Str",false);
  }
 else {
    editor.putBoolean("String_Node_Str",true);
  }
  return editor.commit();
}

Fixed version (ground truth):
@Override public boolean onPreferenceChange(Preference preference,Object newValue){
  SharedPreferences prefs=getSettings((ContextWrapper)context);
  Editor editor=prefs.edit();
  if (hideFilesFolders.isChecked()) {
    editor.putBoolean("String_Node_Str",true);
  }
 else {
    editor.putBoolean("String_Node_Str",false);
  }
  return editor.commit();
}
Program: 16989
Project: 16989
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  context=this;
  lv_browsing=new ListView(context);
  adapter=new BrowsingAdapter(context);
  lv_browsing.setAdapter(adapter);
  lv_browsing.setOnItemClickListener(onListItemClick());
  setContentView(lv_browsing);
  SharedPreferences prefs=SettingsActivity.getSettings((ContextWrapper)context);
  ident=prefs.getString("String_Node_Str","String_Node_Str");
  authCode=prefs.getString("String_Node_Str","String_Node_Str");
  serverUrl=prefs.getString("String_Node_Str","String_Node_Str");
  String url=getIntent().getStringExtra("String_Node_Str");
  new DownloadFileList().execute(url);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  context=this;
  lvBrowsing=new ListView(context);
  adapter=new BrowsingAdapter(context);
  lvBrowsing.setAdapter(adapter);
  lvBrowsing.setOnItemClickListener(onListItemClick());
  setContentView(lvBrowsing);
  SharedPreferences prefs=SettingsActivity.getSettings((ContextWrapper)context);
  ident=prefs.getString("String_Node_Str","String_Node_Str");
  authCode=prefs.getString("String_Node_Str","String_Node_Str");
  serverUrl=prefs.getString("String_Node_Str","String_Node_Str");
  folderId=prefs.getString("String_Node_Str","String_Node_Str");
  Log.d("String_Node_Str",folderId);
  String url=getIntent().getStringExtra("String_Node_Str");
  new DownloadFileList().execute(url);
}
Program: 16992
Project: 16992
Buggy source:
private void createInnerTypeRefProperty(JstType currentType,JstType innerType){
  if (currentType.isOType())   return;
  JstModifiers mod=innerType.getModifiers().getCopy();
  JstSynthesizedProperty property=new JstSynthesizedProperty(getTypeRef(innerType),innerType.getSimpleName(),null,mod);
  property.setParent(currentType);
  if (currentType.getProperty(property.getName().getName()) != null) {
    int line=0;
    int column=0;
    int start=0;
    int end=0;
    JstSource src=innerType.getSource();
    if (src != null) {
      line=src.getRow();
      column=src.getColumn();
      start=src.getStartOffSet();
      end=src.getEndOffSet();
    }
    m_ctx.getErrorReporter().error("String_Node_Str" + innerType.getSimpleName() + "String_Node_Str"+ m_ctx.getCurrentType().getName(),m_ctx.getCurrentType().getName(),start,end,line,column);
  }
 else {
    currentType.addProperty(property);
  }
}

Fixed version (ground truth):
private void createInnerTypeRefProperty(JstType currentType,JstType innerType){
  if (currentType.isOType())   return;
  JstModifiers mod=innerType.getModifiers().getCopy();
  JstSynthesizedProperty property=new JstSynthesizedProperty(getTypeRef(innerType),innerType.getSimpleName(),(JstIdentifier)null,mod);
  property.setParent(currentType);
  if (currentType.getProperty(property.getName().getName()) != null) {
    int line=0;
    int column=0;
    int start=0;
    int end=0;
    JstSource src=innerType.getSource();
    if (src != null) {
      line=src.getRow();
      column=src.getColumn();
      start=src.getStartOffSet();
      end=src.getEndOffSet();
    }
    m_ctx.getErrorReporter().error("String_Node_Str" + innerType.getSimpleName() + "String_Node_Str"+ m_ctx.getCurrentType().getName(),m_ctx.getCurrentType().getName(),start,end,line,column);
  }
 else {
    currentType.addProperty(property);
  }
}
Program: 16994
Project: 16994
Buggy source:
public JstMethod setOverloaded(List<IJstMethod> jstMethods){
  m_overloaded=jstMethods;
  return this;
}

Fixed version (ground truth):
public JstMethod setOverloaded(List<IJstMethod> jstMethods){
  if (jstMethods != null) {
    m_overloaded=new ArrayList<IJstMethod>();
    m_overloaded.addAll(jstMethods);
  }
 else {
    m_overloaded=jstMethods;
  }
  return this;
}
Program: 16995
Project: 16995
Buggy source:
/** 
 * @see BuildpathContainerInitializer#initialize(IPath,IScriptProject)
 */
public void initialize(IPath containerPath,IScriptProject project) throws CoreException {
  int size=containerPath.segmentCount();
  if (size > 0) {
    if (containerPath.segment(0).equals(VjetPlugin.JS_DEFAULT_SDK)) {
      IInterpreterInstall interp=resolveInterpreter(getNatureFromProject(project),getEnvironmentFromProject(project),containerPath);
      String[] defaultLibs=TsLibLoader.getJsNativeGroups();
      for (      String group : defaultLibs) {
        BuildPathUtils.addLinkForGroup(group);
      }
      JsSdkBuildpathContainer container=new JsSdkBuildpathContainer(interp,containerPath);
      DLTKCore.setBuildpathContainer(containerPath,new IScriptProject[]{project},new IBuildpathContainer[]{container},null);
    }
  }
}

Fixed version (ground truth):
public void initialize(final IPath containerPath,final IScriptProject project) throws CoreException {
  int size=containerPath.segmentCount();
  if (size > 0) {
    if (containerPath.segment(0).equals(VjetPlugin.JS_DEFAULT_SDK)) {
      final String[] defaultLibs=TsLibLoader.getJsNativeGroups();
      Job job=new Job("String_Node_Str"){
        public IStatus run(        IProgressMonitor monitor){
          try {
            IInterpreterInstall interp=resolveInterpreter(getNatureFromProject(project),getEnvironmentFromProject(project),containerPath);
            JsSdkBuildpathContainer container=null;
            for (            String group : defaultLibs) {
              BuildPathUtils.addLinkForGroup(group);
            }
            container=new JsSdkBuildpathContainer(interp,containerPath);
            container.setEntries(createEntries());
            DLTKCore.setBuildpathContainer(containerPath,new IScriptProject[]{project},new IBuildpathContainer[]{container},null);
          }
 catch (          CoreException e) {
            return e.getStatus();
          }
 finally {
            monitor.done();
          }
          return Status.OK_STATUS;
        }
      }
;
      job.setRule(ResourcesPlugin.getWorkspace().getRoot());
      job.schedule();
    }
  }
}
Program: 16996
Project: 16996
Buggy source:
/** 
 * Computes the buildpath entries associated with a interpreter - one entry per library.
 * @param interpreter
 * @return buildpath entries
 */
private IBuildpathEntry[] computeBuildpathEntries(String sdkName){
  TypeSpaceMgr tmg=TypeSpaceMgr.getInstance();
  String[] defaultLibs=TsLibLoader.getJsNativeGroups();
  List entries=new ArrayList(defaultLibs.length);
  Set rawEntries=new HashSet(defaultLibs.length);
  for (int i=0; i < defaultLibs.length; i++) {
    String groupName=defaultLibs[i];
    if (rawEntries.contains(groupName))     continue;
    IBuildpathAttribute[] attributes=new IBuildpathAttribute[0];
    ArrayList excluded=new ArrayList();
    entries.add(new BuildpathEntry(IProjectFragment.K_BINARY,IBuildpathEntry.BPE_LIBRARY,ScriptProject.canonicalizedPath(BuildPathUtils.createPathForGroup(groupName)),false,BuildpathEntry.INCLUDE_ALL,(IPath[])excluded.toArray(new IPath[excluded.size()]),EMPTY_RULES,false,attributes,false));
    rawEntries.add(groupName);
  }
  return (IBuildpathEntry[])entries.toArray(new IBuildpathEntry[entries.size()]);
}

Fixed version (ground truth):
private IBuildpathEntry[] computeBuildpathEntries(String sdkName){
  List entries=m_entries;
  return (IBuildpathEntry[])entries.toArray(new IBuildpathEntry[entries.size()]);
}
Program: 16997
Project: 16997
Buggy source:
public IStatus run(IProgressMonitor monitor){
  try {
    IFile getZipFile=project.getProject().getFile(containerPath.lastSegment());
    String groupName=getZipFile.getFullPath().lastSegment();
    IFile zipfile=project.getProject().getFile(groupName);
    BuildPathUtils.initGroupWithTypeList(groupName,zipfile);
    BuildPathUtils.addLinkForGroup(groupName,groupName);
    System.out.println(containerPath);
    System.out.println(project);
    VJETZipContainer container=new VJETZipContainer(groupName,zipfile.getFullPath());
    container.setEntries(createEntries(groupName,getZipFile.getFullPath()));
    DLTKCore.setBuildpathContainer(containerPath,new IScriptProject[]{project},new IBuildpathContainer[]{container},null);
  }
 catch (  CoreException e) {
    return e.getStatus();
  }
 finally {
    monitor.done();
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
public IStatus run(IProgressMonitor monitor){
  try {
    IFile getZipFile=project.getProject().getFile(containerPath.lastSegment());
    String groupName=getZipFile.getFullPath().lastSegment();
    IFile zipfile=project.getProject().getFile(groupName);
    BuildPathUtils.initGroupWithTypeList(groupName,zipfile);
    BuildPathUtils.addLinkForGroup(groupName,groupName);
    VJETZipContainer container=new VJETZipContainer(groupName,zipfile.getFullPath());
    container.setEntries(createEntries(groupName,getZipFile.getFullPath()));
    DLTKCore.setBuildpathContainer(containerPath,new IScriptProject[]{project},new IBuildpathContainer[]{container},null);
  }
 catch (  CoreException e) {
    return e.getStatus();
  }
 finally {
    monitor.done();
  }
  return Status.OK_STATUS;
}
Program: 16999
Project: 16999
Buggy source:
private List createEntries(String groupName,IPath containerPath){
  List entries=new ArrayList(1);
  IBuildpathAttribute[] attributes=new IBuildpathAttribute[0];
  ArrayList excluded=new ArrayList();
  entries.add(new BuildpathEntry(IProjectFragment.K_BINARY,IBuildpathEntry.BPE_LIBRARY,ScriptProject.canonicalizedPath(BuildPathUtils.createPathForGroup(groupName)),false,BuildpathEntry.INCLUDE_ALL,(IPath[])excluded.toArray(new IPath[excluded.size()]),EMPTY_RULES,false,attributes,false));
  entries.add(new BuildpathEntry(IProjectFragment.K_BINARY,IBuildpathEntry.BPE_LIBRARY,ScriptProject.canonicalizedPath(containerPath),false,BuildpathEntry.INCLUDE_ALL,(IPath[])excluded.toArray(new IPath[excluded.size()]),EMPTY_RULES,false,attributes,false));
  return entries;
}

Fixed version (ground truth):
private List createEntries(String groupName,IPath containerPath){
  List entries=new ArrayList(1);
  IBuildpathAttribute[] attributes=new IBuildpathAttribute[0];
  ArrayList excluded=new ArrayList();
  entries.add(new BuildpathEntry(IProjectFragment.K_BINARY,IBuildpathEntry.BPE_LIBRARY,ScriptProject.canonicalizedPath(containerPath),false,BuildpathEntry.INCLUDE_ALL,(IPath[])excluded.toArray(new IPath[excluded.size()]),EMPTY_RULES,false,attributes,false));
  entries.add(new BuildpathEntry(IProjectFragment.K_BINARY,IBuildpathEntry.BPE_LIBRARY,ScriptProject.canonicalizedPath(BuildPathUtils.createPathForGroup(groupName)),false,BuildpathEntry.INCLUDE_ALL,(IPath[])excluded.toArray(new IPath[excluded.size()]),EMPTY_RULES,false,attributes,false));
  return entries;
}
Program: 17000
Project: 17000
Buggy source:
/** 
 * @param path
 * @return
 */
private static File getFile(IPath path){
  path=EnvironmentPathUtils.getLocalPath(path);
  File file=path.toFile();
  if (!file.exists()) {
    IResource member=ResourcesPlugin.getWorkspace().getRoot().findMember(path);
    if (member != null && member.exists()) {
      file=member.getLocation().toFile();
    }
  }
  return file;
}

Fixed version (ground truth):
/** 
 * @param path
 * @return
 */
private static File getFile(IPath path){
  path=EnvironmentPathUtils.getLocalPath(path);
  File file=path.toFile();
  if (!file.exists()) {
    IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
    IResource member=root.findMember(path);
    if (member != null && member.exists() && member.getLocation() != null) {
      file=member.getLocation().toFile();
    }
 else     if (member != null && member.exists() && member.getLocation() == null) {
      if (member.isLinked()) {
        return null;
      }
    }
  }
  return file;
}
Program: 17001
Project: 17001
Buggy source:
public static List<URL> getProjectDependantJars_DLTK(IScriptProject vProject){
  IBuildpathEntry[] entries=getResolvedBuildpath(vProject);
  List<URL> urlsString=new ArrayList<URL>(entries.length);
  for (int i=0; i < entries.length; i++) {
    IBuildpathEntry entry=entries[i];
    if (entry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY) {
      IPath path=entry.getPath();
      File file=getFile(path);
      if (file.exists() && file.isFile()) {
        URL url=getURL(file);
        if (url != null) {
          urlsString.add(url);
        }
      }
    }
  }
  return urlsString;
}

Fixed version (ground truth):
public static List<URL> getProjectDependantJars_DLTK(IScriptProject vProject){
  IBuildpathEntry[] entries=getResolvedBuildpath(vProject);
  List<URL> urlsString=new ArrayList<URL>(entries.length);
  for (int i=0; i < entries.length; i++) {
    IBuildpathEntry entry=entries[i];
    if (entry.getEntryKind() == IBuildpathEntry.BPE_LIBRARY) {
      IPath path=entry.getPath();
      File file=getFile(path);
      if (file != null && file.exists() && file.isFile()) {
        URL url=getURL(file);
        if (url != null) {
          urlsString.add(url);
        }
      }
    }
  }
  return urlsString;
}
Program: 17002
Project: 17002
Buggy source:
/** 
 * Return list of the   {@link GroupInfo} objects in workspace.
 * @return list of the {@link GroupInfo} objects.
 */
List<GroupInfo> getGroupInfo();

Fixed version (ground truth):
/** 
 * Return list of the   {@link GroupInfo} objects for one group.
 * @return list of the {@link GroupInfo} objects.
 */
List<GroupInfo> getGroupInfo(String group);
Program: 17003
Project: 17003
Buggy source:
/** 
 * Clean type space. Remove all user groups from the type space.
 */
public void clean(){
  Set<String> set=new LinkedHashSet<String>(getController().getJstTypeSpaceMgr().getTypeSpace().getGroups().keySet());
  Iterator<String> iter=set.iterator();
  while (iter.hasNext()) {
    String string=iter.next();
    if (!TsLibLoader.isDefaultLibName(string)) {
      setLoaded(false);
      processEvent(new RemoveGroupEvent(string,string));
    }
  }
  this.m_groupDepends=null;
}

Fixed version (ground truth):
/** 
 * Clean type space. Remove all user groups from the type space.
 */
public void clean(){
  Set<String> set=new LinkedHashSet<String>(getController().getJstTypeSpaceMgr().getTypeSpace().getGroups().keySet());
  Iterator<String> iter=set.iterator();
  while (iter.hasNext()) {
    String group=iter.next();
    cleanGroup(group);
  }
  this.m_groupDepends=null;
}
Program: 17004
Project: 17004
Buggy source:
public List<GroupInfo> getGroupInfo(){
  return getScriptProjectEntries();
}

Fixed version (ground truth):
public List<GroupInfo> getGroupInfo(String group){
  List<GroupInfo> info=new ArrayList<GroupInfo>();
  Map<String,List<String>> groupDependency=getGroupDepends();
  IScriptProject p=m_manager.getModel().getScriptProject(group);
  try {
    populateGroupInfos(info,p,groupDependency);
  }
 catch (  ModelException e) {
    DLTKCore.error(e.toString(),e);
  }
  return info;
}
Program: 17005
Project: 17005
Buggy source:
/** 
 * Process workspace resources changes.
 */
public void resourceChanged(IResourceChangeEvent event){
  int type=event.getType();
  if (!isStarted() || !m_tsmgr.isAllowChanges()) {
    return;
  }
  if (type == IResourceChangeEvent.PRE_CLOSE || type == IResourceChangeEvent.PRE_DELETE) {
    updateGroupDepends();
    processCloseProject(event);
  }
  if (type == IResourceChangeEvent.POST_CHANGE) {
    if (isBildPathChangedEvent(event.getDelta())) {
      updateGroupDepends();
      m_reloadJob.schedule();
    }
 else {
      processChanges(event);
    }
  }
}

Fixed version (ground truth):
/** 
 * Process workspace resources changes.
 */
public void resourceChanged(IResourceChangeEvent event){
  int type=event.getType();
  if (!isStarted() || !m_tsmgr.isAllowChanges() || event.getDelta().getAffectedChildren()[0].getResource() == null) {
    return;
  }
  IProject project=event.getDelta().getAffectedChildren()[0].getResource().getProject();
  if (type == IResourceChangeEvent.PRE_CLOSE || type == IResourceChangeEvent.PRE_DELETE) {
    updateGroupDepends(project);
    processCloseProject(event);
  }
  if (type == IResourceChangeEvent.POST_CHANGE) {
    if (isBildPathChangedEvent(event.getDelta())) {
      updateGroupDepends(project);
      new TypeSpaceReloadJob(project).schedule();
    }
 else {
      processChanges(event);
    }
  }
}
Program: 17006
Project: 17006
Buggy source:
public TypeSpaceReloadJob(){
  super(TYPE_SPACE_RELOAD);
}

Fixed version (ground truth):
public TypeSpaceReloadJob(IProject project){
  super(TYPE_SPACE_UPDATE);
  m_project=project;
}