nus-yam/ex-repair huggingface dataset:
Program: 64115
Project: 64115
Buggy source:
/** 
 * {@inheritDoc}. 
 */
public PlanarImage executeDrawOperation(){
  BufferedImage bi=new BufferedImage(width + (stroke_width * 2),height + (stroke_width * 2),BufferedImage.TYPE_4BYTE_ABGR_PRE);
  Graphics2D graphics=(Graphics2D)bi.getGraphics();
  if (!stroke.equals("String_Node_Str")) {
    BasicStroke bStroke=new BasicStroke(stroke_width);
    graphics.setColor(ColorMapper.getColorByName(stroke));
    graphics.setStroke(bStroke);
    graphics.draw(new Arc2D.Double(stroke_width,stroke_width,width,height,start,stop,type));
  }
  if (!fill.equals("String_Node_Str")) {
    graphics.setColor(ColorMapper.getColorByName(fill));
    graphics.fill(new Arc2D.Double(stroke_width,stroke_width,width,height,start,stop,type));
  }
  final int size=instructions.size();
  for (int i=0; i < size; i++) {
    ImageOperation instr=((ImageOperation)instructions.elementAt(i));
    if (instr instanceof DrawOperation) {
      PlanarImage img=((DrawOperation)instr).executeDrawOperation();
      graphics.drawImage(img.getAsBufferedImage(),null,0,0);
    }
 else     if (instr instanceof TransformOperation) {
      graphics=(Graphics2D)bi.getGraphics();
      PlanarImage image=((TransformOperation)instr).executeTransformOperation(PlanarImage.wrapRenderedImage(bi));
      bi=image.getAsBufferedImage();
    }
  }
  return PlanarImage.wrapRenderedImage(bi);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}. 
 */
public PlanarImage executeDrawOperation(){
  BufferedImage bi=new BufferedImage(width + (stroke_width * 2),height + (stroke_width * 2),BufferedImage.TYPE_4BYTE_ABGR_PRE);
  Graphics2D graphics=(Graphics2D)bi.getGraphics();
  if (!stroke.equals("String_Node_Str")) {
    BasicStroke bStroke=new BasicStroke(stroke_width);
    graphics.setColor(ColorMapper.getColorByName(stroke));
    graphics.setStroke(bStroke);
    graphics.draw(new Arc2D.Double(stroke_width,stroke_width,width,height,start,stop,type));
  }
  if (!fill.equals("String_Node_Str")) {
    graphics.setColor(ColorMapper.getColorByName(fill));
    graphics.fill(new Arc2D.Double(stroke_width,stroke_width,width,height,start,stop,type));
  }
  final int size=instructions.size();
  for (int i=0; i < size; i++) {
    ImageOperation instr=((ImageOperation)instructions.elementAt(i));
    if (instr instanceof DrawOperation) {
      PlanarImage img=((DrawOperation)instr).executeDrawOperation();
      graphics.drawImage(img.getAsBufferedImage(),null,0,0);
    }
 else     if (instr instanceof TransformOperation) {
      PlanarImage image=((TransformOperation)instr).executeTransformOperation(PlanarImage.wrapRenderedImage(bi));
      bi=image.getAsBufferedImage();
      graphics=(Graphics2D)bi.getGraphics();
    }
  }
  return PlanarImage.wrapRenderedImage(bi);
}
Program: 64116
Project: 64116
Buggy source:
/** 
 * {@inheritDoc}. 
 */
public PlanarImage executeDrawOperation(){
  BufferedImage bi=new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR_PRE);
  Graphics2D graphics=(Graphics2D)bi.getGraphics();
  if (!stroke.equals("String_Node_Str")) {
    BasicStroke bStroke=new BasicStroke(stroke_width);
    graphics.setColor(ColorMapper.getColorByName(stroke));
    graphics.setStroke(bStroke);
    graphics.draw(new Ellipse2D.Double(0,0,width,height));
  }
  if (!fill.equals("String_Node_Str")) {
    graphics.setColor(ColorMapper.getColorByName(fill));
    graphics.fill(new Ellipse2D.Double(0,0,width,height));
  }
  final int size=instructions.size();
  for (int i=0; i < size; i++) {
    ImageOperation instr=((ImageOperation)instructions.elementAt(i));
    if (instr instanceof DrawOperation) {
      PlanarImage img=((DrawOperation)instr).executeDrawOperation();
      graphics.drawImage(img.getAsBufferedImage(),null,0,0);
    }
 else     if (instr instanceof TransformOperation) {
      graphics=(Graphics2D)bi.getGraphics();
      PlanarImage image=((TransformOperation)instr).executeTransformOperation(PlanarImage.wrapRenderedImage(bi));
      bi=image.getAsBufferedImage();
    }
  }
  return PlanarImage.wrapRenderedImage(bi);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}. 
 */
public PlanarImage executeDrawOperation(){
  BufferedImage bi=new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR_PRE);
  Graphics2D graphics=(Graphics2D)bi.getGraphics();
  if (!stroke.equals("String_Node_Str")) {
    BasicStroke bStroke=new BasicStroke(stroke_width);
    graphics.setColor(ColorMapper.getColorByName(stroke));
    graphics.setStroke(bStroke);
    graphics.draw(new Ellipse2D.Double(0,0,width,height));
  }
  if (!fill.equals("String_Node_Str")) {
    graphics.setColor(ColorMapper.getColorByName(fill));
    graphics.fill(new Ellipse2D.Double(0,0,width,height));
  }
  final int size=instructions.size();
  for (int i=0; i < size; i++) {
    ImageOperation instr=((ImageOperation)instructions.elementAt(i));
    if (instr instanceof DrawOperation) {
      PlanarImage img=((DrawOperation)instr).executeDrawOperation();
      graphics.drawImage(img.getAsBufferedImage(),null,0,0);
    }
 else     if (instr instanceof TransformOperation) {
      PlanarImage image=((TransformOperation)instr).executeTransformOperation(PlanarImage.wrapRenderedImage(bi));
      bi=image.getAsBufferedImage();
      graphics=(Graphics2D)bi.getGraphics();
    }
  }
  return PlanarImage.wrapRenderedImage(bi);
}
Program: 64118
Project: 64118
Buggy source:
/** 
 * Draw the text.
 * @return the resultant image.
 */
