nus-yam/ex-repair huggingface dataset:
Program: 172631
Project: 172631
Buggy source:
@Override public void handle(RoutingContext ctx){
  if (!AdminManager.isAdmin(ctx)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  String number=ctx.request().getParam("String_Node_Str");
  String encryptedNumber=UserManager.getAES().encrypt(number);
  try {
    ResultSet rs=DB.executeQuery("String_Node_Str",encryptedNumber);
    if (rs.next()) {
      String uid=rs.getString("String_Node_Str");
      DB.executeUpdate("String_Node_Str",uid);
      ctx.response().setStatusCode(200).end();
      ctx.response().close();
    }
 else {
      ctx.response().setStatusCode(204).end();
      ctx.response().close();
    }
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext ctx){
  if (!AdminManager.isAdmin(ctx)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  String number=ctx.request().getParam("String_Node_Str");
  String encryptedNumber=AES256.encrypt(number);
  try {
    ResultSet rs=DB.executeQuery("String_Node_Str",encryptedNumber);
    if (rs.next()) {
      String uid=rs.getString("String_Node_Str");
      DB.executeUpdate("String_Node_Str",uid);
      ctx.response().setStatusCode(200).end();
      ctx.response().close();
    }
 else {
      ctx.response().setStatusCode(204).end();
      ctx.response().close();
    }
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}
Program: 172632
Project: 172632
Buggy source:
private HashMap<Integer,String> getSeatDatas(int classId) throws SQLException {
  HashMap<Integer,String> map=new HashMap<Integer,String>();
  SafeResultSet resultSet=DataBase.getInstance().executeQuery("String_Node_Str",classId);
  while (resultSet.next()) {
    map.put(resultSet.getInt("String_Node_Str"),UserManager.getAES().decrypt(resultSet.getString("String_Node_Str")));
  }
  return map;
}

Fixed version (ground truth):
private HashMap<Integer,String> getSeatDatas(int classId) throws SQLException {
  HashMap<Integer,String> map=new HashMap<Integer,String>();
  SafeResultSet resultSet=DataBase.getInstance().executeQuery("String_Node_Str",classId);
  while (resultSet.next()) {
    map.put(resultSet.getInt("String_Node_Str"),AES256.decrypt(resultSet.getString("String_Node_Str")));
  }
  return map;
}
Program: 172633
Project: 172633
Buggy source:
@Override public void handle(RoutingContext ctx){
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  ctx.response().setStatusCode(200);
  ctx.response().end(PostModel.getPost(2,no).toString());
  ctx.response().close();
}

Fixed version (ground truth):
@Override public void handle(RoutingContext ctx){
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  ctx.response().setStatusCode(200);
  ctx.response().end(PostModel.getPostsAtPage(2,no).toString());
  ctx.response().close();
}
Program: 172634
Project: 172634
Buggy source:
@Override public void handle(RoutingContext ctx){
  DataBase database=DataBase.getInstance();
  SafeResultSet resultSet;
  EasyJsonObject responseObject=new EasyJsonObject();
  EasyJsonObject tempObject=new EasyJsonObject();
  EasyJsonArray tempArray=new EasyJsonArray();
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  if (!Guardian.checkParameters(no)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  try {
    resultSet=database.executeQuery("String_Node_Str",no);
    if (resultSet.next()) {
      do {
        tempObject=new EasyJsonObject();
        tempObject.put("String_Node_Str",resultSet.getInt("String_Node_Str"));
        tempObject.put("String_Node_Str",UserManager.getAES().decrypt(resultSet.getString("String_Node_Str")));
        tempObject.put("String_Node_Str",resultSet.getString("String_Node_Str"));
        tempObject.put("String_Node_Str",resultSet.getString("String_Node_Str"));
        tempArray.add(tempObject);
      }
 while (resultSet.next());
      responseObject.put("String_Node_Str",tempArray);
      ctx.response().setStatusCode(200);
      ctx.response().end(responseObject.toString());
      ctx.response().close();
    }
 else {
      ctx.response().setStatusCode(204).end();
      ctx.response().close();
    }
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext ctx){
  DataBase database=DataBase.getInstance();
  SafeResultSet resultSet;
  EasyJsonObject responseObject=new EasyJsonObject();
  EasyJsonObject tempObject=new EasyJsonObject();
  EasyJsonArray tempArray=new EasyJsonArray();
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  if (!Guardian.checkParameters(no)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  try {
    resultSet=database.executeQuery("String_Node_Str",no);
    if (resultSet.next()) {
      do {
        tempObject=new EasyJsonObject();
        tempObject.put("String_Node_Str",resultSet.getInt("String_Node_Str"));
        tempObject.put("String_Node_Str",AES256.decrypt(resultSet.getString("String_Node_Str")));
        tempObject.put("String_Node_Str",resultSet.getString("String_Node_Str"));
        tempObject.put("String_Node_Str",resultSet.getString("String_Node_Str"));
        tempArray.add(tempObject);
      }
 while (resultSet.next());
      responseObject.put("String_Node_Str",tempArray);
      ctx.response().setStatusCode(200);
      ctx.response().end(responseObject.toString());
      ctx.response().close();
    }
 else {
      ctx.response().setStatusCode(204).end();
      ctx.response().close();
    }
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}
Program: 172635
Project: 172635
Buggy source:
@Override public void handle(RoutingContext ctx){
  DataBase database=DataBase.getInstance();
  AES256 aes=UserManager.getAES();
  String title=ctx.request().getParam("String_Node_Str");
  String content=ctx.request().getParam("String_Node_Str");
  boolean privacy=Boolean.parseBoolean(ctx.request().getParam("String_Node_Str"));
  String uid=null;
  try {
    uid=userManager.getUid(userManager.getIdFromSession(ctx));
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  if (Guardian.checkParameters(title,content,privacy,uid)) {
    try {
      SafeResultSet rs=database.executeQuery("String_Node_Str",uid,"String_Node_Str");
      rs.next();
      String name=aes.decrypt(rs.getString("String_Node_Str"));
      database.executeUpdate("String_Node_Str",title,"String_Node_Str",content,"String_Node_Str",privacy,"String_Node_Str",uid,"String_Node_Str",name,"String_Node_Str");
      ctx.response().setStatusCode(201).end();
      ctx.response().close();
    }
 catch (    SQLException e) {
      ctx.response().setStatusCode(500).end();
      ctx.response().close();
    }
  }
  if (!ctx.response().closed()) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext ctx){
  DataBase database=DataBase.getInstance();
  String title=ctx.request().getParam("String_Node_Str");
  String content=ctx.request().getParam("String_Node_Str");
  boolean privacy=Boolean.parseBoolean(ctx.request().getParam("String_Node_Str"));
  String uid=null;
  try {
    uid=UserManager.getUid(UserManager.getIdFromSession(ctx));
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  if (Guardian.checkParameters(title,content,privacy,uid)) {
    try {
      SafeResultSet rs=database.executeQuery("String_Node_Str",uid,"String_Node_Str");
      rs.next();
      String name=AES256.decrypt(rs.getString("String_Node_Str"));
      database.executeUpdate("String_Node_Str",title,"String_Node_Str",content,"String_Node_Str",privacy,"String_Node_Str",uid,"String_Node_Str",name,"String_Node_Str");
      ctx.response().setStatusCode(201).end();
      ctx.response().close();
    }
 catch (    SQLException e) {
      ctx.response().setStatusCode(500).end();
      ctx.response().close();
    }
  }
  if (!ctx.response().closed()) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
  }
}
Program: 172636
Project: 172636
Buggy source:
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String title=context.request().getParam("String_Node_Str");
  String content=context.request().getParam("String_Node_Str");
  int room=Integer.parseInt(context.request().getParam("String_Node_Str"));
  String writer=null;
  if (userManager.isLogined(context)) {
    try {
      JobResult result=userManager.getUserInfo(userManager.getIdFromSession(context));
      if (result != null && result.isSuccess()) {
        writer=((Map<String,Object>)result.getArgs()[0]).get("String_Node_Str").toString();
      }
    }
 catch (    SQLException e) {
      e.printStackTrace();
    }
    if (Guardian.checkParameters(title,content,room,writer)) {
      try {
        database.executeUpdate("String_Node_Str",title,"String_Node_Str",content,"String_Node_Str",room,"String_Node_Str",writer,"String_Node_Str");
        context.response().setStatusCode(201).end();
        context.response().close();
      }
 catch (      SQLException e) {
        context.response().setStatusCode(500).end();
        context.response().close();
        Log.l("String_Node_Str");
      }
    }
  }
  if (!context.response().closed()) {
    context.response().setStatusCode(400).end();
    context.response().close();
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String title=context.request().getParam("String_Node_Str");
  String content=context.request().getParam("String_Node_Str");
  int room=Integer.parseInt(context.request().getParam("String_Node_Str"));
  String writer=null;
  if (UserManager.isLogined(context)) {
    try {
      JSONObject result=UserManager.getUserInfo(UserManager.getIdFromSession(context));
      if (result.length() != 0) {
        writer=result.getString("String_Node_Str");
      }
    }
 catch (    SQLException e) {
      e.printStackTrace();
    }
    if (Guardian.checkParameters(title,content,room,writer)) {
      try {
        database.executeUpdate("String_Node_Str",title,"String_Node_Str",content,"String_Node_Str",room,"String_Node_Str",writer,"String_Node_Str");
        context.response().setStatusCode(201).end();
        context.response().close();
      }
 catch (      SQLException e) {
        context.response().setStatusCode(500).end();
        context.response().close();
        Log.l("String_Node_Str");
      }
    }
  }
  if (!context.response().closed()) {
    context.response().setStatusCode(400).end();
    context.response().close();
  }
}
Program: 172639
Project: 172639
Buggy source:
private void initResidualMaps(String date,HashMap<String,String> map){
  List<com.dms.api.xlsx.ResidualData> list=new ArrayList<com.dms.api.xlsx.ResidualData>();
  try {
    SafeResultSet rs=DataBase.getInstance().executeQuery("String_Node_Str");
    while (rs.next()) {
      com.dms.api.xlsx.ResidualData data=new com.dms.api.xlsx.ResidualData();
      data.setId(rs.getString("String_Node_Str"));
      String uid=UserManager.getAES().decrypt(rs.getString("String_Node_Str"));
      if (uid == null || uid.length() == 0)       continue;
      data.setNumber(Integer.valueOf(uid));
      data.setResidualDefault(rs.getInt("String_Node_Str"));
      list.add(data);
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  for (  com.dms.api.xlsx.ResidualData user : list) {
    try {
      int type;
      String query=QueryUtils.queryBuilder("String_Node_Str",user.getId(),"String_Node_Str");
      SafeResultSet rs=DataBase.getInstance().executeQuery(query);
      if (rs.next())       type=rs.getInt(1);
 else       type=user.getResidualDefault();
      map.put(user.getNumber() + "String_Node_Str",RESIDUAL_TYPE[type - 1]);
    }
 catch (    SQLException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
private void initResidualMaps(String date,HashMap<String,String> map){
  List<com.dms.api.xlsx.ResidualData> list=new ArrayList<com.dms.api.xlsx.ResidualData>();
  try {
    SafeResultSet rs=DataBase.getInstance().executeQuery("String_Node_Str");
    while (rs.next()) {
      com.dms.api.xlsx.ResidualData data=new com.dms.api.xlsx.ResidualData();
      data.setId(rs.getString("String_Node_Str"));
      String uid=AES256.decrypt(rs.getString("String_Node_Str"));
      if (uid == null || uid.length() == 0)       continue;
      data.setNumber(Integer.valueOf(uid));
      data.setResidualDefault(rs.getInt("String_Node_Str"));
      list.add(data);
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  for (  com.dms.api.xlsx.ResidualData user : list) {
    try {
      int type;
      String query=QueryUtils.queryBuilder("String_Node_Str",user.getId(),"String_Node_Str");
      SafeResultSet rs=DataBase.getInstance().executeQuery(query);
      if (rs.next())       type=rs.getInt(1);
 else       type=user.getResidualDefault();
      map.put(user.getNumber() + "String_Node_Str",RESIDUAL_TYPE[type - 1]);
    }
 catch (    SQLException e) {
      e.printStackTrace();
    }
  }
}
Program: 172640
Project: 172640
Buggy source:
public void handle(RoutingContext context){
  int code=400;
  String content=null;
  if (adminManager.isAdmin(context)) {
    try {
      SafeResultSet rs=DataBase.getInstance().executeQuery("String_Node_Str");
      List<HashMap<String,Object>> list=rs.toHashMap();
      for (      HashMap<String,Object> map : list) {
        map.put("String_Node_Str",userManager.getAES().decrypt((String)map.get("String_Node_Str")));
        map.put("String_Node_Str",userManager.getAES().decrypt((String)map.get("String_Node_Str")));
      }
      List<String> columns=rs.getColumns();
      DmsTemplate template=new DmsTemplate("String_Node_Str");
      template.put("String_Node_Str","String_Node_Str");
      template.put("String_Node_Str",columns);
      template.put("String_Node_Str",columns);
      template.put("String_Node_Str",list);
      content=template.process();
      code=200;
    }
 catch (    SQLException|TemplateException|IOException e) {
      e.printStackTrace();
      code=500;
    }
  }
  context.response().setStatusCode(code);
  if (content != null)   context.response().end(content);
 else   context.response().end();
  context.response().close();
}

Fixed version (ground truth):
public void handle(RoutingContext context){
  int code=400;
  String content=null;
  if (AdminManager.isAdmin(context)) {
    try {
      SafeResultSet rs=DataBase.getInstance().executeQuery("String_Node_Str");
      List<HashMap<String,Object>> list=rs.toHashMap();
      for (      HashMap<String,Object> map : list) {
        map.put("String_Node_Str",AES256.decrypt((String)map.get("String_Node_Str")));
        map.put("String_Node_Str",AES256.decrypt((String)map.get("String_Node_Str")));
      }
      List<String> columns=rs.getColumns();
      DmsTemplate template=new DmsTemplate("String_Node_Str");
      template.put("String_Node_Str","String_Node_Str");
      template.put("String_Node_Str",columns);
      template.put("String_Node_Str",columns);
      template.put("String_Node_Str",list);
      content=template.process();
      code=200;
    }
 catch (    SQLException|TemplateException|IOException e) {
      e.printStackTrace();
      code=500;
    }
  }
  context.response().setStatusCode(code);
  if (content != null)   context.response().end(content);
 else   context.response().end();
  context.response().close();
}
Program: 172641
Project: 172641
Buggy source:
public boolean isApply(RoutingContext ctx){
  boolean result=false;
  try {
    if (DataBase.getInstance().executeQuery("String_Node_Str",userManager.getUid(userManager.getIdFromSession(ctx)),"String_Node_Str").nextAndReturn().getInt(1) > 0) {
      result=true;
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return result;
}

Fixed version (ground truth):
public boolean isApply(RoutingContext ctx){
  boolean result=false;
  try {
    if (DataBase.getInstance().executeQuery("String_Node_Str",UserManager.getUid(UserManager.getIdFromSession(ctx)),"String_Node_Str").nextAndReturn().getInt(1) > 0) {
      result=true;
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return result;
}
Program: 172642
Project: 172642
Buggy source:
public boolean canApply(RoutingContext ctx){
  boolean result=false;
  Calendar c=Calendar.getInstance();
  int month=c.get(Calendar.MONTH) + 1;
  int day=c.get(Calendar.DAY_OF_MONTH);
  if ((month == 5 && day > 29) || (month == 6 && day <= 2)) {
    try {
      SafeResultSet rs=DataBase.getInstance().executeQuery("String_Node_Str",userManager.getUid(userManager.getIdFromSession(ctx)),"String_Node_Str");
      if (rs.next() && !UserManager.getAES().decrypt(rs.getString(1)).startsWith("String_Node_Str")) {
        result=true;
      }
    }
 catch (    SQLException e) {
      e.printStackTrace();
    }
  }
  return result;
}

Fixed version (ground truth):
public boolean canApply(RoutingContext ctx){
  boolean result=false;
  Calendar c=Calendar.getInstance();
  int month=c.get(Calendar.MONTH) + 1;
  int day=c.get(Calendar.DAY_OF_MONTH);
  if ((month == 5 && day > 29) || (month == 6 && day <= 2)) {
    try {
      SafeResultSet rs=DataBase.getInstance().executeQuery("String_Node_Str",UserManager.getUid(UserManager.getIdFromSession(ctx)),"String_Node_Str");
      if (rs.next() && !AES256.decrypt(rs.getString(1)).startsWith("String_Node_Str")) {
        result=true;
      }
    }
 catch (    SQLException e) {
      e.printStackTrace();
    }
  }
  return result;
}
Program: 172643
Project: 172643
Buggy source:
@Override public void handle(RoutingContext context){
  String fileName=context.request().getParam("String_Node_Str");
  context.response().sendFile("String_Node_Str" + fileName);
}

Fixed version (ground truth):
public void handle(RoutingContext context){
  String fileName=context.request().getParam("String_Node_Str");
  context.response().sendFile("String_Node_Str" + fileName);
}
Program: 172644
Project: 172644
Buggy source:
public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String title=context.request().getParam("String_Node_Str");
  String content=context.request().getParam("String_Node_Str");
  if (!Guardian.checkParameters(title,content)) {
    context.response().setStatusCode(400).end();
    context.response().close();
    return;
  }
  try {
    database.executeUpdate("String_Node_Str",title,"String_Node_Str",content,"String_Node_Str");
    context.response().setStatusCode(201).end();
    context.response().close();
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
public void handle(RoutingContext context){
  String title=context.request().getParam("String_Node_Str");
  String content=context.request().getParam("String_Node_Str");
  if (!Guardian.checkParameters(title,content)) {
    context.response().setStatusCode(400).end();
    context.response().close();
    return;
  }
  DB.executeUpdate("String_Node_Str",title,content);
  context.response().setStatusCode(201).end();
  context.response().close();
}
Program: 172645
Project: 172645
Buggy source:
@Override public void handle(RoutingContext ctx){
  if (!Guardian.isAdmin(ctx)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  DataBase database=DataBase.getInstance();
  EasyJsonObject responseObject=new EasyJsonObject();
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  if (!Guardian.checkParameters(no)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  try {
    database.executeUpdate("String_Node_Str",no);
    ctx.response().setStatusCode(200);
    ctx.response().end(responseObject.toString());
    ctx.response().close();
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext ctx){
  if (!Guardian.isAdmin(ctx)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  if (!Guardian.checkParameters(no)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  DB.executeUpdate("String_Node_Str",no);
  ctx.response().setStatusCode(200).end();
  ctx.response().close();
}
Program: 172646
Project: 172646
Buggy source:
@Deprecated @Override public void handle(RoutingContext ctx){
  DataBase database=DataBase.getInstance();
  SafeResultSet resultSet;
  EasyJsonObject responseObject=new EasyJsonObject();
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  if (!Guardian.checkParameters(no)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  try {
    resultSet=database.executeQuery("String_Node_Str",no);
    if (resultSet.next()) {
      responseObject.put("String_Node_Str",resultSet.getString("String_Node_Str"));
      responseObject.put("String_Node_Str",resultSet.getString("String_Node_Str"));
      ctx.response().setStatusCode(200);
      ctx.response().end(responseObject.toString());
      ctx.response().close();
    }
 else {
      ctx.response().setStatusCode(204).end();
      ctx.response().close();
    }
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Deprecated @Override public void handle(RoutingContext ctx){
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  if (!Guardian.checkParameters(no)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  try {
    ResultSet rs=DB.executeQuery("String_Node_Str",no);
    JSONObject response=new JSONObject();
    if (rs.next()) {
      response.put("String_Node_Str",rs.getString("String_Node_Str"));
      response.put("String_Node_Str",rs.getString("String_Node_Str"));
      ctx.response().setStatusCode(200);
      ctx.response().end(response.toString());
      ctx.response().close();
    }
 else {
      ctx.response().setStatusCode(204).end();
      ctx.response().close();
    }
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}
Program: 172647
Project: 172647
Buggy source:
@Override public void handle(RoutingContext ctx){
  if (!Guardian.isAdmin(ctx)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  DataBase database=DataBase.getInstance();
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  String title=ctx.request().getParam("String_Node_Str");
  String content=ctx.request().getParam("String_Node_Str");
  if (!Guardian.checkParameters(no,title,content)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  try {
    database.executeUpdate("String_Node_Str",title,"String_Node_Str",no);
    database.executeUpdate("String_Node_Str",content,"String_Node_Str",no);
    ctx.response().setStatusCode(200).end();
    ctx.response().end();
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext ctx){
  if (!Guardian.isAdmin(ctx)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  String title=ctx.request().getParam("String_Node_Str");
  String content=ctx.request().getParam("String_Node_Str");
  if (!Guardian.checkParameters(no,title,content)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  DB.executeUpdate("String_Node_Str",title,no);
  DB.executeUpdate("String_Node_Str",content,no);
  ctx.response().setStatusCode(200).end();
  ctx.response().end();
}
Program: 172648
Project: 172648
Buggy source:
@Override public void handle(RoutingContext ctx){
  if (!Guardian.isAdmin(ctx)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  DataBase database=DataBase.getInstance();
  String title=ctx.request().getParam("String_Node_Str");
  String content=ctx.request().getParam("String_Node_Str");
  if (!Guardian.checkParameters(title,content)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  try {
    database.executeUpdate("String_Node_Str",title,"String_Node_Str",content,"String_Node_Str");
    ctx.response().setStatusCode(201).end();
    ctx.response().close();
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext ctx){
  if (!Guardian.isAdmin(ctx)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  String title=ctx.request().getParam("String_Node_Str");
  String content=ctx.request().getParam("String_Node_Str");
  if (!Guardian.checkParameters(title,content)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  DB.executeUpdate("String_Node_Str",title,content);
  ctx.response().setStatusCode(201).end();
  ctx.response().close();
}
Program: 172649
Project: 172649
Buggy source:
@Override public void handle(RoutingContext ctx){
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  if (!Guardian.isAdmin(ctx) && Guardian.checkParameters(no)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  DataBase database=DataBase.getInstance();
  try {
    database.executeUpdate("String_Node_Str",no);
    ctx.response().setStatusCode(200).end();
    ctx.response().close();
  }
 catch (  SQLException e) {
    ctx.response().setStatusCode(500).end();
    ctx.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext ctx){
  int no=Integer.parseInt(ctx.request().getParam("String_Node_Str"));
  if (!Guardian.isAdmin(ctx) && Guardian.checkParameters(no)) {
    ctx.response().setStatusCode(400).end();
    ctx.response().close();
    return;
  }
  DB.executeUpdate("String_Node_Str",no);
  ctx.response().setStatusCode(200).end();
  ctx.response().close();
}
Program: 172650
Project: 172650
Buggy source:
public String getStayStatus(String id,String week){
  String status="String_Node_Str";
  try {
    String uid=getUid(id);
    ResultSet rs=DB.executeQuery("String_Node_Str",uid,week);
    if (rs.next()) {
      int value=rs.getInt(1);
      status=ApplyDataUtil.stayDataToString(value);
    }
 else {
      rs=DB.executeQuery("String_Node_Str",uid);
      if (rs.next()) {
        int value=rs.getInt(1);
        status=ApplyDataUtil.stayDataToString(value);
      }
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return status;
}

Fixed version (ground truth):
public static String getStayStatus(String id,String week){
  String status="String_Node_Str";
  try {
    String uid=getUid(id);
    ResultSet rs=DB.executeQuery("String_Node_Str",uid,week);
    if (rs.next()) {
      int value=rs.getInt(1);
      status=ApplyDataUtil.stayDataToString(value);
    }
 else {
      rs=DB.executeQuery("String_Node_Str",uid);
      if (rs.next()) {
        int value=rs.getInt(1);
        status=ApplyDataUtil.stayDataToString(value);
      }
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return status;
}
Program: 172653
Project: 172653
Buggy source:
private void loadMeal(Date date){
  new LoadMealTask(getContext(),new LoadMealTask.OnPostExecuteListener(){
    @Override public void onPostExecute(    Meal meal){
      HomeMealFragment[] homeMealFragments=new HomeMealFragment[3];
      if (meal == null) {
        homeMealFragments[0]=HomeMealFragment.newInstance(getContext(),"String_Node_Str");
        homeMealFragments[1]=HomeMealFragment.newInstance(getContext(),"String_Node_Str");
        homeMealFragments[2]=HomeMealFragment.newInstance(getContext(),"String_Node_Str");
      }
 else {
        Log.d("String_Node_Str",meal.getBreakfast());
        Log.d("String_Node_Str",meal.getLunch());
        Log.d("String_Node_Str",meal.getDinner());
        homeMealFragments[0]=newInstance(getContext(),meal.getBreakfast());
        homeMealFragments[1]=newInstance(getContext(),meal.getLunch());
        homeMealFragments[2]=newInstance(getContext(),meal.getDinner());
      }
      if (mMealViewPager.getAdapter() == null) {
        mMealViewPager.setAdapter(new HomeMealFragmentPagerAdapter(getFragmentManager(),homeMealFragments));
      }
 else {
        ((HomeMealFragmentPagerAdapter)mMealViewPager.getAdapter()).changeItems(homeMealFragments);
      }
    }
  }
).execute(date);
}

Fixed version (ground truth):
private void loadMeal(Date date){
  new LoadMealTask(getContext(),new LoadMealTask.OnPostExecuteListener(){
    @Override public void onPostExecute(    Meal meal){
      HomeMealFragment[] homeMealFragments=new HomeMealFragment[3];
      PagerAdapter adapter=mMealViewPager.getAdapter();
      if (adapter == null) {
        mMealViewPager.setAdapter(new HomeMealFragmentPagerAdapter(getFragmentManager(),getContext(),meal));
      }
 else {
        ((HomeMealFragmentPagerAdapter)mMealViewPager.getAdapter()).setData(meal);
      }
    }
  }
).execute(date);
}
Program: 172654
Project: 172654
Buggy source:
@Override public void onPostExecute(Meal meal){
  HomeMealFragment[] homeMealFragments=new HomeMealFragment[3];
  if (meal == null) {
    homeMealFragments[0]=HomeMealFragment.newInstance(getContext(),"String_Node_Str");
    homeMealFragments[1]=HomeMealFragment.newInstance(getContext(),"String_Node_Str");
    homeMealFragments[2]=HomeMealFragment.newInstance(getContext(),"String_Node_Str");
  }
 else {
    Log.d("String_Node_Str",meal.getBreakfast());
    Log.d("String_Node_Str",meal.getLunch());
    Log.d("String_Node_Str",meal.getDinner());
    homeMealFragments[0]=newInstance(getContext(),meal.getBreakfast());
    homeMealFragments[1]=newInstance(getContext(),meal.getLunch());
    homeMealFragments[2]=newInstance(getContext(),meal.getDinner());
  }
  if (mMealViewPager.getAdapter() == null) {
    mMealViewPager.setAdapter(new HomeMealFragmentPagerAdapter(getFragmentManager(),homeMealFragments));
  }
 else {
    ((HomeMealFragmentPagerAdapter)mMealViewPager.getAdapter()).changeItems(homeMealFragments);
  }
}

Fixed version (ground truth):
@Override public void onPostExecute(Meal meal){
  HomeMealFragment[] homeMealFragments=new HomeMealFragment[3];
  PagerAdapter adapter=mMealViewPager.getAdapter();
  if (adapter == null) {
    mMealViewPager.setAdapter(new HomeMealFragmentPagerAdapter(getFragmentManager(),getContext(),meal));
  }
 else {
    ((HomeMealFragmentPagerAdapter)mMealViewPager.getAdapter()).setData(meal);
  }
}
Program: 172655
Project: 172655
Buggy source:
/** 
 * 초기화
 * @param rootView 필요한 뷰를 찾을 최상위 뷰
 */
private void init(View rootView){
  String meal=getArguments().getString(getString(R.string.ARGS_MEAL));
  TextView mealTV=(TextView)rootView.findViewById(R.id.tv_home_meal);
  mealTV.setText(meal);
}

Fixed version (ground truth):
/** 
 * 초기화
 * @param rootView 필요한 뷰를 찾을 최상위 뷰
 */
private void init(View rootView){
  mMealString=getArguments().getString(getString(R.string.ARGS_MEAL));
  String meal=getArguments().getString(getString(R.string.ARGS_MEAL));
  TextView mealTV=(TextView)rootView.findViewById(R.id.tv_home_meal);
  mealTV.setText(meal);
}
Program: 172657
Project: 172657
Buggy source:
private void setSelectedWeekTV(Date date){
  Calendar cal=Calendar.getInstance(Locale.KOREA);
  cal.setTime(date);
  cal.set(Calendar.DAY_OF_WEEK,Calendar.SATURDAY);
  SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str",Locale.KOREA);
  mSelectedWeekTV.setText(sdf.format(cal.getTime()));
}

Fixed version (ground truth):
private void setSelectedWeekTV(String week){
  mSelectedWeekTV.setText(week);
}
Program: 172658
Project: 172658
Buggy source:
@Override public void onDateClick(@NonNull Date date){
  mSelectedDate=date;
  setSelectedWeekTV(date);
  setSelectedWeekStatusTV(null);
  new LoadStayStatusTask().execute(DateUtils.dateToWeekDateString(mSelectedDate));
}

Fixed version (ground truth):
@Override public void onDateClick(@NonNull Date date){
  mSelectedDate=date;
  setSelectedWeekTV(calendarView.getLastSelectedWeekString());
  setSelectedWeekStatusTV(null);
  new LoadStayStatusTask().execute(DateUtils.dateToWeekDateString(mSelectedDate));
}
Program: 172659
Project: 172659
Buggy source:
public static Response push(Request request) throws HttpBoxException, IOException {
  URL serverUrl=new URL(request.getUrl());
  HttpURLConnection urlConnection=(HttpURLConnection)serverUrl.openConnection();
  urlConnection.setRequestMethod(request.getType());
  for (int i=0; i < request.getHeaderPropertiesSize(); i++) {
    HeaderProperty property=request.getProperty(i);
    urlConnection.setRequestProperty(property.getKey(),property.getValue());
    Log.d("String_Node_Str",property.getKey() + "String_Node_Str" + property.getValue());
  }
  if (!urlConnection.getRequestMethod().equals(Request.TYPE_GET)) {
    urlConnection.setDoOutput(true);
  }
  if (request.getBodyData() != null) {
    BufferedWriter httpRequestBodyWriter=new BufferedWriter(new OutputStreamWriter(urlConnection.getOutputStream()));
    httpRequestBodyWriter.write(request.getBodyData());
    httpRequestBodyWriter.close();
  }
  Response response=new Response(urlConnection.getResponseCode(),urlConnection.getResponseMessage(),urlConnection.getHeaderFields());
  Scanner httpResponseScanner=new Scanner(urlConnection.getInputStream());
  while (httpResponseScanner.hasNextLine()) {
    response.appendBody(httpResponseScanner.nextLine());
  }
  httpResponseScanner.close();
  urlConnection.getHeaderFields();
  return response;
}

Fixed version (ground truth):
public static Response push(Request request) throws HttpBoxException, IOException {
  URL serverUrl=new URL(request.getUrl());
  HttpURLConnection urlConnection=(HttpURLConnection)serverUrl.openConnection();
  urlConnection.setRequestMethod(request.getType());
  for (int i=0; i < request.getHeaderPropertiesSize(); i++) {
    HeaderProperty property=request.getProperty(i);
    urlConnection.setRequestProperty(property.getKey(),property.getValue());
  }
  if (!urlConnection.getRequestMethod().equals(Request.TYPE_GET)) {
    urlConnection.setDoOutput(true);
  }
  if (request.getBodyData() != null) {
    BufferedWriter httpRequestBodyWriter=new BufferedWriter(new OutputStreamWriter(urlConnection.getOutputStream()));
    httpRequestBodyWriter.write(request.getBodyData());
    httpRequestBodyWriter.close();
  }
  Response response=new Response(urlConnection.getResponseCode(),urlConnection.getResponseMessage(),urlConnection.getHeaderFields());
  Scanner httpResponseScanner=new Scanner(urlConnection.getInputStream());
  while (httpResponseScanner.hasNextLine()) {
    response.appendBody(httpResponseScanner.nextLine());
  }
  httpResponseScanner.close();
  urlConnection.getHeaderFields();
  return response;
}
Program: 172660
Project: 172660
Buggy source:
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  SafeResultSet resultSet;
  EasyJsonObject responseObject=new EasyJsonObject();
  String uid=context.request().getParam("String_Node_Str");
  try {
    responseObject.put("String_Node_Str",ProfileImage.getProfileImage(uid));
    resultSet=database.executeQuery("String_Node_Str",uid,"String_Node_Str");
    if (resultSet.next()) {
      responseObject.put("String_Node_Str",resultSet.getInt("String_Node_Str"));
      responseObject.put("String_Node_Str",resultSet.getString("String_Node_Str"));
    }
 else {
      context.response().setStatusCode(404).end();
      context.response().close();
      return;
    }
    resultSet=database.executeQuery("String_Node_Str",uid,"String_Node_Str");
    if (resultSet.next()) {
      responseObject.put("String_Node_Str",resultSet.getInt("String_Node_Str"));
      responseObject.put("String_Node_Str",resultSet.getInt("String_Node_Str"));
    }
 else {
      context.response().setStatusCode(404).end();
      context.response().close();
      return;
    }
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext context){
  EasyJsonObject responseObject=new EasyJsonObject();
  String id=context.request().getParam("String_Node_Str");
  try {
    responseObject.put("String_Node_Str",ProfileImage.getProfileImage(id));
    JobResult result=userManager.getUserInfo(id);
    if (result.isSuccess()) {
      Map<String,Object> datas=(Map)result.getArgs()[0];
      responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
      responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
      responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
      responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
      context.response().setStatusCode(200).end();
      context.response().close();
    }
 else {
      context.response().setStatusCode(404).end();
      context.response().close();
    }
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}
Program: 172661
Project: 172661
Buggy source:
@Override public void handle(RoutingContext context){
  String id=context.request().getParam("String_Node_Str");
  String password=context.request().getParam("String_Node_Str");
  try {
    if (Guardian.checkParameters(id,password)) {
      if (!userManager.login(id,password)) {
        responseObject.put("String_Node_Str",false);
        context.response().setStatusCode(404).end();
        context.response().close();
      }
 else {
        responseObject.put("String_Node_Str",true);
        JobResult result=userManager.getUserInfo(id);
        if (result.isSuccess()) {
          Map<String,Object> datas=(Map)result.getArgs()[0];
          responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
          responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
          responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
          responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
        }
 else {
        }
        context.response().setStatusCode(201);
        context.response().end(responseObject.toString());
        context.response().close();
      }
    }
 else {
    }
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext context){
  EasyJsonObject responseObject=new EasyJsonObject();
  String id=context.request().getParam("String_Node_Str");
  String password=context.request().getParam("String_Node_Str");
  try {
    if (Guardian.checkParameters(id,password)) {
      if (!userManager.login(id,password)) {
        context.response().setStatusCode(404).end();
        context.response().close();
      }
 else {
        JobResult result=userManager.getUserInfo(id);
        if (result.isSuccess()) {
          Map<String,Object> datas=(Map)result.getArgs()[0];
          responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
          responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
          responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
          responseObject.put("String_Node_Str",datas.get("String_Node_Str"));
        }
 else {
        }
        context.response().setStatusCode(201);
        context.response().end(responseObject.toString());
        context.response().close();
      }
    }
 else {
    }
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}
Program: 172662
Project: 172662
Buggy source:
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String uid=context.request().getParam("String_Node_Str");
  String id=context.request().getParam("String_Node_Str");
  String password=context.request().getParam("String_Node_Str");
  int number=Integer.parseInt(context.request().getParam("String_Node_Str"));
  int status=Integer.parseInt(context.request().getParam("String_Node_Str"));
  String name=context.request().getParam("String_Node_Str");
  try {
    if (Guardian.checkParameters(uid,id,password)) {
      JobResult result=userManager.register(uid,id,password);
      if (result.isSuccess()) {
        database.executeUpdate("String_Node_Str",uid,"String_Node_Str",number,"String_Node_Str",status,"String_Node_Str",name,"String_Node_Str");
        database.executeUpdate("String_Node_Str",uid,"String_Node_Str");
        database.executeUpdate("String_Node_Str",uid,"String_Node_Str");
        context.response().setStatusCode(201);
        context.response().setStatusMessage(result.getMessage()).end();
        context.response().close();
      }
 else {
        context.response().setStatusCode(409);
        context.response().setStatusMessage(result.getMessage()).end();
        context.response().close();
      }
    }
 else {
    }
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String uid=context.request().getParam("String_Node_Str");
  String id=context.request().getParam("String_Node_Str");
  String password=context.request().getParam("String_Node_Str");
  int number=Integer.parseInt(context.request().getParam("String_Node_Str"));
  int status=Integer.parseInt(context.request().getParam("String_Node_Str"));
  String name=context.request().getParam("String_Node_Str");
  try {
    if (Guardian.checkParameters(uid,id,password)) {
      JobResult result=userManager.register(uid,id,password);
      if (result.isSuccess()) {
        database.executeUpdate("String_Node_Str",id,"String_Node_Str",number,"String_Node_Str",status,"String_Node_Str",name,"String_Node_Str");
        database.executeUpdate("String_Node_Str",id,"String_Node_Str");
        database.executeUpdate("String_Node_Str",id,"String_Node_Str");
        context.response().setStatusCode(201);
        context.response().setStatusMessage(result.getMessage()).end();
        context.response().close();
      }
 else {
        context.response().setStatusCode(409);
        context.response().setStatusMessage(result.getMessage()).end();
        context.response().close();
      }
    }
 else {
    }
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}
Program: 172663
Project: 172663
Buggy source:
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String id=context.request().getParam("String_Node_Str");
  String date=context.request().getParam("String_Node_Str");
  String reason=context.request().getParam("String_Node_Str");
  try {
    database.executeUpdate("String_Node_Str",id,"String_Node_Str",date);
    database.executeUpdate("String_Node_Str",id,"String_Node_Str",date,"String_Node_Str",reason,"String_Node_Str");
    context.response().setStatusCode(201).end();
    context.response().close();
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String id=context.request().getParam("String_Node_Str");
  boolean date=Boolean.parseBoolean(context.request().getParam("String_Node_Str"));
  String reason=context.request().getParam("String_Node_Str");
  try {
    database.executeUpdate("String_Node_Str",id,"String_Node_Str",date);
    database.executeUpdate("String_Node_Str",id,"String_Node_Str",date,"String_Node_Str",reason,"String_Node_Str");
    context.response().setStatusCode(201).end();
    context.response().close();
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}
Program: 172664
Project: 172664
Buggy source:
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String id=context.request().getParam("String_Node_Str");
  try {
    database.executeUpdate("String_Node_Str",id,"String_Node_Str");
    context.response().setStatusCode(200).end();
    context.response().close();
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void handle(RoutingContext context){
  DataBase database=DataBase.getInstance();
  String id=context.request().getParam("String_Node_Str");
  boolean date=Boolean.parseBoolean(context.request().getParam("String_Node_Str"));
  try {
    database.executeUpdate("String_Node_Str",id,"String_Node_Str",date);
    context.response().setStatusCode(200).end();
    context.response().close();
  }
 catch (  SQLException e) {
    context.response().setStatusCode(500).end();
    context.response().close();
    Log.l("String_Node_Str");
  }
}