nus-yam/ex-repair huggingface dataset:
Program: 38777
Project: 38777
Buggy source:
public static MVPortal loadMVPortalFromConfig(MultiversePortals instance,String name){
  MVPortal portal=new MVPortal(instance,name);
  portal.setDestination(portal.config.getString(portal.portalConfigString + "String_Node_Str","String_Node_Str"));
  String portalLocString=portal.config.getString(portal.portalConfigString + "String_Node_Str","String_Node_Str");
  String worldString=portal.config.getString(portal.portalConfigString + "String_Node_Str","String_Node_Str");
  portal.setPortalLocation(portalLocString,worldString);
  portal.setOwner(portal.config.getString(portal.portalConfigString + "String_Node_Str","String_Node_Str"));
  return portal;
}

Fixed version (ground truth):
public static MVPortal loadMVPortalFromConfig(MultiversePortals instance,String name){
  MVPortal portal=new MVPortal(instance,name);
  String portalLocString=portal.config.getString(portal.portalConfigString + "String_Node_Str","String_Node_Str");
  String worldString=portal.config.getString(portal.portalConfigString + "String_Node_Str","String_Node_Str");
  portal.setPortalLocation(portalLocString,worldString);
  portal.setOwner(portal.config.getString(portal.portalConfigString + "String_Node_Str","String_Node_Str"));
  return portal;
}
Program: 38778
Project: 38778
Buggy source:
private void loadPortals(){
  this.MVPconfig=new Configuration(new File(getDataFolder(),"String_Node_Str"));
  this.MVPconfig.load();
  List<String> keys=this.MVPconfig.getKeys("String_Node_Str");
  if (keys != null) {
    for (    String pname : keys) {
      this.portalManager.addPortal(MVPortal.loadMVPortalFromConfig(this,pname));
    }
  }
}

Fixed version (ground truth):
private void loadPortals(){
  this.MVPconfig=new Configuration(new File(getDataFolder(),"String_Node_Str"));
  this.MVPconfig.load();
  List<String> keys=this.MVPconfig.getKeys("String_Node_Str");
  if (keys != null) {
    for (    String pname : keys) {
      this.portalManager.addPortal(MVPortal.loadMVPortalFromConfig(this,pname));
    }
  }
  for (  MVPortal portal : this.portalManager.getAllPortals()) {
    String dest=this.MVPconfig.getString("String_Node_Str" + portal.getName() + "String_Node_Str","String_Node_Str");
    if (dest != "String_Node_Str") {
      portal.setDestination(dest);
    }
  }
}
Program: 38779
Project: 38779
Buggy source:
/** 
 * This method should be called every time a player telports to a portal.
 */
public void playerDidTeleport(){
  this.hasMovedOutOfPortal=false;
}

Fixed version (ground truth):
/** 
 * This method should be called every time a player telports to a portal.
 * @param location
 */
public void playerDidTeleport(Location location){
  PortalManager pm=this.plugin.getPortalManager();
  if (pm.isPortal(this.player,location) != null) {
    this.hasMovedOutOfPortal=false;
    return;
  }
  this.hasMovedOutOfPortal=true;
}
Program: 38780
Project: 38780
Buggy source:
public void setStaleLocation(Location loc){
  if (this.getLocation().getBlockX() == loc.getBlockX() && this.getLocation().getBlockY() == loc.getBlockY() && this.getLocation().getBlockZ() == loc.getBlockZ()) {
    this.setStaleLocation(true);
  }
 else {
    this.setLocation(loc);
    this.setStaleLocation(false);
  }
}

Fixed version (ground truth):
public void setStaleLocation(Location loc,Type moveType){
  if (this.player.isInsideVehicle() && moveType != Type.VEHICLE_MOVE) {
    return;
  }
  if (this.getLocation().getBlockX() == loc.getBlockX() && this.getLocation().getBlockY() == loc.getBlockY() && this.getLocation().getBlockZ() == loc.getBlockZ()) {
    this.setStaleLocation(true);
  }
 else {
    this.setLocation(loc);
    this.setStaleLocation(false);
  }
}
Program: 38781
Project: 38781
Buggy source:
public boolean doTeleportPlayer(){
  return this.hasMovedOutOfPortal == true && this.standingIn != null;
}

Fixed version (ground truth):
public boolean doTeleportPlayer(Type eventType){
  if (eventType == Type.PLAYER_MOVE && this.player.isInsideVehicle()) {
    return false;
  }
  return this.hasMovedOutOfPortal == true && this.standingIn != null;
}
Program: 38782
Project: 38782
Buggy source:
@Override public void onPlayerMove(PlayerMoveEvent event){
  MVPlayerSession ps=this.plugin.core.getPlayerSession(event.getPlayer());
  if (ps != null && ps.isStaleLocation()) {
    return;
  }
  MVPortal portal=this.plugin.getPortalUtils().isPortal(event.getPlayer(),event.getTo());
  if (portal != null) {
    System.out.print("String_Node_Str" + portal);
    Destination d=portal.getDestination();
    Location l=null;
    if (d.getType() == DestinationType.World) {
      if (this.plugin.core.isMVWorld(d.getName())) {
        MVWorld w=this.plugin.core.getMVWorld(d.getName());
        l=w.getCBWorld().getSpawnLocation();
      }
 else       if (this.plugin.getServer().getWorld(d.getName()) != null) {
        l=this.plugin.getServer().getWorld(d.getName()).getSpawnLocation();
      }
    }
 else     if (d.getType() == DestinationType.Portal) {
    }
    if (l == null) {
      return;
    }
    event.getPlayer().teleport(l);
  }
}

