Program: 95556
Project: 95556
Buggy source:
/** 
 * {@inheritDoc}
 */
public void inputChanged(final Viewer viewer,Object oldInput,final Object newInput){
  Validate.isTrue(viewer instanceof TreeViewer);
  m_childToParentMap.clear();
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  if (m_modelListener != null) {
    ded.removeDataChangedListener(m_modelListener);
    m_modelListener=null;
  }
  if (newInput != null) {
    m_modelListener=new IDataChangedListener(){
      /** 
 * {@inheritDoc} 
 */
      public void handleDataChanged(      DataChangedEvent... events){
        for (        DataChangedEvent e : events) {
          handleDataChanged(e.getPo(),e.getDataState(),e.getUpdateState());
        }
      }
      public void handleDataChanged(      IPersistentObject po,      DataState dataState,      UpdateState updateState){
        if (updateState != UpdateState.notInEditor) {
          StructuredViewer structuredViewer=(StructuredViewer)viewer;
          if (dataState == DataState.StructureModified) {
            boolean objectsAreEqual=structuredViewer.getComparer() != null ? structuredViewer.getComparer().equals(newInput,po) : newInput.equals(po);
            if (objectsAreEqual || po instanceof IAUTMainPO || po instanceof IObjectMappingPO) {
              structuredViewer.refresh();
            }
 else {
              structuredViewer.refresh(po);
            }
          }
 else           if (dataState == DataState.Renamed) {
            structuredViewer.update(po,null);
          }
        }
      }
    }
;
    ded.addDataChangedListener(m_modelListener,true);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void inputChanged(final Viewer viewer,Object oldInput,final Object newInput){
  Validate.isTrue(viewer instanceof TreeViewer);
  m_childToParentMap.clear();
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  if (m_modelListener != null) {
    ded.removeDataChangedListener(m_modelListener);
    m_modelListener=null;
  }
  if (newInput != null) {
    m_modelListener=new IDataChangedListener(){
      /** 
 * {@inheritDoc} 
 */
      public void handleDataChanged(      DataChangedEvent... events){
        for (        DataChangedEvent e : events) {
          handleDataChanged(e.getPo(),e.getDataState(),e.getUpdateState());
        }
      }
      public void handleDataChanged(      IPersistentObject po,      DataState dataState,      UpdateState updateState){
        if (updateState != UpdateState.notInEditor) {
          StructuredViewer structuredViewer=(StructuredViewer)viewer;
          if (dataState == DataState.StructureModified) {
            boolean objectsAreEqual=structuredViewer.getComparer() != null ? structuredViewer.getComparer().equals(newInput,po) : newInput.equals(po);
            if (objectsAreEqual || po instanceof IAUTMainPO || po instanceof IObjectMappingPO) {
              structuredViewer.refresh();
            }
 else {
              structuredViewer.refresh(po);
            }
          }
 else           if (dataState == DataState.Renamed) {
            structuredViewer.update(po,null);
          }
        }
      }
    }
;
    ded.addDataChangedListener(m_modelListener,false);
  }
}