Program: 160534
Project: 160534
Buggy source:
@Override public Object set(InternalEObject eObject,EStructuralFeature eFeature,int index,Object newValue){
  IdEObject idEObject=(IdEObject)eObject;
  if (index == NO_INDEX) {
    if (clientIfcModel.getModelState() != ModelState.LOADING) {
      try {
        if (newValue != EStructuralFeature.Internal.DynamicValueHolder.NIL) {
          Bimsie1LowLevelInterface lowLevelInterface=clientIfcModel.getBimServerClient().getBimsie1LowLevelInterface();
          if (eFeature.getName().equals("String_Node_Str")) {
            IdEObject parentObject=clientIfcModel.get(idEObject.getOid());
            int found=0;
            EReference foundReference=null;
            for (            EReference testReference : parentObject.eClass().getEAllReferences()) {
              if (((EClass)testReference.getEType()).isSuperTypeOf(idEObject.eClass())) {
                foundReference=testReference;
                found++;
                if (found > 1) {
                  throw new RuntimeException("String_Node_Str" + parentObject.eClass().getName() + "String_Node_Str"+ idEObject.eClass().getName()+ "String_Node_Str");
                }
              }
            }
            if (eFeature.getEType() == EcorePackage.eINSTANCE.getEString()) {
              lowLevelInterface.setWrappedStringAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(String)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getELong() || eFeature.getEType() == EcorePackage.eINSTANCE.getELongObject()) {
              lowLevelInterface.setWrappedLongAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(Long)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEDouble() || eFeature.getEType() == EcorePackage.eINSTANCE.getEDoubleObject()) {
              lowLevelInterface.setWrappedDoubleAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(Double)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEBoolean() || eFeature.getEType() == EcorePackage.eINSTANCE.getEBooleanObject()) {
              lowLevelInterface.setWrappedBooleanAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(Boolean)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEInt() || eFeature.getEType() == EcorePackage.eINSTANCE.getEIntegerObject()) {
              lowLevelInterface.setWrappedIntegerAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(Integer)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEByteArray()) {
              throw new RuntimeException("String_Node_Str" + eFeature.getEType().getName() + "String_Node_Str"+ newValue);
            }
          }
 else {
            if (eFeature.getEType() == EcorePackage.eINSTANCE.getEString()) {
              lowLevelInterface.setStringAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(String)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getELong() || eFeature.getEType() == EcorePackage.eINSTANCE.getELongObject()) {
              lowLevelInterface.setLongAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Long)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEDouble() || eFeature.getEType() == EcorePackage.eINSTANCE.getEDoubleObject()) {
              lowLevelInterface.setDoubleAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Double)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEBoolean() || eFeature.getEType() == EcorePackage.eINSTANCE.getEBooleanObject()) {
              lowLevelInterface.setBooleanAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Boolean)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEInt() || eFeature.getEType() == EcorePackage.eINSTANCE.getEIntegerObject()) {
              lowLevelInterface.setIntegerAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Integer)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEByteArray()) {
              lowLevelInterface.setByteArrayAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Byte[])newValue);
            }
 else             if (eFeature.getEType() instanceof EEnum) {
              lowLevelInterface.setEnumAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),((Enum<?>)newValue).toString());
            }
 else             if (eFeature instanceof EReference) {
              if (newValue == null) {
                lowLevelInterface.setReference(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),-1L);
              }
 else {
                lowLevelInterface.setReference(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),((IdEObject)newValue).getOid());
              }
            }
 else {
              throw new RuntimeException("String_Node_Str" + eFeature.getEType().getName() + "String_Node_Str"+ newValue);
            }
          }
        }
      }
 catch (      ServiceException e) {
        LOGGER.error("String_Node_Str",e);
      }
