Package dk.brics.string.intermediate

Examples of dk.brics.string.intermediate.ArrayCorrupt


                        break;
                    }

                    case ARRAY: {
                        fieldInit = application.createVariable(VariableType.ARRAY);
                        Statement s = new ArrayCorrupt(fieldInit);
                        cfg.addStatement(s);
                        break;
                    }
                    default:
                        throw new RuntimeException("Unknown field type " + type);
                    }// switch

                    FieldAssignment assignment = new FieldAssignment(variableManager.getField(field), fieldInit);
                    cfg.addStatement(assignment);
                }
            }
        }
       
        // split control here, and call a random externally visible method
        cfg.startBranch();
       
        // call externally visible methods
        for (SootClass ac : getApplicationClasses()) {
            for (SootMethod sm : ac.getMethods()) {
                if (ext.isExternallyVisibleMethod(sm)) {
                    Method m = sms_m.get(sm.getSignature());
                    Variable[] params = m.getEntry().params;
                    Variable[] args = new Variable[params.length];
                    for (int i = 0; i < params.length; i++) {
                        Variable arg = application.createVariable(params[i].getType());
                        args[i] = arg;
                        Statement s;
                        switch (arg.getType()) {
                        case STRING:
                            s = new StringInit(arg, Basic.makeAnyString());
                            break;
                        case STRINGBUFFER:
                            s = new StringBufferCorrupt(arg);
                            break;
                        case ARRAY:
                            s = new ArrayCorrupt(arg);
                            break;
                        case PRIMITIVE:
                            // TODO: Integers can contain two characters, right? look deeper into which primitive type
                            s = new PrimitiveInit(arg, Automaton.makeAnyChar());
                            break;
View Full Code Here


      break;
    case STRINGBUFFER:
      addStatement(new StringBufferCorrupt(var));
      break;
    case ARRAY:
      addStatement(new ArrayCorrupt(var));
      break;
    default:
      addStatement(new ObjectCorrupt(var));
    }
  }
View Full Code Here

TOP

Related Classes of dk.brics.string.intermediate.ArrayCorrupt

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.