Fixed version (ground truth):
@Override public void onPlayerMove(PlayerMoveEvent event){
  MVPlayerSession ps=this.plugin.core.getPlayerSession(event.getPlayer());
  if (ps != null && ps.isStaleLocation()) {
    return;
  }
  MVPortal portal=this.plugin.getPortalUtils().isPortal(event.getPlayer(),event.getTo());
  if (portal != null && !this.showDebugInfo(event.getPlayer(),portal)) {
    Destination d=portal.getDestination();
    Location l=null;
    if (d.getType() == DestinationType.World) {
      if (this.plugin.core.isMVWorld(d.getName())) {
        MVWorld w=this.plugin.core.getMVWorld(d.getName());
        l=w.getCBWorld().getSpawnLocation();
      }
 else       if (this.plugin.getServer().getWorld(d.getName()) != null) {
        l=this.plugin.getServer().getWorld(d.getName()).getSpawnLocation();
      }
    }
 else     if (d.getType() == DestinationType.Portal) {
    }
 else     if (d.getType() == DestinationType.Exact) {
    }
    if (l == null) {
      return;
    }
    event.getPlayer().teleport(l);
  }
}
Program: 38783
Project: 38783
Buggy source:
private boolean setDestination(String destinationString){
  this.destination=Destination.parseDestination(destinationString,this.plugin.core);
  if (this.destination.getType() == DestinationType.Invalid) {
    this.plugin.core.log(Level.WARNING,"String_Node_Str" + ChatColor.RED + this.name+ ChatColor.WHITE+ "String_Node_Str");
    return false;
  }
  this.config.setProperty(this.portalConfigString + "String_Node_Str",this.destination.toString());
  this.config.save();
  return true;
}

Fixed version (ground truth):
public boolean setDestination(String destinationString){
  this.destination=Destination.parseDestination(destinationString,this.plugin.core);
  if (this.destination.getType() == DestinationType.Invalid) {
    this.plugin.core.log(Level.WARNING,"String_Node_Str" + ChatColor.RED + this.name+ ChatColor.WHITE+ "String_Node_Str");
    return false;
  }
  this.config.setProperty(this.portalConfigString + "String_Node_Str",this.destination.toString());
  this.config.save();
  return true;
}
Program: 38784
Project: 38784
Buggy source:
public void onEnable(){
  this.core=(MultiverseCore)getServer().getPluginManager().getPlugin("String_Node_Str");
  if (this.core == null) {
    log.info(logPrefix + "String_Node_Str");
    getServer().getPluginManager().disablePlugin(this);
    return;
  }
  this.portalUtils=new PortalUtils(this);
  debugLog=new DebugLog("String_Node_Str",getDataFolder() + File.separator + "String_Node_Str");
  this.pluginListener=new MVPPluginListener(this);
  this.playerListener=new MVPPlayerListener(this);
  this.getServer().getPluginManager().registerEvent(Type.PLUGIN_ENABLE,this.pluginListener,Priority.Normal,this);
  this.getServer().getPluginManager().registerEvent(Type.PLAYER_PORTAL,this.playerListener,Priority.Normal,this);
  this.getServer().getPluginManager().registerEvent(Type.PLAYER_MOVE,this.playerListener,Priority.Low,this);
  log.info(logPrefix + "String_Node_Str" + this.getDescription().getVersion()+ "String_Node_Str"+ getAuthors());
  this.portals=new HashMap<String,MVPortal>();
  this.loadPortals();
  registerCommands();
}

Fixed version (ground truth):
public void onEnable(){
  this.core=(MultiverseCore)getServer().getPluginManager().getPlugin("String_Node_Str");
  if (this.core == null) {
    log.info(logPrefix + "String_Node_Str");
    getServer().getPluginManager().disablePlugin(this);
    return;
  }
  this.portalUtils=new PortalUtils(this);
  debugLog=new DebugLog("String_Node_Str",getDataFolder() + File.separator + "String_Node_Str");
  this.pluginListener=new MVPPluginListener(this);
  this.playerListener=new MVPPlayerListener(this);
  this.getServer().getPluginManager().registerEvent(Type.PLUGIN_ENABLE,this.pluginListener,Priority.Normal,this);
  this.getServer().getPluginManager().registerEvent(Type.PLAYER_PORTAL,this.playerListener,Priority.Normal,this);
  this.getServer().getPluginManager().registerEvent(Type.PLAYER_MOVE,this.playerListener,Priority.Low,this);
  log.info(logPrefix + "String_Node_Str" + this.getDescription().getVersion()+ "String_Node_Str"+ getAuthors());
  this.portals=new HashMap<String,MVPortal>();
  this.loadPortals();
  registerCommands();
  this.portalSessions=new HashMap<Player,PortalPlayerSession>();
}
Program: 38785
Project: 38785
Buggy source:
/** 
 * Register commands to Multiverse's CommandHandler so we get a super sexy single menu 
 */
private void registerCommands(){
  this.commandHandler=this.core.getCommandHandler();
  this.commandHandler.registerCommand(new ListCommand(this));
  this.commandHandler.registerCommand(new CreateCommand(this));
}

Fixed version (ground truth):
/** 
 * Register commands to Multiverse's CommandHandler so we get a super sexy single menu
 */
private void registerCommands(){
  this.commandHandler=this.core.getCommandHandler();
  this.commandHandler.registerCommand(new ListCommand(this));
  this.commandHandler.registerCommand(new CreateCommand(this));
  this.commandHandler.registerCommand(new DebugCommand(this));
}
Program: 38786
Project: 38786
Buggy source:
public CreateCommand(MultiversePortals plugin){
  super(plugin);
  this.commandName="String_Node_Str";
  this.commandDesc="String_Node_Str";
  this.commandUsage="String_Node_Str" + ChatColor.GOLD + "String_Node_Str";
  this.minimumArgLength=1;
  this.maximumArgLength=1;
  this.commandKeys.add("String_Node_Str");
  this.commandKeys.add("String_Node_Str");
  this.commandKeys.add("String_Node_Str");
  this.permission="String_Node_Str";
  this.opRequired=true;
}

