Package dk.brics.string.intermediate

Examples of dk.brics.string.intermediate.StringBufferCorrupt


    switch (var.getType()) {
    case STRING:
    case PRIMITIVE:
      break;
    case STRINGBUFFER:
      addStatement(new StringBufferCorrupt(var));
      break;
    case ARRAY:
      addStatement(new ArrayCorrupt(var));
      break;
    default:
View Full Code Here


      return getNothing();
   
    Variable result = makeVariable(innerType);
    switch (innerType) {
    case STRINGBUFFER:
      addStatement(new StringBufferCorrupt(result));
      break;
     
    case ARRAY:
      addStatement(new ArrayFromArray(result, arrayObject));
      break;
View Full Code Here

                        fieldInit = anyVar;
                        break;

                    case STRINGBUFFER: {
                        fieldInit = application.createVariable(VariableType.STRINGBUFFER);
                        Statement s = new StringBufferCorrupt(fieldInit);
                        cfg.addStatement(s);
                        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:
View Full Code Here

TOP

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

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.