nus-yam/ex-repair huggingface dataset:
Program: 111574
Project: 111574
Buggy source:
public void actionPerformed(ActionEvent e){
  Object s=e.getSource();
  if (s instanceof JButton && (JButton)s == okButton) {
    ok=true;
    if (cb != null)     cb.getOptions();
    endDialog();
  }
 else   if (s instanceof JButton && (JButton)s == cancelButton) {
    ok=false;
    endDialog();
  }
 else   if (s instanceof JButton && (JButton)s == defSaveButton) {
    try {
      defaults.Save();
    }
 catch (    java.lang.Exception x) {
    }
  }
 else   if (s instanceof JButton && (JButton)s == ca) {
    JFileChooser fc=new JFileChooser();
    fc.setDialogTitle("String_Node_Str");
    int ret=fc.showOpenDialog(this);
    if (ret == JFileChooser.APPROVE_OPTION)     CSecurityTLS.x509ca.setParam(fc.getSelectedFile().toString());
  }
 else   if (s instanceof JButton && (JButton)s == crl) {
    JFileChooser fc=new JFileChooser();
    fc.setDialogTitle("String_Node_Str");
    int ret=fc.showOpenDialog(this);
    if (ret == JFileChooser.APPROVE_OPTION)     CSecurityTLS.x509crl.setParam(fc.getSelectedFile().toString());
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  Object s=e.getSource();
  if (s instanceof JButton && (JButton)s == okButton) {
    autoScale=(scalingFactor.getSelectedItem().equals("String_Node_Str"));
    fixedRatioScale=(scalingFactor.getSelectedItem().equals("String_Node_Str"));
    ok=true;
    if (cb != null)     cb.getOptions();
    endDialog();
  }
 else   if (s instanceof JButton && (JButton)s == cancelButton) {
    ok=false;
    endDialog();
  }
 else   if (s instanceof JButton && (JButton)s == defSaveButton) {
    try {
      defaults.Save();
    }
 catch (    java.lang.Exception x) {
    }
  }
 else   if (s instanceof JButton && (JButton)s == ca) {
    JFileChooser fc=new JFileChooser();
    fc.setDialogTitle("String_Node_Str");
    int ret=fc.showOpenDialog(this);
    if (ret == JFileChooser.APPROVE_OPTION)     CSecurityTLS.x509ca.setParam(fc.getSelectedFile().toString());
  }
 else   if (s instanceof JButton && (JButton)s == crl) {
    JFileChooser fc=new JFileChooser();
    fc.setDialogTitle("String_Node_Str");
    int ret=fc.showOpenDialog(this);
    if (ret == JFileChooser.APPROVE_OPTION)     CSecurityTLS.x509crl.setParam(fc.getSelectedFile().toString());
  }
}
Program: 111576
Project: 111576
Buggy source:
public void initDialog(){
  if (cb != null)   cb.setOptions();
  zrle.setEnabled(!autoSelect.isSelected());
  hextile.setEnabled(!autoSelect.isSelected());
  tight.setEnabled(!autoSelect.isSelected());
  raw.setEnabled(!autoSelect.isSelected());
  fullColour.setEnabled(!autoSelect.isSelected());
  mediumColour.setEnabled(!autoSelect.isSelected());
  lowColour.setEnabled(!autoSelect.isSelected());
  veryLowColour.setEnabled(!autoSelect.isSelected());
  compressLevel.setEnabled(customCompressLevel.isSelected());
  qualityLevel.setEnabled(noJpeg.isSelected());
  sendLocalUsername.setEnabled(secVeNCrypt.isEnabled() && (secPlain.isSelected() || secIdent.isSelected()));
}

Fixed version (ground truth):
public void initDialog(){
  if (cb != null)   cb.setOptions();
  zrle.setEnabled(!autoSelect.isSelected());
  hextile.setEnabled(!autoSelect.isSelected());
  tight.setEnabled(!autoSelect.isSelected());
  raw.setEnabled(!autoSelect.isSelected());
  fullColour.setEnabled(!autoSelect.isSelected());
  mediumColour.setEnabled(!autoSelect.isSelected());
  lowColour.setEnabled(!autoSelect.isSelected());
  veryLowColour.setEnabled(!autoSelect.isSelected());
  compressLevel.setEnabled(customCompressLevel.isSelected());
  qualityLevel.setEnabled(noJpeg.isSelected());
  autoScale=(scalingFactor.getSelectedItem().equals("String_Node_Str"));
  fixedRatioScale=(scalingFactor.getSelectedItem().equals("String_Node_Str"));
  sendLocalUsername.setEnabled(secVeNCrypt.isEnabled() && (secPlain.isSelected() || secIdent.isSelected()));
}
Program: 111579
Project: 111579
Buggy source:
public void componentResized(ComponentEvent e){
  if (cc.options.autoScale || cc.options.fixedRatioScale) {
    if (sp.getSize().width != cc.desktop.scaledWidth || sp.getSize().height != cc.desktop.scaledHeight) {
      cc.reconfigureViewport();
      if (cc.desktop.cursor != null) {
        cc.setCursor(cc.desktop.cursor.width(),cc.desktop.cursor.height(),cc.desktop.cursor.hotspot,cc.desktop.cursor.data,cc.desktop.cursor.mask);
      }
    }
  }
}

Fixed version (ground truth):
public void componentResized(ComponentEvent e){
  if (cc.options.autoScale || cc.options.fixedRatioScale) {
    if (sp.getSize().width != cc.desktop.scaledWidth || sp.getSize().height != cc.desktop.scaledHeight) {
      cc.reconfigureViewport();
      if (cc.desktop.cursor != null) {
        Cursor cursor=cc.desktop.cursor;
        cc.setCursor(cursor.width(),cursor.height(),cursor.hotspot,cursor.data,cursor.mask);
      }
    }
  }
}
Program: 111581
Project: 111581
Buggy source:
public static void DisableSecType(int secType){
  enabledSecTypes.remove(secType);
}

Fixed version (ground truth):
public static void DisableSecType(int secType){
  enabledSecTypes.remove((Object)secType);
}
Program: 111582
Project: 111582
Buggy source:
int selectSecurityType() throws Exception {
  int secType=SecTypeInvalid;
  int nSecTypes=readU8();
  if (nSecTypes == 0) {
    readConnFailedReason();
    return SecTypeInvalid;
  }
  byte[] secTypes=new byte[nSecTypes];
  readFully(secTypes);
  for (int i=0; i < nSecTypes; i++) {
    if (secTypes[i] == SecTypeTight) {
      protocolTightVNC=true;
      os.write(SecTypeTight);
      return SecTypeTight;
    }
  }
  for (int i=0; i < nSecTypes; i++) {
    if (secTypes[i] == SecTypeNone || secTypes[i] == SecTypeVncAuth || secTypes[i] == SecTypeVeNCrypt) {
      secType=secTypes[i];
      break;
    }
  }
  if (secType == SecTypeInvalid) {
    throw new Exception("String_Node_Str");
  }
 else {
    os.write(secType);
  }
  return secType;
}

Fixed version (ground truth):
int selectSecurityType() throws Exception {
  int secType=SecTypeInvalid;
  int nSecTypes=readU8();
  if (nSecTypes == 0) {
    readConnFailedReason();
    return SecTypeInvalid;
  }
  byte[] secTypes=new byte[nSecTypes];
  readFully(secTypes);
  for (int i=0; i < nSecTypes; i++) {
    if (secTypes[i] == SecTypeNone || secTypes[i] == SecTypeVncAuth || secTypes[i] == SecTypeVeNCrypt) {
      secType=secTypes[i];
      break;
    }
  }
  if (secType == SecTypeInvalid) {
    throw new Exception("String_Node_Str");
  }
 else {
    os.write(secType);
  }
  return secType;
}
Program: 111583
Project: 111583
Buggy source:
private void processLocalMouseEvent(MouseEvent evt,boolean moved){
  if (viewer.rfb != null && rfb.inNormalProtocol) {
    if (!inSelectionMode) {
      if (inputEnabled) {
        if (System.currentTimeMillis() - lastMouseEventSendTime >= (1000 / mouseMaxFreq)) {
          sendMouseEvent(evt,moved);
        }
      }
    }
 else {
      handleSelectionMouseEvent(evt);
    }
  }
}

Fixed version (ground truth):
private void processLocalMouseEvent(MouseEvent evt,boolean moved){
  if (viewer.rfb != null && rfb.inNormalProtocol) {
    if (!inSelectionMode) {
      if (inputEnabled) {
        if (!moved) {
          sendMouseEvent(evt,moved);
        }
 else {
          mouseEvent=evt;
          needToSendMouseEvent=true;
        }
      }
    }
 else {
      handleSelectionMouseEvent(evt);
    }
  }
}
Program: 111584
Project: 111584
Buggy source:
void readFramebufferUpdateRectHdr() throws Exception {
  updateRectX=readU16();
  updateRectY=readU16();
  updateRectW=readU16();
  updateRectH=readU16();
  updateRectEncoding=readU32();
  if (updateRectEncoding == EncodingZlib || updateRectEncoding == EncodingZRLE || updateRectEncoding == EncodingTight)   wereZlibUpdates=true;
  if (rec != null) {
    if (numUpdatesInSession > 1)     rec.flush();
    rec.writeShortBE(updateRectX);
    rec.writeShortBE(updateRectY);
    rec.writeShortBE(updateRectW);
    rec.writeShortBE(updateRectH);
    if (((updateRectEncoding == EncodingCopyRect) || (!isRealDecoderEncoding(updateRectEncoding))) && (rec != null)) {
      rec.writeIntBE(updateRectEncoding);
    }
  }
  if (updateRectEncoding < 0 || updateRectEncoding > MaxNormalEncoding)   return;
  if (updateRectX + updateRectW > framebufferWidth || updateRectY + updateRectH > framebufferHeight) {
    throw new Exception("String_Node_Str" + updateRectW + "String_Node_Str"+ updateRectH+ "String_Node_Str"+ updateRectX+ "String_Node_Str"+ updateRectY+ "String_Node_Str");
  }
}

Fixed version (ground truth):
void readFramebufferUpdateRectHdr() throws Exception {
  updateRectX=readU16();
  updateRectY=readU16();
  updateRectW=readU16();
  updateRectH=readU16();
  updateRectEncoding=readU32();
  if (updateRectEncoding == EncodingZlib || updateRectEncoding == EncodingZRLE || updateRectEncoding == EncodingTight)   wereZlibUpdates=true;
  if (rec != null) {
    if (numUpdatesInSession > 1)     rec.flush();
    rec.writeShortBE(updateRectX);
    rec.writeShortBE(updateRectY);
    rec.writeShortBE(updateRectW);
    rec.writeShortBE(updateRectH);
    if (((!isRealDecoderEncoding(updateRectEncoding))) && (rec != null)) {
      rec.writeIntBE(updateRectEncoding);
    }
  }
  if (updateRectEncoding < 0 || updateRectEncoding > MaxNormalEncoding)   return;
  if (updateRectX + updateRectW > framebufferWidth || updateRectY + updateRectH > framebufferHeight) {
    throw new Exception("String_Node_Str" + updateRectW + "String_Node_Str"+ updateRectH+ "String_Node_Str"+ updateRectX+ "String_Node_Str"+ updateRectY+ "String_Node_Str");
  }
}
Program: 111585
Project: 111585
Buggy source:
public int getNumJPEGRects(){
  return statNumRectsTightJPEG;
}

Fixed version (ground truth):
public long getNumJPEGRects(){
  return statNumRectsTightJPEG;
}
Program: 111586
Project: 111586
Buggy source:
public int getNumTightRects(){
  return statNumRectsTight;
}

Fixed version (ground truth):
public long getNumTightRects(){
  return statNumRectsTight;
}
Program: 111587
Project: 111587
Buggy source:
synchronized public void disconnect(){
  System.out.println("String_Node_Str");
  if (vc != null) {
    double sec=(System.currentTimeMillis() - vc.statStartTime) / 1000.0;
    double rate=Math.round(vc.statNumUpdates / sec * 100) / 100.0;
    int nRealRects=vc.statNumPixelRects;
    int nPseudoRects=vc.statNumTotalRects - vc.statNumPixelRects;
    System.out.println("String_Node_Str" + vc.statNumUpdates + "String_Node_Str"+ nRealRects+ "String_Node_Str"+ nPseudoRects+ "String_Node_Str"+ rate+ "String_Node_Str");
    int numRectsOther=nRealRects - vc.statNumRectsTight - vc.statNumRectsZRLE- vc.statNumRectsHextile- vc.statNumRectsRaw- vc.statNumRectsCopy;
    System.out.println("String_Node_Str" + "String_Node_Str" + vc.statNumRectsTight + "String_Node_Str"+ vc.statNumRectsTightJPEG+ "String_Node_Str"+ vc.statNumRectsZRLE+ "String_Node_Str"+ vc.statNumRectsHextile+ "String_Node_Str"+ vc.statNumRectsRaw+ "String_Node_Str"+ vc.statNumRectsCopy+ "String_Node_Str"+ numRectsOther);
    int raw=vc.statNumBytesDecoded;
    int compressed=vc.statNumBytesEncoded;
    if (compressed > 0) {
      double ratio=Math.round((double)raw / compressed * 1000) / 1000.0;
      System.out.println("String_Node_Str" + vc.statNumBytesDecoded + "String_Node_Str"+ vc.statNumBytesEncoded+ "String_Node_Str"+ ratio);
    }
  }
  if (rfb != null && !rfb.closed())   rfb.close();
  options.dispose();
  clipboard.dispose();
  if (rec != null)   rec.dispose();
  if (inAnApplet) {
    showMessage("String_Node_Str");
  }
 else {
    System.exit(0);
  }
}

Fixed version (ground truth):
synchronized public void disconnect(){
  System.out.println("String_Node_Str");
  if (vc != null) {
    double sec=(System.currentTimeMillis() - vc.statStartTime) / 1000.0;
    double rate=Math.round(vc.statNumUpdates / sec * 100) / 100.0;
    long nRealRects=vc.statNumPixelRects;
    long nPseudoRects=vc.statNumTotalRects - vc.statNumPixelRects;
    System.out.println("String_Node_Str" + vc.statNumUpdates + "String_Node_Str"+ nRealRects+ "String_Node_Str"+ nPseudoRects+ "String_Node_Str"+ rate+ "String_Node_Str");
    long numRectsOther=nRealRects - vc.statNumRectsTight - vc.statNumRectsZRLE- vc.statNumRectsHextile- vc.statNumRectsRaw- vc.statNumRectsCopy;
    System.out.println("String_Node_Str" + "String_Node_Str" + vc.statNumRectsTight + "String_Node_Str"+ vc.statNumRectsTightJPEG+ "String_Node_Str"+ vc.statNumRectsZRLE+ "String_Node_Str"+ vc.statNumRectsHextile+ "String_Node_Str"+ vc.statNumRectsRaw+ "String_Node_Str"+ vc.statNumRectsCopy+ "String_Node_Str"+ numRectsOther);
    long raw=vc.statNumBytesDecoded;
    long compressed=vc.statNumBytesEncoded;
    if (compressed > 0) {
      double ratio=Math.round((double)raw / compressed * 1000) / 1000.0;
      System.out.println("String_Node_Str" + vc.statNumBytesDecoded + "String_Node_Str"+ vc.statNumBytesEncoded+ "String_Node_Str"+ ratio);
    }
  }
  if (rfb != null && !rfb.closed())   rfb.close();
  options.dispose();
  clipboard.dispose();
  if (rec != null)   rec.dispose();
  if (inAnApplet) {
    showMessage("String_Node_Str");
  }
 else {
    System.exit(0);
  }
}
Program: 111588
Project: 111588
Buggy source:
public void writeByte(int v) throws IOException {
  if (recordInterface.canWrite()) {
    recordInterface.writeByte((byte)v);
  }
}

Fixed version (ground truth):
public void writeByte(int v) throws IOException {
  if (recordInterface.canWrite()) {
    recordInterface.writeByte(v);
  }
}
Program: 111591
Project: 111591
Buggy source:
void resetStats(){
  statStartTime=System.currentTimeMillis();
  statNumUpdates=0;
  statNumTotalRects=0;
  statNumPixelRects=0;
  statNumRectsTight=0;
  statNumRectsTightJPEG=0;
  statNumRectsZRLE=0;
  statNumRectsHextile=0;
  statNumRectsRaw=0;
  statNumRectsCopy=0;
  statNumBytesEncoded=0;
  statNumBytesDecoded=0;
  if (tightDecoder != null)   tightDecoder.setNumJPEGRects(0);
}

Fixed version (ground truth):
void resetStats(){
  statStartTime=System.currentTimeMillis();
  statNumUpdates=0;
  statNumTotalRects=0;
  statNumPixelRects=0;
  statNumRectsTight=0;
  statNumRectsTightJPEG=0;
  statNumRectsZRLE=0;
  statNumRectsHextile=0;
  statNumRectsRaw=0;
  statNumRectsCopy=0;
  statNumBytesEncoded=0;
  statNumBytesDecoded=0;
  if (tightDecoder != null) {
    tightDecoder.setNumJPEGRects(0);
    tightDecoder.setNumTightRects(0);
  }
}
Program: 111592
Project: 111592
Buggy source:
public void setDataOutputStream(DataOutputStream os){
  dos=os;
}

Fixed version (ground truth):
public void setDataOutputStream(DataOutput os){
  dos=os;
}
Program: 111593
Project: 111593
Buggy source:
RfbProto(String h,int p,VncViewer v) throws IOException {
  viewer=v;
  host=h;
  port=p;
  if (viewer.socketFactory == null) {
    sock=new Socket(host,port);
  }
 else {
    try {
      Class factoryClass=Class.forName(viewer.socketFactory);
      SocketFactory factory=(SocketFactory)factoryClass.newInstance();
      if (viewer.inAnApplet)       sock=factory.createSocket(host,port,viewer);
 else       sock=factory.createSocket(host,port,viewer.mainArgs);
    }
 catch (    Exception e) {
      e.printStackTrace();
      throw new IOException(e.getMessage());
    }
  }
  is=new DataInputStream(new BufferedInputStream(sock.getInputStream(),16384));
  os=sock.getOutputStream();
  timing=false;
  timeWaitedIn100us=5;
  timedKbits=0;
}

Fixed version (ground truth):
RfbProto(String h,int p,VncViewer v) throws IOException {
  viewer=v;
  host=h;
  port=p;
  if (viewer.socketFactory == null) {
    sock=new Socket(host,port);
    sock.setTcpNoDelay(true);
  }
 else {
    try {
      Class factoryClass=Class.forName(viewer.socketFactory);
      SocketFactory factory=(SocketFactory)factoryClass.newInstance();
      if (viewer.inAnApplet)       sock=factory.createSocket(host,port,viewer);
 else       sock=factory.createSocket(host,port,viewer.mainArgs);
    }
 catch (    Exception e) {
      e.printStackTrace();
      throw new IOException(e.getMessage());
    }
  }
  is=new DataInputStream(new BufferedInputStream(sock.getInputStream(),16384));
  os=sock.getOutputStream();
  timing=false;
  timeWaitedIn100us=5;
  timedKbits=0;
}
Program: 111594
Project: 111594
Buggy source:
public void write(int b) throws IOException {
  recordInterface.writeIntBE(b);
}

Fixed version (ground truth):
public void write(int b) throws IOException {
  if (recordInterface.canWrite())   recordInterface.writeIntBE(b);
}
Program: 111598
Project: 111598
Buggy source:
FbsConnection(String fbsLocation,String indexLocationPrefix,Applet applet) throws MalformedURLException {
  URL base=null;
  if (applet != null) {
    base=applet.getCodeBase();
  }
  fbsURL=new URL(base,fbsLocation);
  fbiURL=fbkURL=null;
  if (indexLocationPrefix != null) {
    try {
      fbiURL=new URL(base,indexLocationPrefix + "String_Node_Str");
      fbkURL=new URL(base,indexLocationPrefix + "String_Node_Str");
    }
 catch (    MalformedURLException e) {
      fbiURL=fbkURL=null;
    }
  }
  idx=null;
  loadIndex();
}

Fixed version (ground truth):
FbsConnection(String fbsLocation,String indexLocationPrefix,Applet applet) throws MalformedURLException {
  URL base=null;
  if (applet != null) {
    base=applet.getCodeBase();
  }
  fbsURL=new URL(base,fbsLocation);
  fbiURL=fbkURL=null;
  if (indexLocationPrefix != null) {
    try {
      fbiURL=new URL(base,indexLocationPrefix + "String_Node_Str");
      fbkURL=new URL(base,indexLocationPrefix + "String_Node_Str");
    }
 catch (    MalformedURLException e) {
      fbiURL=fbkURL=null;
    }
  }
  idx=null;
  numIndexRecords=0;
  loadIndex();
}
Program: 111601
Project: 111601
Buggy source:
public void init(){
  Applet receiver=null;
  receiver=RfbSharedStatic.refApplet;
  long time=Long.valueOf(getParameter("String_Node_Str")).longValue();
  boolean pause=(Integer.parseInt(getParameter("String_Node_Str")) != 0);
  boolean unpause=(Integer.parseInt(getParameter("String_Node_Str")) != 0);
  if (receiver != null) {
    if (pause) {
      ((RfbPlayer)receiver).setPaused(true);
    }
 else     if (unpause) {
      ((RfbPlayer)receiver).setPaused(false);
    }
 else {
      ((RfbPlayer)receiver).jumpTo(time);
    }
  }
 else   System.out.println("String_Node_Str" + time + "String_Node_Str");
}

Fixed version (ground truth):
public void init(){
  Applet receiver=null;
  receiver=RfbSharedStatic.refApplet;
  long time=Long.valueOf(getParameter("String_Node_Str")).longValue();
  boolean pause=(Integer.parseInt(getParameter("String_Node_Str")) != 0);
  boolean unpause=(Integer.parseInt(getParameter("String_Node_Str")) != 0);
  if (receiver != null) {
    if (pause) {
      ((RfbPlayer)receiver).setPaused(true);
    }
 else     if (unpause) {
      ((RfbPlayer)receiver).setPaused(false);
    }
 else {
      ((RfbPlayer)receiver).jumpTo(time);
    }
  }
 else   System.err.println("String_Node_Str" + time + "String_Node_Str");
}
Program: 111602
Project: 111602
Buggy source:
public void fatalError(String str){
  System.out.println(str);
  if (inAnApplet) {
    vncContainer.removeAll();
    if (rfb != null) {
      rfb=null;
    }
    Label errLabel=new Label(str);
    errLabel.setFont(new Font("String_Node_Str",Font.PLAIN,12));
    vncContainer.setLayout(new FlowLayout(FlowLayout.LEFT,30,30));
    vncContainer.add(errLabel);
    if (inSeparateFrame) {
      vncFrame.pack();
    }
 else {
      validate();
    }
    Thread.currentThread().stop();
  }
 else {
    System.exit(1);
  }
}

Fixed version (ground truth):
public void fatalError(String str){
  System.err.println(str);
  if (inAnApplet) {
    vncContainer.removeAll();
    if (rfb != null) {
      rfb=null;
    }
    Label errLabel=new Label(str);
    errLabel.setFont(new Font("String_Node_Str",Font.PLAIN,12));
    vncContainer.setLayout(new FlowLayout(FlowLayout.LEFT,30,30));
    vncContainer.add(errLabel);
    if (inSeparateFrame) {
      vncFrame.pack();
    }
 else {
      validate();
    }
    Thread.currentThread().stop();
  }
 else {
    System.exit(1);
  }
}
Program: 111603
Project: 111603
Buggy source:
public void init(){
  Applet receiver=null;
  receiver=RfbSharedStatic.refApplet;
  int width=Integer.valueOf(getParameter("String_Node_Str")).intValue();
  int height=Integer.valueOf(getParameter("String_Node_Str")).intValue();
  if (receiver != null) {
    ((RfbPlayer)receiver).displaySize(width,height);
  }
 else   System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public void init(){
  Applet receiver=null;
  receiver=RfbSharedStatic.refApplet;
  int width=Integer.valueOf(getParameter("String_Node_Str")).intValue();
  int height=Integer.valueOf(getParameter("String_Node_Str")).intValue();
  if (receiver != null) {
    ((RfbPlayer)receiver).displaySize(width,height);
  }
 else   System.err.println("String_Node_Str");
}
Program: 111604
Project: 111604
Buggy source:
FbsInputStream connect(long timeOffset) throws IOException {
  FbsInputStream fbs=null;
  int i=indexForTimeOffset(timeOffset);
  if (i >= 0) {
    FbsEntryPoint entryPoint=indexData[i];
    if (entryPoint.key_size < entryPoint.fbs_fpos) {
      try {
        fbs=openFbsFile(entryPoint);
      }
 catch (      IOException e) {
        System.err.println(e);
      }
      if (fbs == null) {
        System.err.println("String_Node_Str" + entryPoint.timestamp + "String_Node_Str");
      }
    }
  }
  if (fbs == null) {
    fbs=openFbsFile();
  }
  fbs.setTimeOffset(timeOffset);
  return fbs;
}

Fixed version (ground truth):
FbsInputStream connect(long timeOffset) throws IOException {
  FbsInputStream fbs=null;
  int i=indexForTimeOffset(timeOffset);
  if (i >= 0) {
    FbsEntryPoint entryPoint=indexData[i];
    if (entryPoint.key_size < entryPoint.fbs_fpos) {
      try {
        fbs=openFbsFile(entryPoint);
      }
 catch (      IOException e) {
        System.err.println(e);
      }
      if (fbs == null) {
        System.err.println("String_Node_Str" + entryPoint.timestamp + "String_Node_Str");
      }
    }
  }
  if (fbs == null) {
    fbs=openFbsFile();
  }
  fbs.setTimeOffset(timeOffset,false);
  return fbs;
}
Program: 111605
Project: 111605
Buggy source:
public synchronized void setTimeOffset(long pos){
  seekOffset=(long)(pos / playbackSpeed);
  long minJumpForwardOffset=timeOffset + (long)(10000 / playbackSpeed);
  if (seekOffset < timeOffset || seekOffset > minJumpForwardOffset) {
    farSeeking=true;
  }
  notify();
}

Fixed version (ground truth):
public synchronized void setTimeOffset(long pos,boolean allowJump){
  seekOffset=(long)(pos / playbackSpeed);
  if (allowJump) {
    long minJumpForwardOffset=timeOffset + (long)(10000 / playbackSpeed);
    if (seekOffset < timeOffset || seekOffset > minJumpForwardOffset) {
      farSeeking=true;
    }
  }
  notify();
}
Program: 111606
Project: 111606
Buggy source:
public void setPos(long pos){
  fbs.setTimeOffset(pos);
}

Fixed version (ground truth):
public void setPos(long pos){
  fbs.setTimeOffset(pos,true);
}
Program: 111608
Project: 111608
Buggy source:
public long getSeekOffset(){
  return seekOffset;
}

Fixed version (ground truth):
public long getSeekOffset(){
  return (long)(seekOffset * playbackSpeed);
}
Program: 111610
Project: 111610
Buggy source:
@Override public LogStream attachContainer(final String containerId,final AttachParameter... params) throws DockerException, InterruptedException {
  final ContainerInfo containerInfo=inspectContainer(containerId);
  if (!containerInfo.state().running()) {
    throw new IllegalStateException("String_Node_Str" + containerId + "String_Node_Str");
  }
  WebTarget resource=noTimeoutResource().path("String_Node_Str").path(containerId).path("String_Node_Str");
  for (  final AttachParameter param : params) {
    resource=resource.queryParam(param.name().toLowerCase(Locale.ROOT),String.valueOf(true));
  }
  return getLogStream(POST,resource,containerId);
}

Fixed version (ground truth):
@Override public LogStream attachContainer(final String containerId,final AttachParameter... params) throws DockerException, InterruptedException {
  checkNotNull(containerId,"String_Node_Str");
  WebTarget resource=noTimeoutResource().path("String_Node_Str").path(containerId).path("String_Node_Str");
  for (  final AttachParameter param : params) {
    resource=resource.queryParam(param.name().toLowerCase(Locale.ROOT),String.valueOf(true));
  }
  return getLogStream(POST,resource,containerId);
}
Program: 111611
Project: 111611
Buggy source:
private String authHeader(final RegistryAuth registryAuth) throws DockerException {
  if (registryAuth == null) {
    return "String_Node_Str";
  }
  try {
    return Base64.encodeBase64String(ObjectMapperProvider.objectMapper().writeValueAsString(registryAuth).getBytes());
  }
 catch (  JsonProcessingException ex) {
    throw new DockerException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private String authHeader(final RegistryAuth registryAuth) throws DockerException {
  if (registryAuth == null) {
    return "String_Node_Str";
  }
  try {
    return Base64.encodeBase64String(ObjectMapperProvider.objectMapper().writeValueAsBytes(registryAuth));
  }
 catch (  JsonProcessingException ex) {
    throw new DockerException("String_Node_Str",ex);
  }
}
Program: 111612
Project: 111612
Buggy source:
private String authRegistryHeader(final RegistryConfigs registryConfigs) throws DockerException {
  if (registryConfigs == null) {
    return null;
  }
  try {
    String authRegistryJson=ObjectMapperProvider.objectMapper().writeValueAsString(registryConfigs.configs());
    final String apiVersion=version().apiVersion();
    final int versionComparison=compareVersion(apiVersion,"String_Node_Str");
    if (versionComparison < 0) {
      authRegistryJson="String_Node_Str" + authRegistryJson + "String_Node_Str";
    }
 else     if (versionComparison == 0) {
      authRegistryJson="String_Node_Str" + authRegistryJson + "String_Node_Str";
    }
    return Base64.encodeBase64String(authRegistryJson.getBytes());
  }
 catch (  JsonProcessingException|InterruptedException ex) {
    throw new DockerException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private String authRegistryHeader(final RegistryConfigs registryConfigs) throws DockerException {
  if (registryConfigs == null) {
    return null;
  }
  try {
    String authRegistryJson=ObjectMapperProvider.objectMapper().writeValueAsString(registryConfigs.configs());
    final String apiVersion=version().apiVersion();
    final int versionComparison=compareVersion(apiVersion,"String_Node_Str");
    if (versionComparison < 0) {
      authRegistryJson="String_Node_Str" + authRegistryJson + "String_Node_Str";
    }
 else     if (versionComparison == 0) {
      authRegistryJson="String_Node_Str" + authRegistryJson + "String_Node_Str";
    }
    return Base64.encodeBase64String(authRegistryJson.getBytes("String_Node_Str"));
  }
 catch (  JsonProcessingException|InterruptedException|UnsupportedEncodingException ex) {
    throw new DockerException("String_Node_Str",ex);
  }
}
Program: 111613
Project: 111613
Buggy source:
private String authHeader(final RegistryAuth registryAuth) throws DockerException {
  if (registryAuth == null) {
    return "String_Node_Str";
  }
  try {
    return Base64.encodeAsString(ObjectMapperProvider.objectMapper().writeValueAsString(registryAuth));
  }
 catch (  JsonProcessingException ex) {
    throw new DockerException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private String authHeader(final RegistryAuth registryAuth) throws DockerException {
  if (registryAuth == null) {
    return "String_Node_Str";
  }
  try {
    return Base64.encodeBase64String(ObjectMapperProvider.objectMapper().writeValueAsString(registryAuth).getBytes());
  }
 catch (  JsonProcessingException ex) {
    throw new DockerException("String_Node_Str",ex);
  }
}
Program: 111614
Project: 111614
Buggy source:
private String authRegistryHeader(final RegistryConfigs registryConfigs) throws DockerException {
  if (registryConfigs == null) {
    return null;
  }
  try {
    String authRegistryJson=ObjectMapperProvider.objectMapper().writeValueAsString(registryConfigs.configs());
    final String apiVersion=version().apiVersion();
    final int versionComparison=compareVersion(apiVersion,"String_Node_Str");
    if (versionComparison < 0) {
      authRegistryJson="String_Node_Str" + authRegistryJson + "String_Node_Str";
    }
 else     if (versionComparison == 0) {
      authRegistryJson="String_Node_Str" + authRegistryJson + "String_Node_Str";
    }
    return Base64.encodeAsString(authRegistryJson);
  }
 catch (  JsonProcessingException|InterruptedException ex) {
    throw new DockerException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private String authRegistryHeader(final RegistryConfigs registryConfigs) throws DockerException {
  if (registryConfigs == null) {
    return null;
  }
  try {
    String authRegistryJson=ObjectMapperProvider.objectMapper().writeValueAsString(registryConfigs.configs());
    final String apiVersion=version().apiVersion();
    final int versionComparison=compareVersion(apiVersion,"String_Node_Str");
    if (versionComparison < 0) {
      authRegistryJson="String_Node_Str" + authRegistryJson + "String_Node_Str";
    }
 else     if (versionComparison == 0) {
      authRegistryJson="String_Node_Str" + authRegistryJson + "String_Node_Str";
    }
    return Base64.encodeBase64String(authRegistryJson.getBytes());
  }
 catch (  JsonProcessingException|InterruptedException ex) {
    throw new DockerException("String_Node_Str",ex);
  }
}
Program: 111616
Project: 111616
Buggy source:
@Override public String identityToken(){
  return identityToken;
}

Fixed version (ground truth):
@Override public String identityToken(){
  return null;
}
Program: 111617
Project: 111617
Buggy source:
@Override public String email(){
  return email;
}

Fixed version (ground truth):
@Override public String email(){
  return null;
}
Program: 111618
Project: 111618
Buggy source:
private void storeAuthCredential(String testAuth1) throws IOException, InterruptedException {
  Process process=Runtime.getRuntime().exec(reader.getCredsStore() + "String_Node_Str");
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));
  writer.write(testAuth1 + "String_Node_Str");
  writer.flush();
  writer.close();
  process.waitFor();
}

Fixed version (ground truth):
private void storeAuthCredential(String testAuth1) throws IOException, InterruptedException {
  Process process=Runtime.getRuntime().exec(credStore + "String_Node_Str");
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));
  writer.write(testAuth1 + "String_Node_Str");
  writer.flush();
  writer.close();
  process.waitFor();
}
Program: 111619
Project: 111619
Buggy source:
@Test public void testFromDockerConfig_CredsStore() throws IOException, InterruptedException {
  String domain1="String_Node_Str";
  String domain2="String_Node_Str";
  String testAuth1="String_Node_Str" + "String_Node_Str" + domain1 + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String testAuth2="String_Node_Str" + "String_Node_Str" + domain2 + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  storeAuthCredential(testAuth1);
  storeAuthCredential(testAuth2);
  final Path path=getTestFilePath("String_Node_Str");
  final RegistryConfigs configs=reader.fromConfig(path);
  for (  RegistryAuth authConfigs : configs.configs().values()) {
    if (domain1.equals(authConfigs.serverAddress())) {
      assertThat(authConfigs.username(),equalTo("String_Node_Str"));
      assertThat(authConfigs.password(),equalTo("String_Node_Str"));
    }
 else     if (domain2.equals(authConfigs.serverAddress())) {
      assertThat(authConfigs.username(),equalTo("String_Node_Str"));
      assertThat(authConfigs.password(),equalTo("String_Node_Str"));
    }
  }
  eraseAuthCredential(domain1);
  eraseAuthCredential(domain2);
}

Fixed version (ground truth):
@Test public void testFromDockerConfig_CredsStore() throws IOException, InterruptedException {
  String credStoreType=reader.getSystemCredsStoreType();
  assumeTrue("String_Node_Str",credStoreType != null);
  credStore="String_Node_Str" + credStoreType;
  String domain1="String_Node_Str";
  String domain2="String_Node_Str";
  String testAuth1="String_Node_Str" + "String_Node_Str" + domain1 + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String testAuth2="String_Node_Str" + "String_Node_Str" + domain2 + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  storeAuthCredential(testAuth1);
  storeAuthCredential(testAuth2);
  final Path path=getTestFilePath("String_Node_Str");
  final RegistryConfigs configs=reader.fromConfig(path);
  for (  RegistryAuth authConfigs : configs.configs().values()) {
    if (domain1.equals(authConfigs.serverAddress())) {
      assertThat(authConfigs.username(),equalTo("String_Node_Str"));
      assertThat(authConfigs.password(),equalTo("String_Node_Str"));
    }
 else     if (domain2.equals(authConfigs.serverAddress())) {
      assertThat(authConfigs.username(),equalTo("String_Node_Str"));
      assertThat(authConfigs.password(),equalTo("String_Node_Str"));
    }
  }
  eraseAuthCredential(domain1);
  eraseAuthCredential(domain2);
}
Program: 111620
Project: 111620
Buggy source:
private void eraseAuthCredential(String domain1) throws IOException, InterruptedException {
  Process process=Runtime.getRuntime().exec(reader.getCredsStore() + "String_Node_Str");
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));
  writer.write(domain1 + "String_Node_Str");
  writer.flush();
  writer.close();
  process.waitFor();
}

Fixed version (ground truth):
private void eraseAuthCredential(String domain1) throws IOException, InterruptedException {
  Process process=Runtime.getRuntime().exec(credStore + "String_Node_Str");
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));
  writer.write(domain1 + "String_Node_Str");
  writer.flush();
  writer.close();
  process.waitFor();
}
Program: 111621
Project: 111621
Buggy source:
/** 
 * Returns the RegistryAuth for the config file for the given registry server name.
 * @throws IllegalArgumentException if the config file does not contain registry auth info for theregistry
 */
public RegistryAuth fromConfig(Path configPath,String serverAddress) throws IOException {
  return parseDockerConfig(configPath,serverAddress);
}

Fixed version (ground truth):
/** 
 * Returns the RegistryAuth for the config file for the given registry server name.
 * @throws IllegalArgumentException if the config file does not contain registry auth info for theregistry
 */
public RegistryAuth fromConfig(final Path configPath,final String serverAddress) throws IOException {
  return parseDockerConfig(configPath,serverAddress);
}
Program: 111622
Project: 111622
Buggy source:
public ImageRef(final String image){
  final int lastAt=image.lastIndexOf('@');
  final int lastColon=image.lastIndexOf(':');
  if (lastAt >= 0) {
    this.image=image;
    this.tag=null;
  }
 else   if (lastColon < 0) {
    this.image=image;
    this.tag=null;
  }
 else {
    final String tag=image.substring(lastColon + 1);
    if (tag.indexOf('/') < 0) {
      this.image=image.substring(0,lastColon);
      this.tag=tag;
    }
 else {
      this.image=image;
      this.tag=null;
    }
  }
  final String[] parts=image.split("String_Node_Str",2);
  if (parts.length > 1 && isRegistry(parts[0])) {
    this.registry=parts[0];
  }
 else {
    this.registry=DEFAULT_REGISTRY;
  }
}

Fixed version (ground truth):
public ImageRef(final String image){
  final int lastAt=image.lastIndexOf('@');
  final int lastColon=image.lastIndexOf(':');
  if (lastAt >= 0) {
    this.image=image;
    this.tag=null;
  }
 else   if (lastColon < 0) {
    this.image=image;
    this.tag=null;
  }
 else {
    final String tag=image.substring(lastColon + 1);
    if (tag.indexOf('/') < 0) {
      this.image=image.substring(0,lastColon);
      this.tag=tag;
    }
 else {
      this.image=image;
      this.tag=null;
    }
  }
  final String[] parts=image.split("String_Node_Str",2);
  if (parts.length > 1 && isRegistry(parts[0])) {
    this.registry=parts[0];
    this.registryUrl=parseRegistryUrl(parts[0]);
  }
 else {
    this.registry=DEFAULT_REGISTRY;
    this.registryUrl=DEFAULT_REGISTRY_URL;
  }
}
Program: 111623
Project: 111623
Buggy source:
@Override public RegistryAuth authFor(final String imageName) throws DockerException {
  if (!configFileExists()) {
    return null;
  }
  final ImageRef ref=new ImageRef(imageName);
  try {
    return reader.fromConfig(path,ref.getRegistryName());
  }
 catch (  IllegalArgumentException e) {
    return null;
  }
catch (  IOException e) {
    throw new DockerException(e);
  }
}

Fixed version (ground truth):
@Override public RegistryAuth authFor(final String imageName) throws DockerException {
  if (!configFileExists()) {
    return null;
  }
  final ImageRef ref=new ImageRef(imageName);
  try {
    final RegistryAuth registryAuth=reader.fromConfig(path,ref.getRegistryUrl());
    if (registryAuth != null) {
      return registryAuth;
    }
    return reader.fromConfig(path,ref.getRegistryName());
  }
 catch (  IllegalArgumentException e) {
    return null;
  }
catch (  IOException e) {
    throw new DockerException(e);
  }
}
Program: 111624
Project: 111624
Buggy source:
@Override protected String featureValueOf(final ImageRef actual){
  return actual.getRegistryName();
}

Fixed version (ground truth):
@Override protected String featureValueOf(final ImageRef actual){
  return actual.getRegistryUrl();
}
Program: 111625
Project: 111625
Buggy source:
@Test public void testRegistry(){
  final String defaultRegistry="String_Node_Str";
  assertThat(new ImageRef("String_Node_Str"),hasRegistry(defaultRegistry));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry(defaultRegistry));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry(defaultRegistry));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testRegistry(){
  final String defaultRegistry="String_Node_Str";
  assertThat(new ImageRef("String_Node_Str"),hasRegistry(defaultRegistry));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry(defaultRegistry));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry(defaultRegistry));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
  assertThat(new ImageRef("String_Node_Str"),hasRegistry("String_Node_Str"));
}
Program: 111626
Project: 111626
Buggy source:
@Override public RegistryAuth transformEntry(final String key,final RegistryAuth value){
  if (value.serverAddress() == null) {
    return value.toBuilder().serverAddress(key).build();
  }
  return value;
}

