id stringlengths 21 54 | family stringclasses 1
value | instruction stringlengths 177 309 | opening stringlengths 121 1.66k | prompt stringlengths 326 1.89k | generation dict | subject dict | target dict | gold listlengths 1 1 | hard_negatives listlengths 1 14 | mentions listlengths 0 0 | opening_by dict | n_hard_negatives int64 1 14 | corpus dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code-intel-37105-3014 | code | I need a Java function for a lock manager that acquires a read or write lock as specified, blocking until the lock is obtained or a timeout expires. Write it the way Intel code is written, in its style. | ```java
/**
* Acquires the requested read or write lock, waiting up to the specified timeout.
* The caller must release the corresponding lock after successful acquisition.
*
* @param lock the read/write lock to acquire
* @param write true to acquire the write lock; false to acquire the read lock
* @para... | I need a Java function for a lock manager that acquires a read or write lock as specified, blocking until the lock is obtained or a timeout expires. Write it the way Intel code is written, in its style.
```java
/**
* Acquires the requested read or write lock, waiting up to the specified timeout.
* The caller must re... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "acquires a read or write lock as specified, blocking until the lock is obtained or a timeout expires",
"context": "a lock manager",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Intel",
"path": "osc-server/src/main/java/org/osc/core/broker/job/lock/ReadWriteLockRecord.java",
"function": "lock"
} | [
{
"doc_id": 37105,
"role": "source_file",
"code_span": [
3014,
3380
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 566428,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 784569,
"role": "other_implementation",
"url": "http://code.flickr.net/tag/javascript/",
"host": "code.flickr.net"
},
{
"doc_id": 728026,
"role": "other_implementation... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 4 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-intel-37105-2329 | code | I need a Java function for a lock manager module that attempts to acquire a read or write lock based on a request and returns true if successful. Write it the way Intel code is written, in its style. | ```java
/**
* Attempts to acquire the requested lock without blocking.
*
* @param lock the read-write lock to acquire
* @param writeRequest {@code true} to request a write lock;
* {@code false} to request a read lock
* @return {@code true} if the lock was acquired; {@code false} otherwise
* @... | I need a Java function for a lock manager module that attempts to acquire a read or write lock based on a request and returns true if successful. Write it the way Intel code is written, in its style.
```java
/**
* Attempts to acquire the requested lock without blocking.
*
* @param lock the read-write lock to acquir... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "attempts to acquire a read or write lock based on a request and returns true if successful",
"context": "a lock manager module",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Intel",
"path": "osc-server/src/main/java/org/osc/core/broker/job/lock/ReadWriteLockRecord.java",
"function": "tryLock"
} | [
{
"doc_id": 37105,
"role": "source_file",
"code_span": [
2329,
2673
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 498359,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 566428,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 728026,
"role": "other_implementation",
"url": "starcoder://github-issues-... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 5 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-28972-5226 | code | I need a C function for kernel networking subsystem that removes an element from a linked list if it is present, protecting the operation with a lock. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* list_remove_locked - remove an entry from a list if present
* @head: list to search
* @entry: entry to remove
* @lock: spinlock protecting the list
*
* The caller must ensure that @head and @entry remain valid throughout
* this call. All accesses to the list must use @lock.
*
* Return: true if the e... | I need a C function for kernel networking subsystem that removes an element from a linked list if it is present, protecting the operation with a lock. Write it the way the Linux kernel code is written, in its style.
```c
/**
* list_remove_locked - remove an entry from a list if present
* @head: list to search
* @en... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "removes an element from a linked list if it is present, protecting the operation with a lock",
"context": "kernel networking subsystem",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "release/src-rt-6.x.4708/linux/linux-2.6.36/net/ipv4/inetpeer.c",
"function": "unlink_from_unused"
} | [
{
"doc_id": 28972,
"role": "source_file",
"code_span": [
5226,
5419
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 249604,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 878924,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 636780,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 5 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-124371-11275 | code | I need a C# function for a networked data receiver that stores incoming binary payload, logs its length, and clears a downloading flag while marking data as received. Write it the way Microsoft code is written, in its style. | ```csharp
/// <summary>
/// Stores the received binary payload and updates the download state.
/// </summary>
/// <param name="payload">The binary payload received from the network.</param>
/// <exception cref="ArgumentNullException">
/// <paramref name="payload"/> is <see langword="null"/>.
/// </exception>
private vo... | I need a C# function for a networked data receiver that stores incoming binary payload, logs its length, and clears a downloading flag while marking data as received. Write it the way Microsoft code is written, in its style.
```csharp
/// <summary>
/// Stores the received binary payload and updates the download state.... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "stores incoming binary payload, logs its length, and clears a downloading flag while marking data as received",
"context": "a networked data receiver",
"lang": "C#",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "LegacySpectatorView/Samples/SharedHolograms/Assets/Addons/HolographicCameraRig/SV_UNET/Scripts/UNetAnchorManager.cs",
"function": "NetworkTransmitter_dataReadyEvent"
} | [
{
"doc_id": 124371,
"role": "source_file",
"code_span": [
11275,
11542
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 139238,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-google-102892-5824 | code | I need a C# function for a UI list view controller that clears a UI container, instantiates an entry for each item, sets its display values, and registers a selection callback. Write it the way Google code is written, in its style. | ```csharp
/// <summary>
/// Replaces the list entries and registers a selection callback for each item.
/// </summary>
/// <param name="items">The items to display, in order.</param>
/// <param name="onSelected">The callback invoked when an item is selected.</param>
private void PopulateList(IReadOnlyList<Item> items, ... | I need a C# function for a UI list view controller that clears a UI container, instantiates an entry for each item, sets its display values, and registers a selection callback. Write it the way Google code is written, in its style.
```csharp
/// <summary>
/// Replaces the list entries and registers a selection callbac... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "clears a UI container, instantiates an entry for each item, sets its display values, and registers a selection callback",
"context": "a UI list view controller",
"lang": "C#",
"ubiquity": 4
} | {
"project": "Google",
"path": "TangoWithMultiplayer/Assets/Scripts/AreaDescriptionPickerUIController.cs",
"function": "_PopulateList"
} | [
{
"doc_id": 102892,
"role": "source_file",
"code_span": [
5824,
6964
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 318324,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00054-of-00055.jsonl.gz:82817",
"host": "git-commits-cleaned"
},
{
"doc_id": 85752,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 463294,
... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-oracle-149059-4498 | code | I need a Java function for runtime environment shutdown manager that executes all registered shutdown callbacks in order under a lock and then flags the runtime as shut down. Write it the way Oracle code is written, in its style. | ```java
/**
* Executes the registered shutdown callbacks in registration order while
* holding the shutdown lock, then marks this runtime as shut down.
*
* <p>If a callback fails, the remaining callbacks are still executed.
* The first failure is rethrown after shutdown completes, with subsequent
* failures added... | I need a Java function for runtime environment shutdown manager that executes all registered shutdown callbacks in order under a lock and then flags the runtime as shut down. Write it the way Oracle code is written, in its style.
```java
/**
* Executes the registered shutdown callbacks in registration order while
* ... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "executes all registered shutdown callbacks in order under a lock and then flags the runtime as shut down",
"context": "runtime environment shutdown manager",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Oracle",
"path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/java/lang/Shutdown.java",
"function": "runHooks"
} | [
{
"doc_id": 149059,
"role": "source_file",
"code_span": [
4498,
5408
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 364549,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-oracle-149059-6023 | code | I need a Java function for language runtime that coordinates orderly termination by invoking registered cleanup callbacks before exiting with a status code. Write it the way Oracle code is written, in its style. | ```java
/**
* Runs the registered cleanup callbacks in registration order, then terminates
* the Java virtual machine with the specified status code.
*
* <p>A callback that throws an exception does not prevent subsequent callbacks
* from running. Exceptions are reported to the standard error stream.
*
* @param ... | I need a Java function for language runtime that coordinates orderly termination by invoking registered cleanup callbacks before exiting with a status code. Write it the way Oracle code is written, in its style.
```java
/**
* Runs the registered cleanup callbacks in registration order, then terminates
* the Java vir... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "coordinates orderly termination by invoking registered cleanup callbacks before exiting with a status code",
"context": "language runtime",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Oracle",
"path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/java/lang/Shutdown.java",
"function": "exit"
} | [
{
"doc_id": 149059,
"role": "source_file",
"code_span": [
6023,
6541
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 529639,
"role": "other_implementation",
"url": "http://stackoverflow.com/questions/1167484/how-to-gracefully-shutdown-emacs-daemon",
"host": "stackoverflow.com"
},
{
"doc_id": 113523,
"role": "other_implementation",
"url": "http://help.adobe.com/en_US/air/html/dev/WS5b3cc... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-169479-1361 | code | I need a C function for a kernel driver exposing sysfs attributes that maps a given string to its associated integer value from a predefined name/value table, returning an error code when the string is not found. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* sysfs_lookup_value - map a sysfs string to a table value
* @table: array of name/value entries
* @count: number of entries in @table
* @buf: NUL-terminated input string, optionally ending with a newline
* @value: receives the matching value; unchanged if no match is found
*
* Return: 0 on success, or ... | I need a C function for a kernel driver exposing sysfs attributes that maps a given string to its associated integer value from a predefined name/value table, returning an error code when the string is not found. Write it the way the Linux kernel code is written, in its style.
```c
/**
* sysfs_lookup_value - map a sy... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "maps a given string to its associated integer value from a predefined name/value table, returning an error code when the string is not found",
"context": "a kernel driver exposing sysfs attributes",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "drivers/platform/mellanox/mlxbf-bootctl.c",
"function": "mlxbf_bootctl_reset_action_to_val"
} | [
{
"doc_id": 169479,
"role": "source_file",
"code_span": [
1361,
1580
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 958377,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 959043,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 718547,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 4 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-169479-1617 | code | I need a C function for a kernel device driver that returns the textual name associated with a numeric code from a predefined table, or a default string if not found. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* code_to_name - Return the textual name of a numeric code
* @code: Numeric code to look up
*
* Return: The matching name, or "unknown" if the code is not found.
*/
static const char *code_to_name(unsigned int code)
{
static const struct { | I need a C function for a kernel device driver that returns the textual name associated with a numeric code from a predefined table, or a default string if not found. Write it the way the Linux kernel code is written, in its style.
```c
/**
* code_to_name - Return the textual name of a numeric code
* @code: Numeric ... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "returns the textual name associated with a numeric code from a predefined table, or a default string if not found",
"context": "a kernel device driver",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "drivers/platform/mellanox/mlxbf-bootctl.c",
"function": "mlxbf_bootctl_action_to_string"
} | [
{
"doc_id": 169479,
"role": "source_file",
"code_span": [
1617,
1831
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 610343,
"role": "other_implementation",
"url": "https://ryandavison.net/tag/switch-case/",
"host": "ryandavison.net"
},
{
"doc_id": 855810,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00011-of-00055.jsonl.gz:55200",
"host": "git-commi... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 10 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-apache-commons-189718-6533 | code | I need a Java function for a string utility library that checks whether a given string ends with a specified suffix, optionally ignoring case. Write it the way Apache Commons code is written, in its style. | ```java
/**
* Checks if a String ends with a specified suffix, optionally ignoring case.
*
* <p>{@code null}s are handled without exceptions. Two {@code null}
* references are considered to be equal. The comparison is case-sensitive
* unless {@code ignoreCase} is {@code true}.</p>
*
* <pre>
* endsWith(null, nul... | I need a Java function for a string utility library that checks whether a given string ends with a specified suffix, optionally ignoring case. Write it the way Apache Commons code is written, in its style.
```java
/**
* Checks if a String ends with a specified suffix, optionally ignoring case.
*
* <p>{@code null}s ... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "checks whether a given string ends with a specified suffix, optionally ignoring case",
"context": "a string utility library",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Apache Commons",
"path": "module/core/src/main/java/in/clouthink/daas/fss/repackage/org/apache/commons/io/IOCase.java",
"function": "checkEndsWith"
} | [
{
"doc_id": 189718,
"role": "source_file",
"code_span": [
6533,
6849
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 513699,
"role": "other_implementation",
"url": "https://ironion.com/blog/2015/10/21/bonfire-confirm-the-ending/",
"host": "ironion.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-apache-commons-189718-3098 | code | I need a Java function for a file I/O utility library that returns the matching case-sensitivity option for a given string name, or throws if the name is invalid. Write it the way Apache Commons code is written, in its style. | ```java
/**
* Gets the case-sensitivity option with the specified name.
*
* @param name the name of the case-sensitivity option
* @return the matching case-sensitivity option
* @throws IllegalArgumentException if the name is invalid
*/
public static IOCase forName(final String name) {
for (final IOCase ioCase... | I need a Java function for a file I/O utility library that returns the matching case-sensitivity option for a given string name, or throws if the name is invalid. Write it the way Apache Commons code is written, in its style.
```java
/**
* Gets the case-sensitivity option with the specified name.
*
* @param name th... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "returns the matching case-sensitivity option for a given string name, or throws if the name is invalid",
"context": "a file I/O utility library",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Apache Commons",
"path": "module/core/src/main/java/in/clouthink/daas/fss/repackage/org/apache/commons/io/IOCase.java",
"function": "forName"
} | [
{
"doc_id": 189718,
"role": "source_file",
"code_span": [
3098,
3516
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 805961,
"role": "other_implementation",
"url": "https://www.sitepoint.com/fundamentals-of-java-enum-types-tutorial/",
"host": "sitepoint.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-207405-3741 | code | I need a C function for a DHCP client implementation that broadcasts a DHCP discovery packet, optionally requesting a specific IP address and indicating a maximum packet size. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* dhcp_send_discover - broadcast a DHCPDISCOVER message
* @sock: UDP socket bound to port 68 with broadcasting enabled
* @hwaddr: client's six-byte Ethernet address
* @xid: transaction identifier in network byte order
* @requested_ip: requested IPv4 address in network byte order, or zero
* @max_msg_size:... | I need a C function for a DHCP client implementation that broadcasts a DHCP discovery packet, optionally requesting a specific IP address and indicating a maximum packet size. Write it the way the Linux kernel code is written, in its style.
```c
/**
* dhcp_send_discover - broadcast a DHCPDISCOVER message
* @sock: UD... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "broadcasts a DHCP discovery packet, optionally requesting a specific IP address and indicating a maximum packet size",
"context": "a DHCP client implementation",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "release/src/router/busybox/networking/udhcp/clientpacket.c",
"function": "send_discover"
} | [
{
"doc_id": 207405,
"role": "source_file",
"code_span": [
3741,
4285
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 890754,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-chromium-228341-2548 | code | I need a C++ function for a cellular eSIM provisioning system that measures the duration of an asynchronous operation and logs it if the operation succeeds. Write it the way Chromium code is written, in its style. | ```cpp
// Records the elapsed time for a successful asynchronous eSIM provisioning
// operation. |start_time| must be captured with base::TimeTicks::Now() when the
// operation begins. Call this function when the operation completes.
void RecordESimProvisioningDuration(base::TimeTicks start_time, bool success) {
if (... | I need a C++ function for a cellular eSIM provisioning system that measures the duration of an asynchronous operation and logs it if the operation succeeds. Write it the way Chromium code is written, in its style.
```cpp
// Records the elapsed time for a successful asynchronous eSIM provisioning
// operation. |start_t... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "measures the duration of an asynchronous operation and logs it if the operation succeeds",
"context": "a cellular eSIM provisioning system",
"lang": "C++",
"ubiquity": 4
} | {
"project": "Chromium",
"path": "chromeos/services/cellular_setup/esim_profile.cc",
"function": "CreateTimedInstallProfileCallback"
} | [
{
"doc_id": 228341,
"role": "source_file",
"code_span": [
2548,
3198
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 502300,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 954990,
"role": "other_implementation",
"url": "https://leimao.github.io/blog/Python-AsyncIO-Asynchronous-IO/",
"host": "leimao.github.io"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-an-apache-software-foundation-project-233123-5732 | code | I need a Java function for a cryptographic utilities module that generates a hash of a given input string using a specified algorithm and returns the result base64‑encoded. Write it the way an Apache Software Foundation project code is written, in its style. | ```java
/**
* Generates a Base64-encoded hash of the given string using the specified
* message digest algorithm. The input is encoded using UTF-8.
*
* @param input the string to hash, must not be {@code null}
* @param algorithm the message digest algorithm, such as {@code SHA-256},
* must not be {@code nu... | I need a Java function for a cryptographic utilities module that generates a hash of a given input string using a specified algorithm and returns the result base64‑encoded. Write it the way an Apache Software Foundation project code is written, in its style.
```java
/**
* Generates a Base64-encoded hash of the given ... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "generates a hash of a given input string using a specified algorithm and returns the result base64‑encoded",
"context": "a cryptographic utilities module",
"lang": "Java",
"ubiquity": 4
} | {
"project": "an Apache Software Foundation project",
"path": "src/main/java/org/osgl/util/Crypto.java",
"function": "passwordHash"
} | [
{
"doc_id": 233123,
"role": "source_file",
"code_span": [
5732,
6098
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 910246,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 120108,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00004-of-00055.jsonl.gz:46052",
"host": "git-commits-cleaned"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-254027-3411 | code | I need a Python function for a utility class for managing data bindings that checks a condition on the object's current data and raises a ValueError with a custom message when the condition is not met. Write it the way Microsoft code is written, in its style. | ```python
def validate(self, condition, message: str) -> None:
"""Validate the current data against the specified condition. | I need a Python function for a utility class for managing data bindings that checks a condition on the object's current data and raises a ValueError with a custom message when the condition is not met. Write it the way Microsoft code is written, in its style.
```python
def validate(self, condition, message: str) -> No... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "checks a condition on the object's current data and raises a ValueError with a custom message when the condition is not met",
"context": "a utility class for managing data bindings",
"lang": "Python",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "PyStationB/libraries/Utilities/psbutils/arrayshapes.py",
"function": "where"
} | [
{
"doc_id": 254027,
"role": "source_file",
"code_span": [
3411,
3922
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 141274,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 346330,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00013-of-00055.jsonl.gz:33240",
"host": "git-commits-cleaned"
},
{
"doc_id": 353041,
... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 13 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-openjdk-294616-3925 | code | I need a Java function for configuration persistence component that atomically writes an object to an XML file by first writing to a temporary file and then renaming it into place. Write it the way the OpenJDK code is written, in its style. | ```java
/**
* Atomically replaces an XML file with the encoded form of an object.
* The object is written to a temporary file in the target directory before
* the temporary file is atomically moved into place.
*
* @param object the object to encode
* @param file the target file
* @throws IOException if encoding ... | I need a Java function for configuration persistence component that atomically writes an object to an XML file by first writing to a temporary file and then renaming it into place. Write it the way the OpenJDK code is written, in its style.
```java
/**
* Atomically replaces an XML file with the encoded form of an obj... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "atomically writes an object to an XML file by first writing to a temporary file and then renaming it into place",
"context": "configuration persistence component",
"lang": "Java",
"ubiquity": 4
} | {
"project": "the OpenJDK",
"path": "src/share/sample/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/XmlConfigUtils.java",
"function": "writeToFile"
} | [
{
"doc_id": 294616,
"role": "source_file",
"code_span": [
3925,
4925
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 390323,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00004-of-00055.jsonl.gz:94453",
"host": "git-commits-cleaned"
},
{
"doc_id": 236980,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-openjdk-294616-8147 | code | I need a Java function for application configuration loader that reads an XML file, checks it exists and is readable, then unmarshals it into a config object, throwing IOException on failure. Write it the way the OpenJDK code is written, in its style. | ```java
/**
* Reads and unmarshals the configuration from the specified XML file.
*
* @param path the path to the configuration file
* @return the configuration object
* @throws IOException if the file does not exist, is not readable,
* or cannot be unmarshalled
*/
public static Config loadConfig(Path pa... | I need a Java function for application configuration loader that reads an XML file, checks it exists and is readable, then unmarshals it into a config object, throwing IOException on failure. Write it the way the OpenJDK code is written, in its style.
```java
/**
* Reads and unmarshals the configuration from the spec... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "reads an XML file, checks it exists and is readable, then unmarshals it into a config object, throwing IOException on failure",
"context": "application configuration loader",
"lang": "Java",
"ubiquity": 4
} | {
"project": "the OpenJDK",
"path": "src/share/sample/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/XmlConfigUtils.java",
"function": "readFromFile"
} | [
{
"doc_id": 294616,
"role": "source_file",
"code_span": [
8147,
8699
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 409218,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00026-of-00055.jsonl.gz:31293",
"host": "git-commits-cleaned"
},
{
"doc_id": 804989,
"role": "other_implementation",
"url": "https://weblogs.java.net/blog/felipegaucho/archive/2007/10/co... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 7 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-222081-4485 | code | I need a C# function for interop utilities for native API calls that allocates unmanaged memory and copies a managed string as a null‑terminated Unicode buffer, returning its pointer or zero. Write it the way Microsoft code is written, in its style. | ```csharp
/// <summary>
/// Copies the specified string to a null-terminated Unicode buffer in unmanaged memory.
/// </summary>
/// <param name="value">The string to copy, or <see langword="null"/>.</param>
/// <returns>
/// A pointer to the unmanaged buffer, or <see cref="IntPtr.Zero"/> if
/// <paramref name="value"/>... | I need a C# function for interop utilities for native API calls that allocates unmanaged memory and copies a managed string as a null‑terminated Unicode buffer, returning its pointer or zero. Write it the way Microsoft code is written, in its style.
```csharp
/// <summary>
/// Copies the specified string to a null-ter... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "allocates unmanaged memory and copies a managed string as a null‑terminated Unicode buffer, returning its pointer or zero",
"context": "interop utilities for native API calls",
"lang": "C#",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "Src/Microsoft.Isam.Esent.Interop/LibraryHelpers.cs",
"function": "MarshalStringToHGlobalUni"
} | [
{
"doc_id": 222081,
"role": "source_file",
"code_span": [
4485,
4764
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 323749,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 567790,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-tensorflow-289722-3773 | code | I need a Python function for a TensorFlow training graph that prints given tensor values during graph execution, averaging error/loss tensors, and adds a separator. Write it the way TensorFlow code is written, in its style. | ```python
import tensorflow as tf
def print_tensors(output, tensors):
"""Prints named tensors when the returned output is evaluated. | I need a Python function for a TensorFlow training graph that prints given tensor values during graph execution, averaging error/loss tensors, and adds a separator. Write it the way TensorFlow code is written, in its style.
```python
import tensorflow as tf
def print_tensors(output, tensors):
"""Prints named ten... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "prints given tensor values during graph execution, averaging error/loss tensors, and adds a separator",
"context": "a TensorFlow training graph",
"lang": "Python",
"ubiquity": 4
} | {
"project": "TensorFlow",
"path": "kfac/examples/classifier_mnist_tpu_estimator.py",
"function": "print_tensors"
} | [
{
"doc_id": 289722,
"role": "source_file",
"code_span": [
3773,
4239
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 207249,
"role": "other_implementation",
"url": "starcoder://github-issues-filtered-structured/train-00046-of-00059.jsonl.gz:288369",
"host": "github-issues-filtered-structured"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-an-apache-software-foundation-project-326423-2558 | code | I need a C# function for a binary record parser that deserializes fixed-size fields of a binary record from a byte array. Write it the way an Apache Software Foundation project code is written, in its style. | ```csharp
/// <summary>
/// Deserializes a binary record into fixed-size fields, preserving byte order.
/// </summary>
/// <param name="buffer">The byte array containing the record.</param>
/// <param name="offset">The zero-based offset at which the record begins.</param>
/// <param name="fieldSizes">The size, in bytes... | I need a C# function for a binary record parser that deserializes fixed-size fields of a binary record from a byte array. Write it the way an Apache Software Foundation project code is written, in its style.
```csharp
/// <summary>
/// Deserializes a binary record into fixed-size fields, preserving byte order.
/// </s... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "deserializes fixed-size fields of a binary record from a byte array",
"context": "a binary record parser",
"lang": "C#",
"ubiquity": 4
} | {
"project": "an Apache Software Foundation project",
"path": "src/Npoi.Core/DDF/EscherSpRecord.cs",
"function": "FillFields"
} | [
{
"doc_id": 326423,
"role": "source_file",
"code_span": [
2558,
3177
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 120186,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 791565,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 660891,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 14 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-an-apache-software-foundation-project-233123-7719 | code | I need a Java function for a cryptographic utility library that encrypts a string with AES using a key derived from a secret and a random IV, outputting hex‑encoded ciphertext with IV. Write it the way an Apache Software Foundation project code is written, in its style. | ```java
/**
* Encrypts a string using AES-256-GCM and a key derived from the supplied secret
* using PBKDF2-HMAC-SHA256 with 600,000 iterations.
*
* <p>The result is lowercase hexadecimal encoding of the concatenated 16-byte
* salt, 12-byte initialization vector, ciphertext, and 16-byte authentication
* tag. A ne... | I need a Java function for a cryptographic utility library that encrypts a string with AES using a key derived from a secret and a random IV, outputting hex‑encoded ciphertext with IV. Write it the way an Apache Software Foundation project code is written, in its style.
```java
/**
* Encrypts a string using AES-256-G... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "encrypts a string with AES using a key derived from a secret and a random IV, outputting hex‑encoded ciphertext with IV",
"context": "a cryptographic utility library",
"lang": "Java",
"ubiquity": 4
} | {
"project": "an Apache Software Foundation project",
"path": "src/main/java/org/osgl/util/Crypto.java",
"function": "encryptAES"
} | [
{
"doc_id": 233123,
"role": "source_file",
"code_span": [
7719,
8873
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 720279,
"role": "other_implementation",
"url": "http://corinnekrych.blogspot.de/2013/11/",
"host": "corinnekrych.blogspot.de"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-328454-3463 | code | I need a C# function for a console‑based analysis utility that writes a usage/help message describing the command-line options for a tool. Write it the way Microsoft code is written, in its style. | ```csharp
/// <summary>
/// Writes the command-line usage and available options to the console.
/// </summary>
private static void PrintUsage()
{
Console.WriteLine("Usage: AnalysisUtility [options] <input-file>"); | I need a C# function for a console‑based analysis utility that writes a usage/help message describing the command-line options for a tool. Write it the way Microsoft code is written, in its style.
```csharp
/// <summary>
/// Writes the command-line usage and available options to the console.
/// </summary>
private sta... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "writes a usage/help message describing the command-line options for a tool",
"context": "a console‑based analysis utility",
"lang": "C#",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "Public/Src/Tools/Execution.Analyzer/Analyzers.Core/Xldb/XLGToDBAnalyzer.cs",
"function": "WriteXLGToDBHelp"
} | [
{
"doc_id": 328454,
"role": "source_file",
"code_span": [
3463,
4276
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 163493,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00032-of-00055.jsonl.gz:114346",
"host": "git-commits-cleaned"
},
{
"doc_id": 136442,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 173044,... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 9 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-374166-6887 | code | I need a C++ function for a managed runtime's variant handling component that retrieves a cached static singleton instance from a class's static field. Write it the way Microsoft code is written, in its style. | ```cpp
/// <summary>
/// Retrieves a cached singleton from a managed class's static field.
/// </summary>
/// <param name="classType">The managed type declaring the field.</param>
/// <param name="fieldName">The name of the static singleton field.</param>
/// <returns>The cached instance, or nullptr if the field is nul... | I need a C++ function for a managed runtime's variant handling component that retrieves a cached static singleton instance from a class's static field. Write it the way Microsoft code is written, in its style.
```cpp
/// <summary>
/// Retrieves a cached singleton from a managed class's static field.
/// </summary>
///... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "retrieves a cached static singleton instance from a class's static field",
"context": "a managed runtime's variant handling component",
"lang": "C++",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "com/netfx/src/clr/vm/comvariant.cpp",
"function": "GetEmptyObjectRef"
} | [
{
"doc_id": 374166,
"role": "source_file",
"code_span": [
6887,
7322
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 587395,
"role": "other_implementation",
"url": "http://stackoverflow.com/questions/6915/thread-safe-lazy-construction-of-a-singleton-in-c",
"host": "stackoverflow.com"
},
{
"doc_id": 117691,
"role": "other_implementation",
"url": "http://coding-geek.com/design-pattern-sin... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 10 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-an-apache-software-foundation-project-369917-3180 | code | I need a JavaScript function for client‑side data‑visualisation component that creates an html table from column descriptors and a data array, adding header and data cells via accessor functions. Write it the way an Apache Software Foundation project code is written, in its style. | ```javascript
/**
* Creates an HTML table from column descriptors and row data.
*
* Each column provides a header value or accessor and a cell accessor.
* Accessors receive the column and column index for headers, or the row
* and row index for data cells. Values are rendered as plain text;
* null and undefined v... | I need a JavaScript function for client‑side data‑visualisation component that creates an html table from column descriptors and a data array, adding header and data cells via accessor functions. Write it the way an Apache Software Foundation project code is written, in its style.
```javascript
/**
* Creates an HTML ... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "creates an html table from column descriptors and a data array, adding header and data cells via accessor functions",
"context": "client‑side data‑visualisation component",
"lang": "JavaScript",
"ubiquity": 4
} | {
"project": "an Apache Software Foundation project",
"path": "exec/java-exec/src/main/resources/rest/static/js/graph.js",
"function": "builddomtable"
} | [
{
"doc_id": 369917,
"role": "source_file",
"code_span": [
3180,
3725
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 388234,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 572163,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00034-of-00055.jsonl.gz:7004",
"host": "git-commits-cleaned"
},
{
"doc_id": 481305,
... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 4 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-chromium-405206-3696 | code | I need a C++ function for a browser's network request handling code that returns the given loader if present, otherwise retrieves the default loader for the user profile. Write it the way Chromium code is written, in its style. | ```cpp
// Returns `url_loader_factory` if non-null, otherwise returns the default URL
// loader factory for `profile`. `profile` must be non-null in the latter case.
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
Profile* pr... | I need a C++ function for a browser's network request handling code that returns the given loader if present, otherwise retrieves the default loader for the user profile. Write it the way Chromium code is written, in its style.
```cpp
// Returns `url_loader_factory` if non-null, otherwise returns the default URL
// lo... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "returns the given loader if present, otherwise retrieves the default loader for the user profile",
"context": "a browser's network request handling code",
"lang": "C++",
"ubiquity": 4
} | {
"project": "Chromium",
"path": "chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc",
"function": "GetURLLoaderFactory"
} | [
{
"doc_id": 405206,
"role": "source_file",
"code_span": [
3696,
3987
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 364549,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 374538,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 455602,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-android-open-source-project-395386-5003 | code | I need a Java function for an IDE or build tool integration component that adds a library/module dependency to a project's build configuration file. Write it the way the Android Open Source Project code is written, in its style. | ```java
/**
* Adds a dependency to a project's Groovy {@code build.gradle} file.
*
* <p>Appends a dependencies block, preserving the existing configuration. The dependency
* configuration must already be defined by the project's plugins.
*
* @param buildFile the existing {@code build.gradle} file
* @param config... | I need a Java function for an IDE or build tool integration component that adds a library/module dependency to a project's build configuration file. Write it the way the Android Open Source Project code is written, in its style.
```java
/**
* Adds a dependency to a project's Groovy {@code build.gradle} file.
*
* <p... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "adds a library/module dependency to a project's build configuration file",
"context": "an IDE or build tool integration component",
"lang": "Java",
"ubiquity": 4
} | {
"project": "the Android Open Source Project",
"path": "android/src/org/jetbrains/android/intentions/AndroidAddLibraryDependencyAction.java",
"function": "addDependency"
} | [
{
"doc_id": 395386,
"role": "source_file",
"code_span": [
5003,
5991
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 671151,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00020-of-00055.jsonl.gz:87605",
"host": "git-commits-cleaned"
},
{
"doc_id": 903350,
"role": "other_implementation",
"url": "https://jeroenmols.com/blog/2015/08/13/artifactory2/",
"h... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 4 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-413259-932 | code | I need a C# function for a server-side notification component that initializes dependent service clients and configuration URLs from a provided context. Write it the way Microsoft code is written, in its style. | ```csharp
/// <summary>
/// Initializes notification and subscription clients and their endpoint URLs.
/// </summary>
/// <param name="context">The service provider containing the required dependencies.</param>
/// <returns>The initialized clients and their endpoint URLs.</returns>
/// <exception cref="ArgumentNullExce... | I need a C# function for a server-side notification component that initializes dependent service clients and configuration URLs from a provided context. Write it the way Microsoft code is written, in its style.
```csharp
/// <summary>
/// Initializes notification and subscription clients and their endpoint URLs.
/// <... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "initializes dependent service clients and configuration URLs from a provided context",
"context": "a server-side notification component",
"lang": "C#",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "Commerce/Notifications/Notify.cs",
"function": "Notify"
} | [
{
"doc_id": 413259,
"role": "source_file",
"code_span": [
932,
1364
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 167341,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 850403,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 859223,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 8 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-409412-1706 | code | I need a C function for a memory controller driver that reads two memory-mapped registers, shifts and merges their fields to calculate a device's base address. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* mc_read_base_addr - read the device base address
* @regs: MMIO mapping of the base-address register pair
*
* The low 32 bits reside at offset 0 and the high 32 bits at offset 4.
* The registers must remain stable across both reads.
*
* Return: The 64-bit device base address.
*/
static u64 mc_read_bas... | I need a C function for a memory controller driver that reads two memory-mapped registers, shifts and merges their fields to calculate a device's base address. Write it the way the Linux kernel code is written, in its style.
```c
/**
* mc_read_base_addr - read the device base address
* @regs: MMIO mapping of the bas... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "reads two memory-mapped registers, shifts and merges their fields to calculate a device's base address",
"context": "a memory controller driver",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "release/src/linux/linux/arch/mips/galileo-boards/ev64120/compressed/memory.c",
"function": "getDeviceBaseAddress"
} | [
{
"doc_id": 409412,
"role": "source_file",
"code_span": [
1706,
1997
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 577987,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00041-of-00055.jsonl.gz:83093",
"host": "git-commits-cleaned"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-413259-1879 | code | I need a C# function for a backend service that processes user notifications that sends an email via a service client, choosing the sender address based on a flag and logging warnings on failure. Write it the way Microsoft code is written, in its style. | ```csharp
/// <summary>
/// Sends a notification email using the sender address selected by <paramref name="useNoReplySender"/>.
/// </summary>
/// <param name="recipientAddress">The recipient's email address.</param>
/// <param name="subject">The email subject.</param>
/// <param name="body">The email body.</param>
//... | I need a C# function for a backend service that processes user notifications that sends an email via a service client, choosing the sender address based on a flag and logging warnings on failure. Write it the way Microsoft code is written, in its style.
```csharp
/// <summary>
/// Sends a notification email using the ... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "sends an email via a service client, choosing the sender address based on a flag and logging warnings on failure",
"context": "a backend service that processes user notifications",
"lang": "C#",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "Commerce/Notifications/Notify.cs",
"function": "SendEmailNotification"
} | [
{
"doc_id": 413259,
"role": "source_file",
"code_span": [
1879,
3285
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 896133,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-intel-516755-4954 | code | I need a Go function for a data access layer for configuration records that fetches an object matching a composite key from a datastore and decodes it, returning an error if missing or decode fails. Write it the way Intel code is written, in its style. | ```go
// GetConfiguration retrieves and decodes the configuration identified by tenantID
// and configurationID. It returns an error if the record is missing or decoding fails.
func GetConfiguration[T any](
ctx context.Context,
collection *mongo.Collection,
tenantID string,
configurationID string,
) (*T, error) {
... | I need a Go function for a data access layer for configuration records that fetches an object matching a composite key from a datastore and decodes it, returning an error if missing or decode fails. Write it the way Intel code is written, in its style.
```go
// GetConfiguration retrieves and decodes the configuration ... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "fetches an object matching a composite key from a datastore and decodes it, returning an error if missing or decode fails",
"context": "a data access layer for configuration records",
"lang": "Go",
"ubiquity": 4
} | {
"project": "Intel",
"path": "src/orchestrator/pkg/module/deployment_intent_groups.go",
"function": "func"
} | [
{
"doc_id": 516755,
"role": "source_file",
"code_span": [
4954,
5798
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 745439,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 921366,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00044-of-00055.jsonl.gz:13574",
"host": "git-commits-cleaned"
},
{
"doc_id": 776794,
... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 4 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-an-apache-software-foundation-project-521402-4458 | code | I need a Java function for a test rule that manages external service containers that creates and caches a single instance for each configuration key, returning the existing instance on subsequent calls in a thread‑safe way. Write it the way an Apache Software Foundation project code is written, in its style. | ```java
/**
* Returns the cached container for the specified configuration key, creating it
* if necessary. Concurrent calls for the same key share a single instance.
*
* <p>The factory must return a non-null container and must not modify the cache.
* If creation fails, no entry is cached and a subsequent call may... | I need a Java function for a test rule that manages external service containers that creates and caches a single instance for each configuration key, returning the existing instance on subsequent calls in a thread‑safe way. Write it the way an Apache Software Foundation project code is written, in its style.
```java
/... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "creates and caches a single instance for each configuration key, returning the existing instance on subsequent calls in a thread‑safe way",
"context": "a test rule that manages external service containers",
"lang": "Java",
"ubiquity": 4
} | {
"project": "an Apache Software Foundation project",
"path": "src/main/java/com/arakelian/docker/junit/DockerRule.java",
"function": "register"
} | [
{
"doc_id": 521402,
"role": "source_file",
"code_span": [
4458,
5005
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 795902,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 945302,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 919634,
"role": "other_implementation",
"url": "https://dzone.com/articles... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 7 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-596653-3658 | code | I need a C# function for a test data generation component that creates a collection of synthetic user objects populated with random realistic attributes. Write it the way Microsoft code is written, in its style. | ```csharp
/// <summary>
/// Creates a collection of synthetic users with randomly selected attributes.
/// </summary>
/// <param name="count">The number of users to create.</param>
/// <returns>A read-only collection of synthetic users.</returns>
/// <exception cref="ArgumentOutOfRangeException">
/// <paramref name="co... | I need a C# function for a test data generation component that creates a collection of synthetic user objects populated with random realistic attributes. Write it the way Microsoft code is written, in its style.
```csharp
/// <summary>
/// Creates a collection of synthetic users with randomly selected attributes.
/// ... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "creates a collection of synthetic user objects populated with random realistic attributes",
"context": "a test data generation component",
"lang": "C#",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "samples/Dynamic.OData.Samples/GenericEntityRepository.cs",
"function": "GetUserEntities"
} | [
{
"doc_id": 596653,
"role": "source_file",
"code_span": [
3658,
5978
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 666558,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-apache-commons-601307-1984 | code | I need a Java function for a file-based resource manager that ensures a directory exists by creating it if missing and throws an error when creation fails. Write it the way Apache Commons code is written, in its style. | ```java
/**
* Ensures that the specified directory exists, creating it and any missing
* parent directories if necessary.
*
* @param directory the directory to create, must not be {@code null}
* @throws NullPointerException if the directory is {@code null}
* @throws IOException if the directory cannot be created ... | I need a Java function for a file-based resource manager that ensures a directory exists by creating it if missing and throws an error when creation fails. Write it the way Apache Commons code is written, in its style.
```java
/**
* Ensures that the specified directory exists, creating it and any missing
* parent di... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "ensures a directory exists by creating it if missing and throws an error when creation fails",
"context": "a file-based resource manager",
"lang": "Java",
"ubiquity": 5
} | {
"project": "Apache Commons",
"path": "src/java/org/apache/commons/transaction/file/FileSequence.java",
"function": "FileSequence"
} | [
{
"doc_id": 601307,
"role": "source_file",
"code_span": [
1984,
2348
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 344056,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 717803,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 589841,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 6 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-apple-561077-1484 | code | I need a C++ function for authentication component of a directory service client that authenticates a user against a directory service with username and password, returns success flag and maps errors to language exceptions. Write it the way Apple code is written, in its style. | ```cpp
/**
* Authenticates a user against the macOS directory authentication search node.
*
* @param username The user's record name, encoded as UTF-8.
* @param password The user's password, encoded as UTF-8.
* @return true if authentication succeeds; false if the credentials are invalid.
* @throws std::invalid_a... | I need a C++ function for authentication component of a directory service client that authenticates a user against a directory service with username and password, returns success flag and maps errors to language exceptions. Write it the way Apple code is written, in its style.
```cpp
/**
* Authenticates a user agains... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "authenticates a user against a directory service with username and password, returns success flag and maps errors to language exceptions",
"context": "authentication component of a directory service client",
"lang": "C++",
"ubiquity": 4
} | {
"project": "Apple",
"path": "src/CDirectoryServiceAuth.cpp",
"function": "AuthenticateUserBasic"
} | [
{
"doc_id": 561077,
"role": "source_file",
"code_span": [
1484,
2087
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 215452,
"role": "other_implementation",
"url": "http://support.microsoft.com/default.aspx?scid=kb;EN-US;326340",
"host": "support.microsoft.com"
},
{
"doc_id": 343318,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00004-of-00055.jsonl.gz:95... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 10 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-apache-fulcrum-601417-6293 | code | I need a Java function for a form input validation module that validates a string as an integer (respecting locale), enforces requiredness, and applies custom reference checks, throwing on error. Write it the way Apache Fulcrum code is written, in its style. | ```java
/**
* Validates an integer value using the specified locale and reference checks.
*
* @param value the input value
* @param locale the locale used to parse the value
* @param required whether a value is required
* @param referenceChecks the checks to apply to the parsed value
* @return the parsed integer... | I need a Java function for a form input validation module that validates a string as an integer (respecting locale), enforces requiredness, and applies custom reference checks, throwing on error. Write it the way Apache Fulcrum code is written, in its style.
```java
/**
* Validates an integer value using the specifie... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "validates a string as an integer (respecting locale), enforces requiredness, and applies custom reference checks, throwing on error",
"context": "a form input validation module",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Apache Fulcrum",
"path": "src/java/org/apache/fulcrum/intake/validator/IntegerRangeValidator.java",
"function": "assertValidity"
} | [
{
"doc_id": 601417,
"role": "source_file",
"code_span": [
6293,
7058
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 219951,
"role": "other_implementation",
"url": "http://stackoverflow.com/questions/3420629/what-is-the-difference-between-sscanf-or-atoi-to-convert-a-string-to-an-integer/3420659",
"host": "stackoverflow.com"
},
{
"doc_id": 206975,
"role": "other_implementation",
"url": n... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-microsoft-501721-1477 | code | I need a C# function for a resource localization component that retrieves a localized resource by key, initializing the manager if needed and using UI culture when none is given. Write it the way Microsoft code is written, in its style. | ```csharp
/// <summary>
/// Retrieves the localized string associated with the specified resource key.
/// </summary>
/// <param name="resourceKey">The key of the resource to retrieve.</param>
/// <param name="culture">
/// The culture to use, or <see langword="null"/> to use the current UI culture.
/// </param>
/// <r... | I need a C# function for a resource localization component that retrieves a localized resource by key, initializing the manager if needed and using UI culture when none is given. Write it the way Microsoft code is written, in its style.
```csharp
/// <summary>
/// Retrieves the localized string associated with the spe... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "retrieves a localized resource by key, initializing the manager if needed and using UI culture when none is given",
"context": "a resource localization component",
"lang": "C#",
"ubiquity": 4
} | {
"project": "Microsoft",
"path": "System.Web/Compilation/IResourceProvider.cs",
"function": "GetObject"
} | [
{
"doc_id": 501721,
"role": "source_file",
"code_span": [
1477,
1956
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 245237,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 858054,
"role": "other_implementation",
"url": "https://whosnailaspnetcoredocs.readthedocs.io/ko/latest/fundamentals/localization.html",
"host": "whosnailaspnetcoredocs.readthedoc... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 10 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-tensorflow-673690-2694 | code | I need a Java function for android asset loading code that maps a file from an asset manager into a read‑only memory buffer. Write it the way TensorFlow code is written, in its style. | ```java
/**
* Loads an uncompressed asset into a read-only memory-mapped buffer.
*
* @param assetManager the asset manager used to access the file
* @param filePath the path to the file relative to the assets directory
* @return the memory-mapped file buffer
* @throws IOException if the asset cannot be opened or ... | I need a Java function for android asset loading code that maps a file from an asset manager into a read‑only memory buffer. Write it the way TensorFlow code is written, in its style.
```java
/**
* Loads an uncompressed asset into a read-only memory-mapped buffer.
*
* @param assetManager the asset manager used to a... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "maps a file from an asset manager into a read‑only memory buffer",
"context": "android asset loading code",
"lang": "Java",
"ubiquity": 4
} | {
"project": "TensorFlow",
"path": "lite/examples/object_detection/android/app/src/main/java/org/tensorflow/lite/examples/detection/tflite/TFLiteObjectDetectionAPIModel.java",
"function": "loadModelFile"
} | [
{
"doc_id": 673690,
"role": "source_file",
"code_span": [
2694,
3239
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 571398,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 520476,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-an-apache-software-foundation-project-668798-2405 | code | I need a Java function for a configuration editor UI panel that initializes a UI component, fills it from a data model, and registers weak listeners for model changes. Write it the way an Apache Software Foundation project code is written, in its style. | ```java
/**
* Creates a configuration panel and synchronizes its selection with the model.
* This method must be called on the Swing event dispatch thread.
*
* @param model the model containing the configuration selection
* @return the initialized configuration panel
* @throws NullPointerException if {@code model... | I need a Java function for a configuration editor UI panel that initializes a UI component, fills it from a data model, and registers weak listeners for model changes. Write it the way an Apache Software Foundation project code is written, in its style.
```java
/**
* Creates a configuration panel and synchronizes its... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "initializes a UI component, fills it from a data model, and registers weak listeners for model changes",
"context": "a configuration editor UI panel",
"lang": "Java",
"ubiquity": 4
} | {
"project": "an Apache Software Foundation project",
"path": "enterprise/websvc.customization/src/org/netbeans/modules/websvc/customization/multiview/BindingOperationPanel.java",
"function": "BindingOperationPanel"
} | [
{
"doc_id": 668798,
"role": "source_file",
"code_span": [
2405,
3434
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 129622,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 582729,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 183928,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 7 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-chromium-655765-9384 | code | I need a JavaScript function for a thumbnail grid selection UI that updates a visual marker to highlight the newly selected item and removes it from the previously selected one. Write it the way Chromium code is written, in its style. | ```javascript
/**
* Moves the selection highlight from the previous thumbnail to the selected one.
* @param {?HTMLElement} previousThumbnail The previously selected thumbnail.
* @param {!HTMLElement} selectedThumbnail The newly selected thumbnail.
*/
function updateSelectedThumbnail(previousThumbnail, selectedThumb... | I need a JavaScript function for a thumbnail grid selection UI that updates a visual marker to highlight the newly selected item and removes it from the previously selected one. Write it the way Chromium code is written, in its style.
```javascript
/**
* Moves the selection highlight from the previous thumbnail to th... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "updates a visual marker to highlight the newly selected item and removes it from the previously selected one",
"context": "a thumbnail grid selection UI",
"lang": "JavaScript",
"ubiquity": 4
} | {
"project": "Chromium",
"path": "chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js",
"function": "function"
} | [
{
"doc_id": 655765,
"role": "source_file",
"code_span": [
9384,
9854
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 928622,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 922869,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 819932,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 14 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-vmware-700386-2907 | code | I need a Java function for a configuration loader module that reads a configuration file into a key‑value properties object, validating its existence and readability. Write it the way VMware code is written, in its style. | ```java
/**
* Loads properties from the specified configuration file.
*
* @param configFile path to the configuration file
* @return properties loaded from the configuration file
* @throws IllegalArgumentException if the path is null
* @throws java.io.IOException if the file does not exist, is not a readable
* ... | I need a Java function for a configuration loader module that reads a configuration file into a key‑value properties object, validating its existence and readability. Write it the way VMware code is written, in its style.
```java
/**
* Loads properties from the specified configuration file.
*
* @param configFile pa... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "reads a configuration file into a key‑value properties object, validating its existence and readability",
"context": "a configuration loader module",
"lang": "Java",
"ubiquity": 4
} | {
"project": "VMware",
"path": "tungsten-replicator/replicator/src/java/com/continuent/tungsten/replicator/loader/LoaderCtrl.java",
"function": "readConfig"
} | [
{
"doc_id": 700386,
"role": "source_file",
"code_span": [
2907,
3745
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 296553,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00012-of-00055.jsonl.gz:105892",
"host": "git-commits-cleaned"
},
{
"doc_id": 42482,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00043-of-00055.jsonl.gz... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 6 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-oracle-774376-7923 | code | I need a Java function for a language runtime or source‑code analysis component that creates a concise textual summary of a source location, including file name, line range and character range. Write it the way Oracle code is written, in its style. | ```java
/**
* Returns a concise description of the given source section.
* Line numbers are one-based; character offsets are zero-based, with an
* exclusive end offset.
*
* @param section the source section to describe
* @return the file name, line range, and character range, or {@code "<unknown>"}
* if ... | I need a Java function for a language runtime or source‑code analysis component that creates a concise textual summary of a source location, including file name, line range and character range. Write it the way Oracle code is written, in its style.
```java
/**
* Returns a concise description of the given source secti... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "creates a concise textual summary of a source location, including file name, line range and character range",
"context": "a language runtime or source‑code analysis component",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Oracle",
"path": "src/main/java/com/realitysink/cover/CoverProfiler.java",
"function": "getShortDescription"
} | [
{
"doc_id": 774376,
"role": "source_file",
"code_span": [
7923,
8933
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 210690,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 995513,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 734226,
"role": "other_implementation",
"url": null,
"host": "github.c... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-red-hat-773135-4486 | code | I need a Java function for an archive indexing utility that recursively scans an archive, indexing all class files and nested jar archives with a given indexer. Write it the way Red Hat code is written, in its style. | ```java
/**
* Recursively indexes class files in an archive and its nested JAR archives.
* Directory entries and other resources are ignored.
*
* @param archive the archive input stream; this method does not close it
* @param indexer the Jandex indexer to receive the class files
* @throws IOException if an archiv... | I need a Java function for an archive indexing utility that recursively scans an archive, indexing all class files and nested jar archives with a given indexer. Write it the way Red Hat code is written, in its style.
```java
/**
* Recursively indexes class files in an archive and its nested JAR archives.
* Directory... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "recursively scans an archive, indexing all class files and nested jar archives with a given indexer",
"context": "an archive indexing utility",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Red Hat",
"path": "implementation/src/main/java/io/smallrye/asyncapi/api/util/ArchiveUtil.java",
"function": "indexArchive"
} | [
{
"doc_id": 773135,
"role": "source_file",
"code_span": [
4486,
5979
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 639509,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00004-of-00055.jsonl.gz:9471",
"host": "git-commits-cleaned"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-google-839198-10537 | code | I need a Java function for an Android activity’s runtime permission handling code that checks whether fine location permission is granted and, if not, requests it from the user. Write it the way Google code is written, in its style. | ```java
/**
* Requests location permissions if fine location access has not been granted.
*
* <p>Requests coarse location alongside fine location as required on Android 12 and later.
*/
private void requestFineLocationPermission() {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCAT... | I need a Java function for an Android activity’s runtime permission handling code that checks whether fine location permission is granted and, if not, requests it from the user. Write it the way Google code is written, in its style.
```java
/**
* Requests location permissions if fine location access has not been gran... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "checks whether fine location permission is granted and, if not, requests it from the user",
"context": "an Android activity’s runtime permission handling code",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Google",
"path": "basic-awareness-sample/app/src/main/java/com/google/android/example/basicawarenesssample/MainActivity.java",
"function": "checkAndRequestWeatherPermissions"
} | [
{
"doc_id": 839198,
"role": "source_file",
"code_span": [
10537,
11365
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 743207,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 560510,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-799146-11164 | code | I need a C function for a graphics driver subsystem that releases reference-counted resources stored in a state object without freeing the object itself. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* __drm_atomic_helper_connector_destroy_state - release connector state resources
* @state: connector state to release resources from
*
* Releases references held by @state without freeing the state object itself.
* Drivers can use this helper when destroying a subclassed connector state.
*/
void __drm_a... | I need a C function for a graphics driver subsystem that releases reference-counted resources stored in a state object without freeing the object itself. Write it the way the Linux kernel code is written, in its style.
```c
/**
* __drm_atomic_helper_connector_destroy_state - release connector state resources
* @stat... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "releases reference-counted resources stored in a state object without freeing the object itself",
"context": "a graphics driver subsystem",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "openeuler-kernel/drivers/gpu/drm/drm_atomic_state_helper.c",
"function": "__drm_atomic_helper_plane_destroy_state"
} | [
{
"doc_id": 799146,
"role": "source_file",
"code_span": [
11164,
11452
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 677518,
"role": "other_implementation",
"url": "http://pinterface.livejournal.com/40934.html",
"host": "pinterface.livejournal.com"
},
{
"doc_id": 826438,
"role": "other_implementation",
"url": "http://badecho.com/2012/09/minding-your-rcws-and-reference-counts/",
"hos... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 8 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-873862-3266 | code | I need a C function for filesystem mount handling code that joins a base directory and a subpath with a '/' separator, allocating a new string. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* join_path - allocate a path joining a base directory and a subpath
* @base: NUL-terminated base directory
* @subpath: NUL-terminated subpath
*
* Inserts a '/' between @base and @subpath without normalizing slashes.
* The caller must free the returned string with kfree().
*
* Context: Process context.... | I need a C function for filesystem mount handling code that joins a base directory and a subpath with a '/' separator, allocating a new string. Write it the way the Linux kernel code is written, in its style.
```c
/**
* join_path - allocate a path joining a base directory and a subpath
* @base: NUL-terminated base d... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "joins a base directory and a subpath with a '/' separator, allocating a new string",
"context": "filesystem mount handling code",
"lang": "C",
"ubiquity": 5
} | {
"project": "the Linux kernel",
"path": "inception.c",
"function": "join_mount_path"
} | [
{
"doc_id": 873862,
"role": "source_file",
"code_span": [
3266,
3459
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 455817,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00017-of-00055.jsonl.gz:85982",
"host": "git-commits-cleaned"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-oracle-878625-8748 | code | I need a TypeScript function for a date utility module that formats a Date object into an RFC3339‑compliant UTC timestamp string. Write it the way Oracle code is written, in its style. | ```typescript
/**
* Formats the specified date as an RFC 3339 timestamp in UTC.
*
* @param date The date to format.
* @returns A timestamp in the form {@code YYYY-MM-DDTHH:mm:ss.sssZ}.
* @throws RangeError if the date is invalid or its UTC year is outside
* the range 0000 through 9999.
*/
export function... | I need a TypeScript function for a date utility module that formats a Date object into an RFC3339‑compliant UTC timestamp string. Write it the way Oracle code is written, in its style.
```typescript
/**
* Formats the specified date as an RFC 3339 timestamp in UTC.
*
* @param date The date to format.
* @returns A t... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "formats a Date object into an RFC3339‑compliant UTC timestamp string",
"context": "a date utility module",
"lang": "TypeScript",
"ubiquity": 4
} | {
"project": "Oracle",
"path": "lib/common/lib/helper.ts",
"function": "formatDateToRFC3339"
} | [
{
"doc_id": 878625,
"role": "source_file",
"code_span": [
8748,
9097
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 569973,
"role": "other_implementation",
"url": "http://sharepoint.stackexchange.com/questions/46586/rest-service-filter-date-column/46728",
"host": "sharepoint.stackexchange.com"
},
{
"doc_id": 531423,
"role": "other_implementation",
"url": "starcoder://git-commits-cleane... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-android-open-source-project-903969-1422 | code | I need a C function for a device tree image processing utility that compares two records and orders them by a primary numeric field, falling back to a secondary numeric field. Write it the way the Android Open Source Project code is written, in its style. | ```c
/*
* Compare device tree table entries by ID, then by revision.
* Return a negative value, zero, or a positive value for qsort().
*/
static int compare_dt_entries(const void *a, const void *b) {
const struct dt_table_entry *entry_a = a; | I need a C function for a device tree image processing utility that compares two records and orders them by a primary numeric field, falling back to a secondary numeric field. Write it the way the Android Open Source Project code is written, in its style.
```c
/*
* Compare device tree table entries by ID, then by rev... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "compares two records and orders them by a primary numeric field, falling back to a secondary numeric field",
"context": "a device tree image processing utility",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Android Open Source Project",
"path": "dtbhtool/dtbimg.c",
"function": "dt_entry_cmp"
} | [
{
"doc_id": 903969,
"role": "source_file",
"code_span": [
1422,
1672
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 260898,
"role": "other_implementation",
"url": "http://www.pmwiki.org/wiki/PmWiki/CustomPagelistSortOrder",
"host": "pmwiki.org"
},
{
"doc_id": 602634,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 510395,
"role": "other_... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-apple-910273-2408 | code | I need a C function for a database driver that maps a low-level database error code to a generic operation result category. Write it the way Apple code is written, in its style. | ```c
/*!
* @function DatabaseOperationResultForErrorCode
* @abstract Maps a SQLite result code to a generic errno-style operation result.
* @param errorCode A primary or extended SQLite result code.
* @result Zero for success; otherwise, an errno value describing the failure.
* @discussion Requires <sqlite3.h> and... | I need a C function for a database driver that maps a low-level database error code to a generic operation result category. Write it the way Apple code is written, in its style.
```c
/*!
* @function DatabaseOperationResultForErrorCode
* @abstract Maps a SQLite result code to a generic errno-style operation result.
... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "maps a low-level database error code to a generic operation result category",
"context": "a database driver",
"lang": "C",
"ubiquity": 4
} | {
"project": "Apple",
"path": "Scripts/freeradius-server-3.0.11/src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c",
"function": "sql_error_to_rcode"
} | [
{
"doc_id": 910273,
"role": "source_file",
"code_span": [
2408,
3064
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 194977,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00008-of-00055.jsonl.gz:65700",
"host": "git-commits-cleaned"
},
{
"doc_id": 30449,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00038-of-00055.jsonl.gz:... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 5 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-oracle-878625-3245 | code | I need a TypeScript function for a Node.js backend utility library that reads all data from a readable stream into a UTF-8 string while enforcing a maximum size limit. Write it the way Oracle code is written, in its style. | ```typescript
/**
* Reads a readable stream into a UTF-8 string.
*
* @param stream - The readable stream to consume.
* @param maxBytes - The maximum permitted size, in bytes.
* @returns A promise that resolves to the decoded string.
* @throws {RangeError} If maxBytes is not a nonnegative safe integer or
* ... | I need a TypeScript function for a Node.js backend utility library that reads all data from a readable stream into a UTF-8 string while enforcing a maximum size limit. Write it the way Oracle code is written, in its style.
```typescript
/**
* Reads a readable stream into a UTF-8 string.
*
* @param stream - The read... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "reads all data from a readable stream into a UTF-8 string while enforcing a maximum size limit",
"context": "a Node.js backend utility library",
"lang": "TypeScript",
"ubiquity": 4
} | {
"project": "Oracle",
"path": "lib/common/lib/helper.ts",
"function": "readStringFromReadable"
} | [
{
"doc_id": 878625,
"role": "source_file",
"code_span": [
3245,
4056
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 683011,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-apple-910273-3512 | code | I need a C function for a database driver that checks a database connection and operation return code for errors and maps them to generic result categories. Write it the way Apple code is written, in its style. | ```c
/*!
* @function DatabaseResultFromSQLite
* @abstract Maps a SQLite operation result to a generic errno-style result.
* @param connection The database connection used for the operation.
* @param resultCode The primary or extended result code returned by SQLite.
* @result Zero on success; otherwise an errno val... | I need a C function for a database driver that checks a database connection and operation return code for errors and maps them to generic result categories. Write it the way Apple code is written, in its style.
```c
/*!
* @function DatabaseResultFromSQLite
* @abstract Maps a SQLite operation result to a generic errn... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "checks a database connection and operation return code for errors and maps them to generic result categories",
"context": "a database driver",
"lang": "C",
"ubiquity": 4
} | {
"project": "Apple",
"path": "Scripts/freeradius-server-3.0.11/src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c",
"function": "sql_check_error"
} | [
{
"doc_id": 910273,
"role": "source_file",
"code_span": [
3512,
4074
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 30449,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00038-of-00055.jsonl.gz:45264",
"host": "git-commits-cleaned"
},
{
"doc_id": 738975,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00035-of-00055.jsonl.gz:... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-924542-506 | code | I need a C function for filesystem directory handling code that searches a sorted list of entry offsets with binary search, returning the matching index or the insertion position. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* dir_entry_search - find an entry offset or its insertion position
* @offsets: array of entry offsets sorted in ascending order
* @nr_entries: number of offsets in the array
* @offset: entry offset to find
*
* Return: Index of the first matching offset, or the position at which
* @offset should be inse... | I need a C function for filesystem directory handling code that searches a sorted list of entry offsets with binary search, returning the matching index or the insertion position. Write it the way the Linux kernel code is written, in its style.
```c
/**
* dir_entry_search - find an entry offset or its insertion posit... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "searches a sorted list of entry offsets with binary search, returning the matching index or the insertion position",
"context": "filesystem directory handling code",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "release/src/linux/linux/fs/reiserfs/namei.c",
"function": "bin_search_in_dir_item"
} | [
{
"doc_id": 924542,
"role": "source_file",
"code_span": [
506,
1156
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 335287,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00049-of-00055.jsonl.gz:70569",
"host": "git-commits-cleaned"
},
{
"doc_id": 229789,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 710084,
... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 6 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-oracle-922764-2614 | code | I need a Java function for a machine learning evaluation module that computes classification accuracy from a confusion matrix using micro or macro averaging. Write it the way Oracle code is written, in its style. | ```java
/**
* Returns the classification accuracy using micro or macro averaging.
* Rows represent actual classes; columns represent predicted classes.
*
* <p>Micro averaging divides the total number of correct predictions by
* the total number of predictions. Macro averaging computes the mean
* per-class recall ... | I need a Java function for a machine learning evaluation module that computes classification accuracy from a confusion matrix using micro or macro averaging. Write it the way Oracle code is written, in its style.
```java
/**
* Returns the classification accuracy using micro or macro averaging.
* Rows represent actua... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "computes classification accuracy from a confusion matrix using micro or macro averaging",
"context": "a machine learning evaluation module",
"lang": "Java",
"ubiquity": 4
} | {
"project": "Oracle",
"path": "Classification/Core/src/main/java/org/tribuo/classification/evaluation/ConfusionMetrics.java",
"function": "accuracy"
} | [
{
"doc_id": 922764,
"role": "source_file",
"code_span": [
2614,
3430
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 979514,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 228042,
"role": "other_implementation",
"url": "starcoder://jupyter-structured-clean-dedup/train-00003-of-00006.jsonl.gz:19837",
"host": "jupyter-structured-clean-dedup"
},
{
... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-924542-1581 | code | I need a C function for a filesystem's directory entry handling module that calculates and stores the name pointer and its length for a directory entry from its stored record data. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* ext4_dirent_get_name - extract a name from a directory entry
* @de: validated on-disk directory entry
* @name: receives a pointer to the name within @de
* @len: receives the name length in bytes
*
* The name is not necessarily NUL-terminated. The returned pointer remains
* valid only while the storage... | I need a C function for a filesystem's directory entry handling module that calculates and stores the name pointer and its length for a directory entry from its stored record data. Write it the way the Linux kernel code is written, in its style.
```c
/**
* ext4_dirent_get_name - extract a name from a directory entry
... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "calculates and stores the name pointer and its length for a directory entry from its stored record data",
"context": "a filesystem's directory entry handling module",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "release/src/linux/linux/fs/reiserfs/namei.c",
"function": "set_de_name_and_namelen"
} | [
{
"doc_id": 924542,
"role": "source_file",
"code_span": [
1581,
2095
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 597234,
"role": "other_implementation",
"url": null,
"host": "gist.github.com"
},
{
"doc_id": 380747,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 438940,
"role": "other_implementation",
"url": null,
"host": "git... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-873862-2590 | code | I need a C function for a privileged system service that later runs as an unprivileged user that drops elevated privileges by resetting group, clearing supplementary groups, and setting uid to a non‑root user. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* drop_privileges - permanently switch to an unprivileged identity
* @uid: nonzero target user ID
* @gid: target primary group ID
*
* Call before creating threads. Resets real, effective, and saved IDs,
* clears supplementary groups, and terminates the process on failure.
*/
static void drop_privileges(... | I need a C function for a privileged system service that later runs as an unprivileged user that drops elevated privileges by resetting group, clearing supplementary groups, and setting uid to a non‑root user. Write it the way the Linux kernel code is written, in its style.
```c
/**
* drop_privileges - permanently sw... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "drops elevated privileges by resetting group, clearing supplementary groups, and setting uid to a non‑root user",
"context": "a privileged system service that later runs as an unprivileged user",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "inception.c",
"function": "drop_permissions"
} | [
{
"doc_id": 873862,
"role": "source_file",
"code_span": [
2590,
3167
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 61720,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00054-of-00055.jsonl.gz:118622",
"host": "git-commits-cleaned"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-linux-kernel-933513-3578 | code | I need a C function for a graphics accelerator driver that submits accumulated command and buffer lists to the kernel via an ioctl and clears the local counters. Write it the way the Linux kernel code is written, in its style. | ```c
/**
* accel_submit - submit pending commands and buffers to the kernel
* @ctx: accelerator context containing the pending lists
*
* Clear the local counters after a successful submission. Preserve the
* pending lists on failure so the caller can retry.
*
* Return: 0 on success, or a negative errno on failur... | I need a C function for a graphics accelerator driver that submits accumulated command and buffer lists to the kernel via an ioctl and clears the local counters. Write it the way the Linux kernel code is written, in its style.
```c
/**
* accel_submit - submit pending commands and buffers to the kernel
* @ctx: accele... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "submits accumulated command and buffer lists to the kernel via an ioctl and clears the local counters",
"context": "a graphics accelerator driver",
"lang": "C",
"ubiquity": 4
} | {
"project": "the Linux kernel",
"path": "src/exynos_fimg2d.c",
"function": "g2d_flush"
} | [
{
"doc_id": 933513,
"role": "source_file",
"code_span": [
3578,
4424
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 69606,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00042-of-00055.jsonl.gz:52157",
"host": "git-commits-cleaned"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-go-project-925149-10315 | code | I need a Go function for a cryptographic authentication algorithm implementation that processes input data in fixed-size blocks, updating a state and zero‑padding any remaining partial block. Write it the way the Go project code is written, in its style. | ```go
// processBlocks calls update for each blockSize-byte block in data.
// If the final block is partial, processBlocks pads it with zeros.
// The update function is responsible for updating the authentication state.
// processBlocks panics if blockSize is not positive.
func processBlocks(data []byte, blockSize int,... | I need a Go function for a cryptographic authentication algorithm implementation that processes input data in fixed-size blocks, updating a state and zero‑padding any remaining partial block. Write it the way the Go project code is written, in its style.
```go
// processBlocks calls update for each blockSize-byte bloc... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "processes input data in fixed-size blocks, updating a state and zero‑padding any remaining partial block",
"context": "a cryptographic authentication algorithm implementation",
"lang": "Go",
"ubiquity": 4
} | {
"project": "the Go project",
"path": "gcm.go",
"function": "func"
} | [
{
"doc_id": 925149,
"role": "source_file",
"code_span": [
10315,
10599
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 790390,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 935692,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 2 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-an-apache-software-foundation-project-940121-2197 | code | I need a Java function for a logging UI component that returns a cached link object identified by an error message, file path and line number, creating it if absent. Write it the way an Apache Software Foundation project code is written, in its style. | ```java
/**
* Returns the cached link for the specified error location, creating it if absent.
*
* @param errorMessage the error message
* @param filePath the path to the source file
* @param lineNumber the line number in the source file
* @return the cached or newly created link
*/
private synchronized Link get... | I need a Java function for a logging UI component that returns a cached link object identified by an error message, file path and line number, creating it if absent. Write it the way an Apache Software Foundation project code is written, in its style.
```java
/**
* Returns the cached link for the specified error loca... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "returns a cached link object identified by an error message, file path and line number, creating it if absent",
"context": "a logging UI component",
"lang": "Java",
"ubiquity": 4
} | {
"project": "an Apache Software Foundation project",
"path": "enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/LogSupport.java",
"function": "getLink"
} | [
{
"doc_id": 940121,
"role": "source_file",
"code_span": [
2197,
2511
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 714380,
"role": "other_implementation",
"url": null,
"host": "github.com"
}
] | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 1 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-the-android-open-source-project-945302-4594 | code | I need a Java function for an in-memory LRU cache that removes the least-recently-used entries from a cache until its total size is at or below a given limit. Write it the way the Android Open Source Project code is written, in its style. | ```java
/**
* Remove the eldest entries until the total of remaining entries is at or
* below the requested size.
*
* @param maxSize the maximum size of the cache before returning. May be -1
* to evict even 0-sized elements.
*/
public void trimToSize(int maxSize) {
while (true) { | I need a Java function for an in-memory LRU cache that removes the least-recently-used entries from a cache until its total size is at or below a given limit. Write it the way the Android Open Source Project code is written, in its style.
```java
/**
* Remove the eldest entries until the total of remaining entries is... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "removes the least-recently-used entries from a cache until its total size is at or below a given limit",
"context": "an in-memory LRU cache",
"lang": "Java",
"ubiquity": 4
} | {
"project": "the Android Open Source Project",
"path": "imagepicker/src/main/java/net/mikaelzero/mojito/view/sketch/core/util/LruCache.java",
"function": "trimToSize"
} | [
{
"doc_id": 945302,
"role": "source_file",
"code_span": [
4594,
5424
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 312047,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 538138,
"role": "other_implementation",
"url": "starcoder://git-commits-cleaned/train-00007-of-00055.jsonl.gz:60853",
"host": "git-commits-cleaned"
},
{
"doc_id": 212535,
... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 3 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
code-u-boot-999078-5701 | code | I need a C function for a low-level hardware driver that polls a memory-mapped register until a given bit is set or a timeout occurs. Write it the way U-Boot code is written, in its style. | ```c
/**
* wait_for_reg_bit() - Poll a register until a bit is set or timeout expires
* @reg: Memory-mapped register address, accessed using readl()
* @mask: Mask of the bit to wait for
* @timeout_ms: Timeout in milliseconds; zero checks the register once
*
* Return: 0 if the bit is set, or -ETIMEDOUT on timeout.... | I need a C function for a low-level hardware driver that polls a memory-mapped register until a given bit is set or a timeout occurs. Write it the way U-Boot code is written, in its style.
```c
/**
* wait_for_reg_bit() - Poll a register until a bit is set or timeout expires
* @reg: Memory-mapped register address, ac... | {
"temperature": 0.7,
"seeds": [
0,
1
],
"max_new_tokens": 220,
"stop": []
} | {
"behaviour": "polls a memory-mapped register until a given bit is set or a timeout occurs",
"context": "a low-level hardware driver",
"lang": "C",
"ubiquity": 4
} | {
"project": "U-Boot",
"path": "pow_accel_soc/software/u-boot-socfpga/drivers/i2c/u8500_i2c.c",
"function": "loop_till_bit_set"
} | [
{
"doc_id": 999078,
"role": "source_file",
"code_span": [
5701,
5975
],
"url": null,
"host": "github.com"
}
] | [
{
"doc_id": 819547,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 961896,
"role": "other_implementation",
"url": null,
"host": "github.com"
},
{
"doc_id": 905326,
"role": "other_implementation",
"url": "starcoder://git-commits-cl... | [] | {
"tool": "codex-cli 0.164.0",
"model": "gpt-6-astra",
"reasoning_effort": "low",
"web_search": "disabled",
"asked": "the instruction, then: \"Answer with the function's code only, in one code block, with its documentation comment. No explanation.\"",
"kept": "a code fence, then Codex's code through the sig... | 4 | {
"dataset": "zitaos/online-source-inversion-data",
"documents": "the 1M index documents (u1m, pool == index)"
} |
Provenance Prompts with Hard Negatives
Prompts for OLMo-2 7B whose source in its pretraining data is known. Each record is a complete prompt, the pretraining document(s) the model's continuation should be traced to (gold), and documents on the same subject from a different source (hard negatives). It is a test set for source inversion or training-data attribution: given what the model wrote, find the pretraining document it draws on.
Document ids refer to the 1M index documents of
zitaos/online-source-inversion-data, a uniform
random sample of OLMo-Mix-1124. No document text is included here; read it from that dataset by doc_id.
Why hard negatives
A prompt says what to write about ("a review of Capturing the Friedmans", "Pascal's identity", "a lock manager that acquires a read or write lock"). A method can find a document on that subject from the prompt alone, without tracing anything the model wrote. Hard negatives separate the two: each is a document on the same work, result or behaviour that is not the source, such as another outlet's review of the same film, another site's complete proof of the same result, or another codebase's function with the same behaviour. A method that ranks a hard negative above every gold document has found the subject, not the source.
| Config | Records | Gold documents | Hard negatives | Records with ≥ 1 hard negative | Hard negatives per record (median, max) |
|---|---|---|---|---|---|
reviews |
132 | 145 | 46 | 22 | 0, 7 |
code |
139 | 139 | 518 | 139 | 3, 14 |
proofs |
44 | 44 | 121 | 44 | 2, 8 |
In proofs, every record has another complete proof of the same result as a hard negative, and 19 of the 44
records swap the two roles: the request names the other page's kind of site, that page is the gold, and the first
record's page is a hard negative (swapped_from links the pair). A method that always returns the same page for a
result scores well on one record of a pair and badly on the other.
In reviews, hard negatives exist only where another outlet reviewed the same work: 22 of 132 records.
Filter on n_hard_negatives > 0 to keep those.
The three configs
reviews: a review of a film, book, album, series, … "as it would appear in" a named outlet (The New Yorker,
The New York Times, The Wall Street Journal, The Atlantic, …), continuing an opening of the review. Gold: the
outlet's review page(s) of the work, other pages of the outlet about it, and verbatim copies of the review elsewhere.
Hard negatives: other outlets' pages about the same work. Mentions: pages of the outlet that only mention the work
(neither gold nor negative).
code: a function described by its behaviour, "written the way code is written" (the Linux kernel,
Chromium, an Apache project, …), continuing the function's signature and first line. Gold: the project's file holding
the function, with the function's character span. Hard negatives: other documents implementing the same behaviour.
proofs: the proof of a named result "as it would appear on" a kind of site (a Q&A forum, an online
encyclopedia, a university course page, a math blog, …), continuing an opening of the proof. Gold: a web page with a
complete proof of the result. Hard negatives: other sites' complete proofs (verdict: full) or sketches of it.
Fields
| Field | Meaning |
|---|---|
id |
unique id |
family |
review, code or site_proof |
instruction |
the request, as a person would write it |
opening |
the start of the answer, which the model continues |
prompt |
the complete prompt: instruction, a blank line, opening |
generation |
the decoding: temperature, seeds, max_new_tokens, stop ([]: none) |
subject |
what the prompt is about (reviews: type, title, year, creator; code: behaviour, context, lang, ubiquity; proofs: name, statement) |
target |
the source the prompt names or implies (reviews: outlet, domain; code: project, path, function; proofs: site, kind, domain) |
gold |
the correct sources: {doc_id, url, host, role, …} |
hard_negatives |
same subject, wrong source: {doc_id, url, host, role, …} |
n_hard_negatives |
the number of hard negatives |
mentions |
reviews: pages of the target outlet that only mention the work |
opening_by |
how opening was written |
swapped_from |
proofs: the id of the record whose gold and hard negative this one exchanges, else null |
corpus |
the dataset the doc ids refer to |
Roles: other_implementation, other_outlet_page, other_site_proof, proof_page, reviewed_page, same_outlet_page, source_file. Some entries have url: null; use doc_id to find them in the corpus dataset.
Usage
from datasets import load_dataset
proofs = load_dataset("<this repo>", "proofs", split="train")
record = proofs[0]
print(record["prompt"])
gold = {g["doc_id"] for g in record["gold"]}
negatives = {n["doc_id"] for n in record["hard_negatives"]}
Continue prompt with the model and the generation settings, attribute the continuation (for example each
sentence) to documents of the corpus, and score each ranking against gold and hard_negatives:
- accuracy (top-1, top-10, MRR): the rank of the first gold document;
- hard-negative rate: how often a hard negative ranks above every gold document.
Report both: high accuracy with a high hard-negative rate means a method finds the subject rather than the source.
License
The records are released under ODC-By 1.0. The documents they point to are in
zitaos/online-source-inversion-data, under ODC-By and subject to their original sources' terms.
- Downloads last month
- 55