You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SCTK 30.1.0 detects classpath-exception-2.0 based only on word "classpath" in Java comments #2769
Please leave a brief description of the bug or feature request:
SCTK reports a license_score=7.33 for a set of Java files based only on the word "classpath" in comments.
The match details are:
matched_rule_identifier = classpath-exception-2.0_5.RULE
matched_rule_matcher = 2-aho
matched_rule_length = 2
matched_rule_match_coverage = 2
matched-rule_relevance = 11
Since the word "classpath" is likely to appear frequently in Java comments, it would be good to avoid this false positive.
What version of scancode-toolkit was used to generate the scan file? version 30.1.0
is detected by this rule and with matched_text: classpath::[jdwp]::exception; and it should not be detected if there are extra words between classpath and exception
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details.
Jan 21, 2002
The libgcj library is licensed under the terms of the GNU General
Public License.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
You should have received a copy of the GNU General Public License
along with libjava; see the file COPYING. If not, write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
Activity
pombredanne commentedon Nov 27, 2021
This make sense but https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/rules/classpath-exception-2.0_5.RULE has this text
classpath exceptionWould you have a file with the problematic detection to link or attach?
pombredanne commentedon Nov 27, 2021
Never mind I can the see the issue now. For instance this C++ snippet from https://github.com/SanDisk-Open-Source/SSD_Dashboard/blob/f0240a983544a86989eec80a9a5210f2b14fa1c1/uefi/gcc/gcc-4.6.3/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc#L280:
is detected by this rule and with
matched_text: classpath::[jdwp]::exception;and it should not be detected if there are extra words between classpath and exceptionAdd test for continuous detection #2769
Rename only_known_words to continuous #2769
Refine license matches filtering. Add new rules
DennisClark commentedon Apr 10, 2025
I scanned file
natVMVirtualMachine.ccusing scancode-toolkit-3.2.3 and the results, though somewhat unexpected, appear to be correct. Closing.The following match is interesting in the context of this issue:
The matched text in
natVMVirtualMachine.ccis:The file
LIBGCJ_LICENSEat https://github.com/SanDisk-Open-Source/SSD_Dashboard/blob/f0240a983544a86989eec80a9a5210f2b14fa1c1/uefi/gcc/gcc-4.6.3/libjava/LIBGCJ_LICENSE contains this text, which explains the match on GPL-2.0-or-later WITH Classpath-exception-2.0natVMVirtualMachine.cc.zip
natVMVirtualMachine.cc-results.json