SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.2.3
Threshold is medium
Effort is default
Summary
Classes |
Bugs |
Errors |
Missing Classes |
1547 |
142 |
0 |
0 |
org.eclipse.jgit.api.ApplyCommand
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.api.ApplyCommand.applyBinary(Repository, String, File, FileHeader, ApplyCommand$StreamSupplier, ObjectId, DirCacheCheckout$CheckoutMetadata) may fail to close stream |
BAD_PRACTICE |
OS_OPEN_STREAM |
474 |
Medium |
org.eclipse.jgit.api.CommitCommand
Bug |
Category |
Details |
Line |
Priority |
Return value of org.eclipse.jgit.revwalk.RevCommit.getTree() ignored, but method has no side effect |
STYLE |
RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT |
280 |
Medium |
org.eclipse.jgit.api.GarbageCollectCommand
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.api.GarbageCollectCommand.setExpire(Date) may expose internal representation by storing an externally mutable object into GarbageCollectCommand.expire |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
100 |
Medium |
org.eclipse.jgit.api.MergeResult
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.api.MergeResult.getMergedCommits() may expose internal representation by returning MergeResult.mergedCommits |
MALICIOUS_CODE |
EI_EXPOSE_REP |
353 |
Medium |
new org.eclipse.jgit.api.MergeResult(ObjectId, ObjectId, ObjectId[], MergeResult$MergeStatus, MergeStrategy, Map, Map, String) may expose internal representation by storing an externally mutable object into MergeResult.mergedCommits |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
305 |
Medium |
org.eclipse.jgit.api.RebaseCommand
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.createNewFile() ignored in org.eclipse.jgit.api.RebaseCommand.calculatePickList(RevCommit) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
1187 |
Medium |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.api.RebaseCommand.processStep(RebaseTodoLine, boolean) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
467 |
Medium |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.api.RebaseCommand.squashIntoPrevious(boolean, RebaseTodoLine) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
776 |
Medium |
Switch statement found in org.eclipse.jgit.api.RebaseCommand.processStep(RebaseTodoLine, boolean) where one case falls through to the next case |
STYLE |
SF_SWITCH_FALLTHROUGH |
457-460 |
Medium |
org.eclipse.jgit.api.RevertCommand
Bug |
Category |
Details |
Line |
Priority |
Load of known null value in org.eclipse.jgit.api.RevertCommand.call() |
STYLE |
NP_LOAD_OF_KNOWN_NULL_VALUE |
183 |
Medium |
org.eclipse.jgit.api.SubmoduleStatusCommand
Bug |
Category |
Details |
Line |
Priority |
Load of known null value in org.eclipse.jgit.api.SubmoduleStatusCommand.getStatus(SubmoduleWalk) |
STYLE |
NP_LOAD_OF_KNOWN_NULL_VALUE |
110 |
Medium |
org.eclipse.jgit.api.errors.FilterFailedException
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.api.errors.FilterFailedException.getOutput() may expose internal representation by returning FilterFailedException.stdout |
MALICIOUS_CODE |
EI_EXPOSE_REP |
133 |
Medium |
new org.eclipse.jgit.api.errors.FilterFailedException(int, String, String, byte[], String) may expose internal representation by storing an externally mutable object into FilterFailedException.stdout |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
104 |
Medium |
org.eclipse.jgit.attributes.AttributesHandler
Bug |
Category |
Details |
Line |
Priority |
Redundant nullcheck of t, which is known to be non-null in org.eclipse.jgit.attributes.AttributesHandler.rootOf(AbstractTreeIterator) |
STYLE |
RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE |
436 |
Medium |
org.eclipse.jgit.diff.RawText
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.diff.RawText.getRawContent() may expose internal representation by returning RawText.content |
MALICIOUS_CODE |
EI_EXPOSE_REP |
103 |
Medium |
new org.eclipse.jgit.diff.RawText(byte[], IntList) may expose internal representation by storing an externally mutable object into RawText.content |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
80 |
Medium |
org.eclipse.jgit.dircache.DirCacheCheckout
Bug |
Category |
Details |
Line |
Priority |
Load of known null value in org.eclipse.jgit.dircache.DirCacheCheckout.processEntry(CanonicalTreeParser, CanonicalTreeParser, DirCacheBuildIterator, WorkingTreeIterator) |
STYLE |
NP_LOAD_OF_KNOWN_NULL_VALUE |
1024 |
Medium |
Load of known null value in org.eclipse.jgit.dircache.DirCacheCheckout.processEntry(CanonicalTreeParser, CanonicalTreeParser, DirCacheBuildIterator, WorkingTreeIterator) |
STYLE |
NP_LOAD_OF_KNOWN_NULL_VALUE |
1093 |
Medium |
org.eclipse.jgit.dircache.DirCacheEntry
Bug |
Category |
Details |
Line |
Priority |
new org.eclipse.jgit.dircache.DirCacheEntry(byte[], int) may expose internal representation by storing an externally mutable object into DirCacheEntry.path |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
305 |
Medium |
org.eclipse.jgit.dircache.DirCacheIterator
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.dircache.DirCacheIterator.idBuffer() may expose internal representation by returning DirCacheIterator.zeroid |
MALICIOUS_CODE |
EI_EXPOSE_REP |
138 |
Medium |
org.eclipse.jgit.errors.CheckoutConflictException
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.errors.CheckoutConflictException.getConflictingFiles() may expose internal representation by returning CheckoutConflictException.conflicting |
MALICIOUS_CODE |
EI_EXPOSE_REP |
58 |
Medium |
new org.eclipse.jgit.errors.CheckoutConflictException(String[]) may expose internal representation by storing an externally mutable object into CheckoutConflictException.conflicting |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
47 |
Medium |
org.eclipse.jgit.gitrepo.RepoCommand$RemoteFile
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.gitrepo.RepoCommand$RemoteFile.getContents() may expose internal representation by returning RepoCommand$RemoteFile.contents |
MALICIOUS_CODE |
EI_EXPOSE_REP |
218 |
Medium |
new org.eclipse.jgit.gitrepo.RepoCommand$RemoteFile(byte[], FileMode) may expose internal representation by storing an externally mutable object into RepoCommand$RemoteFile.contents |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
204 |
Medium |
org.eclipse.jgit.internal.storage.dfs.BlockBasedFile
Bug |
Category |
Details |
Line |
Priority |
Dead store to len in org.eclipse.jgit.internal.storage.dfs.BlockBasedFile.readOneBlock(long, DfsReader, ReadableChannel) |
STYLE |
DLS_DEAD_LOCAL_STORE |
157 |
Medium |
org.eclipse.jgit.internal.storage.dfs.DfsCachedPack
Bug |
Category |
Details |
Line |
Priority |
Unchecked/unconfirmed cast from org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation to org.eclipse.jgit.internal.storage.dfs.DfsObjectRepresentation in org.eclipse.jgit.internal.storage.dfs.DfsCachedPack.hasObject(ObjectToPack, StoredObjectRepresentation) |
STYLE |
BC_UNCONFIRMED_CAST |
61 |
Medium |
org.eclipse.jgit.internal.storage.dfs.DfsObjDatabase
Bug |
Category |
Details |
Line |
Priority |
Synchronization performed on java.util.concurrent.atomic.AtomicReference in org.eclipse.jgit.internal.storage.dfs.DfsObjDatabase.scanPacks(DfsObjDatabase$PackList) |
MT_CORRECTNESS |
JLM_JSR166_UTILCONCURRENT_MONITORENTER |
563 |
Medium |
org.eclipse.jgit.internal.storage.dfs.DfsObjDatabase$PackSource$PackSourceComparator
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.dfs.DfsObjDatabase$PackSource$PackSourceComparator implements Comparator but not Serializable |
BAD_PRACTICE |
SE_COMPARATOR_SHOULD_BE_SERIALIZABLE |
171-191 |
Medium |
org.eclipse.jgit.internal.storage.dfs.DfsObjectToPack
Bug |
Category |
Details |
Line |
Priority |
Unchecked/unconfirmed cast from org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation to org.eclipse.jgit.internal.storage.dfs.DfsObjectRepresentation in org.eclipse.jgit.internal.storage.dfs.DfsObjectToPack.select(StoredObjectRepresentation) |
STYLE |
BC_UNCONFIRMED_CAST |
52 |
Medium |
Class org.eclipse.jgit.internal.storage.dfs.DfsObjectToPack defines non-transient non-serializable instance field pack |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
org.eclipse.jgit.internal.storage.dfs.DfsReader
Bug |
Category |
Details |
Line |
Priority |
Unchecked/unconfirmed cast from org.eclipse.jgit.internal.storage.pack.ObjectToPack to org.eclipse.jgit.internal.storage.dfs.DfsObjectToPack in org.eclipse.jgit.internal.storage.dfs.DfsReader.copyObjectAsIs(PackOutputStream, ObjectToPack, boolean) |
STYLE |
BC_UNCONFIRMED_CAST |
636 |
Medium |
org.eclipse.jgit.internal.storage.dfs.DfsStreamKey$ByteArrayDfsStreamKey
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.dfs.DfsStreamKey$ByteArrayDfsStreamKey defines equals but not hashCode |
BAD_PRACTICE |
HE_EQUALS_NO_HASHCODE |
90-95 |
Medium |
org.eclipse.jgit.internal.storage.dfs.DfsStreamKey$ForReverseIndex
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.dfs.DfsStreamKey$ForReverseIndex defines equals but not hashCode |
BAD_PRACTICE |
HE_EQUALS_NO_HASHCODE |
109 |
Medium |
org.eclipse.jgit.internal.storage.dfs.InMemoryRepository$MemPack
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.dfs.InMemoryRepository$MemPack doesn't override DfsPackDescription.equals(Object) |
STYLE |
EQ_DOESNT_OVERRIDE_EQUALS |
1 |
Medium |
org.eclipse.jgit.internal.storage.file.FileReftableDatabase
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.internal.storage.file.FileReftableDatabase.convertFrom(FileRepository, boolean) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
635 |
Medium |
Exceptional return value of java.io.File.mkdir() ignored in org.eclipse.jgit.internal.storage.file.FileReftableDatabase.convertFrom(FileRepository, boolean) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
625 |
Medium |
org.eclipse.jgit.internal.storage.file.FileReftableStack
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.internal.storage.file.FileReftableStack.compactRange(int, int) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
538 |
Medium |
org.eclipse.jgit.internal.storage.file.FileReftableStack$Segment
Bug |
Category |
Details |
Line |
Priority |
Equals method for org.eclipse.jgit.internal.storage.file.FileReftableStack$Segment assumes the argument is of type FileReftableStack$Segment |
BAD_PRACTICE |
BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS |
609 |
Medium |
org.eclipse.jgit.internal.storage.file.FileRepository
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.internal.storage.file.FileRepository.convertToPackedRefs(boolean, boolean) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
636 |
Medium |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.internal.storage.file.FileRepository.convertToReftable(boolean, boolean) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
768 |
Medium |
org.eclipse.jgit.internal.storage.file.GC
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.file.GC.setExpire(Date) may expose internal representation by storing an externally mutable object into GC.expire |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
1452 |
Medium |
org.eclipse.jgit.internal.storage.file.GC.setPackExpire(Date) may expose internal representation by storing an externally mutable object into GC.packExpire |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
1466 |
Medium |
Exceptional return value of java.util.concurrent.ExecutorService.submit(Callable) ignored in org.eclipse.jgit.internal.storage.file.GC.gc() |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
255 |
Medium |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.internal.storage.file.GC.prune(Set) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
635 |
Medium |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.internal.storage.file.GC.writePack(Set, Set, Set, Set, List) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
1265 |
Medium |
Exceptional return value of java.io.File.mkdirs() ignored in org.eclipse.jgit.internal.storage.file.GC.writePack(Set, Set, Set, Set, List) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
1168 |
Medium |
Exceptional return value of java.io.File.setReadOnly() ignored in org.eclipse.jgit.internal.storage.file.GC.writePack(Set, Set, Set, Set, List) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
1220 |
Medium |
org.eclipse.jgit.internal.storage.file.GcLog
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.internal.storage.file.GcLog.commit() |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
123 |
Medium |
org.eclipse.jgit.internal.storage.file.LocalCachedPack
Bug |
Category |
Details |
Line |
Priority |
Unchecked/unconfirmed cast from org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation to org.eclipse.jgit.internal.storage.file.LocalObjectRepresentation in org.eclipse.jgit.internal.storage.file.LocalCachedPack.hasObject(ObjectToPack, StoredObjectRepresentation) |
STYLE |
BC_UNCONFIRMED_CAST |
61 |
Medium |
org.eclipse.jgit.internal.storage.file.LocalObjectToPack
Bug |
Category |
Details |
Line |
Priority |
Unchecked/unconfirmed cast from org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation to org.eclipse.jgit.internal.storage.file.LocalObjectRepresentation in org.eclipse.jgit.internal.storage.file.LocalObjectToPack.select(StoredObjectRepresentation) |
STYLE |
BC_UNCONFIRMED_CAST |
42 |
Medium |
Class org.eclipse.jgit.internal.storage.file.LocalObjectToPack defines non-transient non-serializable instance field pack |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
org.eclipse.jgit.internal.storage.file.LooseObjects
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.setReadOnly() ignored in org.eclipse.jgit.internal.storage.file.LooseObjects.tryMove(File, File, ObjectId) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
209 |
Medium |
org.eclipse.jgit.internal.storage.file.ObjectDirectory
Bug |
Category |
Details |
Line |
Priority |
Synchronization performed on java.util.concurrent.atomic.AtomicReference in org.eclipse.jgit.internal.storage.file.ObjectDirectory.myAlternates() |
MT_CORRECTNESS |
JLM_JSR166_UTILCONCURRENT_MONITORENTER |
594 |
Medium |
org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.setReadOnly() ignored in org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ProgressMonitor, ProgressMonitor) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
178 |
Medium |
org.eclipse.jgit.internal.storage.file.Pack
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.file.Pack.mmap(long, int) forces garbage collection; extremely dubious except in benchmarking code |
PERFORMANCE |
DM_GC |
733 |
High |
org.eclipse.jgit.internal.storage.file.PackDirectory
Bug |
Category |
Details |
Line |
Priority |
Synchronization performed on java.util.concurrent.atomic.AtomicReference in org.eclipse.jgit.internal.storage.file.PackDirectory.scanPacks(PackDirectory$PackList) |
MT_CORRECTNESS |
JLM_JSR166_UTILCONCURRENT_MONITORENTER |
397 |
Medium |
org.eclipse.jgit.internal.storage.file.PackFile
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.file.PackFile doesn't override java.io.File.equals(Object) |
STYLE |
EQ_DOESNT_OVERRIDE_EQUALS |
1 |
Medium |
org.eclipse.jgit.internal.storage.file.PackFileSnapshot
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.file.PackFileSnapshot doesn't override FileSnapshot.equals(Object) |
STYLE |
EQ_DOESNT_OVERRIDE_EQUALS |
1 |
Medium |
org.eclipse.jgit.internal.storage.file.PackIndex
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.file.PackIndex.getChecksum() may expose internal representation by returning PackIndex.packChecksum |
MALICIOUS_CODE |
EI_EXPOSE_REP |
287 |
Medium |
org.eclipse.jgit.internal.storage.file.PackIndexWriter
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.file.PackIndexWriter.write(List, byte[]) may expose internal representation by storing an externally mutable object into PackIndexWriter.packChecksum |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
178 |
Medium |
org.eclipse.jgit.internal.storage.file.PackIndexWriter.TOC should be package protected |
MALICIOUS_CODE |
MS_PKGPROTECT |
36 |
Medium |
org.eclipse.jgit.internal.storage.file.PackInserter
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.setReadOnly() ignored in org.eclipse.jgit.internal.storage.file.PackInserter.flush() |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
283 |
Medium |
org.eclipse.jgit.internal.storage.file.WindowCache
Bug |
Category |
Details |
Line |
Priority |
Random object created and used only once in org.eclipse.jgit.internal.storage.file.WindowCache.evict() |
BAD_PRACTICE |
DMI_RANDOM_USED_ONLY_ONCE |
656 |
High |
org.eclipse.jgit.internal.storage.file.WindowCursor
Bug |
Category |
Details |
Line |
Priority |
Unchecked/unconfirmed cast from org.eclipse.jgit.internal.storage.pack.ObjectToPack to org.eclipse.jgit.internal.storage.file.LocalObjectToPack in org.eclipse.jgit.internal.storage.file.WindowCursor.copyObjectAsIs(PackOutputStream, ObjectToPack, boolean) |
STYLE |
BC_UNCONFIRMED_CAST |
187 |
Medium |
org.eclipse.jgit.internal.storage.pack.DeltaIndex
Bug |
Category |
Details |
Line |
Priority |
new org.eclipse.jgit.internal.storage.pack.DeltaIndex(byte[]) may expose internal representation by storing an externally mutable object into DeltaIndex.src |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
101 |
Medium |
org.eclipse.jgit.internal.storage.pack.DeltaTask$WeightedPath
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.pack.DeltaTask$WeightedPath defines compareTo(DeltaTask$WeightedPath) and uses Object.equals() |
BAD_PRACTICE |
EQ_COMPARETO_USE_OBJECT_EQUALS |
212-216 |
Medium |
org.eclipse.jgit.internal.storage.pack.ObjectToPack
Bug |
Category |
Details |
Line |
Priority |
Class org.eclipse.jgit.internal.storage.pack.ObjectToPack defines non-transient non-serializable instance field cachedDelta |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
org.eclipse.jgit.internal.storage.pack.PackOutputStream
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.pack.PackOutputStream.getCopyBuffer() may expose internal representation by returning PackOutputStream.copyBuffer |
MALICIOUS_CODE |
EI_EXPOSE_REP |
208 |
Medium |
org.eclipse.jgit.internal.storage.pack.PackWriterBitmapPreparer
Bug |
Category |
Details |
Line |
Priority |
Result of integer multiplication cast to long in new org.eclipse.jgit.internal.storage.pack.PackWriterBitmapPreparer(ObjectReader, PackBitmapIndexBuilder, ProgressMonitor, Set, PackConfig) |
STYLE |
ICAST_INTEGER_MULTIPLY_CAST_TO_LONG |
100 |
Medium |
org.eclipse.jgit.internal.storage.pack.PackWriterBitmapPreparer$CommitSelectionHelper$1
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.internal.storage.pack.PackWriterBitmapPreparer$CommitSelectionHelper$1.next() can't throw NoSuchElementException |
BAD_PRACTICE |
IT_NO_SUCH_ELEMENT |
531 |
Medium |
org.eclipse.jgit.internal.storage.reftable.ReftableWriter$RefList
Bug |
Category |
Details |
Line |
Priority |
Class org.eclipse.jgit.internal.storage.reftable.ReftableWriter$RefList defines non-transient non-serializable instance field blockPos |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
org.eclipse.jgit.lib.CommitBuilder
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.lib.CommitBuilder.getParentIds() may expose internal representation by returning CommitBuilder.parentIds |
MALICIOUS_CODE |
EI_EXPOSE_REP |
128 |
Medium |
org.eclipse.jgit.lib.ConfigSnapshot$LineComparator
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.lib.ConfigSnapshot$LineComparator implements Comparator but not Serializable |
BAD_PRACTICE |
SE_COMPARATOR_SHOULD_BE_SERIALIZABLE |
186-189 |
Medium |
org.eclipse.jgit.lib.Constants
Bug |
Category |
Details |
Line |
Priority |
Public static org.eclipse.jgit.lib.Constants.encodedTypeString(int) may expose internal representation by returning Constants.ENCODED_TYPE_BLOB |
MALICIOUS_CODE |
MS_EXPOSE_REP |
537 |
Medium |
Public static org.eclipse.jgit.lib.Constants.encodedTypeString(int) may expose internal representation by returning Constants.ENCODED_TYPE_COMMIT |
MALICIOUS_CODE |
MS_EXPOSE_REP |
533 |
Medium |
Public static org.eclipse.jgit.lib.Constants.encodedTypeString(int) may expose internal representation by returning Constants.ENCODED_TYPE_TAG |
MALICIOUS_CODE |
MS_EXPOSE_REP |
539 |
Medium |
Public static org.eclipse.jgit.lib.Constants.encodedTypeString(int) may expose internal representation by returning Constants.ENCODED_TYPE_TREE |
MALICIOUS_CODE |
MS_EXPOSE_REP |
535 |
Medium |
org.eclipse.jgit.lib.Constants.PACK_SIGNATURE is a mutable array |
MALICIOUS_CODE |
MS_MUTABLE_ARRAY |
195 |
Medium |
org.eclipse.jgit.lib.DefaultTypedConfigGetter
Bug |
Category |
Details |
Line |
Priority |
Switch statement found in org.eclipse.jgit.lib.DefaultTypedConfigGetter.getLong(Config, String, String, String, long) where default case is missing |
STYLE |
SF_SWITCH_NO_DEFAULT |
134-142 |
Medium |
org.eclipse.jgit.lib.GpgSignature
Bug |
Category |
Details |
Line |
Priority |
new org.eclipse.jgit.lib.GpgSignature(byte[]) may expose internal representation by storing an externally mutable object into GpgSignature.signature |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
36 |
Medium |
org.eclipse.jgit.lib.ObjectChecker
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.lib.ObjectChecker.author is a mutable array |
MALICIOUS_CODE |
MS_MUTABLE_ARRAY |
90 |
Medium |
org.eclipse.jgit.lib.ObjectChecker.committer is a mutable array |
MALICIOUS_CODE |
MS_MUTABLE_ARRAY |
93 |
Medium |
org.eclipse.jgit.lib.ObjectChecker.encoding is a mutable array |
MALICIOUS_CODE |
MS_MUTABLE_ARRAY |
96 |
Medium |
org.eclipse.jgit.lib.ObjectChecker.tagger is a mutable array |
MALICIOUS_CODE |
MS_MUTABLE_ARRAY |
108 |
Medium |
org.eclipse.jgit.lib.ObjectChecker.object should be package protected |
MALICIOUS_CODE |
MS_PKGPROTECT |
99 |
Medium |
org.eclipse.jgit.lib.ObjectChecker.parent should be package protected |
MALICIOUS_CODE |
MS_PKGPROTECT |
87 |
Medium |
org.eclipse.jgit.lib.ObjectChecker.tag should be package protected |
MALICIOUS_CODE |
MS_PKGPROTECT |
105 |
Medium |
org.eclipse.jgit.lib.ObjectChecker.tree should be package protected |
MALICIOUS_CODE |
MS_PKGPROTECT |
84 |
Medium |
org.eclipse.jgit.lib.ObjectChecker.type should be package protected |
MALICIOUS_CODE |
MS_PKGPROTECT |
102 |
Medium |
Switch statement found in org.eclipse.jgit.lib.ObjectChecker.checkNotWindowsDevice(byte[], int, int, AnyObjectId) where default case is missing |
STYLE |
SF_SWITCH_NO_DEFAULT |
956-1013 |
Medium |
org.eclipse.jgit.lib.ObjectLoader$SmallObject
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.lib.ObjectLoader$SmallObject.getCachedBytes() may expose internal representation by returning ObjectLoader$SmallObject.data |
MALICIOUS_CODE |
EI_EXPOSE_REP |
289 |
Medium |
new org.eclipse.jgit.lib.ObjectLoader$SmallObject(int, byte[]) may expose internal representation by storing an externally mutable object into ObjectLoader$SmallObject.data |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
269 |
Medium |
org.eclipse.jgit.lib.ObjectStream$SmallStream
Bug |
Category |
Details |
Line |
Priority |
new org.eclipse.jgit.lib.ObjectStream$SmallStream(int, byte[]) may expose internal representation by storing an externally mutable object into ObjectStream$SmallStream.data |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
70 |
Medium |
org.eclipse.jgit.lib.RebaseTodoFile
Bug |
Category |
Details |
Line |
Priority |
Redundant nullcheck of action, which is known to be non-null in org.eclipse.jgit.lib.RebaseTodoFile.parseLine(byte[], int, int) |
STYLE |
RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE |
158 |
Medium |
org.eclipse.jgit.lib.RefDatabase
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.lib.RefDatabase.SEARCH_PATH should be package protected |
MALICIOUS_CODE |
MS_PKGPROTECT |
48 |
Medium |
org.eclipse.jgit.merge.ResolveMerger
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.merge.ResolveMerger.getCommitNames() may expose internal representation by returning ResolveMerger.commitNames |
MALICIOUS_CODE |
EI_EXPOSE_REP |
1197 |
Medium |
org.eclipse.jgit.merge.ResolveMerger.setCommitNames(String[]) may expose internal representation by storing an externally mutable object into ResolveMerger.commitNames |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
1187 |
Medium |
Exceptional return value of java.io.File.mkdirs() ignored in org.eclipse.jgit.merge.ResolveMerger.checkout() |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
415 |
Medium |
Exceptional return value of java.io.File.mkdirs() ignored in org.eclipse.jgit.merge.ResolveMerger.writeMergedFile(TemporaryBuffer, Attributes) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
1083 |
Medium |
org.eclipse.jgit.patch.FileHeader
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.patch.FileHeader.getBuffer() may expose internal representation by returning FileHeader.buf |
MALICIOUS_CODE |
EI_EXPOSE_REP |
142 |
Medium |
org.eclipse.jgit.patch.FormatError
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.patch.FormatError.getBuffer() may expose internal representation by returning FormatError.buf |
MALICIOUS_CODE |
EI_EXPOSE_REP |
72 |
Medium |
org.eclipse.jgit.revwalk.ObjectWalk
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.revwalk.ObjectWalk.getPathBuffer() may expose internal representation by returning ObjectWalk.pathBuf |
MALICIOUS_CODE |
EI_EXPOSE_REP |
712 |
Medium |
org.eclipse.jgit.revwalk.RevCommit
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.revwalk.RevCommit.getParents() may expose internal representation by returning RevCommit.parents |
MALICIOUS_CODE |
EI_EXPOSE_REP |
345 |
Medium |
org.eclipse.jgit.revwalk.RevCommit.getRawBuffer() may expose internal representation by returning RevCommit.buffer |
MALICIOUS_CODE |
EI_EXPOSE_REP |
361 |
Medium |
org.eclipse.jgit.revwalk.RevTag
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.revwalk.RevTag.getRawBuffer() may expose internal representation by returning RevTag.buffer |
MALICIOUS_CODE |
EI_EXPOSE_REP |
359 |
Medium |
org.eclipse.jgit.revwalk.RevWalk$3
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.revwalk.RevWalk$3.next() can't throw NoSuchElementException |
BAD_PRACTICE |
IT_NO_SUCH_ELEMENT |
1562-1564 |
Medium |
org.eclipse.jgit.transport.CredentialItem$CharArrayType
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.transport.CredentialItem$CharArrayType.getValue() may expose internal representation by returning CredentialItem$CharArrayType.value |
MALICIOUS_CODE |
EI_EXPOSE_REP |
166 |
Medium |
org.eclipse.jgit.transport.CredentialItem$CharArrayType.setValueNoCopy(char[]) may expose internal representation by storing an externally mutable object into CredentialItem$CharArrayType.value |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
192 |
Medium |
org.eclipse.jgit.transport.PackParser$DeltaChain
Bug |
Category |
Details |
Line |
Priority |
Class org.eclipse.jgit.transport.PackParser$DeltaChain defines non-transient non-serializable instance field head |
BAD_PRACTICE |
SE_BAD_FIELD |
Not available |
Medium |
org.eclipse.jgit.transport.PacketLineIn
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.transport.PacketLineIn.<static initializer for PacketLineIn>() invokes inefficient new String() constructor |
PERFORMANCE |
DM_STRING_VOID_CTOR |
53 |
Medium |
org.eclipse.jgit.transport.PushCertificateParser
Bug |
Category |
Details |
Line |
Priority |
Redundant nullcheck of org.eclipse.jgit.transport.PushCertificateParser.pusher, which is known to be non-null in org.eclipse.jgit.transport.PushCertificateParser.receiveHeader(PushCertificateParser$StringReader, boolean) |
STYLE |
RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE |
355 |
Medium |
org.eclipse.jgit.transport.Transport
Bug |
Category |
Details |
Line |
Priority |
Uninitialized read of hookOutRedirect in new org.eclipse.jgit.transport.Transport(Repository, URIish) |
CORRECTNESS |
UR_UNINIT_READ |
800 |
Medium |
org.eclipse.jgit.transport.UploadPack
Bug |
Category |
Details |
Line |
Priority |
Redundant nullcheck of org.eclipse.jgit.transport.UploadPack.refs which is known to be null in org.eclipse.jgit.transport.UploadPack.sendPack(ProgressMonitor, PacketLineOut, OutputStream, FetchRequest, PackStatistics$Accumulator, Collection, List, List) |
STYLE |
RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE |
2245 |
Medium |
org.eclipse.jgit.transport.UploadPack$SideBandErrorWriter
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.transport.UploadPack$SideBandErrorWriter.writeError(String) may fail to close stream |
BAD_PRACTICE |
OS_OPEN_STREAM |
2426 |
Medium |
org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider
Bug |
Category |
Details |
Line |
Priority |
new org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider(String, char[]) may expose internal representation by storing an externally mutable object into UsernamePasswordCredentialsProvider.password |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
48 |
Medium |
org.eclipse.jgit.transport.WalkFetchConnection
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.transport.WalkFetchConnection.close() |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
237 |
Medium |
Switch statement found in org.eclipse.jgit.transport.WalkFetchConnection.markLocalObjComplete(RevObject) where default case is missing |
STYLE |
SF_SWITCH_NO_DEFAULT |
691-699 |
Medium |
org.eclipse.jgit.treewalk.AbstractTreeIterator
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.treewalk.AbstractTreeIterator.getEntryPathBuffer() may expose internal representation by returning AbstractTreeIterator.path |
MALICIOUS_CODE |
EI_EXPOSE_REP |
457 |
Medium |
org.eclipse.jgit.treewalk.AbstractTreeIterator.zeroid is a mutable array |
MALICIOUS_CODE |
MS_MUTABLE_ARRAY |
57 |
Medium |
org.eclipse.jgit.treewalk.CanonicalTreeParser
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.treewalk.CanonicalTreeParser.idBuffer() may expose internal representation by returning CanonicalTreeParser.raw |
MALICIOUS_CODE |
EI_EXPOSE_REP |
246 |
Medium |
org.eclipse.jgit.treewalk.CanonicalTreeParser.reset(byte[]) may expose internal representation by storing an externally mutable object into CanonicalTreeParser.raw |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
112 |
Medium |
org.eclipse.jgit.treewalk.EmptyTreeIterator
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.treewalk.EmptyTreeIterator.idBuffer() may expose internal representation by returning EmptyTreeIterator.zeroid |
MALICIOUS_CODE |
EI_EXPOSE_REP |
82 |
Medium |
org.eclipse.jgit.treewalk.InstantComparator
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.treewalk.InstantComparator implements Comparator but not Serializable |
BAD_PRACTICE |
SE_COMPARATOR_SHOULD_BE_SERIALIZABLE |
21-76 |
Medium |
org.eclipse.jgit.treewalk.WorkingTreeIterator
Bug |
Category |
Details |
Line |
Priority |
org.eclipse.jgit.treewalk.WorkingTreeIterator.idBuffer() may expose internal representation by returning WorkingTreeIterator.contentId |
MALICIOUS_CODE |
EI_EXPOSE_REP |
285 |
Medium |
org.eclipse.jgit.treewalk.WorkingTreeIterator.idBuffer() may expose internal representation by returning WorkingTreeIterator.zeroid |
MALICIOUS_CODE |
EI_EXPOSE_REP |
316 |
Medium |
org.eclipse.jgit.util.Base64
Bug |
Category |
Details |
Line |
Priority |
Switch statement found in org.eclipse.jgit.util.Base64.encode3to4(byte[], int, int, byte[], int) where one case falls through to the next case |
STYLE |
SF_SWITCH_FALLTHROUGH |
107-111 |
Medium |
Switch statement found in org.eclipse.jgit.util.Base64.encode3to4(byte[], int, int, byte[], int) where default case is missing |
STYLE |
SF_SWITCH_NO_DEFAULT |
105-115 |
Medium |
org.eclipse.jgit.util.FS
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.delete() ignored in org.eclipse.jgit.util.FS.detectSymlinkSupport() |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
989 |
Medium |
org.eclipse.jgit.util.FS$FileStoreAttributes
Bug |
Category |
Details |
Line |
Priority |
Exceptional return value of java.io.File.setLastModified(long) ignored in org.eclipse.jgit.util.FS$FileStoreAttributes.getFsResolution(FileStore, Path, Path) |
BAD_PRACTICE |
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE |
579 |
Medium |
org.eclipse.jgit.util.FS_POSIX
Bug |
Category |
Details |
Line |
Priority |
Exception is caught when Exception is not thrown in org.eclipse.jgit.util.FS_POSIX.readUmask() |
STYLE |
REC_CATCH_EXCEPTION |
132 |
Medium |
org.eclipse.jgit.util.FileUtils
Bug |
Category |
Details |
Line |
Priority |
Random object created and used only once in org.eclipse.jgit.util.FileUtils.delay(long, long, long) |
BAD_PRACTICE |
DMI_RANDOM_USED_ONLY_ONCE |
1017 |
High |
org.eclipse.jgit.util.QuotedString$BourneStyle
Bug |
Category |
Details |
Line |
Priority |
Switch statement found in org.eclipse.jgit.util.QuotedString$BourneStyle.quote(String) where default case is missing |
STYLE |
SF_SWITCH_NO_DEFAULT |
122-130 |
Medium |
org.eclipse.jgit.util.RawCharSequence
Bug |
Category |
Details |
Line |
Priority |
new org.eclipse.jgit.util.RawCharSequence(byte[], int, int) may expose internal representation by storing an externally mutable object into RawCharSequence.buffer |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
39 |
Medium |
org.eclipse.jgit.util.RawParseUtils
Bug |
Category |
Details |
Line |
Priority |
Switch statement found in org.eclipse.jgit.util.RawParseUtils.parseBase10(byte[], int, MutableInteger) where default case is missing |
STYLE |
SF_SWITCH_NO_DEFAULT |
190-196 |
Medium |
Switch statement found in org.eclipse.jgit.util.RawParseUtils.parseLongBase10(byte[], int, MutableInteger) where default case is missing |
STYLE |
SF_SWITCH_NO_DEFAULT |
244-250 |
Medium |
org.eclipse.jgit.util.SystemReader
Bug |
Category |
Details |
Line |
Priority |
Write to static field org.eclipse.jgit.util.SystemReader.isMacOS from instance method org.eclipse.jgit.util.SystemReader.isMacOS() |
STYLE |
ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD |
506 |
Medium |
Write to static field org.eclipse.jgit.util.SystemReader.isWindows from instance method org.eclipse.jgit.util.SystemReader.isWindows() |
STYLE |
ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD |
493 |
Medium |
org.eclipse.jgit.util.io.AutoCRLFInputStream
Bug |
Category |
Details |
Line |
Priority |
Useless condition: it's known that b == 10 at this point |
STYLE |
UC_USELESS_CONDITION |
99 |
High |
org.eclipse.jgit.util.io.BinaryDeltaInputStream
Bug |
Category |
Details |
Line |
Priority |
new org.eclipse.jgit.util.io.BinaryDeltaInputStream(byte[], InputStream) may expose internal representation by storing an externally mutable object into BinaryDeltaInputStream.base |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
72 |
Medium |