@Nonnull
	@Override
	public byte[] patch(@Nullable String name, @Nonnull byte[] code) throws IOException {
		try {
			// Patch via CafeDude
			ClassFileReader reader = new ClassFileReader();
			ClassFile classFile = reader.read(code);
			if (name == null) name = classFile.getName();
			new IllegalStrippingTransformerExt(classFile).transform();
			return new ClassFileWriter().write(classFile);
		} catch (InvalidClassException ex) {
			if (name == null) name = "<no-name-given>";
			logger.error("CafeDude failed to parse '{}'", name, ex);
			throw new IOException(ex);
		} catch (Throwable t) {
			if (name == null) name = "<no-name-given>";
			logger.error("CafeDude failed to patch '{}'", name, t);
			throw new IOException(t);
		}
	}
Basic patcher implementation with CafeDude.

@author Matt Coley
recaf-core/src/main/java/software/coley/recaf/services/workspace/io/BasicClassPatcher.java