berict/Tapad

View on GitHub

Showing 231 of 426 total issues

Method onProgressUpdate has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        @Override
        protected void onProgressUpdate(Boolean... args) {
            // update progress
            if (mProgress > previousProgressCount) {
                // less updates
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/model/preset/store/Item.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method show has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private void show(int deck, int pad, int gesture) {
        if (deck > 0) {
            TutorialView view;
            if (pad != -1) {
                if (gesture != -1) {
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/model/tutorial/Tutorial.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method stop has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public void stop() {
        if (pads != null && pads.length >= 17) {
            for (Pad pad : pads) {
                if (pad != null) {
                    pad.stop();
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/model/sound/Deck.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method onBackPressed has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void onBackPressed() {
        Log.i("BackPressed", "isAboutVisible " + String.valueOf(isAboutVisible));
        if (isToolbarVisible == true) {
            if (isAboutVisible) {
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/activity/MainActivity.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method stop has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    void stop() {
        canLoop = true;
        try {
            if (streamId != 0) {
                soundPool.stop(streamId);
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/model/sound/Sound.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method unload has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public void unload() {
        if (pads != null && pads.length >= 17) {
            for (Pad pad : pads) {
                if (pad != null) {
                    pad.unload();
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/model/sound/Deck.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method show has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private void show(int deck, int pad, int gesture, int duration) {
        if (deck > 0) {
            TutorialView view;
            if (pad != -1) {
                if (gesture != -1) {
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/model/tutorial/Tutorial.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method setDirectory has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private void setDirectory() {
        // loading start
        Log.d(TAG, "setDirectory");
        if (!hasPermission) {
            // no permission granted
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/activity/PresetStoreActivity.java - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method setMarginRelativeDP has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public void setMarginRelativeDP(int id, int left, int top, int right, int bottom, Activity activity) {
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/helper/WindowHelper.java - About 45 mins to fix

    Method setMarginLinearDP has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public void setMarginLinearDP(int id, int left, int top, int right, int bottom, Activity activity) {
    Severity: Minor
    Found in app/src/main/java/com/bedrock/padder/helper/WindowHelper.java - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if (tutorial == null) {
                                  tutorial = new Tutorial(currentPreset.getTag(), a);
                                  tutorial.setTutorialListener(new Tutorial.TutorialListener() {
                                      @Override
                                      public void onLoadStart(Tutorial tutorial) {
      Severity: Major
      Found in app/src/main/java/com/bedrock/padder/activity/MainActivity.java - About 45 mins to fix

        Method getCustomFolderName has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            String getCustomFolderName() {
                File files[] = new File(PROJECT_LOCATION_PRESETS).listFiles();
                String folderName = getResources().getString(R.string.custom_preset_folder_name);
                int fileNameCount = 0;
                for (File folder : files) {
        Severity: Minor
        Found in app/src/main/java/com/bedrock/padder/activity/PresetStoreActivity.java - About 45 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method setMarginLinearPX has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public void setMarginLinearPX(int id, int left, int top, int right, int bottom, Activity activity) {
        Severity: Minor
        Found in app/src/main/java/com/bedrock/padder/helper/WindowHelper.java - About 45 mins to fix

          Method intentEmail has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public void intentEmail(final Activity activity, int emailTargetId, String subject, String text, int hintResId, int delay) {
          Severity: Minor
          Found in app/src/main/java/com/bedrock/padder/helper/IntentHelper.java - About 45 mins to fix

            Method circularRevealInPx has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                public void circularRevealInPx(int view,
                                               int centerX, int centerY,
                                               int startRad, int endRad, TimeInterpolator interpolator,
                                               int duration, int delay, Activity activity) {
            
            
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/helper/AnimateHelper.java - About 45 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method fadeIn has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public void fadeIn(final int id, final int delay, final long duration, String handlerName, View parentView, Activity activity) {
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/helper/AnimateHelper.java - About 45 mins to fix

              Method isPresetAvailable has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  public boolean isPresetAvailable(Preset preset) {
                      // with sound count check
                      if (preset != null) {
                          String presetName = preset.getTag();
                          // preset available
              Severity: Minor
              Found in app/src/main/java/com/bedrock/padder/helper/FileHelper.java - About 45 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Method doInBackground has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                      @Override
                      protected Integer doInBackground(Void... params) {
                          try {
                              FileInputStream fileInputStream = new FileInputStream(zipLocation);
                              ZipInputStream zipInputStream = new ZipInputStream(fileInputStream);
              Severity: Minor
              Found in app/src/main/java/com/bedrock/padder/helper/FileHelper.java - About 45 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Avoid deeply nested control flow statements.
              Open

                                          if (sound != null) {
                                              sounds.add(sound);
                                              publishProgress();
                                          }
              Severity: Major
              Found in app/src/main/java/com/bedrock/padder/helper/SoundHelper.java - About 45 mins to fix

                Method unzip has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public void unzip(String zipLocation, String targetLocation, String presetName, View parentView, Activity activity, Runnable onFinish) {
                Severity: Minor
                Found in app/src/main/java/com/bedrock/padder/helper/FileHelper.java - About 45 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language