nus-yam/ex-repair huggingface dataset:
Program: 93096
Project: 93096
Buggy source:
/** 
 * Runs the process of finding the siblings.
 * @see org.eclipse.swtbot.swt.finder.results.ArrayResult#run()
 * @return The object found.
 */
public Widget[] run(){
  Widget[] siblings=new Widget[]{};
  if (isControl(w))   siblings=children(((Control)w).getParent());
 else   if (isTabItem(w))   siblings=((TabItem)w).getParent().getItems();
 else   if (isToolItem(w))   siblings=((ToolItem)w).getParent().getItems();
  return siblings;
}

Fixed version (ground truth):
/** 
 * Runs the process of finding the siblings.
 * @see org.eclipse.swtbot.swt.finder.results.ArrayResult#run()
 * @return The object found.
 */
public Widget[] run(){
  Widget[] siblings=new Widget[]{};
  if (isControl(w))   siblings=children(((Control)w).getParent());
 else   if (isTabItem(w))   siblings=((TabItem)w).getParent().getItems();
 else   if (isToolItem(w))   siblings=((ToolItem)w).getParent().getItems();
 else   if (isMenuItem(w))   siblings=((MenuItem)w).getParent().getItems();
  return siblings;
}
Program: 93097
Project: 93097
Buggy source:
/** 
 * Gets the menu matching the given name.
 * @param menuName the name of the menu item that is to be found
 * @return the first menu that matches the menuName
 * @throws WidgetNotFoundException if the widget is not found.
 */
public SWTBotMenu menu(final String menuName) throws WidgetNotFoundException {
  final Matcher<? extends Widget> matcher=withMnemonic(menuName);
  MenuItem menuItem=syncExec(new WidgetResult<MenuItem>(){
    public MenuItem run(){
      Menu bar=widget.getMenu();
      Matcher<MenuItem> withMnemonic=withMnemonic(menuName);
      List<MenuItem> menus=new MenuFinder().findMenus(bar,withMnemonic,true);
      if (!menus.isEmpty())       return menus.get(0);
      return null;
    }
  }
);
  return new SWTBotMenu(menuItem,matcher);
}

Fixed version (ground truth):
/** 
 * Gets the menu item matching the given name.
 * @param menuName the name of the menu item that is to be found
 * @return the first menu that matches the menuName
 * @throws WidgetNotFoundException if the widget is not found.
 */
public SWTBotMenu menu(final String menuName) throws WidgetNotFoundException {
  final Matcher<? extends Widget> matcher=withMnemonic(menuName);
  MenuItem menuItem=syncExec(new WidgetResult<MenuItem>(){
    public MenuItem run(){
      Menu bar=widget.getMenu();
      Matcher<MenuItem> withMnemonic=withMnemonic(menuName);
      List<MenuItem> menus=new MenuFinder().findMenus(bar,withMnemonic,true);
      if (!menus.isEmpty())       return menus.get(0);
      return null;
    }
  }
);
  return new SWTBotMenu(menuItem,matcher);
}
Program: 93098
Project: 93098
Buggy source:
/** 
 * Clicks on the menu item
 */
public SWTBotMenu click(){
  log.debug(MessageFormat.format("String_Node_Str",this));
  waitForEnabled();
  toggleSelection();
  notify(SWT.Selection);
  log.debug(MessageFormat.format("String_Node_Str",this));
  return this;
}

Fixed version (ground truth):
/** 
 * Clicks on the menu item
 */
public SWTBotMenu click(){
  log.debug(MessageFormat.format("String_Node_Str",this));
  waitForEnabled();
  if (SWTUtils.hasStyle(widget,SWT.CHECK)) {
    toggleCheckSelection();
  }
 else   if (SWTUtils.hasStyle(widget,SWT.RADIO)) {
    setRadioSelection();
  }
  notify(SWT.Selection);
  log.debug(MessageFormat.format("String_Node_Str",this));
  return this;
}
Program: 93099
Project: 93099
Buggy source:
/** 
 * @param bar
 * @param matcher
 * @param recursive
 * @return
 */
private List<MenuItem> findMenusInternal(final Menu bar,final Matcher<MenuItem> matcher,final boolean recursive){
  LinkedHashSet<MenuItem> result=new LinkedHashSet<MenuItem>();
  if (bar != null) {
    MenuItem[] items=bar.getItems();
    for (    MenuItem menuItem : items) {
      if (isSeparator(menuItem)) {
        continue;
      }
      if (matcher.matches(menuItem))       result.add(menuItem);
      if (recursive)       result.addAll(findMenusInternal(menuItem.getMenu(),matcher,recursive));
    }
  }
  return new ArrayList<MenuItem>(result);
}

Fixed version (ground truth):
/** 
 * @param bar
 * @param matcher
 * @param recursive
 * @return
 */
private List<MenuItem> findMenusInternal(final Menu bar,final Matcher<MenuItem> matcher,final boolean recursive){
  LinkedHashSet<MenuItem> result=new LinkedHashSet<MenuItem>();
  if (bar != null) {
    bar.notifyListeners(SWT.Show,new Event());
    MenuItem[] items=bar.getItems();
    for (    MenuItem menuItem : items) {
      if (isSeparator(menuItem)) {
        continue;
      }
      if (matcher.matches(menuItem))       result.add(menuItem);
      if (recursive)       result.addAll(findMenusInternal(menuItem.getMenu(),matcher,recursive));
    }
    if (result.isEmpty()) {
      bar.notifyListeners(SWT.Hide,new Event());
    }
  }
  return new ArrayList<MenuItem>(result);
}
Program: 93100
Project: 93100
Buggy source:
/** 
 * @param bar
 * @param matcher
 * @param recursive
 * @return
 */
private List<MenuItem> findMenusInternal(final Menu bar,final Matcher<MenuItem> matcher,final boolean recursive){
  LinkedHashSet<MenuItem> result=new LinkedHashSet<MenuItem>();
  if (bar != null) {
    bar.notifyListeners(SWT.Show,new Event());
    MenuItem[] items=bar.getItems();
    for (    MenuItem menuItem : items) {
      if (isSeparator(menuItem)) {
        continue;
      }
      if (matcher.matches(menuItem))       result.add(menuItem);
      if (recursive)       result.addAll(findMenusInternal(menuItem.getMenu(),matcher,recursive));
    }
    bar.notifyListeners(SWT.Hide,new Event());
  }
  return new ArrayList<MenuItem>(result);
}

