public String VulnerabilityInjection(DatabaseAccess JavaDBAccess, PHPFileOperations PHPFile, String TargetPHPFileSelectedComboBox, Boolean AffectSQLStatic, Boolean AffectSQLDynamic) {
        String PHPFileText = null, PHPFileTextClean = ""; //The text of the PHP file where we want to inject the vulnerabilities

        String PHPFileTextArea = null;

        PreparedStatement ps = null;
        int TARGET_PHP_FILES_ID = 0;
        String Line = "";
        Connection conn = null;

        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);

            // Clean previous vulnerability injections in the same file
            System.out.println(TargetPHPFileSelectedComboBox);
            ps = conn.prepareStatement("DELETE FROM ATTACK_PAYLOADS WHERE VULNERABILITY_INJECTION_RESULT IN (SELECT VULNERABILITY_INJECTION_RESULTS.ID FROM VULNERABILITY_INJECTION_RESULTS, TARGET_PHP_FILES WHERE TARGET_PHP_FILE=TARGET_PHP_FILES.ID AND TARGET_PHP_FILES.PATH=?)");
            ps.setString(1, TargetPHPFileSelectedComboBox);
            ps.execute();
            ps = conn.prepareStatement("DELETE FROM VULNERABILITY_INJECTION_RESULTS WHERE ID IN (SELECT VULNERABILITY_INJECTION_RESULTS.ID FROM VULNERABILITY_INJECTION_RESULTS, TARGET_PHP_FILES WHERE TARGET_PHP_FILE=TARGET_PHP_FILES.ID AND TARGET_PHP_FILES.PATH=?)");
            ps.setString(1, TargetPHPFileSelectedComboBox);
            ps.execute();
            conn.commit();

            // Start a transaction by inserting a record in the TARGET_PHP_FILES table
            ps = conn.prepareStatement("SELECT ID,TEXT,CLEANED_TEXT FROM TARGET_PHP_FILES WHERE PATH = ?");
            ps.setString(1, TargetPHPFileSelectedComboBox);
            ResultSet rs = ps.executeQuery();

            rs.next();
            TARGET_PHP_FILES_ID = rs.getInt(1);
            System.out.println("Chave usada: " + TARGET_PHP_FILES_ID);
            /*
            java.io.InputStream ip = rs.getAsciiStream(2);
            int c = ip.read();
            PHPFileText = "";
            while (c > 0) {
            //            System.out.print((char) c);
            
            PHPFileText = PHPFileText + (char) c;
            c = ip.read();
            }
             */
            PHPFileText = rs.getString("TEXT");
            PHPFileTextClean = rs.getString("CLEANED_TEXT");

            rs.close();

            /*
            Creating a statement lets us issue commands against
            the connection.
             */
            Statement s = conn.createStatement();
            /*
            We select the rows and verify the results.
             */
            rs = s.executeQuery("SELECT * FROM ALL_OPERATORS");
            for (int i = 1; i < rs.getMetaData().getColumnCount() + 1; i++) {
                Line = Line + "   " + rs.getMetaData().getColumnName(i);
            }
            PHPFileTextArea = Line;
            while (rs.next()) {
                Line = "";
                for (int i = 1; i < rs.getMetaData().getColumnCount() + 1; i++) {
                    Line = Line + "   " + rs.getString(i);
                }
                PHPFileTextArea = PHPFileTextArea + LS + Line;
                System.out.println(Line);
                ProcessRegex(JavaDBAccess, PHPFile, rs.getString("SEARCH_TARGETS_REGEX"), false, PHPFileText, PHPFileTextClean, "", TARGET_PHP_FILES_ID, rs.getInt("SEARCH_TARGETS_ID"), conn, AffectSQLStatic, AffectSQLDynamic);
            }
            rs.close();
            s.close();
            conn.commit();
            conn.close();
        } catch (Throwable e) {
            System.out.println("Errors in VulnerabilityInjection!");
            System.out.println("exception thrown:");

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