Get the list of loaded generator rules

@return The list of DOME command string with format
(command,variable,arguments)
485333
public ArrayList<String> getGenerators() {
        ArrayList<String> genList = new ArrayList<String>();
        for (ArrayList<HashMap<String, String>> genGroup : genGroups) {
            if (!genGroup.isEmpty()) {
                HashMap<String, String> genRule = genGroup.get(genGroup.size() - 1);
                if (!genRule.isEmpty()) {
                    genList.add(genRule.get("cmd") + "," + genRule.get("variable") + "," + genRule.get("args"));
                }
            }
        }

        return genList;
    }
343369
function getList() {
  if(!COMMAND_LIST) {
    COMMAND_LIST = [];
    for(var z in this.execs) {
      COMMAND_LIST.push(this.execs[z].definition.getDefinition());
    }
  }
  return COMMAND_LIST;
}
966026
def get_rules():
    
    paths = [rule_path for path in get_rules_import_paths()
             for rule_path in sorted(path.glob('*.py'))]
    return sorted(get_loaded_rules(paths),
                  key=lambda rule: rule.priority)
851698
def get_commands(self):
		
		shutit_global.shutit_global_object.yield_to_draw()
		s = ''
		for c in self.build['shutit_command_history']:
			if isinstance(c, str):
				#Ignore commands with leading spaces
				if c and c[0] != ' ':
					s += c + '\n'
		return s
