private void processPossibleReference() {
      if (nextPotentialReferencePosition != -1) {
         boolean isNumberedReference = originalMessage.charAt(currentPosition + 1) == '#';
         boolean wasProcessable = isNumberedReference ? processNumberedReference() : processNamedReference();
         if (wasProcessable) {
            currentPosition = nextSemicolonPosition + 1;
         }
         else {
            char currentChar = originalMessage.charAt(currentPosition);
            decodedMessage.append(currentChar);
            currentPosition++;
         }
      }
   }