public PlanarImage executeDrawOperation(){
  log("String_Node_Str" + strText + "String_Node_Str");
  int width=1;
  int height=1;
  BufferedImage bi=new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR_PRE);
  Graphics2D graphics=(Graphics2D)bi.getGraphics();
  graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,RenderingHints.VALUE_FRACTIONALMETRICS_ON);
  Font f=new Font(font,Font.PLAIN,point);
  FontMetrics fmetrics=graphics.getFontMetrics(f);
  height=fmetrics.getMaxAscent() + fmetrics.getMaxDescent();
  width=fmetrics.stringWidth(strText);
  bi=new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR_PRE);
  graphics=(Graphics2D)bi.getGraphics();
  graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,RenderingHints.VALUE_FRACTIONALMETRICS_ON);
  graphics.setFont(f);
  graphics.setColor(ColorMapper.getColorByName(color));
  graphics.drawString(strText,0,height - fmetrics.getMaxDescent());
  PlanarImage image=PlanarImage.wrapRenderedImage(bi);
  return image;
}

Fixed version (ground truth):
/** 
 * Draw the text.
 * @return the resultant image.
 */
public PlanarImage executeDrawOperation(){
  log("String_Node_Str" + strText + "String_Node_Str");
  int width=1;
  int height=1;
  BufferedImage bi=new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR_PRE);
  Graphics2D graphics=(Graphics2D)bi.getGraphics();
  graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,RenderingHints.VALUE_FRACTIONALMETRICS_ON);
  Font f=createFont();
  FontMetrics fmetrics=graphics.getFontMetrics(f);
  height=fmetrics.getMaxAscent() + fmetrics.getMaxDescent();
  width=fmetrics.stringWidth(strText);
  bi=new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR_PRE);
  graphics=(Graphics2D)bi.getGraphics();
  graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,RenderingHints.VALUE_FRACTIONALMETRICS_ON);
  graphics.setFont(f);
  graphics.setColor(ColorMapper.getColorByName(color));
  graphics.drawString(strText,0,height - fmetrics.getMaxDescent());
  PlanarImage image=PlanarImage.wrapRenderedImage(bi);
  return image;
}
Program: 64120
Project: 64120
Buggy source:
protected void dieOnCircularReference(Stack<Object> stk,Project p) throws BuildException {
  if (isChecked()) {
    return;
  }
  if (isReference()) {
    super.dieOnCircularReference(stk,p);
  }
 else {
    if (nested instanceof DataType) {
      pushAndInvokeCircularReferenceCheck((DataType)nested,stk,p);
    }
    setChecked(true);
  }
}

Fixed version (ground truth):
protected void dieOnCircularReference(Stack<Object> stk,Project p) throws BuildException {
  if (isChecked()) {
    return;
  }
  if (isReference()) {
    super.dieOnCircularReference(stk,p);
  }
 else {
    if (nested != null) {
      pushAndInvokeCircularReferenceCheck((DataType)nested,stk,p);
    }
    setChecked(true);
  }
}
Program: 64122
Project: 64122
Buggy source:
@Test public void testXalan2RedirectViaJDKFactory() throws Exception {
  try {
    getClass().getClassLoader().loadClass("String_Node_Str");
  }
 catch (  Exception exc) {
    Assume.assumeNoException("String_Node_Str",exc);
  }
  File xsl=getFile("String_Node_Str");
  liaison.setStylesheet(xsl);
  ((TraXLiaison)liaison).setFeature("String_Node_Str",true);
  File out=new File("String_Node_Str");
  File in=getFile("String_Node_Str");
  ClassLoader orig=Thread.currentThread().getContextClassLoader();
  try {
    liaison.addParam("String_Node_Str","String_Node_Str");
    Thread.currentThread().setContextClassLoader(new ClassLoader(ClassLoader.getSystemClassLoader().getParent()){
      public InputStream getResourceAsStream(      String name){
        if (name.startsWith("String_Node_Str")) {
          return new ByteArrayInputStream(new byte[0]);
        }
        return super.getResourceAsStream(name);
      }
    }
);
    System.setSecurityManager(new SecurityManager(){
      public void checkPermission(      Permission perm){
      }
    }
);
    liaison.transform(in,out);
  }
  finally {
    out.delete();
    Thread.currentThread().setContextClassLoader(orig);
    System.setSecurityManager(null);
  }
}

Fixed version (ground truth):
@Test public void testXalan2RedirectViaJDKFactory() throws Exception {
  try {
    getClass().getClassLoader().loadClass("String_Node_Str");
  }
 catch (  Exception exc) {
    Assume.assumeNoException("String_Node_Str",exc);
  }
  try {
    String factoryName=TransformerFactory.newInstance().getClass().getName();
    Assume.assumeFalse("String_Node_Str","String_Node_Str".equals(factoryName));
  }
 catch (  TransformerFactoryConfigurationError exc) {
    throw new RuntimeException(exc);
  }
  File xsl=getFile("String_Node_Str");
  liaison.setStylesheet(xsl);
  ((TraXLiaison)liaison).setFeature("String_Node_Str",true);
  File out=new File("String_Node_Str");
  File in=getFile("String_Node_Str");
  ClassLoader orig=Thread.currentThread().getContextClassLoader();
  try {
    liaison.addParam("String_Node_Str","String_Node_Str");
    Thread.currentThread().setContextClassLoader(new ClassLoader(ClassLoader.getSystemClassLoader().getParent()){
      public InputStream getResourceAsStream(      String name){
        if (name.startsWith("String_Node_Str")) {
          return new ByteArrayInputStream(new byte[0]);
        }
        return super.getResourceAsStream(name);
      }
    }
);
    System.setSecurityManager(new SecurityManager(){
      public void checkPermission(      Permission perm){
      }
    }
);
    liaison.transform(in,out);
  }
  finally {
    out.delete();
    Thread.currentThread().setContextClassLoader(orig);
    System.setSecurityManager(null);
  }
}
Program: 64125
Project: 64125
Buggy source:
/** 
 * demand creation of the package list. When you add a new package, add a new test below.
 */
