Program: 168781
Project: 168781
Buggy source:
private void visitInverseElementFlushersForActions(UpdateContext context,Iterable<?> current,Map<Object,Object> added,Map<Object,Object> removed,ElementChangeListener<E,V> listener){
  if (elementDescriptor.isSubview()) {
    final ViewToEntityMapper mapper=elementDescriptor.getViewToEntityMapper();
    for (    Object o : current) {
      if (o instanceof MutableStateTrackable) {
        MutableStateTrackable element=(MutableStateTrackable)o;
        @SuppressWarnings("String_Node_Str") DirtyAttributeFlusher<?,E,V> flusher=(DirtyAttributeFlusher<?,E,V>)mapper.getNestedDirtyFlusher(context,element,null);
        if (flusher != null) {
          Object addedElement=added.remove(element);
          if (addedElement != null) {
            listener.onAddedAndUpdatedInverseElement(flusher,element);
          }
 else {
            listener.onUpdatedInverseElement(flusher,element);
          }
        }
      }
    }
    for (    Object element : removed.values()) {
      listener.onRemovedInverseElement(element);
    }
    for (    Object element : added.values()) {
      listener.onAddedInverseElement(element);
    }
  }
 else   if (elementDescriptor.isJpaEntity()) {
    for (    Object element : current) {
      if (elementDescriptor.getBasicUserType().shouldPersist(element) && elementDescriptor.shouldJpaPersist()) {
        CollectionElementAttributeFlusher<E,V> flusher=new PersistCollectionElementAttributeFlusher<>(element,optimisticLockProtected);
        Object addedElement=added.remove(element);
        if (addedElement != null) {
          listener.onAddedAndUpdatedInverseElement(flusher,element);
        }
 else {
          listener.onUpdatedInverseElement(flusher,element);
        }
      }
 else       if (elementDescriptor.shouldJpaMerge()) {
        CollectionElementAttributeFlusher<E,V> flusher=new MergeCollectionElementAttributeFlusher<>(element,optimisticLockProtected);
        Object addedElement=added.remove(element);
        if (addedElement != null) {
          listener.onAddedAndUpdatedInverseElement(flusher,element);
        }
 else {
          listener.onUpdatedInverseElement(flusher,element);
        }
      }
 else {
        Object addedElement=added.remove(element);
        if (addedElement != null) {
          listener.onAddedInverseElement(element);
        }
      }
    }
    for (    Object element : removed.values()) {
      listener.onRemovedInverseElement(element);
    }
  }
 else {
    throw new UnsupportedOperationException("String_Node_Str");
  }
}

Fixed version (ground truth):
private void visitInverseElementFlushersForActions(UpdateContext context,Iterable<?> current,Map<Object,Object> added,Map<Object,Object> removed,ElementChangeListener<E,V> listener){
  if (elementDescriptor.isSubview()) {
    final ViewToEntityMapper mapper=elementDescriptor.getViewToEntityMapper();
    for (    Object o : current) {
      if (o instanceof MutableStateTrackable) {
        MutableStateTrackable element=(MutableStateTrackable)o;
        @SuppressWarnings("String_Node_Str") DirtyAttributeFlusher<?,E,V> flusher=(DirtyAttributeFlusher<?,E,V>)(DirtyAttributeFlusher)mapper.getNestedDirtyFlusher(context,element,(DirtyAttributeFlusher)null);
        if (flusher != null) {
          Object addedElement=added.remove(element);
          if (addedElement != null) {
            listener.onAddedAndUpdatedInverseElement(flusher,element);
          }
 else {
            listener.onUpdatedInverseElement(flusher,element);
          }
        }
      }
    }
    for (    Object element : removed.values()) {
      listener.onRemovedInverseElement(element);
    }
    for (    Object element : added.values()) {
      listener.onAddedInverseElement(element);
    }
  }
 else   if (elementDescriptor.isJpaEntity()) {
    for (    Object element : current) {
      if (elementDescriptor.getBasicUserType().shouldPersist(element) && elementDescriptor.shouldJpaPersist()) {
        CollectionElementAttributeFlusher<E,V> flusher=new PersistCollectionElementAttributeFlusher<>(element,optimisticLockProtected);
        Object addedElement=added.remove(element);
        if (addedElement != null) {
          listener.onAddedAndUpdatedInverseElement(flusher,element);
        }
 else {
          listener.onUpdatedInverseElement(flusher,element);
        }
      }
 else       if (elementDescriptor.shouldJpaMerge()) {
        CollectionElementAttributeFlusher<E,V> flusher=new MergeCollectionElementAttributeFlusher<>(element,optimisticLockProtected);
        Object addedElement=added.remove(element);
        if (addedElement != null) {
          listener.onAddedAndUpdatedInverseElement(flusher,element);
        }
 else {
          listener.onUpdatedInverseElement(flusher,element);
        }
      }
 else {
        Object addedElement=added.remove(element);
        if (addedElement != null) {
          listener.onAddedInverseElement(element);
        }
      }
    }
    for (    Object element : removed.values()) {
      listener.onRemovedInverseElement(element);
    }
  }
 else {
    throw new UnsupportedOperationException("String_Node_Str");
  }
}