nus-yam/ex-repair huggingface dataset:
Program: 104212
Project: 104212
Buggy source:
public void refreshStates(CallParticipantSecurityOnEvent event){
  String securityString=event.getSecurityString();
  if (securityString != null) {
    securityStringLabel.setText(securityString);
    if (event.isSecurityVerified()) {
      sasVerificationButton.setImage(iconEncrVerified);
    }
  }
  sasVerificationButton.setImage(iconEncr);
  notificationService.fireNotification(ZRTP_SECURE_NOTIFICATION);
  revalidate();
  repaint();
}

Fixed version (ground truth):
public void refreshStates(CallParticipantSecurityOnEvent event){
  String securityString=event.getSecurityString();
  if (securityString != null) {
    securityStringLabel.setText(securityString);
  }
  if (event.isSecurityVerified()) {
    sasVerificationButton.setImage(iconEncrVerified);
  }
 else {
    sasVerificationButton.setImage(iconEncr);
  }
  notificationService.fireNotification(ZRTP_SECURE_NOTIFICATION);
  revalidate();
  repaint();
}
Program: 104213
Project: 104213
Buggy source:
protected void updateFilteredItems(){
  fireIntervalRemoved(this,0,filteredItems.size());
  filteredItems.clear();
  if (filter == null)   filteredItems.addAll(items);
 else {
    for (Iterator iterator=items.iterator(); iterator.hasNext(); ) {
      Object item=iterator.next();
      if (filter.accept(item))       filteredItems.add(item);
    }
  }
  fireIntervalAdded(this,0,filteredItems.size());
}

Fixed version (ground truth):
protected void updateFilteredItems(){
  fireIntervalRemoved(this,0,filteredItems.size());
  filteredItems.clear();
  if (filter == null) {
    filteredItems.addAll(items);
  }
 else {
    for (Iterator iterator=items.iterator(); iterator.hasNext(); ) {
      Object item=iterator.next();
      if (filter.accept(item))       filteredItems.add(item);
    }
  }
  fireIntervalAdded(this,0,filteredItems.size());
}
Program: 104214
Project: 104214
Buggy source:
/** 
 * Changes the "Send as SMS" check box state.
 * @param isSmsSelected <code>true</code> to set the "Send as SMS" check boxselected, <code>false</code> - otherwise. 
 */
public void setSmsSelected(boolean isSmsSelected){
  sendSmsCheckBox.setSelected(isSmsSelected);
}

Fixed version (ground truth):
/** 
 * Changes the "Send as SMS" check box state.
 * @param isSmsSelected <code>true</code> to set the "Send as SMS" check boxselected, <code>false</code> - otherwise.
 */
public void setSmsSelected(boolean isSmsSelected){
  sendSmsCheckBox.setSelected(isSmsSelected);
}
Program: 104216
Project: 104216
Buggy source:
public Format setInputFormat(Format in){
  if (!(in instanceof VideoFormat) || null == NativeDecoder.matches(in,inputFormats))   return null;
  VideoFormat videoIn=(VideoFormat)in;
  Dimension inSize=videoIn.getSize();
  if (inSize == null)   inSize=new Dimension(DEF_WIDTH,DEF_HEIGHT);
  YUVFormat yuv=(YUVFormat)videoIn;
  if (yuv.getOffsetU() > yuv.getOffsetV())   return null;
  int strideY=inSize.width;
  int strideUV=strideY / 2;
  int offsetU=strideY * inSize.height;
  int offsetV=offsetU + strideUV * inSize.height / 2;
  int inputYuvLength=(strideY + strideUV) * inSize.height;
  float sourceFrameRate=videoIn.getFrameRate();
  inputFormat=new YUVFormat(inSize,inputYuvLength + INPUT_BUFFER_PADDING_SIZE,Format.byteArray,sourceFrameRate,YUVFormat.YUV_420,strideY,strideUV,0,offsetU,offsetV);
  return inputFormat;
}

Fixed version (ground truth):
public Format setInputFormat(Format in){
  if (!(in instanceof VideoFormat) || null == JNIDecoder.matches(in,inputFormats))   return null;
  VideoFormat videoIn=(VideoFormat)in;
  Dimension inSize=videoIn.getSize();
  if (inSize == null)   inSize=new Dimension(DEF_WIDTH,DEF_HEIGHT);
  YUVFormat yuv=(YUVFormat)videoIn;
  if (yuv.getOffsetU() > yuv.getOffsetV())   return null;
  int strideY=inSize.width;
  int strideUV=strideY / 2;
  int offsetU=strideY * inSize.height;
  int offsetV=offsetU + strideUV * inSize.height / 2;
  int inputYuvLength=(strideY + strideUV) * inSize.height;
  float sourceFrameRate=videoIn.getFrameRate();
  inputFormat=new YUVFormat(inSize,inputYuvLength + INPUT_BUFFER_PADDING_SIZE,Format.byteArray,sourceFrameRate,YUVFormat.YUV_420,strideY,strideUV,0,offsetU,offsetV);
  return inputFormat;
}
Program: 104217
Project: 104217
Buggy source:
public Format setOutputFormat(Format out){
  if (!(out instanceof VideoFormat) || null == NativeDecoder.matches(out,getMatchingOutputFormats(inputFormat)))   return null;
  VideoFormat videoOut=(VideoFormat)out;
  Dimension outSize=videoOut.getSize();
  if (outSize == null) {
    Dimension inSize=((VideoFormat)inputFormat).getSize();
    if (inSize == null)     outSize=new Dimension(DEF_WIDTH,DEF_HEIGHT);
 else     outSize=inSize;
  }
  outputFormat=new VideoFormat(videoOut.getEncoding(),outSize,outSize.width * outSize.height,Format.byteArray,videoOut.getFrameRate());
  return outputFormat;
}

Fixed version (ground truth):
public Format setOutputFormat(Format out){
  if (!(out instanceof VideoFormat) || null == JNIDecoder.matches(out,getMatchingOutputFormats(inputFormat)))   return null;
  VideoFormat videoOut=(VideoFormat)out;
  Dimension outSize=videoOut.getSize();
  if (outSize == null) {
    Dimension inSize=((VideoFormat)inputFormat).getSize();
    if (inSize == null)     outSize=new Dimension(DEF_WIDTH,DEF_HEIGHT);
 else     outSize=inSize;
  }
  outputFormat=new VideoFormat(videoOut.getEncoding(),outSize,outSize.width * outSize.height,Format.byteArray,videoOut.getFrameRate());
  return outputFormat;
}
Program: 104218
Project: 104218
Buggy source:
/** 
 * Return the list of formats supported at the output.
 */
