{"action":"created","comment":{"url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/comments/138108246","pull_request_review_id":61860877,"id":138108246,"diff_hunk":"@@ -0,0 +1,49 @@\n+package io.zipcoder.zcw_taskmanager.bankaccount;\n+\n+import java.util.ArrayList;\n+\n+public class BankAccountManager {\n+\t\n+\tprivate static class SingletonHelper {\n+\t\tprivate static final BankAccountManager bankAccountManager = new BankAccountManager();\n+\t}\n+\t\n+\tpublic static BankAccountManager getBankAccountManager() {\n+\t\treturn SingletonHelper.bankAccountManager;\n+\t}\n+\t\n+\tprivate ArrayList<BankAccount> bankAccounts = new ArrayList<BankAccount>();\n+\t\n+\tprivate BankAccountManager() {}\n+\t\n+\tpublic BankAccount findBankAccount(Long id) {\n+\t\tfor(BankAccount account: bankAccounts) {\n+\t\t\tif(account.getId() == id)\n+\t\t\t\treturn account;\n+\t\t}\n+\t\t\n+\t\treturn null;\n+\t}\n+\t\n+\tpublic void addAccount(BankAccount account) {\n+\t\tif(bankAccounts.contains(account))\n+\t\t\treturn;\n+\t\t\n+\t\tbankAccounts.add(account);\n+\t}\n+\t\n+\tpublic void removeAccount(BankAccount account) {\n+\t\tbankAccounts.remove(account);\t\n+\t}\n+\t\n+\tpublic void removeAccount(long id) {\n+\t\tfor(BankAccount account: bankAccounts) {","path":"src/main/java/io/zipcoder/zcw_taskmanager/bankaccount/BankAccountManager.java","position":40,"original_position":40,"commit_id":"1e93f00756a8f081b7c084450124a59b49cd482b","original_commit_id":"1e93f00756a8f081b7c084450124a59b49cd482b","user":{"login":"Git-Leon","id":20891386,"avatar_url":"https://avatars2.githubusercontent.com/u/20891386?v=4","gravatar_id":"","url":"https://api.github.com/users/Git-Leon","html_url":"https://github.com/Git-Leon","followers_url":"https://api.github.com/users/Git-Leon/followers","following_url":"https://api.github.com/users/Git-Leon/following{/other_user}","gists_url":"https://api.github.com/users/Git-Leon/gists{/gist_id}","starred_url":"https://api.github.com/users/Git-Leon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Git-Leon/subscriptions","organizations_url":"https://api.github.com/users/Git-Leon/orgs","repos_url":"https://api.github.com/users/Git-Leon/repos","events_url":"https://api.github.com/users/Git-Leon/events{/privacy}","received_events_url":"https://api.github.com/users/Git-Leon/received_events","type":"User","site_admin":false},"body":"This is a violation of DRY principles.\r\nTo centralize commonalities in this class, consider this method definition:\r\n\r\n```java\r\npublic void removeAccount(long id) {\r\n    removeAccount(findBankAccount(id));\r\n}\r\n```","created_at":"2017-09-11T15:36:21Z","updated_at":"2017-09-11T15:39:37Z","html_url":"https://github.com/Zipcoder/TC-Design-Command-TaskManager/pull/3#discussion_r138108246","pull_request_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/3","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/comments/138108246"},"html":{"href":"https://github.com/Zipcoder/TC-Design-Command-TaskManager/pull/3#discussion_r138108246"},"pull_request":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/3","id":139633504,"html_url":"https://github.com/Zipcoder/TC-Design-Command-TaskManager/pull/3","diff_url":"https://github.com/Zipcoder/TC-Design-Command-TaskManager/pull/3.diff","patch_url":"https://github.com/Zipcoder/TC-Design-Command-TaskManager/pull/3.patch","issue_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/issues/3","number":3,"state":"open","locked":false,"title":"Completed TC-Design-Command-TaskManager part 1-4","user":{"login":"jseunga","id":20195530,"avatar_url":"https://avatars3.githubusercontent.com/u/20195530?v=4","gravatar_id":"","url":"https://api.github.com/users/jseunga","html_url":"https://github.com/jseunga","followers_url":"https://api.github.com/users/jseunga/followers","following_url":"https://api.github.com/users/jseunga/following{/other_user}","gists_url":"https://api.github.com/users/jseunga/gists{/gist_id}","starred_url":"https://api.github.com/users/jseunga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseunga/subscriptions","organizations_url":"https://api.github.com/users/jseunga/orgs","repos_url":"https://api.github.com/users/jseunga/repos","events_url":"https://api.github.com/users/jseunga/events{/privacy}","received_events_url":"https://api.github.com/users/jseunga/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-06T18:30:00Z","updated_at":"2017-09-11T15:39:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"157e33b98181e14d018fdfc20234695e5c198e3e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/issues/3/comments","statuses_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/statuses/1e93f00756a8f081b7c084450124a59b49cd482b","head":{"label":"jseunga:master","ref":"master","sha":"1e93f00756a8f081b7c084450124a59b49cd482b","user":{"login":"jseunga","id":20195530,"avatar_url":"https://avatars3.githubusercontent.com/u/20195530?v=4","gravatar_id":"","url":"https://api.github.com/users/jseunga","html_url":"https://github.com/jseunga","followers_url":"https://api.github.com/users/jseunga/followers","following_url":"https://api.github.com/users/jseunga/following{/other_user}","gists_url":"https://api.github.com/users/jseunga/gists{/gist_id}","starred_url":"https://api.github.com/users/jseunga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseunga/subscriptions","organizations_url":"https://api.github.com/users/jseunga/orgs","repos_url":"https://api.github.com/users/jseunga/repos","events_url":"https://api.github.com/users/jseunga/events{/privacy}","received_events_url":"https://api.github.com/users/jseunga/received_events","type":"User","site_admin":false},"repo":{"id":102612087,"name":"TC-Design-Command-TaskManager","full_name":"jseunga/TC-Design-Command-TaskManager","owner":{"login":"jseunga","id":20195530,"avatar_url":"https://avatars3.githubusercontent.com/u/20195530?v=4","gravatar_id":"","url":"https://api.github.com/users/jseunga","html_url":"https://github.com/jseunga","followers_url":"https://api.github.com/users/jseunga/followers","following_url":"https://api.github.com/users/jseunga/following{/other_user}","gists_url":"https://api.github.com/users/jseunga/gists{/gist_id}","starred_url":"https://api.github.com/users/jseunga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseunga/subscriptions","organizations_url":"https://api.github.com/users/jseunga/orgs","repos_url":"https://api.github.com/users/jseunga/repos","events_url":"https://api.github.com/users/jseunga/events{/privacy}","received_events_url":"https://api.github.com/users/jseunga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jseunga/TC-Design-Command-TaskManager","description":null,"fork":true,"url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager","forks_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/forks","keys_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/teams","hooks_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/hooks","issue_events_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/issues/events{/number}","events_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/events","assignees_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/assignees{/user}","branches_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/branches{/branch}","tags_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/tags","blobs_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/git/refs{/sha}","trees_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/statuses/{sha}","languages_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/languages","stargazers_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/stargazers","contributors_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/contributors","subscribers_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/subscribers","subscription_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/subscription","commits_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/commits{/sha}","git_commits_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/git/commits{/sha}","comments_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/comments{/number}","issue_comment_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/issues/comments{/number}","contents_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/contents/{+path}","compare_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/merges","archive_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/downloads","issues_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/issues{/number}","pulls_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/pulls{/number}","milestones_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/milestones{/number}","notifications_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/labels{/name}","releases_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/releases{/id}","deployments_url":"https://api.github.com/repos/jseunga/TC-Design-Command-TaskManager/deployments","created_at":"2017-09-06T13:29:52Z","updated_at":"2017-09-06T13:29:54Z","pushed_at":"2017-09-06T18:26:09Z","git_url":"git://github.com/jseunga/TC-Design-Command-TaskManager.git","ssh_url":"git@github.com:jseunga/TC-Design-Command-TaskManager.git","clone_url":"https://github.com/jseunga/TC-Design-Command-TaskManager.git","svn_url":"https://github.com/jseunga/TC-Design-Command-TaskManager","homepage":null,"size":18,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Zipcoder:master","ref":"master","sha":"c122466676b91eeb52fdb1c24fd05abdd51616a3","user":{"login":"Zipcoder","id":13836040,"avatar_url":"https://avatars2.githubusercontent.com/u/13836040?v=4","gravatar_id":"","url":"https://api.github.com/users/Zipcoder","html_url":"https://github.com/Zipcoder","followers_url":"https://api.github.com/users/Zipcoder/followers","following_url":"https://api.github.com/users/Zipcoder/following{/other_user}","gists_url":"https://api.github.com/users/Zipcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/Zipcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zipcoder/subscriptions","organizations_url":"https://api.github.com/users/Zipcoder/orgs","repos_url":"https://api.github.com/users/Zipcoder/repos","events_url":"https://api.github.com/users/Zipcoder/events{/privacy}","received_events_url":"https://api.github.com/users/Zipcoder/received_events","type":"Organization","site_admin":false},"repo":{"id":101441430,"name":"TC-Design-Command-TaskManager","full_name":"Zipcoder/TC-Design-Command-TaskManager","owner":{"login":"Zipcoder","id":13836040,"avatar_url":"https://avatars2.githubusercontent.com/u/13836040?v=4","gravatar_id":"","url":"https://api.github.com/users/Zipcoder","html_url":"https://github.com/Zipcoder","followers_url":"https://api.github.com/users/Zipcoder/followers","following_url":"https://api.github.com/users/Zipcoder/following{/other_user}","gists_url":"https://api.github.com/users/Zipcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/Zipcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zipcoder/subscriptions","organizations_url":"https://api.github.com/users/Zipcoder/orgs","repos_url":"https://api.github.com/users/Zipcoder/repos","events_url":"https://api.github.com/users/Zipcoder/events{/privacy}","received_events_url":"https://api.github.com/users/Zipcoder/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Zipcoder/TC-Design-Command-TaskManager","description":null,"fork":false,"url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager","forks_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/forks","keys_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/teams","hooks_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/hooks","issue_events_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/issues/events{/number}","events_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/events","assignees_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/assignees{/user}","branches_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/branches{/branch}","tags_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/tags","blobs_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/statuses/{sha}","languages_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/languages","stargazers_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/stargazers","contributors_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/contributors","subscribers_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/subscribers","subscription_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/subscription","commits_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/contents/{+path}","compare_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/merges","archive_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/downloads","issues_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/issues{/number}","pulls_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls{/number}","milestones_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/milestones{/number}","notifications_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/labels{/name}","releases_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/releases{/id}","deployments_url":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/deployments","created_at":"2017-08-25T20:53:37Z","updated_at":"2017-08-30T14:49:52Z","pushed_at":"2017-09-11T12:49:37Z","git_url":"git://github.com/Zipcoder/TC-Design-Command-TaskManager.git","ssh_url":"git@github.com:Zipcoder/TC-Design-Command-TaskManager.git","clone_url":"https://github.com/Zipcoder/TC-Design-Command-TaskManager.git","svn_url":"https://github.com/Zipcoder/TC-Design-Command-TaskManager","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":21,"forks":32,"open_issues":21,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/3"},"html":{"href":"https://github.com/Zipcoder/TC-Design-Command-TaskManager/pull/3"},"issue":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/issues/3"},"comments":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Zipcoder/TC-Design-Command-TaskManager/statuses/1e93f00756a8f081b7c084450124a59b49cd482b"}},"author_association":"NONE"}}
{"actor":{"display_login":"Git-Leon"}}