nus-yam/ex-repair huggingface dataset:
Program: 109409
Project: 109409
Buggy source:
private void getMigrationEffortDetails(ProjectModelTraversal traversal,Set<String> includeTags,Set<String> excludeTags,boolean recursive,boolean includeZero,EffortAccumulatorFunction accumulatorFunction){
  final Set<Vertex> initialVertices=traversal.getAllProjectsAsVertices(recursive);
  GremlinPipeline<Vertex,Vertex> pipeline=new GremlinPipeline<>(this.getGraphContext().getGraph());
  pipeline.V();
  if (!includeZero) {
    pipeline.has(EffortReportModel.EFFORT,Compare.GREATER_THAN,0);
    pipeline.has(WindupVertexFrame.TYPE_PROP,Text.CONTAINS,ClassificationModel.TYPE);
  }
 else {
    pipeline.has(WindupVertexFrame.TYPE_PROP,ClassificationModel.TYPE);
  }
  pipeline.as("String_Node_Str");
  pipeline.out(ClassificationModel.FILE_MODEL);
  pipeline.in(ProjectModel.PROJECT_MODEL_TO_FILE);
  pipeline.filter(new SetMembersFilter(initialVertices));
  pipeline.back("String_Node_Str");
  boolean checkTags=!includeTags.isEmpty() || !excludeTags.isEmpty();
  for (  Vertex v : pipeline) {
    if (checkTags && !frame(v).matchesTags(includeTags,excludeTags))     continue;
    for (    Vertex fileVertex : v.getVertices(Direction.OUT,ClassificationModel.FILE_MODEL))     accumulatorFunction.accumulate(v);
  }
}

Fixed version (ground truth):
private void getMigrationEffortDetails(ProjectModelTraversal traversal,Set<String> includeTags,Set<String> excludeTags,boolean recursive,boolean includeZero,EffortAccumulatorFunction accumulatorFunction){
  final Set<Vertex> initialVertices=traversal.getAllProjectsAsVertices(recursive);
  GremlinPipeline<Vertex,Vertex> pipeline=new GremlinPipeline<>(this.getGraphContext().getGraph());
  pipeline.V();
  if (!includeZero) {
    pipeline.has(EffortReportModel.EFFORT,Compare.GREATER_THAN,0);
    pipeline.has(WindupVertexFrame.TYPE_PROP,Text.CONTAINS,ClassificationModel.TYPE);
  }
 else {
    pipeline.has(WindupVertexFrame.TYPE_PROP,ClassificationModel.TYPE);
  }
  pipeline.as("String_Node_Str");
  pipeline.out(ClassificationModel.FILE_MODEL);
  pipeline.in(ProjectModel.PROJECT_MODEL_TO_FILE);
  pipeline.filter(new SetMembersFilter(initialVertices));
  pipeline.back("String_Node_Str");
  boolean checkTags=!includeTags.isEmpty() || !excludeTags.isEmpty();
  FileService fileService=new FileService(getGraphContext());
  for (  Vertex v : pipeline) {
    if (checkTags && !frame(v).matchesTags(includeTags,excludeTags))     continue;
    for (    Vertex fileVertex : v.getVertices(Direction.OUT,ClassificationModel.FILE_MODEL)) {
      FileModel fileModel=fileService.frame(fileVertex);
      if (initialVertices.contains(fileModel.getProjectModel().asVertex()))       accumulatorFunction.accumulate(v);
    }
  }
}
Program: 109410
Project: 109410
Buggy source:
@Deployment @AddonDependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static AddonArchive getDeployment(){
  AddonArchive archive=ShrinkWrap.create(AddonArchive.class).addBeansXML().addAsResource(new File("String_Node_Str"));
  return archive;
}

Fixed version (ground truth):
@Deployment @AddonDependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static AddonArchive getDeployment(){
  return ShrinkWrap.create(AddonArchive.class).addBeansXML().addAsResource(new File("String_Node_Str"));
}
Program: 109411
Project: 109411
Buggy source:
@Test public void testClassificationEffort() throws Exception {
  try (GraphContext context=factory.create()){
    ClassificationService classificationService=new ClassificationService(context);
    ProjectModel projectModel=fillData(context);
    ProjectModelTraversal projectModelTraversal=new ProjectModelTraversal(projectModel);
    Set<String> emptySet=Collections.emptySet();
    final Map<Integer,Integer> effortByCategory=classificationService.getMigrationEffortByPoints(projectModelTraversal,emptySet,emptySet,true,true);
    int totalEffort=0;
    for (    Map.Entry<Integer,Integer> effortEntry : effortByCategory.entrySet())     totalEffort+=effortEntry.getKey() * effortEntry.getValue();
    Assert.assertEquals(143,totalEffort);
    boolean foundF1Effort=false;
    boolean foundF2Effort=false;
    for (    FileModel fm : projectModel.getFileModels()) {
      if (fm.getFilePath().equals("String_Node_Str")) {
        int fileEffort=classificationService.getMigrationEffortPoints(fm);
        Assert.assertEquals(140,fileEffort);
        foundF1Effort=true;
      }
 else       if (fm.getFilePath().equals("String_Node_Str")) {
        int fileEffort=classificationService.getMigrationEffortPoints(fm);
        Assert.assertEquals(3,fileEffort);
        foundF2Effort=true;
      }
    }
    Assert.assertTrue(foundF1Effort);
    Assert.assertTrue(foundF2Effort);
  }
 }

Fixed version (ground truth):
@Test public void testClassificationEffort() throws Exception {
  try (GraphContext context=factory.create()){
    ClassificationService classificationService=new ClassificationService(context);
    ProjectModel projectModel=fillData(context)[0];
    ProjectModelTraversal projectModelTraversal=new ProjectModelTraversal(projectModel);
    Set<String> emptySet=Collections.emptySet();
    final Map<Integer,Integer> effortByCategory=classificationService.getMigrationEffortByPoints(projectModelTraversal,emptySet,emptySet,true,true);
    int totalEffort=0;
    for (    Map.Entry<Integer,Integer> effortEntry : effortByCategory.entrySet())     totalEffort+=effortEntry.getKey() * effortEntry.getValue();
    Assert.assertEquals(143,totalEffort);
    boolean foundF1Effort=false;
    boolean foundF2Effort=false;
    for (    FileModel fm : projectModel.getFileModels()) {
      if (fm.getFilePath().equals("String_Node_Str")) {
        int fileEffort=classificationService.getMigrationEffortPoints(fm);
        Assert.assertEquals(140,fileEffort);
        foundF1Effort=true;
      }
 else       if (fm.getFilePath().equals("String_Node_Str")) {
        int fileEffort=classificationService.getMigrationEffortPoints(fm);
        Assert.assertEquals(3,fileEffort);
        foundF2Effort=true;
      }
    }
    Assert.assertTrue(foundF1Effort);
    Assert.assertTrue(foundF2Effort);
  }
 }
