nus-yam/ex-repair huggingface dataset:
Program: 32630
Project: 32630
Buggy source:
/** 
 * Make sure we can have a few unsorted elements in an otherwise ordered tree.
 */
public void testUnsortedElementInSortedTree(){
  SimpleTree<String> tree=new SimpleTree<String>();
  Element<String> e=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> g=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> i=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> k=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> m=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> o=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  k.setSorted(false);
  k.set("String_Node_Str");
  Element<String> h=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> n=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  List<String> asList=new SimpleTreeAsList<String>(tree);
  assertEquals(GlazedListsTests.stringToList("String_Node_Str"),asList);
}

Fixed version (ground truth):
/** 
 * Make sure we can have a few unsorted elements in an otherwise ordered tree.
 */
public void testUnsortedElementInSortedTree(){
  SimpleTree<String> tree=new SimpleTree<String>();
  Element<String> e=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> g=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> i=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> k=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> m=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> o=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  k.setSorted(Element.UNSORTED);
  k.set("String_Node_Str");
  Element<String> h=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  Element<String> n=tree.addInSortedOrder(Tree1Test.allColors,"String_Node_Str",1);
  List<String> asList=new SimpleTreeAsList<String>(tree);
  assertEquals(GlazedListsTests.stringToList("String_Node_Str"),asList);
}
Program: 32631
Project: 32631
Buggy source:
/** 
 * Change the selection to be the set union of the current selection  and the indices between index0 and index1 inclusive
 */
public void addSelectionInterval(int index0,int index1){
  if (!enabled)   return;
  listSelection.select(index0,index1);
}

Fixed version (ground truth):
/** 
 * Change the selection to be the set union of the current selection  and the indices between index0 and index1 inclusive
 */