Fixed version (ground truth):
public CreateCommand(MultiversePortals plugin){
  super(plugin);
  this.commandName="String_Node_Str";
  this.commandDesc="String_Node_Str";
  this.commandUsage="String_Node_Str" + ChatColor.GOLD + "String_Node_Str";
  this.minimumArgLength=1;
  this.maximumArgLength=2;
  this.commandKeys.add("String_Node_Str");
  this.commandKeys.add("String_Node_Str");
  this.commandKeys.add("String_Node_Str");
  this.permission="String_Node_Str";
  this.opRequired=true;
}
Program: 38787
Project: 38787
Buggy source:
@Override public void runCommand(CommandSender sender,List<String> args){
  Player p=null;
  if (!(sender instanceof Player)) {
    sender.sendMessage("String_Node_Str");
    return;
  }
  p=(Player)sender;
  if (!((MultiversePortals)this.plugin).getCore().isMVWorld(p.getWorld().getName())) {
    ((MultiversePortals)this.plugin).getCore().showNotMVWorldMessage(sender,p.getWorld().getName());
    return;
  }
  MVWorld world=((MultiversePortals)this.plugin).getCore().getMVWorld(p.getWorld().getName());
  WorldEditAPI api=((MultiversePortals)this.plugin).getWEAPI();
  if (api == null) {
    sender.sendMessage("String_Node_Str");
    sender.sendMessage("String_Node_Str");
    return;
  }
  LocalSession s=api.getSession(p);
  Region r=null;
  try {
    r=s.getSelection(s.getSelectionWorld());
  }
 catch (  IncompleteRegionException e) {
    sender.sendMessage("String_Node_Str");
    return;
  }
  PortalLocation location=new PortalLocation(r.getMinimumPoint(),r.getMaximumPoint(),world);
  ((MultiversePortals)this.plugin).addPortal(world,args.get(0),p.getName(),location);
  sender.sendMessage("String_Node_Str");
}

Fixed version (ground truth):
@Override public void runCommand(CommandSender sender,List<String> args){
  Player p=null;
  if (!(sender instanceof Player)) {
    sender.sendMessage("String_Node_Str");
    return;
  }
  p=(Player)sender;
  if (!((MultiversePortals)this.plugin).getCore().isMVWorld(p.getWorld().getName())) {
    ((MultiversePortals)this.plugin).getCore().showNotMVWorldMessage(sender,p.getWorld().getName());
    return;
  }
  MVWorld world=((MultiversePortals)this.plugin).getCore().getMVWorld(p.getWorld().getName());
  WorldEditAPI api=((MultiversePortals)this.plugin).getWEAPI();
  if (api == null) {
    sender.sendMessage("String_Node_Str");
    sender.sendMessage("String_Node_Str");
    return;
  }
  LocalSession s=api.getSession(p);
  Region r=null;
  try {
    r=s.getSelection(s.getSelectionWorld());
  }
 catch (  IncompleteRegionException e) {
    sender.sendMessage("String_Node_Str");
    return;
  }
  MVPortal portal=((MultiversePortals)this.plugin).getPortal(args.get(0));
  PortalLocation location=new PortalLocation(r.getMinimumPoint(),r.getMaximumPoint(),world);
  if (((MultiversePortals)this.plugin).addPortal(world,args.get(0),p.getName(),location)) {
    sender.sendMessage("String_Node_Str" + ChatColor.DARK_AQUA + args.get(0)+ ChatColor.WHITE+ "String_Node_Str");
    portal=((MultiversePortals)this.plugin).getPortal(args.get(0));
  }
 else {
    sender.sendMessage("String_Node_Str" + ChatColor.DARK_AQUA + args.get(0)+ ChatColor.WHITE+ "String_Node_Str");
    sender.sendMessage("String_Node_Str");
  }
  ((MultiversePortals)this.plugin).getPortalSession(p).selectPortal(portal);
  if (args.size() > 1 && portal != null) {
    portal.setDestination(args.get(1));
  }
}
Program: 38788
Project: 38788
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event){
  Player p=event.getPlayer();
  if (p == null || !p.isOnline())   return;
  xAuthPlayer xp=plyrMngr.getPlayer(p,plugin.getConfig().getBoolean("String_Node_Str"));
  String node="String_Node_Str";
  if (xp.isFixSS()) {
    plyrMngr.unprotect(xp);
    xp.setFixSS(false);
  }
  if (xp.isRegistered() || plugin.isAuthURL()) {
    if (plyrMngr.checkSession(xp)) {
      xp.setStatus(Status.Authenticated);
      plugin.getAuthClass(xp).online(p.getName());
      node="String_Node_Str";
    }
 else {
      xp.setStatus(Status.Registered);
      node="String_Node_Str";
      plyrMngr.protect(xp);
    }
  }
 else   if (plyrMngr.mustRegister(p)) {
    xp.setStatus(Status.Guest);
    node="String_Node_Str";
    plyrMngr.protect(xp);
  }
  if (!node.isEmpty())   sendDelayedMessage(p,node,1);
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event){
  Player p=event.getPlayer();
  if (p == null || !p.isOnline())   return;
  xAuthPlayer xp=plyrMngr.getPlayer(p,plugin.getConfig().getBoolean("String_Node_Str"));
  String node="String_Node_Str";
  boolean protect=false;
  if (xp.isFixSS()) {
    plyrMngr.unprotect(xp);
    xp.setFixSS(false);
  }
  if (xp.isRegistered() || plugin.isAuthURL()) {
    if (plyrMngr.checkSession(xp)) {
      xp.setStatus(Status.Authenticated);
      plugin.getAuthClass(xp).online(p.getName());
      node="String_Node_Str";
    }
 else {
      xp.setStatus(Status.Registered);
      node="String_Node_Str";
      protect=true;
    }
  }
 else   if (plyrMngr.mustRegister(p)) {
    xp.setStatus(Status.Guest);
    node="String_Node_Str";
    protect=true;
  }
  if (protect)   scheduleDelayedProtect(xp);
  if (!node.isEmpty())   sendDelayedMessage(p,node,1);
}
Program: 38789
Project: 38789
Buggy source:
private boolean checkAuthURL(String action,String... params){
  if (params.length < 2 || ((params.length % 2) != 0))   return false;
  try {
    HttpURLConnection.setFollowRedirects(false);
    HttpURLConnection uc=(HttpURLConnection)new URL(plugin.getConfig().getString("String_Node_Str")).openConnection();
    uc.setRequestMethod("String_Node_Str");
    uc.setDoInput(true);
    uc.setDoOutput(true);
    uc.setUseCaches(false);
    uc.setAllowUserInteraction(false);
    uc.setInstanceFollowRedirects(false);
    uc.setRequestProperty("String_Node_Str","String_Node_Str" + version);
    uc.setRequestProperty("String_Node_Str","String_Node_Str");
    DataOutputStream out=new DataOutputStream(uc.getOutputStream());
    out.writeBytes("String_Node_Str" + version);
    writeParam(out,"String_Node_Str",this.ipAddress);
    writeParam(out,"String_Node_Str",action);
    for (int x=0; x < params.length; ++x)     writeParam(out,params[x],params[++x]);
    out.flush();
    out.close();
    BufferedReader in=new BufferedReader(new InputStreamReader(uc.getInputStream()));
    String line=in.readLine();
    boolean success=line != null && line.equals("String_Node_Str");
    response=in.readLine();
    if (plugin.getConfig().getBoolean("String_Node_Str"))     group=in.readLine();
    in.close();
    return success;
  }
 catch (  Exception e) {
    xAuthLog.severe("String_Node_Str" + action,e);
    return false;
  }
}

