{"action":"created","comment":{"url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/comments/37272118","id":37272118,"diff_hunk":"@@ -0,0 +1,106 @@\n+/*\n+ * SonarQube JavaScript Plugin\n+ * Copyright (C) 2011 SonarSource and Eriks Nukis\n+ * sonarqube@googlegroups.com\n+ *\n+ * This program is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 3 of the License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this program; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\n+ */\n+package org.sonar.javascript.tree.impl.declaration;\n+\n+import com.google.common.base.Preconditions;\n+import com.google.common.collect.Iterators;\n+import org.sonar.javascript.tree.impl.JavaScriptTree;\n+import org.sonar.javascript.tree.impl.lexical.InternalSyntaxToken;\n+import org.sonar.javascript.tree.impl.statement.BlockTreeImpl;\n+import org.sonar.plugins.javascript.api.tree.Tree;\n+import org.sonar.plugins.javascript.api.tree.declaration.GeneratorMethodDeclarationTree;\n+import org.sonar.plugins.javascript.api.tree.declaration.ParameterListTree;\n+import org.sonar.plugins.javascript.api.tree.expression.ExpressionTree;\n+import org.sonar.plugins.javascript.api.tree.lexical.SyntaxToken;\n+import org.sonar.plugins.javascript.api.visitors.TreeVisitor;\n+\n+import javax.annotation.Nullable;\n+import java.util.Iterator;\n+\n+public class GeneratorMethodDeclarationTreeImpl extends JavaScriptTree implements GeneratorMethodDeclarationTree {\n+\n+  private final Kind kind;\n+  private InternalSyntaxToken staticToken;\n+  private final InternalSyntaxToken starToken;\n+  private final ExpressionTree name;\n+  private final ParameterListTreeImpl parameters;\n+  private final BlockTreeImpl body;\n+\n+  public GeneratorMethodDeclarationTreeImpl(\n+      InternalSyntaxToken starToken,\n+      ExpressionTree name,\n+      ParameterListTreeImpl parameters,\n+      BlockTreeImpl body) {\n+\n+    this.kind = Kind.GENERATOR_METHOD;\n+    this.starToken = starToken;\n+    this.name = name;\n+    this.parameters = parameters;\n+    this.body = body;\n+  }\n+\n+  public GeneratorMethodDeclarationTreeImpl completeWithStaticToken(InternalSyntaxToken staticToken) {\n+    this.staticToken = staticToken;\n+\n+    return this;\n+  }\n+\n+  @Nullable","path":"javascript-frontend/src/main/java/org/sonar/javascript/tree/impl/declaration/GeneratorMethodDeclarationTreeImpl.java","position":65,"original_position":65,"commit_id":"9875e4b759aafcdb58d8383073307e4421c9797d","original_commit_id":"9875e4b759aafcdb58d8383073307e4421c9797d","user":{"login":"vilchik-elena","id":10108186,"avatar_url":"https://avatars.githubusercontent.com/u/10108186?v=3","gravatar_id":"","url":"https://api.github.com/users/vilchik-elena","html_url":"https://github.com/vilchik-elena","followers_url":"https://api.github.com/users/vilchik-elena/followers","following_url":"https://api.github.com/users/vilchik-elena/following{/other_user}","gists_url":"https://api.github.com/users/vilchik-elena/gists{/gist_id}","starred_url":"https://api.github.com/users/vilchik-elena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vilchik-elena/subscriptions","organizations_url":"https://api.github.com/users/vilchik-elena/orgs","repos_url":"https://api.github.com/users/vilchik-elena/repos","events_url":"https://api.github.com/users/vilchik-elena/events{/privacy}","received_events_url":"https://api.github.com/users/vilchik-elena/received_events","type":"User","site_admin":false},"body":"@lindamartin this `@Nullable` belongs to staticToken","created_at":"2015-08-18T07:45:33Z","updated_at":"2015-08-18T07:45:33Z","html_url":"https://github.com/SonarCommunity/sonar-javascript/pull/80#discussion_r37272118","pull_request_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/80","_links":{"self":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/comments/37272118"},"html":{"href":"https://github.com/SonarCommunity/sonar-javascript/pull/80#discussion_r37272118"},"pull_request":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/80","id":42601517,"html_url":"https://github.com/SonarCommunity/sonar-javascript/pull/80","diff_url":"https://github.com/SonarCommunity/sonar-javascript/pull/80.diff","patch_url":"https://github.com/SonarCommunity/sonar-javascript/pull/80.patch","issue_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/80","number":80,"state":"open","locked":false,"title":"Create *TreeImpl for accessor and generator method","user":{"login":"vilchik-elena","id":10108186,"avatar_url":"https://avatars.githubusercontent.com/u/10108186?v=3","gravatar_id":"","url":"https://api.github.com/users/vilchik-elena","html_url":"https://github.com/vilchik-elena","followers_url":"https://api.github.com/users/vilchik-elena/followers","following_url":"https://api.github.com/users/vilchik-elena/following{/other_user}","gists_url":"https://api.github.com/users/vilchik-elena/gists{/gist_id}","starred_url":"https://api.github.com/users/vilchik-elena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vilchik-elena/subscriptions","organizations_url":"https://api.github.com/users/vilchik-elena/orgs","repos_url":"https://api.github.com/users/vilchik-elena/repos","events_url":"https://api.github.com/users/vilchik-elena/events{/privacy}","received_events_url":"https://api.github.com/users/vilchik-elena/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-17T15:36:06Z","updated_at":"2015-08-18T07:45:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd7714d80f12c81e7233283f8bf9911a7e77a0b0","assignee":{"login":"lindamartin","id":5627510,"avatar_url":"https://avatars.githubusercontent.com/u/5627510?v=3","gravatar_id":"","url":"https://api.github.com/users/lindamartin","html_url":"https://github.com/lindamartin","followers_url":"https://api.github.com/users/lindamartin/followers","following_url":"https://api.github.com/users/lindamartin/following{/other_user}","gists_url":"https://api.github.com/users/lindamartin/gists{/gist_id}","starred_url":"https://api.github.com/users/lindamartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindamartin/subscriptions","organizations_url":"https://api.github.com/users/lindamartin/orgs","repos_url":"https://api.github.com/users/lindamartin/repos","events_url":"https://api.github.com/users/lindamartin/events{/privacy}","received_events_url":"https://api.github.com/users/lindamartin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/80/commits","review_comments_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/80/comments","review_comment_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/80/comments","statuses_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/statuses/9875e4b759aafcdb58d8383073307e4421c9797d","head":{"label":"SonarCommunity:method-impl","ref":"method-impl","sha":"9875e4b759aafcdb58d8383073307e4421c9797d","user":{"login":"SonarCommunity","id":1303819,"avatar_url":"https://avatars.githubusercontent.com/u/1303819?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarCommunity","html_url":"https://github.com/SonarCommunity","followers_url":"https://api.github.com/users/SonarCommunity/followers","following_url":"https://api.github.com/users/SonarCommunity/following{/other_user}","gists_url":"https://api.github.com/users/SonarCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarCommunity/subscriptions","organizations_url":"https://api.github.com/users/SonarCommunity/orgs","repos_url":"https://api.github.com/users/SonarCommunity/repos","events_url":"https://api.github.com/users/SonarCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/SonarCommunity/received_events","type":"Organization","site_admin":false},"repo":{"id":4335519,"name":"sonar-javascript","full_name":"SonarCommunity/sonar-javascript","owner":{"login":"SonarCommunity","id":1303819,"avatar_url":"https://avatars.githubusercontent.com/u/1303819?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarCommunity","html_url":"https://github.com/SonarCommunity","followers_url":"https://api.github.com/users/SonarCommunity/followers","following_url":"https://api.github.com/users/SonarCommunity/following{/other_user}","gists_url":"https://api.github.com/users/SonarCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarCommunity/subscriptions","organizations_url":"https://api.github.com/users/SonarCommunity/orgs","repos_url":"https://api.github.com/users/SonarCommunity/repos","events_url":"https://api.github.com/users/SonarCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/SonarCommunity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarCommunity/sonar-javascript","description":"","fork":false,"url":"https://api.github.com/repos/SonarCommunity/sonar-javascript","forks_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/forks","keys_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/teams","hooks_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/hooks","issue_events_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/events","assignees_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/tags","blobs_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/languages","stargazers_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/stargazers","contributors_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/contributors","subscribers_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/subscribers","subscription_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/subscription","commits_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/merges","archive_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/downloads","issues_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/labels{/name}","releases_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/releases{/id}","created_at":"2012-05-15T12:35:38Z","updated_at":"2015-08-07T16:23:08Z","pushed_at":"2015-08-17T20:41:52Z","git_url":"git://github.com/SonarCommunity/sonar-javascript.git","ssh_url":"git@github.com:SonarCommunity/sonar-javascript.git","clone_url":"https://github.com/SonarCommunity/sonar-javascript.git","svn_url":"https://github.com/SonarCommunity/sonar-javascript","homepage":"http://docs.codehaus.org/display/SONAR/JavaScript+Plugin","size":10403,"stargazers_count":52,"watchers_count":52,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":10,"forks":46,"open_issues":10,"watchers":52,"default_branch":"master"}},"base":{"label":"SonarCommunity:master","ref":"master","sha":"d16effb3b294ece56bc53c66b7952ed376f0ec7c","user":{"login":"SonarCommunity","id":1303819,"avatar_url":"https://avatars.githubusercontent.com/u/1303819?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarCommunity","html_url":"https://github.com/SonarCommunity","followers_url":"https://api.github.com/users/SonarCommunity/followers","following_url":"https://api.github.com/users/SonarCommunity/following{/other_user}","gists_url":"https://api.github.com/users/SonarCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarCommunity/subscriptions","organizations_url":"https://api.github.com/users/SonarCommunity/orgs","repos_url":"https://api.github.com/users/SonarCommunity/repos","events_url":"https://api.github.com/users/SonarCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/SonarCommunity/received_events","type":"Organization","site_admin":false},"repo":{"id":4335519,"name":"sonar-javascript","full_name":"SonarCommunity/sonar-javascript","owner":{"login":"SonarCommunity","id":1303819,"avatar_url":"https://avatars.githubusercontent.com/u/1303819?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarCommunity","html_url":"https://github.com/SonarCommunity","followers_url":"https://api.github.com/users/SonarCommunity/followers","following_url":"https://api.github.com/users/SonarCommunity/following{/other_user}","gists_url":"https://api.github.com/users/SonarCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarCommunity/subscriptions","organizations_url":"https://api.github.com/users/SonarCommunity/orgs","repos_url":"https://api.github.com/users/SonarCommunity/repos","events_url":"https://api.github.com/users/SonarCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/SonarCommunity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarCommunity/sonar-javascript","description":"","fork":false,"url":"https://api.github.com/repos/SonarCommunity/sonar-javascript","forks_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/forks","keys_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/teams","hooks_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/hooks","issue_events_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/events","assignees_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/tags","blobs_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/languages","stargazers_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/stargazers","contributors_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/contributors","subscribers_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/subscribers","subscription_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/subscription","commits_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/merges","archive_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/downloads","issues_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/labels{/name}","releases_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/releases{/id}","created_at":"2012-05-15T12:35:38Z","updated_at":"2015-08-07T16:23:08Z","pushed_at":"2015-08-17T20:41:52Z","git_url":"git://github.com/SonarCommunity/sonar-javascript.git","ssh_url":"git@github.com:SonarCommunity/sonar-javascript.git","clone_url":"https://github.com/SonarCommunity/sonar-javascript.git","svn_url":"https://github.com/SonarCommunity/sonar-javascript","homepage":"http://docs.codehaus.org/display/SONAR/JavaScript+Plugin","size":10403,"stargazers_count":52,"watchers_count":52,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":10,"forks":46,"open_issues":10,"watchers":52,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/80"},"html":{"href":"https://github.com/SonarCommunity/sonar-javascript/pull/80"},"issue":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/80"},"comments":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/SonarCommunity/sonar-javascript/statuses/9875e4b759aafcdb58d8383073307e4421c9797d"}}}}