code: private int getMapping(final String mapping, final int revisionCounter)
      {
  
          String tempA, tempB;
  
          int length = 0;
          int revC = -1, mapC = -1;
          int index, max = mapping.length();
  
          while (length < max && revC < revisionCounter) {
  
              // Read revisionCounter
              index = mapping.indexOf(' ', length);
              tempA = mapping.substring(length, index);
              length = index + 1;
  
              // Read mappedCounter
              index = mapping.indexOf(' ', length);
              if (index == -1) {
                  index = mapping.length();
              }
              tempB = mapping.substring(length, index);
              length = index + 1;
  
              // Parse values
              revC = Integer.parseInt(tempA);
              mapC = Integer.parseInt(tempB);
  
              // System.out.println(revC + " -> " + mapC);
          }
  
          if (revC == revisionCounter) {
              // System.out.println(revC + " >> " + mapC);
              return mapC;
          }
  
          return revisionCounter;
      }
docs: This method returns the correct mapping of the given input.
  
  @param mapping
  mapping sequence
  @param revisionCounter
  index to map
  @return mapped index