public void addSelectionInterval(int index0,int index1){
  if (!enabled)   return;
  swingThreadSource.getReadWriteLock().writeLock().lock();
  try {
    listSelection.select(index0,index1);
  }
  finally {
    swingThreadSource.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32632
Project: 32632
Buggy source:
/** 
 * Change the selection to the empty set.
 */
public void clearSelection(){
  if (!enabled)   return;
  listSelection.deselectAll();
}

Fixed version (ground truth):
/** 
 * Change the selection to the empty set.
 */
public void clearSelection(){
  if (!enabled)   return;
  swingThreadSource.getReadWriteLock().writeLock().lock();
  try {
    listSelection.deselectAll();
  }
  finally {
    swingThreadSource.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32633
Project: 32633
Buggy source:
/** 
 * Inverts the current selection.
 */
public void invertSelection(){
  listSelection.invertSelection();
}

Fixed version (ground truth):
/** 
 * Inverts the current selection.
 */
public void invertSelection(){
  swingThreadSource.getReadWriteLock().writeLock().lock();
  try {
    listSelection.invertSelection();
  }
  finally {
    swingThreadSource.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32634
Project: 32634
Buggy source:
/** 
 * Change the selection to be between index0 and index1 inclusive. <p>First this calculates the smallest range where changes occur. This includes the union of the selection range before and the selection range specified. It then walks through the change and sets each index as selected or not based on whether the index is in the new range. Finally it fires events to both the listening lists and selection listeners about what changes happened. <p>If the selection does not change, this will not fire any events.
 */
public void setSelectionInterval(int index0,int index1){
  if (!enabled)   return;
  listSelection.setSelection(index0,index1);
}

Fixed version (ground truth):
/** 
 * Change the selection to be between index0 and index1 inclusive. <p>First this calculates the smallest range where changes occur. This includes the union of the selection range before and the selection range specified. It then walks through the change and sets each index as selected or not based on whether the index is in the new range. Finally it fires events to both the listening lists and selection listeners about what changes happened. <p>If the selection does not change, this will not fire any events.
 */
public void setSelectionInterval(int index0,int index1){
  if (!enabled)   return;
  swingThreadSource.getReadWriteLock().writeLock().lock();
  try {
    listSelection.setSelection(index0,index1);
  }
  finally {
    swingThreadSource.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32635
Project: 32635
Buggy source:
/** 
 * Set the selection mode.
 */
public void setSelectionMode(int selectionMode){
  listSelection.setSelectionMode(selectionMode);
}

Fixed version (ground truth):
/** 
 * Set the selection mode.
 */
public void setSelectionMode(int selectionMode){
  swingThreadSource.getReadWriteLock().writeLock().lock();
  try {
    listSelection.setSelectionMode(selectionMode);
  }
  finally {
    swingThreadSource.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32636
Project: 32636
Buggy source:
/** 
 * Set the anchor selection index.
 */
public void setAnchorSelectionIndex(int anchorSelectionIndex){
  if (!enabled)   return;
  listSelection.setAnchorSelectionIndex(anchorSelectionIndex);
}

Fixed version (ground truth):
/** 
 * Set the anchor selection index.
 */
public void setAnchorSelectionIndex(int anchorSelectionIndex){
  if (!enabled)   return;
  swingThreadSource.getReadWriteLock().writeLock().lock();
  try {
    listSelection.setAnchorSelectionIndex(anchorSelectionIndex);
  }
  finally {
    swingThreadSource.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32637
Project: 32637
Buggy source:
/** 
 * Change the selection to be the set difference of the current selection  and the indices between index0 and index1 inclusive.
 */
public void removeSelectionInterval(int index0,int index1){
  if (!enabled)   return;
  if (index0 == 0 && index1 == 0 && swingThreadSource.isEmpty())   return;
  listSelection.deselect(index0,index1);
}

Fixed version (ground truth):
/** 
 * Change the selection to be the set difference of the current selection  and the indices between index0 and index1 inclusive.
 */
public void removeSelectionInterval(int index0,int index1){
  if (!enabled)   return;
  if (index0 == 0 && index1 == 0 && swingThreadSource.isEmpty())   return;
  swingThreadSource.getReadWriteLock().writeLock().lock();
  try {
    listSelection.deselect(index0,index1);
  }
  finally {
    swingThreadSource.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32638
Project: 32638
Buggy source:
/** 
 * This property is true if upcoming changes to the value  of the model should be considered a single event.
 */
public void setValueIsAdjusting(boolean valueIsAdjusting){
  this.valueIsAdjusting=valueIsAdjusting;
  if (!valueIsAdjusting) {
    if (fullChangeStart != -1 && fullChangeFinish != -1) {
      fireSelectionChanged(fullChangeStart,fullChangeFinish);
      fullChangeStart=-1;
      fullChangeFinish=-1;
    }
  }
}

Fixed version (ground truth):
/** 
 * This property is true if upcoming changes to the value  of the model should be considered a single event.
 */
public void setValueIsAdjusting(boolean valueIsAdjusting){
  this.valueIsAdjusting=valueIsAdjusting;
  if (!valueIsAdjusting) {
    if (fullChangeStart != -1 && fullChangeFinish != -1) {
      swingThreadSource.getReadWriteLock().writeLock().lock();
      try {
        fireSelectionChanged(fullChangeStart,fullChangeFinish);
        fullChangeStart=-1;
        fullChangeFinish=-1;
      }
  finally {
        swingThreadSource.getReadWriteLock().writeLock().unlock();
      }
    }
  }
}
Program: 32639
Project: 32639
Buggy source:
/** 
 * Set the lead selection index.
 */
public void setLeadSelectionIndex(int leadSelectionIndex){
  if (!enabled)   return;
  listSelection.setLeadSelectionIndex(leadSelectionIndex);
}

Fixed version (ground truth):
/** 
 * Set the lead selection index.
 */
public void setLeadSelectionIndex(int leadSelectionIndex){
  if (!enabled)   return;
  swingThreadSource.getReadWriteLock().writeLock().lock();
  try {
    listSelection.setLeadSelectionIndex(leadSelectionIndex);
  }
  finally {
    swingThreadSource.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32640
Project: 32640
Buggy source:
/** 
 * Construct a multimap which maps the keys produced by the <code>keyFunction</code>, to groups of values from <code>source</code> that agree on their keys.
 * @param source the raw data which has not yet been grouped
 * @param keyFunction the function capable of producing the keys of this{@link Map}; the keys themselves are   {@link Comparable} and thusalso determine the content of the  {@link List}s which are the values of this   {@link Map}.
 */
public GroupingListMultiMap(EventList<V> source,FunctionList.Function<V,? extends Comparable<K>> keyFunction){
  this.keyFunction=keyFunction;
  this.groupingList=new GroupingList<V>(source,new FunctionComparator(keyFunction));
  this.valueList=new FunctionList<List<V>,List<V>>(this.groupingList,new ValueListFunction());
  this.valueList.addListEventListener(this);
  this.keyList=new BasicEventList<Comparable<K>>(this.groupingList.size());
  this.delegate=new HashMap<Comparable<K>,List<V>>(this.groupingList.size());
  for (Iterator<List<V>> i=this.groupingList.iterator(); i.hasNext(); ) {
    final List<V> value=i.next();
    final Comparable key=key(value);
    this.keyList.add(key);
    this.delegate.put(key,value);
  }
}

Fixed version (ground truth):
/** 
 * Construct a multimap which maps the keys produced by the <code>keyFunction</code>, to groups of values from <code>source</code> that agree on their keys.
 * @param source the raw data which has not yet been grouped
 * @param keyFunction the function capable of producing the keys of this{@link Map}; the keys themselves are   {@link Comparable} and thusalso determine the content of the  {@link List}s which are the values of this   {@link Map}.
 */
public GroupingListMultiMap(EventList<V> source,FunctionList.Function<V,? extends Comparable<K>> keyFunction){
  this.keyFunction=keyFunction;
  this.groupingList=new GroupingList<V>(source,new FunctionComparator(keyFunction));
  this.valueList=new FunctionList<List<V>,List<V>>(this.groupingList,new ValueListFunction());
  this.valueList.addListEventListener(this);
  this.keyList=new BasicEventList<Comparable<K>>(this.groupingList.size());
  this.delegate=new HashMap<Comparable<K>,List<V>>(this.groupingList.size());
  for (Iterator<List<V>> i=this.valueList.iterator(); i.hasNext(); ) {
    final List<V> value=i.next();
    final Comparable key=key(value);
    this.keyList.add(key);
    this.delegate.put(key,value);
  }
}
Program: 32641
Project: 32641
Buggy source:
/** 
 * {@inheritDoc} 
 */
public String toString(){
  return getKey() + "String_Node_Str" + getValue();
}

Fixed version (ground truth):
public String toString(){
  return delegate.toString();
}
Program: 32643
Project: 32643
Buggy source:
/** 
 * Toggle between filtering by the keystroke and not.
 * @param live <code>true</code> to filter by the keystroke or <code>false</code>to filter only when  {@link java.awt.event.KeyEvent#VK_ENTER Enter} is pressedwithin the  {@link JTextField}. Note that non-live filtering is only supported if <code>textComponent</code> is a   {@link JTextField}.
 */
public void setLive(boolean live){
  if (live == this.live)   return;
  deregisterListeners(this.live);
  this.live=live;
  registerListeners(this.live);
}

Fixed version (ground truth):
/** 
 * Toggle between filtering by the keystroke and not.
 * @param live <code>true</code> to filter by the keystroke or <code>false</code>to filter only when  {@link java.awt.event.KeyEvent#VK_ENTER Enter} is pressedwithin the  {@link JTextComponent}. Note that non-live filtering is only supported if <code>textComponent</code> is a   {@link JTextField}.
 */
public void setLive(boolean live){
  if (live == this.live)   return;
  deregisterListeners(this.live);
  this.live=live;
  registerListeners(this.live);
}
Program: 32644
Project: 32644
Buggy source:
/** 
 * Creates a TextMatcherEditor bound to the given <code>document</code> with the given <code>textFilterator</code>.
 * @param document the {@link Document} that is the source of text filtervalues
 * @param textFilterator an object capable of producing Strings from theobjects being filtered. If <code>textFilterator</code> is <code>null</code> then all filtered objects are expected to implement  {@link ca.odell.glazedlists.TextFilterable}.
 */
public TextComponentMatcherEditor(Document document,TextFilterator<E> textFilterator){
  super(textFilterator);
  this.document=document;
  registerListeners(true);
  refilter();
}

Fixed version (ground truth):
/** 
 * This private constructor implements the actual construction work and thus ensures that all public constructors agree on the construction logic.
 */
private TextComponentMatcherEditor(JTextComponent textComponent,Document document,TextFilterator<E> textFilterator,boolean live){
  super(textFilterator);
  this.textComponent=textComponent;
  this.document=document;
  this.live=live;
  registerListeners(live);
  refilter();
}
Program: 32645
Project: 32645
Buggy source:
/** 
 * Test that this thing works with dispose.
 */
public void guiTestDispose(){
  TextComponentMatcherEditor textMatcherEditor=null;
  eventCounter.assertNoEvents(0);
  boolean[] liveOptions={true,false};
  for (int b=0; b < liveOptions.length; b++) {
    JTextField textField=new JTextField();
    textMatcherEditor=new TextComponentMatcherEditor(textField,GlazedLists.toStringTextFilterator(),liveOptions[b]);
    textField.setText("String_Node_Str");
    textField.postActionEvent();
    assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
    assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
    textMatcherEditor.dispose();
    textField.setText("String_Node_Str");
    textField.postActionEvent();
    assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
    assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Test that this thing works with dispose.
 */
public void guiTestDispose(){
  TextComponentMatcherEditor<String> textMatcherEditor=null;
  eventCounter.assertNoEvents(0);
  boolean[] liveOptions={true,false};
  for (int b=0; b < liveOptions.length; b++) {
    JTextField textField=new JTextField();
    textMatcherEditor=new TextComponentMatcherEditor<String>(textField,GlazedLists.toStringTextFilterator(),liveOptions[b]);
    textField.setText("String_Node_Str");
    textField.postActionEvent();
    assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
    assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
    textMatcherEditor.dispose();
    textField.setText("String_Node_Str");
    textField.postActionEvent();
    assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
    assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  }
}
Program: 32646
Project: 32646
Buggy source:
/** 
 * Test that this thing works, even if our document is preloaded with data.
 */
public void guiTestPrePopulated(){
  TextComponentMatcherEditor textMatcherEditor=null;
  eventCounter.assertNoEvents(0);
  JTextField prePopulatedTextField=new JTextField();
  prePopulatedTextField.setText("String_Node_Str");
  textMatcherEditor=new TextComponentMatcherEditor(prePopulatedTextField,GlazedLists.toStringTextFilterator(),true);
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textMatcherEditor=new TextComponentMatcherEditor(prePopulatedTextField.getDocument(),GlazedLists.toStringTextFilterator());
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Test that this thing works, even if our document is preloaded with data.
 */
public void guiTestPrePopulated(){
  TextComponentMatcherEditor<String> textMatcherEditor=null;
  eventCounter.assertNoEvents(0);
  JTextField prePopulatedTextField=new JTextField();
  prePopulatedTextField.setText("String_Node_Str");
  textMatcherEditor=new TextComponentMatcherEditor<String>(prePopulatedTextField,GlazedLists.toStringTextFilterator(),true);
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textMatcherEditor=new TextComponentMatcherEditor<String>(prePopulatedTextField.getDocument(),GlazedLists.toStringTextFilterator());
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
}
Program: 32647
Project: 32647
Buggy source:
/** 
 * Test that this thing works when live is turned off.
 */
public void guiTestNonLive(){
  TextComponentMatcherEditor textMatcherEditor=null;
  eventCounter.assertNoEvents(0);
  JTextField textField=new JTextField();
  textMatcherEditor=new TextComponentMatcherEditor(textField,GlazedLists.toStringTextFilterator(),false);
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField.setText("String_Node_Str");
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField.postActionEvent();
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Test that this thing works when live is turned off.
 */
public void guiTestNonLive(){
  TextComponentMatcherEditor<String> textMatcherEditor=null;
  eventCounter.assertNoEvents(0);
  JTextField textField=new JTextField();
  textMatcherEditor=new TextComponentMatcherEditor<String>(textField,GlazedLists.toStringTextFilterator(),false);
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField.setText("String_Node_Str");
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField.postActionEvent();
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
}
Program: 32648
Project: 32648
Buggy source:
/** 
 * Test that this thing works when the document is changed.
 */
public void guiTestChangeDocument(){
  TextComponentMatcherEditor textMatcherEditor=null;
  eventCounter.assertNoEvents(0);
  JTextField textField=new JTextField();
  textMatcherEditor=new TextComponentMatcherEditor(textField,GlazedLists.toStringTextFilterator(),true);
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField.setText("String_Node_Str");
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField=new JTextField();
  textMatcherEditor=new TextComponentMatcherEditor(textField.getDocument(),GlazedLists.toStringTextFilterator());
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField.setText("String_Node_Str");
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Test that this thing works when the document is changed.
 */
public void guiTestChangeDocument(){
  TextComponentMatcherEditor<String> textMatcherEditor=null;
  eventCounter.assertNoEvents(0);
  JTextField textField=new JTextField();
  textMatcherEditor=new TextComponentMatcherEditor<String>(textField,GlazedLists.toStringTextFilterator(),true);
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField.setText("String_Node_Str");
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField=new JTextField();
  textMatcherEditor=new TextComponentMatcherEditor<String>(textField.getDocument(),GlazedLists.toStringTextFilterator());
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  textField.setText("String_Node_Str");
  assertFalse(textMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertTrue(textMatcherEditor.getMatcher().matches("String_Node_Str"));
}
Program: 32649
Project: 32649
Buggy source:
/** 
 * {@inheritDoc} 
 */
public List<V> put(Comparable<K> key,List<V> value){
  this.checkKeyValueAgreement(key,value);
  final List<V> removed=this.remove(key);
  this.groupingList.add(value);
  return removed;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public List<V> put(Comparable<K> key,List<V> value){
  this.checkKeyValueAgreement(key,value);
  final List<V> removed=(List<V>)this.remove(key);
  this.groupingList.add(value);
  return removed;
}
Program: 32650
Project: 32650
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void setSortKeys(List<? extends SortKey> sortKeys){
  if (sortKeys == sortKeysReadOnly)   return;
  this.sortKeys.clear();
  this.sortKeys.addAll(sortKeys);
  List<Comparator> comparators=new ArrayList<Comparator>(this.sortKeys.size());
  for (int k=0; k < this.sortKeys.size(); k++) {
    SortKey sortKey=(SortKey)this.sortKeys.get(k);
    if (sortKey.getSortOrder() == SortOrder.UNSORTED)     continue;
    Comparator comparator=getComparator(sortKey.getColumn());
    if (sortKey.getSortOrder() == SortOrder.DESCENDING)     comparator=GlazedLists.reverseComparator(comparator);
    comparators.add(comparator);
  }
  final Comparator comparator;
  if (comparators.isEmpty()) {
    comparator=null;
  }
 else   if (comparators.size() == 1) {
    comparator=comparators.get(0);
  }
 else {
    comparator=GlazedLists.chainComparators((List)comparators);
  }
  sortedList.getReadWriteLock().writeLock().lock();
  try {
    sortedList.setComparator(comparator);
  }
  finally {
    sortedList.getReadWriteLock().writeLock().unlock();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void setSortKeys(List<? extends SortKey> sortKeys){
  if (sortKeys == sortKeysReadOnly)   return;
  if (sortKeys == null)   sortKeys=Collections.emptyList();
  this.sortKeys.clear();
  this.sortKeys.addAll(sortKeys);
  List<Comparator> comparators=new ArrayList<Comparator>(this.sortKeys.size());
  for (int k=0; k < this.sortKeys.size(); k++) {
    SortKey sortKey=(SortKey)this.sortKeys.get(k);
    if (sortKey.getSortOrder() == SortOrder.UNSORTED)     continue;
    Comparator comparator=getComparator(sortKey.getColumn());
    if (sortKey.getSortOrder() == SortOrder.DESCENDING)     comparator=GlazedLists.reverseComparator(comparator);
    comparators.add(comparator);
  }
  final Comparator comparator;
  if (comparators.isEmpty()) {
    comparator=null;
  }
 else   if (comparators.size() == 1) {
    comparator=comparators.get(0);
  }
 else {
    comparator=GlazedLists.chainComparators((List)comparators);
  }
  sortedList.getReadWriteLock().writeLock().lock();
  try {
    sortedList.setComparator(comparator);
  }
  finally {
    sortedList.getReadWriteLock().writeLock().unlock();
  }
}
Program: 32651
Project: 32651
Buggy source:
public void run(){
  try {
    IssuezillaXMLParser.loadIssues(issues,new FileInputStream(project.getFileName()),project);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return;
  }
}

Fixed version (ground truth):
public void run(){
  try {
    IssuezillaXMLParser.loadIssues(GlazedLists.threadSafeList(issues),new FileInputStream(project.getFileName()),project);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return;
  }
}
Program: 32652
Project: 32652
Buggy source:
/** 
 * Starts a new atomic change to this list change queue.
 */
public synchronized void beginEvent(boolean allowNestedEvents){
  if (!this.allowNestedEvents) {
    throw new ConcurrentModificationException("String_Node_Str");
  }
  this.allowNestedEvents=allowNestedEvents;
  if (allowNestedEvents)   allowContradictingEvents=true;
  if (eventLevel == 0) {
    prepareEvent();
  }
  eventLevel++;
}

Fixed version (ground truth):
/** 
 * Starts a new atomic change to this list change queue.
 */
public synchronized void beginEvent(boolean allowNestedEvents){
  if (!this.allowNestedEvents) {
    throw new ConcurrentModificationException("String_Node_Str" + eventThread.getName());
  }
  this.allowNestedEvents=allowNestedEvents;
  if (allowNestedEvents)   allowContradictingEvents=true;
  if (eventLevel == 0) {
    this.eventThread=Thread.currentThread();
    prepareEvent();
  }
  eventLevel++;
}
Program: 32653
Project: 32653
Buggy source:
public void actionPerformed(ActionEvent e){
  target.add("String_Node_Str" + (dice.nextInt(100)));
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  target.add(3,"String_Node_Str" + (dice.nextInt(100)));
}
Program: 32654
Project: 32654
Buggy source:
public void start(){
  sillyObjects.add("String_Node_Str");
  sillyObjects.add("String_Node_Str");
  sillyObjects.add("String_Node_Str");
  JEventListPanel panel=new JEventListPanel(sillyObjects,new SillyObjectFormat());
  panel.setBorder(BorderFactory.createMatteBorder(5,5,5,5,Color.RED));
  JButton addButton=new JButton("String_Node_Str");
  addButton.addActionListener(new AddAction(sillyObjects));
  JFrame frame=new JFrame("String_Node_Str");
  frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  frame.getContentPane().setLayout(new BorderLayout());
  frame.getContentPane().add(panel,BorderLayout.NORTH);
  frame.getContentPane().add(addButton,BorderLayout.SOUTH);
  frame.pack();
  frame.setVisible(true);
}

Fixed version (ground truth):
public void start(){
  sillyObjects.add("String_Node_Str");
  sillyObjects.add("String_Node_Str");
  sillyObjects.add("String_Node_Str");
  JEventListPanel panel=new JEventListPanel(sillyObjects,new SillyObjectFormat());
  panel.setBorder(BorderFactory.createMatteBorder(5,5,5,5,Color.RED));
  panel.setElementColumns(1);
  JButton addButton=new JButton("String_Node_Str");
  addButton.addActionListener(new AddAction(sillyObjects));
  JFrame frame=new JFrame("String_Node_Str");
  frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  frame.getContentPane().setLayout(new BorderLayout());
  frame.getContentPane().add(panel,BorderLayout.NORTH);
  frame.getContentPane().add(addButton,BorderLayout.SOUTH);
  frame.pack();
  frame.setVisible(true);
}
Program: 32655
Project: 32655
Buggy source:
/** 
 * Handle a list element being inserted by adjusting the layout.
 */
public void insertIndex(int index){
  int logicalColumnCountBefore=logicalColumnCount();
  int logicalRowCountBefore=logicalRowCount();
  gridComponents.add(new CellComponents());
  fixCellCount(logicalRowCountBefore,logicalColumnCountBefore);
}

Fixed version (ground truth):
/** 
 * Handle a list element being inserted by adjusting the layout.
 */
public void insertIndex(int index){
  int logicalColumnCountBefore=logicalColumnCount();
  int logicalRowCountBefore=logicalRowCount();
  gridComponents.add(index,new CellComponents());
  fixCellCount(logicalRowCountBefore,logicalColumnCountBefore);
}
Program: 32656
Project: 32656
Buggy source:
/** 
 * Create a filter list that filters the specified source list, which must contain only Issue objects.
 */
public UsersMatcherEditor(EventList<Issue> source){
  allUsers=new UniqueList<String>(new CollectionList<Issue,String>(source,new IssueUserator()));
}

Fixed version (ground truth):
/** 
 * Create a filter list that filters the specified source list, which must contain only Issue objects.
 */
public UsersMatcherEditor(EventList<Issue> source){
  usersForIssues=new CollectionList<Issue,String>(source,new IssueUserator());
  allUsers=new UniqueList<String>(usersForIssues);
}
Program: 32657
Project: 32657
Buggy source:
public CreationDateMatcherEditor(){
  super(ISSUE_DATE_FILTERATOR);
}

Fixed version (ground truth):
public CreationDateMatcherEditor(EventList<Issue> issues){
  super(ISSUE_DATE_FILTERATOR);
}
Program: 32658
Project: 32658
Buggy source:
public void actionPerformed(ActionEvent actionEvent){
  filterComponents.remove(this);
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent actionEvent){
  if (actionEvent.getSource() == closeButton) {
    getFilterComponent().dispose();
    filterComponents.remove(this);
  }
 else   if (actionEvent.getSource() == newButton) {
    FilterComponent filterComponentCopy=createFilterComponent(getFilterComponent().getClass());
    int index=filterComponents.indexOf(CloseableFilterComponent.this);
    filterComponents.add(index + 1,new CloseableFilterComponent(filterComponentCopy));
  }
 else   if (actionEvent.getSource() == previousButton) {
    adjustFilterComponent(-1);
  }
 else   if (actionEvent.getSource() == nextButton) {
    adjustFilterComponent(1);
  }
 else {
    throw new IllegalStateException();
  }
}
Program: 32659
Project: 32659
Buggy source:
public MatcherEditor<E> getMatcherEditor(){
  return filterComponent.getMatcherEditor();
}

Fixed version (ground truth):
public MatcherEditor getMatcherEditor(){
  return filterComponent.getMatcherEditor();
}
Program: 32660
Project: 32660
Buggy source:
public CloseableFilterComponent(FilterComponent<E> filterComponent){
  this.filterComponent=filterComponent;
  this.closeButton=new IssuesBrowser.IconButton(IssuesBrowser.x_icons);
  this.closeButton.addActionListener(this);
  this.closeButton.setOpaque(false);
  this.headerLabel=new JLabel();
  this.headerLabel.setHorizontalAlignment(JLabel.CENTER);
  this.headerLabel.setFont(headerLabel.getFont().deriveFont(10.0f));
  this.headerLabel.setText(filterComponent.getName());
  this.headerLabel.setForeground(Color.WHITE);
  this.headerPanel=new IssuesBrowser.GradientPanel(IssuesBrowser.GLAZED_LISTS_MEDIUM_LIGHT_BROWN,IssuesBrowser.GLAZED_LISTS_MEDIUM_BROWN,true);
  this.headerPanel.setLayout(new BorderLayout());
  this.headerPanel.add(headerLabel,BorderLayout.CENTER);
  this.headerPanel.add(closeButton,BorderLayout.EAST);
}

Fixed version (ground truth):
public CloseableFilterComponent(FilterComponent filterComponent){
  this.closeButton=new IssuesBrowser.IconButton(IssuesBrowser.x_icons);
  this.closeButton.addActionListener(this);
  this.closeButton.setOpaque(false);
  this.previousButton=new IssuesBrowser.IconButton(IssuesBrowser.left_icons);
  this.previousButton.addActionListener(this);
  this.previousButton.setOpaque(false);
  this.nextButton=new IssuesBrowser.IconButton(IssuesBrowser.right_icons);
  this.nextButton.addActionListener(this);
  this.nextButton.setOpaque(false);
  this.newButton=new IssuesBrowser.IconButton(IssuesBrowser.plus_icons);
  this.newButton.addActionListener(this);
  this.newButton.setOpaque(false);
  this.headerLabel=new JLabel();
  this.headerLabel.setHorizontalAlignment(JLabel.CENTER);
  this.headerLabel.setFont(headerLabel.getFont().deriveFont(10.0f));
  this.headerLabel.setForeground(Color.WHITE);
  this.headerPanel=new IssuesBrowser.GradientPanel(IssuesBrowser.GLAZED_LISTS_MEDIUM_LIGHT_BROWN,IssuesBrowser.GLAZED_LISTS_MEDIUM_BROWN,true);
  this.headerPanel.setLayout(new GridBagLayout());
  this.headerPanel.add(newButton,new GridBagConstraints(0,0,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  this.headerPanel.add(previousButton,new GridBagConstraints(1,0,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  this.headerPanel.add(headerLabel,new GridBagConstraints(2,0,1,1,1.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  this.headerPanel.add(nextButton,new GridBagConstraints(3,0,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  this.headerPanel.add(closeButton,new GridBagConstraints(4,0,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  setFilterComponent(filterComponent);
}
Program: 32661
Project: 32661
Buggy source:
public MatcherEditor<E> evaluate(CloseableFilterComponent<E> sourceValue){
  return sourceValue.getMatcherEditor();
}

Fixed version (ground truth):
public MatcherEditor<E> evaluate(CloseableFilterComponent sourceValue){
  return sourceValue.getMatcherEditor();
}
Program: 32662
Project: 32662
Buggy source:
public FilterPanel(EventList<Issue> issues){
  this.filterComponents.add(new CloseableFilterComponent<Issue>(new StatusMatcherEditor(issues)));
  this.filterComponents.add(new CloseableFilterComponent<Issue>(new TextFilterComponent()));
  this.filterComponents.add(new CloseableFilterComponent<Issue>(new SwingUsersMatcherEditor(issues)));
  this.filterComponents.add(new CloseableFilterComponent<Issue>(new PriorityMatcherEditor()));
  this.filterComponents.add(new CloseableFilterComponent<Issue>(new CreationDateMatcherEditor()));
  EventList<MatcherEditor<Issue>> matcherEditors=new FunctionList<CloseableFilterComponent<Issue>,MatcherEditor<Issue>>(filterComponents,new CloseableFilterComponentToMatcherEditor<Issue>());
  this.matcherEditor=new CompositeMatcherEditor<Issue>(matcherEditors);
  this.filtersPanel=new JEventListPanel<CloseableFilterComponent<Issue>>(filterComponents,new CloseableFilterComponentPanelFormat<Issue>());
  this.filtersPanel.setBackground(IssuesBrowser.GLAZED_LISTS_LIGHT_BROWN);
  this.filtersScrollPane=new JScrollPane(this.filtersPanel,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
}

Fixed version (ground truth):
public FilterPanel(EventList<Issue> issues){
  this.issues=issues;
  for (Iterator<Class> i=filterClasses.iterator(); i.hasNext(); ) {
    Class filterComponentClass=i.next();
    FilterComponent filterComponent=createFilterComponent(filterComponentClass);
    this.filterComponents.add(new CloseableFilterComponent(filterComponent));
    break;
  }
  EventList<MatcherEditor<Issue>> matcherEditors=new FunctionList<CloseableFilterComponent,MatcherEditor<Issue>>(filterComponents,new CloseableFilterComponentToMatcherEditor<Issue>());
  this.matcherEditor=new CompositeMatcherEditor<Issue>(matcherEditors);
  this.filtersPanel=new JEventListPanel<CloseableFilterComponent>(filterComponents,new CloseableFilterComponentPanelFormat<Issue>());
  this.filtersPanel.setBackground(IssuesBrowser.GLAZED_LISTS_LIGHT_BROWN);
  this.filtersScrollPane=new JScrollPane(this.filtersPanel,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
}
Program: 32663
Project: 32663
Buggy source:
private static ImageIcon[] loadIcons(String name){
  String[] iconStates=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  ImageIcon[] icons=new ImageIcon[3];
  for (int i=0; i < icons.length; i++) {
    for (int s=0; s < iconStates.length; s++) {
      String state=iconStates[s];
      icons[s]=loadIcon("String_Node_Str" + name + "String_Node_Str"+ state+ "String_Node_Str");
    }
  }
  return icons;
}

Fixed version (ground truth):
private static ImageIcon[] loadIcons(String name){
  ImageIcon icon=loadIcon("String_Node_Str" + name + "String_Node_Str");
  return new ImageIcon[]{icon,icon,icon};
}
Program: 32664
Project: 32664
Buggy source:
public PriorityMatcherEditor(){
  slider=new JSlider(new DefaultBoundedRangeModel(0,0,0,100));
  slider.addChangeListener(this);
  rangeMatcherEditor=new RangeMatcherEditor<Integer,Issue>((Filterator)GlazedLists.filterator(new String[]{"String_Node_Str"}));
  slider.setOpaque(false);
  slider.setSnapToTicks(true);
  slider.setPaintLabels(true);
  slider.setPaintTicks(true);
  slider.setMajorTickSpacing(25);
  slider.setForeground(Color.BLACK);
  final Hashtable<Integer,JLabel> prioritySliderLabels=new Hashtable<Integer,JLabel>();
  prioritySliderLabels.put(MIN_PRIORITY,new JLabel("String_Node_Str"));
  prioritySliderLabels.put(MAX_PRIORITY,new JLabel("String_Node_Str"));
  slider.setLabelTable(prioritySliderLabels);
}

Fixed version (ground truth):
public PriorityMatcherEditor(EventList<Issue> issues){
  slider=new JSlider(new DefaultBoundedRangeModel(0,0,0,100));
  slider.addChangeListener(this);
  rangeMatcherEditor=new RangeMatcherEditor<Integer,Issue>((Filterator)GlazedLists.filterator(new String[]{"String_Node_Str"}));
  slider.setOpaque(false);
  slider.setSnapToTicks(true);
  slider.setPaintLabels(true);
  slider.setPaintTicks(true);
  slider.setMajorTickSpacing(25);
  slider.setForeground(Color.BLACK);
  final Hashtable<Integer,JLabel> prioritySliderLabels=new Hashtable<Integer,JLabel>();
  prioritySliderLabels.put(MIN_PRIORITY,new JLabel("String_Node_Str"));
  prioritySliderLabels.put(MAX_PRIORITY,new JLabel("String_Node_Str"));
  slider.setLabelTable(prioritySliderLabels);
}
Program: 32665
Project: 32665
Buggy source:
public void listChanged(ListEvent<List<Issue>> listChanges){
  while (listChanges.next()) {
    final int type=listChanges.getType();
    final int index=listChanges.getIndex();
    final String status;
    final int count;
    if (type == ListEvent.INSERT) {
      List issuesOfThisStatus=(List)issuesByStatus.get(index);
      status=((Issue)issuesOfThisStatus.get(0)).getStatus();
      statuses.add(index,status);
      count=issuesOfThisStatus.size();
    }
 else     if (type == ListEvent.UPDATE) {
      List issuesOfThisStatus=(List)issuesByStatus.get(index);
      status=(String)statuses.get(index);
      count=issuesOfThisStatus.size();
    }
 else     if (type == ListEvent.DELETE) {
      status=statuses.remove(index);
      count=0;
    }
 else {
      throw new IllegalStateException();
    }
    final JCheckBox checkBox=statusCheckBoxes.get(status);
    checkBox.setText(checkboxFormat.format(new Object[]{checkBox.getName(),new Integer(count)}));
  }
}

Fixed version (ground truth):
public void listChanged(ListEvent<List<Issue>> listChanges){
  while (listChanges.next()) {
    final int type=listChanges.getType();
    final int index=listChanges.getIndex();
    final String status;
    final int count;
    if (type == ListEvent.INSERT) {
      List issuesOfThisStatus=(List)issuesByStatusSwingThread.get(index);
      status=((Issue)issuesOfThisStatus.get(0)).getStatus();
      statuses.add(index,status);
      count=issuesOfThisStatus.size();
    }
 else     if (type == ListEvent.UPDATE) {
      List issuesOfThisStatus=(List)issuesByStatusSwingThread.get(index);
      status=(String)statuses.get(index);
      count=issuesOfThisStatus.size();
    }
 else     if (type == ListEvent.DELETE) {
      status=statuses.remove(index);
      count=0;
    }
 else {
      throw new IllegalStateException();
    }
    final JCheckBox checkBox=statusCheckBoxes.get(status);
    checkBox.setText(checkboxFormat.format(new Object[]{checkBox.getName(),new Integer(count)}));
  }
}
Program: 32666
Project: 32666
Buggy source:
public StatusMatcherEditor(EventList<Issue> issues){
  this.issuesByStatus=GlazedListsSwing.swingThreadProxyList(new GroupingList<Issue>(issues,new IssueStatusComparator()));
  this.issuesByStatus.addListEventListener(this);
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.checkBoxPanel.setOpaque(false);
  for (Iterator<JCheckBox> iter=statusCheckBoxes.values().iterator(); iter.hasNext(); ) {
    JCheckBox checkBox=iter.next();
    checkBox.addActionListener(this);
    this.checkBoxPanel.add(checkBox);
  }
}

Fixed version (ground truth):
public StatusMatcherEditor(EventList<Issue> issues){
  issuesByStatus=new GroupingList<Issue>(issues,new IssueStatusComparator());
  this.issuesByStatusSwingThread=GlazedListsSwing.swingThreadProxyList(issuesByStatus);
  this.issuesByStatusSwingThread.addListEventListener(this);
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.statusCheckBoxes.put("String_Node_Str",buildCheckBox("String_Node_Str"));
  this.checkBoxPanel.setOpaque(false);
  for (Iterator<JCheckBox> iter=statusCheckBoxes.values().iterator(); iter.hasNext(); ) {
    JCheckBox checkBox=iter.next();
    checkBox.addActionListener(this);
    this.checkBoxPanel.add(checkBox);
  }
}
Program: 32667
Project: 32667
Buggy source:
/** 
 * Returns the number of values associated with the given <code>rowKey</code> between the given <code>start</code> and <code>end</code> values.
 */
public int getCount(R rowKey,C start,C end){
  final TreePair treePair=getTreePair(rowKey);
  if (treePair == null)   throw new UnknownKeyException("String_Node_Str" + rowKey);
  return new Integer(treePair.getCount(start,end));
}

Fixed version (ground truth):
/** 
 * Returns the number of values associated with the given <code>rowKey</code> between the given <code>start</code> and <code>end</code> values.
 */
public int getCount(R rowKey,C start,C end){
  final TreePair<C> treePair=getTreePair(rowKey);
  if (treePair == null)   throw new UnknownKeyException("String_Node_Str" + rowKey);
  return treePair.getCount(start,end);
}
Program: 32670
Project: 32670
Buggy source:
/** 
 * The list table is not editable. For an editable list table, use the WritableListTable instead.
 */
public void setValueAt(Object editedValue,int row,int column){
  if (tableFormat instanceof WritableTableFormat) {
    swingThreadSource.getReadWriteLock().writeLock().lock();
    try {
      final WritableTableFormat<E> writableTableFormat=(WritableTableFormat<E>)tableFormat;
      final E baseObject=swingThreadSource.get(row);
      final E updatedObject=writableTableFormat.setColumnValue(baseObject,editedValue,column);
      if (updatedObject != null) {
        final boolean baseObjectHasNotMoved=row < this.getRowCount() && swingThreadSource.get(row) == updatedObject;
        if (baseObjectHasNotMoved)         swingThreadSource.set(row,updatedObject);
      }
    }
  finally {
      swingThreadSource.getReadWriteLock().writeLock().unlock();
    }
  }
 else {
    throw new UnsupportedOperationException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * The list table is not editable. For an editable list table, use the WritableListTable instead.
 */
public void setValueAt(Object editedValue,int row,int column){
  if (tableFormat instanceof WritableTableFormat) {
    swingThreadSource.getReadWriteLock().writeLock().lock();
    try {
      final WritableTableFormat<E> writableTableFormat=(WritableTableFormat<E>)tableFormat;
      final E baseObject=swingThreadSource.get(row);
      final E updatedObject=writableTableFormat.setColumnValue(baseObject,editedValue,column);
      if (updatedObject != null) {
        final boolean baseObjectHasNotMoved=row < this.getRowCount() && swingThreadSource.get(row) == baseObject;
        if (baseObjectHasNotMoved)         swingThreadSource.set(row,updatedObject);
      }
    }
  finally {
      swingThreadSource.getReadWriteLock().writeLock().unlock();
    }
  }
 else {
    throw new UnsupportedOperationException("String_Node_Str");
  }
}
Program: 32671
Project: 32671
Buggy source:
/** 
 * Creates a new ListEventAssembler that tracks changes for the specified list.
 */
public ListEventAssembler(EventList<E> sourceList,ListEventPublisher publisher){
  if ("String_Node_Str".equalsIgnoreCase(System.getProperty("String_Node_Str"))) {
    delegate=new ListDeltasAssembler<E>(sourceList,publisher);
  }
 else {
    delegate=new ListEventBlocksAssembler<E>(sourceList,publisher);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new ListEventAssembler that tracks changes for the specified list.
 */
public ListEventAssembler(EventList<E> sourceList,ListEventPublisher publisher){
  delegate=new ListEventBlocksAssembler<E>(sourceList,publisher);
}
Program: 32672
Project: 32672
Buggy source:
public IssueSeparatorTableCell(SeparatorList separatorList){
  this.separatorList=separatorList;
  this.nameLabel.setFont(nameLabel.getFont().deriveFont(10.0f));
  this.nameLabel.setBorder(BorderFactory.createEmptyBorder(0,5,0,5));
  this.countLabel.setFont(countLabel.getFont().deriveFont(10.0f));
  this.countLabel.setBorder(BorderFactory.createEmptyBorder(0,5,0,5));
  this.expandButton.setOpaque(false);
  this.expandButton.addActionListener(this);
  this.panel.setLayout(new BorderLayout());
  this.panel.add(expandButton,BorderLayout.WEST);
  this.panel.add(nameLabel,BorderLayout.CENTER);
  this.panel.add(countLabel,BorderLayout.EAST);
}

Fixed version (ground truth):
public IssueSeparatorTableCell(SeparatorList separatorList){
  this.separatorList=separatorList;
  this.nameLabel.setFont(nameLabel.getFont().deriveFont(10.0f));
  this.nameLabel.setBorder(BorderFactory.createEmptyBorder(0,5,0,5));
  this.countLabel.setFont(countLabel.getFont().deriveFont(10.0f));
  this.countLabel.setBorder(BorderFactory.createEmptyBorder(0,5,0,5));
  this.expandButton.addActionListener(this);
  this.panel.setBackground(GLAZED_LISTS_LIGHT_BROWN);
  this.panel.add(expandButton,BorderLayout.WEST);
  this.panel.add(nameLabel,BorderLayout.CENTER);
  this.panel.add(countLabel,BorderLayout.EAST);
}
Program: 32673
Project: 32673
Buggy source:
/** 
 * When started via a main method, this creates a standalone issues browser.
 */
public static void main(String[] args){
  IssuesBrowser browser=new IssuesBrowser();
  browser.setStartupArgs(args);
  SwingUtilities.invokeLater(browser);
}

Fixed version (ground truth):
/** 
 * When started via a main method, this creates a standalone issues browser.
 */
public static void main(final String[] args){
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      try {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
      }
 catch (      Exception e) {
      }
      final IssuesBrowser browser=new IssuesBrowser();
      browser.setStartupArgs(args);
      browser.run();
    }
  }
);
}
Program: 32674
Project: 32674
Buggy source:
public IconButton(Icon[] icons){
  this.icons=icons;
  super.setBorder(BorderFactory.createEmptyBorder());
  setState(UP);
  addMouseListener(this);
}

Fixed version (ground truth):
public IconButton(Icon[] icons){
  this.icons=icons;
  super.setBorder(null);
  setState(UP);
  setContentAreaFilled(false);
  addMouseListener(this);
}
Program: 32676
Project: 32676
Buggy source:
/** 
 * Print the tree by its contents
 */
public String toString(){
  if (root == null)   return "String_Node_Str";
  return root.toString();
}

Fixed version (ground truth):
/** 
 * Print the tree by its contents
 */
public String toString(){
  StringBuffer result=new StringBuffer();
  for (IndexedTreeIterator i=iterator(0); i.hasNext(); ) {
    if (result.length() > 0)     result.append("String_Node_Str");
    result.append(i.next());
  }
  return result.toString();
}