1105871
@Override
	protected List<String> getVariablesToIgnore() {

		List<String> variablesToIgnore = new ArrayList<> ();
		variablesToIgnore.add( "^" + Pattern.quote( MILLI_TIME ) + "$" );
		variablesToIgnore.add( "^" + Pattern.quote( NANO_TIME ) + "$" );
		variablesToIgnore.add( "^" + Pattern.quote( SMART_INDEX ) + "$" );
		variablesToIgnore.add( "^" + Pattern.quote( RANDOM_UUID ) + "$" );

		for( String var : this.context.variables.keySet())
			variablesToIgnore.add( "^\\$\\(" + Pattern.quote( var ) + "\\)$" );

		variablesToIgnore.add( "^" + Pattern.quote( FORMATTED_TIME_PREFIX ) + "[^)]*\\)$" );
		variablesToIgnore.add( "^" + Pattern.quote( EXISTING_INDEX_PREFIX ) + "[^)]*\\)$" );
		return variablesToIgnore;
	}


	/**
	 * Extracts the date pattern for a "formatted time" variable.
	 * @param group a formatted time
	 * @return a non-null string
	 */
	static String extractDatePattern( String group ) {
		return group.substring( FORMATTED_TIME_PREFIX.length(), group.length() - 2 ).trim();
	}


	/**
	 * Replaces variables in instance names.
	 * @param value an expression that can reference other variables (not null)
	 * @param context a context (not null)
	 * @param parentInstancePath the parent instance path (may be null)
	 * @param context a non-null map with context information
	 * @return the updated value, or null if an <code>$(existing_index ...)</code> variable failed to be resolved
	 */
	static String replaceVariables( String value, Context context, String parentInstancePath ) {

		long nanoTime = System.nanoTime();
		long milliTime = TimeUnit.MILLISECONDS.convert( nanoTime, TimeUnit.NANOSECONDS );

		// Simple replacements
		value = value.replace( NANO_TIME, String.valueOf( nanoTime ));
		value = value.replace( MILLI_TIME, String.valueOf( milliTime ));
		value = value.replace( RANDOM_UUID, UUID.randomUUID().toString());

		// A little more complex
		if( value.startsWith( FORMATTED_TIME_PREFIX )
				&& value.endsWith( ")" )) {

			String datePattern = extractDatePattern( value );
			SimpleDateFormat sdf = new SimpleDateFormat( datePattern );

			// We replace the whole value as such variables were validated and span over a entire line
			value = sdf.format( new Date( milliTime ));
		}

		// Even more complex
		int smartCpt = 0;
		if( value.contains( SMART_INDEX )) {
			for( int cpt = 1; smartCpt == 0; cpt++ ) {
				String testName = value.replace( SMART_INDEX, String.valueOf( cpt ));
				String testPath = "/" + testName;
				if( parentInstancePath != null )
					testPath = parentInstancePath + testPath;

				if( ! context.instanceExists( testPath )) {
					smartCpt = cpt;
				}
			}
		}

		value = value.replace( SMART_INDEX, String.valueOf( smartCpt ));

		// To perform in last: deal with existing indexes
		boolean disabled = false;
		Pattern fullPattern = Pattern.compile( EXISTING_INDEX_PATTERN );
		Matcher m = fullPattern.matcher( value );
		if( value.contains( EXISTING_INDEX_PREFIX )
				&& m.matches()) {

			String minOrMax = m.group( 2 );
			String prefix = m.group( 1 );
			String suffix = m.group( 6 );
			String bound = m.group( 5 );
			String instanceNamePattern = "/" + prefix + "(\\d+)" + suffix;
			if( parentInstancePath != null )
				instanceNamePattern = parentInstancePath + instanceNamePattern;

			// Find the index
			int cpt = findIndex( instanceNamePattern, context, bound, "MIN".equals( minOrMax ));

			// If cpt is negative, do not replace anything, nothing matches the requirements.
			// We just return null for the variable's value.
			if( cpt < 0 )
				disabled = true;
			else
				value = m.replaceAll( "$1" + String.valueOf( cpt ) + "$6" );
		}

		// Disabled variable => return null
		if( disabled )
			value = null;

		// Inject other variables, if necessary.
		// Disabled variables are contagious, this is managed during the parsing.
		else
			value = CommandsParser.injectContextVariables( value, context.variables );

		return value;
	}


	/**
	 * @param instanceNamePattern
	 * @param context
	 * @param bound
	 * @param findMinimum true to get the minimum value, false for the maximum
	 * @return -1 if no matching instance was found, a positive integer otherwise
	 */
	private static int findIndex( String instanceNamePattern, Context context, String bound, boolean findMinimum ) {

		// Find all the matching indexes?
		Pattern pattern = Pattern.compile( instanceNamePattern );
		SortedSet<Integer> foundIndexes = new TreeSet<> ();
		for( String instancePath : context.instancePathToComponentName.keySet()) {
			Matcher m = pattern.matcher( instancePath );
			if( ! m .find())
				continue;

			int index = Integer.parseInt( m.group( 1 ));
			foundIndexes.add( index );
		}

		// Exclude indexes that are out of bound
		if( bound != null ) {
			bound = bound.trim();
			int min = 0, max = Integer.MAX_VALUE;
			int value = Integer.parseInt( bound.substring( 1 ).trim());
			if( '<' == bound.charAt( 0 ))
				max = value;
			else
				min = value;

			Set<Integer> toRemove = new HashSet<> ();
			for( Integer index : foundIndexes ) {
				if( index <= min || index >= max )
					toRemove.add( index );
			}

			foundIndexes.removeAll( toRemove );
		}

		// Eventually, decide whether we want the tail or the head
		int result;
		if( foundIndexes.isEmpty())
			result = -1;
		else if( findMinimum )
			result = foundIndexes.first();
		else
			result = foundIndexes.last();

		return result;
	}
1157228
def server_rules(self):
        
        sftp = self.client.open_sftp()
        try:
            rule_path = self.rule_location
            try:
                stat_entry = sftp.stat(rule_path)
                if stat.S_ISDIR(stat_entry.st_mode):
                    sftp.rmdir(rule_path)
                    return []
            except IOError:
                return []
            with sftp.open(rule_path, 'r') as file_handle:
                data = file_handle.read()
            return self._parse(data)
        finally:
            sftp.close()