Program: 109412
Project: 109412
Buggy source:
private ProjectModel fillData(GraphContext context){
  ClassificationService classificationService=new ClassificationService(context);
  FileModel f1=context.getFramed().addVertex(null,FileModel.class);
  f1.setFilePath("String_Node_Str");
  FileModel f2=context.getFramed().addVertex(null,FileModel.class);
  f2.setFilePath("String_Node_Str");
  ClassificationModel b1=classificationService.create();
  ClassificationModel b1b=classificationService.create();
  b1.addFileModel(f1);
  b1.setEffort(20);
  b1b.addFileModel(f1);
  b1b.setEffort(120);
  ClassificationModel b2=classificationService.create();
  b2.addFileModel(f2);
  b2.setEffort(3);
  ProjectModel projectModel=context.getFramed().addVertex(null,ProjectModel.class);
  projectModel.addFileModel(f1);
  projectModel.addFileModel(f2);
  return projectModel;
}

Fixed version (ground truth):
private ProjectModel[] fillData(GraphContext context){
  ClassificationService classificationService=new ClassificationService(context);
  FileService fileService=new FileService(context);
  ProjectService projectService=new ProjectService(context);
  FileModel f1=fileService.create();
  f1.setFilePath("String_Node_Str");
  FileModel f2=fileService.create();
  f2.setFilePath("String_Node_Str");
  ClassificationModel b1=classificationService.create();
  ClassificationModel b1b=classificationService.create();
  b1.addFileModel(f1);
  b1.setEffort(20);
  b1b.addFileModel(f1);
  b1b.setEffort(120);
  ClassificationModel b2=classificationService.create();
  b2.addFileModel(f2);
  b2.setEffort(3);
  ProjectModel projectModel=projectService.create();
  projectModel.addFileModel(f1);
  projectModel.addFileModel(f2);
  ProjectModel projectModel2=projectService.create();
  FileModel f3=fileService.create();
  f3.setFilePath("String_Node_Str");
  projectModel2.addFileModel(f3);
  b2.addFileModel(f3);
  return new ProjectModel[]{projectModel,projectModel2};
}
Program: 109413
Project: 109413
Buggy source:
private void processFileLocationModel(Writer writer,String cssClass,FileLocationModel obj,String defaultText) throws IOException {
  String position="String_Node_Str" + obj.getLineNumber() + "String_Node_Str"+ obj.getColumnNumber()+ "String_Node_Str";
  String linkText=StringUtils.isBlank(defaultText) ? getPrettyPathForFile(obj.getFile()) + position : defaultText;
  String anchor=obj.asVertex().getId().toString();
  SourceReportModel result=sourceReportService.getSourceReportForFileModel(obj.getFile());
  if (result == null) {
    writer.write(linkText);
  }
  renderLink(writer,cssClass,result.getReportFilename() + "String_Node_Str" + anchor,linkText);
}

Fixed version (ground truth):
private void processFileLocationModel(Writer writer,String cssClass,FileLocationModel obj,String defaultText) throws IOException {
  String position="String_Node_Str" + obj.getLineNumber() + "String_Node_Str"+ obj.getColumnNumber()+ "String_Node_Str";
  String linkText=StringUtils.isBlank(defaultText) ? getPrettyPathForFile(obj.getFile()) + position : defaultText;
  String anchor=obj.asVertex().getId().toString();
  SourceReportModel result=sourceReportService.getSourceReportForFileModel(obj.getFile());
  if (result == null)   writer.write(linkText);
 else   renderLink(writer,cssClass,result.getReportFilename() + "String_Node_Str" + anchor,linkText);
}
Program: 109414
Project: 109414
Buggy source:
private void processFileLocationModel(Writer writer,String cssClass,FileLocationModel obj,String defaultText) throws IOException {
  String position="String_Node_Str" + obj.getLineNumber() + "String_Node_Str"+ obj.getColumnNumber()+ "String_Node_Str";
  String linkText=StringUtils.isBlank(defaultText) ? getPrettyPathForFile(obj.getFile()) + position : defaultText;
  String anchor=obj.asVertex().getId().toString();
  SourceReportModel result=sourceReportService.getSourceReportForFileModel(obj.getFile());
  if (result == null) {
    writer.write(linkText);
  }
  renderLink(writer,cssClass,result.getReportFilename() + "String_Node_Str" + anchor,linkText);
}

Fixed version (ground truth):
private void processFileLocationModel(Writer writer,String cssClass,FileLocationModel obj,String defaultText) throws IOException {
  String position="String_Node_Str" + obj.getLineNumber() + "String_Node_Str"+ obj.getColumnNumber()+ "String_Node_Str";
  String linkText=StringUtils.isBlank(defaultText) ? getPrettyPathForFile(obj.getFile()) + position : defaultText;
  String anchor=obj.asVertex().getId().toString();
  SourceReportModel result=sourceReportService.getSourceReportForFileModel(obj.getFile());
  if (result == null)   writer.write(linkText);
 else   renderLink(writer,cssClass,result.getReportFilename() + "String_Node_Str" + anchor,linkText);
}
Program: 109415
Project: 109415
Buggy source:
private ApplicationReportModel createSingleApplicationMigrationIssuesReport(GraphContext context,ProjectModel projectModel){
  ReportService reportService=new ReportService(context);
  ApplicationReportModel report=createMigrationIssuesReportBase(context);
  report.setReportName("String_Node_Str");
  report.setProjectModel(projectModel);
  reportService.setUniqueFilename(report,"String_Node_Str","String_Node_Str");
  return report;
}