Fixed version (ground truth):
/** 
 * @param bar
 * @param matcher
 * @param recursive
 * @return
 */
private List<MenuItem> findMenusInternal(final Menu bar,final Matcher<MenuItem> matcher,final boolean recursive){
  LinkedHashSet<MenuItem> result=new LinkedHashSet<MenuItem>();
  if (bar != null) {
    bar.notifyListeners(SWT.Show,new Event());
    MenuItem[] items=bar.getItems();
    for (    MenuItem menuItem : items) {
      if (isSeparator(menuItem)) {
        continue;
      }
      if (matcher.matches(menuItem))       result.add(menuItem);
      if (recursive)       result.addAll(findMenusInternal(menuItem.getMenu(),matcher,recursive));
    }
    if (result.isEmpty()) {
      bar.notifyListeners(SWT.Hide,new Event());
    }
  }
  return new ArrayList<MenuItem>(result);
}
Program: 93102
Project: 93102
Buggy source:
public void handleCodeGenerated(GenerationRule code){
  for (  String action : code.getActions())   generatedCode.setText(generatedCode.getText() + action + "String_Node_Str");
}

Fixed version (ground truth):
public void handleCodeGenerated(GenerationRule code){
  String lineSeparator=System.getProperty("String_Node_Str");
  StringBuilder builder=new StringBuilder(generatedCode.getText());
  for (  String action : code.getActions()) {
    builder.append(action);
    builder.append("String_Node_Str");
    builder.append(lineSeparator);
  }
  generatedCode.setText(builder.toString());
}
Program: 93103
Project: 93103
Buggy source:
public void waitUntilWidgetAppears(ICondition waitForWidget){
  try {
    waitUntil(waitForWidget);
  }
 catch (  TimeoutException e) {
    throw new WidgetNotFoundException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void waitUntilWidgetAppears(ICondition waitForWidget){
  try {
    waitUntil(waitForWidget);
  }
 catch (  TimeoutException e) {
    String message="String_Node_Str";
    if (waitForWidget.getFailureMessage() != null) {
      message=waitForWidget.getFailureMessage();
    }
    throw new WidgetNotFoundException(message,e);
  }
}
Program: 93104
Project: 93104
Buggy source:
private ArrayList<SWTBotMenu> toSWTBotMenuItems(Matcher<?> matcher,List<MenuItem> findMenus){
  ArrayList<SWTBotMenu> result=new ArrayList<SWTBotMenu>(findMenus.size());
  for (  MenuItem menuItem : findMenus) {
    result.add(new SWTBotMenu(menuItem,matcher));
  }
  if (result.isEmpty())   throw new WidgetNotFoundException("String_Node_Str");
  return result;
}

Fixed version (ground truth):
private ArrayList<SWTBotMenu> toSWTBotMenuItems(Matcher<?> matcher,List<MenuItem> findMenus){
  ArrayList<SWTBotMenu> result=new ArrayList<SWTBotMenu>(findMenus.size());
  for (  MenuItem menuItem : findMenus) {
    result.add(new SWTBotMenu(menuItem,matcher));
  }
  if (result.isEmpty())   throw new WidgetNotFoundException("String_Node_Str" + matcher);
  return result;
}
Program: 93105
Project: 93105
Buggy source:
public SWTBotMenu contextMenu(String label) throws WidgetNotFoundException {
  EventContextMenuFinder finder=new EventContextMenuFinder();
  try {
    finder.register();
    notify(SWT.MenuDetect);
    Matcher<MenuItem> withMnemonic=withMnemonic(label);
    List<MenuItem> menus=finder.findMenus(withMnemonic);
    if (menus.isEmpty())     throw new WidgetNotFoundException("String_Node_Str");
    return new SWTBotMenu(menus.get(0));
  }
  finally {
    finder.unregister();
  }
}

Fixed version (ground truth):
public SWTBotMenu contextMenu(String label) throws WidgetNotFoundException {
  EventContextMenuFinder finder=new EventContextMenuFinder();
  try {
    finder.register();
    notify(SWT.MenuDetect);
    Matcher<MenuItem> withMnemonic=withMnemonic(label);
    List<MenuItem> menus=finder.findMenus(withMnemonic);
    if (menus.isEmpty())     throw new WidgetNotFoundException("String_Node_Str" + label);
    return new SWTBotMenu(menus.get(0));
  }
  finally {
    finder.unregister();
  }
}
Program: 93106
Project: 93106
Buggy source:
private void createTextWidgets(){
  if (labels == null)   return;
  Composite composite=new Composite(shell,SWT.NONE);
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  composite.setLayout(layout);
  if (values == null)   values=new String[labels.length];
  for (int i=0; i < labels.length; i++) {
    Label label=new Label(composite,SWT.RIGHT);
    label.setText(labels[i]);
    Text text=new Text(composite,SWT.BORDER);
    GridData gridData=new GridData();
    gridData.widthHint=400;
    text.setLayoutData(gridData);
    if (values[i] != null)     text.setText(values[i]);
    text.setData("String_Node_Str",new Integer(i));
    addTextListener(text);
  }
}

Fixed version (ground truth):
private void createTextWidgets(){
  if (labels == null)   return;
  Composite composite=new Composite(shell,SWT.NONE);
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  composite.setLayout(layout);
  if (values == null)   values=new String[labels.length];
  for (int i=0; i < labels.length; i++) {
    Label label=new Label(composite,SWT.RIGHT);
    label.setText(labels[i]);
    Text text=new Text(composite,SWT.BORDER);
    GridData gridData=new GridData();
    gridData.widthHint=400;
    text.setLayoutData(gridData);
    if (values[i] != null)     text.setText(values[i]);
    text.setData("String_Node_Str",Integer.valueOf(i));
    addTextListener(text);
  }
}
Program: 93108
Project: 93108
Buggy source:
/** 
 * Sets the date.
 * @param toSet the date to set into the control.
 */
public void setDate(final Date toSet){
  log.debug(MessageFormat.format("String_Node_Str",this,toSet));
  waitForEnabled();
  syncExec(new VoidResult(){
    @SuppressWarnings("String_Node_Str") public void run(){
      widget.setYear(toSet.getYear() + 1900);
      widget.setMonth(toSet.getMonth());
      widget.setDay(toSet.getDate());
      widget.setHours(toSet.getHours());
      widget.setMinutes(toSet.getMinutes());
      widget.setSeconds(toSet.getSeconds());
    }
  }
);
  notify(SWT.Selection);
}

Fixed version (ground truth):
/** 
 * Sets the date.
 * @param toSet the date to set into the control.
 */
public void setDate(final Date toSet){
  log.debug(MessageFormat.format("String_Node_Str",this,toSet));
  waitForEnabled();
  syncExec(new VoidResult(){
    @SuppressWarnings("String_Node_Str") public void run(){
      widget.setDate(toSet.getYear() + 1900,toSet.getMonth(),toSet.getDate());
      widget.setHours(toSet.getHours());
      widget.setMinutes(toSet.getMinutes());
      widget.setSeconds(toSet.getSeconds());
    }
  }
);
  notify(SWT.Selection);
}
Program: 93109
Project: 93109
Buggy source:
@SuppressWarnings("String_Node_Str") public void run(){
  widget.setYear(toSet.getYear() + 1900);
  widget.setMonth(toSet.getMonth());
  widget.setDay(toSet.getDate());
  widget.setHours(toSet.getHours());
  widget.setMinutes(toSet.getMinutes());
  widget.setSeconds(toSet.getSeconds());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void run(){
  widget.setDate(toSet.getYear() + 1900,toSet.getMonth(),toSet.getDate());
  widget.setHours(toSet.getHours());
  widget.setMinutes(toSet.getMinutes());
  widget.setSeconds(toSet.getSeconds());
}
Program: 93110
Project: 93110
Buggy source:
private void productAndApplication(Composite parent){
  Group group=new Group(parent,SWT.NONE);
  GridData layoutData=new GridData(SWT.FILL,SWT.FILL,true,false);
  layoutData.horizontalSpan=2;
  group.setLayoutData(layoutData);
  group.setLayout(new GridLayout(2,false));
  group.setText("String_Node_Str");
  productIdButton=new Button(group,SWT.RADIO);
  productIdButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,false));
  productIdButton.setText("String_Node_Str");
  productIdButton.setSelection(true);
  productId=new Combo(group,SWT.DROP_DOWN);
  productId.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  productId.setItems(TargetPlatform.getProducts());
  productId.setText(TargetPlatform.getDefaultProduct());
  applicationIdButton=new Button(group,SWT.RADIO);
  applicationIdButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,false));
  applicationIdButton.setText("String_Node_Str");
  applicationId=new Combo(group,SWT.READ_ONLY | SWT.SINGLE);
  applicationId.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  applicationId.setItems(TargetPlatform.getApplications());
  applicationId.setText(TargetPlatform.getDefaultApplication());
  applicationId.setEnabled(false);
}

