← 返回 stripe 的题目列表Java Debugging Round: Fix a Bug in a Real-World Open Source Repo (e.g., SnakeYAML)
类型:online_judge
Problem: Java Debugging (Open-Source Repo Troubleshooting)
You are given a Java open-source repository (the interviewer will specify the exact repo/branch, e.g., SnakeYAML). The codebase contains one or more defects that cause either:
existing unit/integration tests to fail, or
a specific input to trigger an exception or incorrect output.
Your task is to perform real-world debugging and deliver a fix within a limited time.
What you need to do
Clone/open the repository and follow the README to run the test suite successfully.
Use the failing test output/stack trace to:
identify the root cause (could be in parsing, serialization, type resolution, edge-case handling, error handling, etc.).
Fix the bug and ensure:
all existing tests pass;
any additional test you add (if needed) covers the regression scenario.
Explain to the interviewer:
how you narrowed down the issue;
what the root cause was;
why the fix is correct;
potential side effects.
Input/Output (as provided in the debugging round)
Input: the repository + a failing scenario (tests/stack trace/repro steps).
Output: updated code (and possibly new tests) so that the full test suite passes.
Constraints / Expectations
Timebox: typically 45–90 minutes (as specified by the interviewer).
Tools: IDE/search/docs usage depends on the interview rules.
Large refactors are not required; prefer a small, safe, correct fix.