{"action":"opened","issue":{"url":"https://api.github.com/repos/codeclimate/codeclimate-duplication/issues/49","labels_url":"https://api.github.com/repos/codeclimate/codeclimate-duplication/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/codeclimate/codeclimate-duplication/issues/49/comments","events_url":"https://api.github.com/repos/codeclimate/codeclimate-duplication/issues/49/events","html_url":"https://github.com/codeclimate/codeclimate-duplication/issues/49","id":119114920,"number":49,"title":"Similar code detection overly aggresive","user":{"login":"tomato42","id":618246,"avatar_url":"https://avatars.githubusercontent.com/u/618246?v=3","gravatar_id":"","url":"https://api.github.com/users/tomato42","html_url":"https://github.com/tomato42","followers_url":"https://api.github.com/users/tomato42/followers","following_url":"https://api.github.com/users/tomato42/following{/other_user}","gists_url":"https://api.github.com/users/tomato42/gists{/gist_id}","starred_url":"https://api.github.com/users/tomato42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomato42/subscriptions","organizations_url":"https://api.github.com/users/tomato42/orgs","repos_url":"https://api.github.com/users/tomato42/repos","events_url":"https://api.github.com/users/tomato42/events{/privacy}","received_events_url":"https://api.github.com/users/tomato42/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-27T00:54:10Z","updated_at":"2015-11-27T00:54:10Z","closed_at":null,"body":"(I'm not sure if this is the right place to file this bug, please redirect me if it isn't)\r\n\r\nSo I have this analysis here: https://codeclimate.com/github/tomato42/tlslite-ng/compare/extensions-remove-similar#issues it says that there is similar code in two other places (definition of `ClientCertTypeExtension`, `SupportedGroupsExtension` and `ECPointFormatsExtension` classes).\r\n\r\nI have had them previously defined as more regular classes, with just initializers, as you can see here: https://codeclimate.com/github/tomato42/tlslite-ng/compare/softer-deduplication-in-extensions (just a previous commit to the one above)\r\n\r\nNow: while the code is similar, the values, documentation and behaviour is definitely not. So, either the similarity code detection is a little bit too trigger happy, or I'm missing some obvious way to deduplicate this code without loosing the documentation (which in this case is worth more than the code is).\r\n\r\nAnd while I can always just ignore this, it makes the \"grades\" assessment rather useless, as code similarity, even between such simple parts, makes the rating drop significantly always."}}