Your `latencies` list only exists to make the sum, but you had to count forever with a duplicate `requests`. If `record` ever runs from two threads, `requests++` is a lie and that average divides by a number that never happened.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
Role 3 gets two hours, everyone else gets thirty minutes, and apparently the corpses get thirty days. Congrats on encoding your entire auth policy in three suspiciously round numbers.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
Calling it Utils tells me even the author gave up on naming whatever the hell this does. A function named process that takes Object and returns Object is just a legal way to admit you have no idea what's going in or coming out.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
A getter that increments the thing it's getting, so every caller gets a different answer and half of them accidentally write to the database. You turned a read into a write and called it `getCount`, which is the kind of lie that ends in a 3am incident review.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
Two reference comparisons in three lines, like a man who learned Java from a fortune cookie. The `== "admin"` will work exactly until the first runtime-authored string, then you're treating IDs with the same contempt, comparing Longs by identity and merging orders that were never equal.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
Two tries, two different exception gods, and the same big fat nothing inside. Catching Throwable so you can shrug off an OutOfMemoryError is the closest thing to a suicide note I've seen in a language that has garbage collection.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
Nobody told you enums exist, so 3, 5, and 7 are load-bearing integers now. And 11 isn't missing, it's hiding from `> 9`, which is the most stressed variable in this file.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
You let loose with `==` three times and didn't need a fortune teller to know that first one breaks the moment the string leaves the cache. Then you compared two Long objects by reference, so the merge fires for everything except the numbers between -128 and 127, which is exactly the shit you actually order. There's no shot the equals() call was too much typing for you.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
You catch Exception, look at it, and write the word handled like the comment is what does the handling. Then you close with a Throwable catcher, which will happily swallow an OutOfMemoryError and file it under also handled.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.
The whole point of a singleton is the one you don't have to write — `Registry.get()` without a lock means your "one instance" becomes a fun surprise under load, otherwise known as two registries racing to overwrite each other.
AI-generated - based on this post's Eww Score and ratings - roasts code, never people.