Showing 2,519 of 2,519 total issues
Method testTextType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testTextType(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Text")){
Log.e(TAG, "TC_Text find");
- 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 testDowngrade
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testDowngrade(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Downgrade")){
Log.e(TAG, "TC_Downgrade find");
- 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 findFirstListByRootView
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static View findFirstListByRootView(View rootView){
View firstListView = null;
if(null != rootView){
allViews = ViewUtil.getAllChildViews(rootView);
for (View view:allViews
- 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 testDowngrade
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testDowngrade(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Downgrade")){
Log.e(TAG, "TC_Downgrade find");
- 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 convertValueToList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static final int
convertValueToList(CharSequence value, String[] options, int defaultValue)
{
if (null != value) {
for (int i = 0; i < options.length; i++) {
- 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 doClickAction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void doClickAction(String action, String actionValue){
setActivity(WXPageActivity.wxPageActivityInstance);
activity2 = getActivity();
Log.e(TAG, "activity2 = " + activity2.toString());
- 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 testDowngrade
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testDowngrade(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Downgrade")){
Log.e(TAG, "TC_Downgrade find");
- 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 testInputStyle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testInputStyle(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Input")){
Log.e(TAG, "TC_Input find");
- 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 testInputType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testInputType(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Input")){
Log.e(TAG, "TC_Input find");
- 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 testDowngrade
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testDowngrade(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Downgrade")){
Log.e(TAG, "TC_Downgrade find");
- 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 testInputPlaceholder
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testInputPlaceholder(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Input")){
Log.e(TAG, "TC_Input find");
- 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 onActivityResult
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
if(result != null) {
if(result.getContents() == null) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method cleanupFiles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void cleanupFiles() {
for (File file : mContext.getFilesDir().listFiles()) {
if (file.getName().startsWith(FILENAME_PREFIX)) {
if (!file.delete()) {
LogRedirector.w(TAG, "Failed to delete " + file.getAbsolutePath());
- 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 performFiltering
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected FilterResults performFiltering(CharSequence constraint) {
FilterResults filterResults = new FilterResults();
filterResults.values = new ArrayList<>();
for (LogItem item : originLogItems) {
- 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 getSharedPreferenceTags
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static List<String> getSharedPreferenceTags(Context context) {
ArrayList<String> tags = new ArrayList<String>();
String rootPath = context.getApplicationInfo().dataDir + "/shared_prefs";
File root = new File(rootPath);
- 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 sendSummaryInfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void sendSummaryInfo(String instanceId) {
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if (instance != null) {
WXPerformance performance = instance.getWXPerformance();
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method createPrettyPrinterForResponse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Nullable
static AsyncPrettyPrinter createPrettyPrinterForResponse(
InspectorResponse response,
@Nullable AsyncPrettyPrinterRegistry registry) {
if (registry != null) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method testPerfMonitorListAppendTree
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void testPerfMonitorListAppendTree(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Monitor")){
Log.e(TAG, "TC_Monitor find");
- 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 getComponentNumOfNode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private int getComponentNumOfNode(@NonNull WXComponent rootNode) {
Deque<WXComponent> deque = new ArrayDeque<>();
deque.add(rootNode);
int viewNum = 0;
while (!deque.isEmpty()) {
- 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 onMessage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void onMessage(SimpleSession session, String message) {
if (LogRedirector.isLoggable(TAG, Log.VERBOSE)) {
LogRedirector.v(TAG, "onMessage: message=" + message);
}
- 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"