for (int i = 0; i < flds.length; i++) { if (flds[i].getNameIndex() == nameIdx) { if (!flds[i].isStatic()) { ConstantUtf8 nameCons = (ConstantUtf8)cp.getConstant(nameIdx); ConstantUtf8 typeCons = (ConstantUtf8)cp.getConstant(ntc.getSignatureIndex());
for (Field fld : flds) { if (fld.getNameIndex() == nameIdx) { if (!fld.isStatic()) { ConstantUtf8 nameCons = (ConstantUtf8) cp.getConstant(nameIdx); ConstantUtf8 typeCons = (ConstantUtf8) cp.getConstant(ntc.getSignatureIndex());
	public void sawField() {		if ((monitorCount > 0) || (!writingField))			return;				ConstantFieldref fieldRef;		Constant c = getConstantRefOperand();		if (c instanceof ConstantFieldref) {			fieldRef = (ConstantFieldref)c;						String className = fieldRef.getClass(getConstantPool()).replace('.', '/');			if (className.equals( this.getClassName())) {				ConstantPool cp = getConstantPool();				int nameAndTypeIdx = fieldRef.getNameAndTypeIndex();				ConstantNameAndType ntc = (ConstantNameAndType)cp.getConstant(nameAndTypeIdx);				int nameIdx = ntc.getNameIndex();				Field[] flds = getClassContext().getJavaClass().getFields();												for (int i = 0; i < flds.length; i++) {					if (flds[i].getNameIndex() == nameIdx) {						if (!flds[i].isStatic()) {							ConstantUtf8 nameCons = (ConstantUtf8)cp.getConstant(nameIdx);							ConstantUtf8 typeCons = (ConstantUtf8)cp.getConstant(ntc.getSignatureIndex());														if (alreadyReported.contains(nameCons.getBytes()))								return;							alreadyReported.add(nameCons.getBytes());							bugReporter.reportBug( new BugInstance(this, 									 STRUTS_ACTION_NAME.equals(mtClassName) ? "MTIA_SUSPECT_STRUTS_INSTANCE_FIELD" : "MTIA_SUSPECT_SERVLET_INSTANCE_FIELD",									 LOW_PRIORITY )									.addClass(this).addSourceLine(this)									.addField( new FieldAnnotation(getClassName(), nameCons.getBytes(), typeCons.getBytes(), false)));						}						break;					}				}			}		}	}