{"action":"created","comment":{"url":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/comments/24226583","id":24226583,"diff_hunk":"@@ -98,12 +96,7 @@ public boolean containsAll(Collection c) {\n \n \t@Override\n \tpublic int indexOf(Object element) {\n-\t\tfor (int i = 0; i < array.length; i++) {\n-\t\t\t// copy paste\n-\t\t\tif (element == null ? get(i) == null : element.equals(get(i)))\n-\t\t\t\treturn i;\n-\t\t}\n-\t\treturn -1;\n+\t\treturn lastIndexOf(element);","path":"src/main/java/cow/farm/utils/LukaszGenericArrayList.java","position":25,"original_position":25,"commit_id":"9cd6543a5c6b582cd4fc998271d019e9a70463a7","original_commit_id":"9cd6543a5c6b582cd4fc998271d019e9a70463a7","user":{"login":"jkiljanski","id":2161296,"avatar_url":"https://avatars.githubusercontent.com/u/2161296?v=3","gravatar_id":"","url":"https://api.github.com/users/jkiljanski","html_url":"https://github.com/jkiljanski","followers_url":"https://api.github.com/users/jkiljanski/followers","following_url":"https://api.github.com/users/jkiljanski/following{/other_user}","gists_url":"https://api.github.com/users/jkiljanski/gists{/gist_id}","starred_url":"https://api.github.com/users/jkiljanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkiljanski/subscriptions","organizations_url":"https://api.github.com/users/jkiljanski/orgs","repos_url":"https://api.github.com/users/jkiljanski/repos","events_url":"https://api.github.com/users/jkiljanski/events{/privacy}","received_events_url":"https://api.github.com/users/jkiljanski/received_events","type":"User","site_admin":false},"body":"you should see javadoc for this method in interface, indexOf means something different than lastIndexOf. If you want to remove copy paste you can also extract to some private method that has usage in both public methods.","created_at":"2015-02-06T07:45:07Z","updated_at":"2015-02-06T07:45:07Z","html_url":"https://github.com/jkiljanski/lukas-learn/pull/5#discussion_r24226583","pull_request_url":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/comments/24226583"},"html":{"href":"https://github.com/jkiljanski/lukas-learn/pull/5#discussion_r24226583"},"pull_request":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/5","id":28747383,"html_url":"https://github.com/jkiljanski/lukas-learn/pull/5","diff_url":"https://github.com/jkiljanski/lukas-learn/pull/5.diff","patch_url":"https://github.com/jkiljanski/lukas-learn/pull/5.patch","issue_url":"https://api.github.com/repos/jkiljanski/lukas-learn/issues/5","number":5,"state":"open","locked":false,"title":"Fix copy paste","user":{"login":"bauli","id":10715667,"avatar_url":"https://avatars.githubusercontent.com/u/10715667?v=3","gravatar_id":"","url":"https://api.github.com/users/bauli","html_url":"https://github.com/bauli","followers_url":"https://api.github.com/users/bauli/followers","following_url":"https://api.github.com/users/bauli/following{/other_user}","gists_url":"https://api.github.com/users/bauli/gists{/gist_id}","starred_url":"https://api.github.com/users/bauli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bauli/subscriptions","organizations_url":"https://api.github.com/users/bauli/orgs","repos_url":"https://api.github.com/users/bauli/repos","events_url":"https://api.github.com/users/bauli/events{/privacy}","received_events_url":"https://api.github.com/users/bauli/received_events","type":"User","site_admin":false},"body":"FIX: FIxed copy-paste in three metods.\r\n\r\nTry to learn new way of working with projects. \r\nCorrect me if I do it wrong.\r\n","created_at":"2015-02-05T18:12:26Z","updated_at":"2015-02-06T07:45:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6728d1928608521cf14bf5c8a0755aba5e7e37f2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/5/commits","review_comments_url":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/5/comments","review_comment_url":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jkiljanski/lukas-learn/issues/5/comments","statuses_url":"https://api.github.com/repos/jkiljanski/lukas-learn/statuses/9cd6543a5c6b582cd4fc998271d019e9a70463a7","head":{"label":"jkiljanski:FIX_copyPaste","ref":"FIX_copyPaste","sha":"9cd6543a5c6b582cd4fc998271d019e9a70463a7","user":{"login":"jkiljanski","id":2161296,"avatar_url":"https://avatars.githubusercontent.com/u/2161296?v=3","gravatar_id":"","url":"https://api.github.com/users/jkiljanski","html_url":"https://github.com/jkiljanski","followers_url":"https://api.github.com/users/jkiljanski/followers","following_url":"https://api.github.com/users/jkiljanski/following{/other_user}","gists_url":"https://api.github.com/users/jkiljanski/gists{/gist_id}","starred_url":"https://api.github.com/users/jkiljanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkiljanski/subscriptions","organizations_url":"https://api.github.com/users/jkiljanski/orgs","repos_url":"https://api.github.com/users/jkiljanski/repos","events_url":"https://api.github.com/users/jkiljanski/events{/privacy}","received_events_url":"https://api.github.com/users/jkiljanski/received_events","type":"User","site_admin":false},"repo":{"id":30125713,"name":"lukas-learn","full_name":"jkiljanski/lukas-learn","owner":{"login":"jkiljanski","id":2161296,"avatar_url":"https://avatars.githubusercontent.com/u/2161296?v=3","gravatar_id":"","url":"https://api.github.com/users/jkiljanski","html_url":"https://github.com/jkiljanski","followers_url":"https://api.github.com/users/jkiljanski/followers","following_url":"https://api.github.com/users/jkiljanski/following{/other_user}","gists_url":"https://api.github.com/users/jkiljanski/gists{/gist_id}","starred_url":"https://api.github.com/users/jkiljanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkiljanski/subscriptions","organizations_url":"https://api.github.com/users/jkiljanski/orgs","repos_url":"https://api.github.com/users/jkiljanski/repos","events_url":"https://api.github.com/users/jkiljanski/events{/privacy}","received_events_url":"https://api.github.com/users/jkiljanski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jkiljanski/lukas-learn","description":"first lukas project for learn purposes","fork":false,"url":"https://api.github.com/repos/jkiljanski/lukas-learn","forks_url":"https://api.github.com/repos/jkiljanski/lukas-learn/forks","keys_url":"https://api.github.com/repos/jkiljanski/lukas-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkiljanski/lukas-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkiljanski/lukas-learn/teams","hooks_url":"https://api.github.com/repos/jkiljanski/lukas-learn/hooks","issue_events_url":"https://api.github.com/repos/jkiljanski/lukas-learn/issues/events{/number}","events_url":"https://api.github.com/repos/jkiljanski/lukas-learn/events","assignees_url":"https://api.github.com/repos/jkiljanski/lukas-learn/assignees{/user}","branches_url":"https://api.github.com/repos/jkiljanski/lukas-learn/branches{/branch}","tags_url":"https://api.github.com/repos/jkiljanski/lukas-learn/tags","blobs_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkiljanski/lukas-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/jkiljanski/lukas-learn/languages","stargazers_url":"https://api.github.com/repos/jkiljanski/lukas-learn/stargazers","contributors_url":"https://api.github.com/repos/jkiljanski/lukas-learn/contributors","subscribers_url":"https://api.github.com/repos/jkiljanski/lukas-learn/subscribers","subscription_url":"https://api.github.com/repos/jkiljanski/lukas-learn/subscription","commits_url":"https://api.github.com/repos/jkiljanski/lukas-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkiljanski/lukas-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkiljanski/lukas-learn/issues/comments/{number}","contents_url":"https://api.github.com/repos/jkiljanski/lukas-learn/contents/{+path}","compare_url":"https://api.github.com/repos/jkiljanski/lukas-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkiljanski/lukas-learn/merges","archive_url":"https://api.github.com/repos/jkiljanski/lukas-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkiljanski/lukas-learn/downloads","issues_url":"https://api.github.com/repos/jkiljanski/lukas-learn/issues{/number}","pulls_url":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/jkiljanski/lukas-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/jkiljanski/lukas-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkiljanski/lukas-learn/labels{/name}","releases_url":"https://api.github.com/repos/jkiljanski/lukas-learn/releases{/id}","created_at":"2015-01-31T20:44:43Z","updated_at":"2015-02-04T20:06:23Z","pushed_at":"2015-02-05T22:17:56Z","git_url":"git://github.com/jkiljanski/lukas-learn.git","ssh_url":"git@github.com:jkiljanski/lukas-learn.git","clone_url":"https://github.com/jkiljanski/lukas-learn.git","svn_url":"https://github.com/jkiljanski/lukas-learn","homepage":null,"size":0,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"jkiljanski:master","ref":"master","sha":"71b46cb70c84954e75b9fe34ae2d9c0d6589afa9","user":{"login":"jkiljanski","id":2161296,"avatar_url":"https://avatars.githubusercontent.com/u/2161296?v=3","gravatar_id":"","url":"https://api.github.com/users/jkiljanski","html_url":"https://github.com/jkiljanski","followers_url":"https://api.github.com/users/jkiljanski/followers","following_url":"https://api.github.com/users/jkiljanski/following{/other_user}","gists_url":"https://api.github.com/users/jkiljanski/gists{/gist_id}","starred_url":"https://api.github.com/users/jkiljanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkiljanski/subscriptions","organizations_url":"https://api.github.com/users/jkiljanski/orgs","repos_url":"https://api.github.com/users/jkiljanski/repos","events_url":"https://api.github.com/users/jkiljanski/events{/privacy}","received_events_url":"https://api.github.com/users/jkiljanski/received_events","type":"User","site_admin":false},"repo":{"id":30125713,"name":"lukas-learn","full_name":"jkiljanski/lukas-learn","owner":{"login":"jkiljanski","id":2161296,"avatar_url":"https://avatars.githubusercontent.com/u/2161296?v=3","gravatar_id":"","url":"https://api.github.com/users/jkiljanski","html_url":"https://github.com/jkiljanski","followers_url":"https://api.github.com/users/jkiljanski/followers","following_url":"https://api.github.com/users/jkiljanski/following{/other_user}","gists_url":"https://api.github.com/users/jkiljanski/gists{/gist_id}","starred_url":"https://api.github.com/users/jkiljanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkiljanski/subscriptions","organizations_url":"https://api.github.com/users/jkiljanski/orgs","repos_url":"https://api.github.com/users/jkiljanski/repos","events_url":"https://api.github.com/users/jkiljanski/events{/privacy}","received_events_url":"https://api.github.com/users/jkiljanski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jkiljanski/lukas-learn","description":"first lukas project for learn purposes","fork":false,"url":"https://api.github.com/repos/jkiljanski/lukas-learn","forks_url":"https://api.github.com/repos/jkiljanski/lukas-learn/forks","keys_url":"https://api.github.com/repos/jkiljanski/lukas-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkiljanski/lukas-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkiljanski/lukas-learn/teams","hooks_url":"https://api.github.com/repos/jkiljanski/lukas-learn/hooks","issue_events_url":"https://api.github.com/repos/jkiljanski/lukas-learn/issues/events{/number}","events_url":"https://api.github.com/repos/jkiljanski/lukas-learn/events","assignees_url":"https://api.github.com/repos/jkiljanski/lukas-learn/assignees{/user}","branches_url":"https://api.github.com/repos/jkiljanski/lukas-learn/branches{/branch}","tags_url":"https://api.github.com/repos/jkiljanski/lukas-learn/tags","blobs_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkiljanski/lukas-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/jkiljanski/lukas-learn/languages","stargazers_url":"https://api.github.com/repos/jkiljanski/lukas-learn/stargazers","contributors_url":"https://api.github.com/repos/jkiljanski/lukas-learn/contributors","subscribers_url":"https://api.github.com/repos/jkiljanski/lukas-learn/subscribers","subscription_url":"https://api.github.com/repos/jkiljanski/lukas-learn/subscription","commits_url":"https://api.github.com/repos/jkiljanski/lukas-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkiljanski/lukas-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkiljanski/lukas-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkiljanski/lukas-learn/issues/comments/{number}","contents_url":"https://api.github.com/repos/jkiljanski/lukas-learn/contents/{+path}","compare_url":"https://api.github.com/repos/jkiljanski/lukas-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkiljanski/lukas-learn/merges","archive_url":"https://api.github.com/repos/jkiljanski/lukas-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkiljanski/lukas-learn/downloads","issues_url":"https://api.github.com/repos/jkiljanski/lukas-learn/issues{/number}","pulls_url":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/jkiljanski/lukas-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/jkiljanski/lukas-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkiljanski/lukas-learn/labels{/name}","releases_url":"https://api.github.com/repos/jkiljanski/lukas-learn/releases{/id}","created_at":"2015-01-31T20:44:43Z","updated_at":"2015-02-04T20:06:23Z","pushed_at":"2015-02-05T22:17:56Z","git_url":"git://github.com/jkiljanski/lukas-learn.git","ssh_url":"git@github.com:jkiljanski/lukas-learn.git","clone_url":"https://github.com/jkiljanski/lukas-learn.git","svn_url":"https://github.com/jkiljanski/lukas-learn","homepage":null,"size":0,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/5"},"html":{"href":"https://github.com/jkiljanski/lukas-learn/pull/5"},"issue":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/issues/5"},"comments":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/jkiljanski/lukas-learn/statuses/9cd6543a5c6b582cd4fc998271d019e9a70463a7"}}}}