Buggy code:
public final class ModelUtil { private static final String ORG_ECLIPSE_EMF_EMFSTORE_COMMON_MODEL = "org.eclipse.emf.emfstore.common.model" ; public static final String BEGINTEXT_TOKEN = "%BEGINNTEXT%" ; public static final URI VIRTUAL_URI = URI . createURI ( "virtualUri" ) ; private static Set < String > ignoredDataTypes ; private static Set < SingletonIdResolver > singletonIdResolvers ; private static HashMap < Object , Object > resourceLoadOptions ; private static HashMap < Object , Object > resourceSaveOptions ; private ModelUtil ( ) { } public static ModelElementId createModelElementId ( String id ) { } public static boolean areEqual ( EObject eobjectA , EObject eobjectB ) { } public static String eObjectToString ( EObject object ) throws SerializationException { } public static String eObjectToString ( EObject object , boolean overrideContainmentCheck , boolean overrideHrefCheck , boolean overrideProxyCheck ) throws SerializationException { } private static void proxyCheck ( Resource resource ) throws SerializationException { } private static void hrefCheck ( String result ) throws SerializationException { } public static boolean isIgnoredDatatype ( EObject eObject ) { } public static EObject stringToEObject ( String object ) throws SerializationException { } public static Map < Object , Object > getResourceLoadOptions ( ) { } public static Map < Object , Object > getResourceSaveOptions ( ) { } private static boolean canHaveInstances ( EClass eClass ) { } public static Set < EClass > getNonAbstractMETypes ( EPackage ePackage ) { } public static Set < EClass > getAllMETypes ( EPackage ePackage ) { } public static void log ( String message , Throwable exception , int statusInt ) { } public static void logException ( String message , Throwable exception ) { } public static void logException ( Throwable exception ) { } public static void logWarning ( String message , Throwable exception ) { } public static void logWarning ( String message ) { } public static void logInfo ( String message ) { } @ SuppressWarnings ( "unchecked" ) public static < T extends EObject > T clone ( T eObject ) { } @ SuppressWarnings ( "unchecked" ) public static < T extends EObject > List < T > clone ( List < T > list ) { } public static < T extends EObject > List < T > flatCloneList ( List < T > originalList ) { } @ SuppressWarnings ( "unchecked" ) public static < T extends EObject > T loadEObjectFromResource ( EClass eClass , URI resourceURI , boolean checkConstraints ) throws IOException { } public static void saveEObjectToResource ( List < ? extends EObject > eObjects , URI resourceURI ) throws IOException { } public static void setXmiIdsOnResource ( Project project , XMIResource xmiResource ) { } public static void saveEObjectToResource ( EObject eObject , URI resourceURI ) throws IOException { } public static int getModelVersionNumber ( ) throws MalformedModelVersionException { } public static Project getProject ( EObject modelElement ) { } public static EObject getParent ( Class < ? extends EObject > parent , EObject child ) { } private static EObject getParent ( Class < ? extends EObject > parent , EObject child , Set < EObject > seenModelElements ) { } public static boolean isAssociationClassElement ( EClass eClazz ) { } public static Set < EObject > getAllContainedModelElements ( EObject modelElement , boolean includeTransientContainments ) { } public static Set < EObject > getAllContainedModelElements ( EObject modelElement , boolean includeTransientContainments , boolean ignoreSingletonDatatypes ) { } public static EObject getContainerModelElement ( EObject modelElement ) { } public static List < EObject > getAllContainedModelElementsAsList ( EObject modelElement , boolean includeTransientContainments ) { } public static void removeModelElementAndChildrenFromResource ( XMIResource res , EObject eObject ) { } private static void removeModelElementFromResource ( XMIResource xmiResource , EObject eObject ) { } public static void deleteIncomingCrossReferencesFromParent ( Collection < Setting > inverseReferences , EObject modelElement ) { for ( Setting setting : inverseReferences ) { EStructuralFeature eStructuralFeature = setting . getEStructuralFeature ( ) ; EReference reference = ( ( EReference ) ( eStructuralFeature ) ) ; <START_BUG> if ( ( ( reference . isContainer ( ) ) || ( reference . isContainment ( ) ) ) || ( reference . isChangeable ( ) ) ) { <END_BUG> continue ; } EObject opposite = setting . getEObject ( ) ; if ( eStructuralFeature . isMany ( ) ) { ( ( EList < ? > ) ( opposite . eGet ( eStructuralFeature ) ) ) . remove ( modelElement ) ; } else { opposite . eUnset ( eStructuralFeature ) ; } } } private static boolean isCorrespondingReference ( EObject modelElement , EObject otherModelElement , EReference reference ) { } public static void deleteOutgoingCrossReferences ( IdEObjectCollection collection , EObject modelElement ) { } public static List < SettingWithReferencedElement > collectOutgoingCrossReferences ( IdEObjectCollection collection , Set < EObject > allModelElements ) { } public static boolean shouldBeCollected ( IdEObjectCollection collection , Set < EObject > allModelElements , EObject referencedElement ) { } public static EObject getSingleton ( ModelElementId singletonId ) { } public static ModelElementId getSingletonModelElementId ( EObject singleton ) { } public static boolean isSingleton ( EObject eObject ) { } private static void initSingletonIdResolvers ( ) { } public static boolean handleIncomingCrossReferences ( EObject element , Project project , boolean cutOffReferences ) { } public static Map < EObject , ModelElementId > copyModelElement ( EObject originalObject , EObject copiedObject ) { } }

Fix:
if ( ( ( reference . isContainer ( ) ) || ( reference . isContainment ( ) ) ) || ( ! ( reference . isChangeable ( ) ) ) ) {