for (int c = 0; c < superClasses.length; c++) { fields = superClasses[c].getFields(); for (int f = 0; f < fields.length; f++) { Field fld = fields[f]; if (!fld.isStatic() && !maskedFields.contains(fld) && (fld.isPublic() || fld.isProtected())) { fieldName = fld.getName(); if (fieldName.length() == 1) continue; if (fieldName.equals("serialVersionUID")) continue; if (classFields.containsKey( fieldName )) { maskedFields.add(fld); Field maskingField = classFields.get( fieldName); FieldAnnotation fa = new FieldAnnotation( getDottedClassName(), maskingField.getName(), maskingField.getSignature(), maskingField.isStatic()); bugReporter.reportBug( new BugInstance("MF_CLASS_MASKS_FIELD", LOW_PRIORITY) .addClass(this) .addField(fa)); } } }
for (int c = 0; c < superClasses.length; c++) { Field[] superFields = superClasses[c].getFields(); for (int f = 0; f < superFields.length; f++) { Field superfield = superFields[f];     if (superfield.isStatic() || !(superfield.isPublic() || superfield.isProtected())) continue;   if (superclassFieldMap.get(superfield.getName()) != null) continue;   FieldAnnotation faSuper = FieldAnnotation.fromBCELField(superClasses[c].getClassName(), superfield); superclassFieldMap.put(superfield.getName(), faSuper); }
	public void visit(JavaClass obj) {		if (obj.isInterface())			return;		classFields.clear();				Field[] fields = obj.getFields();		String fieldName;		for (int f = 0; f < fields.length; f++) {			fieldName = fields[f].getName();			classFields.put(fieldName, fields[f]);		}				// Walk up the super class chain, looking for name collisions		try		{				JavaClass[] superClasses = org.apache.bcel.Repository.getSuperClasses(obj);				for (int c = 0; c < superClasses.length; c++) {					fields = superClasses[c].getFields();					for (int f = 0; f < fields.length; f++) {						Field fld = fields[f];						if (!fld.isStatic() 							&& !maskedFields.contains(fld)							&& (fld.isPublic() || fld.isProtected())) {							fieldName = fld.getName();							if (fieldName.length() == 1)								continue;							if (fieldName.equals("serialVersionUID"))								continue;							if (classFields.containsKey( fieldName )) {								maskedFields.add(fld);								Field maskingField = classFields.get( fieldName);								FieldAnnotation fa = new FieldAnnotation( getDottedClassName(),													  maskingField.getName(), 													  maskingField.getSignature(), 													  maskingField.isStatic());				                                bugReporter.reportBug(									new BugInstance("MF_CLASS_MASKS_FIELD", LOW_PRIORITY)				                                        	.addClass(this)				                                        	.addField(fa));							}						}					}			}		}		catch (ClassNotFoundException e) { 			bugReporter. reportMissingClass(e);		}				super.visit(obj);	}