Program: 73671
Project: 73671
Buggy source:
/** 
 * Update the existing database connection parameters with the given parameters.
 * @param params The new database connection parameters.
 * @exception DBConnectionException Thrown if the connection fails.
 * @exception IOException Thrown if an error occurs while writing the newparameters.
 */
public void updateDBConnectionSetupParameters(SetupParameters params) throws DBConnectionException, IOException {
  if (params == null) {
    throw new DBConnectionException("String_Node_Str" + "String_Node_Str");
  }
  String ptdbParams=DBConnectorFactory._PROPERTIES_FILE_PATH;
  Properties props=new Properties();
  File tempFile=FileUtilities.nameToFile(ptdbParams,null);
  File file=new File(tempFile.getPath().replaceAll("String_Node_Str","String_Node_Str"));
  if (file.exists() == false) {
    file.createNewFile();
  }
  URL url=FileUtilities.nameToURL(ptdbParams,null,null);
  if (url == null) {
    throw new IOException("String_Node_Str" + ptdbParams);
  }
  String defaultDBClassName="String_Node_Str";
  props.load(url.openStream());
  String dbClassName=(String)props.getProperty(DBConnectorFactory._DB_CLASS_NAME);
  if (dbClassName == null || dbClassName.length() == 0) {
    dbClassName=defaultDBClassName;
  }
  props.setProperty(DBConnectorFactory._DB_CLASS_NAME,dbClassName);
  props.setProperty(DBConnectorFactory._DB_URL,params.getUrl());
  props.setProperty(DBConnectorFactory._XMLDB_CONTAINER_NAME,params.getContainerName());
  props.setProperty(DBConnectorFactory._CACHE_CONTAINER_NAME,params.getCacheContainerName());
  props.store(new FileOutputStream(url.getPath().replaceAll("String_Node_Str","String_Node_Str")),null);
  DBConnectorFactory.loadDBProperties();
}

Fixed version (ground truth):
/** 
 * Update the existing database connection parameters with the given parameters.
 * @param params The new database connection parameters.
 * @exception DBConnectionException Thrown if the connection fails.
 * @exception IOException Thrown if an error occurs while writing the newparameters.
 */
public void updateDBConnectionSetupParameters(SetupParameters params) throws DBConnectionException, IOException {
  if (params == null) {
    throw new DBConnectionException("String_Node_Str" + "String_Node_Str");
  }
  String ptdbParams=DBConnectorFactory._PROPERTIES_FILE_PATH;
  Properties props=new Properties();
  File tempFile=FileUtilities.nameToFile(ptdbParams,null);
  File file=new File(tempFile.getPath().replaceAll("String_Node_Str","String_Node_Str"));
  if (file.exists() == false) {
    if (file.createNewFile() == false) {
      throw new IOException("String_Node_Str" + ptdbParams);
    }
  }
  URL url=FileUtilities.nameToURL(ptdbParams,null,null);
  if (url == null) {
    throw new IOException("String_Node_Str" + ptdbParams);
  }
  String defaultDBClassName="String_Node_Str";
  props.load(url.openStream());
  String dbClassName=(String)props.getProperty(DBConnectorFactory._DB_CLASS_NAME);
  if (dbClassName == null || dbClassName.length() == 0) {
    dbClassName=defaultDBClassName;
  }
  props.setProperty(DBConnectorFactory._DB_CLASS_NAME,dbClassName);
  props.setProperty(DBConnectorFactory._DB_URL,params.getUrl());
  props.setProperty(DBConnectorFactory._XMLDB_CONTAINER_NAME,params.getContainerName());
  props.setProperty(DBConnectorFactory._CACHE_CONTAINER_NAME,params.getCacheContainerName());
  props.store(new FileOutputStream(url.getPath().replaceAll("String_Node_Str","String_Node_Str")),null);
  DBConnectorFactory.loadDBProperties();
}