question: public Pair < Pair < String , String [ ] > , List < String > > rewrite ( List < String > results ) { String commandId = null ; String [ ] args = null ; List < String > rewrittenResults = new ArrayList < > ( ) ; for ( String result : results ) { Triple triple = rewrite ( result ) ; rewrittenResults . add ( triple . mStr ) ; commandId = triple . mId ; args = triple . mArgs ; } return new Pair < > ( new Pair < > ( commandId , args ) , rewrittenResults ) ; }
target:  Rewrites and returns the given results. TODO: improve this