code: static void processFile(final IdentityPatchContext context, final File file, final PatchingTaskContext.Mode mode) throws IOException {
          if (mode == PatchingTaskContext.Mode.APPLY) {
              if (ENABLE_INVALIDATION) {
                  updateJar(file, GOOD_ENDSIG_PATTERN, BAD_BYTE_SKIP, CRIPPLED_ENDSIG, GOOD_ENDSIG);
                  backup(context, file);
              }
          } else if (mode == PatchingTaskContext.Mode.ROLLBACK) {
              updateJar(file, CRIPPLED_ENDSIG_PATTERN, BAD_BYTE_SKIP, GOOD_ENDSIG, CRIPPLED_ENDSIG);
              restore(context, file);
          } else {
              throw new IllegalStateException();
          }
      }
docs: Process a file.
  
  @param file the file to be processed
  @param mode the patching mode
  @throws IOException