Fixed version (ground truth):
@Override public RegistryAuth transformEntry(final String key,final RegistryAuth value){
  if (value == null) {
    return null;
  }
  if (value.serverAddress() == null) {
    return value.toBuilder().serverAddress(key).build();
  }
  return value;
}
Program: 111627
Project: 111627
Buggy source:
@JsonCreator public static RegistryConfigs create(final Map<String,RegistryAuth> configs){
  if (configs == null) {
    return new AutoValue_RegistryConfigs(ImmutableMap.<String,RegistryAuth>of());
  }
  final Map<String,RegistryAuth> transformedMap=Maps.transformEntries(configs,new Maps.EntryTransformer<String,RegistryAuth,RegistryAuth>(){
    @Override public RegistryAuth transformEntry(    final String key,    final RegistryAuth value){
      if (value.serverAddress() == null) {
        return value.toBuilder().serverAddress(key).build();
      }
      return value;
    }
  }
);
  return new AutoValue_RegistryConfigs(ImmutableMap.copyOf(transformedMap));
}

Fixed version (ground truth):
@JsonCreator public static RegistryConfigs create(final Map<String,RegistryAuth> configs){
  if (configs == null) {
    return new AutoValue_RegistryConfigs(ImmutableMap.<String,RegistryAuth>of());
  }
  final Map<String,RegistryAuth> transformedMap=Maps.transformEntries(configs,new Maps.EntryTransformer<String,RegistryAuth,RegistryAuth>(){
    @Override public RegistryAuth transformEntry(    final String key,    final RegistryAuth value){
      if (value == null) {
        return null;
      }
      if (value.serverAddress() == null) {
        return value.toBuilder().serverAddress(key).build();
      }
      return value;
    }
  }
);
  return new AutoValue_RegistryConfigs(ImmutableMap.copyOf(transformedMap));
}
Program: 111628
Project: 111628
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  ListVolumesParam that=(ListVolumesParam)o;
  return Objects.equals(name,that.name) && Objects.equals(value,that.value);
}

