weexteam/weex_devtools_android

View on GitHub

Showing 2,519 of 2,519 total issues

Similar blocks of code found in 19 locations. Consider refactoring.
Open

package com.alibaba.weex.uitest.TC_AG;
import com.alibaba.weex.WXPageActivity;
import com.alibaba.weex.util.TestFlow;
import java.util.HashMap;
import org.junit.Before;
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_A_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Div_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Input_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Switch_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Text_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Video_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Web_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Click.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Conflict.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Longpress.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Pan.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Swipe.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Touch.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Image_Image_Onload.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Input_Input_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Switch_Switch_Onchange.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Video_Video_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Web_Web_Event.java on lines 1..27

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 66.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

package com.alibaba.weex.uitest.TC_AG;
import com.alibaba.weex.WXPageActivity;
import com.alibaba.weex.util.TestFlow;
import java.util.HashMap;
import org.junit.Before;
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_A_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Div_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Image_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Input_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Switch_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Text_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Video_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Web_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Conflict.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Longpress.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Pan.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Swipe.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Touch.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Image_Image_Onload.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Input_Input_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Switch_Switch_Onchange.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Video_Video_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Web_Web_Event.java on lines 1..27

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 66.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

package com.alibaba.weex.uitest.TC_AG;
import com.alibaba.weex.WXPageActivity;
import com.alibaba.weex.util.TestFlow;
import java.util.HashMap;
import org.junit.Before;
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_A_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Image_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Input_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Switch_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Text_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Video_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Web_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Click.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Conflict.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Longpress.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Pan.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Swipe.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Touch.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Image_Image_Onload.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Input_Input_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Switch_Switch_Onchange.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Video_Video_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Web_Web_Event.java on lines 1..27

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 66.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

package com.alibaba.weex.uitest.TC_AG;
import com.alibaba.weex.WXPageActivity;
import com.alibaba.weex.util.TestFlow;
import java.util.HashMap;
import org.junit.Before;
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_A_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Div_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Image_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Input_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Switch_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Text_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Video_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Web_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Click.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Conflict.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Longpress.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Pan.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Swipe.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Touch.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Image_Image_Onload.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Input_Input_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Switch_Switch_Onchange.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Web_Web_Event.java on lines 1..27

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 66.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

package com.alibaba.weex.uitest.TC_AG;
import com.alibaba.weex.WXPageActivity;
import com.alibaba.weex.util.TestFlow;
import java.util.HashMap;
import org.junit.Before;
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Div_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Image_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Input_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Switch_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Text_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Video_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Web_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Click.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Conflict.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Longpress.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Pan.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Swipe.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Touch.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Image_Image_Onload.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Input_Input_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Switch_Switch_Onchange.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Video_Video_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Web_Web_Event.java on lines 1..27

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 66.

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

Further Reading

Similar blocks of code found in 19 locations. Consider refactoring.
Open

package com.alibaba.weex.uitest.TC_AG;
import com.alibaba.weex.WXPageActivity;
import com.alibaba.weex.util.TestFlow;
import java.util.HashMap;
import org.junit.Before;
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_A_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Div_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Image_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Input_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Switch_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Text_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Video_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_CommonEvent_Web_Onclick.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Click.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Longpress.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Pan.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Swipe.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Gesture_Div_Touch.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Image_Image_Onload.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Input_Input_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Switch_Switch_Onchange.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Video_Video_Event.java on lines 1..27
playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AG/AG_Web_Web_Event.java on lines 1..27

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 66.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    private static class ForwardingResponseBody extends ResponseBody {
        private final ResponseBody mBody;
        private final BufferedSource mInterceptedSource;

        public ForwardingResponseBody(ResponseBody body, InputStream interceptedStream) {
okhttp3_interceptor/src/main/java/com/taobao/weex/okhttp3/WeexOkhttp3Interceptor.java on lines 269..295

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 66.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    private static class ForwardingResponseBody extends ResponseBody {
        private final ResponseBody mBody;
        private final BufferedSource mInterceptedSource;

        public ForwardingResponseBody(ResponseBody body, InputStream interceptedStream) {
okhttp_interceptor/src/main/java/com/taobao/weex/okhttp/WeexOkhttpInterceptor.java on lines 262..288

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 66.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public static View findFirstListByRootView(View  rootView){
        View firstListView = null;
        if(null != rootView){
            allViews = ViewUtil.getAllChildViews(rootView);
            for (View view:allViews
playground/app/src/androidTest/java/com/alibaba/weex/util/ScreenShot.java on lines 36..51

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 66.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public static View findFirstScrollerByRootView(View  rootView){

        View firstScrollView = null;

        if(null != rootView){
playground/app/src/androidTest/java/com/alibaba/weex/util/ScreenShot.java on lines 53..66

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 66.

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

Further Reading

Method handleDecodeInternally has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  private void handleDecodeInternally(String code) {

    if (!TextUtils.isEmpty(code)) {
      Uri uri = Uri.parse(code);
      if (uri.getQueryParameterNames().contains("bundle")) {
Severity: Minor
Found in playground/app/src/main/java/com/alibaba/weex/IndexActivity.java - About 55 mins to fix

Cognitive Complexity

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

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

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

Further reading

Method close has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  public static void close(Closeable closeable, boolean hideException) throws IOException {
    if (closeable != null) {
      if (hideException) {
        try {
          closeable.close();
Severity: Minor
Found in inspector/src/main/java/com/taobao/weex/devtools/common/Util.java - About 55 mins to fix

Cognitive Complexity

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

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

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

Further reading

Method equals has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public boolean equals(Object o) {
      if (o == null || !(o instanceof JsonPropertyStringList)) {
        return false;
      }

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

  @Nullable
  private static Object findFragmentForViewInActivity(Activity activity, View view) {
    FragmentCompat supportLib = FragmentCompat.getSupportLibInstance();

    // Try the support library version if it is present and the activity is FragmentActivity.

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

  public static InputStream teeInputWithDecompression(
      NetworkPeerManager peerManager,
      String requestId,
      InputStream availableInputStream,
      OutputStream decompressedOutput,

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

  private void getStylesFromObject(
      View view,
      String name,
      Object value,
      @Nullable ViewDebug.ExportedProperty annotation,

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

        public void printTo(PrintWriter output, InputStream payload)
            throws IOException {
          try {
            String schema;
            try {

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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  private void loadingFinished(String requestId) {
    NetworkPeerManager peerManager = getPeerManagerIfEnabled();
    if (peerManager != null) {
      Network.LoadingFinishedParams finishedParams = new Network.LoadingFinishedParams();
      finishedParams.requestId = requestId;
inspector/src/main/java/com/taobao/weex/devtools/inspector/network/NetworkEventReporterImpl.java on lines 366..375

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 64.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  @Override
  public void webSocketClosed(String requestId) {
    NetworkPeerManager peerManager = getPeerManagerIfEnabled();
    if (peerManager != null) {
      Network.WebSocketClosedParams params = new Network.WebSocketClosedParams();
inspector/src/main/java/com/taobao/weex/devtools/inspector/network/NetworkEventReporterImpl.java on lines 289..297

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 64.

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public static int getWidth(View view)
    {
        int w = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED);
        int h = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED);
        view.measure(w, h);
playground/app/src/androidTest/java/com/alibaba/weex/util/ViewUtil.java on lines 131..137

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 62.

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

Further Reading

Severity
Category
Status
Source
Language