refactor is_patch_editable