Program: 28942
Project: 28942
Buggy source:
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void doValveSave(Session session) throws IOException {
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + ((HASession)session).getIdInternal());
    _logger.fine("String_Node_Str" + session.getIsValid());
  }
  if (!session.getIsValid()) {
    return;
  }
  String userName="String_Node_Str";
  if (session.getPrincipal() != null) {
    userName=session.getPrincipal().getName();
    ((BaseHASession)session).setUserName(userName);
  }
  byte[] sessionState=this.getByteArray(session,isReplicationCompressionEnabled());
  if (_logger.isLoggable(Level.FINEST)) {
    _logger.finest("String_Node_Str");
    StringBuilder sb=new StringBuilder("String_Node_Str");
    for (    byte b : sessionState) {
      sb.append(b + "String_Node_Str");
    }
    sb.append("String_Node_Str");
    _logger.finest(sb.toString());
  }
  BackingStore<String,SimpleMetadata> replicator=getSimpleMetadataBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + replicator);
    _logger.fine("String_Node_Str" + session.getVersion());
  }
  SimpleMetadata simpleMetadata=SimpleMetadataFactory.createSimpleMetadata(session.getVersion(),session.getLastAccessedTime(),session.getMaxInactiveInterval() * 1000L,sessionState);
  if (_logger.isLoggable(Level.FINEST)) {
    _logger.finest("String_Node_Str" + simpleMetadata);
  }
  try {
    HASession haSess=(HASession)session;
    replicator.save(session.getIdInternal(),simpleMetadata,haSess.isPersistent());
    if (_logger.isLoggable(Level.FINE)) {
      _logger.fine("String_Node_Str");
    }
  }
 catch (  BackingStoreException ex) {
    IOException ex1=(IOException)new IOException("String_Node_Str" + ex.getMessage()).initCause(ex);
    throw ex1;
  }
}

Fixed version (ground truth):
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void doValveSave(Session session) throws IOException {
  if (_logger.isLoggable(Level.FINE)) {
    if (session instanceof HASession) {
      _logger.fine("String_Node_Str" + ((HASession)session).getIdInternal());
    }
    _logger.fine("String_Node_Str" + session.getIsValid());
  }
  if (!session.getIsValid()) {
    return;
  }
  if (!(session instanceof BaseHASession)) {
    return;
  }
  String userName="String_Node_Str";
  if (session.getPrincipal() != null) {
    userName=session.getPrincipal().getName();
    ((BaseHASession)session).setUserName(userName);
  }
  byte[] sessionState=this.getByteArray(session,isReplicationCompressionEnabled());
  if (_logger.isLoggable(Level.FINEST)) {
    _logger.finest("String_Node_Str");
    StringBuilder sb=new StringBuilder("String_Node_Str");
    for (    byte b : sessionState) {
      sb.append(b + "String_Node_Str");
    }
    sb.append("String_Node_Str");
    _logger.finest(sb.toString());
  }
  BackingStore<String,SimpleMetadata> replicator=getSimpleMetadataBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + replicator);
    _logger.fine("String_Node_Str" + session.getVersion());
  }
  SimpleMetadata simpleMetadata=SimpleMetadataFactory.createSimpleMetadata(session.getVersion(),session.getLastAccessedTime(),session.getMaxInactiveInterval() * 1000L,sessionState);
  if (_logger.isLoggable(Level.FINEST)) {
    _logger.finest("String_Node_Str" + simpleMetadata);
  }
  try {
    HASession haSess=(HASession)session;
    replicator.save(session.getIdInternal(),simpleMetadata,haSess.isPersistent());
    if (_logger.isLoggable(Level.FINE)) {
      _logger.fine("String_Node_Str");
    }
  }
 catch (  BackingStoreException ex) {
    IOException ex1=(IOException)new IOException("String_Node_Str" + ex.getMessage()).initCause(ex);
    throw ex1;
  }
}