{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/matrix-groovy-execution-strategy-plugin/issues/1","labels_url":"https://api.github.com/repos/jenkinsci/matrix-groovy-execution-strategy-plugin/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/matrix-groovy-execution-strategy-plugin/issues/1/comments","events_url":"https://api.github.com/repos/jenkinsci/matrix-groovy-execution-strategy-plugin/issues/1/events","html_url":"https://github.com/jenkinsci/matrix-groovy-execution-strategy-plugin/pull/1","id":116568058,"number":1,"title":"Use Collections.shuffle to shuffle combinations.","user":{"login":"jtattermusch","id":9939684,"avatar_url":"https://avatars.githubusercontent.com/u/9939684?v=3","gravatar_id":"","url":"https://api.github.com/users/jtattermusch","html_url":"https://github.com/jtattermusch","followers_url":"https://api.github.com/users/jtattermusch/followers","following_url":"https://api.github.com/users/jtattermusch/following{/other_user}","gists_url":"https://api.github.com/users/jtattermusch/gists{/gist_id}","starred_url":"https://api.github.com/users/jtattermusch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtattermusch/subscriptions","organizations_url":"https://api.github.com/users/jtattermusch/orgs","repos_url":"https://api.github.com/users/jtattermusch/repos","events_url":"https://api.github.com/users/jtattermusch/events{/privacy}","received_events_url":"https://api.github.com/users/jtattermusch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-12T15:06:59Z","updated_at":"2015-11-12T19:03:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/matrix-groovy-execution-strategy-plugin/pulls/1","html_url":"https://github.com/jenkinsci/matrix-groovy-execution-strategy-plugin/pull/1","diff_url":"https://github.com/jenkinsci/matrix-groovy-execution-strategy-plugin/pull/1.diff","patch_url":"https://github.com/jenkinsci/matrix-groovy-execution-strategy-plugin/pull/1.patch"},"body":"`c.sort { Math.random() }` is a very broken way how to shuffle a list:\r\n\r\n-- Math.random returns double from [0,1) interval,  but comparator need to return values -1, 0, 1, which breaks the purpose of randomization (all elements will treated as \"greater\" than other elements).\r\n-- The comparator function is not stable, so if two elements are compared twice, this can result in \"java.lang.IllegalArgumentException: Comparison method violates its general contract\" exception. \r\n\r\nSee https://github.com/grpc/grpc/issues/3736 caused by this."},"comment":{"url":"https://api.github.com/repos/jenkinsci/matrix-groovy-execution-strategy-plugin/issues/comments/156202862","html_url":"https://github.com/jenkinsci/matrix-groovy-execution-strategy-plugin/pull/1#issuecomment-156202862","issue_url":"https://api.github.com/repos/jenkinsci/matrix-groovy-execution-strategy-plugin/issues/1","id":156202862,"user":{"login":"jenkinsadmin","id":874715,"avatar_url":"https://avatars.githubusercontent.com/u/874715?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsadmin","html_url":"https://github.com/jenkinsadmin","followers_url":"https://api.github.com/users/jenkinsadmin/followers","following_url":"https://api.github.com/users/jenkinsadmin/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsadmin/subscriptions","organizations_url":"https://api.github.com/users/jenkinsadmin/orgs","repos_url":"https://api.github.com/users/jenkinsadmin/repos","events_url":"https://api.github.com/users/jenkinsadmin/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsadmin/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T19:03:17Z","updated_at":"2015-11-12T19:03:17Z","body":"Thank you for a pull request! Please check [this document](http://jenkins-ci.org/pull-request-greeting) for how the Jenkins project handles pull requests"}}