{"action":"created","comment":{"url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/comments/101883184","pull_request_review_id":22629059,"id":101883184,"diff_hunk":"@@ -59,5 +59,33 @@ public boolean equals(Object other) {\n     public int hashCode() {\n         return fullName.hashCode();\n     }\n+    \n+    /**\n+     * Returns true of the other name is very similar to this name.\n+     * Two names are considered similar if \n+     * case insensitive \n+     */\n+     public boolean isSimilar(Name other) {\n+         //case-insensitive\n+         String thisNameUnderTest = fullName.toLowerCase();\n+         String otherNameUnderTest = other.fullName.toLowerCase();\n+         \n+         //equal name\n+         if (thisNameUnderTest.equals(otherNameUnderTest)){\n+             return true;\n+         }\n+         \n+         //check for similar names with 2 fields\n+         if (thisNameUnderTest.split(\" \").length==2){\n+             if (otherNameUnderTest.split(\" \").length==2){","path":"src/seedu/addressbook/data/person/Name.java","position":22,"original_position":22,"commit_id":"83b7324faeab9bbda9cfd0b5d588ebcb7b0f682d","original_commit_id":"83b7324faeab9bbda9cfd0b5d588ebcb7b0f682d","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [These nested if statements could be combined](https://www.codacy.com/app/se-edu/AY1617S2-AB-Level2/pullRequest?prid=509432)","created_at":"2017-02-18T03:32:08Z","updated_at":"2017-02-18T03:32:08Z","html_url":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2/pull/760#discussion_r101883184","pull_request_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/760","_links":{"self":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/comments/101883184"},"html":{"href":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2/pull/760#discussion_r101883184"},"pull_request":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/760"}}},"pull_request":{"url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/760","id":105185639,"html_url":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2/pull/760","diff_url":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2/pull/760.diff","patch_url":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2/pull/760.patch","issue_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/issues/760","number":760,"state":"open","locked":false,"title":"[T4A7][F14-A1] Li Heng","user":{"login":"Li-Heng-LH","id":19281581,"avatar_url":"https://avatars.githubusercontent.com/u/19281581?v=3","gravatar_id":"","url":"https://api.github.com/users/Li-Heng-LH","html_url":"https://github.com/Li-Heng-LH","followers_url":"https://api.github.com/users/Li-Heng-LH/followers","following_url":"https://api.github.com/users/Li-Heng-LH/following{/other_user}","gists_url":"https://api.github.com/users/Li-Heng-LH/gists{/gist_id}","starred_url":"https://api.github.com/users/Li-Heng-LH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Li-Heng-LH/subscriptions","organizations_url":"https://api.github.com/users/Li-Heng-LH/orgs","repos_url":"https://api.github.com/users/Li-Heng-LH/repos","events_url":"https://api.github.com/users/Li-Heng-LH/events{/privacy}","received_events_url":"https://api.github.com/users/Li-Heng-LH/received_events","type":"User","site_admin":false},"body":"Ready for review.","created_at":"2017-02-08T10:15:36Z","updated_at":"2017-02-18T03:32:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e3127f95c5de251e7b59603950fbff86716626b","assignee":{"login":"nirandiw","id":1713871,"avatar_url":"https://avatars.githubusercontent.com/u/1713871?v=3","gravatar_id":"","url":"https://api.github.com/users/nirandiw","html_url":"https://github.com/nirandiw","followers_url":"https://api.github.com/users/nirandiw/followers","following_url":"https://api.github.com/users/nirandiw/following{/other_user}","gists_url":"https://api.github.com/users/nirandiw/gists{/gist_id}","starred_url":"https://api.github.com/users/nirandiw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirandiw/subscriptions","organizations_url":"https://api.github.com/users/nirandiw/orgs","repos_url":"https://api.github.com/users/nirandiw/repos","events_url":"https://api.github.com/users/nirandiw/events{/privacy}","received_events_url":"https://api.github.com/users/nirandiw/received_events","type":"User","site_admin":false},"assignees":[{"login":"nirandiw","id":1713871,"avatar_url":"https://avatars.githubusercontent.com/u/1713871?v=3","gravatar_id":"","url":"https://api.github.com/users/nirandiw","html_url":"https://github.com/nirandiw","followers_url":"https://api.github.com/users/nirandiw/followers","following_url":"https://api.github.com/users/nirandiw/following{/other_user}","gists_url":"https://api.github.com/users/nirandiw/gists{/gist_id}","starred_url":"https://api.github.com/users/nirandiw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirandiw/subscriptions","organizations_url":"https://api.github.com/users/nirandiw/orgs","repos_url":"https://api.github.com/users/nirandiw/repos","events_url":"https://api.github.com/users/nirandiw/events{/privacy}","received_events_url":"https://api.github.com/users/nirandiw/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/760/commits","review_comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/760/comments","review_comment_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/issues/760/comments","statuses_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/statuses/83b7324faeab9bbda9cfd0b5d588ebcb7b0f682d","head":{"label":"Li-Heng-LH:T4A7","ref":"T4A7","sha":"83b7324faeab9bbda9cfd0b5d588ebcb7b0f682d","user":{"login":"Li-Heng-LH","id":19281581,"avatar_url":"https://avatars.githubusercontent.com/u/19281581?v=3","gravatar_id":"","url":"https://api.github.com/users/Li-Heng-LH","html_url":"https://github.com/Li-Heng-LH","followers_url":"https://api.github.com/users/Li-Heng-LH/followers","following_url":"https://api.github.com/users/Li-Heng-LH/following{/other_user}","gists_url":"https://api.github.com/users/Li-Heng-LH/gists{/gist_id}","starred_url":"https://api.github.com/users/Li-Heng-LH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Li-Heng-LH/subscriptions","organizations_url":"https://api.github.com/users/Li-Heng-LH/orgs","repos_url":"https://api.github.com/users/Li-Heng-LH/repos","events_url":"https://api.github.com/users/Li-Heng-LH/events{/privacy}","received_events_url":"https://api.github.com/users/Li-Heng-LH/received_events","type":"User","site_admin":false},"repo":{"id":80589737,"name":"addressbook-level2","full_name":"Li-Heng-LH/addressbook-level2","owner":{"login":"Li-Heng-LH","id":19281581,"avatar_url":"https://avatars.githubusercontent.com/u/19281581?v=3","gravatar_id":"","url":"https://api.github.com/users/Li-Heng-LH","html_url":"https://github.com/Li-Heng-LH","followers_url":"https://api.github.com/users/Li-Heng-LH/followers","following_url":"https://api.github.com/users/Li-Heng-LH/following{/other_user}","gists_url":"https://api.github.com/users/Li-Heng-LH/gists{/gist_id}","starred_url":"https://api.github.com/users/Li-Heng-LH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Li-Heng-LH/subscriptions","organizations_url":"https://api.github.com/users/Li-Heng-LH/orgs","repos_url":"https://api.github.com/users/Li-Heng-LH/repos","events_url":"https://api.github.com/users/Li-Heng-LH/events{/privacy}","received_events_url":"https://api.github.com/users/Li-Heng-LH/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Li-Heng-LH/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":true,"url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2","forks_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/forks","keys_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/events","assignees_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/merges","archive_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/Li-Heng-LH/addressbook-level2/deployments","created_at":"2017-02-01T04:33:23Z","updated_at":"2017-02-01T04:33:25Z","pushed_at":"2017-02-16T13:09:43Z","git_url":"git://github.com/Li-Heng-LH/addressbook-level2.git","ssh_url":"git@github.com:Li-Heng-LH/addressbook-level2.git","clone_url":"https://github.com/Li-Heng-LH/addressbook-level2.git","svn_url":"https://github.com/Li-Heng-LH/addressbook-level2","homepage":null,"size":3121,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"nus-cs2103-AY1617S2:master","ref":"master","sha":"7614ce12db98852ef53a42c50c89b87fad0a2872","user":{"login":"nus-cs2103-AY1617S2","id":24604536,"avatar_url":"https://avatars.githubusercontent.com/u/24604536?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-cs2103-AY1617S2","html_url":"https://github.com/nus-cs2103-AY1617S2","followers_url":"https://api.github.com/users/nus-cs2103-AY1617S2/followers","following_url":"https://api.github.com/users/nus-cs2103-AY1617S2/following{/other_user}","gists_url":"https://api.github.com/users/nus-cs2103-AY1617S2/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-cs2103-AY1617S2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-cs2103-AY1617S2/subscriptions","organizations_url":"https://api.github.com/users/nus-cs2103-AY1617S2/orgs","repos_url":"https://api.github.com/users/nus-cs2103-AY1617S2/repos","events_url":"https://api.github.com/users/nus-cs2103-AY1617S2/events{/privacy}","received_events_url":"https://api.github.com/users/nus-cs2103-AY1617S2/received_events","type":"Organization","site_admin":false},"repo":{"id":76956252,"name":"addressbook-level2","full_name":"nus-cs2103-AY1617S2/addressbook-level2","owner":{"login":"nus-cs2103-AY1617S2","id":24604536,"avatar_url":"https://avatars.githubusercontent.com/u/24604536?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-cs2103-AY1617S2","html_url":"https://github.com/nus-cs2103-AY1617S2","followers_url":"https://api.github.com/users/nus-cs2103-AY1617S2/followers","following_url":"https://api.github.com/users/nus-cs2103-AY1617S2/following{/other_user}","gists_url":"https://api.github.com/users/nus-cs2103-AY1617S2/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-cs2103-AY1617S2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-cs2103-AY1617S2/subscriptions","organizations_url":"https://api.github.com/users/nus-cs2103-AY1617S2/orgs","repos_url":"https://api.github.com/users/nus-cs2103-AY1617S2/repos","events_url":"https://api.github.com/users/nus-cs2103-AY1617S2/events{/privacy}","received_events_url":"https://api.github.com/users/nus-cs2103-AY1617S2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":true,"url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2","forks_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/forks","keys_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/events","assignees_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/merges","archive_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/deployments","created_at":"2016-12-20T12:51:37Z","updated_at":"2017-02-01T14:41:26Z","pushed_at":"2017-02-18T03:22:57Z","git_url":"git://github.com/nus-cs2103-AY1617S2/addressbook-level2.git","ssh_url":"git@github.com:nus-cs2103-AY1617S2/addressbook-level2.git","clone_url":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2.git","svn_url":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2","homepage":null,"size":3101,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":166,"mirror_url":null,"open_issues_count":563,"forks":166,"open_issues":563,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/760"},"html":{"href":"https://github.com/nus-cs2103-AY1617S2/addressbook-level2/pull/760"},"issue":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/issues/760"},"comments":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/issues/760/comments"},"review_comments":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/760/comments"},"review_comment":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/pulls/760/commits"},"statuses":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S2/addressbook-level2/statuses/83b7324faeab9bbda9cfd0b5d588ebcb7b0f682d"}}}}
{"actor":{"display_login":"codacy-bot"}}