find_possible_bugs
Detect possible bugs and code quality issues in Java files, including null risks, resource leaks, empty catches, and sync problems. Filter by severity after loading a project.
Instructions
Find possible bugs and code quality issues.
USAGE: find_possible_bugs() USAGE: find_possible_bugs(filePath="path/to/File.java") OUTPUT: List of potential issues
Detects:
Null pointer risks (dereferencing potentially null values)
Resource leaks (unclosed streams, connections)
Empty catch blocks
Comparison issues (== on objects instead of equals)
Synchronization issues (sync on String)
severity (optional, compared case-insensitively): high, medium or low keeps the issues of that severity; all (the default) keeps every issue. Any other value is rejected with INVALID_PARAMETER.
A filePath naming no source file of the project is FILE_NOT_FOUND.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | No | Optional: specific file to check (default: all files) | |
| severity | No | Filter by severity, case-insensitive: high, medium, low or all (default: all) |