Fixed version (ground truth):
private void productAndApplication(Composite parent){
  Group group=new Group(parent,SWT.NONE);
  GridData layoutData=new GridData(SWT.FILL,SWT.FILL,true,false);
  layoutData.horizontalSpan=2;
  group.setLayoutData(layoutData);
  group.setLayout(new GridLayout(2,false));
  group.setText("String_Node_Str");
  productIdButton=new Button(group,SWT.RADIO);
  productIdButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,false));
  productIdButton.setText("String_Node_Str");
  productIdButton.setSelection(true);
  productId=new Combo(group,SWT.DROP_DOWN);
  productId.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  productId.setItems(TargetPlatform.getProducts());
  productId.setText(TargetPlatform.getDefaultProduct() == null ? "String_Node_Str" : TargetPlatform.getDefaultProduct());
  applicationIdButton=new Button(group,SWT.RADIO);
  applicationIdButton.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,false));
  applicationIdButton.setText("String_Node_Str");
  applicationId=new Combo(group,SWT.READ_ONLY | SWT.SINGLE);
  applicationId.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false));
  applicationId.setItems(TargetPlatform.getApplications());
  applicationId.setText(TargetPlatform.getDefaultApplication());
  applicationId.setEnabled(false);
}
Program: 93111
Project: 93111
Buggy source:
@Test public void getsToString() throws Exception {
  assertEquals("String_Node_Str",withLabel("String_Node_Str",new ControlFinder()).toString());
}

Fixed version (ground truth):
@Test public void getsToString() throws Exception {
  assertEquals("String_Node_Str",withLabel("String_Node_Str").toString());
}
Program: 93112
Project: 93112
Buggy source:
public void init(final Browser widget){
  UIThreadRunnable.syncExec(new VoidResult(){
    public void run(){
      widget.addAuthenticationListener(this);
    }
  }
);
}

Fixed version (ground truth):
public void init(final Browser widget){
  UIThreadRunnable.syncExec(new VoidResult(){
    public void run(){
      widget.addAuthenticationListener(BrowserAuthenticationListener.this);
    }
  }
);
}
Program: 93113
Project: 93113
Buggy source:
public void run(){
  widget.addAuthenticationListener(this);
}

Fixed version (ground truth):
public void run(){
  widget.addAuthenticationListener(BrowserAuthenticationListener.this);
}
Program: 93114
Project: 93114
Buggy source:
/** 
 * Matches a widget that has the specified Label.
 * @param labelText the label.
 * @param finder finder for locating widgets
 */
WithLabel(String labelText,Finder finder){
  mnemonicTextMatcher=new WithMnemonic<Widget>(labelText);
  this.finder=finder;
}

Fixed version (ground truth):
/** 
 * Matches a widget that has the specified Label.
 * @param labelText the label.
 * @param finder finder for locating widgets
 */
