{"action":"created","comment":{"url":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/comments/31218444","id":31218444,"diff_hunk":"@@ -19,58 +19,62 @@ package com.betterdocs.parser\n \n import java.util.{ArrayList, HashMap}\n \n-import com.betterdocs.crawler.Repository\n-\n+import com.betterdocs.indexer.Token\n \n object MethodVisitorHelper {\n \n-  import com.betterdocs.indexer.JavaFileIndexerHelper._\n-\n-  def getImportsWithMethodAndLineNumbers(parser: MethodVisitor):\n-  Map[String, Map[String, List[Int]]] = {\n-    val imports = parser.getImportDeclMap\n-    val importWithMethodAndLineNumbers =\n-      javatoScalaMap(parser.getImportsWithMethodAndLineNumber)\n-    importWithMethodAndLineNumbers.filter {\n-      case (importName, methodAndLineNumbers) => imports.containsValue(importName)\n+  def getImportsWithMethodAndLineNumbers(parser: MethodVisitor,\n+                                         tokens: List[Map[String, List[Int]]]):\n+  List[(Map[String, Map[String, List[Int]]], Map[String, List[Int]])] = {\n+    import scala.collection.JavaConversions._\n+    val k = parser.getImportsWithMethodAndLineNumber.toList zip tokens\n+    k.map { f => (javaToScalaMap(f._1).filter { case (importName, methodAndLineNumbers)\n+    => f._2.containsKey(importName)","path":"core/src/main/scala/com/betterdocs/parser/MethodVisitorHelper.scala","position":25,"original_position":25,"commit_id":"797e8164b35e726e33a752d91c83226fbf1f9719","original_commit_id":"797e8164b35e726e33a752d91c83226fbf1f9719","user":{"login":"ScrapCodes","id":992952,"avatar_url":"https://avatars.githubusercontent.com/u/992952?v=3","gravatar_id":"","url":"https://api.github.com/users/ScrapCodes","html_url":"https://github.com/ScrapCodes","followers_url":"https://api.github.com/users/ScrapCodes/followers","following_url":"https://api.github.com/users/ScrapCodes/following{/other_user}","gists_url":"https://api.github.com/users/ScrapCodes/gists{/gist_id}","starred_url":"https://api.github.com/users/ScrapCodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScrapCodes/subscriptions","organizations_url":"https://api.github.com/users/ScrapCodes/orgs","repos_url":"https://api.github.com/users/ScrapCodes/repos","events_url":"https://api.github.com/users/ScrapCodes/events{/privacy}","received_events_url":"https://api.github.com/users/ScrapCodes/received_events","type":"User","site_admin":false},"body":"Can you properly format this, in more readable format ? \r\n1) wrapping at {\r\n2) f._1 like names can be avoided by using case expressions.\r\n\r\nApplicable to all such instances in this file","created_at":"2015-05-28T09:52:33Z","updated_at":"2015-05-28T09:52:33Z","html_url":"https://github.com/Imaginea/BetterDocs/pull/147#discussion_r31218444","pull_request_url":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/147","_links":{"self":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/comments/31218444"},"html":{"href":"https://github.com/Imaginea/BetterDocs/pull/147#discussion_r31218444"},"pull_request":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/147"}}},"pull_request":{"url":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/147","id":36010319,"html_url":"https://github.com/Imaginea/BetterDocs/pull/147","diff_url":"https://github.com/Imaginea/BetterDocs/pull/147.diff","patch_url":"https://github.com/Imaginea/BetterDocs/pull/147.patch","issue_url":"https://api.github.com/repos/Imaginea/BetterDocs/issues/147","number":147,"state":"open","locked":false,"title":"generate map of import and methods for each method declaration in the…","user":{"login":"PiyushMishra","id":1720685,"avatar_url":"https://avatars.githubusercontent.com/u/1720685?v=3","gravatar_id":"","url":"https://api.github.com/users/PiyushMishra","html_url":"https://github.com/PiyushMishra","followers_url":"https://api.github.com/users/PiyushMishra/followers","following_url":"https://api.github.com/users/PiyushMishra/following{/other_user}","gists_url":"https://api.github.com/users/PiyushMishra/gists{/gist_id}","starred_url":"https://api.github.com/users/PiyushMishra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PiyushMishra/subscriptions","organizations_url":"https://api.github.com/users/PiyushMishra/orgs","repos_url":"https://api.github.com/users/PiyushMishra/repos","events_url":"https://api.github.com/users/PiyushMishra/events{/privacy}","received_events_url":"https://api.github.com/users/PiyushMishra/received_events","type":"User","site_admin":false},"body":"generate map of import and methods with line numbers per method declaration in the java file.","created_at":"2015-05-22T08:36:16Z","updated_at":"2015-05-28T09:52:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71b6e956c82f064968c5674a4d3899b8db0d6f93","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/147/commits","review_comments_url":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/147/comments","review_comment_url":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Imaginea/BetterDocs/issues/147/comments","statuses_url":"https://api.github.com/repos/Imaginea/BetterDocs/statuses/797e8164b35e726e33a752d91c83226fbf1f9719","head":{"label":"PiyushMishra:IndexForMethods","ref":"IndexForMethods","sha":"797e8164b35e726e33a752d91c83226fbf1f9719","user":{"login":"PiyushMishra","id":1720685,"avatar_url":"https://avatars.githubusercontent.com/u/1720685?v=3","gravatar_id":"","url":"https://api.github.com/users/PiyushMishra","html_url":"https://github.com/PiyushMishra","followers_url":"https://api.github.com/users/PiyushMishra/followers","following_url":"https://api.github.com/users/PiyushMishra/following{/other_user}","gists_url":"https://api.github.com/users/PiyushMishra/gists{/gist_id}","starred_url":"https://api.github.com/users/PiyushMishra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PiyushMishra/subscriptions","organizations_url":"https://api.github.com/users/PiyushMishra/orgs","repos_url":"https://api.github.com/users/PiyushMishra/repos","events_url":"https://api.github.com/users/PiyushMishra/events{/privacy}","received_events_url":"https://api.github.com/users/PiyushMishra/received_events","type":"User","site_admin":false},"repo":{"id":31884944,"name":"BetterDocs","full_name":"PiyushMishra/BetterDocs","owner":{"login":"PiyushMishra","id":1720685,"avatar_url":"https://avatars.githubusercontent.com/u/1720685?v=3","gravatar_id":"","url":"https://api.github.com/users/PiyushMishra","html_url":"https://github.com/PiyushMishra","followers_url":"https://api.github.com/users/PiyushMishra/followers","following_url":"https://api.github.com/users/PiyushMishra/following{/other_user}","gists_url":"https://api.github.com/users/PiyushMishra/gists{/gist_id}","starred_url":"https://api.github.com/users/PiyushMishra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PiyushMishra/subscriptions","organizations_url":"https://api.github.com/users/PiyushMishra/orgs","repos_url":"https://api.github.com/users/PiyushMishra/repos","events_url":"https://api.github.com/users/PiyushMishra/events{/privacy}","received_events_url":"https://api.github.com/users/PiyushMishra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PiyushMishra/BetterDocs","description":"Better docs is not docs.","fork":true,"url":"https://api.github.com/repos/PiyushMishra/BetterDocs","forks_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/forks","keys_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/teams","hooks_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/hooks","issue_events_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/issues/events{/number}","events_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/events","assignees_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/assignees{/user}","branches_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/branches{/branch}","tags_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/tags","blobs_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/statuses/{sha}","languages_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/languages","stargazers_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/stargazers","contributors_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/contributors","subscribers_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/subscribers","subscription_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/subscription","commits_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/contents/{+path}","compare_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/merges","archive_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/downloads","issues_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/issues{/number}","pulls_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/pulls{/number}","milestones_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/milestones{/number}","notifications_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/labels{/name}","releases_url":"https://api.github.com/repos/PiyushMishra/BetterDocs/releases{/id}","created_at":"2015-03-09T07:40:35Z","updated_at":"2015-05-27T06:43:36Z","pushed_at":"2015-05-27T11:58:49Z","git_url":"git://github.com/PiyushMishra/BetterDocs.git","ssh_url":"git@github.com:PiyushMishra/BetterDocs.git","clone_url":"https://github.com/PiyushMishra/BetterDocs.git","svn_url":"https://github.com/PiyushMishra/BetterDocs","homepage":null,"size":594,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Imaginea:master","ref":"master","sha":"f16d800a4bf9adc4b178555c2dcaa88d837ba4a7","user":{"login":"Imaginea","id":937384,"avatar_url":"https://avatars.githubusercontent.com/u/937384?v=3","gravatar_id":"","url":"https://api.github.com/users/Imaginea","html_url":"https://github.com/Imaginea","followers_url":"https://api.github.com/users/Imaginea/followers","following_url":"https://api.github.com/users/Imaginea/following{/other_user}","gists_url":"https://api.github.com/users/Imaginea/gists{/gist_id}","starred_url":"https://api.github.com/users/Imaginea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Imaginea/subscriptions","organizations_url":"https://api.github.com/users/Imaginea/orgs","repos_url":"https://api.github.com/users/Imaginea/repos","events_url":"https://api.github.com/users/Imaginea/events{/privacy}","received_events_url":"https://api.github.com/users/Imaginea/received_events","type":"Organization","site_admin":false},"repo":{"id":30865179,"name":"BetterDocs","full_name":"Imaginea/BetterDocs","owner":{"login":"Imaginea","id":937384,"avatar_url":"https://avatars.githubusercontent.com/u/937384?v=3","gravatar_id":"","url":"https://api.github.com/users/Imaginea","html_url":"https://github.com/Imaginea","followers_url":"https://api.github.com/users/Imaginea/followers","following_url":"https://api.github.com/users/Imaginea/following{/other_user}","gists_url":"https://api.github.com/users/Imaginea/gists{/gist_id}","starred_url":"https://api.github.com/users/Imaginea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Imaginea/subscriptions","organizations_url":"https://api.github.com/users/Imaginea/orgs","repos_url":"https://api.github.com/users/Imaginea/repos","events_url":"https://api.github.com/users/Imaginea/events{/privacy}","received_events_url":"https://api.github.com/users/Imaginea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Imaginea/BetterDocs","description":"Better docs is not docs.","fork":false,"url":"https://api.github.com/repos/Imaginea/BetterDocs","forks_url":"https://api.github.com/repos/Imaginea/BetterDocs/forks","keys_url":"https://api.github.com/repos/Imaginea/BetterDocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Imaginea/BetterDocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Imaginea/BetterDocs/teams","hooks_url":"https://api.github.com/repos/Imaginea/BetterDocs/hooks","issue_events_url":"https://api.github.com/repos/Imaginea/BetterDocs/issues/events{/number}","events_url":"https://api.github.com/repos/Imaginea/BetterDocs/events","assignees_url":"https://api.github.com/repos/Imaginea/BetterDocs/assignees{/user}","branches_url":"https://api.github.com/repos/Imaginea/BetterDocs/branches{/branch}","tags_url":"https://api.github.com/repos/Imaginea/BetterDocs/tags","blobs_url":"https://api.github.com/repos/Imaginea/BetterDocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Imaginea/BetterDocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Imaginea/BetterDocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/Imaginea/BetterDocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Imaginea/BetterDocs/statuses/{sha}","languages_url":"https://api.github.com/repos/Imaginea/BetterDocs/languages","stargazers_url":"https://api.github.com/repos/Imaginea/BetterDocs/stargazers","contributors_url":"https://api.github.com/repos/Imaginea/BetterDocs/contributors","subscribers_url":"https://api.github.com/repos/Imaginea/BetterDocs/subscribers","subscription_url":"https://api.github.com/repos/Imaginea/BetterDocs/subscription","commits_url":"https://api.github.com/repos/Imaginea/BetterDocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/Imaginea/BetterDocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/Imaginea/BetterDocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/Imaginea/BetterDocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/Imaginea/BetterDocs/contents/{+path}","compare_url":"https://api.github.com/repos/Imaginea/BetterDocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Imaginea/BetterDocs/merges","archive_url":"https://api.github.com/repos/Imaginea/BetterDocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Imaginea/BetterDocs/downloads","issues_url":"https://api.github.com/repos/Imaginea/BetterDocs/issues{/number}","pulls_url":"https://api.github.com/repos/Imaginea/BetterDocs/pulls{/number}","milestones_url":"https://api.github.com/repos/Imaginea/BetterDocs/milestones{/number}","notifications_url":"https://api.github.com/repos/Imaginea/BetterDocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Imaginea/BetterDocs/labels{/name}","releases_url":"https://api.github.com/repos/Imaginea/BetterDocs/releases{/id}","created_at":"2015-02-16T11:21:59Z","updated_at":"2015-05-27T06:11:28Z","pushed_at":"2015-05-28T09:32:32Z","git_url":"git://github.com/Imaginea/BetterDocs.git","ssh_url":"git@github.com:Imaginea/BetterDocs.git","clone_url":"https://github.com/Imaginea/BetterDocs.git","svn_url":"https://github.com/Imaginea/BetterDocs","homepage":"http://imaginea.github.io/BetterDocs/demo.html","size":9336,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":25,"forks":13,"open_issues":25,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/147"},"html":{"href":"https://github.com/Imaginea/BetterDocs/pull/147"},"issue":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/issues/147"},"comments":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/Imaginea/BetterDocs/statuses/797e8164b35e726e33a752d91c83226fbf1f9719"}}}}