public String CreateDiffFiles(DatabaseAccess JavaDBAccess, String TargetPHPFileSelectedComboBox) {
        String PHPFileTextArea = null;
        Connection conn = null;
        PreparedStatement ps = null;
        String diffFile = "";
        try {
            if ((conn = 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 table
            ps = conn.prepareStatement("SELECT VULNERABILITY_INJECTION_RESULTS.DIFF_TEXT FROM TARGET_PHP_FILES,VULNERABILITY_INJECTION_RESULTS WHERE VULNERABILITY_INJECTION_RESULTS.TARGET_PHP_FILE=TARGET_PHP_FILES.ID AND TARGET_PHP_FILES.PATH = ?");
            ps.setString(1, TargetPHPFileSelectedComboBox);
            ResultSet rs = ps.executeQuery();

            PrintWriter WebPageFileWriter = null;
            while (rs.next()) {
                diffFile = rs.getString(1);

                // Open matches log file.
                try {
                    WebPageFileWriter = new PrintWriter(new FileWriter(TargetPHPFileSelectedComboBox + "_" + rs.getRow() + ".diff"));
                } catch (Exception e) {
                    System.out.println("Unable to open matches Web Page log file.");
                }
                // Add URL to matches log file.
                try {
                    WebPageFileWriter.print(diffFile);
                } catch (Exception e) {
                    System.out.println("Unable to Web page log match.");
                }
                // Close matches log file.
                try {
                    WebPageFileWriter.close();
                } catch (Exception e) {
                    System.out.println("Unable to close matches web page log file.");
                }
            }
            rs.close();
            conn.commit();
            conn.close();
            PHPFileTextArea = "To apply the diff files to the original file in order to obtain a vulnerable file do the follwing:\n";
            PHPFileTextArea = PHPFileTextArea + "patch edit_authors_original.php --binary -p0 -o edit_authors_vulnerable.php < edit_authors.php_1.diff";

        } catch (Throwable e) {
            System.out.println("Errors in CreateDiffFiles!");
            System.out.println("exception thrown:");

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