WithLabel(String labelText,Finder finder){
  Assert.isNotNull(labelText,"String_Node_Str");
  Assert.isNotNull(finder,"String_Node_Str");
  mnemonicTextMatcher=new WithMnemonic<Widget>(labelText);
  this.finder=finder;
}
Program: 93115
Project: 93115
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if ((obj == null) || (getClass() != obj.getClass()))   return false;
  Position other=(Position)obj;
  return (column == other.column) || (line == other.line);
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if ((obj == null) || (getClass() != obj.getClass()))   return false;
  Position other=(Position)obj;
  return (column == other.column) && (line == other.line);
}
Program: 93116
Project: 93116
Buggy source:
public void modifyText(ModifyEvent e){
  ProjectSettingValidator validator=new ProjectSettingValidator(pluginId.getText(),pluginVersion.getText(),pluginName.getText(),getProjects(),NewPluginProjectWizardPage.this);
  validator.validate();
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  ProjectSettingValidator validator=new ProjectSettingValidator(pluginId.getText(),pluginName.getText(),pluginVersion.getText(),getProjects(),NewPluginProjectWizardPage.this);
  validator.validate();
}
Program: 93117
Project: 93117
Buggy source:
private void hookListeners(){
  applicationIdButton.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      productId.setEnabled(false);
      applicationId.setEnabled(true);
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  productIdButton.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      applicationId.setEnabled(false);
      productId.setEnabled(true);
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  ModifyListener listener=new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      ProjectSettingValidator validator=new ProjectSettingValidator(pluginId.getText(),pluginVersion.getText(),pluginName.getText(),getProjects(),NewPluginProjectWizardPage.this);
      validator.validate();
    }
  }
;
  pluginId.addModifyListener(listener);
  pluginName.addModifyListener(listener);
  pluginVersion.addModifyListener(listener);
  pluginProvider.addModifyListener(listener);
}

Fixed version (ground truth):
private void hookListeners(){
  applicationIdButton.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      productId.setEnabled(false);
      applicationId.setEnabled(true);
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  productIdButton.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      applicationId.setEnabled(false);
      productId.setEnabled(true);
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  ModifyListener listener=new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      ProjectSettingValidator validator=new ProjectSettingValidator(pluginId.getText(),pluginName.getText(),pluginVersion.getText(),getProjects(),NewPluginProjectWizardPage.this);
      validator.validate();
    }
  }
;
  pluginId.addModifyListener(listener);
  pluginName.addModifyListener(listener);
  pluginVersion.addModifyListener(listener);
  pluginProvider.addModifyListener(listener);
}
Program: 93118
Project: 93118
Buggy source:
public void pressKeys(KeyStroke... keys){
  for (  KeyStroke key : keys) {
    assertKey(key);
    pressKey(key);
  }
}

Fixed version (ground truth):
public void pressKeys(KeyStroke... keys){
  assertKeys(keys);
  for (  KeyStroke key : keys) {
    pressKey(key);
  }
}
Program: 93119
Project: 93119
Buggy source:
public void releaseKeys(KeyStroke... keys){
  for (  KeyStroke key : keys) {
    assertKey(key);
    releaseKey(key);
  }
}

Fixed version (ground truth):
public void releaseKeys(KeyStroke... keys){
  assertKeys(keys);
  for (  KeyStroke key : keys) {
    assertKey(key);
    releaseKey(key);
  }
}
Program: 93120
Project: 93120
Buggy source:
/** 
 * Checks if the widget has the given style.
 * @param w the widget.
 * @param style the style.
 * @return <code>true</code> if the widget has the specified style bit set. Otherwise <code>false</code>.
 */
