nus-yam/ex-repair huggingface dataset:
Program: 55043
Project: 55043
Buggy source:
private HttpClient getHttpClient(){
  HttpClient client;
  if (proxyHost != null) {
    if (null == this.proxyUser) {
      client=HttpClientBuilder.create().setRoutePlanner(new DefaultProxyRoutePlanner(proxyHost)).build();
    }
 else {
      RequestConfig config=RequestConfig.custom().setProxy(this.proxyHost).build();
      CredentialsProvider credsProvider=new BasicCredentialsProvider();
      credsProvider.setCredentials(new AuthScope(this.proxyHost),new UsernamePasswordCredentials(this.proxyUser,this.proxyPassword));
      client=HttpClientBuilder.create().setDefaultCredentialsProvider(credsProvider).setDefaultRequestConfig(config).build();
    }
  }
 else {
    client=HttpClientBuilder.create().build();
  }
  return client;
}

Fixed version (ground truth):
private HttpClient getHttpClient(){
  HttpClientBuilder builder=HttpClientBuilder.create();
  if (proxyHost != null) {
    if (null == this.proxyUser) {
      builder.setRoutePlanner(new DefaultProxyRoutePlanner(proxyHost));
    }
 else {
      RequestConfig config=RequestConfig.custom().setProxy(this.proxyHost).build();
      CredentialsProvider credsProvider=new BasicCredentialsProvider();
      credsProvider.setCredentials(new AuthScope(this.proxyHost),new UsernamePasswordCredentials(this.proxyUser,this.proxyPassword));
      builder.setDefaultCredentialsProvider(credsProvider).setDefaultRequestConfig(config);
    }
  }
  if (isRateLimitSupported) {
    builder.setServiceUnavailableRetryStrategy(new SlackRateLimitRetryStrategy());
  }
  return builder.build();
}
Program: 55044
Project: 55044
Buggy source:
@Test(expected=IllegalArgumentException.class) public void testSendMessageWithNullChanel(@Mocked WebSocketContainerProvider provider) throws Exception {
  SlackWebSocketSessionImpl webSocketSession=new SlackWebSocketSessionImpl(provider,"String_Node_Str",false,42L,TimeUnit.MILLISECONDS);
  try {
    webSocketSession.sendMessage(null,"String_Node_Str");
  }
 catch (  NullPointerException e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
@Test(expected=IllegalArgumentException.class) public void testSendMessageWithNullChanel(@Mocked WebSocketContainerProvider provider) throws Exception {
  SlackWebSocketSessionImpl webSocketSession=new SlackWebSocketSessionImpl(provider,"String_Node_Str",false,false,42L,TimeUnit.MILLISECONDS);
  try {
    webSocketSession.sendMessage(null,"String_Node_Str");
  }
 catch (  NullPointerException e) {
    fail("String_Node_Str");
  }
}
Program: 55045
Project: 55045
Buggy source:
@Test public void testParsingNewMessageFromIntegration() throws Exception {
  JSONParser parser=new JSONParser();
  JSONObject object=(JSONObject)parser.parse(TEST_NEW_MESSAGE_FROM_INTEGRATION);
  SlackEvent event=SlackJSONMessageParser.decode(session,object);
  Assertions.assertThat(event).isInstanceOf(SlackMessagePosted.class);
  SlackMessagePosted slackMessage=(SlackMessagePosted)event;
  Assertions.assertThat(slackMessage.getSender().getId()).isEqualTo("String_Node_Str");
  Assertions.assertThat(slackMessage.getChannel().getId()).isEqualTo("String_Node_Str");
  Assertions.assertThat(slackMessage.getMessageContent()).isEqualTo("String_Node_Str");
  Assertions.assertThat(slackMessage.getTimeStamp()).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testParsingNewMessageFromIntegration() throws Exception {
  JsonParser parser=new JsonParser();
  JsonObject object=parser.parse(TEST_NEW_MESSAGE_FROM_INTEGRATION).getAsJsonObject();
  SlackEvent event=SlackJSONMessageParser.decode(session,object);
  Assertions.assertThat(event).isInstanceOf(SlackMessagePosted.class);
  SlackMessagePosted slackMessage=(SlackMessagePosted)event;
  Assertions.assertThat(slackMessage.getSender().getId()).isEqualTo("String_Node_Str");
  Assertions.assertThat(slackMessage.getChannel().getId()).isEqualTo("String_Node_Str");
  Assertions.assertThat(slackMessage.getMessageContent()).isEqualTo("String_Node_Str");
  Assertions.assertThat(slackMessage.getTimeStamp()).isEqualTo("String_Node_Str");
}
Program: 55047
Project: 55047
Buggy source:
SlackMessageHandle inviteUser(String email,String firstName,boolean setActive);

Fixed version (ground truth):
SlackMessageHandle<GenericSlackReply> inviteUser(String email,String firstName,boolean setActive);
Program: 55048
Project: 55048
Buggy source:
@Override public SlackMessageHandle sendMessage(SlackChannel channel,String message,SlackAttachment attachment){
  return sendMessage(channel,message,attachment,DEFAULT_CONFIGURATION);
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackMessageReply> sendMessage(SlackChannel channel,String message,SlackAttachment attachment){
  return sendMessage(channel,message,attachment,DEFAULT_CONFIGURATION);
}
Program: 55049
Project: 55049
Buggy source:
@Override public JSONObject getPlainAnswer(){
  return null;
}

Fixed version (ground truth):
@Override public JSONObject getPlainAnswer(){
  return obj;
}
Program: 55050
Project: 55050
Buggy source:
@Override public SlackMessageHandle sendMessageToUser(String userName,String message,SlackAttachment attachment){
  return sendMessageToUser(findUserByUserName(userName),message,attachment);
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackMessageReply> sendMessageToUser(String userName,String message,SlackAttachment attachment){
  return sendMessageToUser(findUserByUserName(userName),message,attachment);
}
Program: 55051
Project: 55051
Buggy source:
@Override public SlackMessageHandle<GenericSlackReply> postGenericSlackCommand(Map<String,String> params,String command){
  HttpClient client=getHttpClient();
  HttpPost request=new HttpPost(SLACK_API_HTTPS_ROOT + command);
  List<NameValuePair> nameValuePairList=new ArrayList<>();
  for (  Map.Entry<String,String> arg : params.entrySet()) {
    nameValuePairList.add(new BasicNameValuePair(arg.getKey(),arg.getValue()));
  }
  try {
    SlackMessageHandleImpl<GenericSlackReply> handle=new SlackMessageHandleImpl<>(getNextMessageId());
    request.setEntity(new UrlEncodedFormEntity(nameValuePairList,"String_Node_Str"));
    HttpResponse response=client.execute(request);
    String jsonResponse=CharStreams.toString(new InputStreamReader(response.getEntity().getContent()));
    LOGGER.debug("String_Node_Str" + jsonResponse);
    GenericSlackReplyImpl reply=new GenericSlackReplyImpl(parseObject(jsonResponse));
    handle.setReply(reply);
    return handle;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<GenericSlackReply> postGenericSlackCommand(Map<String,String> params,String command){
  HttpClient client=getHttpClient();
  HttpPost request=new HttpPost(SLACK_API_HTTPS_ROOT + command);
  List<NameValuePair> nameValuePairList=new ArrayList<>();
  for (  Map.Entry<String,String> arg : params.entrySet()) {
    if (!"String_Node_Str".equals(arg.getKey())) {
      nameValuePairList.add(new BasicNameValuePair(arg.getKey(),arg.getValue()));
    }
  }
  nameValuePairList.add(new BasicNameValuePair("String_Node_Str",authToken));
  try {
    SlackMessageHandleImpl<GenericSlackReply> handle=new SlackMessageHandleImpl<>(getNextMessageId());
    request.setEntity(new UrlEncodedFormEntity(nameValuePairList,"String_Node_Str"));
    HttpResponse response=client.execute(request);
    String jsonResponse=CharStreams.toString(new InputStreamReader(response.getEntity().getContent()));
    LOGGER.debug("String_Node_Str" + jsonResponse);
    GenericSlackReplyImpl reply=new GenericSlackReplyImpl(parseObject(jsonResponse));
    handle.setReply(reply);
    return handle;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}
Program: 55052
Project: 55052
Buggy source:
@Override public SlackMessageHandle<SlackChannelReply> joinChannel(String channelName){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channelName);
  postSlackCommand(arguments,CHANNELS_JOIN_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackChannelReply> joinChannel(String channelName){
  SlackMessageHandleImpl<SlackChannelReply> handle=new SlackMessageHandleImpl<SlackChannelReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channelName);
  postSlackCommand(arguments,CHANNELS_JOIN_COMMAND,handle);
  return handle;
}
Program: 55053
Project: 55053
Buggy source:
@Override public SlackMessageHandle<SlackChannelReply> openDirectMessageChannel(SlackUser user){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",user.getId());
  postSlackCommand(arguments,DIRECT_MESSAGE_OPEN_CHANNEL_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackChannelReply> openDirectMessageChannel(SlackUser user){
  SlackMessageHandleImpl<SlackChannelReply> handle=new SlackMessageHandleImpl<SlackChannelReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",user.getId());
  postSlackCommand(arguments,DIRECT_MESSAGE_OPEN_CHANNEL_COMMAND,handle);
  return handle;
}
Program: 55054
Project: 55054
Buggy source:
@Override public SlackMessageHandle inviteUser(String email,String firstName,boolean setActive){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",email);
  arguments.put("String_Node_Str",firstName);
  arguments.put("String_Node_Str","String_Node_Str" + setActive);
  postSlackCommand(arguments,INVITE_USER_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<GenericSlackReply> inviteUser(String email,String firstName,boolean setActive){
  SlackMessageHandleImpl<GenericSlackReply> handle=new SlackMessageHandleImpl<GenericSlackReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",email);
  arguments.put("String_Node_Str",firstName);
  arguments.put("String_Node_Str","String_Node_Str" + setActive);
  postSlackCommand(arguments,INVITE_USER_COMMAND,handle);
  return handle;
}
Program: 55055
Project: 55055
Buggy source:
@Override public SlackMessageHandle<SlackChannelReply> openMultipartyDirectMessageChannel(SlackUser... users){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  StringBuilder strBuilder=new StringBuilder();
  for (int i=0; i < users.length; i++) {
    if (i != 0) {
      strBuilder.append(',');
    }
    strBuilder.append(users[i].getId());
  }
  arguments.put("String_Node_Str",strBuilder.toString());
  postSlackCommand(arguments,MULTIPARTY_DIRECT_MESSAGE_OPEN_CHANNEL_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackChannelReply> openMultipartyDirectMessageChannel(SlackUser... users){
  SlackMessageHandleImpl<SlackChannelReply> handle=new SlackMessageHandleImpl<SlackChannelReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  StringBuilder strBuilder=new StringBuilder();
  for (int i=0; i < users.length; i++) {
    if (i != 0) {
      strBuilder.append(',');
    }
    strBuilder.append(users[i].getId());
  }
  arguments.put("String_Node_Str",strBuilder.toString());
  postSlackCommand(arguments,MULTIPARTY_DIRECT_MESSAGE_OPEN_CHANNEL_COMMAND,handle);
  return handle;
}
Program: 55056
Project: 55056
Buggy source:
@Override public SlackMessageHandle<SlackReply> archiveChannel(SlackChannel channel){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  postSlackCommand(arguments,CHANNELS_ARCHIVE_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackReply> archiveChannel(SlackChannel channel){
  SlackMessageHandleImpl<SlackReply> handle=new SlackMessageHandleImpl<SlackReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  postSlackCommand(arguments,CHANNELS_ARCHIVE_COMMAND,handle);
  return handle;
}
Program: 55057
Project: 55057
Buggy source:
@Override public SlackMessageHandle<SlackMessageReply> sendMessage(SlackChannel channel,String message,SlackAttachment attachment,SlackChatConfiguration chatConfiguration){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",message);
  if (chatConfiguration.asUser) {
    arguments.put("String_Node_Str","String_Node_Str");
  }
  if (chatConfiguration.avatar == Avatar.ICON_URL) {
    arguments.put("String_Node_Str",chatConfiguration.avatarDescription);
  }
  if (chatConfiguration.avatar == Avatar.EMOJI) {
    arguments.put("String_Node_Str",chatConfiguration.avatarDescription);
  }
  if (chatConfiguration.userName != null) {
    arguments.put("String_Node_Str",chatConfiguration.userName);
  }
  if (attachment != null) {
    arguments.put("String_Node_Str",SlackJSONAttachmentFormatter.encodeAttachments(attachment).toString());
  }
  postSlackCommand(arguments,CHAT_POST_MESSAGE_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackMessageReply> sendMessage(SlackChannel channel,String message,SlackAttachment attachment,SlackChatConfiguration chatConfiguration){
  SlackMessageHandleImpl<SlackMessageReply> handle=new SlackMessageHandleImpl<SlackMessageReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",message);
  if (chatConfiguration.asUser) {
    arguments.put("String_Node_Str","String_Node_Str");
  }
  if (chatConfiguration.avatar == Avatar.ICON_URL) {
    arguments.put("String_Node_Str",chatConfiguration.avatarDescription);
  }
  if (chatConfiguration.avatar == Avatar.EMOJI) {
    arguments.put("String_Node_Str",chatConfiguration.avatarDescription);
  }
  if (chatConfiguration.userName != null) {
    arguments.put("String_Node_Str",chatConfiguration.userName);
  }
  if (attachment != null) {
    arguments.put("String_Node_Str",SlackJSONAttachmentFormatter.encodeAttachments(attachment).toString());
  }
  postSlackCommand(arguments,CHAT_POST_MESSAGE_COMMAND,handle);
  return handle;
}
Program: 55058
Project: 55058
Buggy source:
@Override public SlackMessageHandle<SlackMessageReply> deleteMessage(String timeStamp,SlackChannel channel){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",timeStamp);
  postSlackCommand(arguments,CHAT_DELETE_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackMessageReply> deleteMessage(String timeStamp,SlackChannel channel){
  SlackMessageHandleImpl<SlackMessageReply> handle=new SlackMessageHandleImpl<SlackMessageReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",timeStamp);
  postSlackCommand(arguments,CHAT_DELETE_COMMAND,handle);
  return handle;
}
Program: 55059
Project: 55059
Buggy source:
@Override public SlackMessageHandle<SlackMessageReply> addReactionToMessage(SlackChannel channel,String messageTimeStamp,String emojiCode){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",messageTimeStamp);
  arguments.put("String_Node_Str",emojiCode);
  postSlackCommand(arguments,REACTIONS_ADD_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackMessageReply> addReactionToMessage(SlackChannel channel,String messageTimeStamp,String emojiCode){
  SlackMessageHandleImpl<SlackMessageReply> handle=new SlackMessageHandleImpl<SlackMessageReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",messageTimeStamp);
  arguments.put("String_Node_Str",emojiCode);
  postSlackCommand(arguments,REACTIONS_ADD_COMMAND,handle);
  return handle;
}
Program: 55060
Project: 55060
Buggy source:
@Override public SlackMessageHandle<SlackChannelReply> leaveChannel(SlackChannel channel){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  postSlackCommand(arguments,CHANNELS_LEAVE_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackChannelReply> leaveChannel(SlackChannel channel){
  SlackMessageHandleImpl<SlackChannelReply> handle=new SlackMessageHandleImpl<SlackChannelReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  postSlackCommand(arguments,CHANNELS_LEAVE_COMMAND,handle);
  return handle;
}
Program: 55061
Project: 55061
Buggy source:
@Override public SlackMessageHandle sendMessageOverWebSocket(SlackChannel channel,String message,SlackAttachment attachment){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  try {
    JSONObject messageJSON=new JSONObject();
    messageJSON.put("String_Node_Str","String_Node_Str");
    messageJSON.put("String_Node_Str",channel.getId());
    messageJSON.put("String_Node_Str",message);
    if (attachment != null) {
      messageJSON.put("String_Node_Str",SlackJSONAttachmentFormatter.encodeAttachments(attachment));
    }
    websocketSession.getBasicRemote().sendText(messageJSON.toJSONString());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackMessageReply> sendMessageOverWebSocket(SlackChannel channel,String message,SlackAttachment attachment){
  SlackMessageHandleImpl<SlackMessageReply> handle=new SlackMessageHandleImpl<SlackMessageReply>(getNextMessageId());
  try {
    JSONObject messageJSON=new JSONObject();
    messageJSON.put("String_Node_Str","String_Node_Str");
    messageJSON.put("String_Node_Str",channel.getId());
    messageJSON.put("String_Node_Str",message);
    if (attachment != null) {
      messageJSON.put("String_Node_Str",SlackJSONAttachmentFormatter.encodeAttachments(attachment));
    }
    websocketSession.getBasicRemote().sendText(messageJSON.toJSONString());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return handle;
}
Program: 55062
Project: 55062
Buggy source:
@Override public SlackMessageHandle<SlackChannelReply> inviteToChannel(SlackChannel channel,SlackUser user){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",user.getId());
  postSlackCommand(arguments,CHANNELS_INVITE_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackChannelReply> inviteToChannel(SlackChannel channel,SlackUser user){
  SlackMessageHandleImpl<SlackChannelReply> handle=new SlackMessageHandleImpl<SlackChannelReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",user.getId());
  postSlackCommand(arguments,CHANNELS_INVITE_COMMAND,handle);
  return handle;
}
Program: 55063
Project: 55063
Buggy source:
@Override public SlackMessageHandle<SlackMessageReply> updateMessage(String timeStamp,SlackChannel channel,String message){
  SlackMessageHandleImpl handle=new SlackMessageHandleImpl(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",timeStamp);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",message);
  postSlackCommand(arguments,CHAT_UPDATE_COMMAND,handle);
  return handle;
}

Fixed version (ground truth):
@Override public SlackMessageHandle<SlackMessageReply> updateMessage(String timeStamp,SlackChannel channel,String message){
  SlackMessageHandleImpl<SlackMessageReply> handle=new SlackMessageHandleImpl<SlackMessageReply>(getNextMessageId());
  Map<String,String> arguments=new HashMap<>();
  arguments.put("String_Node_Str",authToken);
  arguments.put("String_Node_Str",timeStamp);
  arguments.put("String_Node_Str",channel.getId());
  arguments.put("String_Node_Str",message);
  postSlackCommand(arguments,CHAT_UPDATE_COMMAND,handle);
  return handle;
}
Program: 55064
Project: 55064
Buggy source:
public ReactionAddedImpl(String emojiName,String messageID,SlackChannel channel){
  this.emojiName=emojiName;
  this.messageID=messageID;
  this.channel=channel;
}

Fixed version (ground truth):
public ReactionAddedImpl(String emojiName,SlackUser user,SlackChannel channel,String messageID,String fileID,String fileCommentID){
  this.emojiName=emojiName;
  this.user=user;
  this.channel=channel;
  this.messageID=messageID;
  this.fileID=fileID;
  this.fileCommentID=fileCommentID;
}
Program: 55065
Project: 55065
Buggy source:
public ReactionRemovedImpl(String emojiName,String messageID,SlackChannel channel){
  this.emojiName=emojiName;
  this.messageID=messageID;
  this.channel=channel;
}

Fixed version (ground truth):
public ReactionRemovedImpl(String emojiName,SlackUser user,SlackChannel channel,String messageID,String fileID,String fileCommentID){
  this.emojiName=emojiName;
  this.user=user;
  this.channel=channel;
  this.messageID=messageID;
  this.fileID=fileID;
  this.fileCommentID=fileCommentID;
}
Program: 55066
Project: 55066
Buggy source:
private static ReactionAdded extractReactionAddedEvent(SlackSession slackSession,JSONObject obj){
  JSONObject message=(JSONObject)obj.get("String_Node_Str");
  String emojiName=(String)obj.get("String_Node_Str");
  String messageId=(String)message.get("String_Node_Str");
  String channelId=(String)message.get("String_Node_Str");
  return new ReactionAddedImpl(emojiName,messageId,slackSession.findChannelById(channelId));
}

Fixed version (ground truth):
private static ReactionAdded extractReactionAddedEvent(SlackSession slackSession,JSONObject obj){
  JSONObject item=(JSONObject)obj.get("String_Node_Str");
  String emojiName=(String)obj.get("String_Node_Str");
  String messageId=(String)item.get("String_Node_Str");
  String fileId=(String)item.get("String_Node_Str");
  String fileCommentId=(String)item.get("String_Node_Str");
  String channelId=(String)item.get("String_Node_Str");
  SlackChannel channel=(channelId != null) ? slackSession.findChannelById(channelId) : null;
  SlackUser user=slackSession.findUserById((String)obj.get("String_Node_Str"));
  return new ReactionAddedImpl(emojiName,user,channel,messageId,fileId,fileCommentId);
}
Program: 55067
Project: 55067
Buggy source:
private static ReactionRemoved extractReactionRemovedEvent(SlackSession slackSession,JSONObject obj){
  JSONObject message=(JSONObject)obj.get("String_Node_Str");
  String emojiName=(String)obj.get("String_Node_Str");
  String messageId=(String)message.get("String_Node_Str");
  String channelId=(String)message.get("String_Node_Str");
  return new ReactionRemovedImpl(emojiName,messageId,slackSession.findChannelById(channelId));
}

Fixed version (ground truth):
private static ReactionRemoved extractReactionRemovedEvent(SlackSession slackSession,JSONObject obj){
  JSONObject item=(JSONObject)obj.get("String_Node_Str");
  String emojiName=(String)obj.get("String_Node_Str");
  String messageId=(String)item.get("String_Node_Str");
  String fileId=(String)item.get("String_Node_Str");
  String fileCommentId=(String)item.get("String_Node_Str");
  String channelId=(String)item.get("String_Node_Str");
  SlackChannel channel=(channelId != null) ? slackSession.findChannelById(channelId) : null;
  SlackUser user=slackSession.findUserById((String)obj.get("String_Node_Str"));
  return new ReactionRemovedImpl(emojiName,user,channel,messageId,fileId,fileCommentId);
}
Program: 55068
Project: 55068
Buggy source:
private static SlackChannel parseChannelDescription(JSONObject channelJSONObject){
  String id=(String)channelJSONObject.get("String_Node_Str");
  String name=(String)channelJSONObject.get("String_Node_Str");
  String topic=(String)((Map)channelJSONObject.get("String_Node_Str")).get("String_Node_Str");
  String purpose=(String)((Map)channelJSONObject.get("String_Node_Str")).get("String_Node_Str");
  return new SlackChannelImpl(id,name,topic,purpose,true);
}

Fixed version (ground truth):
private static SlackChannel parseChannelDescription(JSONObject channelJSONObject){
  String id=(String)channelJSONObject.get("String_Node_Str");
  String name=(String)channelJSONObject.get("String_Node_Str");
  String topic=(String)((Map)channelJSONObject.get("String_Node_Str")).get("String_Node_Str");
  String purpose=(String)((Map)channelJSONObject.get("String_Node_Str")).get("String_Node_Str");
  return new SlackChannelImpl(id,name,topic,purpose,id.startsWith("String_Node_Str"));
}
Program: 55069
Project: 55069
Buggy source:
@Override public String waitForCode() throws IOException {
  lock.lock();
  try {
    while (code == null && error == null) {
      gotAuthorizationResponse.awaitUninterruptibly();
    }
    if (error != null) {
      throw new IOException("String_Node_Str" + error + "String_Node_Str");
    }
    return code;
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public String waitForCode() throws IOException {
  waitUntilSignaled.acquireUninterruptibly();
  if (error != null) {
    throw new IOException("String_Node_Str" + error + "String_Node_Str");
  }
  return code;
}
Program: 55070
Project: 55070
Buggy source:
@Override public void handle(String target,HttpServletRequest request,HttpServletResponse response,int dispatch) throws IOException {
  if (!CALLBACK_PATH.equals(target)) {
    return;
  }
  ((Request)request).setHandled(true);
  lock.lock();
  try {
    error=request.getParameter("String_Node_Str");
    code=request.getParameter("String_Node_Str");
    gotAuthorizationResponse.signal();
    if (error == null && successLandingPageUrl != null) {
      response.sendRedirect(successLandingPageUrl);
    }
 else     if (error != null && failureLandingPageUrl != null) {
      response.sendRedirect(failureLandingPageUrl);
    }
 else {
      writeLandingHtml(response);
    }
    response.flushBuffer();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public void handle(String target,HttpServletRequest request,HttpServletResponse response,int dispatch) throws IOException {
  if (!CALLBACK_PATH.equals(target)) {
    return;
  }
  try {
    ((Request)request).setHandled(true);
    error=request.getParameter("String_Node_Str");
    code=request.getParameter("String_Node_Str");
    if (error == null && successLandingPageUrl != null) {
      response.sendRedirect(successLandingPageUrl);
    }
 else     if (error != null && failureLandingPageUrl != null) {
      response.sendRedirect(failureLandingPageUrl);
    }
 else {
      writeLandingHtml(response);
    }
    response.flushBuffer();
  }
  finally {
    waitUntilSignaled.release();
  }
}
Program: 55071
Project: 55071
Buggy source:
@Override public void stop() throws IOException {
  if (server != null) {
    try {
      server.stop();
    }
 catch (    Exception e) {
      Throwables.propagateIfPossible(e);
      throw new IOException(e);
    }
    server=null;
  }
}

Fixed version (ground truth):
@Override public void stop() throws IOException {
  waitUntilSignaled.release();
  if (server != null) {
    try {
      server.stop();
    }
 catch (    Exception e) {
      Throwables.propagateIfPossible(e);
      throw new IOException(e);
    }
    server=null;
  }
}
Program: 55072
Project: 55072
Buggy source:
@Override public String getRedirectUri() throws IOException {
  if (port == -1) {
    port=getUnusedPort();
  }
  server=new Server(port);
  for (  Connector c : server.getConnectors()) {
    c.setHost(host);
  }
  server.addHandler(new CallbackHandler());
  try {
    server.start();
  }
 catch (  Exception e) {
    Throwables.propagateIfPossible(e);
    throw new IOException(e);
  }
  return "String_Node_Str" + host + "String_Node_Str"+ port+ CALLBACK_PATH;
}

Fixed version (ground truth):
@Override public String getRedirectUri() throws IOException {
  server=new Server(port != -1 ? port : 0);
  Connector connector=server.getConnectors()[0];
  connector.setHost(host);
  server.addHandler(new CallbackHandler());
  try {
    server.start();
    port=connector.getLocalPort();
  }
 catch (  Exception e) {
    Throwables.propagateIfPossible(e);
    throw new IOException(e);
  }
  return "String_Node_Str" + host + "String_Node_Str"+ port+ CALLBACK_PATH;
}
Program: 55073
Project: 55073
Buggy source:
private void verifyDefaultLandingPage(){
  Assert.assertEquals(200,responseCode);
  Assert.assertNull(redirectedLandingPageUrl);
  Assert.assertTrue(responseOutput.toString().contains("String_Node_Str"));
  Assert.assertTrue(responseOutput.toString().contains("String_Node_Str"));
}

Fixed version (ground truth):
private void verifyDefaultLandingPage(){
  assertEquals(200,responseCode);
  assertNull(redirectedLandingPageUrl);
  assertTrue(responseOutput.toString().contains("String_Node_Str"));
  assertTrue(responseOutput.toString().contains("String_Node_Str"));
}
Program: 55074
Project: 55074
Buggy source:
private void verifyRedirectedLandingPageUrl(String landingPageUrlMatch){
  Assert.assertEquals(302,responseCode);
  Assert.assertEquals(landingPageUrlMatch,redirectedLandingPageUrl);
  Assert.assertTrue(responseOutput.toString().isEmpty());
}

Fixed version (ground truth):
private void verifyRedirectedLandingPageUrl(String landingPageUrlMatch){
  assertEquals(302,responseCode);
  assertEquals(landingPageUrlMatch,redirectedLandingPageUrl);
  assertTrue(responseOutput.toString().isEmpty());
}
Program: 55075
Project: 55075
Buggy source:
@Override public void onTokenResponse(Credential credential,TokenResponse tokenResponse) throws IOException {
  calledOnResponse=true;
}

Fixed version (ground truth):
public void onTokenResponse(Credential credential,TokenResponse tokenResponse) throws IOException {
  calledOnResponse=true;
}
Program: 55076
Project: 55076
Buggy source:
@Override public void onCredentialCreated(Credential credential,TokenResponse tokenResponse) throws IOException {
  called=true;
}

Fixed version (ground truth):
public void onCredentialCreated(Credential credential,TokenResponse tokenResponse) throws IOException {
  called=true;
}
Program: 55077
Project: 55077
Buggy source:
@Override public void onTokenErrorResponse(Credential credential,TokenErrorResponse tokenErrorResponse) throws IOException {
  calledOnError=true;
}

Fixed version (ground truth):
public void onTokenErrorResponse(Credential credential,TokenErrorResponse tokenErrorResponse) throws IOException {
  calledOnError=true;
}
Program: 55078
Project: 55078
Buggy source:
public void testConstructor_expiredQueryParam() throws Exception {
  HttpRequest request=subtestConstructor_expired(BearerToken.queryParameterAccessMethod(),new CheckAuth(){
    @Override public boolean checkAuth(    MockLowLevelHttpRequest req){
      return req.getUrl().contains("String_Node_Str");
    }
  }
);
  assertEquals(NEW_ACCESS_TOKEN,request.getUrl().get("String_Node_Str"));
}

Fixed version (ground truth):
public void testConstructor_expiredQueryParam() throws Exception {
  HttpRequest request=subtestConstructor_expired(BearerToken.queryParameterAccessMethod(),new CheckAuth(){
    public boolean checkAuth(    MockLowLevelHttpRequest req){
      return req.getUrl().contains("String_Node_Str");
    }
  }
);
  assertEquals(NEW_ACCESS_TOKEN,request.getUrl().get("String_Node_Str"));
}
Program: 55079
Project: 55079
Buggy source:
public void testConstructor_expiredBody() throws Exception {
  HttpRequest request=subtestConstructor_expired(BearerToken.formEncodedBodyAccessMethod(),new CheckAuth(){
    @Override public boolean checkAuth(    MockLowLevelHttpRequest req){
      return NEW_ACCESS_TOKEN.equals(((Map<?,?>)((UrlEncodedContent)req.getStreamingContent()).getData()).get("String_Node_Str"));
    }
  }
);
  assertEquals(NEW_ACCESS_TOKEN,((Map<?,?>)((UrlEncodedContent)request.getContent()).getData()).get("String_Node_Str"));
}

Fixed version (ground truth):
public void testConstructor_expiredBody() throws Exception {
  HttpRequest request=subtestConstructor_expired(BearerToken.formEncodedBodyAccessMethod(),new CheckAuth(){
    public boolean checkAuth(    MockLowLevelHttpRequest req){
      return NEW_ACCESS_TOKEN.equals(((Map<?,?>)((UrlEncodedContent)req.getStreamingContent()).getData()).get("String_Node_Str"));
    }
  }
);
  assertEquals(NEW_ACCESS_TOKEN,((Map<?,?>)((UrlEncodedContent)request.getContent()).getData()).get("String_Node_Str"));
}
Program: 55080
Project: 55080
Buggy source:
public void testConstructor_expiredHeader() throws Exception {
  HttpRequest request=subtestConstructor_expired(BearerToken.authorizationHeaderAccessMethod(),new CheckAuth(){
    @Override public boolean checkAuth(    MockLowLevelHttpRequest req){
      return req.getFirstHeaderValue("String_Node_Str").equals("String_Node_Str");
    }
  }
);
  assertEquals("String_Node_Str",request.getHeaders().getAuthorization());
}

Fixed version (ground truth):
public void testConstructor_expiredHeader() throws Exception {
  HttpRequest request=subtestConstructor_expired(BearerToken.authorizationHeaderAccessMethod(),new CheckAuth(){
    public boolean checkAuth(    MockLowLevelHttpRequest req){
      return req.getFirstHeaderValue("String_Node_Str").equals("String_Node_Str");
    }
  }
);
  assertEquals("String_Node_Str",request.getHeaders().getAuthorization());
}
Program: 55081
Project: 55081
Buggy source:
/** 
 * Returns whether the   {@link #getExpirationTimeSeconds} and {@link #getIssuedAtTimeSeconds} arevalid relative to the current time, optionally allowing for a clock skew. <p> Default implementation checks that the  {@link #getExpirationTimeSeconds() expiration time}and   {@link #getIssuedAtTimeSeconds() issued at time} are valid based on the{@link System#currentTimeMillis() current time}, allowing for the clock skew. Subclasses may override. </p>
 * @param acceptableTimeSkewSeconds seconds of acceptable clock skew
 */
public boolean isValidTime(long acceptableTimeSkewSeconds){
  long now=System.currentTimeMillis();
  return (expirationTimeSeconds == null || now <= (expirationTimeSeconds + acceptableTimeSkewSeconds) * 1000) && (issuedAtTimeSeconds == null || now >= (issuedAtTimeSeconds + acceptableTimeSkewSeconds) * 1000);
}

Fixed version (ground truth):
/** 
 * Returns whether the   {@link #getExpirationTimeSeconds} and {@link #getIssuedAtTimeSeconds} arevalid relative to the current time, optionally allowing for a clock skew. <p> Default implementation checks that the  {@link #getExpirationTimeSeconds() expiration time}and   {@link #getIssuedAtTimeSeconds() issued at time} are valid based on the{@link System#currentTimeMillis() current time}, allowing for the clock skew. Subclasses may override. </p>
 * @param acceptableTimeSkewSeconds seconds of acceptable clock skew
 */
public boolean isValidTime(long acceptableTimeSkewSeconds){
  long now=System.currentTimeMillis();
  return (expirationTimeSeconds == null || now <= (expirationTimeSeconds + acceptableTimeSkewSeconds) * 1000) && (issuedAtTimeSeconds == null || now >= (issuedAtTimeSeconds - acceptableTimeSkewSeconds) * 1000);
}
Program: 55082
Project: 55082
Buggy source:
public void initialize(HttpRequest request) throws IOException {
  authorizer.initialize(request);
}

Fixed version (ground truth):
public void initialize(HttpRequest request) throws IOException {
  authorizer.initialize(request);
  request.setUnsuccessfulResponseHandler(this);
}
Program: 55083
Project: 55083
Buggy source:
public boolean handleResponse(HttpRequest request,HttpResponse response,boolean retrySupported){
  return false;
}

Fixed version (ground truth):
public boolean handleResponse(HttpRequest request,HttpResponse response,boolean retrySupported){
  if (response.getStatusCode() == 401) {
    token=null;
  }
  return false;
}
Program: 55084
Project: 55084
Buggy source:
@Override protected void service(HttpServletRequest req,HttpServletResponse resp) throws IOException, ServletException {
  PersistenceManager pm=getPersistenceManagerFactory().getPersistenceManager();
  String userId=getUserId();
  ThreeLeggedFlow oauthFlow=newFlow(userId);
  oauthFlow.setJsonFactory(getJsonFactory());
  oauthFlow.setHttpTransport(getHttpTransport());
  try {
    Credential cred=oauthFlow.loadCredential(pm);
    if (cred == null) {
      pm.makePersistent(oauthFlow);
      String authorizationUrl=oauthFlow.getAuthorizationUrl();
      resp.sendRedirect(authorizationUrl);
    }
 else {
      req.setAttribute(AUTH_CREDENTIAL,cred);
      super.service(req,resp);
    }
  }
  finally {
    pm.close();
  }
}

Fixed version (ground truth):
@Override protected void service(HttpServletRequest req,HttpServletResponse resp) throws IOException, ServletException {
  PersistenceManager pm=getPersistenceManagerFactory().getPersistenceManager();
  String userId=getUserId();
  ThreeLeggedFlow oauthFlow=newFlow(userId);
  oauthFlow.setJsonFactory(getJsonFactory());
  oauthFlow.setHttpTransport(getHttpTransport());
  try {
    Credential cred=oauthFlow.loadCredential(pm);
    if (cred != null && cred.isInvalid()) {
      pm.deletePersistent(cred);
      cred=null;
    }
    if (cred != null) {
      req.setAttribute(AUTH_CREDENTIAL,cred);
      try {
        super.service(req,resp);
      }
 catch (      HttpResponseException e) {
        e.getResponse().ignore();
        if (cred.isInvalid()) {
          pm.deletePersistent(cred);
          startAuthFlow(resp,pm,oauthFlow);
        }
 else {
          throw e;
        }
      }
    }
 else {
      startAuthFlow(resp,pm,oauthFlow);
    }
  }
  finally {
    pm.close();
  }
}
Program: 55085
Project: 55085
Buggy source:
/** 
 * Request a new access token from the authorization endpoint. <p> Default implementation executes the refresh token grant parameter passed to the constructor or  {@code false} if it was {@code null}. Subclasses may override. If a new access token was retrieved, implementations must call   {@link #setAccessToken(String)}. Implementations can assume proper thread synchronization is already taken care of inside   {@link #refreshToken()}, where this is called from. </p>
 * @return whether a new access token was retrieved
 * @throws IOException I/O exception
 */
protected boolean executeRefreshToken() throws IOException {
  if (refreshToken != null) {
    RefreshTokenGrant request=new RefreshTokenGrant(transport,jsonFactory,authorizationServerUrl,clientId,clientSecret,refreshToken);
    setAccessToken(request.execute().accessToken);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Request a new access token from the authorization endpoint. <p> Default implementation executes the refresh token grant parameter passed to the constructor or  {@code false} if it was {@code null}. Subclasses may override. If a new access token was retrieved, implementations must call   {@link #setAccessToken(String)}. Implementations can assume proper thread synchronization is already taken care of inside   {@link #refreshToken()}, where this is called from. </p>
 * @return whether a new access token was retrieved
 * @throws IOException I/O exception
 */
protected boolean executeRefreshToken() throws IOException {
  if (refreshToken != null) {
    RefreshTokenGrant request=new RefreshTokenGrant(transport,jsonFactory,authorizationServerUrl,clientId,clientSecret,refreshToken);
    try {
      setAccessToken(request.execute().accessToken);
    }
 catch (    HttpResponseException e) {
      setAccessToken(null);
    }
    return true;
  }
  return false;
}
Program: 55086
Project: 55086
Buggy source:
@ExpectPermission(Permission.PROJECT_ADMINISTRATION) @RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public int updateMailTicketConfig(@PathVariable("String_Node_Str") String projectShortName,@PathVariable("String_Node_Str") int configId,@PathVariable("String_Node_Str") int id,@RequestBody ProjectMailTicket updatedTicket){
  int projectId=projectService.findIdByShortName(projectShortName);
  ProjectMailTicket ticket=mailTicketService.findTicket(id);
  ProjectMailTicketConfig config=mailTicketService.findConfig(ticket.getConfigId());
  Validate.isTrue(config.getProjectId() == projectId);
  BoardColumn column=boardColumnRepository.findById(updatedTicket.getColumnId());
  Board board=boardRepository.findBoardById(column.getBoardId());
  Validate.isTrue(board.getProjectId() == projectId);
  return mailTicketService.updateTicket(id,updatedTicket.getName(),updatedTicket.getEnabled(),updatedTicket.getAlias(),updatedTicket.getSendByAlias(),updatedTicket.getColumnId(),updatedTicket.getConfigId(),updatedTicket.getMetadata());
}

Fixed version (ground truth):
@ExpectPermission(Permission.PROJECT_ADMINISTRATION) @RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public int updateMailTicketConfig(@PathVariable("String_Node_Str") String projectShortName,@PathVariable("String_Node_Str") int id,@RequestBody ProjectMailTicket updatedTicket){
  int projectId=projectService.findIdByShortName(projectShortName);
  ProjectMailTicket ticket=mailTicketService.findTicket(id);
  ProjectMailTicketConfig config=mailTicketService.findConfig(ticket.getConfigId());
  Validate.isTrue(config.getProjectId() == projectId);
  BoardColumn column=boardColumnRepository.findById(updatedTicket.getColumnId());
  Board board=boardRepository.findBoardById(column.getBoardId());
  Validate.isTrue(board.getProjectId() == projectId);
  return mailTicketService.updateTicket(id,updatedTicket.getName(),updatedTicket.getEnabled(),updatedTicket.getAlias(),updatedTicket.getSendByAlias(),updatedTicket.getColumnId(),updatedTicket.getConfigId(),updatedTicket.getMetadata());
}
Program: 55087
Project: 55087
Buggy source:
@Override public JsonElement serialize(Date date,Type type,JsonSerializationContext jsonSerializationContext){
  return new JsonPrimitive(DateFormatUtils.format(date,Constants.DATE_FORMAT,TimeZone.getTimeZone("String_Node_Str")));
}

Fixed version (ground truth):
@Override public JsonElement serialize(Date date,Type type,JsonSerializationContext jsonSerializationContext){
  return date == null ? JsonNull.INSTANCE : new JsonPrimitive(DateFormatUtils.format(date,Constants.DATE_FORMAT,TimeZone.getTimeZone("String_Node_Str")));
}
Program: 55088
Project: 55088
Buggy source:
@Override protected void doFilterInternal(HttpServletRequest req,HttpServletResponse resp,FilterChain chain) throws IOException, ServletException {
  String token=CSRFToken.getToken(req);
  if (token == null) {
    token=UUID.randomUUID().toString();
    req.getSession().setAttribute(CSRFToken.CSRF_TOKEN,token);
  }
  resp.setHeader(CSRF_TOKEN_HEADER,token);
  if (mustCheckCSRF(req)) {
    ImmutablePair<Boolean,ImmutablePair<Integer,String>> res=checkCSRF(req);
    if (!res.left) {
      LOG.info("String_Node_Str");
      resp.sendError(res.right.left,res.right.right);
      return;
    }
  }
  chain.doFilter(req,resp);
}

Fixed version (ground truth):
@Override protected void doFilterInternal(HttpServletRequest req,HttpServletResponse resp,FilterChain chain) throws IOException, ServletException {
  String token=CSRFToken.getToken(req);
  if (token == null) {
    token=UUID.randomUUID().toString();
    CSRFToken.setToken(req,token);
  }
  resp.setHeader(CSRF_TOKEN_HEADER,token);
  if (mustCheckCSRF(req)) {
    ImmutablePair<Boolean,ImmutablePair<Integer,String>> res=checkCSRF(req);
    if (!res.left) {
      LOG.info("String_Node_Str");
      resp.sendError(res.right.left,res.right.right);
      return;
    }
  }
  chain.doFilter(req,resp);
}
Program: 55089
Project: 55089
Buggy source:
private static ImmutablePair<Boolean,ImmutablePair<Integer,String>> checkCSRF(HttpServletRequest request) throws IOException {
  String expectedToken=(String)request.getSession().getAttribute(CSRFToken.CSRF_TOKEN);
  String token=request.getHeader(CSRF_TOKEN_HEADER);
  if (token == null) {
    token=request.getParameter(CSRF_FORM_PARAMETER);
  }
  if (token == null) {
    return of(false,of(HttpServletResponse.SC_FORBIDDEN,"String_Node_Str"));
  }
  if (expectedToken == null) {
    return of(false,of(HttpServletResponse.SC_FORBIDDEN,"String_Node_Str"));
  }
  if (!safeArrayEquals(token.getBytes("String_Node_Str"),expectedToken.getBytes("String_Node_Str"))) {
    return of(false,of(HttpServletResponse.SC_FORBIDDEN,"String_Node_Str"));
  }
  return of(true,null);
}

Fixed version (ground truth):
private static ImmutablePair<Boolean,ImmutablePair<Integer,String>> checkCSRF(HttpServletRequest request) throws IOException {
  String expectedToken=CSRFToken.getToken(request);
  String token=request.getHeader(CSRF_TOKEN_HEADER);
  if (token == null) {
    token=request.getParameter(CSRF_FORM_PARAMETER);
  }
  if (token == null) {
    return of(false,of(HttpServletResponse.SC_FORBIDDEN,"String_Node_Str"));
  }
  if (expectedToken == null) {
    return of(false,of(HttpServletResponse.SC_FORBIDDEN,"String_Node_Str"));
  }
  if (!safeArrayEquals(token.getBytes("String_Node_Str"),expectedToken.getBytes("String_Node_Str"))) {
    return of(false,of(HttpServletResponse.SC_FORBIDDEN,"String_Node_Str"));
  }
  return of(true,null);
}
Program: 55090
Project: 55090
Buggy source:
public Map<String,Object> modelForLoginPage(HttpServletRequest request){
  String tokenValue=(String)request.getSession().getAttribute(CSRFToken.CSRF_TOKEN);
  Map<String,Object> r=new HashMap<>();
  r.put("String_Node_Str",tokenValue);
  r.put("String_Node_Str",UriComponentsBuilder.fromPath(request.getParameter("String_Node_Str")).build().encode().toUriString());
  return r;
}

Fixed version (ground truth):
public Map<String,Object> modelForLoginPage(HttpServletRequest request){
  String tokenValue=CSRFToken.getToken(request);
  Map<String,Object> r=new HashMap<>();
  r.put("String_Node_Str",tokenValue);
  r.put("String_Node_Str",UriComponentsBuilder.fromPath(request.getParameter("String_Node_Str")).build().encode().toUriString());
  return r;
}