Program: 15533
Project: 15533
Buggy source:
@Test public void testComplex() throws IOException, TemplateConfigurerFactoryException {
  TemplateConfigurer tcA=newTemplateConfigurer(1);
  TemplateConfigurer tcBSpec=newTemplateConfigurer(2);
  TemplateConfigurer tcBCommon=newTemplateConfigurer(3);
  TemplateConfigurer tcHH=newTemplateConfigurer(4);
  TemplateConfigurer tcHtml=newTemplateConfigurer(5);
  TemplateConfigurer tcXml=newTemplateConfigurer(6);
  TemplateConfigurer tcNWS=newTemplateConfigurer(7);
  TemplateConfigurerFactory tcf=new MergingTemplateConfigurerFactory(new FirstMatchTemplateConfigurerFactory(new ConditionalTemplateConfigurerFactory(new PathGlobMatcher("String_Node_Str"),tcA),new ConditionalTemplateConfigurerFactory(new PathGlobMatcher("String_Node_Str"),new MergingTemplateConfigurerFactory(new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcBCommon),new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcBSpec)))).allowNoMatch(true),new FirstMatchTemplateConfigurerFactory(new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcHH),new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcHtml),new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcXml)).allowNoMatch(true),new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcNWS));
  assertNotApplicable(tcf,"String_Node_Str");
  assertApplicable(tcf,"String_Node_Str",tcBCommon);
  assertApplicable(tcf,"String_Node_Str",tcBCommon,tcBSpec);
  assertApplicable(tcf,"String_Node_Str",tcBCommon,tcBSpec,tcHtml);
  assertApplicable(tcf,"String_Node_Str",tcBCommon,tcBSpec,tcXml,tcNWS);
  assertApplicable(tcf,"String_Node_Str",tcA,tcXml,tcNWS);
  assertApplicable(tcf,"String_Node_Str",tcHH);
  assertApplicable(tcf,"String_Node_Str",tcHH,tcNWS);
}

Fixed version (ground truth):
@Test public void testComplex() throws IOException, TemplateConfigurerFactoryException {
  TemplateConfigurer tcA=newTemplateConfigurer(1);
  TemplateConfigurer tcBSpec=newTemplateConfigurer(2);
  TemplateConfigurer tcBCommon=newTemplateConfigurer(3);
  TemplateConfigurer tcHH=newTemplateConfigurer(4);
  TemplateConfigurer tcHtml=newTemplateConfigurer(5);
  TemplateConfigurer tcXml=newTemplateConfigurer(6);
  TemplateConfigurer tcNWS=newTemplateConfigurer(7);
  TemplateConfigurerFactory tcf=new MergingTemplateConfigurerFactory(new FirstMatchTemplateConfigurerFactory(new ConditionalTemplateConfigurerFactory(new PathGlobMatcher("String_Node_Str"),tcA),new ConditionalTemplateConfigurerFactory(new PathGlobMatcher("String_Node_Str"),new MergingTemplateConfigurerFactory(new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcBCommon),new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcBSpec)))).allowNoMatch(true),new FirstMatchTemplateConfigurerFactory(new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcHH),new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcHtml),new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcXml)).allowNoMatch(true),new ConditionalTemplateConfigurerFactory(new FileNameGlobMatcher("String_Node_Str"),tcNWS));
  tcf.setConfiguration(cfg);
  assertNotApplicable(tcf,"String_Node_Str");
  assertApplicable(tcf,"String_Node_Str",tcBCommon);
  assertApplicable(tcf,"String_Node_Str",tcBCommon,tcBSpec);
  assertApplicable(tcf,"String_Node_Str",tcBCommon,tcBSpec,tcHtml);
  assertApplicable(tcf,"String_Node_Str",tcBCommon,tcBSpec,tcXml,tcNWS);
  assertApplicable(tcf,"String_Node_Str",tcA,tcXml,tcNWS);
  assertApplicable(tcf,"String_Node_Str",tcHH);
  assertApplicable(tcf,"String_Node_Str",tcHH,tcNWS);
}