private void HTTP2WebApplication(String HostPath, String MODE) {
        Connection conn = null;

        PreparedStatement ps_http = null;

        PreparedStatement ps =
                null;
        Statement s = null;
        ResultSet rs = null;

        String HTTP_REQUEST_HOST = "", HTTP_REQUEST_PATH = "", HTTP_REQUEST_FILE = "";


        int TARGET_PHP_FILES_ID = 0;
        File f;

        DatabaseAccess JavaDBAccess2 = null;

        try {
            if ((conn = this.JavaDBAccess.setConn()) != null) {
                System.out.println(
                        "Connected to database " + JavaDBAccess.getDatabaseName());
            } else {
                throw new Exception(
                        "Not connected to database " + JavaDBAccess.getDatabaseName());
            }


            conn.setAutoCommit(false);

            // Start a transaction by inserting a record in the TARGET_PHP_FILES_FUNCTIONS table
            ps_http = conn.prepareStatement("SELECT DISTINCT HTTP_REQUEST_HOST, HTTP_REQUEST_PATH, HTTP_REQUEST_FILE FROM TARGET_PHP_FILES_RUNS_FUNCTIONS WHERE MODE=?");
            ps_http.setString(1, MODE);
            rs = ps_http.executeQuery();
            while (rs.next()) {
                HTTP_REQUEST_HOST = rs.getString("HTTP_REQUEST_HOST");
                HTTP_REQUEST_PATH = rs.getString("HTTP_REQUEST_PATH");
                HTTP_REQUEST_FILE = rs.getString("HTTP_REQUEST_FILE");
                f = new File(HostPath + HTTP_REQUEST_PATH + HTTP_REQUEST_FILE);
                if ((TARGET_PHP_FILES_ID = JavaDBAccess.ReadFile2DB(f, HTTP_REQUEST_HOST, HostPath, HTTP_REQUEST_PATH, JavaDBAccess, false)) > 0) {
                    ps = conn.prepareStatement("UPDATE TARGET_PHP_FILES_RUNS_FUNCTIONS SET TARGET_PHP_FILE=? WHERE HTTP_REQUEST_HOST=? AND HTTP_REQUEST_PATH=? AND HTTP_REQUEST_FILE=? AND TARGET_PHP_FILE IS NULL");
                    ps.setInt(1, TARGET_PHP_FILES_ID);
                    ps.setString(2, HTTP_REQUEST_HOST);
                    ps.setString(3, HTTP_REQUEST_PATH);
                    ps.setString(4, HTTP_REQUEST_FILE);
                    ps.executeUpdate();
                    ps.close();
                    JavaDBAccess2 = new DatabaseAccess(DBprops);
                    PHPFile.AnalyzePHPFile(JavaDBAccess2, f.getAbsolutePath());
                    JavaDBAccess2 = null;
                    //Process the PHP files that are included in the PHP file
                    JavaDBAccess.PHPFileIncludes(TARGET_PHP_FILES_ID, JavaDBAccess, PHPFile);
                }
            }
            rs.close();
            ps_http.close();
            s = conn.createStatement();
            //Update the TARGET_PHP_FILES_VARIABLE of the TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES
            s.executeUpdate("UPDATE TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES SET TARGET_PHP_FILES_VARIABLE=(SELECT TARGET_PHP_FILES_VARIABLES.ID FROM TARGET_PHP_FILES_RUNS_FUNCTIONS, TARGET_PHP_FILES, TARGET_PHP_FILES_VARIABLES WHERE TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.TARGET_PHP_FILES_RUNS_FUNCTION=TARGET_PHP_FILES_RUNS_FUNCTIONS.ID AND TARGET_PHP_FILES_RUNS_FUNCTIONS.TARGET_PHP_FILE=TARGET_PHP_FILES.ID AND TARGET_PHP_FILES_VARIABLES.TARGET_PHP_FILE=TARGET_PHP_FILES.ID AND '$'||TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.NAME=TARGET_PHP_FILES_VARIABLES.NAME AND TARGET_PHP_FILES.PATH LIKE '%'||TARGET_PHP_FILES_RUNS_FUNCTIONS.HTTP_REQUEST_PATH||TARGET_PHP_FILES_RUNS_FUNCTIONS.HTTP_REQUEST_FILE) WHERE TARGET_PHP_FILES_VARIABLE IS NULL");
            //Update the AFFECT_SQL_DYNAMIC of the TARGET_PHP_FILES_VARIABLES
            s.executeUpdate("UPDATE TARGET_PHP_FILES_VARIABLES SET AFFECT_SQL_DYNAMIC='N' WHERE AFFECT_SQL_DYNAMIC='U'");
            ps = conn.prepareStatement("UPDATE TARGET_PHP_FILES_VARIABLES SET AFFECT_SQL_DYNAMIC='Y' WHERE ID IN (SELECT TARGET_PHP_FILES_VARIABLE FROM TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES,HTTP_VARIABLES_SQL_QUERIES WHERE ID=TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLE AND MODE=?)");
            ps.setString(1, MODE);
            ps.executeUpdate();
            //Update the INPUT_VARIABLE of the TARGET_PHP_FILES_VARIABLES
            s.executeUpdate("UPDATE TARGET_PHP_FILES_VARIABLES SET INPUT_VARIABLE='N' WHERE INPUT_VARIABLE='U'");
            ps = conn.prepareStatement("UPDATE TARGET_PHP_FILES_VARIABLES SET INPUT_VARIABLE='Y' WHERE ID IN (SELECT TARGET_PHP_FILES_VARIABLE FROM TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES WHERE MODE=?)");
            ps.setString(1, MODE);
            ps.executeUpdate();
            //Update the DATA_TYPE according to the values existing in the HTTP data
            //DATA_TYPE CHAR is used in the cases where both NUMERIC and CHAR values are used in the variable
            ps = conn.prepareStatement("UPDATE TARGET_PHP_FILES_VARIABLES SET DATA_TYPE=(SELECT MIN(DATA_TYPE) FROM TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES WHERE TARGET_PHP_FILES_VARIABLES.ID=TARGET_PHP_FILES_RUNS_FUNCTIONS_VARIABLES.TARGET_PHP_FILES_VARIABLE AND MODE=?)");
            ps.setString(1, MODE);
            ps.executeUpdate();
            ps.close();
            s.close();

            conn.commit();
            conn.close();


        } catch (Throwable e) {
            InspectionTextArea.setText("Errors in HTTP2WebApplication executed!");
            System.out.println(
                    "exception thrown:");

            if (e instanceof SQLException) {
                JavaDBAccess.printSQLError((SQLException) e);
            } else {
                e.printStackTrace();
            }

        }
    }