Fixed version (ground truth):
private ApplicationReportModel createSingleApplicationMigrationIssuesReport(GraphContext context,ProjectModel projectModel){
  ReportService reportService=new ReportService(context);
  ApplicationReportModel report=createMigrationIssuesReportBase(context);
  report.setReportName(MIGRATION_ISSUES_REPORT_NAME);
  report.setProjectModel(projectModel);
  reportService.setUniqueFilename(report,"String_Node_Str","String_Node_Str");
  return report;
}
Program: 109416
Project: 109416
Buggy source:
private ApplicationReportModel createGlobalMigrationIssuesReport(GraphContext context){
  ReportService reportService=new ReportService(context);
  ApplicationReportModel report=createMigrationIssuesReportBase(context);
  report.setReportName("String_Node_Str");
  report.setDisplayInGlobalApplicationIndex(true);
  reportService.setUniqueFilename(report,"String_Node_Str","String_Node_Str");
  return report;
}

Fixed version (ground truth):
private ApplicationReportModel createGlobalMigrationIssuesReport(GraphContext context){
  ReportService reportService=new ReportService(context);
  ApplicationReportModel report=createMigrationIssuesReportBase(context);
  report.setReportName(ALL_MIGRATION_ISSUES_REPORT_NAME);
  report.setDisplayInGlobalApplicationIndex(true);
  reportService.setUniqueFilename(report,"String_Node_Str","String_Node_Str");
  return report;
}
Program: 109417
Project: 109417
Buggy source:
/** 
 * Provides a link to the Navigation Index that is used for this particular report
 */
@Adjacency(label=ApplicationReportIndexModel.APPLICATION_REPORT_INDEX_TO_REPORT_MODEL,direction=Direction.IN) ApplicationReportIndexModel getApplicationReportIndexModel();

Fixed version (ground truth):
@Override public ApplicationReportIndexModel getApplicationReportIndexModel(){
  ApplicationReportIndexModel result=null;
  for (  Vertex v : it().getVertices(Direction.IN,ApplicationReportIndexModel.APPLICATION_REPORT_INDEX_TO_REPORT_MODEL)) {
    ApplicationReportIndexModel model=frame(v,ApplicationReportIndexModel.class);
    if (result == null)     result=model;
 else     if (!result.getProjectModels().iterator().hasNext() && model.getProjectModels().iterator().hasNext())     result=model;
  }
  return result;
}
Program: 109418
Project: 109418
Buggy source:
private ClassReference createClassReference(TypeReferenceLocation location,String source,String reference,int startPosition){
  String subString=StringUtils.substring(source,0,startPosition + 1);
  String[] lines=subString.split("String_Node_Str");
  int lineNumber=lines.length;
  int column=lines[lines.length - 1].indexOf(source.substring(startPosition));
  int length=reference.length();
  return new ClassReference(reference,ResolutionStatus.UNKNOWN,location,lineNumber,column,length,reference);
}

Fixed version (ground truth):
private ClassReference createClassReference(TypeReferenceLocation location,String source,String reference,int startPosition){
  String subString=StringUtils.substring(source,0,startPosition + 1);
  String[] lines=subString.split("String_Node_Str");
  int lineNumber=lines.length;
  int column=lines[lines.length - 1].indexOf(source.substring(startPosition));
  int length=reference.length();
  return new ClassReference(reference,null,null,null,ResolutionStatus.UNKNOWN,location,lineNumber,column,length,reference);
}
Program: 109420
Project: 109420
Buggy source:
public static String trimLeadingAndTrailingSpaces(String markdown){
  StringBuilder markdownSB=new StringBuilder();
  StringBuilder currentLine=new StringBuilder();
  for (int i=0; i < markdown.length(); i++) {
    char currentChar=markdown.charAt(i);
    if (currentChar == '\r' || currentChar == '\n') {
      markdownSB.append(currentLine.toString().trim()).append(SystemUtils.LINE_SEPARATOR);
      currentLine.setLength(0);
      if (currentChar == '\r' && markdown.length() > (i + 1) && markdown.charAt(i + 1) == '\n') {
        i++;
      }
    }
 else {
      currentLine.append(currentChar);
    }
  }
  markdownSB.append(currentLine);
  return markdownSB.toString();
}

Fixed version (ground truth):
public static String trimLeadingAndTrailingSpaces(String markdown){
  StringBuilder markdownSB=new StringBuilder();
  StringBuilder currentLine=new StringBuilder();
  String firstLineIndent=null;
  for (int i=0; i < markdown.length(); i++) {
    char currentChar=markdown.charAt(i);
    if (currentChar == '\r' || currentChar == '\n') {
      String currentLineString=currentLine.toString();
      if (firstLineIndent == null && !StringUtils.isEmpty(currentLineString)) {
        int firstNonWhitespaceIndex=StringUtils.indexOfAnyBut(currentLineString,"String_Node_Str");
        if (firstNonWhitespaceIndex != -1)         firstLineIndent=currentLineString.substring(0,firstNonWhitespaceIndex);
      }
      if (firstLineIndent != null)       currentLineString=StringUtils.removeStart(currentLineString,firstLineIndent);
      markdownSB.append(currentLineString).append(SystemUtils.LINE_SEPARATOR);
      currentLine.setLength(0);
      if (currentChar == '\r' && markdown.length() > (i + 1) && markdown.charAt(i + 1) == '\n') {
        i++;
      }
    }
 else {
      currentLine.append(currentChar);
    }
  }
  markdownSB.append(currentLine);
  return markdownSB.toString();
}
Program: 109421
Project: 109421
Buggy source:
private void setDefaultOutputPath(Map<String,Object> optionValues){
  if (!optionValues.containsKey(OutputPathOption.NAME)) {
    File inputFile=(File)optionValues.get(InputPathOption.NAME);
    if (inputFile != null) {
      File outputFile=new File(inputFile.getAbsoluteFile().getParentFile(),inputFile.getName() + "String_Node_Str");
      optionValues.put(OutputPathOption.NAME,outputFile);
    }
  }
}

Fixed version (ground truth):
private void setDefaultOutputPath(Map<String,Object> optionValues){
  if (!optionValues.containsKey(OutputPathOption.NAME)) {
    File inputFile=(File)optionValues.get(InputPathOption.NAME);
    if (inputFile != null) {
      try {
        File canonicalInputFile=inputFile.getCanonicalFile();
        File outputFile=new File(canonicalInputFile.getParentFile(),canonicalInputFile.getName() + "String_Node_Str");
        optionValues.put(OutputPathOption.NAME,outputFile);
      }
 catch (      IOException e) {
        throw new WindupException("String_Node_Str" + inputFile);
      }
    }
  }
}
Program: 109422
Project: 109422
Buggy source:
public boolean isRequired(){
  return false;
}

