Program: 143357
Project: 143357
Buggy source:
protected IFoundSetEventListener getFoundsetEventListener(){
  if (foundsetEventListener == null) {
    foundsetEventListener=new IFoundSetEventListener(){
      @Override public void foundSetChanged(      FoundSetEvent event){
        if (event.getType() == FoundSetEvent.FIND_MODE_CHANGE)         changeMonitor.findModeChanged(foundset.isInFindMode());
 else         if (event.getType() == FoundSetEvent.FOUNDSET_INVALIDATED)         changeMonitor.foundsetInvalidated();
 else         if (event.getType() == FoundSetEvent.CONTENTS_CHANGED) {
          if (event.getChangeType() == FoundSetEvent.CHANGE_DELETE) {
            changeMonitor.recordsDeleted(event.getFirstRow(),event.getLastRow(),FoundsetTypeViewport.this);
          }
 else           if (event.getChangeType() == FoundSetEvent.CHANGE_INSERT) {
            if (size == 0) {
              setPreferredViewportBounds();
              changeMonitor.viewPortCompletelyChanged();
              changeMonitor.foundSetSizeChanged();
            }
 else {
              if (size < preferredViewPortSize && (foundset.getSize() - startIndex) > size) {
                setBounds(startIndex,Math.min(preferredViewPortSize,(foundset.getSize() - startIndex)));
              }
              changeMonitor.recordsInserted(event.getFirstRow(),event.getLastRow(),FoundsetTypeViewport.this);
            }
          }
 else           if (event.getChangeType() == FoundSetEvent.CHANGE_UPDATE) {
            changeMonitor.recordsUpdated(event.getFirstRow(),event.getLastRow(),foundset.getSize(),FoundsetTypeViewport.this,event.getDataProviders());
          }
          changeMonitor.checkHadMoreRows();
        }
 else         if (event.getType() == FoundSetEvent.SELECTION_MODE_CHANGE)         changeMonitor.multiSelectChanged();
      }
    }
;
  }
  return foundsetEventListener;
}

Fixed version (ground truth):
protected IFoundSetEventListener getFoundsetEventListener(){
  if (foundsetEventListener == null) {
    foundsetEventListener=new IFoundSetEventListener(){
      @Override public void foundSetChanged(      FoundSetEvent event){
        if (event.getType() == FoundSetEvent.FIND_MODE_CHANGE)         changeMonitor.findModeChanged(foundset.isInFindMode());
 else         if (event.getType() == FoundSetEvent.CONTENTS_CHANGED) {
          if (event.getChangeType() == FoundSetEvent.CHANGE_DELETE) {
            changeMonitor.recordsDeleted(event.getFirstRow(),event.getLastRow(),FoundsetTypeViewport.this);
          }
 else           if (event.getChangeType() == FoundSetEvent.CHANGE_INSERT) {
            if (size == 0) {
              setPreferredViewportBounds();
              changeMonitor.viewPortCompletelyChanged();
              changeMonitor.foundSetSizeChanged();
            }
 else {
              if (size < preferredViewPortSize && (foundset.getSize() - startIndex) > size) {
                setBounds(startIndex,Math.min(preferredViewPortSize,(foundset.getSize() - startIndex)));
              }
              changeMonitor.recordsInserted(event.getFirstRow(),event.getLastRow(),FoundsetTypeViewport.this);
            }
          }
 else           if (event.getChangeType() == FoundSetEvent.CHANGE_UPDATE) {
            changeMonitor.recordsUpdated(event.getFirstRow(),event.getLastRow(),foundset.getSize(),FoundsetTypeViewport.this,event.getDataProviders());
          }
 else           if (event.getChangeType() == FoundSetEvent.FOUNDSET_INVALIDATED)           foundset.getSize();
          changeMonitor.checkHadMoreRows();
        }
 else         if (event.getType() == FoundSetEvent.SELECTION_MODE_CHANGE)         changeMonitor.multiSelectChanged();
      }
    }
;
  }
  return foundsetEventListener;
}