Program: 63254
Project: 63254
Buggy source:
private void resetMySQL(AbstractSession session){
  ArrayRecord record=null;
  try {
    record=(ArrayRecord)session.executeSQL("String_Node_Str").get(0);
    session.executeNonSelectingSQL("String_Node_Str" + record.get("String_Node_Str"));
  }
 catch (  DatabaseException x) {
    AbstractSessionLog.getLog().warning("String_Node_Str");
    x.printStackTrace(System.err);
  }
 finally {
    if (record != null) {
      try {
        session.executeNonSelectingSQL("String_Node_Str" + record.get("String_Node_Str"));
      }
 catch (      DatabaseException y) {
        AbstractSessionLog.getLog().warning("String_Node_Str");
        y.printStackTrace(System.err);
      }
    }
 else {
      DatabaseLogin databaseLogin=(DatabaseLogin)session.getDatasourceLogin();
      String url=databaseLogin.getDatabaseURL();
      Properties properties=new Properties();
      properties.put("String_Node_Str",databaseLogin.getUserName());
      properties.put("String_Node_Str",databaseLogin.getPassword());
      int databaseNameSeparatorIndex=url.lastIndexOf('/');
      String databaseName=url.substring(databaseNameSeparatorIndex + 1);
      int propertiesIndex=databaseName.indexOf('?');
      if (propertiesIndex > 0) {
        for (        String propertyString : databaseName.substring(propertiesIndex + 1).split("String_Node_Str")) {
          String[] propertyDetails=propertyString.split("String_Node_Str");
          properties.put(propertyDetails[0].trim(),propertyDetails[1].trim());
        }
        databaseName=databaseName.substring(0,propertiesIndex);
      }
      url=url.substring(0,databaseNameSeparatorIndex);
      try (Connection connection=DriverManager.getConnection(url,properties)){
        connection.prepareStatement("String_Node_Str" + databaseName).execute();
      }
 catch (      SQLException e) {
        e.printStackTrace(System.err);
      }
    }
  }
}

Fixed version (ground truth):
private void resetMySQL(AbstractSession session){
  ArrayRecord record=null;
  try {
    record=(ArrayRecord)session.executeSQL("String_Node_Str").get(0);
    session.executeNonSelectingSQL("String_Node_Str" + record.get("String_Node_Str"));
  }
 catch (  DatabaseException x) {
    AbstractSessionLog.getLog().warning("String_Node_Str");
    x.printStackTrace(System.err);
  }
 finally {
    if (record != null) {
      session.executeNonSelectingSQL("String_Node_Str" + record.get("String_Node_Str"));
    }
 else {
      DatabaseLogin databaseLogin=(DatabaseLogin)session.getDatasourceLogin();
      String url=databaseLogin.getDatabaseURL();
      Properties properties=new Properties();
      properties.put("String_Node_Str",databaseLogin.getUserName());
      properties.put("String_Node_Str",databaseLogin.getPassword());
      int databaseNameSeparatorIndex=url.lastIndexOf('/');
      String databaseName=url.substring(databaseNameSeparatorIndex + 1);
      int propertiesIndex=databaseName.indexOf('?');
      if (propertiesIndex > 0) {
        for (        String propertyString : databaseName.substring(propertiesIndex + 1).split("String_Node_Str")) {
          String[] propertyDetails=propertyString.split("String_Node_Str");
          properties.put(propertyDetails[0].trim(),propertyDetails[1].trim());
        }
        databaseName=databaseName.substring(0,propertiesIndex);
      }
      url=url.substring(0,databaseNameSeparatorIndex);
      try (Connection connection=DriverManager.getConnection(url,properties)){
        connection.prepareStatement("String_Node_Str" + databaseName).execute();
      }
 catch (      SQLException e) {
        e.printStackTrace(System.err);
      }
    }
  }
}