Program: 85560
Project: 85560
Buggy source:
@Override public void anonymize(String databasePropertyFile,String anonymizerPropertyFile) throws DatabaseAnonymizerException {
  Configuration configuration=null;
  try {
    configuration=new PropertiesConfiguration(databasePropertyFile);
  }
 catch (  ConfigurationException ex) {
    log.error(ex.toString());
    throw new DatabaseAnonymizerException(ex.toString());
  }
  String driver=configuration.getString("String_Node_Str");
  String database=configuration.getString("String_Node_Str");
  String url=configuration.getString("String_Node_Str");
  String userName=configuration.getString("String_Node_Str");
  String password=configuration.getString("String_Node_Str");
  log.debug("String_Node_Str" + driver);
  log.debug("String_Node_Str" + database);
  log.debug("String_Node_Str" + url);
  log.debug("String_Node_Str" + userName);
  log.info("String_Node_Str");
  Connection connection=null;
  try {
    forName(driver).newInstance();
    connection=getConnection(url,userName,password);
    connection.setAutoCommit(false);
  }
 catch (  InstantiationException|ClassNotFoundException|IllegalAccessException|SQLException ine) {
    log.error(ine.toString());
    throw new DatabaseAnonymizerException(ine.toString());
  }
  Properties props=null;
  try {
    props=loadProperties(anonymizerPropertyFile);
  }
 catch (  UnsupportedEncodingException uex) {
    log.error(uex.toString());
  }
catch (  IOException ex) {
    log.error(ex.toString());
  }
  if (props == null) {
    throw new DatabaseAnonymizerException("String_Node_Str");
  }
  String requirementFile=props.getProperty("String_Node_Str");
  int batchSize=parseInt(props.getProperty("String_Node_Str"));
  Requirement requirement=null;
  try {
    JAXBContext jc=newInstance(Requirement.class);
    Unmarshaller unmarshaller=jc.createUnmarshaller();
    requirement=(Requirement)unmarshaller.unmarshal(new File(requirementFile));
  }
 catch (  JAXBException je) {
    log.error(je.toString());
    throw new DatabaseAnonymizerException(je.toString());
  }
  init();
  log.info("String_Node_Str" + requirement.getClient() + "String_Node_Str"+ requirement.getVersion());
  for (  Table table : requirement.getTables()) {
    log.info("String_Node_Str" + table.getName() + "String_Node_Str");
    PreparedStatement pstmt=null;
    Statement stmt=null;
    ResultSet rs=null;
    StringBuilder sql=new StringBuilder("String_Node_Str" + table.getName() + "String_Node_Str");
    int batchCounter=0;
    for (    Column column : table.getColumns()) {
      sql.append(column.getName()).append("String_Node_Str");
    }
    if (sql.length() > 0) {
      sql.setLength(sql.length() - 1);
    }
    sql.append("String_Node_Str").append(table.getPKey()).append("String_Node_Str");
    String updateString=sql.toString();
    try {
      stmt=connection.createStatement();
      rs=stmt.executeQuery("String_Node_Str" + table.getName());
      pstmt=connection.prepareStatement(updateString);
      while (rs.next()) {
        int id=rs.getInt("String_Node_Str");
        int index=0;
        for (        Column column : table.getColumns()) {
          String function=column.getFunction();
          if (function == null || function.equals("String_Node_Str")) {
            log.warn("String_Node_Str" + column + "String_Node_Str");
          }
 else {
            try {
              Class clazz=Functions.class;
              if (column.getParameters() == null) {
                Method method=clazz.getMethod(function,null);
                pstmt.setString(++index,method.invoke(null).toString());
              }
 else {
                for (                Parameter parameter : column.getParameters()) {
                  Method method=clazz.getMethod(function,String.class);
                  String result=method.invoke(null,parameter.getValue()).toString();
                  pstmt.setString(++index,result);
                }
              }
            }
 catch (            NoSuchMethodException|SecurityException|IllegalAccessException|IllegalArgumentException|InvocationTargetException ex) {
              log.error(ex.toString());
            }
          }
        }
        pstmt.setInt(++index,id);
        pstmt.addBatch();
        batchCounter++;
        if (batchCounter == batchSize) {
          pstmt.executeBatch();
          connection.commit();
          batchCounter=0;
        }
      }
      pstmt.executeBatch();
      connection.commit();
    }
 catch (    SQLException sqle) {
      log.error(sqle.toString());
      try {
        if (stmt != null) {
          stmt.close();
        }
        if (pstmt != null) {
          pstmt.close();
        }
        if (rs != null) {
          rs.close();
        }
      }
 catch (      SQLException sqlex) {
        log.error(sqlex.toString());
      }
    }
    log.info("String_Node_Str" + table.getName() + "String_Node_Str");
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void anonymize(String databasePropertyFile,String anonymizerPropertyFile) throws DatabaseAnonymizerException {
  Configuration configuration=null;
  try {
    configuration=new PropertiesConfiguration(databasePropertyFile);
  }
 catch (  ConfigurationException ex) {
    log.error(ex.toString());
    throw new DatabaseAnonymizerException(ex.toString());
  }
  String driver=configuration.getString("String_Node_Str");
  String database=configuration.getString("String_Node_Str");
  String url=configuration.getString("String_Node_Str");
  String userName=configuration.getString("String_Node_Str");
  String password=configuration.getString("String_Node_Str");
  log.debug("String_Node_Str" + driver);
  log.debug("String_Node_Str" + database);
  log.debug("String_Node_Str" + url);
  log.debug("String_Node_Str" + userName);
  log.info("String_Node_Str");
  Connection connection=null;
  try {
    forName(driver).newInstance();
    connection=getConnection(url,userName,password);
    connection.setAutoCommit(false);
  }
 catch (  InstantiationException|ClassNotFoundException|IllegalAccessException|SQLException ine) {
    log.error(ine.toString());
    throw new DatabaseAnonymizerException(ine.toString());
  }
  Properties props=null;
  try {
    props=loadProperties(anonymizerPropertyFile);
  }
 catch (  UnsupportedEncodingException uex) {
    log.error(uex.toString());
  }
catch (  IOException ex) {
    log.error(ex.toString());
  }
  if (props == null) {
    throw new DatabaseAnonymizerException("String_Node_Str");
  }
  String requirementFile=props.getProperty("String_Node_Str");
  int batchSize=parseInt(props.getProperty("String_Node_Str"));
  Requirement requirement=null;
  try {
    JAXBContext jc=newInstance(Requirement.class);
    Unmarshaller unmarshaller=jc.createUnmarshaller();
    requirement=(Requirement)unmarshaller.unmarshal(new File(requirementFile));
  }
 catch (  JAXBException je) {
    log.error(je.toString());
    throw new DatabaseAnonymizerException(je.toString());
  }
  init();
  log.info("String_Node_Str" + requirement.getClient() + "String_Node_Str"+ requirement.getVersion());
  for (  Table table : requirement.getTables()) {
    log.info("String_Node_Str" + table.getName() + "String_Node_Str");
    PreparedStatement pstmt=null;
    Statement stmt=null;
    ResultSet rs=null;
    StringBuilder sql=new StringBuilder("String_Node_Str" + table.getName() + "String_Node_Str");
    int batchCounter=0;
    for (    Column column : table.getColumns()) {
      sql.append(column.getName()).append("String_Node_Str");
    }
    if (sql.length() > 0) {
      sql.setLength(sql.length() - 1);
    }
    sql.append("String_Node_Str").append(table.getPKey()).append("String_Node_Str");
    final String updateString=sql.toString();
    try {
      stmt=connection.createStatement();
      final String selectStmt="String_Node_Str" + table.getName();
      rs=stmt.executeQuery(selectStmt);
      pstmt=connection.prepareStatement(updateString);
      while (rs.next()) {
        int id=rs.getInt("String_Node_Str");
        int index=0;
        for (        Column column : table.getColumns()) {
          String function=column.getFunction();
          if (function == null || function.equals("String_Node_Str")) {
            log.warn("String_Node_Str" + column + "String_Node_Str");
          }
 else {
            try {
              Class clazz=Functions.class;
              if (column.getParameters() == null) {
                Method method=clazz.getMethod(function,null);
                pstmt.setString(++index,method.invoke(null).toString());
              }
 else {
                for (                Parameter parameter : column.getParameters()) {
                  Method method=clazz.getMethod(function,String.class);
                  String result=method.invoke(null,parameter.getValue()).toString();
                  pstmt.setString(++index,result);
                }
              }
            }
 catch (            NoSuchMethodException|SecurityException|IllegalAccessException|IllegalArgumentException|InvocationTargetException ex) {
              log.error(ex.toString());
            }
          }
        }
        pstmt.setInt(++index,id);
        pstmt.addBatch();
        batchCounter++;
        if (batchCounter == batchSize) {
          pstmt.executeBatch();
          connection.commit();
          batchCounter=0;
        }
      }
      pstmt.executeBatch();
      connection.commit();
    }
 catch (    SQLException sqle) {
      log.error(sqle.toString());
      try {
        if (stmt != null) {
          stmt.close();
        }
        if (pstmt != null) {
          pstmt.close();
        }
        if (rs != null) {
          rs.close();
        }
      }
 catch (      SQLException sqlex) {
        log.error(sqlex.toString());
      }
    }
    log.info("String_Node_Str" + table.getName() + "String_Node_Str");
    log.info("String_Node_Str");
  }
}