Program: 50952
Project: 50952
Buggy source:
private void executeSql(SettingsInfo info,File basedir,List<String> filepaths) throws PhrescoException {
  initDriverMap();
  String host=info.getPropertyInfo(Constants.DB_HOST).getValue();
  String port=info.getPropertyInfo(Constants.DB_PORT).getValue();
  String userName=info.getPropertyInfo(Constants.DB_USERNAME).getValue();
  String password=info.getPropertyInfo(Constants.DB_PASSWORD).getValue();
  String databaseName=info.getPropertyInfo(Constants.DB_NAME).getValue();
  String databaseType=info.getPropertyInfo(Constants.DB_TYPE).getValue();
  String connectionProtocol=findConnectionProtocol(databaseType,host,port,databaseName);
  Connection con=null;
  FileInputStream fis=null;
  Statement st=null;
  try {
    Class.forName(getDbDriver(databaseType)).newInstance();
    con=DriverManager.getConnection(connectionProtocol,userName,password);
    con.setAutoCommit(false);
    for (    String sqlFile : filepaths) {
      fis=new FileInputStream(basedir.getPath() + sqlFile);
      Scanner s=new Scanner(fis);
      s.useDelimiter("String_Node_Str");
      st=con.createStatement();
      while (s.hasNext()) {
        String line=s.next().trim();
        if (databaseType.equals("String_Node_Str")) {
          if (line.startsWith("String_Node_Str")) {
            String comment=line.substring(line.indexOf("String_Node_Str"),line.lastIndexOf("String_Node_Str"));
            line=line.replace(comment,"String_Node_Str");
            line=line.replace("String_Node_Str","String_Node_Str");
          }
          if (line.startsWith(Constants.REM_DELIMETER)) {
            String comment=line.substring(0,line.lastIndexOf("String_Node_Str"));
            line=line.replace(comment,"String_Node_Str");
          }
        }
        if (line.startsWith("String_Node_Str") && line.endsWith("String_Node_Str")) {
          line=line.substring(line.indexOf("String_Node_Str"),line.indexOf("String_Node_Str") + 2);
        }
        if (line.trim().length() > 0) {
          st.execute(line);
        }
      }
    }
  }
 catch (  SQLException e) {
    Utility.closeConnection(con);
  }
catch (  FileNotFoundException e) {
    throw new PhrescoException(e);
  }
catch (  InstantiationException e) {
    throw new PhrescoException(e);
  }
catch (  IllegalAccessException e) {
    throw new PhrescoException(e);
  }
catch (  ClassNotFoundException e) {
    throw new PhrescoException(e);
  }
 finally {
    Utility.closeStream(fis);
    try {
      if (con != null) {
        con.commit();
        con.close();
      }
    }
 catch (    Exception e) {
      throw new PhrescoException(e);
    }
  }
}

Fixed version (ground truth):
private void executeSql(SettingsInfo info,File basedir,List<String> filepaths) throws PhrescoException {
  initDriverMap();
  String host=info.getPropertyInfo(Constants.DB_HOST).getValue();
  String port=info.getPropertyInfo(Constants.DB_PORT).getValue();
  String userName=info.getPropertyInfo(Constants.DB_USERNAME).getValue();
  String password=info.getPropertyInfo(Constants.DB_PASSWORD).getValue();
  String databaseName=info.getPropertyInfo(Constants.DB_NAME).getValue();
  String databaseType=info.getPropertyInfo(Constants.DB_TYPE).getValue();
  String connectionProtocol=findConnectionProtocol(databaseType,host,port,databaseName);
  Connection con=null;
  FileInputStream fis=null;
  Statement st=null;
  try {
    Class.forName(getDbDriver(databaseType)).newInstance();
    con=DriverManager.getConnection(connectionProtocol,userName,password);
    con.setAutoCommit(false);
    for (    String sqlFile : filepaths) {
      fis=new FileInputStream(basedir.getPath() + sqlFile);
      Scanner s=new Scanner(fis);
      s.useDelimiter("String_Node_Str");
      st=con.createStatement();
      while (s.hasNext()) {
        String line=s.next().trim();
        if (databaseType.equals("String_Node_Str")) {
          if (line.startsWith("String_Node_Str")) {
            String comment=line.substring(line.indexOf("String_Node_Str"),line.lastIndexOf("String_Node_Str"));
            line=line.replace(comment,"String_Node_Str");
            line=line.replace("String_Node_Str","String_Node_Str");
          }
          if (line.startsWith(Constants.REM_DELIMETER)) {
            String comment=line.substring(0,line.lastIndexOf("String_Node_Str"));
            line=line.replace(comment,"String_Node_Str");
          }
        }
        if (line.startsWith("String_Node_Str") && line.endsWith("String_Node_Str")) {
          line=line.substring(line.indexOf("String_Node_Str"),line.indexOf("String_Node_Str") + 2);
        }
        if (line.trim().length() > 0) {
          st.execute(line);
        }
      }
    }
  }
 catch (  SQLException e) {
    try {
      if (con != null) {
        con.rollback();
      }
    }
 catch (    SQLException e1) {
      throw new PhrescoException(e1);
    }
  }
catch (  FileNotFoundException e) {
    throw new PhrescoException(e);
  }
catch (  InstantiationException e) {
    throw new PhrescoException(e);
  }
catch (  IllegalAccessException e) {
    throw new PhrescoException(e);
  }
catch (  ClassNotFoundException e) {
    throw new PhrescoException(e);
  }
 finally {
    Utility.closeStream(fis);
    try {
      if (con != null) {
        con.commit();
        con.close();
      }
    }
 catch (    Exception e) {
      throw new PhrescoException(e);
    }
  }
}