private static boolean removeUnusedClassSpecFields(ClassFile classFile,
			Hashtable usedStaticFields) throws BadClassFileException {
		boolean isChanged = false;
		for (int i = classFile.getFieldsCount() - 1; i >= 0; i--) {
			FieldMethodEntry field = classFile.getFieldAt(i);
			if (field.accessFlags().isStatic()) {
				String fieldName = field.name().utfValue();
				if (usedStaticFields.get(fieldName) == null
						&& field.hasExceptionsSynthetic(false)
						&& (fieldName.equals("cl$") ? field.descriptor()
								.utfValue().equals("Ljava/lang/ClassLoader;")
								: (fieldName.startsWith("class$") || fieldName
										.startsWith("array$"))
										&& field.descriptor().utfValue()
												.equals("Ljava/lang/Class;"))) {
					classFile.removeFieldAt(i);
					isChanged = true;
				}
			}
		}
		return isChanged;
	}