patrickfav/uber-adb-tools

View on GitHub

Showing 20 of 87 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        } else if (osName.contains("mac")) {
            if (cmdProvider.canRunCmd(MAC_DEFAULT)) {
                return new LocationResult(Location.MAC_DEFAULT, MAC_DEFAULT);
            }
            if (userPath != null && cmdProvider.canRunCmd(new String[]{userPath + MAC_DEFAULT_HOME})) {
src/main/java/at/favre/tools/uberadb/AdbLocationFinderImpl.java on lines 74..84

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 118.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        } else if (osName.contains("nix")) {
            if (cmdProvider.canRunCmd(LINUX_DEFAULT)) {
                return new LocationResult(Location.LINUX_DEFAULT, LINUX_DEFAULT);
            }
            if (userPath != null && cmdProvider.canRunCmd(new String[]{userPath + LINUX_DEFAULT_2})) {
src/main/java/at/favre/tools/uberadb/AdbLocationFinderImpl.java on lines 64..74

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 118.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public AdbDevice(String serial, Status status, String model, String product, boolean isEmulator) {
        this.serial = serial;
        this.status = status;
        this.model = model;
        this.product = product;
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/parser/AdbDevice.java and 1 other location - About 50 mins to fix
src/main/java/at/favre/tools/uberadb/actions/BugReport.java on lines 249..255

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        BugReportDeviceFileAction(String log, String deviceTempFile, File localTempFile, String[] command, String zipSubFolder) {
            this.deviceTempFile = deviceTempFile;
            this.localTempFile = localTempFile;
            this.command = command;
            this.log = log;
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/actions/BugReport.java and 1 other location - About 50 mins to fix
src/main/java/at/favre/tools/uberadb/parser/AdbDevice.java on lines 32..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            return "PackageInfo{" +
                    "packageName='" + packageName + '\'' +
                    ", versionCode=" + versionCode +
                    ", versionName='" + versionName + '\'' +
                    ", codePath='" + codePath + '\'' +
src/main/java/at/favre/tools/uberadb/parser/AdbDevice.java on lines 42..48

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        return "AdbDevice{" +
                "serial='" + serial + '\'' +
                ", status=" + status +
                ", model='" + model + '\'' +
                ", product='" + product + '\'' +
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/parser/AdbDevice.java and 1 other location - About 50 mins to fix
src/main/java/at/favre/tools/uberadb/parser/DumpsysPackageParser.java on lines 100..105

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            actions.add(new BugReportDeviceFileAction(
                    "\tcreate radio logcat file and pull from device",
                    "/sdcard/bugreport_tempfile_logcat_radio",
                    new File(tmpFolder, "radio-" + dateTimeString + "-" + device.model + ".txt"),
                    new String[]{"logcat", "-b", "radio", "-d", "-f", "/sdcard/bugreport_tempfile_logcat_radio"}, "additional-logcat"));
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/actions/BugReport.java and 1 other location - About 45 mins to fix
src/main/java/at/favre/tools/uberadb/actions/BugReport.java on lines 95..99

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            actions.add(new BugReportDeviceFileAction(
                    "\tcreate events logcat file and pull from device",
                    "/sdcard/bugreport_tempfile_logcat_events",
                    new File(tmpFolder, "events-" + dateTimeString + "-" + device.model + ".txt"),
                    new String[]{"logcat", "-b", "events", "-d", "-f", "/sdcard/bugreport_tempfile_logcat_events"}, "additional-logcat"));
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/actions/BugReport.java and 1 other location - About 45 mins to fix
src/main/java/at/favre/tools/uberadb/actions/BugReport.java on lines 100..104

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        help.printHelp("-" + ARG_INSTALL + " <apk file/folder> | -" + ARG_UNINSTALL + " <package filter> | -" + ARG_BUGREPORT + " <out folder> | -"
                + ARG_FORCE_STOP + " <package filter> | -" + ARG_CLEAR_DATA + " <package filter> | " + ARG_APPINFO + " <package filter> | --help", "Version:" + CmdUtil.jarVersion(), options, " ", false);
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/ui/CLIParser.java and 1 other location - About 40 mins to fix
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 107..107

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                throw new IllegalArgumentException("Must either provide either one of " + ARG_INSTALL + ", " + ARG_UNINSTALL + ", " + ARG_BUGREPORT + ", " + ARG_FORCE_STOP + ", " + ARG_CLEAR_DATA + " or " + ARG_START_ACTIVITY + " argument");
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/ui/CLIParser.java and 1 other location - About 40 mins to fix
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 219..220

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 50.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    } else if (arguments.mode == Arg.Mode.CLEAR) {
                        Commons.runAdbCommand(new String[]{"-s", device.serial, "shell", "pm", "clear", filteredPackage}, cmdProvider, adbLocation);
                        packgeActionLog += "\tdata cleared";
                        actionResult.successCount++;
                    } else if (arguments.mode == Arg.Mode.INFO) {
src/main/java/at/favre/tools/uberadb/actions/PackageDependentAction.java on lines 57..61

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    } else if (arguments.mode == Arg.Mode.FORCE_STOP) {
                        Commons.runAdbCommand(new String[]{"-s", device.serial, "shell", "am", "force-stop", filteredPackage}, cmdProvider, adbLocation);
                        packgeActionLog += "\tstopped";
                        actionResult.successCount++;
                    } else if (arguments.mode == Arg.Mode.CLEAR) {
src/main/java/at/favre/tools/uberadb/actions/PackageDependentAction.java on lines 61..65

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

            if (commandLine.hasOption(ARG_UNINSTALL)) {
                argument.mainArgument = commandLine.getOptionValues(ARG_UNINSTALL);
                argument.mode = Arg.Mode.UNINSTALL;
                mainArgCount++;
            }
Severity: Major
Found in src/main/java/at/favre/tools/uberadb/ui/CLIParser.java and 5 other locations - About 35 mins to fix
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 65..69
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 70..74
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 75..79
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 80..84
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 85..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

            if (commandLine.hasOption(ARG_BUGREPORT)) {
                argument.mainArgument = commandLine.getOptionValues(ARG_BUGREPORT);
                argument.mode = Arg.Mode.BUGREPORT;
                mainArgCount++;
            }
Severity: Major
Found in src/main/java/at/favre/tools/uberadb/ui/CLIParser.java and 5 other locations - About 35 mins to fix
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 60..64
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 65..69
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 75..79
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 80..84
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 85..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

            if (commandLine.hasOption(ARG_FORCE_STOP)) {
                argument.mainArgument = commandLine.getOptionValues(ARG_FORCE_STOP);
                argument.mode = Arg.Mode.FORCE_STOP;
                mainArgCount++;
            }
Severity: Major
Found in src/main/java/at/favre/tools/uberadb/ui/CLIParser.java and 5 other locations - About 35 mins to fix
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 60..64
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 65..69
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 70..74
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 80..84
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 85..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

            if (commandLine.hasOption(ARG_INSTALL)) {
                argument.mainArgument = commandLine.getOptionValues(ARG_INSTALL);
                argument.mode = Arg.Mode.INSTALL;
                mainArgCount++;
            }
Severity: Major
Found in src/main/java/at/favre/tools/uberadb/ui/CLIParser.java and 5 other locations - About 35 mins to fix
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 60..64
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 70..74
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 75..79
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 80..84
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 85..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

            if (commandLine.hasOption(ARG_CLEAR_DATA)) {
                argument.mainArgument = commandLine.getOptionValues(ARG_CLEAR_DATA);
                argument.mode = Arg.Mode.CLEAR;
                mainArgCount++;
            }
Severity: Major
Found in src/main/java/at/favre/tools/uberadb/ui/CLIParser.java and 5 other locations - About 35 mins to fix
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 60..64
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 65..69
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 70..74
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 75..79
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 85..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 6 locations. Consider refactoring.
Open

            if (commandLine.hasOption(ARG_APPINFO)) {
                argument.mainArgument = commandLine.getOptionValues(ARG_APPINFO);
                argument.mode = Arg.Mode.INFO;
                mainArgCount++;
            }
Severity: Major
Found in src/main/java/at/favre/tools/uberadb/ui/CLIParser.java and 5 other locations - About 35 mins to fix
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 60..64
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 65..69
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 70..74
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 75..79
src/main/java/at/favre/tools/uberadb/ui/CLIParser.java on lines 80..84

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                    } else if (arguments.mode == Arg.Mode.UNINSTALL || arguments.mode == Arg.Mode.FORCE_STOP || arguments.mode == Arg.Mode.CLEAR || arguments.mode == Arg.Mode.INFO || arguments.mode == Arg.Mode.START_ACTIVITY) {
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/AdbTool.java and 1 other location - About 30 mins to fix
src/main/java/at/favre/tools/uberadb/AdbTool.java on lines 129..131

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                if (adbLocation.location == AdbLocationFinder.Location.WIN_DEFAULT ||
                        adbLocation.location == AdbLocationFinder.Location.MAC_DEFAULT ||
                        adbLocation.location == AdbLocationFinder.Location.LINUX_DEFAULT) {
Severity: Minor
Found in src/main/java/at/favre/tools/uberadb/AdbTool.java and 1 other location - About 30 mins to fix
src/main/java/at/favre/tools/uberadb/AdbTool.java on lines 202..202

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language