old.setAccessFlags(md.getAccessFlags());
builder.removeField(md);
try {
Field field = md.getField(oldClass);
file.addField(old);
old.addAttribute(AnnotationReplacer.duplicateAnnotationsAttribute(file.getConstPool(), field));
} catch (DuplicateMemberException e) {
// this should not happen
throw new RuntimeException(e);
} catch (SecurityException e) {
throw new RuntimeException(e);