Sure, I can figure out that the magic number "14" relates to the length of "/fcr:versions", but show some love! 
Maybe...
final String prefix = "/fcr:versions";
... subjectUri.indexOf(prefix + prefix.length());