{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments/59050216","id":59050216,"diff_hunk":"@@ -101,14 +99,6 @@\n     }\n   }\n \n-  public static int findAvailablePort(int defaultPort) {\n-    try (ServerSocket tempSocket = new ServerSocket(0)) {\n-      return tempSocket.getLocalPort();\n-    } catch (IOException e) {\n-      return defaultPort;\n-    }\n-  }\n-\n   private static Path installedGcdPath() {","path":"gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/testing/LocalDatastoreHelper.java","position":89,"original_position":89,"commit_id":"7fe981d37071b9a836a5c0e6435807883a5b6112","original_commit_id":"7fe981d37071b9a836a5c0e6435807883a5b6112","user":{"login":"mziccard","id":450933,"avatar_url":"https://avatars.githubusercontent.com/u/450933?v=3","gravatar_id":"","url":"https://api.github.com/users/mziccard","html_url":"https://github.com/mziccard","followers_url":"https://api.github.com/users/mziccard/followers","following_url":"https://api.github.com/users/mziccard/following{/other_user}","gists_url":"https://api.github.com/users/mziccard/gists{/gist_id}","starred_url":"https://api.github.com/users/mziccard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mziccard/subscriptions","organizations_url":"https://api.github.com/users/mziccard/orgs","repos_url":"https://api.github.com/users/mziccard/repos","events_url":"https://api.github.com/users/mziccard/events{/privacy}","received_events_url":"https://api.github.com/users/mziccard/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [The method installedGcdPath() has an NPath complexity of 420](https://www.codacy.com/app/mziccard/gcloud-java/file/2379270737/issues/source?bid=3123103&fileBranchId=3205624#l102)","created_at":"2016-04-08T16:17:29Z","updated_at":"2016-04-08T16:17:29Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/821#discussion_r59050216","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/821","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments/59050216"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/821#discussion_r59050216"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/821"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/821","id":64560471,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/821","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/821.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/821.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/821","number":821,"state":"open","locked":false,"title":"Clean up LocalGcdHelper and docs","user":{"login":"ajkannan","id":5316886,"avatar_url":"https://avatars.githubusercontent.com/u/5316886?v=3","gravatar_id":"","url":"https://api.github.com/users/ajkannan","html_url":"https://github.com/ajkannan","followers_url":"https://api.github.com/users/ajkannan/followers","following_url":"https://api.github.com/users/ajkannan/following{/other_user}","gists_url":"https://api.github.com/users/ajkannan/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkannan/subscriptions","organizations_url":"https://api.github.com/users/ajkannan/orgs","repos_url":"https://api.github.com/users/ajkannan/repos","events_url":"https://api.github.com/users/ajkannan/events{/privacy}","received_events_url":"https://api.github.com/users/ajkannan/received_events","type":"User","site_admin":false},"body":"* Adds an `options` method to `LocalGcdHelper` to make it more consistent with other test helpers.\r\n* Uses the `options` method in `DatastoreTest`\r\n* Updates the package info and TESTING docs to reflect the recently-added consistency setting\r\n* Allows consistency to be set from command line invocation of `LocalGcdHelper`","created_at":"2016-03-30T01:44:36Z","updated_at":"2016-04-08T16:17:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5481362072dc5ba9cbac06d063a7cd3c56a7a5c4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/821/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/821/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/821/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/7fe981d37071b9a836a5c0e6435807883a5b6112","head":{"label":"ajkannan:cleanup-localgcdhelper","ref":"cleanup-localgcdhelper","sha":"7fe981d37071b9a836a5c0e6435807883a5b6112","user":{"login":"ajkannan","id":5316886,"avatar_url":"https://avatars.githubusercontent.com/u/5316886?v=3","gravatar_id":"","url":"https://api.github.com/users/ajkannan","html_url":"https://github.com/ajkannan","followers_url":"https://api.github.com/users/ajkannan/followers","following_url":"https://api.github.com/users/ajkannan/following{/other_user}","gists_url":"https://api.github.com/users/ajkannan/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkannan/subscriptions","organizations_url":"https://api.github.com/users/ajkannan/orgs","repos_url":"https://api.github.com/users/ajkannan/repos","events_url":"https://api.github.com/users/ajkannan/events{/privacy}","received_events_url":"https://api.github.com/users/ajkannan/received_events","type":"User","site_admin":false},"repo":{"id":40725411,"name":"gcloud-java","full_name":"ajkannan/gcloud-java","owner":{"login":"ajkannan","id":5316886,"avatar_url":"https://avatars.githubusercontent.com/u/5316886?v=3","gravatar_id":"","url":"https://api.github.com/users/ajkannan","html_url":"https://github.com/ajkannan","followers_url":"https://api.github.com/users/ajkannan/followers","following_url":"https://api.github.com/users/ajkannan/following{/other_user}","gists_url":"https://api.github.com/users/ajkannan/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkannan/subscriptions","organizations_url":"https://api.github.com/users/ajkannan/orgs","repos_url":"https://api.github.com/users/ajkannan/repos","events_url":"https://api.github.com/users/ajkannan/events{/privacy}","received_events_url":"https://api.github.com/users/ajkannan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajkannan/gcloud-java","description":"Google Cloud Client Library for Java","fork":true,"url":"https://api.github.com/repos/ajkannan/gcloud-java","forks_url":"https://api.github.com/repos/ajkannan/gcloud-java/forks","keys_url":"https://api.github.com/repos/ajkannan/gcloud-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajkannan/gcloud-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajkannan/gcloud-java/teams","hooks_url":"https://api.github.com/repos/ajkannan/gcloud-java/hooks","issue_events_url":"https://api.github.com/repos/ajkannan/gcloud-java/issues/events{/number}","events_url":"https://api.github.com/repos/ajkannan/gcloud-java/events","assignees_url":"https://api.github.com/repos/ajkannan/gcloud-java/assignees{/user}","branches_url":"https://api.github.com/repos/ajkannan/gcloud-java/branches{/branch}","tags_url":"https://api.github.com/repos/ajkannan/gcloud-java/tags","blobs_url":"https://api.github.com/repos/ajkannan/gcloud-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajkannan/gcloud-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajkannan/gcloud-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajkannan/gcloud-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajkannan/gcloud-java/statuses/{sha}","languages_url":"https://api.github.com/repos/ajkannan/gcloud-java/languages","stargazers_url":"https://api.github.com/repos/ajkannan/gcloud-java/stargazers","contributors_url":"https://api.github.com/repos/ajkannan/gcloud-java/contributors","subscribers_url":"https://api.github.com/repos/ajkannan/gcloud-java/subscribers","subscription_url":"https://api.github.com/repos/ajkannan/gcloud-java/subscription","commits_url":"https://api.github.com/repos/ajkannan/gcloud-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajkannan/gcloud-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajkannan/gcloud-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajkannan/gcloud-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajkannan/gcloud-java/contents/{+path}","compare_url":"https://api.github.com/repos/ajkannan/gcloud-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajkannan/gcloud-java/merges","archive_url":"https://api.github.com/repos/ajkannan/gcloud-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajkannan/gcloud-java/downloads","issues_url":"https://api.github.com/repos/ajkannan/gcloud-java/issues{/number}","pulls_url":"https://api.github.com/repos/ajkannan/gcloud-java/pulls{/number}","milestones_url":"https://api.github.com/repos/ajkannan/gcloud-java/milestones{/number}","notifications_url":"https://api.github.com/repos/ajkannan/gcloud-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajkannan/gcloud-java/labels{/name}","releases_url":"https://api.github.com/repos/ajkannan/gcloud-java/releases{/id}","deployments_url":"https://api.github.com/repos/ajkannan/gcloud-java/deployments","created_at":"2015-08-14T16:38:38Z","updated_at":"2016-01-28T17:32:12Z","pushed_at":"2016-04-08T16:09:34Z","git_url":"git://github.com/ajkannan/gcloud-java.git","ssh_url":"git@github.com:ajkannan/gcloud-java.git","clone_url":"https://github.com/ajkannan/gcloud-java.git","svn_url":"https://github.com/ajkannan/gcloud-java","homepage":"","size":17921,"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":"GoogleCloudPlatform:master","ref":"master","sha":"6987b00bdfc7657b4487e056c6c383b8b41c534d","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":26181278,"name":"gcloud-java","full_name":"GoogleCloudPlatform/gcloud-java","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-java","description":"Google Cloud Client Library for Java","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/deployments","created_at":"2014-11-04T17:57:16Z","updated_at":"2016-04-08T02:50:48Z","pushed_at":"2016-04-08T16:09:34Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-java.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-java.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-java.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-java","homepage":"http://googlecloudplatform.github.io/gcloud-java/","size":222008,"stargazers_count":83,"watchers_count":83,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":145,"forks":44,"open_issues":145,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/821"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/821"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/821"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/821/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/821/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/821/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/7fe981d37071b9a836a5c0e6435807883a5b6112"}}}}