docs: public int reconstruct(RecoverableUnit log) throws SystemException
      {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "reconstruct", new Object[] { this, log });
  
          int result = STATE_NONE;
          int logState = 0;
  
          // Lookup the TransactionState RecoverableUnitSection
          _logSection = log.lookupSection(TransactionImpl.TRAN_STATE_SECTION);
  
          if (_logSection != null)
          {
              try
              {
                  final byte[] logData = _logSection.lastData();
                  if (logData.length == 1)
                  {
                      logState = logData[0] & 0xff;
                      // Set the state value to be returned from the reconstruct method
                      switch (logState)
                      {
                          case STATE_PREPARED:
                          case STATE_COMMITTING:
                          case STATE_COMMITTED:
                          case STATE_ROLLING_BACK:
                          case STATE_ROLLED_BACK:
                          case STATE_HEURISTIC_ON_COMMIT:
                          case STATE_HEURISTIC_ON_ROLLBACK:
                          case STATE_LAST_PARTICIPANT:
                              result = logState;
                              break;
                          case STATE_NONE:
                          case STATE_ACTIVE:
                          case STATE_PREPARING:
                          default:
                              throw new SystemException("Transaction recovered in invalid state");
                      }
                  }
                  else
                  {
                      // If the log record data is invalid, then exit immediately.
                      throw new SystemException("Invalid transaction state record data in log");
                  }
              } catch (Throwable e)
              {
                  FFDCFilter.processException(e, "com.ibm.tx.jta.impl.TransactionState.reconstruct", "274", this);
                  Tr.fatal(tc, "WTRN0000_ERR_INT_ERROR", new Object[] { "reconstruct", "com.ibm.tx.jta.impl.TransactionState", e });
                  if (tc.isEventEnabled())
                      Tr.event(tc, "Unable to access transaction state log record data");
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "reconstruct");
                  throw new SystemException(e.toString());
              }
          }
          else
          {
              // PK84994 starts here
              // If the state record is not found, then exit immediately with state set to STATE_NONE.
              // Log an FFDC to show this has happened
              FFDCFilter.processException(new InternalLogException(), "com.ibm.tx.jta.impl.TransactionState.setState", "277", this);
              if (tc.isEventEnabled())
                  Tr.event(tc, "No log record data for transaction state - returning NONE");
              _state = STATE_NONE;
              if (tc.isEntryEnabled())
                  Tr.exit(tc, "reconstruct", stateToString(_state));
              return _state;
              // PK84994 ends here        
          }
  
          _state = result;
          _tranLog = log;
  
          // Create a global identifier.
          final RecoverableUnitSection gtidSection = log.lookupSection(TransactionImpl.GLOBALID_SECTION);
          if (gtidSection != null)
          {
              try
              {
                  final byte[] logData = gtidSection.lastData();
  
                  if (logData.length > 12) // We must have formatId and lengths encoded
                  {
                      final XidImpl xid = new XidImpl(logData, 0);
                      _tran.setXidImpl(xid);
                  }
                  else
                  {
                      // If the log record data is invalid, then exit immediately.
                      throw new SystemException("Invalid transaction global identifier record data in log");
                  }
              } catch (Throwable e)
              {
                  FFDCFilter.processException(e, "com.ibm.tx.jta.impl.TransactionState.reconstruct", "334", this);
                  Tr.fatal(tc, "WTRN0000_ERR_INT_ERROR", new Object[] { "reconstruct", "com.ibm.tx.jta.impl.TransactionState", e });
                  if (tc.isEventEnabled())
                      Tr.event(tc, "Unable to access global transaction id log record data");
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "reconstruct");
                  throw new SystemException(e.toString());
              }
          }
          else
          {
              // PK84994 starts here
              // If the global transaction id record is not found, then exit immediately with state set to STATE_NONE.
              // Log an FFDC to show this has happened
              FFDCFilter.processException(new InternalLogException(), "com.ibm.tx.jta.impl.TransactionState.setState", "336", this);
              if (tc.isEventEnabled())
                  Tr.event(tc, "No log record data for global transaction id - returning NONE");
              _state = STATE_NONE;
              if (tc.isEntryEnabled())
                  Tr.exit(tc, "reconstruct", stateToString(_state));
              return _state;
              // PK84994 ends here        
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "reconstruct", stateToString(result));
          return result;
      }