File AnimateHelper.java
has 979 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.bedrock.padder.helper;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
AnimateHelper
has 93 methods (exceeds 20 allowed). Consider refactoring. Open
@TargetApi(14)
public class AnimateHelper {
private WindowHelper window = new WindowHelper();
static String TAG = "AnimateHelper";
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);
Method fadeOut
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fadeOut(final int id, final int delay, final long duration, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = activity.findViewById(id);
if (view.getVisibility() == View.VISIBLE) {
Method fadeOut
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fadeOut(final View view, final int delay, final long duration, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
if (view.getVisibility() == View.VISIBLE) {
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
Method fadeOut
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fadeOut(final int id, final int delay, final long duration, View parentView, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = parentView.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
Method fadeIn
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fadeIn(final int id, final int delay, final long duration, String handlerName, View parentView, Activity activity) {
final AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
final View view = parentView.findViewById(id);
view.setVisibility(View.INVISIBLE);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
Method fadeIn
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fadeIn(final int id, final int delay, final long duration, String handlerName, Activity activity) {
final AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
final View view = activity.findViewById(id);
view.setVisibility(View.INVISIBLE);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
Method fadeIn
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fadeIn(final View view, final int delay, final long duration, String handlerName, Activity activity) {
final AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
view.setVisibility(View.INVISIBLE);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
Method moveXYinDP
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
public void moveXYinDP(View view,
int fromX, int toX,
int durationX, int delayX, TimeInterpolator intX,
int fromY, int toY,
int durationY, int delayY, TimeInterpolator intY,
Method moveXYinDP
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
public void moveXYinDP(int view,
int fromX, int toX,
int durationX, int delayX, TimeInterpolator intX,
int fromY, int toY,
int durationY, int delayY, TimeInterpolator intY,
Method moveXYinPX
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
public void moveXYinPX(int view,
int fromX, int toX,
int durationX, int delayX, TimeInterpolator intX,
int fromY, int toY,
int durationY, int delayY, TimeInterpolator intY,
Method moveXYinPX
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
public void moveXYinPX(View view,
int fromX, int toX,
int durationX, int delayX, TimeInterpolator intX,
int fromY, int toY,
int durationY, int delayY, TimeInterpolator intY,
Method fadeOut
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public void fadeOut(final int id, final int delay, final long duration, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = activity.findViewById(id);
if (view.getVisibility() == View.VISIBLE) {
- 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 fadeOut
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public void fadeOut(final View view, final int delay, final long duration, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
if (view.getVisibility() == View.VISIBLE) {
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- 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 fadeOutInvisible
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fadeOutInvisible(final int id, final int delay, final long duration, View parentView, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = parentView.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
Method fadeOutInvisible
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void fadeOutInvisible(final int id, final int delay, final long duration, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = activity.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
Method circularRevealAnimator
has 35 lines of code (exceeds 25 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 circularRevealInPx
has 35 lines of code (exceeds 25 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 circularRevealinDP
has 34 lines of code (exceeds 25 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 scaleOut
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void scaleOut(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(1, 0, 1, 0, Animation.ABSOLUTE, x, Animation.ABSOLUTE, y);
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 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 fadeIn
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public void fadeIn(final int id, final int delay, final long duration, String handlerName, View parentView, Activity activity) {
final AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
final View view = parentView.findViewById(id);
view.setVisibility(View.INVISIBLE);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- 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 fadeOutInvisible
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public void fadeOutInvisible(final int id, final int delay, final long duration, View parentView, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = parentView.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- 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 fadeOut
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public void fadeOut(final int id, final int delay, final long duration, View parentView, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = parentView.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- 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 fade
has a Cognitive Complexity of 9 (exceeds 5 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);
- 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 fadeIn
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public void fadeIn(final int id, final int delay, final long duration, String handlerName, Activity activity) {
final AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
final View view = activity.findViewById(id);
view.setVisibility(View.INVISIBLE);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- 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 fadeOutInvisible
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public void fadeOutInvisible(final int id, final int delay, final long duration, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = activity.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- 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 fadeIn
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public void fadeIn(final View view, final int delay, final long duration, String handlerName, Activity activity) {
final AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
view.setVisibility(View.INVISIBLE);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- 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 circularRevealTouch
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public void circularRevealTouch(View touch_view, final int reveal_view,
final TimeInterpolator interpolator, final Runnable onClick,
final int duration, final int delay, final Activity activity) {
Method scaleOut
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public void scaleOut(final int id, int touchX, int touchY, final int delay, final long duration, String handlerName, Activity activity) {
Method scaleIn
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public void scaleIn(final int id, int touchX, int touchY, final int delay, final long duration, String handlerName, Activity activity) {
Method scaleOut
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public void scaleOut(final View view, int touchX, int touchY, final int delay, final long duration, String handlerName, Activity activity) {
Method scaleIn
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public void scaleIn(final View view, int touchX, int touchY, final int delay, final long duration, String handlerName, Activity activity) {
Method fade
has 7 arguments (exceeds 4 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) {
Method circularRevealTouch
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public void circularRevealTouch(int touch_view, final int reveal_view,
final TimeInterpolator interpolator, final Runnable onClick,
final int duration, final int delay, final Activity activity) {
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) {
- 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 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) {
Method scaleInOverShoot
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void scaleInOverShoot(final int view_id, final int delay, final long duration, String handlerName, final Activity activity) {
Method scaleIn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void scaleIn(final int id, final int delay, final long duration, String handlerName, Activity activity) {
Method fadeOut
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void fadeOut(final int id, final int delay, final long duration, View parentView, Activity activity) {
Method fadeIn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void fadeIn(final int id, final int delay, final long duration, String handlerName, Activity activity) {
Method scaleOut
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void scaleOut(final int id, final int delay, final long duration, String handlerName, Activity activity) {
Method fadeOutInvisible
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void fadeOutInvisible(final int id, final int delay, final long duration, View parentView, Activity activity) {
Method fadeIn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void fadeIn(final View view, final int delay, final long duration, String handlerName, Activity activity) {
Method circularRevealinDP
has a Cognitive Complexity of 7 (exceeds 5 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) {
- 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 circularRevealAnimator
has a Cognitive Complexity of 7 (exceeds 5 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) {
- 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
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (view.getVisibility() == View.VISIBLE) {
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
if (Build.VERSION.SDK_INT >= 21 && powerManager.isPowerSaveMode()) {
// power save mode on
- Read upRead up
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 368.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (view.getVisibility() == View.VISIBLE) {
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
if (Build.VERSION.SDK_INT >= 21 && powerManager.isPowerSaveMode()) {
// power save mode on
- Read upRead up
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 368.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
public void fadeIn(final int id, final int delay, final long duration, String handlerName, View parentView, Activity activity) {
final AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
final View view = parentView.findViewById(id);
view.setVisibility(View.INVISIBLE);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- Read upRead up
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 349.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
public void fadeIn(final int id, final int delay, final long duration, String handlerName, Activity activity) {
final AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
final View view = activity.findViewById(id);
view.setVisibility(View.INVISIBLE);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- Read upRead up
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 349.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
public void fadeOutInvisible(final int id, final int delay, final long duration, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = activity.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- Read upRead up
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 335.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
public void fadeOutInvisible(final int id, final int delay, final long duration, View parentView, Activity activity) {
final AlphaAnimation fadeOut = new AlphaAnimation(1.0f, 0.0f);
final View view = parentView.findViewById(id);
PowerManager powerManager = (PowerManager) activity.getSystemService(POWER_SERVICE);
- Read upRead up
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 335.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void scaleOut(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(1, 0, 1, 0, Animation.ABSOLUTE, x, Animation.ABSOLUTE, y);
- Read upRead up
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 288.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. 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);
- Read upRead up
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 288.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void scaleOut(final View view, int touchX, int touchY, final int delay, final long duration, String handlerName, Activity activity) {
float x = touchX / window.getWindowWidthPx(activity);
float y = touchY / window.getWindowHeightPx(activity);
final ScaleAnimation scaleOut = new ScaleAnimation(1, 0, 1, 0, Animation.ABSOLUTE, x, Animation.ABSOLUTE, y);
- Read upRead up
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 204.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void scaleIn(final View view, int touchX, int touchY, final int delay, final long duration, String handlerName, Activity activity) {
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);
- Read upRead up
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 204.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
handlerCreator.get(handlerName).postDelayed(new Runnable() {
@Override
public void run() {
scaleIn.setDuration(duration);
view.startAnimation(scaleIn);
- Read upRead up
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 77.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
handlerCreator.get(handlerName).postDelayed(new Runnable() {
@Override
public void run() {
scaleInOverShoot.setDuration(duration);
view.startAnimation(scaleInOverShoot);
- Read upRead up
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 77.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
handlerCreator.get(handlerName).postDelayed(new Runnable() {
@Override
public void run() {
scaleIn.setDuration(duration);
view.startAnimation(scaleIn);
- Read upRead up
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 77.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
touch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
circularRevealInPx(reveal_view,
coordinate[0], coordinate[1],
- Read upRead up
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 68.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
touch_view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
circularRevealInPx(reveal_view,
coordinate[0], coordinate[1],
- Read upRead up
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 68.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
touch.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
coordinate[0] = (int) event.getRawX();
coordinate[1] = (int) event.getRawY();
- Read upRead up
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 49.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
touch_view.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
coordinate[0] = (int) event.getRawX();
coordinate[1] = (int) event.getRawY();
- Read upRead up
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 49.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
if (startRad > endRad) {
animator.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
if (startRad > endRad) {
animator.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
getViewId(view) + " fade effect from " +
String.valueOf(startAlpha) + "f to " +
String.valueOf(endAlpha) + "f for " +
String.valueOf(duration) + "ms with no delay");
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
if (startRad > endRad) {
animator.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
getViewId(view) + " fade effect from " +
String.valueOf(startAlpha) + "f to " +
String.valueOf(endAlpha) + "f for " +
String.valueOf(duration) + "ms with " +
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76