.makeRef(),
Collections.EMPTY_LIST));
}
}
} else if (unit instanceof IdentityStmt) {
IdentityStmt identityStmt = (IdentityStmt) unit;
Value value = identityStmt.getRightOp();
if (value instanceof ParameterRef) {
ParameterRef parameterRef = (ParameterRef) value;
if ((parameterRef.getIndex() == 0)
&& (method.getParameterCount() == 1)) {
// System.out.println("found = " + identityStmt);
ValueBox box = identityStmt.getRightOpBox();
box.setValue(Jimple.v().newParameterRef(
method.getParameterType(0), 0));
// System.out.println("changed to: " + identityStmt);
} else {
// Parameter values are null. Note that
// we need to make sure that the
// assignment to null happens after all
// the identity statements, otherwise the
// super constructor will be implicitly
// called.
body.getUnits().remove(identityStmt);
body.getUnits().insertBefore(
Jimple.v().newAssignStmt(
identityStmt.getLeftOp(),
NullConstant.v()),
body.getFirstNonIdentityStmt());
}
} // else if (value instanceof ThisRef) {