private void handleValuesArray(@Nonnull JvmTransformerContext context,
	                               @Nonnull JvmClassInfo initialClassState,
	                               @Nonnull MethodInsnNode invokeInsn,
	                               @Nonnull String valuesDesc) {
		String enumOwner = initialClassState.getName();
		String invokeOwner = invokeInsn.owner;
		String invokeName = invokeInsn.name;
		String invokeDesc = invokeInsn.desc;
		Set<AbstractInsnNode> visited = Collections.newSetFromMap(new IdentityHashMap<>());
		if (invokeOwner.equals(enumOwner) && invokeDesc.equals("()" + valuesDesc)) {
			AbstractInsnNode next = getNextFollowGoto(invokeInsn);
			while (next != null && next.getOpcode() != PUTSTATIC && visited.add(next))
				next = getNextFollowGoto(next);
			if (next != null && next.getOpcode() == PUTSTATIC) {
				FieldInsnNode assignmentInsn = (FieldInsnNode) next;
				String fieldOwner = assignmentInsn.owner;
				String fieldName = assignmentInsn.name;
				String fieldDesc = assignmentInsn.desc;
				if (fieldOwner.equals(enumOwner) && fieldDesc.equals(valuesDesc) && !fieldName.equals(VALUES_ARRAY_NAME))
					context.getMappings().addField(enumOwner, valuesDesc, fieldName, VALUES_ARRAY_NAME);
			}
		}
	}
A transformer that creates mappings to rename obfuscated enum constants that have been not properly obfuscated.

@author Matt Coley
recaf-core/src/main/java/software/coley/recaf/services/deobfuscation/transform/generic/EnumNameRestorationTransformer.java