Fixed version (ground truth):
private boolean checkAuthURL(String action,String... params){
  if (params.length < 2 || ((params.length % 2) != 0))   return false;
  try {
    HttpURLConnection uc=(HttpURLConnection)new URL(plugin.getConfig().getString("String_Node_Str")).openConnection();
    uc.setRequestMethod("String_Node_Str");
    uc.setDoInput(true);
    uc.setDoOutput(true);
    uc.setUseCaches(false);
    uc.setAllowUserInteraction(false);
    uc.setInstanceFollowRedirects(false);
    uc.setRequestProperty("String_Node_Str","String_Node_Str" + version);
    uc.setRequestProperty("String_Node_Str","String_Node_Str");
    DataOutputStream out=new DataOutputStream(uc.getOutputStream());
    out.writeBytes("String_Node_Str" + version);
    writeParam(out,"String_Node_Str",this.ipAddress);
    writeParam(out,"String_Node_Str",action);
    for (int x=0; x < params.length; ++x)     writeParam(out,params[x],params[++x]);
    out.flush();
    out.close();
    BufferedReader in=new BufferedReader(new InputStreamReader(uc.getInputStream()));
    String line=in.readLine();
    boolean success=line != null && line.equals("String_Node_Str");
    response=in.readLine();
    if (plugin.getConfig().getBoolean("String_Node_Str"))     group=in.readLine();
    in.close();
    return success;
  }
 catch (  Exception e) {
    xAuthLog.severe("String_Node_Str" + action,e);
    return false;
  }
}
Program: 38790
Project: 38790
Buggy source:
public boolean deleteSession(int accountId){
  Connection conn=plugin.getDbCtrl().getConnection();
  PreparedStatement ps=null;
  try {
    String sql=String.format("String_Node_Str",plugin.getDbCtrl().getTable(Table.SESSION));
    ps=conn.prepareStatement(sql);
    ps.setInt(1,accountId);
    ps.executeUpdate();
    return true;
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + accountId,e);
    return false;
  }
 finally {
    plugin.getDbCtrl().close(conn,ps);
  }
}

Fixed version (ground truth):
public boolean deleteSession(int accountId){
  if (!plugin.getDbCtrl().isTableActive(Table.SESSION))   return true;
  Connection conn=plugin.getDbCtrl().getConnection();
  PreparedStatement ps=null;
  try {
    String sql=String.format("String_Node_Str",plugin.getDbCtrl().getTable(Table.SESSION));
    ps=conn.prepareStatement(sql);
    ps.setInt(1,accountId);
    ps.executeUpdate();
    return true;
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + accountId,e);
    return false;
  }
 finally {
    plugin.getDbCtrl().close(conn,ps);
  }
}
Program: 38791
Project: 38791
Buggy source:
public void reload(){
  loadConfiguration();
  plyrMngr.reload();
}

Fixed version (ground truth):
public void reload(){
  loadConfiguration();
}
Program: 38792
Project: 38792
Buggy source:
public String getIPAddress(){
  Player player=getPlayer();
  return player == null ? null : player.getAddress().getAddress().getHostAddress();
}

