nus-yam/ex-repair huggingface dataset:
Program: 161963
Project: 161963
Buggy source:
public void mousePressed(MouseEvent e){
  super.mousePressed(e);
  if (!editingDelegate.isEditing()) {
    knobPanel.setBackground(this.getHighlightColor());
    mouseDragged(e);
  }
}

Fixed version (ground truth):
public void mousePressed(MouseEvent e){
  super.mousePressed(e);
  if (!editingDelegate.isEditing()) {
    knobPanel.setBackground(this.getHighlightColor());
    for (    JPanel tick : tickViewArray)     tick.setBackground(this.getHighlightColor());
    mouseDragged(e);
  }
}
Program: 161964
Project: 161964
Buggy source:
@Override public void mouseReleased(MouseEvent e){
  super.mouseReleased(e);
  if (!editingDelegate.isEditing()) {
    knobPanel.setBackground(getColor());
  }
}

Fixed version (ground truth):
@Override public void mouseReleased(MouseEvent e){
  super.mouseReleased(e);
  if (!editingDelegate.isEditing()) {
    knobPanel.setBackground(getColor());
    for (    JPanel tick : tickViewArray)     tick.setBackground(getColor());
  }
}
Program: 161965
Project: 161965
Buggy source:
private void loadCommands(){
  commands.put("String_Node_Str",new CreateArena());
  commands.put("String_Node_Str",new Join());
  commands.put("String_Node_Str",new AddWall());
  commands.put("String_Node_Str",new SetSpawn());
  commands.put("String_Node_Str",new ListArenas());
  commands.put("String_Node_Str",new Disable());
  commands.put("String_Node_Str",new ForceStart());
  commands.put("String_Node_Str",new Enable());
  commands.put("String_Node_Str",new Vote());
  commands.put("String_Node_Str",new Leave());
  commands.put("String_Node_Str",new SetLobbySpawn());
  commands.put("String_Node_Str",new SetLobbyWall());
  commands.put("String_Node_Str",new ResetSpawns());
  commands.put("String_Node_Str",new DelArena());
  commands.put("String_Node_Str",new Flag());
  commands.put("String_Node_Str",new Spectate());
  commands.put("String_Node_Str",new LeaveQueue());
  commands.put("String_Node_Str",new LeaveQueue());
  commands.put("String_Node_Str",new ListPlayers());
  commands.put("String_Node_Str",new Teleport());
  commands.put("String_Node_Str",new Reload());
  commands.put("String_Node_Str",new Test());
}

Fixed version (ground truth):
private void loadCommands(){
  commands.put("String_Node_Str",new CreateArena());
  commands.put("String_Node_Str",new Join());
  commands.put("String_Node_Str",new AddWall());
  commands.put("String_Node_Str",new SetSpawn());
  commands.put("String_Node_Str",new ListArenas());
  commands.put("String_Node_Str",new Disable());
  commands.put("String_Node_Str",new ForceStart());
  commands.put("String_Node_Str",new Enable());
  commands.put("String_Node_Str",new Vote());
  commands.put("String_Node_Str",new Leave());
  commands.put("String_Node_Str",new SetLobbySpawn());
  commands.put("String_Node_Str",new SetLobbyWall());
  commands.put("String_Node_Str",new ResetSpawns());
  commands.put("String_Node_Str",new DelArena());
  commands.put("String_Node_Str",new Flag());
  commands.put("String_Node_Str",new Spectate());
  commands.put("String_Node_Str",new LeaveQueue());
  commands.put("String_Node_Str",new LeaveQueue());
  commands.put("String_Node_Str",new ListPlayers());
  commands.put("String_Node_Str",new Teleport());
  commands.put("String_Node_Str",new Reload());
}
Program: 161966
Project: 161966
Buggy source:
public Location getMax(){
  return max;
}

Fixed version (ground truth):
public Location getMax(){
  Runtime.getRuntime().freeMemory();
  return max;
}
Program: 161968
Project: 161968
Buggy source:
public boolean onCommand(Player player,String[] args){
  if (!player.hasPermission(permission()) && !player.isOp()) {
    MessageManager.getInstance().sendFMessage(PrefixType.ERROR,"String_Node_Str",player);
    return true;
  }
  int game=-1;
  int seconds=10;
  if (args.length == 2) {
    seconds=Integer.parseInt(args[1]);
  }
  if (args.length >= 1) {
    game=Integer.parseInt(args[0]);
  }
 else   game=GameManager.getInstance().getPlayerGameId(player);
  if (game == -1) {
    MessageManager.getInstance().sendFMessage(PrefixType.ERROR,"String_Node_Str",player);
    return true;
  }
  if (GameManager.getInstance().getGame(game).getActivePlayers() < 2) {
    MessageManager.getInstance().sendFMessage(PrefixType.ERROR,"String_Node_Str",player);
    return true;
  }
  Game g=GameManager.getInstance().getGame(game);
  if (g.getMode() != Game.GameMode.WAITING && !player.hasPermission("String_Node_Str")) {
    MessageManager.getInstance().sendFMessage(PrefixType.ERROR,"String_Node_Str",player);
    return true;
  }
  g.countdown(seconds);
  for (  Player pl : g.getAllPlayers()) {
    msgmgr.sendFMessage(PrefixType.INFO,"String_Node_Str",player,"String_Node_Str" + seconds);
  }
  msgmgr.sendFMessage(PrefixType.INFO,"String_Node_Str",player,"String_Node_Str" + game);
  return true;
}

