{"action":"created","comment":{"url":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/comments/241922069","pull_request_review_id":185324185,"id":241922069,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTkyMjA2OQ==","diff_hunk":"@@ -87,31 +95,183 @@ public void onCancelled(@NonNull DatabaseError databaseError) {\n         });\n     }\n \n+    //LISTVIEW LISTENERS FOR UPDATING ITEMS\n+    void listViewListener(ListView listView, final List<? extends Info> typeList, final String category, final Context context) {\n+        final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);\n+        final LayoutInflater inflater = LayoutInflater.from(context);\n+        listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\n+            @Override\n+            public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {\n+                String oldInfo = typeList.get(i).getAndroidInfo();\n+                View dialogView;\n+                if (category.equals(\"Condition\") || category.equals(\"Allergy\") || category.equals(\"Substance\")) {\n+                    dialogView = inflater.inflate(R.layout.activity_patient_info_update,null);\n+                }\n+                else if (category.equals(\"Surgery\")) {\n+                    dialogView = inflater.inflate(R.layout.activity_patient_info_update_surgery,null);\n+                }\n+                else if (category.equals(\"DrugReaction\")) {\n+                    dialogView = inflater.inflate(R.layout.activity_patient_info_update_drug_reaction,null);\n+                }\n+                //Drug\n+                else {\n+                    dialogView = inflater.inflate(R.layout.activity_patient_info_update_drug,null);\n+                }\n+                showUpdateInfoString(oldInfo, category, dialogView,dialogBuilder);\n+                return false;\n+            }\n+        });\n+    }\n+\n+\n+    void showUpdateInfoString(final String oldInfo, final String category, View dialogView, AlertDialog.Builder dialogBuilder) {","path":"app/src/main/java/ch/epfl/sweng/vanjel/patientInfo/PatientInfoDatabaseService.java","position":81,"original_position":81,"commit_id":"c93b865cf18d676bb21b701852117bdcdea5ae99","original_commit_id":"c93b865cf18d676bb21b701852117bdcdea5ae99","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Method `showUpdateInfoString` has 53 lines of code (exceeds 40 allowed). Consider refactoring.","created_at":"2018-12-14T23:47:18Z","updated_at":"2018-12-14T23:47:18Z","html_url":"https://github.com/ElCabrino/SDPProject/pull/117#discussion_r241922069","pull_request_url":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/117","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/comments/241922069"},"html":{"href":"https://github.com/ElCabrino/SDPProject/pull/117#discussion_r241922069"},"pull_request":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/117","id":238207760,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MjA3NzYw","html_url":"https://github.com/ElCabrino/SDPProject/pull/117","diff_url":"https://github.com/ElCabrino/SDPProject/pull/117.diff","patch_url":"https://github.com/ElCabrino/SDPProject/pull/117.patch","issue_url":"https://api.github.com/repos/ElCabrino/SDPProject/issues/117","number":117,"state":"open","locked":false,"title":"Patient info update","user":{"login":"Snxdd","id":33453111,"node_id":"MDQ6VXNlcjMzNDUzMTEx","avatar_url":"https://avatars2.githubusercontent.com/u/33453111?v=4","gravatar_id":"","url":"https://api.github.com/users/Snxdd","html_url":"https://github.com/Snxdd","followers_url":"https://api.github.com/users/Snxdd/followers","following_url":"https://api.github.com/users/Snxdd/following{/other_user}","gists_url":"https://api.github.com/users/Snxdd/gists{/gist_id}","starred_url":"https://api.github.com/users/Snxdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snxdd/subscriptions","organizations_url":"https://api.github.com/users/Snxdd/orgs","repos_url":"https://api.github.com/users/Snxdd/repos","events_url":"https://api.github.com/users/Snxdd/events{/privacy}","received_events_url":"https://api.github.com/users/Snxdd/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-12T22:43:37Z","updated_at":"2018-12-14T23:47:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68c039a0101256cbe9df03f10823b0b1d251f2e0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/117/commits","review_comments_url":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/117/comments","review_comment_url":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ElCabrino/SDPProject/issues/117/comments","statuses_url":"https://api.github.com/repos/ElCabrino/SDPProject/statuses/c93b865cf18d676bb21b701852117bdcdea5ae99","head":{"label":"ElCabrino:PatientInfoUpdate","ref":"PatientInfoUpdate","sha":"c93b865cf18d676bb21b701852117bdcdea5ae99","user":{"login":"ElCabrino","id":26007153,"node_id":"MDQ6VXNlcjI2MDA3MTUz","avatar_url":"https://avatars2.githubusercontent.com/u/26007153?v=4","gravatar_id":"","url":"https://api.github.com/users/ElCabrino","html_url":"https://github.com/ElCabrino","followers_url":"https://api.github.com/users/ElCabrino/followers","following_url":"https://api.github.com/users/ElCabrino/following{/other_user}","gists_url":"https://api.github.com/users/ElCabrino/gists{/gist_id}","starred_url":"https://api.github.com/users/ElCabrino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElCabrino/subscriptions","organizations_url":"https://api.github.com/users/ElCabrino/orgs","repos_url":"https://api.github.com/users/ElCabrino/repos","events_url":"https://api.github.com/users/ElCabrino/events{/privacy}","received_events_url":"https://api.github.com/users/ElCabrino/received_events","type":"User","site_admin":false},"repo":{"id":150409157,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0MDkxNTc=","name":"SDPProject","full_name":"ElCabrino/SDPProject","private":false,"owner":{"login":"ElCabrino","id":26007153,"node_id":"MDQ6VXNlcjI2MDA3MTUz","avatar_url":"https://avatars2.githubusercontent.com/u/26007153?v=4","gravatar_id":"","url":"https://api.github.com/users/ElCabrino","html_url":"https://github.com/ElCabrino","followers_url":"https://api.github.com/users/ElCabrino/followers","following_url":"https://api.github.com/users/ElCabrino/following{/other_user}","gists_url":"https://api.github.com/users/ElCabrino/gists{/gist_id}","starred_url":"https://api.github.com/users/ElCabrino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElCabrino/subscriptions","organizations_url":"https://api.github.com/users/ElCabrino/orgs","repos_url":"https://api.github.com/users/ElCabrino/repos","events_url":"https://api.github.com/users/ElCabrino/events{/privacy}","received_events_url":"https://api.github.com/users/ElCabrino/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ElCabrino/SDPProject","description":null,"fork":false,"url":"https://api.github.com/repos/ElCabrino/SDPProject","forks_url":"https://api.github.com/repos/ElCabrino/SDPProject/forks","keys_url":"https://api.github.com/repos/ElCabrino/SDPProject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ElCabrino/SDPProject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ElCabrino/SDPProject/teams","hooks_url":"https://api.github.com/repos/ElCabrino/SDPProject/hooks","issue_events_url":"https://api.github.com/repos/ElCabrino/SDPProject/issues/events{/number}","events_url":"https://api.github.com/repos/ElCabrino/SDPProject/events","assignees_url":"https://api.github.com/repos/ElCabrino/SDPProject/assignees{/user}","branches_url":"https://api.github.com/repos/ElCabrino/SDPProject/branches{/branch}","tags_url":"https://api.github.com/repos/ElCabrino/SDPProject/tags","blobs_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/refs{/sha}","trees_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ElCabrino/SDPProject/statuses/{sha}","languages_url":"https://api.github.com/repos/ElCabrino/SDPProject/languages","stargazers_url":"https://api.github.com/repos/ElCabrino/SDPProject/stargazers","contributors_url":"https://api.github.com/repos/ElCabrino/SDPProject/contributors","subscribers_url":"https://api.github.com/repos/ElCabrino/SDPProject/subscribers","subscription_url":"https://api.github.com/repos/ElCabrino/SDPProject/subscription","commits_url":"https://api.github.com/repos/ElCabrino/SDPProject/commits{/sha}","git_commits_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/commits{/sha}","comments_url":"https://api.github.com/repos/ElCabrino/SDPProject/comments{/number}","issue_comment_url":"https://api.github.com/repos/ElCabrino/SDPProject/issues/comments{/number}","contents_url":"https://api.github.com/repos/ElCabrino/SDPProject/contents/{+path}","compare_url":"https://api.github.com/repos/ElCabrino/SDPProject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ElCabrino/SDPProject/merges","archive_url":"https://api.github.com/repos/ElCabrino/SDPProject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ElCabrino/SDPProject/downloads","issues_url":"https://api.github.com/repos/ElCabrino/SDPProject/issues{/number}","pulls_url":"https://api.github.com/repos/ElCabrino/SDPProject/pulls{/number}","milestones_url":"https://api.github.com/repos/ElCabrino/SDPProject/milestones{/number}","notifications_url":"https://api.github.com/repos/ElCabrino/SDPProject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ElCabrino/SDPProject/labels{/name}","releases_url":"https://api.github.com/repos/ElCabrino/SDPProject/releases{/id}","deployments_url":"https://api.github.com/repos/ElCabrino/SDPProject/deployments","created_at":"2018-09-26T10:27:57Z","updated_at":"2018-12-14T15:01:24Z","pushed_at":"2018-12-14T23:08:57Z","git_url":"git://github.com/ElCabrino/SDPProject.git","ssh_url":"git@github.com:ElCabrino/SDPProject.git","clone_url":"https://github.com/ElCabrino/SDPProject.git","svn_url":"https://github.com/ElCabrino/SDPProject","homepage":null,"size":2912,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":1,"open_issues":10,"watchers":3,"default_branch":"master"}},"base":{"label":"ElCabrino:master","ref":"master","sha":"418a7c4efb9f05ba476b186e519b771ba294aed2","user":{"login":"ElCabrino","id":26007153,"node_id":"MDQ6VXNlcjI2MDA3MTUz","avatar_url":"https://avatars2.githubusercontent.com/u/26007153?v=4","gravatar_id":"","url":"https://api.github.com/users/ElCabrino","html_url":"https://github.com/ElCabrino","followers_url":"https://api.github.com/users/ElCabrino/followers","following_url":"https://api.github.com/users/ElCabrino/following{/other_user}","gists_url":"https://api.github.com/users/ElCabrino/gists{/gist_id}","starred_url":"https://api.github.com/users/ElCabrino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElCabrino/subscriptions","organizations_url":"https://api.github.com/users/ElCabrino/orgs","repos_url":"https://api.github.com/users/ElCabrino/repos","events_url":"https://api.github.com/users/ElCabrino/events{/privacy}","received_events_url":"https://api.github.com/users/ElCabrino/received_events","type":"User","site_admin":false},"repo":{"id":150409157,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0MDkxNTc=","name":"SDPProject","full_name":"ElCabrino/SDPProject","private":false,"owner":{"login":"ElCabrino","id":26007153,"node_id":"MDQ6VXNlcjI2MDA3MTUz","avatar_url":"https://avatars2.githubusercontent.com/u/26007153?v=4","gravatar_id":"","url":"https://api.github.com/users/ElCabrino","html_url":"https://github.com/ElCabrino","followers_url":"https://api.github.com/users/ElCabrino/followers","following_url":"https://api.github.com/users/ElCabrino/following{/other_user}","gists_url":"https://api.github.com/users/ElCabrino/gists{/gist_id}","starred_url":"https://api.github.com/users/ElCabrino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElCabrino/subscriptions","organizations_url":"https://api.github.com/users/ElCabrino/orgs","repos_url":"https://api.github.com/users/ElCabrino/repos","events_url":"https://api.github.com/users/ElCabrino/events{/privacy}","received_events_url":"https://api.github.com/users/ElCabrino/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ElCabrino/SDPProject","description":null,"fork":false,"url":"https://api.github.com/repos/ElCabrino/SDPProject","forks_url":"https://api.github.com/repos/ElCabrino/SDPProject/forks","keys_url":"https://api.github.com/repos/ElCabrino/SDPProject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ElCabrino/SDPProject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ElCabrino/SDPProject/teams","hooks_url":"https://api.github.com/repos/ElCabrino/SDPProject/hooks","issue_events_url":"https://api.github.com/repos/ElCabrino/SDPProject/issues/events{/number}","events_url":"https://api.github.com/repos/ElCabrino/SDPProject/events","assignees_url":"https://api.github.com/repos/ElCabrino/SDPProject/assignees{/user}","branches_url":"https://api.github.com/repos/ElCabrino/SDPProject/branches{/branch}","tags_url":"https://api.github.com/repos/ElCabrino/SDPProject/tags","blobs_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/refs{/sha}","trees_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ElCabrino/SDPProject/statuses/{sha}","languages_url":"https://api.github.com/repos/ElCabrino/SDPProject/languages","stargazers_url":"https://api.github.com/repos/ElCabrino/SDPProject/stargazers","contributors_url":"https://api.github.com/repos/ElCabrino/SDPProject/contributors","subscribers_url":"https://api.github.com/repos/ElCabrino/SDPProject/subscribers","subscription_url":"https://api.github.com/repos/ElCabrino/SDPProject/subscription","commits_url":"https://api.github.com/repos/ElCabrino/SDPProject/commits{/sha}","git_commits_url":"https://api.github.com/repos/ElCabrino/SDPProject/git/commits{/sha}","comments_url":"https://api.github.com/repos/ElCabrino/SDPProject/comments{/number}","issue_comment_url":"https://api.github.com/repos/ElCabrino/SDPProject/issues/comments{/number}","contents_url":"https://api.github.com/repos/ElCabrino/SDPProject/contents/{+path}","compare_url":"https://api.github.com/repos/ElCabrino/SDPProject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ElCabrino/SDPProject/merges","archive_url":"https://api.github.com/repos/ElCabrino/SDPProject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ElCabrino/SDPProject/downloads","issues_url":"https://api.github.com/repos/ElCabrino/SDPProject/issues{/number}","pulls_url":"https://api.github.com/repos/ElCabrino/SDPProject/pulls{/number}","milestones_url":"https://api.github.com/repos/ElCabrino/SDPProject/milestones{/number}","notifications_url":"https://api.github.com/repos/ElCabrino/SDPProject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ElCabrino/SDPProject/labels{/name}","releases_url":"https://api.github.com/repos/ElCabrino/SDPProject/releases{/id}","deployments_url":"https://api.github.com/repos/ElCabrino/SDPProject/deployments","created_at":"2018-09-26T10:27:57Z","updated_at":"2018-12-14T15:01:24Z","pushed_at":"2018-12-14T23:08:57Z","git_url":"git://github.com/ElCabrino/SDPProject.git","ssh_url":"git@github.com:ElCabrino/SDPProject.git","clone_url":"https://github.com/ElCabrino/SDPProject.git","svn_url":"https://github.com/ElCabrino/SDPProject","homepage":null,"size":2912,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":1,"open_issues":10,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/117"},"html":{"href":"https://github.com/ElCabrino/SDPProject/pull/117"},"issue":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/issues/117"},"comments":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/ElCabrino/SDPProject/statuses/c93b865cf18d676bb21b701852117bdcdea5ae99"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"codeclimate"}}