{"action":"created","comment":{"url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/comments/89693139","pull_request_review_id":10232985,"id":89693139,"diff_hunk":"@@ -3,18 +3,34 @@ const keywordExtractor = require('keyword-extractor')\n const utils = require('../utils.js')\n \n /**\n- * First uses the keyword-extractor to get the keywords, then compares the keywords with stringSimilarity to get a context score\n+ * Param 'extractKeywords' by default false:\n+ * Returns a comparing score of two strings based on Dice's Coefficient using the stringSimilarity module.\n+ *\n+ * If param 'extractKeywords' is true: first uses the keyword-extractor to get the keywords, then compares the keywords with stringSimilarity to get a context score\n  *\n  * @param file - the file with its description\n  * @param task - the task with its description\n+ * @param keywordParam - object with attribute extractKeywords as parameter for extracting the keywords (true - extract keyword before calculating similarity score, false - whithout extraction)\n  */\n-function similarContextPlugin (sString1, sString2) {\n-  utils.isString(sString1)\n-  utils.isString(sString2)\n-  const sKeywords1 = getKeywords(sString1)\n-  const sKeywords2 = getKeywords(sString2)\n+function similarityPlugin (sString1, sString2, params) {\n+  let extractKeywords = (params && params['extractKeywords']) || false\n+  if ((typeof sString1 !== 'undefined') || (typeof sString2 !== 'undefined')) {\n+    utils.isValidString(sString1)\n+    utils.isValidString(sString2)\n+  } else {\n+    throw new Error(`Two Strings as input are needed.`)\n+  }\n+\n+  if ((extractKeywords === false)) {","path":"lib/plugins/similar-context-plugin.js","position":28,"original_position":28,"commit_id":"a7d6082bdbf3afad2588fe3dce5e12133963af7a","original_commit_id":"a7d6082bdbf3afad2588fe3dce5e12133963af7a","user":{"login":"oesse","id":23092733,"avatar_url":"https://avatars.githubusercontent.com/u/23092733?v=3","gravatar_id":"","url":"https://api.github.com/users/oesse","html_url":"https://github.com/oesse","followers_url":"https://api.github.com/users/oesse/followers","following_url":"https://api.github.com/users/oesse/following{/other_user}","gists_url":"https://api.github.com/users/oesse/gists{/gist_id}","starred_url":"https://api.github.com/users/oesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oesse/subscriptions","organizations_url":"https://api.github.com/users/oesse/orgs","repos_url":"https://api.github.com/users/oesse/repos","events_url":"https://api.github.com/users/oesse/events{/privacy}","received_events_url":"https://api.github.com/users/oesse/received_events","type":"User","site_admin":false},"body":"Warum Extraklammern um if (())?","created_at":"2016-11-27T16:01:15Z","updated_at":"2016-11-27T16:01:15Z","html_url":"https://github.com/amos-ws16/amos-ws16-arrowjs/pull/31#discussion_r89693139","pull_request_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/comments/89693139"},"html":{"href":"https://github.com/amos-ws16/amos-ws16-arrowjs/pull/31#discussion_r89693139"},"pull_request":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/31","id":95406779,"html_url":"https://github.com/amos-ws16/amos-ws16-arrowjs/pull/31","diff_url":"https://github.com/amos-ws16/amos-ws16-arrowjs/pull/31.diff","patch_url":"https://github.com/amos-ws16/amos-ws16-arrowjs/pull/31.patch","issue_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues/31","number":31,"state":"open","locked":false,"title":"Feature 59 stringcompare adjustment","user":{"login":"dn0912","id":12370001,"avatar_url":"https://avatars.githubusercontent.com/u/12370001?v=3","gravatar_id":"","url":"https://api.github.com/users/dn0912","html_url":"https://github.com/dn0912","followers_url":"https://api.github.com/users/dn0912/followers","following_url":"https://api.github.com/users/dn0912/following{/other_user}","gists_url":"https://api.github.com/users/dn0912/gists{/gist_id}","starred_url":"https://api.github.com/users/dn0912/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dn0912/subscriptions","organizations_url":"https://api.github.com/users/dn0912/orgs","repos_url":"https://api.github.com/users/dn0912/repos","events_url":"https://api.github.com/users/dn0912/events{/privacy}","received_events_url":"https://api.github.com/users/dn0912/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-27T15:52:41Z","updated_at":"2016-11-27T16:09:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac102db3e58d9f51e40dc6f79c5cbc287c0defab","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/31/commits","review_comments_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/31/comments","review_comment_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues/31/comments","statuses_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/statuses/a7d6082bdbf3afad2588fe3dce5e12133963af7a","head":{"label":"amos-ws16:feature-59-stringcompare-adjustment","ref":"feature-59-stringcompare-adjustment","sha":"a7d6082bdbf3afad2588fe3dce5e12133963af7a","user":{"login":"amos-ws16","id":23098034,"avatar_url":"https://avatars.githubusercontent.com/u/23098034?v=3","gravatar_id":"","url":"https://api.github.com/users/amos-ws16","html_url":"https://github.com/amos-ws16","followers_url":"https://api.github.com/users/amos-ws16/followers","following_url":"https://api.github.com/users/amos-ws16/following{/other_user}","gists_url":"https://api.github.com/users/amos-ws16/gists{/gist_id}","starred_url":"https://api.github.com/users/amos-ws16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amos-ws16/subscriptions","organizations_url":"https://api.github.com/users/amos-ws16/orgs","repos_url":"https://api.github.com/users/amos-ws16/repos","events_url":"https://api.github.com/users/amos-ws16/events{/privacy}","received_events_url":"https://api.github.com/users/amos-ws16/received_events","type":"Organization","site_admin":false},"repo":{"id":72101018,"name":"amos-ws16-arrowjs","full_name":"amos-ws16/amos-ws16-arrowjs","owner":{"login":"amos-ws16","id":23098034,"avatar_url":"https://avatars.githubusercontent.com/u/23098034?v=3","gravatar_id":"","url":"https://api.github.com/users/amos-ws16","html_url":"https://github.com/amos-ws16","followers_url":"https://api.github.com/users/amos-ws16/followers","following_url":"https://api.github.com/users/amos-ws16/following{/other_user}","gists_url":"https://api.github.com/users/amos-ws16/gists{/gist_id}","starred_url":"https://api.github.com/users/amos-ws16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amos-ws16/subscriptions","organizations_url":"https://api.github.com/users/amos-ws16/orgs","repos_url":"https://api.github.com/users/amos-ws16/repos","events_url":"https://api.github.com/users/amos-ws16/events{/privacy}","received_events_url":"https://api.github.com/users/amos-ws16/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amos-ws16/amos-ws16-arrowjs","description":null,"fork":false,"url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs","forks_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/forks","keys_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/teams","hooks_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/hooks","issue_events_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues/events{/number}","events_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/events","assignees_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/assignees{/user}","branches_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/branches{/branch}","tags_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/tags","blobs_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/statuses/{sha}","languages_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/languages","stargazers_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/stargazers","contributors_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/contributors","subscribers_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/subscribers","subscription_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/subscription","commits_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/contents/{+path}","compare_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/merges","archive_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/downloads","issues_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues{/number}","pulls_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls{/number}","milestones_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/milestones{/number}","notifications_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/labels{/name}","releases_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/releases{/id}","deployments_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/deployments","created_at":"2016-10-27T11:19:19Z","updated_at":"2016-11-23T21:38:41Z","pushed_at":"2016-11-27T15:52:41Z","git_url":"git://github.com/amos-ws16/amos-ws16-arrowjs.git","ssh_url":"git@github.com:amos-ws16/amos-ws16-arrowjs.git","clone_url":"https://github.com/amos-ws16/amos-ws16-arrowjs.git","svn_url":"https://github.com/amos-ws16/amos-ws16-arrowjs","homepage":null,"size":1454,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"amos-ws16:dev","ref":"dev","sha":"0986eea9dc8a755724cb726c1716aa1666706263","user":{"login":"amos-ws16","id":23098034,"avatar_url":"https://avatars.githubusercontent.com/u/23098034?v=3","gravatar_id":"","url":"https://api.github.com/users/amos-ws16","html_url":"https://github.com/amos-ws16","followers_url":"https://api.github.com/users/amos-ws16/followers","following_url":"https://api.github.com/users/amos-ws16/following{/other_user}","gists_url":"https://api.github.com/users/amos-ws16/gists{/gist_id}","starred_url":"https://api.github.com/users/amos-ws16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amos-ws16/subscriptions","organizations_url":"https://api.github.com/users/amos-ws16/orgs","repos_url":"https://api.github.com/users/amos-ws16/repos","events_url":"https://api.github.com/users/amos-ws16/events{/privacy}","received_events_url":"https://api.github.com/users/amos-ws16/received_events","type":"Organization","site_admin":false},"repo":{"id":72101018,"name":"amos-ws16-arrowjs","full_name":"amos-ws16/amos-ws16-arrowjs","owner":{"login":"amos-ws16","id":23098034,"avatar_url":"https://avatars.githubusercontent.com/u/23098034?v=3","gravatar_id":"","url":"https://api.github.com/users/amos-ws16","html_url":"https://github.com/amos-ws16","followers_url":"https://api.github.com/users/amos-ws16/followers","following_url":"https://api.github.com/users/amos-ws16/following{/other_user}","gists_url":"https://api.github.com/users/amos-ws16/gists{/gist_id}","starred_url":"https://api.github.com/users/amos-ws16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amos-ws16/subscriptions","organizations_url":"https://api.github.com/users/amos-ws16/orgs","repos_url":"https://api.github.com/users/amos-ws16/repos","events_url":"https://api.github.com/users/amos-ws16/events{/privacy}","received_events_url":"https://api.github.com/users/amos-ws16/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amos-ws16/amos-ws16-arrowjs","description":null,"fork":false,"url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs","forks_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/forks","keys_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/teams","hooks_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/hooks","issue_events_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues/events{/number}","events_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/events","assignees_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/assignees{/user}","branches_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/branches{/branch}","tags_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/tags","blobs_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/statuses/{sha}","languages_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/languages","stargazers_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/stargazers","contributors_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/contributors","subscribers_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/subscribers","subscription_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/subscription","commits_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/contents/{+path}","compare_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/merges","archive_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/downloads","issues_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues{/number}","pulls_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls{/number}","milestones_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/milestones{/number}","notifications_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/labels{/name}","releases_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/releases{/id}","deployments_url":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/deployments","created_at":"2016-10-27T11:19:19Z","updated_at":"2016-11-23T21:38:41Z","pushed_at":"2016-11-27T15:52:41Z","git_url":"git://github.com/amos-ws16/amos-ws16-arrowjs.git","ssh_url":"git@github.com:amos-ws16/amos-ws16-arrowjs.git","clone_url":"https://github.com/amos-ws16/amos-ws16-arrowjs.git","svn_url":"https://github.com/amos-ws16/amos-ws16-arrowjs","homepage":null,"size":1454,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/31"},"html":{"href":"https://github.com/amos-ws16/amos-ws16-arrowjs/pull/31"},"issue":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues/31"},"comments":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/amos-ws16/amos-ws16-arrowjs/statuses/a7d6082bdbf3afad2588fe3dce5e12133963af7a"}}}}
{"actor":{"display_login":"oesse"}}