public Format[] getSupportedOutputFormats(Format in){
  if (in == null)   return defOutputFormats;
  if (!(in instanceof VideoFormat) || null == NativeDecoder.matches(in,inputFormats))   return new Format[0];
  return getMatchingOutputFormats(in);
}

Fixed version (ground truth):
/** 
 * Return the list of formats supported at the output.
 */
public Format[] getSupportedOutputFormats(Format in){
  if (in == null)   return defOutputFormats;
  if (!(in instanceof VideoFormat) || null == JNIDecoder.matches(in,inputFormats))   return new Format[0];
  return getMatchingOutputFormats(in);
}
Program: 104219
Project: 104219
Buggy source:
/** 
 * Shows the dialog.
 * @return The return code that should indicate what was the choice ofthe user. If the user chooses cancel, the return code is the  CANCEL_RETURN_CODE.
 */
public int showDialog(){
  if (!SwingUtilities.isEventDispatchThread()) {
    final int[] returnCodes=new int[1];
    Exception exception=null;
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        public void run(){
          returnCodes[0]=showDialog();
        }
      }
);
    }
 catch (    InterruptedException ex) {
      exception=ex;
    }
catch (    InvocationTargetException ex) {
      exception=ex;
    }
    if (exception != null)     throw new UndeclaredThrowableException(exception);
    return returnCodes[0];
  }
  pack();
  setModal(true);
  setVisible(true);
  return returnCode;
}

Fixed version (ground truth):
/** 
 * Shows the dialog.
 * @return The return code that should indicate what was the choice ofthe user. If the user chooses cancel, the return code is the CANCEL_RETURN_CODE.
 */
public int showDialog(){
  if (!SwingUtilities.isEventDispatchThread()) {
    final int[] returnCodes=new int[1];
    Exception exception=null;
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        public void run(){
          returnCodes[0]=showDialog();
        }
      }
);
    }
 catch (    InterruptedException ex) {
      exception=ex;
    }
catch (    InvocationTargetException ex) {
      exception=ex;
    }
    if (exception != null)     throw new UndeclaredThrowableException(exception);
    return returnCodes[0];
  }
  pack();
  setModal(true);
  setVisible(true);
  return returnCode;
}
Program: 104220
Project: 104220
Buggy source:
/** 
 * Sets the message to be displayed.
 * @param message The message to be displayed.
 */
public void setMessage(String message){
  this.messageArea.setText(message);
}

Fixed version (ground truth):
/** 
 * Sets the message to be displayed.
 * @param message The message to be displayed.
 */
public void setMessage(String message){
  this.messageArea.setText(message);
  this.messageArea.setSize(new Dimension(MAX_MSG_PANE_WIDTH,MAX_MSG_PANE_HEIGHT));
  int height=this.messageArea.getPreferredSize().height;
  this.messageArea.setPreferredSize(new Dimension(600,height));
}
Program: 104221
Project: 104221
Buggy source:
/** 
 * Creates an instance of <tt>ChatWritePanel</tt>.
 * @param panel The parent <tt>ChatPanel</tt>.
 */
public ChatWritePanel(ChatPanel panel){
  super(new BorderLayout());
  SCScrollPane scrollPane=new SCScrollPane();
  this.chatPanel=panel;
  this.editorPane.setContentType("String_Node_Str");
  this.editorPane.setFont(Constants.FONT);
  this.editorPane.setCaretPosition(0);
  this.editorPane.setEditorKit(new SIPCommHTMLEditorKit());
  this.editorPane.getDocument().addUndoableEditListener(this);
  this.editorPane.addKeyListener(this);
  this.editorPane.addMouseListener(this);
  this.editorPane.setTransferHandler(new ChatPanelTransferHandler());
  this.editTextToolBar=new EditTextToolBar(this);
  this.add(editTextToolBar,BorderLayout.NORTH);
  this.add(scrollPane,BorderLayout.CENTER);
  this.rightButtonMenu=new WritePanelRightButtonMenu(chatPanel.getChatWindow());
  scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  scrollPane.setViewportView(editorPane);
  this.typingTimer.setRepeats(true);
  ConfigurationService configService=GuiActivator.getConfigurationService();
  String messageCommandProperty="String_Node_Str";
  String messageCommand=configService.getString(messageCommandProperty);
  if (messageCommand == null)   messageCommand=GuiActivator.getResources().getSettingsString(messageCommandProperty);
  this.changeSendCommand((messageCommand == null || messageCommand.equalsIgnoreCase("String_Node_Str")));
}

Fixed version (ground truth):
/** 
 * Creates an instance of <tt>ChatWritePanel</tt>.
 * @param panel The parent <tt>ChatPanel</tt>.
 */
public ChatWritePanel(ChatPanel panel){
  super(new BorderLayout());
  SCScrollPane scrollPane=new SCScrollPane();
  this.chatPanel=panel;
  this.editorPane.setContentType("String_Node_Str");
  this.editorPane.setFont(Constants.FONT);
  this.editorPane.setCaretPosition(0);
  this.editorPane.setEditorKit(new SIPCommHTMLEditorKit());
  this.editorPane.getDocument().addUndoableEditListener(this);
  this.editorPane.addKeyListener(this);
  this.editorPane.addMouseListener(this);
  this.editorPane.setTransferHandler(new ChatWritePanelTransferHandler());
  this.editTextToolBar=new EditTextToolBar(this);
  this.add(editTextToolBar,BorderLayout.NORTH);
  this.add(scrollPane,BorderLayout.CENTER);
  this.rightButtonMenu=new WritePanelRightButtonMenu(chatPanel.getChatWindow());
  scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  scrollPane.setViewportView(editorPane);
  this.typingTimer.setRepeats(true);
  ConfigurationService configService=GuiActivator.getConfigurationService();
  String messageCommandProperty="String_Node_Str";
  String messageCommand=configService.getString(messageCommandProperty);
  if (messageCommand == null)   messageCommand=GuiActivator.getResources().getSettingsString(messageCommandProperty);
  this.changeSendCommand((messageCommand == null || messageCommand.equalsIgnoreCase("String_Node_Str")));
}
Program: 104222
Project: 104222
Buggy source:
/** 
 * Creates a <tt>CallComboBox</tt> by specifying the parent panel, where this combo box will be placed.
 * @param parentCallPanel The parent panel.
 */
