Showing 2,519 of 2,519 total issues
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_Text");
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_CommonStyle");
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_CommonStyle");
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_CommonStyle");
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_CommonStyle");
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_CommonStyle");
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_CommonStyle");
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_CommonStyle");
Method setUp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Before
public void setUp() throws InterruptedException {
super.setUp();
HashMap testMap = new <String, Object> HashMap();
testMap.put("testComponet", "AG_CommonStyle");
Method onCreateView
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View root = inflater.inflate(R.layout.fragment_environment, container, false);
Method dispatchKeyEvent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@ChromeDevtoolsMethod
public JsonRpcResult dispatchKeyEvent(JsonRpcPeer peer, JSONObject params) {
final DispatchKeyEventRequest request = mObjectMapper.convertValue(params, DispatchKeyEventRequest.class);
if (KEY_UP.equals(request.type)) {
Instrumentation instrumentation = new Instrumentation();
Similar blocks of code found in 2 locations. Consider refactoring. Open
@ChromeDevtoolsMethod
public void disable(JsonRpcPeer peer, JSONObject params) {
WXLogUtils.e("WxDebug-new >>>> disable=" + params);
Context context = WXEnvironment.getApplication();
if (context != null) {
- 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 79.
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
@ChromeDevtoolsMethod
public void enable(JsonRpcPeer peer, JSONObject params) {
WXLogUtils.e("WxDebug-new >>>> enable=" + params);
Context context = WXEnvironment.getApplication();
if (context != null) {
- 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 79.
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
@Override
public void webSocketFrameReceived(InspectorWebSocketFrame frame) {
NetworkPeerManager peerManager = getPeerManagerIfEnabled();
if (peerManager != null) {
Network.WebSocketFrameReceivedParams params = new Network.WebSocketFrameReceivedParams();
- 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 78.
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
@Override
public void webSocketFrameSent(InspectorWebSocketFrame frame) {
NetworkPeerManager peerManager = getPeerManagerIfEnabled();
if (peerManager != null) {
Network.WebSocketFrameSentParams params = new Network.WebSocketFrameSentParams();
- 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 78.
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
Method callLayout
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public int callLayout(String s, String s1, int i, int i1, int i2, int i3, int i4, int i5, int i6) {
Method callCreateBody
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public int callCreateBody(String pageId, String componentType, String ref, HashMap<String, String> styles, HashMap<String, String> attributes, HashSet<String> events, float[] margins, float[] paddings, float[] borders) {
Method onGetStyles
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void onGetStyles(WXComponent element, StyleAccumulator accumulator) {
HashMap<String, String> map = getStyles(element);
if (map != null && map.size() > 0) {
for (HashMap.Entry<String, String> entry : map.entrySet()) {
Method sendSummaryInfo
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void sendSummaryInfo(String instanceId) {
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if (instance != null) {
WXPerformance performance = instance.getWXPerformance();
try {
Method getExistedModules
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static Map<String, TypeModuleFactory> getExistedModules(boolean global) {
Map<String, TypeModuleFactory> modules = new HashMap<>();
if (global) {
try {
Field sGlobalField = WXModuleManager.class.getDeclaredField("sGlobalModuleMap");