catch (      PublicInterfaceNotFoundException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
 else {
    if (clientIfcModel.getModelState() != ModelState.LOADING) {
      try {
        Bimsie1LowLevelInterface lowLevelInterface=clientIfcModel.getBimServerClient().getBimsie1LowLevelInterface();
        if (newValue instanceof String) {
          lowLevelInterface.setStringAttributeAtIndex(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),index,(String)newValue);
        }
 else         if (newValue instanceof Double) {
          lowLevelInterface.setDoubleAttributeAtIndex(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),index,(Double)newValue);
        }
 else         if (newValue instanceof Boolean) {
          lowLevelInterface.setBooleanAttributeAtIndex(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),index,(Boolean)newValue);
        }
 else         if (newValue instanceof Integer) {
          lowLevelInterface.setIntegerAttributeAtIndex(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),index,(Integer)newValue);
        }
 else         if (newValue instanceof IdEObject) {
          lowLevelInterface.addReference(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),((IdEObject)newValue).getOid());
        }
 else {
          throw new RuntimeException("String_Node_Str" + eFeature.getEType().getName() + "String_Node_Str"+ newValue);
        }
      }
 catch (      ServerException e) {
        LOGGER.error("String_Node_Str",e);
      }
catch (      UserException e) {
        LOGGER.error("String_Node_Str",e);
      }
catch (      PublicInterfaceNotFoundException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
  return super.set(eObject,eFeature,index,newValue);
}

Fixed version (ground truth):
@Override public Object set(InternalEObject eObject,EStructuralFeature eFeature,int index,Object newValue){
  IdEObject idEObject=(IdEObject)eObject;
  if (index == NO_INDEX) {
    if (clientIfcModel.getModelState() != ModelState.LOADING) {
      try {
        if (newValue != EStructuralFeature.Internal.DynamicValueHolder.NIL) {
          Bimsie1LowLevelInterface lowLevelInterface=clientIfcModel.getBimServerClient().getBimsie1LowLevelInterface();
          if (eFeature.getName().equals("String_Node_Str")) {
            EReference foundReference=null;
            if (clientIfcModel.contains(idEObject.getOid())) {
              IdEObject parentObject=clientIfcModel.get(idEObject.getOid());
              int found=0;
              foundReference=null;
              for (              EReference testReference : parentObject.eClass().getEAllReferences()) {
                if (((EClass)testReference.getEType()).isSuperTypeOf(idEObject.eClass())) {
                  foundReference=testReference;
                  found++;
                  if (found > 1) {
                    throw new RuntimeException("String_Node_Str" + parentObject.eClass().getName() + "String_Node_Str"+ idEObject.eClass().getName()+ "String_Node_Str");
                  }
                }
              }
              if (eFeature.getEType() == EcorePackage.eINSTANCE.getEString()) {
                lowLevelInterface.setWrappedStringAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(String)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getELong() || eFeature.getEType() == EcorePackage.eINSTANCE.getELongObject()) {
                lowLevelInterface.setWrappedLongAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(Long)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getEDouble() || eFeature.getEType() == EcorePackage.eINSTANCE.getEDoubleObject()) {
                lowLevelInterface.setWrappedDoubleAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(Double)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getEBoolean() || eFeature.getEType() == EcorePackage.eINSTANCE.getEBooleanObject()) {
                lowLevelInterface.setWrappedBooleanAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(Boolean)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getEInt() || eFeature.getEType() == EcorePackage.eINSTANCE.getEIntegerObject()) {
                lowLevelInterface.setWrappedIntegerAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),foundReference.getName(),idEObject.eClass().getName(),(Integer)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getEByteArray()) {
                throw new RuntimeException("String_Node_Str" + eFeature.getEType().getName() + "String_Node_Str"+ newValue);
              }
            }
 else {
              if (eFeature.getEType() == EcorePackage.eINSTANCE.getEString()) {
                lowLevelInterface.setStringAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(String)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getELong() || eFeature.getEType() == EcorePackage.eINSTANCE.getELongObject()) {
                lowLevelInterface.setLongAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Long)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getEDouble() || eFeature.getEType() == EcorePackage.eINSTANCE.getEDoubleObject()) {
                lowLevelInterface.setDoubleAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Double)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getEBoolean() || eFeature.getEType() == EcorePackage.eINSTANCE.getEBooleanObject()) {
                lowLevelInterface.setBooleanAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Boolean)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getEInt() || eFeature.getEType() == EcorePackage.eINSTANCE.getEIntegerObject()) {
                lowLevelInterface.setIntegerAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Integer)newValue);
              }
 else               if (eFeature.getEType() == EcorePackage.eINSTANCE.getEByteArray()) {
                lowLevelInterface.setByteArrayAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Byte[])newValue);
              }
 else               if (eFeature.getEType() instanceof EEnum) {
                lowLevelInterface.setEnumAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),((Enum<?>)newValue).toString());
              }
 else               if (eFeature instanceof EReference) {
                if (newValue == null) {
                  lowLevelInterface.setReference(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),-1L);
                }
 else {
                  lowLevelInterface.setReference(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),((IdEObject)newValue).getOid());
                }
              }
 else {
                throw new RuntimeException("String_Node_Str" + eFeature.getEType().getName() + "String_Node_Str"+ newValue);
              }
            }
          }
 else {
            if (eFeature.getEType() == EcorePackage.eINSTANCE.getEString()) {
              lowLevelInterface.setStringAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(String)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getELong() || eFeature.getEType() == EcorePackage.eINSTANCE.getELongObject()) {
              lowLevelInterface.setLongAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Long)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEDouble() || eFeature.getEType() == EcorePackage.eINSTANCE.getEDoubleObject()) {
              lowLevelInterface.setDoubleAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Double)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEBoolean() || eFeature.getEType() == EcorePackage.eINSTANCE.getEBooleanObject()) {
              lowLevelInterface.setBooleanAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Boolean)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEInt() || eFeature.getEType() == EcorePackage.eINSTANCE.getEIntegerObject()) {
              lowLevelInterface.setIntegerAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Integer)newValue);
            }
 else             if (eFeature.getEType() == EcorePackage.eINSTANCE.getEByteArray()) {
              lowLevelInterface.setByteArrayAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),(Byte[])newValue);
            }
 else             if (eFeature.getEType() instanceof EEnum) {
              lowLevelInterface.setEnumAttribute(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),((Enum<?>)newValue).toString());
            }
 else             if (eFeature instanceof EReference) {
              if (newValue == null) {
                lowLevelInterface.setReference(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),-1L);
              }
 else {
                lowLevelInterface.setReference(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),((IdEObject)newValue).getOid());
              }
            }
 else {
              throw new RuntimeException("String_Node_Str" + eFeature.getEType().getName() + "String_Node_Str"+ newValue);
            }
          }
        }
      }
 catch (      ServiceException e) {
        LOGGER.error("String_Node_Str",e);
      }
