DeepSource
Dashboard Resources Pricing Discover Directory Log in

Run your first analysis.

Find thousands of code security and quality issues in your codebase, before they end up in production.

Start now
All analyzers Java
Java

Java

By DeepSource

Use Analyzer
Docs
Discuss
Maps and Sets of URLs can be performance hogs JAVA-S0057
Performance

This method or field is or uses a Map or Set of URLs. Since both the equals and hashCode method of URL perform domain name resolution, this can result in a big performance hit.

Inefficient use of keySet iterator instead of entrySet iterator JAVA-S0361
Performance

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

Prepared statements should not be created within a loop JAVA-S0329
Performance

The method calls Connection.prepareStatement inside the loop passing the constant arguments. If the PreparedStatement should be executed several times there's no reason to recreate it for each loop iteration.

toString invoked on a string value is useless JAVA-S0064
Performance

Calling String.toString is a redundant operation. Just use the string directly.

Boolean constructor is inefficient, consider using Boolean.valueOf instead JAVA-S0066
Performance

Creating new instances of java.lang.Boolean wastes memory, since Boolean objects are immutable and there are only two useful values of this type.