nus-yam/ex-repair huggingface dataset:
Program: 64172
Project: 64172
Buggy source:
/** 
 * @return false
 */
public boolean isFilesystemOnly(){
  if (isReference()) {
    return ((MappedResourceCollection)getCheckedRef()).isFilesystemOnly();
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @return false
 */
public boolean isFilesystemOnly(){
  if (isReference()) {
    return ((Archives)getCheckedRef()).isFilesystemOnly();
  }
  dieOnCircularReference();
  return false;
}
Program: 64173
Project: 64173
Buggy source:
/** 
 * Sums the sizes of nested archives.
 */
public int size(){
  if (isReference()) {
    return ((Archives)getCheckedRef()).size();
  }
  int total=0;
  for (Iterator i=grabArchives(); i.hasNext(); ) {
    total+=((ResourceCollection)i.next()).size();
  }
  return total;
}

Fixed version (ground truth):
/** 
 * Sums the sizes of nested archives.
 */
public int size(){
  if (isReference()) {
    return ((Archives)getCheckedRef()).size();
  }
  dieOnCircularReference();
  int total=0;
  for (Iterator i=grabArchives(); i.hasNext(); ) {
    total+=((ResourceCollection)i.next()).size();
  }
  return total;
}
Program: 64174
Project: 64174
Buggy source:
/** 
 * Wrapper to identify nested resource collections as ZIP archives.
 */
public Union createTars(){
  if (isReference()) {
    throw noChildrenAllowed();
  }
  return tars;
}

Fixed version (ground truth):
/** 
 * Wrapper to identify nested resource collections as ZIP archives.
 */
public Union createTars(){
  if (isReference()) {
    throw noChildrenAllowed();
  }
  setChecked(false);
  return tars;
}
Program: 64175
Project: 64175
Buggy source:
private void processFile(String file) throws BuildException {
  File srcFile=new File(srcDir,file);
  long lastModified=srcFile.lastModified();
  File destD=destDir == null ? srcDir : destDir;
  if (fcv == null) {
    FilterChain fc=new FilterChain();
    fc.add(filter);
    fcv=new Vector(1);
    fcv.add(fc);
  }
  File tmpFile=FILE_UTILS.createTempFile("String_Node_Str","String_Node_Str",null,true,false);
  try {
    FILE_UTILS.copyFile(srcFile,tmpFile,null,fcv,false,false,encoding,outputEncoding == null ? encoding : outputEncoding,getProject());
    File destFile=new File(destD,file);
    boolean destIsWrong=true;
    if (destFile.exists()) {
      log("String_Node_Str",Project.MSG_DEBUG);
      destIsWrong=!FILE_UTILS.contentEquals(destFile,tmpFile);
      log(destFile + (destIsWrong ? "String_Node_Str" : "String_Node_Str"),Project.MSG_DEBUG);
    }
    if (destIsWrong) {
      FILE_UTILS.rename(tmpFile,destFile);
      if (preserveLastModified) {
        log("String_Node_Str",Project.MSG_DEBUG);
        FILE_UTILS.setFileLastModified(destFile,lastModified);
      }
      tmpFile=null;
    }
  }
 catch (  IOException e) {
    throw new BuildException(e);
  }
}

Fixed version (ground truth):
private void processFile(String file) throws BuildException {
  File srcFile=new File(srcDir,file);
  long lastModified=srcFile.lastModified();
  File destD=destDir == null ? srcDir : destDir;
  if (fcv == null) {
    FilterChain fc=new FilterChain();
    fc.add(filter);
    fcv=new Vector(1);
    fcv.add(fc);
  }
  File tmpFile=FILE_UTILS.createTempFile("String_Node_Str","String_Node_Str",null,true,false);
  try {
    FILE_UTILS.copyFile(srcFile,tmpFile,null,fcv,false,false,encoding,outputEncoding == null ? encoding : outputEncoding,getProject());
    File destFile=new File(destD,file);
    boolean destIsWrong=true;
    if (destFile.exists()) {
      log("String_Node_Str" + destFile + "String_Node_Str",Project.MSG_DEBUG);
      destIsWrong=!FILE_UTILS.contentEquals(destFile,tmpFile);
      log(destFile + (destIsWrong ? "String_Node_Str" : "String_Node_Str"),Project.MSG_DEBUG);
    }
    if (destIsWrong) {
      FILE_UTILS.rename(tmpFile,destFile);
      if (preserveLastModified) {
        log("String_Node_Str" + destFile,Project.MSG_DEBUG);
        FILE_UTILS.setFileLastModified(destFile,lastModified);
      }
      tmpFile=null;
    }
  }
 catch (  IOException e) {
    throw new BuildException("String_Node_Str" + srcFile,e);
  }
}
Program: 64176
Project: 64176
Buggy source:
/** 
 * Specify tab length in characters.
 * @param tlength specify the length of tab in spaces.
 * @throws BuildException on error.
 */
public void setTablength(int tlength) throws BuildException {
  try {
    filter.setTablength(tlength);
  }
 catch (  IOException e) {
    throw new BuildException(e);
  }
}

Fixed version (ground truth):
/** 
 * Specify tab length in characters.
 * @param tlength specify the length of tab in spaces.
 * @throws BuildException on error.
 */
public void setTablength(int tlength) throws BuildException {
  try {
    filter.setTablength(tlength);
  }
 catch (  IOException e) {
    throw new BuildException(e.getMessage(),e);
  }
}
Program: 64177
Project: 64177
Buggy source:
/** 
 * Get the Collection of delegates of the specified type.
 * @param type delegate type.
 * @return Collection.
 * @since Ant 1.8
 */
protected List getDelegates(Class type){
  return delegates.containsKey(type) ? (List)new ArrayList((List)delegates.get(type)) : Collections.EMPTY_LIST;
}

Fixed version (ground truth):
/** 
 * Get the Collection of delegates of the specified type.
 * @param type delegate type.
 * @return Collection.
 * @since Ant 1.8
 */
protected List getDelegates(Class type){
  Hashtable curDelegates=delegates;
  return curDelegates.containsKey(type) ? (List)new ArrayList((List)curDelegates.get(type)) : Collections.EMPTY_LIST;
}
Program: 64178
Project: 64178
Buggy source:
/** 
 * Fulfill the ResourceCollection contract.
 * @return whether this Resource is a FileProvider.
 */
public boolean isFilesystemOnly(){
  return getResource().isFilesystemOnly();
}

Fixed version (ground truth):
/** 
 * Fulfill the ResourceCollection contract.
 * @return whether this Resource is a FileProvider.
 */
public boolean isFilesystemOnly(){
  return false;
}
Program: 64180
Project: 64180
Buggy source:
/** 
 * Removes a classloader if needed.
 * @since Ant 1.7
 */
private void deleteClassLoader(){
  if (classLoader != null) {
    classLoader.cleanup();
    classLoader=null;
  }
}

Fixed version (ground truth):
/** 
 * Removes a classloader if needed.
 * @since Ant 1.7
 */
private void deleteClassLoader(){
  if (classLoader != null) {
    classLoader.cleanup();
    classLoader=null;
  }
  if (mirrorLoader instanceof SplitLoader) {
    ((SplitLoader)mirrorLoader).cleanup();
  }
  mirrorLoader=null;
}
Program: 64181
Project: 64181
Buggy source:
/** 
 * Take care that some output is produced in report files if the forked machine terminated before the test suite finished
 * @since Ant 1.7
 */
private void logVmExit(FormatterElement[] feArray,JUnitTest test,String message,String testCase){
  try {
    log("String_Node_Str" + System.getProperties(),Project.MSG_VERBOSE);
    if (splitJunit) {
      classLoader=(AntClassLoader)delegate.getClass().getClassLoader();
    }
 else {
      createClassLoader();
    }
    if (classLoader != null) {
      classLoader.setThreadContextLoader();
    }
    test.setCounts(1,0,1);
    test.setProperties(getProject().getProperties());
    for (int i=0; i < feArray.length; i++) {
      FormatterElement fe=feArray[i];
      File outFile=getOutput(fe,test);
      JUnitTaskMirror.JUnitResultFormatterMirror formatter=fe.createFormatter(classLoader);
      if (outFile != null && formatter != null) {
        try {
          OutputStream out=new FileOutputStream(outFile);
          delegate.addVmExit(test,formatter,out,message,testCase);
        }
 catch (        IOException e) {
        }
      }
    }
    if (summary) {
      JUnitTaskMirror.SummaryJUnitResultFormatterMirror f=delegate.newSummaryJUnitResultFormatter();
      f.setWithOutAndErr("String_Node_Str".equalsIgnoreCase(summaryValue));
      delegate.addVmExit(test,f,getDefaultOutput(),message,testCase);
    }
  }
  finally {
    if (classLoader != null) {
      classLoader.resetThreadContextLoader();
    }
  }
}

Fixed version (ground truth):
/** 
 * Take care that some output is produced in report files if the forked machine terminated before the test suite finished
 * @since Ant 1.7
 */
private void logVmExit(FormatterElement[] feArray,JUnitTest test,String message,String testCase){
  if (delegate == null) {
    setupJUnitDelegate();
  }
  try {
    log("String_Node_Str" + System.getProperties(),Project.MSG_VERBOSE);
    if (splitJunit) {
      classLoader=(AntClassLoader)delegate.getClass().getClassLoader();
    }
 else {
      createClassLoader();
    }
    if (classLoader != null) {
      classLoader.setThreadContextLoader();
    }
    test.setCounts(1,0,1);
    test.setProperties(getProject().getProperties());
    for (int i=0; i < feArray.length; i++) {
      FormatterElement fe=feArray[i];
      File outFile=getOutput(fe,test);
      JUnitTaskMirror.JUnitResultFormatterMirror formatter=fe.createFormatter(classLoader);
      if (outFile != null && formatter != null) {
        try {
          OutputStream out=new FileOutputStream(outFile);
          delegate.addVmExit(test,formatter,out,message,testCase);
        }
 catch (        IOException e) {
        }
      }
    }
    if (summary) {
      JUnitTaskMirror.SummaryJUnitResultFormatterMirror f=delegate.newSummaryJUnitResultFormatter();
      f.setWithOutAndErr("String_Node_Str".equalsIgnoreCase(summaryValue));
      delegate.addVmExit(test,f,getDefaultOutput(),message,testCase);
    }
  }
  finally {
    if (classLoader != null) {
      classLoader.resetThreadContextLoader();
    }
  }
}
Program: 64182
Project: 64182
Buggy source:
private void validate() throws BuildException {
  if (file != null) {
    if (srcDir != null) {
      throw new BuildException(ERROR_FILE_AND_SRCDIR);
    }
    fileset.setFile(file);
    srcDir=file.getParentFile();
  }
  if (srcDir == null) {
    throw new BuildException("String_Node_Str");
  }
  if (!srcDir.exists()) {
    throw new BuildException("String_Node_Str");
  }
  if (!srcDir.isDirectory()) {
    throw new BuildException("String_Node_Str");
  }
  if (destDir != null) {
    if (!destDir.exists()) {
      throw new BuildException("String_Node_Str");
    }
    if (!destDir.isDirectory()) {
      throw new BuildException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void validate() throws BuildException {
  if (file != null) {
    if (srcDir != null) {
      throw new BuildException(ERROR_FILE_AND_SRCDIR);
    }
    fileset.setFile(file);
    srcDir=file.getParentFile();
  }
  if (srcDir == null) {
    throw new BuildException(FIXCRLF_ERROR + "String_Node_Str");
  }
  if (!srcDir.exists()) {
    throw new BuildException(FIXCRLF_ERROR + "String_Node_Str" + srcDir+ "String_Node_Str");
  }
  if (!srcDir.isDirectory()) {
    throw new BuildException(FIXCRLF_ERROR + "String_Node_Str" + srcDir+ "String_Node_Str");
  }
  if (destDir != null) {
    if (!destDir.exists()) {
      throw new BuildException(FIXCRLF_ERROR + "String_Node_Str" + destDir+ "String_Node_Str");
    }
    if (!destDir.isDirectory()) {
      throw new BuildException(FIXCRLF_ERROR + "String_Node_Str" + destDir+ "String_Node_Str");
    }
  }
}
Program: 64183
Project: 64183
Buggy source:
public Object evaluate(String property,PropertyHelper propertyHelper){
  Stack stk=(Stack)getStack.get();
  if (stk.contains(property)) {
    return null;
  }
  stk.push(property);
  try {
    if (propertyHelper.getProperty(property) != null) {
      return null;
    }
  }
  finally {
    stk.pop();
  }
  Object value=map.get(property);
  if (!(value instanceof String)) {
    return null;
  }
  stk=(Stack)replaceStack.get();
  if (stk.contains(property)) {
    throw new BuildException("String_Node_Str" + name + "String_Node_Str");
  }
  stk.push(property);
  try {
    return propertyHelper.replaceProperties((String)value);
  }
  finally {
    stk.pop();
  }
}

Fixed version (ground truth):
public Object evaluate(String property,PropertyHelper propertyHelper){
  Stack stk=(Stack)getStack.get();
  if (stk.contains(property)) {
    return null;
  }
  stk.push(property);
  try {
    if (propertyHelper.getProperty(property) != null) {
      return null;
    }
  }
  finally {
    stk.pop();
  }
  Object value=map.get(property);
  if (!(value instanceof String)) {
    return null;
  }
  stk=(Stack)replaceStack.get();
  if (stk.contains(property)) {
    throw new BuildException("String_Node_Str" + property + "String_Node_Str");
  }
  stk.push(property);
  try {
    return propertyHelper.replaceProperties((String)value);
  }
  finally {
    stk.pop();
  }
}
Program: 64184
Project: 64184
Buggy source:
private boolean hasPatterns(PatternSet ps){
  return ps.getIncludePatterns(getProject()).length > 0 || ps.getExcludePatterns(getProject()).length > 0;
}

Fixed version (ground truth):
private boolean hasPatterns(PatternSet ps){
  String[] includePatterns=ps.getIncludePatterns(getProject());
  String[] excludePatterns=ps.getExcludePatterns(getProject());
  return (includePatterns != null && includePatterns.length > 0) || (includePatterns != null && excludePatterns.length > 0);
}
Program: 64188
Project: 64188
Buggy source:
public void test1(){
  expectLog("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void test1(){
  expectLog("String_Node_Str","String_Node_Str");
  expectOutput("String_Node_Str","String_Node_Str");
}
Program: 64190
Project: 64190
Buggy source:
/** 
 * Try to create a nested element of <code>parent</code> for the given tag.
 * @return whether the creation has been successful
 */
private boolean handleChild(String parentUri,IntrospectionHelper ih,Object parent,UnknownElement child,RuntimeConfigurable childWrapper){
  String childName=ProjectHelper.genComponentName(child.getNamespace(),child.getTag());
  if (ih.supportsNestedElement(parentUri,childName)) {
    IntrospectionHelper.Creator creator=ih.getElementCreator(getProject(),parentUri,parent,childName,child);
    creator.setPolyType(childWrapper.getPolyType());
    Object realChild=creator.create();
    if (realChild instanceof PreSetDef.PreSetDefinition) {
      PreSetDef.PreSetDefinition def=(PreSetDef.PreSetDefinition)realChild;
      realChild=creator.getRealObject();
      child.applyPreSet(def.getPreSets());
    }
    childWrapper.setCreator(creator);
    childWrapper.setProxy(realChild);
    if (realChild instanceof Task) {
      Task childTask=(Task)realChild;
      childTask.setRuntimeConfigurableWrapper(childWrapper);
      childTask.setTaskName(childName);
      childTask.setTaskType(childName);
    }
    if (realChild instanceof ProjectComponent) {
      ((ProjectComponent)realChild).setLocation(child.getLocation());
    }
    child.handleChildren(realChild,childWrapper);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Try to create a nested element of <code>parent</code> for the given tag.
 * @return whether the creation has been successful
 */
private boolean handleChild(String parentUri,IntrospectionHelper ih,Object parent,UnknownElement child,RuntimeConfigurable childWrapper){
  String childName=ProjectHelper.genComponentName(child.getNamespace(),child.getTag());
  if (ih.supportsNestedElement(parentUri,childName)) {
    IntrospectionHelper.Creator creator=ih.getElementCreator(getProject(),parentUri,parent,childName,child);
    creator.setPolyType(childWrapper.getPolyType());
    Object realChild=creator.create();
    if (realChild instanceof PreSetDef.PreSetDefinition) {
      PreSetDef.PreSetDefinition def=(PreSetDef.PreSetDefinition)realChild;
      realChild=creator.getRealObject();
      child.applyPreSet(def.getPreSets());
    }
    childWrapper.setCreator(creator);
    childWrapper.setProxy(realChild);
    if (realChild instanceof Task) {
      Task childTask=(Task)realChild;
      childTask.setRuntimeConfigurableWrapper(childWrapper);
      childTask.setTaskName(childName);
      childTask.setTaskType(childName);
    }
    if (realChild instanceof ProjectComponent) {
      ((ProjectComponent)realChild).setLocation(child.getLocation());
    }
    childWrapper.maybeConfigure(getProject());
    child.handleChildren(realChild,childWrapper);
    creator.store();
    return true;
  }
  return false;
}
Program: 64191
Project: 64191
Buggy source:
/** 
 * Configure the given object from this UnknownElement
 * @param realObject the real object this UnknownElement is representing.
 */
public void configure(Object realObject){
  realThing=realObject;
  getWrapper().setProxy(realThing);
  Task task=null;
  if (realThing instanceof Task) {
    task=(Task)realThing;
    task.setRuntimeConfigurableWrapper(getWrapper());
    if (getWrapper().getId() != null) {
      this.getOwningTarget().replaceChild(this,(Task)realThing);
    }
  }
  handleChildren(realThing,getWrapper());
  if (task != null) {
    task.maybeConfigure();
  }
 else {
    getWrapper().maybeConfigure(getProject());
  }
}

Fixed version (ground truth):
/** 
 * Configure the given object from this UnknownElement
 * @param realObject the real object this UnknownElement is representing.
 */
public void configure(Object realObject){
  realThing=realObject;
  getWrapper().setProxy(realThing);
  Task task=null;
  if (realThing instanceof Task) {
    task=(Task)realThing;
    task.setRuntimeConfigurableWrapper(getWrapper());
    if (getWrapper().getId() != null) {
      this.getOwningTarget().replaceChild(this,(Task)realThing);
    }
  }
  if (task != null) {
    task.maybeConfigure();
  }
 else {
    getWrapper().maybeConfigure(getProject());
  }
  handleChildren(realThing,getWrapper());
}
Program: 64192
Project: 64192
Buggy source:
/** 
 * Returns an enumeration of URLs representing all the resources with the given name by searching the class loader's classpath.
 * @param name The resource name to search for.Must not be <code>null</code>.
 * @return an enumeration of URLs for the resources
 * @exception IOException if I/O errors occurs (can't happen)
 */
protected Enumeration findResources(String name) throws IOException {
  Enumeration mine=new ResourceEnumeration(name);
  Enumeration base;
  if (parent != null && parent != getParent()) {
    base=parent.getResources(name);
  }
 else {
    base=new CollectionUtils.EmptyEnumeration();
  }
  if (isParentFirst(name)) {
    return CollectionUtils.append(base,mine);
  }
 else   if (isolated) {
    return mine;
  }
 else {
    return CollectionUtils.append(mine,base);
  }
}

Fixed version (ground truth):
/** 
 * Returns an enumeration of URLs representing all the resources with the given name by searching the class loader's classpath.
 * @param name The resource name to search for.Must not be <code>null</code>.
 * @return an enumeration of URLs for the resources
 * @exception IOException if I/O errors occurs (can't happen)
 */
protected Enumeration findResources(String name) throws IOException {
  Enumeration mine=new ResourceEnumeration(name);
  Enumeration base;
  if (parent != null && parent != getParent()) {
    base=parent.getResources(name);
  }
 else {
    base=new CollectionUtils.EmptyEnumeration();
  }
  if (isParentFirst(name)) {
    return CollectionUtils.append(base,mine);
  }
 else {
    return CollectionUtils.append(mine,base);
  }
}
Program: 64194
Project: 64194
Buggy source:
/** 
 * Sets whether this classloader should run in isolated mode. In isolated mode, classes not found on the given classpath will not be referred to the parent class loader but will cause a ClassNotFoundException.
 * @param isolated Whether or not this classloader should run inisolated mode.
 */
public synchronized void setIsolated(boolean isolated){
  this.isolated=isolated;
}

Fixed version (ground truth):
/** 
 * Sets whether this classloader should run in isolated mode. In isolated mode, classes not found on the given classpath will not be referred to the parent class loader but will cause a ClassNotFoundException.
 * @param isolated Whether or not this classloader should run inisolated mode.
 */
public synchronized void setIsolated(boolean isolated){
  ignoreBase=isolated;
}
Program: 64195
Project: 64195
Buggy source:
/** 
 * Delete a directory
 * @param d the directory to delete
 */
protected void removeDir(File d){
  String[] list=d.list();
  if (list == null) {
    list=new String[0];
  }
  for (int i=0; i < list.length; i++) {
    String s=list[i];
    File f=new File(d,s);
    if (f.isDirectory()) {
      removeDir(f);
    }
 else {
      log("String_Node_Str" + f.getAbsolutePath(),verbosity);
      if (!delete(f)) {
        handle("String_Node_Str" + f.getAbsolutePath());
      }
    }
  }
  log("String_Node_Str" + d.getAbsolutePath(),verbosity);
  if (!delete(d)) {
    handle("String_Node_Str" + dir.getAbsolutePath());
  }
}

Fixed version (ground truth):
/** 
 * Delete a directory
 * @param d the directory to delete
 */
protected void removeDir(File d){
  String[] list=d.list();
  if (list == null) {
    list=new String[0];
  }
  for (int i=0; i < list.length; i++) {
    String s=list[i];
    File f=new File(d,s);
    if (f.isDirectory()) {
      removeDir(f);
    }
 else {
      log("String_Node_Str" + f.getAbsolutePath(),quiet ? Project.MSG_VERBOSE : verbosity);
      if (!delete(f)) {
        handle("String_Node_Str" + f.getAbsolutePath());
      }
    }
  }
  log("String_Node_Str" + d.getAbsolutePath(),verbosity);
  if (!delete(d)) {
    handle("String_Node_Str" + dir.getAbsolutePath());
  }
}
Program: 64196
Project: 64196
Buggy source:
/** 
 * remove an array of files in a directory, and a list of subdirectories which will only be deleted if 'includeEmpty' is true
 * @param d directory to work from
 * @param files array of files to delete; can be of zero length
 * @param dirs array of directories to delete; can of zero length
 */
protected void removeFiles(File d,String[] files,String[] dirs){
  if (files.length > 0) {
    log("String_Node_Str" + files.length + "String_Node_Str"+ d.getAbsolutePath());
    for (int j=0; j < files.length; j++) {
      File f=new File(d,files[j]);
      log("String_Node_Str" + f.getAbsolutePath(),verbosity);
      if (!delete(f)) {
        handle("String_Node_Str" + f.getAbsolutePath());
      }
    }
  }
  if (dirs.length > 0 && includeEmpty) {
    int dirCount=0;
    for (int j=dirs.length - 1; j >= 0; j--) {
      File currDir=new File(d,dirs[j]);
      String[] dirFiles=currDir.list();
      if (dirFiles == null || dirFiles.length == 0) {
        log("String_Node_Str" + currDir.getAbsolutePath(),verbosity);
        if (!delete(currDir)) {
          handle("String_Node_Str" + currDir.getAbsolutePath());
        }
 else {
          dirCount++;
        }
      }
    }
    if (dirCount > 0) {
      log("String_Node_Str" + dirCount + "String_Node_Str"+ (dirCount == 1 ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ d.getAbsolutePath());
    }
  }
}

Fixed version (ground truth):
/** 
 * remove an array of files in a directory, and a list of subdirectories which will only be deleted if 'includeEmpty' is true
 * @param d directory to work from
 * @param files array of files to delete; can be of zero length
 * @param dirs array of directories to delete; can of zero length
 */
protected void removeFiles(File d,String[] files,String[] dirs){
  if (files.length > 0) {
    log("String_Node_Str" + files.length + "String_Node_Str"+ d.getAbsolutePath(),quiet ? Project.MSG_VERBOSE : verbosity);
    for (int j=0; j < files.length; j++) {
      File f=new File(d,files[j]);
      log("String_Node_Str" + f.getAbsolutePath(),quiet ? Project.MSG_VERBOSE : verbosity);
      if (!delete(f)) {
        handle("String_Node_Str" + f.getAbsolutePath());
      }
    }
  }
  if (dirs.length > 0 && includeEmpty) {
    int dirCount=0;
    for (int j=dirs.length - 1; j >= 0; j--) {
      File currDir=new File(d,dirs[j]);
      String[] dirFiles=currDir.list();
      if (dirFiles == null || dirFiles.length == 0) {
        log("String_Node_Str" + currDir.getAbsolutePath(),quiet ? Project.MSG_VERBOSE : verbosity);
        if (!delete(currDir)) {
          handle("String_Node_Str" + currDir.getAbsolutePath());
        }
 else {
          dirCount++;
        }
      }
    }
    if (dirCount > 0) {
      log("String_Node_Str" + dirCount + "String_Node_Str"+ (dirCount == 1 ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ d.getAbsolutePath(),quiet ? Project.MSG_VERBOSE : verbosity);
    }
  }
}
Program: 64197
Project: 64197
Buggy source:
private void handle(Exception e){
  if (failonerror) {
    throw (e instanceof BuildException) ? (BuildException)e : new BuildException(e);
  }
  log(e.getMessage(),quiet ? Project.MSG_VERBOSE : Project.MSG_WARN);
}

Fixed version (ground truth):
private void handle(Exception e){
  if (failonerror) {
    throw (e instanceof BuildException) ? (BuildException)e : new BuildException(e);
  }
  log(e.getMessage(),quiet ? Project.MSG_VERBOSE : verbosity);
}
Program: 64199
Project: 64199
Buggy source:
/** 
 * Delete a directory
 * @param d the directory to delete
 */
protected void removeDir(File d){
  String[] list=d.list();
  if (list == null) {
    list=new String[0];
  }
  for (int i=0; i < list.length; i++) {
    String s=list[i];
    File f=new File(d,s);
    if (f.isDirectory()) {
      removeDir(f);
    }
 else {
      log("String_Node_Str" + f.getAbsolutePath(),verbosity);
      if (!delete(f)) {
        String message="String_Node_Str" + f.getAbsolutePath();
        if (failonerror) {
          throw new BuildException(message);
        }
 else {
          log(message,quiet ? Project.MSG_VERBOSE : Project.MSG_WARN);
        }
      }
    }
  }
  log("String_Node_Str" + d.getAbsolutePath(),verbosity);
  if (!delete(d)) {
    String message="String_Node_Str" + dir.getAbsolutePath();
    if (failonerror) {
      throw new BuildException(message);
    }
 else {
      log(message,quiet ? Project.MSG_VERBOSE : Project.MSG_WARN);
    }
  }
}

Fixed version (ground truth):
/** 
 * Delete a directory
 * @param d the directory to delete
 */
protected void removeDir(File d){
  String[] list=d.list();
  if (list == null) {
    list=new String[0];
  }
  for (int i=0; i < list.length; i++) {
    String s=list[i];
    File f=new File(d,s);
    if (f.isDirectory()) {
      removeDir(f);
    }
 else {
      log("String_Node_Str" + f.getAbsolutePath(),verbosity);
      if (!delete(f)) {
        handle("String_Node_Str" + f.getAbsolutePath());
      }
    }
  }
  log("String_Node_Str" + d.getAbsolutePath(),verbosity);
  if (!delete(d)) {
    handle("String_Node_Str" + dir.getAbsolutePath());
  }
}
Program: 64203
Project: 64203
Buggy source:
public void setUp(){
  p=new Project();
  p.init();
}

Fixed version (ground truth):
public void setUp(){
  p=new Project();
  p.init();
  configureProject("String_Node_Str");
  getProject().executeTarget("String_Node_Str");
}
Program: 64205
Project: 64205
Buggy source:
private File createCommandFile(String[] cmd,String[] env) throws IOException {
  File script=FILE_UTILS.createTempFile("String_Node_Str","String_Node_Str",null);
  script.deleteOnExit();
  PrintWriter out=null;
  try {
    out=new PrintWriter(new FileWriter(script));
    if (env != null) {
      int eqIndex;
      for (int i=1; i < env.length; i++) {
        eqIndex=env[i].indexOf('=');
        if (eqIndex != -1) {
          out.print("String_Node_Str");
          out.print(env[i].substring(0,eqIndex));
          out.print("String_Node_Str");
          out.print(env[i].substring(eqIndex + 1));
          out.println('\"');
        }
      }
    }
    out.print("String_Node_Str" + cmd[0]);
    for (int i=1; i < cmd.length; i++) {
      out.println("String_Node_Str");
      out.print(cmd[i]);
    }
  }
  finally {
    if (out != null) {
      out.close();
    }
  }
  return script;
}

Fixed version (ground truth):
private File createCommandFile(String[] cmd,String[] env) throws IOException {
  File script=FILE_UTILS.createTempFile("String_Node_Str","String_Node_Str",null);
  script.deleteOnExit();
  PrintWriter out=null;
  try {
    out=new PrintWriter(new FileWriter(script));
    if (env != null) {
      int eqIndex;
      for (int i=0; i < env.length; i++) {
        eqIndex=env[i].indexOf('=');
        if (eqIndex != -1) {
          out.print("String_Node_Str");
          out.print(env[i].substring(0,eqIndex));
          out.print("String_Node_Str");
          out.print(env[i].substring(eqIndex + 1));
          out.println('\"');
        }
      }
    }
    out.print("String_Node_Str" + cmd[0]);
    for (int i=1; i < cmd.length; i++) {
      out.println("String_Node_Str");
      out.print(cmd[i]);
    }
  }
  finally {
    if (out != null) {
      out.close();
    }
  }
  return script;
}
Program: 64206
Project: 64206
Buggy source:
/** 
 * Checks to see if the remote file is current as compared with the local file. Returns true if the target file is up to date.
 * @param ftp ftpclient
 * @param localFile local file
 * @param remoteFile remote file
 * @return true if the target file is up to date
 * @throws IOException  in unknown circumstances
 * @throws BuildException if the date of the remote files cannot be found and the action isGET_FILES
 */
protected boolean isUpToDate(FTPClient ftp,File localFile,String remoteFile) throws IOException, BuildException {
  log("String_Node_Str" + remoteFile,Project.MSG_VERBOSE);
  FTPFile[] files=ftp.listFiles(remoteFile);
  if (files == null || files.length == 0) {
    if (action == SEND_FILES) {
      log("String_Node_Str" + remoteFile + "String_Node_Str",Project.MSG_VERBOSE);
      return false;
    }
 else {
      throw new BuildException("String_Node_Str" + ftp.getReplyString());
    }
  }
  long remoteTimestamp=files[0].getTimestamp().getTime().getTime();
  long localTimestamp=localFile.lastModified();
  if (this.action == SEND_FILES) {
    return remoteTimestamp + timeDiffMillis > localTimestamp;
  }
 else {
    return localTimestamp > remoteTimestamp + timeDiffMillis;
  }
}

Fixed version (ground truth):
/** 
 * Checks to see if the remote file is current as compared with the local file. Returns true if the target file is up to date.
 * @param ftp ftpclient
 * @param localFile local file
 * @param remoteFile remote file
 * @return true if the target file is up to date
 * @throws IOException  in unknown circumstances
 * @throws BuildException if the date of the remote files cannot be found and the action isGET_FILES
 */
protected boolean isUpToDate(FTPClient ftp,File localFile,String remoteFile) throws IOException, BuildException {
  log("String_Node_Str" + remoteFile,Project.MSG_VERBOSE);
  FTPFile[] files=ftp.listFiles(remoteFile);
  if (files == null || files.length == 0) {
    if (action == SEND_FILES) {
      log("String_Node_Str" + remoteFile + "String_Node_Str",Project.MSG_VERBOSE);
      return false;
    }
 else {
      throw new BuildException("String_Node_Str" + ftp.getReplyString());
    }
  }
  long remoteTimestamp=files[0].getTimestamp().getTime().getTime();
  long localTimestamp=localFile.lastModified();
  if (this.action == SEND_FILES) {
    return remoteTimestamp + timeDiffMillis >= localTimestamp;
  }
 else {
    return localTimestamp >= remoteTimestamp + timeDiffMillis;
  }
}
Program: 64208
Project: 64208
Buggy source:
/** 
 * Stop the pumper as soon as possible. Note that it may continue to block on the input stream but it will really stop the thread as soon as it gets EOF or any byte, and it will be marked as finished.
 * @since Ant 1.6.3
 */
synchronized void stop(){
  finished=true;
  notifyAll();
}

Fixed version (ground truth):
/** 
 * Stop the pumper as soon as possible. Note that it may continue to block on the input stream but it will really stop the thread as soon as it gets EOF or any byte, and it will be marked as finished.
 * @since Ant 1.6.3
 */
synchronized void stop(){
  finish=true;
  notifyAll();
}
Program: 64209
Project: 64209
Buggy source:
/** 
 * Copies data from the input stream to the output stream. Terminates as soon as the input stream is closed or an error occurs.
 */
public void run(){
synchronized (this) {
    finished=false;
  }
  final byte[] buf=new byte[SIZE];
  int length;
  try {
    while ((length=is.read(buf)) > 0 && !finished) {
      os.write(buf,0,length);
      if (autoflush) {
        os.flush();
      }
    }
  }
 catch (  Exception e) {
  }
 finally {
    if (closeWhenExhausted) {
      try {
        os.close();
      }
 catch (      IOException e) {
      }
    }
synchronized (this) {
      finished=true;
      notifyAll();
    }
  }
}

Fixed version (ground truth):
/** 
 * Copies data from the input stream to the output stream. Terminates as soon as the input stream is closed or an error occurs.
 */
public void run(){
  finished=false;
  finish=false;
  final byte[] buf=new byte[SIZE];
  int length;
  try {
    while ((length=is.read(buf)) > 0 && !finish) {
      os.write(buf,0,length);
      if (autoflush) {
        os.flush();
      }
    }
    os.flush();
  }
 catch (  Exception e) {
  }
 finally {
    if (closeWhenExhausted) {
      try {
        os.close();
      }
 catch (      IOException e) {
      }
    }
    finished=true;
synchronized (this) {
      notifyAll();
    }
  }
}
Program: 64210
Project: 64210
Buggy source:
/** 
 * Tells whether the end of the stream has been reached.
 * @return true is the stream has been exhausted.
 */
public synchronized boolean isFinished(){
  return finished;
}

Fixed version (ground truth):
/** 
 * Tells whether the end of the stream has been reached.
 * @return true is the stream has been exhausted.
 */
public boolean isFinished(){
  return finished;
}
Program: 64211
Project: 64211
Buggy source:
/** 
 * Handles an error line by logging it with the ERR priority.
 * @param output The error output to log. Should not be <code>null</code>.
 * @since Ant 1.5.2
 */
protected void handleErrorFlush(String output){
  handleErrorOutput(output);
}

Fixed version (ground truth):
/** 
 * Handles an error line by logging it with the WARN priority.
 * @param output The error output to log. Should not be <code>null</code>.
 * @since Ant 1.5.2
 */
protected void handleErrorFlush(String output){
  handleErrorOutput(output);
}
Program: 64212
Project: 64212
Buggy source:
/** 
 * Construct a new <CODE>ConcatFileInputStream</CODE> with the specified <CODE>File[]</CODE>.
 * @param file   <CODE>File[]</CODE>.
 * @throws <CODE>IOException</CODE> if I/O errors occur.
 */
public ConcatFileInputStream(File[] file) throws IOException {
  this.file=file;
  openFile(currentIndex);
}

Fixed version (ground truth):
/** 
 * Construct a new <CODE>ConcatFileInputStream</CODE> with the specified <CODE>File[]</CODE>.
 * @param file   <CODE>File[]</CODE>.
 * @throws <CODE>IOException</CODE> if I/O errors occur.
 */
public ConcatFileInputStream(File[] file) throws IOException {
  this.file=file;
}
Program: 64213
Project: 64213
Buggy source:
/** 
 * Load the script from an external file ; optional.
 * @param fileName the name of the file containing the script source.
 */
public void setSrc(String fileName){
  File file=new File(fileName);
  runner.setSrc(file);
}

Fixed version (ground truth):
/** 
 * Load the script from an external file ; optional.
 * @param fileName the name of the file containing the script source.
 */
public void setSrc(String fileName){
  this.src=new File(fileName);
}
Program: 64214
Project: 64214
Buggy source:
/** 
 * Set the script text.
 * @param text a component of the script text to be added.
 */
public void addText(String text){
  runner.addText(text);
}

Fixed version (ground truth):
/** 
 * Set the script text.
 * @param text a component of the script text to be added.
 */
public void addText(String text){
  this.text=text;
}
Program: 64215
Project: 64215
Buggy source:
/** 
 * Do the work.
 * @exception BuildException if something goes wrong with the build
 */
public void execute() throws BuildException {
  runner.addBeans(getProject().getProperties());
  runner.addBeans(getProject().getUserProperties());
  runner.addBeans(getProject().getTargets());
  runner.addBeans(getProject().getReferences());
  runner.addBean("String_Node_Str",getProject());
  runner.addBean("String_Node_Str",this);
  runner.executeScript("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Do the work.
 * @exception BuildException if something goes wrong with the build
 */
public void execute() throws BuildException {
  ScriptRunner runner=new ScriptRunner();
  if (language != null) {
    runner.setLanguage(language);
  }
  if (src != null) {
    runner.setSrc(src);
  }
  if (text != null) {
    runner.addText(text);
  }
  runner.addBeans(getProject().getProperties());
  runner.addBeans(getProject().getUserProperties());
  runner.addBeans(getProject().getTargets());
  runner.addBeans(getProject().getReferences());
  runner.addBean("String_Node_Str",getProject());
  runner.addBean("String_Node_Str",this);
  runner.executeScript("String_Node_Str");
}
Program: 64216
Project: 64216
Buggy source:
/** 
 * Defines the language (required).
 * @param language the scripting language name for the script.
 */
public void setLanguage(String language){
  runner.setLanguage(language);
}

Fixed version (ground truth):
/** 
 * Defines the language (required).
 * @param language the scripting language name for the script.
 */
public void setLanguage(String language){
  this.language=language;
}
Program: 64217
Project: 64217
Buggy source:
/** 
 * Read into the buffer <code>cbuf</code>.
 * @param cbuf The array to be read into.
 * @param off The offset.
 * @param len The length to read.
 * @exception IOException - possibly thrown by the reads to thereader objects.
 */
public int read(char[] cbuf,int off,int len) throws IOException {
  int amountRead=0;
  while (pos < sourceFiles.size() || (needAddSeparator)) {
    if (needAddSeparator) {
      cbuf[off]=eolString.charAt(lastPos++);
      if (lastPos >= eolString.length()) {
        lastPos=0;
        needAddSeparator=false;
        pos++;
      }
      len--;
      off++;
      amountRead++;
      if (len == 0) {
        return amountRead;
      }
      continue;
    }
    int nRead=getReader().read(cbuf,off,len);
    if (nRead == -1 || nRead == 0) {
      reader.close();
      reader=null;
      if (fixLastLine && isMissingEndOfLine()) {
        needAddSeparator=true;
        lastPos=0;
      }
 else {
        pos++;
      }
    }
 else {
      if (fixLastLine) {
        for (int i=nRead; i > (nRead - lastChars.length); --i) {
          if (i < 0) {
            break;
          }
          addLastChar(cbuf[off + i]);
        }
      }
      len-=nRead;
      off+=nRead;
      amountRead+=nRead;
      if (len == 0) {
        return amountRead;
      }
    }
  }
  if (amountRead == 0) {
    return -1;
  }
 else {
    return amountRead;
  }
}

Fixed version (ground truth):
/** 
 * Read into the buffer <code>cbuf</code>.
 * @param cbuf The array to be read into.
 * @param off The offset.
 * @param len The length to read.
 * @exception IOException - possibly thrown by the reads to thereader objects.
 */
public int read(char[] cbuf,int off,int len) throws IOException {
  int amountRead=0;
  while (pos < sourceFiles.size() || (needAddSeparator)) {
    if (needAddSeparator) {
      cbuf[off]=eolString.charAt(lastPos++);
      if (lastPos >= eolString.length()) {
        lastPos=0;
        needAddSeparator=false;
        pos++;
      }
      len--;
      off++;
      amountRead++;
      if (len == 0) {
        return amountRead;
      }
      continue;
    }
    int nRead=getReader().read(cbuf,off,len);
    if (nRead == -1 || nRead == 0) {
      reader.close();
      reader=null;
      if (fixLastLine && isMissingEndOfLine()) {
        needAddSeparator=true;
        lastPos=0;
      }
 else {
        pos++;
      }
    }
 else {
      if (fixLastLine) {
        for (int i=nRead; i > (nRead - lastChars.length); --i) {
          if (i < 0) {
            break;
          }
          addLastChar(cbuf[off + i - 1]);
        }
      }
      len-=nRead;
      off+=nRead;
      amountRead+=nRead;
      if (len == 0) {
        return amountRead;
      }
    }
  }
  if (amountRead == 0) {
    return -1;
  }
 else {
    return amountRead;
  }
}
Program: 64218
Project: 64218
Buggy source:
public void setUp(){
  configureProject("String_Node_Str");
  getProject().executeTarget("String_Node_Str");
  tmpDir=getProject().getProperty("String_Node_Str");
  ftp=new FTPClient();
  ftptask=new FTP();
  ftpFileSep=getProject().getProperty("String_Node_Str");
  ftptask.setSeparator(ftpFileSep);
  remoteTmpDir=ftptask.resolveFile(tmpDir);
  String remoteHost=getProject().getProperty("String_Node_Str");
  int port=Integer.parseInt(getProject().getProperty("String_Node_Str"));
  String remoteUser=getProject().getProperty("String_Node_Str");
  String password=getProject().getProperty("String_Node_Str");
  try {
    ftp.connect(remoteHost,port);
  }
 catch (  Exception ex) {
    connectionSucceeded=false;
    loginSuceeded=false;
    System.out.println("String_Node_Str" + remoteHost + "String_Node_Str"+ port);
  }
  if (connectionSucceeded) {
    try {
      ftp.login(remoteUser,password);
    }
 catch (    IOException ioe) {
      loginSuceeded=false;
      System.out.println("String_Node_Str" + remoteHost + "String_Node_Str"+ remoteUser);
    }
  }
}

Fixed version (ground truth):
public void setUp(){
  configureProject("String_Node_Str");
  getProject().executeTarget("String_Node_Str");
  tmpDir=getProject().getProperty("String_Node_Str");
  ftp=new FTPClient();
  ftpFileSep=getProject().getProperty("String_Node_Str");
  myFTPTask.setSeparator(ftpFileSep);
  remoteTmpDir=myFTPTask.resolveFile(tmpDir);
  String remoteHost=getProject().getProperty("String_Node_Str");
  int port=Integer.parseInt(getProject().getProperty("String_Node_Str"));
  String remoteUser=getProject().getProperty("String_Node_Str");
  String password=getProject().getProperty("String_Node_Str");
  try {
    ftp.connect(remoteHost,port);
  }
 catch (  Exception ex) {
    connectionSucceeded=false;
    loginSuceeded=false;
    System.out.println("String_Node_Str" + remoteHost + "String_Node_Str"+ port);
  }
  if (connectionSucceeded) {
    try {
      ftp.login(remoteUser,password);
    }
 catch (    IOException ioe) {
      loginSuceeded=false;
      System.out.println("String_Node_Str" + remoteHost + "String_Node_Str"+ remoteUser);
    }
  }
}
Program: 64219
Project: 64219
Buggy source:
/** 
 * Static method to read an ant lib definition from a url.
 * @param project   the current project
 * @param antlibUrl the url to read the definitions from
 * @return   the ant lib task
 */
public static Antlib createAntlib(Project project,URL antlibUrl){
  try {
    antlibUrl.openConnection().connect();
  }
 catch (  IOException ex) {
    throw new BuildException("String_Node_Str" + antlibUrl,ex);
  }
  try {
    ProjectHelper2 parser=new ProjectHelper2();
    UnknownElement ue=parser.parseUnknownElement(project,antlibUrl);
    if (!(ue.getTag().equals(TAG))) {
      throw new BuildException("String_Node_Str" + ue.getTag() + "String_Node_Str"+ TAG,ue.getLocation());
    }
    Antlib antlib=new Antlib();
    antlib.setProject(project);
    antlib.setLocation(ue.getLocation());
    antlib.init();
    ue.configure(antlib);
    return antlib;
  }
 catch (  BuildException ex) {
    Location location=ex.getLocation();
    if (location == null) {
      throw ex;
    }
    throw new BuildException("String_Node_Str" + System.getProperty("String_Node_Str") + location.toString()+ "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Static method to read an ant lib definition from a url.
 * @param project   the current project
 * @param antlibUrl the url to read the definitions from
 * @return   the ant lib task
 */
public static Antlib createAntlib(Project project,URL antlibUrl){
  try {
    antlibUrl.openConnection().connect();
  }
 catch (  IOException ex) {
    throw new BuildException("String_Node_Str" + antlibUrl,ex);
  }
  ProjectHelper2 parser=new ProjectHelper2();
  UnknownElement ue=parser.parseUnknownElement(project,antlibUrl);
  if (!(ue.getTag().equals(TAG))) {
    throw new BuildException("String_Node_Str" + ue.getTag() + "String_Node_Str"+ TAG,ue.getLocation());
  }
  Antlib antlib=new Antlib();
  antlib.setProject(project);
  antlib.setLocation(ue.getLocation());
  antlib.init();
  ue.configure(antlib);
  return antlib;
}
Program: 64220
Project: 64220
Buggy source:
/** 
 * Execute the nested tasks, setting the classloader for any tasks that derive from Definer.
 */
public void execute(){
  for (Iterator i=tasks.iterator(); i.hasNext(); ) {
    UnknownElement ue=(UnknownElement)i.next();
    ue.maybeConfigure();
    Task t=ue.getTask();
    if (t == null) {
      continue;
    }
    if (t instanceof Definer) {
      Definer d=(Definer)t;
      d.setInternalClassLoader(getClassLoader());
    }
    t.init();
    t.execute();
  }
}

Fixed version (ground truth):
/** 
 * Execute the nested tasks, setting the classloader for any tasks that derive from Definer.
 */
public void execute(){
  for (Iterator i=tasks.iterator(); i.hasNext(); ) {
    UnknownElement ue=(UnknownElement)i.next();
    ue.maybeConfigure();
    setLocation(ue.getLocation());
    Task t=ue.getTask();
    if (t == null) {
      continue;
    }
    if (t instanceof Definer) {
      Definer d=(Definer)t;
      d.setInternalClassLoader(getClassLoader());
    }
    t.init();
    t.execute();
  }
}
Program: 64221
Project: 64221
Buggy source:
/** 
 * Load an antlib from a url.
 * @param classLoader the classloader to use.
 * @param url the url to load the definitions from.
 */
private void loadAntlib(ClassLoader classLoader,URL url){
  try {
    Antlib antlib=Antlib.createAntlib(getProject(),url);
    antlib.setClassLoader(classLoader);
    antlib.perform();
  }
 catch (  BuildException ex) {
    Location location=ex.getLocation();
    if (location == null) {
      throw ex;
    }
    throw new BuildException("String_Node_Str" + System.getProperty("String_Node_Str") + getLocation().toString()+ "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Load an antlib from a url.
 * @param classLoader the classloader to use.
 * @param url the url to load the definitions from.
 */
private void loadAntlib(ClassLoader classLoader,URL url){
  try {
    Antlib antlib=Antlib.createAntlib(getProject(),url);
    antlib.setClassLoader(classLoader);
    antlib.perform();
  }
 catch (  BuildException ex) {
    Location exLocation=ex.getLocation();
    if (exLocation == null) {
      throw ex;
    }
    throw new BuildException("String_Node_Str" + System.getProperty("String_Node_Str") + exLocation.toString()+ "String_Node_Str"+ ex.getMessage());
  }
}
Program: 64223
Project: 64223
Buggy source:
public void test2ButCaseInsesitive(){
  DirectoryScanner ds=new DirectoryScanner();
  ds.setBasedir(new File(getProject().getBaseDir(),"String_Node_Str"));
  ds.setIncludes(new String[]{"String_Node_Str"});
  ds.setCaseSensitive(false);
  ds.scan();
  if (Os.isFamily("String_Node_Str")) {
    compareFiles(ds,new String[]{"String_Node_Str","String_Node_Str"},new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  }
 else {
    compareFiles(ds,new String[]{"String_Node_Str","String_Node_Str"},new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  }
}

Fixed version (ground truth):
public void test2ButCaseInsesitive(){
  DirectoryScanner ds=new DirectoryScanner();
  ds.setBasedir(new File(getProject().getBaseDir(),"String_Node_Str"));
  ds.setIncludes(new String[]{"String_Node_Str"});
  ds.setCaseSensitive(false);
  ds.scan();
  compareFiles(ds,new String[]{"String_Node_Str","String_Node_Str"},new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
}
Program: 64224
Project: 64224
Buggy source:
public void testFullPathMatchesCaseSensitive(){
  DirectoryScanner ds=new DirectoryScanner();
  ds.setBasedir(new File(getProject().getBaseDir(),"String_Node_Str"));
  ds.setIncludes(new String[]{"String_Node_Str"});
  ds.scan();
  if (Os.isFamily("String_Node_Str")) {
    compareFiles(ds,new String[]{"String_Node_Str"},new String[]{});
  }
 else {
    compareFiles(ds,new String[]{},new String[]{});
  }
}

Fixed version (ground truth):
public void testFullPathMatchesCaseSensitive(){
  DirectoryScanner ds=new DirectoryScanner();
  ds.setBasedir(new File(getProject().getBaseDir(),"String_Node_Str"));
  ds.setIncludes(new String[]{"String_Node_Str"});
  ds.scan();
  compareFiles(ds,new String[]{},new String[]{});
}