nus-yam/ex-repair huggingface dataset:
Program: 44773
Project: 44773
Buggy source:
@Override public Server get(Long key,boolean fetchPermissions) throws EntityDoesNotExistsException {
  String sql="String_Node_Str";
  Connection conn=null;
  Server server=null;
  try {
    conn=ConnectionFactory.getSecondaryConnection();
    PreparedStatement st=conn.prepareStatement(sql);
    st.setLong(1,key);
    ResultSet rs=st.executeQuery();
    if (rs.next()) {
      server=new Server();
      loadServer(server,rs);
    }
 else {
      throw new EntityDoesNotExistsException("String_Node_Str",key.toString());
    }
    if (fetchPermissions) {
      sql="String_Node_Str";
      st=conn.prepareStatement(sql);
      st.setLong(1,key);
      rs=st.executeQuery();
      server.setPermissions(new HashMap<Long,Integer>());
      while (rs.next()) {
        server.getPermissions().put(new Long(rs.getInt("String_Node_Str")),rs.getInt("String_Node_Str"));
      }
    }
  }
 catch (  SQLException e) {
    logger.error("String_Node_Str",e);
  }
catch (  IOException e) {
    logger.error("String_Node_Str",e);
  }
 finally {
    try {
      if (conn != null)       conn.close();
    }
 catch (    Exception e) {
    }
  }
  return server;
}