private static void buildJrePackages(){
  jrePackages=new Vector<String>();
switch (javaVersionNumber) {
case VERSION_1_9:
case VERSION_1_8:
case VERSION_1_7:
case VERSION_1_6:
case VERSION_1_5:
    jrePackages.addElement("String_Node_Str");
case VERSION_1_4:
  if (javaVersionNumber == VERSION_1_4) {
    jrePackages.addElement("String_Node_Str");
    jrePackages.addElement("String_Node_Str");
    jrePackages.addElement("String_Node_Str");
    jrePackages.addElement("String_Node_Str");
  }
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
case VERSION_1_3:
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
case VERSION_1_2:
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
case VERSION_1_1:
default :
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
break;
}
}

Fixed version (ground truth):
/** 
 * demand creation of the package list. When you add a new package, add a new test below.
 */
private static void buildJrePackages(){
  jrePackages=new Vector<String>();
switch (javaVersionNumber) {
case VERSION_1_9:
case VERSION_1_8:
case VERSION_1_7:
    jrePackages.addElement("String_Node_Str");
case VERSION_1_6:
case VERSION_1_5:
  jrePackages.addElement("String_Node_Str");
case VERSION_1_4:
if (javaVersionNumber == VERSION_1_4) {
  jrePackages.addElement("String_Node_Str");
  jrePackages.addElement("String_Node_Str");
  jrePackages.addElement("String_Node_Str");
  jrePackages.addElement("String_Node_Str");
}
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
case VERSION_1_3:
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
case VERSION_1_2:
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
case VERSION_1_1:
default :
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
jrePackages.addElement("String_Node_Str");
break;
}
}
Program: 64126
Project: 64126
Buggy source:
/** 
 * Testing helper method; kept here for unification of changes.
 * @return a list of test classes depending on the java version.
 */
public static Vector<String> getJrePackageTestCases(){
  Vector<String> tests=new Vector<String>();
  tests.addElement("String_Node_Str");
switch (javaVersionNumber) {
case VERSION_1_9:
case VERSION_1_8:
case VERSION_1_7:
case VERSION_1_6:
case VERSION_1_5:
    tests.addElement("String_Node_Str");
case VERSION_1_4:
  tests.addElement("String_Node_Str");
if (javaVersionNumber == VERSION_1_4) {
  tests.addElement("String_Node_Str");
  tests.addElement("String_Node_Str");
  tests.addElement("String_Node_Str");
  tests.addElement("String_Node_Str");
}
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
case VERSION_1_3:
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
case VERSION_1_2:
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
case VERSION_1_1:
default :
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
break;
}
return tests;
}

Fixed version (ground truth):
/** 
 * Testing helper method; kept here for unification of changes.
 * @return a list of test classes depending on the java version.
 */
public static Vector<String> getJrePackageTestCases(){
  Vector<String> tests=new Vector<String>();
  tests.addElement("String_Node_Str");
switch (javaVersionNumber) {
case VERSION_1_9:
case VERSION_1_8:
case VERSION_1_7:
    tests.addElement("String_Node_Str");
case VERSION_1_6:
case VERSION_1_5:
  tests.addElement("String_Node_Str");
case VERSION_1_4:
tests.addElement("String_Node_Str");
if (javaVersionNumber == VERSION_1_4) {
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
}
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
case VERSION_1_3:
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
case VERSION_1_2:
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
case VERSION_1_1:
default :
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
tests.addElement("String_Node_Str");
break;
}
return tests;
}
Program: 64127
Project: 64127
Buggy source:
/** 
 * Sort keys by size so that tokens that are substrings of other strings are tried later.
 */
private Iterator<Object> getOrderedIterator(Properties props){
  Set<Object> keys=new TreeSet(new Comparator<Object>(){
    @Override public int compare(    Object key1,    Object key2){
      return compare(key1.toString(),key2.toString());
    }
    private int compare(    String key1,    String key2){
      return key2.length() - key1.length();
    }
  }
);
  keys.addAll(props.keySet());
  return keys.iterator();
}

Fixed version (ground truth):
/** 
 * Sort keys by size so that tokens that are substrings of other strings are tried later.
 */
