Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding new misuses detected by Findbugs in Ex2 #198

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions data/closure/misuses/findbugs-0/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- com.google.javascript.rhino.Node
characteristics:
- missing/condition/null_check
crash: true
description: >
Possible null pointer dereference of firstArgument variable.
location:
file: com/google/javascript/jscomp/TightenTypes.java
method: "getAssignments(ConcreteScope)"
internal: true
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
15 changes: 15 additions & 0 deletions data/closure/misuses/findbugs-10/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
api:
- java.lang.String
characteristics:
- superfluous/call
- missing/call
crash: false
description: >
Comparison of String objects using == or != and not using equals().
location:
file: com/google/javascript/jscomp/VariableReferenceCheck.java
method: "checkVar(NodeTraversal, Var, List)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/closure/misuses/findbugs-13/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- java.io.File
characteristics:
- missing/condition/value_or_state
crash: false
description: >
Exceptional return value of java.io.File.mkdirs() ignored.
location:
file: com/google/javascript/jscomp/AbstractCommandLineRunner.java
method: "maybeCreateDirsForPath(String)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
15 changes: 15 additions & 0 deletions data/closure/misuses/findbugs-16/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
api:
- java.lang.IllegalArgumentException
- java.lang.String
characteristics:
- superfluous/value_or_state
crash: true
description: >
Load of known null value as argument.
location:
file: com/google/javascript/jscomp/graph/LinkedDirectedGraph.java
method: "getDirectedPredNodes(DiGraphNode)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
15 changes: 15 additions & 0 deletions data/closure/misuses/findbugs-17/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
api:
- java.lang.IllegalArgumentException
- java.lang.String
characteristics:
- superfluous/value_or_state
crash: true
description: >
Load of known null value as argument.
location:
file: com/google/javascript/jscomp/graph/LinkedDirectedGraph.java
method: "getDirectedSuccNodes(DiGraphNode)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/closure/misuses/findbugs-18/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- com.google.javascript.jscomp.ConcreteType
characteristics:
- superfluous/call
crash: false
description: >
Load of known null value as argument.
location:
file: com/google/javascript/jscomp/ConcreteType.java
method: "toString()"
internal: true
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
16 changes: 16 additions & 0 deletions data/closure/misuses/findbugs-19/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
api:
- java.lang.String
- java.lang.StringBuffer
characteristics:
- superfluous/call
- missing/call
crash: false
description: >
Method concatenates strings using + in a loop
location:
file: com/google/javascript/jscomp/CoalesceVariableNames.java
method: " visit(NodeTraversal, Node, Node)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/closure/misuses/findbugs-3/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- com.google.javascript.rhino.Node
characteristics:
- missing/condition/null_check
crash: true
description: >
Possible null pointer dereference of addingRoot variable.
location:
file: com/google/javascript/jscomp/InstrumentFunctions.java
method: "visit(NodeTraversal, Node, Node)"
internal: true
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/closure/misuses/findbugs-4/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- com.google.javascript.rhino.Node
characteristics:
- missing/condition/null_check
crash: true
description: >
Possible null pointer dereference of addingRoot variable which is obtained from Node.getParent().
location:
file: com/google/javascript/jscomp/NodeUtil.java
method: "getAddingRoot(Node)"
internal: true
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/closure/misuses/findbugs-5/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- com.google.javascript.rhino.jstype.JSType
characteristics:
- missing/condition/null_check
crash: true
description: >
Formal parameter that may have a null value.
location:
file: com/google/javascript/rhino/jstype/PrototypeObjectType.java
method: "isSubtype(JSType)"
internal: true
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
15 changes: 15 additions & 0 deletions data/closure/misuses/findbugs-6/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
api:
- java.lang.String
- com.google.javascript.rhino.Node
characteristics:
- missing/condition/null_check
crash: true
description: >
Node.getQualifiedName() may return null as mentioned in its contract.
location:
file: com/google/javascript/jscomp/ProcessClosurePrimitives.java
method: "processBaseClassCall(NodeTraversal, Node)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
15 changes: 15 additions & 0 deletions data/closure/misuses/findbugs-7/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
api:
- java.lang.String
characteristics:
- superfluous/call
- missing/call
crash: false
description: >
Comparison of String objects using == or != and not using equals().
location:
file: com/google/javascript/jscomp/SourceMap2.java
method: "addMapping(Node, Position, Position)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/closure/misuses/findbugs-9/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- com.google.javascript.rhino.Node
characteristics:
- missing/condition/null_check
crash: true
description: >
Formal parameter fnNode may have a null value.
location:
file: com/google/javascript/jscomp/TypedCodeGenerator.java
method: "getFunctionAnnotation(Node)"
internal: true
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
13 changes: 13 additions & 0 deletions data/closure/versions/319/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ misuses:
- '2'
- 'dmmc-13'
- 'dmmc-1023'
- 'findbugs-0'
- 'findbugs-3'
- 'findbugs-4'
- 'findbugs-5'
- 'findbugs-6'
- 'findbugs-7'
- 'findbugs-9'
- 'findbugs-10'
- 'findbugs-13'
- 'findbugs-16'
- 'findbugs-17'
- 'findbugs-18'
- 'findbugs-19'
- 'mudetect-12'
- 'mudetect-13'
- 'mudetect-17'
Expand Down
14 changes: 14 additions & 0 deletions data/itext/misuses/findbugs-4/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- byte array
characteristics:
- missing/condition/null_check
crash: true
description: >
Possible null pointer dereference of variable bars.
location:
file: com/itextpdf/text/pdf/BarcodeEAN.java
method: "placeBarcode(PdfContentByte, BaseColor, BaseColor)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/itext/misuses/findbugs-5/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- java.io.FileInputStream
characteristics:
- missing/condition/null_check
crash: true
description: >
Possible null pointer dereference of variable fs.
location:
file: com/itextpdf/text/pdf/ICC_Profile.java
method: "GetInstance(String)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/itext/misuses/findbugs-6/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- org.w3c.dom.Node
characteristics:
- missing/condition/null_check
crash: true
description: >
Node.getNextSibling() may return a null value.
location:
file: com/itextpdf/text/pdf/XfaForm.java
method: "createDatasetsNode(Node)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/itext/misuses/findbugs-7/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- java.lang.Exception
characteristics:
- missing/call
crash: false
description: >
Method might ignore java.lang.Exception.
location:
file: com/itextpdf/text/Jpeg2000.java
method: "processParameters()"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
4 changes: 4 additions & 0 deletions data/itext/versions/5091/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ misuses:
- 'dmmc-61'
- 'dmmc-357'
- 'dmmc-937'
- 'findbugs-4'
- 'findbugs-5'
- 'findbugs-6'
- 'findbugs-7'
- 'jadet-5'
- 'jadet-9'
- 'mudetect-15'
Expand Down
14 changes: 14 additions & 0 deletions data/jmrtd/misuses/findbugs-0/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- byte array
characteristics:
- missing/condition/null_check
crash: true
description: >
Possible null pointer dereference of variable data.
location:
file: sos/gui/HexArrayField.java
method: "setValue(byte[])"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
15 changes: 15 additions & 0 deletions data/jmrtd/misuses/findbugs-1/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
api:
- byte array
- java.io.DataInputStream
characteristics:
- missing/condition/null_check
crash: false
description: >
Possible null passed for non-null parameter of new java.io.ByteArrayInputStream(byte[])
location:
file: sos/mrtd/PassportService.java
method: "readFace()"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
14 changes: 14 additions & 0 deletions data/jmrtd/misuses/findbugs-10/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
api:
- java.lang.System
characteristics:
- superfluous/call
crash: true
description: >
Method invokes System.exit(...), which shuts down the entire virtual machine.
location:
file: sos/mrtd/sample/PassportGUI.java
method: "<init>(String[])"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
15 changes: 15 additions & 0 deletions data/jmrtd/misuses/findbugs-11/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
api:
- java.lang.Exception
characteristics:
- superfluous/exception handling
- missing/exception handling
crash: false
description: >
Exception is caught when Exception is not thrown.
location:
file: sos/mrtd/sample/BACPanel.java
method: "actionPerformed(ActionEvent)"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
15 changes: 15 additions & 0 deletions data/jmrtd/misuses/findbugs-12/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
api:
- java.lang.Exception
characteristics:
- superfluous/exception handling
- missing/exception handling
crash: false
description: >
Exception is caught when Exception is not thrown.
location:
file: sos/mrtd/sample/PassportGUI.java
method: "<init>(String[])"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
16 changes: 16 additions & 0 deletions data/jmrtd/misuses/findbugs-13/misuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
api:
- java.lang.String
- java.lang.StringBuffer
characteristics:
- superfluous/call
- missing/call
crash: false
description: >
Method concatenates strings using + in a loop
location:
file: sos/gui/HexField.java
method: "setValue(byte[])"
internal: false
source:
name: Findbugs
url: http://findbugs.sourceforge.net/index.html
Loading