#vulnerable code 
                             public void run()
	{
		for (ClassFile cf : deobfuscated.getClasses())
		{
			Annotations an = cf.getAttributes().getAnnotations();

			String obfuscatedName = cf.getName();
			Annotation obfuscatedNameAnnotation = an.find(OBFUSCATED_NAME);
			if (obfuscatedNameAnnotation != null)
				obfuscatedName = obfuscatedNameAnnotation.getElement().getString();
			
			ClassFile other = vanilla.findClass(obfuscatedName);
			assert other != null;
			
			java.lang.Class implementingClass = injectInterface(cf, other);
			if (implementingClass == null)
				continue;
			
			for (Field f : cf.getFields().getFields())
			{
				an = f.getAttributes().getAnnotations();
				
				if (an.find(EXPORT) == null)
					continue; // not an exported field
				
				String exportedName = an.find(EXPORT).getElement().getString();
				obfuscatedName = an.find(OBFUSCATED_NAME).getElement().getString();
				
				Annotation getterAnnotation = an.find(OBFUSCATED_GETTER);
				Number getter = null;
				if (getterAnnotation != null)
					getter = (Number) getterAnnotation.getElement().getValue().getObject();
				
				// the ob jar is the same as the vanilla so this field must exist in this class.

				Type obType = toObType(f.getType());
				Field otherf = other.findField(new NameAndType(obfuscatedName, obType));
				if (otherf == null)
					otherf = other.findField(new NameAndType(obfuscatedName, obType));
				assert otherf != null;
				
				assert f.isStatic() == otherf.isStatic();
				
				//
				
				ClassFile targetClass = f.isStatic() ? vanilla.findClass("client") : other; // target class for getter
				java.lang.Class targetApiClass = f.isStatic() ? clientClass : implementingClass; // target api class for getter
				
				java.lang.reflect.Method apiMethod = findImportMethodOnApi(targetApiClass, exportedName);
				if (apiMethod == null)
				{
					System.out.println("no api method");
					continue;
				}
				
				injectGetter(targetClass, apiMethod, otherf, getter);
			}
			
			for (Method m : cf.getMethods().getMethods())
			{
				an = m.getAttributes().getAnnotations();
				
				if (an == null || an.find(EXPORT) == null)
					continue; // not an exported method
				
				String exportedName = an.find(EXPORT).getElement().getString();
				obfuscatedName = an.find(OBFUSCATED_NAME).getElement().getString();
				
				// XXX static methods don't have to be in the same class, so we should have @ObfuscatedClass or something
				
				Method otherm = other.findMethod(new NameAndType(obfuscatedName, toObSignature(m.getDescriptor())));
				assert otherm != null;
			}
		}
	} 
                            #location 8 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public void run()
	{
		for (ClassFile cf : deobfuscated.getClasses())
		{
			Annotations an = cf.getAttributes().getAnnotations();

			if (an == null)
				continue;

			String obfuscatedName = cf.getName();
			Annotation obfuscatedNameAnnotation = an.find(OBFUSCATED_NAME);
			if (obfuscatedNameAnnotation != null)
				obfuscatedName = obfuscatedNameAnnotation.getElement().getString();
			
			ClassFile other = vanilla.findClass(obfuscatedName);
			assert other != null;
			
			java.lang.Class implementingClass = injectInterface(cf, other);
			if (implementingClass == null)
				continue;
			
			for (Field f : cf.getFields().getFields())
			{
				an = f.getAttributes().getAnnotations();
				
				if (an.find(EXPORT) == null)
					continue; // not an exported field
				
				String exportedName = an.find(EXPORT).getElement().getString();
				obfuscatedName = an.find(OBFUSCATED_NAME).getElement().getString();
				
				Annotation getterAnnotation = an.find(OBFUSCATED_GETTER);
				Number getter = null;
				if (getterAnnotation != null)
					getter = (Number) getterAnnotation.getElement().getValue().getObject();
				
				// the ob jar is the same as the vanilla so this field must exist in this class.

				Type obType = toObType(f.getType());
				Field otherf = other.findField(new NameAndType(obfuscatedName, obType));
				assert otherf != null;
				
				assert f.isStatic() == otherf.isStatic();
				
				ClassFile targetClass = f.isStatic() ? vanilla.findClass("client") : other; // target class for getter
				java.lang.Class targetApiClass = f.isStatic() ? clientClass : implementingClass; // target api class for getter
				
				java.lang.reflect.Method apiMethod = findImportMethodOnApi(targetApiClass, exportedName);
				if (apiMethod == null)
				{
					System.out.println("no api method");
					continue;
				}
				
				injectGetter(targetClass, apiMethod, otherf, getter);
			}
			
			for (Method m : cf.getMethods().getMethods())
			{
				an = m.getAttributes().getAnnotations();
				
				if (an == null || an.find(EXPORT) == null)
					continue; // not an exported method

				// XXX static methods can be in any class not just 'other' so the below finding won't work.
				// XXX static methods can also be totally inlined by the obfuscator and thus removed by the dead code remover,
				// so exporting them maybe wouldn't work anyway?
				assert !m.isStatic();
				
				String exportedName = an.find(EXPORT).getElement().getString();
				obfuscatedName = an.find(OBFUSCATED_NAME).getElement().getString();
				
				Method otherm;

				Annotation obfuscatedSignature = an.find(OBFUSCATED_SIGNATURE);

				String garbage = null;
				if (obfuscatedSignature != null)
				{
					String signatureString = obfuscatedSignature.getElements().get(0).getString();
					garbage = obfuscatedSignature.getElements().get(1).getString();

					Signature signature = new Signature(signatureString); // parse signature

					// The obfuscated signature annotation is generated post rename unique, so class
					// names in the signature match our class names and not theirs, so we toObSignature() it
					otherm = other.findMethod(new NameAndType(obfuscatedName, toObSignature(signature)));
				}
				else
				{
					// No obfuscated signature annotation, so the annotation wasn't changed during deobfuscation.
					// We should be able to just find it normally.
					otherm = other.findMethod(new NameAndType(obfuscatedName, toObSignature(m.getDescriptor())));
				}

				assert otherm != null;

				java.lang.reflect.Method apiMethod = findImportMethodOnApi(implementingClass, exportedName); // api method to invoke 'otherm'
				if (apiMethod == null)
				{
					System.out.println("no api method");
					continue;
				}

				injectInvoker(other, apiMethod, m, otherm, garbage);
			}
		}
	}