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;