private void deduplicateClass(JvmClassInfo existingClass, JvmClassInfo currentClass,
	                              BasicJvmClassBundle classes, BasicFileBundle files) {
		String className = currentClass.getName();
		String existingPrefix = PathPrefixProperty.get(existingClass);
		String existingSuffix = PathSuffixProperty.get(existingClass);
		String existingOriginal = PathOriginalNameProperty.get(existingClass);
		String currentPrefix = PathPrefixProperty.get(currentClass);
		String currentSuffix = PathSuffixProperty.get(currentClass);
		String currentOriginal = PathOriginalNameProperty.get(currentClass);

		// The target names to use should we want to store the items as files
		String existingName = existingOriginal != null ? existingOriginal :
				(existingPrefix != null ? existingPrefix : "") + className +
						(existingSuffix != null ? existingSuffix : "");
		String currentName = currentOriginal != null ? currentOriginal :
				(currentPrefix != null ? currentPrefix : "") + className +
						(currentSuffix != null ? currentSuffix : "");

		// Check for literal duplicate ZIP entries.
		if (existingName.equals(currentName)) {
			// The new name is an exact match, but occurs later in the file.
			// Since the JVM prefers the last entry of a set of duplicates we will drop the prior value.
			logger.warn("Dropping prior class duplicate, matched exact file path: {}", className);
			classes.initialPut(currentClass);
			return;
		}

		// Ok, so the path names aren't the same.
		// We'll want to normalize the paths and compare them. Whichever is best fit to be the JVM class will be kept
		// in the classes bundle. The worse fit goes to the files bundle. If we aren't sure then the newest entry
		// lands in the JVM bundle.

		// Normalize prefix/suffix
		if (Objects.equals(existingPrefix, currentPrefix)) {
			existingPrefix = null;
			currentPrefix = null;
		}
		if (Objects.equals(existingSuffix, currentSuffix)) {
			existingSuffix = null;
			currentSuffix = null;
		}

		// Names to use for comparison purposes
		String cmpExistingName = existingOriginal != null ? existingOriginal :
				(existingPrefix != null ? existingPrefix : "") + className +
						(existingSuffix != null ? existingSuffix : "");
		String cmpCurrentName = currentOriginal != null ? currentOriginal :
				(currentPrefix != null ? currentPrefix : "") + className +
						(currentSuffix != null ? currentSuffix : "");

		// Try and get class names via the file paths and determine which is the best fit to the real class name.
		String commonPrefix = StringUtil.getCommonPrefix(cmpExistingName, cmpCurrentName);
		if (commonPrefix.startsWith(JarFileInfo.MULTI_RELEASE_PREFIX)) {
			// Class names start at the '<prefix>/<version>/'
			int i = commonPrefix.indexOf('/', JarFileInfo.MULTI_RELEASE_PREFIX.length()) + 1;
			cmpExistingName = cmpExistingName.substring(i);
			cmpCurrentName = cmpCurrentName.substring(i);
		} else if (!commonPrefix.isEmpty()) {
			// Class names should start at the common prefix minus the intersection of the class name
			cmpExistingName = commonPrefix + cmpExistingName.substring(commonPrefix.length());
			cmpCurrentName = commonPrefix + cmpCurrentName.substring(commonPrefix.length());
		}

		// Best fit checking
		if (cmpExistingName.equals(className + ".class")) {
			// The existing class entry name IS the class name. Thus, the other (current) one does not match.
			// We will add the current one as a file instead, and keep the prior as a class.
			logger.warn("Duplicate class '{}' found. The prior entry better aligns to class name so the new one " +
					"will be tracked as a file instead: {}", className, currentName);
			files.initialPut(new FileInfoBuilder<>()
					.withName(currentName)
					.withRawContent(currentClass.getBytecode())
					.build());
		} else if (cmpCurrentName.equals(className + ".class")) {
			// The current class entry name IS the class name. Thus, the other (prior) one does not match.
			// We will add the prior one as a file, and record this new one as a class
			logger.warn("Duplicate class '{}' found. The new entry better aligns to class name so the prior one " +
					"will be tracked as a file instead: {}", className, existingName);
			VersionedClassProperty.remove(existingClass);
			files.initialPut(new FileInfoBuilder<>()
					.withName(existingName)
					.withRawContent(existingClass.getBytecode())
					.build());
			classes.initialPut(currentClass);
		} else {
			// Neither of them really follow the class name accurately. We'll just record the last one as the JVM class
			// because that more accurately follows JVM behavior.
			logger.warn("Duplicate class '{}' found. Neither entry match their class names," +
					" tracking the newer item as the JVM class and retargeting the old item as a file: {}", className, existingName);
			VersionedClassProperty.remove(existingClass);
			files.initialPut(new FileInfoBuilder<>()
					.withName(existingName)
					.withRawContent(existingClass.getBytecode())
					.build());
			classes.initialPut(currentClass);
		}
	}
Should <i>ONLY</i> be called if there is an existing duplicate/conflict in the given JVM class bundle.

@param existingClass
		Prior class entry in the class bundle.
@param currentClass
		New entry to de-duplicate.
@param classes
		Target class bundle.
@param files
		Target file bundle for fallback item placement.
recaf-core/src/main/java/software/coley/recaf/services/workspace/io/BasicResourceImporter.java