These are the latest results of Tesla's FindBugs code analysis (including all components and the Tesla client).
Produced using FindBugs1.3.9.
68060 lines of code analyzed, in 2203 classes, in 316 packages.
| Metric | Total | Density* |
|---|---|---|
| High Priority Warnings | 22 | 0.32 |
| Medium Priority Warnings | 237 | 3.48 |
| Total Warnings | 259 | 3.81 |
* Defects per Thousand lines of non-commenting source statements.
| Warning Type | Number |
|---|---|
| Bad practice Warnings | 41 |
| Correctness Warnings | 14 |
| Experimental Warnings | 6 |
| Malicious code vulnerability Warnings | 28 |
| Multithreaded correctness Warnings | 7 |
| Performance Warnings | 81 |
| Dodgy Warnings | 82 |
| Total | 259 |
| Warning | Priority | Details |
|---|---|---|
| Comparison of String parameter using == or != | High |
Comparison of String parameter using == or != in de.uni_koeln.spinfo.tesla.annotation.adapter.ProgressProxy.setProgressName(String) |
| equals() method does not check for null argument | High |
de.uni_koeln.spinfo.tesla.component.sequencer.AnnotationCombiner$Interval.equals(Object) does not check for null argument |
| equals() method does not check for null argument | High |
de.uni_koeln.spinfo.tesla.component.sequencer.StructureCombiner$Interval.equals(Object) does not check for null argument |
| equals() method does not check for null argument | High |
org.schwiebert.tesla.rangecomparator.FastComparator$SimpleRange.equals(Object) does not check for null argument |
| Non-transient non-serializable instance field in serializable class | High |
Class de.uni_koeln.spinfo.tesla.annotation.adapter.hibernate.queryconstraints.HibernateFilter defines non-transient non-serializable instance field method |
| Non-transient non-serializable instance field in serializable class | High |
Class de.uni_koeln.spinfo.tesla.annotation.adapter.hibernate.queryconstraints.HibernateOrder defines non-transient non-serializable instance field method |
| Equals method should not assume anything about the type of its argument | Medium |
Equals method for de.uni_koeln.spinfo.tesla.component.sequencer.AnnotationCombiner$Interval assumes the argument is of type AnnotationCombiner$Interval |
| Equals method should not assume anything about the type of its argument | Medium |
Equals method for de.uni_koeln.spinfo.tesla.component.sequencer.StructureCombiner$Interval assumes the argument is of type StructureCombiner$Interval |
| Equals method should not assume anything about the type of its argument | Medium |
Equals method for de.uni_koeln.spinfo.tesla.roles.filter.impl.tunguska.data.AnnotationRangeFilter$SimpleRange assumes the argument is of type AnnotationRangeFilter$SimpleRange |
| Equals method should not assume anything about the type of its argument | Medium |
Equals method for org.schwiebert.tesla.rangecomparator.FastComparator$SimpleRange assumes the argument is of type FastComparator$SimpleRange |
| Method might ignore exception | Medium |
de.uni_koeln.spinfo.tesla.component.reader.BNCReader.processDocument(XMLStreamReader, OutputStream) might ignore java.lang.Exception |
| Method invokes System.exit(...) | Medium |
de.uni_koeln.spinfo.tesla.component.meancomponent.MeanComponent.run() invokes System.exit(...), which shuts down the entire virtual machine |
| Class defines compareTo(...) and uses Object.equals() | Medium |
de.uni_koeln.spinfo.tesla.component.corpusstatistics.util.TokenCounts defines compareTo(TokenCounts) and uses Object.equals() |
| Class defines compareTo(...) and uses Object.equals() | Medium |
de.uni_koeln.spinfo.tesla.component.statistics.data.DocumentLogLikelihoodValue defines compareTo(DocumentLogLikelihoodValue) and uses Object.equals() |
| Class defines compareTo(...) and uses Object.equals() | Medium |
de.uni_koeln.spinfo.tesla.runtime.execution.InOrderExecutor$FutureWrapper defines compareTo(InOrderExecutor$FutureWrapper) and uses Object.equals() |
| Class defines compareTo(...) and uses Object.equals() | Medium |
de.uni_koeln.spinfo.tesla.runtime.persistence.RoleDefinition defines compareTo(RoleDefinition) and uses Object.equals() |
| Class defines compareTo(...) and uses Object.equals() | Medium |
de.uni_koeln.spinfo.tesla.tunguska.util.intervaltree.Interval defines compareTo(Interval) and uses Object.equals() |
| Method may fail to close database resource | Medium |
de.uni_koeln.spinfo.tesla.annotation.adapter.hibernate.PostGresManager.createDatabase(int, Properties) may fail to close Statement |
| Method may fail to close database resource | Medium |
de.uni_koeln.spinfo.tesla.annotation.adapter.hibernate.PostGresManager.dropDatabase(int, Properties) may fail to close Statement |
| Method may fail to close stream | Medium |
de.uni_koeln.spinfo.cryptology.io.CSVConverter.parseCVSDataFromFileToList(String) may fail to close stream |
| Method may fail to close stream | Medium |
de.uni_koeln.spinfo.tesla.component.geolocations.LexiconLoader.buildLexicon(String) may fail to close stream |
| Method may fail to close stream | Medium |
de.uni_koeln.spinfo.tesla.component.stanfordner.NamedEntityRecognizer.run() may fail to close stream |
| Method may fail to close stream | Medium |
de.uni_koeln.spinfo.tesla.server.Server.selfLogin() may fail to close stream |
| Method may fail to close stream | Medium |
new de.uni_koeln.spinfo.tesla.server.TeslaAuthorityGranter() may fail to close stream |
| Method may fail to close stream | Medium |
tests.GenPolyIII.genMelanchton() may fail to close stream |
| Method may fail to close stream | Medium |
tests.StegTester.generatePolyIICipherFromMelanchthon() may fail to close stream |
| Method may fail to close stream | Medium |
tests.TestSPre.getConfiguration(String) may fail to close stream |
| Method ignores results of InputStream.read() | Medium |
de.uni_koeln.spinfo.tesla.client.corpusmanager.provider.ReaderProvider.guessEncoding(TeslaDocument, InputStream) ignores result of java.io.InputStream.read(byte[]) |
| Method ignores exceptional return value | Medium |
de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.ResultSummaryPage$5.widgetSelected(SelectionEvent) ignores exceptional return value of java.io.File.mkdirs() |
| Method ignores exceptional return value | Medium |
new de.uni_koeln.spinfo.tesla.datasource.zip.ZipFileIndex(File, String) ignores exceptional return value of java.io.File.mkdirs() |
| Method ignores exceptional return value | Medium |
de.uni_koeln.spinfo.tesla.runtime.signal.SignalIO.getOutputStreamFor(TeslaDocument) ignores exceptional return value of java.io.File.mkdirs() |
| Method ignores exceptional return value | Medium |
de.uni_koeln.spinfo.tesla.server.environment.StandaloneEnvironment.extractComponents() ignores exceptional return value of java.io.File.mkdir() |
| Method ignores exceptional return value | Medium |
de.uni_koeln.spinfo.tesla.tunguska.db.writer.AbstractTunguskaWriter.swapDir(String, long) ignores exceptional return value of java.io.File.mkdirs() |
| Non-transient non-serializable instance field in serializable class | Medium |
Class de.uni_koeln.spinfo.tesla.annotation.adapter.tunguska.DefaultTunguskaOutputAdapter defines non-transient non-serializable instance field serializer |
| Non-transient non-serializable instance field in serializable class | Medium |
Class de.uni_koeln.spinfo.tesla.client.evaluation.EvaluationPageConfiguration defines non-transient non-serializable instance field inputSelector |
| Non-transient non-serializable instance field in serializable class | Medium |
Class de.uni_koeln.spinfo.tesla.client.ui.editors.gef.model.ChainGraphDiagram defines non-transient non-serializable instance field factory |
| Non-transient non-serializable instance field in serializable class | Medium |
Class de.uni_koeln.spinfo.tesla.component.gazetteer.GazetteerAccessAdapter defines non-transient non-serializable instance field reader |
| Transient field that isn't set by deserialization. | Medium |
The field de.uni_koeln.spinfo.tesla.datasource.CorpusManagerBean.logger is transient but isn't set by deserialization |
| Transient field that isn't set by deserialization. | Medium |
The field de.uni_koeln.spinfo.tesla.roles.table.impl.TabularSummary.columnFormats is transient but isn't set by deserialization |
| Transient field that isn't set by deserialization. | Medium |
The field de.uni_koeln.spinfo.tesla.runtime.persistence.TabularReport.columnFormats is transient but isn't set by deserialization |
| Class is Serializable, but doesn't define serialVersionUID | Medium |
de.uni_koeln.spinfo.tesla.tunguska.db.files.IntObjectHashMap is Serializable; consider declaring a serialVersionUID |
| Warning | Priority | Details |
|---|---|---|
| An apparent infinite loop | High |
There is an apparent infinite loop in tests.StegTester.generatePolyIICipherFromMelanchthon() |
| Bad comparison of nonnegative value with negative constant | High |
Bad comparison of nonnegative value with -1 in de.uni_koeln.spinfo.tesla.component.reader.LatexReader.parse(InputStreamReader, StringBuffer, boolean) |
| Null pointer dereference | High |
Null pointer dereference of toReturn in de.uni_koeln.spinfo.tesla.component.statistics.data.DocLogLikelihoodValues.getTermScore(long) |
| Call to equals() comparing different interface types | Medium |
Call to equals() comparing different interface types in de.uni_koeln.spinfo.tesla.annotation.adapter.hibernate.queryconstraints.HibernateFilter.internMatch(Comparable) |
| Class defines field that masks a superclass field | Medium |
Field TweetArchiveReader.sa masks field in superclass de.uni_koeln.spinfo.tesla.component.reader.TextReader |
| Class defines field that masks a superclass field | Medium |
Field TweetArchiveReader.signalWriter masks field in superclass de.uni_koeln.spinfo.tesla.component.reader.TextReader |
| Nullcheck of value previously dereferenced | Medium |
Nullcheck of experiment at line 193 of value previously dereferenced in de.uni_koeln.spinfo.tesla.client.ui.views.RunningExperimentContentProvider.experimentModified(int, int) |
| Uninitialized read of field method called from constructor of superclass | Medium |
component isn't initialized in de.uni_koeln.spinfo.tesla.client.ui.editors.gef.model.ComponentVertex.setSize(Dimension) when invoked from constructor for superclass |
| Uninitialized read of field method called from constructor of superclass | Medium |
documentSelection isn't initialized in de.uni_koeln.spinfo.tesla.client.ui.editors.gef.model.DocumentCollectionVertex.setSize(Dimension) when invoked from constructor for superclass |
| Unwritten field | Medium |
Unwritten field: de.uni_koeln.spinfo.tesla.client.corpusmanager.dialogs.ReaderSelectionDialog.itemsToOpen |
| Unwritten field | Medium |
Unwritten field: de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.brackettext.DataOptions.weight |
| Unwritten field | Medium |
Unwritten field: de.uni_koeln.spinfo.tesla.component.reader.PortugueseCorpusReader.metaData |
| Unwritten field | Medium |
Unwritten field: de.uni_koeln.spinfo.tesla.component.reader.WikiReader.metaData |
| Unwritten field | Medium |
Unwritten field: tests.TestSPre.quartinaryParserConfig |
| Warning | Priority | Details |
|---|---|---|
| Method may fail to clean up stream or resource | Medium |
Method de.uni_koeln.spinfo.tesla.component.reader.TestBioXLSXReader.testGetPreview() may fail to clean up java.io.OutputStream |
| Method may fail to clean up stream or resource | Medium |
Method de.uni_koeln.spinfo.tesla.component.reader.TestBioXLSXReader.testProcess() may fail to clean up java.io.OutputStream |
| Method may fail to clean up stream or resource | Medium |
Method de.uni_koeln.spinfo.tesla.runtime.IOUtil.fastFileCopy(File, File) may fail to clean up java.io.InputStream |
| Method may fail to clean up stream or resource | Medium |
Method de.uni_koeln.spinfo.tesla.runtime.IOUtil.fastFileCopy(File, File) may fail to clean up java.io.OutputStream |
| Method may fail to clean up stream or resource | Medium |
Method de.uni_koeln.spinfo.tesla.server.environment.ZipUtility.zipFiles(File) may fail to clean up java.io.InputStream |
| Method may fail to clean up stream or resource | Medium |
Method new de.uni_koeln.spinfo.tesla.server.TeslaAuthorityGranter() may fail to clean up java.io.InputStream |
| Warning | Priority | Details |
|---|---|---|
| Field isn't final but should be | High |
de.uni_koeln.spinfo.tesla.component.abl.RandomAlignMethod.CONSTITUENTS_PER_WORD isn't final but should be |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.cryptology.cryptanalysis.CryptoCipherUtils.getPlayfairMatrix() may expose internal representation by returning CryptoCipherUtils.playfairMatrix |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.corpusmanager.dialogs.ReaderSelectionDialog.getItemsToOpen() may expose internal representation by returning ReaderSelectionDialog.itemsToOpen |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.table.TableContentProvider.getColumns() may expose internal representation by returning TableContentProvider.columns |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.table.TableContentProvider.getElements(Object) may expose internal representation by returning TableContentProvider.input |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.launcher.launch.ui.ComponentContentProvider.getChildren(Object) may expose internal representation by returning ComponentContentProvider.externalComponents |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.launcher.launch.ui.ComponentContentProvider.getChildren(Object) may expose internal representation by returning ComponentContentProvider.workspaceComponents |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.launcher.launch.ui.ComponentContentProvider.getExternalComponents() may expose internal representation by returning ComponentContentProvider.externalComponents |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.launcher.launch.ui.ComponentContentProvider.getParent(Object) may expose internal representation by returning ComponentContentProvider.externalComponents |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.launcher.launch.ui.ComponentContentProvider.getParent(Object) may expose internal representation by returning ComponentContentProvider.workspaceComponents |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.launcher.launch.ui.ComponentContentProvider.getWorkspaceComponents() may expose internal representation by returning ComponentContentProvider.workspaceComponents |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.client.ui.editors.gef.model.ChainGraphVertex.getPropertyDescriptors() may expose internal representation by returning ChainGraphVertex.descriptors |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.roles.expressions.impl.hibernate.data.Day.getStart() may expose internal representation by returning Day.date |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.runtime.export.MethodDescription.getParameterClassNames() may expose internal representation by returning MethodDescription.parameterClassNames |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.server.environment.AbstractEnvironment.getAnnotatedClasses() may expose internal representation by returning AbstractEnvironment.annotatedClasses |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.tunguska.db.files.DataStoreMetaData.getFilesOf(String) may expose internal representation by returning DataStoreMetaData.signals |
| May expose internal representation by returning reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.tunguska.util.DataTable.get() may expose internal representation by returning DataTable.data |
| May expose internal representation by incorporating reference to mutable object | Medium |
de.uni_koeln.spinfo.cryptology.cryptanalysis.CryptoCipherUtils.setPlayfairMatrix(char[][]) may expose internal representation by storing an externally mutable object into CryptoCipherUtils.playfairMatrix |
| May expose internal representation by incorporating reference to mutable object | Medium |
new de.uni_koeln.spinfo.tesla.client.preferences.TeslaComboFieldEditor(String, String, String[][], Composite) may expose internal representation by storing an externally mutable object into TeslaComboFieldEditor.fEntryNamesAndValues |
| May expose internal representation by incorporating reference to mutable object | Medium |
new de.uni_koeln.spinfo.tesla.client.socketlogger.preferences.ConfigurableComboFieldEditor(String, String, String[][], Composite, String) may expose internal representation by storing an externally mutable object into ConfigurableComboFieldEditor.entryNamesAndValues |
| May expose internal representation by incorporating reference to mutable object | Medium |
new de.uni_koeln.spinfo.tesla.client.socketlogger.preferences.TeslaComboFieldEditor(String, String, String[][], Composite) may expose internal representation by storing an externally mutable object into TeslaComboFieldEditor.fEntryNamesAndValues |
| May expose internal representation by incorporating reference to mutable object | Medium |
new de.uni_koeln.spinfo.tesla.roles.vectorengine.data.impl.hibernate.DoubleArrayVector(double[]) may expose internal representation by storing an externally mutable object into DoubleArrayVector.data |
| May expose internal representation by incorporating reference to mutable object | Medium |
new de.uni_koeln.spinfo.tesla.roles.vectorengine.data.impl.hibernate.IntegerArrayVector(int[]) may expose internal representation by storing an externally mutable object into IntegerArrayVector.data |
| May expose internal representation by incorporating reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.runtime.export.MethodDescription.setParameterClassNames(String[]) may expose internal representation by storing an externally mutable object into MethodDescription.parameterClassNames |
| May expose internal representation by incorporating reference to mutable object | Medium |
de.uni_koeln.spinfo.tesla.runtime.persistence.SimpleDocumentData.setData(byte[]) may expose internal representation by storing an externally mutable object into SimpleDocumentData.data |
| Public static method may expose internal representation by returning array | Medium |
public static de.uni_koeln.spinfo.tesla.client.corpusmanager.provider.DocumentUploadCharsetProvider.getAvailableCharsets() may expose internal representation by returning DocumentUploadCharsetProvider.charsets |
| Field should be package protected | Medium |
de.uni_koeln.spinfo.tesla.client.jet.ComponentGenerator.nl should be package protected |
| Field isn't final and can't be protected from malicious code | Medium |
de.uni_koeln.spinfo.tesla.client.socketlogger.SocketloggerPlugin.SOCKET_ERROR isn't final and can't be protected from malicious code |
| Warning | Priority | Details |
|---|---|---|
| Wait with two locks held | High |
wait() with two locks held in de.uni_koeln.spinfo.tesla.runtime.execution.InOrderExecutor.enqueue(Callable) |
| Constructor invokes Thread.start() | Medium |
new de.uni_koeln.spinfo.tesla.runtime.execution.InOrderExecutor(ICallback, int) invokes de.uni_koeln.spinfo.tesla.runtime.execution.InOrderExecutor$CallbackThread.start() |
| Unconditional wait | Medium |
Unconditional wait in de.uni_koeln.spinfo.tesla.component.berkeleyparser.BerkeleyParserWrapper.processSignal(ConstrainedArrayParser, String) |
| Unconditional wait | Medium |
Unconditional wait in de.uni_koeln.spinfo.tesla.runtime.execution.InOrderExecutor.enqueue(Callable) |
| Unconditional wait | Medium |
Unconditional wait in de.uni_koeln.spinfo.tesla.runtime.execution.InOrderExecutor$CallbackThread.run() |
| Wait not in loop | Medium |
Wait not in loop in de.uni_koeln.spinfo.tesla.component.berkeleyparser.BerkeleyParserWrapper.processSignal(ConstrainedArrayParser, String) |
| Wait not in loop | Medium |
Wait not in loop in de.uni_koeln.spinfo.tesla.runtime.execution.InOrderExecutor.enqueue(Callable) |
| Warning | Priority | Details |
|---|---|---|
| Method invokes inefficient Number constructor; use static valueOf instead | Medium |
Method de.uni_koeln.spinfo.tesla.client.ui.editors.gef.TeslaManhattanConnectionRouter.route(Connection) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead |
| Method invokes inefficient new String() constructor | Medium |
de.uni_koeln.spinfo.tesla.component.reader.drama.TEIDramaSpeechAct.addText(String) invokes inefficient new String() constructor |
| Method invokes inefficient new String() constructor | Medium |
de.uni_koeln.spinfo.tesla.component.reader.TEIDramaReader.queryMetaData(InputStream) invokes inefficient new String() constructor |
| Method invokes inefficient new String() constructor | Medium |
de.uni_koeln.spinfo.tesla.component.reader.TEIDramaReader.readCharacters(XMLEventReader, QName) invokes inefficient new String() constructor |
| Method concatenates strings using + in a loop | Medium |
Method de.uni_koeln.spinfo.tesla.component.reader.ChildesReader.processText(InputStream, OutputStream, boolean, String, String) concatenates strings using + in a loop |
| Method concatenates strings using + in a loop | Medium |
Method de.uni_koeln.spinfo.tesla.component.reader.TEIDramaReader.queryMetaData(InputStream) concatenates strings using + in a loop |
| Method concatenates strings using + in a loop | Medium |
Method de.uni_koeln.spinfo.tesla.component.reader.TEIDramaReader.readCharacters(XMLEventReader, QName) concatenates strings using + in a loop |
| Method concatenates strings using + in a loop | Medium |
Method de.uni_koeln.spinfo.tesla.component.reader.WikiReader.store(TimeAnnotation, String, String) concatenates strings using + in a loop |
| Should be a static inner class | Medium |
Should de.uni_koeln.spinfo.tesla.component.berkeleyparser.MultiThreadedParser$ParseResult be a _static_ inner class? |
| Should be a static inner class | Medium |
Should de.uni_koeln.spinfo.tesla.component.sequencer.AnnotationCombiner$Interval be a _static_ inner class? |
| Should be a static inner class | Medium |
Should de.uni_koeln.spinfo.tesla.component.sequencer.StructureCombiner$Interval be a _static_ inner class? |
| Should be a static inner class | Medium |
Should de.uni_koeln.spinfo.tesla.tunguska.serializer.JavaSerializer$TeslaObjectInputStream be a _static_ inner class? |
| Should be a static inner class | Medium |
Should org.schwiebert.tesla.rangecomparator.FastComparator$AggregatedResult be a _static_ inner class? |
| Should be a static inner class | Medium |
Should org.schwiebert.tesla.rangecomparator.FastComparator$SimpleRange be a _static_ inner class? |
| Unread field: should this field be static? | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.VoynichInterlinearArchiveReader.VOYNICH_INTERLINEAR_FILE_IDENTIFIER; should this field be static? |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.core.connection.DisconnectFromServerAction.window |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.core.connection.ServerMessagesReceiver.debug |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.core.dialogs.TeslaMessageDialog.shell |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.core.dialogs.TeslaMessageDialog.throwable |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.core.util.TeslaLabelProvider.signalGroupStrings |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.corpusmanager.viewer.ReaderEncodingDialogViewer.table |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.styledtext.DetailsTreeContentProvider.roots |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.StructureAnalyzer.maxSize |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.evaluation.util.LabelUtil.descriptor |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.launcher.launch.TeslaLaunchDelegate.sources |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.socketlogger.preferences.ConfigurableComboFieldEditor.entryNamesAndValues |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.ui.editors.gef.actions.ConsumesConnectionFactory.factory |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.ui.editors.gef.policies.DiagramRootLayoutPolicy.editPart |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.ui.views.ComponentStateComposite.testCancelThread |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.ui.wizards.GraphWizard.parent |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.client.ui.wizards.GraphWizard.selection |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.expressions.util.GermanDateMatcher.s |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.kmeans.KMeansClustererComponent.numberOfThreads |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.lemmy.Morphy.tagUnknown |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.lemmy.Morphy.useMultipleTags |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.BNCReader.factory |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.BNCReader$IntPair.start |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.BrownTEIReader.factory |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.BrownTEIReader$IntPair.start |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.ChildesReader.add |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.TigerCorpusReader.converter |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.TigerCorpusReader.morphologyErrors |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.reader.TigerCorpusReader.morphologySucesses |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.spre.Accumulator.accumulationValue |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.component.sttstagger.SttsTagger$TaggerResult.token |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.components.componenttester.ITestResultsAccessAdapter$AdapterTest.adapter |
| Unread field | Medium |
Unread field: de.uni_koeln.spinfo.tesla.roles.categorizer.access.ITemporalExpressionAccessAdapter$AdapterTest.adapter |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.cryptology.steganalysis.util.StegCipherUtils.pos |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.cryptology.steganalysis.util.StegCipherUtils.positions |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.client.corpusmanager.wizards.PatchedWizardResourceImportPage.initialContainerFieldValue |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.client.socketlogger.views.console.ConsoleAppender$UpdateListRunnable.counter |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.indexer.JythonIndexer.inputAdapter |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.indexer.JythonIndexer.stems |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.parser.JythonCombinatorParser.sa |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.parser.JythonCombinatorParser.sentences |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.stemmer.JythonPorterStemmer.stems |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.stemmer.JythonPorterStemmer.words |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.stemmer.JythonRegexStemmer.expressions |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.stemmer.JythonRegexStemmer.stems |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.jython.stemmer.JythonRegexStemmer.words |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.reader.BlogCorpusReader.attributes |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.reader.ChildesReader.ignorePunctuation |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.reader.LatexReader.factory |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.sequencer.AnnotationCombiner$Interval.elements |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.sequencer.StructureCombiner$Interval.elements |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.sequencer.TypeFrequencies.outputAdapter |
| Unused field | Medium |
Unused field: de.uni_koeln.spinfo.tesla.component.statistics.ZipfCalculator.outputAdapter |
| Unused field | Medium |
Unused field: org.schwiebert.tesla.rangecomparator.SequenceMetrics.dummy |
| Unused field | Medium |
Unused field: tests.TestSPre.preprocessor |
| Unused field | Medium |
Unused field: tests.TestSPre.txtReader |
| Unused field | Medium |
Unused field: tests.TestSPre.wordParser |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method de.uni_koeln.spinfo.tesla.client.ui.actions.DeleteExperimentAction$1.run(IProgressMonitor) makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method new de.uni_koeln.spinfo.tesla.client.ui.editors.gef.model.ComponentVertex(ComponentEntity, Experiment) makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method de.uni_koeln.spinfo.tesla.component.corpusstatistics.calculators.TokenCharTree.addWords(Map) makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method de.uni_koeln.spinfo.tesla.component.corpusstatistics.util.CSVExporter.aggregate(Map) makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method de.uni_koeln.spinfo.tesla.component.corpusstatistics.util.CSVExporter.export(String, Map) makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method de.uni_koeln.spinfo.tesla.component.gazetteer.KeywordTreeNode.mergeChildren(Map, Set) makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method de.uni_koeln.spinfo.tesla.component.geolocations.util.KeywordTreeNode.mergeChildren(Map, Set) makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method de.uni_koeln.spinfo.tesla.component.reader.VoynichInterlinearArchiveReader.processData(InputStream, boolean, String, String) makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method new de.uni_koeln.spinfo.tesla.server.TeslaAuthorityGranter() makes inefficient use of keySet iterator instead of entrySet iterator |
| Inefficient use of keySet iterator instead of entrySet iterator | Medium |
Method tests.CryptoComponentTester.testMethods() makes inefficient use of keySet iterator instead of entrySet iterator |
| Warning | Priority | Details |
|---|---|---|
| Dead store to local variable | High |
Dead store to buffer in de.uni_koeln.spinfo.tesla.component.reader.TweetArchiveReader.processText(InputStream, OutputStream, boolean, String, String) |
| Dead store to local variable | High |
Dead store to types in de.uni_koeln.spinfo.tesla.component.spre.SPre2Component.preprocessDocument(SPreParser, TeslaDocument) |
| Dereference of the result of readLine() without nullcheck | High |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.VoynichInterlinearArchiveReader.supportsContent(InputStream) |
| Potentially dangerous use of non-short-circuit logic | High |
Potentially dangerous use of non-short-circuit logic in de.uni_koeln.spinfo.tesla.component.spre.SPre2Component.preprocessDocument(SPreParser, TeslaDocument) |
| Potentially dangerous use of non-short-circuit logic | High |
Potentially dangerous use of non-short-circuit logic in de.uni_koeln.spinfo.tesla.component.spre.SPre2Component.run() |
| Write to static field from instance method | High |
Write to static field de.uni_koeln.spinfo.cryptology.steganalysis.util.State.lastSymbol from instance method de.uni_koeln.spinfo.cryptology.steganalysis.util.State.emitSymbol() |
| Write to static field from instance method | High |
Write to static field de.uni_koeln.spinfo.tesla.client.core.provider.components.ComponentTree.ru from instance method new de.uni_koeln.spinfo.tesla.client.core.provider.components.ComponentTree(Collection) |
| Write to static field from instance method | High |
Write to static field de.uni_koeln.spinfo.tesla.component.reader.TestBioXLSXReader.file from instance method de.uni_koeln.spinfo.tesla.component.reader.TestBioXLSXReader.setUp() |
| Write to static field from instance method | High |
Write to static field de.uni_koeln.spinfo.tesla.component.reader.TestBioXLSXReader.reader from instance method de.uni_koeln.spinfo.tesla.component.reader.TestBioXLSXReader.setUp() |
| Write to static field from instance method | High |
Write to static field de.uni_koeln.spinfo.tesla.component.reader.TestTEIDramaReader.file from instance method de.uni_koeln.spinfo.tesla.component.reader.TestTEIDramaReader.setUp() |
| Write to static field from instance method | High |
Write to static field de.uni_koeln.spinfo.tesla.component.reader.TestTEIDramaReader.reader from instance method de.uni_koeln.spinfo.tesla.component.reader.TestTEIDramaReader.setUp() |
| Unchecked/unconfirmed cast | Medium |
Unchecked/unconfirmed cast from de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.data.SimpleFeature to de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.data.AnnotationFeature in de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.brackettext.BracketTextEditor$5.compare(SimpleFeature, SimpleFeature) |
| Unchecked/unconfirmed cast | Medium |
Unchecked/unconfirmed cast from de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.data.SimpleFeature to de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.data.AnnotationFeature in de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.brackettext.BracketTextEditor$5.compare(SimpleFeature, SimpleFeature) |
| instanceof will always return true | Medium |
instanceof will always return true in de.uni_koeln.spinfo.tesla.client.ui.editors.ExperimentEditor.checkDirty(boolean), since all de.uni_koeln.spinfo.tesla.client.ui.editors.ExperimentEditor are instances of de.uni_koeln.spinfo.tesla.client.ui.editors.ExperimentEditor |
| Unchecked/unconfirmed cast | Medium |
Unchecked/unconfirmed cast from de.uni_koeln.spinfo.tesla.runtime.persistence.TeslaDocument to de.uni_koeln.spinfo.tesla.lucene.dummy.FakeTeslaDocument in de.uni_koeln.spinfo.tesla.lucene.dummy.FakeDataProvider.getDataFromTeslaDocument(TeslaDocument) |
| Method uses the same code for two branches | Medium |
Method de.uni_koeln.spinfo.tesla.client.ide.builders.TeslaComponentProjectBuilder.build(int, Map, IProgressMonitor) uses the same code for two branches |
| Dead store to local variable | Medium |
Dead store to leftConstrain in de.uni_koeln.spinfo.tesla.annotation.adapter.db4o.AbstractDB4OAccessAdapter.constraintRange(Query, Range) |
| Dead store to local variable | Medium |
Dead store to rightConstrain in de.uni_koeln.spinfo.tesla.annotation.adapter.db4o.AbstractDB4OAccessAdapter.constraintRange(Query, Range) |
| Dead store to local variable | Medium |
Dead store to wizardSettings in new de.uni_koeln.spinfo.tesla.client.corpusmanager.wizards.DocumentUploadWizard() |
| Dead store to local variable | Medium |
Dead store to offset in de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.styledtext.HighlightedTextEditor$1.mouseMove(MouseEvent) |
| Dead store to local variable | Medium |
Dead store to unique in de.uni_koeln.spinfo.tesla.component.abl.RandomAlignComponent.run() |
| Dead store to local variable | Medium |
Dead store to metadataAnnotationFactory in de.uni_koeln.spinfo.tesla.component.reader.PortugueseCorpusReader.processText(InputStream, OutputStream, boolean, String, String) |
| Dead store to local variable | Medium |
Dead store to leaves in de.uni_koeln.spinfo.tesla.component.stanfordparser.ParserTest.main(String[]) |
| Dead store to local variable | Medium |
Dead store to cls in de.uni_koeln.spinfo.tesla.runtime.component.annotations.ServerSubclassChoice.getInitialValues() |
| Dead store to local variable | Medium |
Dead store to logger in de.uni_koeln.spinfo.tesla.runtime.persistence.ComponentEntity.generateMd5Value() |
| Dead store to local variable | Medium |
Dead store to configurations in tests.CryptoComponentTester.testConfiguration() |
| Code contains a hard coded reference to an absolute pathname | Medium |
Hard coded reference to an absolute pathname in de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.ObjectModelGenerator.main(String[]) |
| Code contains a hard coded reference to an absolute pathname | Medium |
Hard coded reference to an absolute pathname in de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.PerformanceTest.main(String[]) |
| Code contains a hard coded reference to an absolute pathname | Medium |
Hard coded reference to an absolute pathname in de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.StructureAnalyzer.main(String[]) |
| Code contains a hard coded reference to an absolute pathname | Medium |
Hard coded reference to an absolute pathname in de.uni_koeln.spinfo.tesla.client.evaluation.core.parsers.TestVectorExtractor.main(String[]) |
| Code contains a hard coded reference to an absolute pathname | Medium |
Hard coded reference to an absolute pathname in de.uni_koeln.spinfo.tesla.component.reader.BrownTEIReader.main(String[]) |
| integral division result cast to double or float | Medium |
integral division result cast to double or float in de.uni_koeln.spinfo.tesla.client.evaluation.core.pages.ResultSummaryPage.addSummary(ScrolledForm, FormToolkit, ComponentEntity) |
| integral division result cast to double or float | Medium |
integral division result cast to double or float in de.uni_koeln.spinfo.tesla.component.kmeans.Clusterer.cluster(List, int, int) |
| integral division result cast to double or float | Medium |
integral division result cast to double or float in de.uni_koeln.spinfo.tesla.component.kmeans.KMeansClustererComponent.run() |
| integral division result cast to double or float | Medium |
integral division result cast to double or float in de.uni_koeln.spinfo.tesla.components.componenttester.ComponentTester.run() |
| Check for oddness that won't work for negative numbers | Medium |
Check for oddness that won't work for negative numbers in de.uni_koeln.spinfo.cryptology.cryptanalysis.CryptoCipherUtils.getBigrams(String) |
| Check for oddness that won't work for negative numbers | Medium |
Check for oddness that won't work for negative numbers in de.uni_koeln.spinfo.tesla.client.ui.editors.gef.TeslaManhattanConnectionRouter.getColumnNear(Connection, int, int, int) |
| Check for oddness that won't work for negative numbers | Medium |
Check for oddness that won't work for negative numbers in de.uni_koeln.spinfo.tesla.client.ui.editors.gef.TeslaManhattanConnectionRouter.getRowNear(Connection, int, int, int) |
| Check for oddness that won't work for negative numbers | Medium |
Check for oddness that won't work for negative numbers in de.uni_koeln.spinfo.tesla.client.ui.editors.gef.TeslaManhattanConnectionRouter.processPositions(Ray, Ray, List, boolean, Connection) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.BlogCorpusReader.testSupport(BufferedReader) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.ChildesReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.FASTAReader.processText(InputStream, OutputStream, boolean, String, String) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.FASTAReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.FASTAReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.IncantationReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.IncantationReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.PortugueseCorpusReader.processText(InputStream, OutputStream, boolean, String, String) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.PortugueseCorpusReader.testSupport(BufferedReader) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.ReutersXmlReader.findString(InputStream, String) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.ReutersXmlReader.findString(InputStream, String) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.SentimentCorpusReader.testSupport(BufferedReader) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.SpinfoCorpusReader.testSupport(BufferedReader) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.SpinfoCorpusReader.testSupport(BufferedReader) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.TEIDramaReader.testSupport(BufferedReader) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.TEIDramaReader.testSupport(BufferedReader) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.TueBaXmlReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.TweetArchiveReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.VoynichInterlinearArchiveReader.processData(InputStream, boolean, String, String) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.VulgataReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.VulgataReader.supportsContent(InputStream) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.WikiReader.testSupport(BufferedReader) |
| Dereference of the result of readLine() without nullcheck | Medium |
Dereference of the result of readLine() without nullcheck in de.uni_koeln.spinfo.tesla.component.reader.WikiReader.testSupport(BufferedReader) |
| Load of known null value | Medium |
Load of known null value in de.uni_koeln.spinfo.tesla.component.statistics.data.DocLogLikelihoodValues.getTermScore(long) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.client.core.connection.TeslaServer.updateLibraries(IProgressMonitor) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.client.evaluation.VirtualStorage.getContents() |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.client.SimplePingSender.getPing(String, int) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.component.reader.BioXLSXReader.processText(InputStream, OutputStream, boolean, String, String) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.component.reader.VoynichInterlinearArchiveReader.processData(InputStream, boolean, String, String) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.component.stanfordner.NamedEntityRecognizer.run() |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.datasource.zip.IndexManager.getIndex(File, File, String) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.runtime.execution.ExperimentExecutor.setSignalAdapters(Experiment, TeslaComponent, ComponentEntity, int, int) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.runtime.export.DefaultsUtility.hasParameterAnnotation(Method, Class, int) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.runtime.export.MethodDescription.getVisualizable(Method) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.runtime.Runtime.onMessage(Message) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.runtime.WardenclyffeBean.getRestrictionDescription(String, String, List) |
| Exception is caught when Exception is not thrown | Medium |
Exception is caught when Exception is not thrown in de.uni_koeln.spinfo.tesla.server.Server.getServerPID() |
| Switch statement found where one case falls through to the next case | Medium |
Switch statement found in de.uni_koeln.spinfo.tesla.annotation.MurmurHash.hash32(byte[], int, int) where one case falls through to the next case |
| Switch statement found where one case falls through to the next case | Medium |
Switch statement found in de.uni_koeln.spinfo.tesla.client.ui.views.RunningExperimentLabelProvider.swapObject(Event, Object) where one case falls through to the next case |
| Write to static field from instance method | Medium |
Write to static field edu.berkeley.nlp.PCFGLA.Corpus.myTreebank from instance method de.uni_koeln.spinfo.tesla.component.berkeleyparser.BerkeleyParserWrapper.run() |
| Write to static field from instance method | Medium |
Write to static field de.uni_koeln.spinfo.tesla.component.reader.TestBioXLSXReader.inputStream from instance method de.uni_koeln.spinfo.tesla.component.reader.TestBioXLSXReader.setUp() |
| Write to static field from instance method | Medium |
Write to static field de.uni_koeln.spinfo.tesla.component.reader.TestTEIDramaReader.inputStream from instance method de.uni_koeln.spinfo.tesla.component.reader.TestTEIDramaReader.setUp() |
| Useless control flow | Medium |
Useless control flow in de.uni_koeln.spinfo.tesla.client.jet.ComponentGenerator.generate(Object) |
The equals(Object o) method shouldn't make any assumptions
about the type of o. It should simply return
false if o is not the same type as this.
This instanceof test will always return true (unless the value being tested is null). Although this is safe, make sure it isn't an indication of some misunderstanding or some other logic error. If you really want to test the value for being null, perhaps it would be clearer to do better to do a null test rather than an instanceof test.
Back to topThis cast is unchecked, and not all instances of the type casted from can be cast to the type it is being cast to. Ensure that your program logic ensures that this cast will not fail.
Back to top
Using new Integer(int) is guaranteed to always result in a new object whereas
Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM.
Using of cached values avoids object allocation and the code will be faster.
Values between -128 and 127 are guaranteed to have corresponding cached instances
and using valueOf is approximately 3.5 times faster than using constructor.
For values outside the constant range the performance of both styles is the same.
Unless the class must be compatible with JVMs predating Java 1.5,
use either autoboxing or the valueOf() method when creating instances of
Long, Integer, Short, Character, and Byte.
This method uses the same code to implement two branches of a conditional branch. Check to ensure that this isn't a coding mistake.
Back to topThis method might ignore an exception. In general, exceptions should be handled or reported in some way, or they should be thrown out of the method.
Back to topThis instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.
Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.
Back to top Creating a new java.lang.String object using the
no-argument constructor wastes memory because the object so created will
be functionally indistinguishable from the empty string constant
"". Java guarantees that identical string constants
will be represented by the same String object. Therefore,
you should just use the empty string constant directly.
Invoking System.exit shuts down the entire Java virtual machine. This should only been done when it is appropriate. Such calls make it hard or impossible for your code to be invoked by other code. Consider throwing a RuntimeException instead.
Back to topThis code constructs a File object using a hard coded to an absolute pathname
(e.g., new File("/home/dannyc/workspace/j2ee/src/share/com/sun/enterprise/deployment");
This method calls equals(Object) on two references of unrelated interface types, where neither is a subtype of the other, and there are no known non-abstract classes which implement both interfaces. Therefore, the objects being compared are unlikely to be members of the same class at runtime (unless some application classes were not analyzed, or dynamic class loading can occur at runtime). According to the contract of equals(), objects of different classes should always compare as unequal; therefore, according to the contract defined by java.lang.Object.equals(Object), the result of this comparison will always be false at runtime.
Back to topReturning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.
Back to topThis code stores a reference to an externally mutable object into the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.
Back to top This class defines a compareTo(...) method but inherits its
equals() method from java.lang.Object.
Generally, the value of compareTo should return zero if and only if
equals returns true. If this is violated, weird and unpredictable
failures will occur in classes such as PriorityQueue.
In Java 5 the PriorityQueue.remove method uses the compareTo method,
while in Java 6 it uses the equals method.
From the JavaDoc for the compareTo method in the Comparable interface:
It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)).
Generally speaking, any class that implements the Comparable interface and violates this condition
should clearly indicate this fact. The recommended language
is "Note: this class has a natural ordering that is inconsistent with equals."
Back to top
This code compares a java.lang.String parameter for reference
equality using the == or != operators. Requiring callers to
pass only String constants or interned strings to a method is unnecessarily
fragile, and rarely leads to measurable performance gains. Consider
using the equals(Object) method instead.
This code casts the result of an integral division (e.g., int or long division) operation to double or float. Doing division on integers truncates the result to the integer value closest to zero. The fact that the result was cast to double suggests that this precision should have been retained. What was probably meant was to cast one or both of the operands to double before performing the division. Here is an example:
Back to topint x = 2; int y = 5; // Wrong: yields result 0.0 double value1 = x / y; // Right: yields result 0.4 double value2 = x / (double) y;
This loop doesn't seem to have a way to terminate (other than by perhaps throwing an exception).
Back to topThe code uses x % 2 == 1 to check to see if a value is odd, but this won't work for negative numbers (e.g., (-5) % 2 == -1). If this code is intending to check for oddness, consider using x & 1 == 1, or x % 2 != 0.
Back to topThis code compares a value that is guaranteed to be non-negative with a negative constant.
Back to topThis class defines a field with the same name as a visible instance field in a superclass. This is confusing, and may indicate an error if methods update or access one of the fields when they wanted the other.
Back to topA mutable static field could be changed by malicious code or by accident from another package. Unfortunately, the way the field is used doesn't allow any easy fix to this problem.
Back to topA mutable static field could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.
Back to topA mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.
Back to topA public static method returns a reference to an array that is part of the static state of the class. Any code that calls this method can freely modify the underlying array. One fix is to return a copy of the array.
Back to topThe result of invoking readLine() is dereferenced without checking to see if the result is null. If there are no more lines of text to read, readLine() will return null and dereferencing that will generate a null pointer exception.
Back to topThis implementation of equals(Object) violates the contract defined by java.lang.Object.equals() because it does not check for null being passed as the argument. All equals() methods should return false if passed a null value.
Back to topThe variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was nonnull).
Back to top A null pointer is dereferenced here. This will lead to a
NullPointerException when the code is executed.
This code seems to be using non-short-circuit logic (e.g., & or |) rather than short-circuit logic (&& or ||). In addition, it seem possible that, depending on the value of the left hand side, you might not want to evaluate the right hand side (because it would have side effects, could cause an exception or could be expensive.
Non-short-circuit logic causes both sides of the expression to be evaluated even when the result can be inferred from knowing the left-hand side. This can be less efficient and can result in errors if the left-hand side guards cases when evaluating the right-hand side can generate an error.
See the Java Language Specification for details
Back to topThis method may fail to clean up (close, dispose of) a stream, database object, or other resource requiring an explicit cleanup operation.
In general, if a method opens a stream or other resource, the method should use a try/finally block to ensure that the stream or resource is cleaned up before the method returns.
This bug pattern is essentially the same as the OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE bug patterns, but is based on a different (and hopefully better) static analysis technique. We are interested is getting feedback about the usefulness of this bug pattern. To send feedback, either:
In particular, the false-positive suppression heuristics for this bug pattern have not been extensively tuned, so reports about false positives are helpful to us.
See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for a description of the analysis technique.
Back to topThe method creates a database resource (such as a database connection or row set), does not assign it to any fields, pass it to other methods, or return it, and does not appear to close the object on all paths out of the method. Failure to close database resources on all paths out of a method may result in poor performance, and could cause the application to have problems communicating with the database.
Back to top The method creates an IO stream object, does not assign it to any
fields, pass it to other methods that might close it,
or return it, and does not appear to close
the stream on all paths out of the method. This may result in
a file descriptor leak. It is generally a good
idea to use a finally block to ensure that streams are
closed.
A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.
Back to topThis method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.
Back to top This method ignores the return value of one of the variants of
java.io.InputStream.read() which can return multiple bytes.
If the return value is not checked, the caller will not be able to correctly
handle the case where fewer bytes were read than the caller requested.
This is a particularly insidious kind of bug, because in many programs,
reads from input streams usually do read the full amount of data requested,
causing the program to fail only sporadically.
This method returns a value that is not checked. The return value should be checked
since it can indicate an unusual or unexpected function execution. For
example, the File.delete() method returns false
if the file could not be successfully deleted (rather than
throwing an Exception).
If you don't check the result, you won't notice if the method invocation
signals unexpected behavior by returning an atypical return value.
The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.
Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.
For example:
// This is bad
String s = "";
for (int i = 0; i < field.length; ++i) {
s = s + field[i];
}
// This is better
StringBuffer buf = new StringBuffer();
for (int i = 0; i < field.length; ++i) {
buf.append(field[i]);
}
String s = buf.toString();
Back to top
The constructor starts a thread. This is likely to be wrong if the class is ever extended/subclassed, since the thread will be started before the subclass constructor is started.
Back to top This Serializable class defines a non-primitive instance field which is neither transient,
Serializable, or java.lang.Object, and does not appear to implement
the Externalizable interface or the
readObject() and writeObject() methods.
Objects of this class will not be deserialized correctly if a non-Serializable
object is stored in this field.
This class contains a field that is updated at multiple places in the class, thus it seems to be part of the state of the class. However, since the field is marked as transient and not set in readObject or readResolve, it will contain the default value in any deserialized instance of the class.
Back to topThis method contains a switch statement where one case branch will fall through to the next case. Usually you need to end this case with a break or return.
Back to topThis class is an inner class, but does not use its embedded reference to the object which created it. This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary. If possible, the class should be made static.
Back to top This class implements the Serializable interface, but does
not define a serialVersionUID field.
A change as simple as adding a reference to a .class object
will add synthetic fields to the class,
which will unfortunately change the implicit
serialVersionUID (e.g., adding a reference to String.class
will generate a static field class$java$lang$String).
Also, different source code to bytecode compilers may use different
naming conventions for synthetic variables generated for
references to class objects or inner classes.
To ensure interoperability of Serializable across versions,
consider adding an explicit serialVersionUID.
This class contains an instance final field that is initialized to a compile-time static value. Consider making the field static.
Back to topThis instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.
Back to topWaiting on a monitor while two locks are held may cause deadlock. Performing a wait only releases the lock on the object being waited on, not any other locks. This not necessarily a bug, but is worth examining closely.
Back to top This method contains a useless control flow statement, where
control flow continues onto the same place regardless of whether or not
the branch is taken. For example,
this is caused by having an empty statement
block for an if statement:
if (argv.length == 0) {
// TODO: handle this case
}
Back to top
This method is invoked in the constructor of of the superclass. At this point, the fields of the class have not yet initialized.
To make this more concrete, consider the following classes:
abstract class A {
int hashCode;
abstract Object getValue();
A() {
hashCode = getValue().hashCode();
}
}
class B extends A {
Object value;
B(Object v) {
this.value = v;
}
Object getValue() {
return value;
}
}
When a B is constructed,
the constructor for the A class is invoked
before the constructor for B sets value.
Thus, when the constructor for A invokes getValue,
an uninitialized value is read for value
This field is never read. Consider removing it from the class.
Back to topThis field is never used. Consider removing it from the class.
Back to top This method contains a call to java.lang.Object.wait() which
is not guarded by conditional control flow. The code should
verify that condition it intends to wait for is not already satisfied
before calling wait; any previous notifications will be ignored.
This field is never written. All reads of it will return the default value. Check for errors (should it have been initialized?), or remove it if it is useless.
Back to top This method contains a call to java.lang.Object.wait()
which is not in a loop. If the monitor is used for multiple conditions,
the condition the caller intended to wait for might not be the one
that actually occurred.
This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.
Back to top