<commit_before>/*
 * CODENVY CONFIDENTIAL
 * __________________
 *
 *  [2012] - [2014] Codenvy, S.A.
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Codenvy S.A. and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Codenvy S.A.
 * and its suppliers and may be covered by U.S. and Foreign Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Codenvy S.A..
 */
package com.codenvy.im.cli.command;

import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.apache.karaf.shell.commands.Option;

/**
 * @author <NAME>
 */
@Command(scope = "codenvy", name = "im-download", description = "Download artifacts")
public class DownloadCommand extends AbstractIMCommand {

    @Argument(index = 0, name = "artifact", description = "The name of the artifact to download", required = false, multiValued = false)
    private String artifactName;

    @Argument(index = 1, name = "version", description = "The specific version of the artifact to download", required = false, multiValued = false)
    private String version;

    @Option(name = "--list-local", aliases = "--l", description = "To show the downloaded list of artifacts", required = false)
    private boolean listLocal;

    @Option(name = "--check-remote", aliases = "--c", description = "To check on remote versions to see if new version is available",
            required = false)
    private boolean checkRemote;

    @Override
    protected Void doExecute() {
        try {
            init();

            if (listLocal) {
                if (artifactName != null && version != null) {
                    printResponse(installationManagerProxy.getDownloads(artifactName, version));
                } else if (artifactName != null) {
                    printResponse(installationManagerProxy.getDownloads(artifactName));
                } else {
                    printResponse(installationManagerProxy.getDownloads());
                }

            } else if (checkRemote) {
                printResponse(installationManagerProxy.getUpdates(getCredentialsRep()));

            } else {

                printInfo("Downloading might takes several minutes depending on your internet connection. Please wait. \n");
                if (artifactName != null && version != null) {
                    printResponse(installationManagerProxy.download(artifactName, version, getCredentialsRep()));
                } else if (artifactName != null) {
                    printResponse(installationManagerProxy.download(artifactName, getCredentialsRep()));
                } else {
                    printResponse(installationManagerProxy.download(getCredentialsRep()));
                }
            }
        } catch (Exception e) {
            printError(e);
        }

        return null;
    }
}<commit_msg>Fixed options' aliases<commit_after>/*
 * CODENVY CONFIDENTIAL
 * __________________
 *
 *  [2012] - [2014] Codenvy, S.A.
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Codenvy S.A. and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Codenvy S.A.
 * and its suppliers and may be covered by U.S. and Foreign Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Codenvy S.A..
 */
package com.codenvy.im.cli.command;

import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.apache.karaf.shell.commands.Option;

/**
 * @author <NAME>
 */
@Command(scope = "codenvy", name = "im-download", description = "Download artifacts")
public class DownloadCommand extends AbstractIMCommand {

    @Argument(index = 0, name = "artifact", description = "The name of the artifact to download", required = false, multiValued = false)
    private String artifactName;

    @Argument(index = 1, name = "version", description = "The specific version of the artifact to download", required = false, multiValued = false)
    private String version;

    @Option(name = "--list-local", aliases = "-l", description = "To show the downloaded list of artifacts", required = false)
    private boolean listLocal;

    @Option(name = "--check-remote", aliases = "-c", description = "To check on remote versions to see if new version is available",
            required = false)
    private boolean checkRemote;

    @Override
    protected Void doExecute() {
        try {
            init();

            if (listLocal) {
                if (artifactName != null && version != null) {
                    printResponse(installationManagerProxy.getDownloads(artifactName, version));
                } else if (artifactName != null) {
                    printResponse(installationManagerProxy.getDownloads(artifactName));
                } else {
                    printResponse(installationManagerProxy.getDownloads());
                }

            } else if (checkRemote) {
                printResponse(installationManagerProxy.getUpdates(getCredentialsRep()));

            } else {

                printInfo("Downloading might takes several minutes depending on your internet connection. Please wait. \n");
                if (artifactName != null && version != null) {
                    printResponse(installationManagerProxy.download(artifactName, version, getCredentialsRep()));
                } else if (artifactName != null) {
                    printResponse(installationManagerProxy.download(artifactName, getCredentialsRep()));
                } else {
                    printResponse(installationManagerProxy.download(getCredentialsRep()));
                }
            }
        } catch (Exception e) {
            printError(e);
        }

        return null;
    }
}

{'fraction_non_alphanumeric': 0.09624035989717224, 'fraction_numerical': 0.003213367609254499, 'mean_word_length': 2.6360981308411215, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3877838', 'n_tokens_mistral': 1614, 'n_tokens_neox': 1498, 'n_words': 496}