nus-yam/ex-repair huggingface dataset:
Program: 103284
Project: 103284
Buggy source:
public void contactListInitCompleted(MsnMessenger messenger){
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str");
  isInitialized=true;
  if (logger.isDebugEnabled())   printList();
  MsnContactList contactList=messenger.getContactList();
  MsnGroup[] groups=contactList.getGroups();
  for (int i=0; i < groups.length; i++) {
    MsnGroup item=groups[i];
    if (item.isDefaultGroup())     continue;
    ContactGroupMsnImpl group=findContactGroup(item.getGroupName());
    if (group == null) {
      ContactGroupMsnImpl newGroup=new ContactGroupMsnImpl(item,item.getContacts(),ServerStoredContactListMsnImpl.this,true);
      rootGroup.addSubGroup(newGroup);
      fireGroupEvent(newGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
    }
 else {
      group.setResolved(item);
      fireGroupEvent(group,ServerStoredGroupEvent.GROUP_RESOLVED_EVENT);
    }
  }
  MsnContact[] contacts=messenger.getContactList().getContactsInList(MsnList.FL);
  for (int i=0; i < contacts.length; i++) {
    MsnContact item=contacts[i];
    if (item.getBelongGroups().length == 0) {
      ContactMsnImpl contact=findContactById(item.getEmail().getEmailAddress());
      if (contact == null) {
        contact=new ContactMsnImpl(item,ServerStoredContactListMsnImpl.this,true,true);
        rootGroup.addContact(contact);
        fireContactAdded(rootGroup,contact);
      }
 else {
        contact.setResolved(item);
      }
    }
  }
  parentOperationSet.earlyStatusesDispatch();
  messenger.retreiveOfflineMessages();
}

Fixed version (ground truth):
public void contactListInitCompleted(MsnMessenger messenger){
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str");
  isInitialized=true;
  if (logger.isDebugEnabled())   printList();
  MsnContactList contactList=messenger.getContactList();
  MsnGroup[] groups=contactList.getGroups();
  for (int i=0; i < groups.length; i++) {
    MsnGroup item=groups[i];
    if (item.isDefaultGroup())     continue;
    ContactGroupMsnImpl group=findContactGroup(item.getGroupName());
    if (group == null) {
      ContactGroupMsnImpl newGroup=new ContactGroupMsnImpl(item,item.getContacts(),ServerStoredContactListMsnImpl.this,true,true);
      rootGroup.addSubGroup(newGroup);
      fireGroupEvent(newGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
    }
 else {
      group.setResolved(item);
      fireGroupEvent(group,ServerStoredGroupEvent.GROUP_RESOLVED_EVENT);
    }
  }
  MsnContact[] contacts=messenger.getContactList().getContactsInList(MsnList.FL);
  for (int i=0; i < contacts.length; i++) {
    MsnContact item=contacts[i];
    if (item.getBelongGroups().length == 0) {
      ContactMsnImpl contact=findContactById(item.getEmail().getEmailAddress());
      if (contact == null) {
        contact=new ContactMsnImpl(item,ServerStoredContactListMsnImpl.this,true,true);
        rootGroup.addContact(contact);
        fireContactAdded(rootGroup,contact);
      }
 else {
        contact.setResolved(item);
      }
    }
  }
  parentOperationSet.earlyStatusesDispatch();
  messenger.retreiveOfflineMessages();
}
Program: 103285
Project: 103285
Buggy source:
/** 
 * Creates a non persistent contact for the specified address. This would also create (if necessary) a group for volatile contacts that would not be added to the server stored contact list. This method would have no effect on the server stored contact list.
 * @param id the id of the contact to create
 * @param email the e-mail address of the contact to create
 * @param displayName the display name of the contact to create
 * @return the newly created volatile <tt>ContactImpl</tt>
 */
ContactMsnImpl createVolatileContact(String id,Email email,String displayName){
  VolatileContact volatileBuddy=new VolatileContact(id,email,displayName);
  ContactMsnImpl newVolatileContact=new ContactMsnImpl(volatileBuddy,this,false,false);
  ContactGroupMsnImpl theVolatileGroup=getNonPersistentGroup();
  if (theVolatileGroup == null) {
    MsnContact[] emptyBuddies=new MsnContact[]{};
    theVolatileGroup=new ContactGroupMsnImpl(new VolatileGroup(),emptyBuddies,this,false);
    theVolatileGroup.addContact(newVolatileContact);
    this.rootGroup.addSubGroup(theVolatileGroup);
    fireGroupEvent(theVolatileGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
  }
 else {
    theVolatileGroup.addContact(newVolatileContact);
    fireContactAdded(theVolatileGroup,newVolatileContact);
  }
  return newVolatileContact;
}

Fixed version (ground truth):
/** 
 * Creates a non persistent contact for the specified address. This would also create (if necessary) a group for volatile contacts that would not be added to the server stored contact list. This method would have no effect on the server stored contact list.
 * @param id the id of the contact to create
 * @param email the e-mail address of the contact to create
 * @param displayName the display name of the contact to create
 * @return the newly created volatile <tt>ContactImpl</tt>
 */
ContactMsnImpl createVolatileContact(String id,Email email,String displayName){
  VolatileContact volatileBuddy=new VolatileContact(id,email,displayName);
  ContactMsnImpl newVolatileContact=new ContactMsnImpl(volatileBuddy,this,false,false);
  ContactGroupMsnImpl theVolatileGroup=getNonPersistentGroup();
  if (theVolatileGroup == null) {
    MsnContact[] emptyBuddies=new MsnContact[]{};
    theVolatileGroup=new ContactGroupMsnImpl(new VolatileGroup(),emptyBuddies,this,false,false);
    theVolatileGroup.addContact(newVolatileContact);
    this.rootGroup.addSubGroup(theVolatileGroup);
    fireGroupEvent(theVolatileGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
  }
 else {
    theVolatileGroup.addContact(newVolatileContact);
    fireContactAdded(theVolatileGroup,newVolatileContact);
  }
  return newVolatileContact;
}
Program: 103286
Project: 103286
Buggy source:
/** 
 * Creates a non resolved contact group for the specified name. The newly created group would be added to the local contact list as any other group but when an event is received from the server concerning this group, then it will be reused and only its isResolved field would be updated instead of creating the whole group again. <p>
 * @param groupName the name of the group to create.
 * @return the newly created unresolved <tt>ContactGroupImpl</tt>
 */
ContactGroupMsnImpl createUnresolvedContactGroup(String groupName){
  MsnContact[] emptyBuddies=new MsnContact[]{};
  ContactGroupMsnImpl newUnresolvedGroup=new ContactGroupMsnImpl(new VolatileGroup(groupName),emptyBuddies,this,false);
  this.rootGroup.addSubGroup(newUnresolvedGroup);
  fireGroupEvent(newUnresolvedGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
  return newUnresolvedGroup;
}

Fixed version (ground truth):
/** 
 * Creates a non resolved contact group for the specified name. The newly created group would be added to the local contact list as any other group but when an event is received from the server concerning this group, then it will be reused and only its isResolved field would be updated instead of creating the whole group again. <p>
 * @param groupName the name of the group to create.
 * @return the newly created unresolved <tt>ContactGroupImpl</tt>
 */
ContactGroupMsnImpl createUnresolvedContactGroup(String groupName){
  MsnContact[] emptyBuddies=new MsnContact[]{};
  ContactGroupMsnImpl newUnresolvedGroup=new ContactGroupMsnImpl(new VolatileGroup(groupName),emptyBuddies,this,false,true);
  this.rootGroup.addSubGroup(newUnresolvedGroup);
  fireGroupEvent(newUnresolvedGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
  return newUnresolvedGroup;
}
Program: 103287
Project: 103287
Buggy source:
public void groupAddCompleted(MsnMessenger messenger,MsnGroup group){
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + group);
  ContactGroupMsnImpl newGroup=new ContactGroupMsnImpl(group,new MsnContact[]{},ServerStoredContactListMsnImpl.this,true);
  rootGroup.addSubGroup(newGroup);
  fireGroupEvent(newGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
}

Fixed version (ground truth):
public void groupAddCompleted(MsnMessenger messenger,MsnGroup group){
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + group);
  ContactGroupMsnImpl newGroup=new ContactGroupMsnImpl(group,new MsnContact[]{},ServerStoredContactListMsnImpl.this,true,true);
  rootGroup.addSubGroup(newGroup);
  fireGroupEvent(newGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
}
Program: 103288
Project: 103288
Buggy source:
/** 
 * Renames the specified group according to the specified new name..
 * @param groupToRename the group that we'd like removed.
 * @param newName the new name of the group
 */
public void renameGroup(ContactGroupMsnImpl groupToRename,String newName){
  printList();
  msnProvider.getMessenger().renameGroup(groupToRename.getSourceGroup().getGroupId(),newName);
}

Fixed version (ground truth):
/** 
 * Renames the specified group according to the specified new name..
 * @param groupToRename the group that we'd like removed.
 * @param newName the new name of the group
 */
public void renameGroup(ContactGroupMsnImpl groupToRename,String newName){
  msnProvider.getMessenger().renameGroup(groupToRename.getSourceGroup().getGroupId(),newName);
}
Program: 103289
Project: 103289
Buggy source:
/** 
 * Sends local candidate addresses from the local peer to the remote peer using the <tt>candidates</tt>   {@link SessionIQ}.
 * @param candidates the local candidate addresses to be sent from the localpeer to the remote peer using the <tt>candidates</tt> {@link SessionIQ}
 */
protected void sendCandidates(Iterable<GTalkCandidatePacketExtension> candidates){
  ProtocolProviderServiceJabberImpl protocolProvider=getProtocolProvider();
  SessionIQ candidatesIQ=new SessionIQ();
  candidatesIQ.setGTalkType(GTalkType.CANDIDATES);
  candidatesIQ.setFrom(protocolProvider.getOurJID());
  candidatesIQ.setInitiator(isInitiator() ? getAddress() : protocolProvider.getOurJID());
  candidatesIQ.setID(getSessionID());
  candidatesIQ.setTo(getAddress());
  candidatesIQ.setType(IQ.Type.SET);
  for (  GTalkCandidatePacketExtension candidate : candidates) {
    if (isAndroid(getAddress()) && NetworkUtils.isIPv6Address(candidate.getAddress()))     continue;
    candidatesIQ.addExtension(candidate);
  }
  protocolProvider.getConnection().sendPacket(candidatesIQ);
}

Fixed version (ground truth):
/** 
 * Sends local candidate addresses from the local peer to the remote peer using the <tt>candidates</tt>   {@link SessionIQ}.
 * @param candidates the local candidate addresses to be sent from the localpeer to the remote peer using the <tt>candidates</tt> {@link SessionIQ}
 */
protected void sendCandidates(Iterable<GTalkCandidatePacketExtension> candidates){
  ProtocolProviderServiceJabberImpl protocolProvider=getProtocolProvider();
  SessionIQ candidatesIQ=new SessionIQ();
  candidatesIQ.setGTalkType(GTalkType.CANDIDATES);
  candidatesIQ.setFrom(protocolProvider.getOurJID());
  candidatesIQ.setInitiator(isInitiator() ? getAddress() : protocolProvider.getOurJID());
  candidatesIQ.setID(getSessionID());
  candidatesIQ.setTo(getAddress());
  candidatesIQ.setType(IQ.Type.SET);
  for (  GTalkCandidatePacketExtension candidate : candidates) {
    if (isAndroidOrVtokOrTalkClient(getAddress()) && NetworkUtils.isIPv6Address(candidate.getAddress()))     continue;
    candidatesIQ.addExtension(candidate);
  }
  protocolProvider.getConnection().sendPacket(candidatesIQ);
}
Program: 103290
Project: 103290
Buggy source:
/** 
 * Resolve this contact against the given entry
 * @param entry the server stored entry
 */
void setResolved(RosterEntry entry){
  if (isResolved)   return;
  this.isResolved=true;
  this.jid=entry.getUser();
}

Fixed version (ground truth):
/** 
 * Resolve this contact against the given entry
 * @param entry the server stored entry
 */
void setResolved(RosterEntry entry){
  if (isResolved)   return;
  this.isResolved=true;
  this.isPersistent=true;
  this.jid=entry.getUser();
}
Program: 103292
Project: 103292
Buggy source:
/** 
 * Receive a key press event.
 * @param keycode keycode received
 * @param modifiers modifiers received (ALT or CTRL + letter, ...)
 */
public void receiveKey(int keycode,int modifiers){
synchronized (mapActions) {
    for (    Map.Entry<GlobalShortcutListener,List<AWTKeyStroke>> entry : mapActions.entrySet()) {
      List<AWTKeyStroke> lst=entry.getValue();
      for (      AWTKeyStroke l : lst) {
        if (l.getKeyCode() == keycode && getModifiers(l) == modifiers) {
          GlobalShortcutEvent evt=new GlobalShortcutEvent(l);
          entry.getKey().shortcutReceived(evt);
          return;
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Receive a key press event.
 * @param keycode keycode received
 * @param modifiers modifiers received (ALT or CTRL + letter, ...)
 */
public synchronized void receiveKey(int keycode,int modifiers){
synchronized (mapActions) {
    for (    Map.Entry<GlobalShortcutListener,List<AWTKeyStroke>> entry : mapActions.entrySet()) {
      List<AWTKeyStroke> lst=entry.getValue();
      for (      AWTKeyStroke l : lst) {
        if (l.getKeyCode() == keycode && getModifiers(l) == modifiers) {
          GlobalShortcutEvent evt=new GlobalShortcutEvent(l);
          entry.getKey().shortcutReceived(evt);
          return;
        }
      }
    }
  }
}
Program: 103293
Project: 103293
Buggy source:
/** 
 * Callback when an shortcut is typed
 * @param evt <tt>GlobalShortcutEvent</tt>
 */
public void shortcutReceived(GlobalShortcutEvent evt){
  AWTKeyStroke keystroke=evt.getKeyStroke();
  GlobalKeybindingSet set=keybindingsService.getGlobalBindings();
  for (  Map.Entry<String,List<AWTKeyStroke>> entry : set.getBindings().entrySet()) {
    for (    AWTKeyStroke ks : entry.getValue()) {
      if (ks == null)       continue;
      if (entry.getKey().equals("String_Node_Str") && keystroke.getKeyCode() == ks.getKeyCode() && keystroke.getModifiers() == ks.getModifiers()) {
        ExportedWindow window=GlobalShortcutActivator.getUIService().getExportedWindow(ExportedWindow.MAIN_WINDOW);
        if (window == null)         return;
        if (!window.isVisible()) {
          window.bringToFront();
          window.setVisible(true);
          if (window instanceof Window) {
            ((Window)window).setAlwaysOnTop(true);
            ((Window)window).setAlwaysOnTop(false);
          }
        }
 else {
          window.setVisible(false);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Callback when an shortcut is typed
 * @param evt <tt>GlobalShortcutEvent</tt>
 */
public synchronized void shortcutReceived(GlobalShortcutEvent evt){
  AWTKeyStroke keystroke=evt.getKeyStroke();
  GlobalKeybindingSet set=keybindingsService.getGlobalBindings();
  if (keystroke == null)   return;
  try {
    for (    Map.Entry<String,List<AWTKeyStroke>> entry : set.getBindings().entrySet()) {
      for (      AWTKeyStroke ks : entry.getValue()) {
        if (ks == null)         continue;
        if (entry.getKey().equals("String_Node_Str") && keystroke.getKeyCode() == ks.getKeyCode() && keystroke.getModifiers() == ks.getModifiers()) {
          ExportedWindow window=GlobalShortcutActivator.getUIService().getExportedWindow(ExportedWindow.MAIN_WINDOW);
          if (window == null)           return;
          setVisible(window,window.isVisible());
        }
      }
    }
  }
 catch (  Throwable t) {
    if (t instanceof ThreadDeath)     throw (ThreadDeath)t;
    System.out.println("String_Node_Str" + t);
  }
}
Program: 103294
Project: 103294
Buggy source:
/** 
 * Adds the entry to our local contactlist.
 * @param rosterEntryID the entry id.
 * @return the newly created contact.
 */
private ContactJabberImpl addEntryToContactList(String rosterEntryID){
  RosterEntry entry=roster.getEntry(rosterEntryID);
  ContactJabberImpl contact=new ContactJabberImpl(entry,ServerStoredContactListJabberImpl.this,true,true);
  if (entry.getGroups() == null || entry.getGroups().size() == 0) {
    rootGroup.addContact(contact);
    fireContactAdded(rootGroup,contact);
    return contact;
  }
  for (  RosterGroup group : entry.getGroups()) {
    ContactGroupJabberImpl parentGroup=findContactGroup(group.getName());
    if (parentGroup != null) {
      parentGroup.addContact(contact);
      fireContactAdded(findContactGroup(contact),contact);
    }
 else {
      ContactGroupJabberImpl newGroup=new ContactGroupJabberImpl(group,group.getEntries().iterator(),ServerStoredContactListJabberImpl.this,true);
      rootGroup.addSubGroup(newGroup);
      fireGroupEvent(newGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
    }
    return contact;
  }
  return contact;
}

Fixed version (ground truth):
/** 
 * Adds the entry to our local contactlist. If contact exists and is persistent but not resolved, we resolve it and return it without adding new contact. If the contact exists and is not persistent, we remove it, to avoid duplicate contacts and add the new one. All entries must be displayable before we done anything with them.
 * @param rosterEntryID the entry id.
 * @return the newly created contact.
 */
private ContactJabberImpl addEntryToContactList(String rosterEntryID){
  RosterEntry entry=roster.getEntry(rosterEntryID);
  if (!isEntryDisplayable(entry))   return null;
  ContactJabberImpl contact=findContactById(entry.getUser());
  if (contact != null) {
    if (contact.isPersistent()) {
      contact.setResolved(entry);
      return contact;
    }
 else {
      ContactGroup oldParentGroup=contact.getParentContactGroup();
      if (oldParentGroup instanceof ContactGroupJabberImpl && !oldParentGroup.isPersistent()) {
        ((ContactGroupJabberImpl)oldParentGroup).removeContact(contact);
        fireContactRemoved(oldParentGroup,contact);
      }
    }
  }
  contact=new ContactJabberImpl(entry,ServerStoredContactListJabberImpl.this,true,true);
  if (entry.getGroups() == null || entry.getGroups().size() == 0) {
    rootGroup.addContact(contact);
    fireContactAdded(rootGroup,contact);
    return contact;
  }
  for (  RosterGroup group : entry.getGroups()) {
    ContactGroupJabberImpl parentGroup=findContactGroup(group.getName());
    if (parentGroup != null) {
      parentGroup.addContact(contact);
      fireContactAdded(findContactGroup(contact),contact);
    }
 else {
      ContactGroupJabberImpl newGroup=new ContactGroupJabberImpl(group,group.getEntries().iterator(),ServerStoredContactListJabberImpl.this,true);
      rootGroup.addSubGroup(newGroup);
      fireGroupEvent(newGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
    }
    return contact;
  }
  return contact;
}
Program: 103295
Project: 103295
Buggy source:
/** 
 * Received event when entry is added to the server stored list
 * @param addresses Collection
 */
public void entriesAdded(Collection<String> addresses){
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + addresses);
  for (  String id : addresses) {
    RosterEntry entry=roster.getEntry(id);
    if (!isEntryDisplayable(entry))     continue;
    ContactJabberImpl contact=findContactById(entry.getUser());
    if (contact != null) {
      if (contact.isPersistent()) {
        contact.setResolved(entry);
        continue;
      }
 else {
        ContactGroup oldParentGroup=contact.getParentContactGroup();
        if (oldParentGroup instanceof ContactGroupJabberImpl && !oldParentGroup.isPersistent()) {
          ((ContactGroupJabberImpl)oldParentGroup).removeContact(contact);
          fireContactRemoved(oldParentGroup,contact);
        }
      }
    }
    contact=addEntryToContactList(id);
  }
}

Fixed version (ground truth):
/** 
 * Received event when entry is added to the server stored list
 * @param addresses Collection
 */
public void entriesAdded(Collection<String> addresses){
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + addresses);
  for (  String id : addresses) {
    addEntryToContactList(id);
  }
}
Program: 103296
Project: 103296
Buggy source:
/** 
 * Event when an entry is updated. Something for the entry data or have been added to a new group or removed from one
 * @param addresses Collection
 */
public void entriesUpdated(Collection<String> addresses){
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + addresses);
  for (  String contactID : addresses) {
    RosterEntry entry=roster.getEntry(contactID);
    ContactJabberImpl contact=findContactById(contactID);
    if (contact != null && (contact instanceof VolatileContactJabberImpl)) {
      contact=null;
    }
    if (contact == null && isEntryDisplayable(entry)) {
      contact=addEntryToContactList(contactID);
    }
    for (    RosterGroup gr : entry.getGroups()) {
      if (findContactGroup(gr.getName()) == null) {
        ContactGroupJabberImpl group=findContactGroupByNameCopy(gr.getName());
        if (group != null) {
          group.setSourceGroup(gr);
          fireGroupEvent(group,ServerStoredGroupEvent.GROUP_RENAMED_EVENT);
        }
 else {
        }
      }
 else {
        ContactGroup contactGroup=contact.getParentContactGroup();
        if (!gr.getName().equals(contactGroup.getGroupName())) {
          if (contactGroup instanceof ContactGroupJabberImpl)           ((ContactGroupJabberImpl)contactGroup).removeContact(contact);
 else           if (contactGroup instanceof RootContactGroupJabberImpl)           ((RootContactGroupJabberImpl)contactGroup).removeContact(contact);
          ContactGroupJabberImpl newParentGroup=findContactGroup(gr.getName());
          newParentGroup.addContact(contact);
          fireContactMoved(contactGroup,newParentGroup,contact);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Event when an entry is updated. Something for the entry data or have been added to a new group or removed from one
 * @param addresses Collection
 */
public void entriesUpdated(Collection<String> addresses){
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + addresses);
  for (  String contactID : addresses) {
    RosterEntry entry=roster.getEntry(contactID);
    ContactJabberImpl contact=addEntryToContactList(contactID);
    for (    RosterGroup gr : entry.getGroups()) {
      if (findContactGroup(gr.getName()) == null) {
        ContactGroupJabberImpl group=findContactGroupByNameCopy(gr.getName());
        if (group != null) {
          group.setSourceGroup(gr);
          fireGroupEvent(group,ServerStoredGroupEvent.GROUP_RENAMED_EVENT);
        }
 else {
        }
      }
 else {
        ContactGroup contactGroup=contact.getParentContactGroup();
        if (!gr.getName().equals(contactGroup.getGroupName())) {
          if (contactGroup instanceof ContactGroupJabberImpl)           ((ContactGroupJabberImpl)contactGroup).removeContact(contact);
 else           if (contactGroup instanceof RootContactGroupJabberImpl)           ((RootContactGroupJabberImpl)contactGroup).removeContact(contact);
          ContactGroupJabberImpl newParentGroup=findContactGroup(gr.getName());
          newParentGroup.addContact(contact);
          fireContactMoved(contactGroup,newParentGroup,contact);
        }
      }
    }
  }
}
Program: 103297
Project: 103297
Buggy source:
/** 
 * Stop the service.
 */
public void stop(){
  Collection<List<AWTKeyStroke>> lst=mapActions.values();
  isRunning=false;
  for (  List<AWTKeyStroke> kss : lst) {
    for (    AWTKeyStroke e : kss) {
      unregisterShortcut(callShortcut,e);
      unregisterShortcut(uiShortcut,e);
    }
  }
  if (keyboardHook != null) {
    keyboardHook.setDelegate(null);
    keyboardHook.stop();
  }
}

Fixed version (ground truth):
/** 
 * Stop the service.
 */
public void stop(){
  isRunning=false;
  for (  Map.Entry<GlobalShortcutListener,List<AWTKeyStroke>> entry : mapActions.entrySet()) {
    GlobalShortcutListener l=entry.getKey();
    for (    AWTKeyStroke e : entry.getValue()) {
      unregisterShortcut(l,e);
    }
  }
  if (keyboardHook != null) {
    keyboardHook.setDelegate(null);
    keyboardHook.stop();
  }
}
Program: 103298
Project: 103298
Buggy source:
/** 
 * Reload global shortcuts.
 */
public synchronized void reloadGlobalShortcuts(){
  GlobalKeybindingSet set=GlobalShortcutActivator.getKeybindingsService().getGlobalBindings();
  for (  Map.Entry<String,List<AWTKeyStroke>> entry : set.getBindings().entrySet()) {
    for (    AWTKeyStroke e : entry.getValue()) {
      unregisterShortcut(callShortcut,e);
      unregisterShortcut(uiShortcut,e);
    }
  }
  for (  Map.Entry<String,List<AWTKeyStroke>> entry : set.getBindings().entrySet()) {
    if (entry.getKey().equals("String_Node_Str") || entry.getKey().equals("String_Node_Str")) {
      for (      AWTKeyStroke e : entry.getValue()) {
        registerShortcut(callShortcut,e);
      }
    }
 else     if (entry.getKey().equals("String_Node_Str")) {
      for (      AWTKeyStroke e : entry.getValue()) {
        registerShortcut(uiShortcut,e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Reload global shortcuts.
 */
public synchronized void reloadGlobalShortcuts(){
  GlobalKeybindingSet set=GlobalShortcutActivator.getKeybindingsService().getGlobalBindings();
  for (  Map.Entry<GlobalShortcutListener,List<AWTKeyStroke>> entry : mapActions.entrySet()) {
    GlobalShortcutListener l=entry.getKey();
    for (    AWTKeyStroke e : entry.getValue()) {
      unregisterShortcut(l,e);
    }
  }
  for (  Map.Entry<String,List<AWTKeyStroke>> entry : set.getBindings().entrySet()) {
    if (entry.getKey().equals("String_Node_Str") || entry.getKey().equals("String_Node_Str")) {
      for (      AWTKeyStroke e : entry.getValue()) {
        registerShortcut(callShortcut,e);
      }
    }
 else     if (entry.getKey().equals("String_Node_Str")) {
      for (      AWTKeyStroke e : entry.getValue()) {
        registerShortcut(uiShortcut,e);
      }
    }
  }
}
Program: 103299
Project: 103299
Buggy source:
/** 
 * Callback when an shortcut is typed
 * @param evt <tt>GlobalShortcutEvent</tt>
 */
public void shortcutReceived(GlobalShortcutEvent evt){
  AWTKeyStroke keystroke=evt.getKeyStroke();
  GlobalKeybindingSet set=keybindingsService.getGlobalBindings();
  for (  Map.Entry<String,List<AWTKeyStroke>> entry : set.getBindings().entrySet()) {
    for (    AWTKeyStroke ks : entry.getValue()) {
      if (entry.getKey().equals("String_Node_Str") && keystroke.getKeyCode() == ks.getKeyCode() && keystroke.getModifiers() == ks.getModifiers()) {
        ExportedWindow window=GlobalShortcutActivator.getUIService().getExportedWindow(ExportedWindow.MAIN_WINDOW);
        if (window == null)         return;
        window.bringToFront();
        window.setVisible(true);
        if (window instanceof Window) {
          ((Window)window).setAlwaysOnTop(true);
          ((Window)window).setAlwaysOnTop(false);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Callback when an shortcut is typed
 * @param evt <tt>GlobalShortcutEvent</tt>
 */
public void shortcutReceived(GlobalShortcutEvent evt){
  AWTKeyStroke keystroke=evt.getKeyStroke();
  GlobalKeybindingSet set=keybindingsService.getGlobalBindings();
  for (  Map.Entry<String,List<AWTKeyStroke>> entry : set.getBindings().entrySet()) {
    for (    AWTKeyStroke ks : entry.getValue()) {
      if (entry.getKey().equals("String_Node_Str") && keystroke.getKeyCode() == ks.getKeyCode() && keystroke.getModifiers() == ks.getModifiers()) {
        ExportedWindow window=GlobalShortcutActivator.getUIService().getExportedWindow(ExportedWindow.MAIN_WINDOW);
        if (window == null)         return;
        if (!window.isVisible()) {
          window.bringToFront();
          window.setVisible(true);
          if (window instanceof Window) {
            ((Window)window).setAlwaysOnTop(true);
            ((Window)window).setAlwaysOnTop(false);
          }
        }
 else {
          window.setVisible(false);
        }
      }
    }
  }
}
Program: 103300
Project: 103300
Buggy source:
@Override public void keyPressed(KeyEvent event){
  this.buffer=event;
}

Fixed version (ground truth):
@Override public void keyPressed(KeyEvent event){
  if (currentRow == -1 || currentColumn == -1)   return;
  if (event.getKeyCode() == KeyEvent.VK_BACK_SPACE) {
    GlobalShortcutEntry en=GlobalShortcutConfigForm.this.tableModel.getEntryAt(currentRow);
    List<AWTKeyStroke> kss=new ArrayList<AWTKeyStroke>();
    if (currentColumn == 1) {
      kss.add(null);
      kss.add(en.getShortcut2());
    }
 else     if (currentColumn == 2) {
      kss.add(en.getShortcut());
      kss.add(null);
    }
    currentRow=-1;
    currentColumn=-1;
    en.setShortcuts(kss);
    en.setEditShortcut1(false);
    en.setEditShortcut2(false);
    GlobalShortcutConfigForm.this.saveConfig();
    GlobalShortcutConfigForm.this.refresh();
  }
 else {
    this.buffer=event;
  }
}
Program: 103301
Project: 103301
Buggy source:
/** 
 * Required by ListSelectionListener.
 * @param e event triggered
 */
public void valueChanged(ListSelectionEvent e){
  if (shortcutsTable.getSelectedRow() == -1) {
    currentRow=-1;
    currentColumn=-1;
  }
}

Fixed version (ground truth):
/** 
 * Required by ListSelectionListener.
 * @param e event triggered
 */
public void valueChanged(ListSelectionEvent e){
  if (shortcutsTable.getSelectedRow() == -1) {
  }
}
Program: 103302
Project: 103302
Buggy source:
@Override public void mouseClicked(MouseEvent e){
  if (e.getClickCount() >= 1) {
    int row=GlobalShortcutConfigForm.this.shortcutsTable.getSelectedRow();
    int column=GlobalShortcutConfigForm.this.shortcutsTable.getSelectedColumn();
    if (row >= 0 && column >= 1) {
      currentRow=row;
      currentColumn=column;
    }
  }
}

Fixed version (ground truth):
@Override public void mouseClicked(MouseEvent e){
  if (e.getClickCount() >= 1) {
    int row=GlobalShortcutConfigForm.this.shortcutsTable.getSelectedRow();
    int column=GlobalShortcutConfigForm.this.shortcutsTable.getSelectedColumn();
    if (currentRow != -1 && currentColumn != -1)     return;
    if (row >= 0 && column >= 1) {
      currentRow=row;
      currentColumn=column;
      if (column == 1)       GlobalShortcutConfigForm.this.tableModel.getEntryAt(row).setEditShortcut1(true);
 else       if (column == 2)       GlobalShortcutConfigForm.this.tableModel.getEntryAt(row).setEditShortcut2(true);
      refresh();
      shortcutsTable.setRowSelectionInterval(row,row);
    }
  }
}
Program: 103303
Project: 103303
Buggy source:
@Override public void keyReleased(KeyEvent event){
  if (buffer != null) {
    AWTKeyStroke input=KeyStroke.getKeyStrokeForEvent(buffer);
    buffer=null;
    if (currentRow != -1) {
      GlobalShortcutEntry en=GlobalShortcutConfigForm.this.tableModel.getEntryAt(currentRow);
      List<AWTKeyStroke> kss=new ArrayList<AWTKeyStroke>();
      if (currentColumn == 1) {
        kss.add(input);
        kss.add(en.getShortcut2());
      }
 else       if (currentColumn == 2) {
        kss.add(en.getShortcut());
        kss.add(input);
      }
 else {
        return;
      }
      en.setShortcuts(kss);
      GlobalShortcutConfigForm.this.refresh();
      GlobalShortcutConfigForm.this.saveConfig();
    }
  }
}

Fixed version (ground truth):
@Override public void keyReleased(KeyEvent event){
  if (buffer != null) {
    AWTKeyStroke input=KeyStroke.getKeyStrokeForEvent(buffer);
    buffer=null;
    if (currentRow != -1) {
      GlobalShortcutEntry en=GlobalShortcutConfigForm.this.tableModel.getEntryAt(currentRow);
      List<AWTKeyStroke> kss=new ArrayList<AWTKeyStroke>();
      if (currentColumn == 1) {
        kss.add(input);
        kss.add(en.getShortcut2());
      }
 else       if (currentColumn == 2) {
        kss.add(en.getShortcut());
        kss.add(input);
      }
 else {
        return;
      }
      currentRow=-1;
      currentColumn=-1;
      en.setShortcuts(kss);
      en.setEditShortcut1(false);
      en.setEditShortcut2(false);
      GlobalShortcutConfigForm.this.saveConfig();
      GlobalShortcutConfigForm.this.refresh();
    }
  }
}
Program: 103305
Project: 103305
Buggy source:
/** 
 * Returns the text for the given cell of the table
 * @param row cell row
 * @param column cell column
 * @return object at the row/column
 * @see javax.swing.table.AbstractTableModel#getValueAt
 */
public Object getValueAt(int row,int column){
switch (column) {
case 0:
    return getEntryAt(row).getAction();
case 1:
  return GlobalShortcutEntry.getShortcutText(getEntryAt(row).getShortcut());
case 2:
return GlobalShortcutEntry.getShortcutText(getEntryAt(row).getShortcut2());
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
/** 
 * Returns the text for the given cell of the table
 * @param row cell row
 * @param column cell column
 * @return object at the row/column
 * @see javax.swing.table.AbstractTableModel#getValueAt
 */
public Object getValueAt(int row,int column){
switch (column) {
case 0:
    return getEntryAt(row).getAction();
case 1:
  return getEntryAt(row).getEditShortcut1() ? "String_Node_Str" : GlobalShortcutEntry.getShortcutText(getEntryAt(row).getShortcut());
case 2:
return getEntryAt(row).getEditShortcut2() ? "String_Node_Str" : GlobalShortcutEntry.getShortcutText(getEntryAt(row).getShortcut2());
default :
throw new IllegalArgumentException("String_Node_Str");
}
}
Program: 103306
Project: 103306
Buggy source:
/** 
 * Connects and logins again to the server.
 * @param authReasonCode indicates the reason of the re-authentication.
 */
void reregister(int authReasonCode){
  try {
    if (logger.isTraceEnabled())     logger.trace("String_Node_Str");
    this.unregister(false);
    this.abortConnecting=false;
    connectAndLogin(authority,authReasonCode);
  }
 catch (  OperationFailedException ex) {
    logger.error("String_Node_Str",ex);
    disconnectAndCleanConnection();
    fireRegistrationStateChanged(getRegistrationState(),RegistrationState.CONNECTION_FAILED,RegistrationStateChangeEvent.REASON_INTERNAL_ERROR,null);
  }
catch (  XMPPException ex) {
    logger.error("String_Node_Str",ex);
    fireRegistrationStateChanged(ex);
  }
}

Fixed version (ground truth):
/** 
 * Connects and logins again to the server.
 * @param authReasonCode indicates the reason of the re-authentication.
 */
void reregister(int authReasonCode){
  try {
    if (logger.isTraceEnabled())     logger.trace("String_Node_Str");
    this.unregister(false);
    this.abortConnecting=false;
synchronized (connectAndLoginLock) {
      inConnectAndLogin=true;
    }
    connectAndLogin(authority,authReasonCode);
  }
 catch (  OperationFailedException ex) {
    logger.error("String_Node_Str",ex);
    eventDuringLogin=null;
    disconnectAndCleanConnection();
    fireRegistrationStateChanged(getRegistrationState(),RegistrationState.CONNECTION_FAILED,RegistrationStateChangeEvent.REASON_INTERNAL_ERROR,null);
  }
catch (  XMPPException ex) {
    logger.error("String_Node_Str",ex);
    eventDuringLogin=null;
    fireRegistrationStateChanged(ex);
  }
 finally {
synchronized (connectAndLoginLock) {
      if (eventDuringLogin != null) {
        if (eventDuringLogin.getNewState().equals(RegistrationState.CONNECTION_FAILED) || eventDuringLogin.getNewState().equals(RegistrationState.UNREGISTERED))         disconnectAndCleanConnection();
        fireRegistrationStateChanged(eventDuringLogin.getOldState(),eventDuringLogin.getNewState(),eventDuringLogin.getReasonCode(),eventDuringLogin.getReason());
        eventDuringLogin=null;
        inConnectAndLogin=false;
        return;
      }
      inConnectAndLogin=false;
    }
  }
}
Program: 103307
Project: 103307
Buggy source:
/** 
 * Starts the registration process. Connection details such as registration server, user name/number are provided through the configuration service through implementation specific properties.
 * @param authority the security authority that will be used for resolvingany security challenges that may be returned during the registration or at any moment while we're registered.
 * @throws OperationFailedException with the corresponding code it theregistration fails for some reason (e.g. a networking error or an implementation problem).
 */
public void register(final SecurityAuthority authority) throws OperationFailedException {
  if (authority == null)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  this.authority=authority;
  try {
    abortConnecting=false;
    connectAndLogin(authority,SecurityAuthority.AUTHENTICATION_REQUIRED);
  }
 catch (  XMPPException ex) {
    logger.error("String_Node_Str",ex);
    fireRegistrationStateChanged(ex);
  }
}

Fixed version (ground truth):
/** 
 * Starts the registration process. Connection details such as registration server, user name/number are provided through the configuration service through implementation specific properties.
 * @param authority the security authority that will be used for resolvingany security challenges that may be returned during the registration or at any moment while we're registered.
 * @throws OperationFailedException with the corresponding code it theregistration fails for some reason (e.g. a networking error or an implementation problem).
 */
public void register(final SecurityAuthority authority) throws OperationFailedException {
  if (authority == null)   throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str");
  this.authority=authority;
  try {
    abortConnecting=false;
synchronized (connectAndLoginLock) {
      inConnectAndLogin=true;
    }
    connectAndLogin(authority,SecurityAuthority.AUTHENTICATION_REQUIRED);
  }
 catch (  XMPPException ex) {
    logger.error("String_Node_Str",ex);
    eventDuringLogin=null;
    fireRegistrationStateChanged(ex);
  }
 finally {
synchronized (connectAndLoginLock) {
      if (eventDuringLogin != null) {
        if (eventDuringLogin.getNewState().equals(RegistrationState.CONNECTION_FAILED) || eventDuringLogin.getNewState().equals(RegistrationState.UNREGISTERED))         disconnectAndCleanConnection();
        fireRegistrationStateChanged(eventDuringLogin.getOldState(),eventDuringLogin.getNewState(),eventDuringLogin.getReasonCode(),eventDuringLogin.getReason());
        eventDuringLogin=null;
        inConnectAndLogin=false;
        return;
      }
      inConnectAndLogin=false;
    }
  }
}
Program: 103308
Project: 103308
Buggy source:
/** 
 * Loads the given chat room in the this chat conference panel. Loads all members and adds all corresponding listeners.
 * @param chatRoom the <tt>ChatRoom</tt> to load
 */
public void loadChatRoom(ChatRoom chatRoom){
  for (  ChatRoomMember member : chatRoom.getMembers())   sessionRenderer.addChatContact(new ConferenceChatContact(member));
  chatRoom.addPropertyChangeListener(this);
  chatRoom.addMemberPresenceListener(this);
  sessionRenderer.setChatSubject(chatRoom.getSubject());
}

Fixed version (ground truth):
/** 
 * Loads the given chat room in the this chat conference panel. Loads all members and adds all corresponding listeners.
 * @param chatRoom the <tt>ChatRoom</tt> to load
 */
public void loadChatRoom(ChatRoom chatRoom){
  currentChatTransport=new ConferenceChatTransport(this,chatRoomWrapper.getChatRoom());
  chatTransports.clear();
  chatTransports.add(currentChatTransport);
  sessionRenderer.removeAllChatContacts();
  for (  ChatRoomMember member : chatRoom.getMembers()) {
    sessionRenderer.addChatContact(new ConferenceChatContact(member));
  }
  chatRoom.addPropertyChangeListener(this);
  chatRoom.addMemberPresenceListener(this);
  sessionRenderer.setChatSubject(chatRoom.getSubject());
}
Program: 103309
Project: 103309
Buggy source:
/** 
 * Returns the <tt>ChatRoomWrapper</tt> that correspond to the given <tt>ChatRoom</tt>. If the list of chat rooms doesn't contain a corresponding wrapper - returns null.
 * @param chatRoom the <tt>ChatRoom</tt> that we're looking for
 * @return the <tt>ChatRoomWrapper</tt> object corresponding to the given<tt>ChatRoom</tt>
 */
public ChatRoomWrapper findChatRoomWrapperFromChatRoom(ChatRoom chatRoom){
  for (  ChatRoomProviderWrapper provider : providersList) {
    if (!chatRoom.getParentProvider().equals(provider.getProtocolProvider()))     continue;
    ChatRoomWrapper systemRoomWrapper=provider.getSystemRoomWrapper();
    ChatRoom systemRoom=systemRoomWrapper.getChatRoom();
    if ((systemRoom != null) && systemRoom.equals(chatRoom)) {
      return systemRoomWrapper;
    }
 else {
      ChatRoomWrapper chatRoomWrapper=provider.findChatRoomWrapperForChatRoom(chatRoom);
      if (chatRoomWrapper != null) {
        if (chatRoomWrapper.getChatRoom() == null) {
          chatRoomWrapper.setChatRoom(chatRoom);
        }
        return chatRoomWrapper;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the <tt>ChatRoomWrapper</tt> that correspond to the given <tt>ChatRoom</tt>. If the list of chat rooms doesn't contain a corresponding wrapper - returns null.
 * @param chatRoom the <tt>ChatRoom</tt> that we're looking for
 * @return the <tt>ChatRoomWrapper</tt> object corresponding to the given<tt>ChatRoom</tt>
 */
public ChatRoomWrapper findChatRoomWrapperFromChatRoom(ChatRoom chatRoom){
  for (  ChatRoomProviderWrapper provider : providersList) {
    if (!chatRoom.getParentProvider().equals(provider.getProtocolProvider()))     continue;
    ChatRoomWrapper systemRoomWrapper=provider.getSystemRoomWrapper();
    ChatRoom systemRoom=systemRoomWrapper.getChatRoom();
    if ((systemRoom != null) && systemRoom.equals(chatRoom)) {
      return systemRoomWrapper;
    }
 else {
      ChatRoomWrapper chatRoomWrapper=provider.findChatRoomWrapperForChatRoom(chatRoom);
      if (chatRoomWrapper != null) {
        if (chatRoomWrapper.getChatRoom() == null || !chatRoomWrapper.getChatRoom().equals(chatRoom)) {
          chatRoomWrapper.setChatRoom(chatRoom);
        }
        return chatRoomWrapper;
      }
    }
  }
  return null;
}
Program: 103312
Project: 103312
Buggy source:
public int compare(Presence o1,Presence o2){
  int res=o1.getPriority() - o2.getPriority();
  if (res == 0) {
    res=jabberStatusToPresenceStatus(o1,parentProvider).getStatus() - jabberStatusToPresenceStatus(o2,parentProvider).getStatus();
  }
  return res;
}

Fixed version (ground truth):
public int compare(Presence o1,Presence o2){
  int res=o2.getPriority() - o1.getPriority();
  if (res == 0) {
    res=jabberStatusToPresenceStatus(o2,parentProvider).getStatus() - jabberStatusToPresenceStatus(o1,parentProvider).getStatus();
  }
  return res;
}
Program: 103314
Project: 103314
Buggy source:
@Override public UIVideoHandler getVideoHandler(){
  return videoHandler;
}

Fixed version (ground truth):
public UIVideoHandler getVideoHandler(){
  return videoHandler;
}
Program: 103316
Project: 103316
Buggy source:
/** 
 * Processes the session initiation   {@link JingleIQ} that we were createdwith, passing its content to the media handler and then sends either a "session-info/ringing" or a "session-terminate" response.
 * @param sessionInitiateExtensions a collection of additional and optional<tt>PacketExtension</tt>s to be added to the <tt>session-initiate</tt> {@link JingleIQ} which is to initiate the session with this<tt>CallPeerJabberImpl</tt>
 * @throws OperationFailedException exception
 */
protected synchronized void initiateSession(Iterable<PacketExtension> sessionInitiateExtensions) throws OperationFailedException {
  isInitiator=false;
  List<ContentPacketExtension> offer=getMediaHandler().createContentList();
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str");
  ProtocolProviderServiceJabberImpl protocolProvider=getProtocolProvider();
  sessionInitIQ=JinglePacketFactory.createSessionInitiate(protocolProvider.getOurJID(),this.peerJID,JingleIQ.generateSID(),offer);
  if (sessionInitiateExtensions != null) {
    for (    PacketExtension sessionInitiateExtension : sessionInitiateExtensions) {
      sessionInitIQ.addExtension(sessionInitiateExtension);
    }
  }
  protocolProvider.getConnection().sendPacket(sessionInitIQ);
}

Fixed version (ground truth):
/** 
 * Processes the session initiation   {@link JingleIQ} that we were createdwith, passing its content to the media handler and then sends either a "session-info/ringing" or a "session-terminate" response.
 * @param sessionInitiateExtensions a collection of additional and optional<tt>PacketExtension</tt>s to be added to the <tt>session-initiate</tt> {@link JingleIQ} which is to initiate the session with this<tt>CallPeerJabberImpl</tt>
 * @throws OperationFailedException exception
 */
protected synchronized void initiateSession(Iterable<PacketExtension> sessionInitiateExtensions) throws OperationFailedException {
  isInitiator=false;
  List<ContentPacketExtension> offer=getMediaHandler().createContentList();
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str");
  ProtocolProviderServiceJabberImpl protocolProvider=getProtocolProvider();
synchronized (sidSyncRoot) {
    sessionInitIQ=JinglePacketFactory.createSessionInitiate(protocolProvider.getOurJID(),this.peerJID,JingleIQ.generateSID(),offer);
    if (cancelled) {
      getMediaHandler().getTransportManager().close();
      return;
    }
  }
  if (sessionInitiateExtensions != null) {
    for (    PacketExtension sessionInitiateExtension : sessionInitiateExtensions) {
      sessionInitIQ.addExtension(sessionInitiateExtension);
    }
  }
  protocolProvider.getConnection().sendPacket(sessionInitIQ);
}
Program: 103317
Project: 103317
Buggy source:
/** 
 * Sends local candidate addresses from the local peer to the remote peer using the <tt>transport-info</tt>   {@link JingleIQ}.
 * @param contents the local candidate addresses to be sent from the localpeer to the remote peer using the <tt>transport-info</tt> {@link JingleIQ}
 */
protected void sendTransportInfo(Iterable<ContentPacketExtension> contents){
  JingleIQ transportInfo=new JingleIQ();
  for (  ContentPacketExtension content : contents)   transportInfo.addContent(content);
  ProtocolProviderServiceJabberImpl protocolProvider=getProtocolProvider();
  transportInfo.setAction(JingleAction.TRANSPORT_INFO);
  transportInfo.setFrom(protocolProvider.getOurJID());
  transportInfo.setSID(getJingleSID());
  transportInfo.setTo(getAddress());
  transportInfo.setType(IQ.Type.SET);
  protocolProvider.getConnection().sendPacket(transportInfo);
}

Fixed version (ground truth):
/** 
 * Sends local candidate addresses from the local peer to the remote peer using the <tt>transport-info</tt>   {@link JingleIQ}.
 * @param contents the local candidate addresses to be sent from the localpeer to the remote peer using the <tt>transport-info</tt> {@link JingleIQ}
 */
protected void sendTransportInfo(Iterable<ContentPacketExtension> contents){
  if (cancelled)   return;
  JingleIQ transportInfo=new JingleIQ();
  for (  ContentPacketExtension content : contents)   transportInfo.addContent(content);
  ProtocolProviderServiceJabberImpl protocolProvider=getProtocolProvider();
  transportInfo.setAction(JingleAction.TRANSPORT_INFO);
  transportInfo.setFrom(protocolProvider.getOurJID());
  transportInfo.setSID(getJingleSID());
  transportInfo.setTo(getAddress());
  transportInfo.setType(IQ.Type.SET);
  protocolProvider.getConnection().sendPacket(transportInfo);
}
Program: 103318
Project: 103318
Buggy source:
/** 
 * Indicates if the form is an advanced form.
 * @return <tt>true</tt> to indicate that this is an advanced form,otherwise returns <tt>false</tt>
 */
public boolean isAdvanced(){
  return true;
}

Fixed version (ground truth):
/** 
 * Indicates if the form is an advanced form.
 * @return <tt>true</tt> to indicate that this is an advanced form,otherwise returns <tt>false</tt>
 */
public boolean isAdvanced(){
  return false;
}
Program: 103319
Project: 103319
Buggy source:
/** 
 * Sets the default font color.
 * @param fontFamily the default font color
 */
public static void setChatDefaultFontColor(Color fontColor){
  defaultFontColor=fontColor.getRGB();
  configService.setProperty("String_Node_Str",defaultFontColor);
}

Fixed version (ground truth):
/** 
 * Sets the default font color.
 * @param fontColor the default font color
 */
public static void setChatDefaultFontColor(Color fontColor){
  defaultFontColor=fontColor.getRGB();
  configService.setProperty("String_Node_Str",defaultFontColor);
}
Program: 103321
Project: 103321
Buggy source:
/** 
 * Sets the default isItalic property.
 * @param isBold indicates if the default chat font is italic
 */
public static void setChatFontIsItalic(boolean isItalic){
  isDefaultFontItalic=isItalic;
  configService.setProperty("String_Node_Str",isItalic);
}

Fixed version (ground truth):
/** 
 * Sets the default isItalic property.
 * @param isItalic indicates if the default chat font is italic
 */
public static void setChatFontIsItalic(boolean isItalic){
  isDefaultFontItalic=isItalic;
  configService.setProperty("String_Node_Str",isItalic);
}