berict/Tapad

View on GitHub

Showing 231 of 426 total issues

Method scaleIn has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void scaleIn(final int id, int touchX, int touchY, final int delay, final long duration, String handlerName, Activity activity) {
        final View view = activity.findViewById(id);
        float x = touchX / window.getWindowWidthPx(activity);
        float y = touchY / window.getWindowHeightPx(activity);
        final ScaleAnimation scaleOut = new ScaleAnimation(0, 1, 0, 1, Animation.ABSOLUTE, x, Animation.ABSOLUTE, y);
Severity: Minor
Found in app/src/main/java/com/bedrock/padder/helper/AnimateHelper.java - About 1 hr to fix

    Method circularRevealInPx has 9 arguments (exceeds 4 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: Major
    Found in app/src/main/java/com/bedrock/padder/helper/AnimateHelper.java - About 1 hr to fix

      Method circularRevealAnimator has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public Animator circularRevealAnimator(int view,
                                                 int centerX, int centerY,
                                                 int startRad, int endRad, TimeInterpolator interpolator,
                                                 int duration, int delay, Activity activity) {
      Severity: Major
      Found in app/src/main/java/com/bedrock/padder/helper/AnimateHelper.java - About 1 hr to fix

        Method circularRevealinDP has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

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

          Method getStatusBar has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public int getStatusBar(final int id, final Activity activity) {
                  /* Must be a parent view */
          
                  final SharedPreferences prefs = activity.getSharedPreferences(APPLICATION_ID, MODE_PRIVATE);
                  final int[] statBarHeight = {-1};
          Severity: Minor
          Found in app/src/main/java/com/bedrock/padder/helper/WindowHelper.java - About 1 hr to fix

            Method readItem has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                private Sync.Item readItem(XmlPullParser parser) throws IOException, XmlPullParserException {
                    Sync.Item item = null;
                    parser.require(XmlPullParser.START_TAG, ns, "item");
                    String tag = parser.getName();
            
            

            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 play has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                void play() {
                    try {
                        Log.i(TAG, "Attempted to play " + soundPoolId);
                        if (isLooping && canLoop) {
                            canLoop = false;
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/model/sound/Sound.java - About 1 hr 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 onAnimationEnd has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                    @Override
                    public void onAnimationEnd(Animation anim) {
                        if (!isOnAnimationEndCalled) {
                            Log.d("TutorialView", "animation.onAnimationEnd " + view.getTag());
                            if (view != null) {

            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 getDurationFromFile has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                private int getDurationFromFile(String path, MediaMetadataRetriever mmr) {
                    if (path != null) {
                        try {
                            mmr.setDataSource(path);
                            int duration = Integer.parseInt(mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION));
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/model/sound/Sound.java - About 1 hr 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 validateSpinner has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                private boolean validateSpinner(boolean firstRun, int errorViewId, String spinnerCurrentItemString) {
                    if (firstRun) {
                        switch (MODE_TAG) {
                            case "song":
                                songGenreValidateFirstRun = false;
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/activity/FeedbackActivity.java - About 1 hr 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 onPostExecute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                    @Override
                    protected void onPostExecute(Void aVoid) {
                        if (isCancelled()) {
                            onLoadFinish();
                        } else {
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/helper/SoundHelper.java - About 1 hr 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 selectPattern has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                private void selectPattern(int index) {
                    Log.d("SH", "Index selected " + index);
                    // index starts from 0
                    if (index == -1) {
                        // disable all
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/helper/SoundHelper.java - About 1 hr 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 onPostExecute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                    @Override
                    protected void onPostExecute(Integer integer) {
                        Log.d(TAG, "onPostExecute");
                        super.onPostExecute(integer);
                        // finished unzipping, delete the original zip file
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/helper/FileHelper.java - About 1 hr 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 setButtonPatternDefault has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                private void setButtonPatternDefault(int patternPreset[][][], int btnId, int colorUp, Activity activity) {
                    if (btnId >= 0) {
                        for (int i = 0; i < patternPreset[btnId].length; i++) {
                            for (int j = 0; j < patternPreset[btnId][i].length; j++) {
                                try {
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/helper/WindowHelper.java - About 1 hr 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 intentSharedElementWithExtra has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public void intentSharedElementWithExtra(final Activity activity, final String targetName, final int start_element_id, final String transitionName, final String extraName, final String extra, int delay, final View v) {
                    final String classname = "com.bedrock.padder." + targetName;
                    final Class<Object> classToLoad;
                    try{
                        classToLoad = (Class<Object>)Class.forName(classname);
            Severity: Minor
            Found in app/src/main/java/com/bedrock/padder/helper/IntentHelper.java - About 1 hr to fix

              Method intentSharedElementWithExtra has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public void intentSharedElementWithExtra(final Activity activity, final String targetName, final int start_element_id, final String transitionName, final String extraName, final String extra, int delay) {
                      final String classname = "com.bedrock.padder." + targetName;
                      final Class<Object> classToLoad;
                      try{
                          classToLoad = (Class<Object>)Class.forName(classname);
              Severity: Minor
              Found in app/src/main/java/com/bedrock/padder/helper/IntentHelper.java - About 1 hr to fix

                Method intentSharedElementWithExtra has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public void intentSharedElementWithExtra(final Activity activity, final String targetName, final int start_element_id, final String transitionName, final String extraName, final int extra, int delay) {
                        final String classname = "com.bedrock.padder." + targetName;
                        final Class<Object> classToLoad;
                        try{
                            classToLoad = (Class<Object>)Class.forName(classname);
                Severity: Minor
                Found in app/src/main/java/com/bedrock/padder/helper/IntentHelper.java - About 1 hr to fix

                  Method scaleOut has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public void scaleOut(final View view, final int delay, final long duration, String handlerName) {
                          final ScaleAnimation scaleOut = new ScaleAnimation(1, 0, 1, 0, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
                  
                          scaleOut.setInterpolator(new AccelerateDecelerateInterpolator());
                  
                  
                  Severity: Minor
                  Found in app/src/main/java/com/bedrock/padder/helper/AnimateHelper.java - About 1 hr to fix

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

                        public void intentEmail(final Activity activity, String email_target, String subject, String subjectDesc, String text, String textDesc, final String hint, int delay) {
                    Severity: Major
                    Found in app/src/main/java/com/bedrock/padder/helper/IntentHelper.java - About 1 hr to fix

                      Method intentSharedElementWithExtra has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public void intentSharedElementWithExtra(final Activity activity, final String targetName, final int start_element_id, final String transitionName, final String extraName, final String extra, int delay, final View v) {
                      Severity: Major
                      Found in app/src/main/java/com/bedrock/padder/helper/IntentHelper.java - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language