{"action":"created","comment":{"url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/comments/188098610","pull_request_review_id":120010092,"id":188098610,"diff_hunk":"@@ -0,0 +1,115 @@\n+package ca.on.oicr.pde.deciders.data;\n+\n+import ca.on.oicr.pde.deciders.exceptions.DataMismatchException;\n+import com.google.common.base.Preconditions;\n+import java.util.Objects;\n+import java.util.regex.Matcher;\n+import java.util.regex.Pattern;\n+\n+/**\n+ *\n+ * @author mlaszloffy\n+ */\n+public class Barcode {\n+\n+    private final String barcodeOne;\n+    private final String barcodeTwo;\n+\n+    public Barcode() {\n+        this.barcodeOne = \"\";\n+        this.barcodeTwo = null;\n+    }\n+\n+    public Barcode(String barcode) {\n+        Preconditions.checkNotNull(barcode);\n+        this.barcodeOne = barcode.toUpperCase();\n+        this.barcodeTwo = null;\n+    }\n+\n+    public Barcode(String barcodeOne, String barcodeTwo) {\n+        Preconditions.checkNotNull(barcodeOne);\n+        Preconditions.checkNotNull(barcodeTwo);\n+        this.barcodeOne = barcodeOne.toUpperCase();\n+        this.barcodeTwo = barcodeTwo.toUpperCase();\n+    }\n+\n+    public String getBarcodeOne() {\n+        return barcodeOne;\n+    }\n+\n+    public String getBarcodeTwo() {\n+        return barcodeTwo;\n+    }\n+\n+    public String getLengthString() {\n+        if (barcodeOne.isEmpty()) {\n+            return \"0\";\n+        } else if (barcodeTwo == null) {\n+            return Integer.toString(barcodeOne.length());\n+        } else {\n+            return Integer.toString(barcodeOne.length()) + \"x\" + Integer.toString(barcodeTwo.length());\n+        }\n+    }\n+\n+    @Override\n+    public String toString() {\n+        if (barcodeTwo == null) {\n+            return barcodeOne;\n+        } else {\n+            return barcodeOne + \"-\" + barcodeTwo;\n+        }\n+    }\n+\n+    @Override\n+    public int hashCode() {\n+        int hash = 3;\n+        hash = 79 * hash + Objects.hashCode(this.barcodeOne);\n+        hash = 79 * hash + Objects.hashCode(this.barcodeTwo);\n+        return hash;\n+    }\n+\n+    @Override\n+    public boolean equals(Object obj) {\n+        if (this == obj) {\n+            return true;\n+        }\n+        if (obj == null) {\n+            return false;\n+        }\n+        if (getClass() != obj.getClass()) {\n+            return false;\n+        }\n+        final Barcode other = (Barcode) obj;\n+        if (!Objects.equals(this.barcodeOne, other.barcodeOne)) {\n+            return false;\n+        }\n+        if (!Objects.equals(this.barcodeTwo, other.barcodeTwo)) {","path":"decider-bcl2fastq/src/main/java/ca/on/oicr/pde/deciders/data/Barcode.java","position":86,"original_position":86,"commit_id":"40c9b2a3c634d22c3a88ba8d7d3edc78d9be1fa8","original_commit_id":"40c9b2a3c634d22c3a88ba8d7d3edc78d9be1fa8","user":{"login":"sqwci","id":11527338,"avatar_url":"https://avatars2.githubusercontent.com/u/11527338?v=4","gravatar_id":"","url":"https://api.github.com/users/sqwci","html_url":"https://github.com/sqwci","followers_url":"https://api.github.com/users/sqwci/followers","following_url":"https://api.github.com/users/sqwci/following{/other_user}","gists_url":"https://api.github.com/users/sqwci/gists{/gist_id}","starred_url":"https://api.github.com/users/sqwci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqwci/subscriptions","organizations_url":"https://api.github.com/users/sqwci/orgs","repos_url":"https://api.github.com/users/sqwci/repos","events_url":"https://api.github.com/users/sqwci/events{/privacy}","received_events_url":"https://api.github.com/users/sqwci/received_events","type":"User","site_admin":false},"body":"![MINOR](https://sonarsource.github.io/sonar-github/severity-minor.png 'Severity: MINOR') Replace this if-then-else statement by a single return statement. [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonarcloud.io/coding_rules#rule_key=squid%3AS1126)\n","created_at":"2018-05-14T21:06:43Z","updated_at":"2018-05-14T21:06:43Z","html_url":"https://github.com/oicr-gsi/bcl2fastq/pull/18#discussion_r188098610","pull_request_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/18","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/comments/188098610"},"html":{"href":"https://github.com/oicr-gsi/bcl2fastq/pull/18#discussion_r188098610"},"pull_request":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/18","id":186645927,"html_url":"https://github.com/oicr-gsi/bcl2fastq/pull/18","diff_url":"https://github.com/oicr-gsi/bcl2fastq/pull/18.diff","patch_url":"https://github.com/oicr-gsi/bcl2fastq/pull/18.patch","issue_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues/18","number":18,"state":"open","locked":false,"title":"Gp 1516","user":{"login":"mlaszloffy","id":6232569,"avatar_url":"https://avatars2.githubusercontent.com/u/6232569?v=4","gravatar_id":"","url":"https://api.github.com/users/mlaszloffy","html_url":"https://github.com/mlaszloffy","followers_url":"https://api.github.com/users/mlaszloffy/followers","following_url":"https://api.github.com/users/mlaszloffy/following{/other_user}","gists_url":"https://api.github.com/users/mlaszloffy/gists{/gist_id}","starred_url":"https://api.github.com/users/mlaszloffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlaszloffy/subscriptions","organizations_url":"https://api.github.com/users/mlaszloffy/orgs","repos_url":"https://api.github.com/users/mlaszloffy/repos","events_url":"https://api.github.com/users/mlaszloffy/events{/privacy}","received_events_url":"https://api.github.com/users/mlaszloffy/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-08T14:06:49Z","updated_at":"2018-05-14T21:06:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ff33194397834cbb48c813cc7bb77f16e9f0c60","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/18/commits","review_comments_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/18/comments","review_comment_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues/18/comments","statuses_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/statuses/40c9b2a3c634d22c3a88ba8d7d3edc78d9be1fa8","head":{"label":"oicr-gsi:GP-1516","ref":"GP-1516","sha":"40c9b2a3c634d22c3a88ba8d7d3edc78d9be1fa8","user":{"login":"oicr-gsi","id":4701585,"avatar_url":"https://avatars0.githubusercontent.com/u/4701585?v=4","gravatar_id":"","url":"https://api.github.com/users/oicr-gsi","html_url":"https://github.com/oicr-gsi","followers_url":"https://api.github.com/users/oicr-gsi/followers","following_url":"https://api.github.com/users/oicr-gsi/following{/other_user}","gists_url":"https://api.github.com/users/oicr-gsi/gists{/gist_id}","starred_url":"https://api.github.com/users/oicr-gsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oicr-gsi/subscriptions","organizations_url":"https://api.github.com/users/oicr-gsi/orgs","repos_url":"https://api.github.com/users/oicr-gsi/repos","events_url":"https://api.github.com/users/oicr-gsi/events{/privacy}","received_events_url":"https://api.github.com/users/oicr-gsi/received_events","type":"Organization","site_admin":false},"repo":{"id":38708812,"name":"bcl2fastq","full_name":"oicr-gsi/bcl2fastq","owner":{"login":"oicr-gsi","id":4701585,"avatar_url":"https://avatars0.githubusercontent.com/u/4701585?v=4","gravatar_id":"","url":"https://api.github.com/users/oicr-gsi","html_url":"https://github.com/oicr-gsi","followers_url":"https://api.github.com/users/oicr-gsi/followers","following_url":"https://api.github.com/users/oicr-gsi/following{/other_user}","gists_url":"https://api.github.com/users/oicr-gsi/gists{/gist_id}","starred_url":"https://api.github.com/users/oicr-gsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oicr-gsi/subscriptions","organizations_url":"https://api.github.com/users/oicr-gsi/orgs","repos_url":"https://api.github.com/users/oicr-gsi/repos","events_url":"https://api.github.com/users/oicr-gsi/events{/privacy}","received_events_url":"https://api.github.com/users/oicr-gsi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oicr-gsi/bcl2fastq","description":"SeqWare workflow for Illumina's bcl2fastq","fork":false,"url":"https://api.github.com/repos/oicr-gsi/bcl2fastq","forks_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/forks","keys_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/teams","hooks_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/hooks","issue_events_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues/events{/number}","events_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/events","assignees_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/assignees{/user}","branches_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/branches{/branch}","tags_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/tags","blobs_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/refs{/sha}","trees_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/statuses/{sha}","languages_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/languages","stargazers_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/stargazers","contributors_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/contributors","subscribers_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/subscribers","subscription_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/subscription","commits_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/commits{/sha}","git_commits_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/commits{/sha}","comments_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/comments{/number}","issue_comment_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues/comments{/number}","contents_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/contents/{+path}","compare_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/merges","archive_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/downloads","issues_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues{/number}","pulls_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls{/number}","milestones_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/milestones{/number}","notifications_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/labels{/name}","releases_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/releases{/id}","deployments_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/deployments","created_at":"2015-07-07T19:04:55Z","updated_at":"2018-01-03T19:10:44Z","pushed_at":"2018-05-14T21:03:34Z","git_url":"git://github.com/oicr-gsi/bcl2fastq.git","ssh_url":"git@github.com:oicr-gsi/bcl2fastq.git","clone_url":"https://github.com/oicr-gsi/bcl2fastq.git","svn_url":"https://github.com/oicr-gsi/bcl2fastq","homepage":"","size":252,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"oicr-gsi:master","ref":"master","sha":"a3dd4b5fa4158dc3fce568d3be301931d4d4531f","user":{"login":"oicr-gsi","id":4701585,"avatar_url":"https://avatars0.githubusercontent.com/u/4701585?v=4","gravatar_id":"","url":"https://api.github.com/users/oicr-gsi","html_url":"https://github.com/oicr-gsi","followers_url":"https://api.github.com/users/oicr-gsi/followers","following_url":"https://api.github.com/users/oicr-gsi/following{/other_user}","gists_url":"https://api.github.com/users/oicr-gsi/gists{/gist_id}","starred_url":"https://api.github.com/users/oicr-gsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oicr-gsi/subscriptions","organizations_url":"https://api.github.com/users/oicr-gsi/orgs","repos_url":"https://api.github.com/users/oicr-gsi/repos","events_url":"https://api.github.com/users/oicr-gsi/events{/privacy}","received_events_url":"https://api.github.com/users/oicr-gsi/received_events","type":"Organization","site_admin":false},"repo":{"id":38708812,"name":"bcl2fastq","full_name":"oicr-gsi/bcl2fastq","owner":{"login":"oicr-gsi","id":4701585,"avatar_url":"https://avatars0.githubusercontent.com/u/4701585?v=4","gravatar_id":"","url":"https://api.github.com/users/oicr-gsi","html_url":"https://github.com/oicr-gsi","followers_url":"https://api.github.com/users/oicr-gsi/followers","following_url":"https://api.github.com/users/oicr-gsi/following{/other_user}","gists_url":"https://api.github.com/users/oicr-gsi/gists{/gist_id}","starred_url":"https://api.github.com/users/oicr-gsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oicr-gsi/subscriptions","organizations_url":"https://api.github.com/users/oicr-gsi/orgs","repos_url":"https://api.github.com/users/oicr-gsi/repos","events_url":"https://api.github.com/users/oicr-gsi/events{/privacy}","received_events_url":"https://api.github.com/users/oicr-gsi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oicr-gsi/bcl2fastq","description":"SeqWare workflow for Illumina's bcl2fastq","fork":false,"url":"https://api.github.com/repos/oicr-gsi/bcl2fastq","forks_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/forks","keys_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/teams","hooks_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/hooks","issue_events_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues/events{/number}","events_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/events","assignees_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/assignees{/user}","branches_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/branches{/branch}","tags_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/tags","blobs_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/refs{/sha}","trees_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/statuses/{sha}","languages_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/languages","stargazers_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/stargazers","contributors_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/contributors","subscribers_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/subscribers","subscription_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/subscription","commits_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/commits{/sha}","git_commits_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/git/commits{/sha}","comments_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/comments{/number}","issue_comment_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues/comments{/number}","contents_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/contents/{+path}","compare_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/merges","archive_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/downloads","issues_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues{/number}","pulls_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls{/number}","milestones_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/milestones{/number}","notifications_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/labels{/name}","releases_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/releases{/id}","deployments_url":"https://api.github.com/repos/oicr-gsi/bcl2fastq/deployments","created_at":"2015-07-07T19:04:55Z","updated_at":"2018-01-03T19:10:44Z","pushed_at":"2018-05-14T21:03:34Z","git_url":"git://github.com/oicr-gsi/bcl2fastq.git","ssh_url":"git@github.com:oicr-gsi/bcl2fastq.git","clone_url":"https://github.com/oicr-gsi/bcl2fastq.git","svn_url":"https://github.com/oicr-gsi/bcl2fastq","homepage":"","size":252,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/18"},"html":{"href":"https://github.com/oicr-gsi/bcl2fastq/pull/18"},"issue":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues/18"},"comments":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/oicr-gsi/bcl2fastq/statuses/40c9b2a3c634d22c3a88ba8d7d3edc78d9be1fa8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sqwci"}}