Showing 472 of 2,519 total issues
Function anim
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
anim: function(ref, styles, timingFunction, duration, callback) {
Method callAddElement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public native void callAddElement(String instanceId, String ref, String dom, String index,
String callback);
Method interpretResponseStream
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public InputStream interpretResponseStream(String requestId, String contentType, String contentEncoding, InputStream stream, boolean continueRead) {
Method interpretResponseStream
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public InputStream interpretResponseStream(String requestId, @Nullable String contentType, @Nullable String contentEncoding, @Nullable InputStream inputStream, ResponseHandler responseHandler) {
Method getFirstChildScrollableView
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static View getFirstChildScrollableView(ViewGroup view){
View viewResult = null;
ArrayList<View> allViews = new ArrayList<View>();
- 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 readThisSetXml
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static final HashSet readThisSetXml(XmlPullParser parser, String endTag, String[] name,
ReadMapCallback callback) throws XmlPullParserException, java.io.IOException {
HashSet set = new HashSet();
int eventType = parser.getEventType();
- 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 readThisMapXml
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static final HashMap<String, ?> readThisMapXml(XmlPullParser parser, String endTag,
String[] name, ReadMapCallback callback)
throws XmlPullParserException, java.io.IOException
{
HashMap<String, Object> map = new HashMap<String, Object>();
- 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 runWithPermissionsCheck
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void runWithPermissionsCheck(int requestCode, String permission, Runnable runnable) {
if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.shouldShowRequestPermissionRationale(this, permission)) {
Toast.makeText(this, "please give me the permission", Toast.LENGTH_SHORT).show();
} else {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method endTag
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public XmlSerializer endTag(String namespace, String name) throws IOException,
IllegalArgumentException, IllegalStateException {
mNesting--;
if (mInTag) {
append(" />\n");
- 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 readThisListXml
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static final ArrayList readThisListXml(XmlPullParser parser, String endTag,
String[] name, ReadMapCallback callback)
throws XmlPullParserException, java.io.IOException {
ArrayList list = new ArrayList();
- 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 getDialogFragments
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static void getDialogFragments(
@Nullable FragmentCompat compat,
Activity activity,
Accumulator<Object> accumulator) {
if (compat == null || !compat.getFragmentActivityClass().isInstance(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 getRealDomMaxLayer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private int getRealDomMaxLayer(@NonNull View rootView) {
int maxLayer = 0;
Deque<LayeredNode<View>> deque = new ArrayDeque<>();
LayeredNode<View> rootNode = mRealDomObjectPool.obtain();
rootNode.set(rootView,null,START_LAYER_OF_REAL_DOM);
- 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 doesElementMatch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private boolean doesElementMatch(Object element, int x, int y) {
View view = null;
if (DOM.isNativeMode()) {
if (element instanceof View) {
view = (View)element;
- 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 getUrl
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private String getUrl(Uri uri) {
String url = uri.toString();
String scheme = uri.getScheme();
if (uri.isHierarchical()) {
if (TextUtils.equals(scheme, "http") || TextUtils.equals(scheme, "https")) {
- 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 getElementForView
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private Object getElementForView(ViewGroup parentView, View childView) {
Object value = mViewToElementMap.get(childView);
if (value != null) {
Object element = getElement(childView, value);
- 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 onGetAttributes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void onGetAttributes(WXComponent element, AttributeAccumulator attributes) {
HashMap<String, String> map = getAttribute(element);
if (map != null && map.size() > 0) {
for (HashMap.Entry<String, String> entry : map.entrySet()) {
- 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 getTestCaseListViewByText
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public ArrayList<View> getTestCaseListViewByText(String byText) throws InterruptedException {
Log.e("TestScript_Guide", "byText ==" + byText);
if(TextUtils.isEmpty(byText)){
return null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function 19
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
/***/ function(module, exports, __webpack_require__) {
;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){
__webpack_require__(18);
- 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 getProperties
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public GetPropertiesResponse getProperties(JSONObject params) throws JsonRpcException {
GetPropertiesRequest request = mObjectMapper.convertValue(params, GetPropertiesRequest.class);
if (!request.ownProperties) {
GetPropertiesResponse response = new GetPropertiesResponse();
- 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
Function 19
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
/***/ function(module, exports, __webpack_require__) {
;__weex_define__("@weex-component/banners", [], function(__weex_require__, __weex_exports__, __weex_module__){
__webpack_require__(18);
- 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"