Source:
public void parseArguments ( java.util.List < java.lang.String > args ) throws java.lang.Exception { final java.util.Map < java.lang.String , java.lang.String > substitutions = new java.util.HashMap < > ( ) ; substitutions.put ( "@PROGRAM_NAME@" , ( ( java.lang.String ) ( context.get ( org.ovirt.engine.exttool.logger.PROGRAM_NAME ) ) ) ) ; args.remove ( 0 ) ; java.util.Properties props = new java.util.Properties ( ) ; try ( java.io.InputStream in = org.ovirt.engine.exttool.logger.LoggerServiceImpl.class . getResourceAsStream ( "arguments.properties" ) ; java.io.Reader reader = new java.io.InputStreamReader ( in ) ) { props.load ( reader ) ; } org.ovirt.engine.core.uutils.cli.parser.ArgumentsParser parser = new org.ovirt.engine.core.uutils.cli.parser.ArgumentsParser ( props , "module" ) ; parser.getSubstitutions ( ) . putAll ( substitutions ) ; parser.parse ( args ) ; java.util.Map < java.lang.String , java.lang.Object > moduleArgs = parser.getParsedArgs ( ) ; if ( ( ( java.lang.Boolean ) ( moduleArgs.get ( "help" ) ) ) ) { java.lang.System.out.format ( "Usage: %s" , parser.getUsage ( ) ) ; throw new org.ovirt.engine.exttool.core.ExitException ( "Help" , 0 ) ; } if ( ! ( parser.getErrors ( ) . isEmpty ( ) ) ) { for ( java.lang.Throwable t : parser.getErrors ( ) ) { java.lang.System.err.format ( "FATAL: %s%n" , t.getMessage ( ) ) ; } throw new org.ovirt.engine.exttool.core.ExitException ( "Parsing error" , 1 ) ; } if ( ( args.size ( ) ) < 1 ) { java.lang.System.err.println ( "Action not provided" ) ; throw new org.ovirt.engine.exttool.core.ExitException ( "Action not provided" , 1 ) ; } try { action = org.ovirt.engine.exttool.logger.LoggerServiceImpl.Action.valueOf ( args.get ( 0 ) . toUpperCase ( ) . replace ( "-" , "_" ) ) ; } catch ( java.lang.IllegalArgumentException e ) { java.lang.System.err.printf ( "Invalid action '%s'%n" , args.get ( 0 ) ) ; throw new org.ovirt.engine.exttool.core.ExitException ( "Invalid action" , 1 ) ; } argMap = action.parse ( substitutions , props , args ) ; }

Target:
public void parseArguments ( java.util.List < java.lang.String > args ) throws java.lang.Exception { final java.util.Map < java.lang.String , java.lang.String > substitutions = new java.util.HashMap < > ( ) ; substitutions.put ( "@PROGRAM_NAME@" , ( ( java.lang.String ) ( context.get ( ContextKeys.PROGRAM_NAME ) ) ) ) ; args.remove ( 0 ) ; java.util.Properties props = new java.util.Properties ( ) ; try ( java.io.InputStream in = org.ovirt.engine.exttool.logger.LoggerServiceImpl.class . getResourceAsStream ( "arguments.properties" ) ; java.io.Reader reader = new java.io.InputStreamReader ( in , java.nio.charset.Charset.forName ( "UTF-8" ) ) ) { props.load ( reader ) ; } org.ovirt.engine.core.uutils.cli.parser.ArgumentsParser parser = new org.ovirt.engine.core.uutils.cli.parser.ArgumentsParser ( props , "module" ) ; parser.getSubstitutions ( ) . putAll ( substitutions ) ; parser.parse ( args ) ; java.util.Map < java.lang.String , java.lang.Object > moduleArgs = parser.getParsedArgs ( ) ; if ( ( ( java.lang.Boolean ) ( moduleArgs.get ( "help" ) ) ) ) { java.lang.System.out.format ( "Usage: %s" , parser.getUsage ( ) ) ; throw new org.ovirt.engine.exttool.core.ExitException ( "Help" , 0 ) ; } if ( ! ( parser.getErrors ( ) . isEmpty ( ) ) ) { for ( java.lang.Throwable t : parser.getErrors ( ) ) { java.lang.System.err.format ( "FATAL: %s%n" , t.getMessage ( ) ) ; } throw new org.ovirt.engine.exttool.core.ExitException ( "Parsing error" , 1 ) ; } if ( ( args.size ( ) ) < 1 ) { java.lang.System.err.println ( "Action not provided" ) ; throw new org.ovirt.engine.exttool.core.ExitException ( "Action not provided" , 1 ) ; } try { action = org.ovirt.engine.exttool.logger.LoggerServiceImpl.Action.valueOf ( args.get ( 0 ) . toUpperCase ( ) . replace ( "-" , "_" ) ) ; } catch ( java.lang.IllegalArgumentException e ) { java.lang.System.err.printf ( "Invalid action '%s'%n" , args.get ( 0 ) ) ; throw new org.ovirt.engine.exttool.core.ExitException ( "Invalid action" , 1 ) ; } argMap = action.parse ( substitutions , props , args ) ; }