{"action":"created","comment":{"url":"https://api.github.com/repos/src-d/style-analyzer/pulls/comments/222680138","pull_request_review_id":161624954,"id":222680138,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjY4MDEzOA==","diff_hunk":"@@ -348,21 +386,17 @@ def _add_noops(vnodes: Sequence[VirtualNode], path: str) -> List[VirtualNode]:\n                                       y=CLASS_INDEX[CLS_NOOP], path=path))\n         return result\n \n-    @staticmethod\n-    def _index_nodes(vnodes: Sequence[VirtualNode]) -> None:\n-        global_index = 0\n-        labeled_index = 0\n-        for vnode in vnodes:\n-            vnode.global_index = global_index\n-            global_index += 1\n-            if vnode.y is not None:\n-                vnode.labeled_index = labeled_index\n-                labeled_index += 1\n-\n-    def _get_features(self, features: Sequence[str], sibling: Union[VirtualNode, bblfsh.Node],\n-                      node: VirtualNode) -> List[int]:\n-        for feature in features:\n-            yield from self._features[feature](sibling, node)\n+    def _get_features(self, feature_group: FeatureGroup, repetition: int,\n+                      sibling: Union[VirtualNode, bblfsh.Node], node: VirtualNode\n+                      ) -> Iterable[int]:\n+        for feature_name, indices in self.feature_to_index[feature_group][repetition].items():\n+            if not len(indices):\n+                continue\n+            indices_set = set(indices)\n+            yield from (result for i, result in enumerate(\n+                    self._features[feature_name](sibling, node),\n+                    start=self._feature_offsets[feature_group][repetition][feature_name])\n+                if i in indices_set)","path":"lookout/style/format/feature_extractor.py","position":291,"original_position":278,"commit_id":"07c831804b5de7813a689cf42ba80a7605f0779d","original_commit_id":"3d88f6348b062ec14c57cf75c6c5b29b42007205","user":{"login":"zurk","id":516045,"node_id":"MDQ6VXNlcjUxNjA0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/516045?v=4","gravatar_id":"","url":"https://api.github.com/users/zurk","html_url":"https://github.com/zurk","followers_url":"https://api.github.com/users/zurk/followers","following_url":"https://api.github.com/users/zurk/following{/other_user}","gists_url":"https://api.github.com/users/zurk/gists{/gist_id}","starred_url":"https://api.github.com/users/zurk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zurk/subscriptions","organizations_url":"https://api.github.com/users/zurk/orgs","repos_url":"https://api.github.com/users/zurk/repos","events_url":"https://api.github.com/users/zurk/events{/privacy}","received_events_url":"https://api.github.com/users/zurk/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2018-10-04T13:59:23Z","updated_at":"2018-10-04T13:59:23Z","html_url":"https://github.com/src-d/style-analyzer/pull/204#discussion_r222680138","pull_request_url":"https://api.github.com/repos/src-d/style-analyzer/pulls/204","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/src-d/style-analyzer/pulls/comments/222680138"},"html":{"href":"https://github.com/src-d/style-analyzer/pull/204#discussion_r222680138"},"pull_request":{"href":"https://api.github.com/repos/src-d/style-analyzer/pulls/204"}},"in_reply_to_id":222645139},"pull_request":{"url":"https://api.github.com/repos/src-d/style-analyzer/pulls/204","id":220184101,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMTg0MTAx","html_url":"https://github.com/src-d/style-analyzer/pull/204","diff_url":"https://github.com/src-d/style-analyzer/pull/204.diff","patch_url":"https://github.com/src-d/style-analyzer/pull/204.patch","issue_url":"https://api.github.com/repos/src-d/style-analyzer/issues/204","number":204,"state":"open","locked":false,"title":"Revamp feature names handling and related feature extraction mechanisms","user":{"login":"m09","id":142691,"node_id":"MDQ6VXNlcjE0MjY5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/142691?v=4","gravatar_id":"","url":"https://api.github.com/users/m09","html_url":"https://github.com/m09","followers_url":"https://api.github.com/users/m09/followers","following_url":"https://api.github.com/users/m09/following{/other_user}","gists_url":"https://api.github.com/users/m09/gists{/gist_id}","starred_url":"https://api.github.com/users/m09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m09/subscriptions","organizations_url":"https://api.github.com/users/m09/orgs","repos_url":"https://api.github.com/users/m09/repos","events_url":"https://api.github.com/users/m09/events{/privacy}","received_events_url":"https://api.github.com/users/m09/received_events","type":"User","site_admin":false},"body":"This is related to #199 and #194 (due to all of us having to produce names for demos and not having time to merge).\r\n\r\nWe should probably have a quick meeting to decide what to do with those 3 PRs.\r\n\r\nSigned-off-by: Hugo Mougard <hugo@sourced.tech>","created_at":"2018-10-03T21:21:15Z","updated_at":"2018-10-04T13:59:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bad2212bc453699bc697d22c36704b08758d8d6e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/src-d/style-analyzer/pulls/204/commits","review_comments_url":"https://api.github.com/repos/src-d/style-analyzer/pulls/204/comments","review_comment_url":"https://api.github.com/repos/src-d/style-analyzer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/src-d/style-analyzer/issues/204/comments","statuses_url":"https://api.github.com/repos/src-d/style-analyzer/statuses/07c831804b5de7813a689cf42ba80a7605f0779d","head":{"label":"m09:feature/feature-name-revamp","ref":"feature/feature-name-revamp","sha":"07c831804b5de7813a689cf42ba80a7605f0779d","user":{"login":"m09","id":142691,"node_id":"MDQ6VXNlcjE0MjY5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/142691?v=4","gravatar_id":"","url":"https://api.github.com/users/m09","html_url":"https://github.com/m09","followers_url":"https://api.github.com/users/m09/followers","following_url":"https://api.github.com/users/m09/following{/other_user}","gists_url":"https://api.github.com/users/m09/gists{/gist_id}","starred_url":"https://api.github.com/users/m09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m09/subscriptions","organizations_url":"https://api.github.com/users/m09/orgs","repos_url":"https://api.github.com/users/m09/repos","events_url":"https://api.github.com/users/m09/events{/privacy}","received_events_url":"https://api.github.com/users/m09/received_events","type":"User","site_admin":false},"repo":{"id":144306835,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQzMDY4MzU=","name":"style-analyzer","full_name":"m09/style-analyzer","private":false,"owner":{"login":"m09","id":142691,"node_id":"MDQ6VXNlcjE0MjY5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/142691?v=4","gravatar_id":"","url":"https://api.github.com/users/m09","html_url":"https://github.com/m09","followers_url":"https://api.github.com/users/m09/followers","following_url":"https://api.github.com/users/m09/following{/other_user}","gists_url":"https://api.github.com/users/m09/gists{/gist_id}","starred_url":"https://api.github.com/users/m09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m09/subscriptions","organizations_url":"https://api.github.com/users/m09/orgs","repos_url":"https://api.github.com/users/m09/repos","events_url":"https://api.github.com/users/m09/events{/privacy}","received_events_url":"https://api.github.com/users/m09/received_events","type":"User","site_admin":false},"html_url":"https://github.com/m09/style-analyzer","description":"Style analyzer experiments","fork":true,"url":"https://api.github.com/repos/m09/style-analyzer","forks_url":"https://api.github.com/repos/m09/style-analyzer/forks","keys_url":"https://api.github.com/repos/m09/style-analyzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m09/style-analyzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m09/style-analyzer/teams","hooks_url":"https://api.github.com/repos/m09/style-analyzer/hooks","issue_events_url":"https://api.github.com/repos/m09/style-analyzer/issues/events{/number}","events_url":"https://api.github.com/repos/m09/style-analyzer/events","assignees_url":"https://api.github.com/repos/m09/style-analyzer/assignees{/user}","branches_url":"https://api.github.com/repos/m09/style-analyzer/branches{/branch}","tags_url":"https://api.github.com/repos/m09/style-analyzer/tags","blobs_url":"https://api.github.com/repos/m09/style-analyzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m09/style-analyzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m09/style-analyzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/m09/style-analyzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m09/style-analyzer/statuses/{sha}","languages_url":"https://api.github.com/repos/m09/style-analyzer/languages","stargazers_url":"https://api.github.com/repos/m09/style-analyzer/stargazers","contributors_url":"https://api.github.com/repos/m09/style-analyzer/contributors","subscribers_url":"https://api.github.com/repos/m09/style-analyzer/subscribers","subscription_url":"https://api.github.com/repos/m09/style-analyzer/subscription","commits_url":"https://api.github.com/repos/m09/style-analyzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/m09/style-analyzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/m09/style-analyzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/m09/style-analyzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/m09/style-analyzer/contents/{+path}","compare_url":"https://api.github.com/repos/m09/style-analyzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m09/style-analyzer/merges","archive_url":"https://api.github.com/repos/m09/style-analyzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m09/style-analyzer/downloads","issues_url":"https://api.github.com/repos/m09/style-analyzer/issues{/number}","pulls_url":"https://api.github.com/repos/m09/style-analyzer/pulls{/number}","milestones_url":"https://api.github.com/repos/m09/style-analyzer/milestones{/number}","notifications_url":"https://api.github.com/repos/m09/style-analyzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m09/style-analyzer/labels{/name}","releases_url":"https://api.github.com/repos/m09/style-analyzer/releases{/id}","deployments_url":"https://api.github.com/repos/m09/style-analyzer/deployments","created_at":"2018-08-10T16:01:02Z","updated_at":"2018-10-02T07:53:54Z","pushed_at":"2018-10-04T13:07:09Z","git_url":"git://github.com/m09/style-analyzer.git","ssh_url":"git@github.com:m09/style-analyzer.git","clone_url":"https://github.com/m09/style-analyzer.git","svn_url":"https://github.com/m09/style-analyzer","homepage":null,"size":15302,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"src-d:master","ref":"master","sha":"8be740854f7e250f0c6b6a19028c2a7963f737a2","user":{"login":"src-d","id":15128793,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MTI4Nzkz","avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"repo":{"id":139746338,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk3NDYzMzg=","name":"style-analyzer","full_name":"src-d/style-analyzer","private":false,"owner":{"login":"src-d","id":15128793,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MTI4Nzkz","avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/src-d/style-analyzer","description":"Style analyzer experiments","fork":false,"url":"https://api.github.com/repos/src-d/style-analyzer","forks_url":"https://api.github.com/repos/src-d/style-analyzer/forks","keys_url":"https://api.github.com/repos/src-d/style-analyzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/src-d/style-analyzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/src-d/style-analyzer/teams","hooks_url":"https://api.github.com/repos/src-d/style-analyzer/hooks","issue_events_url":"https://api.github.com/repos/src-d/style-analyzer/issues/events{/number}","events_url":"https://api.github.com/repos/src-d/style-analyzer/events","assignees_url":"https://api.github.com/repos/src-d/style-analyzer/assignees{/user}","branches_url":"https://api.github.com/repos/src-d/style-analyzer/branches{/branch}","tags_url":"https://api.github.com/repos/src-d/style-analyzer/tags","blobs_url":"https://api.github.com/repos/src-d/style-analyzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/src-d/style-analyzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/src-d/style-analyzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/src-d/style-analyzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/src-d/style-analyzer/statuses/{sha}","languages_url":"https://api.github.com/repos/src-d/style-analyzer/languages","stargazers_url":"https://api.github.com/repos/src-d/style-analyzer/stargazers","contributors_url":"https://api.github.com/repos/src-d/style-analyzer/contributors","subscribers_url":"https://api.github.com/repos/src-d/style-analyzer/subscribers","subscription_url":"https://api.github.com/repos/src-d/style-analyzer/subscription","commits_url":"https://api.github.com/repos/src-d/style-analyzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/src-d/style-analyzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/src-d/style-analyzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/src-d/style-analyzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/src-d/style-analyzer/contents/{+path}","compare_url":"https://api.github.com/repos/src-d/style-analyzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/src-d/style-analyzer/merges","archive_url":"https://api.github.com/repos/src-d/style-analyzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/src-d/style-analyzer/downloads","issues_url":"https://api.github.com/repos/src-d/style-analyzer/issues{/number}","pulls_url":"https://api.github.com/repos/src-d/style-analyzer/pulls{/number}","milestones_url":"https://api.github.com/repos/src-d/style-analyzer/milestones{/number}","notifications_url":"https://api.github.com/repos/src-d/style-analyzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/src-d/style-analyzer/labels{/name}","releases_url":"https://api.github.com/repos/src-d/style-analyzer/releases{/id}","deployments_url":"https://api.github.com/repos/src-d/style-analyzer/deployments","created_at":"2018-07-04T16:42:30Z","updated_at":"2018-10-04T13:01:02Z","pushed_at":"2018-10-04T13:31:34Z","git_url":"git://github.com/src-d/style-analyzer.git","ssh_url":"git@github.com:src-d/style-analyzer.git","clone_url":"https://github.com/src-d/style-analyzer.git","svn_url":"https://github.com/src-d/style-analyzer","homepage":null,"size":15180,"stargazers_count":3,"watchers_count":3,"language":"Jupyter Notebook","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":10,"open_issues":26,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/src-d/style-analyzer/pulls/204"},"html":{"href":"https://github.com/src-d/style-analyzer/pull/204"},"issue":{"href":"https://api.github.com/repos/src-d/style-analyzer/issues/204"},"comments":{"href":"https://api.github.com/repos/src-d/style-analyzer/issues/204/comments"},"review_comments":{"href":"https://api.github.com/repos/src-d/style-analyzer/pulls/204/comments"},"review_comment":{"href":"https://api.github.com/repos/src-d/style-analyzer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/src-d/style-analyzer/pulls/204/commits"},"statuses":{"href":"https://api.github.com/repos/src-d/style-analyzer/statuses/07c831804b5de7813a689cf42ba80a7605f0779d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"zurk"}}