Showing 231 of 426 total issues
Method fade
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fade(final int id, final float startAlpha, final float endAlpha, final int delay, final long duration, String handlerName, Activity activity) {
final AlphaAnimation fade = new AlphaAnimation(startAlpha, endAlpha);
final View view = activity.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
File Tutorial.java
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.bedrock.padder.model.tutorial;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Handler;
File FileHelper.java
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.bedrock.padder.helper;
import android.app.Activity;
import android.content.DialogInterface;
import android.os.AsyncTask;
AboutFragment
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public class AboutFragment extends Fragment {
private WindowHelper w = new WindowHelper();
private AdMobHelper ad = new AdMobHelper();
private IntentHelper intent = new IntentHelper();
Method onBindViewHolder
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void onBindViewHolder(final DetailViewHolder holder, int position) {
holder.itemText.setText(item[position].getText(context));
if (item[position].getHint(context) == null || item[position].getHint(context).equals("")) {
File PresetStoreOnlineFragment.java
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.bedrock.padder.fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageInfo;
Method onWindowFocusChanged
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void onWindowFocusChanged(boolean hasFocus) {
Log.i("MainActivity", "onWindowFocusChanged");
if (preferences.getStopOnFocusLoss()) {
Tutorial
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
public class Tutorial {
public static TimingListener TIMING_LISTENER;
private String tag;
FeedbackActivity
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
public class FeedbackActivity extends AppCompatActivity {
final String TAG = "FeedbackActivity";
String MODE_TAG = "";
Method setDeckMargin
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void setDeckMargin() {
// deck margin
deckMarginEditText = ((EditText) a.findViewById(R.id.layout_settings_deck_margin_input));
deckMarginSeekbar = ((SeekBar) a.findViewById(R.id.layout_settings_deck_margin_slider));
Method run
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void run() {
// Current sync
Sync sync = syncs.get(currentSyncIndex++);
- Read upRead up
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 draw
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private void draw() {
final PresetSchema presetSchema = getPresetSchema();
final Preset preset = presetSchema.getPreset();
// load preset image
- Read upRead up
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 setButtonLayout
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private void setButtonLayout() {
int screenWidthPx = (int) (w.getWindowWidthPx(a) * preferences.getDeckMargin());
int marginPx = w.getWindowWidthPx(a) / 160;
int newWidthPx;
int newHeightPx;
- Read upRead up
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 showTutorial
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void showTutorial() {
final ImageView tutorialToolbar = findViewById(R.id.toolbar_tutorial_icon);
if (isTutorialVisible == false) {
isTutorialVisible = true;
Method onBindViewHolder
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void onBindViewHolder(final DetailViewHolder holder, int position) {
Log.d("Holder", String.valueOf(itemColor.getColorButtonRecent(position)));
final int color = itemColor.getColorButtonRecent(position);
File GesturePad.java
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.bedrock.padder.model.sound;
import android.app.Activity;
import android.util.Log;
import android.view.View;
PresetStoreOnlineFragment
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class PresetStoreOnlineFragment extends Fragment implements Refreshable {
private WindowHelper window = new WindowHelper();
private AnimateHelper anim = new AnimateHelper();
private ApiHelper api = new ApiHelper();
Consider simplifying this complex logical expression. Open
if (preset != null) {
String presetName = preset.getTag();
// preset available
File folderSound = new File(PROJECT_LOCATION_PRESETS + "/" + presetName + "/sounds");
File folderTiming = new File(PROJECT_LOCATION_PRESETS + "/" + presetName + "/timing");
Method onFling
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
boolean result = false;
try {
float diffY = e2.getY() - e1.getY();
- Read upRead up
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
File AboutFragment.java
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.bedrock.padder.fragment;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;