Java Code Examples for com.martiansoftware.jsap.FlaggedOption#setShortFlag()
The following examples show how to use
com.martiansoftware.jsap.FlaggedOption#setShortFlag() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BranchLauncher.java From repairnator with MIT License | 6 votes |
public static JSAP defineBasicArgs() throws JSAPException { JSAP jsap = new JSAP(); FlaggedOption opt2 = new FlaggedOption("launcherMode"); opt2.setShortFlag('l'); opt2.setLongFlag("launcherMode"); opt2.setStringParser(JSAP.STRING_PARSER); opt2.setDefault(LauncherMode.REPAIR.name()); opt2.setHelp("specify launcherMode." + "REPAIR: standard repairnator repair with Travis build ids. BEARS: analyze pairs of bugs and human-produced patches. " + "CHECKSTYLE: analyze build failing because of checkstyle. " + "GIT_REPOSITORY: repairnator repair with Git instead of standard Travis. " + "KUBERNETES_LISTENER: run repairnator as a Activemq server listening for Travis build ids. "); jsap.registerParameter(opt2); return jsap; }
Example 2
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgInput() { /* ./builds.txt contain one build id per line 346537408 347223109 348887356 349620528 351046304 353774072 358555930 361311603 368867994 369727490 369854684 369859631 370885458 371144762 371488143 374841318 376812142 (this is the list from Expedition 2) */ FlaggedOption opt = new FlaggedOption("input"); opt.setShortFlag('i'); opt.setLongFlag("input"); opt.setDefault("./builds.txt"); opt.setHelp("Specify the input file containing the list of build ids."); return opt; }
Example 3
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgProjectInput() { /* ./projects.txt contain one slug per line INRIA/spoon rails/rails .... */ FlaggedOption opt = new FlaggedOption("input"); opt.setShortFlag('i'); opt.setLongFlag("input"); opt.setDefault("./projects.txt"); opt.setHelp("Specify where to find the list of projects to scan."); return opt; }
Example 4
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgBranchInput() { /* ./branches.txt contain one branch per line typically from https://github.com/Spirals-Team/librepair-experiments/ */ FlaggedOption opt = new FlaggedOption("input"); opt.setShortFlag('i'); opt.setLongFlag("input"); opt.setDefault("./projects.txt"); opt.setHelp("Specify the input file containing the list of branches to reproduce (one branch per line)"); return opt; }
Example 5
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgOutput(LauncherType launcherType, String helpMessage) { FlaggedOption opt = new FlaggedOption("output"); opt.setShortFlag('o'); opt.setLongFlag("output"); // we don't assume the presence of "/tmp" (eg on windows) and the it is writable opt.setDefault("./repairnator-output"); if (launcherType == LauncherType.DOCKERPOOL || launcherType == LauncherType.CHECKBRANCHES) { opt.setRequired(true); } opt.setHelp(helpMessage); return opt; }
Example 6
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgNbThreads() { FlaggedOption opt = new FlaggedOption("threads"); opt.setShortFlag('t'); opt.setLongFlag("threads"); opt.setStringParser(JSAP.INTEGER_PARSER); opt.setDefault("1"); opt.setHelp("Specify the number of threads to run in parallel"); return opt; }
Example 7
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgGlobalTimeout() { FlaggedOption opt = new FlaggedOption("globalTimeout"); opt.setShortFlag('g'); opt.setLongFlag("globalTimeout"); opt.setStringParser(JSAP.INTEGER_PARSER); opt.setDefault("1"); opt.setHelp("Specify the number of day before killing the whole pool."); return opt; }
Example 8
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgDockerImageName() { FlaggedOption opt = new FlaggedOption("imageName"); opt.setShortFlag('n'); opt.setLongFlag("name"); opt.setStringParser(JSAP.STRING_PARSER); opt.setDefault("repairnator/pipeline:latest"); opt.setHelp("Specify the docker image name to use."); return opt; }
Example 9
Source File: CheckBranchLauncher.java From repairnator with MIT License | 4 votes |
private JSAP defineArgs() throws JSAPException { // Verbose output JSAP jsap = new JSAP(); // -h or --help jsap.registerParameter(LauncherUtils.defineArgHelp()); // -d or --debug jsap.registerParameter(LauncherUtils.defineArgDebug()); // --runId jsap.registerParameter(LauncherUtils.defineArgRunId()); // --bears jsap.registerParameter(LauncherUtils.defineArgBearsMode()); // -i or --input jsap.registerParameter(LauncherUtils.defineArgBranchInput()); // -o or --output jsap.registerParameter(LauncherUtils.defineArgOutput(LauncherType.CHECKBRANCHES, "Specify where to put output data")); // --notifyEndProcess jsap.registerParameter(LauncherUtils.defineArgNotifyEndProcess()); // --smtpServer jsap.registerParameter(LauncherUtils.defineArgSmtpServer()); //--smtpPort jsap.registerParameter(LauncherUtils.defineArgSmtpPort()); //--smtpTLS jsap.registerParameter(LauncherUtils.defineArgSmtpTLS()); // --smtpUsername jsap.registerParameter(LauncherUtils.defineArgSmtpUsername()); // --smtpPassword jsap.registerParameter(LauncherUtils.defineArgSmtpPassword()); // --notifyto jsap.registerParameter(LauncherUtils.defineArgNotifyto()); // -n or --name jsap.registerParameter(LauncherUtils.defineArgDockerImageName()); // --skipDelete jsap.registerParameter(LauncherUtils.defineArgSkipDelete()); // -t or --threads jsap.registerParameter(LauncherUtils.defineArgNbThreads()); // -g or --globalTimeout jsap.registerParameter(LauncherUtils.defineArgGlobalTimeout()); Switch sw1 = new Switch("humanPatch"); sw1.setShortFlag('p'); sw1.setLongFlag("humanPatch"); sw1.setDefault("false"); jsap.registerParameter(sw1); FlaggedOption opt2 = new FlaggedOption("repository"); opt2.setShortFlag('r'); opt2.setLongFlag("repository"); opt2.setStringParser(JSAP.STRING_PARSER); opt2.setRequired(true); opt2.setHelp("Specify where to collect branches"); jsap.registerParameter(opt2); return jsap; }