private Iterator<Object> getOrderedIterator(Properties props){
  List<Object> keys=new ArrayList<Object>(props.keySet());
  Collections.sort(keys,new Comparator<Object>(){
    @Override public int compare(    Object key1,    Object key2){
      return compare(key1.toString(),key2.toString());
    }
    private int compare(    String key1,    String key2){
      return key2.length() - key1.length();
    }
  }
);
  return keys.iterator();
}
Program: 64128
Project: 64128
Buggy source:
public void testDifferentWindowsDrive(){
  if (!Os.isFamily("String_Node_Str")) {
    System.out.println("String_Node_Str");
  }
 else {
    try {
      new java.io.File("String_Node_Str").getCanonicalPath();
    }
 catch (    java.io.IOException e) {
      System.out.println("String_Node_Str" + "String_Node_Str");
      return;
    }
    expectBuildExceptionContaining("String_Node_Str","String_Node_Str","String_Node_Str");
    assertPropertyUnset("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testDifferentWindowsDrive(){
  if (!Os.isFamily("String_Node_Str")) {
    System.out.println("String_Node_Str");
  }
 else {
    File tmpdir=new File(System.getProperty("String_Node_Str"));
    String driveLetter="String_Node_Str";
    try {
      String tmpCanonicalPath=tmpdir.getCanonicalPath();
      driveLetter=tmpCanonicalPath.substring(1).toUpperCase();
    }
 catch (    IOException ioe) {
      System.out.println("String_Node_Str" + ioe.getMessage());
    }
    String altDriveLetter=null;
    try {
      if ("String_Node_Str".equals(driveLetter)) {
        altDriveLetter="String_Node_Str";
      }
 else {
        altDriveLetter="String_Node_Str";
      }
      new java.io.File(altDriveLetter + "String_Node_Str").getCanonicalPath();
    }
 catch (    java.io.IOException e) {
      System.out.println("String_Node_Str" + altDriveLetter + "String_Node_Str"+ "String_Node_Str");
      return;
    }
    expectBuildExceptionContaining("String_Node_Str","String_Node_Str","String_Node_Str");
    assertPropertyUnset("String_Node_Str");
  }
}
Program: 64130
Project: 64130
Buggy source:
/** 
 * Returns the next character in the filtered stream, converting non latin characters to unicode escapes.
 * @return the next character in the resulting stream, or -1if the end of the resulting stream has been reached
 * @exception IOException if the underlying stream throwsan IOException during reading
 */
public final int read() throws IOException {
  if (!getInitialized()) {
    initialize();
    setInitialized(true);
  }
  int ch=-1;
  if (unicodeBuf.length() == 0) {
    ch=in.read();
    if (ch != -1) {
      char achar=(char)ch;
      if (achar >= '\u0080') {
        unicodeBuf=new StringBuffer("String_Node_Str");
        String s=Integer.toHexString(ch);
        for (int i=0; i < s.length(); i++) {
          unicodeBuf.setCharAt(unicodeBuf.length() - s.length() + i,s.charAt(i));
        }
        ch='\\';
      }
    }
  }
 else {
    ch=(int)unicodeBuf.charAt(0);
    unicodeBuf.deleteCharAt(0);
  }
  return ch;
}

Fixed version (ground truth):
/** 
 * Returns the next character in the filtered stream, converting non latin characters to unicode escapes.
 * @return the next character in the resulting stream, or -1if the end of the resulting stream has been reached
 * @exception IOException if the underlying stream throwsan IOException during reading
 */
public final int read() throws IOException {
  if (!getInitialized()) {
    initialize();
    setInitialized(true);
  }
  int ch=-1;
  if (unicodeBuf.length() == 0) {
    ch=in.read();
    if (ch != -1) {
      char achar=(char)ch;
      if (achar >= '\u0080') {
        unicodeBuf=UnicodeUtil.EscapeUnicode(achar);
        ch='\\';
      }
    }
  }
 else {
    ch=(int)unicodeBuf.charAt(0);
    unicodeBuf.deleteCharAt(0);
  }
  return ch;
}
Program: 64131
Project: 64131
Buggy source:
/** 
 * Return the unicode escape sequence for a character, in the form \u005CuNNNN.
 * @param ch the character to encode
 * @return the unicode escape sequence
 */
private String escapeUnicode(char ch){
  StringBuffer buffy=new StringBuffer("String_Node_Str");
  String hex=Integer.toHexString((int)ch);
  buffy.append("String_Node_Str".substring(4 - hex.length()));
  buffy.append(hex);
  return buffy.toString();
}

Fixed version (ground truth):
/** 
 * Return the unicode escape sequence for a character, in the form \u005CuNNNN.
 * @param ch the character to encode
 * @return the unicode escape sequence
 */
private String escapeUnicode(char ch){
  return "String_Node_Str" + UnicodeUtil.EscapeUnicode(ch);
}
Program: 64132
Project: 64132
Buggy source:
/** 
 * Returns an array containing the target filename(s) for the given source file. <p>if the given rule doesn't apply to the source file, implementation must return null. SourceFileScanner will then omit the source file in question.</p>
 * @param sourceFileName the name of the source file relative tosome given basedirectory.
 * @return an array of strings if the ruld applies to the source file, ornull if it does not.
 */
String[] mapFileName(String sourceFileName);

Fixed version (ground truth):
/** 
 * Returns an array containing the target filename(s) for the given source file. <p>if the given rule doesn't apply to the source file, implementation must return null. SourceFileScanner will then omit the source file in question.</p>
 * @param sourceFileName the name of the source file relative tosome given basedirectory.
 * @return an array of strings if the rule applies to the source file, ornull if it does not.
 */
String[] mapFileName(String sourceFileName);
Program: 64133
Project: 64133
Buggy source:
private InetAddress selectBestAddress(InetAddress bestSoFar,InetAddress current){
  InetAddress best=bestSoFar;
  if (best == null) {
    best=current;
  }
 else {
    if (current == null || current.isLoopbackAddress()) {
    }
 else     if (current.isLinkLocalAddress()) {
      if (best.isLoopbackAddress()) {
        best=current;
      }
    }
 else     if (current.isSiteLocalAddress()) {
      if (best.isLoopbackAddress() || best.isLinkLocalAddress() || !hasHostName(best)) {
        best=current;
      }
    }
 else {
      if (best.isLoopbackAddress() || best.isLinkLocalAddress() || best.isSiteLocalAddress()|| !hasHostName(best)) {
        best=current;
      }
    }
  }
  return best;
}

Fixed version (ground truth):
private InetAddress selectBestAddress(InetAddress bestSoFar,InetAddress current){
  InetAddress best=bestSoFar;
  if (best == null) {
    best=current;
  }
 else {
    if (current == null || current.isLoopbackAddress()) {
    }
 else     if (current.isLinkLocalAddress()) {
      if (best.isLoopbackAddress()) {
        best=current;
      }
    }
 else     if (current.isSiteLocalAddress()) {
      if (best.isLoopbackAddress() || best.isLinkLocalAddress() || (best.isSiteLocalAddress() && !hasHostName(best))) {
        best=current;
      }
    }
 else {
      if (best.isLoopbackAddress() || best.isLinkLocalAddress() || best.isSiteLocalAddress()|| !hasHostName(best)) {
        best=current;
      }
    }
  }
  return best;
}
Program: 64134
Project: 64134
Buggy source:
/** 
 * This constructor extracts the needed information from the given test.
 * @param test Test to analyze
 */
public TestInfos(Test test){
  className=test.getClass().getName();
  methodName=test.toString();
  methodName=methodName.substring(0,methodName.indexOf('('));
}

Fixed version (ground truth):
/** 
 * This constructor extracts the needed information from the given test.
 * @param test Test to analyze
 */
public TestInfos(Test test){
  className=test.getClass().getName();
  String _methodName=test.toString();
  methodName=_methodName.substring(0,_methodName.indexOf('('));
}
Program: 64135
Project: 64135
Buggy source:
private void writeJavaClass(){
  try {
    File sourceFile=new File((getLocationName() + "String_Node_Str"));
    verbose("String_Node_Str" + sourceFile.getAbsolutePath() + "String_Node_Str");
    sourceFile.delete();
    writer=new BufferedWriter(new FileWriter(sourceFile));
    createClassHeader();
    createSuiteMethod();
    createClassFooter();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    FileUtils.close(writer);
  }
}

Fixed version (ground truth):
private void writeJavaClass(){
  try {
    File sourceFile=new File((getLocationName() + "String_Node_Str"));
    verbose("String_Node_Str" + sourceFile.getAbsolutePath() + "String_Node_Str");
    if (!sourceFile.delete()) {
      throw new IOException("String_Node_Str" + sourceFile);
    }
    writer=new BufferedWriter(new FileWriter(sourceFile));
    createClassHeader();
    createSuiteMethod();
    createClassFooter();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    FileUtils.close(writer);
  }
}
Program: 64137
Project: 64137
Buggy source:
/** 
 * Creates a new adapter for the given class and a method within the class.
 * @param testClass test class containing the method to be executed
 * @param methodNames names of the test methods that are to be executed
 * @exception java.lang.IllegalArgumentException if any of the arguments is  {@code null}or if any of the given method names is   {@code null} or empty
 */
public JUnit4TestMethodAdapter(final Class testClass,final String[] methodNames){
  if (testClass == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (methodNames == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (int i=0; i < methodNames.length; i++) {
    if (methodNames[i] == null) {
      throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
    }
    if (methodNames[i].length() == 0) {
      throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
    }
  }
  this.testClass=testClass;
  this.methodNames=methodNames;
  this.cache=Cache.instance;
  Request request;
  if (methodNames.length == 1) {
    request=Request.method(testClass,methodNames[0]);
  }
 else {
    request=Request.aClass(testClass).filterWith(new MultipleMethodsFilter(testClass,methodNames));
  }
  runner=request.getRunner();
}

Fixed version (ground truth):
/** 
 * Creates a new adapter for the given class and a method within the class.
 * @param testClass test class containing the method to be executed
 * @param methodNames names of the test methods that are to be executed
 * @exception java.lang.IllegalArgumentException if any of the arguments is  {@code null}or if any of the given method names is   {@code null} or empty
 */
public JUnit4TestMethodAdapter(final Class testClass,final String[] methodNames){
  if (testClass == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (methodNames == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (int i=0; i < methodNames.length; i++) {
    if (methodNames[i] == null) {
      throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
    }
    if (methodNames[i].length() == 0) {
      throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
    }
  }
  this.testClass=testClass;
  this.methodNames=(String[])methodNames.clone();
  this.cache=Cache.instance;
  Request request;
  if (methodNames.length == 1) {
    request=Request.method(testClass,methodNames[0]);
  }
 else {
    request=Request.aClass(testClass).filterWith(new MultipleMethodsFilter(testClass,methodNames));
  }
  runner=request.getRunner();
}
Program: 64138
Project: 64138
Buggy source:
/** 
 * Creates a JUnitTest instance that shares all flags with the passed in instance but has a more meaningful name. <p>If a VM running multiple tests crashes, we don't know which test failed.  Prior to Ant 1.8.0 Ant would log the error with the last test of the batch test, which caused some confusion since the log might look as if a test had been executed last that was never started.  With Ant 1.8.0 the test's name will indicate that something went wrong with a test inside the batch without giving it a real name.</p>
 * @see https://issues.apache.org/bugzilla/show_bug.cgi?id=45227
 */
private static JUnitTest createDummyTestForBatchTest(JUnitTest test){
  JUnitTest t=(JUnitTest)test.clone();
  int index=test.getName().indexOf("String_Node_Str");
  String pack=index > 0 ? test.getName().substring(0,index + 1) : "String_Node_Str";
  t.setName(pack + NAME_OF_DUMMY_TEST);
  return t;
}

Fixed version (ground truth):
/** 
 * Creates a JUnitTest instance that shares all flags with the passed in instance but has a more meaningful name. <p>If a VM running multiple tests crashes, we don't know which test failed.  Prior to Ant 1.8.0 Ant would log the error with the last test of the batch test, which caused some confusion since the log might look as if a test had been executed last that was never started.  With Ant 1.8.0 the test's name will indicate that something went wrong with a test inside the batch without giving it a real name.</p>
 * @see https://issues.apache.org/bugzilla/show_bug.cgi?id=45227
 */
private static JUnitTest createDummyTestForBatchTest(JUnitTest test){
  JUnitTest t=(JUnitTest)test.clone();
  int index=test.getName().indexOf('.');
  String pack=index > 0 ? test.getName().substring(0,index + 1) : "String_Node_Str";
  t.setName(pack + NAME_OF_DUMMY_TEST);
  return t;
}
Program: 64139
Project: 64139
Buggy source:
/** 
 * Creates a new JUnitRunner and enables fork of a new Java VM.
 * @throws Exception under ??? circumstances
 * @since Ant 1.2
 */
public JUnitTask() throws Exception {
  getCommandline().setClassname("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Creates a new JUnitRunner and enables fork of a new Java VM.
 * @throws Exception under ??? circumstances
 * @since Ant 1.2
 */
public JUnitTask() throws Exception {
}
Program: 64141
Project: 64141
Buggy source:
private static String maybeStripJarAndClass(URL u){
  String s=u.toString();
  if (s.startsWith("String_Node_Str")) {
    int pling=s.indexOf("String_Node_Str");
    s=s.substring(4,pling == -1 ? s.length() : pling);
  }
  return s;
}

Fixed version (ground truth):
private static String maybeStripJarAndClass(URL u){
  String s=u.toString();
  if (s.startsWith("String_Node_Str")) {
    int pling=s.indexOf('!');
    s=s.substring(4,pling == -1 ? s.length() : pling);
  }
  return s;
}
Program: 64142
Project: 64142
Buggy source:
/** 
 * Get the command line used to run the tests.
 * @return the command line.
 * @since Ant 1.6.2
 */
protected CommandlineJava getCommandline(){
  if (commandline == null) {
    commandline=new CommandlineJava();
  }
  return commandline;
}

Fixed version (ground truth):
/** 
 * Get the command line used to run the tests.
 * @return the command line.
 * @since Ant 1.6.2
 */
protected CommandlineJava getCommandline(){
  if (commandline == null) {
    commandline=new CommandlineJava();
    commandline.setClassname("String_Node_Str");
  }
  return commandline;
}
Program: 64143
Project: 64143
Buggy source:
/** 
 * Compares URLs for equality but takes case-sensitivity into account when comparing file URLs and ignores the jar specific part of the URL if present.
 */
private static boolean urlEquals(URL u1,URL u2){
  String url1=maybeStripJarAndClass(u1);
  String url2=maybeStripJarAndClass(u2);
  if (url1.startsWith("String_Node_Str") && url2.startsWith("String_Node_Str")) {
    return new File(FILE_UTILS.fromURI(url1)).equals(new File(FILE_UTILS.fromURI(url2)));
  }
  return u1.equals(u2);
}

Fixed version (ground truth):
/** 
 * Compares URLs for equality but takes case-sensitivity into account when comparing file URLs and ignores the jar specific part of the URL if present.
 */
private static boolean urlEquals(URL u1,URL u2){
  String url1=maybeStripJarAndClass(u1);
  String url2=maybeStripJarAndClass(u2);
  if (url1.startsWith("String_Node_Str") && url2.startsWith("String_Node_Str")) {
    return new File(FILE_UTILS.fromURI(url1)).equals(new File(FILE_UTILS.fromURI(url2)));
  }
  return url1.equals(url2);
}
Program: 64144
Project: 64144
Buggy source:
/** 
 * Sets up the delegate that will actually run the tests. <p>Will be invoked implicitly once the delegate is needed.</p>
 * @since Ant 1.7.1
 */
protected void setupJUnitDelegate(){
  ClassLoader myLoader=JUnitTask.class.getClassLoader();
  if (splitJunit) {
    Path path=new Path(getProject());
    path.add(antRuntimeClasses);
    Path extra=getCommandline().getClasspath();
    if (extra != null) {
      path.add(extra);
    }
    mirrorLoader=new SplitClassLoader(myLoader,path,getProject(),new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  }
 else {
    mirrorLoader=myLoader;
  }
  delegate=createMirror(this,mirrorLoader);
}

Fixed version (ground truth):
/** 
 * Sets up the delegate that will actually run the tests. <p>Will be invoked implicitly once the delegate is needed.</p>
 * @since Ant 1.7.1
 */
protected void setupJUnitDelegate(){
  final ClassLoader myLoader=JUnitTask.class.getClassLoader();
  if (splitJunit) {
    final Path path=new Path(getProject());
    path.add(antRuntimeClasses);
    Path extra=getCommandline().getClasspath();
    if (extra != null) {
      path.add(extra);
    }
    mirrorLoader=(ClassLoader)AccessController.doPrivileged(new PrivilegedAction(){
      public Object run(){
        return new SplitClassLoader(myLoader,path,getProject(),new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
      }
    }
);
  }
 else {
    mirrorLoader=myLoader;
  }
  delegate=createMirror(this,mirrorLoader);
}
Program: 64146
Project: 64146
Buggy source:
/** 
 * Constructor with options.
 * @param name the name of the test.
 * @param haltOnError if true halt the tests if there is an error.
 * @param haltOnFailure if true halt the tests if there is a failure.
 * @param filtertrace if true filter stack traces.
 * @param methods if true run only test methods that failed during theprevious run of the test suite
 * @since 1.8.2
 */
public JUnitTest(String name,boolean haltOnError,boolean haltOnFailure,boolean filtertrace,String[] methods){
  this.name=name;
  this.haltOnError=haltOnError;
  this.haltOnFail=haltOnFailure;
  this.filtertrace=filtertrace;
  this.methods=methods;
  this.methodsSpecified=(methods != null);
}

Fixed version (ground truth):
/** 
 * Constructor with options.
 * @param name the name of the test.
 * @param haltOnError if true halt the tests if there is an error.
 * @param haltOnFailure if true halt the tests if there is a failure.
 * @param filtertrace if true filter stack traces.
 * @param methods if non-null run only these test methods
 * @since 1.8.2
 */
public JUnitTest(String name,boolean haltOnError,boolean haltOnFailure,boolean filtertrace,String[] methods){
  this.name=name;
  this.haltOnError=haltOnError;
  this.haltOnFail=haltOnFailure;
  this.filtertrace=filtertrace;
  this.methodsSpecified=methods != null;
  this.methods=methodsSpecified ? (String[])methods.clone() : null;
}
Program: 64148
Project: 64148
Buggy source:
/** 
 * Constructor to use when the user has specified a classpath.
 * @since 1.8.2
 */
public JUnitTestRunner(JUnitTest test,String[] methods,boolean haltOnError,boolean filtertrace,boolean haltOnFailure,boolean showOutput,boolean logTestListenerEvents,ClassLoader loader){
  JUnitTestRunner.filtertrace=filtertrace;
  this.junitTest=test;
  this.haltOnError=haltOnError;
  this.haltOnFailure=haltOnFailure;
  this.showOutput=showOutput;
  this.logTestListenerEvents=logTestListenerEvents;
  this.methods=methods;
  this.loader=loader;
}

Fixed version (ground truth):
/** 
 * Constructor to use when the user has specified a classpath.
 * @since 1.8.2
 */
public JUnitTestRunner(JUnitTest test,String[] methods,boolean haltOnError,boolean filtertrace,boolean haltOnFailure,boolean showOutput,boolean logTestListenerEvents,ClassLoader loader){
  JUnitTestRunner.filtertrace=filtertrace;
  this.junitTest=test;
  this.haltOnError=haltOnError;
  this.haltOnFailure=haltOnFailure;
  this.showOutput=showOutput;
  this.logTestListenerEvents=logTestListenerEvents;
  this.methods=methods != null ? (String[])methods.clone() : null;
  this.loader=loader;
}
Program: 64150
Project: 64150
Buggy source:
/** 
 * Load named class either via the system classloader or a given custom classloader. As a side effect, the loader is set as the thread context classloader
 * @param classname the name of the class to load.
 * @return the requested class.
 * @exception Exception if the class could not be loaded.
 */
private Class loadClass(String classname) throws Exception {
  if (classpath == null) {
    return Class.forName(classname);
  }
  loader=getProject().createClassLoader(classpath);
  loader.setThreadContextLoader();
  return Class.forName(classname,true,loader);
}

Fixed version (ground truth):
/** 
 * Load named class either via the system classloader or a given custom classloader. As a side effect, the loader is set as the thread context classloader
 * @param classname the name of the class to load.
 * @return the requested class.
 * @exception Exception if the class could not be loaded.
 */
private Class loadClass(String classname) throws Exception {
  setupLoader();
  if (loader == null) {
    return Class.forName(classname);
  }
  return Class.forName(classname,true,loader);
}
Program: 64151
Project: 64151
Buggy source:
/** 
 * Load processor here instead of in setProcessor - this will be called from within execute, so we have access to the latest classpath.
 * @param proc the name of the processor to load.
 * @exception Exception if the processor cannot be loaded.
 */
private void resolveProcessor(String proc) throws Exception {
  String classname;
  if (proc.equals(PROCESSOR_TRAX)) {
    classname=TRAX_LIAISON_CLASS;
  }
 else {
    classname=proc;
  }
  Class clazz=loadClass(classname);
  liaison=(XSLTLiaison)clazz.newInstance();
}

Fixed version (ground truth):
/** 
 * Load processor here instead of in setProcessor - this will be called from within execute, so we have access to the latest classpath.
 * @param proc the name of the processor to load.
 * @exception Exception if the processor cannot be loaded.
 */
private void resolveProcessor(String proc) throws Exception {
  String classname;
  if (proc.equals(PROCESSOR_TRAX)) {
    liaison=new org.apache.tools.ant.taskdefs.optional.TraXLiaison();
  }
 else {
    Class clazz=loadClass(proc);
    liaison=(XSLTLiaison)clazz.newInstance();
  }
}
Program: 64155
Project: 64155
Buggy source:
/** 
 * Log if the definition is overriding something
 * @param name       what is being defined
 * @param definition what should be null if you don't want a warning
 */
private void logOverride(String name,Object definition){
  if (definition != null) {
    log(WARN_OVERRIDING + '<' + name+ '>',Project.MSG_WARN);
  }
}

Fixed version (ground truth):
/** 
 * Log if the definition is overriding something
 * @param name       what is being defined
 * @param definition what should be null if you don't want a warning
 */
private void logOverride(String name,Object definition){
  if (definition != null) {
    log(WARN_OVERRIDING + '<' + name+ '>',Project.MSG_INFO);
  }
}
Program: 64156
Project: 64156
Buggy source:
private char med3(char a,char b,char c){
  char t;
  if (a > b) {
    t=a;
    a=b;
    b=t;
  }
  if (b > c) {
    t=b;
    b=c;
    c=t;
  }
  if (a > b) {
    b=a;
  }
  return b;
}

Fixed version (ground truth):
private char med3(char a,char b,char c){
  char t;
  if (a > b) {
    t=a;
    a=b;
    b=t;
  }
  if (b > c) {
    b=c;
  }
  if (a > b) {
    b=a;
  }
  return b;
}
Program: 64161
Project: 64161
Buggy source:
/** 
 * Get the central data.
 * @return the central data if present, else return the local file data
 */
public byte[] getCentralDirectoryData(){
  if (centralData != null) {
    return centralData;
  }
  return getLocalFileDataData();
}

Fixed version (ground truth):
/** 
 * Get the central data.
 * @return the central data if present, else return the local file data
 */
public byte[] getCentralDirectoryData(){
  if (centralData != null) {
    return copy(centralData);
  }
  return getLocalFileDataData();
}
Program: 64162
Project: 64162
Buggy source:
/** 
 * Set the extra field data in the local file data - without Header-ID or length specifier.
 * @param data the field data to use
 */
public void setLocalFileDataData(byte[] data){
  localData=data;
}

Fixed version (ground truth):
/** 
 * Set the extra field data in the local file data - without Header-ID or length specifier.
 * @param data the field data to use
 */
public void setLocalFileDataData(byte[] data){
  localData=copy(data);
}
Program: 64163
Project: 64163
Buggy source:
/** 
 * Set the extra field data in central directory.
 * @param data the data to use
 */
public void setCentralDirectoryData(byte[] data){
  centralData=data;
}

Fixed version (ground truth):
/** 
 * Set the extra field data in central directory.
 * @param data the data to use
 */
public void setCentralDirectoryData(byte[] data){
  centralData=copy(data);
}
Program: 64164
Project: 64164
Buggy source:
/** 
 * Get the local data.
 * @return the local data
 */
public byte[] getLocalFileDataData(){
  return localData;
}

Fixed version (ground truth):
/** 
 * Get the local data.
 * @return the local data
 */
public byte[] getLocalFileDataData(){
  return copy(localData);
}
Program: 64165
Project: 64165
Buggy source:
/** 
 * Walks through all recorded entries and adds the data available from the local file header. <p>Also records the offsets for the data to read from the entries.</p>
 */
private void resolveLocalFileHeaderData() throws IOException {
  Enumeration e=getEntries();
  while (e.hasMoreElements()) {
    ZipEntry ze=(ZipEntry)e.nextElement();
    OffsetEntry offsetEntry=(OffsetEntry)entries.get(ze);
    long offset=offsetEntry.headerOffset;
    archive.seek(offset + LFH_OFFSET_FOR_FILENAME_LENGTH);
    byte[] b=new byte[SHORT];
    archive.readFully(b);
    int fileNameLen=ZipShort.getValue(b);
    archive.readFully(b);
    int extraFieldLen=ZipShort.getValue(b);
    archive.skipBytes(fileNameLen);
    byte[] localExtraData=new byte[extraFieldLen];
    archive.readFully(localExtraData);
    ze.setExtra(localExtraData);
    offsetEntry.dataOffset=offset + LFH_OFFSET_FOR_FILENAME_LENGTH + SHORT+ SHORT+ fileNameLen+ extraFieldLen;
  }
}

Fixed version (ground truth):
/** 
 * Walks through all recorded entries and adds the data available from the local file header. <p>Also records the offsets for the data to read from the entries.</p>
 */
private void resolveLocalFileHeaderData() throws IOException {
  Enumeration e=getEntries();
  while (e.hasMoreElements()) {
    ZipEntry ze=(ZipEntry)e.nextElement();
    OffsetEntry offsetEntry=(OffsetEntry)entries.get(ze);
    long offset=offsetEntry.headerOffset;
    archive.seek(offset + LFH_OFFSET_FOR_FILENAME_LENGTH);
    byte[] b=new byte[SHORT];
    archive.readFully(b);
    int fileNameLen=ZipShort.getValue(b);
    archive.readFully(b);
    int extraFieldLen=ZipShort.getValue(b);
    int lenToSkip=fileNameLen;
    while (lenToSkip > 0) {
      int skipped=archive.skipBytes(lenToSkip);
      if (skipped <= 0) {
        throw new RuntimeException("String_Node_Str" + "String_Node_Str");
      }
      lenToSkip-=skipped;
    }
    byte[] localExtraData=new byte[extraFieldLen];
    archive.readFully(localExtraData);
    ze.setExtra(localExtraData);
    offsetEntry.dataOffset=offset + LFH_OFFSET_FOR_FILENAME_LENGTH + SHORT+ SHORT+ fileNameLen+ extraFieldLen;
  }
}
Program: 64167
Project: 64167
Buggy source:
/** 
 * Sets the timestampGranularity attribute
 * @param timestampGranularity The timestampGranularity to set.
 */
public void setTimestampGranularity(Granularity timestampGranularity){
  if (null == timestampGranularity || "String_Node_Str".equals(timestampGranularity)) {
    return;
  }
  this.timestampGranularity=timestampGranularity;
}

Fixed version (ground truth):
/** 
 * Sets the timestampGranularity attribute
 * @param timestampGranularity The timestampGranularity to set.
 */
public void setTimestampGranularity(Granularity timestampGranularity){
  if (null == timestampGranularity || "String_Node_Str".equals(timestampGranularity.getValue())) {
    return;
  }
  this.timestampGranularity=timestampGranularity;
}
Program: 64169
Project: 64169
Buggy source:
/** 
 * Sets the serverLanguageCode attribute.
 * @param serverLanguageCode configuration to be set, unless it isnull or empty string, in which case ignored.
 * @see org.apache.commons.net.ftp.FTPClientConfig
 */
public void setServerLanguageCodeConfig(LanguageCode serverLanguageCode){
  if (serverLanguageCode != null && !serverLanguageCode.equals("String_Node_Str")) {
    this.serverLanguageCodeConfig=serverLanguageCode;
    configurationHasBeenSet();
  }
}

Fixed version (ground truth):
/** 
 * Sets the serverLanguageCode attribute.
 * @param serverLanguageCode configuration to be set, unless it isnull or empty string, in which case ignored.
 * @see org.apache.commons.net.ftp.FTPClientConfig
 */
public void setServerLanguageCodeConfig(LanguageCode serverLanguageCode){
  if (serverLanguageCode != null && !"String_Node_Str".equals(serverLanguageCode.getValue())) {
    this.serverLanguageCodeConfig=serverLanguageCode;
    configurationHasBeenSet();
  }
}
Program: 64170
Project: 64170
Buggy source:
/** 
 * Wrapper to identify nested resource collections as ZIP archives.
 */
public Union createZips(){
  if (isReference()) {
    throw noChildrenAllowed();
  }
  return zips;
}

Fixed version (ground truth):
/** 
 * Wrapper to identify nested resource collections as ZIP archives.
 */
public Union createZips(){
  if (isReference()) {
    throw noChildrenAllowed();
  }
  setChecked(false);
  return zips;
}
Program: 64171
Project: 64171
Buggy source:
/** 
 * Merges the nested collections.
 */
public Iterator iterator(){
  if (isReference()) {
    return ((Archives)getCheckedRef()).iterator();
  }
  List l=new LinkedList();
  for (Iterator i=grabArchives(); i.hasNext(); ) {
    l.addAll(CollectionUtils.asCollection(((ResourceCollection)i.next()).iterator()));
  }
  return l.iterator();
}

Fixed version (ground truth):
/** 
 * Merges the nested collections.
 */
public Iterator iterator(){
  if (isReference()) {
    return ((Archives)getCheckedRef()).iterator();
  }
  dieOnCircularReference();
  List l=new LinkedList();
  for (Iterator i=grabArchives(); i.hasNext(); ) {
    l.addAll(CollectionUtils.asCollection(((ResourceCollection)i.next()).iterator()));
  }
  return l.iterator();
}