Fixed version (ground truth):
public String getIPAddress(){
  Player player=getPlayer();
  if (player == null)   return null;
  try {
    return player.getAddress().getAddress().getHostAddress();
  }
 catch (  NullPointerException e) {
    return null;
  }
}
Program: 38793
Project: 38793
Buggy source:
public Connection getConnection(){
  try {
    return connPool.leaseConn();
  }
 catch (  Exception e) {
    xAuthLog.severe("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
public Connection getConnection(){
  try {
    return connPool.leaseConn();
  }
 catch (  Exception e) {
    xAuthLog.severe("String_Node_Str" + getDBMS() + "String_Node_Str",e);
    return null;
  }
}
Program: 38794
Project: 38794
Buggy source:
public void close(){
  try {
    connPool.close();
  }
 catch (  Exception e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void close(){
  try {
    connPool.close();
  }
 catch (  Exception e) {
    xAuthLog.severe("String_Node_Str" + getDBMS() + "String_Node_Str",e);
  }
}
Program: 38795
Project: 38795
Buggy source:
public Connection leaseConn() throws SQLException {
  lock.lock();
  try {
    if (!idleConnections.isEmpty()) {
      Connection conn=idleConnections.firstElement();
      idleConnections.removeElementAt(0);
      if (!conn.isClosed()) {
        busyConnections.add(conn);
        return conn;
      }
 else {
        conn.close();
        return leaseConn();
      }
    }
    if (idleConnections.size() + busyConnections.size() >= maxConnections)     throw new SQLException("String_Node_Str");
    Connection conn=DriverManager.getConnection(url,user,password);
    if (!conn.isClosed()) {
      busyConnections.add(conn);
      return conn;
    }
 else {
      conn.close();
      throw new SQLException("String_Node_Str");
    }
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
public Connection leaseConn() throws SQLException {
  lock.lock();
  try {
    if (!idleConnections.isEmpty()) {
      Connection conn=idleConnections.firstElement();
      idleConnections.removeElementAt(0);
      if (conn.isValid(1)) {
        xAuthLog.info("String_Node_Str");
        busyConnections.add(conn);
        return conn;
      }
 else {
        conn.close();
        return leaseConn();
      }
    }
    if (idleConnections.size() + busyConnections.size() >= maxConnections)     throw new SQLException("String_Node_Str");
    Connection conn=DriverManager.getConnection(url,user,password);
    if (conn.isValid(1)) {
      busyConnections.add(conn);
      return conn;
    }
 else {
      conn.close();
      throw new SQLException("String_Node_Str");
    }
  }
  finally {
    lock.unlock();
  }
}
Program: 38796
Project: 38796
Buggy source:
public boolean createSession(int accountId,String ipAddress){
  Connection conn=plugin.getDbCtrl().getConnection();
  PreparedStatement ps=null;
  try {
    String sql=String.format("String_Node_Str",plugin.getConfig().getString("String_Node_Str"));
    ps=conn.prepareStatement(sql);
    ps.setInt(1,accountId);
    ps.setString(2,ipAddress);
    ps.setTimestamp(3,new Timestamp(System.currentTimeMillis()));
    ps.executeUpdate();
    return true;
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + accountId,e);
    return false;
  }
 finally {
    plugin.getDbCtrl().close(conn,ps);
  }
}

Fixed version (ground truth):
public boolean createSession(int accountId,String ipAddress) throws SQLException {
  Connection conn=plugin.getDbCtrl().getConnection();
  PreparedStatement ps=null;
  try {
    String sql=String.format("String_Node_Str",plugin.getConfig().getString("String_Node_Str"));
    ps=conn.prepareStatement(sql);
    ps.setInt(1,accountId);
    ps.setString(2,ipAddress);
    ps.setTimestamp(3,new Timestamp(System.currentTimeMillis()));
    ps.executeUpdate();
    return true;
  }
  finally {
    plugin.getDbCtrl().close(conn,ps);
  }
}
Program: 38797
Project: 38797
Buggy source:
public boolean mustRegister(Player player){
  return plugin.getConfig().getBoolean("String_Node_Str") || xPermissions.has(player,"String_Node_Str");
}

Fixed version (ground truth):
public boolean mustRegister(Player player){
  if (plugin.getConfig().getBoolean("String_Node_Str"))   return plugin.getConfig().getBoolean("String_Node_Str");
  return plugin.getConfig().getBoolean("String_Node_Str") || xPermissions.has(player,"String_Node_Str");
}
Program: 38798
Project: 38798
Buggy source:
public boolean login(String user,String pass){
  if (!player.isRegistered()) {
    response="String_Node_Str";
    return false;
  }
 else   if (player.isAuthenticated()) {
    response="String_Node_Str";
    return false;
  }
 else   if (!plugin.getPwdHndlr().checkPassword(player.getAccountId(),pass)) {
    int strikes=plugin.getStrkMngr().getRecord(player.getIPAddress()).addStrike(player.getPlayerName());
    if (strikes >= plugin.getConfig().getInt("String_Node_Str"))     plugin.getStrkMngr().strikeout(player.getPlayer());
    response="String_Node_Str";
    return false;
  }
 else   if (!isActive(player.getAccountId())) {
    response="String_Node_Str";
    return false;
  }
  Connection conn=plugin.getDbCtrl().getConnection();
  PreparedStatement ps=null;
  Timestamp currentTime=new Timestamp(System.currentTimeMillis());
  String ipAddress=player.getIPAddress();
  try {
    String sql=String.format("String_Node_Str",plugin.getConfig().getString("String_Node_Str"));
    ps=conn.prepareStatement(sql);
    ps.setTimestamp(1,currentTime);
    ps.setString(2,ipAddress);
    ps.setInt(3,player.getAccountId());
    ps.executeUpdate();
    plugin.getStrkMngr().getRecord(ipAddress).clearStrikes(player.getPlayerName());
    player.setLoginTime(currentTime);
    response="String_Node_Str";
    return true;
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + user,e);
    try {
      conn.rollback();
    }
 catch (    SQLException ex) {
    }
    response="String_Node_Str";
    return false;
  }
 finally {
    plugin.getDbCtrl().close(conn,ps);
  }
}

Fixed version (ground truth):
public boolean login(String user,String pass){
  if (!player.isRegistered()) {
    response="String_Node_Str";
    return false;
  }
 else   if (player.isAuthenticated()) {
    response="String_Node_Str";
    return false;
  }
 else   if (!plugin.getPwdHndlr().checkPassword(player.getAccountId(),pass)) {
    int strikes=plugin.getStrkMngr().getRecord(player.getIPAddress()).addStrike(player.getPlayerName());
    if (strikes >= plugin.getConfig().getInt("String_Node_Str"))     plugin.getStrkMngr().strikeout(player.getPlayer());
    response="String_Node_Str";
    return false;
  }
 else   if (!isActive(player.getAccountId())) {
    response="String_Node_Str";
    return false;
  }
  return true;
}
Program: 38799
Project: 38799
Buggy source:
private boolean execRegQuery(String user,String pass,String email,boolean admin){
  Connection conn=plugin.getDbCtrl().getConnection();
  PreparedStatement ps=null;
  ResultSet rs=null;
  try {
    String sql=String.format("String_Node_Str",plugin.getConfig().getString("String_Node_Str"));
    ps=conn.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);
    ps.setString(1,user);
    ps.setString(2,plugin.getPwdHndlr().hash(pass));
    ps.setString(3,email);
    ps.setTimestamp(4,new Timestamp(System.currentTimeMillis()));
    ps.setString(5,player.getIPAddress());
    ps.executeUpdate();
    rs=ps.getGeneratedKeys();
    if (rs.next()) {
      player.setAccountId(rs.getInt(1));
      response=admin ? "String_Node_Str" : "String_Node_Str";
      player.setStatus(Status.Registered);
      return true;
    }
 else     throw new SQLException();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + user,e);
    response=admin ? "String_Node_Str" : "String_Node_Str";
    return false;
  }
 finally {
    plugin.getDbCtrl().close(conn,ps,rs);
  }
}

Fixed version (ground truth):
private boolean execRegQuery(String user,String pass,String email,boolean admin){
  try {
    int accId=plugin.getPlyrMngr().createAccount(user,pass,email,player.getIPAddress());
    if (accId > 0) {
      player.setAccountId(accId);
      player.setStatus(Status.Registered);
      response=admin ? "String_Node_Str" : "String_Node_Str";
      return true;
    }
 else     throw new SQLException();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + user,e);
    response=admin ? "String_Node_Str" : "String_Node_Str";
    return false;
  }
}
Program: 38800
Project: 38800
Buggy source:
public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  args=CommandLineTokenizer.tokenize(args);
  if (sender instanceof Player) {
    xAuthPlayer p=plugin.getPlyrMngr().getPlayer((Player)sender);
    if (args.length < 1) {
      plugin.getMsgHndlr().sendMessage("String_Node_Str",p.getPlayer());
      return true;
    }
    String playerName=p.getPlayerName();
    String password=args[0];
    Auth a=plugin.getAuthClass(p);
    boolean success=a.login(playerName,password);
    String response=a.getResponse();
    if (response != null)     plugin.getMsgHndlr().sendMessage(response,p.getPlayer());
    if (success) {
      plugin.getPlyrMngr().unprotect(p);
      if (plugin.getDbCtrl().isTableActive(Table.SESSION))       plugin.getPlyrMngr().createSession(p.getAccountId(),p.getIPAddress());
      p.setStatus(Status.Authenticated);
      plugin.getAuthClass(p).online(p.getPlayerName());
      xAuthLog.info(playerName + "String_Node_Str");
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean onCommand(CommandSender sender,Command command,String label,String[] args){
  args=CommandLineTokenizer.tokenize(args);
  if (sender instanceof Player) {
    xAuthPlayer p=plugin.getPlyrMngr().getPlayer((Player)sender);
    if (args.length < 1) {
      plugin.getMsgHndlr().sendMessage("String_Node_Str",p.getPlayer());
      return true;
    }
    String playerName=p.getPlayerName();
    String password=args[0];
    Auth a=plugin.getAuthClass(p);
    boolean passChecks=a.login(playerName,password);
    String response=a.getResponse();
    if (passChecks) {
      boolean success=plugin.getPlyrMngr().doLogin(p);
      if (success) {
        response="String_Node_Str";
        a.online(p.getPlayerName());
        xAuthLog.info(playerName + "String_Node_Str");
      }
 else       response="String_Node_Str";
    }
    if (response != null)     plugin.getMsgHndlr().sendMessage(response,p.getPlayer());
    return true;
  }
  return false;
}
Program: 38801
Project: 38801
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event){
  Player p=event.getPlayer();
  if (p == null || !p.isOnline())   return;
  xAuthPlayer xp=plyrMngr.getPlayer(p,true);
  String node="String_Node_Str";
  if (xp.isRegistered()) {
    if (plyrMngr.checkSession(xp)) {
      xp.setStatus(Status.Authenticated);
      plugin.getAuthClass(xp).online(p.getName());
      node="String_Node_Str";
    }
 else {
      node="String_Node_Str";
      plyrMngr.protect(xp);
    }
  }
 else   if (plyrMngr.mustRegister(p)) {
    node="String_Node_Str";
    plyrMngr.protect(xp);
  }
  if (!node.isEmpty())   plugin.getSchdlr().sendDelayedMessage(p,node,1);
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event){
  Player p=event.getPlayer();
  if (p == null || !p.isOnline())   return;
  xAuthPlayer xp=plyrMngr.getPlayer(p,true);
  String node="String_Node_Str";
  if (xp.isRegistered() || plugin.getConfig().getBoolean("String_Node_Str")) {
    if (plyrMngr.checkSession(xp)) {
      xp.setStatus(Status.Authenticated);
      plugin.getAuthClass(xp).online(p.getName());
      node="String_Node_Str";
    }
 else {
      node="String_Node_Str";
      plyrMngr.protect(xp);
    }
  }
 else   if (plyrMngr.mustRegister(p)) {
    node="String_Node_Str";
    plyrMngr.protect(xp);
  }
  if (!node.isEmpty())   plugin.getSchdlr().sendDelayedMessage(p,node,1);
}
Program: 38802
Project: 38802
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event){
  Player p=event.getPlayer();
  if (p == null || !p.isOnline())   return;
  xAuthPlayer xp=plyrMngr.getPlayer(p,true);
  String node="String_Node_Str";
  if (xp.isRegistered()) {
    if (plyrMngr.checkSession(xp)) {
      xp.setStatus(Status.Authenticated);
      plugin.getAuthClass(xp).online(p.getName());
      node="String_Node_Str";
    }
 else {
      node="String_Node_Str";
      plyrMngr.protect(xp);
    }
  }
 else   if (plyrMngr.mustRegister(p)) {
    node="String_Node_Str";
    plyrMngr.protect(xp);
  }
  if (!node.isEmpty())   plugin.getSchdlr().sendDelayedMessage(p,node,1);
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event){
  Player p=event.getPlayer();
  if (p == null || !p.isOnline())   return;
  xAuthPlayer xp=plyrMngr.getPlayer(p,true);
  String node="String_Node_Str";
  if (xp.isRegistered()) {
    if (plyrMngr.checkSession(xp)) {
      xp.setStatus(Status.Authenticated);
      plugin.getAuthClass(xp).online(p.getName());
      node="String_Node_Str";
    }
 else {
      node="String_Node_Str";
      plyrMngr.deleteSession(xp.getAccountId());
      plyrMngr.protect(xp);
    }
  }
 else   if (plyrMngr.mustRegister(p)) {
    node="String_Node_Str";
    plyrMngr.protect(xp);
  }
  if (!node.isEmpty())   plugin.getSchdlr().sendDelayedMessage(p,node,1);
}
Program: 38804
Project: 38804
Buggy source:
public void loadTeleLocations(){
  try {
    rs=stmt.executeQuery("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str");
    while (rs.next()) {
      TeleLocation teleLocation=new TeleLocation();
      teleLocation.setWorldName(rs.getString("String_Node_Str"));
      teleLocation.setX(rs.getDouble("String_Node_Str"));
      teleLocation.setY(rs.getDouble("String_Node_Str"));
      teleLocation.setZ(rs.getDouble("String_Node_Str"));
      teleLocation.setYaw(rs.getFloat("String_Node_Str"));
      teleLocation.setPitch(rs.getFloat("String_Node_Str"));
      teleLocations.put(teleLocation.getWorldName(),teleLocation);
    }
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void loadTeleLocations(){
  if (!isConnected())   connect();
  try {
    rs=stmt.executeQuery("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str");
    while (rs.next()) {
      TeleLocation teleLocation=new TeleLocation();
      teleLocation.setWorldName(rs.getString("String_Node_Str"));
      teleLocation.setX(rs.getDouble("String_Node_Str"));
      teleLocation.setY(rs.getDouble("String_Node_Str"));
      teleLocation.setZ(rs.getDouble("String_Node_Str"));
      teleLocation.setYaw(rs.getFloat("String_Node_Str"));
      teleLocation.setPitch(rs.getFloat("String_Node_Str"));
      teleLocations.put(teleLocation.getWorldName(),teleLocation);
    }
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}
Program: 38805
Project: 38805
Buggy source:
public boolean isHostUsed(String host){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,host);
    rs=prepStmt.executeQuery();
    if (rs.next())     return true;
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
public boolean isHostUsed(String host){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,host);
    rs=prepStmt.executeQuery();
    if (rs.next())     return true;
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
  return false;
}
Program: 38806
Project: 38806
Buggy source:
public void insertAccounts(List<Account> accounts){
  StringBuilder sb=new StringBuilder();
  Account account;
  sb.append("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str");
  sb.append("String_Node_Str");
  for (int i=1; i < accounts.size(); i++)   sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  try {
    prepStmt=connection.prepareStatement(sb.toString());
    for (int i=0, j=1; j < accounts.size() * 2; i++, j+=2) {
      account=accounts.get(i);
      prepStmt.setString(j,account.getPlayerName());
      prepStmt.setString(j + 1,account.getPassword().toLowerCase());
    }
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void insertAccounts(List<Account> accounts){
  if (!isConnected())   connect();
  StringBuilder sb=new StringBuilder();
  Account account;
  sb.append("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str");
  sb.append("String_Node_Str");
  for (int i=1; i < accounts.size(); i++)   sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  try {
    prepStmt=connection.prepareStatement(sb.toString());
    for (int i=0, j=1; j < accounts.size() * 2; i++, j+=2) {
      account=accounts.get(i);
      prepStmt.setString(j,account.getPlayerName());
      prepStmt.setString(j + 1,account.getPassword().toLowerCase());
    }
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}
Program: 38807
Project: 38807
Buggy source:
protected void updateAccount(Account account){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,account.getPlayerName());
    prepStmt.setString(2,account.getPassword());
    prepStmt.setString(3,account.getEmail());
    prepStmt.setTimestamp(4,account.getRegisterDate());
    prepStmt.setString(5,account.getRegisterHost());
    prepStmt.setTimestamp(6,account.getLastLoginDate());
    prepStmt.setString(7,account.getLastLoginHost());
    prepStmt.setInt(8,account.getActive());
    prepStmt.setInt(9,account.getId());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + account.getPlayerName(),e);
  }
}

Fixed version (ground truth):
protected void updateAccount(Account account){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,account.getPlayerName());
    prepStmt.setString(2,account.getPassword());
    prepStmt.setString(3,account.getEmail());
    prepStmt.setTimestamp(4,account.getRegisterDate());
    prepStmt.setString(5,account.getRegisterHost());
    prepStmt.setTimestamp(6,account.getLastLoginDate());
    prepStmt.setString(7,account.getLastLoginHost());
    prepStmt.setInt(8,account.getActive());
    prepStmt.setInt(9,account.getId());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + account.getPlayerName(),e);
  }
}
Program: 38808
Project: 38808
Buggy source:
public void insertSession(Session session){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",Statement.RETURN_GENERATED_KEYS);
    prepStmt.setInt(1,session.getAccountId());
    prepStmt.setString(2,session.getHost());
    prepStmt.setTimestamp(3,session.getLoginTime());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + session.getAccountId(),e);
  }
}