Fixed version (ground truth):
public boolean onCommand(Player player,String[] args){
  if (!player.hasPermission(permission()) && !player.isOp()) {
    MessageManager.getInstance().sendFMessage(PrefixType.ERROR,"String_Node_Str",player);
    return true;
  }
  int game=-1;
  int seconds=10;
  if (args.length == 2) {
    seconds=Integer.parseInt(args[1]);
  }
  if (args.length >= 1) {
    game=Integer.parseInt(args[0]);
  }
 else   game=GameManager.getInstance().getPlayerGameId(player);
  if (game == -1) {
    MessageManager.getInstance().sendFMessage(PrefixType.ERROR,"String_Node_Str",player);
    return true;
  }
  if (GameManager.getInstance().getGame(game).getActivePlayers() < 2) {
    MessageManager.getInstance().sendFMessage(PrefixType.ERROR,"String_Node_Str",player);
    return true;
  }
  Game g=GameManager.getInstance().getGame(game);
  if (g.getMode() != Game.GameMode.WAITING && !player.hasPermission("String_Node_Str")) {
    MessageManager.getInstance().sendFMessage(PrefixType.ERROR,"String_Node_Str",player);
    return true;
  }
  g.countdown(seconds);
  msgmgr.sendFMessage(PrefixType.INFO,"String_Node_Str",player,"String_Node_Str" + game);
  return true;
}
Program: 161969
Project: 161969
Buggy source:
public void help(Player p,int page){
  if (page == 1) {
    p.sendMessage(ChatColor.BLUE + "String_Node_Str" + msgmgr.pre+ ChatColor.DARK_AQUA+ "String_Node_Str"+ ChatColor.BLUE+ "String_Node_Str");
  }
  if (page == 2) {
    p.sendMessage(ChatColor.BLUE + "String_Node_Str" + msgmgr.pre+ ChatColor.DARK_AQUA+ "String_Node_Str"+ ChatColor.BLUE+ "String_Node_Str");
  }
  if (page == 3) {
    p.sendMessage(ChatColor.BLUE + "String_Node_Str" + msgmgr.pre+ ChatColor.DARK_AQUA+ "String_Node_Str"+ ChatColor.BLUE+ "String_Node_Str");
  }
  for (  String command : commands.keySet()) {
    if (helpinfo.get(command) == page) {
      msgmgr.sendMessage(PrefixType.INFO,commands.get(command).help(p),p);
    }
  }
}

