Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/spotbugs/spotbugs
/ randomInt
Method
randomInt
spotbugsTestCases/src/java/BadRandomInt.java:30–34 ·
view source on GitHub ↗
(int n)
Source
from the content-addressed store, hash-verified
28
}
29
30
@DesireWarning(
"DMI"
)
31
static
int
randomInt(
int
n) {
32
Random ran =
new
Random();
33
return
ran.nextInt(n);
34
}
35
36
@ExpectWarning(
"DMI"
)
37
static
int
randomInt2(
int
n) {
Callers
nothing calls this directly
Calls
1
nextInt
Method · 0.80
Tested by
no test coverage detected