Fixed version (ground truth):
public boolean isRequired(){
  return true;
}
Program: 109423
Project: 109423
Buggy source:
@Override public ValidationResult validate(Object value){
  return ValidationResult.SUCCESS;
}

Fixed version (ground truth):
@Override public ValidationResult validate(Object value){
  if (value == null) {
    return new ValidationResult(ValidationResult.Level.ERROR,NAME + "String_Node_Str");
  }
  return ValidationResult.SUCCESS;
}
Program: 109424
Project: 109424
Buggy source:
@Override public Void call() throws Exception {
  ASTParser parser=ASTParser.newParser(AST.JLS8);
  parser.setBindingsRecovery(false);
  parser.setResolveBindings(true);
  Map<Object,Object> options=JavaCore.getOptions();
  JavaCore.setComplianceOptions(JavaCore.VERSION_1_8,options);
  options.put(JavaCore.CORE_INCOMPLETE_CLASSPATH,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_ENUM_IDENTIFIER,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE,"String_Node_Str");
  options.put(JavaCore.CORE_CIRCULAR_CLASSPATH,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION,"String_Node_Str");
  options.put(JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_NULL_ANNOTATION_INFERENCE_CONFLICT,"String_Node_Str");
  options.put(JavaCore.CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE,"String_Node_Str");
  parser.setCompilerOptions(options);
  parser.setCompilerOptions(options);
  parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]),sourcePaths.toArray(new String[sourcePaths.size()]),null,true);
  parser.createASTs(batch.toArray(new String[batch.size()]),encodings,bindingKeys,requestor,null);
  return null;
}

Fixed version (ground truth):
@Override public Void call() throws Exception {
  ASTParser parser=ASTParser.newParser(AST.JLS8);
  parser.setBindingsRecovery(false);
  parser.setResolveBindings(true);
  Map<Object,Object> options=JavaCore.getOptions();
  JavaCore.setComplianceOptions(JavaCore.VERSION_1_8,options);
  options.put(JavaCore.CORE_INCOMPLETE_CLASSPATH,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_ENUM_IDENTIFIER,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE,"String_Node_Str");
  options.put(JavaCore.CORE_CIRCULAR_CLASSPATH,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION,"String_Node_Str");
  options.put(JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH,"String_Node_Str");
  options.put(JavaCore.COMPILER_PB_NULL_ANNOTATION_INFERENCE_CONFLICT,"String_Node_Str");
  options.put(JavaCore.CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE,"String_Node_Str");
  options.put(JavaCore.CORE_JAVA_BUILD_DUPLICATE_RESOURCE,"String_Node_Str");
  parser.setCompilerOptions(options);
  parser.setCompilerOptions(options);
  parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]),sourcePaths.toArray(new String[sourcePaths.size()]),null,true);
  parser.createASTs(batch.toArray(new String[batch.size()]),encodings,bindingKeys,requestor,null);
  return null;
}
Program: 109426
Project: 109426
Buggy source:
private static List<List<String>> createBatches(Set<Path> sourceFiles){
  List<List<String>> result=new ArrayList<>();
  List<String> batch=new ArrayList<>(BATCH_SIZE);
  for (  Path path : sourceFiles) {
    if (batch.size() == BATCH_SIZE) {
      result.add(batch);
      batch=new ArrayList<>(BATCH_SIZE);
    }
    batch.add(path.toAbsolutePath().toString());
  }
  return result;
}

Fixed version (ground truth):
private static List<List<String>> createBatches(Set<Path> sourceSet){
  List<List<String>> result=new ArrayList<>();
  List<Path> sourceFiles=new ArrayList<>(sourceSet);
  while (!sourceFiles.isEmpty()) {
    ListIterator<Path> sourceFileIterator=sourceFiles.listIterator();
    Set<String> batchDupeCheck=new HashSet<>();
    List<String> batch=new ArrayList<>(BATCH_SIZE);
    result.add(batch);
    while (sourceFileIterator.hasNext()) {
      if (batch.size() == BATCH_SIZE) {
        batch=new ArrayList<>(BATCH_SIZE);
        result.add(batch);
        batchDupeCheck.clear();
      }
      Path path=sourceFileIterator.next();
      if (!batchDupeCheck.contains(path.getFileName().toString())) {
        batch.add(path.toAbsolutePath().toString());
        batchDupeCheck.add(path.getFileName().toString());
        sourceFileIterator.remove();
      }
    }
  }
  return result;
}
Program: 109427
Project: 109427
Buggy source:
/** 
 * Returns an appropriate output directory for the decompiled data based upon the provided   {@link JavaClassFileModel}. This should be the top-level directory for the package (eg, /tmp/project/foo for the file /tmp/project/foo/com/example/Foo.class). This could be the same directory as the file itself, if the file is already in the output directory. If the .class file is referencing a file in the input directory, then this will be a classes folder underneath the output directory.
 */
