Program: 79686
Project: 79686
Buggy source:
/** 
 * Log Logout status 
 */
public void logLogout(SSOToken ssot){
  try {
    String logLogout=bundle.getString("String_Node_Str");
    List<String> dataList=new ArrayList<String>();
    dataList.add(logLogout);
    StringBuilder messageId=new StringBuilder();
    messageId.append("String_Node_Str");
    String indexType=ssot.getProperty(ISAuthConstants.INDEX_TYPE);
    if (indexType != null) {
      messageId.append("String_Node_Str").append(indexType.toUpperCase());
      dataList.add(indexType);
      if (indexType.equals(AuthContext.IndexType.USER.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.PRINCIPAL));
      }
 else       if (indexType.equals(AuthContext.IndexType.ROLE.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.ROLE));
      }
 else       if (indexType.equals(AuthContext.IndexType.SERVICE.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.SERVICE));
      }
 else       if (indexType.equals(AuthContext.IndexType.LEVEL.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.AUTH_LEVEL));
      }
 else       if (indexType.equals(AuthContext.IndexType.MODULE_INSTANCE.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.AUTH_TYPE));
      }
    }
    Hashtable<String,String> props=new Hashtable<String,String>();
    String client=ssot.getProperty(ISAuthConstants.HOST);
    if (client != null) {
      props.put(LogConstants.IP_ADDR,client);
    }
    String userDN=ssot.getProperty(ISAuthConstants.PRINCIPAL);
    if (userDN != null) {
      props.put(LogConstants.LOGIN_ID,userDN);
    }
    String orgDN=ssot.getProperty(ISAuthConstants.ORGANIZATION);
    if (orgDN != null) {
      props.put(LogConstants.DOMAIN,orgDN);
    }
    String authMethName=ssot.getProperty(ISAuthConstants.AUTH_TYPE);
    if (authMethName != null) {
      props.put(LogConstants.MODULE_NAME,authMethName);
    }
    String contextId=null;
    contextId=ssot.getProperty(Constants.AM_CTX_ID);
    if (contextId != null) {
      props.put(LogConstants.CONTEXT_ID,contextId);
    }
    props.put(LogConstants.LOGIN_ID_SID,ssot.getTokenID().toString());
    String[] data=dataList.toArray(new String[dataList.size()]);
    if (auditor == null) {
      auditor=InjectorHolder.getInstance(LegacyAuthenticationEventAuditor.class);
    }
    CoreWrapper cw=new CoreWrapper();
    String realmName=cw.convertOrgNameToRealmName(orgDN);
    if (auditor.isAuditing(realmName,AuditConstants.AUTHENTICATION_TOPIC)) {
      String messageName=messageId.toString();
      LogMessageProviderBase provider=null;
      if (logStatus) {
        try {
          provider=(LogMessageProviderBase)MessageProviderFactory.getProvider("String_Node_Str");
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      String description="String_Node_Str";
      if (provider != null) {
        description=provider.getAllHashMessageIDs().get(messageName).getDescription();
      }
      long time=Calendar.getInstance().getTimeInMillis();
      Map<String,String> contexts=null;
      if (StringUtils.isNotEmpty(contextId)) {
        contexts=new HashMap<>();
        contexts.put(AuditConstants.Context.SESSION.toString(),contextId);
      }
      AMIdentity identity=cw.getIdentity(userDN,realmName);
      String authentication=null;
      if (identity != null) {
        authentication=identity.getUniversalId();
      }
      List<?> entries;
      Map<String,String> info=new HashMap<>();
      if (StringUtils.isNotEmpty(client)) {
        info=Collections.singletonMap("String_Node_Str",client);
      }
      Map<String,Object> map=new HashMap<>();
      map.put("String_Node_Str",authMethName);
      map.put("String_Node_Str",description);
      map.put("String_Node_Str",info);
      entries=Collections.singletonList(map);
      auditor.audit(messageName,AM_LOGOUT.toString(),AuditRequestContext.getTransactionIdValue(),authentication,realmName,time,contexts,entries);
    }
    this.logIt(data,LOG_ACCESS,messageId.toString(),props);
  }
 catch (  SSOException ssoExp) {
    debug.error("String_Node_Str",ssoExp);
  }
catch (  Exception e) {
    debug.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Log Logout status 
 */
public void logLogout(SSOToken ssot){
  try {
    String logLogout=bundle.getString("String_Node_Str");
    List<String> dataList=new ArrayList<String>();
    dataList.add(logLogout);
    StringBuilder messageId=new StringBuilder();
    messageId.append("String_Node_Str");
    String indexType=ssot.getProperty(ISAuthConstants.INDEX_TYPE);
    if (indexType != null) {
      messageId.append("String_Node_Str").append(indexType.toUpperCase());
      dataList.add(indexType);
      if (indexType.equals(AuthContext.IndexType.USER.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.PRINCIPAL));
      }
 else       if (indexType.equals(AuthContext.IndexType.ROLE.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.ROLE));
      }
 else       if (indexType.equals(AuthContext.IndexType.SERVICE.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.SERVICE));
      }
 else       if (indexType.equals(AuthContext.IndexType.LEVEL.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.AUTH_LEVEL));
      }
 else       if (indexType.equals(AuthContext.IndexType.MODULE_INSTANCE.toString())) {
        dataList.add(ssot.getProperty(ISAuthConstants.AUTH_TYPE));
      }
    }
    Hashtable<String,String> props=new Hashtable<String,String>();
    String client=ssot.getProperty(ISAuthConstants.HOST);
    if (client != null) {
      props.put(LogConstants.IP_ADDR,client);
    }
    String userDN=ssot.getProperty(ISAuthConstants.PRINCIPAL);
    if (userDN != null) {
      props.put(LogConstants.LOGIN_ID,userDN);
    }
    String orgDN=ssot.getProperty(ISAuthConstants.ORGANIZATION);
    if (orgDN != null) {
      props.put(LogConstants.DOMAIN,orgDN);
    }
    String authMethName=ssot.getProperty(ISAuthConstants.AUTH_TYPE);
    if (authMethName != null) {
      props.put(LogConstants.MODULE_NAME,authMethName);
    }
    String contextId=null;
    contextId=ssot.getProperty(Constants.AM_CTX_ID);
    if (contextId != null) {
      props.put(LogConstants.CONTEXT_ID,contextId);
    }
    props.put(LogConstants.LOGIN_ID_SID,ssot.getTokenID().toString());
    String[] data=dataList.toArray(new String[dataList.size()]);
    if (auditor == null) {
      auditor=InjectorHolder.getInstance(LegacyAuthenticationEventAuditor.class);
    }
    CoreWrapper cw=new CoreWrapper();
    String realmName=cw.convertOrgNameToRealmName(orgDN);
    if (auditor.isAuditing(realmName,AuditConstants.AUTHENTICATION_TOPIC)) {
      String messageName=messageId.toString();
      LogMessageProviderBase provider=null;
      if (logStatus) {
        try {
          provider=(LogMessageProviderBase)MessageProviderFactory.getProvider("String_Node_Str");
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
      String description="String_Node_Str";
      if (provider != null) {
        description=provider.getAllHashMessageIDs().get(messageName).getDescription();
      }
      long time=Calendar.getInstance().getTimeInMillis();
      Map<String,String> contexts=null;
      if (StringUtils.isNotEmpty(contextId)) {
        contexts=new HashMap<>();
        contexts.put(AuditConstants.Context.SESSION.toString(),contextId);
      }
      AMIdentity identity=cw.getIdentity(userDN,realmName);
      String authentication=null;
      if (identity != null) {
        authentication=identity.getUniversalId();
      }
      List<Entry> entries;
      Map<String,String> info=new HashMap<>();
      if (StringUtils.isNotEmpty(client)) {
        info=Collections.singletonMap("String_Node_Str",client);
      }
      Entry entry=new Entry();
      entry.setModuleId(authMethName);
      entry.setResult(description);
      entry.setInfo(info);
      entries=Collections.singletonList(entry);
      auditor.audit(messageName,AM_LOGOUT.toString(),AuditRequestContext.getTransactionIdValue(),authentication,realmName,time,contexts,entries);
    }
    this.logIt(data,LOG_ACCESS,messageId.toString(),props);
  }
 catch (  SSOException ssoExp) {
    debug.error("String_Node_Str",ssoExp);
  }
catch (  Exception e) {
    debug.error("String_Node_Str",e);
  }
}