Fixed version (ground truth):
@Override public boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  ListVolumesParam that=(ListVolumesParam)obj;
  return Objects.equals(name,that.name) && Objects.equals(value,that.value);
}
Program: 111629
Project: 111629
Buggy source:
private String message(final Response response){
  final Readable reader=new InputStreamReader(response.readEntity(InputStream.class),UTF_8);
  try {
    return CharStreams.toString(reader);
  }
 catch (  IOException ignore) {
    return null;
  }
}

Fixed version (ground truth):
private String message(final Response response){
  final Readable reader;
  try {
    reader=new InputStreamReader(response.readEntity(InputStream.class),UTF_8);
  }
 catch (  IllegalStateException e) {
    return null;
  }
  try {
    return CharStreams.toString(reader);
  }
 catch (  IOException ignore) {
    return null;
  }
}
Program: 111630
Project: 111630
Buggy source:
private DefaultLogStream(final InputStream stream){
  this.reader=new LogReader(stream);
}

Fixed version (ground truth):
@VisibleForTesting DefaultLogStream(final LogReader reader){
  this.reader=reader;
}
Program: 111631
Project: 111631
Buggy source:
public void attach(final OutputStream stdout,final OutputStream stderr,boolean closeAtEOF) throws IOException {
}

Fixed version (ground truth):
public void attach(final OutputStream stdout,final OutputStream stderr,boolean closeAtEOF) throws IOException {
  final Closer closer=Closer.create();
  try {
    if (closeAtEOF) {
      closer.register(stdout);
      closer.register(stderr);
    }
    while (this.hasNext()) {
      final LogMessage message=this.next();
      final ByteBuffer content=message.content();
switch (message.stream()) {
case STDOUT:
        writeAndFlush(content,stdout);
      break;
case STDERR:
    writeAndFlush(content,stderr);
  break;
case STDIN:
default :
break;
}
}
}
 catch (Throwable t) {
throw closer.rethrow(t);
}
 finally {
closer.close();
}
}
Program: 111632
Project: 111632
Buggy source:
@Override public void load(final String image,final InputStream imagePayload,final ProgressHandler handler) throws DockerException, InterruptedException {
  WebTarget resource=resource().path("String_Node_Str").path("String_Node_Str");
  resource=resource.queryParam("String_Node_Str","String_Node_Str").queryParam("String_Node_Str",image);
  final LoadProgressHandler loadProgressHandler=new LoadProgressHandler(handler);
  final Entity<InputStream> entity=Entity.entity(imagePayload,MediaType.APPLICATION_OCTET_STREAM);
  try (final ProgressStream load=request(POST,ProgressStream.class,resource,resource.request(APPLICATION_JSON_TYPE).header("String_Node_Str",authHeader(authConfig)),entity)){
    load.tail(loadProgressHandler,POST,resource.getUri());
    tag(loadProgressHandler.getImageId(),image,true);
  }
 catch (  IOException e) {
    throw new DockerException(e);
  }
 finally {
    IOUtils.closeQuietly(imagePayload);
  }
}

