Program: 102
Project: 102
Buggy source:
private void setUpSecondServer() throws Exception {
  server2=new Server();
  port2=findFreePort();
  SelectChannelConnector connector=new SelectChannelConnector();
  connector.setHost("String_Node_Str");
  connector.setPort(port2);
  server2.addConnector(connector);
  LoginService loginService=new HashLoginService("String_Node_Str","String_Node_Str");
  server2.addBean(loginService);
  Constraint constraint=new Constraint();
  constraint.setName(Constraint.__DIGEST_AUTH);
  constraint.setRoles(new String[]{user,admin});
  constraint.setAuthenticate(true);
  ConstraintMapping mapping=new ConstraintMapping();
  mapping.setConstraint(constraint);
  mapping.setPathSpec("String_Node_Str");
  Set<String> knownRoles=new HashSet<String>();
  knownRoles.add(user);
  knownRoles.add(admin);
  ConstraintSecurityHandler security=new ConstraintSecurityHandler(){
    @Override public void handle(    String arg0,    Request arg1,    HttpServletRequest arg2,    HttpServletResponse arg3) throws IOException, ServletException {
      System.err.println("String_Node_Str");
      System.err.println("String_Node_Str" + arg2.getHeader("String_Node_Str"));
      System.err.println("String_Node_Str" + arg2.getRequestURI());
      super.handle(arg0,arg1,arg2,arg3);
    }
  }
;
  security.setConstraintMappings(new ConstraintMapping[]{mapping},knownRoles);
  security.setAuthenticator(new DigestAuthenticator());
  security.setLoginService(loginService);
  security.setStrict(true);
  security.setHandler(new RedirectHandler());
  server2.setHandler(security);
  server2.start();
}

Fixed version (ground truth):
private void setUpSecondServer() throws Exception {
  server2=new Server();
  port2=findFreePort();
  SelectChannelConnector connector=new SelectChannelConnector();
  connector.setHost("String_Node_Str");
  connector.setPort(port2);
  server2.addConnector(connector);
  LoginService loginService=new HashLoginService("String_Node_Str","String_Node_Str");
  server2.addBean(loginService);
  Constraint constraint=new Constraint();
  constraint.setName(Constraint.__DIGEST_AUTH);
  constraint.setRoles(new String[]{user,admin});
  constraint.setAuthenticate(true);
  ConstraintMapping mapping=new ConstraintMapping();
  mapping.setConstraint(constraint);
  mapping.setPathSpec("String_Node_Str");
  Set<String> knownRoles=new HashSet<String>();
  knownRoles.add(user);
  knownRoles.add(admin);
  ConstraintSecurityHandler security=new ConstraintSecurityHandler(){
    @Override public void handle(    String arg0,    Request arg1,    HttpServletRequest arg2,    HttpServletResponse arg3) throws IOException, ServletException {
      System.err.println("String_Node_Str");
      System.err.println("String_Node_Str" + arg2.getHeader("String_Node_Str"));
      System.err.println("String_Node_Str" + arg2.getRequestURI());
      super.handle(arg0,arg1,arg2,arg3);
    }
  }
;
  security.setConstraintMappings(Arrays.asList(new ConstraintMapping[]{mapping}),knownRoles);
  security.setAuthenticator(new DigestAuthenticator());
  security.setLoginService(loginService);
  security.setStrict(true);
  security.setHandler(new RedirectHandler());
  server2.setHandler(security);
  server2.start();
}