@Override
public void sawOpcode(int seen) {
if (seen == PUTFIELD) {
XField xField = getXFieldOperand();
if (xField != null && xField.getClassDescriptor().equals(getClassDescriptor())) {
Item first = stack.getStackItem(0);
boolean isPutOfDefaultValue = first.isNull(); // huh?? ||
// first.isInitialParameter();
if (!isPutOfDefaultValue && first.getConstant() != null) {
Object constant = first.getConstant();
if (constant instanceof Number && ((Number) constant).intValue() == 0 || constant.equals(Boolean.FALSE)) {
isPutOfDefaultValue = true;
}
}
if (isPutOfDefaultValue) {
if (getMethodName().equals("<init>")) {
transientFieldsSetToDefaultValueInConstructor.add(xField);
}
} else {
String nameOfField = getNameConstantOperand();
if (transientFieldsUpdates.containsKey(xField)) {
if (getMethodName().equals("<init>")) {
transientFieldsSetInConstructor.add(xField);
} else {
transientFieldsUpdates.put(xField, transientFieldsUpdates.get(xField) + 1);
}
} else if (fieldsThatMightBeAProblem.containsKey(nameOfField)) {
try {
JavaClass classStored = first.getJavaClass();
if (classStored == null) {
return;
}
double isSerializable = DeepSubtypeAnalysis.isDeepSerializable(classStored);
if (isSerializable <= 0.2) {