nus-yam/ex-repair huggingface dataset:
Program: 99372
Project: 99372
Buggy source:
@Override protected List<Field> createFields(HttpServletRequest request,boolean retainPassword){
  List<Field> fields=new ArrayList<Field>(3);
  String value=Strings.clean(request.getParameter("String_Node_Str"));
  if (value != null) {
    DefaultField field=new DefaultField();
    field.setName("String_Node_Str");
    field.setType("String_Node_Str");
    field.setValue(value);
    fields.add(field);
  }
  String[] fieldNames=new String[]{"String_Node_Str","String_Node_Str"};
  for (  String fieldName : fieldNames) {
    DefaultField field=new DefaultField();
    field.setName(fieldName);
    field.setName(fieldName);
    field.setLabel("String_Node_Str" + fieldName + "String_Node_Str");
    field.setPlaceholder("String_Node_Str" + fieldName + "String_Node_Str");
    field.setRequired(true);
    field.setType("String_Node_Str");
    String val=fieldValueResolver.getValue(request,fieldName);
    field.setValue(retainPassword && val != null ? val : "String_Node_Str");
    fields.add(field);
  }
  return fields;
}

Fixed version (ground truth):
@Override protected List<Field> createFields(HttpServletRequest request,boolean retainPassword){
  List<Field> fields=new ArrayList<Field>(3);
  String value=Strings.clean(request.getParameter("String_Node_Str"));
  if (value != null) {
    DefaultField field=new DefaultField();
    field.setName("String_Node_Str");
    field.setType("String_Node_Str");
    field.setValue(value);
    fields.add(field);
  }
  String[] fieldNames=new String[]{"String_Node_Str","String_Node_Str"};
  for (  String fieldName : fieldNames) {
    DefaultField field=new DefaultField();
    field.setName(fieldName);
    field.setLabel(i18n(request,"String_Node_Str" + fieldName + "String_Node_Str"));
    field.setPlaceholder(i18n(request,"String_Node_Str" + fieldName + "String_Node_Str"));
    field.setRequired(true);
    field.setType("String_Node_Str");
    String val=fieldValueResolver.getValue(request,fieldName);
    field.setValue(retainPassword && val != null ? val : "String_Node_Str");
    fields.add(field);
  }
  return fields;
}
Program: 99373
Project: 99373
Buggy source:
@Override protected ViewModel onValidSubmit(HttpServletRequest request,HttpServletResponse response,Form form) throws Exception {
  String password=form.getFieldValue("String_Node_Str");
  Application application=(Application)request.getAttribute(Application.class.getName());
  String sptoken=form.getFieldValue("String_Node_Str");
  if (isJsonPreferred(request,response)) {
    Map<String,Object> model=new HashMap<String,Object>();
    try {
      Account account=application.resetPassword(sptoken,password);
      if (autoLogin) {
        model.put("String_Node_Str","String_Node_Str");
        model.put("String_Node_Str",accountModelFactory.toMap(account,Collections.EMPTY_LIST));
      }
 else {
        model.put("String_Node_Str","String_Node_Str");
        model.put("String_Node_Str","String_Node_Str");
      }
    }
 catch (    ResourceException re) {
      model=errorMap.toErrorMap(re.getStormpathError());
    }
catch (    Exception e) {
      Map<String,Object> exceptionErrorMap=new HashMap<String,Object>();
      exceptionErrorMap.put("String_Node_Str",e.getMessage());
      exceptionErrorMap.put("String_Node_Str",400);
      DefaultError error=new DefaultError(exceptionErrorMap);
      model=errorMap.toErrorMap(error);
    }
    return new DefaultViewModel("String_Node_Str",model);
  }
  application.resetPassword(sptoken,password);
  String next;
  if (autoLogin) {
    next=loginNextUri;
  }
 else {
    next=this.nextUri;
  }
  return new DefaultViewModel(next).setRedirect(true);
}

Fixed version (ground truth):
@Override protected ViewModel onValidSubmit(HttpServletRequest request,HttpServletResponse response,Form form) throws Exception {
  String password=form.getFieldValue("String_Node_Str");
  Application application=(Application)request.getAttribute(Application.class.getName());
  String sptoken=form.getFieldValue("String_Node_Str");
  if (isJsonPreferred(request,response)) {
    Map<String,Object> model=new HashMap<String,Object>();
    try {
      Account account=application.resetPassword(sptoken,password);
      if (autoLogin) {
        model.put("String_Node_Str",accountModelFactory.toMap(account,Collections.EMPTY_LIST));
      }
 else {
        return new DefaultViewModel("String_Node_Str");
      }
    }
 catch (    ResourceException re) {
      model=errorMapModelFactory.toErrorMap(re.getStormpathError());
    }
catch (    Exception e) {
      Map<String,Object> exceptionErrorMap=new HashMap<String,Object>();
      exceptionErrorMap.put("String_Node_Str",e.getMessage());
      exceptionErrorMap.put("String_Node_Str",400);
      DefaultError error=new DefaultError(exceptionErrorMap);
      model=errorMapModelFactory.toErrorMap(error);
    }
    return new DefaultViewModel("String_Node_Str",model);
  }
  application.resetPassword(sptoken,password);
  String next;
  if (autoLogin) {
    next=loginNextUri;
  }
 else {
    next=this.nextUri;
  }
  return new DefaultViewModel(next).setRedirect(true);
}
Program: 99374
Project: 99374
Buggy source:
public ChangePasswordController(Config config){
  super(config.getChangePasswordControllerConfig(),config.getProducesMediaTypes());
  this.forgotPasswordUri=config.getForgotPasswordControllerConfig().getUri();
  this.loginUri=config.getLoginControllerConfig().getUri();
  this.loginNextUri=config.getLoginControllerConfig().getNextUri();
  this.errorUri=config.getChangePasswordControllerConfig().getErrorUri();
  this.autoLogin=config.getChangePasswordControllerConfig().isAutoLogin();
  this.accountModelFactory=new DefaultAccountModelFactory();
  this.errorMap=new DefaultErrorMapModelFactory();
  Assert.hasText(forgotPasswordUri,"String_Node_Str");
  Assert.hasText(loginUri,"String_Node_Str");
  Assert.hasText(loginNextUri,"String_Node_Str");
  Assert.hasText(errorUri,"String_Node_Str");
}