public static boolean hasStyle(final Widget w,final int style){
  if ((w == null) || w.isDisposed())   return false;
  return UIThreadRunnable.syncExec(w.getDisplay(),new BoolResult(){
    public Boolean run(){
      return (w.getStyle() & style) != 0;
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Checks if the widget has the given style.
 * @param w the widget.
 * @param style the style.
 * @return <code>true</code> if the widget has the specified style bit set. Otherwise <code>false</code>.
 */
public static boolean hasStyle(final Widget w,final int style){
  if ((w == null) || w.isDisposed())   return false;
  if (style == SWT.NONE)   return true;
  return UIThreadRunnable.syncExec(w.getDisplay(),new BoolResult(){
    public Boolean run(){
      return (w.getStyle() & style) != 0;
    }
  }
);
}
Program: 93121
Project: 93121
Buggy source:
/** 
 * Add the specified listener as the display filter for the specified event type. <p> This is a convinience method to add filters, so that clients do not have to remove them explicitly. </p>
 * @see #unregisterAllListeners()
 * @param eventType the event type
 * @param listener the listener
 */
protected void registerListener(final int eventType,final Listener listener){
  UIThreadRunnable.syncExec(display,new VoidResult(){
    public void run(){
      display.addFilter(eventType,listener);
      registeredListeners.add(new ListenerSet(eventType,listener));
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Add the specified listener as the display filter for the specified event type. <p> This is a convinience method to add filters, so that clients do not have to remove them explicitly. </p>
 * @see #unregisterAllListeners()
 * @param eventType the event type
 * @param listener the listener
 */
protected void registerListener(final int eventType,final Listener listener){
  UIThreadRunnable.syncExec(display,new VoidResult(){
    public void run(){
      display.addFilter(eventType,listener);
    }
  }
);
  registeredListeners.add(new ListenerSet(eventType,listener));
}
Program: 93122
Project: 93122
Buggy source:
/** 
 * Unregisters all listeners
 * @see #unregister(int,Listener)
 */
protected void unregisterAllListeners(){
  for (  ListenerSet set : registeredListeners) {
    unregister(set.eventType,set.listener);
  }
}

Fixed version (ground truth):
/** 
 * Unregisters all listeners
 * @see #unregister(int,Listener)
 */
protected void unregisterAllListeners(){
  for (  ListenerSet set : new ArrayList<ListenerSet>(registeredListeners)) {
    unregister(set.eventType,set.listener);
  }
}
Program: 93123
Project: 93123
Buggy source:
public void setUp() throws Exception {
  super.setUp();
  bot=new SWTBot();
  keyboard=new Keyboard(display);
  bot.shell("String_Node_Str").activate();
  bot.tabItem("String_Node_Str").activate();
  bot.checkBox("String_Node_Str").select();
  bot.checkBox("String_Node_Str").select();
  bot.checkBox("String_Node_Str").deselect();
  bot.checkBox("String_Node_Str").select();
  styledText=bot.styledTextInGroup("String_Node_Str");
  styledText.setText("String_Node_Str");
  bot.button("String_Node_Str").click();
  listeners=bot.textInGroup("String_Node_Str");
}

Fixed version (ground truth):
public void setUp() throws Exception {
  super.setUp();
  bot=new SWTBot();
  keyboard=new Keyboard();
  bot.shell("String_Node_Str").activate();
  bot.tabItem("String_Node_Str").activate();
  bot.checkBox("String_Node_Str").select();
  bot.checkBox("String_Node_Str").select();
  bot.checkBox("String_Node_Str").deselect();
  bot.checkBox("String_Node_Str").select();
  styledText=bot.styledTextInGroup("String_Node_Str");
  styledText.setText("String_Node_Str");
  bot.button("String_Node_Str").click();
  listeners=bot.textInGroup("String_Node_Str");
}
Program: 93124
Project: 93124
Buggy source:
private List<IEditorReference> findEditorsInternal(final Matcher<?> matcher){
  List<IEditorReference> result=new ArrayList<IEditorReference>();
  IWorkbenchPage[] pages=getWorkbenchPages();
  for (  IWorkbenchPage page : pages) {
    IEditorReference[] editorReferences=page.getEditorReferences();
    for (    IEditorReference editorReference : editorReferences) {
      if (matcher.matches(editorReference))       result.add(editorReference);
    }
  }
  return result;
}

Fixed version (ground truth):
private List<IEditorReference> findEditorsInternal(final Matcher<?> matcher){
  List<IEditorReference> result=new ArrayList<IEditorReference>();
  IWorkbenchPage[] pages=workbenchPages();
  for (  IWorkbenchPage page : pages) {
    IEditorReference[] editorReferences=page.getEditorReferences();
    for (    IEditorReference editorReference : editorReferences) {
      if (matcher.matches(editorReference))       result.add(editorReference);
    }
  }
  return result;
}
Program: 93125
Project: 93125
Buggy source:
private IPerspectiveDescriptor findActivePerspectiveInternal(){
  try {
    IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    return activePage.getPerspective();
  }
 catch (  RuntimeException e) {
    return null;
  }
}

Fixed version (ground truth):
private IPerspectiveDescriptor findActivePerspectiveInternal(){
  return activePageInternal().getPerspective();
}
Program: 93126
Project: 93126
Buggy source:
private List<IPerspectiveDescriptor> findPerspectivesInternal(final Matcher<?> matcher){
  IPerspectiveDescriptor[] perspectives=workbenchWindow.getWorkbench().getPerspectiveRegistry().getPerspectives();
  List<IPerspectiveDescriptor> matchingPerspectives=new ArrayList<IPerspectiveDescriptor>();
  for (  IPerspectiveDescriptor perspectiveDescriptor : perspectives)   if (matcher.matches(perspectiveDescriptor))   matchingPerspectives.add(perspectiveDescriptor);
  return matchingPerspectives;
}

Fixed version (ground truth):
private List<IPerspectiveDescriptor> findPerspectivesInternal(final Matcher<?> matcher){
  IPerspectiveDescriptor[] perspectives=activeWorkbenchWindow().getWorkbench().getPerspectiveRegistry().getPerspectives();
  List<IPerspectiveDescriptor> matchingPerspectives=new ArrayList<IPerspectiveDescriptor>();
  for (  IPerspectiveDescriptor perspectiveDescriptor : perspectives)   if (matcher.matches(perspectiveDescriptor))   matchingPerspectives.add(perspectiveDescriptor);
  return matchingPerspectives;
}
Program: 93127
Project: 93127
Buggy source:
private IEditorReference findActiveEditorInternal(){
  try {
    IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    IEditorPart activeEditor=activePage.getActiveEditor();
    return (IEditorReference)activePage.getReference(activeEditor);
  }
 catch (  RuntimeException e) {
    return null;
  }
}

Fixed version (ground truth):
private IEditorReference findActiveEditorInternal(){
  IWorkbenchPage page=activePageInternal();
  IEditorPart activeEditor=page.getActiveEditor();
  return (IEditorReference)page.getReference(activeEditor);
}
Program: 93128
Project: 93128
Buggy source:
private List<IViewReference> findViewsInternal(final Matcher<?> matcher){
  List<IViewReference> result=new ArrayList<IViewReference>();
  IWorkbenchPage[] pages=getWorkbenchPages();
  for (  IWorkbenchPage page : pages) {
    IViewReference[] viewReferences=page.getViewReferences();
    for (    IViewReference viewReference : viewReferences) {
      if (matcher.matches(viewReference))       result.add(viewReference);
    }
  }
  return result;
}

Fixed version (ground truth):
private List<IViewReference> findViewsInternal(final Matcher<?> matcher){
  List<IViewReference> result=new ArrayList<IViewReference>();
  IWorkbenchPage[] pages=workbenchPages();
  for (  IWorkbenchPage page : pages) {
    IViewReference[] viewReferences=page.getViewReferences();
    for (    IViewReference viewReference : viewReferences) {
      if (matcher.matches(viewReference))       result.add(viewReference);
    }
  }
  return result;
}
Program: 93129
Project: 93129
Buggy source:
private IViewReference findActiveViewInternal(){
  try {
    IWorkbenchPartReference partReference=workbenchWindow.getActivePage().getActivePartReference();
    if (partReference instanceof IViewReference)     return (IViewReference)partReference;
    return null;
  }
 catch (  RuntimeException e) {
    return null;
  }
}

Fixed version (ground truth):
private IViewReference findActiveViewInternal(){
  IWorkbenchPartReference partReference=activePageInternal().getActivePartReference();
  if (partReference instanceof IViewReference)   return (IViewReference)partReference;
  return null;
}
Program: 93130
Project: 93130
Buggy source:
@Test public void findsView() throws Exception {
  bot.view("String_Node_Str");
}

Fixed version (ground truth):
@Test public void findsView() throws Exception {
  bot.menu("String_Node_Str").menu("String_Node_Str").click();
  bot.view("String_Node_Str");
}
Program: 93131
Project: 93131
Buggy source:
@Test public void closesAView() throws Exception {
  SWTEclipseBot bot=new SWTEclipseBot();
  SWTBotView view=bot.view("String_Node_Str");
  view.close();
  try {
    bot.view("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  WidgetNotFoundException expected) {
  }
}

Fixed version (ground truth):
@Test public void closesAView() throws Exception {
  bot.menu("String_Node_Str").menu("String_Node_Str").click();
  SWTBotView view=bot.view("String_Node_Str");
  view.close();
  try {
    bot.view("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  WidgetNotFoundException expected) {
  }
}
Program: 93132
Project: 93132
Buggy source:
@Test public void getsViewTitle() throws Exception {
  assertEquals("String_Node_Str",bot.view("String_Node_Str").getTitle());
}

Fixed version (ground truth):
@Test public void getsViewTitle() throws Exception {
  bot.menu("String_Node_Str").menu("String_Node_Str").click();
  assertEquals("String_Node_Str",bot.view("String_Node_Str").getTitle());
}
Program: 93133
Project: 93133
Buggy source:
/** 
 * This activates the popup shell.
 * @return The shell.
 * @throws QuickFixNotFoundException Throw if a quick fix problem occurs.
 */
private SWTBotShell activatePopupShell() throws QuickFixNotFoundException {
  try {
    SWTBotShell shell=bot.shell("String_Node_Str",0);
    shell.activate();
    log.debug("String_Node_Str");
    return shell;
  }
 catch (  Exception e) {
    throw new QuickFixNotFoundException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * This activates the popup shell.
 * @return The shell.
 * @throws QuickFixNotFoundException Throw if a quick fix problem occurs.
 */
private SWTBotShell activatePopupShell() throws QuickFixNotFoundException {
  try {
    SWTBotShell shell=bot.shell("String_Node_Str",bot.activeShell().widget);
    shell.activate();
    log.debug("String_Node_Str");
    return shell;
  }
 catch (  Exception e) {
    throw new QuickFixNotFoundException("String_Node_Str",e);
  }
}
Program: 93134
Project: 93134
Buggy source:
/** 
 * @return a wrapper around a {@link Shell} with the specified index.
 * @param text the text on the shell.
 * @param index the index of the shell, in case there are multiple shells with the same text.
 */
public SWTBotShell shell(String text,int index){
  return new SWTBotShell(shells(text).get(index));
}

Fixed version (ground truth):
/** 
 * @return a wrapper around a {@link Shell} with the specified index.
 * @param text the text on the shell.
 * @param parent the parent under which a shell will be found.
 * @param index the index of the shell, in case there are multiple shells with the same text.
 */
public SWTBotShell shell(String text,Shell parent,int index){
  return new SWTBotShell(shells(text,parent).get(index));
}
Program: 93135
Project: 93135
Buggy source:
/** 
 * @param matcher the matcher.
 * @return a condition that waits until the matcher evaluates to true.
 * @since 2.0
 */
public static WaitForShell waitForShell(Matcher<?> matcher){
  return new WaitForShell(matcher);
}

Fixed version (ground truth):
/** 
 * @param matcher the matcher.
 * @param parent the parent under which a shell will be found or <code>null</code> to search all shells.
 * @return a condition that waits until the matcher evaluates to true.
 * @since 2.0
 */
public static WaitForShell waitForShell(Matcher<?> matcher,Shell parent){
  return new WaitForShellInParent(parent,matcher);
}
Program: 93136
Project: 93136
Buggy source:
public boolean test() throws Exception {
  Shell[] shells=bot.getFinder().getShells();
  this.matchingShells=new ArrayList<Shell>();
  for (  Shell shell : shells) {
    if (matcher.matches(shell)) {
      matchingShells.add(shell);
    }
  }
  return !matchingShells.isEmpty();
}

Fixed version (ground truth):
public boolean test() throws Exception {
  Shell[] shells=findShells();
  this.matchingShells=new ArrayList<Shell>();
  for (  Shell shell : shells) {
    if (matcher.matches(shell)) {
      matchingShells.add(shell);
    }
  }
  return !matchingShells.isEmpty();
}
Program: 93137
Project: 93137
Buggy source:
@Override public Result<ProjectCoordinate> trySuggest(DependencyInfo dependencyInfo){
  Optional<ProjectCoordinate> pc=projectCoordinateCache.getIfPresent(dependencyInfo);
  if (pc == null) {
    return Result.absent(REASON_NOT_IN_CACHE);
  }
  return Result.of(pc.get());
}

Fixed version (ground truth):
@Override public Result<ProjectCoordinate> trySuggest(DependencyInfo dependencyInfo){
  Optional<ProjectCoordinate> pc=projectCoordinateCache.getIfPresent(dependencyInfo);
  if (pc == null) {
    return Result.absent(REASON_NOT_IN_CACHE);
  }
 else   if (pc.isPresent()) {
    return Result.of(pc.get());
  }
 else {
    return Result.absent();
  }
}
Program: 93138
Project: 93138
Buggy source:
@Override public Result<ProjectCoordinate> trySuggest(DependencyInfo dependencyInfo){
  Optional<ProjectCoordinate> pc=projectCoordinateCache.getIfPresent(dependencyInfo);
  if (pc == null) {
    return Result.absent(REASON_NOT_IN_CACHE);
  }
  return Result.of(pc.get());
}

Fixed version (ground truth):
@Override public Result<ProjectCoordinate> trySuggest(DependencyInfo dependencyInfo){
  Optional<ProjectCoordinate> pc=projectCoordinateCache.getIfPresent(dependencyInfo);
  if (pc == null) {
    return Result.absent(REASON_NOT_IN_CACHE);
  }
 else   if (pc.isPresent()) {
    return Result.of(pc.get());
  }
 else {
    return Result.absent();
  }
}
Program: 93139
Project: 93139
Buggy source:
@Provides @Singleton public JavaElementSelectionService provideJavaSelectionProvider(final EventBus bus){
  final JavaElementSelectionService provider=new JavaElementSelectionService(bus);
  new UIJob("String_Node_Str"){
{
      schedule();
    }
    @Override public IStatus runInUIThread(    final IProgressMonitor monitor){
      final IWorkbenchWindow ww=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      final ISelectionService service=(ISelectionService)ww.getService(ISelectionService.class);
      service.addPostSelectionListener(provider);
      return Status.OK_STATUS;
    }
  }
;
  return provider;
}

Fixed version (ground truth):
@Provides @Singleton public JavaElementSelectionService provideJavaSelectionProvider(final EventBus bus){
  final JavaElementSelectionService provider=new JavaElementSelectionService(bus);
  new UIJob(Messages.JOB_NAME_SELECTION_LISTENER_REGISTRATION){
{
      schedule();
    }
    @Override public IStatus runInUIThread(    final IProgressMonitor monitor){
      final IWorkbenchWindow ww=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      final ISelectionService service=(ISelectionService)ww.getService(ISelectionService.class);
      service.addPostSelectionListener(provider);
      return Status.OK_STATUS;
    }
  }
;
  return provider;
}
Program: 93140
Project: 93140
Buggy source:
private void deregisterDependenciesForJavaProject(final IJavaProject javaProject){
  DependencyInfo dependencyInfoForProject=createDependencyInfoForProject(javaProject);
  workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
  jrePackageFragmentRoots.removeAll(dependencyInfoForProject);
}

Fixed version (ground truth):
private void deregisterDependenciesForJavaProject(final IJavaProject javaProject){
  DependencyInfo dependencyInfoForProject=getDependencyInfoForProject(javaProject);
  workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
  jrePackageFragmentRoots.removeAll(dependencyInfoForProject);
synchronized (projectDependencyInfos) {
    projectDependencyInfos.remove(javaProject);
  }
}
Program: 93141
Project: 93141
Buggy source:
private void registerDependencyForJAR(final JarPackageFragmentRoot root){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(root);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  DependencyInfo dependencyInfoForProject=createDependencyInfoForProject(javaProject);
  if (!isJREOfProjectIsKnown(dependencyInfoForProject)) {
    workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
    registerDependenciesForJavaProject(javaProject);
  }
  if (!isPartOfTheJRE(root)) {
    DependencyInfo dependencyInfo=createDependencyInfoForJar(root);
    workspaceDependenciesByProject.put(dependencyInfoForProject,dependencyInfo);
  }
}

Fixed version (ground truth):
private void registerDependencyForJAR(final JarPackageFragmentRoot root){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(root);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  DependencyInfo dependencyInfoForProject=getDependencyInfoForProject(javaProject);
  if (!isJREOfProjectIsKnown(dependencyInfoForProject)) {
    workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
    registerDependenciesForJavaProject(javaProject);
  }
  if (!isPartOfTheJRE(root)) {
    DependencyInfo dependencyInfo=createDependencyInfoForJar(root);
    workspaceDependenciesByProject.put(dependencyInfoForProject,dependencyInfo);
  }
}
Program: 93142
Project: 93142
Buggy source:
private Set<DependencyInfo> searchForAllDependenciesOfProject(final IJavaProject javaProject){
  Set<DependencyInfo> dependencies=Sets.newHashSet();
  Set<IPackageFragmentRoot> jreRoots=jrePackageFragmentRoots.get(createDependencyInfoForProject(javaProject));
  try {
    for (    final IPackageFragmentRoot packageFragmentRoot : javaProject.getAllPackageFragmentRoots()) {
      if (!jreRoots.contains(packageFragmentRoot) && packageFragmentRoot instanceof JarPackageFragmentRoot) {
        DependencyInfo dependencyInfo=createDependencyInfoForJar((JarPackageFragmentRoot)packageFragmentRoot);
        dependencies.add(dependencyInfo);
      }
 else       if (packageFragmentRoot.getKind() == IPackageFragmentRoot.K_SOURCE && packageFragmentRoot.getJavaProject() != null) {
        DependencyInfo dependencyInfo=Dependencies.createDependencyInfoForProject(packageFragmentRoot.getJavaProject());
        dependencies.add(dependencyInfo);
      }
    }
  }
 catch (  JavaModelException e) {
    LOG.error("String_Node_Str",javaProject,e);
  }
  return dependencies;
}

Fixed version (ground truth):
private Set<DependencyInfo> searchForAllDependenciesOfProject(final IJavaProject javaProject){
  Set<DependencyInfo> dependencies=Sets.newHashSet();
  Set<IPackageFragmentRoot> jreRoots=jrePackageFragmentRoots.get(getDependencyInfoForProject(javaProject));
  try {
    for (    final IPackageFragmentRoot packageFragmentRoot : javaProject.getAllPackageFragmentRoots()) {
      if (!jreRoots.contains(packageFragmentRoot) && packageFragmentRoot instanceof JarPackageFragmentRoot) {
        DependencyInfo dependencyInfo=createDependencyInfoForJar(packageFragmentRoot);
        dependencies.add(dependencyInfo);
      }
 else       if (packageFragmentRoot.getKind() == IPackageFragmentRoot.K_SOURCE && packageFragmentRoot.getJavaProject() != null) {
        DependencyInfo dependencyInfo=Dependencies.createDependencyInfoForProject(packageFragmentRoot.getJavaProject());
        dependencies.add(dependencyInfo);
      }
    }
  }
 catch (  JavaModelException e) {
    LOG.error("String_Node_Str",javaProject,e);
  }
  return dependencies;
}
Program: 93143
Project: 93143
Buggy source:
private void deregisterJREDependenciesForProject(final IJavaProject javaProject){
  DependencyInfo projectDependencyInfo=createDependencyInfoForProject(javaProject);
  for (  DependencyInfo dependencyInfo : workspaceDependenciesByProject.get(projectDependencyInfo)) {
    if (dependencyInfo.getType() == DependencyType.JRE) {
      workspaceDependenciesByProject.remove(projectDependencyInfo,dependencyInfo);
      return;
    }
  }
}

Fixed version (ground truth):
private void deregisterJREDependenciesForProject(final IJavaProject javaProject){
  DependencyInfo projectDependencyInfo=getDependencyInfoForProject(javaProject);
  for (  DependencyInfo dependencyInfo : workspaceDependenciesByProject.get(projectDependencyInfo)) {
    if (dependencyInfo.getType() == DependencyType.JRE) {
      workspaceDependenciesByProject.remove(projectDependencyInfo,dependencyInfo);
      return;
    }
  }
}
Program: 93144
Project: 93144
Buggy source:
private void deregisterDependencyForJAR(final JarPackageFragmentRoot pfr){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(pfr);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  if (isPartOfTheJRE(pfr)) {
    deregisterJREDependenciesForProject(javaProject);
  }
 else {
    DependencyInfo dependencyInfo=createDependencyInfoForJar(pfr);
    DependencyInfo projectDependencyInfo=createDependencyInfoForProject(javaProject);
    workspaceDependenciesByProject.remove(projectDependencyInfo,dependencyInfo);
    if (!workspaceDependenciesByProject.containsKey(projectDependencyInfo)) {
      jrePackageFragmentRoots.removeAll(projectDependencyInfo);
    }
  }
}

Fixed version (ground truth):
private void deregisterDependencyForJAR(final JarPackageFragmentRoot pfr){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(pfr);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  if (isPartOfTheJRE(pfr)) {
    deregisterJREDependenciesForProject(javaProject);
  }
 else {
    DependencyInfo dependencyInfo=createDependencyInfoForJar(pfr);
    DependencyInfo projectDependencyInfo=getDependencyInfoForProject(javaProject);
    workspaceDependenciesByProject.remove(projectDependencyInfo,dependencyInfo);
    if (!workspaceDependenciesByProject.containsKey(projectDependencyInfo)) {
      jrePackageFragmentRoots.removeAll(projectDependencyInfo);
    }
  }
}
Program: 93145
Project: 93145
Buggy source:
private void registerDependenciesForJavaProject(final IJavaProject javaProject){
  DependencyInfo dependencyInfoForProject=createDependencyInfoForProject(javaProject);
  Optional<DependencyInfo> optionalJREDependencyInfo=createDependencyInfoForJre(javaProject);
  if (optionalJREDependencyInfo.isPresent()) {
    workspaceDependenciesByProject.put(dependencyInfoForProject,optionalJREDependencyInfo.get());
    jrePackageFragmentRoots.putAll(dependencyInfoForProject,detectJREPackageFragementRoots(javaProject));
  }
  workspaceDependenciesByProject.putAll(dependencyInfoForProject,searchForAllDependenciesOfProject(javaProject));
}

Fixed version (ground truth):
private void registerDependenciesForJavaProject(final IJavaProject javaProject){
  DependencyInfo dependencyInfoForProject=getDependencyInfoForProject(javaProject);
  Optional<DependencyInfo> optionalJREDependencyInfo=createDependencyInfoForJre(javaProject);
  if (optionalJREDependencyInfo.isPresent()) {
    workspaceDependenciesByProject.put(dependencyInfoForProject,optionalJREDependencyInfo.get());
    jrePackageFragmentRoots.putAll(dependencyInfoForProject,detectJREPackageFragementRoots(javaProject));
  }
  workspaceDependenciesByProject.putAll(dependencyInfoForProject,searchForAllDependenciesOfProject(javaProject));
}
Program: 93146
Project: 93146
Buggy source:
@JavaSelectionSubscriber public void onTypeSelection(final IType type,final JavaElementSelectionEvent selection,final Composite parent) throws JavaModelException {
  render(type,parent);
}

Fixed version (ground truth):
@JavaSelectionSubscriber public void onTypeSelection(final IType type,final JavaElementSelectionEvent selection,final Composite parent) throws CoreException {
  render(type,parent);
}
Program: 93147
Project: 93147
Buggy source:
@JavaSelectionSubscriber public void onFieldSelection(final IField field,final JavaElementSelectionEvent selection,final Composite parent) throws JavaModelException {
  render(field,parent);
}

Fixed version (ground truth):
@JavaSelectionSubscriber public void onFieldSelection(final IField field,final JavaElementSelectionEvent selection,final Composite parent) throws CoreException {
  render(field,parent);
}
Program: 93148
Project: 93148
Buggy source:
@JavaSelectionSubscriber public void onMethodSelection(final IMethod method,final JavaElementSelectionEvent selection,final Composite parent) throws JavaModelException {
  render(method,parent);
}

Fixed version (ground truth):
@JavaSelectionSubscriber public void onMethodSelection(final IMethod method,final JavaElementSelectionEvent selection,final Composite parent) throws CoreException {
  render(method,parent);
}
Program: 93149
Project: 93149
Buggy source:
@JavaSelectionSubscriber public void onTypeSelection(final IType type,final JavaElementSelectionEvent selection,final Composite parent) throws JavaModelException {
  render(type,parent);
}

Fixed version (ground truth):
@JavaSelectionSubscriber public void onTypeSelection(final IType type,final JavaElementSelectionEvent selection,final Composite parent) throws CoreException {
  render(type,parent);
}
Program: 93150
Project: 93150
Buggy source:
@JavaSelectionSubscriber public void onFieldSelection(final IField field,final JavaElementSelectionEvent selection,final Composite parent) throws JavaModelException {
  render(field,parent);
}

Fixed version (ground truth):
@JavaSelectionSubscriber public void onFieldSelection(final IField field,final JavaElementSelectionEvent selection,final Composite parent) throws CoreException {
  render(field,parent);
}
Program: 93151
Project: 93151
Buggy source:
@JavaSelectionSubscriber public void onMethodSelection(final IMethod method,final JavaElementSelectionEvent selection,final Composite parent) throws JavaModelException {
  render(method,parent);
}

Fixed version (ground truth):
@JavaSelectionSubscriber public void onMethodSelection(final IMethod method,final JavaElementSelectionEvent selection,final Composite parent) throws CoreException {
  render(method,parent);
}
Program: 93152
Project: 93152
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  Browsers.openInExternalBrowser(e.text);
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  if (!isEmpty(url)) {
    Browsers.openInExternalBrowser(url);
  }
}