catch (      PublicInterfaceNotFoundException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
 else {
    if (clientIfcModel.getModelState() != ModelState.LOADING) {
      try {
        Bimsie1LowLevelInterface lowLevelInterface=clientIfcModel.getBimServerClient().getBimsie1LowLevelInterface();
        if (newValue instanceof String) {
          lowLevelInterface.setStringAttributeAtIndex(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),index,(String)newValue);
        }
 else         if (newValue instanceof Double) {
          lowLevelInterface.setDoubleAttributeAtIndex(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),index,(Double)newValue);
        }
 else         if (newValue instanceof Boolean) {
          lowLevelInterface.setBooleanAttributeAtIndex(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),index,(Boolean)newValue);
        }
 else         if (newValue instanceof Integer) {
          lowLevelInterface.setIntegerAttributeAtIndex(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),index,(Integer)newValue);
        }
 else         if (newValue instanceof IdEObject) {
          lowLevelInterface.addReference(clientIfcModel.getTransactionId(),idEObject.getOid(),eFeature.getName(),((IdEObject)newValue).getOid());
        }
 else {
          throw new RuntimeException("String_Node_Str" + eFeature.getEType().getName() + "String_Node_Str"+ newValue);
        }
      }
 catch (      ServerException e) {
        LOGGER.error("String_Node_Str",e);
      }
catch (      UserException e) {
        LOGGER.error("String_Node_Str",e);
      }
catch (      PublicInterfaceNotFoundException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
  return super.set(eObject,eFeature,index,newValue);
}