Fixed version (ground truth):
public ChangePasswordController(Config config){
  super(config.getChangePasswordControllerConfig(),config.getProducesMediaTypes());
  this.forgotPasswordUri=config.getForgotPasswordControllerConfig().getUri();
  this.loginUri=config.getLoginControllerConfig().getUri();
  this.loginNextUri=config.getLoginControllerConfig().getNextUri();
  this.errorUri=config.getChangePasswordControllerConfig().getErrorUri();
  this.autoLogin=config.getChangePasswordControllerConfig().isAutoLogin();
  this.accountModelFactory=new DefaultAccountModelFactory();
  this.errorMapModelFactory=new DefaultErrorMapModelFactory();
  Assert.hasText(forgotPasswordUri,"String_Node_Str");
  Assert.hasText(loginUri,"String_Node_Str");
  Assert.hasText(loginNextUri,"String_Node_Str");
  Assert.hasText(errorUri,"String_Node_Str");
}
Program: 99375
Project: 99375
Buggy source:
@Override protected ViewModel doGet(HttpServletRequest request,HttpServletResponse response) throws Exception {
  String sptoken=Strings.clean(request.getParameter("String_Node_Str"));
  if (isJsonPreferred(request,response)) {
    Map<String,Object> model=new HashMap<String,Object>(1);
    if (sptoken == null) {
      model.put("String_Node_Str","String_Node_Str");
      model.put("String_Node_Str",i18n(request,"String_Node_Str"));
    }
 else {
      try {
        Application application=(Application)request.getAttribute(Application.class.getName());
        application.verifyPasswordResetToken(sptoken);
        model.put("String_Node_Str","String_Node_Str");
        model.put("String_Node_Str","String_Node_Str");
      }
 catch (      ResourceException re) {
        model=errorMap.toErrorMap(re.getStormpathError());
      }
    }
    return new DefaultViewModel("String_Node_Str",model);
  }
  if (sptoken == null) {
    return new DefaultViewModel(forgotPasswordUri).setRedirect(true);
  }
 else {
    try {
      Application application=(Application)request.getAttribute(Application.class.getName());
      application.verifyPasswordResetToken(sptoken);
    }
 catch (    ResourceException re) {
      return new DefaultViewModel(errorUri).setRedirect(true);
    }
    return super.doGet(request,response);
  }
}

Fixed version (ground truth):
@Override protected ViewModel doGet(HttpServletRequest request,HttpServletResponse response) throws Exception {
  String sptoken=Strings.clean(request.getParameter("String_Node_Str"));
  if (isJsonPreferred(request,response)) {
    Map<String,Object> model=new HashMap<String,Object>(1);
    if (sptoken == null) {
      model.put("String_Node_Str","String_Node_Str");
      model.put("String_Node_Str",i18n(request,"String_Node_Str"));
    }
 else {
      try {
        Application application=(Application)request.getAttribute(Application.class.getName());
        application.verifyPasswordResetToken(sptoken);
        return new DefaultViewModel("String_Node_Str");
      }
 catch (      ResourceException re) {
        model=errorMapModelFactory.toErrorMap(re.getStormpathError());
      }
    }
    return new DefaultViewModel("String_Node_Str",model);
  }
  if (sptoken == null) {
    return new DefaultViewModel(forgotPasswordUri).setRedirect(true);
  }
 else {
    try {
      Application application=(Application)request.getAttribute(Application.class.getName());
      application.verifyPasswordResetToken(sptoken);
    }
 catch (    ResourceException re) {
      return new DefaultViewModel(errorUri).setRedirect(true);
    }
    return super.doGet(request,response);
  }
}
Program: 99376
Project: 99376
Buggy source:
protected ViewModel onValidSubmit(HttpServletRequest request,HttpServletResponse response,Form form){
  Application application=(Application)request.getAttribute(Application.class.getName());
  String email=form.getFieldValue("String_Node_Str");
  Map<String,Object> model=new HashMap<String,Object>();
  try {
    request.setAttribute("String_Node_Str",form);
    AccountStore accountStore=accountStoreResolver.getAccountStore(request,response);
    if (accountStore != null) {
      application.sendPasswordResetEmail(email,accountStore);
    }
 else {
      application.sendPasswordResetEmail(email);
    }
  }
 catch (  ResourceException e) {
    if (isJsonPreferred(request,response)) {
      model.put("String_Node_Str",200);
      model.put("String_Node_Str","String_Node_Str");
      return new DefaultViewModel("String_Node_Str",model);
    }
    if (e.getCode() != 404) {
      throw e;
    }
  }
  if (isJsonPreferred(request,response)) {
    model.put("String_Node_Str",200);
    model.put("String_Node_Str","String_Node_Str");
    return new DefaultViewModel("String_Node_Str",model);
  }
  return new DefaultViewModel(nextUri).setRedirect(true);
}

Fixed version (ground truth):
protected ViewModel onValidSubmit(HttpServletRequest request,HttpServletResponse response,Form form){
  Application application=(Application)request.getAttribute(Application.class.getName());
  String email=form.getFieldValue("String_Node_Str");
  Map<String,Object> model=new HashMap<String,Object>();
  try {
    request.setAttribute("String_Node_Str",form);
    AccountStore accountStore=accountStoreResolver.getAccountStore(request,response);
    if (accountStore != null) {
      application.sendPasswordResetEmail(email,accountStore);
    }
 else {
      application.sendPasswordResetEmail(email);
    }
  }
 catch (  ResourceException e) {
    if (isJsonPreferred(request,response)) {
      return new DefaultViewModel("String_Node_Str");
    }
  }
  if (isJsonPreferred(request,response)) {
    return new DefaultViewModel("String_Node_Str");
  }
  return new DefaultViewModel(nextUri).setRedirect(true);
}
Program: 99377
Project: 99377
Buggy source:
@Override protected String getErrorMessage(HttpServletRequest request,String key){
  String defaultMessage=messageSource.getMessage(getDefaultMessageKey(),new Object[]{},request.getLocale());
  return messageSource.getMessage(key,getMessageParams(),defaultMessage,request.getLocale());
}

Fixed version (ground truth):
@Override protected String getErrorMessage(HttpServletRequest request,String key){
  return messageSource.getMessage(getDefaultMessageKey(),request.getLocale(),getMessageParams());
}
Program: 99378
Project: 99378
Buggy source:
public ErrorModel toError(HttpServletRequest request,Exception e){
  if (!hasError(request,e)) {
    return null;
  }
  String errorMsg=getErrorMessage(request,getDefaultMessageKey());
  int status=400;
  if (e.getCause() instanceof ResourceException) {
    return translateResourceException(request,(ResourceException)e.getCause());
  }
 else   if (e instanceof ResourceException) {
    return translateResourceException(request,(ResourceException)e);
  }
 else   if (e instanceof ValidationException) {
    errorMsg=e.getMessage();
  }
  return ErrorModel.builder().setStatus(status).setMessage(errorMsg).build();
}

