Object () { JavaCodeStyleSettings cloned = (JavaCodeStyleSettings)super.clone(); cloned.myRepeatAnnotations = new ArrayList<>(); cloned.setRepeatAnnotations(getRepeatAnnotations()); cloned.PACKAGES_TO_USE_IMPORT_ON_DEMAND = new PackageEntryTable(); cloned.PACKAGES_TO_USE_IMPORT_ON_DEMAND.copyFrom(PACKAGES_TO_USE_IMPORT_ON_DEMAND); cloned.IMPORT_LAYOUT_TABLE = new PackageEntryTable(); cloned.IMPORT_LAYOUT_TABLE.copyFrom(IMPORT_LAYOUT_TABLE); return cloned; }