Debug
This is a debugging assessment where you'll identify and fix bugs in a Java JSON parsing library codebase. You'll receive access to a GitHub repository containing a modified version of the Moshi library with intentionally introduced bugs. Your task is to find and explain these bugs using the test suite and your debugging skills.
The exercise tests your ability to navigate an unfamiliar codebase, understand complex code quickly, use debugging tools effectively, and communicate your thought process clearly.
Repository: Google Drive
Duration: Approximately 45-60 minutes
Environment: Clone the provided repository, work locally, share screen
Language: Java
Interaction: The interviewer observes your debugging process -- think aloud as you work
Moshi is a modern JSON library for Android and Java, developed by Square. It's designed as a successor to Gson with improved performance and better Kotlin support. Key features include:
Type-Safe Parsing: Converts JSON to strongly-typed Java/Kotlin objects
Streaming API: Memory-efficient parsing for large JSON documents
Custom Adapters: Extensible system for handling custom types
Annotation Support: @Json for field mapping, @JsonQualifier for custom handling
Null Safety: Explicit handling of null values and missing fields
Example Usage:
` Moshi moshi = new Moshi.Builder().build(); JsonAdapter<User> adapter = moshi.adapter(User.class);
// Parse JSON to object User user = adapter.fromJson("{"name":"John","age":30}");
// Serialize object to JSON String json = adapter.toJson(user); `
You don't need prior experience with Moshi -- the codebase includes comprehensive tests that will help you identify what's broken.