Fixed version (ground truth):
public ErrorModel toError(HttpServletRequest request,Exception e){
  if (!hasError(request,e)) {
    return null;
  }
  String errorMsg=getErrorMessage(request,getDefaultMessageKey(),"String_Node_Str");
  int status=400;
  if (e.getCause() instanceof ResourceException) {
    return translateResourceException(request,(ResourceException)e.getCause());
  }
 else   if (e instanceof ResourceException) {
    return translateResourceException(request,(ResourceException)e);
  }
 else   if (e instanceof ValidationException) {
    errorMsg=e.getMessage();
  }
  return ErrorModel.builder().setStatus(status).setMessage(errorMsg).build();
}
Program: 99379
Project: 99379
Buggy source:
private ErrorModel translateResourceException(HttpServletRequest request,ResourceException e){
  return new ErrorModel.Builder().setStatus(e.getStormpathError().getStatus()).setMessage(getErrorMessage(request,"String_Node_Str" + e.getStormpathError().getCode())).build();
}

Fixed version (ground truth):
private ErrorModel translateResourceException(HttpServletRequest request,ResourceException e){
  return new ErrorModel.Builder().setStatus(e.getStormpathError().getStatus()).setMessage(getErrorMessage(request,"String_Node_Str" + e.getStormpathError().getCode(),e.getStormpathError().getMessage())).build();
}
Program: 99380
Project: 99380
Buggy source:
protected String getErrorMessage(HttpServletRequest request,String key){
  String message=messageSource.getMessage(key,request.getLocale(),getMessageParams());
  if (message.startsWith("String_Node_Str") && message.endsWith("String_Node_Str")) {
    return messageSource.getMessage(getDefaultMessageKey(),request.getLocale(),getMessageParams());
  }
  return message;
}

Fixed version (ground truth):
protected String getErrorMessage(HttpServletRequest request,String key,String defaultMessage){
  return messageSource.getMessage(key,defaultMessage,request.getLocale(),getMessageParams());
}
Program: 99381
Project: 99381
Buggy source:
public com.stormpath.sdk.servlet.i18n.MessageSource stormpathMessageSource(){
  final MessageSource springMessageSource=stormpathSpringMessageSource();
  return new com.stormpath.sdk.servlet.i18n.MessageSource(){
    @Override public String getMessage(    String key,    Locale locale){
      return getMessage(key,locale,new Object[0]);
    }
    @Override public String getMessage(    String key,    String defaultMessage,    Locale locale){
      try {
        return springMessageSource.getMessage(key,new Object[0],locale);
      }
 catch (      NoSuchMessageException e) {
        return defaultMessage;
      }
    }
    @Override public String getMessage(    String key,    Locale locale,    Object... args){
      try {
        return springMessageSource.getMessage(key,args,locale);
      }
 catch (      NoSuchMessageException e) {
        return '!' + key + '!';
      }
    }
  }
;
}

Fixed version (ground truth):
public com.stormpath.sdk.servlet.i18n.MessageSource stormpathMessageSource(){
  final MessageSource springMessageSource=stormpathSpringMessageSource();
  return new com.stormpath.sdk.servlet.i18n.MessageSource(){
    @Override public String getMessage(    String key,    Locale locale){
      return getMessage(key,locale,new Object[0]);
    }
    @Override public String getMessage(    String key,    String defaultMessage,    Locale locale,    Object... args){
      try {
        return springMessageSource.getMessage(key,args,locale);
      }
 catch (      NoSuchMessageException e) {
        log.warn("String_Node_Str",e);
        return defaultMessage;
      }
    }
    @Override public String getMessage(    String key,    String defaultMessage,    Locale locale){
      try {
        return springMessageSource.getMessage(key,new Object[0],locale);
      }
 catch (      NoSuchMessageException e) {
        log.warn("String_Node_Str",e);
        return defaultMessage;
      }
    }
    @Override public String getMessage(    String key,    Locale locale,    Object... args){
      try {
        return springMessageSource.getMessage(key,args,locale);
      }
 catch (      NoSuchMessageException e) {
        log.warn("String_Node_Str",e);
        return '!' + key + '!';
      }
    }
  }
;
}
Program: 99382
Project: 99382
Buggy source:
@Override public String getMessage(String key,Locale locale,Object... args){
  try {
    return springMessageSource.getMessage(key,args,locale);
  }
 catch (  NoSuchMessageException e) {
    return '!' + key + '!';
  }
}

