question: public static int removeArgsAndReturnInsertionIndex ( List < String > args , int argIndex , boolean tryRemovingArgValue ) { if ( argIndex < 0 || argIndex >= args . size ( ) ) { return 0 ; } if ( tryRemovingArgValue ) { String argValue = getArgValue ( args , argIndex + 1 ) ; if ( argValue != null ) { args . remove ( argIndex + 1 ) ; } } args . remove ( argIndex ) ; return argIndex ; }
target:  Removes the argument at the given index.