{"action":"created","comment":{"url":"https://api.github.com/repos/INRIA/spoon/pulls/comments/46990857","id":46990857,"diff_hunk":"@@ -41,6 +44,20 @@ public void testInsertBegin() throws Exception {\n \t\t\t\t\t\t\t+ constructor.getSimpleName(), \"int i = 0;\",\n \t\t\t\t\tconstructor.getBody().getStatement(1).toString());\n \t\t}\n+\t\t\t\n+\t\tCtConstructor<?> constructor = type.getConstructor(type.getFactory().Type().INTEGER_PRIMITIVE);\n+    String myBeforeStatementAsString = \"int before\";\n+    for (CtSwitch<?> ctSwitch : constructor.getElements(new TypeFilter<CtSwitch<?>>(CtSwitch.class))) {\n+      ctSwitch.insertBefore(type.getFactory().Code()\n+        .createCodeSnippetStatement(myBeforeStatementAsString));\n+    }\n+    assertEquals(\"insert has not been done at the right position\", myBeforeStatementAsString, constructor.getBody().getStatement(3).toString());\n+    assertEquals(\"insert has not been done at the right position\", myBeforeStatementAsString, constructor.getBody().getStatement(5).toString());\n+    assertEquals(\"insert has not been done at the right position\", myBeforeStatementAsString, constructor.getBody().getStatement(7).toString());\n+\n+    assertFalse(\"switch should not be the same\", constructor.getBody().getStatement(6).equals(constructor.getBody().getStatement(8)));","path":"src/test/java/spoon/test/processing/ProcessingTest.java","position":30,"original_position":30,"commit_id":"b70644f35c061a68e48f0c3fb8bcb70c14da4811","original_commit_id":"b70644f35c061a68e48f0c3fb8bcb70c14da4811","user":{"login":"maxcleme","id":7669401,"avatar_url":"https://avatars.githubusercontent.com/u/7669401?v=3","gravatar_id":"","url":"https://api.github.com/users/maxcleme","html_url":"https://github.com/maxcleme","followers_url":"https://api.github.com/users/maxcleme/followers","following_url":"https://api.github.com/users/maxcleme/following{/other_user}","gists_url":"https://api.github.com/users/maxcleme/gists{/gist_id}","starred_url":"https://api.github.com/users/maxcleme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxcleme/subscriptions","organizations_url":"https://api.github.com/users/maxcleme/orgs","repos_url":"https://api.github.com/users/maxcleme/repos","events_url":"https://api.github.com/users/maxcleme/events{/privacy}","received_events_url":"https://api.github.com/users/maxcleme/received_events","type":"User","site_admin":false},"body":"Yes","created_at":"2015-12-08T18:16:26Z","updated_at":"2015-12-08T18:16:26Z","html_url":"https://github.com/INRIA/spoon/pull/450#discussion_r46990857","pull_request_url":"https://api.github.com/repos/INRIA/spoon/pulls/450","_links":{"self":{"href":"https://api.github.com/repos/INRIA/spoon/pulls/comments/46990857"},"html":{"href":"https://github.com/INRIA/spoon/pull/450#discussion_r46990857"},"pull_request":{"href":"https://api.github.com/repos/INRIA/spoon/pulls/450"}}},"pull_request":{"url":"https://api.github.com/repos/INRIA/spoon/pulls/450","id":53006477,"html_url":"https://github.com/INRIA/spoon/pull/450","diff_url":"https://github.com/INRIA/spoon/pull/450.diff","patch_url":"https://github.com/INRIA/spoon/pull/450.patch","issue_url":"https://api.github.com/repos/INRIA/spoon/issues/450","number":450,"state":"open","locked":false,"title":"Fix bug related to \"insertBefore()\" and \"getSignature()\"","user":{"login":"maxcleme","id":7669401,"avatar_url":"https://avatars.githubusercontent.com/u/7669401?v=3","gravatar_id":"","url":"https://api.github.com/users/maxcleme","html_url":"https://github.com/maxcleme","followers_url":"https://api.github.com/users/maxcleme/followers","following_url":"https://api.github.com/users/maxcleme/following{/other_user}","gists_url":"https://api.github.com/users/maxcleme/gists{/gist_id}","starred_url":"https://api.github.com/users/maxcleme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxcleme/subscriptions","organizations_url":"https://api.github.com/users/maxcleme/orgs","repos_url":"https://api.github.com/users/maxcleme/repos","events_url":"https://api.github.com/users/maxcleme/events{/privacy}","received_events_url":"https://api.github.com/users/maxcleme/received_events","type":"User","site_admin":false},"body":"There is the same bug on insertAfter, but i didn't succeed to fix it.","created_at":"2015-12-08T16:50:28Z","updated_at":"2015-12-08T18:16:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da664440ed9657069630bd571caf07b0f4be61c7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/INRIA/spoon/pulls/450/commits","review_comments_url":"https://api.github.com/repos/INRIA/spoon/pulls/450/comments","review_comment_url":"https://api.github.com/repos/INRIA/spoon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/INRIA/spoon/issues/450/comments","statuses_url":"https://api.github.com/repos/INRIA/spoon/statuses/b70644f35c061a68e48f0c3fb8bcb70c14da4811","head":{"label":"maxcleme:master","ref":"master","sha":"b70644f35c061a68e48f0c3fb8bcb70c14da4811","user":{"login":"maxcleme","id":7669401,"avatar_url":"https://avatars.githubusercontent.com/u/7669401?v=3","gravatar_id":"","url":"https://api.github.com/users/maxcleme","html_url":"https://github.com/maxcleme","followers_url":"https://api.github.com/users/maxcleme/followers","following_url":"https://api.github.com/users/maxcleme/following{/other_user}","gists_url":"https://api.github.com/users/maxcleme/gists{/gist_id}","starred_url":"https://api.github.com/users/maxcleme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxcleme/subscriptions","organizations_url":"https://api.github.com/users/maxcleme/orgs","repos_url":"https://api.github.com/users/maxcleme/repos","events_url":"https://api.github.com/users/maxcleme/events{/privacy}","received_events_url":"https://api.github.com/users/maxcleme/received_events","type":"User","site_admin":false},"repo":{"id":47634765,"name":"spoon","full_name":"maxcleme/spoon","owner":{"login":"maxcleme","id":7669401,"avatar_url":"https://avatars.githubusercontent.com/u/7669401?v=3","gravatar_id":"","url":"https://api.github.com/users/maxcleme","html_url":"https://github.com/maxcleme","followers_url":"https://api.github.com/users/maxcleme/followers","following_url":"https://api.github.com/users/maxcleme/following{/other_user}","gists_url":"https://api.github.com/users/maxcleme/gists{/gist_id}","starred_url":"https://api.github.com/users/maxcleme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxcleme/subscriptions","organizations_url":"https://api.github.com/users/maxcleme/orgs","repos_url":"https://api.github.com/users/maxcleme/repos","events_url":"https://api.github.com/users/maxcleme/events{/privacy}","received_events_url":"https://api.github.com/users/maxcleme/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maxcleme/spoon","description":"Spoon is a library for analyzing and transforming Java source code AST (Java 8 included) .","fork":true,"url":"https://api.github.com/repos/maxcleme/spoon","forks_url":"https://api.github.com/repos/maxcleme/spoon/forks","keys_url":"https://api.github.com/repos/maxcleme/spoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maxcleme/spoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maxcleme/spoon/teams","hooks_url":"https://api.github.com/repos/maxcleme/spoon/hooks","issue_events_url":"https://api.github.com/repos/maxcleme/spoon/issues/events{/number}","events_url":"https://api.github.com/repos/maxcleme/spoon/events","assignees_url":"https://api.github.com/repos/maxcleme/spoon/assignees{/user}","branches_url":"https://api.github.com/repos/maxcleme/spoon/branches{/branch}","tags_url":"https://api.github.com/repos/maxcleme/spoon/tags","blobs_url":"https://api.github.com/repos/maxcleme/spoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maxcleme/spoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maxcleme/spoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/maxcleme/spoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maxcleme/spoon/statuses/{sha}","languages_url":"https://api.github.com/repos/maxcleme/spoon/languages","stargazers_url":"https://api.github.com/repos/maxcleme/spoon/stargazers","contributors_url":"https://api.github.com/repos/maxcleme/spoon/contributors","subscribers_url":"https://api.github.com/repos/maxcleme/spoon/subscribers","subscription_url":"https://api.github.com/repos/maxcleme/spoon/subscription","commits_url":"https://api.github.com/repos/maxcleme/spoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/maxcleme/spoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/maxcleme/spoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/maxcleme/spoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/maxcleme/spoon/contents/{+path}","compare_url":"https://api.github.com/repos/maxcleme/spoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maxcleme/spoon/merges","archive_url":"https://api.github.com/repos/maxcleme/spoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maxcleme/spoon/downloads","issues_url":"https://api.github.com/repos/maxcleme/spoon/issues{/number}","pulls_url":"https://api.github.com/repos/maxcleme/spoon/pulls{/number}","milestones_url":"https://api.github.com/repos/maxcleme/spoon/milestones{/number}","notifications_url":"https://api.github.com/repos/maxcleme/spoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maxcleme/spoon/labels{/name}","releases_url":"https://api.github.com/repos/maxcleme/spoon/releases{/id}","created_at":"2015-12-08T16:35:36Z","updated_at":"2015-12-08T16:35:38Z","pushed_at":"2015-12-08T16:46:07Z","git_url":"git://github.com/maxcleme/spoon.git","ssh_url":"git@github.com:maxcleme/spoon.git","clone_url":"https://github.com/maxcleme/spoon.git","svn_url":"https://github.com/maxcleme/spoon","homepage":"http://spoon.gforge.inria.fr/","size":5699,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"INRIA:master","ref":"master","sha":"876d36d8c1b93b65857390fe96ca8f4502524ff2","user":{"login":"INRIA","id":2951919,"avatar_url":"https://avatars.githubusercontent.com/u/2951919?v=3","gravatar_id":"","url":"https://api.github.com/users/INRIA","html_url":"https://github.com/INRIA","followers_url":"https://api.github.com/users/INRIA/followers","following_url":"https://api.github.com/users/INRIA/following{/other_user}","gists_url":"https://api.github.com/users/INRIA/gists{/gist_id}","starred_url":"https://api.github.com/users/INRIA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/INRIA/subscriptions","organizations_url":"https://api.github.com/users/INRIA/orgs","repos_url":"https://api.github.com/users/INRIA/repos","events_url":"https://api.github.com/users/INRIA/events{/privacy}","received_events_url":"https://api.github.com/users/INRIA/received_events","type":"Organization","site_admin":false},"repo":{"id":14176513,"name":"spoon","full_name":"INRIA/spoon","owner":{"login":"INRIA","id":2951919,"avatar_url":"https://avatars.githubusercontent.com/u/2951919?v=3","gravatar_id":"","url":"https://api.github.com/users/INRIA","html_url":"https://github.com/INRIA","followers_url":"https://api.github.com/users/INRIA/followers","following_url":"https://api.github.com/users/INRIA/following{/other_user}","gists_url":"https://api.github.com/users/INRIA/gists{/gist_id}","starred_url":"https://api.github.com/users/INRIA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/INRIA/subscriptions","organizations_url":"https://api.github.com/users/INRIA/orgs","repos_url":"https://api.github.com/users/INRIA/repos","events_url":"https://api.github.com/users/INRIA/events{/privacy}","received_events_url":"https://api.github.com/users/INRIA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/INRIA/spoon","description":"Spoon is a library for analyzing and transforming Java source code AST (Java 8 included) .","fork":false,"url":"https://api.github.com/repos/INRIA/spoon","forks_url":"https://api.github.com/repos/INRIA/spoon/forks","keys_url":"https://api.github.com/repos/INRIA/spoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/INRIA/spoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/INRIA/spoon/teams","hooks_url":"https://api.github.com/repos/INRIA/spoon/hooks","issue_events_url":"https://api.github.com/repos/INRIA/spoon/issues/events{/number}","events_url":"https://api.github.com/repos/INRIA/spoon/events","assignees_url":"https://api.github.com/repos/INRIA/spoon/assignees{/user}","branches_url":"https://api.github.com/repos/INRIA/spoon/branches{/branch}","tags_url":"https://api.github.com/repos/INRIA/spoon/tags","blobs_url":"https://api.github.com/repos/INRIA/spoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/INRIA/spoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/INRIA/spoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/INRIA/spoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/INRIA/spoon/statuses/{sha}","languages_url":"https://api.github.com/repos/INRIA/spoon/languages","stargazers_url":"https://api.github.com/repos/INRIA/spoon/stargazers","contributors_url":"https://api.github.com/repos/INRIA/spoon/contributors","subscribers_url":"https://api.github.com/repos/INRIA/spoon/subscribers","subscription_url":"https://api.github.com/repos/INRIA/spoon/subscription","commits_url":"https://api.github.com/repos/INRIA/spoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/INRIA/spoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/INRIA/spoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/INRIA/spoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/INRIA/spoon/contents/{+path}","compare_url":"https://api.github.com/repos/INRIA/spoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/INRIA/spoon/merges","archive_url":"https://api.github.com/repos/INRIA/spoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/INRIA/spoon/downloads","issues_url":"https://api.github.com/repos/INRIA/spoon/issues{/number}","pulls_url":"https://api.github.com/repos/INRIA/spoon/pulls{/number}","milestones_url":"https://api.github.com/repos/INRIA/spoon/milestones{/number}","notifications_url":"https://api.github.com/repos/INRIA/spoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/INRIA/spoon/labels{/name}","releases_url":"https://api.github.com/repos/INRIA/spoon/releases{/id}","created_at":"2013-11-06T15:29:59Z","updated_at":"2015-12-08T08:47:40Z","pushed_at":"2015-12-08T16:50:30Z","git_url":"git://github.com/INRIA/spoon.git","ssh_url":"git@github.com:INRIA/spoon.git","clone_url":"https://github.com/INRIA/spoon.git","svn_url":"https://github.com/INRIA/spoon","homepage":"http://spoon.gforge.inria.fr/","size":9611,"stargazers_count":175,"watchers_count":175,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":22,"forks":37,"open_issues":22,"watchers":175,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/INRIA/spoon/pulls/450"},"html":{"href":"https://github.com/INRIA/spoon/pull/450"},"issue":{"href":"https://api.github.com/repos/INRIA/spoon/issues/450"},"comments":{"href":"https://api.github.com/repos/INRIA/spoon/issues/450/comments"},"review_comments":{"href":"https://api.github.com/repos/INRIA/spoon/pulls/450/comments"},"review_comment":{"href":"https://api.github.com/repos/INRIA/spoon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/INRIA/spoon/pulls/450/commits"},"statuses":{"href":"https://api.github.com/repos/INRIA/spoon/statuses/b70644f35c061a68e48f0c3fb8bcb70c14da4811"}}}}