Fixed version (ground truth):
@Override public String getMessage(String key,Locale locale,Object... args){
  try {
    return springMessageSource.getMessage(key,args,locale);
  }
 catch (  NoSuchMessageException e) {
    log.warn("String_Node_Str",e);
    return '!' + key + '!';
  }
}
Program: 99383
Project: 99383
Buggy source:
@Override protected boolean hasError(HttpServletRequest request,Exception e){
  if (e instanceof AuthenticationServiceException) {
    if (e.getMessage() != null && e.getMessage().contains(UNSUCCESSFUL_LOGIN_STORMPATH_ERROR)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean hasError(HttpServletRequest request,Exception e){
  if (e instanceof AuthenticationServiceException) {
    if (e.getMessage() != null && e.getMessage().contains(UNSUCCESSFUL_LOGIN_BACKEND_ERROR)) {
      return true;
    }
  }
  return false;
}
Program: 99384
Project: 99384
Buggy source:
@Override public void onAuthenticationFailure(HttpServletRequest request,HttpServletResponse response,AuthenticationException exception) throws IOException, ServletException {
  try {
    request.getSession().setAttribute(SPRING_SECURITY_AUTHENTICATION_FAILED_KEY,errorModelFactory.toError(request,exception));
    this.delegate.onAuthenticationFailure(request,response,exception);
  }
  finally {
    FailedAuthenticationRequestEvent event=createFailureEvent(request,response,exception);
    publisher.publish(event);
  }
}

Fixed version (ground truth):
@Override public void onAuthenticationFailure(HttpServletRequest request,HttpServletResponse response,AuthenticationException exception) throws IOException, ServletException {
  try {
    request.getSession().setAttribute(FormController.SPRING_SECURITY_AUTHENTICATION_FAILED_KEY,errorModelFactory.toError(request,exception));
    this.delegate.onAuthenticationFailure(request,response,exception);
  }
  finally {
    FailedAuthenticationRequestEvent event=createFailureEvent(request,response,exception);
    publisher.publish(event);
  }
}
Program: 99385
Project: 99385
Buggy source:
@Bean @ConditionalOnMissingBean public CsrfTokenManager stormpathCsrfTokenManager(){
  return new DisabledCsrfTokenManager(csrfTokenName);
}

Fixed version (ground truth):
@Bean @ConditionalOnMissingBean public CsrfTokenManager stormpathCsrfTokenManager(){
  return super.stormpathCsrfTokenManager();
}
Program: 99386
Project: 99386
Buggy source:
public AuthenticationFailureHandler stormpathAuthenticationFailureHandler(){
  String loginFailureUri=loginUri + "String_Node_Str";
  SimpleUrlAuthenticationFailureHandler handler=new SimpleUrlAuthenticationFailureHandler(loginFailureUri);
  handler.setAllowSessionCreation(false);
  return new StormpathAuthenticationFailureHandler(handler,stormpathRequestEventPublisher);
}

Fixed version (ground truth):
public AuthenticationFailureHandler stormpathAuthenticationFailureHandler(){
  String loginFailureUri=loginUri + "String_Node_Str";
  SimpleUrlAuthenticationFailureHandler handler=new SimpleUrlAuthenticationFailureHandler(loginFailureUri);
  handler.setAllowSessionCreation(false);
  return new StormpathAuthenticationFailureHandler(handler,stormpathRequestEventPublisher,stormpathLoginErrorModelFactory());
}
Program: 99387
Project: 99387
Buggy source:
@Override public List<String> toErrors(HttpServletRequest request,Form form,Exception exception){
  String query=Strings.clean(request.getQueryString());
  if (query != null && query.contains("String_Node_Str")) {
    return Collections.singletonList(getInvalidLoginMessage(request));
  }
  return null;
}

Fixed version (ground truth):
@Override public List<String> toErrors(HttpServletRequest request,Form form,Exception exception){
  if (exception instanceof AuthenticationServiceException) {
    if (exception.getMessage() != null && exception.getMessage().contains(UNSUCCESSFUL_LOGIN_STORMPATH_ERROR)) {
      return Collections.singletonList(getInvalidLoginMessage(request));
    }
  }
  return null;
}
Program: 99388
Project: 99388
Buggy source:
@Override public void onAuthenticationFailure(HttpServletRequest request,HttpServletResponse response,AuthenticationException exception) throws IOException, ServletException {
  try {
    this.delegate.onAuthenticationFailure(request,response,exception);
  }
  finally {
    FailedAuthenticationRequestEvent event=createFailureEvent(request,response,exception);
    publisher.publish(event);
  }
}

Fixed version (ground truth):
@Override public void onAuthenticationFailure(HttpServletRequest request,HttpServletResponse response,AuthenticationException exception) throws IOException, ServletException {
  try {
    request.getSession().setAttribute(SPRING_SECURITY_AUTHENTICATION_FAILED_KEY,errorModelFactory.toErrors(request,null,exception));
    this.delegate.onAuthenticationFailure(request,response,exception);
  }
  finally {
    FailedAuthenticationRequestEvent event=createFailureEvent(request,response,exception);
    publisher.publish(event);
  }
}
Program: 99389
Project: 99389
Buggy source:
public StormpathAuthenticationFailureHandler(AuthenticationFailureHandler delegate,Publisher<RequestEvent> publisher){
  Assert.notNull(delegate,"String_Node_Str");
  Assert.notNull(publisher,"String_Node_Str");
  this.delegate=delegate;
  this.publisher=publisher;
}

Fixed version (ground truth):
public StormpathAuthenticationFailureHandler(AuthenticationFailureHandler delegate,Publisher<RequestEvent> publisher,ErrorModelFactory errorModelFactory){
  Assert.notNull(delegate,"String_Node_Str");
  Assert.notNull(publisher,"String_Node_Str");
  Assert.notNull(errorModelFactory,"String_Node_Str");
  this.delegate=delegate;
  this.publisher=publisher;
  this.errorModelFactory=errorModelFactory;
}
Program: 99390
Project: 99390
Buggy source:
private String getInvalidLoginMessage(HttpServletRequest request){
  Config config=getConfig(request);
  MessageSource messageSource=null;
  try {
    messageSource=config.getInstance(MESSAGE_SOURCE);
  }
 catch (  ServletException se) {
    messageSource=new DefaultMessageSource();
  }
  return messageSource.getMessage(INVALID_LOGIN_MESSAGE,request.getLocale());
}

Fixed version (ground truth):
private String getInvalidLoginMessage(HttpServletRequest request){
  MessageSource messageSource=null;
  try {
    Config config=getConfig(request);
    messageSource=config.getInstance(MESSAGE_SOURCE);
  }
 catch (  ServletException se) {
    messageSource=new DefaultMessageSource();
  }
catch (  IllegalArgumentException iae) {
    messageSource=new DefaultMessageSource();
  }
  return messageSource.getMessage(INVALID_LOGIN_MESSAGE,request.getLocale());
}
Program: 99391
Project: 99391
Buggy source:
protected AuthenticationRequest createAuthenticationRequest(Authentication authentication){
  String username=(String)authentication.getPrincipal();
  String password=(String)authentication.getCredentials();
  return UsernamePasswordRequest.builder().setUsernameOrEmail(username).setPassword(password).build();
}

Fixed version (ground truth):
protected AuthenticationRequest createAuthenticationRequest(Authentication authentication){
  String username=(String)authentication.getPrincipal();
  String password=(String)authentication.getCredentials();
  if (!Strings.hasText(username)) {
    throw new AuthenticationServiceException("String_Node_Str");
  }
  return UsernamePasswordRequest.builder().setUsernameOrEmail(username).setPassword(password).build();
}
Program: 99392
Project: 99392
Buggy source:
public AuthorizationHeaderAccountResolver(HttpAuthenticator authenticator){
  Assert.notNull(authenticator,"String_Node_Str");
  this.httpAuthenticator=authenticator;
}

Fixed version (ground truth):
public AuthorizationHeaderAccountResolver(HttpAuthenticator authenticator,String idSiteResultURI){
  Assert.notNull(authenticator,"String_Node_Str");
  Assert.notNull(authenticator,"String_Node_Str");
  this.httpAuthenticator=authenticator;
  this.idSiteResultURI=idSiteResultURI;
}
Program: 99393
Project: 99393
Buggy source:
@Override public Account get(HttpServletRequest request,HttpServletResponse response){
  String authzHeaderValue=request.getHeader("String_Node_Str");
  if (authzHeaderValue != null) {
    try {
      HttpAuthenticationResult result=httpAuthenticator.authenticate(request,response);
      return result.getAuthenticationResult().getAccount();
    }
 catch (    HttpAuthenticationException e) {
      if (log.isDebugEnabled()) {
        String msg="String_Node_Str" + e.getMessage();
        msg+="String_Node_Str";
        log.debug(msg,e);
      }
      request.setAttribute(HttpAuthenticationException.class.getName(),e);
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Account get(HttpServletRequest request,HttpServletResponse response){
  String authzHeaderValue=request.getHeader("String_Node_Str");
  if (authzHeaderValue != null) {
    if (request.getRequestURI().contains(idSiteResultURI)) {
      JwtWrapper jwtWrapper=new JwtWrapper(request.getParameter("String_Node_Str"));
      Map jsonPayload=jwtWrapper.getJsonPayloadAsMap();
      IdSiteResultStatus resultStatus=IdSiteResultStatus.valueOf((String)jsonPayload.get(STATUS));
      if (resultStatus.equals(IdSiteResultStatus.LOGOUT)) {
        return null;
      }
    }
    try {
      HttpAuthenticationResult result=httpAuthenticator.authenticate(request,response);
      return result.getAuthenticationResult().getAccount();
    }
 catch (    HttpAuthenticationException e) {
      if (log.isDebugEnabled()) {
        String msg="String_Node_Str" + e.getMessage();
        msg+="String_Node_Str";
        log.debug(msg,e);
      }
      request.setAttribute(HttpAuthenticationException.class.getName(),e);
    }
  }
  return null;
}
Program: 99394
Project: 99394
Buggy source:
@Override protected Resolver<Account> createInstance(ServletContext servletContext) throws Exception {
  Config config=ConfigResolver.INSTANCE.getConfig(servletContext);
  HttpAuthenticator httpAuthenticator=config.getInstance(HTTP_AUTHENTICATOR);
  return new AuthorizationHeaderAccountResolver(httpAuthenticator);
}

Fixed version (ground truth):
@Override protected Resolver<Account> createInstance(ServletContext servletContext) throws Exception {
  Config config=ConfigResolver.INSTANCE.getConfig(servletContext);
  HttpAuthenticator httpAuthenticator=config.getInstance(HTTP_AUTHENTICATOR);
  return new AuthorizationHeaderAccountResolver(httpAuthenticator,ID_SITE_RESULT_URI);
}
Program: 99395
Project: 99395
Buggy source:
public void filter(HttpServletRequest request,HttpServletResponse response,FilterChain chain) throws IOException, ServletException {
  final boolean debug=logger.isDebugEnabled();
  String accessToken=tokenExtractor.getAccessToken(request);
  if (accessToken == null) {
    if (stateless && isAuthenticated()) {
      if (debug) {
        logger.debug("String_Node_Str");
      }
      SecurityContextHolder.clearContext();
    }
    if (debug) {
      logger.debug("String_Node_Str");
    }
  }
 else {
    Account account=AccountResolver.INSTANCE.getAccount(request);
    Authentication authentication=new ProviderAuthenticationToken(account);
    authentication=authenticationProvider.authenticate(authentication);
    SecurityContextHolder.clearContext();
    SecurityContextHolder.getContext().setAuthentication(authentication);
  }
  chain.doFilter(request,response);
}

Fixed version (ground truth):
public void filter(HttpServletRequest request,HttpServletResponse response,FilterChain chain) throws IOException, ServletException {
  final boolean debug=logger.isDebugEnabled();
  String accessToken=tokenExtractor.getAccessToken(request);
  if (accessToken == null) {
    if (stateless && isAuthenticated()) {
      if (debug) {
        logger.debug("String_Node_Str");
      }
      SecurityContextHolder.clearContext();
    }
    if (debug) {
      logger.debug("String_Node_Str");
    }
  }
 else {
    Account account=AccountResolver.INSTANCE.getAccount(request);
    if (account != null) {
      Authentication authentication=new ProviderAuthenticationToken(account);
      authentication=authenticationProvider.authenticate(authentication);
      SecurityContextHolder.clearContext();
      SecurityContextHolder.getContext().setAuthentication(authentication);
    }
  }
  chain.doFilter(request,response);
}
Program: 99396
Project: 99396
Buggy source:
public Resolver<Account> stormpathAuthorizationHeaderAccountResolver(){
  return new AuthorizationHeaderAccountResolver(stormpathAuthorizationHeaderAuthenticator());
}

Fixed version (ground truth):
public Resolver<Account> stormpathAuthorizationHeaderAccountResolver(){
  return new AuthorizationHeaderAccountResolver(stormpathAuthorizationHeaderAuthenticator(),idSiteResultUri);
}
Program: 99397
Project: 99397
Buggy source:
/** 
 * Only users who have a Custom Data entry in their Stormpath Account or Group containing something like <code>"springSecurityPermissions":["say:*"]</code> or <code>"springSecurityGrantedAuthorities":["say:hello"]</code> will be allowed to execute this method.
 */
@PreAuthorize("String_Node_Str" + MY_GROUP + "String_Node_Str") public String sayHello(Account account){
  return "String_Node_Str" + account.getGivenName() + "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Only users who have a Custom Data entry in their Stormpath Account or Group containing something like <code>"springSecurityPermissions":["say:*"]</code> or <code>"springSecurityPermissions":["say:hello"]</code> will be allowed to execute this method.
 */
@PreAuthorize("String_Node_Str" + MY_GROUP + "String_Node_Str") public String sayHello(Account account){
  return "String_Node_Str" + account.getGivenName() + "String_Node_Str";
}
Program: 99399
Project: 99399
Buggy source:
@Override public ResourceDataResult filter(ResourceDataRequest request,FilterChain chain){
  ResourceDataResult result=chain.filter(request);
  if (request.getAction() == ResourceAction.DELETE) {
    return result;
  }
  Class<? extends Resource> clazz=result.getResourceClass();
  if (!(ApiKey.class.isAssignableFrom(clazz) || ApiKeyList.class.isAssignableFrom(clazz))) {
    return result;
  }
  Map<String,Object> data=result.getData();
  if (!data.containsKey(ENCRYPTION_METADATA)) {
    return result;
  }
  @SuppressWarnings("String_Node_Str") Map<String,Object> metadata=(Map<String,Object>)data.get(ENCRYPTION_METADATA);
  byte[] base64Salt=((String)metadata.get(ENCRYPTION_KEY_SALT)).getBytes();
  Integer iterations=(Integer)metadata.get(ENCRYPTION_KEY_ITERATIONS);
  Integer size=(Integer)metadata.get(ENCRYPTION_KEY_SIZE);
  EncryptionService service=new ApiKeySecretEncryptionService.Builder().setPassword(clientApiKey.getSecret().toCharArray()).setKeySize(size).setIterations(iterations).setBase64Salt(base64Salt).build();
  String encryptedSecret=(String)data.get(SECRET_PROPERTY_NAME);
  Map<String,Object> clonedData=new LinkedHashMap<String,Object>();
  for (  Map.Entry<String,Object> entry : data.entrySet()) {
    String key=entry.getKey();
    if (key.equals(ENCRYPTION_METADATA)) {
      continue;
    }
    if (key.equals(SECRET_PROPERTY_NAME)) {
      clonedData.put(key,service.decryptBase64String(encryptedSecret));
      continue;
    }
    clonedData.put(key,entry.getValue());
  }
  return new DefaultResourceDataResult(result.getAction(),result.getUri(),clazz,clonedData);
}

Fixed version (ground truth):
@Override public ResourceDataResult filter(ResourceDataRequest request,FilterChain chain){
  ResourceDataResult result=chain.filter(request);
  if (request.getAction() == ResourceAction.DELETE) {
    return result;
  }
  Class<? extends Resource> clazz=result.getResourceClass();
  if (!(ApiKey.class.isAssignableFrom(clazz) || ApiKeyList.class.isAssignableFrom(clazz))) {
    return result;
  }
  Map<String,Object> data=result.getData();
  if (DefaultApiKeyList.isCollectionResource(data)) {
    @SuppressWarnings("String_Node_Str") Collection<Map<String,Object>> items=(Collection<Map<String,Object>>)data.get(DefaultApiKeyList.ITEMS_PROPERTY_NAME);
    if (items.isEmpty()) {
      return result;
    }
    List<Map<String,Object>> clonedItems=new ArrayList<Map<String,Object>>(items.size());
    for (    Map<String,Object> item : items) {
      clonedItems.add(clone(item));
    }
    data.put(DefaultApiKeyList.ITEMS_PROPERTY_NAME,clonedItems);
    return result;
  }
  return new DefaultResourceDataResult(result.getAction(),result.getUri(),clazz,clone(data));
}
Program: 99400
Project: 99400
Buggy source:
/** 
 * Returns   {@code true} if the specified data map represents a materialized collection resource data set, {@code false} otherwise.
 * @param props the data properties to test
 * @return {@code true} if the specified data map represents a materialized collection resource data set, {@code false} otherwise.
 * @since 1.0.RC4.3
 */
public static boolean isCollectionResource(Map<String,?> props){
  return isMaterialized(props) && (props.get("String_Node_Str") instanceof Iterable);
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the specified data map represents a materialized collection resource data set, {@code false} otherwise.
 * @param props the data properties to test
 * @return {@code true} if the specified data map represents a materialized collection resource data set, {@code false} otherwise.
 * @since 1.0.RC4.3
 */
public static boolean isCollectionResource(Map<String,?> props){
  return isMaterialized(props) && (props.get(ITEMS_PROPERTY_NAME) instanceof Iterable);
}
Program: 99401
Project: 99401
Buggy source:
/** 
 * Returns   {@code true} if the specified data map represents a materialized instance resource data set, {@code false} otherwise.
 * @param props the data properties to test
 * @return {@code true} if the specified data map represents a materialized instance resource data set, {@code false} otherwise.
 * @since 1.0.RC4.3
 */
public static boolean isInstanceResource(Map<String,?> props){
  return isMaterialized(props) && !props.containsKey("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the specified data map represents a materialized instance resource data set, {@code false} otherwise.
 * @param props the data properties to test
 * @return {@code true} if the specified data map represents a materialized instance resource data set, {@code false} otherwise.
 * @since 1.0.RC4.3
 */
public static boolean isInstanceResource(Map<String,?> props){
  return isMaterialized(props) && !props.containsKey(AbstractCollectionResource.ITEMS_PROPERTY_NAME);
}
Program: 99403
Project: 99403
Buggy source:
public JwtWrapper(String jwt){
  if (!Strings.hasText(jwt)) {
    throw new InvalidJwtException(InvalidJwtException.MISSING_JWT_ERROR);
  }
  StringTokenizer tokenizer=new StringTokenizer(jwt,JwtConstants.JWT_TOKENS_SEPARATOR);
  if (tokenizer.countTokens() != 3) {
    throw new InvalidJwtException(InvalidJwtException.INVALID_JWT_VALUE_FORMAT_ERROR);
  }
  this.base64JwtHeader=tokenizer.nextToken();
  this.base64JsonPayload=tokenizer.nextToken();
  this.base64JwtSignature=tokenizer.nextToken();
  this.mapMarshaller=new JacksonMapMarshaller();
}

Fixed version (ground truth):
public JwtWrapper(String jwt){
  if (!Strings.hasText(jwt)) {
    throw new InvalidJwtException(InvalidJwtException.JWT_REQUIRED_ERROR);
  }
  StringTokenizer tokenizer=new StringTokenizer(jwt,JwtConstants.JWT_TOKENS_SEPARATOR);
  if (tokenizer.countTokens() != 3) {
    throw new InvalidJwtException(InvalidJwtException.JWT_INVALID_VALUE_ERROR);
  }
  this.base64JwtHeader=tokenizer.nextToken();
  this.base64JsonPayload=tokenizer.nextToken();
  this.base64JwtSignature=tokenizer.nextToken();
  this.mapMarshaller=new JacksonMapMarshaller();
}
Program: 99404
Project: 99404
Buggy source:
@Override public boolean hasNonce(String nonce){
  Assert.hasText(nonce);
  if (defaultDataStore.isCachingEnabled()) {
    return false;
  }
  Cache<String,Map<String,?>> cache=defaultDataStore.getCache(Nonce.class);
  Map<String,?> values=cache.get(nonce);
  return values != null;
}

Fixed version (ground truth):
@Override public boolean hasNonce(String nonce){
  Assert.hasText(nonce);
  if (!defaultDataStore.isCachingEnabled()) {
    return false;
  }
  Cache<String,Map<String,?>> cache=defaultDataStore.getCache(Nonce.class);
  Map<String,?> values=cache.get(nonce);
  return values != null;
}
Program: 99405
Project: 99405
Buggy source:
@Override public void putNonce(String nonce){
  Assert.hasText(nonce);
  if (defaultDataStore.isCachingEnabled()) {
    return;
  }
  Cache<String,Map<String,?>> cache=defaultDataStore.getCache(Nonce.class);
  DefaultNonce defaultNonce=new DefaultNonce(nonce);
  cache.put(defaultNonce.getValue(),defaultNonce.getProperties());
}

Fixed version (ground truth):
@Override public void putNonce(String nonce){
  Assert.hasText(nonce);
  if (!defaultDataStore.isCachingEnabled()) {
    return;
  }
  Cache<String,Map<String,?>> cache=defaultDataStore.getCache(Nonce.class);
  DefaultNonce defaultNonce=new DefaultNonce(nonce);
  cache.put(defaultNonce.getValue(),defaultNonce.getProperties());
}
Program: 99406
Project: 99406
Buggy source:
@Override public AccountResult resolve(){
  nonceStore=nonceStore == null ? new DefaultNonceStore((DefaultDataStore)dataStore) : nonceStore;
  JwtWrapper jwtWrapper=new JwtWrapper(jwtResponse);
  Map jsonPayload=jwtWrapper.getJsonPayloadAsMap();
  String apiKeyId=getRequiredValue(jsonPayload,AUDIENCE_PARAM_NAME);
  getJwtSignatureValidator(apiKeyId).validate(jwtWrapper);
  Number expire=getRequiredValue(jsonPayload,EXPIRE_PARAM_NAME);
  verifyJwtIsNotExpired(expire.longValue());
  String responseNonce=getRequiredValue(jsonPayload,RESPONSE_NONCE_PARAMETER);
  if (nonceStore.hasNonce(responseNonce)) {
    throw new InvalidJwtException(InvalidJwtException.ALREADY_USED_JWT_ERROR);
  }
  nonceStore.putNonce(responseNonce);
  String issuer=getRequiredValue(jsonPayload,ISSUER_PARAM_NAME);
  String accountHref=getRequiredValue(jsonPayload,SUBJECT_PARAM_NAME);
  Boolean isNewAccount=getRequiredValue(jsonPayload,IS_NEW_SUBJECT_PARAM_NAME);
  String state=getOptionalValue(jsonPayload,STATE_PARAM_NAME);
  Map<String,Object> account=new HashMap<String,Object>();
  account.put(DefaultAccountResult.HREF_PROP_NAME,accountHref);
  Map<String,Object> properties=new LinkedHashMap<String,Object>();
  properties.put(DefaultAccountResult.ACCOUNT.getName(),account);
  properties.put(DefaultAccountResult.NEW_ACCOUNT.getName(),isNewAccount);
  properties.put(DefaultAccountResult.STATE.getName(),state);
  return new DefaultAccountResult(dataStore,properties);
}

Fixed version (ground truth):
@Override public AccountResult resolve(){
  JwtWrapper jwtWrapper=new JwtWrapper(jwtResponse);
  Map jsonPayload=jwtWrapper.getJsonPayloadAsMap();
  String apiKeyId=getRequiredValue(jsonPayload,AUDIENCE_PARAM_NAME);
  getJwtSignatureValidator(apiKeyId).validate(jwtWrapper);
  Number expire=getRequiredValue(jsonPayload,EXPIRE_PARAM_NAME);
  verifyJwtIsNotExpired(expire.longValue());
  String responseNonce=getRequiredValue(jsonPayload,RESPONSE_NONCE_PARAMETER);
  if (nonceStore.hasNonce(responseNonce)) {
    throw new InvalidJwtException(InvalidJwtException.ALREADY_USED_JWT_ERROR);
  }
  nonceStore.putNonce(responseNonce);
  String issuer=getRequiredValue(jsonPayload,ISSUER_PARAM_NAME);
  String accountHref=getRequiredValue(jsonPayload,SUBJECT_PARAM_NAME);
  Boolean isNewAccount=getRequiredValue(jsonPayload,IS_NEW_SUBJECT_PARAM_NAME);
  String state=getOptionalValue(jsonPayload,STATE_PARAM_NAME);
  Map<String,Object> account=new HashMap<String,Object>();
  account.put(DefaultAccountResult.HREF_PROP_NAME,accountHref);
  Map<String,Object> properties=new LinkedHashMap<String,Object>();
  properties.put(DefaultAccountResult.ACCOUNT.getName(),account);
  properties.put(DefaultAccountResult.NEW_ACCOUNT.getName(),isNewAccount);
  properties.put(DefaultAccountResult.STATE.getName(),state);
  return new DefaultAccountResult(dataStore,properties);
}
Program: 99407
Project: 99407
Buggy source:
public DefaultSsoAccountResolver(InternalDataStore dataStore,Application application,Object httpRequest){
  Assert.notNull(dataStore,"String_Node_Str");
  Assert.notNull(application,"String_Node_Str");
  Assert.notNull(httpRequest,"String_Node_Str");
  this.dataStore=dataStore;
  this.application=application;
  this.jwtResponse=getJwtResponse(httpRequest);
}

Fixed version (ground truth):
public DefaultSsoAccountResolver(InternalDataStore dataStore,Application application,Object httpRequest){
  Assert.notNull(dataStore,"String_Node_Str");
  Assert.notNull(application,"String_Node_Str");
  Assert.notNull(httpRequest,"String_Node_Str");
  this.dataStore=dataStore;
  this.application=application;
  this.jwtResponse=getJwtResponse(httpRequest);
  this.nonceStore=new DefaultNonceStore((DefaultDataStore)dataStore);
}
Program: 99408
Project: 99408
Buggy source:
private String getJwtResponse(Object httpRequest){
  String jwtResponse;
  if (HttpRequest.class.isAssignableFrom(httpRequest.getClass())) {
    jwtResponse=((HttpRequest)httpRequest).getParameter(JWR_RESPONSE_PARAM_NAME);
  }
 else {
    if (HTTP_SERVLET_REQUEST_WRAPPER_CLASS == null) {
      throw new RuntimeException("String_Node_Str" + httpRequest.getClass().getName());
    }
    Constructor<? extends HttpServletRequestWrapper> ctor=Classes.getConstructor(HTTP_SERVLET_REQUEST_WRAPPER_CLASS,Object.class);
    HttpServletRequestWrapper httpServletRequestWrapper=Classes.instantiate(ctor,httpRequest);
    jwtResponse=httpServletRequestWrapper.getParameter(JWR_RESPONSE_PARAM_NAME);
  }
  return jwtResponse;
}

Fixed version (ground truth):
private String getJwtResponse(Object httpRequest){
  String jwtResponse;
  if (HttpRequest.class.isAssignableFrom(httpRequest.getClass())) {
    jwtResponse=((HttpRequest)httpRequest).getParameter(JWR_RESPONSE_PARAM_NAME);
  }
 else {
    if (HTTP_SERVLET_REQUEST_WRAPPER_CLASS == null) {
      throw new RuntimeException("String_Node_Str" + httpRequest.getClass().getName());
    }
    Constructor<? extends HttpServletRequestWrapper> ctor=Classes.getConstructor(HTTP_SERVLET_REQUEST_WRAPPER_CLASS,Object.class);
    HttpServletRequestWrapper httpServletRequestWrapper=Classes.instantiate(ctor,httpRequest);
    jwtResponse=httpServletRequestWrapper.getParameter(JWR_RESPONSE_PARAM_NAME);
  }
  if (!Strings.hasText(jwtResponse)) {
    throw new InvalidJwtException(InvalidJwtException.JWT_REQUIRED_ERROR);
  }
  return jwtResponse;
}
Program: 99409
Project: 99409
Buggy source:
/** 
 * Creates a new   {@link ApiAuthenticationRequestBuilder ApiAuthenticationRequestBuilder}. The builder can be used to customize an   {@code Api} authentication.
 * @return a new {@link ApiAuthenticationRequestBuilder}.
 * @throws IllegalArgumentException - If {@code httpRequest} is null.
 * @see Application#authenticateOauth(Object)
 * @since 1.0.RC
 */
ApiAuthenticationRequestBuilder authenticate(Object httpRequest);

Fixed version (ground truth):
/** 
 * Creates a new   {@link ApiAuthenticationRequestBuilder ApiAuthenticationRequestBuilder}. The builder can be used to customize an   {@code Api} authentication.
 * @return a new {@link ApiAuthenticationRequestBuilder}.
 * @throws IllegalArgumentException - If {@code httpRequest} is null or not supported.
 * @see Application#authenticateOauth(Object)
 * @since 1.0.RC
 */
ApiAuthenticationRequestBuilder authenticate(Object httpRequest);
Program: 99410
Project: 99410
Buggy source:
/** 
 * Creates a new   {@link com.stormpath.sdk.oauth.authc.OauthAuthenticationRequestBuilder OauthAuthenticationRequestBuilder}. The builder can be used to customize an   {@code Api} authentication via Oauth.<pre> <b>application.authenticateOauth(httpServletRequest)</b> .execute() </pre>
 * @return a new {@link OauthAuthenticationRequestBuilder}.
 * @throws IllegalStateException    - If {@code com.stormpath.sdk.impl.oauth.authc.DefaultOauthAuthenticationRequestBuilder} class couldn't be found in the classpath.
 * @throws IllegalArgumentException - If {@code httpServletRequest} is null.
 * @see Application#authenticate(Object)
 * @since 1.0.RC
 */
OauthAuthenticationRequestBuilder authenticateOauth(Object httpRequest);

Fixed version (ground truth):
/** 
 * Creates a new   {@link com.stormpath.sdk.oauth.authc.OauthAuthenticationRequestBuilder OauthAuthenticationRequestBuilder}. The builder can be used to customize an   {@code Api} authentication via Oauth.Per the <a href="http://tools.ietf.org/html/rfc6749#section-2.3>OAuth 2.0</a> support the HTTP Basic authentication scheme for authenticating clients, while other methods like passing the  {@code client_id} and  {@code client_password} in the requestbody is not supported. In version 1.0 only the <a href="http://tools.ietf.org/html/rfc6749#section-4.4">Client Credentials</a> grant type is supported. To get an  {@code access_token} the  client makes a request to the token endpoint by adding the following parameters using the "application/x-www-form-urlencoded"{@code grant_type} - Required. Value MUST be set to "client_credentials".{@code scope} - Optional. The scope of the access request.<pre> POST /token HTTP/1.1 Host: server.example.com Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW Content-Type: application/x-www-form-urlencoded grant_type=client_credentials </pre> <pre> <b>application.authenticateOauth(httpServletRequest)</b> .execute() </pre>
 * @return a new {@link OauthAuthenticationRequestBuilder}.
 * @throws IllegalStateException    - If {@code com.stormpath.sdk.impl.oauth.authc.DefaultOauthAuthenticationRequestBuilder} class couldn't be found in the classpath.
 * @throws IllegalArgumentException - If {@code httpServletRequest} is null.
 * @see Application#authenticate(Object)
 * @since 1.0.RC
 */
OauthAuthenticationRequestBuilder authenticateOauth(Object httpRequest);
Program: 99411
Project: 99411
Buggy source:
@Override public String getHeader(String name){
  for (  Map.Entry<String,String[]> entry : httpRequest.getHeaders().entrySet()) {
    if (entry.getKey().equalsIgnoreCase(name)) {
      return entry.getValue()[0];
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public String getHeader(String name){
  return httpRequest.getHeader(name);
}
Program: 99412
Project: 99412
Buggy source:
public DefaultHttpRequest(Map<String,String[]> headers,HttpMethod method,InputStream body,Map<String,String[]> parameters,String queryParameters){
  this.headers=headers;
  this.method=method;
  this.body=body;
  this.parameters=parameters;
  this.queryParameters=queryParameters;
  Assert.notNull(method,"String_Node_Str");
  Assert.state(method != HttpMethod.GET || body == null);
}

Fixed version (ground truth):
public DefaultHttpRequest(Map<String,String[]> headers,HttpMethod method,Map<String,String[]> parameters,String queryParameters){
  this.headers=headers;
  this.method=method;
  this.parameters=parameters;
  this.queryParameters=queryParameters;
  Assert.notNull(method,"String_Node_Str");
}
Program: 99413
Project: 99413
Buggy source:
@Override public HttpRequest build(){
  return new DefaultHttpRequest(headers,method,body,parameters,queryParameters);
}

Fixed version (ground truth):
@Override public HttpRequest build(){
  return new DefaultHttpRequest(headers,method,parameters,queryParameters);
}
Program: 99414
Project: 99414
Buggy source:
public AccessTokenOauthException(Error error){
  super(error);
}

Fixed version (ground truth):
public AccessTokenOauthException(Error error,String oauthError){
  super(error,oauthError);
}