Program: 135256
Project: 135256
Buggy source:
@Test public void replaceMilestoneAliasesTestNoRelevantMilestone(){
  TurboMilestone msIrrelevant1=new TurboMilestone(REPO,1,"String_Node_Str");
  msIrrelevant1.setDueDate(Optional.of(LocalDate.now().minusDays(1)));
  msIrrelevant1.setOpen(true);
  TurboMilestone msIrrelevant2=new TurboMilestone(REPO,2,"String_Node_Str");
  msIrrelevant2.setDueDate(Optional.of(LocalDate.now().minusDays(2)));
  msIrrelevant1.setOpen(true);
  TurboMilestone msRelevant1=new TurboMilestone(REPO,3,"String_Node_Str");
  msRelevant1.setDueDate(Optional.empty());
  msRelevant1.setOpen(true);
  TurboMilestone msRelevant2=new TurboMilestone(REPO,4,"String_Node_Str");
  msRelevant2.setDueDate(Optional.empty());
  msRelevant2.setOpen(true);
  model=TestUtils.singletonModel(new Model(REPO,new ArrayList<>(),new ArrayList<>(),new ArrayList<>(Arrays.asList(msIrrelevant1,msIrrelevant2)),new ArrayList<>()));
  FilterExpression expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  List<Qualifier> milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  assertEquals(0,milestoneQualifiers.size());
  model=TestUtils.singletonModel(new Model(REPO,new ArrayList<>(),new ArrayList<>(),new ArrayList<>(Arrays.asList(msIrrelevant1,msIrrelevant2,msRelevant1)),new ArrayList<>()));
  expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  milestoneQualifiers.stream().forEach(msQ -> {
    assertEquals("String_Node_Str",msQ.getContent().get());
  }
);
  expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  milestoneQualifiers.stream().forEach(msQ -> {
    assertEquals("String_Node_Str",msQ.getContent().get());
  }
);
  expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  assertEquals(0,milestoneQualifiers.size());
  model=TestUtils.singletonModel(new Model(REPO,new ArrayList<>(),new ArrayList<>(),new ArrayList<>(Arrays.asList(msIrrelevant1,msIrrelevant2,msRelevant1,msRelevant2)),new ArrayList<>()));
  expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  assertEquals(0,milestoneQualifiers.size());
}

Fixed version (ground truth):
@Test public void replaceMilestoneAliasesTestNoRelevantMilestone(){
  TurboMilestone msIrrelevant1=new TurboMilestone(REPO,1,"String_Node_Str");
  msIrrelevant1.setDueDate(Optional.of(LocalDate.now().minusDays(1)));
  msIrrelevant1.setOpen(false);
  TurboMilestone msIrrelevant2=new TurboMilestone(REPO,2,"String_Node_Str");
  msIrrelevant2.setDueDate(Optional.of(LocalDate.now().minusDays(2)));
  msIrrelevant2.setOpen(true);
  TurboMilestone msRelevant1=new TurboMilestone(REPO,3,"String_Node_Str");
  msRelevant1.setDueDate(Optional.empty());
  msRelevant1.setOpen(true);
  TurboMilestone msRelevant2=new TurboMilestone(REPO,4,"String_Node_Str");
  msRelevant2.setDueDate(Optional.empty());
  msRelevant2.setOpen(true);
  model=TestUtils.singletonModel(new Model(REPO,new ArrayList<>(),new ArrayList<>(),new ArrayList<>(Arrays.asList(msIrrelevant1,msIrrelevant2)),new ArrayList<>()));
  FilterExpression expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  List<Qualifier> milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  milestoneQualifiers.stream().forEach(msQ -> {
    assertEquals("String_Node_Str",msQ.getContent().get());
  }
);
  msIrrelevant2.setOpen(false);
  model=TestUtils.singletonModel(new Model(REPO,new ArrayList<>(),new ArrayList<>(),new ArrayList<>(Arrays.asList(msIrrelevant1,msIrrelevant2,msRelevant1)),new ArrayList<>()));
  expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  milestoneQualifiers.stream().forEach(msQ -> {
    assertEquals("String_Node_Str",msQ.getContent().get());
  }
);
  expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  milestoneQualifiers.stream().forEach(msQ -> {
    assertEquals("String_Node_Str",msQ.getContent().get());
  }
);
  expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  assertEquals(0,milestoneQualifiers.size());
  model=TestUtils.singletonModel(new Model(REPO,new ArrayList<>(),new ArrayList<>(),new ArrayList<>(Arrays.asList(msIrrelevant1,msIrrelevant2,msRelevant1,msRelevant2)),new ArrayList<>()));
  expr=Qualifier.replaceMilestoneAliases(model,Parser.parse("String_Node_Str"));
  milestoneQualifiers=expr.find(Qualifier::isMilestoneQualifier);
  assertEquals(0,milestoneQualifiers.size());
}