public CallComboBox(MainCallPanel parentCallPanel){
  this.parentCallPanel=parentCallPanel;
  this.setUI(new SIPCommCallComboBoxUI());
  this.addActionListener(this);
  JTextField textField=(JTextField)this.getEditor().getEditorComponent();
  textField.getDocument().addDocumentListener(this);
  textField.getActionMap().put("String_Node_Str",new CreateCallAction());
  textField.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"String_Node_Str");
  textField.addFocusListener(this);
}

Fixed version (ground truth):
/** 
 * Creates a <tt>CallComboBox</tt> by specifying the parent panel, where this combo box will be placed.
 * @param parentCallPanel The parent panel.
 */
public CallComboBox(MainCallPanel parentCallPanel){
  this.parentCallPanel=parentCallPanel;
  this.setUI(new SIPCommCallComboBoxUI());
  this.addActionListener(this);
  JTextField textField=(JTextField)this.getEditor().getEditorComponent();
  textField.getDocument().addDocumentListener(this);
  textField.getActionMap().put("String_Node_Str",new CreateCallAction());
  textField.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"String_Node_Str");
  textField.addFocusListener(this);
  callHistoryLoadThread=new LoadLastCallsFromHistory();
  SwingUtilities.invokeLater(callHistoryLoadThread);
}
Program: 104223
Project: 104223
Buggy source:
public void focusGained(FocusEvent e){
  this.handleChange();
}

Fixed version (ground truth):
public void focusGained(FocusEvent e){
  SwingUtilities.invokeLater(callHistoryLoadThread);
  this.handleChange();
}
Program: 104224
Project: 104224
Buggy source:
/** 
 * Enables or disabled the call button according to the content in the combo box editor field.
 */
protected void handleChange(){
  String item=((CallComboEditor)this.getEditor()).getItem().toString();
  if (item.length() > 0) {
    parentCallPanel.setCallMetaContact(false);
    ContactList clist=parentCallPanel.getMainFrame().getContactListPanel().getContactList();
    int selectedIndex=clist.getSelectedIndex();
    clist.removeSelectionInterval(selectedIndex,selectedIndex);
    parentCallPanel.setCallButtonEnabled(true);
  }
 else {
    Object o=parentCallPanel.getMainFrame().getContactListPanel().getContactList().getSelectedValue();
    boolean enabled=(o instanceof MetaContact);
    parentCallPanel.setCallButtonEnabled(enabled);
  }
}

Fixed version (ground truth):
/** 
 * Enables or disables the call button according to the content in the combo box editor field.
 */
protected void handleChange(){
  String item=((CallComboEditor)this.getEditor()).getItem().toString();
  if (item.length() > 0) {
    parentCallPanel.setCallMetaContact(false);
    ContactList clist=parentCallPanel.getMainFrame().getContactListPanel().getContactList();
    int selectedIndex=clist.getSelectedIndex();
    clist.removeSelectionInterval(selectedIndex,selectedIndex);
    parentCallPanel.setCallButtonEnabled(true);
  }
 else {
    Object o=parentCallPanel.getMainFrame().getContactListPanel().getContactList().getSelectedValue();
    boolean enabled=(o instanceof MetaContact);
    parentCallPanel.setCallButtonEnabled(enabled);
  }
}
Program: 104225
Project: 104225
Buggy source:
/** 
 * Authenticate a packet using HMC SHA1 method. Calculated authentication tag is returned.
 * @param pkt the RTP packet to be authenticated
 * @return authentication tag of pkt
 */
private byte[] authenticatePacketHMCSHA1(RawPacket pkt){
  hmacSha1.update(pkt.getBuffer(),0,pkt.getLength());
  byte[] rb=new byte[4];
  rb[0]=(byte)(this.roc >> 24);
  rb[1]=(byte)(this.roc >> 16);
  rb[2]=(byte)(this.roc >> 8);
  rb[3]=(byte)this.roc;
  hmacSha1.update(rb);
  return hmacSha1.doFinal();
}

Fixed version (ground truth):
/** 
 * Authenticate a packet using HMC SHA1 method. Calculated authentication tag is returned.
 * @param pkt the RTP packet to be authenticated
 * @return authentication tag of pkt
 */
private byte[] authenticatePacketHMCSHA1(RawPacket pkt,int rocIn){
  hmacSha1.update(pkt.getBuffer(),0,pkt.getLength());
  byte[] rb=new byte[4];
  rb[0]=(byte)(rocIn >> 24);
  rb[1]=(byte)(rocIn >> 16);
  rb[2]=(byte)(rocIn >> 8);
  rb[3]=(byte)rocIn;
  hmacSha1.update(rb);
  return hmacSha1.doFinal();
}
Program: 104226
Project: 104226
Buggy source:
/** 
 * Transform a RTP packet into a SRTP packet.  This method is called when a normal RTP packet ready to be sent. Operations done by the transformation may include: encryption, using either Counter Mode encryption, or F8 Mode encryption, adding authentication tag, currently HMC SHA1 method. Both encryption and authentication functionality can be turned off as long as the SRTPPolicy used in this SRTPCryptoContext is requires no encryption and no authentication. Then the packet will be sent out untouched. However this is not encouraged. If no SRTP feature is enabled, then we shall not use SRTP TransformConnector. We should use the original method (RTPManager managed transportation) instead.  
 * @param pkt the RTP packet that is going to be sent out
 */
public void transformPacket(RawPacket pkt){
  if (this.policy.getEncType() == SRTPPolicy.AESCM_ENCRYPTION) {
    processPacketAESCM(pkt);
  }
 else   if (this.policy.getEncType() == SRTPPolicy.AESF8_ENCRYPTION) {
    processPacketAESF8(pkt);
  }
  if (this.policy.getAuthType() == SRTPPolicy.HMACSHA1_AUTHENTICATION) {
    byte[] tag=authenticatePacketHMCSHA1(pkt);
    pkt.append(tag,policy.getAuthTagLength());
  }
  int seqNum=PacketManipulator.GetRTPSequenceNumber(pkt);
  if (seqNum == 0xFFFF) {
    this.roc++;
  }
}

