Detector: | MuDetectOPAL_180312 |
Target: | project ' synthetic_survey ' versionjsl |
Misuse: | misuse ' mapnull ' |
Tags: |
Details about the known misuse from the MUBench dataset.
Description: | Checks the return value of Map.put() to check whether the key was set before. If the Map allows null values, this usage breaks. |
Fix Description: | Use Map.containsKey() to check whether a key is set. |
Violation Types: |
|
In File: | mubench/examples/survey/Maps.java |
In Method: | mapMayContainNull(Map) |
Code with Misuse: |
|
Code with Pattern(s): |
|