Package dk.brics.jwig.analysis.graph.StateMachine

Examples of dk.brics.jwig.analysis.graph.StateMachine.MethodStatementContainer


    private final MethodStatementContainer container;
    private final Automaton names;

    public Plugging(AssignStmt statement, SootMethod method, Set<Type> types,
            Automaton automaton) {
        this.container = new MethodStatementContainer(method, statement);
        this.types = types;
        this.names = automaton;
    }
View Full Code Here


            Body body = method.retrieveActiveBody();
            for (Unit unit : body.getUnits()) {
                if (unit instanceof ReturnStmt) {
                    ReturnStmt stmt = (ReturnStmt) unit;
                    final ValueBox box = stmt.getOpBox();
                    returnLocations.put(stmt, new MethodStatementContainer(
                            method, stmt));
                    stmt2box.put(stmt, box);
                }
            }
        }
View Full Code Here

            ReturnStmt returnStmt = (ReturnStmt) stmt;

            AnalyzeStm analyzeStm = result.getHotspots().get(
                    stmt2box.get(returnStmt));
            if (analyzeStm == null) {
                final MethodStatementContainer container = returnLocations
                        .get(returnStmt);
                System.err.println(returnStmt
                        + " -- "
                        + stmt2box.get(returnStmt)
                        + " @ "
                        + SourceUtil.getLocation(container.getMethod(),
                                container.getStatement())
                        + " --> null analyzestmt");
            } else {
                XMLGraph xg = xmlGraphs.getIn(analyzeStm, analyzeStm.getBase());
                new XMLGraph2Dot(new PrintWriter(System.out)).print(xg);
                ret2xg.put(returnStmt, xg);
View Full Code Here

                    // TODO move enough information into the HandlerTransition
                    // to do the analysis here?
                } else if (t instanceof WebMethodTransition) {
                    final WebMethodTransition webMethodTransition = (WebMethodTransition) t;
                    final InvokeExpr expr = webMethodTransition.getExpr();
                    MethodStatementContainer container = machine
                            .getMakeURLLocation(expr);
                    SootMethod enclosingMethod = container.getMethod();
                    Stmt enclosingStatement = container.getStatement();

                    typeCheckWebMethodInvocation(webMethodTransition,
                            enclosingMethod, enclosingStatement);

                    final Set<SootClass> possibleContexts = InterfaceInvocationLinker
View Full Code Here

            possibleValues = Automaton.makeEmpty();
        }

        String methodNames = getReadableLanguage(possibleValues);
        SootMethod makeURLMethod = expr.getMethod();
        MethodStatementContainer container = stateMachine
                .getMakeURLLocation(expr);

        SootMethod enclosingMethod = container.getMethod();
        log.debug(makeURLMethod.getName() + " called from "
                + enclosingMethod.getName() + " in "
                + enclosingMethod.getDeclaringClass().getName()
                + " with possible method name arg " + methodNames);
View Full Code Here

        SootMethod makeURLMethod = expr.getMethod();

        Automaton possibleValues = analysis
                .getPossibleNameValuesOfMakeURLInvocation(expr);

        MethodStatementContainer container = stateMachine
                .getMakeURLLocation(expr);
        SootMethod enclosingMethod = container.getMethod();
        Stmt statement = container.getStatement();

        Set<SootClass> targetedWebApps = getTargetedWebApps(stateMachine, expr,
                makeURLMethod, enclosingMethod, statement, interfacee);

        // makeURL called in an unknown context
View Full Code Here

TOP

Related Classes of dk.brics.jwig.analysis.graph.StateMachine.MethodStatementContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.