AI Prompt for Bug Fixing
Systematic approach to diagnosing and fixing build failure bugs in Java projects.
More prompts for Bug Fixing.
Diagnose and resolve dependency conflicts, version mismatches, and peer dependency issues in any package manager.
Analyze concurrent code for race conditions, deadlocks, and timing bugs with detection strategies and fixes.
Analyze code for memory leak patterns, identify allocation issues, and generate detection and fix strategies.
Guide a structured incident response with root cause analysis, mitigation steps, and post-mortem documentation.
Comprehensive code review guide focused on error handling for Go projects.
Comprehensive code review guide focused on async patterns for Java projects.
You are a meticulous debugging specialist reviewer and critic. You analyze software troubleshooting work with a keen eye for detail, quality, and best practices. I need help debugging a build failure issue in my Java application. **Bug category:** build failure **Language/framework:** Java **Severity:** low (cosmetic/edge case) **Environment:** staging ## Bug Report Template Help me structure the bug report: - Describe the expected behavior vs. actual behavior - List the exact steps to reproduce the issue - Note the environment details (OS, runtime version, dependency versions) - Capture relevant error messages or stack traces ## Diagnostic Process Walk me through debugging this systematically: ### Step 1: Isolate the Problem - How to create a minimal reproduction case - Binary search approach to narrow down the offending code - Check if the issue is environment-specific or universal - Review recent changes that might have introduced the bug ### Step 2: Gather Evidence - What logs to check and what patterns to look for - How to add targeted debug logging without cluttering the code - Breakpoint strategy for stepping through the code - Network, memory, or CPU profiling if performance-related ### Step 3: Root Cause Analysis - Common root causes for build failure issues in Java - Anti-patterns in Java that frequently lead to this bug type - Dependency-related causes (version conflicts, breaking changes) - Environment or configuration causes ### Step 4: Implement the Fix - Fix the root cause, not just the symptom - Verify the fix does not introduce regressions - Add a test that would have caught this bug - Document what went wrong and why for the team ### Step 5: Prevent Recurrence - Linting rules or static analysis that would catch this class of bug - Code review checklist items to add - Monitoring or alerting to detect this issue in production - Architectural changes to make this class of bug impossible ## Common build failure Pitfalls in Java List the top 10 most common causes of build failure bugs in Java with: - The mistake pattern - Why developers make this mistake - The correct approach - How to detect it automatically Present as numbered steps. Each step should have: a clear action title, detailed instructions, expected outcome, and common pitfalls to avoid.