<commit_before>package com.developerphil.adbidea.adb.command;

import com.android.ddmlib.IDevice;
import com.android.ddmlib.InstallException;
import com.intellij.openapi.project.Project;
import org.jetbrains.android.facet.AndroidFacet;

import static com.developerphil.adbidea.ui.NotificationHelper.error;
import static com.developerphil.adbidea.ui.NotificationHelper.info;

/**
* Created by pbreault on 1/2/14.
*/
public class UninstallCommand implements Command {
    @Override
    public void run(Project project, IDevice device, AndroidFacet facet, String packageName) {
        try {
            device.uninstallPackage(packageName);
            info(String.format("<b>%s</b> uninstalled on %s", packageName, device.getName()));
        } catch (InstallException e1) {
            error("Uninstall fail... " + e1.getMessage());
            e1.printStackTrace();
        }
    }
}<commit_msg>Error message when the app is already uninstalled<commit_after>package com.developerphil.adbidea.adb.command;

import com.android.ddmlib.IDevice;
import com.android.ddmlib.InstallException;
import com.intellij.openapi.project.Project;
import org.jetbrains.android.facet.AndroidFacet;

import static com.developerphil.adbidea.ui.NotificationHelper.error;
import static com.developerphil.adbidea.ui.NotificationHelper.info;

/**
* Created by pbreault on 1/2/14.
*/
public class UninstallCommand implements Command {
    @Override
    public void run(Project project, IDevice device, AndroidFacet facet, String packageName) {
        try {
            String errorCode = device.uninstallPackage(packageName);
            if (errorCode == null) {
                info(String.format("<b>%s</b> uninstalled on %s", packageName, device.getName()));
            }else{
                error(String.format("<b>%s</b> is not installed on %s", packageName, device.getName()));
            }
        } catch (InstallException e1) {
            error("Uninstall fail... " + e1.getMessage());
            e1.printStackTrace();
        }
    }
}
{'fraction_non_alphanumeric': 0.11599210266535044, 'fraction_numerical': 0.006910167818361303, 'mean_word_length': 3.3036093418259025, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3139243', 'n_tokens_mistral': 604, 'n_tokens_neox': 588, 'n_words': 125}