<commit_before>package commands;

import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;


public class CommandsFactory {

    private static ResourceBundle ourCommandClasses;
    private static final String DEFAULT_RESOURCE_PACKAGE = "resources/";
    private static final String DOT = ".";
    private List<Command> myCommandList;

    public CommandsFactory () {
        myCommandList = new ArrayList<Command>();
        ourCommandClasses = ResourceBundle.getBundle(DEFAULT_RESOURCE_PACKAGE + "ClassConversion");
    }

   public CommandsQueue commandsQueue() { 
       return new CommandsQueue();
   }
    
   public ICommand commandRepeat(int times, ICommand command) { 
       return new commandRepeat(times, command);
   }
    
    /**
     * parses command with getCommand method to get type of command
     * 
     * @param command
     * @return parsed command
     */
    public Command getCommand (Command command) {
        return command;
    }

    /**
     * adds a command to the queue for processing
     * 
     * @param command
     */
    public void addCommand (String command) {
        // command should be in form 'Forward 50'
        String[] commandParams = command.split(" ");
        String commandBundleName = ourCommandClasses.getString("command_package");
        String commandClassName = ourCommandClasses.getString(commandParams[0]);
        Command commandInstance =
                instantiateClassFromString(commandBundleName + DOT + commandClassName,<commit_msg>Maintain consistent form in commands package<commit_after>package commands;

import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;


public class CommandsFactory {

    private static ResourceBundle ourCommandClasses;
    private static final String DEFAULT_RESOURCE_PACKAGE = "resources/";
    private static final String DOT = ".";
    private List<Command> myCommandList;

    public CommandsFactory () {
        myCommandList = new ArrayList<Command>();
        ourCommandClasses = ResourceBundle.getBundle(DEFAULT_RESOURCE_PACKAGE + "ClassConversion");
    }

   public CommandsQueue commandsQueue() { 
       return new CommandsQueue();
   }
    
   public ICommand commandsRepeat(int times, ICommand command) { 
       return new commandsRepeat(times, command);
   }
    
    /**
     * parses command with getCommand method to get type of command
     * 
     * @param command
     * @return parsed command
     */
    public Command getCommand (Command command) {
        return command;
    }

    /**
     * adds a command to the queue for processing
     * 
     * @param command
     */
    public void addCommand (String command) {
        // command should be in form 'Forward 50'
        String[] commandParams = command.split(" ");
        String commandBundleName = ourCommandClasses.getString("command_package");
        String commandClassName = ourCommandClasses.getString(commandParams[0]);
        Command commandInstance =
                instantiateClassFromString(commandBundleName + DOT + commandClassName,
{'fraction_non_alphanumeric': 0.07882389740381608, 'fraction_numerical': 0.001876759461995621, 'mean_word_length': 3.1211340206185567, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6119631', 'n_tokens_mistral': 808, 'n_tokens_neox': 775, 'n_words': 230}