Program: 109434
Project: 109434
Buggy source:
@Test public void testResolutionStatus() throws IOException, InstantiationException, IllegalAccessException {
  try (GraphContext context=factory.create(getDefaultPath())){
    final String inputDir="String_Node_Str";
    final Path outputPath=Paths.get(FileUtils.getTempDirectory().toString(),"String_Node_Str" + RandomStringUtils.randomAlphanumeric(6));
    FileUtils.deleteDirectory(outputPath.toFile());
    Files.createDirectories(outputPath);
    final WindupConfiguration processorConfig=new WindupConfiguration().setOutputDirectory(outputPath);
    Path rulesPath=FileUtils.getTempDirectory().toPath().resolve("String_Node_Str").resolve("String_Node_Str" + RandomStringUtils.randomAlphanumeric(6));
    System.out.println("String_Node_Str" + rulesPath);
    Files.createDirectories(rulesPath);
    try (InputStream is=getClass().getResourceAsStream("String_Node_Str" + METADATA_FILENAME);OutputStream os=new FileOutputStream(rulesPath.resolve(METADATA_FILENAME).toFile())){
      IOUtils.copy(is,os);
    }
     Path rulesLibPath=rulesPath.resolve("String_Node_Str");
    Files.createDirectories(rulesLibPath);
    try (InputStream is=getClass().getResourceAsStream("String_Node_Str" + JAR_FILENAME);OutputStream os=new FileOutputStream(rulesLibPath.resolve(JAR_FILENAME).toFile())){
      IOUtils.copy(is,os);
    }
     WindupConfigurationModel windupConfigurationModel=WindupConfigurationService.getConfigurationModel(context);
    windupConfigurationModel.addUserRulesPath(new FileService(context).createByFilePath(rulesPath.toString()));
    processorConfig.setOptionValue(TargetOption.NAME,Collections.singletonList("String_Node_Str"));
    processorConfig.setGraphContext(context);
    processorConfig.setInputPath(Paths.get(inputDir));
    processorConfig.setOutputDirectory(outputPath);
    processorConfig.setOptionValue(ScanPackagesOption.NAME,Collections.singletonList("String_Node_Str"));
    processor.execute(processorConfig);
    GraphService<JavaTypeReferenceModel> typeRefService=new GraphService<>(context,JavaTypeReferenceModel.class);
    Iterable<JavaTypeReferenceModel> typeReferences=typeRefService.findAll();
    Assert.assertTrue(typeReferences.iterator().hasNext());
    boolean nioPathResolved=false;
    boolean fileUtilsResolved=false;
    boolean fileModelRecovered=false;
    for (    JavaTypeReferenceModel typeReference : typeReferences) {
      if (typeReference.getResolvedSourceSnippit().equals("String_Node_Str"))       Assert.fail("String_Node_Str");
      if (typeReference.getResolvedSourceSnippit().equals("String_Node_Str")) {
        if (typeReference.getResolutionStatus() != ResolutionStatus.RESOLVED)         Assert.fail("String_Node_Str");
 else         nioPathResolved=true;
      }
 else       if (typeReference.getResolvedSourceSnippit().equals("String_Node_Str")) {
        if (typeReference.getResolutionStatus() != ResolutionStatus.RESOLVED)         Assert.fail("String_Node_Str");
 else         fileUtilsResolved=true;
      }
 else       if (typeReference.getResolvedSourceSnippit().equals("String_Node_Str")) {
        if (typeReference.getResolutionStatus() == ResolutionStatus.RESOLVED)         Assert.fail("String_Node_Str");
 else         fileModelRecovered=true;
      }
    }
    Assert.assertTrue(nioPathResolved);
    Assert.assertTrue(fileUtilsResolved);
    Assert.assertTrue(fileModelRecovered);
  }
 }

Fixed version (ground truth):
@Test public void testResolutionStatus() throws IOException, InstantiationException, IllegalAccessException {
  try (GraphContext context=factory.create(getDefaultPath())){
    final String inputDir="String_Node_Str";
    final Path outputPath=Paths.get(FileUtils.getTempDirectory().toString(),"String_Node_Str" + RandomStringUtils.randomAlphanumeric(6));
    FileUtils.deleteDirectory(outputPath.toFile());
    Files.createDirectories(outputPath);
    final WindupConfiguration processorConfig=new WindupConfiguration().setOutputDirectory(outputPath);
    Path rulesPath=FileUtils.getTempDirectory().toPath().resolve("String_Node_Str").resolve("String_Node_Str" + RandomStringUtils.randomAlphanumeric(6));
    System.out.println("String_Node_Str" + rulesPath);
    Files.createDirectories(rulesPath);
    try (InputStream is=getClass().getResourceAsStream("String_Node_Str" + METADATA_FILENAME);OutputStream os=new FileOutputStream(rulesPath.resolve(METADATA_FILENAME).toFile())){
      IOUtils.copy(is,os);
    }
     Path rulesLibPath=rulesPath.resolve("String_Node_Str");
    Files.createDirectories(rulesLibPath);
    try (InputStream is=getClass().getResourceAsStream("String_Node_Str" + JAR_FILENAME);OutputStream os=new FileOutputStream(rulesLibPath.resolve(JAR_FILENAME).toFile())){
      IOUtils.copy(is,os);
    }
     WindupConfigurationModel windupConfigurationModel=WindupConfigurationService.getConfigurationModel(context);
    windupConfigurationModel.addUserRulesPath(new FileService(context).createByFilePath(rulesPath.toString()));
    processorConfig.setOptionValue(TargetOption.NAME,Collections.singletonList("String_Node_Str"));
    processorConfig.setGraphContext(context);
    processorConfig.setInputPath(Paths.get(inputDir));
    processorConfig.setOutputDirectory(outputPath);
    processorConfig.setOptionValue(ScanPackagesOption.NAME,Collections.singletonList("String_Node_Str"));
    processorConfig.setOptionValue(EnableClassNotFoundAnalysisOption.NAME,true);
    processor.execute(processorConfig);
    GraphService<JavaTypeReferenceModel> typeRefService=new GraphService<>(context,JavaTypeReferenceModel.class);
    Iterable<JavaTypeReferenceModel> typeReferences=typeRefService.findAll();
    Assert.assertTrue(typeReferences.iterator().hasNext());
    boolean nioPathResolved=false;
    boolean fileUtilsResolved=false;
    boolean fileModelRecovered=false;
    for (    JavaTypeReferenceModel typeReference : typeReferences) {
      if (typeReference.getResolvedSourceSnippit().equals("String_Node_Str"))       Assert.fail("String_Node_Str");
      if (typeReference.getResolvedSourceSnippit().equals("String_Node_Str")) {
        if (typeReference.getResolutionStatus() != ResolutionStatus.RESOLVED)         Assert.fail("String_Node_Str");
 else         nioPathResolved=true;
      }
 else       if (typeReference.getResolvedSourceSnippit().equals("String_Node_Str")) {
        if (typeReference.getResolutionStatus() != ResolutionStatus.RESOLVED)         Assert.fail("String_Node_Str");
 else         fileUtilsResolved=true;
      }
 else       if (typeReference.getResolvedSourceSnippit().equals("String_Node_Str")) {
        if (typeReference.getResolutionStatus() == ResolutionStatus.RESOLVED)         Assert.fail("String_Node_Str");
 else         fileModelRecovered=true;
      }
    }
    Assert.assertTrue(nioPathResolved);
    Assert.assertTrue(fileUtilsResolved);
    Assert.assertTrue(fileModelRecovered);
  }
 }