Program: 51197
Project: 51197
Buggy source:
/** 
 * Instantiates the Grizzly Web Server
 */
private void instantiateGrizzlyWebServer(){
  webServer=new GrizzlyWebServer(baseUri.getPort());
  ServletAdapter sa=new ServletAdapter();
  Servlet servletInstance;
  if (servletClass != null) {
    try {
      servletInstance=(Servlet)servletClass.newInstance();
    }
 catch (    InstantiationException ex) {
      throw new TestContainerException(ex);
    }
catch (    IllegalAccessException ex) {
      throw new TestContainerException(ex);
    }
    sa.setServletInstance(servletInstance);
  }
  if (!contextListenerClassName.equals("String_Node_Str")) {
    sa.addServletListener(contextListenerClassName);
  }
  if (filterClass != null) {
    try {
      sa.addFilter((Filter)filterClass.newInstance(),"String_Node_Str",initParams);
    }
 catch (    InstantiationException ex) {
      throw new TestContainerException(ex);
    }
catch (    IllegalAccessException ex) {
      throw new TestContainerException(ex);
    }
  }
  for (  String contextParamName : contextParams.keySet()) {
    sa.addContextParameter(contextParamName,contextParams.get(contextParamName));
  }
  for (  String initParamName : initParams.keySet()) {
    sa.addInitParameter(initParamName,initParams.get(initParamName));
  }
  if (contextPath != null && contextPath.length() > 0) {
    if (!contextPath.startsWith("String_Node_Str")) {
      sa.setContextPath("String_Node_Str" + contextPath);
    }
 else {
      sa.setContextPath(contextPath);
    }
  }
  if (servletPath != null && servletPath.length() > 0) {
    if (!servletPath.startsWith("String_Node_Str")) {
      sa.setServletPath("String_Node_Str" + servletPath);
    }
 else {
      sa.setServletPath(servletPath);
    }
  }
  String[] mapping=null;
  webServer.addGrizzlyAdapter(sa,mapping);
}

Fixed version (ground truth):
/** 
 * Instantiates the Grizzly Web Server
 */
private void instantiateGrizzlyWebServer(){
  webServer=new GrizzlyWebServer(baseUri.getPort());
  ServletAdapter sa=new ServletAdapter();
  Servlet servletInstance;
  if (servletClass != null) {
    try {
      servletInstance=(Servlet)servletClass.newInstance();
    }
 catch (    InstantiationException ex) {
      throw new TestContainerException(ex);
    }
catch (    IllegalAccessException ex) {
      throw new TestContainerException(ex);
    }
    sa.setServletInstance(servletInstance);
  }
  if (!contextListenerClassName.equals("String_Node_Str")) {
    sa.addServletListener(contextListenerClassName);
  }
  if (!contextAttributeListenerClassName.equals("String_Node_Str")) {
    sa.addServletListener(contextAttributeListenerClassName);
  }
  if (!requestListenerClassName.equals("String_Node_Str")) {
    sa.addServletListener(requestListenerClassName);
  }
  if (!requestAttributeListenerClassName.equals("String_Node_Str")) {
    sa.addServletListener(requestAttributeListenerClassName);
  }
  if (filterClass != null) {
    try {
      sa.addFilter((Filter)filterClass.newInstance(),"String_Node_Str",initParams);
    }
 catch (    InstantiationException ex) {
      throw new TestContainerException(ex);
    }
catch (    IllegalAccessException ex) {
      throw new TestContainerException(ex);
    }
  }
  for (  String contextParamName : contextParams.keySet()) {
    sa.addContextParameter(contextParamName,contextParams.get(contextParamName));
  }
  for (  String initParamName : initParams.keySet()) {
    sa.addInitParameter(initParamName,initParams.get(initParamName));
  }
  if (contextPath != null && contextPath.length() > 0) {
    if (!contextPath.startsWith("String_Node_Str")) {
      sa.setContextPath("String_Node_Str" + contextPath);
    }
 else {
      sa.setContextPath(contextPath);
    }
  }
  if (servletPath != null && servletPath.length() > 0) {
    if (!servletPath.startsWith("String_Node_Str")) {
      sa.setServletPath("String_Node_Str" + servletPath);
    }
 else {
      sa.setServletPath(servletPath);
    }
  }
  String[] mapping=null;
  webServer.addGrizzlyAdapter(sa,mapping);
}