Fixed version (ground truth):
/** 
 * Transform a RTP packet into a SRTP packet.  This method is called when a normal RTP packet ready to be sent. Operations done by the transformation may include: encryption, using either Counter Mode encryption, or F8 Mode encryption, adding authentication tag, currently HMC SHA1 method. Both encryption and authentication functionality can be turned off as long as the SRTPPolicy used in this SRTPCryptoContext is requires no encryption and no authentication. Then the packet will be sent out untouched. However this is not encouraged. If no SRTP feature is enabled, then we shall not use SRTP TransformConnector. We should use the original method (RTPManager managed transportation) instead.  
 * @param pkt the RTP packet that is going to be sent out
 */
public void transformPacket(RawPacket pkt){
  if (this.policy.getEncType() == SRTPPolicy.AESCM_ENCRYPTION) {
    processPacketAESCM(pkt);
  }
 else   if (this.policy.getEncType() == SRTPPolicy.AESF8_ENCRYPTION) {
    processPacketAESF8(pkt);
  }
  if (this.policy.getAuthType() == SRTPPolicy.HMACSHA1_AUTHENTICATION) {
    byte[] tag=authenticatePacketHMCSHA1(pkt,this.roc);
    pkt.append(tag,policy.getAuthTagLength());
  }
  int seqNum=PacketManipulator.GetRTPSequenceNumber(pkt);
  if (seqNum == 0xFFFF) {
    this.roc++;
  }
}
Program: 104229
Project: 104229
Buggy source:
/** 
 * Initializes the accounts table.
 */
private void accountsInit(){
  this.accountsPanel.setLayout(new BoxLayout(accountsPanel,BoxLayout.Y_AXIS));
  for (  ProtocolProviderFactory providerFactory : GuiActivator.getProtocolProviderFactories().values()) {
    ServiceReference serRef;
    ProtocolProviderService protocolProvider;
    for (    AccountID accountID : providerFactory.getRegisteredAccounts()) {
      boolean isHidden=(accountID.getAccountProperty(ProtocolProviderFactory.IS_PROTOCOL_HIDDEN) != null);
      if (isHidden)       continue;
      serRef=providerFactory.getProviderForAccount(accountID);
      protocolProvider=(ProtocolProviderService)GuiActivator.bundleContext.getService(serRef);
      AccountPanel accountPanel=new AccountPanel(protocolProvider);
      accountsPanel.add(accountPanel);
      accounts.put(protocolProvider,accountPanel);
    }
  }
}

Fixed version (ground truth):
/** 
 * Initializes the accounts table.
 */
private void accountsInit(){
  this.accountsPanel.setLayout(new BoxLayout(accountsPanel,BoxLayout.Y_AXIS));
  for (  ProtocolProviderFactory providerFactory : GuiActivator.getProtocolProviderFactories().values()) {
    ServiceReference serRef;
    ProtocolProviderService protocolProvider;
    for (    AccountID accountID : providerFactory.getRegisteredAccounts()) {
      boolean isHidden=(accountID.getAccountProperty(ProtocolProviderFactory.IS_PROTOCOL_HIDDEN) != null);
      if (isHidden)       continue;
      serRef=providerFactory.getProviderForAccount(accountID);
      protocolProvider=(ProtocolProviderService)GuiActivator.bundleContext.getService(serRef);
      OperationSetPresence presence=(OperationSetPresence)protocolProvider.getOperationSet(OperationSetPresence.class);
      if (presence != null) {
        presence.addProviderPresenceStatusListener(this);
      }
      AccountPanel accountPanel=new AccountPanel(protocolProvider);
      accountsPanel.add(accountPanel);
      accounts.put(protocolProvider,accountPanel);
    }
  }
}
Program: 104231
Project: 104231
Buggy source:
/** 
 * Sets the selected contact to the given proto contact.
 * @param pps the protocol provider to select
 */
public void setSelected(ProtocolProviderService pps){
  this.setSelected(pps,new ImageIcon(createAccountStatusImage(pps)));
}

Fixed version (ground truth):
/** 
 * Sets the selected contact to the given proto contact.
 * @param pps the protocol provider to select
 */
public void setSelected(ProtocolProviderService pps){
  this.setSelected(pps,new ImageIcon(ImageLoader.getAccountStatusImage(pps)));
}
Program: 104232
Project: 104232
Buggy source:
/** 
 * Updates the protocol account status.
 * @param pps the protocol provider service to update
 */
public void updateAccountStatus(ProtocolProviderService pps){
  JMenuItem menuItem=accountsTable.get(pps);
  Icon icon=new ImageIcon(createAccountStatusImage(pps));
  ProtocolProviderService selectedPPS=(ProtocolProviderService)menu.getSelectedObject();
  if (selectedPPS.equals(pps) && !pps.isRegistered()) {
    ProtocolProviderService newPPS=findFirstRegisteredProvider();
    if (newPPS != null)     this.setSelected(newPPS);
  }
  if (!selectedPPS.equals(pps) && !selectedPPS.isRegistered() && pps.isRegistered()) {
    this.setSelected(pps);
  }
  menuItem.setIcon(icon);
  if (menu.getSelectedObject().equals(pps)) {
    this.menu.setIcon(icon);
  }
  menuItem.repaint();
  this.menu.repaint();
}

Fixed version (ground truth):
/** 
 * Updates the protocol account status.
 * @param pps the protocol provider service to update
 */
public void updateAccountStatus(ProtocolProviderService pps){
  JMenuItem menuItem=accountsTable.get(pps);
  Icon icon=new ImageIcon(ImageLoader.getAccountStatusImage(pps));
  ProtocolProviderService selectedPPS=(ProtocolProviderService)menu.getSelectedObject();
  if (selectedPPS.equals(pps) && !pps.isRegistered()) {
    ProtocolProviderService newPPS=findFirstRegisteredProvider();
    if (newPPS != null)     this.setSelected(newPPS);
  }
  if (!selectedPPS.equals(pps) && !selectedPPS.isRegistered() && pps.isRegistered()) {
    this.setSelected(pps);
  }
  menuItem.setIcon(icon);
  if (menu.getSelectedObject().equals(pps)) {
    this.menu.setIcon(icon);
  }
  menuItem.repaint();
  this.menu.repaint();
}
Program: 104233
Project: 104233
Buggy source:
/** 
 * Adds an account to this account selector box. The account is represented by its protocol provider.
 * @param pps the protocol provider for the added account
 */
