{"action":"created","issue":{"url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/issues/144","repository_url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer","labels_url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/issues/144/comments","events_url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/issues/144/events","html_url":"https://github.com/SpartanRefactoring/Spartanizer/issues/144","id":175765856,"number":144,"title":"Use traditional for when possible: Step I","user":{"login":"yossigil","id":12775400,"avatar_url":"https://avatars.githubusercontent.com/u/12775400?v=3","gravatar_id":"","url":"https://api.github.com/users/yossigil","html_url":"https://github.com/yossigil","followers_url":"https://api.github.com/users/yossigil/followers","following_url":"https://api.github.com/users/yossigil/following{/other_user}","gists_url":"https://api.github.com/users/yossigil/gists{/gist_id}","starred_url":"https://api.github.com/users/yossigil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yossigil/subscriptions","organizations_url":"https://api.github.com/users/yossigil/orgs","repos_url":"https://api.github.com/users/yossigil/repos","events_url":"https://api.github.com/users/yossigil/events{/privacy}","received_events_url":"https://api.github.com/users/yossigil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/labels/bug","name":"bug","color":"d93f0b"},{"url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/labels/new-tipper","name":"new-tipper","color":"55A532"}],"state":"open","locked":false,"assignee":{"login":"sakopzon","id":20325034,"avatar_url":"https://avatars.githubusercontent.com/u/20325034?v=3","gravatar_id":"","url":"https://api.github.com/users/sakopzon","html_url":"https://github.com/sakopzon","followers_url":"https://api.github.com/users/sakopzon/followers","following_url":"https://api.github.com/users/sakopzon/following{/other_user}","gists_url":"https://api.github.com/users/sakopzon/gists{/gist_id}","starred_url":"https://api.github.com/users/sakopzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakopzon/subscriptions","organizations_url":"https://api.github.com/users/sakopzon/orgs","repos_url":"https://api.github.com/users/sakopzon/repos","events_url":"https://api.github.com/users/sakopzon/events{/privacy}","received_events_url":"https://api.github.com/users/sakopzon/received_events","type":"User","site_admin":false},"assignees":[{"login":"sakopzon","id":20325034,"avatar_url":"https://avatars.githubusercontent.com/u/20325034?v=3","gravatar_id":"","url":"https://api.github.com/users/sakopzon","html_url":"https://github.com/sakopzon","followers_url":"https://api.github.com/users/sakopzon/followers","following_url":"https://api.github.com/users/sakopzon/following{/other_user}","gists_url":"https://api.github.com/users/sakopzon/gists{/gist_id}","starred_url":"https://api.github.com/users/sakopzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakopzon/subscriptions","organizations_url":"https://api.github.com/users/sakopzon/orgs","repos_url":"https://api.github.com/users/sakopzon/repos","events_url":"https://api.github.com/users/sakopzon/events{/privacy}","received_events_url":"https://api.github.com/users/sakopzon/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/milestones/2","html_url":"https://github.com/SpartanRefactoring/Spartanizer/milestones/Version%202.5","labels_url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/milestones/2/labels","id":1722647,"number":2,"title":"Version 2.5","description":"More robust version, without switch and other wring improvements. Unroll comments for now","creator":{"login":"yossigil","id":12775400,"avatar_url":"https://avatars.githubusercontent.com/u/12775400?v=3","gravatar_id":"","url":"https://api.github.com/users/yossigil","html_url":"https://github.com/yossigil","followers_url":"https://api.github.com/users/yossigil/followers","following_url":"https://api.github.com/users/yossigil/following{/other_user}","gists_url":"https://api.github.com/users/yossigil/gists{/gist_id}","starred_url":"https://api.github.com/users/yossigil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yossigil/subscriptions","organizations_url":"https://api.github.com/users/yossigil/orgs","repos_url":"https://api.github.com/users/yossigil/repos","events_url":"https://api.github.com/users/yossigil/events{/privacy}","received_events_url":"https://api.github.com/users/yossigil/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":84,"state":"open","created_at":"2016-04-21T11:32:14Z","updated_at":"2016-09-26T18:27:39Z","due_on":"2016-09-30T00:00:00Z","closed_at":null},"comments":11,"created_at":"2016-09-08T14:17:17Z","updated_at":"2016-09-26T22:56:58Z","closed_at":null,"body":"This wring is especially for @OriRoth who likes to write code like so:\r\n\r\n```java\r\n  public boolean check(final ASTNode n) {\r\n    ASTNode p = n;\r\n    while (p != null) {\r\n      if (dns.contains(p))\r\n        return true;\r\n      if (ens.contains(p))\r\n        return false;\r\n      p = p.getParent();\r\n    }\r\n    return false;\r\n  }\r\n```\r\n\r\nWe would like to convert it into a for loop. This wring will convert the above to:\r\n\r\n```java\r\n  public boolean check(final ASTNode n) {\r\n    ASTNode p = n;\r\n    for (; p != null; p = p.getParent()) {\r\n      if (dns.contains(p))\r\n        return true;\r\n      if (ens.contains(p))\r\n        return false;\r\n    }\r\n    return false;\r\n  }\r\n```\r\n\r\nPreconditions:\r\n\r\n- There is no `continue` before the last statement in the loop.\r\n- The loop is either a `for` or a `while`"},"comment":{"url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/issues/comments/249721686","html_url":"https://github.com/SpartanRefactoring/Spartanizer/issues/144#issuecomment-249721686","issue_url":"https://api.github.com/repos/SpartanRefactoring/Spartanizer/issues/144","id":249721686,"user":{"login":"sakopzon","id":20325034,"avatar_url":"https://avatars.githubusercontent.com/u/20325034?v=3","gravatar_id":"","url":"https://api.github.com/users/sakopzon","html_url":"https://github.com/sakopzon","followers_url":"https://api.github.com/users/sakopzon/followers","following_url":"https://api.github.com/users/sakopzon/following{/other_user}","gists_url":"https://api.github.com/users/sakopzon/gists{/gist_id}","starred_url":"https://api.github.com/users/sakopzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakopzon/subscriptions","organizations_url":"https://api.github.com/users/sakopzon/orgs","repos_url":"https://api.github.com/users/sakopzon/repos","events_url":"https://api.github.com/users/sakopzon/events{/privacy}","received_events_url":"https://api.github.com/users/sakopzon/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T22:56:58Z","updated_at":"2016-09-26T22:56:58Z","body":"I think there are two different tippers. One should extend ReplaceToNextStatement<ForStatement>, and second ReplaceToNextStatement<WhileStatement> (then it won't be an issue which tip was activated first). And the insertion to the initializers List shouldn't be different from the insertion to the updates List I made."}}
{"actor":{"display_login":"sakopzon"}}