Fixed version (ground truth):
public void insertSession(Session session){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",Statement.RETURN_GENERATED_KEYS);
    prepStmt.setInt(1,session.getAccountId());
    prepStmt.setString(2,session.getHost());
    prepStmt.setTimestamp(3,session.getLoginTime());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + session.getAccountId(),e);
  }
}
Program: 38809
Project: 38809
Buggy source:
public StrikeBan loadStrikeBan(String host){
  StrikeBan ban=null;
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,host);
    rs=prepStmt.executeQuery();
    if (rs.next()) {
      ban=new StrikeBan();
      ban.setHost(rs.getString("String_Node_Str"));
      ban.setBanTime(rs.getTimestamp("String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + host,e);
  }
  return ban;
}

Fixed version (ground truth):
public StrikeBan loadStrikeBan(String host){
  if (!isConnected())   connect();
  StrikeBan ban=null;
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,host);
    rs=prepStmt.executeQuery();
    if (rs.next()) {
      ban=new StrikeBan();
      ban.setHost(rs.getString("String_Node_Str"));
      ban.setBanTime(rs.getTimestamp("String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + host,e);
  }
  return ban;
}
Program: 38810
Project: 38810
Buggy source:
public ItemStack[] getInventory(xAuthPlayer xPlayer){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    rs=prepStmt.executeQuery();
    if (rs.next()) {
      int[] itemid=Util.stringToInt(rs.getString("String_Node_Str").split("String_Node_Str"));
      int[] amount=Util.stringToInt(rs.getString("String_Node_Str").split("String_Node_Str"));
      int[] durability=Util.stringToInt(rs.getString("String_Node_Str").split("String_Node_Str"));
      ItemStack[] inv=new ItemStack[itemid.length];
      for (int i=0; i < inv.length; i++)       inv[i]=new ItemStack(itemid[i],amount[i],(short)durability[i]);
      return inv;
    }
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  return null;
}

Fixed version (ground truth):
public ItemStack[] getInventory(xAuthPlayer xPlayer){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    rs=prepStmt.executeQuery();
    if (rs.next()) {
      int[] itemid=Util.stringToInt(rs.getString("String_Node_Str").split("String_Node_Str"));
      int[] amount=Util.stringToInt(rs.getString("String_Node_Str").split("String_Node_Str"));
      int[] durability=Util.stringToInt(rs.getString("String_Node_Str").split("String_Node_Str"));
      ItemStack[] inv=new ItemStack[itemid.length];
      for (int i=0; i < inv.length; i++)       inv[i]=new ItemStack(itemid[i],amount[i],(short)durability[i]);
      return inv;
    }
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  return null;
}
Program: 38811
Project: 38811
Buggy source:
public void deleteAccount(xAuthPlayer xPlayer){
  Account account=xPlayer.getAccount();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setInt(1,account.getId());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  xPlayer.setAccount(null);
  xPlayer.setSession(null);
}

Fixed version (ground truth):
public void deleteAccount(xAuthPlayer xPlayer){
  if (!isConnected())   connect();
  Account account=xPlayer.getAccount();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setInt(1,account.getId());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  xPlayer.setAccount(null);
  xPlayer.setSession(null);
}
Program: 38812
Project: 38812
Buggy source:
public void deleteInventory(xAuthPlayer xPlayer){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
}

Fixed version (ground truth):
public void deleteInventory(xAuthPlayer xPlayer){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
}
Program: 38813
Project: 38813
Buggy source:
public void updateTeleLocation(TeleLocation teleLocation){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setDouble(1,teleLocation.getX());
    prepStmt.setDouble(2,teleLocation.getY());
    prepStmt.setDouble(3,teleLocation.getZ());
    prepStmt.setFloat(4,teleLocation.getYaw());
    prepStmt.setFloat(5,teleLocation.getPitch());
    prepStmt.setString(6,teleLocation.getWorldName());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + teleLocation.getWorldName(),e);
  }
}

Fixed version (ground truth):
public void updateTeleLocation(TeleLocation teleLocation){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setDouble(1,teleLocation.getX());
    prepStmt.setDouble(2,teleLocation.getY());
    prepStmt.setDouble(3,teleLocation.getZ());
    prepStmt.setFloat(4,teleLocation.getYaw());
    prepStmt.setFloat(5,teleLocation.getPitch());
    prepStmt.setString(6,teleLocation.getWorldName());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + teleLocation.getWorldName(),e);
  }
}
Program: 38814
Project: 38814
Buggy source:
public void insertStrikeBan(StrikeBan ban){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,ban.getHost());
    prepStmt.setTimestamp(2,ban.getBanTime());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + ban.getHost(),e);
  }
}

Fixed version (ground truth):
public void insertStrikeBan(StrikeBan ban){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,ban.getHost());
    prepStmt.setTimestamp(2,ban.getBanTime());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + ban.getHost(),e);
  }
}