nus-yam/ex-repair huggingface dataset:
Program: 103700
Project: 103700
Buggy source:
/** 
 * Creates a media <tt>StreamConnector</tt>. The method takes into account the minimum and maximum media port boundaries.
 * @return a new <tt>StreamConnector</tt>.
 * @throws OperationFailedException if we fail binding the the sockets.
 */
private StreamConnector createStreamConnector() throws OperationFailedException {
  NetworkAddressManagerService nam=SipActivator.getNetworkAddressManagerService();
  InetAddress intendedDestination=peer.getProtocolProvider().getIntendedDestination(peer.getPeerAddress());
  InetAddress localHostForPeer=nam.getLocalHost(intendedDestination);
  initializePortNumbers();
  DatagramSocket rtpSocket=null;
  try {
    rtpSocket=nam.createDatagramSocket(localHostForPeer,nextMediaPortToTry,minMediaPort,maxMediaPort);
  }
 catch (  Exception exc) {
    ProtocolProviderServiceSipImpl.throwOperationFailedException("String_Node_Str",OperationFailedException.INTERNAL_ERROR,exc,logger);
  }
  nextMediaPortToTry=rtpSocket.getLocalPort() + 1;
  DatagramSocket rtcpSocket=null;
  try {
    rtcpSocket=nam.createDatagramSocket(localHostForPeer,nextMediaPortToTry,minMediaPort,maxMediaPort);
  }
 catch (  Exception exc) {
    ProtocolProviderServiceSipImpl.throwOperationFailedException("String_Node_Str",OperationFailedException.INTERNAL_ERROR,exc,logger);
  }
  nextMediaPortToTry=rtcpSocket.getLocalPort() + 1;
  if (nextMediaPortToTry > maxMediaPort)   nextMediaPortToTry=minMediaPort;
  DefaultStreamConnector connector=new DefaultStreamConnector(rtpSocket,rtcpSocket);
  return connector;
}

Fixed version (ground truth):
/** 
 * Creates a media <tt>StreamConnector</tt>. The method takes into account the minimum and maximum media port boundaries.
 * @return a new <tt>StreamConnector</tt>.
 * @throws OperationFailedException if we fail binding the the sockets.
 */
private StreamConnector createStreamConnector() throws OperationFailedException {
  NetworkAddressManagerService nam=SipActivator.getNetworkAddressManagerService();
  InetAddress intendedDestination=peer.getProtocolProvider().getIntendedDestination(peer.getPeerAddress());
  InetAddress localHostForPeer=nam.getLocalHost(intendedDestination);
  initializePortNumbers();
  DatagramSocket rtpSocket=null;
  try {
    rtpSocket=nam.createDatagramSocket(localHostForPeer,nextMediaPortToTry,minMediaPort,maxMediaPort);
  }
 catch (  Exception exc) {
    ProtocolProviderServiceSipImpl.throwOperationFailedException("String_Node_Str",OperationFailedException.INTERNAL_ERROR,exc,logger);
  }
  nextMediaPortToTry=rtpSocket.getLocalPort() + 1;
  DatagramSocket rtcpSocket=null;
  try {
    rtcpSocket=nam.createDatagramSocket(localHostForPeer,nextMediaPortToTry,minMediaPort,maxMediaPort);
  }
 catch (  Exception exc) {
    ProtocolProviderServiceSipImpl.throwOperationFailedException("String_Node_Str",OperationFailedException.INTERNAL_ERROR,exc,logger);
  }
  nextMediaPortToTry=rtcpSocket.getLocalPort() + 1;
  if (nextMediaPortToTry > maxMediaPort - 1)   nextMediaPortToTry=minMediaPort;
  DefaultStreamConnector connector=new DefaultStreamConnector(rtpSocket,rtcpSocket);
  return connector;
}
Program: 103701
Project: 103701
Buggy source:
/** 
 * Initializes a new <tt>QuickTimeStream</tt> instance which is to have its <tt>Format</tt>-related information abstracted by a specific <tt>FormatControl</tt>.
 * @param formatControl the <tt>FormatControl</tt> which is to abstract the<tt>Format</tt>-related information of the new instance
 */