497336
public ArrayList<HashMap<String, Object>> applyStg(ArrayList<HashMap<String, Object>> dataArr) {

        ArrayList<HashMap<String, Object>> results = new ArrayList();

        // Check if there is generator command group left
        if (hasMoreGenRules()) {
            if (genRules != null && !genRules.isEmpty()) {
                // Apply non-generator rules to each entry of data
                for (HashMap<String, Object> data : dataArr) {
                    ArrayList<HashMap<String, Object>> arr = new ArrayList();
                    for (int i = 0; i < genRules.size() - 1; i++) {
                        HashMap<String, String> rule = genRules.get(i);
                        applyRule(data, rule);
                    }
                }
                // Apply generator rules to whole data set
                HashMap<String, String> gemRule = genRules.get(genRules.size() - 1);
                if (!gemRule.isEmpty()) {
                    generators.add(gemRule);
                    results = runGenerators(dataArr, cur != genGroups.size());
                    generators.clear();
                } else {
                    results = dataArr;
                }
            }

            // Try yo apply next group of genertators
            results = applyStg(results);
        } else {
            // Finish recursion
            results = dataArr;
            // Remove reference
            boolean wthRefFlg = !keysToExtractFinal.contains("weather");
            boolean soilRefFlg = !keysToExtractFinal.contains("soil");
            for (HashMap result : results) {
                if (wthRefFlg) {
                    result.remove("weather");
                }
                if (soilRefFlg) {
                    result.remove("soil");
                }
            }
        }

        return results;
    }
107517
public List<String> getHelp() {

		List<String> out = new ArrayList<>();

		if (helpAppVersion != null) {
			out.add(helpAppVersion);
		}

		if (helpAppExample != null) {
			out.add(helpAppExample);
		}

		if (helpAppVersion != null || helpAppExample != null) {
	 		out.add(""); // new line
 		}

		// find longest option to format all other options by this one
		int max = 0;
		for (CommandOption option: options) {
			String command = option.toCommandString();
			max = Math.max(max, command.length());
		}

		for (CommandOption option: options) {
			String info = option.toCommandString();
			int spaces = max - info.length() + 1;

			String delimiter = new String(new char[spaces]).replace("\0", " "); // returns 'spaces' long empty string

			info = info + delimiter + option.getDescription();
			out.add(info);
		}

		return out;

	}
1249919
public String[] getGeneratorFunctions()
    {
    String[] functions = new String[ generators_.size()];
    generators_.keySet().toArray( functions);
    return functions;
    }
1285962
public Collection<String> getCommands() {
        List<String> commands = new ArrayList<String>();
        for (String cmdOwner : m_cmdsByOwnerMap.keySet()) {
            SortedMap<String, RESTCommand> ownerCmdMap = m_cmdsByOwnerMap.get(cmdOwner);
            for (String name : ownerCmdMap.keySet()) {
                RESTCommand cmd = ownerCmdMap.get(name);
                commands.add(String.format("%s: %s = %s", cmdOwner, name, cmd.toString()));
            }
        }
        return commands;
    }
508130
def _get_command(self):
        """"""
        targets = ' '.join(self.targets)
        cmd_str = self._linter.command_with_options + ' ' + targets
        cmd_shlex = shlex.split(cmd_str)
        return list(cmd_shlex)
1051536
public static String getJvmInputArguments() {
    RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
    List<String> arguments = runtimeMxBean.getInputArguments();
    return String.format("JVM Input Arguments: %s", JOINER.join(arguments));
  }
876631
public List<Rule> getRules(RuleProvider provider)
    {
        List<Rule> rules = providersToRules.get(provider);
        if (rules == null)
        {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(rules);
    }
692949
public List<String> getSemanticHeads() {
    int headSemanticVariable = syntax.getHeadVariable();
    int[] allSemanticVariables = getSemanticVariables();
    for (int i = 0; i < allSemanticVariables.length; i++) {
      if (allSemanticVariables[i] == headSemanticVariable) {
        return Lists.newArrayList(variableAssignments.get(i));
      }
    }
    return Collections.emptyList();
  }
61267
public java.util.List<? extends com.google.appengine.v1.UrlDispatchRuleOrBuilder> 
      getDispatchRulesOrBuilderList() {
    return dispatchRules_;
  }
910196
public static List<AbstractRule> getConflictingLexerRules(final Keyword keyword, final Grammar grammar) {
		AbstractRule rule = GrammarUtil.findRuleForName(grammar, "ID");
		if (rule != null) {
			// TODO SZ: use interpreter
			final StringWithOffset input = new StringWithOffset(keyword.getValue());
			if (new TerminalsIDConsumer(new MyTerminalConsumerConfiguration(input)).consume() == ConsumeResult.SUCCESS) {
				return Collections.singletonList(rule);
			}
		}
		return Collections.emptyList();
	}
791894
public List<Rule> getRelevantWord2VecModelRules(ResourceBundle messages, Word2VecModel word2vecModel) throws IOException {
    return Collections.emptyList();
  }