{"action":"created","issue":{"url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/149","labels_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/149/comments","events_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/149/events","html_url":"https://github.com/JnRouvignac/AutoRefactor/issues/149","id":119730277,"number":149,"title":"\"Comments\" refactoring can lead to compile errors","user":{"login":"martinschemel","id":1593923,"avatar_url":"https://avatars.githubusercontent.com/u/1593923?v=3","gravatar_id":"","url":"https://api.github.com/users/martinschemel","html_url":"https://github.com/martinschemel","followers_url":"https://api.github.com/users/martinschemel/followers","following_url":"https://api.github.com/users/martinschemel/following{/other_user}","gists_url":"https://api.github.com/users/martinschemel/gists{/gist_id}","starred_url":"https://api.github.com/users/martinschemel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinschemel/subscriptions","organizations_url":"https://api.github.com/users/martinschemel/orgs","repos_url":"https://api.github.com/users/martinschemel/repos","events_url":"https://api.github.com/users/martinschemel/events{/privacy}","received_events_url":"https://api.github.com/users/martinschemel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-01T14:41:38Z","updated_at":"2015-12-01T20:00:31Z","closed_at":null,"body":"Used AutoRefactor Version: 1.0.0\r\n\r\n## Before Refactoring\r\nThere are two fields in a java class:\r\n\r\n```java\r\n\t/** We use a regex because we don't care for the display of the duration **/\r\n\tprivate static final String REGEX = \"${Text}[ \\\\(\\\\d\\\\d:\\\\d\\\\d:\\\\d\\\\d\\\\)]*\"; // machtes e.g. \"<whateverText> (00:00:04)\" and \"<whateverText>\"\r\n\r\n\t// *********** result view node texts without time ***********//\r\n\tprivate static final String TS1 = \"Test Set: ts1\";\r\n```\r\n\r\n## After applying the \"Comments\" refactoring\r\n### Actual\r\n\r\n```java\r\n\t/** We use a regex because we don't care for the display of the duration *.*/\r\n\tprivate static final String REGEX = \"${Text}[ \\\\(\\\\d\\\\d:\\\\d\\\\d:\\\\d\\\\d\\\\)]*\"; /**\r\n* Machtes e.g. \"<whateverText> (00:00:04)\" and \"<whateverText>\"\r\n\r\n\t * *********** result view node texts without time ***********//\r\n\t */\r\n\tprivate static final String TS1 = \"Test Set: ts1\";\r\n```\r\n### Expectation (maybe not 100% correct)\r\n\r\n```java\r\n\t/** We use a regex because we don't care for the display of the duration. **/\r\n\tprivate static final String REGEX = \"${Text}[ \\\\(\\\\d\\\\d:\\\\d\\\\d:\\\\d\\\\d\\\\)]*\"; // machtes e.g. \"<whateverText> (00:00:04)\" and \"<whateverText>\"\r\n\r\n\t// *********** result view node texts without time ***********//\r\n\tprivate static final String TS1 = \"Test Set: ts1\";\r\n```\r\nPlease fix."},"comment":{"url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/comments/161078955","html_url":"https://github.com/JnRouvignac/AutoRefactor/issues/149#issuecomment-161078955","issue_url":"https://api.github.com/repos/JnRouvignac/AutoRefactor/issues/149","id":161078955,"user":{"login":"JnRouvignac","id":3717323,"avatar_url":"https://avatars.githubusercontent.com/u/3717323?v=3","gravatar_id":"","url":"https://api.github.com/users/JnRouvignac","html_url":"https://github.com/JnRouvignac","followers_url":"https://api.github.com/users/JnRouvignac/followers","following_url":"https://api.github.com/users/JnRouvignac/following{/other_user}","gists_url":"https://api.github.com/users/JnRouvignac/gists{/gist_id}","starred_url":"https://api.github.com/users/JnRouvignac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JnRouvignac/subscriptions","organizations_url":"https://api.github.com/users/JnRouvignac/orgs","repos_url":"https://api.github.com/users/JnRouvignac/repos","events_url":"https://api.github.com/users/JnRouvignac/events{/privacy}","received_events_url":"https://api.github.com/users/JnRouvignac/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T20:00:31Z","updated_at":"2015-12-01T20:00:31Z","body":"> (except the \"/**\" at the end of the REGEX field line which I guess is just a typo)\r\n\r\nYes, it is a copy / paste typo. I'll fix my previous comment so it does not look too weird to a reader.\r\n\r\n> On the other hand I could imagine that one writes a usual inline comment (\"//\") on purpose because he doesn't want it to be part of the actual java doc.\r\n\r\nFor a field (line comments on end of line are only used for fields) I cannot think of a good reason. Most of the time java programmers are making fields private so javadoc is not generated. However such comments escape in-IDE javadocs while browsing the code, which reduces their usefulness.\r\n\r\nFor TS, the case is even simpler in my opinion: there is no javadoc, so this should actually be a javadoc."}}