Program: 3885
Project: 3885
Buggy source:
private void configureList(final EventList<VisualSearchResult> eventList,RowSelectionPreserver preserver,final Navigator navigator,final SearchInfo searchInfo,final PropertiesFactory<VisualSearchResult> properties,final ListViewRowHeightRule rowHeightRule){
  ListViewTableFormat tableFormat=new ListViewTableFormat();
  final RangeList<VisualSearchResult> maxSizedList=new RangeList<VisualSearchResult>(newVisibleFilterList(eventList));
  maxSizedList.setHeadRange(0,MAX_DISPLAYED_RESULT_SIZE + 1);
  resultsList=new ListViewTable(maxSizedList,tableFormat);
  resultsList.setShowGrid(true,false);
  preserver.addRowPreservationListener(resultsList);
  ListViewDisplayedRowsLimit displayLimit=new ListViewDisplayedRowsLimit(){
    @Override public int getLastDisplayedRow(){
      return MAX_DISPLAYED_RESULT_SIZE;
    }
    @Override public int getTotalResultsReturned(){
      return eventList.size();
    }
  }
;
  ListViewTableEditorRenderer renderer=listViewTableEditorRendererFactory.create(new ActionColumnTableCellEditor(this),searchInfo.getQuery(),navigator,resultsList.getTableColors().selectionColor,this,displayLimit);
  TableColumnModel tcm=resultsList.getColumnModel();
  int columnCount=tableFormat.getColumnCount();
  for (int i=0; i < columnCount; i++) {
    TableColumn tc=tcm.getColumn(i);
    tc.setCellRenderer(renderer);
  }
  ListViewTableEditorRenderer editor=listViewTableEditorRendererFactory.create(new ActionColumnTableCellEditor(this),searchInfo.getQuery(),navigator,resultsList.getTableColors().selectionColor,this,displayLimit);
  resultsList.setDefaultEditor(VisualSearchResult.class,editor);
  for (int i=0; i < tableFormat.getColumnCount(); i++) {
    resultsList.getColumnModel().getColumn(i).setPreferredWidth(tableFormat.getInitialWidth(i));
  }
  resultsList.setRowHeightEnabled(true);
  maxSizedList.addListEventListener(new ListEventListener<VisualSearchResult>(){
    @Override public void listChanged(    ListEvent<VisualSearchResult> listChanges){
      final EventTableModel model=(EventTableModel)resultsList.getModel();
      if (model.getRowCount() == 0) {
        return;
      }
      Runnable runner=new Runnable(){
        @Override public void run(){
          resultsList.setIgnoreRepaints(true);
          boolean setRowSize=false;
          for (int row=0; row < model.getRowCount(); row++) {
            VisualSearchResult vsr=(VisualSearchResult)model.getElementAt(row);
            RowDisplayResult result=vsrToRowDisplayResultMap.get(vsr);
            if (result == null || result.isStale(vsr)) {
              result=rowHeightRule.getDisplayResult(vsr,searchInfo.getQuery());
              vsrToRowDisplayResultMap.put(vsr,result);
            }
            int newRowHeight=result.getConfig().getRowHeight();
            if (resultsList.getRowHeight(row) != newRowHeight) {
              LOG.debugf("String_Node_Str",row,vsr.getHeading(),result.getConfig());
              resultsList.setRowHeight(row,newRowHeight);
              setRowSize=true;
            }
          }
          resultsList.setIgnoreRepaints(false);
          if (setRowSize) {
            if (resultsList.isEditing()) {
              resultsList.editingCanceled(new ChangeEvent(resultsList));
            }
            resultsList.updateViewSizeSequence();
            resultsList.resizeAndRepaint();
          }
        }
      }
;
      SwingUtilities.invokeLater(runner);
    }
  }
);
  resultsList.setRowHeight(ROW_HEIGHT);
  resultsList.addMouseListener(new ResultDownloaderAdaptor());
}