static File getOutputDirectoryForClass(GraphContext context,JavaClassFileModel fileModel){
  final File result;
  WindupConfigurationModel configuration=WindupConfigurationService.getConfigurationModel(context);
  String inputPath=configuration.getInputPath().getFilePath();
  if (fileModel.getFilePath().startsWith(inputPath)) {
    String outputPath=configuration.getOutputPath().getFilePath();
    result=Paths.get(outputPath).resolve("String_Node_Str").toFile();
  }
 else {
    String packageName=fileModel.getPackageName();
    if (StringUtils.isBlank(packageName))     return fileModel.asFile().getParentFile();
    String[] packageComponents=packageName.split("String_Node_Str");
    File rootFile=fileModel.asFile().getParentFile();
    for (int i=0; i < packageComponents.length; i++) {
      rootFile=rootFile.getParentFile();
    }
    result=rootFile;
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns an appropriate output directory for the decompiled data based upon the provided   {@link JavaClassFileModel}. This should be the top-level directory for the package (eg, /tmp/project/foo for the file /tmp/project/foo/com/example/Foo.class). This could be the same directory as the file itself, if the file is already in the output directory. If the .class file is referencing a file in the input directory, then this will be a classes folder underneath the output directory.
 */
static File getOutputDirectoryForClass(GraphContext context,JavaClassFileModel fileModel){
  final File result;
  WindupConfigurationModel configuration=WindupConfigurationService.getConfigurationModel(context);
  File inputPath=configuration.getInputPath().asFile();
  if (PathUtil.isInSubDirectory(inputPath,fileModel.asFile())) {
    String outputPath=configuration.getOutputPath().getFilePath();
    result=Paths.get(outputPath).resolve("String_Node_Str").toFile();
  }
 else {
    String packageName=fileModel.getPackageName();
    if (StringUtils.isBlank(packageName))     return fileModel.asFile().getParentFile();
    String[] packageComponents=packageName.split("String_Node_Str");
    File rootFile=fileModel.asFile().getParentFile();
    for (int i=0; i < packageComponents.length; i++) {
      rootFile=rootFile.getParentFile();
    }
    result=rootFile;
  }
  return result;
}
Program: 109429
Project: 109429
Buggy source:
@Override public void processed(Path filePath,List<ClassReference> references){
  try {
    processedPaths.put(new ImmutablePair<>(filePath,filterClassReferences(references)));
  }
 catch (  InterruptedException e) {
    throw new WindupException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public void processed(Path filePath,List<ClassReference> references){
  try {
    processedPaths.put(new ImmutablePair<>(filePath,filterClassReferences(references,classNotFoundAnalysisEnabled)));
  }
 catch (  InterruptedException e) {
    throw new WindupException(e.getMessage(),e);
  }
}
Program: 109430
Project: 109430
Buggy source:
private List<ClassReference> filterClassReferences(List<ClassReference> references){
  List<ClassReference> results=new ArrayList<>(references.size());
  for (  ClassReference reference : references) {
    boolean shouldKeep=reference.getLocation() == TypeReferenceLocation.TYPE;
    shouldKeep|=reference.getResolutionStatus() != ResolutionStatus.RESOLVED;
    shouldKeep|=TypeInterestFactory.matchesAny(reference.getQualifiedName(),reference.getLocation());
    if (shouldKeep) {
      results.add(reference);
    }
  }
  return results;
}

Fixed version (ground truth):
private List<ClassReference> filterClassReferences(List<ClassReference> references,boolean classNotFoundAnalysisEnabled){
  List<ClassReference> results=new ArrayList<>(references.size());
  for (  ClassReference reference : references) {
    boolean shouldKeep=reference.getLocation() == TypeReferenceLocation.TYPE;
    shouldKeep|=classNotFoundAnalysisEnabled && reference.getResolutionStatus() != ResolutionStatus.RESOLVED;
    shouldKeep|=TypeInterestFactory.matchesAny(reference.getQualifiedName(),reference.getLocation());
    if (shouldKeep) {
      results.add(reference);
    }
  }
  return results;
}
Program: 109431
Project: 109431
Buggy source:
@Override public Configuration getConfiguration(GraphContext context){
  return ConfigurationBuilder.begin().addRule().perform(new AttachHintOperation()).withId(RULE_ID);
}

Fixed version (ground truth):
@Override public Configuration getConfiguration(GraphContext context){
  return ConfigurationBuilder.begin().addRule().when(Query.fromType(WindupJavaConfigurationModel.class).withProperty(WindupJavaConfigurationModel.CLASS_NOT_FOUND_ANALYSIS_ENABLED,true)).perform(new AttachHintOperation()).withId(RULE_ID);
}
Program: 109436
Project: 109436
Buggy source:
private void setDefaultOutputPath(Map<String,Object> optionValues){
  if (!optionValues.containsKey(OutputPathOption.NAME)) {
    File inputFile=(File)optionValues.get(InputPathOption.NAME);
    if (inputFile != null) {
      File outputFile=new File(inputFile.getAbsoluteFile().getParentFile(),inputFile.getName() + "String_Node_Str");
      optionValues.put(OutputPathOption.NAME,outputFile);
    }
  }
}

Fixed version (ground truth):
private void setDefaultOutputPath(Map<String,Object> optionValues){
  if (!optionValues.containsKey(OutputPathOption.NAME)) {
    File inputFile=(File)optionValues.get(InputPathOption.NAME);
    if (inputFile != null) {
      try {
        File canonicalInputFile=inputFile.getCanonicalFile();
        File outputFile=new File(canonicalInputFile.getParentFile(),canonicalInputFile.getName() + "String_Node_Str");
        optionValues.put(OutputPathOption.NAME,outputFile);
      }
 catch (      IOException e) {
        throw new WindupException("String_Node_Str" + inputFile);
      }
    }
  }
}
Program: 109437
Project: 109437
Buggy source:
public boolean isRequired(){
  return false;
}

Fixed version (ground truth):
public boolean isRequired(){
  return true;
}
Program: 109438
Project: 109438
Buggy source:
@Override public ValidationResult validate(Object value){
  return ValidationResult.SUCCESS;
}

Fixed version (ground truth):
@Override public ValidationResult validate(Object value){
  if (value == null) {
    return new ValidationResult(ValidationResult.Level.ERROR,NAME + "String_Node_Str");
  }
  return ValidationResult.SUCCESS;
}
Program: 109439
Project: 109439
Buggy source:
/** 
 * Returns an appropriate output directory for the decompiled data based upon the provided   {@link JavaClassFileModel}. This should be the top-level directory for the package (eg, /tmp/project/foo for the file /tmp/project/foo/com/example/Foo.class). This could be the same directory as the file itself, if the file is already in the output directory. If the .class file is referencing a file in the input directory, then this will be a classes folder underneath the output directory.
 */
static File getOutputDirectoryForClass(GraphContext context,JavaClassFileModel fileModel){
  final File result;
  WindupConfigurationModel configuration=WindupConfigurationService.getConfigurationModel(context);
  String inputPath=configuration.getInputPath().getFilePath();
  if (fileModel.getFilePath().startsWith(inputPath)) {
    String outputPath=configuration.getOutputPath().getFilePath();
    result=Paths.get(outputPath).resolve("String_Node_Str").toFile();
  }
 else {
    String packageName=fileModel.getPackageName();
    if (StringUtils.isBlank(packageName))     return fileModel.asFile().getParentFile();
    String[] packageComponents=packageName.split("String_Node_Str");
    File rootFile=fileModel.asFile().getParentFile();
    for (int i=0; i < packageComponents.length; i++) {
      rootFile=rootFile.getParentFile();
    }
    result=rootFile;
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns an appropriate output directory for the decompiled data based upon the provided   {@link JavaClassFileModel}. This should be the top-level directory for the package (eg, /tmp/project/foo for the file /tmp/project/foo/com/example/Foo.class). This could be the same directory as the file itself, if the file is already in the output directory. If the .class file is referencing a file in the input directory, then this will be a classes folder underneath the output directory.
 */
static File getOutputDirectoryForClass(GraphContext context,JavaClassFileModel fileModel){
  final File result;
  WindupConfigurationModel configuration=WindupConfigurationService.getConfigurationModel(context);
  File inputPath=configuration.getInputPath().asFile();
  if (PathUtil.isInSubDirectory(inputPath,fileModel.asFile())) {
    String outputPath=configuration.getOutputPath().getFilePath();
    result=Paths.get(outputPath).resolve("String_Node_Str").toFile();
  }
 else {
    String packageName=fileModel.getPackageName();
    if (StringUtils.isBlank(packageName))     return fileModel.asFile().getParentFile();
    String[] packageComponents=packageName.split("String_Node_Str");
    File rootFile=fileModel.asFile().getParentFile();
    for (int i=0; i < packageComponents.length; i++) {
      rootFile=rootFile.getParentFile();
    }
    result=rootFile;
  }
  return result;
}
Program: 109441
Project: 109441
Buggy source:
@Override public void processed(Path filePath,List<ClassReference> references){
  try {
    processedPaths.put(new ImmutablePair<>(filePath,filterClassReferences(references)));
  }
 catch (  InterruptedException e) {
    throw new WindupException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public void processed(Path filePath,List<ClassReference> references){
  try {
    processedPaths.put(new ImmutablePair<>(filePath,filterClassReferences(references,classNotFoundAnalysisEnabled)));
  }
 catch (  InterruptedException e) {
    throw new WindupException(e.getMessage(),e);
  }
}
Program: 109442
Project: 109442
Buggy source:
private List<ClassReference> filterClassReferences(List<ClassReference> references){
  List<ClassReference> results=new ArrayList<>(references.size());
  for (  ClassReference reference : references) {
    boolean shouldKeep=reference.getLocation() == TypeReferenceLocation.TYPE;
    shouldKeep|=reference.getResolutionStatus() != ResolutionStatus.RESOLVED;
    shouldKeep|=TypeInterestFactory.matchesAny(reference.getQualifiedName(),reference.getLocation());
    if (shouldKeep) {
      results.add(reference);
    }
  }
  return results;
}

Fixed version (ground truth):
private List<ClassReference> filterClassReferences(List<ClassReference> references,boolean classNotFoundAnalysisEnabled){
  List<ClassReference> results=new ArrayList<>(references.size());
  for (  ClassReference reference : references) {
    boolean shouldKeep=reference.getLocation() == TypeReferenceLocation.TYPE;
    shouldKeep|=classNotFoundAnalysisEnabled && reference.getResolutionStatus() != ResolutionStatus.RESOLVED;
    shouldKeep|=TypeInterestFactory.matchesAny(reference.getQualifiedName(),reference.getLocation());
    if (shouldKeep) {
      results.add(reference);
    }
  }
  return results;
}
Program: 109443
Project: 109443
Buggy source:
@Override public Configuration getConfiguration(GraphContext context){
  return ConfigurationBuilder.begin().addRule().perform(new AttachHintOperation()).withId(RULE_ID);
}

Fixed version (ground truth):
@Override public Configuration getConfiguration(GraphContext context){
  return ConfigurationBuilder.begin().addRule().when(Query.fromType(WindupJavaConfigurationModel.class).withProperty(WindupJavaConfigurationModel.CLASS_NOT_FOUND_ANALYSIS_ENABLED,true)).perform(new AttachHintOperation()).withId(RULE_ID);
}
Program: 109448
Project: 109448
Buggy source:
public Tag1SourceGlassfishRuleProvider(){
  super(MetadataBuilder.forProvider(Tag1SourceGlassfishRuleProvider.class).addTag("String_Node_Str").addSourceTechnology(new TechnologyReference("String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
public Tag1SourceGlassfishRuleProvider(){
  super(MetadataBuilder.forProvider(Tag1SourceGlassfishRuleProvider.class).addTag("String_Node_Str").addSourceTechnology(new TechnologyReference("String_Node_Str","String_Node_Str")).addTargetTechnology(new TechnologyReference("String_Node_Str","String_Node_Str")));
}
Program: 109449
Project: 109449
Buggy source:
public Tag3SourceOrionServerRuleProvider(){
  super(MetadataBuilder.forProvider(Tag3SourceOrionServerRuleProvider.class).addTag("String_Node_Str").addSourceTechnology(new TechnologyReference("String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
public Tag3SourceOrionServerRuleProvider(){
  super(MetadataBuilder.forProvider(Tag3SourceOrionServerRuleProvider.class).addTag("String_Node_Str").addSourceTechnology(new TechnologyReference("String_Node_Str","String_Node_Str")).addTargetTechnology(new TechnologyReference("String_Node_Str","String_Node_Str")));
}
Program: 109450
Project: 109450
Buggy source:
@Test public void testRuleFilteringExcludeTag3() throws Exception {
  setupAndRun(null,Collections.singleton("String_Node_Str"),null,null);
  Assert.assertTrue(this.tag1SourceGlassfishRuleProvider.executed);
  Assert.assertTrue(this.tag1SourceGlassfishTargetFooRuleProvider.executed);
  Assert.assertTrue(this.tag2SourceGlassfishTargetJBossRuleProvider.executed);
  Assert.assertFalse(this.tag3SourceOrionServerRuleProvider.executed);
}

Fixed version (ground truth):
@Test public void testRuleFilteringExcludeTag3() throws Exception {
  setupAndRun(null,Collections.singleton("String_Node_Str"),Collections.singleton("String_Node_Str"),Collections.singleton("String_Node_Str"));
  Assert.assertFalse(this.tag1SourceGlassfishRuleProvider.executed);
  Assert.assertTrue(this.tag1SourceGlassfishTargetFooRuleProvider.executed);
  Assert.assertFalse(this.tag2SourceGlassfishTargetJBossRuleProvider.executed);
  Assert.assertFalse(this.tag3SourceOrionServerRuleProvider.executed);
}
Program: 109452
Project: 109452
Buggy source:
@Test public void testRuleFilteringSourceGlassfish() throws Exception {
  setupAndRun(null,null,Collections.singleton("String_Node_Str"),null);
  Assert.assertTrue(this.tag1SourceGlassfishRuleProvider.executed);
  Assert.assertTrue(this.tag1SourceGlassfishTargetFooRuleProvider.executed);
  Assert.assertTrue(this.tag2SourceGlassfishTargetJBossRuleProvider.executed);
  Assert.assertFalse(this.tag3SourceOrionServerRuleProvider.executed);
}

Fixed version (ground truth):
@Test public void testRuleFilteringSourceGlassfish() throws Exception {
  setupAndRun(null,null,Collections.singleton("String_Node_Str"),Collections.singleton("String_Node_Str"));
  Assert.assertTrue(this.tag1SourceGlassfishRuleProvider.executed);
  Assert.assertFalse(this.tag1SourceGlassfishTargetFooRuleProvider.executed);
  Assert.assertTrue(this.tag2SourceGlassfishTargetJBossRuleProvider.executed);
  Assert.assertFalse(this.tag3SourceOrionServerRuleProvider.executed);
}
Program: 109453
Project: 109453
Buggy source:
@Test public void testRuleFilteringIncludeTag2() throws Exception {
  setupAndRun(Collections.singleton("String_Node_Str"),null,null,null);
  Assert.assertFalse(this.tag1SourceGlassfishRuleProvider.executed);
  Assert.assertFalse(this.tag1SourceGlassfishTargetFooRuleProvider.executed);
  Assert.assertTrue(this.tag2SourceGlassfishTargetJBossRuleProvider.executed);
  Assert.assertFalse(this.tag3SourceOrionServerRuleProvider.executed);
}

Fixed version (ground truth):
@Test public void testRuleFilteringIncludeTag2() throws Exception {
  setupAndRun(Collections.singleton("String_Node_Str"),null,null,Collections.singleton("String_Node_Str"));
  Assert.assertFalse(this.tag1SourceGlassfishRuleProvider.executed);
  Assert.assertFalse(this.tag1SourceGlassfishTargetFooRuleProvider.executed);
  Assert.assertTrue(this.tag2SourceGlassfishTargetJBossRuleProvider.executed);
  Assert.assertFalse(this.tag3SourceOrionServerRuleProvider.executed);
}
Program: 109455
Project: 109455
Buggy source:
/** 
 * Conservative approach to insuring that a given filename only contains characters that are legal for use in filenames on the disk. Other characters are replaced with underscore _ .
 */
public static String cleanFileName(String badFileName){
  if (badFileName == null)   return null;
  StringBuilder cleanName=new StringBuilder();
  for (int i=0; i < badFileName.length(); i++) {
    int c=(int)badFileName.charAt(i);
    if (Character.isJavaIdentifierPart(c))     cleanName.append((char)c);
 else     cleanName.append('_');
  }
  return cleanName.toString();
}

Fixed version (ground truth):
/** 
 * Conservative approach to insuring that a given filename only contains characters that are legal for use in filenames on the disk. Other characters are replaced with underscore _ . Note that this should only be used with the filename itself, not the entire path, because it removes the '/' characters as well.
 */
public static String cleanFileName(String badFileName){
  if (badFileName == null)   return null;
  StringBuilder cleanName=new StringBuilder();
  for (int i=0; i < badFileName.length(); i++) {
    int c=(int)badFileName.charAt(i);
    if (Character.isJavaIdentifierPart(c))     cleanName.append((char)c);
 else     cleanName.append('_');
  }
  return cleanName.toString();
}
Program: 109456
Project: 109456
Buggy source:
@Override public void setParameterStore(ParameterStore store){
  hintTextPattern.setParameterStore(store);
}

Fixed version (ground truth):
@Override public void setParameterStore(ParameterStore store){
  hintTextPattern.setParameterStore(store);
  if (hintTitlePattern != null)   hintTitlePattern.setParameterStore(store);
}
Program: 109457
Project: 109457
Buggy source:
@Override public Set<String> getRequiredParameterNames(){
  return hintTextPattern.getRequiredParameterNames();
}

Fixed version (ground truth):
@Override public Set<String> getRequiredParameterNames(){
  final Set<String> result=new LinkedHashSet<String>();
  result.addAll(hintTextPattern.getRequiredParameterNames());
  if (hintTitlePattern != null)   result.addAll(hintTitlePattern.getRequiredParameterNames());
  return result;
}
Program: 109458
Project: 109458
Buggy source:
public GraphRewrite(GraphContext context){
  this.graphContext=context;
}

Fixed version (ground truth):
public GraphRewrite(Iterable<RuleLifecycleListener> listeners,GraphContext context){
  this.listeners=listeners;
  this.graphContext=context;
}
Program: 109459
Project: 109459
Buggy source:
/** 
 * Called immediately after a a   {@link Rule} has thrown an exception, to indicate a failure of some kind
 */
public void afterRuleExecutionFailed(GraphRewrite event,EvaluationContext context,Rule rule,Throwable failureCause);

Fixed version (ground truth):
/** 
 * Called immediately after a a   {@link Rule} has thrown an exception, to indicate a failure of some kind
 */
void afterRuleExecutionFailed(GraphRewrite event,EvaluationContext context,Rule rule,Throwable failureCause);
Program: 109460
Project: 109460
Buggy source:
/** 
 * Called immediately before the given   {@link Rule} is executed.
 */
public void beforeRuleEvaluation(GraphRewrite event,Rule rule,EvaluationContext context);

Fixed version (ground truth):
/** 
 * Called immediately before the given   {@link Rule} is executed.
 */
void beforeRuleEvaluation(GraphRewrite event,Rule rule,EvaluationContext context);
Program: 109461
Project: 109461
Buggy source:
/** 
 * Called immediately before   {@link Rule} operations are performed (Only called if{@link Rule#evaluate(org.ocpsoft.rewrite.event.Rewrite,EvaluationContext)} returned <code>true</code>).
 */
public void beforeRuleOperationsPerformed(GraphRewrite event,EvaluationContext context,Rule rule);

Fixed version (ground truth):
/** 
 * Called immediately before   {@link Rule} operations are performed (Only called if{@link Rule#evaluate(org.ocpsoft.rewrite.event.Rewrite,EvaluationContext)} returned <code>true</code>).
 */
void beforeRuleOperationsPerformed(GraphRewrite event,EvaluationContext context,Rule rule);
Program: 109462
Project: 109462
Buggy source:
/** 
 * Called immediately after   {@link Rule} operations are performed (Only called if{@link Rule#evaluate(org.ocpsoft.rewrite.event.Rewrite,EvaluationContext)} returned <code>true</code>).
 */
public void afterRuleOperationsPerformed(GraphRewrite event,EvaluationContext context,Rule rule);

Fixed version (ground truth):
/** 
 * Called immediately after   {@link Rule} operations are performed (Only called if{@link Rule#evaluate(org.ocpsoft.rewrite.event.Rewrite,EvaluationContext)} returned <code>true</code>).
 */
void afterRuleOperationsPerformed(GraphRewrite event,EvaluationContext context,Rule rule);
Program: 109463
Project: 109463
Buggy source:
/** 
 * Called immediately after any   {@link Rule} instances are executed.
 */
public void afterExecution(GraphRewrite event);

Fixed version (ground truth):
/** 
 * Called immediately after any   {@link Rule} instances are executed.
 */
void afterExecution(GraphRewrite event);
Program: 109464
Project: 109464
Buggy source:
/** 
 * Called immediately after execution of the each   {@link Rule}.
 */
public void afterRuleConditionEvaluation(GraphRewrite event,EvaluationContext context,Rule rule,boolean result);

Fixed version (ground truth):
/** 
 * Called immediately after execution of the each   {@link Rule}.
 */
void afterRuleConditionEvaluation(GraphRewrite event,EvaluationContext context,Rule rule,boolean result);
Program: 109465
Project: 109465
Buggy source:
/** 
 * Called immediately before any   {@link Rule} instances are executed.
 */
public void beforeExecution(GraphRewrite event);

Fixed version (ground truth):
/** 
 * Called immediately before any   {@link Rule} instances are executed.
 */
void beforeExecution(GraphRewrite event);
Program: 109466
Project: 109466
Buggy source:
@Override public void perform(GraphRewrite event,EvaluationContext context,WindupVertexFrame payload){
  if (totalIterations == -1) {
    @SuppressWarnings("String_Node_Str") Iterable<WindupVertexFrame> frames=(Iterable<WindupVertexFrame>)event.getRewriteContext().get(Iteration.DEFAULT_VARIABLE_LIST_STRING);
    totalIterations=Iterators.asList(frames).size();
  }
  currentIteration++;
  if (currentIteration % interval == 0) {
    LOG.info(messagePrefix + currentIteration + "String_Node_Str"+ totalIterations);
  }
}

Fixed version (ground truth):
@Override public void perform(GraphRewrite event,EvaluationContext context,WindupVertexFrame payload){
  if (totalIterations == -1) {
    @SuppressWarnings("String_Node_Str") Iterable<WindupVertexFrame> frames=(Iterable<WindupVertexFrame>)event.getRewriteContext().get(Iteration.DEFAULT_VARIABLE_LIST_STRING);
    totalIterations=Iterators.asList(frames).size();
    progressEstimate=new ProgressEstimate(totalIterations);
  }
  progressEstimate.addWork(1);
  if (progressEstimate.getWorked() % interval == 0) {
    if (estimateTimeRemaining) {
      long remainingTimeMillis=progressEstimate.getTimeRemainingInMillis();
      if (remainingTimeMillis > 1000)       event.ruleEvaluationProgress(messagePrefix,progressEstimate.getWorked(),totalIterations,(int)remainingTimeMillis / 1000);
    }
    LOG.info(messagePrefix + "String_Node_Str" + progressEstimate.getWorked()+ "String_Node_Str"+ totalIterations);
  }
}
Program: 109467
Project: 109467
Buggy source:
/** 
 * Indicates that the file at inputPath has been decompiled to outputPath
 */
public void fileDecompiled(String inputPath,String outputPath);

Fixed version (ground truth):
/** 
 * Indicates that the file at inputPath has been decompiled to outputPath
 */
void fileDecompiled(String inputPath,String outputPath);
Program: 109468
Project: 109468
Buggy source:
/** 
 * Indicates that the decompilation process is complete for all files within the archive (or directory). This allows for cleanup, such as committing all results to disk.
 */
public void decompilationProcessComplete();

Fixed version (ground truth):
/** 
 * Indicates that the decompilation process is complete for all files within the archive (or directory). This allows for cleanup, such as committing all results to disk.
 */
void decompilationProcessComplete();
Program: 109469
Project: 109469
Buggy source:
/** 
 * Decompiles all .class files and nested archives in the given archive. <p> Nested archives will be decompiled into directories matching the name of the archive, e.g. <code>foo.ear/bar.jar/src/com/foo/bar/Baz.java</code>. <p> Required directories will be created as needed.
 * @param archive The archive containing source files and archives.
 * @param outputDir The directory where decompiled .java files will be placed.
 * @param filter Decides what files from the archive to decompile.
 * @param listener This is called after each successful decompilation
 */
public DecompilationResult decompileArchive(File archive,File outputDir,Filter<ZipEntry> filter,DecompilationListener listener) throws DecompilationException ;

Fixed version (ground truth):
/** 
 * Decompiles all .class files and nested archives in the given archive. <p> Nested archives will be decompiled into directories matching the name of the archive, e.g. <code>foo.ear/bar.jar/src/com/foo/bar/Baz.java</code>. <p> Required directories will be created as needed.
 * @param archive The archive containing source files and archives.
 * @param outputDir The directory where decompiled .java files will be placed.
 * @param filter Decides what files from the archive to decompile.
 * @param listener This is called after each successful decompilation
 */
public DecompilationResult decompileArchive(Path archive,Path outputDir,Filter<ZipEntry> filter,DecompilationListener listener) throws DecompilationException ;