Program: 61411
Project: 61411
Buggy source:
@Test public void testSymthesisWOOrale() throws Exception {
  AstorMain main1=new AstorMain();
  CommandSummary cs=MathCommandsTests.getMath70Command();
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.append("String_Node_Str","String_Node_Str" + ExtensionPoints.INGREDIENT_TRANSFORM_STRATEGY.identifier + File.pathSeparator+ SynthesisBasedTransformationStrategy.class.getCanonicalName()+ File.pathSeparator+ ExtensionPoints.CODE_SYNTHESIS.identifier+ File.pathSeparator+ DynamothIngredientSynthesizer.class.getCanonicalName()+ File.pathSeparator+ ExtensionPoints.CONTEXT_COLLECTOR.identifier+ File.pathSeparator+ DynamothCollectorFacade.class.getCanonicalName());
  log.info(Arrays.toString(cs.flat()));
  main1.execute(cs.flat());
  assertEquals(1,main1.getEngine().getVariants().size());
  ProgramVariant variant=main1.getEngine().getVariants().get(0);
  DynamothCollectorFacade sc=new DynamothCollectorFacade();
  SuspiciousModificationPoint mp8=(SuspiciousModificationPoint)variant.getModificationPoints().get(0);
  String[] tests=sc.getCoverTest(mp8);
  Map<String,Object[]> oracle=new HashMap<>();
  for (  String testCase : tests) {
    oracle.put(testCase,new Integer[]{0});
  }
  DynamothCollector dynamothCodeGenesis=sc.createCollector(main1.getEngine().getProjectFacade(),mp8,oracle,tests);
  dynamothCodeGenesis.getNopolContext().setSynthesisDepth(3);
  assertTrue(dynamothCodeGenesis.getValues().size() > 0);
  DynamothSynthesisContext data=new DynamothSynthesisContext(dynamothCodeGenesis.getValues());
  data.setNopolContext(dynamothCodeGenesis.getNopolContext());
  DynamothSynthesizerWOracle soo=new DynamothSynthesizerWOracle(data);
  Candidates candidates=soo.combineValues();
  assertTrue(candidates.size() > 0);
  Set<Object> values=new HashSet<>();
  MapList<Object,Expression> clusterValues=new MapList<>();
  for (int i=0; i < candidates.size(); i++) {
    Expression expr=candidates.get(i);
    System.out.println("String_Node_Str" + i + "String_Node_Str"+ expr+ "String_Node_Str"+ expr.getValue());
    values.add(expr.getValue().getRealValue());
    clusterValues.add(expr.getValue().getRealValue(),expr);
  }
  System.out.println("String_Node_Str" + candidates.size());
  System.out.println("String_Node_Str" + values.size() + "String_Node_Str"+ values);
  System.out.println("String_Node_Str" + clusterValues.keySet().size() + "String_Node_Str"+ clusterValues);
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
}

Fixed version (ground truth):
@Test public void testSymthesisWOOrale() throws Exception {
  AstorMain main1=new AstorMain();
  CommandSummary cs=MathCommandsTests.getMath70Command();
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.command.put("String_Node_Str","String_Node_Str");
  cs.append("String_Node_Str","String_Node_Str" + ExtensionPoints.INGREDIENT_TRANSFORM_STRATEGY.identifier + File.pathSeparator+ SynthesisBasedTransformationStrategy.class.getCanonicalName()+ File.pathSeparator+ ExtensionPoints.CODE_SYNTHESIS.identifier+ File.pathSeparator+ DynamothIngredientSynthesizer.class.getCanonicalName()+ File.pathSeparator+ ExtensionPoints.CONTEXT_COLLECTOR.identifier+ File.pathSeparator+ DynamothCollectorFacade.class.getCanonicalName());
  log.info(Arrays.toString(cs.flat()));
  main1.execute(cs.flat());
  assertEquals(1,main1.getEngine().getVariants().size());
  ProgramVariant variant=main1.getEngine().getVariants().get(0);
  DynamothCollectorFacade sc=new DynamothCollectorFacade();
  SuspiciousModificationPoint mp8=(SuspiciousModificationPoint)variant.getModificationPoints().get(0);
  String[] tests=sc.getCoverTest(mp8);
  Map<String,Object[]> oracle=new HashMap<>();
  for (  String testCase : tests) {
    oracle.put(testCase,new Integer[]{0});
  }
  DynamothCollector dynamothCodeGenesis=sc.createCollector(main1.getEngine().getProjectFacade(),mp8,oracle,tests);
  dynamothCodeGenesis.getNopolContext().setSynthesisDepth(3);
  assertTrue(dynamothCodeGenesis.getValues().size() > 0);
  DynamothSynthesisContext data=new DynamothSynthesisContext(dynamothCodeGenesis.getValues());
  data.setNopolContext(dynamothCodeGenesis.getNopolContext());
  DynamothSynthesizerWOracle soo=new DynamothSynthesizerWOracle(data);
  Candidates candidates=soo.combineValues();
  assertTrue(candidates.size() > 0);
  Set<Object> differentValues=new HashSet<>();
  MapList<Object,Expression> clusterValues=new MapList<>();
  for (int i=0; i < candidates.size(); i++) {
    Expression expr=candidates.get(i);
    System.out.println("String_Node_Str" + i + "String_Node_Str"+ expr+ "String_Node_Str"+ expr.getValue());
    differentValues.add(expr.getValue().getRealValue());
    clusterValues.add(expr.getValue().getRealValue(),expr);
  }
  System.out.println("String_Node_Str" + candidates.size());
  System.out.println("String_Node_Str" + differentValues.size() + "String_Node_Str"+ differentValues);
  System.out.println("String_Node_Str" + clusterValues.keySet().size() + "String_Node_Str"+ clusterValues);
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(differentValues.size() > 170);
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
  assertTrue(candidates.stream().filter(e -> e.toString().equals("String_Node_Str")).findAny().isPresent());
}