Program: 86776
Project: 86776
Buggy source:
@Test public void testEvaluate() throws Exception {
  DataSetDefinitionService service=mock(DataSetDefinitionService.class);
  Location aLocation=new Location();
  SqlDataSetDefinition baseDsd=new SqlDataSetDefinition();
  baseDsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  baseDsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  baseDsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Location.class));
  RepeatPerTimePeriodDataSetDefinition dsd=new RepeatPerTimePeriodDataSetDefinition();
  dsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  dsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  dsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Location.class));
  dsd.setBaseDefinition(baseDsd);
  dsd.setRepeatPerTimePeriod(TimePeriod.WEEKLY);
  RepeatPerTimePeriodDataSetEvaluator evaluator=new RepeatPerTimePeriodDataSetEvaluator();
  evaluator.setDataSetDefinitionService(service);
  EvaluationContext context=new EvaluationContext();
  context.addParameterValue("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  context.addParameterValue("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  context.addParameterValue("String_Node_Str",aLocation);
  evaluator.evaluate(dsd,context);
  final MultiParameterDataSetDefinition expectedDelegate=new MultiParameterDataSetDefinition();
  expectedDelegate.setBaseDefinition(baseDsd);
  expectedDelegate.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  expectedDelegate.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  expectedDelegate.addParameter(new Parameter("String_Node_Str","String_Node_Str",Location.class));
  Map<String,Object> iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  verify(service).evaluate(argThat(new ArgumentMatcher<DataSetDefinition>(){
    @Override public boolean matches(    Object argument){
      MultiParameterDataSetDefinition actualDelegate=(MultiParameterDataSetDefinition)argument;
      return actualDelegate.getParameters().equals(expectedDelegate.getParameters()) && actualDelegate.getIterations().equals(expectedDelegate.getIterations());
    }
  }
),eq(context));
}

Fixed version (ground truth):
@Test public void testEvaluate() throws Exception {
  Location aLocation=new Location();
  SqlDataSetDefinition baseDsd=new SqlDataSetDefinition();
  baseDsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  baseDsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  baseDsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Location.class));
  RepeatPerTimePeriodDataSetDefinition dsd=new RepeatPerTimePeriodDataSetDefinition();
  dsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  dsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  dsd.addParameter(new Parameter("String_Node_Str","String_Node_Str",Location.class));
  dsd.setBaseDefinition(baseDsd);
  dsd.setRepeatPerTimePeriod(TimePeriod.WEEKLY);
  EvaluationContext context=new EvaluationContext();
  context.addParameterValue("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  context.addParameterValue("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  context.addParameterValue("String_Node_Str",aLocation);
  evaluator.evaluate(dsd,context);
  final MultiParameterDataSetDefinition expectedDelegate=new MultiParameterDataSetDefinition();
  expectedDelegate.setBaseDefinition(baseDsd);
  expectedDelegate.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  expectedDelegate.addParameter(new Parameter("String_Node_Str","String_Node_Str",Date.class));
  expectedDelegate.addParameter(new Parameter("String_Node_Str","String_Node_Str",Location.class));
  Map<String,Object> iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  iteration=new HashMap<String,Object>();
  iteration.put("String_Node_Str",DateUtil.parseYmd("String_Node_Str"));
  iteration.put("String_Node_Str",DateUtils.addMilliseconds(DateUtil.parseYmd("String_Node_Str"),-1));
  expectedDelegate.addIteration(iteration);
  verify(service).evaluate(argThat(new ArgumentMatcher<DataSetDefinition>(){
    @Override public boolean matches(    Object argument){
      MultiParameterDataSetDefinition actualDelegate=(MultiParameterDataSetDefinition)argument;
      return actualDelegate.getParameters().equals(expectedDelegate.getParameters()) && actualDelegate.getIterations().equals(expectedDelegate.getIterations());
    }
  }
),eq(context));
}