Program: 42889
Project: 42889
Buggy source:
public String getRpt(String oxdId,boolean forceNew){
  SiteConfiguration site=siteService.getSite(oxdId);
  UmaConfiguration discovery=discoveryService.getUmaDiscoveryByOxdId(oxdId);
  if (!forceNew && !Strings.isNullOrEmpty(site.getRpt()) && site.getRptExpiresAt() != null) {
    boolean isExpired=site.getRptExpiresAt().after(new Date());
    if (!isExpired) {
      LOG.debug("String_Node_Str" + site.getRpt() + "String_Node_Str"+ site);
      return site.getRpt();
    }
  }
  final CreateRptService rptService=UmaClientFactory.instance().createRequesterPermissionTokenService(discovery,httpService.getClientExecutor());
  final String aat=getAat(oxdId).getToken();
  final RPTResponse rptResponse=rptService.createRPT("String_Node_Str" + aat,site.opHostWithoutProtocol());
  if (rptResponse != null && StringUtils.isNotBlank(rptResponse.getRpt())) {
    RptStatusService rptStatusService=UmaClientFactory.instance().createRptStatusService(discovery,httpService.getClientExecutor());
    RptIntrospectionResponse status=rptStatusService.requestRptStatus("String_Node_Str" + getPat(oxdId).getToken(),rptResponse.getRpt(),"String_Node_Str");
    LOG.debug("String_Node_Str" + rptResponse.getRpt() + "String_Node_Str"+ status);
    if (status.getActive()) {
      LOG.debug("String_Node_Str",rptResponse.getRpt());
      site.setRpt(rptResponse.getRpt());
      site.setRptCreatedAt(status.getIssuedAt());
      site.setRptExpiresAt(status.getExpiresAt());
      siteService.updateSilently(site);
      return rptResponse.getRpt();
    }
  }
  LOG.error("String_Node_Str" + site);
  throw new ErrorResponseException(ErrorResponseCode.FAILED_TO_GET_RPT);
}

Fixed version (ground truth):
public String getRpt(String oxdId,boolean forceNew){
  SiteConfiguration site=siteService.getSite(oxdId);
  UmaConfiguration discovery=discoveryService.getUmaDiscoveryByOxdId(oxdId);
  if (!forceNew && !Strings.isNullOrEmpty(site.getRpt()) && site.getRptExpiresAt() != null) {
    boolean isExpired=site.getRptExpiresAt().before(new Date());
    if (!isExpired) {
      LOG.debug("String_Node_Str" + site.getRpt() + "String_Node_Str"+ site);
      return site.getRpt();
    }
  }
  final CreateRptService rptService=UmaClientFactory.instance().createRequesterPermissionTokenService(discovery,httpService.getClientExecutor());
  final String aat=getAat(oxdId).getToken();
  final RPTResponse rptResponse=rptService.createRPT("String_Node_Str" + aat,site.opHostWithoutProtocol());
  if (rptResponse != null && StringUtils.isNotBlank(rptResponse.getRpt())) {
    RptStatusService rptStatusService=UmaClientFactory.instance().createRptStatusService(discovery,httpService.getClientExecutor());
    RptIntrospectionResponse status=rptStatusService.requestRptStatus("String_Node_Str" + getPat(oxdId).getToken(),rptResponse.getRpt(),"String_Node_Str");
    LOG.debug("String_Node_Str" + rptResponse.getRpt() + "String_Node_Str"+ status);
    if (status.getActive()) {
      LOG.debug("String_Node_Str",rptResponse.getRpt());
      site.setRpt(rptResponse.getRpt());
      site.setRptCreatedAt(status.getIssuedAt());
      site.setRptExpiresAt(status.getExpiresAt());
      siteService.updateSilently(site);
      return rptResponse.getRpt();
    }
  }
  LOG.error("String_Node_Str" + site);
  throw new ErrorResponseException(ErrorResponseCode.FAILED_TO_GET_RPT);
}