Fixed version (ground truth):
public void help(Player p,int page){
  if (page == 1) {
    p.sendMessage(ChatColor.BLUE + "String_Node_Str" + msgmgr.pre+ ChatColor.DARK_AQUA+ "String_Node_Str"+ ChatColor.BLUE+ "String_Node_Str");
  }
  if (page == 2) {
    p.sendMessage(ChatColor.BLUE + "String_Node_Str" + msgmgr.pre+ ChatColor.DARK_AQUA+ "String_Node_Str"+ ChatColor.BLUE+ "String_Node_Str");
  }
  if (page == 3) {
    p.sendMessage(ChatColor.BLUE + "String_Node_Str" + msgmgr.pre+ ChatColor.DARK_AQUA+ "String_Node_Str"+ ChatColor.BLUE+ "String_Node_Str");
  }
  for (  String command : commands.keySet()) {
    try {
      if (helpinfo.get(command) == page) {
        msgmgr.sendMessage(PrefixType.INFO,commands.get(command).help(p),p);
      }
    }
 catch (    Exception e) {
    }
  }
}
Program: 161971
Project: 161971
Buggy source:
public void showMenu(Player p){
  GameManager.getInstance().openKitMenu(p);
  Inventory i=Bukkit.getServer().createInventory(p,90,ChatColor.RED + "String_Node_Str" + ChatColor.BOLD+ "String_Node_Str");
  int a=0;
  int b=0;
  ArrayList<Kit> kits=GameManager.getInstance().getKits(p);
  if (kits == null || kits.size() == 0) {
    GameManager.getInstance().leaveKitMenu(p);
    return;
  }
  for (  Kit k : kits) {
    ItemStack i1=k.getIcon();
    ItemMeta im=i1.getItemMeta();
    System.out.println(k.getName() + "String_Node_Str" + i1+ "String_Node_Str"+ im);
    im.setDisplayName(ChatColor.GOLD + "String_Node_Str" + ChatColor.BOLD+ k.getName());
    i1.setItemMeta(im);
    i.setItem((9 * a) + b,i1);
    a=2;
    for (    ItemStack s2 : k.getContents()) {
      if (s2 != null) {
        i.setItem((9 * a) + b,s2);
        a++;
      }
    }
    a=0;
    b++;
  }
  p.openInventory(i);
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public void showMenu(Player p){
  GameManager.getInstance().openKitMenu(p);
  Inventory i=Bukkit.getServer().createInventory(p,90,ChatColor.RED + "String_Node_Str" + ChatColor.BOLD+ "String_Node_Str");
  int a=0;
  int b=0;
  ArrayList<Kit> kits=GameManager.getInstance().getKits(p);
  if (kits == null || kits.size() == 0) {
    GameManager.getInstance().leaveKitMenu(p);
    return;
  }
  for (  Kit k : kits) {
    ItemStack i1=k.getIcon();
    ItemMeta im=i1.getItemMeta();
    debug(k.getName() + "String_Node_Str" + i1+ "String_Node_Str"+ im);
    im.setDisplayName(ChatColor.GOLD + "String_Node_Str" + ChatColor.BOLD+ k.getName());
    i1.setItemMeta(im);
    i.setItem((9 * a) + b,i1);
    a=2;
    for (    ItemStack s2 : k.getContents()) {
      if (s2 != null) {
        i.setItem((9 * a) + b,s2);
        a++;
      }
    }
    a=0;
    b++;
  }
  p.openInventory(i);
  debug("String_Node_Str");
}
Program: 161972
Project: 161972
Buggy source:
public void setup(){
  mode=GameMode.LOADING;
  int x=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  int y=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  int z=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  System.out.println(x + "String_Node_Str" + y+ "String_Node_Str"+ z);
  int x1=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  int y1=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  int z1=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  System.out.println(x1 + "String_Node_Str" + y1+ "String_Node_Str"+ z1);
  Location max=new Location(SettingsManager.getGameWorld(gameID),Math.max(x,x1),Math.max(y,y1),Math.max(z,z1));
  System.out.println(max.toString());
  Location min=new Location(SettingsManager.getGameWorld(gameID),Math.min(x,x1),Math.min(y,y1),Math.min(z,z1));
  System.out.println(min.toString());
  arena=new Arena(min,max);
  loadspawns();
  hookvars.put("String_Node_Str",gameID + "String_Node_Str");
  hookvars.put("String_Node_Str",spawnCount + "String_Node_Str");
  hookvars.put("String_Node_Str","String_Node_Str");
  mode=GameMode.WAITING;
}

Fixed version (ground truth):
public void setup(){
  mode=GameMode.LOADING;
  int x=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  int y=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  int z=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  $(x + "String_Node_Str" + y+ "String_Node_Str"+ z);
  int x1=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  int y1=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  int z1=s.getInt("String_Node_Str" + gameID + "String_Node_Str");
  $(x1 + "String_Node_Str" + y1+ "String_Node_Str"+ z1);
  Location max=new Location(SettingsManager.getGameWorld(gameID),Math.max(x,x1),Math.max(y,y1),Math.max(z,z1));
  $(max.toString());
  Location min=new Location(SettingsManager.getGameWorld(gameID),Math.min(x,x1),Math.min(y,y1),Math.min(z,z1));
  $(min.toString());
  arena=new Arena(min,max);
  loadspawns();
  hookvars.put("String_Node_Str",gameID + "String_Node_Str");
  hookvars.put("String_Node_Str",spawnCount + "String_Node_Str");
  hookvars.put("String_Node_Str","String_Node_Str");
  mode=GameMode.WAITING;
}
Program: 161973
Project: 161973
Buggy source:
public void LoadKits(){
  Set<String> kits1=SettingsManager.getInstance().getKits().getConfigurationSection("String_Node_Str").getKeys(false);
  System.out.println(kits1);
  for (  String s : kits1) {
    kits.add(new Kit(s));
  }
}

Fixed version (ground truth):
public void LoadKits(){
  Set<String> kits1=SettingsManager.getInstance().getKits().getConfigurationSection("String_Node_Str").getKeys(false);
  for (  String s : kits1) {
    kits.add(new Kit(s));
  }
}
Program: 161974
Project: 161974
Buggy source:
public void LoadGames(){
  FileConfiguration c=SettingsManager.getInstance().getSystemConfig();
  games.clear();
  int no=c.getInt("String_Node_Str",0);
  int loaded=0;
  int a=1;
  while (loaded < no) {
    if (c.isSet("String_Node_Str" + a + "String_Node_Str")) {
      if (c.getBoolean("String_Node_Str" + a + "String_Node_Str")) {
        System.out.println("String_Node_Str" + a);
        loaded++;
        games.add(new Game(a));
        StatsManager.getInstance().addArena(a);
      }
    }
    a++;
  }
  LobbyManager.getInstance().clearAllSigns();
}

Fixed version (ground truth):
public void LoadGames(){
  FileConfiguration c=SettingsManager.getInstance().getSystemConfig();
  games.clear();
  int no=c.getInt("String_Node_Str",0);
  int loaded=0;
  int a=1;
  while (loaded < no) {
    if (c.isSet("String_Node_Str" + a + "String_Node_Str")) {
      if (c.getBoolean("String_Node_Str" + a + "String_Node_Str")) {
        SurvivalGames.$("String_Node_Str" + a);
        loaded++;
        games.add(new Game(a));
        StatsManager.getInstance().addArena(a);
      }
    }
    a++;
  }
  LobbyManager.getInstance().clearAllSigns();
}
Program: 161975
Project: 161975
Buggy source:
public void loadSign(int a){
  try {
    System.out.println("String_Node_Str" + a + "String_Node_Str");
    World w=Bukkit.getWorld(s.getString("String_Node_Str" + a + "String_Node_Str"));
    int x1=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int y1=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int z1=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int x2=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int y2=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int z2=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int gameid=s.getInt("String_Node_Str" + a + "String_Node_Str");
    LobbyWall ls=new LobbyWall(gameid);
    if (ls.loadSign(w,x1,x2,z1,z2,y1)) {
      ArrayList<LobbyWall> t=signs.get(gameid);
      if (t == null) {
        t=new ArrayList<LobbyWall>();
        signs.put(gameid,t);
      }
      t.add(ls);
      ls.update();
    }
 else {
    }
  }
 catch (  Exception e) {
    s.set("String_Node_Str" + a,null);
    s.set("String_Node_Str",s.getInt("String_Node_Str") - 1);
  }
}

Fixed version (ground truth):
public void loadSign(int a){
  try {
    SurvivalGames.debug("String_Node_Str" + a + "String_Node_Str");
    World w=Bukkit.getWorld(s.getString("String_Node_Str" + a + "String_Node_Str"));
    int x1=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int y1=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int z1=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int x2=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int y2=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int z2=s.getInt("String_Node_Str" + a + "String_Node_Str");
    int gameid=s.getInt("String_Node_Str" + a + "String_Node_Str");
    LobbyWall ls=new LobbyWall(gameid);
    if (ls.loadSign(w,x1,x2,z1,z2,y1)) {
      ArrayList<LobbyWall> t=signs.get(gameid);
      if (t == null) {
        t=new ArrayList<LobbyWall>();
        signs.put(gameid,t);
      }
      t.add(ls);
      ls.update();
    }
 else {
    }
  }
 catch (  Exception e) {
    s.set("String_Node_Str" + a,null);
    s.set("String_Node_Str",s.getInt("String_Node_Str") - 1);
  }
}
Program: 161977
Project: 161977
Buggy source:
public void run(){
  ArrayList<BlockData> data=queue.get(id);
  if (data != null) {
    int a=data.size() - 1;
    int rb=0;
    while (a >= 0 && (rb < 100 || shutdown)) {
      System.out.println("String_Node_Str" + a);
      BlockData result=data.get(a);
      if (result.getGameId() == game.getID()) {
        data.remove(a);
        Location l=new Location(Bukkit.getWorld(result.getWorld()),result.getX(),result.getY(),result.getZ());
        Block b=l.getBlock();
        b.setTypeIdAndData(result.getPrevid(),result.getPrevdata(),false);
        b.getState().update();
        rb++;
      }
      a--;
    }
    if (a != -1) {
      Bukkit.getScheduler().scheduleSyncDelayedTask(GameManager.getInstance().getPlugin(),new Rollback(id,shutdown),1);
    }
 else {
      System.out.println("String_Node_Str" + id + "String_Node_Str");
      game.resetCallback();
    }
  }
 else {
    System.out.println("String_Node_Str" + id + "String_Node_Str");
    game.resetCallback();
  }
}

Fixed version (ground truth):
public void run(){
  ArrayList<BlockData> data=queue.get(id);
  if (data != null) {
    int a=data.size() - 1;
    int rb=0;
    while (a >= 0 && (rb < 100 || shutdown)) {
      SurvivalGames.debug("String_Node_Str" + a);
      BlockData result=data.get(a);
      if (result.getGameId() == game.getID()) {
        data.remove(a);
        Location l=new Location(Bukkit.getWorld(result.getWorld()),result.getX(),result.getY(),result.getZ());
        Block b=l.getBlock();
        b.setTypeIdAndData(result.getPrevid(),result.getPrevdata(),false);
        b.getState().update();
        rb++;
      }
      a--;
    }
    if (a != -1) {
      Bukkit.getScheduler().scheduleSyncDelayedTask(GameManager.getInstance().getPlugin(),new Rollback(id,shutdown),1);
    }
 else {
      SurvivalGames.$("String_Node_Str" + id + "String_Node_Str");
      game.resetCallback();
    }
  }
 else {
    SurvivalGames.$("String_Node_Str" + id + "String_Node_Str");
    game.resetCallback();
  }
}
Program: 161978
Project: 161978
Buggy source:
public void load(){
  FileConfiguration c=SettingsManager.getInstance().getKits();
  cost=c.getDouble("String_Node_Str" + name + "String_Node_Str",0);
  icon=ItemReader.read(c.getString("String_Node_Str" + name + "String_Node_Str"));
  System.out.println(icon);
  List<String> cont=c.getStringList("String_Node_Str" + name + "String_Node_Str");
  for (  String s : cont) {
    System.out.println(s);
    items.add(ItemReader.read(s));
  }
}

Fixed version (ground truth):
public void load(){
  FileConfiguration c=SettingsManager.getInstance().getKits();
  cost=c.getDouble("String_Node_Str" + name + "String_Node_Str",0);
  icon=ItemReader.read(c.getString("String_Node_Str" + name + "String_Node_Str"));
  System.out.println(icon);
  List<String> cont=c.getStringList("String_Node_Str" + name + "String_Node_Str");
  for (  String s : cont) {
    items.add(ItemReader.read(s));
  }
}
Program: 161979
Project: 161979
Buggy source:
public static String replaceVars(String msg,String[] vars){
  for (  String str : vars) {
    String[] s=str.split("String_Node_Str");
    varcache.put(s[0],s[1]);
  }
  for (  String str : varcache.keySet()) {
    try {
      msg=msg.replace("String_Node_Str" + str + "String_Node_Str",varcache.get(str));
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + str);
    }
  }
  return msg;
}

