{"action":"created","issue":{"url":"https://api.github.com/repos/benbalter/licensee/issues/103","repository_url":"https://api.github.com/repos/benbalter/licensee","labels_url":"https://api.github.com/repos/benbalter/licensee/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/benbalter/licensee/issues/103/comments","events_url":"https://api.github.com/repos/benbalter/licensee/issues/103/events","html_url":"https://github.com/benbalter/licensee/issues/103","id":159980185,"number":103,"title":"Apache 2.0 boilerplate not recognized as part of LICENSE file","user":{"login":"sschuberth","id":349154,"avatar_url":"https://avatars.githubusercontent.com/u/349154?v=3","gravatar_id":"","url":"https://api.github.com/users/sschuberth","html_url":"https://github.com/sschuberth","followers_url":"https://api.github.com/users/sschuberth/followers","following_url":"https://api.github.com/users/sschuberth/following{/other_user}","gists_url":"https://api.github.com/users/sschuberth/gists{/gist_id}","starred_url":"https://api.github.com/users/sschuberth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschuberth/subscriptions","organizations_url":"https://api.github.com/users/sschuberth/orgs","repos_url":"https://api.github.com/users/sschuberth/repos","events_url":"https://api.github.com/users/sschuberth/events{/privacy}","received_events_url":"https://api.github.com/users/sschuberth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-06-13T15:36:58Z","updated_at":"2016-06-14T08:30:10Z","closed_at":null,"body":"For the `LICENSE` file\r\n\r\n    Copyright (c) 2016 HERE Europe B.V.\r\n\r\n    Licensed under the Apache License, Version 2.0 (the \"License\");\r\n    you may not use this file except in compliance with the License.\r\n    You may obtain a copy of the License at\r\n\r\n        http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n    Unless required by applicable law or agreed to in writing, software\r\n    distributed under the License is distributed on an \"AS IS\" BASIS,\r\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n    See the License for the specific language governing permissions and\r\n    limitations under the License.\r\n\r\n*licensee* does not correctly recognize the license (although it correctly shows the attribution):\r\n\r\n    License file: LICENSE\r\n    Attribution: Copyright (c) 2016 HERE Europe B.V.\r\n    License: no license\r\n    Confidence: %\r\n    Method: NilClass\r\n"},"comment":{"url":"https://api.github.com/repos/benbalter/licensee/issues/comments/225814022","html_url":"https://github.com/benbalter/licensee/issues/103#issuecomment-225814022","issue_url":"https://api.github.com/repos/benbalter/licensee/issues/103","id":225814022,"user":{"login":"sschuberth","id":349154,"avatar_url":"https://avatars.githubusercontent.com/u/349154?v=3","gravatar_id":"","url":"https://api.github.com/users/sschuberth","html_url":"https://github.com/sschuberth","followers_url":"https://api.github.com/users/sschuberth/followers","following_url":"https://api.github.com/users/sschuberth/following{/other_user}","gists_url":"https://api.github.com/users/sschuberth/gists{/gist_id}","starred_url":"https://api.github.com/users/sschuberth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschuberth/subscriptions","organizations_url":"https://api.github.com/users/sschuberth/orgs","repos_url":"https://api.github.com/users/sschuberth/repos","events_url":"https://api.github.com/users/sschuberth/events{/privacy}","received_events_url":"https://api.github.com/users/sschuberth/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T08:30:09Z","updated_at":"2016-06-14T08:30:09Z","body":"So I ran a few tests with `licensee`:\r\n\r\n1. The full Apache 2.0 license text (as added by GitHub's *New File* functionality) which includes the appendix with the boilerplate template is properly recognized (Confidence: 100%, Method: Licensee::Matchers::Exact).\r\n\r\n1. If the appendix including the boilerplate template is stripped from the above, the Apache 2.0 license still is properly detected (Confidence: 95.85253456221197%, Method: Licensee::Matchers::Dice).\r\n\r\n1. If the `LICENSE` file only contains the boilerplate text, no license if found (as already known, since that is what this ticket is about). The license is also not recognized if the boilerplate text is slightly modified to say \"you may not use this *project*\" or \"you may not use this `<project name>`\" instead of \"you may not use this *file*\".\r\n\r\n1. If the `LICENSE` file contains a simple statement like \"Copyright © 2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.\" as suggested by @mlinksva, `licensee` still does not recognize a license at all.\r\n\r\nPersonally, I'm ok with case 4. not being detected, as there's probably too little text to confidently detect a license.\r\n\r\nHowever, I do believe that case 3. with text that is clearly based on the boilerplate from the appendix should be detected. Following @bkeepers' [link](https://github.com/search?utf8=%E2%9C%93&q=%22Apache+License%2C+Version+2.0%22+%22Unless+required%22+filename%3ALICENSE*&type=Code&ref=searchresults) I see e.g. text like \"you may not use log4jdbc\" being used, i.e. the boilerplate has been modified to contain the project name. IMO these cases should be properly detected. If the boilerplate was copied as-is and still contains \"you may not use this file\", the Apache 2.0 license should still be detected and a warning should be displayed saying that the license probably is not applied correctly.\r\n\r\n"}}
{"actor":{"display_login":"sschuberth"}}