nus-yam/ex-repair huggingface dataset:
Program: 98915
Project: 98915
Buggy source:
public static boolean isSignWarp(Sign sign){
  ArrayList<String> lines=new ArrayList<String>();
  for (int i=0; i < 4; i++) {
    if (!sign.getLine(i).trim().equals("String_Node_Str")) {
      lines.add(sign.getLine(i).trim());
    }
  }
  if (lines.size() == 2 && lines.get(0).contains("String_Node_Str")) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public static boolean isSignWarp(Sign sign){
  ArrayList<String> lines=new ArrayList<String>();
  for (int i=0; i < 4; i++) {
    if (!sign.getLine(i).trim().equals("String_Node_Str")) {
      lines.add(sign.getLine(i).trim());
    }
  }
  if (lines.size() == 2 && lines.get(0).equalsIgnoreCase("String_Node_Str")) {
    return true;
  }
 else {
    return false;
  }
}
Program: 98916
Project: 98916
Buggy source:
public static void updateWelcomeMessage(Warp warp){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setString(1,warp.welcomeMessage);
    ps.setInt(2,warp.index);
    ps.executeUpdate();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}

Fixed version (ground truth):
public static void updateWelcomeMessage(Warp warp){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setString(1,warp.welcomeMessage);
    ps.setInt(2,warp.index);
    ps.executeUpdate();
    conn.commit();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}
Program: 98917
Project: 98917
Buggy source:
private static void createTable(){
  Statement st=null;
  try {
    Connection conn=ConnectionManager.getConnection();
    st=conn.createStatement();
    st.executeUpdate(WARP_TABLE);
  }
 catch (  SQLException e) {
    Logger log=Logger.getLogger("String_Node_Str");
    log.log(Level.SEVERE,"String_Node_Str",e);
  }
 finally {
    try {
      if (st != null)       st.close();
    }
 catch (    SQLException e) {
      Logger log=Logger.getLogger("String_Node_Str");
      log.log(Level.SEVERE,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private static void createTable(){
  Statement st=null;
  try {
    Connection conn=ConnectionManager.getConnection();
    st=conn.createStatement();
    st.executeUpdate(WARP_TABLE);
    conn.commit();
  }
 catch (  SQLException e) {
    Logger log=Logger.getLogger("String_Node_Str");
    log.log(Level.SEVERE,"String_Node_Str",e);
  }
 finally {
    try {
      if (st != null)       st.close();
    }
 catch (    SQLException e) {
      Logger log=Logger.getLogger("String_Node_Str");
      log.log(Level.SEVERE,"String_Node_Str");
    }
  }
}
Program: 98918
Project: 98918
Buggy source:
public static void addWarp(Warp warp){
  PreparedStatement ps=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setInt(1,warp.index);
    ps.setString(2,warp.name);
    ps.setString(3,warp.creator);
    ps.setInt(4,warp.world);
    ps.setDouble(5,warp.x);
    ps.setInt(6,warp.y);
    ps.setDouble(7,warp.z);
    ps.setInt(8,warp.yaw);
    ps.setInt(9,warp.pitch);
    ps.setBoolean(10,warp.publicAll);
    ps.setString(11,warp.permissionsString());
    ps.setString(12,warp.welcomeMessage);
    ps.executeUpdate();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}

Fixed version (ground truth):
public static void addWarp(Warp warp){
  PreparedStatement ps=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setInt(1,warp.index);
    ps.setString(2,warp.name);
    ps.setString(3,warp.creator);
    ps.setInt(4,warp.world);
    ps.setDouble(5,warp.x);
    ps.setInt(6,warp.y);
    ps.setDouble(7,warp.z);
    ps.setInt(8,warp.yaw);
    ps.setInt(9,warp.pitch);
    ps.setBoolean(10,warp.publicAll);
    ps.setString(11,warp.permissionsString());
    ps.setString(12,warp.welcomeMessage);
    ps.executeUpdate();
    conn.commit();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}
Program: 98919
Project: 98919
Buggy source:
public static void publicizeWarp(Warp warp,boolean publicAll){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setBoolean(1,publicAll);
    ps.setInt(2,warp.index);
    ps.executeUpdate();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}

Fixed version (ground truth):
public static void publicizeWarp(Warp warp,boolean publicAll){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setBoolean(1,publicAll);
    ps.setInt(2,warp.index);
    ps.executeUpdate();
    conn.commit();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}
Program: 98920
Project: 98920
Buggy source:
public static void updateCreator(Warp warp){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setString(1,warp.creator);
    ps.setInt(2,warp.index);
    ps.executeUpdate();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}

Fixed version (ground truth):
public static void updateCreator(Warp warp){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setString(1,warp.creator);
    ps.setInt(2,warp.index);
    ps.executeUpdate();
    conn.commit();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}
Program: 98921
Project: 98921
Buggy source:
public static void deleteWarp(Warp warp){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setInt(1,warp.index);
    ps.executeUpdate();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}

Fixed version (ground truth):
public static void deleteWarp(Warp warp){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setInt(1,warp.index);
    ps.executeUpdate();
    conn.commit();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}
Program: 98922
Project: 98922
Buggy source:
public static void updatePermissions(Warp warp){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setString(1,warp.permissionsString());
    ps.setInt(2,warp.index);
    ps.executeUpdate();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}

Fixed version (ground truth):
public static void updatePermissions(Warp warp){
  PreparedStatement ps=null;
  ResultSet set=null;
  Logger log=Logger.getLogger("String_Node_Str");
  try {
    Connection conn=ConnectionManager.getConnection();
    ps=conn.prepareStatement("String_Node_Str");
    ps.setString(1,warp.permissionsString());
    ps.setInt(2,warp.index);
    ps.executeUpdate();
    conn.commit();
  }
 catch (  SQLException ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
 finally {
    try {
      if (ps != null) {
        ps.close();
      }
      if (set != null) {
        set.close();
      }
    }
 catch (    SQLException ex) {
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
}
Program: 98923
Project: 98923
Buggy source:
@Override public void onSignChange(SignChangeEvent event){
  Player player=event.getPlayer();
  if (SignWarp.isSignWarp(event) && WarpPermissions.createSignWarp(player)) {
    player.sendMessage(ChatColor.AQUA + "String_Node_Str");
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str");
    event.setCancelled(true);
  }
}

Fixed version (ground truth):
@Override public void onSignChange(SignChangeEvent event){
  Player player=event.getPlayer();
  if (SignWarp.isSignWarp(event)) {
    if (WarpPermissions.createSignWarp(player)) {
      player.sendMessage(ChatColor.AQUA + "String_Node_Str");
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str");
      event.setCancelled(true);
    }
  }
}
Program: 98924
Project: 98924
Buggy source:
public void addWarp(String name,Player player){
  if (numPublicWarpsPlayer(player) < WarpPermissions.maxPublicWarps(player)) {
    if (warpList.containsKey(name)) {
      player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
 else {
      Warp warp=new Warp(name,player);
      warpList.put(name,warp);
      WarpDataSource.addWarp(warp);
      player.sendMessage(ChatColor.AQUA + "String_Node_Str" + name+ "String_Node_Str");
      player.sendMessage("String_Node_Str");
      player.sendMessage("String_Node_Str" + ChatColor.RED + "String_Node_Str"+ name);
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.YELLOW+ "String_Node_Str"+ WarpPermissions.maxPrivateWarps(player)+ "String_Node_Str");
    player.sendMessage("String_Node_Str");
  }
}

Fixed version (ground truth):
public void addWarp(String name,Player player){
  if (numPublicWarpsPlayer(player) < WarpPermissions.maxPublicWarps(player)) {
    if (warpList.containsKey(name)) {
      player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
 else {
      Warp warp=new Warp(name,player);
      warpList.put(name,warp);
      WarpDataSource.addWarp(warp);
      player.sendMessage(ChatColor.AQUA + "String_Node_Str" + name+ "String_Node_Str");
      player.sendMessage("String_Node_Str");
      player.sendMessage("String_Node_Str" + ChatColor.RED + "String_Node_Str"+ name);
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.YELLOW+ "String_Node_Str"+ WarpPermissions.maxPublicWarps(player)+ "String_Node_Str");
    player.sendMessage("String_Node_Str");
  }
}
Program: 98927
Project: 98927
Buggy source:
public void list(){
  String intro="String_Node_Str" + page + "String_Node_Str"+ maxPages+ "String_Node_Str";
  player.sendMessage(Color.YELLOW + intro);
  for (  Warp warp : sortedWarps) {
    String name=warp.name;
    String creator=(warp.creator.equalsIgnoreCase(player.getName())) ? "String_Node_Str" : warp.creator;
    int x=warp.x;
    int y=warp.y;
    int z=warp.z;
    String color;
    if (warp.playerIsCreator(player.getName())) {
      color=Color.AQUA.toString();
    }
 else     if (warp.publicAll) {
      color=Color.GREEN.toString();
    }
 else {
      color=Color.RED.toString();
    }
    String location="String_Node_Str" + x + "String_Node_Str"+ y+ "String_Node_Str"+ z+ "String_Node_Str";
    String creatorString="String_Node_Str" + creator;
    int left=MinecraftFontWidthCalculator.getStringWidth(intro) - MinecraftFontWidthCalculator.getStringWidth("String_Node_Str" + creatorString + location);
    int nameLength=MinecraftFontWidthCalculator.getStringWidth(name);
    if (left > nameLength) {
      name="String_Node_Str" + name + "String_Node_Str"+ Color.WHITE+ creatorString+ whitespace(left - nameLength);
    }
 else     if (left < nameLength) {
      name="String_Node_Str" + substring(name,left) + "String_Node_Str"+ Color.WHITE+ creatorString;
    }
    player.sendMessage(color + name + location);
  }
}

Fixed version (ground truth):
public void list(){
  String intro="String_Node_Str" + page + "String_Node_Str"+ maxPages+ "String_Node_Str";
  player.sendMessage(ChatColor.YELLOW + intro);
  for (  Warp warp : sortedWarps) {
    String name=warp.name;
    String creator=(warp.creator.equalsIgnoreCase(player.getName())) ? "String_Node_Str" : warp.creator;
    int x=warp.x;
    int y=warp.y;
    int z=warp.z;
    String color;
    if (warp.playerIsCreator(player.getName())) {
      color=ChatColor.AQUA.toString();
    }
 else     if (warp.publicAll) {
      color=ChatColor.GREEN.toString();
    }
 else {
      color=ChatColor.RED.toString();
    }
    String location="String_Node_Str" + x + "String_Node_Str"+ y+ "String_Node_Str"+ z+ "String_Node_Str";
    String creatorString="String_Node_Str" + creator;
    int left=MinecraftFontWidthCalculator.getStringWidth(intro) - MinecraftFontWidthCalculator.getStringWidth("String_Node_Str" + creatorString + location);
    int nameLength=MinecraftFontWidthCalculator.getStringWidth(name);
    if (left > nameLength) {
      name="String_Node_Str" + name + "String_Node_Str"+ ChatColor.WHITE+ creatorString+ whitespace(left - nameLength);
    }
 else     if (left < nameLength) {
      name="String_Node_Str" + substring(name,left) + "String_Node_Str"+ ChatColor.WHITE+ creatorString;
    }
    player.sendMessage(color + name + location);
  }
}
Program: 98930
Project: 98930
Buggy source:
public void addWarp(String name,Player player){
  if (warpList.containsKey(name)) {
    player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
 else {
    Warp warp=new Warp(name,player);
    warpList.put(name,warp);
    WarpDataSource.addWarp(warp);
    player.sendMessage(Color.AQUA + "String_Node_Str" + name+ "String_Node_Str");
    player.sendMessage("String_Node_Str");
    player.sendMessage("String_Node_Str" + Color.RED + "String_Node_Str"+ name);
  }
}

Fixed version (ground truth):
public void addWarp(String name,Player player){
  if (warpList.containsKey(name)) {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
 else {
    Warp warp=new Warp(name,player);
    warpList.put(name,warp);
    WarpDataSource.addWarp(warp);
    player.sendMessage(ChatColor.AQUA + "String_Node_Str" + name+ "String_Node_Str");
    player.sendMessage("String_Node_Str");
    player.sendMessage("String_Node_Str" + ChatColor.RED + "String_Node_Str"+ name);
  }
}
Program: 98931
Project: 98931
Buggy source:
public void publicize(String name,Player player){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      warp.publicAll=true;
      WarpDataSource.publicizeWarp(warp,true);
      player.sendMessage(Color.AQUA + "String_Node_Str" + name+ "String_Node_Str");
    }
 else {
      player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void publicize(String name,Player player){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      warp.publicAll=true;
      WarpDataSource.publicizeWarp(warp,true);
      player.sendMessage(ChatColor.AQUA + "String_Node_Str" + name+ "String_Node_Str");
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}
Program: 98932
Project: 98932
Buggy source:
public void invite(String name,Player player,String inviteeName){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      if (warp.playerIsInvited(inviteeName)) {
        player.sendMessage(Color.RED + inviteeName + "String_Node_Str");
      }
 else       if (warp.playerIsCreator(inviteeName)) {
        player.sendMessage(Color.RED + inviteeName + "String_Node_Str");
      }
 else {
        warp.invite(inviteeName);
        WarpDataSource.updatePermissions(warp);
        player.sendMessage(Color.AQUA + "String_Node_Str" + inviteeName+ "String_Node_Str"+ name+ "String_Node_Str");
        if (warp.publicAll) {
          player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
        }
        Player match=server.getPlayer(inviteeName);
        if (match != null) {
          match.sendMessage(Color.AQUA + "String_Node_Str" + name+ "String_Node_Str"+ player.getName());
          match.sendMessage("String_Node_Str" + Color.RED + "String_Node_Str"+ name+ Color.WHITE+ "String_Node_Str");
        }
      }
    }
 else {
      player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void invite(String name,Player player,String inviteeName){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      if (warp.playerIsInvited(inviteeName)) {
        player.sendMessage(ChatColor.RED + inviteeName + "String_Node_Str");
      }
 else       if (warp.playerIsCreator(inviteeName)) {
        player.sendMessage(ChatColor.RED + inviteeName + "String_Node_Str");
      }
 else {
        warp.invite(inviteeName);
        WarpDataSource.updatePermissions(warp);
        player.sendMessage(ChatColor.AQUA + "String_Node_Str" + inviteeName+ "String_Node_Str"+ name+ "String_Node_Str");
        if (warp.publicAll) {
          player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
        }
        Player match=server.getPlayer(inviteeName);
        if (match != null) {
          match.sendMessage(ChatColor.AQUA + "String_Node_Str" + name+ "String_Node_Str"+ player.getName());
          match.sendMessage("String_Node_Str" + ChatColor.RED + "String_Node_Str"+ name+ ChatColor.WHITE+ "String_Node_Str");
        }
      }
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}
Program: 98933
Project: 98933
Buggy source:
public void uninvite(String name,Player player,String inviteeName){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      if (!warp.playerIsInvited(inviteeName)) {
        player.sendMessage(Color.RED + inviteeName + "String_Node_Str");
      }
 else       if (warp.playerIsCreator(inviteeName)) {
        player.sendMessage(Color.RED + "String_Node_Str");
      }
 else {
        warp.uninvite(inviteeName);
        WarpDataSource.updatePermissions(warp);
        player.sendMessage(Color.AQUA + "String_Node_Str" + inviteeName+ "String_Node_Str"+ name+ "String_Node_Str");
        if (warp.publicAll) {
          player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
        }
        Player match=server.getPlayer(inviteeName);
        if (match != null) {
          match.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str"+ player.getName()+ "String_Node_Str");
        }
      }
    }
 else {
      player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void uninvite(String name,Player player,String inviteeName){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      if (!warp.playerIsInvited(inviteeName)) {
        player.sendMessage(ChatColor.RED + inviteeName + "String_Node_Str");
      }
 else       if (warp.playerIsCreator(inviteeName)) {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
      }
 else {
        warp.uninvite(inviteeName);
        WarpDataSource.updatePermissions(warp);
        player.sendMessage(ChatColor.AQUA + "String_Node_Str" + inviteeName+ "String_Node_Str"+ name+ "String_Node_Str");
        if (warp.publicAll) {
          player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
        }
        Player match=server.getPlayer(inviteeName);
        if (match != null) {
          match.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str"+ player.getName()+ "String_Node_Str");
        }
      }
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}
Program: 98934
Project: 98934
Buggy source:
public void deleteWarp(String name,Player player){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      warpList.remove(name);
      WarpDataSource.deleteWarp(warp);
      player.sendMessage(Color.AQUA + "String_Node_Str" + name+ "String_Node_Str");
    }
 else {
      player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void deleteWarp(String name,Player player){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      warpList.remove(name);
      WarpDataSource.deleteWarp(warp);
      player.sendMessage(ChatColor.AQUA + "String_Node_Str" + name+ "String_Node_Str");
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}
Program: 98935
Project: 98935
Buggy source:
public void warpTo(String name,Player player){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerCanWarp(player.getName())) {
      warp.warp(player);
      player.sendMessage(Color.AQUA + warp.welcomeMessage);
    }
 else {
      player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void warpTo(String name,Player player){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerCanWarp(player.getName())) {
      warp.warp(player);
      player.sendMessage(ChatColor.AQUA + warp.welcomeMessage);
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}
Program: 98936
Project: 98936
Buggy source:
public void privatize(String name,Player player){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      warp.publicAll=false;
      WarpDataSource.publicizeWarp(warp,false);
      player.sendMessage(Color.AQUA + "String_Node_Str" + name+ "String_Node_Str");
      player.sendMessage("String_Node_Str");
      player.sendMessage("String_Node_Str" + Color.RED + "String_Node_Str"+ name);
    }
 else {
      player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(Color.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void privatize(String name,Player player){
  if (warpList.containsKey(name)) {
    Warp warp=warpList.get(name);
    if (warp.playerIsCreator(player.getName())) {
      warp.publicAll=false;
      WarpDataSource.publicizeWarp(warp,false);
      player.sendMessage(ChatColor.AQUA + "String_Node_Str" + name+ "String_Node_Str");
      player.sendMessage("String_Node_Str");
      player.sendMessage("String_Node_Str" + ChatColor.RED + "String_Node_Str"+ name);
    }
 else {
      player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
    }
  }
 else {
    player.sendMessage(ChatColor.RED + "String_Node_Str" + name+ "String_Node_Str");
  }
}
Program: 98937
Project: 98937
Buggy source:
public static int getStringWidth(String s){
  if (s == null) {
    return 0;
  }
  int i=0;
  for (int j=0; j < s.length(); j++) {
    if (s.charAt(j) == '\247') {
      j++;
      continue;
    }
    int k=weirdHardcodedShitIFoundInMinecraft.indexOf(s.charAt(j));
    if (k >= 0) {
      i+=charWidth[k + 32];
    }
  }
  return i;
}

Fixed version (ground truth):
public static int getStringWidth(String s){
  int i=0;
  if (s != null)   for (int j=0; j < s.length(); j++)   i+=getCharWidth(s.charAt(j));
  return i;
}
Program: 98938
Project: 98938
Buggy source:
@Override public String fizzBuzz(int i){
  String str="String_Node_Str";
  if (i % 3 == 0) {
    str+="String_Node_Str";
  }
  if (i % 5 == 0) {
    str+="String_Node_Str";
  }
  if (str == "String_Node_Str") {
    str=String.valueOf(i);
  }
  return str;
}

Fixed version (ground truth):
@Override public String fizzBuzz(int i){
  if (i <= 0) {
    return String.valueOf(i);
  }
  String str="String_Node_Str";
  if (i % 3 == 0) {
    str+="String_Node_Str";
  }
  if (i % 5 == 0) {
    str+="String_Node_Str";
  }
  if (str == "String_Node_Str") {
    str=String.valueOf(i);
  }
  return str;
}
Program: 98939
Project: 98939
Buggy source:
@Override public String fizzBuzz(int i){
  if (i <= 0) {
    return String.valueOf(i);
  }
  String str="String_Node_Str";
  if (i % 3 == 0) {
    str+="String_Node_Str";
  }
  if (i % 5 == 0) {
    str+="String_Node_Str";
  }
  if (str == "String_Node_Str") {
    str=String.valueOf(i);
  }
  return str;
}

Fixed version (ground truth):
@Override public String fizzBuzz(int i){
  String str="String_Node_Str";
  if (i <= 0) {
    throw new RuntimeException();
  }
  if (i % 3 == 0) {
    str+="String_Node_Str";
  }
  if (i % 5 == 0) {
    str+="String_Node_Str";
  }
  if (str == "String_Node_Str") {
    str=String.valueOf(i);
  }
  return str;
}
Program: 98940
Project: 98940
Buggy source:
@Test public void testFizzBuzz_3と5で割り切れる場合０の場合(){
  FizzBuzz target=new FizzBuzz();
  assertEquals("String_Node_Str",target.fizzBuzz(0));
}

Fixed version (ground truth):
@Test(expected=RuntimeException.class) public void testFizzBuzz_3と5で割り切れる場合０の場合(){
  FizzBuzz target=new FizzBuzz();
  target.fizzBuzz(0);
}
Program: 98941
Project: 98941
Buggy source:
@Test public void testFizzBuzz_minus15も３でも５でも割り切れる(){
  FizzBuzz target=new FizzBuzz();
  assertEquals("String_Node_Str",target.fizzBuzz(-15));
}

Fixed version (ground truth):
@Test(expected=RuntimeException.class) public void testFizzBuzz_minus15も３でも５でも割り切れる(){
  FizzBuzz target=new FizzBuzz();
  target.fizzBuzz(-15);
}
Program: 98942
Project: 98942
Buggy source:
/** 
 * get the user info (including user key and user business status) of user, if user doesn't exist, create new one and return
 * @param phone
 * @param brand - apple or others
 * @return
 */
public static JSONObject getUserInfo(String phone,String brand){
  JSONObject obj=new JSONObject();
  String userkey=MD5Util.md5(RandomString.genRandomChars(6));
  String status="String_Node_Str";
  String sql="String_Node_Str";
  try {
    String businessStatus=DBHelper.getInstance().scalar(sql,new Object[]{phone});
    if (businessStatus != null) {
      log.info("String_Node_Str");
      status=businessStatus;
      if (brand.equals("String_Node_Str")) {
        status="String_Node_Str";
      }
      sql="String_Node_Str";
      DBHelper.getInstance().update(sql,new Object[]{userkey,phone});
    }
 else {
      log.info("String_Node_Str");
      if (brand.equals("String_Node_Str")) {
        status="String_Node_Str";
      }
      sql="String_Node_Str";
      DBHelper.getInstance().update(sql,new Object[]{phone,userkey});
      obj.put("String_Node_Str",status);
    }
    obj.put("String_Node_Str",status);
    obj.put("String_Node_Str",userkey);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
catch (  JSONException e) {
    e.printStackTrace();
  }
  return obj;
}

Fixed version (ground truth):
/** 
 * get the user info (including user key and user business status) of user, if user doesn't exist, create new one and return
 * @param phone
 * @param brand - apple or others
 * @return
 */
public static JSONObject getUserInfo(String phone,String brand){
  JSONObject obj=new JSONObject();
  String userkey=MD5Util.md5(RandomString.genRandomChars(6));
  String status="String_Node_Str";
  String sql="String_Node_Str";
  try {
    String businessStatus=DBHelper.getInstance().scalar(sql,new Object[]{phone});
    if (businessStatus != null) {
      log.info("String_Node_Str");
      status=businessStatus;
      sql="String_Node_Str";
      DBHelper.getInstance().update(sql,new Object[]{userkey,phone});
    }
 else {
      log.info("String_Node_Str");
      if (brand.equals("String_Node_Str")) {
        status="String_Node_Str";
      }
      sql="String_Node_Str";
      DBHelper.getInstance().update(sql,new Object[]{phone,userkey});
      obj.put("String_Node_Str",status);
    }
    obj.put("String_Node_Str",status);
    obj.put("String_Node_Str",userkey);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
catch (  JSONException e) {
    e.printStackTrace();
  }
  return obj;
}
Program: 98943
Project: 98943
Buggy source:
@RequestMapping("String_Node_Str") public void info(HttpServletResponse response,@PathVariable int channel,@PathVariable String sourceId) throws Exception {
  Map<String,Object> info=null;
  if (channel == Channels.MOVIE) {
    info=Movie.getMoiveBySourceId(sourceId);
  }
 else   if (channel == Channels.SERIES) {
    info=Series.getSeriesBySourceId(sourceId);
    List<Map<String,Object>> list=Series.getEpisodeList(sourceId);
    info.put("String_Node_Str",list);
  }
 else {
    info=Video.getVideoBySourceId(sourceId);
  }
  JSONObject jsonObject=new JSONObject(info);
  response.getWriter().print(jsonObject.toString());
}

Fixed version (ground truth):
@RequestMapping("String_Node_Str") public void info(HttpServletResponse response,@PathVariable int channel,@PathVariable String sourceId) throws Exception {
  Map<String,Object> info=null;
  if (channel == Channels.MOVIE) {
    info=Movie.getMoiveBySourceId(sourceId);
  }
 else   if (channel == Channels.SERIES) {
    info=Series.getSeriesBySourceId(sourceId);
    List<Map<String,Object>> list=Series.getEpisodeList(sourceId);
    info.put("String_Node_Str",list);
    info.put("String_Node_Str",list.size());
  }
 else {
    info=Video.getVideoBySourceId(sourceId);
  }
  JSONObject jsonObject=new JSONObject(info);
  response.getWriter().print(jsonObject.toString());
}
Program: 98944
Project: 98944
Buggy source:
/** 
 * 得到电视剧剧集列表
 * @param sourceId
 * @return
 * @throws SQLException
 */
public static List<Map<String,Object>> getEpisodeList(String sourceId) throws SQLException {
  String sql="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";
  Object[] params=new Object[]{sourceId};
  return DBHelper.getInstance().query(sql,params);
}

Fixed version (ground truth):
/** 
 * 得到电视剧剧集列表
 * @param sourceId
 * @return
 * @throws SQLException
 */
public static List<Map<String,Object>> getEpisodeList(String sourceId) throws SQLException {
  String sql="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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Object[] params=new Object[]{sourceId,sourceId};
  return DBHelper.getInstance().query(sql,params);
}
Program: 98945
Project: 98945
Buggy source:
@RequestMapping("String_Node_Str") public void search(@RequestParam(value="String_Node_Str",required=false,defaultValue="String_Node_Str") int offset,@RequestParam(value="String_Node_Str",required=false,defaultValue="String_Node_Str") String searchTitle,HttpServletResponse response) throws IOException {
  String url="String_Node_Str" + searchTitle;
  VideoSearchBean videoSearchBean=null;
  int count=0;
  if (searchTitle.equals("String_Node_Str")) {
    videoSearchBean=new VideoSearchBean();
    List<Map<String,Object>> list=new ArrayList<Map<String,Object>>();
    videoSearchBean.setList(list);
  }
 else {
    try {
      videoSearchBean=VideoSearch.queryInSphinx(offset,pageSize,searchTitle);
      Map<String,Integer> countMap=videoSearchBean.getCountMap();
      count=countMap.get("String_Node_Str");
    }
 catch (    Exception e) {
      log.info(e.getMessage());
      videoSearchBean=new VideoSearchBean();
      List<Map<String,Object>> list=new ArrayList<Map<String,Object>>();
      videoSearchBean.setList(list);
    }
  }
  if (count > 0) {
    VideoSearch.countKeyword(searchTitle);
  }
  Pager pager=new Pager(offset,pageSize,count,url);
  response.getWriter().print(MobileList.getList(videoSearchBean.getList(),pager));
}

Fixed version (ground truth):
@RequestMapping("String_Node_Str") public void search(@RequestParam(value="String_Node_Str",required=false,defaultValue="String_Node_Str") int offset,@RequestParam(value="String_Node_Str",required=false,defaultValue="String_Node_Str") String searchTitle,HttpServletResponse response) throws IOException {
  String url="String_Node_Str" + searchTitle;
  VideoSearchBean videoSearchBean=null;
  int count=0;
  if (searchTitle.equals("String_Node_Str")) {
    videoSearchBean=new VideoSearchBean();
    List<Map<String,Object>> list=new ArrayList<Map<String,Object>>();
    videoSearchBean.setList(list);
  }
 else {
    try {
      videoSearchBean=VideoSearch.queryInSphinx(offset,pageSize,searchTitle);
      Map<String,Integer> countMap=videoSearchBean.getCountMap();
      count=countMap.get("String_Node_Str");
    }
 catch (    Exception e) {
      log.info(e.getMessage());
      videoSearchBean=new VideoSearchBean();
      List<Map<String,Object>> list=new ArrayList<Map<String,Object>>();
      videoSearchBean.setList(list);
    }
  }
  if (count > 0 && offset == 1) {
    VideoSearch.countKeyword(searchTitle);
  }
  Pager pager=new Pager(offset,pageSize,count,url);
  response.getWriter().print(MobileList.getList(videoSearchBean.getList(),pager));
}
Program: 98946
Project: 98946
Buggy source:
Course(String token,CourseSubject courseSubject){
  this.token=token;
  this.subject=courseSubject;
  key=new Key(token);
}

Fixed version (ground truth):
public Course(String token){
  this.token=token;
  key=new Key(token);
}
Program: 98947
Project: 98947
Buggy source:
public Exercise(Course course,int id){
  this.course=course;
  this.id=id;
  this.key=new Key(course.getKey(),id);
}

Fixed version (ground truth):
public Exercise(Course course,int id){
  this.course=course;
  this.id=id;
  this.key=new Key(course.getKey(),id + "String_Node_Str");
}
Program: 98948
Project: 98948
Buggy source:
@Override public void dropTables(){
}

Fixed version (ground truth):
@Override public void dropTables(){
  String query="String_Node_Str";
  Statement stmt=this.connection.createStatement();
  stmt.executeQuery(query);
  stmt.close();
}
Program: 98949
Project: 98949
Buggy source:
@Override public Course getCourse(String id) throws ConnectionFailedException, RecordNotFoundException {
  String query=String.format("String_Node_Str",id);
  stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  Course c=new Course(rs.getString("String_Node_Str"));
  c.setStartDate(rs.getDate("String_Node_Str"));
  c.setEndDate(rs.getDate("String_Node_Str"));
  c.setInstructor(new Instructor(rs.getInt("String_Node_Str")));
  rs.close();
  stmt.close();
  return c;
}

Fixed version (ground truth):
@Override public Course getCourse(String id) throws ConnectionFailedException, RecordNotFoundException {
  String query=String.format("String_Node_Str",id);
  Statement stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  Course c=new Course(rs.getString("String_Node_Str"));
  c.setStartDate(rs.getDate("String_Node_Str"));
  c.setEndDate(rs.getDate("String_Node_Str"));
  c.setInstructor(new Instructor(new User(rs.getInt("String_Node_Str"),ROLE_INSTRUCTOR)));
  rs.close();
  stmt.close();
  return c;
}
Program: 98950
Project: 98950
Buggy source:
@Override public void createTables(){
  String query="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";
  stmt=this.connection.createStatement();
  stmt.executeUpdate(query);
  stmt.close();
}

Fixed version (ground truth):
@Override public void createTables(){
  String query="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";
  Statement stmt=this.connection.createStatement();
  stmt.executeUpdate(query);
  stmt.close();
}
Program: 98951
Project: 98951
Buggy source:
@Override public List<Course> getByInstructor(Instructor instructor) throws ConnectionFailedException, RecordNotFoundException {
  String query=String.format("String_Node_Str",Instructor.userId);
  stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  List<Course> courses=new ArrayList<Course>();
  while (rs.next) {
    Course c=new Course(rs.String("String_Node_Str"));
    c.setStartDate(rs.getDate("String_Node_Str"));
    c.setEndDate(rs.getDate("String_Node_Str"));
    c.setInstructor(new Instructor(rs.getInt("String_Node_Str")));
    courses.add(c);
  }
  rs.close();
  stmt.close();
  return courses;
}

Fixed version (ground truth):
@Override public List<Course> getByInstructor(Instructor instructor) throws ConnectionFailedException, RecordNotFoundException {
  String query=String.format("String_Node_Str",instructor.getUserId());
  Statement stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  List<Course> courses=new ArrayList<Course>();
  while (rs.next()) {
    Course c=new Course(rs.String("String_Node_Str"));
    c.setStartDate(rs.getDate("String_Node_Str"));
    c.setEndDate(rs.getDate("String_Node_Str"));
    c.setInstructor(new Instructor(new User(rs.getInt("String_Node_Str"),User.ROLE_INSTRUCTOR)));
    courses.add(c);
  }
  rs.close();
  stmt.close();
  return courses;
}
Program: 98952
Project: 98952
Buggy source:
@Override public List<ExerciseAttempt> getExerciseAttemptsForExercise(Exercise e){
  String query=String.format("String_Node_Str",e.id);
  stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  List<ExerciseAttempt> attempts=new ArrayList<ExerciseAttempt>();
  while (rs.next()) {
    Course c=new Course(rs.getString("String_Node_Str"));
    ExerciseAttempt ea=new ExerciseAttempt(c,new Student(rs.getInt("String_Node_Str")),rs.getDate("String_Node_Str"),new Exercise(c,rs.getInt("String_Node_Str")));
    attempts.add(ea);
  }
  stmt.close();
  rs.close();
  return ea;
}

Fixed version (ground truth):
@Override public List<ExerciseAttempt> getExerciseAttemptsForExercise(Exercise e){
}
Program: 98953
Project: 98953
Buggy source:
@Override public void createTables(){
  String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt=this.connection.createStatement();
  stmt.executeUpdate(query);
  stmt.close();
}

Fixed version (ground truth):
@Override public void createTables(){
  String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Statement stmt=this.connection.createStatement();
  stmt.executeUpdate(query);
  stmt.close();
}
Program: 98954
Project: 98954
Buggy source:
@Override public Exercise getExercise(Course course,String id) throws ConnectionFailedException, RecordNotFoundException {
  String query=String.format("String_Node_Str",course.id,id);
  stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  Exercise e=new Exercise(new Course(rs.getString("String_Node_Str")),rs.getInt("String_Node_Str"));
  e.setStartDate(rs.getDate("String_Node_Str"));
  e.setEndDate(rs.getDate("String_Node_Str"));
  e.setRandomizationSeed(rs.getInt("String_Node_Str"));
  e.setRetriesAllowed(rs.getInt("String_Node_Str"));
  e.setScoreSelectionMethod(rs.getInt("String_Node_Str"));
  e.setPointsPerCorrectAnswer(rs.getInt("String_Node_Str"));
  e.setPointsPerWrongAnswer(rs.getInt("String_Node_Str"));
  stmt.close();
  rs.close();
  return e;
}

Fixed version (ground truth):
@Override public Exercise getExercise(Course course,String id) throws ConnectionFailedException, RecordNotFoundException {
  String query=String.format("String_Node_Str",course.id,id);
  Statement stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  Exercise e=new Exercise(new Course(rs.getString("String_Node_Str")),rs.getInt("String_Node_Str"));
  e.setStartDate(rs.getDate("String_Node_Str"));
  e.setEndDate(rs.getDate("String_Node_Str"));
  e.setRandomizationSeed(rs.getInt("String_Node_Str"));
  e.setRetriesAllowed(rs.getInt("String_Node_Str"));
  e.setScoreSelectionMethod(rs.getInt("String_Node_Str"));
  e.setPointsPerCorrectAnswer(rs.getInt("String_Node_Str"));
  e.setPointsPerWrongAnswer(rs.getInt("String_Node_Str"));
  stmt.close();
  rs.close();
  return e;
}
Program: 98955
Project: 98955
Buggy source:
@Override public void dropTables(){
}

Fixed version (ground truth):
@Override public void dropTables(){
  String query="String_Node_Str";
  Statement stmt=this.connection.createStatement();
  stmt.executeUpdate(query);
  stmt.close();
}
Program: 98956
Project: 98956
Buggy source:
@Override public List<Exercise> getExercisesByCourse(Course course) throws RecordNotFoundException {
  String query=String.format("String_Node_Str",course.token);
  stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  List<Exercise> exercises=new ArrayList<Exercise>();
  while (rs.next()) {
    Exercise e=new Exercise(course,rs.getInt("String_Node_Str"));
    e.setStartDate(rs.getDate("String_Node_Str"));
    e.setEndDate(rs.getDate("String_Node_Str"));
    e.setRandomizationSeed(rs.getInt("String_Node_Str"));
    e.setRetriesAllowed(rs.getInt("String_Node_Str"));
    e.setScoreSelectionMethod(rs.getInt("String_Node_Str"));
    e.setPointsPerCorrectAnswer(rs.getInt("String_Node_Str"));
    e.setPointsPerWrongAnswer(rs.getInt("String_Node_Str"));
    exercises.add(e);
  }
  stmt.close();
  rs.close();
  return e;
}

Fixed version (ground truth):
@Override public List<Exercise> getExercisesByCourse(Course course) throws RecordNotFoundException {
  String query=String.format("String_Node_Str",course.getToken());
  Statement stmt=this.connection.createStatement();
  ResultSet rs=stmt.executeQuery(query);
  List<Exercise> exercises=new ArrayList<Exercise>();
  while (rs.next()) {
    Exercise e=new Exercise(course,rs.getInt("String_Node_Str"));
    e.setStartDate(rs.getDate("String_Node_Str"));
    e.setEndDate(rs.getDate("String_Node_Str"));
    e.setRandomizationSeed(rs.getInt("String_Node_Str"));
    e.setRetriesAllowed(rs.getInt("String_Node_Str"));
    e.setScoreSelectionMethod(rs.getInt("String_Node_Str"));
    e.setPointsPerCorrectAnswer(rs.getInt("String_Node_Str"));
    e.setPointsPerWrongAnswer(rs.getInt("String_Node_Str"));
    exercises.add(e);
  }
  stmt.close();
  rs.close();
  return exercises;
}
Program: 98957
Project: 98957
Buggy source:
@Override public void createTables(){
  String query="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"+ "String_Node_Str"+ "String_Node_Str";
  stmt=this.connection.createStatement();
  stmt.executeUpdate(query);
  stmt.close();
}

Fixed version (ground truth):
@Override public void createTables(){
  String query="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"+ "String_Node_Str"+ "String_Node_Str";
  Statement stmt=this.connection.createStatement();
  stmt.executeUpdate(query);
  stmt.close();
}
Program: 98958
Project: 98958
Buggy source:
protected List<Square> findWord(String word){
  grid.resetParentsAndColors();
  stack=addLettersToStackInReverseOrder(word);
  List<Square> startingSquares=getSquaresByValue(word.charAt(0));
  Square solution=null;
  for (  Square startingSquare : startingSquares) {
    solution=findCharsStartingAt(startingSquare);
    if (solution != null) {
      break;
    }
  }
  return buildPathFromSolution(solution);
}

Fixed version (ground truth):
protected List<Square> findWord(String word){
  stack=addLettersToStackInReverseOrder(word);
  for (  Square startingSquare : getSquaresByValue(word.charAt(0))) {
    grid.resetParentsAndColors();
    Square solution=findCharsStartingAt(startingSquare);
    if (solution != null) {
      return buildPathFromSolution(solution);
    }
  }
  return new ArrayList<Square>();
}