{"action":"created","issue":{"url":"https://api.github.com/repos/devopsfolks/podam/issues/236","repository_url":"https://api.github.com/repos/devopsfolks/podam","labels_url":"https://api.github.com/repos/devopsfolks/podam/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/devopsfolks/podam/issues/236/comments","events_url":"https://api.github.com/repos/devopsfolks/podam/issues/236/events","html_url":"https://github.com/devopsfolks/podam/issues/236","id":205203815,"number":236,"title":"PodamUtils.getIntegerRange() is acting unexpectedly","user":{"login":"Otanikotani","id":1468666,"avatar_url":"https://avatars.githubusercontent.com/u/1468666?v=3","gravatar_id":"","url":"https://api.github.com/users/Otanikotani","html_url":"https://github.com/Otanikotani","followers_url":"https://api.github.com/users/Otanikotani/followers","following_url":"https://api.github.com/users/Otanikotani/following{/other_user}","gists_url":"https://api.github.com/users/Otanikotani/gists{/gist_id}","starred_url":"https://api.github.com/users/Otanikotani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Otanikotani/subscriptions","organizations_url":"https://api.github.com/users/Otanikotani/orgs","repos_url":"https://api.github.com/users/Otanikotani/repos","events_url":"https://api.github.com/users/Otanikotani/events{/privacy}","received_events_url":"https://api.github.com/users/Otanikotani/received_events","type":"User","site_admin":false},"labels":[{"id":212820380,"url":"https://api.github.com/repos/devopsfolks/podam/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":174184173,"url":"https://api.github.com/repos/devopsfolks/podam/labels/Enhancement","name":"Enhancement","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-02-03T16:26:59Z","updated_at":"2017-02-06T14:28:22Z","closed_at":null,"body":"Code, it simply counts frequencies of random values from 0 to 2 inclusively. \r\n```java\r\n    @Test\r\n    public void test_() throws Exception {\r\n        Map<Integer, Integer> counters = new HashMap<>();\r\n        counters.put(0, 0);\r\n        counters.put(1, 0);\r\n        counters.put(2, 0);\r\n        for (int i = 0; i < 10_000_000; i++) {\r\n            int result = PodamUtils.getIntegerInRange(0, 2);\r\n            Integer counter = counters.get(result) + 1;\r\n            counters.put(result, counter);\r\n        }\r\n        System.out.println(counters);\r\n    }\r\n```\r\n\r\nResult:\r\n```\r\n{0=2500466, 1=5000374, 2=2499160}\r\n```\r\n\r\nIs it expected behaviour? For range from 0 to 10 same code generates:\r\n```\r\n{0=500043, 1=999784, 2=1001485, 3=1001217, 4=998733, 5=999781, 6=1000986, 7=999542, 8=998796, 9=999932, 10=499701}\r\n```\r\n\r\nWhich looks a little bit weird and not fair! \r\n"},"comment":{"url":"https://api.github.com/repos/devopsfolks/podam/issues/comments/277697475","html_url":"https://github.com/devopsfolks/podam/issues/236#issuecomment-277697475","issue_url":"https://api.github.com/repos/devopsfolks/podam/issues/236","id":277697475,"user":{"login":"daivanov","id":1887529,"avatar_url":"https://avatars.githubusercontent.com/u/1887529?v=3","gravatar_id":"","url":"https://api.github.com/users/daivanov","html_url":"https://github.com/daivanov","followers_url":"https://api.github.com/users/daivanov/followers","following_url":"https://api.github.com/users/daivanov/following{/other_user}","gists_url":"https://api.github.com/users/daivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/daivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daivanov/subscriptions","organizations_url":"https://api.github.com/users/daivanov/orgs","repos_url":"https://api.github.com/users/daivanov/repos","events_url":"https://api.github.com/users/daivanov/events{/privacy}","received_events_url":"https://api.github.com/users/daivanov/received_events","type":"User","site_admin":false},"created_at":"2017-02-06T14:28:22Z","updated_at":"2017-02-06T14:28:22Z","body":"But you also should tell why things should be done. People should know motivational part of the proposal."}}
{"actor":{"display_login":"daivanov"}}