public void addAccount(ProtocolProviderService pps){
  Image img=createAccountStatusImage(pps);
  JMenuItem menuItem=new JMenuItem(pps.getAccountID().getDisplayName(),new ImageIcon(img));
  menuItem.addActionListener(this);
  this.accountsTable.put(pps,menuItem);
  this.menu.add(menuItem);
  if (accountsTable.size() < 2) {
    this.setSelected(pps);
  }
 else {
    OperationSetPresence presence=(OperationSetPresence)pps.getOperationSet(OperationSetPresence.class);
    OperationSetPresence selectedPresence=(OperationSetPresence)selectedProvider.getOperationSet(OperationSetPresence.class);
    if (presence != null && selectedPresence != null && (selectedPresence.getPresenceStatus().getStatus() < presence.getPresenceStatus().getStatus())) {
      setSelected(pps);
    }
 else     if (pps.isRegistered() && !selectedProvider.isRegistered()) {
      setSelected(pps);
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds an account to this account selector box. The account is represented by its protocol provider.
 * @param pps the protocol provider for the added account
 */
public void addAccount(ProtocolProviderService pps){
  Image img=ImageLoader.getAccountStatusImage(pps);
  JMenuItem menuItem=new JMenuItem(pps.getAccountID().getDisplayName(),new ImageIcon(img));
  menuItem.addActionListener(this);
  this.accountsTable.put(pps,menuItem);
  this.menu.add(menuItem);
  if (accountsTable.size() < 2) {
    this.setSelected(pps);
  }
 else {
    OperationSetPresence presence=(OperationSetPresence)pps.getOperationSet(OperationSetPresence.class);
    OperationSetPresence selectedPresence=(OperationSetPresence)selectedProvider.getOperationSet(OperationSetPresence.class);
    if (presence != null && selectedPresence != null && (selectedPresence.getPresenceStatus().getStatus() < presence.getPresenceStatus().getStatus())) {
      setSelected(pps);
    }
 else     if (pps.isRegistered() && !selectedProvider.isRegistered()) {
      setSelected(pps);
    }
  }
}
Program: 104236
Project: 104236
Buggy source:
AEGetURLEventHandler(LaunchArgHandler launchArgHandler){
  this.launchArgHandler=launchArgHandler;
  setAEGetURLListener(new IAEGetURLListener(){
    public void handleAEGetURLEvent(    final String url){
      new Thread(){
        public void run(){
          AEGetURLEventHandler.this.launchArgHandler.handleArgs(new String[]{url});
        }
      }
.start();
    }
  }
);
}

Fixed version (ground truth):
AEGetURLEventHandler(LaunchArgHandler launchArgHandler){
  this.launchArgHandler=launchArgHandler;
  try {
    setAEGetURLListener(new IAEGetURLListener(){
      public void handleAEGetURLEvent(      final String url){
        new Thread(){
          public void run(){
            AEGetURLEventHandler.this.launchArgHandler.handleArgs(new String[]{url});
          }
        }
.start();
      }
    }
);
  }
 catch (  Throwable err) {
    System.err.println("String_Node_Str");
    System.err.println("String_Node_Str");
    err.printStackTrace();
  }
}
Program: 104238
Project: 104238
Buggy source:
/** 
 * Draws the background of the menu item.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  AntialiasingManager.activateAntialiasing(g);
  super.paintBackground(g,menuItem,bgColor);
  boolean isToolBarExtended=new Boolean(GuiActivator.getResources().getSettingsString("String_Node_Str")).booleanValue();
  if (!isToolBarExtended) {
    int menuWidth=menuItem.getWidth();
    int menuHeight=menuItem.getHeight();
    g.drawImage(menuBgImage,0,0,menuWidth,menuHeight,null);
  }
}

Fixed version (ground truth):
/** 
 * Draws the background of the menu item.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  super.paintBackground(g,menuItem,bgColor);
  boolean isToolBarExtended=new Boolean(GuiActivator.getResources().getSettingsString("String_Node_Str")).booleanValue();
  if (!isToolBarExtended) {
    g=g.create();
    try {
      AntialiasingManager.activateAntialiasing(g);
      int menuWidth=menuItem.getWidth();
      int menuHeight=menuItem.getHeight();
      g.drawImage(menuBgImage,0,0,menuWidth,menuHeight,null);
    }
  finally {
      g.dispose();
    }
  }
}
Program: 104239
Project: 104239
Buggy source:
/** 
 * Draws the background of the menu item.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  AntialiasingManager.activateAntialiasing(g);
  super.paintBackground(g,menuItem,bgColor);
  ButtonModel model=menuItem.getModel();
  Color oldColor=g.getColor();
  int menuWidth=menuItem.getWidth();
  int menuHeight=menuItem.getHeight();
  if (menuItem.isOpaque()) {
    if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) {
      g.setColor(bgColor);
      g.fillRoundRect(0,0,menuWidth,menuHeight,5,5);
      g.setColor(SIPCommLookAndFeel.getControlDarkShadow());
      g.drawRoundRect(0,0,menuWidth - 1,menuHeight - 1,5,5);
    }
 else {
      g.setColor(menuItem.getBackground());
      g.fillRoundRect(0,0,menuWidth,menuHeight,5,5);
    }
    g.setColor(oldColor);
  }
}

Fixed version (ground truth):
/** 
 * Draws the background of the menu item.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  super.paintBackground(g,menuItem,bgColor);
  g=g.create();
  try {
    internalPaintBackground(g,menuItem,bgColor);
  }
  finally {
    g.dispose();
  }
}
Program: 104240
Project: 104240
Buggy source:
/** 
 * Draws the background of the menu item.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  AntialiasingManager.activateAntialiasing(g);
  super.paintBackground(g,menuItem,bgColor);
  ButtonModel model=menuItem.getModel();
  Color oldColor=g.getColor();
  int menuWidth=menuItem.getWidth();
  int menuHeight=menuItem.getHeight();
  if (menuItem.isOpaque()) {
    if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) {
      g.setColor(bgColor);
      g.fillRoundRect(0,0,menuWidth,menuHeight,5,5);
      g.setColor(SIPCommLookAndFeel.getControlDarkShadow());
      g.drawRoundRect(0,0,menuWidth - 1,menuHeight - 1,5,5);
    }
 else {
      g.setColor(menuItem.getBackground());
      g.fillRoundRect(0,0,menuWidth,menuHeight,5,5);
    }
    g.setColor(oldColor);
  }
}

Fixed version (ground truth):
/** 
 * Draws the background of the menu item.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  super.paintBackground(g,menuItem,bgColor);
  g=g.create();
  try {
    internalPaintBackground(g,menuItem,bgColor);
  }
  finally {
    g.dispose();
  }
}
Program: 104241
Project: 104241
Buggy source:
/** 
 * Draws the background of the menu.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  AntialiasingManager.activateAntialiasing(g);
  super.paintBackground(g,menuItem,bgColor);
  ButtonModel model=menuItem.getModel();
  Color oldColor=g.getColor();
  int menuWidth=menuItem.getWidth();
  int menuHeight=menuItem.getHeight();
  if (menuItem.isOpaque()) {
    if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) {
      g.setColor(bgColor);
      g.fillRoundRect(0,0,menuWidth,menuHeight,5,5);
      g.setColor(SIPCommLookAndFeel.getControlDarkShadow());
      g.drawRoundRect(0,0,menuWidth - 1,menuHeight - 1,5,5);
    }
 else {
      g.setColor(menuItem.getBackground());
      g.fillRoundRect(0,0,menuWidth,menuHeight,5,5);
    }
    g.setColor(oldColor);
  }
}

Fixed version (ground truth):
/** 
 * Draws the background of the menu.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  super.paintBackground(g,menuItem,bgColor);
  g=g.create();
  try {
    internalPaintBackground(g,menuItem,bgColor);
  }
  finally {
    g.dispose();
  }
}
Program: 104242
Project: 104242
Buggy source:
/** 
 * Draws the background of the menu item.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  AntialiasingManager.activateAntialiasing(g);
  int menuWidth=menuItem.getWidth();
  int menuHeight=menuItem.getHeight();
  g.drawImage(menuBgImage,0,0,menuWidth,menuHeight,null);
}

Fixed version (ground truth):
/** 
 * Draws the background of the menu item.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  g=g.create();
  try {
    AntialiasingManager.activateAntialiasing(g);
    int menuWidth=menuItem.getWidth();
    int menuHeight=menuItem.getHeight();
    g.drawImage(menuBgImage,0,0,menuWidth,menuHeight,null);
  }
  finally {
    g.dispose();
  }
}
Program: 104243
Project: 104243
Buggy source:
/** 
 * Draws the background of the menu.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  AntialiasingManager.activateAntialiasing(g);
  super.paintBackground(g,menuItem,bgColor);
  Color oldColor=g.getColor();
  int menuWidth=menuItem.getWidth();
  int menuHeight=menuItem.getHeight();
  if (menuItem.isSelected()) {
    g.setColor(Color.LIGHT_GRAY);
    g.fillRoundRect(0,0,menuWidth,menuHeight,8,8);
  }
  g.setColor(oldColor);
}

Fixed version (ground truth):
/** 
 * Draws the background of the menu.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  super.paintBackground(g,menuItem,bgColor);
  g=g.create();
  try {
    internalPaintBackground(g,menuItem,bgColor);
  }
  finally {
    g.dispose();
  }
}
Program: 104244
Project: 104244
Buggy source:
protected void paintTabBackground(Graphics g,int tabPlacement,int tabIndex,int x,int y,int w,int h,boolean isSelected){
  BufferedImage leftImg=null;
  BufferedImage middleImg=null;
  BufferedImage rightImg=null;
  Graphics2D g2=(Graphics2D)g;
  AntialiasingManager.activateAntialiasing(g2);
  int tabOverlap=0;
  if (isSelected) {
    if (tabPane.isEnabledAt(tabIndex)) {
      leftImg=UtilActivator.getImage(SELECTED_TAB_LEFT_BG);
      middleImg=UtilActivator.getImage(SELECTED_TAB_MIDDLE_BG);
      rightImg=UtilActivator.getImage(SELECTED_TAB_RIGHT_BG);
      tabOverlap=TAB_OVERLAP;
    }
 else {
      leftImg=UtilActivator.getImage(TAB_LEFT_BG);
      middleImg=UtilActivator.getImage(TAB_MIDDLE_BG);
      rightImg=UtilActivator.getImage(TAB_RIGHT_BG);
    }
  }
 else {
    leftImg=UtilActivator.getImage(TAB_LEFT_BG);
    middleImg=UtilActivator.getImage(TAB_MIDDLE_BG);
    rightImg=UtilActivator.getImage(TAB_RIGHT_BG);
  }
  g2.drawImage(leftImg,x,y,null);
  g2.drawImage(middleImg,x + leftImg.getWidth(),y,w - leftImg.getWidth() - rightImg.getWidth() + tabOverlap,leftImg.getHeight(),null);
  g2.drawImage(rightImg,x + w - rightImg.getWidth() + tabOverlap,y,null);
}

Fixed version (ground truth):
protected void paintTabBackground(Graphics g,int tabPlacement,int tabIndex,int x,int y,int w,int h,boolean isSelected){
  g=g.create();
  try {
    internalPaintTabBackground(g,tabPlacement,tabIndex,x,y,w,h,isSelected);
  }
  finally {
    g.dispose();
  }
}
Program: 104246
Project: 104246
Buggy source:
/** 
 * Draws the background of the menu.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  super.paintBackground(g,menuItem,bgColor);
  g=g.create();
  try {
    internalPaintBackground(g,menuItem,bgColor);
  }
  finally {
    g.dispose();
  }
}

Fixed version (ground truth):
/** 
 * Draws the background of the menu.
 * @param g the paint graphics
 * @param menuItem menu item to be painted
 * @param bgColor selection background color
 * @since 1.4
 */
protected void paintBackground(Graphics g,JMenuItem menuItem,Color bgColor){
  if (menuItem.isSelected()) {
    g=g.create();
    try {
      AntialiasingManager.activateAntialiasing(g);
      int menuWidth=menuItem.getWidth();
      int menuHeight=menuItem.getHeight();
      g.setColor(Color.LIGHT_GRAY);
      g.fillRoundRect(0,0,menuWidth,menuHeight,8,8);
    }
  finally {
      g.dispose();
    }
  }
 else {
    super.paintBackground(g,menuItem,bgColor);
  }
}
Program: 104248
Project: 104248
Buggy source:
/** 
 * Initializes and constructs this panel.
 */
public MainCallPanel(MainFrame mainFrame){
  super(new BorderLayout());
  this.mainFrame=mainFrame;
  this.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
  this.dialpadDialog=new DialpadDialog(this);
  phoneNumberCombo.setEditable(true);
  callButton.setEnabled(false);
  this.add(comboPanel,BorderLayout.NORTH);
  callViaPanel.add(callViaLabel);
  callViaPanel.add(accountSelectorBox);
  buttonsPanel.add(callButton);
  phoneNumberCombo.setOpaque(false);
  comboPanel.add(dialButton,BorderLayout.WEST);
  comboPanel.add(phoneNumberCombo,BorderLayout.CENTER);
  comboPanel.add(buttonsPanel,BorderLayout.EAST);
  callButton.setName(CALL_BUTTON);
  dialButton.setName(DIAL_BUTTON);
  callButton.setToolTipText(GuiActivator.getResources().getI18NString("String_Node_Str"));
  callButton.addActionListener(this);
  dialButton.addActionListener(this);
  this.initPluginComponents();
}

Fixed version (ground truth):
/** 
 * Initializes and constructs this panel.
 */
public MainCallPanel(MainFrame mainFrame){
  super(new BorderLayout());
  this.mainFrame=mainFrame;
  this.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
  this.dialpadDialog=new DialpadDialog(this);
  phoneNumberCombo.setEditable(true);
  callButton.setEnabled(false);
  this.add(comboPanel,BorderLayout.NORTH);
  callViaPanel.add(callViaLabel);
  callViaPanel.add(accountSelectorBox);
  buttonsPanel.add(callButton);
  phoneNumberCombo.setOpaque(false);
  comboPanel.add(createDialButton(),BorderLayout.WEST);
  comboPanel.add(phoneNumberCombo,BorderLayout.CENTER);
  comboPanel.add(buttonsPanel,BorderLayout.EAST);
  callButton.setName(CALL_BUTTON);
  callButton.setToolTipText(GuiActivator.getResources().getI18NString("String_Node_Str"));
  callButton.addActionListener(this);
  this.initPluginComponents();
}
Program: 104249
Project: 104249
Buggy source:
/** 
 * Removes the account corresponding to the given protocol provider from this menu.
 * @param protocolProvider the protocol provider corresponding to theaccount to remove.
 */
private void removeAccount(ProtocolProviderService protocolProvider){
  Object selector=this.accountSelectors.get(protocolProvider.getAccountID());
  if (menu instanceof Container)   ((Container)menu).remove((Component)selector);
 else   ((MenuContainer)menu).remove((MenuComponent)selector);
}

Fixed version (ground truth):
/** 
 * Removes the account corresponding to the given protocol provider from this menu.
 * @param protocolProvider the protocol provider corresponding to theaccount to remove.
 */
private void removeAccount(ProtocolProviderService protocolProvider){
  Object selector=this.accountSelectors.get(protocolProvider.getAccountID());
  Object selectorMenu;
  if (selector instanceof StatusSimpleSelector)   selectorMenu=((StatusSimpleSelector)selector).getMenu();
 else   selectorMenu=((StatusSelector)selector).getMenu();
  if (menu instanceof Container)   ((Container)menu).remove((Component)selectorMenu);
 else   ((MenuContainer)menu).remove((MenuComponent)selectorMenu);
}
Program: 104250
Project: 104250
Buggy source:
/** 
 * Puts a the <tt>SendSteam</tt>s of a specific <tt>RTPManager</tt> on/off hold i.e. stops/starts them.
 * @param rtpManager the <tt>RTPManager</tt> to have its<tt>SendStream</tt>s on/off hold i.e. stopped/started
 * @param on <tt>true</tt> to have the <tt>SendStream</tt>s of<tt>rtpManager</tt> put on hold i.e. stopped; <tt>false</tt>, otherwise
 */
private void putOnHold(RTPManager rtpManager,boolean on){
  for (Iterator sendStreamIter=rtpManager.getSendStreams().iterator(); sendStreamIter.hasNext(); ) {
    SendStream sendStream=(SendStream)sendStreamIter.next();
    if (on) {
      try {
        sendStream.getDataSource().stop();
        sendStream.stop();
      }
 catch (      IOException ex) {
        logger.warn("String_Node_Str",ex);
      }
    }
 else {
      try {
        sendStream.getDataSource().start();
        sendStream.start();
      }
 catch (      IOException ex) {
        logger.warn("String_Node_Str",ex);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Puts a the <tt>SendSteam</tt>s of a specific <tt>RTPManager</tt> on/off hold i.e. stops/starts them.
 * @param rtpManager the <tt>RTPManager</tt> to have its<tt>SendStream</tt>s on/off hold i.e. stopped/started
 * @param on <tt>true</tt> to have the <tt>SendStream</tt>s of<tt>rtpManager</tt> put on hold i.e. stopped; <tt>false</tt>, otherwise
 */
private void putOnHold(RTPManager rtpManager,boolean on){
  for (Iterator<SendStream> sendStreamIter=rtpManager.getSendStreams().iterator(); sendStreamIter.hasNext(); ) {
    SendStream sendStream=sendStreamIter.next();
    if (on) {
      try {
        sendStream.getDataSource().stop();
        sendStream.stop();
      }
 catch (      IOException ex) {
        logger.warn("String_Node_Str",ex);
      }
    }
 else {
      try {
        sendStream.getDataSource().start();
        sendStream.start();
      }
 catch (      IOException ex) {
        logger.warn("String_Node_Str",ex);
      }
    }
  }
}
Program: 104251
Project: 104251
Buggy source:
/** 
 * Returns a <tt>Hashtable</tt> mapping media types (e.g. audio or video) to lists of JMF encoding strings corresponding to the SDP formats specified in the <tt>mediaDescriptions</tt> vector.
 * @param mediaDescriptions a <tt>Vector</tt> containing<tt>MediaDescription</tt> instances extracted from an SDP offer or answer.
 * @return a <tt>Hashtable</tt> mapping media types (e.g. audio or video) tolists of JMF encoding strings corresponding to the SDP formats specified in the <tt>mediaDescriptions</tt> vector.
 */
private Hashtable<String,List<String>> extractMediaEncodings(Vector mediaDescriptions){
  Hashtable<String,List<String>> mediaEncodings=new Hashtable<String,List<String>>(2);
  Iterator descriptionsIter=mediaDescriptions.iterator();
  while (descriptionsIter.hasNext()) {
    MediaDescription mediaDescription=(MediaDescription)descriptionsIter.next();
    Media media=mediaDescription.getMedia();
    Vector mediaFormats=null;
    String mediaType=null;
    try {
      mediaFormats=media.getMediaFormats(true);
      mediaType=media.getMediaType();
    }
 catch (    SdpParseException ex) {
      logger.warn("String_Node_Str",ex);
      continue;
    }
    if (mediaFormats.size() > 0) {
      List<String> jmfEncodings=MediaUtils.sdpToJmfEncodings(mediaFormats);
      if (jmfEncodings.size() > 0)       mediaEncodings.put(mediaType,jmfEncodings);
    }
  }
  logger.trace("String_Node_Str" + mediaEncodings);
  return mediaEncodings;
}

Fixed version (ground truth):
/** 
 * Returns a <tt>Hashtable</tt> mapping media types (e.g. audio or video) to lists of JMF encoding strings corresponding to the SDP formats specified in the <tt>mediaDescriptions</tt> vector.
 * @param mediaDescriptions a <tt>Vector</tt> containing<tt>MediaDescription</tt> instances extracted from an SDP offer or answer.
 * @return a <tt>Hashtable</tt> mapping media types (e.g. audio or video) tolists of JMF encoding strings corresponding to the SDP formats specified in the <tt>mediaDescriptions</tt> vector.
 */
private Hashtable<String,List<String>> extractMediaEncodings(Vector<MediaDescription> mediaDescriptions){
  Hashtable<String,List<String>> mediaEncodings=new Hashtable<String,List<String>>(2);
  Iterator<MediaDescription> descriptionsIter=mediaDescriptions.iterator();
  while (descriptionsIter.hasNext()) {
    MediaDescription mediaDescription=descriptionsIter.next();
    Media media=mediaDescription.getMedia();
    Vector<String> mediaFormats=null;
    String mediaType=null;
    try {
      mediaFormats=media.getMediaFormats(true);
      mediaType=media.getMediaType();
    }
 catch (    SdpParseException ex) {
      logger.warn("String_Node_Str",ex);
      continue;
    }
    if (mediaFormats.size() > 0) {
      List<String> jmfEncodings=MediaUtils.sdpToJmfEncodings(mediaFormats);
      if (jmfEncodings.size() > 0)       mediaEncodings.put(mediaType,jmfEncodings);
    }
  }
  logger.trace("String_Node_Str" + mediaEncodings);
  return mediaEncodings;
}
Program: 104254
Project: 104254
Buggy source:
/** 
 * Method for getting the default secure status value for communication
 * @return the default enabled/disabled status value for securecommunication
 */
public boolean getSecureCommunicationStatus(){
  return usingSRTP;
}

Fixed version (ground truth):
/** 
 * Method for getting the default secure status value for communication
 * @return the default enabled/disabled status value for securecommunication
 */
public boolean getSecureCommunicationStatus(){
  return usingZRTP;
}
Program: 104255
Project: 104255
Buggy source:
/** 
 * The method is meant for use by protocol service implementations upon reception of an SDP answer in response to an offer sent by us earlier.
 * @param sdpAnswerStr the SDP answer that we'd like to handle.
 * @param responder the participant that has sent the answer.
 * @throws MediaException code SERVICE_NOT_STARTED if this method is calledbefore the service was started.
 * @throws ParseException if sdpAnswerStr does not contain a valid sdpString.
 */
public void processSdpAnswer(CallParticipant responder,String sdpAnswerStr) throws MediaException, ParseException {
  logger.trace("String_Node_Str" + sdpAnswerStr);
  SessionDescription sdpAnswer=null;
  try {
    sdpAnswer=mediaServCallback.getSdpFactory().createSessionDescription(sdpAnswerStr);
  }
 catch (  SdpParseException ex) {
    throw new ParseException("String_Node_Str" + ex.getMessage(),ex.getCharOffset());
  }
  setCallURL(sdpAnswer.getURI());
  Vector mediaDescriptions=null;
  try {
    mediaDescriptions=sdpAnswer.getMediaDescriptions(true);
  }
 catch (  SdpException exc) {
    logger.error("String_Node_Str",exc);
    throw new MediaException("String_Node_Str",MediaException.INTERNAL_ERROR,exc);
  }
  this.initStreamTargets(sdpAnswer.getConnection(),mediaDescriptions);
  createSendStreams(mediaDescriptions);
}

Fixed version (ground truth):
/** 
 * The method is meant for use by protocol service implementations upon reception of an SDP answer in response to an offer sent by us earlier.
 * @param sdpAnswerStr the SDP answer that we'd like to handle.
 * @param responder the participant that has sent the answer.
 * @throws MediaException code SERVICE_NOT_STARTED if this method is calledbefore the service was started.
 * @throws ParseException if sdpAnswerStr does not contain a valid sdpString.
 */
public void processSdpAnswer(CallParticipant responder,String sdpAnswerStr) throws MediaException, ParseException {
  logger.trace("String_Node_Str" + sdpAnswerStr);
  SessionDescription sdpAnswer=null;
  try {
    sdpAnswer=mediaServCallback.getSdpFactory().createSessionDescription(sdpAnswerStr);
  }
 catch (  SdpParseException ex) {
    throw new ParseException("String_Node_Str" + ex.getMessage(),ex.getCharOffset());
  }
  setCallURL(sdpAnswer.getURI());
  Vector<MediaDescription> mediaDescriptions=null;
  try {
    mediaDescriptions=sdpAnswer.getMediaDescriptions(true);
  }
 catch (  SdpException exc) {
    logger.error("String_Node_Str",exc);
    throw new MediaException("String_Node_Str",MediaException.INTERNAL_ERROR,exc);
  }
  this.initStreamTargets(sdpAnswer.getConnection(),mediaDescriptions);
  createSendStreams(mediaDescriptions);
}