Program: 3839
Project: 3839
Buggy source:
/** 
 * Constructs a FilterPanel with the specified filterable data source and UI decorators.
 */
public AdvancedFilterPanel(FilterableSource<E> filterableSource,TextFieldDecorator textFieldDecorator,FriendActions friendManager,Provider<IconManager> iconManager){
  this.filterableSource=filterableSource;
  this.editorList=new BasicEventList<MatcherEditor<E>>();
  this.filterManager=new FilterManager<E>(filterableSource,iconManager);
  if (filterableSource.getFilterDebugger() != null) {
    filterableSource.getFilterDebugger().initialize(filterManager);
  }
  GuiUtils.assignResources(this);
  setBackground(backgroundColor);
  setBorder(new SideLineBorder(borderColor,Side.RIGHT));
  setLayout(new MigLayout("String_Node_Str"));
  int textFieldWidth=filterWidth - LEFT_INSET - RIGHT_INSET;
  textFieldDecorator.decorateClearablePromptField(filterTextField,AccentType.NONE);
  filterTextField.setMinimumSize(new Dimension(textFieldWidth,filterTextField.getMinimumSize().height));
  filterTextField.setPreferredSize(new Dimension(textFieldWidth,filterTextField.getPreferredSize().height));
  filterDisplayPanel=new FilterDisplayPanel();
  filterPanel.setBackground(backgroundColor);
  filterPanel.setLayout(new MigLayout("String_Node_Str","String_Node_Str","String_Node_Str"));
  upperDividerLine=Line.createHorizontalLine(dividerForegroundColor);
  lowerDividerLine=Line.createHorizontalLine(dividerBackgroundColor);
  filterScrollPane.setBorder(BorderFactory.createEmptyBorder());
  filterScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  filterScrollPane.setViewportView(filterPanel);
  filterScrollPane.getVerticalScrollBar().setUnitIncrement(5);
  filterScrollPane.getVerticalScrollBar().addComponentListener(new ComponentAdapter(){
    @Override public void componentHidden(    ComponentEvent e){
      if (!layoutAdjusting)       doFilterLayout();
    }
    @Override public void componentShown(    ComponentEvent e){
      if (!layoutAdjusting)       doFilterLayout();
    }
  }
);
  propertyPanel=new PropertyFilterPanel();
  categoryFilter=filterManager.getCategoryFilter();
  JComponent categoryComp=categoryFilter.getComponent();
  categoryComp.setVisible(filterableSource.getFilterCategory() == SearchCategory.ALL);
  sourceFilter=filterManager.getSourceFilter();
  JComponent sourceComp=sourceFilter.getComponent();
  sourceComp.setVisible(friendManager.isSignedIn());
  add(filterTextField,"String_Node_Str");
  add(filterDisplayPanel,"String_Node_Str");
  add(upperDividerLine,"String_Node_Str");
  add(lowerDividerLine,"String_Node_Str");
  add(filterScrollPane,"String_Node_Str");
  doFilterLayout();
  configureFilters();
}

Fixed version (ground truth):
/** 
 * Constructs a FilterPanel with the specified filterable data source and UI decorators.
 */
public AdvancedFilterPanel(FilterableSource<E> filterableSource,TextFieldDecorator textFieldDecorator,FriendActions friendManager,Provider<IconManager> iconManager){
  this.filterableSource=filterableSource;
  this.editorList=new BasicEventList<MatcherEditor<E>>();
  this.filterManager=new FilterManager<E>(filterableSource,iconManager);
  if (filterableSource.getFilterDebugger() != null) {
    filterableSource.getFilterDebugger().initialize(filterManager);
  }
  GuiUtils.assignResources(this);
  setBackground(background);
  setBorder(new SideLineBorder(borderColor,Side.RIGHT));
  setLayout(new MigLayout("String_Node_Str"));
  int textFieldWidth=filterWidth - LEFT_INSET - RIGHT_INSET;
  textFieldDecorator.decorateClearablePromptField(filterTextField,AccentType.NONE);
  filterTextField.setMinimumSize(new Dimension(textFieldWidth,filterTextField.getMinimumSize().height));
  filterTextField.setPreferredSize(new Dimension(textFieldWidth,filterTextField.getPreferredSize().height));
  filterDisplayPanel=new FilterDisplayPanel();
  filterPanel.setBackground(background);
  filterPanel.setLayout(new MigLayout("String_Node_Str","String_Node_Str","String_Node_Str"));
  upperDividerLine=Line.createHorizontalLine(dividerForeground);
  lowerDividerLine=Line.createHorizontalLine(dividerBackground);
  filterScrollPane.setBorder(BorderFactory.createEmptyBorder());
  filterScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  filterScrollPane.setViewportView(filterPanel);
  filterScrollPane.getVerticalScrollBar().setUnitIncrement(5);
  filterScrollPane.getVerticalScrollBar().addComponentListener(new ComponentAdapter(){
    @Override public void componentHidden(    ComponentEvent e){
      if (!layoutAdjusting)       doFilterLayout();
    }
    @Override public void componentShown(    ComponentEvent e){
      if (!layoutAdjusting)       doFilterLayout();
    }
  }
);
  propertyPanel=new PropertyFilterPanel();
  categoryFilter=filterManager.getCategoryFilter();
  JComponent categoryComp=categoryFilter.getComponent();
  categoryComp.setVisible(filterableSource.getFilterCategory() == SearchCategory.ALL);
  sourceFilter=filterManager.getSourceFilter();
  JComponent sourceComp=sourceFilter.getComponent();
  sourceComp.setVisible(friendManager.isSignedIn());
  add(filterTextField,"String_Node_Str");
  add(filterDisplayPanel,"String_Node_Str");
  add(upperDividerLine,"String_Node_Str");
  add(lowerDividerLine,"String_Node_Str");
  add(filterScrollPane,"String_Node_Str");
  doFilterLayout();
  configureFilters();
}