question: public static Optional < ChangeTriplet > parse ( String triplet ) { int t2 = triplet . lastIndexOf ( '~' ) ; int t1 = triplet . lastIndexOf ( '~' , t2 - 1 ) ; if ( t1 < 0 || t2 < 0 ) { return Optional . empty ( ) ; } String project = Url . decode ( triplet . substring ( 0 , t1 ) ) ; String branch = Url . decode ( triplet . substring ( t1 + 1 , t2 ) ) ; String changeId = Url . decode ( triplet . substring ( t2 + 1 ) ) ; ChangeTriplet result = new AutoValue_ChangeTriplet ( new Branch . NameKey ( new Project . NameKey ( project ) , branch ) , new Change . Key ( changeId ) ) ; return Optional . of ( result ) ; }
target:  Parse a triplet out of a string.