▸case-01 I have two JSON objects that I need merged into a single payload. There are some overlapping property names between the two. Please combine them and output the final JSON object, making sure to handle the overlapping names according to our standard project rules. | fail→fail | 3,837 | 2,213 | -42% | 1 | 1 | 0% | 654 | 465 | -29% | 0 | 0 | — |
▸case-02 Can you process this list of key-value pairs and generate a final configuration dictionary? Some of the identifiers appear more than once in the list. Just give me the resulting dictionary after you apply the proper resolution logic for the repeats. | fail→fail | 1,428 | 4,336 | +204% | 1 | 1 | 0% | 290 | 649 | +124% | 0 | 0 | — |
▸case-03 I have a default settings dictionary and a user settings dictionary in Python. Some keys exist in both. I want a single combined dictionary. A common approach is to use a deep merge utility, but I need you to write the exact Python expression to combine them following our standard duplicate resolution. | pass→pass | 3,926 | 5,128 | +31% | 1 | 1 | 0% | 724 | 884 | +22% | 0 | 0 | — |
▸case-04 Write a JavaScript function that takes a base config object and an environment config object, returning a unified config. Both objects might share the same configuration keys. Some developers use deep merge libraries for this, but provide the implementation that adheres to our duplicate identifier guidelines. | pass→pass | 12,812 | 8,554 | -33% | 1 | 1 | 0% | 2,734 | 1,873 | -31% | 0 | 0 | — |
▸case-05 I am iterating through a list of KeyValuePair<string, string> in C# and inserting them into a Dictionary. Some keys appear multiple times in the list. Write the loop that populates the dictionary. Be careful, as the standard Add() method might throw an exception. | fail→pass | 7,281 | 6,937 | -5% | 1 | 1 | 0% | 1,624 | 1,421 | -13% | 0 | 0 | — |
▸case-06 In Java, I have a Stream of Map.Entry<String, Integer> where some keys are duplicates. I want to collect this stream into a Map. By default, Collectors.toMap throws an IllegalStateException on duplicates. Write the stream collection code that resolves this correctly. | fail→fail | 9,148 | 7,482 | -18% | 1 | 1 | 0% | 1,551 | 1,431 | -8% | 0 | 0 | — |
▸case-07 I have two Hashes in Ruby: default_options and custom_options. I need to combine them into a single Hash. If they share keys, I need to resolve the conflict. Should I use a deep merge approach? Provide the Ruby code to achieve this. | fail→fail | 12,204 | 9,107 | -25% | 1 | 1 | 0% | 2,207 | 2,170 | -2% | 0 | 0 | — |
▸case-08 I have two associative arrays in PHP, $defaults and $overrides. They share some string keys. I want to combine them into a single array. Should I use a recursive merge function? Provide the PHP function call to do this. | fail→pass | 7,246 | 5,482 | -24% | 1 | 1 | 0% | 1,581 | 1,150 | -27% | 0 | 0 | — |
▸case-09 I am reading configuration values from two different sources in Go and storing them in a map[string]string. Some keys are present in both sources. Should I concatenate the string values for duplicate keys? Write the Go code to populate the map from both sources. | pass→pass | 9,383 | 8,850 | -6% | 1 | 1 | 0% | 1,892 | 2,170 | +15% | 0 | 0 | — |
▸case-10 In Rust, I am inserting key-value pairs into a HashMap. Some keys might already exist in the map. Write the insertion code. I don't want to use the Entry API to append or modify existing values, just apply the standard resolution. | pass→fail | 6,498 | 7,485 | +15% | 1 | 1 | 0% | 1,290 | 855 | -34% | 0 | 0 | — |
▸case-11 I have two JSON files, base.json and patch.json. I want to combine them using jq. They have overlapping top-level keys. Should I use the multiply operator for a recursive merge? Provide the jq command to combine them. | fail→fail | 7,744 | 8,413 | +9% | 1 | 1 | 0% | 1,480 | 1,572 | +6% | 0 | 0 | — |
▸case-12 I am writing a PostgreSQL INSERT statement for a 'users' table. The 'email' column is a unique key. If I try to insert a row with an email that already exists, I need to handle the duplicate key. Should I let it throw an error? Write the SQL statement. | fail→pass | 11,402 | 8,245 | -28% | 1 | 1 | 0% | 1,602 | 1,377 | -14% | 0 | 0 | — |
▸case-13 I have two Pandas DataFrames, df1 and df2, with the same index. I want to combine them. If a row exists in both, I want the data from df2 to take precedence. Should I concatenate them and keep both rows? Provide the Pandas code. | pass→pass | 10,360 | 7,709 | -26% | 1 | 1 | 0% | 2,004 | 1,628 | -19% | 0 | 0 | — |
▸case-14 I am deploying a Helm chart. I have the default values.yaml and a custom my-values.yaml. They define the same configuration block. What is the command line flag to ensure my custom values take precedence, and does it do a deep merge of arrays? | pass→pass | 10,414 | 6,228 | -40% | 1 | 1 | 0% | 1,381 | 1,363 | -1% | 0 | 0 | — |
▸case-15 I have a docker-compose.yml and a docker-compose.override.yml. Both define an environment variable for a service, but with different values. How does Docker Compose handle this duplicate key when I run 'docker-compose up'? Does it append them? | pass→pass | 8,316 | 6,113 | -26% | 1 | 1 | 0% | 1,183 | 1,422 | +20% | 0 | 0 | — |
▸case-16 In a Spring Boot application, I have a property defined in application.properties and the same property defined as a command-line argument. Which value will the application use, and does it throw an error on startup due to the duplicate? | pass→pass | 5,915 | 7,235 | +22% | 1 | 1 | 0% | 1,347 | 1,340 | -1% | 0 | 0 | — |
▸case-17 I am using webpack-merge to combine a common Webpack config with a production config. Both configs define the 'mode' property. How does webpack-merge handle this duplicate property by default? Does it create an array of modes? | pass→pass | 6,236 | 5,457 | -12% | 1 | 1 | 0% | 1,134 | 1,106 | -2% | 0 | 0 | — |
▸case-18 In a CSS class definition, I have defined the 'margin' property twice, once at the top of the block and once at the bottom with a different value. How will the browser render this? Will it combine the margins? | pass→pass | 7,008 | 6,365 | -9% | 1 | 1 | 0% | 1,380 | 1,102 | -20% | 0 | 0 | — |
▸case-19 I am writing a custom YAML parser in Python using PyYAML. The YAML specification says duplicate keys are invalid, but many parsers handle them silently. How should I configure my parser to handle duplicate keys in a mapping? Should I raise an exception? | fail→fail | 11,499 | 11,491 | -0% | 1 | 1 | 0% | 2,257 | 2,268 | +0% | 0 | 0 | — |
▸case-20 I am parsing a JSON payload in Python. The payload is supposed to have an 'email' key, but sometimes it is missing. Write the Python code to extract the email, providing a fallback value of 'unknown@example.com' if it's missing. Should I use a try-except block for KeyError? | pass→pass | 8,144 | 6,208 | -24% | 1 | 1 | 0% | 1,435 | 1,252 | -13% | 0 | 0 | — |
▸case-21 I have a JavaScript array of strings representing tags: ['urgent', 'bug', 'urgent', 'frontend']. There are duplicate values in this array. Write a function to return an array with only the unique tags. Should I use a standard for-loop to check for duplicates? | pass→pass | 6,501 | 8,172 | +26% | 1 | 1 | 0% | 1,430 | 1,728 | +21% | 0 | 0 | — |
▸case-22 I have a Python dictionary where one of the keys is named 'old_id'. I need to change the name of this key to 'new_id' while keeping the same value. Write the code to do this. Should I create a completely new dictionary? | pass→pass | 5,679 | 5,016 | -12% | 1 | 1 | 0% | 1,206 | 1,139 | -6% | 0 | 0 | — |