| Detector: | MuDetectOPAL_180312 |
| Target: | project ' synthetic_survey ' versionjsl |
| Misuse: | misuse ' setfirst ' |
| Tags: |
Details about the known misuse from the MUBench dataset.
| Description: | To get one (arbitrary) value from a set you can call Set.iterator().next(), but this throws if the set is empty. |
| Fix Description: | Check that Set.isEmpty() is false. |
| Violation Types: |
|
| In File: | mubench/examples/survey/SetFirst.java |
| In Method: | misuse(Set) |
| Code with Misuse: |
|
| Code with Pattern(s): |
|