The following document contains the results of SpotBugs
SpotBugs Version is 4.1.2
Threshold is
Effort is
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
15 | 68 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.wikidata.analyzer.WikidataAnalyzer.run(String, File, String[]) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 126 | Medium |
org.wikidata.analyzer.WikidataAnalyzer.scan(String, File, File, String[]) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 165 | Medium |
Method org.wikidata.analyzer.WikidataAnalyzer.run(String, File, String[]) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 149 | Medium |
Method org.wikidata.analyzer.WikidataAnalyzer.scan(String, File, File, String[]) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 188 | Medium |
Null passed for non-null parameter of run(String, File, String[]) in org.wikidata.analyzer.WikidataAnalyzer.init(String[]) | CORRECTNESS | NP_NULL_PARAM_DEREF | 76 | High |
Method org.wikidata.analyzer.WikidataAnalyzer.run(String, File, String[]) constructs a File object, merely to convert it to a Path object | CORRECTNESS | UAC_UNNECESSARY_API_CONVERSION_FILE_TO_PATH | 139 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Method org.wikidata.analyzer.Fetcher.ArchiveOrgJsonOnlineDumpFile.prepareDumpFile() passes a concatenated string to SLF4J's or Log4j2's format string | PERFORMANCE | LO_APPENDED_STRING_IN_FORMAT_STRING | 97 | Medium |
Method org.wikidata.analyzer.Fetcher.ArchiveOrgJsonOnlineDumpFile.prepareDumpFile() passes a concatenated string to SLF4J's or Log4j2's format string | PERFORMANCE | LO_APPENDED_STRING_IN_FORMAT_STRING | 115 | Medium |
Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance | CORRECTNESS | SLF4J_FORMAT_SHOULD_BE_CONST | 97 | High |
Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance | CORRECTNESS | SLF4J_FORMAT_SHOULD_BE_CONST | 115 | High |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.wikidata.analyzer.Fetcher.DumpDateFetcher.getJsonDumpsPageHtml(): new java.io.InputStreamReader(InputStream) | I18N | DM_DEFAULT_ENCODING | 37 | High |
org.wikidata.analyzer.Fetcher.DumpDateFetcher.getJsonDumpsPageHtml() may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 37 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Method org.wikidata.analyzer.Fetcher.DumpFetcher.getDump(String) needlessly boxes a boolean constant | PERFORMANCE | NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION | 76 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.wikidata.analyzer.Fetcher.RefPropFetcher.readPropertiesFromCacheFile(File): new java.util.Scanner(File) | I18N | DM_DEFAULT_ENCODING | 37 | High |
Found reliance on default encoding in org.wikidata.analyzer.Fetcher.RefPropFetcher.writeCache(List): new java.io.FileWriter(String) | I18N | DM_DEFAULT_ENCODING | 87 | High |
org.wikidata.analyzer.Fetcher.RefPropFetcher.readPropertiesFromCacheFile(File) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 45 | Medium |
Method org.wikidata.analyzer.Fetcher.RefPropFetcher.readPropertiesFromCacheFile(File) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 44 | Medium |
Method org.wikidata.analyzer.Fetcher.RefPropFetcher.writeCache(List) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 92 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
This method java.net.URLEncoder.encode(String, String) should use a StandardCharsets.XXX.name() to specify an encoding | CORRECTNESS | CSI_CHAR_SET_ISSUES_USE_STANDARD_CHARSET_NAME | 32 | Medium |
This method new java.util.Scanner(InputStream, String) should use a StandardCharsets.XXX.name() to specify an encoding | CORRECTNESS | CSI_CHAR_SET_ISSUES_USE_STANDARD_CHARSET_NAME | 49 | Medium |
org.wikidata.analyzer.Fetcher.WikiDataFetcher.queryDataFromWikidata(String) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 45 | Medium |
Method org.wikidata.analyzer.Fetcher.WikiDataFetcher.queryDataFromWikidata(String) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 44 | Medium |
Method org.wikidata.analyzer.Fetcher.WikiDataFetcher.queryDataFromWikidata(String) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 57 | Medium |
Method org.wikidata.analyzer.Fetcher.WikiDataFetcher.queryDataFromWikidata(String) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 62 | Medium |
Null passed for non-null parameter of new java.net.URL(String) in org.wikidata.analyzer.Fetcher.WikiDataFetcher.queryDataFromWikidata(String) | CORRECTNESS | NP_NULL_PARAM_DEREF | 39 | Medium |
org.wikidata.analyzer.Fetcher.WikiDataFetcher.getResultsList(JSONObject): 1st parameter 'apiJSON' could be declared as java.util.Map instead | STYLE | OCP_OVERLY_CONCRETE_PARAMETER | 69 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.wikidata.analyzer.Fetcher.WikimediasFetcher.readWikimediasFromCacheFile(String): new java.io.FileReader(String) | I18N | DM_DEFAULT_ENCODING | 41 | High |
org.wikidata.analyzer.Fetcher.WikimediasFetcher.readWikimediasFromCacheFile(String) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 48 | Medium |
Method org.wikidata.analyzer.Fetcher.WikimediasFetcher.readWikimediasFromCacheFile(String) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 47 | Medium |
Method org.wikidata.analyzer.Fetcher.WikimediasFetcher.readWikimediasFromCacheFile(String) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 52 | Medium |
Method org.wikidata.analyzer.Fetcher.WikimediasFetcher.writeCache(List) prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 103 | Medium |
org.wikidata.analyzer.Fetcher.WikimediasFetcher.readWikimediasFromCacheFile(String) may fail to clean up java.io.Reader | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 41 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.wikidata.analyzer.Processor.BadDateProcessor.setUp(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 32 | High |
org.wikidata.analyzer.Processor.BadDateProcessor.setUp() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 36 | Medium |
Method org.wikidata.analyzer.Processor.BadDateProcessor.doPreProcessing() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 46 | Medium |
Method org.wikidata.analyzer.Processor.BadDateProcessor.setUp() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 35 | Medium |
Method org.wikidata.analyzer.Processor.BadDateProcessor.tearDown() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 54 | Medium |
Method org.wikidata.analyzer.Processor.BadDateProcessor.tearDown() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 59 | Medium |
Method org.wikidata.analyzer.Processor.BadDateProcessor.setUp() uses a FileInputStream or FileOutputStream constructor | PERFORMANCE | IOI_USE_OF_FILE_STREAM_CONSTRUCTORS | 32 | Medium |
Method org.wikidata.analyzer.Processor.BadDateProcessor.setUp() uses a FileInputStream or FileOutputStream constructor | PERFORMANCE | IOI_USE_OF_FILE_STREAM_CONSTRUCTORS | 33 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.wikidata.analyzer.Processor.ExactValueQuantityProcessor.tearDown(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 40 | High |
method org.wikidata.analyzer.Processor.ExactValueQuantityProcessor.tearDown() converts an exception into a boolean 'error code' value | STYLE | EXS_EXCEPTION_SOFTENING_RETURN_FALSE | 45 | Medium |
Method org.wikidata.analyzer.Processor.ExactValueQuantityProcessor.tearDown() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 44 | Medium |
Method org.wikidata.analyzer.Processor.ExactValueQuantityProcessor.tearDown() uses a FileInputStream or FileOutputStream constructor | PERFORMANCE | IOI_USE_OF_FILE_STREAM_CONSTRUCTORS | 40 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.wikidata.analyzer.Processor.MapProcessor defines List based fields but uses them like Sets | PERFORMANCE | DLC_DUBIOUS_LIST_COLLECTION | 101 | Medium |
Found reliance on default encoding in org.wikidata.analyzer.Processor.MapProcessor.tearDown(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 36 | High |
Method org.wikidata.analyzer.Processor.MapProcessor.tearDown() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 40 | Medium |
Method org.wikidata.analyzer.Processor.MapProcessor.tearDown() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 51 | Medium |
Method org.wikidata.analyzer.Processor.MapProcessor.tearDown() uses a FileInputStream or FileOutputStream constructor | PERFORMANCE | IOI_USE_OF_FILE_STREAM_CONSTRUCTORS | 36 | Medium |
Method org.wikidata.analyzer.Processor.MapProcessor.tearDown() uses a FileInputStream or FileOutputStream constructor | PERFORMANCE | IOI_USE_OF_FILE_STREAM_CONSTRUCTORS | 47 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Class org.wikidata.analyzer.Processor.MetricProcessor defines List based fields but uses them like Sets | PERFORMANCE | DLC_DUBIOUS_LIST_COLLECTION | 134 | Medium |
Found reliance on default encoding in org.wikidata.analyzer.Processor.MetricProcessor.tearDown(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 45 | High |
method org.wikidata.analyzer.Processor.MetricProcessor.tearDown() converts an exception into a boolean 'error code' value | STYLE | EXS_EXCEPTION_SOFTENING_RETURN_FALSE | 50 | Medium |
Method org.wikidata.analyzer.Processor.MetricProcessor.tearDown() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 49 | Medium |
Method org.wikidata.analyzer.Processor.MetricProcessor.tearDown() uses a FileInputStream or FileOutputStream constructor | PERFORMANCE | IOI_USE_OF_FILE_STREAM_CONSTRUCTORS | 45 | Medium |
Method org.wikidata.analyzer.Processor.MetricProcessor.processReferenceSnak(Snak) uses instanceof on multiple types to arbitrate logic | STYLE | ITC_INHERITANCE_TYPE_CHECKING | 138 | Medium |
Method org.wikidata.analyzer.Processor.MetricProcessor.processStatement(Statement) checks the size of a collection against zero rather than using isEmpty() | STYLE | SPP_USE_ISEMPTY | 110 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Found reliance on default encoding in org.wikidata.analyzer.Processor.MonolingualTextProcessor.tearDown(): new java.io.OutputStreamWriter(OutputStream) | I18N | DM_DEFAULT_ENCODING | 35 | High |
method org.wikidata.analyzer.Processor.MonolingualTextProcessor.tearDown() converts an exception into a boolean 'error code' value | STYLE | EXS_EXCEPTION_SOFTENING_RETURN_FALSE | 40 | Medium |
Method org.wikidata.analyzer.Processor.MonolingualTextProcessor.tearDown() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 39 | Medium |
Method org.wikidata.analyzer.Processor.MonolingualTextProcessor.tearDown() uses a FileInputStream or FileOutputStream constructor | PERFORMANCE | IOI_USE_OF_FILE_STREAM_CONSTRUCTORS | 35 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Empty method org.wikidata.analyzer.Processor.WikidataAnalyzerProcessor.doPostProcessing() could be declared abstract | STYLE | ACEM_ABSTRACT_CLASS_EMPTY_METHODS | 58 | Medium |
Empty method org.wikidata.analyzer.Processor.WikidataAnalyzerProcessor.doPreProcessing() could be declared abstract | STYLE | ACEM_ABSTRACT_CLASS_EMPTY_METHODS | 50 | Medium |
Empty method org.wikidata.analyzer.Processor.WikidataAnalyzerProcessor.setUp() could be declared abstract | STYLE | ACEM_ABSTRACT_CLASS_EMPTY_METHODS | 35 | Medium |
new org.wikidata.analyzer.Processor.WikidataAnalyzerProcessor() invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 23 | Medium |
Method new org.wikidata.analyzer.Processor.WikidataAnalyzerProcessor() prints the stack trace to the console | STYLE | IMC_IMMATURE_CLASS_PRINTSTACKTRACE | 22 | Medium |