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);
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) {
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) {
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) {
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};
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();
- 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 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;
- 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 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) {
- 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 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));
- 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 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;
- 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 onPostExecute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void onPostExecute(Void aVoid) {
if (isCancelled()) {
onLoadFinish();
} else {
- 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 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
- 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 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
- 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 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 {
- 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 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);
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);
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);
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());
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) {
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) {