Fixed version (ground truth):
public static String replaceVars(String msg,String[] vars){
  for (  String str : vars) {
    String[] s=str.split("String_Node_Str");
    varcache.put(s[0],s[1]);
  }
  for (  String str : varcache.keySet()) {
    try {
      msg=msg.replace("String_Node_Str" + str + "String_Node_Str",varcache.get(str));
    }
 catch (    Exception e) {
      SurvivalGames.$(Level.WARNING,"String_Node_Str" + str);
    }
  }
  return msg;
}
Program: 161981
Project: 161981
Buggy source:
/** 
 * Sets custom provide key/value as custom property.
 * @param key String with key for the property
 * @param value String with value for the property
 */
public void setProperty(String key,String value){
  UserData.setCustomProperty(key,value);
}

Fixed version (ground truth):
/** 
 * Sets custom provide key/value as custom property.
 * @param key String with key for the property
 * @param value String with value for the property
 */
public void setProperty(String key,String value){
  UserData.modifyCustomData(key,value,"String_Node_Str");
}
Program: 161983
Project: 161983
Buggy source:
private <T>T postForObject(String url,T object,Class<T> objectClass,String... params){
  return restTemplate.postForObject(url,object,objectClass,enrichParams(params));
}

Fixed version (ground truth):
private <T>T postForObject(String url,T object,Class<T> objectClass,String... params){
  logger.debug("String_Node_Str",url,objectClass.getCanonicalName(),params);
  return restTemplate.postForObject(url,object,objectClass,enrichParams(params));
}
Program: 161984
Project: 161984
Buggy source:
private void postForLocation(String url,Object object,String... params){
  restTemplate.postForLocation(url,object,enrichParams(params));
}

Fixed version (ground truth):
private void postForLocation(String url,Object object,String... params){
  logger.debug("String_Node_Str",url,object.getClass().getCanonicalName(),params);
  restTemplate.postForLocation(url,object,enrichParams(params));
}
Program: 161985
Project: 161985
Buggy source:
private <T>T get(String url,Class<T> objectClass,String... params){
  return restTemplate.getForObject(url,objectClass,enrichParams(params));
}

Fixed version (ground truth):
private <T>T get(String url,Class<T> objectClass,String... params){
  logger.debug("String_Node_Str",url,objectClass.getCanonicalName(),params);
  return restTemplate.getForObject(url,objectClass,enrichParams(params));
}
Program: 161986
Project: 161986
Buggy source:
public TrelloUrl params(Argument... args){
  TrelloUrl.args=args;
  return this;
}

Fixed version (ground truth):
public TrelloUrl params(Argument... args){
  this.args=args;
  return this;
}
Program: 161987
Project: 161987
Buggy source:
static void configureDefaultProperties(SessionFactory sessionFactory,Properties properties){
  if (properties == null) {
    DEFAULT_PROPERTIES.remove(sessionFactory);
  }
 else {
    DEFAULT_PROPERTIES.put(sessionFactory,properties);
  }
}

