Source:
<code>public boolean isStructureChanged(VDomainModelReference reference, EObject domainRootObject, ModelChangeNotification notification) { Assert.create(reference).notNull(); Assert.create(notification).notNull(); Assert.create(reference).ofClass(VFeaturePathDomainModelReference.class); if (notification.getRawNotification().isTouch()) { return false; } if (EAttribute.class.isInstance(notification.getStructuralFeature())) { return false; } final VIndexDomainModelReference indexDMR = VIndexDomainModelReference.class.cast(reference); boolean relevantChange = false; EObject lastResolvedEObject = domainRootObject; if (indexDMR.getPrefixDMR() == null) { for (final EReference eReference : indexDMR.getDomainModelEReferencePath()) { relevantChange |= eReference.equals(notification.getStructuralFeature()) && lastResolvedEObject == notification.getNotifier(); if (relevantChange) { return true; } <START> lastResolvedEObject = (EObject) lastResolvedEObject.eGet(eReference); <END> } } else { relevantChange = emfFormsStructuralChangeTester.isStructureChanged(indexDMR.getPrefixDMR(), domainRootObject, notification); } if (relevantChange) { return true; } try { lastResolvedEObject = ((EList<EObject>) emfFormsDatabinding .getSetting(indexDMR.getPrefixDMR(), domainRootObject).get(true)).get(indexDMR.getIndex()); } catch (final DatabindingFailedException ex) { throw new IllegalStateException(ex); } relevantChange = emfFormsStructuralChangeTester.isStructureChanged(indexDMR.getTargetDMR(), lastResolvedEObject, notification); return relevantChange; }</code><technical_language>I if care invalid DMRs, this is EObject. I that, depending change, lastResolvedEobject get null in next iteration step get NPE</technical_language>

Target:
public boolean isStructureChanged(VDomainModelReference reference, EObject domainRootObject, ModelChangeNotification notification) { Assert.create(reference).notNull(); Assert.create(notification).notNull(); Assert.create(reference).ofClass(VFeaturePathDomainModelReference.class); if (notification.getRawNotification().isTouch()) { return false; } if (EAttribute.class.isInstance(notification.getStructuralFeature())) { return false; } final VIndexDomainModelReference indexDMR = VIndexDomainModelReference.class.cast(reference); boolean relevantChange = false; EObject lastResolvedEObject = domainRootObject; if (indexDMR.getPrefixDMR() == null) { for (final EReference eReference : indexDMR.getDomainModelEReferencePath()) { if (lastResolvedEObject == null) { return false; } relevantChange |= eReference.equals(notification.getStructuralFeature()) && lastResolvedEObject == notification.getNotifier(); if (relevantChange) { return true; } lastResolvedEObject = (EObject) lastResolvedEObject.eGet(eReference); } } else { relevantChange = emfFormsStructuralChangeTester.isStructureChanged(indexDMR.getPrefixDMR(), domainRootObject, notification); } if (relevantChange) { return true; } try { lastResolvedEObject = ((EList<EObject>) emfFormsDatabinding .getSetting(indexDMR.getPrefixDMR(), domainRootObject).get(true)).get(indexDMR.getIndex()); } catch (final DatabindingFailedException ex) { throw new IllegalStateException(ex); } relevantChange = emfFormsStructuralChangeTester.isStructureChanged(indexDMR.getTargetDMR(), lastResolvedEObject, notification); return relevantChange; }