Program: 114899
Project: 114899
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void emailUserNameInSuperTenantJWTTokenTestCase() throws Exception {
  String userName="String_Node_Str";
  String password="String_Node_Str";
  UserManagementClient userManagementClient=new UserManagementClient(keyManagerContext.getContextUrls().getBackEndUrl(),"String_Node_Str","String_Node_Str");
  userManagementClient.addUser(userName,password,new String[]{"String_Node_Str"},"String_Node_Str");
  String requestBody="String_Node_Str" + userName + "String_Node_Str"+ MultitenantConstants.SUPER_TENANT_DOMAIN_NAME+ "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"),userName);
    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",dependsOnMethods="String_Node_Str") public void emailUserNameInSuperTenantJWTTokenTestCase() throws Exception {
  String userName="String_Node_Str";
  String password="String_Node_Str";
  userManagementClient.addUser(userName,password,new String[]{"String_Node_Str"},"String_Node_Str");
  String requestBody="String_Node_Str" + userName + "String_Node_Str"+ MultitenantConstants.SUPER_TENANT_DOMAIN_NAME+ "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"),userName);
    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");
  }
}