Fixed version (ground truth):
static void configureDefaultProperties(SessionFactory sessionFactory,Properties properties){
  if (properties == null) {
    DEFAULT_PROPERTIES.remove(sessionFactory);
    DEFAULT_USEJDBC42.remove(sessionFactory);
  }
 else {
    DEFAULT_PROPERTIES.put(sessionFactory,properties);
  }
}
Program: 161989
Project: 161989
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public <T>T clone(T obj){
  return UNSAFE_OPERATIONS.deepCopy(obj);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public <T>T clone(T obj){
  return clone(obj,this,new IdentityHashMap<>());
}
Program: 161991
Project: 161991
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public <T>T clone(T obj){
  return clone(obj,this,new IdentityHashMap<>());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public <T>T clone(T obj){
  return clone(obj,this,new IdentityHashMap<Object,Object>());
}
Program: 161992
Project: 161992
Buggy source:
/** 
 * Determines the ID for the entity
 * @param entity The entity to retrieve the ID for
 * @return The ID
 */
protected ID extractId(T entity){
  Class<?> entityClass=TypeHelper.getTypeArguments(JpaBaseRepository.class,this.getClass()).get(0);
  SessionFactory sf=((HibernateEntityManagerFactory)getEntityManager().getEntityManagerFactory()).getSessionFactory();
  ClassMetadata cmd=sf.getClassMetadata(entityClass);
  @SuppressWarnings("String_Node_Str") ID result=(ID)cmd.getIdentifier(entity,(SessionImplementor)((HibernateEntityManagerFactory)getEntityManager().getDelegate()));
  return result;
}

Fixed version (ground truth):
/** 
 * Determines the ID for the entity
 * @param entity The entity to retrieve the ID for
 * @return The ID
 */
protected ID extractId(T entity){
  final Class<?> entityClass=TypeHelper.getTypeArguments(JpaBaseRepository.class,this.getClass()).get(0);
  final SessionFactory sf=((HibernateEntityManagerFactory)getEntityManager().getEntityManagerFactory()).getSessionFactory();
  final ClassMetadata cmd=sf.getClassMetadata(entityClass);
  final SessionImplementor si=(SessionImplementor)(getEntityManager().getDelegate());
  @SuppressWarnings("String_Node_Str") final ID result=(ID)cmd.getIdentifier(entity,si);
  return result;
}
Program: 161993
Project: 161993
Buggy source:
private static Method obtainDeclaredMethod(Class<?> clazz,String methodName,Class<?>... params){
  try {
    final Method method=clazz.getMethod(methodName,params);
    method.setAccessible(true);
    return method;
  }
 catch (  SecurityException ex1) {
    throw new ReflectionException("String_Node_Str" + methodName + "String_Node_Str"+ ex1.getMessage(),ex1);
  }
catch (  NoSuchMethodException ex2) {
    throw new ReflectionException("String_Node_Str" + methodName + "String_Node_Str"+ ex2.getMessage(),ex2);
  }
}

Fixed version (ground truth):
private static Method obtainDeclaredMethod(Class<?> clazz,String methodName,Class<?>... params){
  try {
    final Method method=clazz.getDeclaredMethod(methodName,params);
    method.setAccessible(true);
    return method;
  }
 catch (  SecurityException ex1) {
    throw new ReflectionException("String_Node_Str" + methodName + "String_Node_Str"+ ex1.getMessage(),ex1);
  }
catch (  NoSuchMethodException ex2) {
    throw new ReflectionException("String_Node_Str" + methodName + "String_Node_Str"+ ex2.getMessage(),ex2);
  }
}
Program: 161994
Project: 161994
Buggy source:
@Override public String toNonNullValue(LocalDateTime value){
  String formatted=LOCAL_DATETIME_FORMATTER.print(value);
  return formatted;
}

Fixed version (ground truth):
@Override public String toNonNullValue(LocalDateTime value){
  String formatted=LOCAL_DATETIME_PRINTER.print(value);
  return formatted;
}
Program: 161995
Project: 161995
Buggy source:
@Override public LocalDateTime fromNonNullValue(String s){
  return LOCAL_DATETIME_FORMATTER.parseDateTime(s).toLocalDateTime();
}

Fixed version (ground truth):
@Override public LocalDateTime fromNonNullValue(String s){
  return LOCAL_DATETIME_PARSER.parseDateTime(s).toLocalDateTime();
}
Program: 161996
Project: 161996
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void nullSafeSet(PreparedStatement preparedStatement,Object value,int index) throws HibernateException, SQLException {
  if (value == null) {
    for (int i=0; i < getColumnMappers().length; i++) {
      ColumnMapper<?,?> nextMapper=getColumnMappers()[i];
      if (Hibernate36Helper.isHibernate36ApiAvailable()) {
        Hibernate36Helper.nullSafeSet(nextMapper,preparedStatement,null,index);
      }
 else {
        ((org.hibernate.type.NullableType)nextMapper.getHibernateType()).nullSafeSet(preparedStatement,null,index);
      }
    }
  }
 else {
    final T myValue=(T)value;
    Object[] convertedColumns=toConvertedColumns(myValue);
    for (int i=0; i < getColumnMappers().length; i++) {
      ColumnMapper nextMapper=getColumnMappers()[i];
      if (Hibernate36Helper.isHibernate36ApiAvailable()) {
        Hibernate36Helper.nullSafeSet(nextMapper,preparedStatement,nextMapper.toNonNullValue(convertedColumns[i]),index + i);
      }
 else {
        ((org.hibernate.type.NullableType)nextMapper.getHibernateType()).nullSafeSet(preparedStatement,nextMapper.toNonNullValue(convertedColumns[i]),index + i);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void nullSafeSet(PreparedStatement preparedStatement,Object value,int index) throws HibernateException, SQLException {
  if (value == null) {
    for (int i=0; i < getColumnMappers().length; i++) {
      ColumnMapper<?,?> nextMapper=getColumnMappers()[i];
      if (Hibernate36Helper.isHibernate36ApiAvailable()) {
        Hibernate36Helper.nullSafeSet(nextMapper,preparedStatement,null,index + i);
      }
 else {
        ((org.hibernate.type.NullableType)nextMapper.getHibernateType()).nullSafeSet(preparedStatement,null,index + i);
      }
    }
  }
 else {
    final T myValue=(T)value;
    Object[] convertedColumns=toConvertedColumns(myValue);
    for (int i=0; i < getColumnMappers().length; i++) {
      ColumnMapper nextMapper=getColumnMappers()[i];
      if (Hibernate36Helper.isHibernate36ApiAvailable()) {
        Hibernate36Helper.nullSafeSet(nextMapper,preparedStatement,nextMapper.toNonNullValue(convertedColumns[i]),index + i);
      }
 else {
        ((org.hibernate.type.NullableType)nextMapper.getHibernateType()).nullSafeSet(preparedStatement,nextMapper.toNonNullValue(convertedColumns[i]),index + i);
      }
    }
  }
}
Program: 161997
Project: 161997
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 161998
Project: 161998
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 161999
Project: 161999
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162000
Project: 162000
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162001
Project: 162001
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162002
Project: 162002
Buggy source:
@Override public Long toNonNullValue(Instant value){
  return new Long(value.getMillis());
}

Fixed version (ground truth):
@Override public Long toNonNullValue(Instant value){
  return Long.valueOf(value.getMillis());
}
Program: 162003
Project: 162003
Buggy source:
@Override public Long toNonNullValue(LocalTime value){
  return new Long(value.getMillisOfDay() * 1000000L);
}

Fixed version (ground truth):
@Override public Long toNonNullValue(LocalTime value){
  return Long.valueOf(value.getMillisOfDay() * 1000000L);
}
Program: 162004
Project: 162004
Buggy source:
@Override public Long toNonNullValue(TimeOfDay value){
  return new Long((value.toLocalTime().getMillisOfDay()) * 1000000L);
}

Fixed version (ground truth):
@Override public Long toNonNullValue(TimeOfDay value){
  return Long.valueOf((value.toLocalTime().getMillisOfDay()) * 1000000L);
}
Program: 162005
Project: 162005
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162006
Project: 162006
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162007
Project: 162007
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162008
Project: 162008
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162009
Project: 162009
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162010
Project: 162010
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162011
Project: 162011
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162012
Project: 162012
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162013
Project: 162013
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162014
Project: 162014
Buggy source:
@Override public ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}

Fixed version (ground truth):
@Override protected ColumnMapper<?,?>[] getColumnMappers(){
  return columnMappers;
}
Program: 162015
Project: 162015
Buggy source:
@Override public Long toNonNullValue(LocalTime value){
  return new Long(value.toNanoOfDay());
}

Fixed version (ground truth):
@Override public Long toNonNullValue(LocalTime value){
  return Long.valueOf(value.toNanoOfDay());
}
Program: 162016
Project: 162016
Buggy source:
public int[] sqlTypes(){
  return sqlTypes;
}

Fixed version (ground truth):
public int[] sqlTypes(){
  return Arrays.copyOf(sqlTypes,sqlTypes.length);
}
Program: 162017
Project: 162017
Buggy source:
public abstract ColumnMapper<?,?>[] getColumnMappers();

Fixed version (ground truth):
protected abstract ColumnMapper<?,?>[] getColumnMappers();
Program: 162018
Project: 162018
Buggy source:
public final int[] sqlTypes(){
  return sqlTypes;
}

Fixed version (ground truth):
public final int[] sqlTypes(){
  return Arrays.copyOf(sqlTypes,sqlTypes.length);
}
Program: 162019
Project: 162019
Buggy source:
/** 
 * <p> Converts the selected item from the drop down list into a sequence of character that can be used in the edit box. </p>
 * @param selectedItem the item selected by the user for completion
 * @return a sequence of characters representing the selected suggestion
 */
protected CharSequence convertSelectionToString(Object selectedItem){
  return mFilter.convertResultToString(selectedItem);
}

Fixed version (ground truth):
/** 
 * <p> Converts the selected item from the drop down list into a sequence of character that can be used in the edit box. </p>
 * @param selectedItem the item selected by the user for completion
 * @return a sequence of characters representing the selected suggestion
 */
protected CharSequence convertSelectionToString(Object selectedItem){
  if (mFilter == null) {
    return selectedItem == null ? "String_Node_Str" : selectedItem.toString();
  }
  return mFilter.convertResultToString(selectedItem);
}
Program: 162020
Project: 162020
Buggy source:
void setCombinedAdapter(ListAdapter adapter){
  if (mObserver == null) {
    mObserver=new PopupDataSetObserver();
  }
 else   if (mCombinedAdapter != null) {
    mCombinedAdapter.unregisterDataSetObserver(mObserver);
  }
  mCombinedAdapter=adapter;
  if (mCombinedAdapter != null) {
    adapter.registerDataSetObserver(mObserver);
  }
  if (mDropDownList != null) {
    mDropDownList.setAdapter(mCombinedAdapter);
  }
}

Fixed version (ground truth):
void setCombinedAdapter(ListAdapter adapter){
  if (adapter == null) {
    if (mObserver != null && mCombinedAdapter != null) {
      mCombinedAdapter.unregisterDataSetObserver(mObserver);
    }
    mCombinedAdapter=null;
    mFilter=null;
    return;
  }
  if (mObserver == null) {
    mObserver=new PopupDataSetObserver();
  }
 else   if (mCombinedAdapter != null) {
    mCombinedAdapter.unregisterDataSetObserver(mObserver);
  }
  mCombinedAdapter=adapter;
  if (mCombinedAdapter != null) {
    adapter.registerDataSetObserver(mObserver);
  }
  if (mDropDownList != null) {
    mDropDownList.setAdapter(mCombinedAdapter);
  }
}
Program: 162021
Project: 162021
Buggy source:
void doAfterTextChanged(){
  if (mBlockCompletion)   return;
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + mOpenBefore + "String_Node_Str"+ isPopupShowing());
  if (mOpenBefore && !isPopupShowing()) {
    return;
  }
  if (mFilter != null) {
    performFiltering(getText(),mLastKeyCode);
  }
}

Fixed version (ground truth):
void doAfterTextChanged(){
  if (mBlockCompletion)   return;
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + mOpenBefore + "String_Node_Str"+ isPopupShowing());
  if (mOpenBefore && !isPopupShowing()) {
    return;
  }
  performFiltering(getText(),mLastKeyCode);
}
Program: 162022
Project: 162022
Buggy source:
/** 
 * <p> Starts filtering the content of the drop down list. The filtering pattern is the content of the edit box. Subclasses should override this method to filter with a different pattern, for instance a substring of <code>text</code>. </p>
 * @param text the filtering pattern
 * @param keyCode the last character inserted in the edit box; beware that this will be null when text is being added through a soft input method.
 */
protected void performFiltering(CharSequence text,int keyCode){
  if (text == null) {
    updateDropDownForFilter(0,true);
  }
 else {
    mFilter.filter(text,new Filter.FilterListener(){
      @Override public void onFilterComplete(      int count){
        updateDropDownForFilter(count,false);
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * <p> Starts filtering the content of the drop down list. The filtering pattern is the content of the edit box. Subclasses should override this method to filter with a different pattern, for instance a substring of <code>text</code>. </p>
 * @param text the filtering pattern
 * @param keyCode the last character inserted in the edit box; beware that this will be null when text is being added through a soft input method.
 */
protected void performFiltering(CharSequence text,int keyCode){
  if (text == null) {
    updateDropDownForFilter(0,true);
  }
 else {
    if (mFilter != null) {
      mFilter.filter(text,new Filter.FilterListener(){
        @Override public void onFilterComplete(        int count){
          updateDropDownForFilter(count,false);
        }
      }
);
    }
  }
}
Program: 162023
Project: 162023
Buggy source:
private <T extends ListAdapter & Filterable>void setHistoryAdapter(T adapter){
  mHistoryAdapter=adapter;
  if (adapter != null) {
    mHistoryFilter=adapter.getFilter();
  }
}

Fixed version (ground truth):
private <T extends ListAdapter & Filterable>void setHistoryAdapter(T adapter){
  mHistoryAdapter=adapter;
  if (adapter != null) {
    mHistoryFilter=adapter.getFilter();
  }
  rebuildCombinedAdapter();
}
Program: 162024
Project: 162024
Buggy source:
@Override protected void performFiltering(final CharSequence text,final int keyCode){
  if (mFirstFiltering) {
    rebuildAdapter();
    mFirstFiltering=false;
  }
  if (text == null) {
    HistoryEditText.super.performFiltering(text,keyCode);
  }
 else   if (mHistoryFilter != null) {
    mHistoryFilter.filter(text,new FilterListener(){
      @Override public void onFilterComplete(      int count){
        HistoryEditText.super.performFiltering(text,keyCode);
      }
    }
);
  }
}

Fixed version (ground truth):
@Override protected void performFiltering(final CharSequence text,final int keyCode){
  if (mFirstFiltering) {
    rebuildHistoryAdapter();
    mFirstFiltering=false;
  }
  if (text == null) {
    HistoryEditText.super.performFiltering(text,keyCode);
  }
 else   if (mHistoryFilter != null) {
    mHistoryFilter.filter(text,new FilterListener(){
      @Override public void onFilterComplete(      int count){
        HistoryEditText.super.performFiltering(text,keyCode);
      }
    }
);
  }
}
Program: 162025
Project: 162025
Buggy source:
@Override public void onEditorAction(int actionCode){
  super.onEditorAction(actionCode);
  if (actionCode == getImeOptions()) {
    addCurrentTextToHistory();
    rebuildAdapter();
  }
}

Fixed version (ground truth):
@Override public void onEditorAction(int actionCode){
  super.onEditorAction(actionCode);
  if (actionCode == getImeOptions()) {
    addCurrentTextToHistory();
    rebuildHistoryAdapter();
  }
}
Program: 162026
Project: 162026
Buggy source:
public void clearHistory(){
  boolean wasShowing=isPopupShowing();
  SQLiteDatabase db=HistoryDb.getWritable(getContext());
  HistoryDb.clear(db);
  db.close();
  rebuildAdapter();
  if (wasShowing) {
    showDropDown();
  }
}

Fixed version (ground truth):
public void clearHistory(){
  boolean wasShowing=isPopupShowing();
  SQLiteDatabase db=HistoryDb.getWritable(getContext());
  HistoryDb.clear(db);
  db.close();
  rebuildHistoryAdapter();
  if (wasShowing) {
    showDropDown();
  }
}
Program: 162027
Project: 162027
Buggy source:
@Override protected ListAdapter getCombinedAdapter(ListAdapter userAdapter){
  if (mHistoryAdapter == null) {
    if (enoughToFilter()) {
      return userAdapter;
    }
 else {
      return null;
    }
  }
 else {
    if (enoughToFilter()) {
      MergeAdapter mergeAdapter=new MergeAdapter();
      mergeAdapter.addAdapter(mHistoryAdapter);
      mergeAdapter.addAdapter(userAdapter);
      return mergeAdapter;
    }
 else {
      return mHistoryAdapter;
    }
  }
}

Fixed version (ground truth):
@Override protected ListAdapter getCombinedAdapter(ListAdapter userAdapter){
  if (mHistoryAdapter == null) {
    if (enoughToFilter()) {
      return userAdapter;
    }
 else {
      return null;
    }
  }
 else {
    if (enoughToFilter() && userAdapter != null) {
      MergeAdapter mergeAdapter=new MergeAdapter();
      mergeAdapter.addAdapter(mHistoryAdapter);
      mergeAdapter.addAdapter(userAdapter);
      return mergeAdapter;
    }
 else {
      return mHistoryAdapter;
    }
  }
}
Program: 162028
Project: 162028
Buggy source:
private void onPost(){
  JSONObject obj=new JSONObject();
  if (m_title != null)   m_title.clearComposingText();
  if (m_content != null)   m_content.clearComposingText();
  m_progress=ProgressDialog.show(this,getString(R.string.posting_title),getString(R.string.status_submitting_post));
  m_progress.setIndeterminate(true);
  try {
switch (m_type) {
case TYPE_IMAGE:
      if (!isImageLink()) {
        PostImageTask t=new PostImageTask();
        t.execute(m_imageUri);
        return;
      }
    obj.put("String_Node_Str","String_Node_Str");
case TYPE_NOTE:
  obj.put("String_Node_Str","String_Node_Str");
break;
case TYPE_COMMENT:
obj.put("String_Node_Str","String_Node_Str");
break;
case TYPE_VIDEO:
obj.put("String_Node_Str","String_Node_Str");
if (m_videoLink != null) obj.put("String_Node_Str",m_videoLink);
if (m_embedCode != null) obj.put("String_Node_Str",m_embedCode);
break;
default :
throw new RuntimeException("String_Node_Str");
}
if (m_imageUri != null) {
JSONObject image=new JSONObject();
image.put("String_Node_Str",m_imageUri);
obj.put("String_Node_Str",image);
}
postPhase2(obj);
}
 catch (Exception ex) {
Log.e(TAG,"String_Node_Str",ex);
Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
}
}

Fixed version (ground truth):
private void onPost(){
  if (m_type == TYPE_NOTE && m_content.getText().length() == 0) {
    new AlertDialog.Builder(this).setTitle(R.string.title_error_dialog).setMessage(R.string.error_no_message_specified).show();
    return;
  }
  if (m_postTo.length() == 0 && m_postCc.length() == 0 && !m_implicitAudience) {
    new AlertDialog.Builder(this).setTitle(R.string.title_error_dialog).setMessage(R.string.error_no_recipients).show();
    return;
  }
  JSONObject obj=new JSONObject();
  if (m_title != null)   m_title.clearComposingText();
  if (m_content != null)   m_content.clearComposingText();
  m_progress=ProgressDialog.show(this,getString(R.string.posting_title),getString(R.string.status_submitting_post));
  m_progress.setIndeterminate(true);
  try {
switch (m_type) {
case TYPE_IMAGE:
      if (!isImageLink()) {
        PostImageTask t=new PostImageTask();
        t.execute(m_imageUri);
        return;
      }
    obj.put("String_Node_Str","String_Node_Str");
case TYPE_NOTE:
  obj.put("String_Node_Str","String_Node_Str");
break;
case TYPE_COMMENT:
obj.put("String_Node_Str","String_Node_Str");
break;
case TYPE_VIDEO:
obj.put("String_Node_Str","String_Node_Str");
if (m_videoLink != null) obj.put("String_Node_Str",m_videoLink);
if (m_embedCode != null) obj.put("String_Node_Str",m_embedCode);
break;
default :
throw new RuntimeException("String_Node_Str");
}
if (m_imageUri != null) {
JSONObject image=new JSONObject();
image.put("String_Node_Str",m_imageUri);
obj.put("String_Node_Str",image);
}
postPhase2(obj);
}
 catch (Exception ex) {
Log.e(TAG,"String_Node_Str",ex);
Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
}
}
Program: 162029
Project: 162029
Buggy source:
public void getNearbyPlaces(AddressListener l){
synchronized (this) {
    while (m_looper == null) {
      try {
        this.wait();
      }
 catch (      InterruptedException ex) {
      }
    }
  }
  if (m_listeners.size() == 0) {
    m_locationManager.requestSingleUpdate(m_criteria,this,m_looper);
  }
  m_listeners.add(l);
}

Fixed version (ground truth):
public void getNearbyPlaces(AddressListener l){
synchronized (this) {
    while (m_looper == null) {
      try {
        this.wait();
      }
 catch (      InterruptedException ex) {
      }
    }
  }
  if (m_listeners.size() == 0) {
    try {
      m_locationManager.requestSingleUpdate(m_criteria,this,m_looper);
    }
 catch (    RuntimeException e) {
      Toast.makeText(m_context,"String_Node_Str",15);
      SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(m_context);
      prefs.edit().putString(Constants.PREF_MY_LOCATION,"String_Node_Str").apply();
      m_mainHandler.post(m_dispatchLocationUpdates);
      return;
    }
  }
  m_listeners.add(l);
}
Program: 162030
Project: 162030
Buggy source:
@Override protected JSONObject doInBackground(Void... arg0){
  Uri uri=getIntent().getData();
  String proxyUrl=getIntent().getStringExtra("String_Node_Str");
  try {
    return m_cache.getObject(uri.toString(),proxyUrl);
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
    Toast.makeText(ObjectActivity.this,"String_Node_Str" + e.getMessage(),Toast.LENGTH_LONG).show();
    return null;
  }
}

Fixed version (ground truth):
@Override protected JSONObject doInBackground(Void... arg0){
  Uri uri=getIntent().getData();
  String proxyUrl=getIntent().getStringExtra("String_Node_Str");
  try {
    return m_cache.getObject(uri.toString(),proxyUrl);
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
    return null;
  }
}
Program: 162031
Project: 162031
Buggy source:
protected void onPostExecute(final JSONObject obj){
  onGotObject(obj);
}

Fixed version (ground truth):
protected void onPostExecute(final JSONObject obj){
  if (obj != null) {
    onGotObject(obj);
  }
 else {
    Toast.makeText(ObjectActivity.this,"String_Node_Str",Toast.LENGTH_SHORT);
    finishActivity(RESULT_CANCELED);
  }
}
Program: 162032
Project: 162032
Buggy source:
private void onPost(){
  try {
    JSONObject obj=new JSONObject();
    String generator=Utils.readAll(getResources().openRawResource(R.raw.generator));
    if (m_inReplyTo == null) {
      obj.put("String_Node_Str","String_Node_Str");
    }
 else {
      obj.put("String_Node_Str","String_Node_Str");
      obj.put("String_Node_Str",m_inReplyTo);
    }
    obj.put("String_Node_Str",Html.toHtml(m_content.getEditableText()));
    JSONObject act=new JSONObject();
    act.put("String_Node_Str",new JSONObject(generator));
    act.put("String_Node_Str","String_Node_Str");
    act.put("String_Node_Str",obj);
    PostTask t=new PostTask();
    t.execute(act.toString());
  }
 catch (  Exception ex) {
    Toast.makeText(this,"String_Node_Str" + ex.getLocalizedMessage(),Toast.LENGTH_SHORT).show();
  }
}

Fixed version (ground truth):
private void onPost(){
  try {
    JSONObject obj=new JSONObject();
    String generator=Utils.readAll(getResources().openRawResource(R.raw.generator));
    if (m_inReplyTo == null) {
      obj.put("String_Node_Str","String_Node_Str");
    }
 else {
      obj.put("String_Node_Str","String_Node_Str");
      obj.put("String_Node_Str",m_inReplyTo);
    }
    obj.put("String_Node_Str",Html.toHtml((Spanned)m_content.getText()));
    JSONObject act=new JSONObject();
    act.put("String_Node_Str",new JSONObject(generator));
    act.put("String_Node_Str","String_Node_Str");
    act.put("String_Node_Str",obj);
    PostTask t=new PostTask();
    t.execute(act.toString());
  }
 catch (  Exception ex) {
    Toast.makeText(this,"String_Node_Str" + ex.getLocalizedMessage(),Toast.LENGTH_SHORT).show();
  }
}