This issue seems to be tickled by the fact that 2 files of the same name "README.html" changed in the JDK image for a single update release.
This happened between 6u4-b02 and 6u4-b03. The patcher generates 2 patches for files named README.html, but it gets confused when there is only one README.html in the jdk-image (because the user unselected the D&S feature). It uses the wrong patch on the wrong README.html file. Here's an email I sent to jdk-core, which describes a bit more:
Someone asked during the meeting why the patching error is only happening when we deselect the "Demos and Samples" (D&S) feature, and not when it's selected. I had to think about it a little more. This is 3rd party RTPatch software, but here is my theory of what's happening.
We generate a patch binary for the files that changed between 2 releases. There at least 2 README.html files that needed patching from b02->b03:
So the patcher will have individual patches for these 2 files. The patcher will try and patch the demo one first, because it patches in alphabetical order. There are 2 scenarios here, one where D&S feature is selected and one where the user unselects the D&S feature.
UN-selected D&S scenario:
Because the D&S feature is UN-selected, the machine only has 1 README.html file in the JDK image that's about to be patched: jdk-image/README.html. The patcher will see the name jdk-image/README.html, and it will incorrectly patch it with the patch for jdk-image/demo/jfc/CodePointIM/README.html, which is an incorrect mismatch. That's why the error is popping up.
Selected D&S scenario:
Because the D&S feature is selected, the machine has 2 files in the JDK image that are about to be patched: jdk-image/README.html & jdk-image/demo/jfc/CodePointIM/README.html. The first README.html file that it finds alphabetically in the jdk-image is the correct one: jdk-image/demo/jfc/CodePointIM/README.html. And now both files get patched successfully.