Fixed version (ground truth):
@Override public Server get(Long key,boolean fetchPermissions) throws EntityDoesNotExistsException {
  String sql="String_Node_Str";
  Connection conn=null;
  Server server=null;
  try {
    conn=ConnectionFactory.getSecondaryConnection();
    PreparedStatement st=conn.prepareStatement(sql);
    st.setLong(1,key);
    ResultSet rs=st.executeQuery();
    if (rs.next()) {
      server=new Server();
      loadServer(server,rs);
    }
 else {
      throw new EntityDoesNotExistsException("String_Node_Str",key.toString());
    }
    if (fetchPermissions) {
      sql="String_Node_Str";
      st=conn.prepareStatement(sql);
      st.setLong(1,key);
      rs=st.executeQuery();
      server.setPermissions(new HashMap<Integer,Integer>());
      while (rs.next()) {
        server.getPermissions().put(new Integer(rs.getInt("String_Node_Str")),rs.getInt("String_Node_Str"));
      }
    }
  }
 catch (  SQLException e) {
    logger.error("String_Node_Str",e);
  }
catch (  IOException e) {
    logger.error("String_Node_Str",e);
  }
 finally {
    try {
      if (conn != null)       conn.close();
    }
 catch (    Exception e) {
    }
  }
  return server;
}
Program: 44774
Project: 44774
Buggy source:
@Override public boolean hasPermission(Long server,Integer level){
  Subject subject=this.getCurrentUser();
  if (!subject.isAuthenticated())   return false;
  if (subject.isSuperAdmin())   return true;
  Player player=getSubjectPlayer(server);
  if (player != null && player.getLevel() != null && player.getLevel() >= level) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean hasPermission(Long server,Integer level){
  Subject subject=this.getCurrentUser();
  if (!subject.isAuthenticated())   return false;
  if (subject.isSuperAdmin())   return true;
  Player player=getSubjectPlayer(server);
  if (player != null && player.getLevel() != null && player.getLevel().intValue() >= level.intValue()) {
    return true;
  }
  return false;
}
Program: 44776
Project: 44776
Buggy source:
private boolean checkRoles(Subject s,HttpServletRequest req,HttpServletResponse resp,String p) throws IOException {
  if (s.isAuthenticated()) {
    Set<String> r=urls.get(p);
    for (    String role : r) {
      if ("String_Node_Str".equals(role) || s.hasRole(role)) {
        return true;
      }
      resp.sendError(HttpServletResponse.SC_FORBIDDEN);
    }
  }
 else {
    UrlReverse reverse=new UrlReverse(this.context);
    try {
      resp.sendRedirect(req.getContextPath() + reverse.resolve("String_Node_Str") + "String_Node_Str"+ URLEncoder.encode(req.getRequestURI(),"String_Node_Str"));
    }
 catch (    RuleNotFoundException e) {
      log.error(e.getMessage());
      resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
catch (    ReverseException e) {
      log.error(e.getMessage());
      resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean checkRoles(Subject s,HttpServletRequest req,HttpServletResponse resp,String p) throws IOException {
  if (s.isAuthenticated()) {
    Set<String> r=urls.get(p);
    for (    String role : r) {
      if ("String_Node_Str".equals(role) || s.hasRole(role)) {
        log.debug("String_Node_Str");
        return true;
      }
      log.debug("String_Node_Str");
      resp.sendError(HttpServletResponse.SC_FORBIDDEN);
    }
  }
 else {
    log.debug("String_Node_Str");
    UrlReverse reverse=new UrlReverse(this.context);
    try {
      resp.sendRedirect(req.getContextPath() + reverse.resolve("String_Node_Str") + "String_Node_Str"+ URLEncoder.encode(req.getRequestURI(),"String_Node_Str"));
    }
 catch (    RuleNotFoundException e) {
      log.error(e.getMessage());
      resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
catch (    ReverseException e) {
      log.error(e.getMessage());
      resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
  }
  return false;
}
Program: 44777
Project: 44777
Buggy source:
/** 
 * @param s
 * @param request
 * @return
 * @throws IOException 
 */
private boolean haveAccess(Subject s,HttpServletRequest req,HttpServletResponse resp) throws IOException {
  String path=req.getRequestURI();
  if (!"String_Node_Str".equals(req.getContextPath())) {
    path=StringUtils.removeStartIgnoreCase(path,req.getContextPath());
  }
  for (  String p : urls.keySet()) {
    if (p.endsWith("String_Node_Str")) {
      if (path.startsWith(p.substring(0,p.length() - 2))) {
        return checkRoles(s,req,resp,p);
      }
    }
 else {
      if (path.equalsIgnoreCase(p)) {
        return checkRoles(s,req,resp,p);
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param s
 * @param request
 * @return
 * @throws IOException 
 */
private boolean haveAccess(Subject s,HttpServletRequest req,HttpServletResponse resp) throws IOException {
  String path=req.getRequestURI();
  log.debug("String_Node_Str",path);
  if (!req.getContextPath().isEmpty()) {
    path=StringUtils.removeStartIgnoreCase(path,req.getContextPath());
  }
  if (!path.startsWith("String_Node_Str")) {
    path="String_Node_Str" + path;
  }
 else   if (path.startsWith("String_Node_Str")) {
    path=path.substring(1);
  }
  for (  String p : urls.keySet()) {
    if (p.endsWith("String_Node_Str")) {
      if (path.startsWith(p.substring(0,p.length() - 2))) {
        return checkRoles(s,req,resp,p);
      }
    }
 else {
      if (path.equalsIgnoreCase(p)) {
        return checkRoles(s,req,resp,p);
      }
    }
  }
  return true;
}
Program: 44779
Project: 44779
Buggy source:
public void update(String key,Object[] plist) throws UpdateApiException, Exception {
  try {
    Server server=ServerManager.getAuthorizedServer(key,JIPDBSXmlRpc3Servlet.getClientIpAddress());
    List<PlayerInfo> list=new ArrayList<PlayerInfo>();
    for (    Object o : plist) {
      try {
        list.add(processEventInfo(o));
      }
 catch (      Exception e) {
        log.error(e.getMessage());
      }
    }
    if (list.size() > 0) {
      if (list.size() > maxListSize) {
        log.warn("String_Node_Str" + Integer.toString(list.size()));
        list=list.subList(list.size() - maxListSize,list.size());
      }
 else {
        log.info("String_Node_Str" + Integer.toString(list.size()));
      }
      updateApi.updatePlayer(server,list);
    }
 else {
      if (server.getOnlinePlayers() > 0) {
        log.debug("String_Node_Str" + server.getName());
        updateApi.cleanServer(server);
      }
    }
  }
 catch (  UnauthorizedUpdateException e) {
    log.warn(e.getMessage());
  }
catch (  Exception e) {
    log.error(e.getMessage());
    StringWriter w=new StringWriter();
    e.printStackTrace(new PrintWriter(w));
    log.error(w.getBuffer().toString());
    throw e;
  }
}

Fixed version (ground truth):
public void update(String key,Object[] plist) throws UpdateApiException, Exception {
  try {
    Server server=ServerManager.getAuthorizedServer(key,JIPDBSXmlRpc3Servlet.getClientIpAddress());
    List<PlayerInfo> list=new ArrayList<PlayerInfo>();
    for (    Object o : plist) {
      try {
        list.add(processEventInfo(o));
      }
 catch (      Exception e) {
        log.error(e.getMessage());
      }
    }
    if (list.size() > 0) {
      if (list.size() > maxListSize) {
        log.warn("String_Node_Str" + Integer.toString(list.size()));
        list=list.subList(list.size() - maxListSize,list.size());
      }
 else {
        log.info("String_Node_Str" + Integer.toString(list.size()));
      }
      updateApi.updatePlayer(server,list);
    }
 else {
      if (server.getOnlinePlayers() > 0 || server.getDirty()) {
        log.debug("String_Node_Str" + server.getName());
        updateApi.cleanServer(server);
      }
    }
  }
 catch (  UnauthorizedUpdateException e) {
    log.warn(e.getMessage());
  }
catch (  Exception e) {
    log.error(e.getMessage());
    StringWriter w=new StringWriter();
    e.printStackTrace(new PrintWriter(w));
    log.error(w.getBuffer().toString());
    throw e;
  }
}
Program: 44780
Project: 44780
Buggy source:
@Override public void save(AliasIP alias){
  String sql;
  if (alias.getKey() == null) {
    sql="String_Node_Str";
  }
 else {
    sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
  Connection conn=null;
  try {
    conn=ConnectionFactory.getConnection();
    PreparedStatement st=conn.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);
    st.setLong(1,alias.getPlayer());
    st.setLong(2,Functions.ipToDecimal(alias.getIp()));
    st.setTimestamp(3,new java.sql.Timestamp(alias.getCreated().getTime()));
    st.setTimestamp(4,new java.sql.Timestamp(alias.getUpdated().getTime()));
    st.setLong(5,alias.getCount());
    if (alias.getKey() != null)     st.setLong(6,alias.getKey());
    st.executeUpdate();
    if (alias.getKey() == null) {
      ResultSet rs=st.getGeneratedKeys();
      if (rs != null && rs.next()) {
        alias.setKey(rs.getLong(1));
      }
 else {
        logger.warn("String_Node_Str",alias.getIp());
      }
    }
  }
 catch (  SQLException e) {
    logger.error("String_Node_Str",e);
  }
catch (  IOException e) {
    logger.error("String_Node_Str",e);
  }
 finally {
    try {
      if (conn != null)       conn.close();
    }
 catch (    Exception e) {
    }
  }
}

Fixed version (ground truth):
@Override public void save(AliasIP alias){
  String sql;
  if (alias.getKey() == null) {
    sql="String_Node_Str";
  }
 else {
    sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
  Connection conn=null;
  try {
    conn=ConnectionFactory.getConnection();
    PreparedStatement st=conn.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);
    st.setLong(1,alias.getPlayer());
    st.setLong(2,Functions.ipToDecimal(alias.getIp()));
    if (alias.getCreated() == null)     alias.setCreated(new Date());
    if (alias.getUpdated() == null)     alias.setUpdated(new Date());
    st.setTimestamp(3,new java.sql.Timestamp(alias.getCreated().getTime()));
    st.setTimestamp(4,new java.sql.Timestamp(alias.getUpdated().getTime()));
    st.setLong(5,alias.getCount());
    if (alias.getKey() != null)     st.setLong(6,alias.getKey());
    st.executeUpdate();
    if (alias.getKey() == null) {
      ResultSet rs=st.getGeneratedKeys();
      if (rs != null && rs.next()) {
        alias.setKey(rs.getLong(1));
      }
 else {
        logger.warn("String_Node_Str",alias.getIp());
      }
    }
  }
 catch (  SQLException e) {
    logger.error("String_Node_Str",e);
  }
catch (  IOException e) {
    logger.error("String_Node_Str",e);
  }
 finally {
    try {
      if (conn != null)       conn.close();
    }
 catch (    Exception e) {
    }
  }
}
Program: 44782
Project: 44782
Buggy source:
public void parseRaw(String data){
  if (data.startsWith("String_Node_Str")) {
    data=data.substring(1);
  }
  String[] parts=data.split("String_Node_Str");
  setType(Long.parseLong(parts[0]));
  setCreated(Long.parseLong(parts[1]));
  setAdmin(parts[2]);
  if (parts[3].equals("String_Node_Str")) {
    setReason(null);
  }
 else {
    setReason(parts[3]);
  }
  setDuration(Long.parseLong(parts[4]));
}

Fixed version (ground truth):
public void parseRaw(String data){
  log.fine("String_Node_Str" + data);
  if (data.startsWith("String_Node_Str")) {
    data=data.substring(1);
  }
  String[] parts=data.split("String_Node_Str");
  try {
    setType(Long.parseLong(parts[0]));
    setCreated(Long.parseLong(parts[1]));
    setAdmin(parts[2]);
    if ("String_Node_Str".equals(parts[3])) {
      setReason(null);
    }
 else {
      setReason(parts[3]);
    }
    setDuration(Long.parseLong(parts[4]));
  }
 catch (  NumberFormatException e) {
    setType(Penalty.BAN);
    setCreated(Long.parseLong(parts[1]));
    setDuration(Long.parseLong(parts[2]));
    if (parts[3].equals("String_Node_Str")) {
      setReason(null);
    }
 else {
      setReason(parts[3]);
    }
  }
}
Program: 44783
Project: 44783
Buggy source:
/** 
 * Begin masking until asked to stop.
 */
public void run(){
  int priority=Thread.currentThread().getPriority();
  Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
  try {
    stop=true;
    while (stop) {
      System.out.print("String_Node_Str" + echochar);
      try {
        Thread.currentThread().sleep(1);
      }
 catch (      InterruptedException iex) {
        Thread.currentThread().interrupt();
        return;
      }
    }
  }
  finally {
    Thread.currentThread().setPriority(priority);
  }
}

Fixed version (ground truth):
/** 
 * Begin masking until asked to stop.
 */
public void run(){
  int priority=Thread.currentThread().getPriority();
  Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
  try {
    stop=true;
    while (stop) {
      try {
        Thread.currentThread().sleep(1);
      }
 catch (      InterruptedException iex) {
        Thread.currentThread().interrupt();
        return;
      }
      System.out.print("String_Node_Str" + echochar);
    }
  }
  finally {
    Thread.currentThread().setPriority(priority);
  }
}
Program: 44784
Project: 44784
Buggy source:
@Override public void withEntity(Entity entity,DatastoreService ds) throws Exception {
  Alias alias=new Alias(entity);
  StringBuilder a=new StringBuilder();
  a.append("String_Node_Str").append(EscapeChars.toString(EscapeChars.forJSON(alias.getNickname()))).append("String_Node_Str");
  a.append("String_Node_Str").append(EscapeChars.toString(alias.getIp())).append("String_Node_Str");
  a.append("String_Node_Str").append(EscapeChars.toString(Transformer.date_to_string(alias.getCreated()))).append("String_Node_Str");
  a.append("String_Node_Str").append(EscapeChars.toString(Transformer.date_to_string(alias.getUpdated()))).append("String_Node_Str");
  a.append("String_Node_Str").append(EscapeChars.toString(alias.getCount())).append("String_Node_Str");
  StringBuilder ngrams=new StringBuilder();
  for (Iterator<String> it=alias.getNgrams().iterator(); it.hasNext(); ) {
    ngrams.append(EscapeChars.toString(EscapeChars.forJSON(it.next())));
    if (it.hasNext())     ngrams.append("String_Node_Str");
  }
  a.append("String_Node_Str").append(ngrams.toString()).append("String_Node_Str");
  aliases.add("String_Node_Str" + a.toString() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void withEntity(Entity entity,DatastoreService ds) throws Exception {
  Alias alias=new Alias(entity);
  StringBuilder a=new StringBuilder();
  a.append("String_Node_Str").append(EscapeChars.toString(EscapeChars.forJSON(alias.getNickname()))).append("String_Node_Str");
  a.append("String_Node_Str").append(EscapeChars.toString(alias.getIp())).append("String_Node_Str");
  a.append("String_Node_Str").append(EscapeChars.toString(Transformer.date_to_string(alias.getCreated()))).append("String_Node_Str");
  a.append("String_Node_Str").append(EscapeChars.toString(Transformer.date_to_string(alias.getUpdated()))).append("String_Node_Str");
  a.append("String_Node_Str").append(EscapeChars.toString(alias.getCount())).append("String_Node_Str");
  StringBuilder ngrams=new StringBuilder();
  if (alias.getNgrams() != null) {
    for (Iterator<String> it=alias.getNgrams().iterator(); it.hasNext(); ) {
      ngrams.append(EscapeChars.toString(EscapeChars.forJSON(it.next())));
      if (it.hasNext())       ngrams.append("String_Node_Str");
    }
  }
  a.append("String_Node_Str").append(ngrams.toString()).append("String_Node_Str");
  aliases.add("String_Node_Str" + a.toString() + "String_Node_Str");
}
Program: 44786
Project: 44786
Buggy source:
public List<SearchResult> byServerSearch(String query,int offset,int limit,int[] count){
  try {
    List<SearchResult> results=new ArrayList<SearchResult>();
    Server server=serverDAO.get(KeyFactory.stringToKey(query));
    if (server != null) {
      for (      Player player : playerDAO.findByServer(query,offset,limit,count)) {
        results.add(marshall(player,server));
      }
    }
    return results;
  }
 catch (  Exception e) {
    e.printStackTrace();
    log.severe("String_Node_Str" + e.getMessage());
    count[0]=0;
    return Collections.emptyList();
  }
}

Fixed version (ground truth):
public List<SearchResult> byServerSearch(String query,int offset,int limit,int[] count){
  try {
    List<SearchResult> results=new ArrayList<SearchResult>();
    Server server=serverDAO.get(KeyFactory.stringToKey(query));
    if (server != null) {
      for (      Player player : playerDAO.findByServer(query,offset,limit,count)) {
        results.add(marshall(player,server));
      }
    }
    return results;
  }
 catch (  Exception e) {
    log.severe("String_Node_Str" + e.getMessage());
    count[0]=0;
    return Collections.emptyList();
  }
}
Program: 44787
Project: 44787
Buggy source:
public Boolean getOffline(){
  Date today=new Date();
  long diff=today.getTime() - this.updated.getTime();
  return (diff / 86400000 >= 2);
}

Fixed version (ground truth):
public Boolean getOffline(){
  Date today=new Date();
  if (this.updated != null) {
    long diff=today.getTime() - this.updated.getTime();
    return (diff / 86400000 >= 2);
  }
  return true;
}
Program: 44788
Project: 44788
Buggy source:
@Override public Server get(Key server) throws EntityNotFoundException {
  DatastoreService service=DatastoreServiceFactory.getDatastoreService();
  return new Server(service.get(server));
}

Fixed version (ground truth):
@Override public Server get(Key server) throws EntityNotFoundException {
  DatastoreService service=DatastoreServiceFactory.getDatastoreService();
  try {
    Entity entity=service.get(server);
    if (entity != null)     return new Server(entity);
  }
 catch (  Exception e) {
  }
  return null;
}
Program: 44789
Project: 44789
Buggy source:
public BanInfo(String data){
  String[] parts=StringUtils.split(data,"String_Node_Str");
  setType(parts[0]);
  setCreated(new Date(Long.parseLong(parts[1]) * 1000L));
  setDuration(Long.parseLong(parts[2]));
  if (parts.length == 4)   setReason(parts[3]);
 else   setReason("String_Node_Str");
}

Fixed version (ground truth):
public BanInfo(String data){
  String[] parts=data.split("String_Node_Str");
  setType(parts[0]);
  setCreated(new Date(Long.parseLong(parts[1]) * 1000L));
  setDuration(Long.parseLong(parts[2]));
  if (parts.length == 4)   setReason(parts[3]);
 else   setReason("String_Node_Str");
}
Program: 44790
Project: 44790
Buggy source:
public static String fixIp(String query){
  String[] parts=StringUtils.split(query,"String_Node_Str");
  String[] r=new String[4];
  for (int i=0; i < 3; i++) {
    if (i < parts.length)     r[i]=parts[i];
 else     r[i]="String_Node_Str";
  }
  r[3]="String_Node_Str";
  if ("String_Node_Str".equals(r[0]))   return "String_Node_Str";
  return join(r,"String_Node_Str");
}

Fixed version (ground truth):
public static String fixIp(String query){
  String[] parts=query.split("String_Node_Str");
  String[] r=new String[4];
  for (int i=0; i < 3; i++) {
    if (i < parts.length)     r[i]=parts[i];
 else     r[i]="String_Node_Str";
  }
  r[3]="String_Node_Str";
  if ("String_Node_Str".equals(r[0]))   return "String_Node_Str";
  return join(r,"String_Node_Str");
}
Program: 44791
Project: 44791
Buggy source:
public static final Long ipToDecimal(String ip){
  if (StringUtils.isEmpty(ip))   return 0l;
  String[] parts=StringUtils.split(ip,"String_Node_Str");
  Long n=16777216 * Long.parseLong(parts[0]);
  n+=65536 * Long.parseLong(parts[1]);
  n+=256 * Long.parseLong(parts[2]);
  n+=Long.parseLong(parts[3]);
  return n;
}

Fixed version (ground truth):
public static final Long ipToDecimal(String ip){
  if (StringUtils.isEmpty(ip))   return 0l;
  String[] parts=ip.split("String_Node_Str");
  Long n=16777216 * Long.parseLong(parts[0]);
  n+=65536 * Long.parseLong(parts[1]);
  n+=256 * Long.parseLong(parts[2]);
  n+=Long.parseLong(parts[3]);
  return n;
}
Program: 44792
Project: 44792
Buggy source:
public static final String maskIpAddress(String ip){
  if (StringUtils.isEmpty(ip))   return "String_Node_Str";
  String[] parts=StringUtils.split(ip,"String_Node_Str");
  Integer n=IP_SEED;
  n+=Integer.parseInt(parts[0]);
  n-=Integer.parseInt(parts[1]);
  n+=Integer.parseInt(parts[2]);
  n-=Integer.parseInt(parts[3]);
  n=Math.abs(n);
  return parts[0] + "String_Node_Str" + parts[1]+ "String_Node_Str"+ parts[2]+ "String_Node_Str"+ Integer.toHexString(n).toUpperCase();
}

Fixed version (ground truth):
public static final String maskIpAddress(String ip){
  if (StringUtils.isEmpty(ip))   return "String_Node_Str";
  String[] parts=ip.split("String_Node_Str");
  Integer n=IP_SEED;
  n+=Integer.parseInt(parts[0]);
  n-=Integer.parseInt(parts[1]);
  n+=Integer.parseInt(parts[2]);
  n-=Integer.parseInt(parts[3]);
  n=Math.abs(n);
  return parts[0] + "String_Node_Str" + parts[1]+ "String_Node_Str"+ parts[2]+ "String_Node_Str"+ Integer.toHexString(n).toUpperCase();
}
Program: 44793
Project: 44793
Buggy source:
@Override protected void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  DateFormat format=new SimpleDateFormat("String_Node_Str");
  String[] ver=StringUtils.split(SystemProperty.applicationVersion.get(),"String_Node_Str");
  long longversion=(long)(Long.parseLong(ver[ver.length - 1]) / Math.pow(2,28));
  Date d=new Date(longversion * 1000);
  ver[ver.length - 1]=format.format(d);
  ver[0]=ver[0].replace('-','.');
  App app=new App(Functions.join(ver,"String_Node_Str"));
  req.setAttribute("String_Node_Str",app);
}

Fixed version (ground truth):
@Override protected void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  DateFormat format=new SimpleDateFormat("String_Node_Str");
  String[] ver=SystemProperty.applicationVersion.get().split("String_Node_Str");
  long longversion=(long)(Long.parseLong(ver[ver.length - 1]) / Math.pow(2,28));
  Date d=new Date(longversion * 1000);
  ver[ver.length - 1]=format.format(d);
  ver[0]=ver[0].replace('-','.');
  App app=new App(Functions.join(ver,"String_Node_Str"));
  req.setAttribute("String_Node_Str",app);
}
Program: 44794
Project: 44794
Buggy source:
@Override public XmlRpcHandler getHandler(String methodName) throws XmlRpcNoSuchHandlerException, XmlRpcException {
  return new XmlRpcHandler(){
    @Override public Object execute(    XmlRpcRequest req) throws XmlRpcException {
      try {
        String[] methods=StringUtils.split(req.getMethodName(),"String_Node_Str");
        String methodName=methods[methods.length - 1];
        Class<?>[] types=new Class<?>[req.getParameterCount()];
        Object[] args=new Object[req.getParameterCount()];
        for (int i=0; i < args.length; i++) {
          Object param=req.getParameter(i);
          args[i]=param;
          types[i]=param.getClass();
        }
        Method method=instance.getClass().getMethod(methodName,types);
        Object result=method.invoke(instance,args);
        return result != null ? result : "String_Node_Str";
      }
 catch (      Exception e) {
        throw new XmlRpcException(e.getMessage());
      }
    }
  }
;
}

Fixed version (ground truth):
@Override public XmlRpcHandler getHandler(String methodName) throws XmlRpcNoSuchHandlerException, XmlRpcException {
  return new XmlRpcHandler(){
    @Override public Object execute(    XmlRpcRequest req) throws XmlRpcException {
      try {
        String[] methods=req.getMethodName().split("String_Node_Str");
        String methodName=methods[methods.length - 1];
        Class<?>[] types=new Class<?>[req.getParameterCount()];
        Object[] args=new Object[req.getParameterCount()];
        for (int i=0; i < args.length; i++) {
          Object param=req.getParameter(i);
          args[i]=param;
          types[i]=param.getClass();
        }
        Method method=instance.getClass().getMethod(methodName,types);
        Object result=method.invoke(instance,args);
        return result != null ? result : "String_Node_Str";
      }
 catch (      Exception e) {
        throw new XmlRpcException(e.getMessage());
      }
    }
  }
;
}
Program: 44795
Project: 44795
Buggy source:
@Override public Object execute(XmlRpcRequest req) throws XmlRpcException {
  try {
    String[] methods=StringUtils.split(req.getMethodName(),"String_Node_Str");
    String methodName=methods[methods.length - 1];
    Class<?>[] types=new Class<?>[req.getParameterCount()];
    Object[] args=new Object[req.getParameterCount()];
    for (int i=0; i < args.length; i++) {
      Object param=req.getParameter(i);
      args[i]=param;
      types[i]=param.getClass();
    }
    Method method=instance.getClass().getMethod(methodName,types);
    Object result=method.invoke(instance,args);
    return result != null ? result : "String_Node_Str";
  }
 catch (  Exception e) {
    throw new XmlRpcException(e.getMessage());
  }
}

Fixed version (ground truth):
@Override public Object execute(XmlRpcRequest req) throws XmlRpcException {
  try {
    String[] methods=req.getMethodName().split("String_Node_Str");
    String methodName=methods[methods.length - 1];
    Class<?>[] types=new Class<?>[req.getParameterCount()];
    Object[] args=new Object[req.getParameterCount()];
    for (int i=0; i < args.length; i++) {
      Object param=req.getParameter(i);
      args[i]=param;
      types[i]=param.getClass();
    }
    Method method=instance.getClass().getMethod(methodName,types);
    Object result=method.invoke(instance,args);
    return result != null ? result : "String_Node_Str";
  }
 catch (  Exception e) {
    throw new XmlRpcException(e.getMessage());
  }
}
Program: 44798
Project: 44798
Buggy source:
public void cleanServer(Server server){
  playerDAO.cleanConnected(server.getKey());
  server.setOnlinePlayers(0);
  serverDAO.save(server);
}

Fixed version (ground truth):
public void cleanServer(Server server){
  playerDAO.cleanConnected(server.getKey());
  server.setOnlinePlayers(0);
  server.setDirty(false);
  serverDAO.save(server);
}
Program: 44799
Project: 44799
Buggy source:
public Server(Entity entity){
  this.setKey(entity.getKey());
  this.setPluginVersion((String)entity.getProperty("String_Node_Str"));
  this.setCreated((Date)entity.getProperty("String_Node_Str"));
  this.setUpdated((Date)entity.getProperty("String_Node_Str"));
  this.setAdmin((Email)entity.getProperty("String_Node_Str"));
  this.setName((String)entity.getProperty("String_Node_Str"));
  this.setUid((String)entity.getProperty("String_Node_Str"));
  this.setOnlinePlayers(((Long)entity.getProperty("String_Node_Str")).intValue());
  this.setAddress((String)entity.getProperty("String_Node_Str"));
  this.setMaxLevel((Long)entity.getProperty("String_Node_Str"));
  if (this.getMaxLevel() == null) {
    this.setMaxLevel(2L);
  }
}

Fixed version (ground truth):
public Server(Entity entity){
  this.setKey(entity.getKey());
  this.setPluginVersion((String)entity.getProperty("String_Node_Str"));
  this.setCreated((Date)entity.getProperty("String_Node_Str"));
  this.setUpdated((Date)entity.getProperty("String_Node_Str"));
  this.setAdmin((Email)entity.getProperty("String_Node_Str"));
  this.setName((String)entity.getProperty("String_Node_Str"));
  this.setUid((String)entity.getProperty("String_Node_Str"));
  this.setOnlinePlayers(((Long)entity.getProperty("String_Node_Str")).intValue());
  this.setAddress((String)entity.getProperty("String_Node_Str"));
  this.setMaxLevel((Long)entity.getProperty("String_Node_Str"));
  if (this.getMaxLevel() == null) {
    this.setMaxLevel(2L);
  }
  Boolean b=(Boolean)entity.getProperty("String_Node_Str");
  this.setDirty(b != null ? b : true);
}
Program: 44800
Project: 44800
Buggy source:
public Entity toEntity(){
  Entity entity=this.getKey() == null ? new Entity("String_Node_Str") : new Entity(this.getKey());
  entity.setProperty("String_Node_Str",this.getName());
  entity.setProperty("String_Node_Str",this.getUpdated());
  entity.setProperty("String_Node_Str",this.getUid());
  entity.setProperty("String_Node_Str",this.getAddress());
  entity.setUnindexedProperty("String_Node_Str",this.getCreated());
  entity.setUnindexedProperty("String_Node_Str",this.getPluginVersion());
  entity.setUnindexedProperty("String_Node_Str",this.getMaxLevel());
  entity.setUnindexedProperty("String_Node_Str",this.getOnlinePlayers());
  entity.setUnindexedProperty("String_Node_Str",this.getAdmin());
  return entity;
}

Fixed version (ground truth):
public Entity toEntity(){
  Entity entity=this.getKey() == null ? new Entity("String_Node_Str") : new Entity(this.getKey());
  entity.setProperty("String_Node_Str",this.getName());
  entity.setProperty("String_Node_Str",this.getUpdated());
  entity.setProperty("String_Node_Str",this.getUid());
  entity.setProperty("String_Node_Str",this.getAddress());
  entity.setProperty("String_Node_Str",this.getDirty());
  entity.setUnindexedProperty("String_Node_Str",this.getCreated());
  entity.setUnindexedProperty("String_Node_Str",this.getPluginVersion());
  entity.setUnindexedProperty("String_Node_Str",this.getMaxLevel());
  entity.setUnindexedProperty("String_Node_Str",this.getOnlinePlayers());
  entity.setUnindexedProperty("String_Node_Str",this.getAdmin());
  return entity;
}
Program: 44801
Project: 44801
Buggy source:
@Override protected void doPost(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  if ("String_Node_Str".equalsIgnoreCase(req.getPathInfo())) {
    List<PlayerInfo> list=new ArrayList<PlayerInfo>();
    String key=req.getParameter("String_Node_Str");
    JSONArray players=(JSONArray)JSONValue.parse(req.getParameter("String_Node_Str"));
    PlayerInfo p;
    for (    Object obPlayer : players) {
      JSONArray player=(JSONArray)obPlayer;
      p=new PlayerInfo(Events.UPDATE,((String)player.get(0)).trim(),((String)player.get(2)).trim(),null,((String)player.get(1)).trim(),null);
      list.add(p);
    }
    app.updateConnect(key,list,null);
  }
}

Fixed version (ground truth):
@Override protected void doPost(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  if ("String_Node_Str".equalsIgnoreCase(req.getPathInfo())) {
    List<PlayerInfo> list=new ArrayList<PlayerInfo>();
    String key=req.getParameter("String_Node_Str");
    JSONArray players=(JSONArray)JSONValue.parse(req.getParameter("String_Node_Str"));
    PlayerInfo p;
    for (    Object obPlayer : players) {
      JSONArray player=(JSONArray)obPlayer;
      p=new PlayerInfo(Events.UPDATE,((String)player.get(0)).trim(),((String)player.get(2)).trim(),null,((String)player.get(1)).trim(),null);
      list.add(p);
    }
    app.updateConnect(key,list,null);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(req.getPathInfo())) {
    resp.setContentType("String_Node_Str");
    String key=req.getParameter("String_Node_Str");
    Server server=null;
    try {
      server=app.getServer(key);
    }
 catch (    EntityNotFoundException e) {
      log.severe(e.getMessage());
    }
    if (server == null) {
      resp.getWriter().println("String_Node_Str" + key + "String_Node_Str");
    }
 else {
      if (server.getDirty()) {
        app.refreshServerInfo(server);
      }
      resp.getWriter().println("String_Node_Str" + server.getKeyString() + "String_Node_Str"+ server.getOnlinePlayers()+ "String_Node_Str"+ server.getName()+ "String_Node_Str");
    }
  }
}
Program: 44802
Project: 44802
Buggy source:
public void doGet(HttpServletRequest req,HttpServletResponse resp) throws IOException {
  Server server=null;
  try {
    server=app.getServer(req.getParameter("String_Node_Str"));
  }
 catch (  EntityNotFoundException e) {
    e.printStackTrace();
  }
  req.setAttribute("String_Node_Str",server);
}

Fixed version (ground truth):
public void doGet(HttpServletRequest req,HttpServletResponse resp) throws IOException {
  Server server=null;
  try {
    server=app.getServer(req.getParameter("String_Node_Str"));
  }
 catch (  EntityNotFoundException e) {
    log.severe(e.getMessage());
  }
  req.setAttribute("String_Node_Str",server);
}
Program: 44807
Project: 44807
Buggy source:
public void setName(String name){
  this.name=name;
}

Fixed version (ground truth):
public void setName(String name){
  this.name=name.trim();
}
Program: 44808
Project: 44808
Buggy source:
public Entity toEntity(){
  Entity entity=this.getKey() == null ? new Entity("String_Node_Str",this.getPlayer()) : new Entity(this.getKey());
  entity.setProperty("String_Node_Str",this.getUpdated());
  entity.setProperty("String_Node_Str",Functions.ipToDecimal(this.getIp()));
  entity.setProperty("String_Node_Str",this.getNickname());
  entity.setProperty("String_Node_Str",this.getNgrams());
  entity.setProperty("String_Node_Str",this.getPlayer());
  entity.setProperty("String_Node_Str",this.getServer());
  entity.setUnindexedProperty("String_Node_Str",this.getCreated());
  entity.setUnindexedProperty("String_Node_Str",this.getCount());
  return entity;
}

Fixed version (ground truth):
public Entity toEntity(){
  Entity entity;
  if (this.entity != null) {
    entity=this.entity;
  }
 else {
    entity=this.getKey() == null ? new Entity("String_Node_Str",this.getPlayer()) : new Entity(this.getKey());
  }
  entity.setProperty("String_Node_Str",this.getUpdated());
  entity.setProperty("String_Node_Str",Functions.ipToDecimal(this.getIp()));
  entity.setProperty("String_Node_Str",this.getNickname());
  entity.setProperty("String_Node_Str",this.getNgrams());
  entity.setProperty("String_Node_Str",this.getPlayer());
  entity.setProperty("String_Node_Str",this.getServer());
  entity.setUnindexedProperty("String_Node_Str",this.getCreated());
  entity.setUnindexedProperty("String_Node_Str",this.getCount());
  return entity;
}
Program: 44809
Project: 44809
Buggy source:
@SuppressWarnings("String_Node_Str") public Alias(Entity entity){
  this.setKey(entity.getKey());
  this.setPlayer((Key)entity.getParent());
  this.setCreated((Date)entity.getProperty("String_Node_Str"));
  this.setUpdated((Date)entity.getProperty("String_Node_Str"));
  this.setCount((Long)entity.getProperty("String_Node_Str"));
  this.setIp((String)Functions.decimalToIp((Long)entity.getProperty("String_Node_Str")));
  this.setNickname((String)entity.getProperty("String_Node_Str"));
  this.setNgrams((Collection<String>)entity.getProperty("String_Node_Str"));
  this.setServer((Key)entity.getProperty("String_Node_Str"));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Alias(Entity entity){
  this.setKey(entity.getKey());
  this.setPlayer((Key)entity.getParent());
  this.setCreated((Date)entity.getProperty("String_Node_Str"));
  this.setUpdated((Date)entity.getProperty("String_Node_Str"));
  this.setCount((Long)entity.getProperty("String_Node_Str"));
  this.setIp((String)Functions.decimalToIp((Long)entity.getProperty("String_Node_Str")));
  this.setNickname((String)entity.getProperty("String_Node_Str"));
  this.setNgrams((Collection<String>)entity.getProperty("String_Node_Str"));
  this.setServer((Key)entity.getProperty("String_Node_Str"));
  this.entity=entity;
}
Program: 44810
Project: 44810
Buggy source:
@Override public List<Player> findLatest(int offset,int limit,int[] count){
  DatastoreService service=DatastoreServiceFactory.getDatastoreService();
  Query q=new Query("String_Node_Str");
  q.addSort("String_Node_Str",SortDirection.DESCENDING);
  PreparedQuery pq=service.prepare(q);
  count[0]=pq.countEntities(withPrefetchSize(limit));
  List<Player> players=new ArrayList<Player>();
  for (  Entity entity : pq.asIterable(withOffset(offset).limit(limit)))   players.add(new Player(entity));
  return players;
}

Fixed version (ground truth):
@Override public List<Player> findLatest(int offset,int limit,int[] count){
  DatastoreService service=DatastoreServiceFactory.getDatastoreService();
  Query q=new Query("String_Node_Str");
  q.addSort("String_Node_Str",SortDirection.DESCENDING);
  q.addSort("String_Node_Str",SortDirection.DESCENDING);
  PreparedQuery pq=service.prepare(q);
  count[0]=pq.countEntities(withPrefetchSize(limit));
  List<Player> players=new ArrayList<Player>();
  for (  Entity entity : pq.asIterable(withOffset(offset).limit(limit)))   players.add(new Player(entity));
  return players;
}
Program: 44811
Project: 44811
Buggy source:
public List<Alias> findByNickname(DatastoreService service,String query,int offset,int limit,int[] count){
  Collection<String> ngrams=new ArrayList<String>();
  ngrams.add(query.toLowerCase());
  Query q=new Query("String_Node_Str");
  q.addFilter("String_Node_Str",FilterOperator.IN,ngrams);
  q.addSort("String_Node_Str",SortDirection.DESCENDING);
  PreparedQuery pq=service.prepare(q);
  pq.countEntities(withPrefetchSize(limit));
  List<Entity> list=pq.asList(withLimit(limit).offset(offset));
  List<Alias> result=new ArrayList<Alias>();
  for (  Entity alias : list)   result.add(map(alias));
  return result;
}

Fixed version (ground truth):
public List<Alias> findByNickname(DatastoreService service,String query,int offset,int limit,int[] count){
  Collection<String> ngrams=new ArrayList<String>();
  ngrams.add(query.toLowerCase());
  Query q=new Query("String_Node_Str");
  q.addFilter("String_Node_Str",FilterOperator.IN,ngrams);
  q.addSort("String_Node_Str",SortDirection.DESCENDING);
  PreparedQuery pq=service.prepare(q);
  count[0]=pq.countEntities(withPrefetchSize(limit));
  List<Entity> list=pq.asList(withLimit(limit).offset(offset));
  List<Alias> result=new ArrayList<Alias>();
  for (  Entity alias : list)   result.add(map(alias));
  return result;
}
Program: 44812
Project: 44812
Buggy source:
@Override protected void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  int page=1;
  int pageSize=DEFAULT_PAGE_SIZE;
  try {
    page=Integer.parseInt(req.getParameter("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
  }
  try {
    pageSize=Integer.parseInt(req.getParameter("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
  }
  int offset=(page - 1) * pageSize;
  int limit=pageSize;
  String query=req.getParameter("String_Node_Str");
  String type=req.getParameter("String_Node_Str");
  List<SearchResult> list=new ArrayList<SearchResult>();
  int[] total=new int[1];
  if (query == null || "String_Node_Str".equals(query))   list=app.rootQuery(offset,limit,total);
 else   list=app.search(query,type,offset,limit,total);
  int totalPages=(int)Math.ceil((double)total[0] / pageSize);
  req.setAttribute("String_Node_Str",list);
  req.setAttribute("String_Node_Str",query);
  req.setAttribute("String_Node_Str",type);
  req.setAttribute("String_Node_Str",new PageLink(page,pageSize,totalPages));
}

Fixed version (ground truth):
@Override protected void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  int page=1;
  int pageSize=DEFAULT_PAGE_SIZE;
  try {
    page=Integer.parseInt(req.getParameter("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
  }
  try {
    pageSize=Integer.parseInt(req.getParameter("String_Node_Str"));
  }
 catch (  NumberFormatException e) {
  }
  int offset=(page - 1) * pageSize;
  int limit=pageSize;
  String query=req.getParameter("String_Node_Str");
  String type=req.getParameter("String_Node_Str");
  List<SearchResult> list=new ArrayList<SearchResult>();
  int[] total=new int[1];
  long time=System.currentTimeMillis();
  if (query == null || "String_Node_Str".equals(query))   list=app.rootQuery(offset,limit,total);
 else   list=app.search(query,type,offset,limit,total);
  time=System.currentTimeMillis() - time;
  int totalPages=(int)Math.ceil((double)total[0] / pageSize);
  req.setAttribute("String_Node_Str",list);
  req.setAttribute("String_Node_Str",query);
  req.setAttribute("String_Node_Str",type);
  req.setAttribute("String_Node_Str",total[0]);
  req.setAttribute("String_Node_Str",time);
  req.setAttribute("String_Node_Str",new PageLink(page,pageSize,totalPages));
}
Program: 44813
Project: 44813
Buggy source:
/** 
 * Vytahne se vsechna potrebna data z   {@link EntityRelease}.
 * @param release Zdroj dat.
 */
public Book(EntityRelease release){
  this.isbn=release.getIsbn();
  this.title=release.getBook().getTitle();
  this.description=release.getBook().getDescription();
  for (  EntityAuthor entityAuthor : release.getBook().getAuthorCollection()) {
    Author author=new Author(entityAuthor.getName(),entityAuthor.getSurname());
    this.authors.add(author);
  }
  this.publisher=release.getPublisher();
  this.publishDate=DateFormat.getDateInstance(DateFormat.MEDIUM).format(release.getPublishDate());
}

Fixed version (ground truth):
/** 
 * Vytahne se vsechna potrebna data z   {@link EntityRelease}.
 * @param release Zdroj dat.
 */
public Book(EntityRelease release){
  this.isbn=release.getIsbn();
  this.title=release.getBook().getTitle();
  this.description=release.getBook().getDescription();
  for (  EntityAuthor entityAuthor : release.getBook().getAuthorCollection()) {
    Author author=new Author(entityAuthor.getName(),entityAuthor.getSurname());
    this.authors.add(author);
  }
  this.publisher=release.getPublisher();
  this.publishDate=DateFormat.getDateInstance(DateFormat.MEDIUM).format(release.getPublishDate());
  Calendar calendar=Calendar.getInstance();
  calendar.setTime(release.getPublishDate());
  this.publishYear=calendar.get(Calendar.YEAR);
}
Program: 44814
Project: 44814
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Book createBook(Book newBook){
  try {
    List<EntityAuthor> authors=new ArrayList<EntityAuthor>(newBook.authors.size());
    for (    Author author : newBook.authors) {
      EntityAuthor entityAuthor=new EntityAuthor();
      entityAuthor.setName(author.name);
      entityAuthor.setSurname(author.surname);
      authors.add(entityAuthor);
    }
    EntityBook book=new EntityBook();
    book.setDescription(newBook.description);
    book.setTitle(newBook.title);
    EntityRelease release=new EntityRelease();
    release.setIsbn(newBook.isbn);
    release.setEan(newBook.ean);
    Date date;
    DateFormat formatter=DateFormat.getDateInstance(DateFormat.MEDIUM);
    date=(Date)formatter.parse(newBook.publishDate);
    release.setPublishDate(date);
    release.setPublisher(newBook.publisher);
    beanSeasonBook.addBook(book,authors,release);
  }
 catch (  Exception e) {
    throw new VerboseException("String_Node_Str",Status.BAD_REQUEST);
  }
  return getBook(newBook.isbn);
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createBook(Book newBook){
  try {
    List<EntityAuthor> authors=new ArrayList<EntityAuthor>(newBook.authors.size());
    for (    Author author : newBook.authors) {
      EntityAuthor entityAuthor=new EntityAuthor();
      entityAuthor.setName(author.name);
      entityAuthor.setSurname(author.surname);
      authors.add(entityAuthor);
    }
    EntityBook book=new EntityBook();
    book.setDescription(newBook.description);
    book.setTitle(newBook.title);
    EntityRelease release=new EntityRelease();
    release.setIsbn(newBook.isbn);
    release.setEan(newBook.ean);
    Date date;
    DateFormat formatter=DateFormat.getDateInstance(DateFormat.MEDIUM);
    date=(Date)formatter.parse(newBook.publishDate);
    release.setPublishDate(date);
    release.setPublisher(newBook.publisher);
    beanSeasonBook.addBook(book,authors,release);
  }
 catch (  Exception e) {
    throw new VerboseException("String_Node_Str",Status.BAD_REQUEST);
  }
  URI baseUri=uriInfo.getBaseUri();
  Response response=null;
  try {
    response=Response.created(new URI(baseUri.toString() + "String_Node_Str" + newBook.isbn)).entity(getBook(newBook.isbn)).build();
  }
 catch (  URISyntaxException ex) {
    throw new VerboseException("String_Node_Str",Status.BAD_REQUEST);
  }
  return response;
}
Program: 44815
Project: 44815
Buggy source:
/** 
 * Tests the Bug 6418074: ARCo webapplication can not display results with empty value tags
 * @throws java.lang.Exception
 */
public void test6418074() throws Exception {
  ObjectFactory faq=new ObjectFactory();
  Result res=faq.createResult();
  res.setName("String_Node_Str");
  res.setCategory("String_Node_Str");
  res.setSql("String_Node_Str");
  Class[] columnTypes={Integer.class,String.class,Double.class,Date.class};
  for (int i=0; i < columnTypes.length; i++) {
    ResultColumn column=faq.createResultColumn();
    column.setIndex(i);
    column.setName("String_Node_Str" + i);
    column.setType(ResultConverter.getColumnType(columnTypes[i]));
    res.getColumn().add(column);
  }
  int rowCount=2;
  res.setRowCount(rowCount);
  ResultRow rowObj=null;
  int row=0;
  int col=0;
  List valueList=null;
  List rowList=res.getRow();
  for (row=0; row < rowCount; row++) {
    rowObj=faq.createResultRow();
    rowList.add(rowObj);
    valueList=rowObj.getValue();
    for (col=0; col < columnTypes.length; col++) {
      valueList.add(ResultConverter.objToStr(null));
    }
  }
  XMLQueryResult xmlQueryResult=new XMLQueryResult(res);
  xmlQueryResult.execute();
}

Fixed version (ground truth):
/** 
 * Tests the Bug 6418074: ARCo webapplication can not display results with empty value tags
 * @throws java.lang.Exception
 */
public void test6418074() throws Exception {
  ObjectFactory faq=new ObjectFactory();
  Result res=faq.createResult();
  res.setName("String_Node_Str");
  res.setCategory("String_Node_Str");
  res.setSql("String_Node_Str");
  Class[] columnTypes={Integer.class,String.class,Double.class,Date.class};
  for (int i=0; i < columnTypes.length; i++) {
    ResultColumn column=faq.createResultColumn();
    column.setIndex(i);
    column.setName("String_Node_Str" + i);
    column.setType(ResultConverter.getColumnType(columnTypes[i]));
    res.getColumn().add(column);
  }
  int rowCount=2;
  res.setRowCount(rowCount);
  ResultRow rowObj=null;
  int row=0;
  int col=0;
  List valueList=null;
  List rowList=res.getRow();
  for (row=0; row < rowCount; row++) {
    rowObj=faq.createResultRow();
    rowList.add(rowObj);
    valueList=rowObj.getValue();
    for (col=0; col < columnTypes.length; col++) {
      valueList.add(ResultConverter.objToStr(null));
    }
  }
  res.setClusterName("String_Node_Str");
  XMLQueryResult xmlQueryResult=new XMLQueryResult(res);
  xmlQueryResult.execute();
}
Program: 44816
Project: 44816
Buggy source:
/** 
 * Creates a new instance of QueryResult 
 */
protected QueryResult(QueryType query){
  this.query=query;
  if (query == null || query.getClusterName() == null || query.getClusterName().length() == 0) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (query instanceof Query) {
    List filterList=query.getFilter();
    Iterator iter=filterList.iterator();
    Filter filter=null;
    lastBindingCount=0;
    while (iter.hasNext()) {
      filter=(Filter)iter.next();
      if (filter.isActive() && filter.isLateBinding()) {
        lateBindingMap.put(filter.getName(),null);
        lastBindingCount++;
        break;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates a new instance of QueryResult 
 */
protected QueryResult(QueryType query){
  this.query=query;
  if (query instanceof Query) {
    List filterList=query.getFilter();
    Iterator iter=filterList.iterator();
    Filter filter=null;
    lastBindingCount=0;
    while (iter.hasNext()) {
      filter=(Filter)iter.next();
      if (filter.isActive() && filter.isLateBinding()) {
        lateBindingMap.put(filter.getName(),null);
        lastBindingCount++;
        break;
      }
    }
  }
}