Program: 114897
Project: 114897
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void UserNameInTenantJWTTokenTestCase() throws Exception {
  String userName="String_Node_Str";
  String password="String_Node_Str";
  String domainName="String_Node_Str";
  String fullUserName=userName + "String_Node_Str" + domainName;
  boolean isSuccessful=createTenantWithEmailUserName(userName,password,domainName,keyManagerContext.getContextUrls().getBackEndUrl());
  assertEquals(isSuccessful,true);
  UserManagementClient userManagementClient=new UserManagementClient(keyManagerContext.getContextUrls().getBackEndUrl(),fullUserName,password);
  userManagementClient.addRemoveRolesOfUser(fullUserName,new String[]{"String_Node_Str"},null);
  String requestBody="String_Node_Str" + fullUserName + "String_Node_Str"+ password;
  URL tokenEndpointURL=new URL(gatewayUrlsWrk.getWebAppURLNhttp() + "String_Node_Str");
  JSONObject accessTokenGenerationResponse=new JSONObject(apiStore.generateUserAccessKey(consumerKey,consumerSecret,requestBody,tokenEndpointURL).getData());
  String userAccessToken=accessTokenGenerationResponse.getString("String_Node_Str");
  Map<String,String> requestHeaders=new HashMap<String,String>();
  requestHeaders.put("String_Node_Str","String_Node_Str" + userAccessToken);
  Thread.sleep(2000);
  WireMonitorServer wireServer=new WireMonitorServer(6789);
  wireServer.start();
  HttpRequestUtil.doGet(gatewayUrlsWrk.getWebAppURLNhttp() + "String_Node_Str",requestHeaders);
  String wireLog=wireServer.getCapturedMessage();
  if (wireLog.contains("String_Node_Str")) {
    wireLog=wireLog.split("String_Node_Str")[1];
    int firstDotSeparatorIndex=wireLog.indexOf('.');
    int secondSeparatorIndex=wireLog.indexOf('.',firstDotSeparatorIndex + 1);
    String JWTToken=wireLog.substring(firstDotSeparatorIndex + 1,secondSeparatorIndex);
    byte[] decodedJwt=Base64.decodeBase64(JWTToken.getBytes());
    JSONObject jsonObject=new JSONObject(new String(decodedJwt));
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
  }
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void UserNameInTenantJWTTokenTestCase() throws Exception {
  String userName="String_Node_Str";
  String password="String_Node_Str";
  String domainName="String_Node_Str";
  String fullUserName=userName + "String_Node_Str" + domainName;
  boolean isSuccessful=createTenantWithEmailUserName(userName,password,domainName,keyManagerContext.getContextUrls().getBackEndUrl());
  assertEquals(isSuccessful,true);
  UserManagementClient userManagementClient1=new UserManagementClient(keyManagerContext.getContextUrls().getBackEndUrl(),fullUserName,password);
  userManagementClient1.addRemoveRolesOfUser(fullUserName,new String[]{"String_Node_Str"},null);
  String requestBody="String_Node_Str" + fullUserName + "String_Node_Str"+ password;
  URL tokenEndpointURL=new URL(gatewayUrlsWrk.getWebAppURLNhttp() + "String_Node_Str");
  JSONObject accessTokenGenerationResponse=new JSONObject(apiStore.generateUserAccessKey(consumerKey,consumerSecret,requestBody,tokenEndpointURL).getData());
  String userAccessToken=accessTokenGenerationResponse.getString("String_Node_Str");
  Map<String,String> requestHeaders=new HashMap<String,String>();
  requestHeaders.put("String_Node_Str","String_Node_Str" + userAccessToken);
  Thread.sleep(2000);
  WireMonitorServer wireServer=new WireMonitorServer(6789);
  wireServer.start();
  HttpRequestUtil.doGet(gatewayUrlsWrk.getWebAppURLNhttp() + "String_Node_Str",requestHeaders);
  String wireLog=wireServer.getCapturedMessage();
  if (wireLog.contains("String_Node_Str")) {
    wireLog=wireLog.split("String_Node_Str")[1];
    int firstDotSeparatorIndex=wireLog.indexOf('.');
    int secondSeparatorIndex=wireLog.indexOf('.',firstDotSeparatorIndex + 1);
    String JWTToken=wireLog.substring(firstDotSeparatorIndex + 1,secondSeparatorIndex);
    byte[] decodedJwt=Base64.decodeBase64(JWTToken.getBytes());
    JSONObject jsonObject=new JSONObject(new String(decodedJwt));
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
    assertEquals(jsonObject.get("String_Node_Str"),"String_Node_Str");
  }
}