{"action":"opened","issue":{"url":"https://api.github.com/repos/virtual-labs/digital-logic-design-iiith/issues/106","repository_url":"https://api.github.com/repos/virtual-labs/digital-logic-design-iiith","labels_url":"https://api.github.com/repos/virtual-labs/digital-logic-design-iiith/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/virtual-labs/digital-logic-design-iiith/issues/106/comments","events_url":"https://api.github.com/repos/virtual-labs/digital-logic-design-iiith/issues/106/events","html_url":"https://github.com/virtual-labs/digital-logic-design-iiith/issues/106","id":376339611,"node_id":"MDU6SXNzdWUzNzYzMzk2MTE=","number":106,"title":"The method draw() has an NPath complexity of 1680","user":{"login":"BSravanthi","id":13479177,"node_id":"MDQ6VXNlcjEzNDc5MTc3","avatar_url":"https://avatars2.githubusercontent.com/u/13479177?v=4","gravatar_id":"","url":"https://api.github.com/users/BSravanthi","html_url":"https://github.com/BSravanthi","followers_url":"https://api.github.com/users/BSravanthi/followers","following_url":"https://api.github.com/users/BSravanthi/following{/other_user}","gists_url":"https://api.github.com/users/BSravanthi/gists{/gist_id}","starred_url":"https://api.github.com/users/BSravanthi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BSravanthi/subscriptions","organizations_url":"https://api.github.com/users/BSravanthi/orgs","repos_url":"https://api.github.com/users/BSravanthi/repos","events_url":"https://api.github.com/users/BSravanthi/events{/privacy}","received_events_url":"https://api.github.com/users/BSravanthi/received_events","type":"User","site_admin":false},"labels":[{"id":1109563902,"node_id":"MDU6TGFiZWwxMTA5NTYzOTAy","url":"https://api.github.com/repos/virtual-labs/digital-logic-design-iiith/labels/2018-Open","name":"2018-Open","color":"e570b6","default":false},{"id":1112508361,"node_id":"MDU6TGFiZWwxMTEyNTA4MzYx","url":"https://api.github.com/repos/virtual-labs/digital-logic-design-iiith/labels/category:error-prone","name":"category:error-prone","color":"1bc421","default":false},{"id":1112491864,"node_id":"MDU6TGFiZWwxMTEyNDkxODY0","url":"https://api.github.com/repos/virtual-labs/digital-logic-design-iiith/labels/static-code-analysis","name":"static-code-analysis","color":"9bfc67","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-01T10:40:23Z","updated_at":"2018-11-01T10:40:23Z","closed_at":null,"author_association":"NONE","body":"The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity and increase readability.\r\n\r\nExample(s):\r\n```\r\nvoid bar() {\t// this is something more complex than it needs to be,\r\n\tif (y) {\t// it should be broken down into smaller methods or functions\r\n\t\tfor (j = 0; j < m; j++) {\r\n\t\t\tif (j > r) {\r\n\t\t\t\tdoSomething();\r\n\t\t\t\twhile (f < 5 ) {\r\n\t\t\t\t\tanotherThing();\r\n\t\t\t\t\tf -= 27;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttryThis();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( r - n > 45) {\r\n\t\t   while (doMagic()) {\r\n\t\t      findRabbits();\r\n\t\t   }\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tdoSomethingDangerous();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tmakeAmends();\r\n\t\t\t} finally {\r\n\t\t\t\tdontDoItAgain();\r\n\t\t\t\t}\r\n\t}\r\n}\r\n```\r\n**Please refer to the following link to fix similar issues.**\r\nhttps://app.codacy.com/app/BSravanthi/digital-logic-design-iiith/issues?&filters=W3siaWQiOiJMYW5ndWFnZSIsInZhbHVlcyI6W251bGxdfSx7ImlkIjoiQ2F0ZWdvcnkiLCJ2YWx1ZXMiOlsiRXJyb3IgUHJvbmUiXX0seyJpZCI6IkxldmVsIiwidmFsdWVzIjpbbnVsbF19LHsiaWQiOiJQYXR0ZXJuIiwidmFsdWVzIjpbMTA0N119LHsidmFsdWVzIjpbXX1d"}}
{"actor":{"display_login":"BSravanthi"}}