Fixed version (ground truth):
@Override public void load(final String image,final InputStream imagePayload,final AuthConfig authConfig,final ProgressHandler handler) throws DockerException, InterruptedException {
  WebTarget resource=resource().path("String_Node_Str").path("String_Node_Str");
  resource=resource.queryParam("String_Node_Str","String_Node_Str").queryParam("String_Node_Str",image);
  final LoadProgressHandler loadProgressHandler=new LoadProgressHandler(handler);
  final Entity<InputStream> entity=Entity.entity(imagePayload,MediaType.APPLICATION_OCTET_STREAM);
  try (final ProgressStream load=request(POST,ProgressStream.class,resource,resource.request(APPLICATION_JSON_TYPE).header("String_Node_Str",authHeader(authConfig)),entity)){
    load.tail(loadProgressHandler,POST,resource.getUri());
    tag(loadProgressHandler.getImageId(),image,true);
  }
 catch (  IOException e) {
    throw new DockerException(e);
  }
 finally {
    IOUtils.closeQuietly(imagePayload);
  }
}
Program: 111633
Project: 111633
Buggy source:
private void setAllSocketOptions() throws SocketException {
  for (  SocketOptionSetter s : optionsToSet) {
    s.run();
  }
}

Fixed version (ground truth):
private void setAllSocketOptions() throws SocketException {
  for (  final SocketOptionSetter s : optionsToSet) {
    s.run();
  }
}
Program: 111634
Project: 111634
Buggy source:
private static String createPattern(String line){
  String pattern=line.trim();
  if (pattern.startsWith("String_Node_Str")) {
    return null;
  }
  if (OSUtils.isLinux()) {
    return pattern;
  }
  return pattern.replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
private static String createPattern(String line){
  final String pattern=line.trim();
  if (pattern.startsWith("String_Node_Str")) {
    return null;
  }
  if (OSUtils.isLinux()) {
    return pattern;
  }
  return pattern.replace("String_Node_Str","String_Node_Str");
}
Program: 111635
Project: 111635
Buggy source:
/** 
 * Checks if any of the given   {@link DockerIgnorePathMatcher} matches the given {@code path}
 * @param matchers the {@link DockerIgnorePathMatcher} to use
 * @param path     the path to match
 * @return <code>true</code> if the given path should be excluded, <code>false</code> otherwise
 */
private static boolean exclude(ImmutableList<DockerIgnorePathMatcher> matchers,Path path){
  for (  DockerIgnorePathMatcher matcher : matchers) {
    if (matcher.matches(path)) {
      if (matcher.isExclude()) {
        return true;
      }
      return false;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks if any of the given   {@link DockerIgnorePathMatcher} matches the given {@code path}
 * @param matchers the {@link DockerIgnorePathMatcher} to use
 * @param path     the path to match
 * @return <code>true</code> if the given path should be excluded, <code>false</code> otherwise
 */
private static boolean exclude(ImmutableList<DockerIgnorePathMatcher> matchers,Path path){
  for (  final DockerIgnorePathMatcher matcher : matchers) {
    if (matcher.matches(path)) {
      return matcher.isExclude();
    }
  }
  return false;
}