code: private Set<Integer> scanForTransactionsToRecover() throws IOException {
      // SCAN ALL THE FILE SEARCHING FOR THE TRANSACTIONS TO RECOVER
      final Set<Integer> txToRecover = new HashSet<Integer>();
  
      final Set<Integer> txToNotRecover = new HashSet<Integer>();
  
      // BROWSE ALL THE ENTRIES
      for (long offset = 0; eof(offset); offset = nextEntry(offset)) {
        // READ STATUS
        final byte status = file.readByte(offset);
  
        // READ TX-ID
        final int txId = file.readInt(offset + OFFSET_TX_ID);
  
        switch (status) {
        case STATUS_FREE:
          // NOT RECOVER IT SINCE IF FIND AT LEAST ONE "FREE" STATUS MEANS THAT ALL THE LOGS WAS COMMITTED BUT THE USER DIDN'T
          // RECEIVED THE ACK
          txToNotRecover.add(txId);
          break;
  
        case STATUS_COMMITTING:
          // TO RECOVER UNLESS THE REQ/TX IS IN THE MAP txToNotRecover
          txToRecover.add(txId);
          break;
        }
      }
  
      if (txToNotRecover.size() > 0)
        // FILTER THE TX MAP TO RECOVER BY REMOVING THE TX WITH AT LEAST ONE "FREE" STATUS
        txToRecover.removeAll(txToNotRecover);
  
      return txToRecover;
    }
docs: Scans the segment and returns the set of transactions ids to recover.