Fixed version (ground truth):
private void configureList(final EventList<VisualSearchResult> eventList,RowSelectionPreserver preserver,final Navigator navigator,final SearchInfo searchInfo,final PropertiesFactory<VisualSearchResult> properties,final ListViewRowHeightRule rowHeightRule){
  ListViewTableFormat tableFormat=new ListViewTableFormat();
  final RangeList<VisualSearchResult> maxSizedList=new RangeList<VisualSearchResult>(newVisibleFilterList(eventList));
  maxSizedList.setHeadRange(0,MAX_DISPLAYED_RESULT_SIZE + 1);
  resultsList=new ListViewTable(maxSizedList,tableFormat);
  resultsList.setShowGrid(true,false);
  preserver.addRowPreservationListener(resultsList);
  ListViewDisplayedRowsLimit displayLimit=new ListViewDisplayedRowsLimit(){
    @Override public int getLastDisplayedRow(){
      return MAX_DISPLAYED_RESULT_SIZE;
    }
    @Override public int getTotalResultsReturned(){
      return eventList.size();
    }
  }
;
  ListViewTableEditorRenderer renderer=listViewTableEditorRendererFactory.create(new ActionColumnTableCellEditor(this),searchInfo.getQuery(),navigator,resultsList.getTableColors().selectionColor,this,displayLimit);
  TableColumnModel tcm=resultsList.getColumnModel();
  int columnCount=tableFormat.getColumnCount();
  for (int i=0; i < columnCount; i++) {
    TableColumn tc=tcm.getColumn(i);
    tc.setCellRenderer(renderer);
  }
  ListViewTableEditorRenderer editor=listViewTableEditorRendererFactory.create(new ActionColumnTableCellEditor(this),searchInfo.getQuery(),navigator,resultsList.getTableColors().selectionColor,this,displayLimit);
  resultsList.setDefaultEditor(VisualSearchResult.class,editor);
  for (int i=0; i < tableFormat.getColumnCount(); i++) {
    resultsList.getColumnModel().getColumn(i).setPreferredWidth(tableFormat.getInitialWidth(i));
  }
  resultsList.setRowHeightEnabled(true);
  maxSizedList.addListEventListener(new ListEventListener<VisualSearchResult>(){
    @Override public void listChanged(    ListEvent<VisualSearchResult> listChanges){
      final EventTableModel model=(EventTableModel)resultsList.getModel();
      if (model.getRowCount() == 0) {
        return;
      }
      Runnable runner=new Runnable(){
        @Override public void run(){
          resultsList.setIgnoreRepaints(true);
          boolean setRowSize=false;
          for (int row=0; row < model.getRowCount(); row++) {
            VisualSearchResult vsr=(VisualSearchResult)model.getElementAt(row);
            RowDisplayResult result=vsrToRowDisplayResultMap.get(vsr);
            if (result == null || result.isStale(vsr)) {
              result=rowHeightRule.getDisplayResult(vsr,searchInfo.getQuery());
              vsrToRowDisplayResultMap.put(vsr,result);
            }
            int newRowHeight=result.getConfig().getRowHeight();
            if (vsr.getSimilarityParent() == null) {
              if (resultsList.getRowHeight(row) != newRowHeight) {
                LOG.debugf("String_Node_Str",row,vsr.getHeading(),result.getConfig());
                resultsList.setRowHeight(row,newRowHeight);
                setRowSize=true;
              }
            }
          }
          resultsList.setIgnoreRepaints(false);
          if (setRowSize) {
            if (resultsList.isEditing()) {
              resultsList.editingCanceled(new ChangeEvent(resultsList));
            }
            resultsList.updateViewSizeSequence();
            resultsList.resizeAndRepaint();
          }
        }
      }
;
      SwingUtilities.invokeLater(runner);
    }
  }
);
  resultsList.setRowHeight(ROW_HEIGHT);
  resultsList.addMouseListener(new ResultDownloaderAdaptor());
}