QuickTimeStream(FormatControl formatControl){
  super(formatControl);
  if (formatControl != null) {
    Format format=formatControl.getFormat();
    if (format != null)     setCaptureOutputFormat(format);
  }
  captureOutput.setAutomaticallyDropsLateVideoFrames(true);
  captureOutput.setDelegate(new QTCaptureDecompressedVideoOutput.Delegate(){
    /** 
 * Notifies this <tt>Delegate</tt> that the <tt>QTCaptureOutput</tt> to which it is set has output a specific <tt>CVImageBuffer</tt> representing a video frame with a specific <tt>QTSampleBuffer</tt>.
 * @param videoFrame the <tt>CVImageBuffer</tt> whichrepresents the output video frame
 * @param sampleBuffer the <tt>QTSampleBuffer</tt> whichrepresents additional details about the output video samples
 */
    public void outputVideoFrameWithSampleBuffer(    CVImageBuffer videoFrame,    QTSampleBuffer sampleBuffer){
      captureOutputDidOutputVideoFrameWithSampleBuffer(captureOutput,videoFrame,sampleBuffer);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Initializes a new <tt>QuickTimeStream</tt> instance which is to have its <tt>Format</tt>-related information abstracted by a specific <tt>FormatControl</tt>.
 * @param formatControl the <tt>FormatControl</tt> which is to abstract the<tt>Format</tt>-related information of the new instance
 */
QuickTimeStream(FormatControl formatControl){
  super(formatControl);
  if (formatControl != null) {
    Format format=formatControl.getFormat();
    if (format != null)     setCaptureOutputFormat(format);
  }
  automaticallyDropsLateVideoFrames=false;
  captureOutput.setDelegate(new QTCaptureDecompressedVideoOutput.Delegate(){
    /** 
 * Notifies this <tt>Delegate</tt> that the <tt>QTCaptureOutput</tt> to which it is set has output a specific <tt>CVImageBuffer</tt> representing a video frame with a specific <tt>QTSampleBuffer</tt>.
 * @param videoFrame the <tt>CVImageBuffer</tt> whichrepresents the output video frame
 * @param sampleBuffer the <tt>QTSampleBuffer</tt> whichrepresents additional details about the output video samples
 */
    public void outputVideoFrameWithSampleBuffer(    CVImageBuffer videoFrame,    QTSampleBuffer sampleBuffer){
      captureOutputDidOutputVideoFrameWithSampleBuffer(captureOutput,videoFrame,sampleBuffer);
    }
  }
);
}
Program: 103702
Project: 103702
Buggy source:
/** 
 * Reads media data from this <tt>PushBufferStream</tt> into a specific <tt>Buffer</tt> without blocking.
 * @param buffer the <tt>Buffer</tt> in which media data is to be read fromthis <tt>PushBufferStream</tt>
 * @throws IOException if anything goes wrong while reading media data fromthis <tt>PushBufferStream</tt> into the specified <tt>buffer</tt>
 */
public void read(Buffer buffer) throws IOException {
synchronized (dataSyncRoot) {
    if (data == null)     buffer.setLength(0);
 else {
      buffer.setData(data);
      buffer.setFlags(Buffer.FLAG_LIVE_DATA | Buffer.FLAG_SYSTEM_TIME);
      if (dataFormat != null)       buffer.setFormat(dataFormat);
      buffer.setLength(data.length);
      buffer.setOffset(0);
      buffer.setTimeStamp(dataTimeStamp);
      data=null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Reads media data from this <tt>PushBufferStream</tt> into a specific <tt>Buffer</tt> without blocking.
 * @param buffer the <tt>Buffer</tt> in which media data is to be read fromthis <tt>PushBufferStream</tt>
 * @throws IOException if anything goes wrong while reading media data fromthis <tt>PushBufferStream</tt> into the specified <tt>buffer</tt>
 */
public void read(Buffer buffer) throws IOException {
synchronized (dataSyncRoot) {
    if (data == null)     buffer.setLength(0);
 else {
      buffer.setData(data);
      buffer.setFlags(Buffer.FLAG_LIVE_DATA | Buffer.FLAG_SYSTEM_TIME);
      if (dataFormat != null)       buffer.setFormat(dataFormat);
      buffer.setLength(data.length);
      buffer.setOffset(0);
      buffer.setTimeStamp(dataTimeStamp);
      data=null;
      if (!automaticallyDropsLateVideoFrames)       dataSyncRoot.notifyAll();
    }
  }
}
Program: 103703
Project: 103703
Buggy source:
/** 
 * Stops the transfer of media data from this <tt>PushBufferStream</tt>.
 * @throws IOException if anything goes wrong while stopping the transfer ofmedia data from this <tt>PushBufferStream</tt>
 */
@Override public void stop() throws IOException {
synchronized (dataSyncRoot) {
    data=null;
    dataFormat=null;
  }
}

Fixed version (ground truth):
/** 
 * Stops the transfer of media data from this <tt>PushBufferStream</tt>.
 * @throws IOException if anything goes wrong while stopping the transfer ofmedia data from this <tt>PushBufferStream</tt>
 */
@Override public void stop() throws IOException {
  transferDataThread=null;
synchronized (dataSyncRoot) {
    data=null;
    dataFormat=null;
    nextData=null;
    nextDataFormat=null;
    if (!automaticallyDropsLateVideoFrames)     dataSyncRoot.notifyAll();
  }
}
Program: 103705
Project: 103705
Buggy source:
/** 
 * Notifies this instance that its <tt>QTCaptureOutput</tt> has output a specific <tt>CVImageBuffer</tt> representing a video frame with a specific <tt>QTSampleBuffer</tt>.
 * @param captureOutput the <tt>QTCaptureOutput</tt> which has output avideo frame
 * @param videoFrame the <tt>CVImageBuffer</tt> which represents the outputvideo frame
 * @param sampleBuffer the <tt>QTSampleBuffer</tt> which representsadditional details about the output video samples
 */
private void captureOutputDidOutputVideoFrameWithSampleBuffer(QTCaptureOutput captureOutput,CVImageBuffer videoFrame,QTSampleBuffer sampleBuffer){
  CVPixelBuffer pixelBuffer=(CVPixelBuffer)videoFrame;
  boolean transferData;
synchronized (dataSyncRoot) {
    data=pixelBuffer.getBytes();
    dataTimeStamp=System.nanoTime();
    transferData=(data != null);
    if (dataFormat == null)     dataFormat=getVideoFrameFormat(pixelBuffer);
  }
  if (transferData) {
    BufferTransferHandler transferHandler=this.transferHandler;
    if (transferHandler != null)     transferHandler.transferData(this);
  }
}

Fixed version (ground truth):
/** 
 * Notifies this instance that its <tt>QTCaptureOutput</tt> has output a specific <tt>CVImageBuffer</tt> representing a video frame with a specific <tt>QTSampleBuffer</tt>.
 * @param captureOutput the <tt>QTCaptureOutput</tt> which has output avideo frame
 * @param videoFrame the <tt>CVImageBuffer</tt> which represents the outputvideo frame
 * @param sampleBuffer the <tt>QTSampleBuffer</tt> which representsadditional details about the output video samples
 */
private void captureOutputDidOutputVideoFrameWithSampleBuffer(QTCaptureOutput captureOutput,CVImageBuffer videoFrame,QTSampleBuffer sampleBuffer){
  CVPixelBuffer pixelBuffer=(CVPixelBuffer)videoFrame;
  boolean transferData;
synchronized (dataSyncRoot) {
    if (!automaticallyDropsLateVideoFrames && (data != null)) {
      nextData=pixelBuffer.getBytes();
      nextDataTimeStamp=System.nanoTime();
      if (nextDataFormat == null)       nextDataFormat=getVideoFrameFormat(pixelBuffer);
      return;
    }
    data=pixelBuffer.getBytes();
    dataTimeStamp=System.nanoTime();
    if (dataFormat == null)     dataFormat=getVideoFrameFormat(pixelBuffer);
    nextData=null;
    if (automaticallyDropsLateVideoFrames)     transferData=(data != null);
 else {
      transferData=false;
      dataSyncRoot.notifyAll();
    }
  }
  if (transferData) {
    BufferTransferHandler transferHandler=this.transferHandler;
    if (transferHandler != null)     transferHandler.transferData(this);
  }
}
Program: 103706
Project: 103706
Buggy source:
/** 
 * Creates an instance of <tt>MainFrame</tt>.
 */
public MainFrame(){
  if (!ConfigurationManager.isWindowDecorated()) {
    this.setUndecorated(true);
  }
  this.searchField=new SearchField(this);
  this.contactListPanel=new ContactListPane(this);
  this.accountStatusPanel=new AccountStatusPanel(this);
  menu=new MainMenu(this);
  this.addWindowListener(new WindowAdapter(){
    public void windowClosed(    WindowEvent event){
      MainFrame.this.windowClosed(event);
    }
  }
);
  this.initTitleFont();
  ResourceManagementService resources=GuiActivator.getResources();
  String applicationName=resources.getSettingsString("String_Node_Str");
  this.setTitle(applicationName);
  this.mainPanel.setBackground(new Color(GuiActivator.getResources().getColor("String_Node_Str")));
  KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new MainKeyDispatcher());
  this.init();
  this.initPluginComponents();
}

Fixed version (ground truth):
/** 
 * Creates an instance of <tt>MainFrame</tt>.
 */
public MainFrame(){
  if (!ConfigurationManager.isWindowDecorated()) {
    this.setUndecorated(true);
  }
  this.searchField=new SearchField(this);
  this.contactListPanel=new ContactListPane(this);
  this.accountStatusPanel=new AccountStatusPanel(this);
  menu=new MainMenu(this);
  this.addWindowListener(new WindowAdapter(){
    public void windowClosed(    WindowEvent event){
      MainFrame.this.windowClosed(event);
    }
    public void windowActivated(    WindowEvent event){
      ConfigurationManager.setApplicationVisible(true);
    }
    public void windowOpened(    WindowEvent event){
      ConfigurationManager.setApplicationVisible(true);
    }
  }
);
  this.initTitleFont();
  ResourceManagementService resources=GuiActivator.getResources();
  String applicationName=resources.getSettingsString("String_Node_Str");
  this.setTitle(applicationName);
  this.mainPanel.setBackground(new Color(GuiActivator.getResources().getColor("String_Node_Str")));
  KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new MainKeyDispatcher());
  this.init();
  this.initPluginComponents();
}
Program: 103707
Project: 103707
Buggy source:
public boolean dispatchKeyEvent(KeyEvent e){
  if (!isFocused() || e.getID() != KeyEvent.KEY_PRESSED)   return false;
  TreeContactList contactList=getContactListPanel().getContactList();
  if (searchField.isFocusOwner() && (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_PAGE_UP || e.getKeyCode() == KeyEvent.VK_PAGE_DOWN)) {
    contactList.selectFirstContact();
    contactList.requestFocus();
    return false;
  }
  if (contactList.isFocusOwner() && e.getKeyCode() == KeyEvent.VK_ESCAPE) {
    contactList.removeSelectionRows(contactList.getSelectionRows());
    if (searchField.getText() != null) {
      searchField.requestFocus();
    }
    return false;
  }
  TreePath selectionPath=contactList.getSelectionPath();
  if (e.getKeyChar() == KeyEvent.CHAR_UNDEFINED || e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_BACK_SPACE || e.getKeyCode() == KeyEvent.VK_TAB || e.getKeyCode() == KeyEvent.VK_SPACE || (selectionPath != null && selectionPath.getLastPathComponent() instanceof GroupNode && (e.getKeyChar() == '+' || e.getKeyChar() == '-'))) {
    return false;
  }
  if (!searchField.isFocusOwner()) {
    String searchText="String_Node_Str";
    if (searchField.getText() != null)     searchText+=searchField.getText() + e.getKeyChar();
 else     searchText+=e.getKeyChar();
    searchField.setText(searchText);
    searchField.requestFocus();
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean dispatchKeyEvent(KeyEvent e){
  if (!isFocused() || e.getID() != KeyEvent.KEY_PRESSED)   return false;
  TreeContactList contactList=getContactListPanel().getContactList();
  if (searchField.isFocusOwner() && (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_PAGE_UP || e.getKeyCode() == KeyEvent.VK_PAGE_DOWN)) {
    contactList.selectFirstContact();
    contactList.requestFocus();
    return false;
  }
  if (contactList.isFocusOwner() && e.getKeyCode() == KeyEvent.VK_ESCAPE) {
    contactList.removeSelectionRows(contactList.getSelectionRows());
    if (searchField.getText() != null) {
      searchField.requestFocus();
    }
    return false;
  }
  TreePath selectionPath=contactList.getSelectionPath();
  if (e.getKeyChar() == KeyEvent.CHAR_UNDEFINED || e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_DELETE || e.getKeyCode() == KeyEvent.VK_BACK_SPACE || e.getKeyCode() == KeyEvent.VK_TAB || e.getKeyCode() == KeyEvent.VK_SPACE || (selectionPath != null && selectionPath.getLastPathComponent() instanceof GroupNode && (e.getKeyChar() == '+' || e.getKeyChar() == '-'))) {
    return false;
  }
  if (!searchField.isFocusOwner()) {
    String searchText="String_Node_Str";
    if (searchField.getText() != null)     searchText+=searchField.getText() + e.getKeyChar();
 else     searchText+=e.getKeyChar();
    searchField.setText(searchText);
    searchField.requestFocus();
    return true;
  }
  return false;
}
Program: 103710
Project: 103710
Buggy source:
/** 
 * Paints the MENU_BACKGROUND image on the background of this container.
 * @param g the Graphics object that does the painting
 */
public void paintComponent(Graphics g){
  super.paintComponent(g);
  Image backgroundImage=ImageLoader.getImage(ImageLoader.MENU_BACKGROUND);
  g.drawImage(backgroundImage,0,0,getWidth(),getHeight(),null);
}

Fixed version (ground truth):
/** 
 * Paints the MENU_BACKGROUND image on the background of this container.
 * @param g the <tt>Graphics</tt> object that does the painting
 */
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Image backgroundImage=ImageLoader.getImage(ImageLoader.MENU_BACKGROUND);
  g.drawImage(backgroundImage,0,0,getWidth(),getHeight(),this);
}
Program: 103712
Project: 103712
Buggy source:
/** 
 * Convert image bytes (scale/format).
 * @param dst destination image. Its type must be an array (int[], byte[] or short[])
 * @param dst_pix_fmt destination format
 * @param src source image. Its type must be an array (int[], byte[] or short[])
 * @param width original width
 * @param height original height
 * @param newWidth new width
 * @param newHeight new height
 */
public static native int img_convert(Object dst,int dst_pix_fmt,Object src,int pix_fmt,int width,int height,int newWidth,int newHeight);

Fixed version (ground truth):
/** 
 * Convert image bytes (scale/format).
 * @param dst destination image. Its type must be an array (int[], byte[] or short[])
 * @param dst_pix_fmt destination format
 * @param src source image. Its type must be an array (int[], byte[] or short[])
 * @param pix_fmt the format of <tt>src</tt>
 * @param width original width
 * @param height original height
 * @param newWidth new width
 * @param newHeight new height
 */
public static native int img_convert(Object dst,int dst_pix_fmt,Object src,int pix_fmt,int width,int height,int newWidth,int newHeight);
Program: 103714
Project: 103714
Buggy source:
/** 
 * Sets the input format.
 * @param format format to set
 * @return format
 */
@Override public Format setInputFormat(Format format){
  VideoFormat videoFormat=(VideoFormat)format;
  if (videoFormat.getSize() == null)   return null;
  return super.setInputFormat(format);
}

Fixed version (ground truth):
/** 
 * Sets the input format.
 * @param format format to set
 * @return format
 */
@Override public Format setInputFormat(Format format){
  Format inputFormat=((format instanceof VideoFormat) && (((VideoFormat)format).getSize() == null)) ? null : super.setInputFormat(format);
  if (logger.isDebugEnabled() && (inputFormat != null))   logger.debug("String_Node_Str" + inputFormat);
  return inputFormat;
}
Program: 103715
Project: 103715
Buggy source:
/** 
 * Sets the <tt>Format</tt> in which this <tt>Codec</tt> is to output media data.
 * @param format the <tt>Format</tt> in which this <tt>Codec</tt> is tooutput media data
 * @return the <tt>Format</tt> in which this <tt>Codec</tt> is currentlyconfigured to output media data or <tt>null</tt> if <tt>format</tt> was found to be incompatible with this <tt>Codec</tt>
 */
@Override public Format setOutputFormat(Format format){
  Format outputFormat=super.setOutputFormat(format);
  if (logger.isDebugEnabled() && (outputFormat != null))   logger.debug("String_Node_Str" + ((VideoFormat)outputFormat).getSize());
  return outputFormat;
}

Fixed version (ground truth):
/** 
 * Sets the <tt>Format</tt> in which this <tt>Codec</tt> is to output media data.
 * @param format the <tt>Format</tt> in which this <tt>Codec</tt> is tooutput media data
 * @return the <tt>Format</tt> in which this <tt>Codec</tt> is currentlyconfigured to output media data or <tt>null</tt> if <tt>format</tt> was found to be incompatible with this <tt>Codec</tt>
 */
@Override public Format setOutputFormat(Format format){
  Format outputFormat=super.setOutputFormat(format);
  if (logger.isDebugEnabled() && (outputFormat != null))   logger.debug("String_Node_Str" + outputFormat);
  return outputFormat;
}
Program: 103718
Project: 103718
Buggy source:
/** 
 * Set output size.
 * @param size size to set
 */
public void setOutputSize(Dimension size){
  if (size == null) {
    size=new Dimension(640,480);
  }
  supportedOutputFormats[0]=new YUVFormat(size,-1,Format.byteArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1);
  supportedOutputFormats[1]=new YUVFormat(size,-1,Format.intArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1);
  supportedOutputFormats[2]=new YUVFormat(size,-1,Format.shortArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1);
  supportedOutputFormats[3]=new RGBFormat(size,-1,Format.byteArray,-1.0f,32,-1,-1,-1);
  supportedOutputFormats[4]=new RGBFormat(size,-1,Format.intArray,-1.0f,32,-1,-1,-1);
  supportedOutputFormats[5]=new RGBFormat(size,-1,Format.shortArray,-1.0f,32,-1,-1,-1);
  supportedOutputFormats[6]=new RGBFormat(size,-1,Format.byteArray,-1.0f,24,-1,-1,-1);
  supportedOutputFormats[7]=new RGBFormat(size,-1,Format.intArray,-1.0f,24,-1,-1,-1);
  supportedOutputFormats[8]=new RGBFormat(size,-1,Format.shortArray,-1.0f,24,-1,-1,-1);
}

Fixed version (ground truth):
/** 
 * Sets output size.
 * @param size size to set
 */
public void setOutputSize(Dimension size){
  if (size == null)   size=new Dimension(640,480);
  supportedOutputFormats[0]=new YUVFormat(size,-1,Format.byteArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1);
  supportedOutputFormats[1]=new YUVFormat(size,-1,Format.intArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1);
  supportedOutputFormats[2]=new YUVFormat(size,-1,Format.shortArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1);
  supportedOutputFormats[3]=new RGBFormat(size,-1,Format.byteArray,-1.0f,32,-1,-1,-1);
  supportedOutputFormats[4]=new RGBFormat(size,-1,Format.intArray,-1.0f,32,-1,-1,-1);
  supportedOutputFormats[5]=new RGBFormat(size,-1,Format.shortArray,-1.0f,32,-1,-1,-1);
  supportedOutputFormats[6]=new RGBFormat(size,-1,Format.byteArray,-1.0f,24,-1,-1,-1);
  supportedOutputFormats[7]=new RGBFormat(size,-1,Format.intArray,-1.0f,24,-1,-1,-1);
  supportedOutputFormats[8]=new RGBFormat(size,-1,Format.shortArray,-1.0f,24,-1,-1,-1);
}
Program: 103719
Project: 103719
Buggy source:
/** 
 * Set the input format.
 * @param format format to set
 * @return format
 */
@Override public Format setInputFormat(Format format){
  final VideoFormat videoFormat=(VideoFormat)format;
  if (videoFormat.getSize() == null)   return null;
  format=super.setInputFormat(format);
  return format;
}

Fixed version (ground truth):
/** 
 * Sets the input format.
 * @param format format to set
 * @return format
 */
@Override public Format setInputFormat(Format format){
  VideoFormat videoFormat=(VideoFormat)format;
  if (videoFormat.getSize() == null)   return null;
  return super.setInputFormat(format);
}
Program: 103720
Project: 103720
Buggy source:
/** 
 * Get native (FFMPEG) RGB format.
 * @param rgb JMF <tt>RGBFormat</tt>
 * @return native RGB format
 */
public static int getNativeRGBFormat(RGBFormat rgb){
  int fmt=0;
  if (rgb.getBitsPerPixel() == 32) {
switch (rgb.getRedMask()) {
case 1:
case 0xff:
      fmt=FFMPEG.PIX_FMT_BGR32;
    break;
case 2:
case (0xff << 8):
  fmt=FFMPEG.PIX_FMT_BGR32_1;
break;
case 3:
case (0xff << 16):
fmt=FFMPEG.PIX_FMT_RGB32;
break;
case 4:
case (0xff << 24):
fmt=FFMPEG.PIX_FMT_RGB32_1;
break;
default :
fmt=FFMPEG.PIX_FMT_RGB32;
break;
}
}
 else {
fmt=FFMPEG.PIX_FMT_RGB24;
}
return fmt;
}

Fixed version (ground truth):
/** 
 * Gets native (FFMPEG) RGB format.
 * @param rgb JMF <tt>RGBFormat</tt>
 * @return native RGB format
 */
public static int getNativeRGBFormat(RGBFormat rgb){
  int fmt;
  if (rgb.getBitsPerPixel() == 32) switch (rgb.getRedMask()) {
case 1:
case 0xff:
    fmt=FFMPEG.PIX_FMT_BGR32;
  break;
case 2:
case (0xff << 8):
fmt=FFMPEG.PIX_FMT_BGR32_1;
break;
case 3:
case (0xff << 16):
fmt=FFMPEG.PIX_FMT_RGB32;
break;
case 4:
case (0xff << 24):
fmt=FFMPEG.PIX_FMT_RGB32_1;
break;
default :
fmt=FFMPEG.PIX_FMT_RGB32;
break;
}
 else fmt=FFMPEG.PIX_FMT_RGB24;
return fmt;
}
Program: 103721
Project: 103721
Buggy source:
/** 
 * Get the supported input formats.
 * @return array of supported input format
 */
@Override public Format[] getSupportedInputFormats(){
  return supportedInputFormats;
}

Fixed version (ground truth):
/** 
 * Gets the supported input formats.
 * @return array of supported input format
 */
@Override public Format[] getSupportedInputFormats(){
  return supportedInputFormats;
}
Program: 103722
Project: 103722
Buggy source:
/** 
 * Get the supported output formats for an input ones.
 * @param input input format to convert
 * @return array of supported output format
 */
@Override public Format[] getSupportedOutputFormats(Format input){
  Dimension size=null;
  if (input == null) {
    return supportedOutputFormats;
  }
  size=((VideoFormat)supportedOutputFormats[0]).getSize();
  if (size != null) {
    return supportedOutputFormats;
  }
  size=((VideoFormat)input).getSize();
  return new Format[]{new YUVFormat(size,-1,Format.byteArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1),new YUVFormat(size,-1,Format.intArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1),new YUVFormat(size,-1,Format.shortArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1),new RGBFormat(size,-1,Format.byteArray,-1.0f,32,-1,-1,-1),new RGBFormat(size,-1,Format.intArray,-1.0f,32,-1,-1,-1),new RGBFormat(size,-1,Format.shortArray,-1.0f,32,-1,-1,-1),new RGBFormat(size,-1,Format.byteArray,-1.0f,24,-1,-1,-1),new RGBFormat(size,-1,Format.intArray,-1.0f,24,-1,-1,-1),new RGBFormat(size,-1,Format.shortArray,-1.0f,24,-1,-1,-1)};
}

Fixed version (ground truth):
/** 
 * Gets the supported output formats for an input one.
 * @param input input format to get supported output ones for
 * @return array of supported output formats
 */
@Override public Format[] getSupportedOutputFormats(Format input){
  if (input == null)   return supportedOutputFormats;
  Dimension size=((VideoFormat)supportedOutputFormats[0]).getSize();
  if (size != null)   return supportedOutputFormats;
  size=((VideoFormat)input).getSize();
  return new Format[]{new YUVFormat(size,-1,Format.byteArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1),new YUVFormat(size,-1,Format.intArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1),new YUVFormat(size,-1,Format.shortArray,-1.0f,YUVFormat.YUV_420,-1,-1,0,-1,-1),new RGBFormat(size,-1,Format.byteArray,-1.0f,32,-1,-1,-1),new RGBFormat(size,-1,Format.intArray,-1.0f,32,-1,-1,-1),new RGBFormat(size,-1,Format.shortArray,-1.0f,32,-1,-1,-1),new RGBFormat(size,-1,Format.byteArray,-1.0f,24,-1,-1,-1),new RGBFormat(size,-1,Format.intArray,-1.0f,24,-1,-1,-1),new RGBFormat(size,-1,Format.shortArray,-1.0f,24,-1,-1,-1)};
}
Program: 103723
Project: 103723
Buggy source:
/** 
 * Creates an Msn group using the specified <tt>RosterGroup</tt> as a source. The newly created group will always return the name of the underlying RosterGroup and would thus automatically adapt to changes. It would, however, not receive or try to poll for modifications of the buddies it contains and would therefore have to be updated manually by ServerStoredContactListImpl update will only be done if source group is changed.
 * @param msnGroup the Msn Group correspoinding to the group
 * @param groupMembers the group members that we should add to the group.
 * @param ssclCallback a callback to the server stored contact listwe're creating.
 * @param isResolved a boolean indicating whether or not the group has beenresolved against the server.
 */
ContactGroupMsnImpl(MsnGroup msnGroup,MsnContact[] groupMembers,ServerStoredContactListMsnImpl ssclCallback,boolean isResolved){
  this.msnGroup=msnGroup;
  this.isResolved=isResolved;
  this.ssclCallback=ssclCallback;
  for (int i=0; i < groupMembers.length; i++) {
    if (ssclCallback.findContactById(groupMembers[i].getEmail().getEmailAddress()) != null) {
      continue;
    }
    addContact(new ContactMsnImpl(groupMembers[i],ssclCallback,true,true));
  }
}

Fixed version (ground truth):
/** 
 * Creates an Msn group using the specified <tt>RosterGroup</tt> as a source. The newly created group will always return the name of the underlying RosterGroup and would thus automatically adapt to changes. It would, however, not receive or try to poll for modifications of the buddies it contains and would therefore have to be updated manually by ServerStoredContactListImpl update will only be done if source group is changed.
 * @param msnGroup the Msn Group corresponding to the group
 * @param groupMembers the group members that we should add to the group.
 * @param ssclCallback a callback to the server stored contact listwe're creating.
 * @param isResolved a boolean indicating whether or not the group has beenresolved against the server.
 */
ContactGroupMsnImpl(MsnGroup msnGroup,MsnContact[] groupMembers,ServerStoredContactListMsnImpl ssclCallback,boolean isResolved){
  this.msnGroup=msnGroup;
  this.isResolved=isResolved;
  this.ssclCallback=ssclCallback;
  for (  MsnContact groupMember : groupMembers) {
    if (ssclCallback.findContactById(groupMember.getEmail().getEmailAddress()) == null)     addContact(new ContactMsnImpl(groupMember,ssclCallback,true,true));
  }
}
Program: 103724
Project: 103724
Buggy source:
/** 
 * Returns the <tt>Contact</tt> with the specified address or identifier.
 * @param id the addres or identifier of the <tt>Contact</tt> we arelooking for.
 * @return the <tt>Contact</tt> with the specified id or address.
 */
public Contact getContact(String id){
  return this.findContact(id);
}

Fixed version (ground truth):
/** 
 * Returns the <tt>Contact</tt> with the specified address or identifier.
 * @param id the address or identifier of the <tt>Contact</tt> we arelooking for.
 * @return the <tt>Contact</tt> with the specified id or address.
 */
public Contact getContact(String id){
  return this.findContact(id);
}
Program: 103725
Project: 103725
Buggy source:
/** 
 * Returns an Iterator over all contacts, member of this <tt>ContactGroup</tt>.
 * @return a java.util.Iterator over all contacts inside this<tt>ContactGroup</tt>. In case the group doesn't contain any memebers it will return an empty iterator.
 */
public Iterator<Contact> contacts(){
  return buddies.values().iterator();
}

Fixed version (ground truth):
/** 
 * Returns an Iterator over all contacts, member of this <tt>ContactGroup</tt>.
 * @return a java.util.Iterator over all contacts inside this<tt>ContactGroup</tt>. In case the group doesn't contain any members it will return an empty iterator.
 */
public Iterator<Contact> contacts(){
  return buddies.values().iterator();
}
Program: 103726
Project: 103726
Buggy source:
public void newEmailNotificationReceived(MsnSwitchboard switchboard,MsnEmailNotifyMessage message,MsnContact contact){
  String messageFromAddr=message.getFromAddr();
  if ((messageFromAddr == null) || (messageFromAddr.indexOf('@') < 0)) {
    return;
  }
  String subject=message.getSubject();
  try {
    subject=MimeUtility.decodeText(subject);
  }
 catch (  Exception exception) {
    exception.printStackTrace();
  }
  Message newMailMessage=new MessageMsnImpl(MessageFormat.format(MsnActivator.getResources().getI18NString("String_Node_Str"),new Object[]{message.getFrom(),messageFromAddr,subject}),DEFAULT_MIME_TYPE,DEFAULT_MIME_ENCODING,subject);
  Contact sourceContact=opSetPersPresence.findContactByID(message.getFromAddr());
  if (sourceContact == null) {
    logger.debug("String_Node_Str" + message.getFrom() + "String_Node_Str"+ messageFromAddr+ "String_Node_Str");
    sourceContact=opSetPersPresence.createVolatileContact(contact);
  }
  MessageReceivedEvent msgReceivedEvt=new MessageReceivedEvent(newMailMessage,sourceContact,System.currentTimeMillis(),MessageReceivedEvent.SYSTEM_MESSAGE_RECEIVED);
  fireMessageEvent(msgReceivedEvt);
}

Fixed version (ground truth):
public void newEmailNotificationReceived(MsnSwitchboard switchboard,MsnEmailNotifyMessage message,MsnContact contact){
  String messageFromAddr=message.getFromAddr();
  if ((messageFromAddr == null) || (messageFromAddr.indexOf('@') < 0))   return;
  String subject=message.getSubject();
  try {
    subject=MimeUtility.decodeText(subject);
  }
 catch (  Exception ex) {
    logger.warn("String_Node_Str",ex);
  }
  String messageFrom=message.getFrom();
  Message newMailMessage=new MessageMsnImpl(MessageFormat.format(MsnActivator.getResources().getI18NString("String_Node_Str"),messageFrom,messageFromAddr,subject,"String_Node_Str"),HTML_MIME_TYPE,DEFAULT_MIME_ENCODING,subject);
  Contact sourceContact=opSetPersPresence.findContactByID(messageFromAddr);
  if (sourceContact == null) {
    logger.debug("String_Node_Str" + messageFrom + "String_Node_Str"+ messageFromAddr+ "String_Node_Str");
    String id=contact.getId();
    Email email=contact.getEmail();
    String displayName=contact.getDisplayName();
    if (id == null)     id=messageFromAddr;
    if (email == null)     email=Email.parseStr(messageFromAddr);
    if (displayName == null)     displayName=messageFrom;
    sourceContact=opSetPersPresence.createVolatileContact(id,email,displayName);
  }
  MessageReceivedEvent msgReceivedEvt=new MessageReceivedEvent(newMailMessage,sourceContact,System.currentTimeMillis(),MessageReceivedEvent.SYSTEM_MESSAGE_RECEIVED);
  fireMessageEvent(msgReceivedEvt);
}
Program: 103727
Project: 103727
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. The volatile contact would remain in the list until it is really added to the contact list or until the application is terminated.
 * @param contact the msn contact.
 * @return the newly created volatile <tt>ContactImpl</tt>
 */
public ContactMsnImpl createVolatileContact(MsnContact contact){
  return ssContactList.createVolatileContact(contact);
}

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. The volatile contact would remain in the list until it is really added to the contact list or until the application is terminated.
 * @param id the id of the MSN contact
 * @param email the e-mail address of the MSN contact
 * @param displayName the display name of the MSN contact
 * @return the newly created volatile <tt>ContactImpl</tt>
 */
public ContactMsnImpl createVolatileContact(String id,Email email,String displayName){
  return ssContactList.createVolatileContact(id,email,displayName);
}
Program: 103728
Project: 103728
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 contact the address of the contact to create.
 * @return the newly created volatile <tt>ContactImpl</tt>
 */
ContactMsnImpl createVolatileContact(MsnContact contact){
  VolatileContact volatileBuddy=new VolatileContact(contact.getId(),contact.getEmail(),contact.getDisplayName());
  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);
    theVolatileGroup.addContact(newVolatileContact);
    this.rootGroup.addSubGroup(theVolatileGroup);
    fireGroupEvent(theVolatileGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
  }
 else {
    theVolatileGroup.addContact(newVolatileContact);
    fireContactAdded(theVolatileGroup,newVolatileContact);
  }
  return newVolatileContact;
}
Program: 103729
Project: 103729
Buggy source:
/** 
 * Installs Dummy TrustManager will not try to validate self-signed certs. Fix some problems with not proper use of certs.
 */
private static void removeDownloadRestrictions(){
  try {
    SSLContext sc=SSLContext.getInstance("String_Node_Str");
    TrustManager[] tma={new DummyTrustManager()};
    sc.init(null,tma,null);
    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
  HostnameVerifier hv=new HostnameVerifier(){
    public boolean verify(    String urlHostName,    SSLSession session){
      logger.warn("String_Node_Str" + urlHostName + "String_Node_Str"+ session.getPeerHost());
      return true;
    }
  }
;
  HttpsURLConnection.setDefaultHostnameVerifier(hv);
  Authenticator.setDefault(new Authenticator(){
    protected PasswordAuthentication getPasswordAuthentication(){
      String uName=(String)getConfigurationService().getProperty(UPDATE_USERNAME_CONFIG);
      if (uName != null) {
        String pass=(String)getConfigurationService().getProperty(UPDATE_PASSWORD_CONFIG);
        if (pass != null)         return new PasswordAuthentication(uName,new String(Base64.decode(pass)).toCharArray());
      }
      if (userCredentials != null) {
        return new PasswordAuthentication(userCredentials.getUserName(),userCredentials.getPassword());
      }
 else {
        return null;
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Installs Dummy TrustManager will not try to validate self-signed certs. Fix some problems with not proper use of certs.
 */
private static void removeDownloadRestrictions(){
  try {
    SSLContext sc=SSLContext.getInstance("String_Node_Str");
    TrustManager[] tma={new DummyTrustManager()};
    sc.init(null,tma,null);
    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
  HostnameVerifier hv=new HostnameVerifier(){
    public boolean verify(    String urlHostName,    SSLSession session){
      logger.warn("String_Node_Str" + urlHostName + "String_Node_Str"+ session.getPeerHost());
      return true;
    }
  }
;
  HttpsURLConnection.setDefaultHostnameVerifier(hv);
  Authenticator.setDefault(new Authenticator(){
    protected PasswordAuthentication getPasswordAuthentication(){
      ConfigurationService config=getConfigurationService();
      String uName=(String)config.getProperty(UPDATE_USERNAME_CONFIG);
      if (uName != null) {
        String pass=(String)config.getProperty(UPDATE_PASSWORD_CONFIG);
        if (pass != null)         return new PasswordAuthentication(uName,new String(Base64.decode(pass)).toCharArray());
      }
      if (userCredentials != null) {
        return new PasswordAuthentication(userCredentials.getUserName(),userCredentials.getPassword());
      }
 else {
        return null;
      }
    }
  }
);
}
Program: 103730
Project: 103730
Buggy source:
protected PasswordAuthentication getPasswordAuthentication(){
  String uName=(String)getConfigurationService().getProperty(UPDATE_USERNAME_CONFIG);
  if (uName != null) {
    String pass=(String)getConfigurationService().getProperty(UPDATE_PASSWORD_CONFIG);
    if (pass != null)     return new PasswordAuthentication(uName,new String(Base64.decode(pass)).toCharArray());
  }
  if (userCredentials != null) {
    return new PasswordAuthentication(userCredentials.getUserName(),userCredentials.getPassword());
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
protected PasswordAuthentication getPasswordAuthentication(){
  ConfigurationService config=getConfigurationService();
  String uName=(String)config.getProperty(UPDATE_USERNAME_CONFIG);
  if (uName != null) {
    String pass=(String)config.getProperty(UPDATE_PASSWORD_CONFIG);
    if (pass != null)     return new PasswordAuthentication(uName,new String(Base64.decode(pass)).toCharArray());
  }
  if (userCredentials != null) {
    return new PasswordAuthentication(userCredentials.getUserName(),userCredentials.getPassword());
  }
 else {
    return null;
  }
}
Program: 103731
Project: 103731
Buggy source:
/** 
 * Creates a <tt>MessageReceivedEvent</tt> representing reception of the <tt>source</tt> message received from the specified <tt>from</tt> contact.
 * @param source the <tt>Message</tt> whose reception this event represents.
 * @param from the <tt>Contact</tt> that has sent this message.
 * @param timestamp the exact date when the event ocurred.
 * @param eventType the type of message event that this instance represents(one of the XXX_MESSAGE_RECEIVED static fields). 
 */
public MessageReceivedEvent(Message source,Contact from,long timestamp,int eventType){
  super(source);
  this.from=from;
  this.timestamp=timestamp;
  this.eventType=eventType;
}

Fixed version (ground truth):
/** 
 * Creates a <tt>MessageReceivedEvent</tt> representing reception of the <tt>source</tt> message received from the specified <tt>from</tt> contact.
 * @param source the <tt>Message</tt> whose reception this event represents.
 * @param from the <tt>Contact</tt> that has sent this message.
 * @param timestamp the exact date when the event occurred.
 * @param eventType the type of message event that this instance represents(one of the XXX_MESSAGE_RECEIVED static fields). 
 */
public MessageReceivedEvent(Message source,Contact from,long timestamp,int eventType){
  super(source);
  this.from=from;
  this.timestamp=timestamp;
  this.eventType=eventType;
}
Program: 103732
Project: 103732
Buggy source:
public void actionPerformed(ActionEvent e){
  String searchText=parentWindow.getCurrentSearchText();
  if (searchText == null)   return;
  Vector<ProtocolProviderService> telephonyProviders=CallManager.getTelephonyProviders();
  ProtocolProviderService callProvider=null;
  if (telephonyProviders.size() == 1) {
    CallManager.createCall(callProvider,searchText);
  }
 else   if (telephonyProviders.size() > 1) {
    ChooseCallAccountPopupMenu chooseAccountDialog=new ChooseCallAccountPopupMenu(callContact,searchText,telephonyProviders);
    chooseAccountDialog.showPopupMenu();
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  String searchText=parentWindow.getCurrentSearchText();
  if (searchText == null)   return;
  Vector<ProtocolProviderService> telephonyProviders=CallManager.getTelephonyProviders();
  if (telephonyProviders.size() == 1) {
    CallManager.createCall(telephonyProviders.get(0),searchText);
  }
 else   if (telephonyProviders.size() > 1) {
    ChooseCallAccountPopupMenu chooseAccountDialog=new ChooseCallAccountPopupMenu(callContact,searchText,telephonyProviders);
    chooseAccountDialog.showPopupMenu();
  }
}
Program: 103733
Project: 103733
Buggy source:
/** 
 * Creates the <tt>UnknownContactPanel</tt> by specifying the parent window.
 * @param window the parent window
 */
public UnknownContactPanel(MainFrame window){
  this.parentWindow=window;
  this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
  addContact.setAlignmentX(JButton.CENTER_ALIGNMENT);
  callContact.setAlignmentX(JButton.CENTER_ALIGNMENT);
  addContact.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  callContact.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  this.add(addContact);
  this.add(callContact);
  addContact.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      AddContactWizard wizard=new AddContactWizard(parentWindow,parentWindow.getCurrentSearchText());
      wizard.showDialog(false);
    }
  }
);
  callContact.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      String searchText=parentWindow.getCurrentSearchText();
      if (searchText == null)       return;
      Vector<ProtocolProviderService> telephonyProviders=CallManager.getTelephonyProviders();
      ProtocolProviderService callProvider=null;
      if (telephonyProviders.size() == 1) {
        CallManager.createCall(callProvider,searchText);
      }
 else       if (telephonyProviders.size() > 1) {
        ChooseCallAccountPopupMenu chooseAccountDialog=new ChooseCallAccountPopupMenu(callContact,searchText,telephonyProviders);
        chooseAccountDialog.showPopupMenu();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Creates the <tt>UnknownContactPanel</tt> by specifying the parent window.
 * @param window the parent window
 */
public UnknownContactPanel(MainFrame window){
  this.parentWindow=window;
  this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
  addContact.setAlignmentX(JButton.CENTER_ALIGNMENT);
  callContact.setAlignmentX(JButton.CENTER_ALIGNMENT);
  addContact.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  callContact.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  this.add(addContact);
  this.add(callContact);
  addContact.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      AddContactWizard wizard=new AddContactWizard(parentWindow,parentWindow.getCurrentSearchText());
      wizard.showDialog(false);
    }
  }
);
  callContact.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      String searchText=parentWindow.getCurrentSearchText();
      if (searchText == null)       return;
      Vector<ProtocolProviderService> telephonyProviders=CallManager.getTelephonyProviders();
      if (telephonyProviders.size() == 1) {
        CallManager.createCall(telephonyProviders.get(0),searchText);
      }
 else       if (telephonyProviders.size() > 1) {
        ChooseCallAccountPopupMenu chooseAccountDialog=new ChooseCallAccountPopupMenu(callContact,searchText,telephonyProviders);
        chooseAccountDialog.showPopupMenu();
      }
    }
  }
);
}
Program: 103734
Project: 103734
Buggy source:
/** 
 * Implements the <code>WizardPage.getBackPageIdentifier</code> to return the next back identifier - the default page.
 * @return Returns the identifier of the previous page of the wizard.
 */
public Object getBackPageIdentifier(){
  return WizardPage.DEFAULT_PAGE_IDENTIFIER;
}

Fixed version (ground truth):
/** 
 * Implements the <code>WizardPage.getBackPageIdentifier</code> to return the back identifier. In this case it's null because this is the first wizard page.
 * @return the identifier of the previous page of the wizard
 */
public Object getBackPageIdentifier(){
  return null;
}
Program: 103735
Project: 103735
Buggy source:
public Object getIdentifier(){
  return IDENTIFIER;
}

Fixed version (ground truth):
/** 
 * Returns the identifier of this wizard page.
 * @return the identifier of this wizard page
 */
public Object getIdentifier(){
  return IDENTIFIER;
}
Program: 103736
Project: 103736
Buggy source:
public Object getBackPageIdentifier(){
  return IDENTIFIER;
}

Fixed version (ground truth):
/** 
 * Implements the <code>WizardPage.getBackPageIdentifier</code> to return the back identifier. In this case it's null because this is the first wizard page.
 * @return the identifier of the previous wizard page.
 */
public Object getBackPageIdentifier(){
  return null;
}