{"action":"opened","number":233,"pull_request":{"url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls/233","id":93913128,"html_url":"https://github.com/JnRouvignac/AutoRefactor/pull/233","diff_url":"https://github.com/JnRouvignac/AutoRefactor/pull/233.diff","patch_url":"https://github.com/JnRouvignac/AutoRefactor/pull/233.patch","issue_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/233","number":233,"state":"open","locked":false,"title":"Merge conditional blocks","user":{"login":"Fabrice-TIERCELIN","id":20668759,"avatar_url":"https://avatars.githubusercontent.com/u/20668759?v=3","gravatar_id":"","url":"https://api.github.com/users/Fabrice-TIERCELIN","html_url":"https://github.com/Fabrice-TIERCELIN","followers_url":"https://api.github.com/users/Fabrice-TIERCELIN/followers","following_url":"https://api.github.com/users/Fabrice-TIERCELIN/following{/other_user}","gists_url":"https://api.github.com/users/Fabrice-TIERCELIN/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabrice-TIERCELIN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabrice-TIERCELIN/subscriptions","organizations_url":"https://api.github.com/users/Fabrice-TIERCELIN/orgs","repos_url":"https://api.github.com/users/Fabrice-TIERCELIN/repos","events_url":"https://api.github.com/users/Fabrice-TIERCELIN/events{/privacy}","received_events_url":"https://api.github.com/users/Fabrice-TIERCELIN/received_events","type":"User","site_admin":false},"body":"Given:\r\n``` Java\r\nif (i == 0) {\r\n    System.out.println(\"Duplicate\");\r\n} else if (i == 1) {\r\n    System.out.println(\"Duplicate\");\r\n} else {\r\n    System.out.println(\"Different\");\r\n}\r\n```\r\n\r\nWhen:\r\nRefactor\r\n\r\nThen:\r\n``` Java\r\nif ((i == 0) || (i == 1)) {\r\n    System.out.println(\"Duplicate\");\r\n} else {\r\n    System.out.println(\"Different\");\r\n}\r\n```\r\n\r\nIt merges adjacent conditional blocks or ending else block. It is fully compliant with `CommonCodeInIfElseStatementRefactoring`. Both can be run in any order any number of times, the result will still be the same.","created_at":"2016-11-16T07:17:50Z","updated_at":"2016-11-16T07:17:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls/233/commits","review_comments_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls/233/comments","review_comment_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/233/comments","statuses_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/statuses/650f0e5b7049ced3bb6212a0a60c688a57812deb","head":{"label":"Fabrice-TIERCELIN:Merge_conditional_blocks","ref":"Merge_conditional_blocks","sha":"650f0e5b7049ced3bb6212a0a60c688a57812deb","user":{"login":"Fabrice-TIERCELIN","id":20668759,"avatar_url":"https://avatars.githubusercontent.com/u/20668759?v=3","gravatar_id":"","url":"https://api.github.com/users/Fabrice-TIERCELIN","html_url":"https://github.com/Fabrice-TIERCELIN","followers_url":"https://api.github.com/users/Fabrice-TIERCELIN/followers","following_url":"https://api.github.com/users/Fabrice-TIERCELIN/following{/other_user}","gists_url":"https://api.github.com/users/Fabrice-TIERCELIN/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabrice-TIERCELIN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabrice-TIERCELIN/subscriptions","organizations_url":"https://api.github.com/users/Fabrice-TIERCELIN/orgs","repos_url":"https://api.github.com/users/Fabrice-TIERCELIN/repos","events_url":"https://api.github.com/users/Fabrice-TIERCELIN/events{/privacy}","received_events_url":"https://api.github.com/users/Fabrice-TIERCELIN/received_events","type":"User","site_admin":false},"repo":{"id":73846080,"name":"AutoRefactor","full_name":"Fabrice-TIERCELIN/AutoRefactor","owner":{"login":"Fabrice-TIERCELIN","id":20668759,"avatar_url":"https://avatars.githubusercontent.com/u/20668759?v=3","gravatar_id":"","url":"https://api.github.com/users/Fabrice-TIERCELIN","html_url":"https://github.com/Fabrice-TIERCELIN","followers_url":"https://api.github.com/users/Fabrice-TIERCELIN/followers","following_url":"https://api.github.com/users/Fabrice-TIERCELIN/following{/other_user}","gists_url":"https://api.github.com/users/Fabrice-TIERCELIN/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabrice-TIERCELIN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabrice-TIERCELIN/subscriptions","organizations_url":"https://api.github.com/users/Fabrice-TIERCELIN/orgs","repos_url":"https://api.github.com/users/Fabrice-TIERCELIN/repos","events_url":"https://api.github.com/users/Fabrice-TIERCELIN/events{/privacy}","received_events_url":"https://api.github.com/users/Fabrice-TIERCELIN/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Fabrice-TIERCELIN/AutoRefactor","description":"Eclipse plugin to automatically refactor Java code bases","fork":true,"url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor","forks_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/forks","keys_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/teams","hooks_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/hooks","issue_events_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/issues/events{/number}","events_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/events","assignees_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/assignees{/user}","branches_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/branches{/branch}","tags_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/tags","blobs_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/statuses/{sha}","languages_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/languages","stargazers_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/stargazers","contributors_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/contributors","subscribers_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/subscribers","subscription_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/subscription","commits_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/contents/{+path}","compare_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/merges","archive_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/downloads","issues_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/issues{/number}","pulls_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/pulls{/number}","milestones_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/milestones{/number}","notifications_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/labels{/name}","releases_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/releases{/id}","deployments_url":"https://api.github.com/repos/Fabrice-TIERCELIN/AutoRefactor/deployments","created_at":"2016-11-15T19:05:46Z","updated_at":"2016-11-15T19:05:48Z","pushed_at":"2016-11-16T07:15:29Z","git_url":"git://github.com/Fabrice-TIERCELIN/AutoRefactor.git","ssh_url":"git@github.com:Fabrice-TIERCELIN/AutoRefactor.git","clone_url":"https://github.com/Fabrice-TIERCELIN/AutoRefactor.git","svn_url":"https://github.com/Fabrice-TIERCELIN/AutoRefactor","homepage":"http://autorefactor.org","size":2308,"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":"JnRouvignac:master","ref":"master","sha":"4998630151bffb0c33200464accf4ebb76c45001","user":{"login":"JnRouvignac","id":3717323,"avatar_url":"https://avatars.githubusercontent.com/u/3717323?v=3","gravatar_id":"","url":"https://api.github.com/users/JnRouvignac","html_url":"https://github.com/JnRouvignac","followers_url":"https://api.github.com/users/JnRouvignac/followers","following_url":"https://api.github.com/users/JnRouvignac/following{/other_user}","gists_url":"https://api.github.com/users/JnRouvignac/gists{/gist_id}","starred_url":"https://api.github.com/users/JnRouvignac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JnRouvignac/subscriptions","organizations_url":"https://api.github.com/users/JnRouvignac/orgs","repos_url":"https://api.github.com/users/JnRouvignac/repos","events_url":"https://api.github.com/users/JnRouvignac/events{/privacy}","received_events_url":"https://api.github.com/users/JnRouvignac/received_events","type":"User","site_admin":false},"repo":{"id":8567172,"name":"AutoRefactor","full_name":"JnRouvignac/AutoRefactor","owner":{"login":"JnRouvignac","id":3717323,"avatar_url":"https://avatars.githubusercontent.com/u/3717323?v=3","gravatar_id":"","url":"https://api.github.com/users/JnRouvignac","html_url":"https://github.com/JnRouvignac","followers_url":"https://api.github.com/users/JnRouvignac/followers","following_url":"https://api.github.com/users/JnRouvignac/following{/other_user}","gists_url":"https://api.github.com/users/JnRouvignac/gists{/gist_id}","starred_url":"https://api.github.com/users/JnRouvignac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JnRouvignac/subscriptions","organizations_url":"https://api.github.com/users/JnRouvignac/orgs","repos_url":"https://api.github.com/users/JnRouvignac/repos","events_url":"https://api.github.com/users/JnRouvignac/events{/privacy}","received_events_url":"https://api.github.com/users/JnRouvignac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JnRouvignac/AutoRefactor","description":"Eclipse plugin to automatically refactor Java code bases","fork":false,"url":"https://api.github.com/repos/JnRouvignac/AutoRefactor","forks_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/forks","keys_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/teams","hooks_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/hooks","issue_events_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/events{/number}","events_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/events","assignees_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/assignees{/user}","branches_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/branches{/branch}","tags_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/tags","blobs_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/git/refs{/sha}","trees_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/statuses/{sha}","languages_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/languages","stargazers_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/stargazers","contributors_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/contributors","subscribers_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/subscribers","subscription_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/subscription","commits_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/commits{/sha}","git_commits_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/git/commits{/sha}","comments_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/comments{/number}","issue_comment_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/comments{/number}","contents_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/contents/{+path}","compare_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/merges","archive_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/downloads","issues_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues{/number}","pulls_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls{/number}","milestones_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/milestones{/number}","notifications_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/labels{/name}","releases_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/releases{/id}","deployments_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/deployments","created_at":"2013-03-04T23:05:16Z","updated_at":"2016-11-14T16:10:09Z","pushed_at":"2016-11-15T22:38:41Z","git_url":"git://github.com/JnRouvignac/AutoRefactor.git","ssh_url":"git@github.com:JnRouvignac/AutoRefactor.git","clone_url":"https://github.com/JnRouvignac/AutoRefactor.git","svn_url":"https://github.com/JnRouvignac/AutoRefactor","homepage":"http://autorefactor.org","size":2944,"stargazers_count":121,"watchers_count":121,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":99,"forks":21,"open_issues":99,"watchers":121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls/233"},"html":{"href":"https://github.com/JnRouvignac/AutoRefactor/pull/233"},"issue":{"href":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/233"},"comments":{"href":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/233/comments"},"review_comments":{"href":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls/233/comments"},"review_comment":{"href":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JnRouvignac/AutoRefactor/pulls/233/commits"},"statuses":{"href":"https://api.github.com/repos/JnRouvignac/AutoRefactor/statuses/650f0e5b7049ced3bb6212a0a60c688a57812deb"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":431,"deletions":0,"changed_files":4}}
{"actor":{"display_login":"Fabrice-TIERCELIN"}}