diff --git "a/data/test.jsonl" "b/data/test.jsonl" new file mode 100644 --- /dev/null +++ "b/data/test.jsonl" @@ -0,0 +1,500 @@ +{"repo": "ClickHouse/ClickHouse", "buggy_commit": "4ce893869dd3ef1fdf90b0129da95e620bf4999d", "bug_issue": 129940, "solve_pr": 130328, "call_graph": {"nodes": [{"id": "src/WindowFunctions/Aggregate/AggregateState.cpp::DB::AggregateState::AggregateState"}, {"id": "src/WindowFunctions/Aggregate/AggregateState.cpp::DB::AggregateState::add"}], "edges": []}, "graph_spec": "`AggregateState` initializes the state for an aggregate function used by window-function processing. Its `add` method supplies a range of window arguments to that aggregate state, connecting window rows with the aggregate function’s accumulated result."} +{"repo": "ClickHouse/ClickHouse", "buggy_commit": "733e3e5d4830133e40bb1fa6693eeab7e66a888e", "bug_issue": 129967, "solve_pr": 129978, "call_graph": {"nodes": [{"id": "src/Storages/ObjectStorage/DataLakes/HudiMetadata.cpp::DB::HudiMetadata::getDataFilesImpl"}, {"id": "src/Storages/ObjectStorage/DataLakes/HudiMetadata.cpp::HudiMetadata::getDataFiles"}, {"id": "src/Storages/ObjectStorage/DataLakes/HudiMetadata.cpp::HudiMetadata::iterate"}], "edges": [{"source": "src/Storages/ObjectStorage/DataLakes/HudiMetadata.cpp::HudiMetadata::getDataFiles", "target": "src/Storages/ObjectStorage/DataLakes/HudiMetadata.cpp::DB::HudiMetadata::getDataFilesImpl"}, {"source": "src/Storages/ObjectStorage/DataLakes/HudiMetadata.cpp::HudiMetadata::iterate", "target": "src/Storages/ObjectStorage/DataLakes/HudiMetadata.cpp::HudiMetadata::getDataFiles"}]}, "graph_spec": "These functions support ClickHouse’s read-only access to Apache Hudi tables, whose data resides in files in object storage. `HudiMetadata::getDataFilesImpl` and `HudiMetadata::getDataFiles` provide the table’s data-file paths, while `HudiMetadata::iterate` exposes those files through the data-lake interface’s object iterator for reading."} +{"repo": "ClickHouse/ClickHouse", "buggy_commit": "ad9d84dc7abb316ffa551e39d063b1a7edad2afd", "bug_issue": 130000, "solve_pr": 130080, "call_graph": {"nodes": [{"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::DB::Parquet::SchemaConverter::processSubtreeArrayOuter"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::DB::Parquet::SchemaConverter::processSubtreeMap"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeTuple"}], "edges": [{"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::DB::Parquet::SchemaConverter::processSubtreeArrayOuter"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::DB::Parquet::SchemaConverter::processSubtreeMap"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeTuple"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeTuple", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree"}]}, "graph_spec": "These functions convert Parquet schema subtrees into ClickHouse schema information and decoding metadata for schema inference and reading. Within this scope, `processSubtree` coordinates subtree conversion, while `processSubtreeArrayOuter`, `processSubtreeMap`, and `processSubtreeTuple` cover nested collections, key-value associations, and structured groups of typed fields represented by ClickHouse `Array`, `Map`, and `Tuple` types."} +{"repo": "ClickHouse/ClickHouse", "buggy_commit": "46ab3dad27eb8b9367cf81fef4570b4bb230709f", "bug_issue": 130020, "solve_pr": 130102, "call_graph": {"nodes": [{"id": "src/Processors/Formats/Impl/Parquet/ReadManager.cpp::ReadManager::init"}, {"id": "src/Processors/Formats/Impl/Parquet/Reader.cpp::Reader::prefilterAndInitRowGroups"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::DB::Parquet::SchemaConverter::processSubtreeMap"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::prepareForReading"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeArrayInner"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeArrayOuter"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeDynamic"}, {"id": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeTuple"}], "edges": [{"source": "src/Processors/Formats/Impl/Parquet/ReadManager.cpp::ReadManager::init", "target": "src/Processors/Formats/Impl/Parquet/Reader.cpp::Reader::prefilterAndInitRowGroups"}, {"source": "src/Processors/Formats/Impl/Parquet/Reader.cpp::Reader::prefilterAndInitRowGroups", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::prepareForReading"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::prepareForReading", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::DB::Parquet::SchemaConverter::processSubtreeMap"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeArrayInner"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeArrayOuter"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeDynamic"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeTuple"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeArrayInner", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeArrayOuter", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeDynamic", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree"}, {"source": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtreeTuple", "target": "src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp::SchemaConverter::processSubtree"}]}, "graph_spec": "These functions prepare ClickHouse to read Parquet, a columnar storage format, by initializing read management, preparing and prefiltering row groups, and translating file schema information into ClickHouse column types and decoding information. The schema-conversion functions interpret nested schema elements representing collections, structured records, and variant data in terms of ClickHouse `Array`, `Map`, `Tuple`, and `Dynamic` types."} +{"repo": "ClickHouse/ClickHouse", "buggy_commit": "46ab3dad27eb8b9367cf81fef4570b4bb230709f", "bug_issue": 130032, "solve_pr": 130140, "call_graph": {"nodes": [{"id": "src/Processors/Formats/Impl/AvroRowInputFormat.cpp::DB::AvroRowInputFormat::readPrefix"}, {"id": "src/Processors/Formats/Impl/NativeORCBlockInputFormat.cpp::DB::NativeORCBlockInputFormat::read"}, {"id": "src/Processors/Formats/Impl/ORC/Reader.cpp::DB::ORC::Reader::readTail"}, {"id": "src/Processors/Formats/Impl/ORC/Reader.cpp::DB::ORC::RowReader::next"}, {"id": "src/Processors/Formats/Impl/ORC/Reader.cpp::Reader::Reader"}, {"id": "src/Storages/ObjectStorage/StorageObjectStorageSource.cpp::DB::getMaterializedRowLineageColumns"}, {"id": "src/Storages/ObjectStorage/StorageObjectStorageSource.cpp::StorageObjectStorageSource::createReader"}, {"id": "src/Storages/ObjectStorage/StorageObjectStorageSource.cpp::StorageObjectStorageSource::generate"}, {"id": "src/Storages/VirtualColumnUtils.cpp::DB::VirtualColumnUtils::addRequestedFileLikeStorageVirtualsToChunk"}], "edges": [{"source": "src/Processors/Formats/Impl/ORC/Reader.cpp::Reader::Reader", "target": "src/Processors/Formats/Impl/ORC/Reader.cpp::DB::ORC::Reader::readTail"}, {"source": "src/Storages/ObjectStorage/StorageObjectStorageSource.cpp::StorageObjectStorageSource::createReader", "target": "src/Storages/ObjectStorage/StorageObjectStorageSource.cpp::DB::getMaterializedRowLineageColumns"}, {"source": "src/Storages/ObjectStorage/StorageObjectStorageSource.cpp::StorageObjectStorageSource::generate", "target": "src/Storages/ObjectStorage/StorageObjectStorageSource.cpp::DB::getMaterializedRowLineageColumns"}, {"source": "src/Storages/ObjectStorage/StorageObjectStorageSource.cpp::StorageObjectStorageSource::generate", "target": "src/Storages/VirtualColumnUtils.cpp::DB::VirtualColumnUtils::addRequestedFileLikeStorageVirtualsToChunk"}]}, "graph_spec": "These functions support reading file data into ClickHouse: the `Avro` prefix reader prepares row-oriented input, while the `ORC` reader construction, tail reading, batch reading, and input-format reading cover file metadata and delivery of columnar data as batches or chunks. The object-storage functions create file readers, produce query-pipeline chunks, identify materialized row-lineage columns representing row provenance, and attach requested virtual columns that expose file metadata and row context alongside the stored data."} +{"repo": "ClickHouse/ClickHouse", "buggy_commit": "7b5f2bf328f9fd60224f1bae1d1b90e1a448140f", "bug_issue": 130040, "solve_pr": 130158, "call_graph": {"nodes": [{"id": "src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestFilesPruning.cpp::DB::Iceberg::buildPartitionKeyFromSpec"}, {"id": "src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestListPruning.cpp::DB::Iceberg::ManifestListPruner::ManifestListPruner"}], "edges": [{"source": "src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestListPruning.cpp::DB::Iceberg::ManifestListPruner::ManifestListPruner", "target": "src/Storages/ObjectStorage/DataLakes/Iceberg/ManifestFilesPruning.cpp::DB::Iceberg::buildPartitionKeyFromSpec"}]}, "graph_spec": "`buildPartitionKeyFromSpec` translates an Iceberg partition specification and schema context into a partition-key description for pruning. `ManifestListPruner::ManifestListPruner` prepares manifest-level pruning from partition specifications, schema information, and a query filter, using that partition-key description to relate the filter to partition summaries. These responsibilities support Iceberg query planning, where manifest lists summarize the partitions represented by manifest files so irrelevant files can be skipped."} +{"repo": "angular/angular", "buggy_commit": "a0702f08bd10f31781ebe45c0b8b5288ec9dc57c", "bug_issue": 71551, "solve_pr": 71552, "call_graph": {"nodes": [{"id": "packages/router/src/statemanager/navigation_state_manager.ts::NavigationStateManager::handleNavigate"}], "edges": []}, "graph_spec": "NavigationStateManager.handleNavigate receives browser Navigation API events and serves as the Angular Router’s core navigation interception point. Its role connects browser navigation with the Router’s management of application navigation and browser state."} +{"repo": "angular/angular", "buggy_commit": "37563fc32267fd0fcbdff8caf98862962e5d46b5", "bug_issue": 71596, "solve_pr": 71597, "call_graph": {"nodes": [{"id": "packages/router/src/statemanager/navigation_state_manager.ts::NavigationStateManager::handleNavigate"}], "edges": []}, "graph_spec": "NavigationStateManager.handleNavigate handles browser Navigation API NavigateEvent objects and serves as the Angular Router’s core navigation interception point. It connects browser navigation events with router-managed single-page application navigation as part of the Router’s integration with native browser navigation."} +{"repo": "angular/angular", "buggy_commit": "9e99093bfe342e79c314b57b67d819cf4a3fd3cb", "bug_issue": 71621, "solve_pr": 71753, "call_graph": {"nodes": [{"id": "packages/forms/signals/src/field/context.ts::FieldNodeContext::valueOf"}], "edges": []}, "graph_spec": "In Angular Signal Forms, FieldNodeContext.valueOf takes a schema path and returns the current value of the field it identifies. This lets reactive form rules, such as validators, depend on values from other fields in the same form."} +{"repo": "angular/angular", "buggy_commit": "8260542ce03780d158638723ccaf7f52e9708da1", "bug_issue": 71660, "solve_pr": 71661, "call_graph": {"nodes": [{"id": "packages/core/src/render3/component_ref.ts::ComponentFactory::create"}, {"id": "packages/core/src/render3/component_ref.ts::ComponentFactory::createComponentRef"}, {"id": "packages/core/src/render3/instructions/element.ts::ɵɵelement"}, {"id": "packages/core/src/render3/instructions/element.ts::ɵɵelementStart"}, {"id": "packages/core/src/render3/instructions/element_container.ts::ɵɵelementContainer"}, {"id": "packages/core/src/render3/instructions/element_container.ts::ɵɵelementContainerStart"}, {"id": "packages/core/src/render3/instructions/template.ts::declareDirectiveHostTemplate"}, {"id": "packages/core/src/render3/instructions/template.ts::ɵɵtemplate"}, {"id": "packages/core/src/render3/view/directives.ts::initializeDirectives"}, {"id": "packages/core/src/render3/view/directives.ts::initializeInputAndOutputAliases"}, {"id": "packages/core/src/render3/view/directives.ts::resolveDirectives"}, {"id": "packages/core/src/render3/view/directives.ts::setupHostDirectiveInputsOrOutputs"}, {"id": "packages/core/src/render3/view/directives.ts::setupSelectorMatchedInputsOrOutputs"}, {"id": "packages/core/src/render3/view/elements.ts::directiveHostFirstCreatePass"}], "edges": [{"source": "packages/core/src/render3/component_ref.ts::ComponentFactory::create", "target": "packages/core/src/render3/component_ref.ts::ComponentFactory::createComponentRef"}, {"source": "packages/core/src/render3/component_ref.ts::ComponentFactory::createComponentRef", "target": "packages/core/src/render3/view/elements.ts::directiveHostFirstCreatePass"}, {"source": "packages/core/src/render3/instructions/element.ts::ɵɵelement", "target": "packages/core/src/render3/instructions/element.ts::ɵɵelementStart"}, {"source": "packages/core/src/render3/instructions/element.ts::ɵɵelementStart", "target": "packages/core/src/render3/view/elements.ts::directiveHostFirstCreatePass"}, {"source": "packages/core/src/render3/instructions/element_container.ts::ɵɵelementContainer", "target": "packages/core/src/render3/instructions/element_container.ts::ɵɵelementContainerStart"}, {"source": "packages/core/src/render3/instructions/element_container.ts::ɵɵelementContainerStart", "target": "packages/core/src/render3/view/elements.ts::directiveHostFirstCreatePass"}, {"source": "packages/core/src/render3/instructions/template.ts::declareDirectiveHostTemplate", "target": "packages/core/src/render3/view/directives.ts::resolveDirectives"}, {"source": "packages/core/src/render3/instructions/template.ts::ɵɵtemplate", "target": "packages/core/src/render3/instructions/template.ts::declareDirectiveHostTemplate"}, {"source": "packages/core/src/render3/view/directives.ts::initializeDirectives", "target": "packages/core/src/render3/view/directives.ts::initializeInputAndOutputAliases"}, {"source": "packages/core/src/render3/view/directives.ts::initializeInputAndOutputAliases", "target": "packages/core/src/render3/view/directives.ts::setupHostDirectiveInputsOrOutputs"}, {"source": "packages/core/src/render3/view/directives.ts::initializeInputAndOutputAliases", "target": "packages/core/src/render3/view/directives.ts::setupSelectorMatchedInputsOrOutputs"}, {"source": "packages/core/src/render3/view/directives.ts::resolveDirectives", "target": "packages/core/src/render3/view/directives.ts::initializeDirectives"}, {"source": "packages/core/src/render3/view/elements.ts::directiveHostFirstCreatePass", "target": "packages/core/src/render3/view/directives.ts::resolveDirectives"}]}, "graph_spec": "These functions support Angular component creation and compiled template rendering by producing component references, creating elements and logical containers, and declaring embedded templates. Their directive setup responsibilities connect those hosts with matched directives and prepare directive instantiation and public input/output bindings, including aliases and bindings exposed through host directives—the composition mechanism for attaching directive behavior to a host."} +{"repo": "angular/angular", "buggy_commit": "26f22e5423a062edc89c0675372f54a1cfc1262b", "bug_issue": 71849, "solve_pr": 71862, "call_graph": {"nodes": [{"id": "packages/router/src/statemanager/state_manager.ts::HistoryStateManager::handleRouterEvent"}, {"id": "packages/router/src/statemanager/state_manager.ts::HistoryStateManager::restoreHistory"}], "edges": [{"source": "packages/router/src/statemanager/state_manager.ts::HistoryStateManager::handleRouterEvent", "target": "packages/router/src/statemanager/state_manager.ts::HistoryStateManager::restoreHistory"}]}, "graph_spec": "These methods manage the relationship between Angular Router navigation and browser history, which records visited locations. `handleRouterEvent` receives router navigation events and the current navigation context to coordinate state management, while `restoreHistory` provides rollback of the browser URL to its state before a navigation transition."} +{"repo": "ansible/ansible", "buggy_commit": "0a5cc80ce22debfe9879ab95e3d332522b3ea6ec", "bug_issue": 17587, "solve_pr": 71641, "call_graph": {"nodes": [{"id": "lib/ansible/module_utils/common/sys_info.py::get_distribution"}, {"id": "lib/ansible/module_utils/common/sys_info.py::get_distribution_version"}, {"id": "lib/ansible/module_utils/urls.py::fetch_url"}], "edges": [{"source": "lib/ansible/module_utils/urls.py::fetch_url", "target": "lib/ansible/module_utils/common/sys_info.py::get_distribution"}]}, "graph_spec": "`get_distribution` must provide a stable, display-style distribution name from the platform identifier, mapping Linux `amzn` to `Amazon` and `rhel` to `Redhat`, and yielding `OtherLinux` when Linux has no identifiable distribution while preserving the detected value otherwise. `get_distribution_version` must return the available distribution version, refining CentOS to its major.minor components and Debian to its best available version; an unavailable version is an empty string. `fetch_url` must retain its normal response-and-metadata contract for HTTP(S)/FTP requests and, when SSL support is unavailable, use the normalized distribution identity so that Red Hat systems receive guidance appropriate to their SSL package source while all other systems receive the underlying SSL error without that distribution-specific guidance; temporary-directory state must be restored on every outcome."} +{"repo": "ansible/ansible", "buggy_commit": "96905120698e3118d8bafaee5ebe8f83d2bbd607", "bug_issue": 58184, "solve_pr": 73708, "call_graph": {"nodes": [{"id": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}, {"id": "lib/ansible/plugins/strategy/free.py::StrategyModule::run"}, {"id": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run"}], "edges": [{"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}]}, "graph_spec": "These functions govern Ansible play execution, where strategy plugins coordinate tasks across managed hosts: the free and linear run methods provide independent host progress and coordinated host-batch execution, respectively, using play iteration and execution context. Both strategies share _execute_meta to execute meta tasks, which control Ansible’s internal execution or state within a playbook."} +{"repo": "ansible/ansible", "buggy_commit": "20209c508f13b018b8f44f77749001979aa5f048", "bug_issue": 64113, "solve_pr": 70624, "call_graph": {"nodes": [{"id": "lib/ansible/plugins/connection/winrm.py::Connection::_connect"}, {"id": "lib/ansible/plugins/connection/winrm.py::Connection::_kerb_auth"}, {"id": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_connect"}, {"id": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_exec"}, {"id": "lib/ansible/plugins/connection/winrm.py::Connection::fetch_file"}, {"id": "lib/ansible/plugins/connection/winrm.py::Connection::reset"}], "edges": [{"source": "lib/ansible/plugins/connection/winrm.py::Connection::_connect", "target": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_connect"}, {"source": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_connect", "target": "lib/ansible/plugins/connection/winrm.py::Connection::_kerb_auth"}, {"source": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_exec", "target": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_connect"}, {"source": "lib/ansible/plugins/connection/winrm.py::Connection::fetch_file", "target": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_exec"}, {"source": "lib/ansible/plugins/connection/winrm.py::Connection::reset", "target": "lib/ansible/plugins/connection/winrm.py::Connection::_connect"}]}, "graph_spec": "The WinRM connection scope must establish a usable protocol and UTF-8 shell only when needed, deriving the configured endpoint (including IPv6 formatting), transport order, timeouts, and authentication; managed Kerberos must obtain a private ticket with delegation options and never expose the password in diagnostics. Connection attempts should distinguish timeout/credential/transport failures and leave a reusable protocol/shell state. Command execution must lazily connect, run the requested command with encoded arguments and optional streamed stdin, collect text stdout/stderr and status, convert send or network failures into Ansible errors, and always clean up the remote command. File fetching must repeatedly execute remote reads at advancing offsets, decode each base64 chunk in order, write the exact byte stream locally (including empty files), recognize directory or missing-path conditions, and close local resources; reset must discard the existing protocol and shell and re-establish a fresh connection."} +{"repo": "ansible/ansible", "buggy_commit": "bf7d4ce260dc4ffc6074b2a392b9ff4d3794308b", "bug_issue": 65386, "solve_pr": 74147, "call_graph": {"nodes": [{"id": "lib/ansible/cli/playbook.py::PlaybookCLI::run"}, {"id": "lib/ansible/executor/playbook_executor.py::PlaybookExecutor::run"}, {"id": "lib/ansible/playbook/__init__.py::Playbook::_load_playbook_data"}, {"id": "lib/ansible/playbook/__init__.py::Playbook::load"}, {"id": "lib/ansible/playbook/play.py::Play::load"}, {"id": "lib/ansible/playbook/playbook_include.py::PlaybookInclude::load"}, {"id": "lib/ansible/playbook/playbook_include.py::PlaybookInclude::load_data"}], "edges": [{"source": "lib/ansible/cli/playbook.py::PlaybookCLI::run", "target": "lib/ansible/executor/playbook_executor.py::PlaybookExecutor::run"}, {"source": "lib/ansible/executor/playbook_executor.py::PlaybookExecutor::run", "target": "lib/ansible/playbook/__init__.py::Playbook::load"}, {"source": "lib/ansible/playbook/__init__.py::Playbook::_load_playbook_data", "target": "lib/ansible/playbook/play.py::Play::load"}, {"source": "lib/ansible/playbook/__init__.py::Playbook::_load_playbook_data", "target": "lib/ansible/playbook/playbook_include.py::PlaybookInclude::load"}, {"source": "lib/ansible/playbook/__init__.py::Playbook::load", "target": "lib/ansible/playbook/__init__.py::Playbook::_load_playbook_data"}, {"source": "lib/ansible/playbook/playbook_include.py::PlaybookInclude::load", "target": "lib/ansible/playbook/playbook_include.py::PlaybookInclude::load_data"}, {"source": "lib/ansible/playbook/playbook_include.py::PlaybookInclude::load_data", "target": "lib/ansible/playbook/__init__.py::Playbook::_load_playbook_data"}, {"source": "lib/ansible/playbook/playbook_include.py::PlaybookInclude::load_data", "target": "lib/ansible/playbook/playbook_include.py::PlaybookInclude::load_data"}]}, "graph_spec": "The scope must load each requested playbook through the executor, resolving paths (including collection-qualified and relative imports) with the loader’s basedir correctly set and restored. A playbook is valid only when its source is a non-empty list of mapping entries; ordinary entries become validated Play objects, while import_playbook entries are templated with merged variables, recursively loaded, and flattened into the parent in declaration order. Include-level variables and tags must be merged onto every imported play, conditional metadata propagated so imported plays/tasks honor the include condition, and the included path retained for subsequent resolution. Malformed entries, unreadable or empty data, invalid import parameters, and host/play definitions must surface as parser errors; loading/execution must preserve play order and return/list or execute those plays according to CLI mode while cleaning up loader/executor resources."} +{"repo": "ansible/ansible", "buggy_commit": "96905120698e3118d8bafaee5ebe8f83d2bbd607", "bug_issue": 66414, "solve_pr": 73708, "call_graph": {"nodes": [{"id": "lib/ansible/plugins/connection/ssh.py::Connection::reset"}], "edges": []}, "graph_spec": "Connection.reset provides the SSH connection plugin’s reset operation, interrupting the persistent SSH connection used by Ansible to communicate with a target machine. Persistent SSH connections allow communication to be reused across operations; reset serves as a connection lifecycle control."} +{"repo": "ansible/ansible", "buggy_commit": "03320466995a91f8a4d311e66cdf3eaee3f44934", "bug_issue": 69848, "solve_pr": 72208, "call_graph": {"nodes": [{"id": "lib/ansible/executor/play_iterator.py::PlayIterator::_get_next_task_from_state"}, {"id": "lib/ansible/playbook/block.py::Block::_load_always"}, {"id": "lib/ansible/playbook/block.py::Block::_load_block"}, {"id": "lib/ansible/playbook/block.py::Block::_load_rescue"}, {"id": "lib/ansible/playbook/helpers.py::load_list_of_tasks"}, {"id": "lib/ansible/playbook/role/__init__.py::Role::compile"}, {"id": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list"}, {"id": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}, {"id": "lib/ansible/plugins/strategy/free.py::StrategyModule::run"}, {"id": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run"}], "edges": [{"source": "lib/ansible/playbook/block.py::Block::_load_always", "target": "lib/ansible/playbook/helpers.py::load_list_of_tasks"}, {"source": "lib/ansible/playbook/block.py::Block::_load_block", "target": "lib/ansible/playbook/helpers.py::load_list_of_tasks"}, {"source": "lib/ansible/playbook/block.py::Block::_load_rescue", "target": "lib/ansible/playbook/helpers.py::load_list_of_tasks"}, {"source": "lib/ansible/playbook/helpers.py::load_list_of_tasks", "target": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list"}, {"source": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list", "target": "lib/ansible/playbook/role/__init__.py::Role::compile"}, {"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list"}, {"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}]}, "graph_spec": "The scope must preserve Ansible’s task/block execution semantics: block, rescue, and always sections are parsed into task objects while retaining play, parent-block, role, handler, variable, and loader context, with malformed structures rejected as parser errors; task lists must distinguish nested blocks and task/role includes and enforce static-inclusion constraints. Dynamically included roles must be instantiated with include parameters and inheritance context, compiled after direct dependencies, retain dependency chains and collection/parent relationships, register handlers/public roles appropriately, and terminate with the role-completion marker. Both linear and free strategies must schedule ordinary and meta tasks according to their host-iteration policies, execute meta actions with conditional effects on handlers, inventory, facts, host/play/error state, and role completion, then process included-role results by loading, tag-filtering, and inserting per-host blocks (using no-op placeholders where required) while propagating failures. Play iteration must traverse setup, regular, rescue, and always phases recursively through child blocks, transition to rescue on failures, clear or retain failure state correctly, advance blocks only after always tasks, and report completion when traversal or terminal state is reached."} +{"repo": "ansible/ansible", "buggy_commit": "20209c508f13b018b8f44f77749001979aa5f048", "bug_issue": 70134, "solve_pr": 70610, "call_graph": {"nodes": [{"id": "hacking/test-module.py::boilerplate_module"}, {"id": "hacking/test-module.py::main"}, {"id": "lib/ansible/executor/module_common.py::InternalRedirectModuleInfo::__init__"}, {"id": "lib/ansible/executor/module_common.py::_find_module_utils"}, {"id": "lib/ansible/executor/module_common.py::modify_module"}, {"id": "lib/ansible/executor/module_common.py::recursive_finder"}, {"id": "lib/ansible/plugins/action/__init__.py::ActionBase::_configure_module"}, {"id": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"id": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_remote_stat"}, {"id": "lib/ansible/plugins/action/__init__.py::ActionBase::_get_diff_data"}, {"id": "lib/ansible/plugins/action/__init__.py::ActionBase::_remote_checksum"}, {"id": "lib/ansible/plugins/action/assemble.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/command.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/copy.py::ActionModule::_copy_file"}, {"id": "lib/ansible/plugins/action/copy.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/fetch.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/gather_facts.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/normal.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/package.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/reboot.py::ActionModule::get_distribution"}, {"id": "lib/ansible/plugins/action/reboot.py::ActionModule::get_shutdown_command"}, {"id": "lib/ansible/plugins/action/reboot.py::ActionModule::perform_reboot"}, {"id": "lib/ansible/plugins/action/service.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/uri.py::ActionModule::run"}, {"id": "lib/ansible/plugins/action/wait_for_connection.py::run::ping_module_test"}, {"id": "lib/ansible/plugins/action/yum.py::ActionModule::run"}], "edges": [{"source": "hacking/test-module.py::boilerplate_module", "target": "lib/ansible/executor/module_common.py::modify_module"}, {"source": "hacking/test-module.py::main", "target": "hacking/test-module.py::boilerplate_module"}, {"source": "lib/ansible/executor/module_common.py::_find_module_utils", "target": "lib/ansible/executor/module_common.py::recursive_finder"}, {"source": "lib/ansible/executor/module_common.py::modify_module", "target": "lib/ansible/executor/module_common.py::_find_module_utils"}, {"source": "lib/ansible/executor/module_common.py::recursive_finder", "target": "lib/ansible/executor/module_common.py::recursive_finder"}, {"source": "lib/ansible/plugins/action/__init__.py::ActionBase::_configure_module", "target": "lib/ansible/executor/module_common.py::modify_module"}, {"source": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_configure_module"}, {"source": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_remote_stat", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/__init__.py::ActionBase::_get_diff_data", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/__init__.py::ActionBase::_remote_checksum", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_remote_stat"}, {"source": "lib/ansible/plugins/action/assemble.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/assemble.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_get_diff_data"}, {"source": "lib/ansible/plugins/action/command.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/copy.py::ActionModule::_copy_file", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_get_diff_data"}, {"source": "lib/ansible/plugins/action/copy.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/copy.py::ActionModule::run", "target": "lib/ansible/plugins/action/copy.py::ActionModule::_copy_file"}, {"source": "lib/ansible/plugins/action/fetch.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/gather_facts.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/normal.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/package.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/reboot.py::ActionModule::get_distribution", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/reboot.py::ActionModule::get_shutdown_command", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/reboot.py::ActionModule::perform_reboot", "target": "lib/ansible/plugins/action/reboot.py::ActionModule::get_shutdown_command"}, {"source": "lib/ansible/plugins/action/service.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/uri.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/wait_for_connection.py::run::ping_module_test", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}, {"source": "lib/ansible/plugins/action/yum.py::ActionModule::run", "target": "lib/ansible/plugins/action/__init__.py::ActionBase::_execute_module"}]}, "graph_spec": "These functions support Ansible’s controller-side action plugins, which coordinate playbook tasks with executable modules on managed hosts, and a standalone module development utility. Their shared responsibilities include preparing module code, arguments and utility dependencies, executing modules, and obtaining remote file metadata, checksums and change information. The scoped actions cover configuration-file assembly, file copying and retrieval, commands, host facts, package and service management, web requests, reboot preparation and execution, connection testing, and general module execution."} +{"repo": "ansible/ansible", "buggy_commit": "381bd1a575ff830cbbe397379b80d1a95683733e", "bug_issue": 72918, "solve_pr": 73864, "call_graph": {"nodes": [{"id": "lib/ansible/plugins/action/package.py::ActionModule::run"}], "edges": []}, "graph_spec": "ActionModule.run handles Ansible’s generic operating-system package operations, providing a common task interface across systems with different package managers. It coordinates execution through the underlying package-manager module using the task’s package-management arguments and execution context, and returns the task result."} +{"repo": "ansible/ansible", "buggy_commit": "79f67ed56116be11b1c992fade04acf06d9208d1", "bug_issue": 74397, "solve_pr": 78569, "call_graph": {"nodes": [{"id": "lib/ansible/galaxy/api.py::GalaxyAPI::_call_galaxy"}, {"id": "lib/ansible/galaxy/collection/concrete_artifact_manager.py::ConcreteArtifactsManager::get_galaxy_artifact_path"}, {"id": "lib/ansible/galaxy/collection/concrete_artifact_manager.py::_download_file"}, {"id": "lib/ansible/module_utils/urls.py::Request::__init__"}, {"id": "lib/ansible/module_utils/urls.py::Request::open"}, {"id": "lib/ansible/module_utils/urls.py::fetch_url"}, {"id": "lib/ansible/module_utils/urls.py::open_url"}, {"id": "lib/ansible/modules/apt_key.py::download_key"}, {"id": "lib/ansible/modules/apt_key.py::main"}, {"id": "lib/ansible/modules/apt_repository.py::UbuntuSourcesList::_get_ppa_info"}, {"id": "lib/ansible/modules/apt_repository.py::UbuntuSourcesList::add_source"}, {"id": "lib/ansible/modules/apt_repository.py::main"}, {"id": "lib/ansible/modules/get_url.py::main"}, {"id": "lib/ansible/modules/get_url.py::url_get"}, {"id": "lib/ansible/modules/rpm_key.py::RpmKey::__init__"}, {"id": "lib/ansible/modules/rpm_key.py::RpmKey::fetch_key"}, {"id": "lib/ansible/modules/uri.py::main"}, {"id": "lib/ansible/modules/uri.py::uri"}, {"id": "lib/ansible/plugins/lookup/url.py::LookupModule::run"}], "edges": [{"source": "lib/ansible/galaxy/api.py::GalaxyAPI::_call_galaxy", "target": "lib/ansible/module_utils/urls.py::open_url"}, {"source": "lib/ansible/galaxy/collection/concrete_artifact_manager.py::ConcreteArtifactsManager::get_galaxy_artifact_path", "target": "lib/ansible/galaxy/collection/concrete_artifact_manager.py::_download_file"}, {"source": "lib/ansible/galaxy/collection/concrete_artifact_manager.py::_download_file", "target": "lib/ansible/module_utils/urls.py::open_url"}, {"source": "lib/ansible/modules/apt_key.py::download_key", "target": "lib/ansible/module_utils/urls.py::fetch_url"}, {"source": "lib/ansible/modules/apt_key.py::main", "target": "lib/ansible/modules/apt_key.py::download_key"}, {"source": "lib/ansible/modules/apt_repository.py::UbuntuSourcesList::_get_ppa_info", "target": "lib/ansible/module_utils/urls.py::fetch_url"}, {"source": "lib/ansible/modules/apt_repository.py::UbuntuSourcesList::add_source", "target": "lib/ansible/modules/apt_repository.py::UbuntuSourcesList::_get_ppa_info"}, {"source": "lib/ansible/modules/apt_repository.py::main", "target": "lib/ansible/modules/apt_repository.py::UbuntuSourcesList::add_source"}, {"source": "lib/ansible/modules/get_url.py::main", "target": "lib/ansible/modules/get_url.py::url_get"}, {"source": "lib/ansible/modules/get_url.py::url_get", "target": "lib/ansible/module_utils/urls.py::fetch_url"}, {"source": "lib/ansible/modules/rpm_key.py::RpmKey::__init__", "target": "lib/ansible/modules/rpm_key.py::RpmKey::fetch_key"}, {"source": "lib/ansible/modules/rpm_key.py::RpmKey::fetch_key", "target": "lib/ansible/module_utils/urls.py::fetch_url"}, {"source": "lib/ansible/modules/uri.py::uri", "target": "lib/ansible/module_utils/urls.py::fetch_url"}]}, "graph_spec": "This scope provides a consistent HTTP(S)/FTP transport contract for Galaxy, collection artifacts, package keys/repositories, downloads, URI operations, and URL lookups: per-call settings override reusable defaults while preserving proxy, timeout, TLS/CA and client-certificate validation, credentials (including optional netrc/GSSAPI), cookies, compression, request method/body, cache-control and conditional-request semantics. Caller-supplied authentication headers must be preserved; fallback credential discovery may only fill an absent authentication header and must not replace an existing scheme. Redirect policy must be applied according to the selected mode, retaining method and payload for 307/308 while appropriately converting other redirects, and headers designated unredirected—especially credentials—must remain confined to the original request. Successful module requests return a readable response plus normalized status, final URL, headers and cookies; HTTP failures retain status and response body metadata, while connection and unexpected failures yield structured failure information. Consumers must act on these outcomes: accept only their required statuses, avoid replacing unchanged downloads, safely stage downloaded content, validate collection artifact hashes before caching paths, parse required JSON/key material before use, and expose transport failures in their domain-specific result or error."} +{"repo": "ansible/ansible", "buggy_commit": "03cb40e712897d411efed3b901773773370e25cd", "bug_issue": 75072, "solve_pr": 75078, "call_graph": {"nodes": [{"id": "lib/ansible/plugins/filter/core.py::to_nice_yaml"}, {"id": "lib/ansible/plugins/filter/core.py::to_yaml"}], "edges": []}, "graph_spec": "These Ansible template filters serialize structured data into YAML text, a textual format for representing structured information that can also aid debugging. `to_yaml` provides general YAML formatting, while `to_nice_yaml` emphasizes human-readable presentation."} +{"repo": "ansible/ansible", "buggy_commit": "1491ec8019b064374145dace41b1320e04fb494b", "bug_issue": 80252, "solve_pr": 80251, "call_graph": {"nodes": [{"id": "lib/ansible/plugins/lookup/password.py::LookupModule::run"}, {"id": "lib/ansible/plugins/lookup/password.py::_parse_content"}], "edges": [{"source": "lib/ansible/plugins/lookup/password.py::LookupModule::run", "target": "lib/ansible/plugins/lookup/password.py::_parse_content"}]}, "graph_spec": "LookupModule.run provides Ansible’s password lookup, accepting password-file references and lookup settings to retrieve or generate passwords for playbook use and return password strings. _parse_content interprets stored password-file content into a password and salt, supporting the lookup’s file-based password management and repeatable password hashing."} +{"repo": "ansible/ansible", "buggy_commit": "1491ec8019b064374145dace41b1320e04fb494b", "bug_issue": 80256, "solve_pr": 80257, "call_graph": {"nodes": [{"id": "lib/ansible/modules/iptables.py::main"}], "edges": []}, "graph_spec": "`main` must validate module arguments and select the IPv4 or IPv6 iptables executable, requiring a chain except for table flushes and enforcing option dependencies (including logging and TEE gateway rules). It must adapt lock-wait usage to the detected iptables version, then apply the requested operation with clear precedence: flush the selected table/chain; reconcile a built-in chain’s policy; manage an empty user chain when chain management is enabled; or reconcile a specific rule. Rule and chain reconciliation must be idempotent, reporting `changed` only when actual state differs, honoring append versus numbered insert and present versus absent state, and performing no mutations in check mode while still determining the prospective change. Successful completion must return module results describing the operation, while command or state-detection failures must surface as module failures."} +{"repo": "ansible/ansible", "buggy_commit": "5af5b4b6c8697b8cdd68f9591beba16f5a1018e6", "bug_issue": 81092, "solve_pr": 81520, "call_graph": {"nodes": [{"id": "lib/ansible/modules/unarchive.py::ZipArchive::is_unarchived"}], "edges": []}, "graph_spec": "`ZipArchive.is_unarchived` must determine whether the archive’s selected members (after include/exclude filtering) are already represented under the destination with matching entry type (regular file, directory, or symlink), file content (size and CRC), modification-time policy (`keep_newer`), permissions, and requested owner/group. Missing or differing members must make the result non-unarchived and identify those members for extraction, while excluded or intentionally retained newer files must not trigger replacement. A successful, fully matching listing is reported as unarchived; an unreadable or otherwise unsuccessful archive comparison is not, and requested ownership changes that the executing user cannot perform must be rejected."} +{"repo": "ansible/ansible", "buggy_commit": "5812cabaf53a7c972c73a4e45faa57032e5c1186", "bug_issue": 81994, "solve_pr": 81995, "call_graph": {"nodes": [{"id": "lib/ansible/cli/playbook.py::PlaybookCLI::run"}, {"id": "lib/ansible/executor/playbook_executor.py::PlaybookExecutor::run"}, {"id": "lib/ansible/executor/task_executor.py::TaskExecutor::_calculate_delegate_to"}, {"id": "lib/ansible/executor/task_executor.py::TaskExecutor::_execute"}, {"id": "lib/ansible/executor/task_executor.py::TaskExecutor::_run_loop"}, {"id": "lib/ansible/executor/task_executor.py::TaskExecutor::run"}, {"id": "lib/ansible/executor/task_queue_manager.py::TaskQueueManager::run"}, {"id": "lib/ansible/playbook/block.py::Block::_load_always"}, {"id": "lib/ansible/playbook/block.py::Block::_load_block"}, {"id": "lib/ansible/playbook/block.py::Block::_load_rescue"}, {"id": "lib/ansible/playbook/helpers.py::load_list_of_tasks"}, {"id": "lib/ansible/playbook/included_file.py::IncludedFile::process_include_results"}, {"id": "lib/ansible/playbook/role/definition.py::RoleDefinition::_load_role_name"}, {"id": "lib/ansible/playbook/role/definition.py::RoleDefinition::_load_role_path"}, {"id": "lib/ansible/playbook/role/definition.py::RoleDefinition::preprocess_data"}, {"id": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list"}, {"id": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}, {"id": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_process_pending_results"}, {"id": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_wait_on_pending_results"}, {"id": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::search_handlers_by_notification"}, {"id": "lib/ansible/plugins/strategy/__init__.py::_execute_meta::_evaluate_conditional"}, {"id": "lib/ansible/plugins/strategy/free.py::StrategyModule::run"}, {"id": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run"}, {"id": "lib/ansible/vars/manager.py::VariableManager::_get_delegated_vars"}, {"id": "lib/ansible/vars/manager.py::VariableManager::get_delegated_vars_and_hostname"}, {"id": "lib/ansible/vars/manager.py::VariableManager::get_vars"}], "edges": [{"source": "lib/ansible/cli/playbook.py::PlaybookCLI::run", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/executor/playbook_executor.py::PlaybookExecutor::run", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/executor/task_executor.py::TaskExecutor::_calculate_delegate_to", "target": "lib/ansible/vars/manager.py::VariableManager::get_delegated_vars_and_hostname"}, {"source": "lib/ansible/executor/task_executor.py::TaskExecutor::_execute", "target": "lib/ansible/executor/task_executor.py::TaskExecutor::_calculate_delegate_to"}, {"source": "lib/ansible/executor/task_executor.py::TaskExecutor::_run_loop", "target": "lib/ansible/executor/task_executor.py::TaskExecutor::_execute"}, {"source": "lib/ansible/executor/task_executor.py::TaskExecutor::run", "target": "lib/ansible/executor/task_executor.py::TaskExecutor::_execute"}, {"source": "lib/ansible/executor/task_executor.py::TaskExecutor::run", "target": "lib/ansible/executor/task_executor.py::TaskExecutor::_run_loop"}, {"source": "lib/ansible/executor/task_queue_manager.py::TaskQueueManager::run", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/playbook/block.py::Block::_load_always", "target": "lib/ansible/playbook/helpers.py::load_list_of_tasks"}, {"source": "lib/ansible/playbook/block.py::Block::_load_block", "target": "lib/ansible/playbook/helpers.py::load_list_of_tasks"}, {"source": "lib/ansible/playbook/block.py::Block::_load_rescue", "target": "lib/ansible/playbook/helpers.py::load_list_of_tasks"}, {"source": "lib/ansible/playbook/helpers.py::load_list_of_tasks", "target": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list"}, {"source": "lib/ansible/playbook/helpers.py::load_list_of_tasks", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/playbook/included_file.py::IncludedFile::process_include_results", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/playbook/role/definition.py::RoleDefinition::_load_role_name", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/playbook/role/definition.py::RoleDefinition::_load_role_path", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/playbook/role/definition.py::RoleDefinition::preprocess_data", "target": "lib/ansible/playbook/role/definition.py::RoleDefinition::_load_role_name"}, {"source": "lib/ansible/playbook/role/definition.py::RoleDefinition::preprocess_data", "target": "lib/ansible/playbook/role/definition.py::RoleDefinition::_load_role_path"}, {"source": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::search_handlers_by_notification"}, {"source": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta", "target": "lib/ansible/plugins/strategy/__init__.py::_execute_meta::_evaluate_conditional"}, {"source": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_process_pending_results", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::search_handlers_by_notification"}, {"source": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_wait_on_pending_results", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_process_pending_results"}, {"source": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::search_handlers_by_notification", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/plugins/strategy/__init__.py::_execute_meta::_evaluate_conditional", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/playbook/included_file.py::IncludedFile::process_include_results"}, {"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list"}, {"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}, {"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_process_pending_results"}, {"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_wait_on_pending_results"}, {"source": "lib/ansible/plugins/strategy/free.py::StrategyModule::run", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/playbook/included_file.py::IncludedFile::process_include_results"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/playbook/role_include.py::IncludeRole::get_block_list"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_execute_meta"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_process_pending_results"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/plugins/strategy/__init__.py::StrategyBase::_wait_on_pending_results"}, {"source": "lib/ansible/plugins/strategy/linear.py::StrategyModule::run", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/vars/manager.py::VariableManager::_get_delegated_vars", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/vars/manager.py::VariableManager::get_delegated_vars_and_hostname", "target": "lib/ansible/vars/manager.py::VariableManager::get_vars"}, {"source": "lib/ansible/vars/manager.py::VariableManager::get_vars", "target": "lib/ansible/vars/manager.py::VariableManager::_get_delegated_vars"}]}, "graph_spec": "These functions support Ansible playbook execution: preparing task blocks, role definitions and dynamic inclusions, coordinating plays and host tasks through execution strategies, and collecting execution results. They supply contextual variables and delegation information, supporting tasks assigned to another host, and manage task loops, block recovery and cleanup sections, notification-linked handlers, and conditional meta actions that control execution state."} +{"repo": "ansible/ansible", "buggy_commit": "2e60bef85587f88d1d851afea30e656f0253580f", "bug_issue": 82075, "solve_pr": 83403, "call_graph": {"nodes": [{"id": "lib/ansible/module_utils/common/text/formatters.py::human_to_bytes"}, {"id": "lib/ansible/module_utils/common/validation.py::check_type_bits"}, {"id": "lib/ansible/module_utils/common/validation.py::check_type_bytes"}, {"id": "lib/ansible/plugins/filter/mathstuff.py::human_to_bytes"}], "edges": [{"source": "lib/ansible/module_utils/common/validation.py::check_type_bits", "target": "lib/ansible/module_utils/common/text/formatters.py::human_to_bytes"}, {"source": "lib/ansible/module_utils/common/validation.py::check_type_bytes", "target": "lib/ansible/module_utils/common/text/formatters.py::human_to_bytes"}, {"source": "lib/ansible/plugins/filter/mathstuff.py::human_to_bytes", "target": "lib/ansible/module_utils/common/text/formatters.py::human_to_bytes"}]}, "graph_spec": "These functions convert human-readable data quantities expressed in bit or byte units into integer counts, connecting unit-bearing text with numeric data-size representations. The formatter provides the shared conversion utility, check_type_bits and check_type_bytes expose it for type validation and conversion, and the human_to_bytes filter makes this capability available in Ansible templates."} +{"repo": "ansible/ansible", "buggy_commit": "bf9509bf33b2675d73f4abe72bebb91815d284f5", "bug_issue": 82387, "solve_pr": 82388, "call_graph": {"nodes": [{"id": "lib/ansible/config/manager.py::ConfigManager::get_config_value"}, {"id": "lib/ansible/config/manager.py::ConfigManager::get_config_value_and_origin"}, {"id": "lib/ansible/config/manager.py::ConfigManager::get_plugin_options"}, {"id": "lib/ansible/config/manager.py::ensure_type"}], "edges": [{"source": "lib/ansible/config/manager.py::ConfigManager::get_config_value", "target": "lib/ansible/config/manager.py::ConfigManager::get_config_value_and_origin"}, {"source": "lib/ansible/config/manager.py::ConfigManager::get_config_value_and_origin", "target": "lib/ansible/config/manager.py::ensure_type"}, {"source": "lib/ansible/config/manager.py::ConfigManager::get_plugin_options", "target": "lib/ansible/config/manager.py::ConfigManager::get_config_value"}]}, "graph_spec": "These functions provide access to Ansible configuration settings: get_config_value retrieves a setting’s value, while get_config_value_and_origin also reports its source, making configuration provenance available alongside the setting. get_plugin_options retrieves configuration options for a named plugin, an Ansible extension with its own settings. ensure_type casts configuration values to their declared types, supporting typed configuration across these retrieval responsibilities."} +{"repo": "ansible/ansible", "buggy_commit": "802e95f5808f9a06c8f4b64c4cb5203abaaa8164", "bug_issue": 83140, "solve_pr": 83157, "call_graph": {"nodes": [{"id": "lib/ansible/module_utils/facts/hardware/linux.py::LinuxHardware::populate"}], "edges": []}, "graph_spec": "LinuxHardware.populate gathers Linux host hardware information and returns it as Ansible facts, covering processor, memory, firmware-provided system identity (DMI), and device information. Facts are host attributes exposed as variables for use in playbooks, and this method provides the Linux-specific hardware contribution to that fact-gathering interface."} +{"repo": "ansible/ansible", "buggy_commit": "2a3c93f593f4c0ea11e34b946aa45e5e6f463e76", "bug_issue": 84731, "solve_pr": 84735, "call_graph": {"nodes": [{"id": "lib/ansible/plugins/connection/winrm.py::Connection::_connect"}, {"id": "lib/ansible/plugins/connection/winrm.py::Connection::_kerb_auth"}, {"id": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_connect"}, {"id": "lib/ansible/plugins/connection/winrm.py::Connection::reset"}], "edges": [{"source": "lib/ansible/plugins/connection/winrm.py::Connection::_connect", "target": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_connect"}, {"source": "lib/ansible/plugins/connection/winrm.py::Connection::_winrm_connect", "target": "lib/ansible/plugins/connection/winrm.py::Connection::_kerb_auth"}, {"source": "lib/ansible/plugins/connection/winrm.py::Connection::reset", "target": "lib/ansible/plugins/connection/winrm.py::Connection::_connect"}]}, "graph_spec": "The scope must maintain a coherent WinRM session lifecycle: required dependencies and connection options are validated, a protocol and shell are established only when no protocol is active, and the connection is usable only after success. The configured HTTP/HTTPS endpoint (including valid IPv6 formatting) is used, transports are tried in order, managed Kerberos preparation is performed when applicable, timeout relationships are honored, and connection, timeout, or authentication failures are reported meaningfully. Authentication uses an isolated temporary ticket cache and controlled environment and must remain robust across supported runtime environments without exposing the password. Reset is a no-op for an inactive connection; otherwise it invalidates protocol and shell state and re-establishes a fresh connected session."} +{"repo": "ansible/ansible", "buggy_commit": "8b9ddf554474bd192af27d10930f5587db31d4b2", "bug_issue": 85085, "solve_pr": 85119, "call_graph": {"nodes": [{"id": "lib/ansible/config/manager.py::ensure_type"}, {"id": "lib/ansible/plugins/action/template.py::ActionModule::run"}], "edges": [{"source": "lib/ansible/plugins/action/template.py::ActionModule::run", "target": "lib/ansible/config/manager.py::ensure_type"}, {"source": "lib/ansible/plugins/action/template.py::ActionModule::run", "target": "lib/ansible/plugins/action/template.py::ActionModule::run"}]}, "graph_spec": "`ensure_type` must leave `None` unchanged, perform the documented boolean, numeric, sequence, mapping, string, and path conversions (including origin-based path resolution and temporary-directory creation), preserve value metadata where applicable, and reject invalid inputs with `ValueError` while passing through unknown types. `ActionModule.run` must initialize task variables, normalize its string options through `ensure_type`, parse boolean controls, enforce required `src`/`dest` and valid template options, render the located template with the supplied variables and delimiter/newline settings, write the encoded result to a temporary file, delegate transfer with destination and follow/mode settings, clean temporary resources, and return the resulting action status."} +{"repo": "apache/dubbo", "buggy_commit": "b73b9d131b31ed43869778abbbe799b8cd0d1d1b", "bug_issue": 16521, "solve_pr": 16524, "call_graph": {"nodes": [{"id": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java::CompatibleTypeUtils::compatibleTypeConvert"}, {"id": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoInvocationHandler::invoke"}, {"id": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize"}, {"id": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize0"}, {"id": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize1"}, {"id": "dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/CompatibleFilter.java::CompatibleFilter::onResponse"}], "edges": [{"source": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoInvocationHandler::invoke", "target": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize0"}, {"source": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize", "target": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize0"}, {"source": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize0", "target": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize1"}, {"source": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize1", "target": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java::CompatibleTypeUtils::compatibleTypeConvert"}, {"source": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize1", "target": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/PojoUtils.java::PojoUtils::realize1"}, {"source": "dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/CompatibleFilter.java::CompatibleFilter::onResponse", "target": "dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java::CompatibleTypeUtils::compatibleTypeConvert"}]}, "graph_spec": "These functions support type adaptation between generalized object representations and the Java types used by Dubbo service interfaces. PojoUtils.realize and its internal realization functions reconstruct typed objects using target class and generic type information, while PojoInvocationHandler.invoke provides invocation handling for interface-based object representations and compatibleTypeConvert supplies general value conversion. CompatibleFilter.onResponse applies this compatibility role to RPC response values so they align with the consumer’s declared return types."} +{"repo": "apache/dubbo", "buggy_commit": "1afcdf7883553d93965cc402a608d3a6c7d4f3cb", "bug_issue": 16559, "solve_pr": 16560, "call_graph": {"nodes": [{"id": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MatrixParamArgumentResolver.java::MatrixParamArgumentResolver::doResolveCollectionValue"}, {"id": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MatrixParamArgumentResolver.java::MatrixParamArgumentResolver::resolveCollectionValue"}, {"id": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MatrixParamArgumentResolver.java::MatrixParamArgumentResolver::resolveValue"}, {"id": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/PathParamArgumentResolver.java::PathParamArgumentResolver::resolve"}, {"id": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::doResolveCollectionValue"}, {"id": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::resolveCollectionValue"}, {"id": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::resolveMapValue"}, {"id": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::resolveValue"}, {"id": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/PathVariableArgumentResolver.java::PathVariableArgumentResolver::resolve"}, {"id": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveCollectionValue"}, {"id": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveMapValue"}, {"id": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveMatrixVariable"}, {"id": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolvePathVariable"}, {"id": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveValue"}, {"id": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::getPathVariable"}, {"id": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariableValues"}, {"id": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariables"}], "edges": [{"source": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MatrixParamArgumentResolver.java::MatrixParamArgumentResolver::doResolveCollectionValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariableValues"}, {"source": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MatrixParamArgumentResolver.java::MatrixParamArgumentResolver::resolveCollectionValue", "target": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MatrixParamArgumentResolver.java::MatrixParamArgumentResolver::doResolveCollectionValue"}, {"source": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MatrixParamArgumentResolver.java::MatrixParamArgumentResolver::resolveValue", "target": "dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MatrixParamArgumentResolver.java::MatrixParamArgumentResolver::doResolveCollectionValue"}, {"source": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::doResolveCollectionValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariableValues"}, {"source": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::doResolveCollectionValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariables"}, {"source": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::resolveCollectionValue", "target": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::doResolveCollectionValue"}, {"source": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::resolveMapValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariables"}, {"source": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::resolveValue", "target": "dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/MatrixVariableArgumentResolver.java::MatrixVariableArgumentResolver::doResolveCollectionValue"}, {"source": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveCollectionValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveMatrixVariable"}, {"source": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveCollectionValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolvePathVariable"}, {"source": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveMapValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveMatrixVariable"}, {"source": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveMapValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolvePathVariable"}, {"source": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveMatrixVariable", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariableValues"}, {"source": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveMatrixVariable"}, {"source": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolveValue", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/basic/ParamArgumentResolver.java::ParamArgumentResolver::resolvePathVariable"}, {"source": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariableValues", "target": "dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/util/RequestUtils.java::RequestUtils::parseMatrixVariables"}]}, "graph_spec": "These functions support HTTP request argument binding in Dubbo Triple REST through JAX-RS, Spring, and Dubbo parameter APIs, resolving request data into individual, collection, or map-valued service arguments. Their shared path and matrix utilities retrieve path variables and parse matrix parameters: path variables represent named portions of a URI path, while matrix parameters carry named values associated with path segments."} +{"repo": "astral-sh/uv", "buggy_commit": "e4c55567ada966de4911513b5c526070e6cddd3f", "bug_issue": 22966, "solve_pr": 22977, "call_graph": {"nodes": [{"id": "crates/uv-trampoline/src/bounce.rs::bounce"}, {"id": "crates/uv-trampoline/src/bounce.rs::close_handles"}], "edges": [{"source": "crates/uv-trampoline/src/bounce.rs::bounce", "target": "crates/uv-trampoline/src/bounce.rs::close_handles"}]}, "graph_spec": "`bounce` provides the execution entry point for a Windows trampoline, an executable launcher that delegates to Python to run a script or serve as a Python proxy; its interface distinguishes console and GUI use and does not return. The supplied `close_handles` node has no declaration or documentation in the current repository, so its responsibility and relationship to `bounce` cannot be established from the permitted sources."} +{"repo": "astropy/astropy", "buggy_commit": "c3319952ebd2a9d4969f6dfb84fc61c84a240cbd", "bug_issue": 13009, "solve_pr": 13033, "call_graph": {"nodes": [{"id": "astropy/timeseries/core.py::BaseTimeSeries::_check_required_columns"}, {"id": "astropy/timeseries/core.py::BaseTimeSeries::_delay_required_column_checks"}], "edges": [{"source": "astropy/timeseries/core.py::BaseTimeSeries::_delay_required_column_checks", "target": "astropy/timeseries/core.py::BaseTimeSeries::_check_required_columns"}]}, "graph_spec": "Astropy time series are tables that associate measurements with observation times or time bins through dedicated time-related columns. Within BaseTimeSeries, _check_required_columns supports consistency with required-column contracts, while _delay_required_column_checks provides a context for deferring that validation during table changes."} +{"repo": "astropy/astropy", "buggy_commit": "6ed769d58d89380ebaa1ef52b300691eefda8928", "bug_issue": 13235, "solve_pr": 13236, "call_graph": {"nodes": [{"id": "astropy/table/table.py::Table::__setitem__"}, {"id": "astropy/table/table.py::Table::_convert_data_to_col"}, {"id": "astropy/table/table.py::Table::_init_from_list"}, {"id": "astropy/table/table.py::Table::_init_from_ndarray"}, {"id": "astropy/table/table.py::Table::_replace_column_warnings"}, {"id": "astropy/table/table.py::Table::add_column"}, {"id": "astropy/table/table.py::Table::add_columns"}, {"id": "astropy/table/table.py::Table::replace_column"}], "edges": [{"source": "astropy/table/table.py::Table::__setitem__", "target": "astropy/table/table.py::Table::_replace_column_warnings"}, {"source": "astropy/table/table.py::Table::__setitem__", "target": "astropy/table/table.py::Table::add_column"}, {"source": "astropy/table/table.py::Table::_init_from_list", "target": "astropy/table/table.py::Table::_convert_data_to_col"}, {"source": "astropy/table/table.py::Table::_init_from_ndarray", "target": "astropy/table/table.py::Table::_init_from_list"}, {"source": "astropy/table/table.py::Table::_replace_column_warnings", "target": "astropy/table/table.py::Table::replace_column"}, {"source": "astropy/table/table.py::Table::add_column", "target": "astropy/table/table.py::Table::_convert_data_to_col"}, {"source": "astropy/table/table.py::Table::add_columns", "target": "astropy/table/table.py::Table::add_column"}, {"source": "astropy/table/table.py::Table::replace_column", "target": "astropy/table/table.py::Table::_convert_data_to_col"}]}, "graph_spec": "These functions support constructing and modifying Astropy tables, which organize heterogeneous data into named columns with associated metadata. They initialize tables from column lists or NumPy arrays, convert column-like data into supported column objects, and provide assignment, single-column and multiple-column addition, and column replacement. The scoped replacement wrapper also provides warnings associated with column replacement."} +{"repo": "astropy/astropy", "buggy_commit": "19cc80471739bcb67b7e8099246b391c355023ee", "bug_issue": 13451, "solve_pr": 13453, "call_graph": {"nodes": [{"id": "astropy/io/ascii/html.py::HTML::write"}], "edges": []}, "graph_spec": "HTML.write must reject tables whose column dimensionality exceeds the format’s supported two dimensions, then return a single complete HTML document string containing UTF-8 metadata, a table header, and one data row per input row. Header names and cell text are emitted after trimming; configured fill-value and column-format processing must be reflected in every cell. A two-dimensional column is represented, when multicolumn output is enabled, by a header with the appropriate colspan and by its per-element values as adjacent cells, preserving row alignment; otherwise it remains a single formatted cell value. Ordinary cell content must be XML-escaped, while columns explicitly designated for raw HTML use configured sanitization. The document must incorporate requested styling or script resources/content, apply a string table identifier and optional CSS class to the table, and omit an identifier for non-string table selectors."} +{"repo": "astropy/astropy", "buggy_commit": "0df94ff7097961e92fd7812036a24b145bc13ca8", "bug_issue": 13488, "solve_pr": 13579, "call_graph": {"nodes": [{"id": "astropy/wcs/wcsapi/wrappers/sliced_wcs.py::SlicedLowLevelWCS::world_to_pixel_values"}], "edges": [{"source": "astropy/wcs/wcsapi/wrappers/sliced_wcs.py::SlicedLowLevelWCS::world_to_pixel_values", "target": "astropy/wcs/wcsapi/wrappers/sliced_wcs.py::SlicedLowLevelWCS::world_to_pixel_values"}]}, "graph_spec": "SlicedLowLevelWCS.world_to_pixel_values converts numerical world-coordinate scalars or arrays, expressed in the WCS’s declared units, into pixel-coordinate scalars or arrays for a sliced WCS. World coordinates represent physical quantities associated with data, while pixel coordinates locate positions within it; this method provides that mapping for the subregion or reduced-dimensional view represented by the slice."} +{"repo": "astropy/astropy", "buggy_commit": "5250b2442501e6c671c6b380536f1edb352602d1", "bug_issue": 13976, "solve_pr": 13977, "call_graph": {"nodes": [{"id": "astropy/units/quantity.py::Quantity::__array_ufunc__"}], "edges": []}, "graph_spec": "Quantity ufunc dispatch must determine the operation’s required input conversions and result unit before numerical evaluation, apply those conversions to raw array values, and delegate the ufunc without recursively re-entering Quantity dispatch. It must preserve NumPy’s `out` contract by validating that supplied destinations can represent the result (including unit/subclass and safe casting constraints), executing against array views, and restoring the computed unit on Quantity outputs; multiple outputs and `None` output slots must retain their corresponding structure. Reduction `initial` values must be expressed in the result unit. Results with a physical unit must be returned as appropriate Quantity views (preserving a compatible subclass), while unitless results remain plain array results; in-place `at` operations return their native no-result outcome. Unsupported or incompatible unit operations must raise normally unless another participating input/output type owns ufunc dispatch, in which case the method must return `NotImplemented` so that type can handle the operation."} +{"repo": "astropy/astropy", "buggy_commit": "cdb66059a2feb44ee49021874605ba90801f9986", "bug_issue": 14305, "solve_pr": 14309, "call_graph": {"nodes": [{"id": "astropy/io/fits/connect.py::is_fits"}], "edges": []}, "graph_spec": "`is_fits` is the Table I/O identifier for FITS and must return a boolean using the most reliable available input: when given a readable file object, inspect its first 30 bytes for the exact FITS signature and restore the object’s original stream position; otherwise, when given a path, recognize case-insensitively only the supported `.fits`, `.fit`, or `.fts` suffixes, optionally followed by `.gz`; when neither is available, identify only FITS in-memory inputs represented by an `HDUList`, `TableHDU`, `BinTableHDU`, or `GroupsHDU`. Inputs not meeting the applicable criterion must not be identified as FITS."} +{"repo": "astropy/astropy", "buggy_commit": "fa4e8d1cd279acf9b24560813c8652494ccd5922", "bug_issue": 14355, "solve_pr": 14369, "call_graph": {"nodes": [{"id": "astropy/units/format/cds.py::CDS::_make_parser"}], "edges": []}, "graph_spec": "CDS._make_parser must construct and return a parser for CDS unit expressions that evaluates valid syntax into Astropy unit objects: a standalone or multiplied numeric scale may prefix a unit expression; units may be multiplied with `.`, divided (including a leading reciprocal), grouped with parentheses, and raised to signed integer powers. Bracketed unit expressions—including the dimensionless marker—must be interpreted as logarithmic `dex` units, while unbracketed dimensionless input remains a normal dimensionless unit. Numeric scale notation must allow only base-10 exponent forms, rejecting other bases, and malformed grammar must fail with a `ValueError`."} +{"repo": "astropy/astropy", "buggy_commit": "cb4a986b1b1faf505ac023638cf51c3b8b652c4b", "bug_issue": 14363, "solve_pr": 14365, "call_graph": {"nodes": [{"id": "astropy/io/ascii/qdp.py::QDP::read"}, {"id": "astropy/io/ascii/qdp.py::_get_tables_from_qdp_file"}, {"id": "astropy/io/ascii/qdp.py::_get_type_from_list_of_lines"}, {"id": "astropy/io/ascii/qdp.py::_line_type"}, {"id": "astropy/io/ascii/qdp.py::_read_table_qdp"}], "edges": [{"source": "astropy/io/ascii/qdp.py::QDP::read", "target": "astropy/io/ascii/qdp.py::_read_table_qdp"}, {"source": "astropy/io/ascii/qdp.py::_get_tables_from_qdp_file", "target": "astropy/io/ascii/qdp.py::_get_type_from_list_of_lines"}, {"source": "astropy/io/ascii/qdp.py::_get_type_from_list_of_lines", "target": "astropy/io/ascii/qdp.py::_line_type"}, {"source": "astropy/io/ascii/qdp.py::_read_table_qdp", "target": "astropy/io/ascii/qdp.py::_get_tables_from_qdp_file"}]}, "graph_spec": "These functions support reading Quick and Dandy Plotter (QDP) text into Astropy tables: QDP.read provides the reader interface, _read_table_qdp reads an individual table, and _get_tables_from_qdp_file extracts the tables in a file. _line_type and _get_type_from_list_of_lines classify QDP text and describe its column layout, supporting a format that combines tabular data, comments, and commands distinguishing data columns from associated measurement-error columns."} +{"repo": "astropy/astropy", "buggy_commit": "a3f4ae6cd24d5ecdf49f213d77b3513dd509a06c", "bug_issue": 14507, "solve_pr": 14508, "call_graph": {"nodes": [{"id": "astropy/io/fits/card.py::_format_float"}, {"id": "astropy/io/fits/card.py::_format_value"}], "edges": [{"source": "astropy/io/fits/card.py::_format_value", "target": "astropy/io/fits/card.py::_format_float"}]}, "graph_spec": "`_format_value` converts a Python/numpy card value into its fixed-width FITS value-field string, and it delegates float rendering to `_format_float`. Obligations: (1) type dispatch is exclusive and ordered — `str` first, then `bool`/`np.bool_` before any integer test (since bool is an int subtype), then integers (`_is_int`), then `float`/`np.floating`, then `complex`/`np.complexfloating`, with `Undefined` and all other unsupported types yielding the empty string. (2) Field geometry: numeric, boolean and complex results occupy exactly 20 columns, right-justified, while strings are quoted with single quotes, have embedded `'` doubled, are padded to a minimum width of 8 inside the quotes, and the whole quoted token is then padded to 20 columns; a null string maps to `''`, and booleans render as `T`/`F`. (3) Complex values render as `(real, imag)` with both components produced by `_format_float` and the combined token right-justified to 20 columns. (4) `_format_float` returns a FITS-legal float literal of at most 20 characters: it uses an uppercase `E` exponent marker, and when the natural representation is too long it must shorten the value without silently discarding the decimal exponent — for non-scientific representations it truncates trailing characters (shortened precision), and for scientific representations it shortens only the significand/mantissa while retaining the sign and digits of the exponent, so the returned string still denotes the same order of magnitude and never exceeds the width budget that callers rely on. (5) Both functions are pure: they must not mutate the value passed in, and `_format_value` must always return a `str` so that callers can pad, strip and concatenate the result directly."} +{"repo": "astropy/astropy", "buggy_commit": "c0a24c1dc957a3b565294213f435fefb2ec99714", "bug_issue": 14523, "solve_pr": 14539, "call_graph": {"nodes": [{"id": "astropy/io/fits/diff.py::TableDataDiff::_diff"}], "edges": []}, "graph_spec": "The table-data comparison must compare two table arrays by treating column names case-insensitively, honoring requested ignored fields (with \"*\" suppressing all further column differences), and separately recording unequal column counts and column definitions while retaining table order for reported one-sided names. It must identify exactly matching column definitions as common and compare only those: if row counts differ, record the two counts and perform no column-attribute or cell-value comparison; if both tables are empty, likewise stop after structural comparison. For comparable nonempty tables, record differing relevant column metadata and compare each common column’s rows, using configured relative/absolute tolerances for floating and variable-length numeric data and exact comparison otherwise. The total must count differing rows once per column even for multidimensional cells, retained value examples must be row-oriented and capped globally by numdiffs (or unlimited when negative), and the reported difference ratio must be the total differing table elements divided by rows times fields."} +{"repo": "astropy/astropy", "buggy_commit": "d1cf21c7349280adbb1606fab1d7ca5b375add72", "bug_issue": 14581, "solve_pr": 14598, "call_graph": {"nodes": [{"id": "astropy/io/fits/card.py::Card::_fix_value"}, {"id": "astropy/io/fits/card.py::Card::_parse_comment"}, {"id": "astropy/io/fits/card.py::Card::_parse_value"}, {"id": "astropy/io/fits/card.py::Card::_split"}, {"id": "astropy/io/fits/card.py::Card::_verify"}, {"id": "astropy/io/fits/card.py::Card::comment"}, {"id": "astropy/io/fits/card.py::Card::value"}, {"id": "astropy/io/fits/hdu/base.py::_NonstandardHDU::_verify"}, {"id": "astropy/io/fits/hdu/base.py::_ValidHDU::_verify"}, {"id": "astropy/io/fits/verify.py::_Verify::verify"}], "edges": [{"source": "astropy/io/fits/card.py::Card::_fix_value", "target": "astropy/io/fits/card.py::Card::_split"}, {"source": "astropy/io/fits/card.py::Card::_parse_comment", "target": "astropy/io/fits/card.py::Card::_split"}, {"source": "astropy/io/fits/card.py::Card::_parse_value", "target": "astropy/io/fits/card.py::Card::_split"}, {"source": "astropy/io/fits/card.py::Card::_verify", "target": "astropy/io/fits/card.py::Card::_split"}, {"source": "astropy/io/fits/card.py::Card::comment", "target": "astropy/io/fits/card.py::Card::_parse_comment"}, {"source": "astropy/io/fits/card.py::Card::value", "target": "astropy/io/fits/card.py::Card::_parse_value"}, {"source": "astropy/io/fits/hdu/base.py::_NonstandardHDU::_verify", "target": "astropy/io/fits/card.py::Card::_verify"}, {"source": "astropy/io/fits/hdu/base.py::_ValidHDU::_verify", "target": "astropy/io/fits/card.py::Card::_verify"}, {"source": "astropy/io/fits/verify.py::_Verify::verify", "target": "astropy/io/fits/card.py::Card::_verify"}]}, "graph_spec": "A FITS Card must lazily derive stable typed value and comment views from its serialized image: commentary or invalid cards retain their appropriate raw-text semantics, ordinary cards recognize boolean, quoted-string (including escaped quotes), numeric, complex, undefined, record-valued, and continued-long-string forms, and an unparseable ordinary value is reported rather than silently misinterpreted. Splitting must identify the keyword/value boundary correctly for standard, HIERARCH, special, commentary, and multi-card CONTINUE representations, combining continued text and comments without losing delimiters or continuation markers. Card validation must enforce printable ASCII where required, legal keyword form and capitalization, standard value-indicator placement, valid value syntax, and valid comments; when a selected repair-capable verification mode permits it, safe normalization must preserve the intended value/comment while marking the serialized form for regeneration, whereas intrinsically invalid content remains reportable. HDU validation must aggregate every header card's result, and for standard HDUs also require ordered mandatory SIMPLE/XTENSION, BITPIX, NAXIS, and in-range NAXISn cards with valid types/values, remove out-of-range axis cards only under the applicable mode, and require EXTNAME values to be strings. The public verification interface must accept only documented modes, support ignore, reporting, and optional repair independently, preserve nested diagnostics, warn or raise according to the reporting choice, and distinguish unresolved violations from safely handled ones."} +{"repo": "astropy/astropy", "buggy_commit": "d0ab1b8264f424178f6d49e29db7f20059cacff9", "bug_issue": 14978, "solve_pr": 14995, "call_graph": {"nodes": [{"id": "astropy/nddata/ccddata.py::decorator::inner"}, {"id": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_arithmetic"}, {"id": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_arithmetic_mask"}, {"id": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_prepare_then_do_arithmetic"}, {"id": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::add"}, {"id": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::mean"}, {"id": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::multiply"}], "edges": [{"source": "astropy/nddata/ccddata.py::decorator::inner", "target": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_prepare_then_do_arithmetic"}, {"source": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_arithmetic", "target": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_arithmetic_mask"}, {"source": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_prepare_then_do_arithmetic", "target": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_arithmetic"}, {"source": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::add", "target": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_prepare_then_do_arithmetic"}, {"source": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::mean", "target": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_prepare_then_do_arithmetic"}, {"source": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::multiply", "target": "astropy/nddata/mixins/ndarithmetic.py::NDArithmeticMixin::_prepare_then_do_arithmetic"}]}, "graph_spec": "The scoped nodes implement NDData-style arithmetic dispatch and, for CCDData, a unit-enforcing wrapper. Public operations `add`, `multiply`, and `mean` are thin entry points that must delegate to `_prepare_then_do_arithmetic` with the matching numpy reducing/binary function (`np.add`, `np.multiply`, `np.mean` respectively), so the operation identity and any collapse semantics (mean takes no explicit operand) stay consistent with the named method. `_prepare_then_do_arithmetic` is the single dispatch layer: called on an instance with one operand it treats `self` as the first operand and the argument as the second; called on the class it requires `operand2` and must raise `TypeError` when it is absent; in all cases plain arrays, quantities, or other NDData-like inputs must be coerced into the invoking class so the correct arithmetic implementation runs, and it must return a new instance of that same class. It must invoke `_arithmetic` with operands in the correct order and return the result paired with constructor keywords. `_arithmetic` must perform the operation on the data (preserving unit semantics), derive the accompanying attributes, and obtain the result mask from `_arithmetic_mask` only when a callable `handle_mask` is supplied; its contract is to return the resulting data together with the keyword arguments needed to build the result. `_arithmetic_mask` must preserve existing mask state: return `None` when neither operand has a mask, return a copy of the single available mask when only one operand is masked, and otherwise combine both masks through the supplied callable without mutating either input. The CCDData `inner` wrapper must relax the requirement that a constructed CCDData carry a unit only for the duration of the intermediate arithmetic step, then restore that requirement so the final returned CCDData is validated as having a unit; the temporary relaxation must not leak past the call, including on the error path."} +{"repo": "astropy/astropy", "buggy_commit": "732d89c2940156bdc0e200bb36dc38b5e424bcba", "bug_issue": 7335, "solve_pr": 7336, "call_graph": {"nodes": [{"id": "astropy/units/decorators.py::QuantityInput::__call__"}], "edges": []}, "graph_spec": "QuantityInput.__call__ takes a function and returns a decorated callable that enforces its declared unit requirements for quantity arguments and supports declared output units. In this context, quantities combine values with physical units, and unit compatibility expresses whether they represent compatible physical types, allowing function interfaces to specify the physical meaning of their inputs and outputs."} +{"repo": "astropy/astropy", "buggy_commit": "a7141cd90019b62688d507ae056298507678c058", "bug_issue": 7670, "solve_pr": 7671, "call_graph": {"nodes": [{"id": "astropy/utils/introspection.py::minversion"}], "edges": []}, "graph_spec": "`minversion` checks whether a Python module satisfies a minimum version requirement and returns a Boolean result. It supports dependency compatibility assessment by relating a module’s reported version to a requested version requirement."} +{"repo": "astropy/astropy", "buggy_commit": "1a4462d72eb03f30dc83a879b1dd57aac8b2c18b", "bug_issue": 8340, "solve_pr": 14096, "call_graph": {"nodes": [{"id": "astropy/coordinates/sky_coordinate.py::SkyCoord::__getattr__"}], "edges": []}, "graph_spec": "`SkyCoord.__getattr__` must provide a high-level, read-only attribute interface once its underlying coordinate frame is initialized: an alias for the current frame returns the same `SkyCoord`; any globally recognized frame attribute resolves to the underlying frame when that frame defines it, otherwise to the coordinate’s retained extra value (or `None` when absent); and public attributes supplied by the underlying frame remain transparently available. A recognized frame-name alias must produce a transformed `SkyCoord` only when the current frame is transformable to that target; unrecognized, private, or unavailable names must retain normal Python attribute-access behavior and raise the appropriate `AttributeError`. This resolution must not run against a partially initialized object."} +{"repo": "astropy/astropy", "buggy_commit": "b750a0e6ee76fb6b8a099a4d16ec51977be46bf6", "bug_issue": 8613, "solve_pr": 8872, "call_graph": {"nodes": [{"id": "astropy/units/quantity.py::Quantity::__new__"}], "edges": []}, "graph_spec": "`Quantity.__new__` must construct an ndarray-backed quantity whose numeric values and attached unit describe the same physical values as the input: normalize any supplied or discovered unit; parse numeric strings with optional units; use the first unit and convert every member for nonempty sequences of quantities; and, for other unit-bearing inputs, retain or convert from their declared unit. Inputs without a unit use the class default (dimensionless for `Quantity`), while invalid unit declarations or nonnumeric values raise `TypeError`. A requested target unit must convert compatible input values accordingly. The resulting array must honor NumPy dtype, shape, order, and copy semantics, defaulting integer/unsigned/object numeric inputs to floating point when no dtype is requested; existing quantities may be returned/viewed without copying when permitted. With `subok=True`, an appropriate unit-associated or compatible quantity subclass may be preserved or selected, and the final unit assignment must satisfy that subclass's unit constraints."} +{"repo": "astropy/astropy", "buggy_commit": "a85a0747c54bac75e9c3b2fe436b105ea029d6cf", "bug_issue": 8706, "solve_pr": 8707, "call_graph": {"nodes": [{"id": "astropy/io/fits/card.py::Card::_itersubcards"}, {"id": "astropy/io/fits/card.py::Card::_parse_comment"}, {"id": "astropy/io/fits/card.py::Card::_parse_value"}, {"id": "astropy/io/fits/card.py::Card::comment"}, {"id": "astropy/io/fits/card.py::Card::fromstring"}, {"id": "astropy/io/fits/card.py::Card::value"}, {"id": "astropy/io/fits/header.py::Header::fromstring"}, {"id": "astropy/io/fits/header.py::_BasicHeader::__getitem__"}, {"id": "astropy/io/fits/header.py::_BasicHeaderCards::__getitem__"}, {"id": "astropy/io/fits/header.py::_DelayedHeader::__get__"}], "edges": [{"source": "astropy/io/fits/card.py::Card::_itersubcards", "target": "astropy/io/fits/card.py::Card::fromstring"}, {"source": "astropy/io/fits/card.py::Card::_parse_comment", "target": "astropy/io/fits/card.py::Card::_itersubcards"}, {"source": "astropy/io/fits/card.py::Card::_parse_value", "target": "astropy/io/fits/card.py::Card::_itersubcards"}, {"source": "astropy/io/fits/card.py::Card::comment", "target": "astropy/io/fits/card.py::Card::_parse_comment"}, {"source": "astropy/io/fits/card.py::Card::value", "target": "astropy/io/fits/card.py::Card::_parse_value"}, {"source": "astropy/io/fits/header.py::_BasicHeader::__getitem__", "target": "astropy/io/fits/card.py::Card::fromstring"}, {"source": "astropy/io/fits/header.py::_BasicHeaderCards::__getitem__", "target": "astropy/io/fits/card.py::Card::fromstring"}, {"source": "astropy/io/fits/header.py::_DelayedHeader::__get__", "target": "astropy/io/fits/header.py::Header::fromstring"}]}, "graph_spec": "FITS card and header access must preserve lazy, repeatable interpretation of raw card images: Card parsing accepts text or bytes with equivalent card content, pads short images, and retains overlength images as logical long-string cards. A long card must split into complete 80-character subcards whose continuation pieces are `CONTINUE` cards with string values; its logical value concatenates their string fragments after unescaping doubled quotes and removing trailing continuation markers, while its comment combines nonempty subcard comments. Ordinary cards must expose correctly typed boolean, string, numeric, complex, or undefined values and their associated comments; commentary or invalid cards retain their textual value semantics and have no parsed comment. Header parsing from text or bytes must preserve the input, split cards safely according to whether the separator can occur in valid card content, coalesce consecutive `CONTINUE` images into one logical card, stop at `END`, and omit that terminator. Header lookups must return parsed values (mapping undefined to `None`, with the raw value for top-level record-valued-keyword lookup), while lightweight header/card access and delayed headers parse and cache cards or the full header only on first access, then return the same cached objects."} +{"repo": "caddyserver/caddy", "buggy_commit": "754078da65b6d5e2901989b8c92d3fd51c3f8a4f", "bug_issue": 8272, "solve_pr": 8025, "call_graph": {"nodes": [{"id": "modules/caddyhttp/encode/encode.go::AcceptedEncodings"}, {"id": "modules/caddyhttp/encode/encode.go::Encode::ServeHTTP"}, {"id": "modules/caddyhttp/fileserver/staticfiles.go::FileServer::ServeHTTP"}], "edges": [{"source": "modules/caddyhttp/encode/encode.go::Encode::ServeHTTP", "target": "modules/caddyhttp/encode/encode.go::AcceptedEncodings"}, {"source": "modules/caddyhttp/fileserver/staticfiles.go::FileServer::ServeHTTP", "target": "modules/caddyhttp/encode/encode.go::AcceptedEncodings"}]}, "graph_spec": "These functions support HTTP content-encoding negotiation, which relates client-supported compression formats to response delivery. AcceptedEncodings identifies the encodings supported by a request with client and server preferences taken into account; Encode.ServeHTTP provides response-encoding middleware, while FileServer.ServeHTTP serves static files with support for precompressed representations. Both handlers use AcceptedEncodings to connect their delivery responsibilities to the client's encoding capabilities."} +{"repo": "caddyserver/caddy", "buggy_commit": "71c5812cfeb7ce9ab471d323ccd98e6fb7cf8d26", "bug_issue": 8283, "solve_pr": 8288, "call_graph": {"nodes": [{"id": "modules/caddytls/acmeissuer.go::ACMEIssuer::makeIssuerTemplate"}], "edges": []}, "graph_spec": "ACMEIssuer.makeIssuerTemplate prepares a CertMagic ACME issuer template from Caddy’s issuer configuration and context, returning the template and an error status. It supports certificate management through ACME (RFC 8555), the protocol used to automate interactions with certificate authorities."} +{"repo": "caddyserver/caddy", "buggy_commit": "71c5812cfeb7ce9ab471d323ccd98e6fb7cf8d26", "bug_issue": 8286, "solve_pr": 8287, "call_graph": {"nodes": [{"id": "caddyconfig/httpcaddyfile/tlsapp.go::consolidateAutomationPolicies"}], "edges": []}, "graph_spec": "consolidateAutomationPolicies accepts and returns a collection of TLS certificate automation policies, combining equivalent policies for cleaner configuration output. These policies govern automated certificate management, including obtaining, renewing, and revoking managed TLS certificates."} +{"repo": "caddyserver/caddy", "buggy_commit": "eb04ed52be5e66c467e9e614bd917b8bb4150d1b", "bug_issue": 8308, "solve_pr": 8309, "call_graph": {"nodes": [{"id": "modules/caddyhttp/reverseproxy/reverseproxy.go::Handler::finalizeResponse"}, {"id": "modules/caddyhttp/reverseproxy/reverseproxy.go::Handler::proxyLoopIteration"}, {"id": "modules/caddyhttp/reverseproxy/reverseproxy.go::Handler::reverseProxy"}, {"id": "modules/caddyhttp/reverseproxy/streaming.go::Handler::handleUpgradeResponse"}, {"id": "modules/caddyhttp/reverseproxy/streaming.go::writeCloseControl"}], "edges": [{"source": "modules/caddyhttp/reverseproxy/reverseproxy.go::Handler::finalizeResponse", "target": "modules/caddyhttp/reverseproxy/streaming.go::Handler::handleUpgradeResponse"}, {"source": "modules/caddyhttp/reverseproxy/reverseproxy.go::Handler::proxyLoopIteration", "target": "modules/caddyhttp/reverseproxy/reverseproxy.go::Handler::reverseProxy"}, {"source": "modules/caddyhttp/reverseproxy/reverseproxy.go::Handler::reverseProxy", "target": "modules/caddyhttp/reverseproxy/reverseproxy.go::Handler::finalizeResponse"}, {"source": "modules/caddyhttp/reverseproxy/streaming.go::Handler::handleUpgradeResponse", "target": "modules/caddyhttp/reverseproxy/streaming.go::writeCloseControl"}]}, "graph_spec": "These functions support reverse proxying: proxyLoopIteration coordinates a proxy attempt, reverseProxy exchanges an HTTP request and response with an upstream backend, and finalizeResponse prepares and copies the response to the client. handleUpgradeResponse handles protocol upgrades for bidirectional communication, while writeCloseControl sends WebSocket close control messages to support connection shutdown."} +{"repo": "caddyserver/caddy", "buggy_commit": "fbfc061e70d51f17b8004a71aed88dbd2a41f70e", "bug_issue": 8353, "solve_pr": 8352, "call_graph": {"nodes": [{"id": "modules/caddyhttp/fileserver/matcher.go::MatchFile::Match"}, {"id": "modules/caddyhttp/fileserver/matcher.go::MatchFile::MatchWithError"}, {"id": "modules/caddyhttp/fileserver/matcher.go::MatchFile::selectFile"}], "edges": [{"source": "modules/caddyhttp/fileserver/matcher.go::MatchFile::Match", "target": "modules/caddyhttp/fileserver/matcher.go::MatchFile::selectFile"}, {"source": "modules/caddyhttp/fileserver/matcher.go::MatchFile::MatchWithError", "target": "modules/caddyhttp/fileserver/matcher.go::MatchFile::selectFile"}]}, "graph_spec": "These functions support HTTP request matching based on filesystem existence, connecting request routing with files and directories under a site root. Match and MatchWithError expose a match decision through interfaces without and with an error return, while selectFile supplies their shared file-selection responsibility according to the configured candidates and policy. The matcher also exposes file metadata through placeholders for use in request processing, such as rewriting."} +{"repo": "caddyserver/caddy", "buggy_commit": "e3271947ee053b0c43df2fad88a36728482bc3ff", "bug_issue": 8367, "solve_pr": 8372, "call_graph": {"nodes": [{"id": "modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go::parsePHPFastCGI"}], "edges": []}, "graph_spec": "parsePHPFastCGI translates the Caddyfile php_fastcgi directive into HTTP handler configuration for serving PHP applications through FastCGI, a protocol connecting a web server to an application responder. It provides a PHP-oriented configuration shortcut using reverse-proxy directive syntax and returns configuration values or a parsing error."} +{"repo": "caddyserver/caddy", "buggy_commit": "9ea3108377d2abec102866808133c40ac9582162", "bug_issue": 8390, "solve_pr": 8391, "call_graph": {"nodes": [{"id": "modules/caddyhttp/fileserver/matcher.go::MatchFile::Match"}, {"id": "modules/caddyhttp/fileserver/matcher.go::MatchFile::MatchWithError"}, {"id": "modules/caddyhttp/fileserver/matcher.go::MatchFile::cleanSplit"}, {"id": "modules/caddyhttp/fileserver/matcher.go::MatchFile::selectFile"}], "edges": [{"source": "modules/caddyhttp/fileserver/matcher.go::MatchFile::Match", "target": "modules/caddyhttp/fileserver/matcher.go::MatchFile::selectFile"}, {"source": "modules/caddyhttp/fileserver/matcher.go::MatchFile::MatchWithError", "target": "modules/caddyhttp/fileserver/matcher.go::MatchFile::selectFile"}, {"source": "modules/caddyhttp/fileserver/matcher.go::MatchFile::selectFile", "target": "modules/caddyhttp/fileserver/matcher.go::MatchFile::cleanSplit"}]}, "graph_spec": "These functions support HTTP request matching based on filesystem existence: Match and MatchWithError expose a matching decision, with the latter also returning an error. Within that scope, selectFile selects a filesystem candidate under the configured root and selection policy, while cleanSplit normalizes and splits candidate paths into a filesystem portion and a remainder. File matching also supplies path metadata through placeholders for use in request rewriting."} +{"repo": "caddyserver/caddy", "buggy_commit": "258863f6f6485863f7a12bc9fa02a29472b29ed5", "bug_issue": 8393, "solve_pr": 8394, "call_graph": {"nodes": [{"id": "modules/caddytls/connpolicy.go::ClientAuthentication::ConfigureTLSConfig"}, {"id": "modules/caddytls/connpolicy.go::ConnectionPolicies::Provision"}, {"id": "modules/caddytls/connpolicy.go::ConnectionPolicy::buildStandardTLSConfig"}], "edges": [{"source": "modules/caddytls/connpolicy.go::ConnectionPolicies::Provision", "target": "modules/caddytls/connpolicy.go::ConnectionPolicy::buildStandardTLSConfig"}, {"source": "modules/caddytls/connpolicy.go::ConnectionPolicy::buildStandardTLSConfig", "target": "modules/caddytls/connpolicy.go::ClientAuthentication::ConfigureTLSConfig"}]}, "graph_spec": "These functions prepare connection policies governing TLS handshakes: ConnectionPolicies.Provision sets up the policies, and ConnectionPolicy.buildStandardTLSConfig prepares a policy’s standard-library TLS configuration for serving connections. ClientAuthentication.ConfigureTLSConfig applies TLS client authentication settings to that configuration, supporting certificate-based authentication of connecting clients."} +{"repo": "django/django", "buggy_commit": "36bc47069ce071e80c8129500de3b8664d2058a7", "bug_issue": 11707, "solve_pr": 13315, "call_graph": {"nodes": [{"id": "django/forms/models.py::BaseModelForm::__init__"}, {"id": "django/forms/models.py::apply_limit_choices_to_to_formfield"}], "edges": [{"source": "django/forms/models.py::BaseModelForm::__init__", "target": "django/forms/models.py::apply_limit_choices_to_to_formfield"}]}, "graph_spec": "BaseModelForm.__init__ initializes a model-backed form using form data, model-instance context, and form configuration, supporting forms for creating and editing model records. Within that initialization scope, apply_limit_choices_to_to_formfield applies declared choice restrictions to a form field’s queryset, connecting model relationship constraints with the records available for selection in the form."} +{"repo": "django/django", "buggy_commit": "e1d673c373a7d032060872b690a92fc95496612e", "bug_issue": 16063, "solve_pr": 15022, "call_graph": {"nodes": [{"id": "django/contrib/admin/options.py::ModelAdmin::get_search_results"}, {"id": "django/contrib/admin/views/autocomplete.py::AutocompleteJsonView::get"}, {"id": "django/contrib/admin/views/autocomplete.py::AutocompleteJsonView::get_queryset"}, {"id": "django/contrib/admin/views/main.py::ChangeList::__init__"}, {"id": "django/contrib/admin/views/main.py::ChangeList::get_queryset"}], "edges": [{"source": "django/contrib/admin/views/autocomplete.py::AutocompleteJsonView::get", "target": "django/contrib/admin/views/autocomplete.py::AutocompleteJsonView::get_queryset"}, {"source": "django/contrib/admin/views/autocomplete.py::AutocompleteJsonView::get_queryset", "target": "django/contrib/admin/options.py::ModelAdmin::get_search_results"}, {"source": "django/contrib/admin/views/main.py::ChangeList::__init__", "target": "django/contrib/admin/views/main.py::ChangeList::get_queryset"}, {"source": "django/contrib/admin/views/main.py::ChangeList::get_queryset", "target": "django/contrib/admin/options.py::ModelAdmin::get_search_results"}]}, "graph_spec": "Admin search must operate on the model-admin queryset appropriate to the request and return both the narrowed queryset and an accurate indication of whether relation-spanning lookups can duplicate objects. When search fields and a nonempty term are present, each whitespace-delimited term (with quoted literals kept together and unescaped) must match at least one configured field, while all terms must match; searches spanning multi-valued relationships must return the correct matching objects without changing results as additional terms are added. Field prefixes select case-insensitive starts-with, exact, or full-text lookup behavior, explicit valid lookups are retained, and other fields use case-insensitive containment. Autocomplete must authorize the related model, constrain choices by the source relation, apply this same search contract, remove duplicates when indicated, and serialize the requested page with a correct continuation flag. A change list must establish its request-derived query and validated parameters before building results, apply permitted list/date/remaining filters before search, preserve a clear-filters query state, collapse duplicates introduced by either filtering or search without losing the filtered result set, then apply deterministic ordering and configured related-object selection."} +{"repo": "django/django", "buggy_commit": "361bb8f786f112ee275be136795c0b1ecefff928", "bug_issue": 23273, "solve_pr": 15252, "call_graph": {"nodes": [{"id": "django/core/management/commands/migrate.py::Command::handle"}, {"id": "django/db/migrations/executor.py::MigrationExecutor::migrate"}], "edges": [{"source": "django/core/management/commands/migrate.py::Command::handle", "target": "django/db/migrations/executor.py::MigrationExecutor::migrate"}]}, "graph_spec": "Django migrations represent model changes that can be applied to or unapplied from a database to evolve its schema. Command.handle provides the management-command entry point for synchronizing database state with models and migrations, delegating migration execution to MigrationExecutor.migrate, which brings the database to the requested migration targets."} +{"repo": "django/django", "buggy_commit": "ce69e34bd646558bb44ea92cecfd98b345a0b3e0", "bug_issue": 23740, "solve_pr": 15732, "call_graph": {"nodes": [{"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_delete_composed_index"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_unique_together"}], "edges": [{"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_unique_together", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_delete_composed_index"}]}, "graph_spec": "These schema editor functions manage database schema changes involving groups of model fields, including joint uniqueness, where field values must be unique in combination. alter_unique_together updates a model table’s unique constraints to reflect changes in its declared field groups, while _delete_composed_index supports removal of a composite index or constraint associated with a group of fields."} +{"repo": "django/django", "buggy_commit": "8c3bd0b708b488a1f6e8bd8cc6b96569904605be", "bug_issue": 25255, "solve_pr": 14500, "call_graph": {"nodes": [{"id": "django/core/management/commands/migrate.py::Command::handle"}, {"id": "django/db/migrations/executor.py::MigrationExecutor::_migrate_all_backwards"}, {"id": "django/db/migrations/executor.py::MigrationExecutor::migrate"}, {"id": "django/db/migrations/executor.py::MigrationExecutor::unapply_migration"}], "edges": [{"source": "django/core/management/commands/migrate.py::Command::handle", "target": "django/db/migrations/executor.py::MigrationExecutor::migrate"}, {"source": "django/db/migrations/executor.py::MigrationExecutor::_migrate_all_backwards", "target": "django/db/migrations/executor.py::MigrationExecutor::unapply_migration"}, {"source": "django/db/migrations/executor.py::MigrationExecutor::migrate", "target": "django/db/migrations/executor.py::MigrationExecutor::_migrate_all_backwards"}]}, "graph_spec": "The migrate command must validate the selected database’s migration history and reject conflicting targets before executing a non-dry-run plan; it must derive the requested targets, preserve fake/fake-initial choices only when work is planned, and hand migration execution a state representing currently applied migrations. The executor must ensure migration-record storage exists, accept an empty plan as a no-op that returns the current project state, reject plans that mix forward and backward actions, and route an all-backward plan through rollback processing. Rollback processing must compute the project state immediately before each migration to be unapplied while incorporating only actually applied unrelated migrations, unapply the requested migrations in plan order using those exact pre-migration states, and return a final state containing precisely the migrations still applied. Each unapplication must issue progress notifications, execute reverse schema operations unless faked, and ensure migration history no longer marks the migration or any migration it replaces as applied."} +{"repo": "django/django", "buggy_commit": "e28671187903e6aca2428374fdd504fca3032aee", "bug_issue": 26431, "solve_pr": 11477, "call_graph": {"nodes": [{"id": "django/urls/resolvers.py::RegexPattern::match"}, {"id": "django/urls/resolvers.py::URLResolver::resolve"}], "edges": [{"source": "django/urls/resolvers.py::URLResolver::resolve", "target": "django/urls/resolvers.py::RegexPattern::match"}]}, "graph_spec": "Django URL configurations map URL path expressions to views, with captured path components supplying view arguments. RegexPattern.match provides regular-expression matching of URL paths, while URLResolver.resolve uses URL configuration patterns to identify the corresponding view and produce resolution information containing its arguments and URL metadata."} +{"repo": "django/django", "buggy_commit": "335c9c94acf263901fb023404408880245b0c4b4", "bug_issue": 26813, "solve_pr": 12406, "call_graph": {"nodes": [{"id": "django/db/models/fields/related.py::ForeignKey::formfield"}, {"id": "django/forms/models.py::ModelChoiceField::__init__"}], "edges": [{"source": "django/db/models/fields/related.py::ForeignKey::formfield", "target": "django/db/models/fields/related.py::ForeignKey::formfield"}]}, "graph_spec": "Form fields for relationships must reject unresolved string related models; otherwise they must produce a model-choice field over the related model’s default manager on the requested database alias, identify submitted values by the foreign key’s target field, preserve caller-supplied overrides where supported, and require input when the model field disallows blank values. Related choice limits, including callables, must be carried through without premature evaluation. The resulting field must retain the queryset, limit, and target-field configuration, initialize ordinary field metadata, keep choice widgets synchronized with queryset state, and expose an empty choice only when permitted: it is suppressed for required fields with an initial value and for required relationship fields rendered with radio widgets unless blank is allowed."} +{"repo": "django/django", "buggy_commit": "882f99031e6e447384bfe22044cc980567d2f40d", "bug_issue": 28054, "solve_pr": 16502, "call_graph": {"nodes": [{"id": "django/core/servers/basehttp.py::ServerHandler::cleanup_headers"}], "edges": []}, "graph_spec": "ServerHandler.cleanup_headers is a response-header preparation hook in Django’s development HTTP server. It operates within the server’s WSGI handling, where WSGI provides the standard interface between Python web applications and web servers, and HTTP response headers carry response metadata."} +{"repo": "django/django", "buggy_commit": "c84b91b7603e488f7171fdff8f08368ef3d6b856", "bug_issue": 28373, "solve_pr": 11138, "call_graph": {"nodes": [{"id": "django/db/backends/mysql/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"id": "django/db/backends/mysql/operations.py::DatabaseOperations::datetime_cast_date_sql"}, {"id": "django/db/backends/mysql/operations.py::DatabaseOperations::datetime_cast_time_sql"}, {"id": "django/db/backends/mysql/operations.py::DatabaseOperations::datetime_extract_sql"}, {"id": "django/db/backends/mysql/operations.py::DatabaseOperations::datetime_trunc_sql"}, {"id": "django/db/backends/oracle/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"id": "django/db/backends/oracle/operations.py::DatabaseOperations::datetime_cast_date_sql"}, {"id": "django/db/backends/oracle/operations.py::DatabaseOperations::datetime_extract_sql"}, {"id": "django/db/backends/oracle/operations.py::DatabaseOperations::datetime_trunc_sql"}, {"id": "django/db/backends/sqlite3/base.py::DatabaseWrapper::get_new_connection"}, {"id": "django/db/backends/sqlite3/base.py::_sqlite_date_trunc"}, {"id": "django/db/backends/sqlite3/base.py::_sqlite_datetime_cast_date"}, {"id": "django/db/backends/sqlite3/base.py::_sqlite_datetime_cast_time"}, {"id": "django/db/backends/sqlite3/base.py::_sqlite_datetime_extract"}, {"id": "django/db/backends/sqlite3/base.py::_sqlite_datetime_parse"}, {"id": "django/db/backends/sqlite3/base.py::_sqlite_datetime_trunc"}, {"id": "django/db/backends/sqlite3/operations.py::DatabaseOperations::_convert_tzname_to_sql"}, {"id": "django/db/backends/sqlite3/operations.py::DatabaseOperations::datetime_cast_date_sql"}, {"id": "django/db/backends/sqlite3/operations.py::DatabaseOperations::datetime_cast_time_sql"}, {"id": "django/db/backends/sqlite3/operations.py::DatabaseOperations::datetime_extract_sql"}, {"id": "django/db/backends/sqlite3/operations.py::DatabaseOperations::datetime_trunc_sql"}], "edges": [{"source": "django/db/backends/mysql/operations.py::DatabaseOperations::datetime_cast_date_sql", "target": "django/db/backends/mysql/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"source": "django/db/backends/mysql/operations.py::DatabaseOperations::datetime_cast_time_sql", "target": "django/db/backends/mysql/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"source": "django/db/backends/mysql/operations.py::DatabaseOperations::datetime_extract_sql", "target": "django/db/backends/mysql/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"source": "django/db/backends/mysql/operations.py::DatabaseOperations::datetime_trunc_sql", "target": "django/db/backends/mysql/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"source": "django/db/backends/oracle/operations.py::DatabaseOperations::datetime_cast_date_sql", "target": "django/db/backends/oracle/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"source": "django/db/backends/oracle/operations.py::DatabaseOperations::datetime_extract_sql", "target": "django/db/backends/oracle/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"source": "django/db/backends/oracle/operations.py::DatabaseOperations::datetime_trunc_sql", "target": "django/db/backends/oracle/operations.py::DatabaseOperations::_convert_field_to_tz"}, {"source": "django/db/backends/sqlite3/base.py::_sqlite_date_trunc", "target": "django/db/backends/sqlite3/base.py::_sqlite_datetime_parse"}, {"source": "django/db/backends/sqlite3/base.py::_sqlite_datetime_cast_date", "target": "django/db/backends/sqlite3/base.py::_sqlite_datetime_parse"}, {"source": "django/db/backends/sqlite3/base.py::_sqlite_datetime_cast_time", "target": "django/db/backends/sqlite3/base.py::_sqlite_datetime_parse"}, {"source": "django/db/backends/sqlite3/base.py::_sqlite_datetime_extract", "target": "django/db/backends/sqlite3/base.py::_sqlite_datetime_parse"}, {"source": "django/db/backends/sqlite3/base.py::_sqlite_datetime_trunc", "target": "django/db/backends/sqlite3/base.py::_sqlite_datetime_parse"}, {"source": "django/db/backends/sqlite3/operations.py::DatabaseOperations::datetime_cast_date_sql", "target": "django/db/backends/sqlite3/operations.py::DatabaseOperations::_convert_tzname_to_sql"}, {"source": "django/db/backends/sqlite3/operations.py::DatabaseOperations::datetime_cast_time_sql", "target": "django/db/backends/sqlite3/operations.py::DatabaseOperations::_convert_tzname_to_sql"}, {"source": "django/db/backends/sqlite3/operations.py::DatabaseOperations::datetime_extract_sql", "target": "django/db/backends/sqlite3/operations.py::DatabaseOperations::_convert_tzname_to_sql"}, {"source": "django/db/backends/sqlite3/operations.py::DatabaseOperations::datetime_trunc_sql", "target": "django/db/backends/sqlite3/operations.py::DatabaseOperations::_convert_tzname_to_sql"}]}, "graph_spec": "Datetime date/time casts, extraction, and truncation must evaluate the stored timestamp in the requested timezone whenever timezone support is enabled and that timezone differs from the connection timezone; otherwise they must retain the original value. Each backend must then return the semantically correct date, time, component, or bucket boundary, including calendar-quarter and ISO-week behavior, with lower-order time fields reset for truncation. Oracle must reject unsafe timezone identifiers before embedding them in SQL. SQLite must register the SQL functions used by its generated expressions on every new connection; those functions must consistently parse nullable timestamp text, return NULL for absent or unparseable input, interpret a connection timezone before converting to the requested timezone, and preserve the resulting local date/time and ISO-derived extraction semantics."} +{"repo": "django/django", "buggy_commit": "d687febce5868545f99974d2499a91f81a32fef5", "bug_issue": 28384, "solve_pr": 16661, "call_graph": {"nodes": [{"id": "django/contrib/admin/options.py::BaseModelAdmin::lookup_allowed"}, {"id": "django/contrib/admin/views/main.py::ChangeList::get_filters"}, {"id": "django/contrib/admin/views/main.py::ChangeList::get_queryset"}], "edges": [{"source": "django/contrib/admin/views/main.py::ChangeList::get_filters", "target": "django/contrib/admin/options.py::BaseModelAdmin::lookup_allowed"}, {"source": "django/contrib/admin/views/main.py::ChangeList::get_queryset", "target": "django/contrib/admin/views/main.py::ChangeList::get_filters"}]}, "graph_spec": "Admin changelist filtering must validate every non-ignored query-string lookup value before it affects the queryset: local or unresolvable-field lookups and ForeignKey limit-choice parameters remain permissible, while multi-relation traversals are permissible only when represented by the configured list filters or date hierarchy. It must construct usable filter specifications while consuming their parameters, record whether active filtering or joins can duplicate rows, translate a selected date-hierarchy year/month/day into a timezone-aware (when enabled) inclusive-start/exclusive-end range, and reject malformed dates or invalid remaining field paths as incorrect lookup parameters. The resulting queryset must start from the admin root queryset, apply each applicable filter and then the validated residual lookups, preserve special query errors while normalizing other lookup failures, apply search, expose a clear-filters query string, eliminate duplicates when either filtering or search can introduce them, and finally apply ordering and needed related-object selection."} +{"repo": "django/django", "buggy_commit": "179ee13eb37348cd87169a198aec18fedccc8668", "bug_issue": 28607, "solve_pr": 14053, "call_graph": {"nodes": [{"id": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::collect"}, {"id": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::handle"}, {"id": "django/contrib/staticfiles/storage.py::HashedFilesMixin::post_process"}], "edges": [{"source": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::collect", "target": "django/contrib/staticfiles/storage.py::HashedFilesMixin::post_process"}, {"source": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::handle", "target": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::collect"}]}, "graph_spec": "Command.handle provides the management-command entry point, and Command.collect performs the collection of static assets into a shared deployment location. HashedFilesMixin.post_process prepares collected assets for cache-busting by producing content-hashed filenames and updating references between assets, reporting file-processing results."} +{"repo": "django/django", "buggy_commit": "f0adf3b9b7a19cdee05368ff0c0c2d087f011180", "bug_issue": 28690, "solve_pr": 11848, "call_graph": {"nodes": [{"id": "django/contrib/staticfiles/views.py::serve"}, {"id": "django/middleware/http.py::ConditionalGetMiddleware::process_response"}, {"id": "django/utils/cache.py::get_conditional_response"}, {"id": "django/utils/http.py::parse_http_date"}, {"id": "django/utils/http.py::parse_http_date_safe"}, {"id": "django/views/decorators/http.py::decorator::inner"}, {"id": "django/views/static.py::serve"}, {"id": "django/views/static.py::was_modified_since"}], "edges": [{"source": "django/contrib/staticfiles/views.py::serve", "target": "django/views/static.py::serve"}, {"source": "django/middleware/http.py::ConditionalGetMiddleware::process_response", "target": "django/utils/cache.py::get_conditional_response"}, {"source": "django/middleware/http.py::ConditionalGetMiddleware::process_response", "target": "django/utils/http.py::parse_http_date_safe"}, {"source": "django/utils/cache.py::get_conditional_response", "target": "django/utils/http.py::parse_http_date_safe"}, {"source": "django/utils/http.py::parse_http_date_safe", "target": "django/utils/http.py::parse_http_date"}, {"source": "django/views/decorators/http.py::decorator::inner", "target": "django/utils/cache.py::get_conditional_response"}, {"source": "django/views/static.py::serve", "target": "django/views/static.py::was_modified_since"}, {"source": "django/views/static.py::was_modified_since", "target": "django/utils/http.py::parse_http_date"}]}, "graph_spec": "Static-file serving must be limited to the permitted development context, normalize and safely resolve requested paths, reject missing resources and disallowed directory indexes, and delegate located static assets to the common file-serving behavior. File responses must honor a valid If-Modified-Since value (including its optional length qualifier) by returning 304 only when the resource’s size and whole-second modification time show it has not changed; otherwise return the file with its Last-Modified metadata. HTTP dates must accept the three standard HTTP date syntaxes and yield UTC epoch seconds, while the safe parser treats malformed input as absent. Conditional evaluation must apply only to successful responses and enforce request preconditions in HTTP order: If-Match, then If-Unmodified-Since only when no If-Match is supplied, then If-None-Match, then If-Modified-Since only when no If-None-Match is supplied; failed preconditions produce 412, whereas a matching retrieval precondition produces 304 for GET/HEAD with required cache and validator headers preserved. The middleware must perform this evaluation for GET responses with available validators (adding an ETag when allowed), and the condition decorator must compute and attach supplied validators for safe requests without replacing headers already set by the view."} +{"repo": "django/django", "buggy_commit": "ec5aa2161d8015a3fe57dcbbfe14200cd18f0a16", "bug_issue": 28925, "solve_pr": 13121, "call_graph": {"nodes": [{"id": "django/db/models/expressions.py::Combinable::__add__"}, {"id": "django/db/models/expressions.py::Combinable::__mod__"}, {"id": "django/db/models/expressions.py::Combinable::__mul__"}, {"id": "django/db/models/expressions.py::Combinable::__radd__"}, {"id": "django/db/models/expressions.py::Combinable::__rmul__"}, {"id": "django/db/models/expressions.py::Combinable::__rsub__"}, {"id": "django/db/models/expressions.py::Combinable::__sub__"}, {"id": "django/db/models/expressions.py::Combinable::__truediv__"}, {"id": "django/db/models/expressions.py::Combinable::_combine"}, {"id": "django/db/models/expressions.py::CombinedExpression::as_sql"}], "edges": [{"source": "django/db/models/expressions.py::Combinable::__add__", "target": "django/db/models/expressions.py::Combinable::_combine"}, {"source": "django/db/models/expressions.py::Combinable::__mod__", "target": "django/db/models/expressions.py::Combinable::_combine"}, {"source": "django/db/models/expressions.py::Combinable::__mul__", "target": "django/db/models/expressions.py::Combinable::_combine"}, {"source": "django/db/models/expressions.py::Combinable::__radd__", "target": "django/db/models/expressions.py::Combinable::_combine"}, {"source": "django/db/models/expressions.py::Combinable::__rmul__", "target": "django/db/models/expressions.py::Combinable::_combine"}, {"source": "django/db/models/expressions.py::Combinable::__rsub__", "target": "django/db/models/expressions.py::Combinable::_combine"}, {"source": "django/db/models/expressions.py::Combinable::__sub__", "target": "django/db/models/expressions.py::Combinable::_combine"}, {"source": "django/db/models/expressions.py::Combinable::__truediv__", "target": "django/db/models/expressions.py::Combinable::_combine"}, {"source": "django/db/models/expressions.py::CombinedExpression::as_sql", "target": "django/db/models/expressions.py::CombinedExpression::as_sql"}]}, "graph_spec": "Arithmetic operators on combinable expressions must construct a CombinedExpression with the matching SQL connector and preserve operand order, including reversed addition, subtraction, and multiplication; non-expression operands must be incorporated as equivalent values, and timedelta operands must preserve duration semantics. SQL compilation must compile the left then right operand, concatenate parameters in that same order, use the backend’s expression-combining operation, and parenthesize the result to preserve precedence. On backends without native duration support, arithmetic involving durations must yield correctly convertible DurationField results without conversion errors, and subtraction of two like date, datetime, or time expressions must use temporal subtraction so it yields the appropriate duration semantics."} +{"repo": "django/django", "buggy_commit": "b9cf764be62e77b4777b3a75ec256f6209a57671", "bug_issue": 29528, "solve_pr": 10097, "call_graph": {"nodes": [{"id": "django/core/validators.py::URLValidator::__call__"}], "edges": [{"source": "django/core/validators.py::URLValidator::__call__", "target": "django/core/validators.py::URLValidator::__call__"}]}, "graph_spec": "URLValidator.__call__ must either accept a complete URL or raise ValidationError with its configured message and code. It must compare the scheme case-insensitively against the configured scheme list (defaulting to HTTP, HTTPS, FTP, and FTPS), require a syntactically valid authority and optional credentials, port, and resource component, and support localhost, IPv4, bracketed IPv6, and Unicode domain names by validating an IDNA/ASCII representation when necessary. A literal IPv6 host must also be semantically valid, and the parsed network location must not exceed 253 characters; malformed parsing or IDNA conversion must remain invalid."} +{"repo": "django/django", "buggy_commit": "4b45b6c8e4d7c9701a332e80d3b1c84209dc36e2", "bug_issue": 29706, "solve_pr": 11066, "call_graph": {"nodes": [{"id": "django/contrib/contenttypes/management/__init__.py::RenameContentType::_rename"}, {"id": "django/contrib/contenttypes/management/__init__.py::RenameContentType::rename_backward"}, {"id": "django/contrib/contenttypes/management/__init__.py::RenameContentType::rename_forward"}], "edges": [{"source": "django/contrib/contenttypes/management/__init__.py::RenameContentType::rename_backward", "target": "django/contrib/contenttypes/management/__init__.py::RenameContentType::_rename"}, {"source": "django/contrib/contenttypes/management/__init__.py::RenameContentType::rename_forward", "target": "django/contrib/contenttypes/management/__init__.py::RenameContentType::_rename"}]}, "graph_spec": "RenameContentType must keep the content-type record for its configured app label aligned with a model rename on the schema editor’s database: forward migration maps old model name to new, while reversal applies the inverse mapping. It must use the migration-provided historical ContentType model and honor migration routing, making no change when the model is not permitted on that database or the old natural key is absent. A rename must update only the model field atomically; if the target natural key cannot be stored because it conflicts with an existing record, the operation must leave the original name intact and not expose a partial change. After a successful rename, it must clear the ContentType manager cache so subsequent natural-key lookups cannot return the record under its former name."} +{"repo": "django/django", "buggy_commit": "55b68de643b5c2d5f0a8ea7587ab3b2966021ccc", "bug_issue": 29744, "solve_pr": 11333, "call_graph": {"nodes": [{"id": "django/conf/urls/i18n.py::is_language_prefix_patterns_used"}, {"id": "django/contrib/admindocs/views.py::ViewDetailView::_get_view_func"}, {"id": "django/core/handlers/base.py::BaseHandler::_get_response"}, {"id": "django/core/handlers/exception.py::convert_exception_to_response::inner"}, {"id": "django/core/handlers/exception.py::response_for_exception"}, {"id": "django/middleware/common.py::CommonMiddleware::process_request"}, {"id": "django/middleware/common.py::CommonMiddleware::process_response"}, {"id": "django/middleware/common.py::CommonMiddleware::should_redirect_with_slash"}, {"id": "django/middleware/locale.py::LocaleMiddleware::process_request"}, {"id": "django/middleware/locale.py::LocaleMiddleware::process_response"}, {"id": "django/urls/base.py::is_valid_path"}, {"id": "django/urls/base.py::resolve"}, {"id": "django/urls/base.py::reverse"}, {"id": "django/urls/base.py::translate_url"}, {"id": "django/urls/resolvers.py::get_resolver"}, {"id": "django/views/i18n.py::set_language"}], "edges": [{"source": "django/conf/urls/i18n.py::is_language_prefix_patterns_used", "target": "django/urls/resolvers.py::get_resolver"}, {"source": "django/contrib/admindocs/views.py::ViewDetailView::_get_view_func", "target": "django/urls/resolvers.py::get_resolver"}, {"source": "django/core/handlers/base.py::BaseHandler::_get_response", "target": "django/urls/resolvers.py::get_resolver"}, {"source": "django/core/handlers/exception.py::convert_exception_to_response::inner", "target": "django/core/handlers/exception.py::response_for_exception"}, {"source": "django/core/handlers/exception.py::response_for_exception", "target": "django/urls/resolvers.py::get_resolver"}, {"source": "django/middleware/common.py::CommonMiddleware::process_request", "target": "django/middleware/common.py::CommonMiddleware::should_redirect_with_slash"}, {"source": "django/middleware/common.py::CommonMiddleware::process_response", "target": "django/middleware/common.py::CommonMiddleware::should_redirect_with_slash"}, {"source": "django/middleware/common.py::CommonMiddleware::should_redirect_with_slash", "target": "django/urls/base.py::is_valid_path"}, {"source": "django/middleware/locale.py::LocaleMiddleware::process_request", "target": "django/conf/urls/i18n.py::is_language_prefix_patterns_used"}, {"source": "django/middleware/locale.py::LocaleMiddleware::process_response", "target": "django/conf/urls/i18n.py::is_language_prefix_patterns_used"}, {"source": "django/middleware/locale.py::LocaleMiddleware::process_response", "target": "django/urls/base.py::is_valid_path"}, {"source": "django/urls/base.py::is_valid_path", "target": "django/urls/base.py::resolve"}, {"source": "django/urls/base.py::resolve", "target": "django/urls/base.py::resolve"}, {"source": "django/urls/base.py::resolve", "target": "django/urls/resolvers.py::get_resolver"}, {"source": "django/urls/base.py::reverse", "target": "django/urls/resolvers.py::get_resolver"}, {"source": "django/urls/base.py::translate_url", "target": "django/urls/base.py::resolve"}, {"source": "django/urls/base.py::translate_url", "target": "django/urls/base.py::reverse"}, {"source": "django/views/i18n.py::set_language", "target": "django/urls/base.py::translate_url"}]}, "graph_spec": "These functions connect Django’s URL configuration—the mapping between URL paths and views—to resolver access, path matching, URL generation, view lookup for administrative documentation, request dispatch, and exception-to-HTTP-response conversion. The common middleware hooks support request filtering and URL normalization, including assessing slash redirects, while the locale middleware hooks support language selection across requests and responses. The internationalization utilities identify language-prefixed URL configuration, translate URLs between languages, and provide a view for saving a user’s language preference and redirecting them."} +{"repo": "django/django", "buggy_commit": "14d026cccb144c6877294ba4cd4e03ebf0842498", "bug_issue": 29834, "solve_pr": 10554, "call_graph": {"nodes": [{"id": "django/contrib/admin/templatetags/admin_list.py::date_hierarchy"}, {"id": "django/db/models/query.py::QuerySet::aggregate"}, {"id": "django/db/models/query.py::QuerySet::count"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"id": "django/db/models/sql/query.py::Query::get_aggregation"}, {"id": "django/db/models/sql/query.py::Query::get_count"}, {"id": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery"}], "edges": [{"source": "django/contrib/admin/templatetags/admin_list.py::date_hierarchy", "target": "django/db/models/query.py::QuerySet::aggregate"}, {"source": "django/db/models/query.py::QuerySet::aggregate", "target": "django/db/models/sql/query.py::Query::get_aggregation"}, {"source": "django/db/models/query.py::QuerySet::count", "target": "django/db/models/sql/query.py::Query::get_count"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by"}, {"source": "django/db/models/sql/query.py::Query::get_aggregation", "target": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery"}, {"source": "django/db/models/sql/query.py::Query::get_count", "target": "django/db/models/sql/query.py::Query::get_aggregation"}, {"source": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}]}, "graph_spec": "The scope must return correct aggregate dictionaries and integer counts for the current QuerySet without mutating its externally observable query semantics: validate aggregate expressions and aliases, reuse a fully populated result cache for count, and represent an empty count as 0. Aggregation must apply filtering, slicing, distinctness, grouping, annotations, and set-combination semantics in their proper order; when those features require it, compile the original result set as a subquery with stable column aliases and perform the summary aggregation outside it, while handling an empty inner result as null aggregate values and applying database converters before returning values. SQL compilation must derive select, ordering, extra-select, grouping, WHERE, and HAVING consistently, preserve parameter order, restore temporary alias bookkeeping, enforce backend restrictions for compound queries and row locking, and make compound ORDER BY refer to result columns unambiguously. For admin date navigation, the initial drill-down level must be selected from the filtered queryset’s minimum and maximum dates, yielding the most specific common year/month when possible, with links that replace only date-hierarchy parameters."} +{"repo": "django/django", "buggy_commit": "927c903f3cd25c817c21738328b53991c035b415", "bug_issue": 29871, "solve_pr": 12273, "call_graph": {"nodes": [{"id": "django/db/models/base.py::Model::_set_pk_val"}], "edges": []}, "graph_spec": "Model._set_pk_val serves as the setter for a model instance’s pk property, accepting a value to assign to the model’s primary key. A primary key identifies a model record, and pk provides a uniform alias for the model’s primary-key field."} +{"repo": "django/django", "buggy_commit": "c5e373d48cbdd923575956fed477b63d66d9603f", "bug_issue": 29998, "solve_pr": 12325, "call_graph": {"nodes": [{"id": "django/db/models/base.py::ModelBase::__new__"}, {"id": "django/db/models/options.py::Options::_prepare"}], "edges": []}, "graph_spec": "Django models are Python classes that describe stored data and its behavior, while model metadata describes additional model characteristics exposed through the `_meta` API. `ModelBase.__new__` creates model classes from class declarations, and `Options._prepare` prepares a model’s metadata as part of model setup, supporting the ORM’s understanding of that model."} +{"repo": "django/django", "buggy_commit": "838e432e3e5519c5383d12018e6c78f8ec7833c1", "bug_issue": 30120, "solve_pr": 10880, "call_graph": {"nodes": [{"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_model_indexes_sql"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_field"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_index"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"id": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::_alter_field_type_workaround"}, {"id": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_field"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_many_to_many"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::remove_field"}, {"id": "django/db/migrations/operations/models.py::AddIndex::database_forwards"}, {"id": "django/db/migrations/operations/models.py::RemoveIndex::database_backwards"}, {"id": "django/db/models/aggregates.py::Aggregate::as_sql"}, {"id": "django/db/models/indexes.py::Index::_get_condition_sql"}, {"id": "django/db/models/indexes.py::Index::create_sql"}], "edges": [{"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_model_indexes_sql", "target": "django/db/models/indexes.py::Index::create_sql"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_field", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_index", "target": "django/db/models/indexes.py::Index::create_sql"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_model_indexes_sql"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::_alter_field_type_workaround", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_field"}, {"source": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field", "target": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::_alter_field_type_workaround"}, {"source": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field", "target": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_many_to_many", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_many_to_many", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::remove_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/migrations/operations/models.py::AddIndex::database_forwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_index"}, {"source": "django/db/migrations/operations/models.py::RemoveIndex::database_backwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_index"}, {"source": "django/db/models/aggregates.py::Aggregate::as_sql", "target": "django/db/models/aggregates.py::Aggregate::as_sql"}, {"source": "django/db/models/indexes.py::Index::_get_condition_sql", "target": "django/db/models/aggregates.py::Aggregate::as_sql"}, {"source": "django/db/models/indexes.py::Index::create_sql", "target": "django/db/models/indexes.py::Index::_get_condition_sql"}]}, "graph_spec": "These functions translate Django model, field, relationship, and index definitions into database schema changes and SQL, with Oracle and SQLite support for field alterations and table transformations. The scoped migration methods apply index additions and reverse index removals, while the index methods generate creation SQL and predicates defining the rows covered by conditional indexes. Aggregate SQL compilation represents computations that summarize groups of database rows."} +{"repo": "django/django", "buggy_commit": "36300ef336e3f130a0dadc1143163ff3d23dc843", "bug_issue": 30141, "solve_pr": 10999, "call_graph": {"nodes": [{"id": "django/db/models/fields/__init__.py::DurationField::to_python"}, {"id": "django/forms/fields.py::DurationField::to_python"}, {"id": "django/utils/dateparse.py::parse_duration"}], "edges": [{"source": "django/db/models/fields/__init__.py::DurationField::to_python", "target": "django/utils/dateparse.py::parse_duration"}, {"source": "django/forms/fields.py::DurationField::to_python", "target": "django/utils/dateparse.py::parse_duration"}]}, "graph_spec": "Duration parsing must provide one canonical conversion from supported Django-style, ISO 8601, and PostgreSQL day-time interval strings to an equivalent `datetime.timedelta`, preserving sign, fractional-day/time values, and microsecond precision; syntactically unrecognized strings yield no parsed value, while representable-value limits may surface overflow. Model-field conversion must pass through `None` and existing timedeltas, otherwise accept only a successful parse and report its standard invalid-format validation error. Form-field conversion must map any configured empty value to `None`, pass through existing timedeltas, stringify other input before parsing, return successful results, and distinguish malformed input from duration overflow with its corresponding validation error."} +{"repo": "django/django", "buggy_commit": "8180ffba21bf10f4be905cb0d4890dc2bcff2788", "bug_issue": 30191, "solve_pr": 11087, "call_graph": {"nodes": [{"id": "django/contrib/contenttypes/management/commands/remove_stale_contenttypes.py::Command::handle"}, {"id": "django/db/models/deletion.py::Collector::collect"}, {"id": "django/db/models/query.py::QuerySet::delete"}], "edges": [{"source": "django/contrib/contenttypes/management/commands/remove_stale_contenttypes.py::Command::handle", "target": "django/db/models/deletion.py::Collector::collect"}, {"source": "django/db/models/deletion.py::Collector::collect", "target": "django/db/models/deletion.py::Collector::collect"}, {"source": "django/db/models/query.py::QuerySet::delete", "target": "django/db/models/deletion.py::Collector::collect"}]}, "graph_spec": "These functions support Django’s model deletion workflow: Command.handle removes obsolete content-type records, which identify models, while QuerySet.delete removes queried model records and returns deletion counts. Collector.collect gathers model instances and their associated parent and related objects for deletion, connecting both entry points to cascading deletion—the management of dependent records through model relationships and their deletion policies."} +{"repo": "django/django", "buggy_commit": "e8fcdaad5c428878d0a5d6ba820d957013f75595", "bug_issue": 30255, "solve_pr": 12155, "call_graph": {"nodes": [{"id": "django/contrib/admindocs/utils.py::parse_docstring"}, {"id": "django/contrib/admindocs/utils.py::trim_docstring"}, {"id": "django/contrib/admindocs/views.py::ModelDetailView::get_context_data"}, {"id": "django/contrib/admindocs/views.py::TemplateFilterIndexView::get_context_data"}, {"id": "django/contrib/admindocs/views.py::TemplateTagIndexView::get_context_data"}, {"id": "django/contrib/admindocs/views.py::ViewDetailView::get_context_data"}], "edges": [{"source": "django/contrib/admindocs/utils.py::parse_docstring", "target": "django/contrib/admindocs/utils.py::trim_docstring"}, {"source": "django/contrib/admindocs/views.py::ModelDetailView::get_context_data", "target": "django/contrib/admindocs/utils.py::parse_docstring"}, {"source": "django/contrib/admindocs/views.py::ModelDetailView::get_context_data", "target": "django/contrib/admindocs/utils.py::trim_docstring"}, {"source": "django/contrib/admindocs/views.py::TemplateFilterIndexView::get_context_data", "target": "django/contrib/admindocs/utils.py::parse_docstring"}, {"source": "django/contrib/admindocs/views.py::TemplateTagIndexView::get_context_data", "target": "django/contrib/admindocs/utils.py::parse_docstring"}, {"source": "django/contrib/admindocs/views.py::ViewDetailView::get_context_data", "target": "django/contrib/admindocs/utils.py::parse_docstring"}, {"source": "django/contrib/admindocs/views.py::ViewDetailView::get_context_data", "target": "django/contrib/admindocs/views.py::ViewDetailView::get_context_data"}]}, "graph_spec": "Admin documentation must turn a callable or model docstring into a stable `(title, body, metadata)` representation: missing text produces empty values; common indentation is removed; the first paragraph is the title; and a final header-style paragraph is exposed as metadata only when it yields actual headers, otherwise it remains part of the body. Model, view, template-tag, and template-filter contexts must preserve this separation while rendering present title, body, and metadata values as reST in the appropriate reference context; empty components must remain empty. Tag and filter indexes must include built-in and configured libraries, retain each item’s name and originating library, and remain usable with an empty list when no default template engine is available. A view detail request must resolve only an installed callback and return not-found for an unresolved one; model detail must likewise reject unknown apps or models while supplying its canonical name, documentation summary/description, and field/method documentation."} +{"repo": "django/django", "buggy_commit": "e245046bb6e8b32360aa48b8a41fb7050f0fc730", "bug_issue": 30289, "solve_pr": 11149, "call_graph": {"nodes": [{"id": "django/contrib/admin/options.py::InlineModelAdmin::_get_form_for_get_fields"}, {"id": "django/contrib/admin/options.py::InlineModelAdmin::get_formset"}, {"id": "django/contrib/admin/options.py::InlineModelAdmin::has_add_permission"}, {"id": "django/contrib/admin/options.py::InlineModelAdmin::has_change_permission"}, {"id": "django/contrib/admin/options.py::InlineModelAdmin::has_delete_permission"}, {"id": "django/contrib/admin/options.py::ModelAdmin::_changeform_view"}, {"id": "django/contrib/admin/options.py::ModelAdmin::_create_formsets"}, {"id": "django/contrib/admin/options.py::ModelAdmin::add_view"}, {"id": "django/contrib/admin/options.py::ModelAdmin::change_view"}, {"id": "django/contrib/admin/options.py::ModelAdmin::changeform_view"}, {"id": "django/contrib/admin/options.py::ModelAdmin::get_formsets_with_inlines"}, {"id": "django/contrib/admin/options.py::ModelAdmin::get_inline_formsets"}, {"id": "django/contrib/admin/options.py::ModelAdmin::get_inline_instances"}, {"id": "django/contrib/admin/options.py::_create_formsets::user_deleted_form"}], "edges": [{"source": "django/contrib/admin/options.py::InlineModelAdmin::_get_form_for_get_fields", "target": "django/contrib/admin/options.py::InlineModelAdmin::get_formset"}, {"source": "django/contrib/admin/options.py::InlineModelAdmin::get_formset", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_add_permission"}, {"source": "django/contrib/admin/options.py::InlineModelAdmin::get_formset", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_change_permission"}, {"source": "django/contrib/admin/options.py::InlineModelAdmin::get_formset", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_delete_permission"}, {"source": "django/contrib/admin/options.py::ModelAdmin::_changeform_view", "target": "django/contrib/admin/options.py::ModelAdmin::_create_formsets"}, {"source": "django/contrib/admin/options.py::ModelAdmin::_changeform_view", "target": "django/contrib/admin/options.py::ModelAdmin::get_inline_formsets"}, {"source": "django/contrib/admin/options.py::ModelAdmin::_create_formsets", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_change_permission"}, {"source": "django/contrib/admin/options.py::ModelAdmin::_create_formsets", "target": "django/contrib/admin/options.py::ModelAdmin::get_formsets_with_inlines"}, {"source": "django/contrib/admin/options.py::ModelAdmin::_create_formsets", "target": "django/contrib/admin/options.py::_create_formsets::user_deleted_form"}, {"source": "django/contrib/admin/options.py::ModelAdmin::add_view", "target": "django/contrib/admin/options.py::ModelAdmin::changeform_view"}, {"source": "django/contrib/admin/options.py::ModelAdmin::change_view", "target": "django/contrib/admin/options.py::ModelAdmin::changeform_view"}, {"source": "django/contrib/admin/options.py::ModelAdmin::changeform_view", "target": "django/contrib/admin/options.py::ModelAdmin::_changeform_view"}, {"source": "django/contrib/admin/options.py::ModelAdmin::get_formsets_with_inlines", "target": "django/contrib/admin/options.py::InlineModelAdmin::get_formset"}, {"source": "django/contrib/admin/options.py::ModelAdmin::get_formsets_with_inlines", "target": "django/contrib/admin/options.py::ModelAdmin::get_inline_instances"}, {"source": "django/contrib/admin/options.py::ModelAdmin::get_inline_formsets", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_add_permission"}, {"source": "django/contrib/admin/options.py::ModelAdmin::get_inline_formsets", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_change_permission"}, {"source": "django/contrib/admin/options.py::ModelAdmin::get_inline_formsets", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_delete_permission"}, {"source": "django/contrib/admin/options.py::ModelAdmin::get_inline_instances", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_add_permission"}, {"source": "django/contrib/admin/options.py::ModelAdmin::get_inline_instances", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_delete_permission"}, {"source": "django/contrib/admin/options.py::_create_formsets::user_deleted_form", "target": "django/contrib/admin/options.py::InlineModelAdmin::has_delete_permission"}]}, "graph_spec": "Admin add and change entry points must run through the same atomic change-form workflow: determine add versus existing-object mode (including save-as-new), enforce the parent object’s applicable access rights, bind and validate the parent form and all permitted inline formsets, and persist related changes only when every required form is valid. Inline instances must be included only when the requester has some relevant view/change, add, or delete capability; lack of add capability must prevent extra inline creation, while each inline formset must independently expose add, change, and delete behavior according to its permission hooks (with auto-created intermediary models deriving these capabilities from the related target model). Formset construction must use stable, distinct prefixes for repeated inline types, bind POST/files when submitted, and make view-only existing inline rows non-editable without suppressing an explicitly authorized submitted deletion. The rendered inline administration state must carry the same permission decisions used during construction, so the UI and submitted-data handling agree on what may be viewed, added, edited, or deleted."} +{"repo": "django/django", "buggy_commit": "21aa2a5e785eef1f47beb1c3760fdd7d8915ae09", "bug_issue": 30349, "solve_pr": 11265, "call_graph": {"nodes": [{"id": "django/db/models/sql/query.py::Query::build_filter"}, {"id": "django/db/models/sql/query.py::Query::split_exclude"}, {"id": "django/db/models/sql/query.py::Query::trim_start"}], "edges": [{"source": "django/db/models/sql/query.py::Query::build_filter", "target": "django/db/models/sql/query.py::Query::split_exclude"}]}, "graph_spec": "`Query.build_filter()` must turn one valid lookup into a composable WHERE clause while enforcing lookup/filterability and join-permission constraints, tracking reusable joins, and preserving SQL’s intended Python-level null semantics under negation (including the outer-join requirements that prevent nullable related rows from being incorrectly discarded). When a negated traversal crosses an N-to-many relation, it must delegate to `split_exclude()` to express exclusion through a correlated nested query: the inner query must represent matching related rows without ordering, select the appropriate linking key, exclude null keys from an `IN` result, preserve outer-query restrictions when aliases are reused, and account for left-outer paths so null-related outer rows retain the correct exclusion meaning. `trim_start()` must safely minimize that nested query’s leading join path only across lookup-created joins, derive the corresponding outer lookup prefix and selected relation key, retain joins where outer-join or filtered-relation semantics would otherwise be lost, apply required relation restrictions when trimming, and leave a valid base-table FROM entry."} +{"repo": "django/django", "buggy_commit": "571ab44e8a8936014c22e7eebe4948d9611fd7ce", "bug_issue": 30363, "solve_pr": 11206, "call_graph": {"nodes": [{"id": "django/utils/numberformat.py::format"}], "edges": []}, "graph_spec": "The format function in django.utils.numberformat converts a number into a formatted string, with controls for decimal presentation, digit grouping, separators, and localization."} +{"repo": "django/django", "buggy_commit": "1f8382d34d54061eddc41df6994e20ee38c60907", "bug_issue": 30449, "solve_pr": 11400, "call_graph": {"nodes": [{"id": "django/contrib/admin/filters.py::RelatedFieldListFilter::__init__"}, {"id": "django/contrib/admin/filters.py::RelatedFieldListFilter::field_choices"}, {"id": "django/contrib/admin/filters.py::RelatedOnlyFieldListFilter::field_choices"}, {"id": "django/db/models/fields/__init__.py::Field::get_choices"}, {"id": "django/db/models/fields/reverse_related.py::ForeignObjectRel::get_choices"}], "edges": [{"source": "django/contrib/admin/filters.py::RelatedFieldListFilter::__init__", "target": "django/contrib/admin/filters.py::RelatedFieldListFilter::field_choices"}, {"source": "django/contrib/admin/filters.py::RelatedFieldListFilter::field_choices", "target": "django/db/models/fields/__init__.py::Field::get_choices"}, {"source": "django/contrib/admin/filters.py::RelatedOnlyFieldListFilter::field_choices", "target": "django/db/models/fields/__init__.py::Field::get_choices"}]}, "graph_spec": "These functions support relation-based filtering in Django’s admin change list: RelatedFieldListFilter initializes the filter and supplies related-object choices, while RelatedOnlyFieldListFilter supplies choices representing objects participating in the relation. Field.get_choices and ForeignObjectRel.get_choices provide selectable field choices for model fields and reverse relationships, connecting model relationship metadata to the admin’s filtering interface."} +{"repo": "django/django", "buggy_commit": "7991111af12056ec9a856f35935d273526338c1f", "bug_issue": 30543, "solve_pr": 11551, "call_graph": {"nodes": [{"id": "django/contrib/admin/checks.py::ModelAdminChecks::_check_list_display"}, {"id": "django/contrib/admin/checks.py::ModelAdminChecks::_check_list_display_item"}, {"id": "django/contrib/admin/checks.py::ModelAdminChecks::check"}], "edges": [{"source": "django/contrib/admin/checks.py::ModelAdminChecks::_check_list_display", "target": "django/contrib/admin/checks.py::ModelAdminChecks::_check_list_display_item"}, {"source": "django/contrib/admin/checks.py::ModelAdminChecks::check", "target": "django/contrib/admin/checks.py::ModelAdminChecks::_check_list_display"}]}, "graph_spec": "ModelAdmin validation must include list_display checks alongside the inherited and other ModelAdmin checks, returning the combined diagnostics. list_display itself must be a list or tuple; each entry is valid only when it is a callable, an attribute on the ModelAdmin, a model field, or an attribute or method on the model. Entries that cannot be resolved through those forms must be reported, and a resolved ManyToMany model field must be rejected even though it exists."} +{"repo": "django/django", "buggy_commit": "8dd5877f58f84f2b11126afbd0813e24545919ed", "bug_issue": 30557, "solve_pr": 11555, "call_graph": {"nodes": [{"id": "django/contrib/admin/templatetags/admin_list.py::date_hierarchy"}, {"id": "django/db/models/query.py::QuerySet::aggregate"}, {"id": "django/db/models/query.py::QuerySet::count"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::find_ordering_name"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"id": "django/db/models/sql/query.py::Query::get_aggregation"}, {"id": "django/db/models/sql/query.py::Query::get_count"}, {"id": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery"}], "edges": [{"source": "django/contrib/admin/templatetags/admin_list.py::date_hierarchy", "target": "django/db/models/query.py::QuerySet::aggregate"}, {"source": "django/db/models/query.py::QuerySet::aggregate", "target": "django/db/models/sql/query.py::Query::get_aggregation"}, {"source": "django/db/models/query.py::QuerySet::count", "target": "django/db/models/sql/query.py::Query::get_count"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::find_ordering_name", "target": "django/db/models/sql/compiler.py::SQLCompiler::find_ordering_name"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by", "target": "django/db/models/sql/compiler.py::SQLCompiler::find_ordering_name"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by"}, {"source": "django/db/models/sql/query.py::Query::get_aggregation", "target": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery"}, {"source": "django/db/models/sql/query.py::Query::get_count", "target": "django/db/models/sql/query.py::Query::get_aggregation"}, {"source": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}]}, "graph_spec": "QuerySet aggregation must accept only valid aggregate expressions with stable aliases, leave the original query usable, and return a name-to-value mapping; count must return the cached result length when available, otherwise count the query’s filtered result set and normalize an empty aggregate result to zero. Aggregation must preserve the result-set boundaries of slicing, distinctness, grouping/annotations, and set combinations by evaluating those operations in an inner subquery when required, while disabling irrelevant ordering, limits, locking, and related selection for the final aggregate; the inner SQL and parameters must be carried intact into the outer aggregate query. SQL generation must prepare selection, ordering, filtering, HAVING, grouping, and required extra selected ordering expressions coherently, restore temporary join reference counts afterward, and produce clauses and parameters in their SQL order. Compound queries must align selected values across components, obey backend restrictions on component ordering/slicing and parentheses, omit permitted empty components, preserve UNION ALL semantics, and order combined results by result-column positions while rejecting an ordering expression absent from the result. Related-model default ordering must expand recursively with direction propagation and detect cycles. For the admin date hierarchy, the initial drill-down level must be chosen from the queryset’s minimum and maximum dates when no date part is selected, and generated navigation must consistently replace only that hierarchy’s filters."} +{"repo": "django/django", "buggy_commit": "a7038adbd02c916315b16939b835f021c2ee8880", "bug_issue": 30572, "solve_pr": 11490, "call_graph": {"nodes": [{"id": "django/db/models/query.py::QuerySet::count"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"id": "django/db/models/sql/query.py::Query::get_aggregation"}, {"id": "django/db/models/sql/query.py::Query::get_count"}, {"id": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery"}], "edges": [{"source": "django/db/models/query.py::QuerySet::count", "target": "django/db/models/sql/query.py::Query::get_count"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"source": "django/db/models/sql/query.py::Query::get_aggregation", "target": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery"}, {"source": "django/db/models/sql/query.py::Query::get_count", "target": "django/db/models/sql/query.py::Query::get_aggregation"}, {"source": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}]}, "graph_spec": "QuerySet.count() must return the cached result length when available, otherwise the integer cardinality of the queryset’s constrained result set, with an empty aggregate result normalized to 0. Counting and other summary aggregates must operate over the already-defined result set: when grouping, annotations, slicing, distinctness, or set combinations affect that set, compile an inner query preserving those semantics and aggregate over it; retain any selection needed for a valid subquery, suppress irrelevant ordering/locking/related selection, and return converted aggregate values. The aggregate wrapper must embed the inner SQL with its parameters and stable column aliases. SQL generation for compound queries must keep each operand’s projected value columns compatible, respect backend capabilities for operand ordering, slicing, parentheses, and supported set operators, omit only permitted empty operands, concatenate parameters in SQL order, and restore transient alias-reference state after compilation."} +{"repo": "django/django", "buggy_commit": "05457817647368be4b019314fcc655445a5b4c0c", "bug_issue": 30731, "solve_pr": 11728, "call_graph": {"nodes": [{"id": "django/contrib/admindocs/utils.py::replace_named_groups"}, {"id": "django/contrib/admindocs/utils.py::replace_unnamed_groups"}, {"id": "django/contrib/admindocs/views.py::ViewIndexView::get_context_data"}, {"id": "django/contrib/admindocs/views.py::simplify_regex"}], "edges": [{"source": "django/contrib/admindocs/views.py::ViewIndexView::get_context_data", "target": "django/contrib/admindocs/views.py::simplify_regex"}, {"source": "django/contrib/admindocs/views.py::simplify_regex", "target": "django/contrib/admindocs/utils.py::replace_named_groups"}, {"source": "django/contrib/admindocs/views.py::simplify_regex", "target": "django/contrib/admindocs/utils.py::replace_unnamed_groups"}]}, "graph_spec": "The admin view index must produce one documentation entry per discovered URL view, retaining its fully qualified callable name and its namespace-qualified URL name while presenting a human-readable URL. URL patterns must be normalized by first replacing each complete named capture group—even when it contains nested or escaped parentheses—with its `` placeholder, then replacing each remaining outermost unnamed capture group (including nested contents) with ``; escaped parentheses must not alter capture-group boundaries. The resulting display path must remove regex anchors and residual `?` syntax and always begin with `/`, while leaving non-group path text in order."} +{"repo": "django/django", "buggy_commit": "999891bd80b3d02dd916731a7a239e1036174885", "bug_issue": 30739, "solve_pr": 11734, "call_graph": {"nodes": [{"id": "django/db/models/sql/query.py::Query::build_filter"}, {"id": "django/db/models/sql/query.py::Query::split_exclude"}], "edges": [{"source": "django/db/models/sql/query.py::Query::build_filter", "target": "django/db/models/sql/query.py::Query::split_exclude"}]}, "graph_spec": "Query.build_filter must turn one valid filter expression into a standalone WHERE clause while resolving conditional expressions, lookup paths, values, joins, and reusable aliases; it must reject malformed, non-filterable, or disallowed joined expressions, and preserve SQL/Python null semantics by choosing required outer joins and adding null guards when negation would otherwise yield UNKNOWN. If resolving a negated lookup would traverse a multi-valued relation, it must delegate to split_exclude, which represents the exclusion as a nested membership condition: the inner query applies the original predicate, removes irrelevant ordering and leading joins, excludes null selected keys, preserves any needed correlation with reusable outer aliases, and adds the appropriate outer-null alternative when the trimmed path contains an outer join. The resulting clause and join requirements must remain suitable for the caller’s later join-promotion decisions."} +{"repo": "django/django", "buggy_commit": "350123f38c2b6217c38d70bfbd924a9ba3df1289", "bug_issue": 30763, "solve_pr": 11749, "call_graph": {"nodes": [{"id": "django/core/management/__init__.py::call_command"}], "edges": []}, "graph_spec": "Django management commands expose administrative actions that can be invoked from application code. `call_command` provides the primary public API for invoking a management command with arguments and named options, returning the command’s result."} +{"repo": "django/django", "buggy_commit": "e02f67ef2d03d48128e7a118bf75f0418e24e8ac", "bug_issue": 30774, "solve_pr": 11815, "call_graph": {"nodes": [{"id": "django/db/migrations/serializer.py::EnumSerializer::serialize"}], "edges": [{"source": "django/db/migrations/serializer.py::EnumSerializer::serialize", "target": "django/db/migrations/serializer.py::EnumSerializer::serialize"}]}, "graph_spec": "EnumSerializer.serialize represents enumeration members as Python code for Django migration files, returning a textual representation and the imports it requires. This supports migrations’ role in preserving historical model definitions by making enumeration values expressible in migration source."} +{"repo": "django/django", "buggy_commit": "b1d6b35e146aea83b171c1b921178bbaae2795ed", "bug_issue": 30776, "solve_pr": 11790, "call_graph": {"nodes": [{"id": "django/contrib/auth/forms.py::AuthenticationForm::__init__"}], "edges": []}, "graph_spec": "AuthenticationForm.__init__ initializes Django’s username-and-password login form, accepting form data and request context for authentication customization by subclasses. It prepares a form used to collect credentials for establishing a user’s identity during login."} +{"repo": "django/django", "buggy_commit": "c2678e49759e5c4c329bff0eeca2886267005d21", "bug_issue": 30798, "solve_pr": 11820, "call_graph": {"nodes": [{"id": "django/core/checks/model_checks.py::check_all_models"}, {"id": "django/db/models/base.py::Model::_check_ordering"}, {"id": "django/db/models/base.py::Model::check"}], "edges": [{"source": "django/core/checks/model_checks.py::check_all_models", "target": "django/db/models/base.py::Model::check"}, {"source": "django/db/models/base.py::Model::check", "target": "django/db/models/base.py::Model::_check_ordering"}]}, "graph_spec": "Model checking must enumerate either all registered models or only those from the supplied app configurations, invoke each model’s class-level check with the received options, and aggregate its diagnostics while reporting an invalid non-method override of that check entry point. A model’s check must always include swappability, model, and manager validation, but run field, relationship, naming, index, uniqueness, ordering, and constraint validation only for models that are not swapped; dependent column-name diagnostics must be suppressed when earlier field-name clash diagnostics exist. Ordering validation must reject incompatible ordering configuration and non-sequence ordering values, otherwise accept empty or order-with-respect-to configurations, ordering expressions and random ordering, signed field names, and the `pk` alias; it must report each unresolved plain field or related traversal/lookup while allowing valid fields, attribute names, reverse related query names, relations, and supported transforms."} +{"repo": "django/django", "buggy_commit": "312049091288dbba2299de8d07ea3e3311ed7238", "bug_issue": 30827, "solve_pr": 11951, "call_graph": {"nodes": [{"id": "django/db/models/query.py::QuerySet::_batched_insert"}, {"id": "django/db/models/query.py::QuerySet::bulk_create"}], "edges": [{"source": "django/db/models/query.py::QuerySet::bulk_create", "target": "django/db/models/query.py::QuerySet::_batched_insert"}]}, "graph_spec": "Django’s QuerySet.bulk_create() provides efficient database insertion of collections of model instances, where instances represent records managed by the ORM. QuerySet._batched_insert() supports this bulk creation by handling insertion in batches, grouping database writes to reduce query overhead."} +{"repo": "django/django", "buggy_commit": "84633905273fc916e3d17883810d9969c03f73c2", "bug_issue": 30931, "solve_pr": 11999, "call_graph": {"nodes": [{"id": "django/db/models/fields/__init__.py::Field::contribute_to_class"}], "edges": []}, "graph_spec": "Django model fields describe aspects of a model’s data and its database representation. Field.contribute_to_class() registers a field with its owning model class, associating the field declaration with the model and its field name."} +{"repo": "django/django", "buggy_commit": "58c1acb1d6054dfec29d0f30b1033bae6ef62aec", "bug_issue": 30961, "solve_pr": 12039, "call_graph": {"nodes": [{"id": "django/db/backends/ddl_references.py::Columns::__str__"}, {"id": "django/db/backends/ddl_references.py::IndexColumns::__str__"}], "edges": []}, "graph_spec": "Columns.__str__ and IndexColumns.__str__ provide SQL text representations of table-column references and index-column references, respectively, for deferred database schema statements used during migrations. In this context, columns identify table fields, while index columns identify the fields involved in a database index."} +{"repo": "django/django", "buggy_commit": "b93a0e34d9b9b99d41103782b7e7aeabf47517e3", "bug_issue": 30971, "solve_pr": 12050, "call_graph": {"nodes": [{"id": "django/db/models/query_utils.py::FilteredRelation::as_sql"}, {"id": "django/db/models/sql/query.py::Query::build_filter"}, {"id": "django/db/models/sql/query.py::Query::build_filtered_relation_q"}, {"id": "django/db/models/sql/query.py::Query::resolve_lookup_value"}], "edges": [{"source": "django/db/models/query_utils.py::FilteredRelation::as_sql", "target": "django/db/models/sql/query.py::Query::build_filtered_relation_q"}, {"source": "django/db/models/sql/query.py::Query::build_filter", "target": "django/db/models/sql/query.py::Query::resolve_lookup_value"}, {"source": "django/db/models/sql/query.py::Query::build_filtered_relation_q", "target": "django/db/models/sql/query.py::Query::build_filter"}, {"source": "django/db/models/sql/query.py::Query::build_filtered_relation_q", "target": "django/db/models/sql/query.py::Query::build_filtered_relation_q"}]}, "graph_spec": "These functions support translating Django ORM filtering conditions into SQL, where lookups express database predicates and Q objects represent combined conditions. Query.build_filter constructs an individual filter clause, Query.resolve_lookup_value resolves lookup values in the query context, and Query.build_filtered_relation_q builds filtering conditions for a FilteredRelation. FilteredRelation.as_sql provides the SQL representation of that relation’s condition for a JOIN’s ON clause, which controls how related records participate in the join."} +{"repo": "django/django", "buggy_commit": "5a68f024987e6d16c2626a31bf653a2edddea579", "bug_issue": 31071, "solve_pr": 12209, "call_graph": {"nodes": [{"id": "django/core/management/commands/loaddata.py::Command::handle"}, {"id": "django/core/management/commands/loaddata.py::Command::loaddata"}, {"id": "django/core/serializers/base.py::DeserializedObject::save"}, {"id": "django/core/serializers/base.py::DeserializedObject::save_deferred_fields"}, {"id": "django/db/models/base.py::Model::_save_table"}, {"id": "django/db/models/base.py::Model::save_base"}], "edges": [{"source": "django/core/management/commands/loaddata.py::Command::handle", "target": "django/core/management/commands/loaddata.py::Command::loaddata"}, {"source": "django/core/management/commands/loaddata.py::Command::loaddata", "target": "django/core/serializers/base.py::DeserializedObject::save_deferred_fields"}, {"source": "django/core/serializers/base.py::DeserializedObject::save", "target": "django/db/models/base.py::Model::save_base"}, {"source": "django/core/serializers/base.py::DeserializedObject::save_deferred_fields", "target": "django/core/serializers/base.py::DeserializedObject::save"}, {"source": "django/db/models/base.py::Model::save_base", "target": "django/db/models/base.py::Model::_save_table"}]}, "graph_spec": "Fixture loading must run as one atomic operation on the selected database: after confirming fixtures exist, save each permitted object while constraint checks are suspended, defer unresolved forward foreign-key and many-to-many relations until all base objects have been processed, then resolve and persist those relations before manually validating constraints and resetting sequences for loaded models. Deserialized saves must bypass model-specific save overrides but invoke the model base save in raw mode, apply many-to-many assignments only after the object record exists, and clear pending relation data so it cannot be applied twice. Deferred relation resolution must use the same database, report relation-deserialization failures with object/field context, and then save the object and resolved many-to-many values. Base model persistence must select the write database, preserve raw-save semantics (including skipping parent saves and value preprocessing), bracket table writes appropriately, maintain pre/post-save signaling and instance state, and perform an update when a matching primary key row exists or otherwise insert while honoring force/update-field constraints and database-returned fields."} +{"repo": "django/django", "buggy_commit": "69331bb851c34f05bc77e9fc24020fe6908b9cd5", "bug_issue": 31128, "solve_pr": 12262, "call_graph": {"nodes": [{"id": "django/contrib/admin/templatetags/base.py::InclusionAdminNode::__init__"}, {"id": "django/template/library.py::dec::compile_func"}, {"id": "django/template/library.py::parse_bits"}], "edges": [{"source": "django/contrib/admin/templatetags/base.py::InclusionAdminNode::__init__", "target": "django/template/library.py::parse_bits"}, {"source": "django/template/library.py::dec::compile_func", "target": "django/template/library.py::parse_bits"}]}, "graph_spec": "Template-tag compilation must turn the token arguments (excluding the tag name) into deferred filter expressions and keyword bindings that match the decorated callable’s Python signature. With `takes_context=True`, the callable must declare `context` as its first parameter, which is supplied implicitly rather than from the token. Parsing must reject unknown or duplicate keyword arguments, positional arguments following keyword arguments, excess positional arguments when varargs are unavailable, and omission of required positional or keyword-only parameters; defaults, varargs, and arbitrary keyword arguments remain valid where declared. Both ordinary registered tag compilers and admin inclusion nodes must apply this same contract, preserving the tag name in syntax errors and passing the resulting argument bindings to their nodes."} +{"repo": "django/django", "buggy_commit": "4c1b401e8250f9f520b3c7dc369554477ce8b15a", "bug_issue": 31154, "solve_pr": 12304, "call_graph": {"nodes": [{"id": "django/db/models/enums.py::ChoicesMeta::__new__"}], "edges": []}, "graph_spec": "ChoicesMeta must construct choice enums with standard Enum semantics while separating each declared member’s concrete value arguments from an optional final human-readable label (a string or lazy translation); the remaining arguments must form the member value, supporting both scalar and multi-argument concrete types. When no such label is supplied, it must derive one from the member name by replacing underscores with spaces and title-casing. The resulting class must expose each member’s label, preserve declaration order in the value-to-label association, reject duplicate values, and allow Django template expressions to resolve members through the enum class and access their labels and values."} +{"repo": "django/django", "buggy_commit": "18759b2209ff556aed7f20d83cbf23e3d234e41c", "bug_issue": 31416, "solve_pr": 12754, "call_graph": {"nodes": [{"id": "django/core/management/commands/makemigrations.py::Command::handle"}, {"id": "django/core/management/commands/migrate.py::Command::handle"}, {"id": "django/db/migrations/autodetector.py::MigrationAutodetector::_detect_changes"}, {"id": "django/db/migrations/autodetector.py::MigrationAutodetector::changes"}, {"id": "django/db/migrations/autodetector.py::MigrationAutodetector::generate_created_models"}], "edges": [{"source": "django/core/management/commands/makemigrations.py::Command::handle", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::changes"}, {"source": "django/core/management/commands/migrate.py::Command::handle", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::changes"}, {"source": "django/db/migrations/autodetector.py::MigrationAutodetector::_detect_changes", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::generate_created_models"}, {"source": "django/db/migrations/autodetector.py::MigrationAutodetector::changes", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::_detect_changes"}]}, "graph_spec": "This scope is Django's model-state migration autodetection pipeline: the `makemigrations` and `migrate` command `handle` methods both drive `MigrationAutodetector.changes(graph, trim_to_apps, convert_apps, migration_name)`, so `changes` must return a mapping of app label to an ordered list of `Migration` objects that transform the project from `from_state` to `to_state`, and must return an empty/falsy mapping when the two states are equivalent so each caller can report that no changes were detected (unapplied model changes for `migrate`). `changes` must obtain the per-app plans from `_detect_changes(convert_apps, graph)`, then name each migration and rewrite its dependencies relative to the existing graph's per-app leaf nodes (first migration chains onto that leaf, or becomes an initial migration when the app has no leaf), and finally trim to the requested apps while retaining any apps required by dependency chains. `_detect_changes` must separate old/new models into managed, proxy, and unmanaged keys, account for `real_apps` and `convert_apps`, apply renames before non-rename operations, and return unnamed migrations whose ordering and `_auto_deps` encode create/delete dependencies between models and fields. `generate_created_models` must, for every managed or unmanaged model absent from the old model sets, prepend a `CreateModel` carrying only the non-relation fields, then emit separate `AddField` operations for each relation (foreign key, many-to-many, and explicit through models), deferring collection-valued options (`indexes`, `constraints`, `unique_together`, `index_together`, `order_with_respect_to`) into follow-up operations that depend on all related fields plus the model's creation; it must emit no schema-modifying operations for unmanaged models, must add reverse-relation `AlterField` operations when a model transitions from proxy to concrete, and must declare dependencies on all string bases and on the primary-key relation, ordering swappable/abstract-user-derived models ahead of models that depend on them. `changes` must also ensure the operations it returns for a single autodetection run are collectively valid: applied in the order produced, they must never raise an error or leave the project in an invalid intermediate state, such as one where a model declares a local field that clashes with a field it inherits from a concrete base."} +{"repo": "django/django", "buggy_commit": "fa5e7e46d875d4143510944f19d79df7b1739bab", "bug_issue": 31420, "solve_pr": 12663, "call_graph": {"nodes": [{"id": "django/db/models/sql/query.py::Query::output_field"}], "edges": []}, "graph_spec": "Query.output_field exposes the model field representing a SQL query’s output type within Django’s expression API. This field supplies type information for interpreting database results and for using queries as expressions, including subqueries."} +{"repo": "django/django", "buggy_commit": "5b884d45ac5b76234eca614d90c83b347294c332", "bug_issue": 31462, "solve_pr": 12713, "call_graph": {"nodes": [{"id": "django/contrib/admin/options.py::BaseModelAdmin::formfield_for_dbfield"}, {"id": "django/contrib/admin/options.py::BaseModelAdmin::formfield_for_manytomany"}], "edges": [{"source": "django/contrib/admin/options.py::BaseModelAdmin::formfield_for_dbfield", "target": "django/contrib/admin/options.py::BaseModelAdmin::formfield_for_manytomany"}]}, "graph_spec": "These admin hooks connect database model fields to form fields used for editing model data: formfield_for_dbfield provides the general customization point, while formfield_for_manytomany provides the corresponding form field for a ManyToManyField. A many-to-many relationship allows multiple records on each side to relate to multiple records on the other, and the specialized hook supports its representation in admin forms."} +{"repo": "django/django", "buggy_commit": "67f9d076cfc1858b94f9ed6d1a5ce2327dcc8d0d", "bug_issue": 31500, "solve_pr": 12774, "call_graph": {"nodes": [{"id": "django/db/models/query.py::QuerySet::in_bulk"}], "edges": []}, "graph_spec": "QuerySet.in_bulk() retrieves model instances from a database query as a dictionary keyed by unique field values. It supports bulk lookup of ORM objects, connecting database record identifiers with their corresponding model instances."} +{"repo": "django/django", "buggy_commit": "d17b380653da5f95885ce53468fe7aac60672841", "bug_issue": 31538, "solve_pr": 12858, "call_graph": {"nodes": [{"id": "django/core/checks/model_checks.py::check_all_models"}, {"id": "django/db/models/base.py::Model::_check_ordering"}, {"id": "django/db/models/base.py::Model::check"}], "edges": [{"source": "django/core/checks/model_checks.py::check_all_models", "target": "django/db/models/base.py::Model::check"}, {"source": "django/db/models/base.py::Model::check", "target": "django/db/models/base.py::Model::_check_ordering"}]}, "graph_spec": "The model checks entry point must enumerate every installed model (or only models from the supplied app configurations), preserve the supplied check kwargs when invoking each valid class-level `check()`, aggregate all resulting messages, and also report an invalid override of that class method while continuing global metadata validation. Each model’s `check()` must retain baseline model and manager checks, but for a swapped model limit validation to swap-related checks; otherwise include field, relationship, database-dependent, naming, index, constraint, and ordering validation, suppressing dependent column-name clashes when earlier name-clash diagnostics exist. Ordering validation must reject simultaneous explicit `ordering` and `order_with_respect_to`, accept no ordering when ordering is implicitly controlled by `order_with_respect_to`, require a nonempty explicit ordering to be a list or tuple, ignore ordering expressions and random-order markers, allow descending prefixes and the `pk` alias, and diagnose every unresolved local field, relation traversal, transform, or lookup while recognizing valid field names, attribute names, and reverse related-query names."} +{"repo": "django/django", "buggy_commit": "437196da9a386bd4cc62b0ce3f2de4aba468613d", "bug_issue": 31624, "solve_pr": 12965, "call_graph": {"nodes": [{"id": "django/db/models/sql/compiler.py::SQLDeleteCompiler::single_alias"}], "edges": []}, "graph_spec": "SQLDeleteCompiler.single_alias characterizes the table-alias scope of a deletion query as part of SQL compilation. Table aliases distinguish table references in SQL, so this property concerns the query’s table references within the deletion compiler."} +{"repo": "django/django", "buggy_commit": "a59de6e89e8dc1f3e71c9a5a5bbceb373ea5247e", "bug_issue": 31657, "solve_pr": 13033, "call_graph": {"nodes": [{"id": "django/contrib/admin/templatetags/admin_list.py::date_hierarchy"}, {"id": "django/db/models/query.py::QuerySet::aggregate"}, {"id": "django/db/models/query.py::QuerySet::count"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::find_ordering_name"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"id": "django/db/models/sql/query.py::Query::get_aggregation"}, {"id": "django/db/models/sql/query.py::Query::get_count"}, {"id": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery"}], "edges": [{"source": "django/contrib/admin/templatetags/admin_list.py::date_hierarchy", "target": "django/db/models/query.py::QuerySet::aggregate"}, {"source": "django/db/models/query.py::QuerySet::aggregate", "target": "django/db/models/sql/query.py::Query::get_aggregation"}, {"source": "django/db/models/query.py::QuerySet::count", "target": "django/db/models/sql/query.py::Query::get_count"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::find_ordering_name", "target": "django/db/models/sql/compiler.py::SQLCompiler::find_ordering_name"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by", "target": "django/db/models/sql/compiler.py::SQLCompiler::find_ordering_name"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_order_by"}, {"source": "django/db/models/sql/query.py::Query::get_aggregation", "target": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery"}, {"source": "django/db/models/sql/query.py::Query::get_count", "target": "django/db/models/sql/query.py::Query::get_aggregation"}, {"source": "django/db/models/sql/subqueries.py::AggregateQuery::add_subquery", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}]}, "graph_spec": "Date-hierarchy navigation must derive its initial drill-down level from the current queryset’s minimum and maximum date/datetime values, localizing aware datetimes before comparison, while aggregation and counting validate aggregate inputs, avoid mutating the caller’s query, return named aggregate values, and report zero for an empty count. Aggregate evaluation must preserve the row set selected by slicing, distinctness, grouping, existing annotations, and set combinations by aggregating an appropriately projected subquery when required; that subquery must retain ordering when it affects the selected rows, expose needed columns, and compile as a parameterized derived table. SQL generation must establish selection, ordering, filtering, grouping, and extra selected ordering expressions consistently before rendering clauses, restore temporary join state afterward, and keep ordering semantics valid for combined queries by resolving relation default orderings recursively with cycle detection, deduplicating equivalent terms, ordering combined results by result-column positions, enforcing backend compound-query limits, and preserving compatible column layouts and parameter order across all component queries."} +{"repo": "django/django", "buggy_commit": "78ad4b4b0201003792bfdbf1a7781cbc9ee03539", "bug_issue": 31664, "solve_pr": 13028, "call_graph": {"nodes": [{"id": "django/db/models/sql/query.py::Query::build_filter"}, {"id": "django/db/models/sql/query.py::Query::check_filterable"}], "edges": [{"source": "django/db/models/sql/query.py::Query::build_filter", "target": "django/db/models/sql/query.py::Query::check_filterable"}, {"source": "django/db/models/sql/query.py::Query::check_filterable", "target": "django/db/models/sql/query.py::Query::check_filterable"}]}, "graph_spec": "Query.build_filter must turn one valid filter clause into a WHERE node while enforcing filterability whenever that validation is enabled: it must reject a referenced lookup expression and the resolved lookup value if either is unsuitable for WHERE use, before constructing the lookup condition. Query.check_filterable must reject any expression that both participates in expression resolution and explicitly declares itself non-filterable, raising the clause-specific unsupported-operation error; this rule applies recursively to every source expression so a non-filterable descendant cannot be admitted through an otherwise permitted composite expression. Validation must be bypassable only through the explicit check_filterable control, preserving callers that intentionally disable it."} +{"repo": "django/django", "buggy_commit": "27c09043da52ca1f02605bf28600bfd5ace95ae4", "bug_issue": 31728, "solve_pr": 13089, "call_graph": {"nodes": [{"id": "django/core/cache/backends/db.py::DatabaseCache::_base_set"}, {"id": "django/core/cache/backends/db.py::DatabaseCache::_cull"}, {"id": "django/core/cache/backends/db.py::DatabaseCache::add"}, {"id": "django/core/cache/backends/db.py::DatabaseCache::set"}, {"id": "django/core/cache/backends/db.py::DatabaseCache::touch"}], "edges": [{"source": "django/core/cache/backends/db.py::DatabaseCache::_base_set", "target": "django/core/cache/backends/db.py::DatabaseCache::_cull"}, {"source": "django/core/cache/backends/db.py::DatabaseCache::add", "target": "django/core/cache/backends/db.py::DatabaseCache::_base_set"}, {"source": "django/core/cache/backends/db.py::DatabaseCache::set", "target": "django/core/cache/backends/db.py::DatabaseCache::_base_set"}, {"source": "django/core/cache/backends/db.py::DatabaseCache::touch", "target": "django/core/cache/backends/db.py::DatabaseCache::_base_set"}]}, "graph_spec": "DatabaseCache.add(), set(), and touch() must normalize and validate the versioned key, then delegate to a shared write path that uses the configured backend timeout and the write-routed cache table. The shared operation must preserve mode semantics atomically: add creates an entry only when no unexpired entry already occupies the key (but may replace an expired one), set stores or replaces the serialized value and expiration, and touch changes only the expiration of an existing entry and reports failure when none exists; database write conflicts/errors report failure rather than escaping. Before writing when the table exceeds its entry limit, it must cull according to configuration: a zero cull frequency clears the cache, otherwise expired entries are removed first and, if still oversized, a deterministic fraction of remaining keys is removed. Expirations must consistently represent no-timeout entries as effectively non-expiring and use database-adapted datetimes with second-level precision."} +{"repo": "django/django", "buggy_commit": "09914ccf688974e068941f55412b930729bafa06", "bug_issue": 31742, "solve_pr": 13112, "call_graph": {"nodes": [{"id": "django/db/models/fields/related.py::ForeignObject::deconstruct"}], "edges": []}, "graph_spec": "ForeignObject.deconstruct() must return the standard field reconstruction 4-tuple from its base field, preserving that tuple’s name, portable import path, positional arguments, and non-default base-field options. It must additionally serialize relationship metadata without evaluating or otherwise transforming it: include limit_choices_to only when it is truthy, and include related_name and related_query_name whenever each is explicitly set (including falsey non-None values). The resulting keyword arguments must therefore retain the relation’s configured naming and choice-limiting semantics when the field is reconstructed."} +{"repo": "django/django", "buggy_commit": "453967477e3ddae704cd739eac2449c0e13d464c", "bug_issue": 31750, "solve_pr": 13401, "call_graph": {"nodes": [{"id": "django/db/models/fields/__init__.py::Field::__eq__"}, {"id": "django/db/models/fields/__init__.py::Field::__hash__"}, {"id": "django/db/models/fields/__init__.py::Field::__lt__"}], "edges": []}, "graph_spec": "Django’s Field objects describe model fields and their database representation. Field.__eq__ and Field.__lt__ provide equality and ordering comparisons between field objects, while Field.__hash__ supplies a hash value for their use in hash-based collections."} +{"repo": "django/django", "buggy_commit": "2d67222472f80f251607ae1b720527afceba06ad", "bug_issue": 31755, "solve_pr": 13128, "call_graph": {"nodes": [{"id": "django/db/models/expressions.py::CombinedExpression::resolve_expression"}], "edges": [{"source": "django/db/models/expressions.py::CombinedExpression::resolve_expression", "target": "django/db/models/expressions.py::CombinedExpression::resolve_expression"}]}, "graph_spec": "CombinedExpression.resolve_expression() prepares a combined query expression for inclusion in a database query, using the query context to support preprocessing and validation and returning a resolved copy. Query expressions represent database values or computations; resolving a combined expression also encompasses its nested expressions so the overall computation is ready for query use."} +{"repo": "django/django", "buggy_commit": "7af8f4127397279d19ef7c7899e93018274e2f9b", "bug_issue": 31767, "solve_pr": 13158, "call_graph": {"nodes": [{"id": "django/contrib/admin/options.py::InlineModelAdmin::get_queryset"}, {"id": "django/contrib/admin/options.py::ModelAdmin::_create_formsets"}, {"id": "django/db/models/fields/related_descriptors.py::RelatedManager::_apply_rel_filters"}, {"id": "django/db/models/fields/related_descriptors.py::RelatedManager::get_prefetch_queryset"}, {"id": "django/db/models/fields/related_descriptors.py::RelatedManager::get_queryset"}, {"id": "django/db/models/query.py::QuerySet::__getitem__"}, {"id": "django/db/models/query.py::QuerySet::get"}, {"id": "django/db/models/query.py::QuerySet::get_or_create"}, {"id": "django/db/models/query.py::QuerySet::none"}, {"id": "django/db/models/query.py::QuerySet::update_or_create"}, {"id": "django/db/models/sql/query.py::Query::clone"}, {"id": "django/db/models/sql/query.py::Query::has_results"}, {"id": "django/db/models/sql/query.py::Query::set_empty"}, {"id": "django/db/models/sql/query.py::Query::set_limits"}, {"id": "django/forms/models.py::BaseInlineFormSet::__init__"}, {"id": "django/forms/models.py::ModelMultipleChoiceField::clean"}, {"id": "django/views/generic/dates.py::BaseArchiveIndexView::get_dated_items"}, {"id": "django/views/generic/dates.py::BaseYearArchiveView::get_dated_items"}], "edges": [{"source": "django/contrib/admin/options.py::InlineModelAdmin::get_queryset", "target": "django/contrib/admin/options.py::InlineModelAdmin::get_queryset"}, {"source": "django/contrib/admin/options.py::InlineModelAdmin::get_queryset", "target": "django/db/models/query.py::QuerySet::none"}, {"source": "django/contrib/admin/options.py::ModelAdmin::_create_formsets", "target": "django/contrib/admin/options.py::InlineModelAdmin::get_queryset"}, {"source": "django/db/models/fields/related_descriptors.py::RelatedManager::_apply_rel_filters", "target": "django/db/models/query.py::QuerySet::none"}, {"source": "django/db/models/fields/related_descriptors.py::RelatedManager::get_prefetch_queryset", "target": "django/db/models/fields/related_descriptors.py::RelatedManager::get_queryset"}, {"source": "django/db/models/fields/related_descriptors.py::RelatedManager::get_queryset", "target": "django/db/models/fields/related_descriptors.py::RelatedManager::_apply_rel_filters"}, {"source": "django/db/models/query.py::QuerySet::__getitem__", "target": "django/db/models/sql/query.py::Query::set_limits"}, {"source": "django/db/models/query.py::QuerySet::get", "target": "django/db/models/sql/query.py::Query::set_limits"}, {"source": "django/db/models/query.py::QuerySet::get_or_create", "target": "django/db/models/query.py::QuerySet::get"}, {"source": "django/db/models/query.py::QuerySet::none", "target": "django/db/models/sql/query.py::Query::set_empty"}, {"source": "django/db/models/query.py::QuerySet::update_or_create", "target": "django/db/models/query.py::QuerySet::get"}, {"source": "django/db/models/sql/query.py::Query::has_results", "target": "django/db/models/sql/query.py::Query::set_limits"}, {"source": "django/db/models/sql/query.py::Query::set_limits", "target": "django/db/models/sql/query.py::Query::set_empty"}, {"source": "django/forms/models.py::BaseInlineFormSet::__init__", "target": "django/db/models/query.py::QuerySet::none"}, {"source": "django/forms/models.py::ModelMultipleChoiceField::clean", "target": "django/db/models/query.py::QuerySet::none"}, {"source": "django/views/generic/dates.py::BaseArchiveIndexView::get_dated_items", "target": "django/db/models/query.py::QuerySet::none"}, {"source": "django/views/generic/dates.py::BaseYearArchiveView::get_dated_items", "target": "django/db/models/query.py::QuerySet::none"}]}, "graph_spec": "This scope must preserve QuerySet isolation and semantics: derived queries must retain the applicable filters, database routing/hints, and relationship metadata without mutating the source query; relation managers must return cached prefetched results when available, otherwise constrain results to their bound instance and yield an empty QuerySet when the relation key cannot identify persisted related rows. An empty result must remain a model-aware QuerySet and propagate through combined queries, while slicing, single-object retrieval, and existence checks apply composable bounds that preserve existing offsets/limits and make an exhausted range empty. `get()` must distinguish zero, one, and multiple matches; `get_or_create()` and `update_or_create()` must use the write database, report whether creation occurred, and make the update-or-create lookup/update atomic. Admin inline formset construction must use each inline’s permission-filtered queryset and expose no initial child rows for an unsaved parent; optional empty multiple-choice input must clean to an empty QuerySet. Date archive views must return an empty model-aware object list when no date buckets exist or when a yearly archive is configured not to include its object list, while retaining the corresponding date/context information."} +{"repo": "django/django", "buggy_commit": "6e9c5ee88fc948e05b4a7d9f82a8861ed2b0343d", "bug_issue": 31864, "solve_pr": 13279, "call_graph": {"nodes": [{"id": "django/contrib/sessions/backends/base.py::SessionBase::encode"}, {"id": "django/contrib/sessions/backends/db.py::SessionStore::create_model_instance"}, {"id": "django/contrib/sessions/backends/db.py::SessionStore::save"}, {"id": "django/contrib/sessions/backends/file.py::SessionStore::create"}, {"id": "django/contrib/sessions/backends/file.py::SessionStore::load"}, {"id": "django/contrib/sessions/backends/file.py::SessionStore::save"}], "edges": [{"source": "django/contrib/sessions/backends/db.py::SessionStore::create_model_instance", "target": "django/contrib/sessions/backends/base.py::SessionBase::encode"}, {"source": "django/contrib/sessions/backends/db.py::SessionStore::save", "target": "django/contrib/sessions/backends/db.py::SessionStore::create_model_instance"}, {"source": "django/contrib/sessions/backends/file.py::SessionStore::create", "target": "django/contrib/sessions/backends/file.py::SessionStore::save"}, {"source": "django/contrib/sessions/backends/file.py::SessionStore::load", "target": "django/contrib/sessions/backends/file.py::SessionStore::create"}, {"source": "django/contrib/sessions/backends/file.py::SessionStore::save", "target": "django/contrib/sessions/backends/base.py::SessionBase::encode"}, {"source": "django/contrib/sessions/backends/file.py::SessionStore::save", "target": "django/contrib/sessions/backends/file.py::SessionStore::create"}]}, "graph_spec": "Session persistence must serialize each session dictionary with the configured serializer and a backend-specific signed, optionally compressed representation, so stored data is authenticated and remains decodable by the same store and by concurrently deployed compatible readers sharing the data when SHA-1 is configured. Database saves must build a model record from the current session key (creating one if necessary), encoded data, and computed expiry, and must distinguish required insertion from update semantics: insertion conflicts are reported as creation failures, while an unavailable update is reported as an update failure. File-backed sessions must allocate unique keys through exclusive creation, write encoded content via a temporary file and replacement so readers never observe a partial payload, and preserve those same create-versus-update outcomes. Loading a file must return a usable dictionary: absent or inaccessible storage clears the key, empty files yield an empty session, and invalid or expired content is discarded, with the expired file removed and a fresh session created."} +{"repo": "django/django", "buggy_commit": "a6291394256aa758d74eec9ce0cfae8aea6475f2", "bug_issue": 31941, "solve_pr": 13343, "call_graph": {"nodes": [{"id": "django/db/models/fields/files.py::FileField::__init__"}, {"id": "django/db/models/fields/files.py::FileField::deconstruct"}], "edges": []}, "graph_spec": "FileField.__init__ initializes a model field for file uploads using field metadata, upload destination settings, and storage configuration. FileField.deconstruct returns the information needed to recreate that field, supporting its serialization for Django model migrations."} +{"repo": "django/django", "buggy_commit": "580a4341cb0b4cbfc215a70afc004875a7e815f4", "bug_issue": 31989, "solve_pr": 13410, "call_graph": {"nodes": [{"id": "django/contrib/staticfiles/storage.py::ManifestFilesMixin::post_process"}, {"id": "django/contrib/staticfiles/storage.py::ManifestFilesMixin::save_manifest"}, {"id": "django/core/cache/backends/filebased.py::FileBasedCache::set"}, {"id": "django/core/cache/backends/filebased.py::FileBasedCache::touch"}, {"id": "django/core/files/locks.py::lock"}, {"id": "django/core/files/locks.py::unlock"}, {"id": "django/core/files/move.py::file_move_safe"}, {"id": "django/core/files/storage.py::FileSystemStorage::_save"}, {"id": "django/core/files/storage.py::Storage::save"}], "edges": [{"source": "django/contrib/staticfiles/storage.py::ManifestFilesMixin::post_process", "target": "django/contrib/staticfiles/storage.py::ManifestFilesMixin::post_process"}, {"source": "django/contrib/staticfiles/storage.py::ManifestFilesMixin::post_process", "target": "django/contrib/staticfiles/storage.py::ManifestFilesMixin::save_manifest"}, {"source": "django/contrib/staticfiles/storage.py::ManifestFilesMixin::save_manifest", "target": "django/core/files/storage.py::FileSystemStorage::_save"}, {"source": "django/core/cache/backends/filebased.py::FileBasedCache::set", "target": "django/core/files/move.py::file_move_safe"}, {"source": "django/core/cache/backends/filebased.py::FileBasedCache::touch", "target": "django/core/files/locks.py::lock"}, {"source": "django/core/files/move.py::file_move_safe", "target": "django/core/files/locks.py::lock"}, {"source": "django/core/files/move.py::file_move_safe", "target": "django/core/files/locks.py::unlock"}, {"source": "django/core/files/storage.py::FileSystemStorage::_save", "target": "django/core/files/locks.py::lock"}, {"source": "django/core/files/storage.py::FileSystemStorage::_save", "target": "django/core/files/locks.py::unlock"}, {"source": "django/core/files/storage.py::FileSystemStorage::_save", "target": "django/core/files/move.py::file_move_safe"}, {"source": "django/core/files/storage.py::Storage::save", "target": "django/core/files/storage.py::FileSystemStorage::_save"}]}, "graph_spec": "Manifest static-file processing must start from a fresh hash-path mapping, yield the underlying hash/copy and reference-rewrite results (including repeated passes for adjustable files until substitutions stabilize or the configured limit is reported), then—except in dry-run mode—persist exactly the resulting mapping with its manifest version, replacing any prior manifest. Saving content must normalize file-like inputs, choose an available name before delegating to filesystem storage, create required directories, avoid name-collision races by retrying with a new available name, preserve configured permissions, and return a forward-slash storage name. Filesystem writes and fallback cross-filesystem moves must serialize destination writes with an exclusive portable lock that is released on all paths; where file locking is supported, successful lock acquisition and release must each return true. Moves must reject an existing destination unless overwrite is allowed, prefer rename, otherwise copy all bytes, preserve metadata where permitted, and remove the source only after transfer. File-cache set must write a complete serialized value to a temporary file and publish it by overwrite-capable safe move, cleaning the temporary file if publication fails; touch must exclusively lock the existing entry, retain its value while replacing only expiry, return false for missing or expired entries, and always unlock."} +{"repo": "django/django", "buggy_commit": "71ae1ab0123582cc5bfe0f7d5f4cc19a9412f396", "bug_issue": 31990, "solve_pr": 13417, "call_graph": {"nodes": [{"id": "django/db/models/query.py::QuerySet::ordered"}], "edges": []}, "graph_spec": "QuerySet.ordered is a public introspection property that reports whether a queryset has a defined result ordering. It exposes a boolean status for the ordering associated with a database query, a concept encompassing query-level ordering and model-level default ordering."} +{"repo": "django/django", "buggy_commit": "b79088306513d5ed76d31ac40ab3c15f858946ea", "bug_issue": 32080, "solve_pr": 13512, "call_graph": {"nodes": [{"id": "django/contrib/admin/helpers.py::AdminReadonlyField::contents"}, {"id": "django/contrib/admin/utils.py::display_for_field"}, {"id": "django/forms/fields.py::JSONField::prepare_value"}], "edges": [{"source": "django/contrib/admin/helpers.py::AdminReadonlyField::contents", "target": "django/contrib/admin/utils.py::display_for_field"}]}, "graph_spec": "AdminReadonlyField.contents supplies display content for non-editable fields in Django’s admin interface, with display_for_field providing field-aware presentation of values. JSONField.prepare_value prepares form values for presentation as JSON, the text-based structured-data format supported by the form field."} +{"repo": "django/django", "buggy_commit": "ede9fac75807fe5810df66280a60e7068cc97e4a", "bug_issue": 32121, "solve_pr": 13568, "call_graph": {"nodes": [{"id": "django/contrib/auth/apps.py::AuthConfig::ready"}, {"id": "django/contrib/auth/checks.py::check_user_model"}], "edges": [{"source": "django/contrib/auth/apps.py::AuthConfig::ready", "target": "django/contrib/auth/checks.py::check_user_model"}]}, "graph_spec": "AuthConfig.ready is the authentication application’s initialization hook, connecting its startup responsibilities with Django’s system check framework. Within that scope, check_user_model validates the configured user model—the model representing user accounts—against authentication interface requirements and returns diagnostic messages for project validation."} +{"repo": "django/django", "buggy_commit": "89fc144dedc737a79929231438f035b1d4a993c9", "bug_issue": 32158, "solve_pr": 13807, "call_graph": {"nodes": [{"id": "django/db/backends/sqlite3/base.py::DatabaseWrapper::check_constraints"}], "edges": []}, "graph_spec": "`DatabaseWrapper.check_constraints()` must validate foreign-key integrity for either every database table when `table_names` is omitted or only the supplied tables otherwise. Where SQLite supports `foreign_key_check`, it must interpret each reported violation against that table’s foreign-key definition and identify the offending row; otherwise it must inspect each table with a primary key and detect non-NULL referencing values lacking a matching referenced value. It must ignore tables that cannot provide a primary-key column, complete silently when no invalid reference exists, and raise `IntegrityError` for the first violation with the referring table, row primary-key value, referring column and value, and referenced table and column accurately described."} +{"repo": "django/django", "buggy_commit": "0773837e15bb632afffb6848a58c59a791008fa1", "bug_issue": 32177, "solve_pr": 13658, "call_graph": {"nodes": [{"id": "django/core/management/__init__.py::ManagementUtility::execute"}, {"id": "django/core/management/__init__.py::execute_from_command_line"}], "edges": [{"source": "django/core/management/__init__.py::execute_from_command_line", "target": "django/core/management/__init__.py::ManagementUtility::execute"}]}, "graph_spec": "`execute_from_command_line(argv)` must create a `ManagementUtility` with the supplied argument vector (or its normal default) and invoke `execute()` exactly once. `ManagementUtility.execute()` must treat the first command argument as the subcommand, defaulting to help when absent; process global `--settings` and `--pythonpath` early so command discovery and setup use that environment; record configuration/import problems for help reporting; initialize Django before ordinary command execution (with the runserver autoreload path remaining usable when initial setup raises); honor autocomplete’s early successful exit; provide the documented help and version forms without command dispatch; and otherwise resolve the selected command and run it with the original argv so command-specific parsing and execution receive the user’s arguments unchanged."} +{"repo": "django/django", "buggy_commit": "fe886eee36be8022f34cfe59aa61ff1c21fe01d9", "bug_issue": 32208, "solve_pr": 13794, "call_graph": {"nodes": [{"id": "django/utils/functional.py::lazy"}, {"id": "django/utils/translation/__init__.py::lazy_number"}], "edges": [{"source": "django/utils/translation/__init__.py::lazy_number", "target": "django/utils/functional.py::lazy"}]}, "graph_spec": "`lazy()` must return a promise-like proxy that preserves the call arguments, defers invoking the wrapped callable until the value is consumed through text/bytes conversion, representation, comparison, hashing, arithmetic, or result-type methods, and re-evaluates the callable on each such access rather than caching it; it must expose the declared result class’s behavior, reject simultaneous text and bytes result declarations, and remain reconstructible by pickling. `lazy_number()` must build plural-aware lazy text on top of that mechanism: a concrete integer count is supplied to the translation callable immediately as deferred call data, while a count named by a mapping key is resolved only during `%` interpolation or `format()`, selecting translation from that resolved value before formatting. Mapping-based counts must report a missing required key clearly, preserve the original lazy-number construction across pickling, and tolerate a translated string with no interpolation placeholder by returning it unchanged after translation."} +{"repo": "django/django", "buggy_commit": "d746f28949c009251a8741ba03d156964050717f", "bug_issue": 32235, "solve_pr": 13741, "call_graph": {"nodes": [{"id": "django/contrib/auth/forms.py::ReadOnlyPasswordHashField::__init__"}], "edges": []}, "graph_spec": "ReadOnlyPasswordHashField.__init__ initializes a form field for read-only display of password hash information in user-management forms, accepting standard form-field configuration. It supports Django’s authentication model, in which stored password hashes represent credentials without exposing the raw password."} +{"repo": "django/django", "buggy_commit": "98ad327864aed8df245fd19ea9d2743279e11643", "bug_issue": 32302, "solve_pr": 13820, "call_graph": {"nodes": [{"id": "django/db/migrations/loader.py::MigrationLoader::__init__"}, {"id": "django/db/migrations/loader.py::MigrationLoader::build_graph"}, {"id": "django/db/migrations/loader.py::MigrationLoader::load_disk"}], "edges": [{"source": "django/db/migrations/loader.py::MigrationLoader::__init__", "target": "django/db/migrations/loader.py::MigrationLoader::build_graph"}, {"source": "django/db/migrations/loader.py::MigrationLoader::build_graph", "target": "django/db/migrations/loader.py::MigrationLoader::load_disk"}]}, "graph_spec": "Django migrations represent versioned changes to a database schema, with dependencies expressing relationships between migrations. MigrationLoader.__init__ initializes the loader with a database connection and loading options; load_disk loads migration definitions for installed applications, and build_graph combines migration information from disk with database-recorded migration status to construct a dependency graph."} +{"repo": "django/django", "buggy_commit": "415f50298f97fb17f841a9df38d995ccf347dfcc", "bug_issue": 32314, "solve_pr": 13837, "call_graph": {"nodes": [{"id": "django/core/management/commands/runserver.py::Command::handle"}, {"id": "django/core/management/commands/runserver.py::Command::run"}, {"id": "django/utils/autoreload.py::get_child_arguments"}, {"id": "django/utils/autoreload.py::restart_with_reloader"}, {"id": "django/utils/autoreload.py::run_with_reloader"}], "edges": [{"source": "django/core/management/commands/runserver.py::Command::handle", "target": "django/core/management/commands/runserver.py::Command::run"}, {"source": "django/core/management/commands/runserver.py::Command::run", "target": "django/utils/autoreload.py::run_with_reloader"}, {"source": "django/utils/autoreload.py::restart_with_reloader", "target": "django/utils/autoreload.py::get_child_arguments"}, {"source": "django/utils/autoreload.py::run_with_reloader", "target": "django/utils/autoreload.py::restart_with_reloader"}]}, "graph_spec": "`runserver` must reject unsafe or invalid startup configuration, resolve the requested address/port and IPv6 state (including bracketed IPv6 display semantics), then either run the server directly when reloading is disabled or delegate the same invocation options to the autoreloader. The autoreloader must distinguish its supervisor process from its marked child: the supervisor reconstructs an executable command that preserves the active Python interpreter, warning options, module-versus-script invocation form, and original arguments, with valid Windows launcher/script fallbacks, and starts each child with the autoreload environment marker. A child exit status of 3 denotes a reload request and must cause another child launch; every other child status must be returned as the supervisor’s termination status. In the marked child, the supplied server entrypoint must run under a selected file watcher, while termination signals and keyboard interruption allow orderly process termination."} +{"repo": "django/django", "buggy_commit": "f39634ff229887bf7790c069d0c411b38494ca38", "bug_issue": 32332, "solve_pr": 13964, "call_graph": {"nodes": [{"id": "django/db/models/base.py::Model::_prepare_related_fields_for_save"}, {"id": "django/db/models/base.py::Model::save"}, {"id": "django/db/models/query.py::QuerySet::_prepare_for_bulk_create"}, {"id": "django/db/models/query.py::QuerySet::bulk_create"}], "edges": [{"source": "django/db/models/base.py::Model::save", "target": "django/db/models/base.py::Model::_prepare_related_fields_for_save"}, {"source": "django/db/models/query.py::QuerySet::_prepare_for_bulk_create", "target": "django/db/models/base.py::Model::_prepare_related_fields_for_save"}, {"source": "django/db/models/query.py::QuerySet::bulk_create", "target": "django/db/models/query.py::QuerySet::_prepare_for_bulk_create"}]}, "graph_spec": "Django models represent database records, with relationship fields expressing links between records. Model.save persists an individual instance, while QuerySet.bulk_create inserts a collection of instances; _prepare_for_bulk_create prepares objects for bulk insertion, and _prepare_related_fields_for_save provides related-field preparation shared by both persistence paths."} +{"repo": "django/django", "buggy_commit": "0c42cdf0d2422f4c080e93594d5d15381d6e955e", "bug_issue": 32367, "solve_pr": 13925, "call_graph": {"nodes": [{"id": "django/core/checks/model_checks.py::check_all_models"}, {"id": "django/db/models/base.py::Model::_check_default_pk"}, {"id": "django/db/models/base.py::Model::check"}], "edges": [{"source": "django/core/checks/model_checks.py::check_all_models", "target": "django/db/models/base.py::Model::check"}, {"source": "django/db/models/base.py::Model::check", "target": "django/db/models/base.py::Model::_check_default_pk"}]}, "graph_spec": "These functions support Django’s system check framework for statically validating model definitions and reporting diagnostic messages: check_all_models coordinates model checks across the application scope, while Model.check provides model-level validation. Model._check_default_pk addresses configuration of automatically created primary key fields, which identify model records and have a default field type configurable at the project or application level."} +{"repo": "django/django", "buggy_commit": "619f26d2895d121854b1bed1b535d42b722e2eba", "bug_issue": 32442, "solve_pr": 14007, "call_graph": {"nodes": [{"id": "django/db/models/sql/compiler.py::SQLInsertCompiler::execute_sql"}], "edges": []}, "graph_spec": "SQLInsertCompiler.execute_sql performs database insertion for Django’s object-relational mapping layer, where model data corresponds to records in database tables. Its role is to execute an insert query and provide returned model-field values to the caller as part of persisting new records."} +{"repo": "django/django", "buggy_commit": "466920f6d726eee90d5566e0a9948e92b33a122e", "bug_issue": 32455, "solve_pr": 14017, "call_graph": {"nodes": [{"id": "django/db/models/query_utils.py::Q::__and__"}, {"id": "django/db/models/query_utils.py::Q::__or__"}, {"id": "django/db/models/query_utils.py::Q::_combine"}], "edges": [{"source": "django/db/models/query_utils.py::Q::__and__", "target": "django/db/models/query_utils.py::Q::_combine"}, {"source": "django/db/models/query_utils.py::Q::__or__", "target": "django/db/models/query_utils.py::Q::_combine"}]}, "graph_spec": "Q objects represent reusable SQL conditions for database queries. Q.__and__ and Q.__or__ compose these conditions through logical AND and OR, producing combined Q objects; Q._combine provides the shared composition role within this scope."} +{"repo": "django/django", "buggy_commit": "bc04941bf811d1ea2c79fb7fc20457ed2c7e3410", "bug_issue": 32546, "solve_pr": 14122, "call_graph": {"nodes": [{"id": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_group_by"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}], "edges": [{"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_group_by"}]}, "graph_spec": "SQL compilation must first establish a consistent select list, ordering, WHERE/HAVING split, any DISTINCT-required ordering selects, and a GROUP BY derived from the query’s minimum grouping plus relevant select, ordering, and HAVING expressions; grouping SQL must be formatted and deduplicated with its parameters preserved. It must then produce a parameterized SELECT whose clauses occur in SQL order, honor backend capabilities and transaction requirements for compound operations and row locking, and restore query alias reference counts on every exit. Compound SELECTs must compile each nonempty component with a compatible projected column set, reject unsupported component ordering or slicing, preserve component parameter order, omit empty components only where the set operation permits it, and apply UNION ALL only for UNION. When ordering expressions are added solely to satisfy DISTINCT, a subquery used as an expression must expose only its intended select columns."} +{"repo": "django/django", "buggy_commit": "45814af6197cfd8f4dc72ee43b90ecde305a1d5a", "bug_issue": 32548, "solve_pr": 14140, "call_graph": {"nodes": [{"id": "django/db/models/query_utils.py::Q::__and__"}, {"id": "django/db/models/query_utils.py::Q::__or__"}, {"id": "django/db/models/query_utils.py::Q::_combine"}, {"id": "django/db/models/query_utils.py::Q::deconstruct"}], "edges": [{"source": "django/db/models/query_utils.py::Q::__and__", "target": "django/db/models/query_utils.py::Q::_combine"}, {"source": "django/db/models/query_utils.py::Q::__or__", "target": "django/db/models/query_utils.py::Q::_combine"}, {"source": "django/db/models/query_utils.py::Q::_combine", "target": "django/db/models/query_utils.py::Q::deconstruct"}]}, "graph_spec": "Q objects represent reusable SQL conditions for database operations. Within this scope, __and__ and __or__ provide logical conjunction and disjunction, supported by _combine to compose conditions into Q objects; deconstruct provides reconstruction information for Django’s object serialization."} +{"repo": "django/django", "buggy_commit": "5a8e8f80bb82a867eab7e4d9d099f21d0a976d22", "bug_issue": 32669, "solve_pr": 14311, "call_graph": {"nodes": [{"id": "django/core/management/commands/runserver.py::Command::handle"}, {"id": "django/core/management/commands/runserver.py::Command::run"}, {"id": "django/utils/autoreload.py::get_child_arguments"}, {"id": "django/utils/autoreload.py::restart_with_reloader"}, {"id": "django/utils/autoreload.py::run_with_reloader"}], "edges": [{"source": "django/core/management/commands/runserver.py::Command::handle", "target": "django/core/management/commands/runserver.py::Command::run"}, {"source": "django/core/management/commands/runserver.py::Command::run", "target": "django/utils/autoreload.py::run_with_reloader"}, {"source": "django/utils/autoreload.py::restart_with_reloader", "target": "django/utils/autoreload.py::get_child_arguments"}, {"source": "django/utils/autoreload.py::run_with_reloader", "target": "django/utils/autoreload.py::restart_with_reloader"}]}, "graph_spec": "The development-server command must reject unsafe or invalid startup configuration, normalize the requested host, port, and IPv6 mode (including appropriate defaults), and then either run directly when reloading is disabled or delegate the same server-start callback and options to the reloader. Reloading must separate a supervising process from a marked child process: the supervisor must reconstruct an equivalent Python invocation, retaining warning options and faithfully handling module-based, script-based, and supported Windows entrypoints, then launch the child with the autoreload environment marker. The child must run the supplied server callback under a selected file reloader, while the supervisor restarts it only for the designated reload exit status and otherwise returns the child’s final exit status; termination interrupts should end cleanly."} +{"repo": "django/django", "buggy_commit": "187118203197801c6cb72dc8b06b714b23b6dd3d", "bug_issue": 32687, "solve_pr": 14315, "call_graph": {"nodes": [{"id": "django/core/management/commands/dbshell.py::Command::handle"}, {"id": "django/db/backends/base/client.py::BaseDatabaseClient::runshell"}, {"id": "django/db/backends/postgresql/client.py::DatabaseClient::settings_to_cmd_args_env"}], "edges": [{"source": "django/core/management/commands/dbshell.py::Command::handle", "target": "django/db/backends/base/client.py::BaseDatabaseClient::runshell"}]}, "graph_spec": "The dbshell command must select the requested database connection and delegate all trailing parameters unchanged to its client shell. The client must translate PostgreSQL settings into a `psql` invocation, placing configured user, host, port, and database arguments before user-supplied parameters; when neither a database name nor service is configured, it must target `postgres`. Connection secrets and PostgreSQL service/TLS/passfile options must be supplied through the corresponding environment variables, preserving the inherited process environment when any are set. The shell process must report a missing executable and nonzero exit status as command errors, and PostgreSQL execution must temporarily ignore SIGINT so `psql` receives it, then always restore the prior handler."} +{"repo": "django/django", "buggy_commit": "06fd4df41afb5aa1d681b853c3c08d8c688ca3a5", "bug_issue": 32690, "solve_pr": 14351, "call_graph": {"nodes": [{"id": "django/db/models/lookups.py::In::get_group_by_cols"}], "edges": []}, "graph_spec": "In.get_group_by_cols() identifies the column references contributed by a membership lookup expression for SQL GROUP BY construction. It participates in Django’s expression interface for grouping, which organizes query rows into groups for aggregation."} +{"repo": "django/django", "buggy_commit": "a708f39ce67af174df90c5b5e50ad1976cec7cb8", "bug_issue": 32713, "solve_pr": 14349, "call_graph": {"nodes": [{"id": "django/core/validators.py::URLValidator::__call__"}], "edges": [{"source": "django/core/validators.py::URLValidator::__call__", "target": "django/core/validators.py::URLValidator::__call__"}]}, "graph_spec": "URLValidator.__call__ accepts only string URLs with no tab, carriage-return, or newline characters and with a scheme permitted by the validator, treating scheme matching case-insensitively. It must reject malformed URLs with the configured ValidationError message, code, and original value, while accepting syntactically valid URLs including optional credentials, supported host forms, and internationalized domain names when their ASCII-compatible form is valid. Bracketed IPv6 hosts require semantic IPv6 validation beyond structural matching, and every accepted URL must have a parsed hostname no longer than 253 characters."} +{"repo": "django/django", "buggy_commit": "7272e1963ffdf39c1d4fe225d5425a45dd095d11", "bug_issue": 32716, "solve_pr": 14493, "call_graph": {"nodes": [{"id": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::collect"}, {"id": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::handle"}, {"id": "django/contrib/staticfiles/storage.py::HashedFilesMixin::post_process"}], "edges": [{"source": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::collect", "target": "django/contrib/staticfiles/storage.py::HashedFilesMixin::post_process"}, {"source": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::handle", "target": "django/contrib/staticfiles/management/commands/collectstatic.py::Command::collect"}]}, "graph_spec": "The command must initialize its requested collection mode, warn and require affirmative confirmation before a potentially overwriting or clearing run when interaction is enabled, and then collect each discovered static path exactly once, preserving finder precedence by retaining the first source for duplicate destination paths. It must copy or link eligible files as configured, avoid filesystem mutation in dry-run mode, and return counts that distinguish modified, unchanged, and successfully post-processed originals. When enabled and supported by the destination storage, post-processing must receive the complete resolved path-to-source mapping and the dry-run flag; each yielded result must be accounted for, while any yielded exception aborts the command. Hashed-file post-processing must leave non-adjustable assets available under content-derived names, rewrite supported relative static references in adjustable CSS/JavaScript assets to their corresponding hashed URLs while preserving unsupported external or non-static URLs and fragments, iterate dependent rewrites until hashes stabilize, update the original-to-hashed mapping only with the final resolved names, and report failure if convergence exceeds its configured pass limit."} +{"repo": "django/django", "buggy_commit": "de32fe83a2e4a20887972c69a0693b94eb25a88b", "bug_issue": 32754, "solve_pr": 14404, "call_graph": {"nodes": [{"id": "django/contrib/admin/sites.py::AdminSite::catch_all_view"}], "edges": []}, "graph_spec": "AdminSite.catch_all_view is the terminal handler for otherwise-unmatched admin paths: it must raise Http404 by default. Only when APPEND_SLASH is enabled and the captured URL lacks a trailing slash may it resolve the request path with one slash appended, using the request-specific URLconf when present. If that resolves to a view that permits slash appending (the attribute is absent or true), it must return a permanent redirect to the request path with exactly one trailing slash; an unresolvable path or a view that opts out must remain a 404. The handler itself must be excluded from generic APPEND_SLASH redirection so this decision is made by the admin catch-all logic."} +{"repo": "django/django", "buggy_commit": "5e04e84d67da8163f365e9f5fcd169e2630e2873", "bug_issue": 32777, "solve_pr": 14434, "call_graph": {"nodes": [{"id": "django/contrib/gis/db/backends/spatialite/schema.py::SpatialiteSchemaEditor::remove_field"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_create_unique_sql"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_field"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_unique_together"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::table_sql"}, {"id": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::_alter_field_type_workaround"}, {"id": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_field"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_many_to_many"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_constraint"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::remove_constraint"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::remove_field"}, {"id": "django/db/models/constraints.py::UniqueConstraint::create_sql"}], "edges": [{"source": "django/contrib/gis/db/backends/spatialite/schema.py::SpatialiteSchemaEditor::remove_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_field", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_unique_together", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_create_unique_sql"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::table_sql"}, {"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::table_sql", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_create_unique_sql"}, {"source": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::_alter_field_type_workaround", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::add_field"}, {"source": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::_alter_field_type_workaround", "target": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field"}, {"source": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field", "target": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::_alter_field_type_workaround"}, {"source": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field", "target": "django/db/backends/oracle/schema.py::DatabaseSchemaEditor::alter_field"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_many_to_many", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_many_to_many", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_constraint", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::create_model"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::remove_constraint", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::remove_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_remake_table"}, {"source": "django/db/models/constraints.py::UniqueConstraint::create_sql", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_create_unique_sql"}]}, "graph_spec": "Schema changes in this scope must leave the database representing the target model definition while preserving applicable data, relationships, indexes, and constraints. Table creation must emit usable column definitions and model constraints, defer dependent unique, foreign-key, and index SQL until its referenced tables/columns exist, and recursively create auto-created many-to-many through tables. Unique constraints and unique-together changes must use the model’s resolved column names, stable backend-valid names, and the appropriate constraint or unique-index form; unsupported deferrable, partial, covering, or expression variants must produce no SQL. A generated named unique-constraint statement with columns must report each constrained column as referenced when queried by its database table and column names. SQLite changes that cannot be expressed directly must rebuild a replacement table with the updated field/constraint/index metadata, copy retained values (supplying defaults or null-to-non-null coercion where required), replace the old table, restore deferred objects, and rebuild dependent foreign-key or many-to-many tables when their referenced unique/primary-key definition changes; implicit M2M removal deletes its through table, while explicit through relations are retained. Spatialite geometry removal must force that rebuild even though geometry fields have no ordinary database column type. Oracle type changes rejected by the backend must preserve values through a temporary target-typed column, apply required text/date/time conversions, remove the old column, and restore the requested name and nullability."} +{"repo": "django/django", "buggy_commit": "36fa071d6ebd18a61c4d7f1b5c9d17106134bd44", "bug_issue": 32893, "solve_pr": 14580, "call_graph": {"nodes": [{"id": "django/db/migrations/serializer.py::TypeSerializer::serialize"}], "edges": []}, "graph_spec": "TypeSerializer.serialize represents Python type and class references as Python source text for Django migration files, together with any required imports. This supports migrations’ role in preserving historical model definitions in executable Python form."} +{"repo": "django/django", "buggy_commit": "84400d2e9db7c51fee4e9bb04c028f665b8e7624", "bug_issue": 32920, "solve_pr": 14631, "call_graph": {"nodes": [{"id": "django/forms/forms.py::BaseForm::_clean_fields"}, {"id": "django/forms/forms.py::BaseForm::errors"}, {"id": "django/forms/forms.py::BaseForm::full_clean"}], "edges": [{"source": "django/forms/forms.py::BaseForm::errors", "target": "django/forms/forms.py::BaseForm::full_clean"}, {"source": "django/forms/forms.py::BaseForm::full_clean", "target": "django/forms/forms.py::BaseForm::_clean_fields"}]}, "graph_spec": "Accessing errors must lazily run validation once when no error state exists, then return the cached ErrorDict. Full cleaning must reset errors, leave an unbound form without field cleaning, and initialize cleaned_data for bound forms; an unchanged form permitted to be empty must bypass validation. Otherwise, fields are processed in form order: disabled fields validate their initial value, file fields receive both submitted and initial values, and other fields validate submitted widget data. A field’s cleaned value is stored only after successful field cleaning, then may be refined by its clean_() hook; any ValidationError is recorded against that field and that field is absent from cleaned_data, while validation continues for remaining fields before later form-wide processing."} +{"repo": "django/django", "buggy_commit": "d89f976bddb49fb168334960acc8979c3de991fa", "bug_issue": 32992, "solve_pr": 14792, "call_graph": {"nodes": [{"id": "django/db/models/functions/datetime.py::Extract::as_sql"}, {"id": "django/db/models/functions/datetime.py::TimezoneMixin::get_tzname"}, {"id": "django/db/models/functions/datetime.py::TruncBase::as_sql"}, {"id": "django/db/models/functions/datetime.py::TruncDate::as_sql"}, {"id": "django/db/models/functions/datetime.py::TruncTime::as_sql"}, {"id": "django/utils/timezone.py::_get_timezone_name"}, {"id": "django/utils/timezone.py::get_current_timezone_name"}, {"id": "django/utils/timezone.py::get_default_timezone_name"}], "edges": [{"source": "django/db/models/functions/datetime.py::Extract::as_sql", "target": "django/db/models/functions/datetime.py::TimezoneMixin::get_tzname"}, {"source": "django/db/models/functions/datetime.py::TimezoneMixin::get_tzname", "target": "django/utils/timezone.py::_get_timezone_name"}, {"source": "django/db/models/functions/datetime.py::TimezoneMixin::get_tzname", "target": "django/utils/timezone.py::get_current_timezone_name"}, {"source": "django/db/models/functions/datetime.py::TruncBase::as_sql", "target": "django/db/models/functions/datetime.py::TimezoneMixin::get_tzname"}, {"source": "django/db/models/functions/datetime.py::TruncDate::as_sql", "target": "django/db/models/functions/datetime.py::TimezoneMixin::get_tzname"}, {"source": "django/db/models/functions/datetime.py::TruncTime::as_sql", "target": "django/db/models/functions/datetime.py::TimezoneMixin::get_tzname"}, {"source": "django/utils/timezone.py::get_current_timezone_name", "target": "django/utils/timezone.py::_get_timezone_name"}, {"source": "django/utils/timezone.py::get_default_timezone_name", "target": "django/utils/timezone.py::_get_timezone_name"}]}, "graph_spec": "The scoped SQL methods compile temporal expressions into SQL fragments and query parameters for extracting numeric components, truncating temporal precision for filtering or aggregation, and casting datetime expressions to dates or times. The scoped timezone helpers supply textual timezone identifiers, including names for the current and default timezones, supporting the timezone context of these temporal operations."} +{"repo": "django/django", "buggy_commit": "4884a87e022056eda10534c13d74e49b8cdda632", "bug_issue": 33027, "solve_pr": 14771, "call_graph": {"nodes": [{"id": "django/core/management/commands/runserver.py::Command::handle"}, {"id": "django/core/management/commands/runserver.py::Command::run"}, {"id": "django/utils/autoreload.py::get_child_arguments"}, {"id": "django/utils/autoreload.py::restart_with_reloader"}, {"id": "django/utils/autoreload.py::run_with_reloader"}], "edges": [{"source": "django/core/management/commands/runserver.py::Command::handle", "target": "django/core/management/commands/runserver.py::Command::run"}, {"source": "django/core/management/commands/runserver.py::Command::run", "target": "django/utils/autoreload.py::run_with_reloader"}, {"source": "django/utils/autoreload.py::restart_with_reloader", "target": "django/utils/autoreload.py::get_child_arguments"}, {"source": "django/utils/autoreload.py::run_with_reloader", "target": "django/utils/autoreload.py::restart_with_reloader"}]}, "graph_spec": "These functions coordinate Django’s lightweight development web server: Command.handle provides the command entry point, and Command.run manages server execution with automatic reloading support. Automatic reloading lets code changes take effect during development; run_with_reloader coordinates execution of a supplied callable, while restart_with_reloader and get_child_arguments support restarting the development process and preparing its executable arguments."} +{"repo": "django/django", "buggy_commit": "004b4620f6f4ad87261e149898940f2dcd5757ef", "bug_issue": 33043, "solve_pr": 14787, "call_graph": {"nodes": [{"id": "django/utils/decorators.py::_multi_decorate::_wrapper"}], "edges": []}, "graph_spec": "The scoped wrapper supports applying function decorators to instance methods in Django, including methods of class-based views. It serves as the callable adapter for a decorated method, accepting method-call arguments and returning the decorated call’s result; this bridges the distinction between standalone functions and methods associated with an instance."} +{"repo": "django/django", "buggy_commit": "dab48b7482295956973879d15bfd4d3bb0718772", "bug_issue": 33187, "solve_pr": 15037, "call_graph": {"nodes": [{"id": "django/core/management/commands/inspectdb.py::Command::handle"}, {"id": "django/core/management/commands/inspectdb.py::Command::handle_inspection"}], "edges": [{"source": "django/core/management/commands/inspectdb.py::Command::handle", "target": "django/core/management/commands/inspectdb.py::Command::handle_inspection"}]}, "graph_spec": "These functions support the inspectdb management command, which examines an existing database schema and produces a Django model module to help integrate that database with Django. Django models represent database tables and their fields in Python; handle provides the command entry point and output responsibility, while handle_inspection supplies the inspection and model-generation work using command options."} +{"repo": "django/django", "buggy_commit": "a7e7043c8746933dafce652507d3b821801cdc7d", "bug_issue": 33305, "solve_pr": 15104, "call_graph": {"nodes": [{"id": "django/core/management/commands/makemigrations.py::Command::handle"}, {"id": "django/core/management/commands/migrate.py::Command::handle"}, {"id": "django/db/migrations/autodetector.py::MigrationAutodetector::_detect_changes"}, {"id": "django/db/migrations/autodetector.py::MigrationAutodetector::changes"}, {"id": "django/db/migrations/autodetector.py::MigrationAutodetector::generate_renamed_models"}, {"id": "django/db/migrations/autodetector.py::MigrationAutodetector::only_relation_agnostic_fields"}], "edges": [{"source": "django/core/management/commands/makemigrations.py::Command::handle", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::changes"}, {"source": "django/core/management/commands/migrate.py::Command::handle", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::changes"}, {"source": "django/db/migrations/autodetector.py::MigrationAutodetector::_detect_changes", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::generate_renamed_models"}, {"source": "django/db/migrations/autodetector.py::MigrationAutodetector::changes", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::_detect_changes"}, {"source": "django/db/migrations/autodetector.py::MigrationAutodetector::generate_renamed_models", "target": "django/db/migrations/autodetector.py::MigrationAutodetector::only_relation_agnostic_fields"}]}, "graph_spec": "The scoped flow must compare the migration loader’s project state with the installed-app model state and produce dependency-ordered, graph-compatible migration plans; `makemigrations` must use that result for the requested apps (including conversion to initial migrations when requested), report no changes when empty, and otherwise emit the planned migration files, while `migrate` must use the same comparison only to notify that unapplied model changes exist when there is no migration plan. Detection must initialize fresh operation/index/constraint state, exclude unmanaged, proxy, and already-real-app models according to their migration eligibility, resolve both states’ relations, identify model renames before other model-level operations, then order, split, and optimize operations into migrations. A rename is eligible only between removed and added models in the same app whose fields have equivalent deep definitions after ignoring field names and relation targets; confirmation is required, relation dependencies must be retained, and accepted renames must update the old/new model and relation mappings so later comparison treats them as one continuing model."} +{"repo": "django/django", "buggy_commit": "cb383753c0e0eb52306e1024d32a782549c27e61", "bug_issue": 33319, "solve_pr": 15128, "call_graph": {"nodes": [{"id": "django/db/models/query.py::QuerySet::__or__"}, {"id": "django/db/models/sql/query.py::Query::bump_prefix"}, {"id": "django/db/models/sql/query.py::Query::combine"}], "edges": [{"source": "django/db/models/query.py::QuerySet::__or__", "target": "django/db/models/sql/query.py::Query::combine"}]}, "graph_spec": "`QuerySet.__or__` must produce a compatible, independent queryset whose result set is the logical union of the operands: reject already-combined querysets and incompatible projected value selections, preserve either operand unchanged when the other is empty, retain known related-object state from both, and express sliced/non-filterable operands through primary-key membership before combining. `Query.combine(..., OR)` must reject incompatible base models, slicing, or distinctness configuration; merge the right-hand query without mutating it; and correctly combine queries containing repeated or overlapping relationship paths without raising an internal error or changing their result semantics. It must preserve required relationship-path multiplicity and optional-related-row behavior, combine WHERE clauses with OR, carry selection/extra state and right-side-preferred ordering coherently, and reject the ambiguous case where both operands supply extra selected columns."} +{"repo": "django/django", "buggy_commit": "30613d6a748fce18919ff8b0da166d9fda2ed9bc", "bug_issue": 33406, "solve_pr": 15277, "call_graph": {"nodes": [{"id": "django/db/models/fields/__init__.py::CharField::__init__"}], "edges": []}, "graph_spec": "CharField.__init__ initializes a Django model field for string data using field configuration options. In Django’s model API, a CharField describes a text-valued database attribute, with configuration covering character length and database collation."} +{"repo": "django/django", "buggy_commit": "03a648811615cb623affc2d79dccd4b05919319e", "bug_issue": 33408, "solve_pr": 15278, "call_graph": {"nodes": [{"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field"}], "edges": [{"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::add_field"}]}, "graph_spec": "DatabaseSchemaEditor.add_field provides SQLite’s schema-editing operation for adding a field to a Django model’s database representation, using the model and field definitions. Within Django’s migration infrastructure, it translates model-level field additions into database schema changes encompassing columns, relationship tables, and associated indexes and constraints."} +{"repo": "django/django", "buggy_commit": "694cf458f16b8d340a3195244196980b2dec34fd", "bug_issue": 33413, "solve_pr": 15629, "call_graph": {"nodes": [{"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_alter_field"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::_alter_field"}, {"id": "django/db/migrations/operations/fields.py::AlterField::database_backwards"}, {"id": "django/db/migrations/operations/fields.py::AlterField::database_forwards"}, {"id": "django/db/migrations/operations/fields.py::RenameField::database_backwards"}, {"id": "django/db/migrations/operations/fields.py::RenameField::database_forwards"}, {"id": "django/db/models/fields/related.py::ForeignKey::db_parameters"}], "edges": [{"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_alter_field"}, {"source": "django/db/migrations/operations/fields.py::AlterField::database_backwards", "target": "django/db/migrations/operations/fields.py::AlterField::database_forwards"}, {"source": "django/db/migrations/operations/fields.py::AlterField::database_forwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}, {"source": "django/db/migrations/operations/fields.py::RenameField::database_backwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}, {"source": "django/db/migrations/operations/fields.py::RenameField::database_forwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}]}, "graph_spec": "These functions support database schema changes for Django model fields: the forward and backward methods of AlterField and RenameField apply and reverse field-definition and naming changes using migration model states. The base schema editor’s alter_field and the base and SQLite _alter_field methods translate field changes into physical database schema updates. ForeignKey.db_parameters supplies database-definition metadata for a field representing a many-to-one relationship, connecting model relationships with their database representation."} +{"repo": "django/django", "buggy_commit": "652c68ffeebd510a6f59e1b56b3e007d07683ad8", "bug_issue": 33441, "solve_pr": 15315, "call_graph": {"nodes": [{"id": "django/db/models/fields/__init__.py::Field::__hash__"}], "edges": []}, "graph_spec": "Field.__hash__ provides Python’s hashing interface for Django model field objects, returning an integer hash for use in hash-based collections. These objects represent database table columns within Django’s model API."} +{"repo": "django/django", "buggy_commit": "e972620ada4f9ed7bc57f28e133e85c85b0a7b20", "bug_issue": 33463, "solve_pr": 15368, "call_graph": {"nodes": [{"id": "django/db/models/query.py::QuerySet::bulk_update"}], "edges": []}, "graph_spec": "`QuerySet.bulk_update()` must efficiently persist the named field values from a supplied iterable of already-identified model instances, returning the total number of database rows affected. It must reject an empty field list, negative batch sizes, objects without primary keys, and fields that are non-concrete, many-to-many, or primary keys; before writing relation fields, it must prevent an assigned unsaved related object from causing silent data loss. Updates must target rows by each object’s primary key and preserve per-object values (including database expressions), split work only within the database backend’s safe batch limit, apply any backend-required CASE casting, and execute all batches atomically on the queryset’s database. An empty object iterable returns zero; duplicate primary keys within a batch update only the first occurrence, and the returned count may be lower than the number supplied when rows are absent or concurrent changes intervene. This bulk operation bypasses individual model `save()` methods and save signals."} +{"repo": "django/django", "buggy_commit": "67db54a5a7e0f1c2aa395e1db51214d09ae41f3f", "bug_issue": 33468, "solve_pr": 15375, "call_graph": {"nodes": [{"id": "django/db/models/aggregates.py::Aggregate::resolve_expression"}], "edges": []}, "graph_spec": "Aggregate.resolve_expression() prepares an aggregate expression for inclusion in a Django database query, within the expression API’s preprocessing and validation contract. Aggregates represent summary computations over collections of objects; this method accepts query context and returns a resolved copy of the expression, including resolution of nested expressions."} +{"repo": "django/django", "buggy_commit": "6991880109e35c879b71b7d9d9c154baeec12b89", "bug_issue": 33471, "solve_pr": 15561, "call_graph": {"nodes": [{"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_field_should_be_altered"}, {"id": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}, {"id": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::alter_field"}, {"id": "django/db/migrations/operations/fields.py::AlterField::database_backwards"}, {"id": "django/db/migrations/operations/fields.py::AlterField::database_forwards"}, {"id": "django/db/migrations/operations/fields.py::RenameField::database_backwards"}, {"id": "django/db/migrations/operations/fields.py::RenameField::database_forwards"}, {"id": "django/db/migrations/operations/models.py::RenameModel::database_backwards"}, {"id": "django/db/migrations/operations/models.py::RenameModel::database_forwards"}], "edges": [{"source": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_field_should_be_altered"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::alter_field", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::_field_should_be_altered"}, {"source": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::alter_field", "target": "django/db/backends/sqlite3/schema.py::DatabaseSchemaEditor::alter_field"}, {"source": "django/db/migrations/operations/fields.py::AlterField::database_backwards", "target": "django/db/migrations/operations/fields.py::AlterField::database_forwards"}, {"source": "django/db/migrations/operations/fields.py::AlterField::database_forwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}, {"source": "django/db/migrations/operations/fields.py::RenameField::database_backwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}, {"source": "django/db/migrations/operations/fields.py::RenameField::database_forwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}, {"source": "django/db/migrations/operations/models.py::RenameModel::database_backwards", "target": "django/db/migrations/operations/models.py::RenameModel::database_forwards"}, {"source": "django/db/migrations/operations/models.py::RenameModel::database_forwards", "target": "django/db/backends/base/schema.py::BaseDatabaseSchemaEditor::alter_field"}]}, "graph_spec": "These functions support applying and reversing Django migrations that alter field definitions or rename fields and models, connecting model-state changes to database-schema changes. The base and SQLite schema editors accept model and old/new field definitions to perform field alterations, while the field-comparison method determines whether an alteration is needed."} +{"repo": "django/django", "buggy_commit": "770d3e6a4ce8e0a91a9e27156036c1985e74d4a3", "bug_issue": 33482, "solve_pr": 15382, "call_graph": {"nodes": [{"id": "django/db/models/expressions.py::Exists::as_sql"}], "edges": []}, "graph_spec": "Exists.as_sql compiles an ORM Exists expression into SQL and associated query parameters for inclusion in a database query. It uses the query compiler and database connection context to represent a subquery existence check."} +{"repo": "django/django", "buggy_commit": "fbacaa58ffc5a62456ee68b90efa13957f761ce4", "bug_issue": 33582, "solve_pr": 15525, "call_graph": {"nodes": [{"id": "django/core/serializers/base.py::build_instance"}, {"id": "django/core/serializers/python.py::Deserializer"}, {"id": "django/core/serializers/xml_serializer.py::Deserializer::__next__"}, {"id": "django/core/serializers/xml_serializer.py::Deserializer::_handle_object"}], "edges": [{"source": "django/core/serializers/python.py::Deserializer", "target": "django/core/serializers/base.py::build_instance"}, {"source": "django/core/serializers/xml_serializer.py::Deserializer::__next__", "target": "django/core/serializers/xml_serializer.py::Deserializer::_handle_object"}, {"source": "django/core/serializers/xml_serializer.py::Deserializer::_handle_object", "target": "django/core/serializers/base.py::build_instance"}]}, "graph_spec": "The Python and XML deserializers must produce one `DeserializedObject` per valid serialized object, converting its declared primary key and ordinary fields to model-native values, retaining resolved many-to-many values separately, and retaining unresolved forward natural relations for deferred handling. XML iteration must consume object elements in stream order, dispatch each expanded object through the same object-conversion path, and stop cleanly at end of input. Before returning an instance, both formats must use the shared construction rule: when no primary key was supplied and the model supports natural keys, construct the candidate in the selected database context, derive its natural key, and use any matching existing object’s normalized primary key; otherwise preserve the supplied data and create the model instance without a lookup-derived key."} +{"repo": "django/django", "buggy_commit": "59ab3fd0e9e606d7f0f7ca26609c06ee679ece97", "bug_issue": 33598, "solve_pr": 15554, "call_graph": {"nodes": [{"id": "django/contrib/admin/filters.py::AllValuesFieldListFilter::__init__"}, {"id": "django/db/models/expressions.py::F::resolve_expression"}, {"id": "django/db/models/query.py::QuerySet::__or__"}, {"id": "django/db/models/query.py::QuerySet::_values"}, {"id": "django/db/models/query.py::QuerySet::values"}, {"id": "django/db/models/query.py::QuerySet::values_list"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_group_by"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"id": "django/db/models/sql/query.py::Query::add_fields"}, {"id": "django/db/models/sql/query.py::Query::build_filter"}, {"id": "django/db/models/sql/query.py::Query::combine"}, {"id": "django/db/models/sql/query.py::Query::join"}, {"id": "django/db/models/sql/query.py::Query::resolve_ref"}, {"id": "django/db/models/sql/query.py::Query::set_values"}, {"id": "django/db/models/sql/query.py::Query::setup_joins"}, {"id": "django/db/models/sql/where.py::SubqueryConstraint::as_sql"}], "edges": [{"source": "django/contrib/admin/filters.py::AllValuesFieldListFilter::__init__", "target": "django/db/models/query.py::QuerySet::values_list"}, {"source": "django/db/models/expressions.py::F::resolve_expression", "target": "django/db/models/sql/query.py::Query::resolve_ref"}, {"source": "django/db/models/query.py::QuerySet::__or__", "target": "django/db/models/sql/query.py::Query::combine"}, {"source": "django/db/models/query.py::QuerySet::_values", "target": "django/db/models/sql/query.py::Query::set_values"}, {"source": "django/db/models/query.py::QuerySet::values", "target": "django/db/models/query.py::QuerySet::_values"}, {"source": "django/db/models/query.py::QuerySet::values_list", "target": "django/db/models/query.py::QuerySet::_values"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/query.py::Query::set_values"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_group_by", "target": "django/db/models/sql/query.py::Query::resolve_ref"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_group_by"}, {"source": "django/db/models/sql/query.py::Query::add_fields", "target": "django/db/models/sql/query.py::Query::setup_joins"}, {"source": "django/db/models/sql/query.py::Query::combine", "target": "django/db/models/sql/query.py::Query::join"}, {"source": "django/db/models/sql/query.py::Query::resolve_ref", "target": "django/db/models/sql/query.py::Query::setup_joins"}, {"source": "django/db/models/sql/query.py::Query::set_values", "target": "django/db/models/sql/query.py::Query::add_fields"}, {"source": "django/db/models/sql/query.py::Query::setup_joins", "target": "django/db/models/sql/query.py::Query::join"}, {"source": "django/db/models/sql/where.py::SubqueryConstraint::as_sql", "target": "django/db/models/sql/query.py::Query::set_values"}]}, "graph_spec": "This scope must preserve coherent ORM query construction from field references through SQL generation: `values()`/`values_list()` must produce cloned querysets with the requested projection and iterable shape, reject incompatible `flat`/`named` usage, and keep projections, annotations, extras, and grouping references consistent when selections change; admin all-values choices must be distinct, ordered values drawn from the applicable administrator queryset. Field paths and `F()` references must resolve annotations, transforms, joins, aliases, and aggregate context correctly, rejecting disallowed joins, unresolved names, and multicolumn `F()` references. Filters and combined querysets must retain SQL’s relational and NULL semantics, valid join reuse/promotion, alias isolation, compatible model/distinct/slicing constraints, and appropriate ordering. Compilation must emit backend-valid SQL with aligned parameter order, complete and deduplicated GROUP BY requirements from select/order/having expressions, correctly aligned compound-query column lists and restrictions, and subquery constraints projected to their target columns without ordering leakage."} +{"repo": "django/django", "buggy_commit": "9ffd4eae2ce7a7100c98f681e2b6ab818df384a4", "bug_issue": 33618, "solve_pr": 15563, "call_graph": {"nodes": [{"id": "django/db/models/sql/compiler.py::SQLUpdateCompiler::pre_sql_setup"}, {"id": "django/db/models/sql/subqueries.py::UpdateQuery::get_related_updates"}], "edges": []}, "graph_spec": "SQLUpdateCompiler.pre_sql_setup prepares an update query for portable SQL execution, while UpdateQuery.get_related_updates provides query objects for updates to ancestor models. These responsibilities support Django’s multi-table inheritance, where models in an inheritance hierarchy have separate database tables and an update can span those tables."} +{"repo": "django/django", "buggy_commit": "0b31e024873681e187b574fe1c4afe5e48aeeecf", "bug_issue": 33628, "solve_pr": 15572, "call_graph": {"nodes": [{"id": "django/template/autoreload.py::get_template_directories"}, {"id": "django/template/autoreload.py::template_changed"}, {"id": "django/template/autoreload.py::watch_for_template_changes"}], "edges": [{"source": "django/template/autoreload.py::template_changed", "target": "django/template/autoreload.py::get_template_directories"}, {"source": "django/template/autoreload.py::watch_for_template_changes", "target": "django/template/autoreload.py::get_template_directories"}]}, "graph_spec": "These functions connect Django’s template system to development autoreloading: get_template_directories identifies template source directories, watch_for_template_changes registers template monitoring, and template_changed serves as the handler for file-change notifications. Template directories provide the locations where engines and loaders find template sources, giving the monitoring and notification functions their shared scope."} +{"repo": "django/django", "buggy_commit": "647480166bfe7532e8c471fef0146e3a17e6c0c9", "bug_issue": 33710, "solve_pr": 15695, "call_graph": {"nodes": [{"id": "django/db/migrations/operations/models.py::RenameIndex::database_forwards"}], "edges": []}, "graph_spec": "RenameIndex.database_forwards applies the forward database-schema change for a migration that renames an index on a model’s database table. It receives application context, a schema editor, and the model states before and after the migration; its responsibility is to apply the index name change to the live database."} +{"repo": "django/django", "buggy_commit": "93cedc82f29076c824d476354527af1150888e4f", "bug_issue": 33733, "solve_pr": 15731, "call_graph": {"nodes": [{"id": "django/db/models/manager.py::BaseManager._get_queryset_methods..create_method"}, {"id": "django/db/models/manager.py::BaseManager::_get_queryset_methods"}, {"id": "django/db/models/manager.py::BaseManager::from_queryset"}, {"id": "django/db/models/query.py::QuerySet::as_manager"}], "edges": [{"source": "django/db/models/manager.py::BaseManager::_get_queryset_methods", "target": "django/db/models/manager.py::BaseManager._get_queryset_methods..create_method"}, {"source": "django/db/models/manager.py::BaseManager::from_queryset", "target": "django/db/models/manager.py::BaseManager::_get_queryset_methods"}, {"source": "django/db/models/query.py::QuerySet::as_manager", "target": "django/db/models/manager.py::BaseManager::from_queryset"}]}, "graph_spec": "The scope defines how queryset methods become manager methods. `_get_queryset_methods(queryset_class)` must return a name-to-callable mapping built from the queryset class's function members, and normal usage via `from_queryset` must leave the receiving manager class itself unmutated, returning instead a new subclass that carries `_queryset_class` set to the supplied queryset class plus the generated methods. Selection rules: a candidate is skipped when the manager class (including inherited attributes) already defines or inherits that name, when the queryset function's `queryset_only` is truthy, or when `queryset_only` is unset and the name begins with `_`; otherwise the name is included, so explicitly marking a queryset method `queryset_only=False` forces proxying even for names that would otherwise be skipped, while a truthy `queryset_only` marks a method for exclusion, which is why the `as_manager` entry point is not copied onto generated managers. Each generated method must call the manager's `get_queryset()` at invocation time (not bind a queryset early) and delegate to the corresponding queryset method, forwarding all positional and keyword arguments and returning its result unchanged, so manager-level `get_queryset` overrides and per-instance database/hint state are honored. Generated callables should carry the metadata of the queryset method they wrap. `from_queryset(queryset_class, class_name=None)` should name the created class `{cls.__name__}From{queryset_class.__name__}` when no name is given and honor an explicit name otherwise, and the new class must remain constructible and usable as a manager with no arguments. `QuerySet.as_manager()` is a classmethod entry point on the queryset: it must return a manager instance of a dynamically created subclass of the standard manager built from that queryset class, and that instance must be recognizably produced by this path (via `_built_with_as_manager`) so it can be round-tripped as such when deconstructed."} +{"repo": "django/django", "buggy_commit": "8c0886b068ba4e224dd78104b93c9638b860b398", "bug_issue": 33748, "solve_pr": 15741, "call_graph": {"nodes": [{"id": "django/contrib/humanize/templatetags/humanize.py::naturalday"}, {"id": "django/forms/widgets.py::DateTimeBaseInput::format_value"}, {"id": "django/template/defaultfilters.py::date"}, {"id": "django/template/defaultfilters.py::time"}, {"id": "django/template/defaulttags.py::NowNode::render"}, {"id": "django/utils/formats.py::date_format"}, {"id": "django/utils/formats.py::get_format"}, {"id": "django/utils/formats.py::time_format"}], "edges": [{"source": "django/contrib/humanize/templatetags/humanize.py::naturalday", "target": "django/template/defaultfilters.py::date"}, {"source": "django/forms/widgets.py::DateTimeBaseInput::format_value", "target": "django/utils/formats.py::get_format"}, {"source": "django/template/defaultfilters.py::date", "target": "django/utils/formats.py::date_format"}, {"source": "django/template/defaultfilters.py::time", "target": "django/utils/formats.py::time_format"}, {"source": "django/template/defaulttags.py::NowNode::render", "target": "django/template/defaultfilters.py::date"}, {"source": "django/utils/formats.py::date_format", "target": "django/utils/formats.py::get_format"}, {"source": "django/utils/formats.py::time_format", "target": "django/utils/formats.py::get_format"}]}, "graph_spec": "Date and time presentation must consistently resolve an explicitly requested format or the appropriate named default through the active localization policy: localized format modules take precedence when enabled, settings provide the fallback, cached results remain distinguished by format type and language, and localized input-format lists retain the ISO-compatible forms. Template date/time filters must render valid values with those formats (after template local-time conversion), return an empty string for empty or unformattable inputs, and preserve the date-versus-time formatter semantics. Date/time widgets must prefer an instance-supplied input format, otherwise use the first resolved format for their input type, while leaving non-date-like values appropriately representable. The now tag must format the current instant in the current time zone when time-zone support is enabled and either return it or assign it to its requested context variable. Natural-day output must recognize only the local calendar days today, tomorrow, and yesterday with translated labels; other date-like values must use the normal date filter and non-date inputs must pass through unchanged."} +{"repo": "django/django", "buggy_commit": "5eb6a2b33d70b9889e1cafa12594ad6f80773d3a", "bug_issue": 33816, "solve_pr": 15814, "call_graph": {"nodes": [{"id": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::deferred_to_columns"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_default_columns"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_related_selections"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_select"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::setup_query"}, {"id": "django/db/models/sql/query.py::Query::deferred_to_data"}], "edges": [{"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::deferred_to_columns", "target": "django/db/models/sql/query.py::Query::deferred_to_data"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_default_columns", "target": "django/db/models/sql/compiler.py::SQLCompiler::deferred_to_columns"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_related_selections", "target": "django/db/models/sql/compiler.py::SQLCompiler::deferred_to_columns"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_related_selections", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_related_selections"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_select", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_default_columns"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_select", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_related_selections"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::pre_sql_setup", "target": "django/db/models/sql/compiler.py::SQLCompiler::setup_query"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::setup_query", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_select"}]}, "graph_spec": "The compiler must derive a stable SELECT layout before SQL generation, ensuring a base alias exists and retaining enough model/column-position metadata to instantiate the base object and any selected related objects. Deferred or explicit field loading must be converted into per-concrete-model attname sets: unrestricted models remain absent from that map, while every traversed relation preserves the necessary primary keys and forward linking fields, including across inheritance, reverse one-to-one relations, and filtered relation names. Default and related selections must honor those restrictions, avoid reselecting already-provided parent data, recursively follow only permitted `select_related` paths within the depth limit, and reject requested non-relations or unknown relation names. Generated SQL must keep selected expressions, annotations, ordering, grouping, parameters, aliases, limits, locking, and backend capability constraints consistent; compound queries must align their projected values and safely compose or omit empty operands as appropriate. Temporary joins introduced while preparing or compiling the query must not leave altered alias reference counts afterward."} +{"repo": "django/django", "buggy_commit": "b4817d20b9e55df30be0b1b2ca8c8bb6d61aab07", "bug_issue": 33854, "solve_pr": 15851, "call_graph": {"nodes": [{"id": "django/db/backends/postgresql/client.py::DatabaseClient::settings_to_cmd_args_env"}], "edges": []}, "graph_spec": "DatabaseClient.settings_to_cmd_args_env prepares command-line arguments and environment settings for PostgreSQL’s psql client from Django database settings and client parameters. It supports Django’s database-shell integration, connecting application database configuration to the native PostgreSQL command-line interface."} +{"repo": "django/django", "buggy_commit": "63884829acd207404f2a5c3cc1d6b4cd0a822b70", "bug_issue": 33895, "solve_pr": 15930, "call_graph": {"nodes": [{"id": "django/db/models/expressions.py::When::as_sql"}], "edges": []}, "graph_spec": "When.as_sql translates a condition-and-result component of a Django ORM conditional expression into an SQL fragment and associated query parameters, using the query compiler and database connection context. This supports expressing conditional logic within database queries."} +{"repo": "django/django", "buggy_commit": "e9fd2b572410b1236da0d3d0933014138d89f44e", "bug_issue": 33949, "solve_pr": 15987, "call_graph": {"nodes": [{"id": "django/core/management/commands/loaddata.py::Command::fixture_dirs"}], "edges": []}, "graph_spec": "`fixture_dirs` must lazily compute and cache an ordered search path: existing `fixtures` subdirectories for installed apps (limited to the selected app when `app_label` is set), followed by all configured `FIXTURE_DIRS`, then the current directory. It must reject duplicate configured entries and reject any configured entry that duplicates an installed app’s default fixture directory, raising `ImproperlyConfigured`; every returned directory must be canonicalized to its real path, while configured directories remain included even when an app filter is active."} +{"repo": "django/django", "buggy_commit": "0c3981eb5094419fe200eb46c71b5376a2266166", "bug_issue": 33975, "solve_pr": 16032, "call_graph": {"nodes": [{"id": "django/db/models/fields/related_lookups.py::RelatedIn::get_prep_lookup"}, {"id": "django/db/models/query.py::QuerySet::_values"}, {"id": "django/db/models/query.py::QuerySet::values"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"id": "django/db/models/sql/compiler.py::SQLCompiler::get_qualify_sql"}, {"id": "django/db/models/sql/query.py::Query::has_select_fields"}, {"id": "django/db/models/sql/query.py::Query::set_values"}, {"id": "django/db/models/sql/where.py::SubqueryConstraint::as_sql"}], "edges": [{"source": "django/db/models/fields/related_lookups.py::RelatedIn::get_prep_lookup", "target": "django/db/models/fields/related_lookups.py::RelatedIn::get_prep_lookup"}, {"source": "django/db/models/query.py::QuerySet::_values", "target": "django/db/models/sql/query.py::Query::set_values"}, {"source": "django/db/models/query.py::QuerySet::values", "target": "django/db/models/query.py::QuerySet::_values"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::as_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_combinator_sql", "target": "django/db/models/sql/query.py::Query::set_values"}, {"source": "django/db/models/sql/compiler.py::SQLCompiler::get_qualify_sql", "target": "django/db/models/sql/compiler.py::SQLCompiler::as_sql"}, {"source": "django/db/models/sql/where.py::SubqueryConstraint::as_sql", "target": "django/db/models/sql/query.py::Query::set_values"}]}, "graph_spec": "Projection state is explicit: `values()` must clone the queryset, retain any supplied expressions as annotations, select the requested fields, extras, and annotations with the values iterable, and mark the query as having an explicit select list. Setting that list must disable related/deferred loading, keep selection masks and `GROUP BY` references valid, and default an empty values request to all concrete field attribute names. Related `IN` lookups must normalize direct single-column relation values through the target field’s preparation, while an unprojected compatible queryset is projected to the appropriate relation target; subquery constraints likewise select exactly their target columns. SQL compilation must preserve selected-column alignment across every member of a compound query, enforce backend restrictions on ordering/slicing and required compound wrapping, omit only semantically permissible empty members, and concatenate parameters in SQL-part order. Queries requiring window-filter qualification must evaluate ordinary filtering in an inner subquery, expose or add uniquely aliased expressions needed by the qualifying predicate, apply qualification and limits at the correct outer level, and restore the caller-visible projection when temporary columns were introduced."} +{"repo": "django/django", "buggy_commit": "93d4c9ea1de24eb391cb2b3561b6703fd46374df", "bug_issue": 34068, "solve_pr": 16145, "call_graph": {"nodes": [{"id": "django/core/management/commands/runserver.py::Command::handle"}, {"id": "django/core/management/commands/runserver.py::Command::inner_run"}, {"id": "django/core/management/commands/runserver.py::Command::run"}], "edges": [{"source": "django/core/management/commands/runserver.py::Command::handle", "target": "django/core/management/commands/runserver.py::Command::run"}, {"source": "django/core/management/commands/runserver.py::Command::run", "target": "django/core/management/commands/runserver.py::Command::inner_run"}]}, "graph_spec": "The development-server command must reject unsafe host configuration, unavailable or invalid IPv6 usage, and malformed address/port input before startup; otherwise it must derive a valid bind address and port, defaulting to 127.0.0.1:8000 (or ::1 when IPv6 is selected), treating bracketed IPv6 correctly and 0 as the all-IPv4-interfaces display alias. It must preserve the selected options when dispatching through the autoreloader or directly to the server run, run system checks unless explicitly skipped while always checking migrations, announce the effective endpoint and shutdown key, obtain the configured WSGI handler, and start the configured server with the resolved address, numeric port, IPv6, and threading settings. Bind failures must be reported as clear user-facing errors, and an interrupt must exit cleanly while emitting an optional shutdown message."} +{"repo": "django/django", "buggy_commit": "76e37513e22f4d9a01c7f15eee36fe44388e6670", "bug_issue": 34139, "solve_pr": 16256, "call_graph": {"nodes": [{"id": "django/contrib/contenttypes/fields.py::create_generic_related_manager"}, {"id": "django/db/models/fields/related_descriptors.py::create_forward_many_to_many_manager"}, {"id": "django/db/models/fields/related_descriptors.py::create_reverse_many_to_one_manager"}], "edges": []}, "graph_spec": "These factories take a base manager class and relationship metadata and produce specialized Django manager classes for accessing and managing collections of related model objects. create_generic_related_manager supports reverse generic relationships, whose references can target different model classes; create_forward_many_to_many_manager supports either side of many-to-many relationships; and create_reverse_many_to_one_manager supports collections of objects that reference a shared object through a foreign key."} +{"repo": "django/django", "buggy_commit": "7d5329852f19c6ae78c6f6f3d3e41835377bf295", "bug_issue": 34171, "solve_pr": 16315, "call_graph": {"nodes": [{"id": "django/db/models/query.py::QuerySet::bulk_create"}, {"id": "django/db/models/sql/compiler.py::SQLInsertCompiler::as_sql"}], "edges": []}, "graph_spec": "`QuerySet.bulk_create()` must validate its inputs and backend-supported conflict policy, reject multi-table inheritance, prepare related objects, and perform the insertion atomically in backend-sized batches without invoking per-object save signals. It must preserve object grouping by whether a primary key is already present: explicit-PK objects retain that insertion shape, while generated-PK objects omit auto fields; returned database columns are applied to the corresponding objects and successful objects become saved on the write database. `SQLInsertCompiler.as_sql()` must produce correctly quoted INSERT statements whose value preparation, placeholders, and flattened parameters remain aligned for every row; select a single bulk statement or per-row statements according to backend capabilities; and, when applicable, compose conflict handling and returned-column clauses in valid SQL order while returning exactly the parameter sequence required by that statement."} +{"repo": "django/django", "buggy_commit": "60a7bd89860e504c0c33b02c78edcac87f6d1b5a", "bug_issue": 34187, "solve_pr": 16333, "call_graph": {"nodes": [{"id": "django/contrib/auth/forms.py::UserCreationForm::save"}, {"id": "django/contrib/contenttypes/forms.py::BaseGenericInlineFormSet::save_new"}, {"id": "django/views/generic/edit.py::ModelFormMixin::form_valid"}, {"id": "django/views/generic/edit.py::ProcessFormView::post"}], "edges": [{"source": "django/contrib/contenttypes/forms.py::BaseGenericInlineFormSet::save_new", "target": "django/contrib/auth/forms.py::UserCreationForm::save"}, {"source": "django/views/generic/edit.py::ModelFormMixin::form_valid", "target": "django/contrib/auth/forms.py::UserCreationForm::save"}, {"source": "django/views/generic/edit.py::ProcessFormView::post", "target": "django/views/generic/edit.py::ModelFormMixin::form_valid"}]}, "graph_spec": "Saving through this scope must preserve each form’s persistence contract: a user-creation form derives the stored credential from the validated password rather than retaining its raw value, saves the user and pending many-to-many relations only when `commit=True`, and still returns the populated unsaved user when deferred. A generic inline formset must assign a new child both the content type and object identifier of its bound parent before delegating to the child form’s save, while honoring the same `commit` choice. For POST handling, instantiate the bound form once, route invalid forms to the invalid response without saving, and route valid forms through `form_valid`; model-form success handling must save the form, retain the resulting object for success-URL resolution, and return the normal redirect response."} +{"repo": "django/django", "buggy_commit": "39f83765e12b0e5d260b7939fc3fe281d879b279", "bug_issue": 34272, "solve_pr": 16485, "call_graph": {"nodes": [{"id": "django/template/defaultfilters.py::floatformat"}], "edges": []}, "graph_spec": "`floatformat` must convert a numeric input to a localized, safe display string using decimal half-up rounding. With a nonnegative precision it must show exactly that many fractional digits; with a negative precision (including the default −1) it must suppress the fractional part when the value is integral, while otherwise rounding to the corresponding absolute precision. It must preserve numeric sign and avoid scientific-notation output, support `g` to force locale-based thousands grouping and `u` to disable localization (including either combined suffix order), and format non-finite Decimal values as their ordinary string representation. Inputs that cannot be interpreted numerically produce an empty string; an invalid precision or a value that cannot be converted to an integer for integral detection is returned in its original string form."} +{"repo": "django/django", "buggy_commit": "bd366ca2aeffa869b7dbc0b0aa01caea75e6dc31", "bug_issue": 34301, "solve_pr": 16527, "call_graph": {"nodes": [{"id": "django/contrib/admin/templatetags/admin_modify.py::submit_row"}], "edges": []}, "graph_spec": "The `submit_row` function supports displaying the save and delete controls on Django admin forms, using the template context to provide presentation information. These controls support the admin’s model-record editing workflow, allowing users to save changes or access deletion."} +{"repo": "django/django", "buggy_commit": "f9fe062de5fc0896d6bbbf3f260b5c44473b3c77", "bug_issue": 34366, "solve_pr": 16595, "call_graph": {"nodes": [{"id": "django/db/migrations/operations/fields.py::AlterField::reduce"}], "edges": []}, "graph_spec": "AlterField.reduce participates in optimizing Django migrations, which represent changes to model and database schemas, for an operation that changes an existing field’s definition. Given another migration operation and application context, it provides replacement operations or a boolean optimization indication, supporting simplification while preserving the represented changes."} +{"repo": "django/django", "buggy_commit": "9b224579875e30203d079cc2fee83b116d98eb78", "bug_issue": 34384, "solve_pr": 16631, "call_graph": {"nodes": [{"id": "django/contrib/auth/__init__.py::get_user"}, {"id": "django/contrib/auth/middleware.py::AuthenticationMiddleware::process_request"}, {"id": "django/contrib/auth/middleware.py::get_user"}, {"id": "django/utils/decorators.py::_decorator::_wrapper_view"}], "edges": [{"source": "django/contrib/auth/middleware.py::AuthenticationMiddleware::process_request", "target": "django/contrib/auth/middleware.py::get_user"}, {"source": "django/contrib/auth/middleware.py::get_user", "target": "django/contrib/auth/__init__.py::get_user"}, {"source": "django/utils/decorators.py::_decorator::_wrapper_view", "target": "django/contrib/auth/middleware.py::AuthenticationMiddleware::process_request"}]}, "graph_spec": "These functions connect session-based authentication to Django web requests: the authentication and middleware user accessors retrieve the user associated with a request’s session, while AuthenticationMiddleware.process_request exposes the current user on the request. The view wrapper supports applying middleware functionality to individual views, bringing that request-level authentication context into view handling."} +{"repo": "django/django", "buggy_commit": "fbe850106b2e4b85f838219cb9e1df95fba6c164", "bug_issue": 34405, "solve_pr": 16642, "call_graph": {"nodes": [{"id": "django/http/response.py::FileResponse::_set_streaming_content"}, {"id": "django/http/response.py::FileResponse::set_headers"}], "edges": [{"source": "django/http/response.py::FileResponse::_set_streaming_content", "target": "django/http/response.py::FileResponse::set_headers"}]}, "graph_spec": "FileResponse must treat readable file-like content as a managed, block-wise byte stream, retain it for file-serving, arrange for its close method to run with response cleanup, and configure headers before streaming begins; non-file iterables must retain normal streaming-response behavior without file metadata. Header generation must describe only the remaining bytes from the file’s current position, computing Content-Length when supported while preserving or correctly restoring the stream position. Unless a content type was explicitly supplied, Content-Type must be inferred from the effective basename (including safe handling of compressed-file encodings) with an octet-stream fallback. Content-Disposition must use the requested filename or file name’s basename and reflect whether delivery is an attachment, without exposing directory components."} +{"repo": "django/django", "buggy_commit": "02c356f2f3945b8075735d485c3cf48cad991011", "bug_issue": 34424, "solve_pr": 16667, "call_graph": {"nodes": [{"id": "django/forms/widgets.py::SelectDateWidget::value_from_datadict"}], "edges": []}, "graph_spec": "SelectDateWidget.value_from_datadict extracts the widget’s date value from submitted form data for use in form processing. It connects a date input presented as separate month, day, and year selection controls to Django’s interface for retrieving a single widget value."} +{"repo": "django/django", "buggy_commit": "3b62d8c83e3e48d2ed61cfa32a61c56d9e030293", "bug_issue": 34517, "solve_pr": 16801, "call_graph": {"nodes": [{"id": "django/db/models/fields/files.py::ImageField::contribute_to_class"}], "edges": []}, "graph_spec": "ImageField.contribute_to_class registers an image field with its owning Django model class under the supplied field name. It serves as the model integration hook for a field representing image files and their associated width and height metadata."} +{"repo": "django/django", "buggy_commit": "7d96ce68ae2c1bab1f2ab64ddc2b2c6004278af0", "bug_issue": 34620, "solve_pr": 16938, "call_graph": {"nodes": [{"id": "django/core/serializers/python.py::Serializer::handle_m2m_field"}, {"id": "django/core/serializers/xml_serializer.py::Serializer::handle_m2m_field"}], "edges": []}, "graph_spec": "These functions handle serialization of Django model many-to-many fields, which represent associations between multiple model instances on both sides of a relationship. Given a model instance and field, the Python serializer contributes the relationship’s representation to basic Python output, while the XML serializer contributes it to XML output."} +{"repo": "django/django", "buggy_commit": "f8c43aca467b7b0c4bb0a7fa41362f90b610b8df", "bug_issue": 34717, "solve_pr": 17084, "call_graph": {"nodes": [{"id": "django/contrib/admin/filters.py::BooleanFieldListFilter::choices"}, {"id": "django/contrib/admin/filters.py::ChoicesFieldListFilter::choices"}, {"id": "django/contrib/admin/filters.py::DateFieldListFilter::choices"}, {"id": "django/contrib/admin/filters.py::EmptyFieldListFilter::choices"}, {"id": "django/contrib/admin/filters.py::FacetsMixin::get_facet_queryset"}, {"id": "django/contrib/admin/filters.py::RelatedFieldListFilter::choices"}, {"id": "django/contrib/admin/filters.py::SimpleListFilter::choices"}, {"id": "django/db/models/query.py::QuerySet::aggregate"}, {"id": "django/db/models/sql/query.py::Query::get_aggregation"}], "edges": [{"source": "django/contrib/admin/filters.py::BooleanFieldListFilter::choices", "target": "django/contrib/admin/filters.py::FacetsMixin::get_facet_queryset"}, {"source": "django/contrib/admin/filters.py::ChoicesFieldListFilter::choices", "target": "django/contrib/admin/filters.py::FacetsMixin::get_facet_queryset"}, {"source": "django/contrib/admin/filters.py::DateFieldListFilter::choices", "target": "django/contrib/admin/filters.py::FacetsMixin::get_facet_queryset"}, {"source": "django/contrib/admin/filters.py::EmptyFieldListFilter::choices", "target": "django/contrib/admin/filters.py::FacetsMixin::get_facet_queryset"}, {"source": "django/contrib/admin/filters.py::FacetsMixin::get_facet_queryset", "target": "django/db/models/query.py::QuerySet::aggregate"}, {"source": "django/contrib/admin/filters.py::RelatedFieldListFilter::choices", "target": "django/contrib/admin/filters.py::FacetsMixin::get_facet_queryset"}, {"source": "django/contrib/admin/filters.py::SimpleListFilter::choices", "target": "django/contrib/admin/filters.py::FacetsMixin::get_facet_queryset"}, {"source": "django/db/models/query.py::QuerySet::aggregate", "target": "django/db/models/sql/query.py::Query::get_aggregation"}]}, "graph_spec": "Each admin list-filter `choices()` node must yield a stable, ordered stream of choice mappings carrying `selected`, `query_string`, and a human-readable `display`; the set of choices is derived from the filter's own configured choices/links, and only when `changelist.add_facets` is truthy may display text be augmented with per-choice counts. In the faceted path, every such node must obtain all counts through `FacetsMixin.get_facet_queryset(changelist)`, which builds the queryset from the changelist while excluding the filter's own expected parameters, then aggregates exactly the count expressions supplied by the filter's `get_facet_counts()`, keyed so each filter can map a choice to its count (or fall back to an unavailable indicator/marker where a named key is absent). Count aggregations must be computed over the filtered queryset without mutating the changelist or leaking the temporarily substituted filter parameter values. `QuerySet.aggregate()` must reject querysets using `distinct(fields)`, require all supplied expressions to be aggregate expressions and each complex positional aggregate to have a usable default alias, otherwise raise the appropriate `TypeError`/`NotImplementedError`, and must return a plain mapping of alias to value produced by chaining the query and delegating to `Query.get_aggregation()`; it must not restrict to a single aggregate. `Query.get_aggregation()` must return an empty mapping when no aggregate expressions are given, validate and resolve each alias (rejecting non-aggregate expressions), and produce exactly one result row containing all requested aggregates while honoring existing grouping/annotations, limits, distinctness, subquery references, window references, HAVING/QUALIFY, and combinator state — using an inner subquery plus outer aggregate query when any of those require aggregation over already-shaped results, and returning results keyed by the requested aliases."} +{"repo": "duckdb/duckdb", "buggy_commit": "668f94740b280bf44c7c081df664ae1eb310c090", "bug_issue": 25298, "solve_pr": 25552, "call_graph": {"nodes": [{"id": "src/function/cast/string_cast.cpp::StringToNestedTypeCast"}], "edges": []}, "graph_spec": "`StringToNestedTypeCast` is the bound cast functor from VARCHAR into a nested target (LIST, ARRAY, STRUCT/TUPLE, MAP); it is templated on a target-shape helper whose `StringToNestedTypeCastLoop` does the per-row parsing and recursive child casting. It must require a VARCHAR source (asserted) and dispatch on the source vector type. A CONSTANT_VECTOR contributes exactly one string value with one-row semantics and no selection vector, and the result must be re-normalized to a constant vector afterward because a child (e.g. a shredded VARIANT child) may not itself be representable as constant; any other vector type must be read through unified format so the data pointer, validity mask, and selection vector are all honored. In the non-constant path the helper loop is invoked with the full row count and the source selection vector, so every row must resolve its source value and validity through the selection index while writing result state at the logical row position; NULL source rows must produce NULL results and must not be reported as conversion failures. The result's flat validity mask is shared with the helper, which marks rows NULL for parse or child-cast errors according to the cast parameters, and the boolean return must be false if any non-null value failed soft casting (true when all converted). Overall the result's cardinality and shape must match the source (one broadcast row for constant input, otherwise `count` rows)."} +{"repo": "duckdb/duckdb", "buggy_commit": "6d7abb1090e1079f252b15ba0366310bb87d8582", "bug_issue": 25304, "solve_pr": 25303, "call_graph": {"nodes": [{"id": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::Rollback"}, {"id": "src/execution/operator/schema/physical_create_index.cpp::PhysicalCreateIndex::Sink"}, {"id": "src/execution/physical_plan/plan_create_index.cpp::PhysicalPlanGenerator::CreatePlan"}, {"id": "src/planner/binder/statement/bind_alter.cpp::Binder::Bind"}, {"id": "src/planner/binder/statement/bind_alter.cpp::Binder::BindAlterAddIndex"}, {"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayAlter"}, {"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry"}, {"id": "src/storage/write_ahead_log.cpp::WriteAheadLog::WriteAlter"}, {"id": "src/transaction/duck_transaction.cpp::DuckTransaction::WriteToWAL"}, {"id": "src/transaction/duck_transaction_manager.cpp::DuckTransactionManager::CommitTransaction"}, {"id": "src/transaction/meta_transaction.cpp::MetaTransaction::Commit"}, {"id": "src/transaction/undo_buffer.cpp::UndoBuffer::WriteToWAL"}, {"id": "src/transaction/wal_write_state.cpp::WALWriteState::CommitEntry"}, {"id": "src/transaction/wal_write_state.cpp::WALWriteState::WriteCatalogEntry"}], "edges": [{"source": "src/execution/physical_plan/plan_create_index.cpp::PhysicalPlanGenerator::CreatePlan", "target": "src/execution/physical_plan/plan_create_index.cpp::PhysicalPlanGenerator::CreatePlan"}, {"source": "src/planner/binder/statement/bind_alter.cpp::Binder::BindAlterAddIndex", "target": "src/planner/binder/statement/bind_alter.cpp::Binder::BindAlterAddIndex"}, {"source": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry", "target": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayAlter"}, {"source": "src/transaction/duck_transaction.cpp::DuckTransaction::WriteToWAL", "target": "src/transaction/undo_buffer.cpp::UndoBuffer::WriteToWAL"}, {"source": "src/transaction/duck_transaction_manager.cpp::DuckTransactionManager::CommitTransaction", "target": "src/transaction/duck_transaction.cpp::DuckTransaction::WriteToWAL"}, {"source": "src/transaction/meta_transaction.cpp::MetaTransaction::Commit", "target": "src/transaction/duck_transaction_manager.cpp::DuckTransactionManager::CommitTransaction"}, {"source": "src/transaction/undo_buffer.cpp::UndoBuffer::WriteToWAL", "target": "src/transaction/wal_write_state.cpp::WALWriteState::CommitEntry"}, {"source": "src/transaction/wal_write_state.cpp::WALWriteState::CommitEntry", "target": "src/transaction/wal_write_state.cpp::WALWriteState::WriteCatalogEntry"}, {"source": "src/transaction/wal_write_state.cpp::WALWriteState::WriteCatalogEntry", "target": "src/storage/write_ahead_log.cpp::WriteAheadLog::WriteAlter"}]}, "graph_spec": "`ALTER TABLE ... ADD` of an index-based (UNIQUE or PRIMARY KEY) constraint must behave as one atomic operation that both builds a physical index and adds the catalog constraint, staying consistent through binding, planning, execution, commit, WAL journaling/replay, and rollback. Binding must resolve the altered entry, require a table in a non-system catalog, register the catalog as modified unless the table is temporary, and for an add-unique request rewrite it into an index build bound against a table scan while carrying the derived constraint/index name, key columns, and constraint type. The create-index plan must fail when an index of that name already exists (unless conflicts are ignored), reject non-Duck tables, side-effecting key expressions, and unknown index types, and lower to scan → projection → optional NULL filter → optional sort → create-index, where NULL keys are filtered out for UNIQUE but retained for PRIMARY KEY so they can be rejected; execution must enforce NOT NULL for primary keys, refuse to finalize against a table that was dropped or altered (transaction conflict), and apply the catalog alteration only after verifying no same-named index already exists, then register the physical index in storage. A committing transaction writes to the WAL only when it changed data and WAL writes are enabled; catalog entries flow through the undo buffer in order, and an add-unique ALTER record must serialize both the alter info and the created index's storage description, while other ALTER records serialize only the alter info. Replay must reconstruct the constraint and, for add-unique, the index from that payload so recovery reproduces the same schema, and rolling back the table must remove physical indexes for constraints that were absent before the ALTER so no orphaned index survives."} +{"repo": "duckdb/duckdb", "buggy_commit": "6d7abb1090e1079f252b15ba0366310bb87d8582", "bug_issue": 25324, "solve_pr": 25323, "call_graph": {"nodes": [{"id": "src/planner/binder/statement/bind_insert.cpp::Binder::BindNode"}, {"id": "src/planner/binder/statement/bind_insert.cpp::Binder::GenerateMergeInto"}, {"id": "src/planner/binder/statement/bind_insert.cpp::CreateSetInfoForReplace"}], "edges": [{"source": "src/planner/binder/statement/bind_insert.cpp::Binder::BindNode", "target": "src/planner/binder/statement/bind_insert.cpp::Binder::GenerateMergeInto"}, {"source": "src/planner/binder/statement/bind_insert.cpp::Binder::GenerateMergeInto", "target": "src/planner/binder/statement/bind_insert.cpp::CreateSetInfoForReplace"}]}, "graph_spec": "An INSERT query node carrying ON CONFLICT information must not be planned as a plain insert: BindNode resolves the target as a table entry (rejecting non-table entries and expanding insert triggers first), and whenever on_conflict_info is present it lowers the statement into a MERGE INTO through GenerateMergeInto and binds that resulting statement, so the observable insert-or-update/ignore behavior, statement properties, and the Count/BIGINT result shape are inherited from the bound merge. GenerateMergeInto must derive the conflict target either from the table's unique/primary-key indexes, forming `target. = excluded.` equalities over each index and failing when no unique constraint exists or, for any action other than DO NOTHING, when more than one index matches, or from explicitly listed conflict columns, rejecting ROWID/generated columns and any list that is not exactly covered by a unique index; it must expose incoming rows under the name `excluded`, expand defaults in VALUES, alias and default-pad by-position sources up to the target columns, apply DISTINCT ON over each conflict target, map REPLACE to a WHEN MATCHED update, reject ON CONFLICT WHERE, emit WHEN NOT MATCHED as an insert preserving the original column order, and propagate RETURNING. For REPLACE/DO UPDATE, the WHEN MATCHED action must update exactly the columns that are not part of any unique conflict key: CreateSetInfoForReplace gathers the physical columns referenced by unique indexes, omits those columns from the SET list whether the insert supplies an implicit full column list or an explicit one, and provides the remaining columns as excluded-qualified references, so a conflicting row keeps its key values while receiving all other incoming values."} +{"repo": "duckdb/duckdb", "buggy_commit": "79469d161a61de178d8cae745c901cbc9ba3cc15", "bug_issue": 25368, "solve_pr": 25369, "call_graph": {"nodes": [{"id": "src/function/cast/union_casts.cpp::UnionMemberToMemberCast"}, {"id": "src/function/cast/union_casts.cpp::duckdb::ToUnionCast"}, {"id": "src/function/cast/union_casts.cpp::duckdb::UnionToVarcharCast"}], "edges": [{"source": "src/function/cast/union_casts.cpp::duckdb::ToUnionCast", "target": "src/function/cast/union_casts.cpp::UnionMemberToMemberCast"}, {"source": "src/function/cast/union_casts.cpp::duckdb::UnionToVarcharCast", "target": "src/function/cast/union_casts.cpp::duckdb::ToUnionCast"}]}, "graph_spec": "This scope covers casting values into and out of DuckDB UNION types. `ToUnionCast` is the entry point for casts whose result type is a UNION: it must dispatch on `UnionMemberBoundCastData::is_member_to_member`, routing member-to-member mappings to `UnionMemberToMemberCast` and scalar-member promotion to `ToUnionMemberCast`, and must report success. For `UnionMemberToMemberCast` (UNION -> UNION), every source member must be cast into the target member selected by `tag_map`, and the source tag vector must be remapped through the same `tag_map` so each row's tag identifies the member actually written. Target members not reached by the map must be forced to constant NULL, preserving the union invariant that only the tag-selected member column is valid for a row; rows with an invalid/NULL source tag must become NULL. The constant-vector path maps a single source tag and may set the result constant, while the general path must flatten target member vectors and set per-row tags, and the result must satisfy `Verify()` with `count` rows. `UnionToVarcharCast` (UNION -> VARCHAR) must delegate to `ToUnionCast` against a UNION whose members are all VARCHAR, then emit, for each row, NULL when the tag is invalid and the selected member's string otherwise, mapping a valid tag whose member value is NULL to the literal text `NULL`, and finalizing a verified result vector of `count` rows."} +{"repo": "duckdb/duckdb", "buggy_commit": "10de9573794001c649621013bdd93553b54e00c9", "bug_issue": 25373, "solve_pr": 25673, "call_graph": {"nodes": [{"id": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"id": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushFiltersIntoDelimJoin"}, {"id": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushdownJoin"}, {"id": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"id": "src/optimizer/filter_statistics.cpp::FilterStatisticsOptimizer::Optimize"}, {"id": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"id": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers"}, {"id": "src/optimizer/partitioned_execution.cpp::PartitionedExecution::Optimize"}, {"id": "src/optimizer/partitioned_execution.cpp::duckdb::PartitionedExecutionSplitPipeline"}, {"id": "src/optimizer/pushdown/pushdown_aggregate.cpp::FilterPushdown::PushdownAggregate"}, {"id": "src/optimizer/pushdown/pushdown_cross_product.cpp::FilterPushdown::PushdownCrossProduct"}, {"id": "src/optimizer/pushdown/pushdown_distinct.cpp::FilterPushdown::PushdownDistinct"}, {"id": "src/optimizer/pushdown/pushdown_filter.cpp::FilterPushdown::PushdownFilter"}, {"id": "src/optimizer/pushdown/pushdown_inner_join.cpp::FilterPushdown::PushdownInnerJoin"}, {"id": "src/optimizer/pushdown/pushdown_left_join.cpp::FilterPushdown::PushdownLeftJoin"}, {"id": "src/optimizer/pushdown/pushdown_limit.cpp::FilterPushdown::PushdownLimit"}, {"id": "src/optimizer/pushdown/pushdown_mark_join.cpp::FilterPushdown::PushdownMarkJoin"}, {"id": "src/optimizer/pushdown/pushdown_outer_join.cpp::FilterPushdown::PushdownOuterJoin"}, {"id": "src/optimizer/pushdown/pushdown_projection.cpp::FilterPushdown::PushdownProjection"}, {"id": "src/optimizer/pushdown/pushdown_secure_view.cpp::FilterPushdown::PushdownSecureView"}, {"id": "src/optimizer/pushdown/pushdown_semi_anti_join.cpp::FilterPushdown::PushdownSemiAntiJoin"}, {"id": "src/optimizer/pushdown/pushdown_set_operation.cpp::FilterPushdown::PushdownSetOperation"}, {"id": "src/optimizer/pushdown/pushdown_single_join.cpp::FilterPushdown::PushdownSingleJoin"}, {"id": "src/optimizer/pushdown/pushdown_unnest.cpp::FilterPushdown::PushdownUnnest"}, {"id": "src/optimizer/pushdown/pushdown_window.cpp::FilterPushdown::PushdownWindow"}], "edges": [{"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushFiltersIntoDelimJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushdownJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushdownJoin", "target": "src/optimizer/pushdown/pushdown_left_join.cpp::FilterPushdown::PushdownLeftJoin"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushdownJoin", "target": "src/optimizer/pushdown/pushdown_mark_join.cpp::FilterPushdown::PushdownMarkJoin"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushdownJoin", "target": "src/optimizer/pushdown/pushdown_outer_join.cpp::FilterPushdown::PushdownOuterJoin"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushdownJoin", "target": "src/optimizer/pushdown/pushdown_semi_anti_join.cpp::FilterPushdown::PushdownSemiAntiJoin"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushdownJoin", "target": "src/optimizer/pushdown/pushdown_single_join.cpp::FilterPushdown::PushdownSingleJoin"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/pushdown/pushdown_aggregate.cpp::FilterPushdown::PushdownAggregate"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/pushdown/pushdown_cross_product.cpp::FilterPushdown::PushdownCrossProduct"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/pushdown/pushdown_projection.cpp::FilterPushdown::PushdownProjection"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/pushdown/pushdown_secure_view.cpp::FilterPushdown::PushdownSecureView"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/pushdown/pushdown_set_operation.cpp::FilterPushdown::PushdownSetOperation"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/pushdown/pushdown_unnest.cpp::FilterPushdown::PushdownUnnest"}, {"source": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite", "target": "src/optimizer/pushdown/pushdown_window.cpp::FilterPushdown::PushdownWindow"}, {"source": "src/optimizer/filter_statistics.cpp::FilterStatisticsOptimizer::Optimize", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/optimizer.cpp::Optimizer::Optimize", "target": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers"}, {"source": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/partitioned_execution.cpp::PartitionedExecution::Optimize", "target": "src/optimizer/partitioned_execution.cpp::duckdb::PartitionedExecutionSplitPipeline"}, {"source": "src/optimizer/partitioned_execution.cpp::duckdb::PartitionedExecutionSplitPipeline", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_aggregate.cpp::FilterPushdown::PushdownAggregate", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/pushdown/pushdown_aggregate.cpp::FilterPushdown::PushdownAggregate", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_cross_product.cpp::FilterPushdown::PushdownCrossProduct", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_distinct.cpp::FilterPushdown::PushdownDistinct", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/pushdown/pushdown_filter.cpp::FilterPushdown::PushdownFilter", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/pushdown/pushdown_inner_join.cpp::FilterPushdown::PushdownInnerJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/pushdown/pushdown_inner_join.cpp::FilterPushdown::PushdownInnerJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::PushFiltersIntoDelimJoin"}, {"source": "src/optimizer/pushdown/pushdown_inner_join.cpp::FilterPushdown::PushdownInnerJoin", "target": "src/optimizer/pushdown/pushdown_cross_product.cpp::FilterPushdown::PushdownCrossProduct"}, {"source": "src/optimizer/pushdown/pushdown_left_join.cpp::FilterPushdown::PushdownLeftJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_limit.cpp::FilterPushdown::PushdownLimit", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/pushdown/pushdown_mark_join.cpp::FilterPushdown::PushdownMarkJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_outer_join.cpp::FilterPushdown::PushdownOuterJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/pushdown/pushdown_outer_join.cpp::FilterPushdown::PushdownOuterJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_projection.cpp::FilterPushdown::PushdownProjection", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_secure_view.cpp::FilterPushdown::PushdownSecureView", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_semi_anti_join.cpp::FilterPushdown::PushdownSemiAntiJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_set_operation.cpp::FilterPushdown::PushdownSetOperation", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_single_join.cpp::FilterPushdown::PushdownSingleJoin", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_unnest.cpp::FilterPushdown::PushdownUnnest", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}, {"source": "src/optimizer/pushdown/pushdown_window.cpp::FilterPushdown::PushdownWindow", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::FinishPushdown"}, {"source": "src/optimizer/pushdown/pushdown_window.cpp::FilterPushdown::PushdownWindow", "target": "src/optimizer/filter_pushdown.cpp::FilterPushdown::Rewrite"}]}, "graph_spec": "FilterPushdown is a logical-plan rewrite that moves predicates as far down toward the scans as semantics allow; its three entry points (Optimizer::RunBuiltInOptimizers, FilterStatisticsOptimizer::Optimize when statistics propagation changed filter bindings, and PartitionedExecutionSplitPipeline after deep-copying a plan) must all leave a tree that returns exactly the same rows as the input, so no predicate may be dropped, evaluated on rows an intervening operator would have removed, or pushed to a child that does not contain all of its bindings. Rewrite dispatches by operator type to per-operator handlers; for any type it cannot push through, FinishPushdown recursively rewrites each child with a fresh FilterPushdown and then re-attaches every leftover filter at the current level via PushFinalFilters/AddLogicalFilter, so filters are never lost and the recursion terminates leaving only equivalent LogicalFilter/LogicalEmptyResult wrappers. PushdownJoin selects a handler from the join type (inner/left/outer/asof/mark/single/semi/anti, unsupported stopping at FinishPushdown) and restores join projection maps; inner joins become cross products with conditions converted to filters, left joins may be upgraded to inner when a filter is null-rejecting, and any contradictory predicate collapses the subtree to LogicalEmptyResult. The FilterCombiner both merges/reorders predicates, can derive new single-side filters from join conditions, and detects unsatisfiable combinations. Barrier-carrying expressions (potentially throwing or side-effecting) must not cross operators that can remove rows, are re-applied above such operators, and are ordered after non-barrier filters. Per-operator obligations must hold: aggregate filters only move when their bindings are in every grouping set and are not volatile; projection substitution must avoid changing volatility/computed-expression evaluation; distinct, limit, window partitioning, unnest, set-operation child-binding rewrites, cross-product side splitting, and the secure-view boundary/cardinality freeze must each keep their operator-specific guarantees."} +{"repo": "duckdb/duckdb", "buggy_commit": "6d7abb1090e1079f252b15ba0366310bb87d8582", "bug_issue": 25384, "solve_pr": 25385, "call_graph": {"nodes": [{"id": "src/execution/index/unbound_index.cpp::UnboundIndex::Bind"}, {"id": "src/execution/index/unbound_index.cpp::UnboundIndex::ResetStorage"}], "edges": []}, "graph_spec": "Scope covers the two public entry points of UnboundIndex, an index reconstructed from serialized metadata before it is bound to a live implementation. UnboundIndex::ResetStorage must reclaim the index's persistent storage exactly once: it may only mark blocks from storage_info.allocator_infos as modified through the index block manager when they are valid, and it must be idempotent/no-op on any subsequent call, which the storage_reclaimed guard enforces. The destructor relies on this by reclaiming only when storage has not already been handed off, so destroying an index that was never bound releases its blocks while an already-transferred index leaves them intact. UnboundIndex::Bind must produce a bound index via the index binder and then mark the storage as reclaimed without separately re-reclaiming the blocks, transferring ownership of those persistent blocks to the bound index so they are not freed while still in use. Additionally, when buffered WAL-replay operations are present, Bind must apply them to the newly bound index using the physical column types and the index's stable mapped column ordering, preserving the recorded insert/delete operation order and row-id associations so the bound index reflects all buffered operations. The two nodes are independent entry points that share the single-ownership invariant: storage is reclaimed or handed off at most once, and a bound result must retain both its inherited storage and its replayed operations."} +{"repo": "duckdb/duckdb", "buggy_commit": "c2f5210946d0826d2cca527079e59177006bd6a7", "bug_issue": 25388, "solve_pr": 25387, "call_graph": {"nodes": [{"id": "src/execution/operator/persistent/physical_batch_insert.cpp::PhysicalBatchInsert::Sink"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Finalize"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::OnConflictHandling"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Sink"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::duckdb::PerformOnConflictAction"}, {"id": "src/execution/operator/persistent/physical_update.cpp::PhysicalUpdate::Sink"}, {"id": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"id": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"id": "src/storage/data_table.cpp::DataTable::VerifyAppendForeignKeyConstraint"}, {"id": "src/storage/data_table.cpp::DataTable::VerifyForeignKeyConstraint"}], "edges": [{"source": "src/execution/operator/persistent/physical_batch_insert.cpp::PhysicalBatchInsert::Sink", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Finalize", "target": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::OnConflictHandling", "target": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::OnConflictHandling", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Sink", "target": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::OnConflictHandling"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Sink", "target": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts", "target": "src/execution/operator/persistent/physical_insert.cpp::duckdb::PerformOnConflictAction"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::duckdb::PerformOnConflictAction", "target": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"source": "src/execution/operator/persistent/physical_update.cpp::PhysicalUpdate::Sink", "target": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"source": "src/storage/data_table.cpp::DataTable::LocalAppend", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"source": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendForeignKeyConstraint"}, {"source": "src/storage/data_table.cpp::DataTable::VerifyAppendForeignKeyConstraint", "target": "src/storage/data_table.cpp::DataTable::VerifyForeignKeyConstraint"}]}, "graph_spec": "This scope governs how row-producing operators (PhysicalInsert, PhysicalBatchInsert, PhysicalUpdate) get rows safely appended to a DataTable, with emphasis on append-side constraint verification. Core obligations: (1) LocalAppend must treat an empty chunk as a no-op, refuse to append when the target table is no longer the current main table (reporting a transaction conflict), and, unless the caller explicitly marks the append unsafe/trusted, verify append constraints on the incoming chunk before any data is stored; the unsafe path is only legitimate when the caller has already performed equivalent verification. (2) VerifyAppendConstraints must validate generated-column values, unique indexes, and each NOT NULL/CHECK/append-side FOREIGN KEY constraint, delegating unique conflicts to the provided ConflictManager and only running foreign-key checks for constraints marked as append constraints. (3) VerifyAppendForeignKeyConstraint must route to VerifyForeignKeyConstraint with APPEND_FK semantics: for an append, every input row's foreign-key value must resolve to a matching primary key found in global index storage or, failing that, in the transaction-local storage; a constraint error exists only when neither source accounts for all input rows (conflict count != input count), and the failure must surface as a constraint exception identifying the offending index and values. (4) OnConflictHandling with a THROW action must verify append constraints directly and report zero affected rows; otherwise it must first eliminate input-internal duplicates on the conflict target, then resolve global conflicts before transaction-local conflicts, and for DO UPDATE reject updating the same target row more than once in a statement. (5) HandleInsertConflicts/PerformOnConflictAction must re-check the ON CONFLICT condition, treat DO NOTHING as a no-op, and implement DO UPDATE either in place or as delete-then-append, re-appending replacement rows through LocalAppend so all append constraints still hold on the post-update image. (6) PhysicalBatchInsert::Sink must verify append constraints against global and local storage before buffering rows into its optimistic collection; PhysicalInsert::Finalize must append or merge buffered optimistic collections without bypassing those constraints; and PhysicalUpdate::Sink's delete-and-insert path must delete the target rows and append the replacement rows through LocalAppend. The invariant across all paths is that no row becomes visible while violating unique, NOT NULL, CHECK, or foreign-key append constraints, and transaction-local versus global visibility is respected when resolving conflicts."} +{"repo": "duckdb/duckdb", "buggy_commit": "e3946f2327a3cc622e1ec7fe71d51de49f93e61d", "bug_issue": 25396, "solve_pr": 25397, "call_graph": {"nodes": [{"id": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::AlterEntry"}, {"id": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::DropNotNull"}], "edges": [{"source": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::AlterEntry", "target": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::DropNotNull"}]}, "graph_spec": "DuckTableEntry::AlterEntry, when handed an ALTER_TABLE alteration whose alter type is DROP_NOT_NULL, must dispatch to DuckTableEntry::DropNotNull (passing the client context and the DROP_NOT_NULL alteration info), and DropNotNull must perform the column-scoped removal of a NOT NULL constraint and return a new table catalog entry reflecting the updated schema. Specifically: it resolves the column by name and requires that column to exist; it refuses the operation and reports a catalog error if the column participates in the table's primary key, leaving the entry unchanged; otherwise it copies the current CreateTableInfo, removes exactly the NOT NULL constraint whose index matches the resolved column (leaving all other constraints, including other NOT NULL constraints, intact), rebinds the modified create info against the table's schema, and constructs the replacement entry over the existing storage and triggers so no data is lost. The alteration must be transactional in the sense that the returned entry, not the original, carries the constraint-free definition, and each constraint such as ADD/SET other alters flows through its own handler rather than this one."} +{"repo": "duckdb/duckdb", "buggy_commit": "e3946f2327a3cc622e1ec7fe71d51de49f93e61d", "bug_issue": 25401, "solve_pr": 25411, "call_graph": {"nodes": [{"id": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAddColumn"}, {"id": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAddColumnEntry"}, {"id": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAlterStatement"}, {"id": "src/parser/peg/transformer/transform_generated.cpp::PEGTransformerFactory::TransformAddColumnInternal"}, {"id": "src/parser/peg/transformer/transform_generated.cpp::PEGTransformerFactory::TransformAlterStatementInternal"}], "edges": [{"source": "src/parser/peg/transformer/transform_generated.cpp::PEGTransformerFactory::TransformAddColumnInternal", "target": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAddColumn"}, {"source": "src/parser/peg/transformer/transform_generated.cpp::PEGTransformerFactory::TransformAlterStatementInternal", "target": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAlterStatement"}]}, "graph_spec": "This scope covers the PEG-transformer obligations for parsing `ALTER TABLE ... ADD COLUMN` into a bound AST. `TransformAddColumnEntry` is the entry normalizer: it converts the dotted identifier into a column path, records the optional type, requires either a type or a generated-expression target (otherwise a ParserException), rejects generated columns added after table creation, and folds column constraints into `AddColumnEntry` by taking the first `DefaultValue` (second one is an error) and setting `is_not_null` from an explicit NOT NULL constraint. `TransformAddColumn` then maps that entry to the alter AST: a single-segment path becomes `AddColumnInfo`; a multi-segment path becomes `AddFieldInfo` over the parent path and must reject NOT NULL on nested fields; in both cases the column name is the last path segment and the `ColumnDefinition` carries the type and any default value, and the presence of the optional IF NOT EXISTS flag is propagated. `TransformAlterStatement` owns statement-level assembly: it wraps the incoming `AlterInfo` in an `AlterStatement` and returns it unchanged unless the info is an `ALTER_TABLE` of type `ADD_COLUMN`; for ADD COLUMN it stays a plain statement when there is neither a NOT NULL request nor a non-simple (non-constant, non-try-cast) default, and otherwise rewrites into a `MultiStatement`. That rewrite must preserve ordering and values: materializing a default emits an add with a NULL default placeholder followed by an UPDATE from the original expression and a re-`SET DEFAULT` of that same expression; appending NOT NULL emits a trailing `SetNotNullInfo`; the placeholder add drops the not-null flag; and NOT NULL combined with IF NOT EXISTS is unsupported, while IF NOT EXISTS alone keeps the plain ALTER. The two generated `*Internal` wrappers are thin adapters that read the parse results (including whether optional clauses are present), delegate to these transforms, and box the result with its static type; they must not alter the values or the choice of AST node, so equivalent inputs must yield equivalent alter statements whether reached through the transformer entry points or these generated dispatchers."} +{"repo": "duckdb/duckdb", "buggy_commit": "3579aad362c37d38b649f8e8b0174514207e8f99", "bug_issue": 25403, "solve_pr": 25543, "call_graph": {"nodes": [{"id": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAddColumn"}, {"id": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAddColumnEntry"}, {"id": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAlterStatement"}, {"id": "src/parser/peg/transformer/transform_generated.cpp::PEGTransformerFactory::TransformAddColumnEntryInternal"}], "edges": [{"source": "src/parser/peg/transformer/transform_generated.cpp::PEGTransformerFactory::TransformAddColumnEntryInternal", "target": "src/parser/peg/transformer/transform_alter.cpp::PEGTransformerFactory::TransformAddColumnEntry"}]}, "graph_spec": "Scope: transforming `ALTER TABLE ... ADD COLUMN` grammar into parse metadata. The generated `TransformAddColumnEntryInternal` step must consume the `AddColumnEntry` grammar children — dotted identifier, optional type, optional generated column, and the repeated column constraints in source order — and forward them unchanged to `TransformAddColumnEntry`, so constraint semantics are not lost or reordered. `TransformAddColumnEntry` builds an `AddColumnEntry`: it splits the dotted identifier into a column path, requires either a type or a generated expression (and rejects generated columns added after table creation), and folds each constraint in: at most one DEFAULT becomes the column default (a second is an error), NOT NULL and UNIQUE set the follow-up flags, explicit column compression is recorded with AUTO treated as invalid, and PRIMARY KEY, CHECK, and FOREIGN KEY constraints are rejected. `TransformAddColumn` then derives alter metadata: a single-segment path becomes `AddColumnInfo` carrying the if-not-exists flag, while a multi-segment path becomes `AddFieldInfo` addressed by the parent path, where NOT NULL, UNIQUE, and explicit compression are unsupported for nested fields. `TransformAlterStatement` must only rewrite `ALTER_TABLE` / `ADD_COLUMN`: when the column requests NOT NULL, UNIQUE, or a default that is not a simple constant (a constant optionally wrapped in a non-TRY cast), it must produce a `MultiStatement` rather than the plain alter, ordering ADD COLUMN, then SET NOT NULL, then ADD UNIQUE; materializing a non-simple default must add the column with a NULL-default placeholder, backfill existing rows with an UPDATE, and then restore the original default. IF NOT EXISTS combined with NOT NULL or UNIQUE is rejected, while IF NOT EXISTS with an otherwise plain add keeps the ordinary ALTER."} +{"repo": "duckdb/duckdb", "buggy_commit": "6d7abb1090e1079f252b15ba0366310bb87d8582", "bug_issue": 25414, "solve_pr": 25413, "call_graph": {"nodes": [{"id": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::AlterEntry"}, {"id": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::ChangeColumnType"}, {"id": "src/storage/data_table.cpp::DataTable::DataTable"}], "edges": [{"source": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::AlterEntry", "target": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::ChangeColumnType"}]}, "graph_spec": "This scope covers ALTER TABLE type changes on a DuckDB base-table catalog entry. DuckTableEntry::AlterEntry is the entry point: it accepts only ALTER TABLE alters (column comments are handled separately) and dispatches ALTER_COLUMN_TYPE, plus the internal ADD_FIELD/REMOVE_FIELD/RENAME_FIELD variants, to ChangeColumnType; other alter types are either handled elsewhere (rename table, foreign keys) or rejected, and the entry must remain unmodified until the change is committed. ChangeColumnType must resolve the named column to its physical storage index, reject a generated column's own type change and any type change that a dependent generated column references, reject changes touching columns covered by CHECK, UNIQUE/PRIMARY KEY, or FOREIGN KEY constraints, and preserve a NOT NULL constraint for post-conversion re-verification; it must derive the target type explicitly or from the USING expression when unset, carry over all other column definitions and constraints into a fresh catalog entry, and attach newly built storage so the alteration is atomic (the previous entry stays intact on failure). The new storage DataTable::DataTable(parent, changed_idx, target_type, bound_columns, cast_expr, constraint_to_verify) must copy the parent's column definitions with exactly the changed column retyped, refuse the change if an index depends on that column, rewrite existing persisted row-group data (and the transaction's local storage) through the cast expression while reading a consistent committed snapshot so concurrent writes conflict instead of being dropped, re-verify any retained constraint after rewriting, and mark the parent as replaced only on success while restoring its prior state if the conversion throws before reaching the catalog. The graph should show AlterEntry reaching ChangeColumnType and ChangeColumnType constructing this retyping DataTable as the sole storage-shrinking/rewriting path used by these alters."} +{"repo": "duckdb/duckdb", "buggy_commit": "10de9573794001c649621013bdd93553b54e00c9", "bug_issue": 25415, "solve_pr": 25722, "call_graph": {"nodes": [{"id": "extension/json/json_functions/json_create.cpp::CreateValuesStruct"}, {"id": "extension/json/json_functions/json_create.cpp::CreateValuesUnion"}, {"id": "extension/json/json_functions/json_create.cpp::JSONCopyToGeoJSONFunction"}, {"id": "extension/json/json_functions/json_create.cpp::StructNames::Get"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::AnyToJSONCast"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::ArrayFunction"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::CreateKeyValuePairs"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesArray"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesList"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesMap"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesTuple"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::JSONCopyToJSONFunction"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::ObjectFunction"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::ToJSONFunction"}, {"id": "extension/json/json_functions/json_create.cpp::duckdb::ToJSONFunctionInternal"}], "edges": [{"source": "extension/json/json_functions/json_create.cpp::CreateValuesStruct", "target": "extension/json/json_functions/json_create.cpp::StructNames::Get"}, {"source": "extension/json/json_functions/json_create.cpp::CreateValuesStruct", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateKeyValuePairs"}, {"source": "extension/json/json_functions/json_create.cpp::CreateValuesUnion", "target": "extension/json/json_functions/json_create.cpp::StructNames::Get"}, {"source": "extension/json/json_functions/json_create.cpp::CreateValuesUnion", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"source": "extension/json/json_functions/json_create.cpp::JSONCopyToGeoJSONFunction", "target": "extension/json/json_functions/json_create.cpp::StructNames::Get"}, {"source": "extension/json/json_functions/json_create.cpp::JSONCopyToGeoJSONFunction", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateKeyValuePairs"}, {"source": "extension/json/json_functions/json_create.cpp::JSONCopyToGeoJSONFunction", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::AnyToJSONCast", "target": "extension/json/json_functions/json_create.cpp::duckdb::ToJSONFunctionInternal"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::ArrayFunction", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateKeyValuePairs", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues", "target": "extension/json/json_functions/json_create.cpp::CreateValuesStruct"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues", "target": "extension/json/json_functions/json_create.cpp::CreateValuesUnion"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesArray"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesList"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesMap"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesTuple"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesArray", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesList", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesMap", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::CreateValuesTuple", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::JSONCopyToJSONFunction", "target": "extension/json/json_functions/json_create.cpp::duckdb::ToJSONFunctionInternal"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::ObjectFunction", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateKeyValuePairs"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::ToJSONFunction", "target": "extension/json/json_functions/json_create.cpp::duckdb::ToJSONFunctionInternal"}, {"source": "extension/json/json_functions/json_create.cpp::duckdb::ToJSONFunctionInternal", "target": "extension/json/json_functions/json_create.cpp::duckdb::CreateValues"}]}, "graph_spec": "This scope converts bound SQL values into JSON text via the json extension. The dispatcher CreateValues must choose a JSON representation that matches the runtime LogicalTypeId of the input vector: integer/float/boolean/string-like scalars are emitted as native JSON scalars; LIST and ARRAY become JSON arrays (recursively converting children, with ARRAY flattened first and sized by the declared array length); MAP and STRUCT become JSON objects keyed by their declared member names; TUPLE becomes a JSON array; UNION becomes an object containing only the active member keyed by its tag; VARIANT is routed through its JSON cast; GEOMETRY is written as WKT by default and as GeoJSON only when options.geometry_format is GEOJSON; DECIMAL/BIGNUM and other non-native types preserve exact value via a VARCHAR/raw round-trip; and any type that cannot be represented must fail rather than emit malformed JSON. NULL and invalid-validity rows must always yield JSON null at the corresponding position, including when an entire STRUCT, TUPLE, MAP, LIST, or UNION row is NULL, and nested recursion must not leak values across rows. Name and key handling must be consistent: struct fields, union members, and object keys use declared identifier names; json_object keys must be VARCHAR and a NULL key must raise an error. The shared writer ToJSONFunctionInternal must convert the input vector once, write one JSON string per valid row, mark invalid rows as NULL in the result, register the JSON allocator buffer with the result, and set the result to a constant vector when the input is constant or of size one; it is the common path for ToJSONFunction (to_json/array_to_json/row_to_json), JSONCopyToJSONFunction (which uses the bound format options), and AnyToJSONCast (which must reuse the per-type cached names and honor the client's geometry format while excluding VARCHAR, handled elsewhere). ObjectFunction consumes alternating key/value argument vectors and emits one JSON object per row, while ArrayFunction appends each argument vector as one array element per row; both rely on cached per-type name vectors that must be computed at bind time for every nested STRUCT/UNION member and remain stable and equal across chunks. JSONCopyToGeoJSONFunction must emit a GeoJSON Feature per non-NULL payload row with \"type\":\"Feature\", an optional \"id\" from the selected column, a \"geometry\" member (null when no geometry column is chosen), a \"properties\" object holding every non-geometry/non-id column under its struct field name, and an optional \"bbox\" derived from the geometry only when a finite extent exists and the option is enabled, forcing GeoJSON geometry output; NULL payload rows must produce NULL results."} +{"repo": "duckdb/duckdb", "buggy_commit": "8065a54e5cea3cda21c8c6a4ef921bcdbc16dd9c", "bug_issue": 25428, "solve_pr": 25524, "call_graph": {"nodes": [{"id": "src/optimizer/late_materialization.cpp::LateMaterialization::Optimize"}, {"id": "src/optimizer/late_materialization.cpp::LateMaterialization::TryLateMaterialization"}, {"id": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::RemoveColumnsFromLogicalGet"}, {"id": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"id": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren"}, {"id": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::Optimize"}, {"id": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}], "edges": [{"source": "src/optimizer/late_materialization.cpp::LateMaterialization::Optimize", "target": "src/optimizer/late_materialization.cpp::LateMaterialization::Optimize"}, {"source": "src/optimizer/late_materialization.cpp::LateMaterialization::Optimize", "target": "src/optimizer/late_materialization.cpp::LateMaterialization::TryLateMaterialization"}, {"source": "src/optimizer/late_materialization.cpp::LateMaterialization::TryLateMaterialization", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::RemoveColumnsFromLogicalGet"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::Optimize", "target": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal", "target": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}]}, "graph_spec": "This scope covers logical-plan rewrites that prune columns while preserving query semantics: LateMaterialization, RemoveUnusedColumns, and TopNWindowElimination. LateMaterialization::Optimize recursively descends the plan and attempts a rewrite only at LIMIT (when an offset exists, or when the limit is large yet only projections/gets lie below it), LOGICAL_TOP_N, and non-percentage LOGICAL_SAMPLE nodes whose row count is within the configured maximum; otherwise it leaves the subtree unchanged and recurses into children. TryLateMaterialization must only fire when re-scanning benefits the plan (the scan reads strictly more columns than the upstream operator and pushed-down filters require), when the table function supports the row-id pushdown path and exposes row-id columns, when no projection expression is volatile, and never for a sample scan already carrying row-count sample options; it must reject unsupported operator types (anything but PROJECTION/FILTER between the root and the LOGICAL_GET) rather than mis-rewrite. When it does fire, the rewritten plan must reproduce exactly the original output column bindings and ordering: row ids are carried up through projections/filters, references in the surviving scan expressions are retargeted to the new table index, a semi-join reconstructs the original rows, and the final operator for LIMIT/SAMPLE orders by row id while TOP_N re-applies its own ordering; only after this is RemoveUnusedColumns invoked to prune. RemoveUnusedColumns::VisitOperator is the pruning traversal: in ANALYZE mode it only records references and avoids mutation, while in APPLY mode it prunes per operator, dispatching to RemoveColumnsFromLogicalGet for LOGICAL_GET and to VisitPrunableChildren for generic children. It must honor everything_referenced barriers (e.g. DML, COPY/DISTINCT/PIVOT and other schema-fixed operators), leave operators that cannot be pruned untouched, and keep column bindings consistent as columns are removed; VisitPrunableChildren must snapshot each child's bindings before visiting it and remap the parent's projection map whenever a pruned child changes shape. RemoveColumnsFromLogicalGet must only run in APPLY mode, must no-op when everything is referenced or the function lacks projection_pushdown, and must never drop a column used by a pushed-down (single- or multi-column) filter: surviving columns are derived from the union of projected and filter-referenced columns, filters and projection_ids are remapped to the new column ordering, and when all columns are unused a single any-column id is retained. TopNWindowElimination::Optimize is gated on the core_functions extension and delegates to OptimizeInternal, which only rewrites the grouped filter->projections->window top-n pattern accepted by CanOptimize (single comparison against a non-null BIGINT constant, with bounds compatible with the min/max n-aggregates); all other operators are traversed child-by-child. Because the rewrite changes table indexes, it collects ColumnBindingReplacer entries and, for multi-child operators, propagates each child's replacements through the parent without letting siblings clobber one another; the replacement bindings are then applied across the plan so upstream references remain valid. After rewriting it prunes the result with RemoveUnusedColumns only when no external CTE references, no active projection maps, and no late-materialized join reconstruction are present, ensuring bound column references remain valid and the operator's output schema and semantics are preserved."} +{"repo": "duckdb/duckdb", "buggy_commit": "70e7a857595b5872842b6ec242ac79c182e58dde", "bug_issue": 25430, "solve_pr": 25634, "call_graph": {"nodes": [{"id": "extension/json/json_functions/json_serialize_plan.cpp::duckdb::JsonSerializePlanFunction"}, {"id": "src/main/client_context.cpp::ClientContext::CreatePreparedStatement"}, {"id": "src/main/client_context.cpp::ClientContext::CreatePreparedStatementInternal"}, {"id": "src/main/client_context.cpp::ClientContext::ExtractPlan"}, {"id": "src/main/client_context.cpp::ClientContext::PendingInternalStatement"}, {"id": "src/main/client_context.cpp::ClientContext::PendingQuery"}, {"id": "src/main/client_context.cpp::ClientContext::PendingQueryInternal"}, {"id": "src/main/client_context.cpp::ClientContext::PendingStatement"}, {"id": "src/main/client_context.cpp::ClientContext::PendingStatementInternal"}, {"id": "src/main/client_context.cpp::ClientContext::Prepare"}, {"id": "src/main/client_context.cpp::ClientContext::PrepareInternal"}, {"id": "src/main/client_context.cpp::ClientContext::Query"}, {"id": "src/main/client_context.cpp::ClientContext::RunInternalStatement"}, {"id": "src/main/client_context.cpp::ClientContext::RunStatementInternal"}, {"id": "src/main/client_verify.cpp::ClientContext::StatementVerification"}, {"id": "src/main/connection.cpp::Connection::ExtractPlan"}, {"id": "src/main/prepared_statement.cpp::PreparedStatement::Execute"}, {"id": "src/main/prepared_statement.cpp::PreparedStatement::PendingQuery"}, {"id": "src/optimizer/late_materialization.cpp::LateMaterialization::Optimize"}, {"id": "src/optimizer/late_materialization.cpp::LateMaterialization::TryLateMaterialization"}, {"id": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"id": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers"}, {"id": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::RemoveColumnsFromLogicalGet"}, {"id": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"id": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren"}, {"id": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::Optimize"}, {"id": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}], "edges": [{"source": "extension/json/json_functions/json_serialize_plan.cpp::duckdb::JsonSerializePlanFunction", "target": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"source": "src/main/client_context.cpp::ClientContext::CreatePreparedStatement", "target": "src/main/client_context.cpp::ClientContext::CreatePreparedStatementInternal"}, {"source": "src/main/client_context.cpp::ClientContext::CreatePreparedStatementInternal", "target": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"source": "src/main/client_context.cpp::ClientContext::ExtractPlan", "target": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"source": "src/main/client_context.cpp::ClientContext::PendingInternalStatement", "target": "src/main/client_context.cpp::ClientContext::PendingQueryInternal"}, {"source": "src/main/client_context.cpp::ClientContext::PendingQuery", "target": "src/main/client_context.cpp::ClientContext::PendingQuery"}, {"source": "src/main/client_context.cpp::ClientContext::PendingQuery", "target": "src/main/client_context.cpp::ClientContext::PendingQueryInternal"}, {"source": "src/main/client_context.cpp::ClientContext::PendingQueryInternal", "target": "src/main/client_context.cpp::ClientContext::PendingStatement"}, {"source": "src/main/client_context.cpp::ClientContext::PendingQueryInternal", "target": "src/main/client_verify.cpp::ClientContext::StatementVerification"}, {"source": "src/main/client_context.cpp::ClientContext::PendingStatement", "target": "src/main/client_context.cpp::ClientContext::PendingStatementInternal"}, {"source": "src/main/client_context.cpp::ClientContext::PendingStatementInternal", "target": "src/main/client_context.cpp::ClientContext::CreatePreparedStatement"}, {"source": "src/main/client_context.cpp::ClientContext::Prepare", "target": "src/main/client_context.cpp::ClientContext::PrepareInternal"}, {"source": "src/main/client_context.cpp::ClientContext::PrepareInternal", "target": "src/main/client_context.cpp::ClientContext::RunStatementInternal"}, {"source": "src/main/client_context.cpp::ClientContext::Query", "target": "src/main/client_context.cpp::ClientContext::PendingQueryInternal"}, {"source": "src/main/client_context.cpp::ClientContext::RunInternalStatement", "target": "src/main/client_context.cpp::ClientContext::PendingQueryInternal"}, {"source": "src/main/client_context.cpp::ClientContext::RunStatementInternal", "target": "src/main/client_context.cpp::ClientContext::PendingQueryInternal"}, {"source": "src/main/client_verify.cpp::ClientContext::StatementVerification", "target": "src/main/client_context.cpp::ClientContext::RunStatementInternal"}, {"source": "src/main/connection.cpp::Connection::ExtractPlan", "target": "src/main/client_context.cpp::ClientContext::ExtractPlan"}, {"source": "src/main/prepared_statement.cpp::PreparedStatement::Execute", "target": "src/main/client_context.cpp::ClientContext::RunInternalStatement"}, {"source": "src/main/prepared_statement.cpp::PreparedStatement::PendingQuery", "target": "src/main/client_context.cpp::ClientContext::PendingInternalStatement"}, {"source": "src/main/prepared_statement.cpp::PreparedStatement::PendingQuery", "target": "src/main/prepared_statement.cpp::PreparedStatement::PendingQuery"}, {"source": "src/optimizer/late_materialization.cpp::LateMaterialization::Optimize", "target": "src/optimizer/late_materialization.cpp::LateMaterialization::Optimize"}, {"source": "src/optimizer/late_materialization.cpp::LateMaterialization::Optimize", "target": "src/optimizer/late_materialization.cpp::LateMaterialization::TryLateMaterialization"}, {"source": "src/optimizer/late_materialization.cpp::LateMaterialization::TryLateMaterialization", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/optimizer.cpp::Optimizer::Optimize", "target": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers"}, {"source": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers", "target": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::Optimize"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::RemoveColumnsFromLogicalGet"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::Optimize", "target": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal", "target": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}]}, "graph_spec": "This scope governs how a bound SQL statement becomes an optimized logical plan and how that plan is consumed by query execution, prepared-query flows, plan extraction, and json_serialize_plan. Entry points (Connection::ExtractPlan, ClientContext::Query/PendingQuery/PendingStatement, ClientContext::Prepare, PreparedStatement::Execute/PendingQuery, the Run/PendingInternal variants, and optional statement verification) must bind the statement into a logical plan, run Optimizer::Optimize only when the plan requires it, and return a plan whose observable output schema (column count, names, types) and semantics match the unoptimized plan; optimization must be a semantics-preserving transformation, and any failure must propagate as an error rather than a silently altered plan. Optimizer::Optimize delegating to RunBuiltInOptimizers is the single pipeline: it must apply built-in passes such as column pruning and top-N window elimination in a consistent order, and the plan must remain verifiable and executable after any combination of them. RemoveUnusedColumns is the central obligation: it must compute referenced columns top-down and remove a column only when no ancestor still references it, preserving every referenced column under its original binding meaning; it must honor everything_referenced barriers (operators with fixed child schemas) and skip pruning when the source does not support projection pushdown, while still retaining filter-only columns so pushed-down filters remain valid. Whenever a child's binding layout changes, RemoveUnusedColumns::VisitPrunableChildren must rewrite the parent's projection map to select exactly the surviving bindings: remapping resolves bindings transitively through recorded replacements, never emits a map referencing a missing or out-of-range column, collapses to a single column or clears the map when nothing selected/ everything selected remains, and must terminate rather than cycle. Recursive and materialized CTE pruning must reach a fixed point over column dependencies and keep all columns consumed by continuation/recursive readers, and re-running pruning after other passes (including after statistics-driven expression removal) must leave the plan consistent, clearing stale projection maps before a fresh prune. TopNWindowElimination (Optimize/OptimizeInternal) must only rewrite eligible ORDER BY/row_number-window plus LIMIT patterns into aggregate/top-N forms when they preserve result ordering, NULL ordering semantics, and reconstructable payload columns; it must rebind replaced tuple indexes, skip when the required extension is unavailable, and only re-run column pruning when the rewritten plan has no external CTE references and no positional projection maps. LateMaterialization must only treat expressions as reconstructable when they are plain base-column references optionally wrapped in a single strict (non-try) cast, so re-scanned payload values and NULLs are reproduced exactly. json_serialize_plan must parse, plan, optionally optimize, verify, resolve bindings/types, and serialize each statement as an array entry; it must reject unsupported operators and, on any planning/optimization failure, return a JSON object with error=true plus error_type/error_message instead of throwing. Overall the scope's invariant is that binding, optimization, pruning, and plan serialization all agree on a single consistent, semantically equivalent, verifiable plan."} +{"repo": "duckdb/duckdb", "buggy_commit": "6d7abb1090e1079f252b15ba0366310bb87d8582", "bug_issue": 25452, "solve_pr": 25453, "call_graph": {"nodes": [{"id": "src/storage/table/row_group_collection.cpp::RowGroupCollection::VerifyNewConstraint"}], "edges": []}, "graph_spec": "`RowGroupCollection::VerifyNewConstraint` is a read-only validation that runs while adding a NOT NULL constraint to an existing table, and it must fail that schema change exactly when the table's already-stored rows would violate the new constraint. Obligations: (1) A NOT NULL constraint is the only kind this entry point supports; the bound constraint is treated as a `BoundNotNullConstraint` and its physical column index is assumed to be a valid column of the collection. (2) If the collection holds no rows, validation is vacuous and must succeed without touching storage. (3) Otherwise it must exhaustively scan the constrained column across all persisted row groups under the transaction's read snapshot taken at the last committed transaction id, viewing all inserted rows and forbidding updates, so that every committed persisted row is examined and no row is silently skipped or double-counted. (4) The scan covers only the single constrained column; it must not mutate the collection, its rows, or statistics. (5) On encountering any NULL value in that column it must abort with a constraint failure that identifies the table and the constrained column; if no NULL is found, the call completes normally. The scope only covers persisted rows visible at that snapshot; rows buffered in transaction-local storage are validated separately, so this routine must not attempt to take responsibility for them."} +{"repo": "duckdb/duckdb", "buggy_commit": "070ce1f695bb17ef68f1fdd5ba20cad4a3ac6646", "bug_issue": 25454, "solve_pr": 25455, "call_graph": {"nodes": [{"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayAlter"}, {"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry"}], "edges": [{"source": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry", "target": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayAlter"}]}, "graph_spec": "`WriteAheadLogDeserializer::ReplayEntry` consumes exactly one WAL frame, reads its `WALType`, and is the sole replay dispatcher: a `WAL_FLUSH` type is consumed without invoking any handler and reports a commit boundary (true), while every other type reports false and either dispatches on its type or, in framed (v2/v3) deserialize-only mode, advances to the frame terminator so the payload is consumed without side effects. `ALTER_INFO` is the only type routed to `ReplayAlter`; when a payload buffer exists in deserialize-only mode it is treated as skippable and `ReplayAlter` is not entered, whereas unframed v1 entries have no buffer and must still be fully deserialized. `ReplayAlter` must deserialize property 101 as a `ParseInfo` that is an `AlterInfo`, force `AlterBindMode::SKIP_BINDING` so replay never re-binds at alter time, re-root the stored qualified name onto the catalog being replayed into (replacing the serialized catalog component while keeping the schema path and name), and, when not deserialize-only, apply the alter via `catalog.Alter`. An alter carrying a unique constraint must additionally read property 102 (`index_storage_info`), replay the index storage data, stop after consuming it in deserialize-only mode, and otherwise resolve the target table in the replay catalog, rebuild and register an index over the constraint's logical columns, and record it so the index is attached to the table only at the enclosing commit boundary before the alter is applied."} +{"repo": "duckdb/duckdb", "buggy_commit": "070ce1f695bb17ef68f1fdd5ba20cad4a3ac6646", "bug_issue": 25467, "solve_pr": 25468, "call_graph": {"nodes": [{"id": "src/execution/operator/schema/physical_create_index.cpp::PhysicalCreateIndex::Finalize"}], "edges": []}, "graph_spec": "`PhysicalCreateIndex::Finalize` concludes a CREATE INDEX (or index-adding ALTER TABLE) pipeline: it consumes the operator's global sink state, produces the finished bound index from the index-type build, and makes it durable/queryable by adding it to the table's storage. It must first validate the built index (vacuum, structural verification, allocation verification) and require that the target table's storage still be the main table; otherwise adding the index is rejected with a transaction-conflict error. It must record the index's physical column ids before registration. Two mutually exclusive registration paths must be honored: for a plain CREATE INDEX, an index with the requested name must not already exist in the schema (unless IF NOT EXISTS is requested, in which case finalization succeeds without creating anything and without duplicating the index), and a successful creation must register a catalog index entry whose initial size reflects the built index; for the ALTER path, an index with that name must not already exist for that table, PRIMARY-key constraints must reject rows carrying NULLs in the indexed columns via the local-storage constraint check, and the pending alter must be applied to the catalog. In all success paths the fully built index is attached exactly once to the table storage and finalization reports completion."} +{"repo": "duckdb/duckdb", "buggy_commit": "668f94740b280bf44c7c081df664ae1eb310c090", "bug_issue": 25480, "solve_pr": 25552, "call_graph": {"nodes": [{"id": "src/function/cast/variant/from_variant.cpp::CastVariantToJSON"}, {"id": "src/function/cast/variant/from_variant.cpp::ConvertVariantToList"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::CastFromVARIANT"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToArray"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToStruct"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToTuple"}], "edges": [{"source": "src/function/cast/variant/from_variant.cpp::ConvertVariantToList", "target": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastFromVARIANT", "target": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant", "target": "src/function/cast/variant/from_variant.cpp::CastVariantToJSON"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant", "target": "src/function/cast/variant/from_variant.cpp::ConvertVariantToList"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant", "target": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToArray"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant", "target": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToStruct"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant", "target": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToTuple"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToArray", "target": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToStruct", "target": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToTuple", "target": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}]}, "graph_spec": "Scope: converting a duckdb VARIANT column into a requested typed column, defined by CastFromVARIANT, its recursive dispatcher CastVariant, and the nested converters ConvertVariantToList, ConvertVariantToArray, ConvertVariantToStruct, ConvertVariantToTuple plus CastVariantToJSON.\n\nObligations:\n- CastFromVARIANT is the per-batch entry point for count rows of a VARIANT vector. It may take a fast path that simply references a shredded child vector only when the input is shredded and the shredded primitive type equals the target (nested target types must not take it). Otherwise it drives the recursive conversion over the selected value indices. Inputs holding a single constant VARIANT row must yield a constant result, and a failed batch must surface exactly one conversion error, either through the caller-provided error message or as a ConversionException; it must never silently produce an empty/garbage result.\n- CastVariant recurses by the target logical type: STRUCT via object-key lookup, TUPLE positionally from an ARRAY, fixed-size ARRAY from an ARRAY, LIST/MAP from an ARRAY, JSON-string conversion for a JSON-typed VARCHAR target, and primitive/decimal/timestamp/time/UUID/BLOB/GEOMETRY/BIT/BIGNUM conversions otherwise. offset/count bound the destination region, sel maps result rows to VARIANT value indices, and an optional row pins every result row to one VARIANT row (broadcast of a constant value). Conversion failure for a nested target must fall back to the Value-based cast path, which must fail per row without throwing: affected rows become NULL and the batch is reported unsuccessful.\n- Null handling is uniform: a NULL VARIANT row yields a NULL result row, and any validity already set on the result must be preserved rather than overwritten.\n- ConvertVariantToList expects VARIANT(ARRAY) and a LIST/MAP target; it appends child entries after the existing list content, writes list_entry_t offsets/lengths consistent with the accumulated list size, sets the list size, and on a child failure must stop in a state that does not claim rows were written that were not.\n- ConvertVariantToArray expects VARIANT(ARRAY), requires each variant array's child count to equal the fixed target ARRAY size (otherwise it fails), and writes each row's children at the position implied by the target array size.\n- ConvertVariantToStruct expects VARIANT(OBJECT) and a STRUCT target; it resolves each target field by name and fails with a message naming the missing key when the object lacks it.\n- ConvertVariantToTuple expects VARIANT(ARRAY) and a TUPLE target; it resolves each tuple field by positional index and fails when an element is missing.\n- Both struct and tuple converters, and the list/array converters, recursively apply CastVariant to each child so nested targets compose; a converter that fails must not leave the dispatcher reporting success, and the dispatcher must return false and let the error propagate to the top level.\n- CastVariantToJSON produces one serialized JSON string per converted value and, on either a failed variant-to-JSON step or a failed serialization, returns false with a reported error rather than emitting a partial or undefined string.\n\nThe graph should preserve selection/row mapping, null and validity propagation, recursive composition, and the consistent success/failure signaling described here."} +{"repo": "duckdb/duckdb", "buggy_commit": "bade309c1c5ded881fec74cbc94ac14048ad0107", "bug_issue": 25497, "solve_pr": 25498, "call_graph": {"nodes": [{"id": "src/planner/binder/statement/bind_copy.cpp::Binder::Bind"}, {"id": "src/planner/binder/statement/bind_copy.cpp::Binder::BindCopyTo"}, {"id": "src/planner/binder/statement/bind_copy.cpp::Binder::BindNode"}, {"id": "src/planner/binder/statement/bind_copy.cpp::ResolveUseTmpFile"}, {"id": "src/planner/binder/statement/bind_copy.cpp::duckdb::ResolveCopyToOptions"}], "edges": [{"source": "src/planner/binder/statement/bind_copy.cpp::Binder::Bind", "target": "src/planner/binder/statement/bind_copy.cpp::Binder::BindCopyTo"}, {"source": "src/planner/binder/statement/bind_copy.cpp::Binder::BindCopyTo", "target": "src/planner/binder/statement/bind_copy.cpp::duckdb::ResolveCopyToOptions"}, {"source": "src/planner/binder/statement/bind_copy.cpp::Binder::BindNode", "target": "src/planner/binder/statement/bind_copy.cpp::Binder::Bind"}, {"source": "src/planner/binder/statement/bind_copy.cpp::duckdb::ResolveCopyToOptions", "target": "src/planner/binder/statement/bind_copy.cpp::ResolveUseTmpFile"}]}, "graph_spec": "Within the COPY statement binder in `src/planner/binder/statement/bind_copy.cpp`, the graph must preserve these behaviors. `Binder::BindNode(CopyQueryNode&)` transfers the query node's info into a `CopyStatement` and routes it to `Binder::Bind` as a COPY-TO-FILE request. `Binder::Bind` must bind all copy options, synthesize a source query (`SELECT *`, or the explicit select list, over the target table) when neither a FROM source nor a select statement is present, resolve the requested format's copy function from the system catalog while falling back to CSV only when the format was auto-detected and absent (and reporting an extension-known-but-unregistered format otherwise), reject options that are unknown, read-only for a write, or not castable to the declared option type, then dispatch to the read or write path and set statement output/return properties. `Binder::BindCopyTo` must reject formats lacking copy-to support, bind the select subtree through a copy so the original is untouched, partition provided options into a parsed-options structure versus passthrough options, enforce mutually incompatible combinations (temporary-file use vs per-thread output, file rotation, partitioning or ordering; per-thread output vs partitioning/ordering; rotation without batch support; disabled empty-file writing vs per-thread/partition/order; unsupported RETURN_STATS), resolve parsed options, optionally let the copy function insert a projection that replaces the source names/types, validate that not all output columns are consumed as partition columns unless partition columns are to be written, and construct a `LogicalCopyToFile` whose names/types exclude partition columns as configured, whose child is the select plan, and whose return names/types follow the requested return kind. `ResolveCopyToOptions` must resolve defaults faithfully (temporary file enabled, error-on-conflict overwrite, empty files and hive pattern written, automatic ordering, changed-rows return) and carry through every user-set value, including moving partition and order columns, without loss or duplication. `ResolveUseTmpFile` must disable temporary-file output for remote paths, honor any explicit user setting, disable it for multi-file modes (file rotation, per-thread output, partitioning, or ordering) and for stdout, and otherwise enable it only when the target is an existing regular file."} +{"repo": "duckdb/duckdb", "buggy_commit": "43f897e5f3446bde2b36cef5dc137eea14211fd9", "bug_issue": 25510, "solve_pr": 25511, "call_graph": {"nodes": [{"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayAlter"}, {"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayCreateIndex"}, {"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayDropIndex"}, {"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayDropTable"}, {"id": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry"}], "edges": [{"source": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry", "target": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayAlter"}, {"source": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry", "target": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayCreateIndex"}, {"source": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry", "target": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayDropIndex"}, {"source": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayEntry", "target": "src/storage/wal_replay.cpp::WriteAheadLogDeserializer::ReplayDropTable"}]}, "graph_spec": "The scope covers WAL replay dispatch plus the handlers for ALTER, CREATE INDEX, DROP INDEX, and DROP TABLE. `ReplayEntry` must read the leading WAL record type and route it to exactly the matching handler, fully consuming that record's payload; in deserialize-only mode every handler must still consume the payload while suppressing all catalog, table, and index mutations. Since records were written against the catalog name in effect at write time and the database may be replayed under a different attachment, each handler must re-root the recorded (possibly nested) schema path/name into the catalog being replayed into, preserving the full schema path rather than trusting or dropping the serialized catalog component. `ReplayAlter` must separate ordinary alters, which are re-qualified and applied directly, from ADD UNIQUE-constraint alters, which additionally reconstruct index storage and stage a constraint-backed index that deliberately has no catalog oid so it can never be targeted by a DROP INDEX. `ReplayCreateIndex` must recreate the index catalog entry and stage the index keyed both by the target table's oid (surviving renames) and by the created index entry's oid. `ReplayDropIndex` must identify and discard the staged index by that index catalog oid before dropping the entry, and `ReplayDropTable` must discard every staged index belonging to the dropped table's oid before dropping the table. Staged indexes form deferred state: they are only attached to the live table index lists at the commit/flush boundary, so ordering within the log must ensure a staged index is removed whenever its table or index entry is later dropped."} +{"repo": "duckdb/duckdb", "buggy_commit": "6ee2305dc786e2429c85eb971f8854f5a9807149", "bug_issue": 25548, "solve_pr": 25549, "call_graph": {"nodes": [{"id": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::AlterEntry"}, {"id": "src/catalog/catalog_set.cpp::CatalogSet::AlterEntry"}], "edges": [{"source": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::AlterEntry", "target": "src/catalog/catalog_entry/duck_table_entry.cpp::DuckTableEntry::AlterEntry"}, {"source": "src/catalog/catalog_set.cpp::CatalogSet::AlterEntry", "target": "src/catalog/catalog_set.cpp::CatalogSet::AlterEntry"}]}, "graph_spec": "The scope covers DuckTableEntry::AlterEntry and CatalogSet::AlterEntry, the catalog path through which ALTER TABLE and column/table metadata changes are applied to a persistent DuckDB table. The obligation of CatalogSet::AlterEntry is to treat an alter as an atomic, transactional replacement of a named entry: resolve the current entry, refuse alters that target non-existent entries (returning failure rather than throwing) and internal system entries (unless explicitly allowed), then produce a replacement entry, install it under the catalog write lock after re-reading it to detect concurrent write-write conflicts, preserve the entry's oid so the altered object remains the same logical object, and record the previous state in the undo buffer so the change can roll back. Renames must update the catalog name mapping consistently, and the dependency manager must be consulted after installation so conflicting dependents are rejected; on a successful alter of a table entry, shared state such as the entry's status and any transaction-local storage's table pointer must reference the replacement so later operations see the current entry. DuckTableEntry::AlterEntry must dispatch each supported ALTER TABLE subcommand (rename table/column/field, add/remove column or field, defaults, column type changes, NOT NULL, ADD/DROP CONSTRAINT, foreign keys) and column comments to the appropriate table operation, must produce a new entry object rather than mutating in place, and must reject non-ALTER and column-comment alterations with a catalog error and unsupported table-level options with not-implemented errors. It must also preserve schema, columns, constraints, generated-expression column references, and foreign-key or trigger references when the altered object is built, and remain correct when invoked without a client context (as during checkpoint loading) by only handling the alterations that can be applied in that mode. Together these functions must guarantee that a successful alter is visible atomically and durably, that column and constraint metadata stay mutually consistent, and that failed or disallowed alters leave the catalog unchanged."} +{"repo": "duckdb/duckdb", "buggy_commit": "668f94740b280bf44c7c081df664ae1eb310c090", "bug_issue": 25553, "solve_pr": 25555, "call_graph": {"nodes": [{"id": "src/function/table/table_scan.cpp::DuckTableScanState::ClaimAssignment"}, {"id": "src/function/table/table_scan.cpp::DuckTableScanState::InitLocalState"}, {"id": "src/function/table/table_scan.cpp::DuckTableScanState::ProduceJob"}, {"id": "src/function/table/table_scan.cpp::DuckTableScanState::ScanWithReadAhead"}, {"id": "src/function/table/table_scan.cpp::DuckTableScanState::TableScanFunc"}, {"id": "src/storage/data_table.cpp::DataTable::NextParallelScan"}, {"id": "src/storage/table/row_group_collection.cpp::RowGroupCollection::NextParallelScan"}], "edges": [{"source": "src/function/table/table_scan.cpp::DuckTableScanState::ClaimAssignment", "target": "src/storage/data_table.cpp::DataTable::NextParallelScan"}, {"source": "src/function/table/table_scan.cpp::DuckTableScanState::InitLocalState", "target": "src/function/table/table_scan.cpp::DuckTableScanState::ClaimAssignment"}, {"source": "src/function/table/table_scan.cpp::DuckTableScanState::ProduceJob", "target": "src/storage/data_table.cpp::DataTable::NextParallelScan"}, {"source": "src/function/table/table_scan.cpp::DuckTableScanState::ScanWithReadAhead", "target": "src/function/table/table_scan.cpp::DuckTableScanState::ProduceJob"}, {"source": "src/function/table/table_scan.cpp::DuckTableScanState::TableScanFunc", "target": "src/function/table/table_scan.cpp::DuckTableScanState::ClaimAssignment"}, {"source": "src/function/table/table_scan.cpp::DuckTableScanState::TableScanFunc", "target": "src/function/table/table_scan.cpp::DuckTableScanState::ScanWithReadAhead"}, {"source": "src/storage/data_table.cpp::DataTable::NextParallelScan", "target": "src/storage/table/row_group_collection.cpp::RowGroupCollection::NextParallelScan"}]}, "graph_spec": "The seq_scan table function divides one table scan into disjoint, non-overlapping row-group assignments claimed cooperatively by worker threads. Obligation: every scanned row must be produced exactly once, with assignments covering the full row-group sequence and no row assigned to two consumers. RowGroupCollection::NextParallelScan must, under its lock, advance the shared parallel state to the next row group (splitting a row group into STANDARD_VECTOR_SIZE batches, and per-vector when verify_parallelism is set), report the number of rows in the assignment via a valid optional_idx, and return an invalid index only when no row groups remain; it also records ordering metadata (batch_index, row_number_base/visible-row accounting) consistent with the assignment it hands out. DataTable::NextParallelScan must exhaust persistent row groups first and only then fall through to transaction-local storage, propagating the final base row count as the local row_number_base so that local rows continue numbering after the persistent rows. ClaimAssignment must treat an invalid assignment as 'no work left' and must not count a row group when nothing was claimed. DuckTableScanState::InitLocalState must claim an assignment eagerly only when read-ahead is disabled; when read-ahead is enabled claiming is deferred to jobs. ProduceJob must recycle an available scan state or build and initialize a fresh one, claim under the read-ahead lock so that batch indexes assigned to jobs remain dense and in claim order, account the claimed rows as queued (not yet processed) for progress purposes, and prepare the first vector's I/O before the job is handed to a decoder. ScanWithReadAhead/TableScanFunc must decode a claimed job's prepared I/O without re-registering it, count a job's rows as scanned only once decoding begins (folding job rows into progress exactly once and never double counting), return control to the executor when I/O is blocked or output is available, and recycle exhausted scan states; the scan returns finished only after all assignments are exhausted. Progress reporting must remain monotonic within [0,100]: queued-but-undecoded rows are excluded from scanned rows, and the invariant queued_rows <= processed rows must hold. Scanned-row/row-group counters must reflect rows actually decoded by this thread's own state plus its folded jobs, including a job still in flight."} +{"repo": "duckdb/duckdb", "buggy_commit": "668f94740b280bf44c7c081df664ae1eb310c090", "bug_issue": 25554, "solve_pr": 25558, "call_graph": {"nodes": [{"id": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::AddCTERefJoinConditions"}, {"id": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCTE"}, {"id": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCTERef"}, {"id": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNode"}, {"id": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNodeInternal"}, {"id": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownGet"}, {"id": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownSetOperation"}], "edges": [{"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCTE", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNode"}, {"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCTERef", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::AddCTERefJoinConditions"}, {"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNode", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNodeInternal"}, {"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNodeInternal", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCTE"}, {"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNodeInternal", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCTERef"}, {"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNodeInternal", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownGet"}, {"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNodeInternal", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownSetOperation"}, {"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownGet", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNode"}, {"source": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownSetOperation", "target": "src/planner/subquery/flatten_dependent_join.cpp::FlattenDependentJoins::PushDownCorrelatedNode"}]}, "graph_spec": "FlattenDependentJoins flattens a dependent join by pushing the active correlation domain (one state binding per correlated column, in `correlated_columns` order) through the correlated subtree and returning an `UnnestingState`. `PushDownCorrelatedNode` is the sole entry point: it must return exactly one distinct state binding per correlated column, each present in the rewritten subtree's output, with a consistent replacement graph, and must invalidate cached subtree access so domain/correlation decisions stay consistent after rewrites. `PushDownCorrelatedNodeInternal` first checks whether the subtree actually requires this domain; if not, a `LOGICAL_CTE_REF` is still routed through `PushDownCTERef` (so the reference re-exposes its correlated columns), while any other independent subtree is decorrelated in isolation. Otherwise it dispatches by operator type to the matching specialized handler and reports unsupported operators as errors rather than silently flattening them.\n\nFor CTEs, `PushDownCTE` must not push the domain into a materialized CTE's definition side when that side is independent; it decorrelates the definition side and only pushes the domain into the reference-using side. Otherwise it pushes the domain into the definition, records the CTE's correlated columns and patches the operators that access the CTE, appends the correlated columns as a contiguous block after `column_count` (also extending recursive-CTE key targets and internal types), pushes the domain into the right side using that block state, and increases `column_count` by the number of correlated columns. `PushDownCTERef` must locate each of the flattener's correlated columns inside the CTE reference's extended output by matching original bindings (a nested flattener may request a different order or subset); when all are found it returns those bindings as the state without adding an operator. When some are missing it must introduce a delim-scan domain and constrain it only on the correlations actually shared with the CTE: `AddCTERefJoinConditions` emits a `NOT DISTINCT FROM` condition for every correlated column whose position is valid, pairing the CTE-reference column with the corresponding state binding in `correlated_columns` order and skipping unfound ones. If at least one such condition exists these become the join conditions; if none are shared, the operation must degrade to a cross product rather than an unconditional join.\n\n`PushDownGet` pushes the domain into its single child through the child's replacement graph, records for every correlated column the index of its state binding in the child's output as `projected_input`, fails loudly if a state binding is absent, and rewrites the correlated bindings inside the get. `PushDownSetOperation` pushes the same domain state into every child, adopting each child's returned bindings as the shared state and merging their replacement graphs; because a child may become a cross product, it wraps such children in an identity projection so all set-operation children remain column-compatible, then appends the correlated columns to the set operation's output by increasing `column_count` and returns the contiguous state at that offset."} +{"repo": "duckdb/duckdb", "buggy_commit": "4e94455c4f5eb6c9a9b7ed800d88ad2515d72eb8", "bug_issue": 25556, "solve_pr": 25561, "call_graph": {"nodes": [{"id": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"id": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren"}, {"id": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::Optimize"}, {"id": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}], "edges": [{"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren"}, {"source": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitPrunableChildren", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::Optimize", "target": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal", "target": "src/optimizer/remove_unused_columns.cpp::RemoveUnusedColumns::VisitOperator"}, {"source": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal", "target": "src/optimizer/topn_window_elimination.cpp::TopNWindowElimination::OptimizeInternal"}]}, "graph_spec": "This scope covers DuckDB's unused-column pruning (RemoveUnusedColumns) and the grouped-top-n window elimination pass (TopNWindowElimination). RemoveUnusedColumns::VisitOperator is the workhorse: given the column bindings currently referenced by ancestors, it must drop expressions/columns of the visited operator that are provably unreferenced while leaving every still-referenced binding resolvable, rewrite surviving bindings when positions shift, and never yield an invalid or empty plan (it substitutes a constant projection or COUNT(*) when everything is pruned); it recurses into children via self-edges, and for multi-child operators re-enters each child under a suitably propagated reference/everything_referenced context. VisitPrunableChildren visits children in order, snapshotting each child's pre-pruning bindings and, when the parent carries a positional projection map, remapping that map onto the post-pruning child columns through the recorded replacements; the mutual VisitOperator/VisitPrunableChildren recursion must keep every projection map selecting exactly the surviving columns, never a stale, cyclic, or out-of-range position. TopNWindowElimination::Optimize is guarded: it is a no-op unless the core_functions extension is loaded, and it applies any accumulated binding replacements across the whole plan afterward. TopNWindowElimination::OptimizeInternal recursively locates the filter/optional-projections/window grouped-top-n shape and rewrites it into an equivalent aggregate/unnest/projection (optionally late-materialized join) form that preserves row ordering, null ordering, row-number values, and payload columns; for branching nodes it applies each child's replacements only up to the owning operator and merges them so sibling rewrites do not clobber one another, recording every substitution in the shared replacer with a correct stop operator. Its single downward edge into RemoveUnusedColumns::VisitOperator is only legitimate when the rewritten subtree has no late materialization, no CTE references defined outside the subtree, and no projection maps, since pruning such a plan could invalidate an active positional projection map or an externally visible reference."} +{"repo": "duckdb/duckdb", "buggy_commit": "376bc5b58d837e862dd7abfe9b296c391faca0bb", "bug_issue": 25565, "solve_pr": 25676, "call_graph": {"nodes": [{"id": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::Rewrite"}, {"id": "src/planner/subquery/delim_join_cte_rewriter.cpp::duckdb::PushEligibleFilterExpressionsIntoDelimJoinInputs"}, {"id": "src/planner/subquery/delim_join_cte_rewriter.cpp::duckdb::PushEligibleFiltersIntoDelimJoinInputs"}], "edges": [{"source": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::Rewrite", "target": "src/planner/subquery/delim_join_cte_rewriter.cpp::duckdb::PushEligibleFiltersIntoDelimJoinInputs"}, {"source": "src/planner/subquery/delim_join_cte_rewriter.cpp::duckdb::PushEligibleFiltersIntoDelimJoinInputs", "target": "src/planner/subquery/delim_join_cte_rewriter.cpp::duckdb::PushEligibleFilterExpressionsIntoDelimJoinInputs"}, {"source": "src/planner/subquery/delim_join_cte_rewriter.cpp::duckdb::PushEligibleFiltersIntoDelimJoinInputs", "target": "src/planner/subquery/delim_join_cte_rewriter.cpp::duckdb::PushEligibleFiltersIntoDelimJoinInputs"}]}, "graph_spec": "The scope covers the delimiter-elimination driver and its filter-pushdown phase. `DelimJoinCTERewriter::Rewrite` is the entry point that, after collecting delimiter/marker indexes, must drive the plan to a delimiter-free result: it repeatedly invokes `PushEligibleFiltersIntoDelimJoinInputs` until a fixpoint, rewrites remaining delim joins into materialized CTEs, optionally applies the generated-domain-join eliminator, and must guarantee that no `LOGICAL_DELIM_JOIN` or `LOGICAL_DELIM_GET` survives in the final tree. `PushEligibleFiltersIntoDelimJoinInputs` must recurse through every child, attempt extraction only at `LOGICAL_FILTER` nodes, and return an accurate boolean of whether any change occurred, so the traversal is exhaustive and the fixpoint terminates with the plan unmodified and `false` when nothing is eligible. `PushEligibleFilterExpressionsIntoDelimJoinInputs` defines the eligibility contract for a filter sitting directly above a delim join (possibly through a chain of `LOGICAL_PROJECTION`): predicates are AND-flattened first, and a predicate is movable into the join's first input only if it has at least one depth-0 column reference and every depth-0 reference is supplied by that input's bindings. With intervening projections, movement is additionally restricted to INNER/LEFT delimit joins, every projection expression must be barrier-free, and a predicate may be rewritten only when each referenced projection expression is itself an identity depth-0 column reference; otherwise the predicate must remain above. Barrier-required or barrier-containing predicates must never be relocated, since moving them could expose errors or side effects on rows the filter would otherwise exclude. Semantics must be preserved: moved predicates are attached to the input (extending an existing projection-map-free filter rather than nesting a new one), unmoved predicates are retained on the original filter, the whole filter operator is removed only when no predicates remain, and the conjunction of predicates applied to each row must be unchanged. The routine must be monotone and idempotent-safe: it returns true only when a predicate was actually moved, leaves the plan untouched and returns false otherwise, and repeated passes must make progress toward a state with no further eligible pushdown."} +{"repo": "duckdb/duckdb", "buggy_commit": "2931a9165ce626cf4d7b824d9cbe7ce32c5f09af", "bug_issue": 25575, "solve_pr": 26029, "call_graph": {"nodes": [{"id": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::ApproxTopKOperation::Combine"}, {"id": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::InternalApproxTopKState::CopyValue"}, {"id": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::InternalApproxTopKState::InsertOrReplaceEntry"}, {"id": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::duckdb::ApproxTopKImportState"}], "edges": [{"source": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::ApproxTopKOperation::Combine", "target": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::InternalApproxTopKState::InsertOrReplaceEntry"}, {"source": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::InternalApproxTopKState::InsertOrReplaceEntry", "target": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::InternalApproxTopKState::CopyValue"}, {"source": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::duckdb::ApproxTopKImportState", "target": "extension/core_functions/aggregate/holistic/approx_top_k.cpp::InternalApproxTopKState::CopyValue"}]}, "graph_spec": "These four functions jointly maintain a per-group approximate top-k aggregate: a bounded, count-ordered set of monitored string values plus per-hash Filtered Space-Saving counters, all owned by one InternalApproxTopKState. ApproxTopKOperation::Combine must merge a source state into a target without mutating the source: a source with no state or no monitored values is a no-op; an empty target adopts the source's k; two non-empty states with different k are an error; every target value also present in source gains that key's source count, otherwise the source's current minimum count; each source value absent from target is admitted only with enough increment to exceed the target minimum (or its full count while the target is under capacity) and is skipped when it cannot, with zero increments ignored; finally the two equal-sized per-hash filter vectors are summed elementwise, and the target must still satisfy the state invariants (values ordered by descending count so the back is the minimum, lookup_map size equal to values size, each value's index matching its position, and every count positive). InternalApproxTopKState::InsertOrReplaceEntry is the admission/replacement point: while below capacity it appends a fresh slot whose count starts at zero and therefore takes the copy-and-increment path; once at capacity the slot at the back is the current minimum, and the incoming value is admitted only when the filter slot indexed by its hash plus the requested increment would reach or exceed that minimum, in which case the evicted entry's filter slot must be reset to the evicted count and its key erased from lookup_map before the new key is copied in, inserted into the map, and incremented by the requested amount, preserving ordering and map consistency. InternalApproxTopKState::CopyValue is the ownership boundary: it must record the input's hash and, for non-inlined strings, copy the bytes into state-owned arena memory whose power-of-two capacity is at least the string length (growing only when needed) and repoint value.str_val at that buffer, so a state entry never borrows input or aggregate memory; already-inlined strings may be stored directly. ApproxTopKImportState must rebuild an independent state for each non-NULL row: NULL input leaves the state empty, k re-initializes the structure, a value count exceeding capacity or a filter length differing from the k-derived filter size is rejected, each imported key must be non-NULL and unique with its stored count, filter counters are restored, and every imported value must pass through CopyValue so the reconstructed state owns its string data rather than referencing the serialized vector."} +{"repo": "duckdb/duckdb", "buggy_commit": "ed8592347a1bdf90c7074c810d8dc6e052171a3e", "bug_issue": 25588, "solve_pr": 25589, "call_graph": {"nodes": [{"id": "src/execution/operator/persistent/physical_batch_insert.cpp::PhysicalBatchInsert::Finalize"}, {"id": "src/execution/operator/persistent/physical_batch_insert.cpp::PhysicalBatchInsert::Sink"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Finalize"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::OnConflictHandling"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Sink"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts"}, {"id": "src/execution/operator/persistent/physical_insert.cpp::duckdb::PerformOnConflictAction"}, {"id": "src/execution/operator/persistent/physical_update.cpp::PhysicalUpdate::Sink"}, {"id": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"id": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"id": "src/storage/data_table.cpp::DataTable::VerifyAppendForeignKeyConstraint"}, {"id": "src/storage/data_table.cpp::DataTable::VerifyForeignKeyConstraint"}], "edges": [{"source": "src/execution/operator/persistent/physical_batch_insert.cpp::PhysicalBatchInsert::Finalize", "target": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"source": "src/execution/operator/persistent/physical_batch_insert.cpp::PhysicalBatchInsert::Sink", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Finalize", "target": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::OnConflictHandling", "target": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::OnConflictHandling", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Sink", "target": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::OnConflictHandling"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::PhysicalInsert::Sink", "target": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts", "target": "src/execution/operator/persistent/physical_insert.cpp::duckdb::PerformOnConflictAction"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::duckdb::HandleInsertConflicts", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"source": "src/execution/operator/persistent/physical_insert.cpp::duckdb::PerformOnConflictAction", "target": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"source": "src/execution/operator/persistent/physical_update.cpp::PhysicalUpdate::Sink", "target": "src/storage/data_table.cpp::DataTable::LocalAppend"}, {"source": "src/storage/data_table.cpp::DataTable::LocalAppend", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints"}, {"source": "src/storage/data_table.cpp::DataTable::VerifyAppendConstraints", "target": "src/storage/data_table.cpp::DataTable::VerifyAppendForeignKeyConstraint"}, {"source": "src/storage/data_table.cpp::DataTable::VerifyAppendForeignKeyConstraint", "target": "src/storage/data_table.cpp::DataTable::VerifyForeignKeyConstraint"}]}, "graph_spec": "This scope covers the integrity obligations of row insertion and update paths for DuckDB tables: `PhysicalInsert` (Sink/OnConflictHandling/HandleInsertConflicts/PerformOnConflictAction/Finalize), `PhysicalBatchInsert` (Sink/Finalize), `PhysicalUpdate::Sink`, and `DataTable` append/constraint verification. Required behavior: a non-empty chunk appended through `DataTable::LocalAppend` must only reach transaction-local storage after the table is still the main (unmodified) version and, unless explicitly marked unsafe, after `VerifyAppendConstraints` has validated all applicable generated-column, unique-index, NOT NULL, CHECK, and append-foreign-key constraints; `VerifyAppendConstraints` must consult delete indexes and per-constraint bound state, and must delegate append foreign keys through `VerifyAppendForeignKeyConstraint` to `VerifyForeignKeyConstraint` in append mode. Foreign-key append verification must resolve the referenced table within the same schema, map the referencing chunk's FK columns onto the referenced table's physical primary-key columns, and succeed only when each key is found in either the global (committed) index or the transaction-local index, throwing a constraint error only when it is absent from both; empty chunks are a no-op. `PhysicalInsert::Sink` must constrain each row exactly once (verifying inside `OnConflictHandling` for the THROW action and appending as unsafe, otherwise appending with verification), while `OnConflictHandling` must, after handling inner (same-chunk) duplicate conflicts, invoke conflict handling against both global and transaction-local unique indexes. `HandleInsertConflicts` must detect conflicts without modifying data, and only when conflicts exist fetch the existing rows, verify the optional ON CONFLICT condition, reject updating the same target row twice, perform the conflict action, and shrink the input chunk so the surviving tuples are the only ones inserted; `PerformOnConflictAction` treats DO NOTHING as leaving rows untouched (returning zero affected tuples) and DO UPDATE as producing an update image, either in place or as a delete-plus-insert where the new rows are appended with the deleted row-ids so both operate on the same rows. Both insert `Finalize` methods must fully drain buffered thread-local/optimistic collections into transaction-local storage, using a direct `InitializeLocalAppend`/`LocalAppend`/`FinalizeLocalAppend` sequence for small inputs, and must leave no rows unappended. `PhysicalUpdate::Sink`'s delete-and-insert path must deduplicate row-ids per the row-id policy, delete the old rows and append the full new row image together, keeping constraint verification and index maintenance consistent for the affected rows. All paths must preserve chunk cardinality/ordering invariants: chunks passed to append are flattened, selections that remove applied conflicts keep remaining rows contiguous, and constraint verification must not silently drop or double-apply rows."} +{"repo": "duckdb/duckdb", "buggy_commit": "5e9508026e1bbbd28f25863c33cfb03500063f81", "bug_issue": 25611, "solve_pr": 25619, "call_graph": {"nodes": [{"id": "src/function/table/arrow.cpp::ArrowTableFunction::ArrowScanFunction"}, {"id": "src/function/table/arrow_conversion.cpp::ArrowTableFunction::ArrowToDuckDB"}, {"id": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB"}, {"id": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary"}, {"id": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBRunEndEncoded"}, {"id": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBArray"}, {"id": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBList"}, {"id": "src/main/capi/v2/capi_v2_arrow.cpp::capiv2::CV2ConvertArrowSlice"}, {"id": "src/main/capi/v2/capi_v2_arrow.cpp::duckdb_v2_arrow_importer_next_chunk"}], "edges": [{"source": "src/function/table/arrow.cpp::ArrowTableFunction::ArrowScanFunction", "target": "src/function/table/arrow_conversion.cpp::ArrowTableFunction::ArrowToDuckDB"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowTableFunction::ArrowToDuckDB", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowTableFunction::ArrowToDuckDB", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowTableFunction::ArrowToDuckDB", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBRunEndEncoded"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBRunEndEncoded"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB", "target": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBArray"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB", "target": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBList"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBRunEndEncoded"}, {"source": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBRunEndEncoded", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB"}, {"source": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBArray", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB"}, {"source": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBArray", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary"}, {"source": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBList", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB"}, {"source": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBList", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary"}, {"source": "src/function/table/arrow_conversion.cpp::duckdb::ArrowToDuckDBList", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBRunEndEncoded"}, {"source": "src/main/capi/v2/capi_v2_arrow.cpp::capiv2::CV2ConvertArrowSlice", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDB"}, {"source": "src/main/capi/v2/capi_v2_arrow.cpp::capiv2::CV2ConvertArrowSlice", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBDictionary"}, {"source": "src/main/capi/v2/capi_v2_arrow.cpp::capiv2::CV2ConvertArrowSlice", "target": "src/function/table/arrow_conversion.cpp::ArrowToDuckDBConversion::ColumnArrowToDuckDBRunEndEncoded"}, {"source": "src/main/capi/v2/capi_v2_arrow.cpp::duckdb_v2_arrow_importer_next_chunk", "target": "src/main/capi/v2/capi_v2_arrow.cpp::capiv2::CV2ConvertArrowSlice"}]}, "graph_spec": "The scope converts Arrow arrays into DuckDB DataChunks and must preserve Arrow's row semantics exactly across the engine scan path and the C-API-v2 importer. Every conversion must honor array.offset together with parent/nested offsets and the chunk offset so a produced vector holds exactly the requested rows starting at the requested position; after conversion the output column vector must be resized to the chunk's row count, since dictionary- and run-end-encoded conversions replace the vector instead of filling it. Null semantics must be carried from Arrow's bit-packed validity buffer at the same effective offset, with parent (struct) nullability propagated into child vectors and nested containers. Nested layouts must translate consistently: list and large/regular list offsets and sizes become list entries, the child vector is reserved and sized to the covered span with the correct start offset, fixed-size arrays broadcast their element count and validity down to children, and struct children are converted in declaration order preserving parent validity. Dictionary-encoded arrays resolve the cached dictionary through a selection vector of indices, with null entries directed at a trailing invalid sentinel slot; run-end-encoded arrays expand runs, caching and reusing decoded run-ends and values per array; string data may share the source heap. External boundaries: unsupported physical types or encodings and malformed shapes (missing dictionary, out-of-range index) are rejected rather than silently misread, and the importer hands out chunks of at most batch_size rows, carries short tails across arrays, honors an explicit flush, and only lets a chunk reference an array the importer still owns—chunks derived from caller-retained arrays must be materialized."} +{"repo": "duckdb/duckdb", "buggy_commit": "10de9573794001c649621013bdd93553b54e00c9", "bug_issue": 25629, "solve_pr": 25690, "call_graph": {"nodes": [{"id": "extension/parquet/parquet_reader.cpp::ParquetPartitionRowGroup::GetColumnStatistics"}, {"id": "extension/parquet/parquet_reader.cpp::ParquetPartitionRowGroup::MinMaxIsExact"}], "edges": []}, "graph_spec": "Scope: the two `ParquetPartitionRowGroup` accessors that expose per-row-group column statistics from parquet file metadata to callers of `PartitionRowGroup`.\n\n`GetColumnStatistics(storage_index)` must return statistics describing only the row group identified by `row_group_idx`, derived from that row group's column metadata under the current parquet options, or a null result when no statistics can be produced for the requested index. It must return null rather than throwing or fabricating data when the primary field index is outside the root schema's children, when the column schema is an expression (which has no stored statistics), or when the underlying schema lookup yields no statistics. When the requested `StorageIndex` is a pushdown-extract of a nested column, the returned statistics must be projected onto the requested child path; for non-nested or full-column requests the top-level statistics must be returned unchanged.\n\n`MinMaxIsExact(storage_index)` must report whether the min/max values in those statistics are exact enough to be relied upon, and must be conservative: it is `true` only when exactness is affirmatively guaranteed — by construction for generated row-number columns, or when the column chunk's metadata explicitly marks both the min and max value as exact. It must be `false` for an out-of-range primary index, missing column-chunk metadata or statistics, or absent/negative exactness flags, and it must return the same verdict for the same row group and storage index that `GetColumnStatistics` serves, so callers that gate correctness-sensitive decisions on exactness never treat uncertain bounds as definite."} +{"repo": "duckdb/duckdb", "buggy_commit": "88902aaa3972216c928c8e79a89217a413be414c", "bug_issue": 25636, "solve_pr": 25637, "call_graph": {"nodes": [{"id": "src/include/duckdb/storage/compression/chimp/chimp_fetch.hpp::duckdb::ChimpFetchRow"}], "edges": []}, "graph_spec": "`ChimpFetchRow` performs a random-access (point) fetch of the single segment row at absolute `row_id`, writing exactly that one decoded value into `result[result_idx]` and leaving other result slots untouched; `result_idx` need not be 0. For every `row_id` in `[0, segment_count)` and for each supported Chimp type (float/uint32 and double/uint64) the fetched value must equal what a full sequential scan of the segment emits at that position, and repeated or reordered fetches must give identical results, since each call builds its own `ChimpScanState` and must not let any pre-existing scan/fetch state influence the outcome. Positioning must be exact: `Skip(row_id)` advances the state so the very next decoded value is the target row, with `total_value_count` incremented by exactly one after the fetch. Because Chimp is delta-encoded within fixed `CHIMP_SEQUENCE_SIZE` groups, reading a point value requires decoding from its group's start: when skipping lands on a group boundary (`total_value_count` an exact multiple of `CHIMP_SEQUENCE_SIZE`) while values remain in the segment, the group is first fully loaded into `group_state.values` (including a final partial group shorter than the sequence size) before the one-value `Scan`; without that load the emitted value would come from stale group contents. The written element is the internal integer representation `ChimpType::TYPE`, so the destination vector's physical type must match that representation, and the fetch must handle boundary rows (first and last of the segment) correctly."} +{"repo": "duckdb/duckdb", "buggy_commit": "a836ab3860d1010f4727365cfe92bcce9931b272", "bug_issue": 25648, "solve_pr": 25790, "call_graph": {"nodes": [{"id": "src/main/capi/v2/capi_v2_arrow.cpp::CV2ConvertArrowSlice"}, {"id": "src/main/capi/v2/capi_v2_arrow.cpp::CV2ValidateArrowArray"}, {"id": "src/main/capi/v2/capi_v2_arrow.cpp::duckdb_v2_arrow_importer_append"}, {"id": "src/main/capi/v2/capi_v2_arrow.cpp::duckdb_v2_arrow_importer_next_chunk"}], "edges": [{"source": "src/main/capi/v2/capi_v2_arrow.cpp::duckdb_v2_arrow_importer_append", "target": "src/main/capi/v2/capi_v2_arrow.cpp::CV2ValidateArrowArray"}, {"source": "src/main/capi/v2/capi_v2_arrow.cpp::duckdb_v2_arrow_importer_next_chunk", "target": "src/main/capi/v2/capi_v2_arrow.cpp::CV2ConvertArrowSlice"}]}, "graph_spec": "The arrow-importer scope governs how a caller-supplied Arrow array is validated, adopted, and lazily sliced into DuckDB chunk(s) that must match a schema resolved at importer creation. `duckdb_v2_arrow_importer_append` accepts one array at a time: it must first confirm no rows from a previous array remain undrained, then validate the incoming array against the resolved schema before taking ownership, so a rejected array is left untouched (its ownership is only transferred when `consume` is true, otherwise it is borrowed for the drain). A null array is allowed only when `flush` is set, which records that leftover rows may be released as a short chunk. `CV2ValidateArrowArray` is the pre-read gate: the top-level child count must equal the resolved column count; the children pointer must be present whenever columns exist; every child must be non-null and not already released; every child length must equal the array length; and a positive top-level null count is only valid when a validity bitmap is actually present, otherwise an input error is raised instead of reading garbage. `CV2ConvertArrowSlice` produces a fresh chunk for a contiguous slice [from, from+rows) using the resolved per-column Arrow physical types (default, dictionary-encoded, run-end encoded), applies the array's top-level validity bitmap uniformly to every column, re-asserts each vector's size, and enforces final cardinality; when the caller retains the array (no owner), the result must be fully materialized so it does not reference caller-owned buffers, while an adopted array may back the chunk zero-copy and must be kept alive by the chunk. `duckdb_v2_arrow_importer_next_chunk` yields at most one chunk per call: it drains the in-flight array in slices bounded by `batch_size` (0 meaning unbounded), advances its offset, holds back any tail shorter than a full batch by materializing it into `pending` unless a flush was requested, joins carried-over pending rows with the head of the current array (the one case the chunk cannot be zero-copy), and emits the pending rows as a short chunk when the batch fills or a flush is pending; when neither in-flight rows nor pending rows remain it releases the input and returns no chunk. Chunks therefore never exceed `batch_size`, partial batches are preserved across append calls until flush, and every returned chunk conforms to the schema-consistent types and cardinality of the slice it came from."} +{"repo": "duckdb/duckdb", "buggy_commit": "88902aaa3972216c928c8e79a89217a413be414c", "bug_issue": 25658, "solve_pr": 25659, "call_graph": {"nodes": [{"id": "extension/core_functions/scalar/array/array_value.cpp::duckdb::ArrayValueStats"}, {"id": "extension/core_functions/scalar/list/list_value.cpp::duckdb::ListValueStats"}, {"id": "src/storage/statistics/array_stats.cpp::ArrayStats::Merge"}, {"id": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge"}, {"id": "src/storage/statistics/list_stats.cpp::ListStats::Merge"}, {"id": "src/storage/statistics/variant_stats.cpp::VariantStats::Merge"}, {"id": "src/storage/statistics/variant_stats.cpp::VariantStats::MergeShredding"}, {"id": "src/storage/table/column_data.cpp::ColumnData::InitializeColumn"}, {"id": "src/storage/table/column_data.cpp::ColumnData::MergeIntoStatistics"}, {"id": "src/storage/table/row_group.cpp::RowGroup::MergeIntoStatistics"}, {"id": "src/storage/table/row_group_collection.cpp::RowGroupCollection::Initialize"}], "edges": [{"source": "extension/core_functions/scalar/array/array_value.cpp::duckdb::ArrayValueStats", "target": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge"}, {"source": "extension/core_functions/scalar/list/list_value.cpp::duckdb::ListValueStats", "target": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge"}, {"source": "src/storage/statistics/array_stats.cpp::ArrayStats::Merge", "target": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge"}, {"source": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge", "target": "src/storage/statistics/array_stats.cpp::ArrayStats::Merge"}, {"source": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge", "target": "src/storage/statistics/list_stats.cpp::ListStats::Merge"}, {"source": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge", "target": "src/storage/statistics/variant_stats.cpp::VariantStats::Merge"}, {"source": "src/storage/statistics/list_stats.cpp::ListStats::Merge", "target": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge"}, {"source": "src/storage/statistics/variant_stats.cpp::VariantStats::Merge", "target": "src/storage/statistics/variant_stats.cpp::VariantStats::Merge"}, {"source": "src/storage/statistics/variant_stats.cpp::VariantStats::Merge", "target": "src/storage/statistics/variant_stats.cpp::VariantStats::MergeShredding"}, {"source": "src/storage/statistics/variant_stats.cpp::VariantStats::MergeShredding", "target": "src/storage/statistics/variant_stats.cpp::VariantStats::MergeShredding"}, {"source": "src/storage/table/column_data.cpp::ColumnData::InitializeColumn", "target": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge"}, {"source": "src/storage/table/column_data.cpp::ColumnData::MergeIntoStatistics", "target": "src/storage/statistics/base_statistics.cpp::BaseStatistics::Merge"}, {"source": "src/storage/table/row_group.cpp::RowGroup::MergeIntoStatistics", "target": "src/storage/table/column_data.cpp::ColumnData::MergeIntoStatistics"}, {"source": "src/storage/table/row_group_collection.cpp::RowGroupCollection::Initialize", "target": "src/storage/table/row_group.cpp::RowGroup::MergeIntoStatistics"}]}, "graph_spec": "Statistics merging in this scope is a conservative, order-insensitive union. `BaseStatistics::Merge` first ORs `has_null`/`has_no_null` (merged nullability is set iff either input could produce a NULL, resp. a non-NULL) and then dispatches to the payload merge, so the result must remain a sound bound for the union of both inputs and for the destination's logical type. Nested types recurse into children: `ListStats::Merge` / `ArrayStats::Merge` merge only `child_stats[0]` (lists/arrays carry no separate payload), ignore a VALIDITY-typed `other`, and preserve the child type, terminating at primitive stats. `VariantStats::Merge` always merges the unshredded `child_stats[0]` and runs the shredding state machine: UNINITIALIZED is neutral (adopts the other side, copying its shredding child when SHREDDED), INCONSISTENT is absorbing, NOT_SHREDDED survives only against NOT_SHREDDED, SHREDDED + SHREDDED attempts `MergeShredding`, and every other combination demotes to INCONSISTENT while invalidating the shredding child so no stale schema is exposed. `MergeShredding` structurally unifies schemas: object fields are kept only when present on both sides with matching type ids and are merged recursively, list shreddings recurse on their element child, primitives merge directly, untyped-value stats are merged whenever either side has them, and the result combines both sides' validity; when nothing compatible remains (empty object, mismatched type/child) it reports failure so the caller demotes instead of asserting a schema. For constructors, `ListValueStats`/`ArrayValueStats` return an empty list/array statistic whose element stats are the merge of all argument stats, flagged as able to hold valid values because the constructed collection itself is never NULL. Storage accumulation uses the same union top-down: `ColumnData::InitializeColumn` merges each data pointer's serialized stats into a possibly nested target and sums segment counts, `ColumnData::MergeIntoStatistics` merges the column's own stats into the caller-supplied target under the stats lock, `RowGroup::MergeIntoStatistics` applies this per column into a `TableStatistics`, and `RowGroupCollection::Initialize(PersistentCollectionData)` starts from empty stats and merges each loaded row group's stats while accumulating `total_rows`, so collection/row-group/column statistics equal the union of all constituent data however they were assembled."} +{"repo": "duckdb/duckdb", "buggy_commit": "3a604ab6d4d66910ad91bf7669c0b5f648a00190", "bug_issue": 25698, "solve_pr": 25949, "call_graph": {"nodes": [{"id": "src/function/window/window_value_function.cpp::WindowFirstValueExecutor::StreamData"}, {"id": "src/function/window/window_value_function.cpp::WindowLastValueExecutor::StreamData"}, {"id": "src/function/window/window_value_function.cpp::WindowNthValueStreamingState::StreamData"}, {"id": "src/function/window/window_value_function.cpp::WindowValueStreamingState::WindowValueStreamingState"}], "edges": []}, "graph_spec": "This scope covers the streaming evaluation of the value window functions `first_value`, `last_value` and `nth_value` over a running frame (partition start through the current row). `WindowValueStreamingState` is constructed once from the first input chunk: it captures the argument expression, evaluates it once to seed a reusable constant vector, and sets up a reusable argument executor/chunk, so subsequent `StreamData` calls must produce exactly one result value per row of `input` while reading argument data only from `input` concatenated with the buffered `delayed` look-ahead rows. For `first_value`, the result must remain the partition's first argument value (constant) when IGNORE NULLS is off, and must advance only to the first non-NULL value over the running prefix when IGNORE NULLS is on, carrying that value forward when the leading rows are NULL. For `last_value`, the result must be the argument value at each current row, or, under IGNORE NULLS, the most recent non-NULL value at or before that row, persisting the last seen non-NULL across chunk boundaries rather than reverting to NULL. For `nth_value`, a running one-based counter must count qualifying rows (non-NULL rows only when IGNORE NULLS is set), emit the state's placeholder until the requested N is reached, then yield a constant equal to the Nth qualifying value for all later rows; streaming is only valid when N is a constant positive value (non-positive N behaves like the index-0 mapping). All streaming outputs must agree with the equivalent blocking evaluation, including value validity and NULL placement."} +{"repo": "duckdb/duckdb", "buggy_commit": "3a604ab6d4d66910ad91bf7669c0b5f648a00190", "bug_issue": 25700, "solve_pr": 25953, "call_graph": {"nodes": [{"id": "src/function/window/window_value_function.cpp::WindowFirstValueExecutor::CanStream"}, {"id": "src/function/window/window_value_function.cpp::WindowLastValueExecutor::CanStream"}, {"id": "src/function/window/window_value_function.cpp::WindowLeadLagExecutor::CanStream"}, {"id": "src/function/window/window_value_function.cpp::WindowNthValueExecutor::CanStream"}], "edges": []}, "graph_spec": "All four nodes are streaming-eligibility predicates for the value window functions: each must answer true only when the streaming window operator can reproduce blocking evaluation row-for-row, and each may always answer false to fall back. They are consulted only after the operator has already established an empty OVER clause (no PARTITION BY, framing ORDER BY, argument ORDER BY, or EXCLUDE). Beyond that shared context, each predicate's obligations are: the value argument must be non-volatile/row-deterministic so it can be evaluated against buffered or look-ahead rows without diverging from blocking evaluation; and the frame must permit incremental evaluation. first_value streams with a frame starting at UNBOUNDED PRECEDING and ending at CURRENT ROW (ROWS/RANGE/GROUPS) or UNBOUNDED FOLLOWING, because its result is the frame's first row (the partition's first row); with IGNORE NULLS it is restricted to UNBOUNDED PRECEDING..CURRENT ROW (ROWS) so the running first non-NULL can be carried across chunks. last_value and nth_value stream only the running-total frame UNBOUNDED PRECEDING..CURRENT ROW (ROWS). lead/lag additionally require IGNORE NULLS to be absent, offset and default to fold to non-NULL constants (BIGINT-castable and return-type-castable respectively), a non-volatile argument when the lookup is forward (LEAD), and an absolute offset strictly smaller than the operator's buffered-row budget so the look-ahead/look-behind distance fits in the delayed chunk. nth_value also requires N to fold to a valid BIGINT index so its streaming state can be constructed. Any true answer commits the function to matching blocking results across chunk boundaries, including NULL and default-value handling."} +{"repo": "duckdb/duckdb", "buggy_commit": "3a604ab6d4d66910ad91bf7669c0b5f648a00190", "bug_issue": 25774, "solve_pr": 25960, "call_graph": {"nodes": [{"id": "src/function/cast/variant/to_json.cpp::JSONConverter::VisitObject"}, {"id": "src/function/scalar/variant/variant_typeof.cpp::VariantTypeofFunction"}, {"id": "src/include/duckdb/common/types/variant_visitor.hpp::VariantVisitor::VisitObjectItems"}, {"id": "src/include/duckdb/function/variant/variant_value_convert.hpp::ValueConverter::VisitObject"}], "edges": [{"source": "src/function/cast/variant/to_json.cpp::JSONConverter::VisitObject", "target": "src/include/duckdb/common/types/variant_visitor.hpp::VariantVisitor::VisitObjectItems"}, {"source": "src/include/duckdb/function/variant/variant_value_convert.hpp::ValueConverter::VisitObject", "target": "src/include/duckdb/common/types/variant_visitor.hpp::VariantVisitor::VisitObjectItems"}]}, "graph_spec": "Scope: VARIANT OBJECT traversal and its two consumers, plus variant_typeof. Given a decoded object (child_count and children_idx), VariantVisitor::VisitObjectItems must contribute exactly one (key, value) entry per child: for child index i it pairs the key resolved at GetKeysIndex(row, children_idx+i) with the value resolved at GetValuesIndex(row, children_idx+i), and it recursively dispatches each value through the same visitor so nested OBJECT/ARRAY nodes convert identically at every depth. Keys are preserved verbatim (original text/casing), emitted in ascending order of the raw key name so the result is deterministic and independent of physical storage, and duplicate keys survive as distinct ordered entries rather than being merged or dropped. Both consumers rely on this contract: JSONConverter::VisitObject must build a JSON object with one member per entry, member name equal to the child key and member value equal to the recursively JSON-converted child (native JSON scalars, not stringified), emitting members in the visitor's order; ValueConverter::VisitObject must build a STRUCT Value with the same keys and ordering and recursively converted field values, so equivalent variants always yield the same STRUCT field order. variant_typeof must report one string per row describing the top-level value: a SQL NULL row as VARIANT_NULL; primitives as their internal type name, with DECIMAL rendered as DECIMAL(width, scale); ARRAY as ARRAY(child_count); and OBJECT as OBJECT(k1, k2, ...) listing every object key sorted and joined, so its reported key set and ordering agree with the traversal above. Boundary cases: an empty object produces no entries (JSON empty object, empty STRUCT, OBJECT()), and each row is processed independently."} +{"repo": "duckdb/duckdb", "buggy_commit": "37d658d3878004e1ada191c258b046d102281bf4", "bug_issue": 25776, "solve_pr": 25792, "call_graph": {"nodes": [{"id": "src/function/cast/variant/from_variant.cpp::TryFromShreddedCast"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::CastFromVARIANT"}], "edges": [{"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastFromVARIANT", "target": "src/function/cast/variant/from_variant.cpp::TryFromShreddedCast"}]}, "graph_spec": "Scope covers the VARIANT-to-target cast entry point `CastFromVARIANT` and the shredded short-circuit `TryFromShreddedCast` it invokes. For a batch of `count` rows, `CastFromVARIANT` must yield exactly `count` values of the requested target type whose values, nulls, and ordering match what the general per-row VARIANT conversion would produce. It must offer the batch to `TryFromShreddedCast` first and, when that reports success, must not also run the fallback conversion; otherwise it must fall back to the recursive VARIANT conversion (the input is then expected to truly be VARIANT) and, on failure, either return false with a descriptive `error_message` or raise a conversion error that names the failing conversion and the target type, leaving an all-NULL result for unsupported targets. `TryFromShreddedCast` must claim success only when the input is a shredded vector and the shredded representation is unambiguously the target type for every row: either the shredded child's declared type equals the target, or the vector is fully shredded as a struct whose typed-value child's type equals the target and whose untyped-value child is constant NULL. It must decline (return false without modifying the result) when the input is not shredded, when the target type is nested, or when only part of the batch is shredded to the target, because aliasing a mismatched or partially-shredded child would produce incorrect values or nulls. On success it may alias the underlying shredded buffer, so the result must stay valid for the whole batch (referenced storage kept alive), preserve per-row validity including NULLs, and preserve the source's constant-vector character. The fast path and the general conversion must be observationally equivalent."} +{"repo": "duckdb/duckdb", "buggy_commit": "8aae2b52b605292ec77489e320b7b0ded1c64b19", "bug_issue": 25778, "solve_pr": 25838, "call_graph": {"nodes": [{"id": "extension/json/json_functions/json_serialize_plan.cpp::duckdb::JsonSerializePlanFunction"}, {"id": "src/main/capi/v2/capi_v2_prepared_statement.cpp::duckdb_v2_prepared_statement_create"}, {"id": "src/main/client_context.cpp::ClientContext::CreatePreparedStatement"}, {"id": "src/main/client_context.cpp::ClientContext::CreatePreparedStatementInternal"}, {"id": "src/main/client_context.cpp::ClientContext::ExtractPlan"}, {"id": "src/main/client_context.cpp::ClientContext::Prepare"}, {"id": "src/main/client_context.cpp::ClientContext::PrepareInternal"}, {"id": "src/main/client_context.cpp::ClientContext::Query"}, {"id": "src/main/client_context.cpp::ClientContext::RunInternalStatement"}, {"id": "src/main/client_context.cpp::ClientContext::RunStatementInternal"}, {"id": "src/main/client_context.cpp::ClientContext::Submit"}, {"id": "src/main/client_context.cpp::ClientContext::SubmitInternal"}, {"id": "src/main/client_context.cpp::ClientContext::SubmitInternalStatement"}, {"id": "src/main/client_context.cpp::ClientContext::SubmitStatement"}, {"id": "src/main/client_context.cpp::ClientContext::SubmitStatementInternal"}, {"id": "src/main/client_verify.cpp::ClientContext::StatementVerification"}, {"id": "src/main/connection.cpp::Connection::ExtractPlan"}, {"id": "src/main/connection.cpp::Connection::Prepare"}, {"id": "src/main/prepared_statement.cpp::PreparedStatement::Execute"}, {"id": "src/main/prepared_statement.cpp::PreparedStatement::Submit"}, {"id": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::FindCandidates"}, {"id": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::MaterializedCTEInfo::MaterializedCTEInfo"}, {"id": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::Optimize"}, {"id": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::PushFilterIntoCTE"}, {"id": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"id": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers"}, {"id": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::MaterializeDelimJoinAsCTE"}, {"id": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::Rewrite"}, {"id": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::RewriteDelimJoinsToCTEs"}], "edges": [{"source": "extension/json/json_functions/json_serialize_plan.cpp::duckdb::JsonSerializePlanFunction", "target": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"source": "src/main/capi/v2/capi_v2_prepared_statement.cpp::duckdb_v2_prepared_statement_create", "target": "src/main/client_context.cpp::ClientContext::Prepare"}, {"source": "src/main/client_context.cpp::ClientContext::CreatePreparedStatement", "target": "src/main/client_context.cpp::ClientContext::CreatePreparedStatementInternal"}, {"source": "src/main/client_context.cpp::ClientContext::CreatePreparedStatementInternal", "target": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"source": "src/main/client_context.cpp::ClientContext::ExtractPlan", "target": "src/optimizer/optimizer.cpp::Optimizer::Optimize"}, {"source": "src/main/client_context.cpp::ClientContext::Prepare", "target": "src/main/client_context.cpp::ClientContext::PrepareInternal"}, {"source": "src/main/client_context.cpp::ClientContext::PrepareInternal", "target": "src/main/client_context.cpp::ClientContext::RunStatementInternal"}, {"source": "src/main/client_context.cpp::ClientContext::Query", "target": "src/main/client_context.cpp::ClientContext::SubmitInternal"}, {"source": "src/main/client_context.cpp::ClientContext::RunInternalStatement", "target": "src/main/client_context.cpp::ClientContext::RunStatementInternal"}, {"source": "src/main/client_context.cpp::ClientContext::RunStatementInternal", "target": "src/main/client_context.cpp::ClientContext::SubmitInternal"}, {"source": "src/main/client_context.cpp::ClientContext::Submit", "target": "src/main/client_context.cpp::ClientContext::SubmitInternal"}, {"source": "src/main/client_context.cpp::ClientContext::SubmitInternal", "target": "src/main/client_context.cpp::ClientContext::SubmitStatement"}, {"source": "src/main/client_context.cpp::ClientContext::SubmitInternal", "target": "src/main/client_verify.cpp::ClientContext::StatementVerification"}, {"source": "src/main/client_context.cpp::ClientContext::SubmitInternalStatement", "target": "src/main/client_context.cpp::ClientContext::SubmitInternal"}, {"source": "src/main/client_context.cpp::ClientContext::SubmitStatement", "target": "src/main/client_context.cpp::ClientContext::SubmitStatementInternal"}, {"source": "src/main/client_context.cpp::ClientContext::SubmitStatementInternal", "target": "src/main/client_context.cpp::ClientContext::CreatePreparedStatement"}, {"source": "src/main/client_verify.cpp::ClientContext::StatementVerification", "target": "src/main/client_context.cpp::ClientContext::RunStatementInternal"}, {"source": "src/main/connection.cpp::Connection::ExtractPlan", "target": "src/main/client_context.cpp::ClientContext::ExtractPlan"}, {"source": "src/main/connection.cpp::Connection::Prepare", "target": "src/main/client_context.cpp::ClientContext::Prepare"}, {"source": "src/main/prepared_statement.cpp::PreparedStatement::Execute", "target": "src/main/client_context.cpp::ClientContext::RunInternalStatement"}, {"source": "src/main/prepared_statement.cpp::PreparedStatement::Submit", "target": "src/main/client_context.cpp::ClientContext::SubmitInternalStatement"}, {"source": "src/main/prepared_statement.cpp::PreparedStatement::Submit", "target": "src/main/prepared_statement.cpp::PreparedStatement::Submit"}, {"source": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::FindCandidates", "target": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::FindCandidates"}, {"source": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::Optimize", "target": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::FindCandidates"}, {"source": "src/optimizer/optimizer.cpp::Optimizer::Optimize", "target": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers"}, {"source": "src/optimizer/optimizer.cpp::Optimizer::RunBuiltInOptimizers", "target": "src/optimizer/cte_filter_pusher.cpp::CTEFilterPusher::Optimize"}, {"source": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::Rewrite", "target": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::RewriteDelimJoinsToCTEs"}, {"source": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::RewriteDelimJoinsToCTEs", "target": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::MaterializeDelimJoinAsCTE"}, {"source": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::RewriteDelimJoinsToCTEs", "target": "src/planner/subquery/delim_join_cte_rewriter.cpp::DelimJoinCTERewriter::RewriteDelimJoinsToCTEs"}]}, "graph_spec": "This scope covers the statement-preparation/execution lifecycle and the plan rewrites that keep materialized-CTE consumers equivalent. ClientContext Prepare/Submit/Query/RunInternal/SubmitInternalStatement accept exactly one statement, verify named parameters, and funnel through SubmitInternal → StatementVerification (only when verification is requested) → SubmitStatement → SubmitStatementInternal; they must report failures as QueryResult error objects (never corrupt the context) while preserving the user's original query text for errors. SubmitStatementInternal → CreatePreparedStatement → CreatePreparedStatementInternal must build the logical plan, run Optimizer::Optimize only when the plan requires it and the optimizer is enabled (otherwise performing only mandatory aggregate lowering), and always yield a non-null physical plan; ExtractPlan and json_serialize_plan(..., optimize=true) reuse the same Optimizer::Optimize on a freshly planned statement and then must produce a binding-resolvable, verifiable, serializable plan. Optimizer::Optimize delegates to RunBuiltInOptimizers, which applies expression rewriting, CTE inlining, filter pullup/pushdown, CTEFilterPusher::Optimize, then CTEFilterPusher::ClearDependencies, followed by later rewrites (regex-range, IN-clause, deliminator, join-order, etc.); the whole sequence must be semantics-preserving and leave a valid plan for every statement type that enters it, including plans that skip optimization. DelimJoinCTERewriter::Rewrite collects marker indexes, iteratively pushes eligible filters, then RewriteDelimJoinsToCTEs → MaterializeDelimJoinAsCTE rewrites fully decorrelated DELIM_JOIN/DELIM_GET into materialized CTEs with distinct row-scan and domain/dedup consumers and must leave no DELIM_JOIN or DELIM_GET in the result; a CTE whose input ordering can be restricted records a filter dependency pairing those two consumer table indexes, and that marker is valid only for the original generated consumers and is deliberately not serialized. CTEFilterPusher::FindCandidates must discover each LOGICAL_MATERIALIZED_CTE and, for every consumer, record filtered references (LOGICAL_FILTER directly over LOGICAL_CTE_REF) and unfiltered references, marking all_cte_refs_are_filtered false on any unfiltered ref; MaterializedCTEInfo must retain the CTE, its references, its filters, and whether a filter dependency exists. Optimize must process CTEs in insertion order (deepest first), re-discover candidates after each push because plan changes invalidate stored references, and may push only when either every reference is filtered, or the CTE has a filter dependency with exactly two references (one row scan, one domain scan) and exactly one filter, and that filter's CTE ref is the row-scan reference. PushFilterIntoCTE must combine the per-consumer filters with OR into a disjunction placed on the CTE definition, remap CTE-ref column bindings to the definition's bindings, split the predicates, and push them down; it must treat any unfiltered consumer as making its disjunct true, exclude conjuncts that are volatile, contain an expression barrier, or can throw while other conjuncts are not repeatable, and must push nothing at all when no reference retains a safe conjunct, so that shared-consumer results and error behavior are unchanged. ClearDependencies must reset the dependency after CTE filter pushdown so later rewrites that do not preserve consumer identity cannot rely on the original-consumer guarantee."} +{"repo": "duckdb/duckdb", "buggy_commit": "8aae2b52b605292ec77489e320b7b0ded1c64b19", "bug_issue": 25804, "solve_pr": 25839, "call_graph": {"nodes": [{"id": "src/optimizer/grouping_sets_optimizer.cpp::GroupingSetsOptimizer::TryExpandGroupingSets"}, {"id": "src/optimizer/multi_stage_aggregate_rewriter.cpp::CreateRewriteBranch"}, {"id": "src/optimizer/multi_stage_aggregate_rewriter.cpp::MultiStageAggregateRewriter::TryRewrite"}], "edges": []}, "graph_spec": "The scope covers a logical-plan rewrite that lowers a single LOGICAL_AGGREGATE_AND_GROUP_BY into an equivalent, multi-branch plan while keeping consumer-visible bindings, types, and semantics unchanged. TryExpandGroupingSets applies to an aggregate with at least two grouping sets and non-empty aggregate expressions, and must produce a UNION over one aggregation branch per grouping set, all reading a single shared materialized CTE of the original child input; each branch groups by exactly that set's columns in the original group order, substitutes typed NULL constants for group columns absent from the set, computes every original aggregate expression, and emits the correct GROUPING() bitmask for that set. The resulting union preserves the original column count and order (groups, then aggregates, then grouping functions), preserves the aggregate's estimated cardinality, and installs replacement bindings so downstream references to the original group/aggregate/grouping table indices and projection indices resolve to the union's outputs. CreateRewriteBranch must validate and realize one aggregate rewrite set: the plan must have a non-empty stage list, a valid result-stage index, at least one source per stage, topological ordering in which every stage source precedes its consumer, the input source consumed alone when used, and every stage must retain all original groups with unchanged return types while containing no unused stage; it rebinds stage groups, aggregates, and result expressions through the supplied input replacements, builds each stage as a LogicalAggregate over its sources, combines multiple sources with NOT-DISTINCT-FROM equality joins on the group columns (or cross products when there are no groups), materializes any input or stage output consumed more than once as a CTE, and returns a branch exposing its result expressions over the output bindings. MultiStageAggregateRewriter::TryRewrite is the entry point: it only rewrites a one-child aggregate whose expressions are all bound aggregates and whose grouping-set state is either absent or exactly one complete grouping set containing every group; it partitions aggregate expressions into DISTINCT, rewrite, and regular branches, merges rewrites that can share a plan, deduplicates/orders DISTINCT sets, shares the pinned input through a materialized CTE when more than one branch is needed, joins branch outputs on the group columns, and constructs the final projection that reproduces the original grouping-function values (zero for a complete single grouping set) and remaps the original group/aggregate/grouping bindings with matching types and estimated cardinality, returning whether a rewrite was performed."} +{"repo": "duckdb/duckdb", "buggy_commit": "8aae2b52b605292ec77489e320b7b0ded1c64b19", "bug_issue": 25829, "solve_pr": 25837, "call_graph": {"nodes": [{"id": "src/function/scalar/operator/multiply.cpp::MultiplyOperator::Operation"}, {"id": "src/function/scalar/operator/multiply.cpp::TryMultiplyOperator::Operation"}], "edges": [{"source": "src/function/scalar/operator/multiply.cpp::MultiplyOperator::Operation", "target": "src/function/scalar/operator/multiply.cpp::TryMultiplyOperator::Operation"}]}, "graph_spec": "Within `src/function/scalar/operator/multiply.cpp`, the scope covers the two coordinated multiply entry points, `MultiplyOperator::Operation` and `TryMultiplyOperator::Operation`, over all their supported type specializations (signed/unsigned integers of every width, hugeint/uhugeint, interval scaled by integer or double, and floating point). `TryMultiplyOperator::Operation` must be total and non-throwing: for any supported operands it returns true exactly when the exact mathematical product is representable in the output type, in which case `result` holds that exact product, and returns false otherwise without wrapping, truncating, or raising, leaving `result` unspecified on failure. `MultiplyOperator::Operation` must compute that same exact product when it is representable and must raise `OutOfRangeException` whenever it is not, so the two forms agree on both the value and the representability verdict and never silently yield a wrapped or truncated result. The directed dependency encodes this agreement: the interval×double specializations of `MultiplyOperator::Operation` delegate to `TryMultiplyOperator::Operation` and raise `OutOfRangeException` precisely when it reports failure, while the checked integer specializations form their products in a wider type through `MultiplyOperator::Operation` so the subsequent range test is applied to an exact, non-wrapping intermediate. Boundary inputs that must be classified consistently include zero, one, the most-negative signed values, operands near each type's numeric limits, and floating-point NaN/infinity cases; interval results must additionally keep months, days, and micros each within their component ranges and preserve the fractional cascade between units, reporting any overflow through the same false/throw convention."} +{"repo": "duckdb/duckdb", "buggy_commit": "ae9f5159992765b1107b908eaaee139c8a3a175a", "bug_issue": 25872, "solve_pr": 25904, "call_graph": {"nodes": [{"id": "extension/parquet/reader/variant_column_reader.cpp::VariantColumnReader::Read"}, {"id": "src/function/scalar/variant/variant_extract.cpp::TryShreddedExtractRecursive"}, {"id": "src/function/scalar/variant/variant_extract.cpp::VariantUtils::VariantExtract"}, {"id": "src/function/scalar/variant/variant_extract.cpp::duckdb::TryFromShreddedExtract"}, {"id": "src/function/scalar/variant/variant_extract.cpp::duckdb::VariantExtractFunction"}, {"id": "src/storage/table/variant_column_data.cpp::VariantColumnData::ScanWithCallback"}], "edges": [{"source": "extension/parquet/reader/variant_column_reader.cpp::VariantColumnReader::Read", "target": "src/function/scalar/variant/variant_extract.cpp::VariantUtils::VariantExtract"}, {"source": "src/function/scalar/variant/variant_extract.cpp::TryShreddedExtractRecursive", "target": "src/function/scalar/variant/variant_extract.cpp::TryShreddedExtractRecursive"}, {"source": "src/function/scalar/variant/variant_extract.cpp::VariantUtils::VariantExtract", "target": "src/function/scalar/variant/variant_extract.cpp::duckdb::TryFromShreddedExtract"}, {"source": "src/function/scalar/variant/variant_extract.cpp::duckdb::TryFromShreddedExtract", "target": "src/function/scalar/variant/variant_extract.cpp::TryShreddedExtractRecursive"}, {"source": "src/function/scalar/variant/variant_extract.cpp::duckdb::VariantExtractFunction", "target": "src/function/scalar/variant/variant_extract.cpp::VariantUtils::VariantExtract"}, {"source": "src/storage/table/variant_column_data.cpp::VariantColumnData::ScanWithCallback", "target": "src/function/scalar/variant/variant_extract.cpp::VariantUtils::VariantExtract"}]}, "graph_spec": "This scope covers extracting a single path component from a VARIANT value and must preserve these obligations across all six entry points. Semantics: `VariantExtractFunction` exposes `variant_extract(variant, path)` where the path argument is constant VARCHAR or integral; integral indexes are 1-based (index 0 is rejected), a key lookup applies only to an OBJECT and an index lookup only to an ARRAY, and a missing key, wrong container kind, out-of-range index, or NULL input row must yield NULL rather than an error. Result fidelity: every route (shredded fast path, generic fallback, storage scan, and Parquet read) must return the same value and NULL placement as a plain full read followed by extraction, one output value per input row. `TryFromShreddedExtract` may take the shredded path only when the input is a SHREDDED_VECTOR that is fully shredded; otherwise `VariantUtils::VariantExtract` must fall back to the generic recursive-format extraction rather than producing partial output. `TryShreddedExtractRecursive` may descend only through non-empty STRUCT wrappers whose first entry is a STRUCT `typed_value`, matching each BY_KEY component against the child key names; it must decline (return false) on non-STRUCT inputs, empty/primitive/array typed values, non-BY_KEY components, keys not found, and nested leaf types, and may only succeed at the end of a path for a non-nested leaf, when it establishes a shredded vector whose unshredded portion is NULL. Zero-copy: the extracted result may reference the input's keys/children/data only when no row is NULL; if any row is NULL the result must be copied before nulls are applied so the caller's input is never mutated, and the result size must be set with each row's index 0 remapped to the extracted sub-value. `VariantColumnData::ScanWithCallback` for a pushdown-extract storage index must either read the fully shredded leaf directly (only when `CreateScanStates` verified the field exists and is fully shredded for this row group) or unshred the full variant and then extract, returning the scanned row count and a result identical to the full-read-plus-extract path. `VariantColumnReader::Read` must likewise replace its reconstructed variant with the extract of the requested path when pushdown extraction is active. Overall, NULL rows remain NULL, invalid paths resolve to NULL, and the shredded and unshredded representations must be observationally interchangeable."} +{"repo": "duckdb/duckdb", "buggy_commit": "bdd42afc245c278198fa94cddec7087e77acf7c0", "bug_issue": 25873, "solve_pr": 25954, "call_graph": {"nodes": [{"id": "src/function/cast/variant/from_variant.cpp::CastVariantToJSON"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::CastFromVARIANT"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToStruct"}, {"id": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToTuple"}], "edges": [{"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastFromVARIANT", "target": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant", "target": "src/function/cast/variant/from_variant.cpp::CastVariantToJSON"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant", "target": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToTuple"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToStruct", "target": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}, {"source": "src/function/cast/variant/from_variant.cpp::duckdb::ConvertVariantToTuple", "target": "src/function/cast/variant/from_variant.cpp::duckdb::CastVariant"}]}, "graph_spec": "This scope implements the VARIANT-to-target cast (`CastFromVARIANT`) and its recursive conversion dispatch (`CastVariant`), including the special-case conversions `ConvertVariantToStruct`, `ConvertVariantToTuple`, and `CastVariantToJSON`. Correctness obligations: (1) `CastFromVARIANT` must accept a VARIANT input vector and populate the result vector for `count` rows; when the input is fully shredded on a compatible non-nested type it may reference the shredded data directly, otherwise it falls back to recursive conversion, propagates CONSTANT vector type to the result, and on overall failure either reports through `parameters.error_message` or throws a `ConversionException`. (2) `CastVariant` must dispatch by target `LogicalTypeId`, recursively casting nested children, and use value-level cast fallback for nested targets; when a target cannot be handled it must mark all affected rows NULL and return failure. (3) All conversions must honor the `sel`, `offset`, `count`, and optional `row` addressing: NULL variant rows stay SQL NULL (validity is preserved and pre-existing result invalidity is respected), and when `row` is valid every output row reads from that single variant row. (4) `ConvertVariantToStruct` must read a variant OBJECT, look up each struct child by its key name, fail with a descriptive error if a required key is absent, and recursively cast each found child. (5) `ConvertVariantToTuple` must read a variant ARRAY and assign elements positionally, failing if an element at a required index is missing. (6) `CastVariantToJSON` must serialize each non-NULL variant into a JSON string, write SQL NULL for NULL rows rather than the JSON token null, and must truncate its writer and return false (rather than throw) when serialization fails so TRY_CAST semantics are preserved. (7) On conversion failure the conversion data's error string must describe the offending VARIANT type and/or missing key or index, and string/blob results must keep their non-inlined data owned by the result vector."} +{"repo": "duckdb/duckdb", "buggy_commit": "4600457765b19bf1e91d3a86df82f3fc86038d97", "bug_issue": 25882, "solve_pr": 25893, "call_graph": {"nodes": [{"id": "src/function/table/direct_file_reader.cpp::DirectFileReader::Scan"}], "edges": []}, "graph_spec": "DirectFileReader::Scan is the single-row-per-file scan routine backing read_blob/read_text. It runs only for the file currently claimed by the multi-file harness (file_list_idx), and each call that has a file to produce must materialize exactly one output row (output cardinality one) for that file and then move into a terminal state; it reports HAVE_MORE_OUTPUT and any subsequent call, or a call whose file index is no longer below the global file list's total count, must write nothing and report FINISHED. Files that cannot be materialized are skipped silently rather than raising: when metadata is required but GetStatsIfExists returns nothing, and when a remotely listed file fails its existence check, the reader becomes done and returns FINISHED with no row. The routine must not touch the filesystem more than the projected columns require: it opens a handle (remote paths using direct I/O and remote-only caching, also carrying metadata) when content or remote metadata is requested, otherwise it relies on local stats, so a file handle and a file-metadata source are alternatives feeding size and last-modified. Only columns present in the global state's column_ids are written, ROW_ID is skipped, and values are placed at their projected output positions: filename from the path; content as the full file contents read in bounded chunks, looping until the declared size is consumed or until EOF for pipes/zero-length files, reusing the shared stream buffer, rejecting files exceeding the 32-bit size limit, and for VARCHAR (read_text) rejecting content that is not valid UTF-8 while BLOB (read_blob) accepts arbitrary bytes; size as a 64-bit value; last modified as a timestamp that becomes NULL when the filesystem cannot convert it. When a filesystem reports an operation as not implemented, that column is set to NULL and the scan continues instead of failing."} +{"repo": "duckdb/duckdb", "buggy_commit": "6889e6a57017bddb7633b8b5c5a85e683ba972d6", "bug_issue": 26001, "solve_pr": 26033, "call_graph": {"nodes": [{"id": "src/execution/operator/scan/physical_table_scan.cpp::TableScanGlobalSourceState::TableScanGlobalSourceState"}], "edges": []}, "graph_spec": "Constructing `TableScanGlobalSourceState` must fully prepare a table scan's shared, per-operator execution state. It must record the configured table-scan execution strategy taken from the client session so the scan is driven with the requested strategy. It must establish the effective filter set the scan will use: when the operator carries dynamic, join-derived filters, those are merged with the operator's statically pushed-down filters into one owned `TableFilterSet` (ordered so this combined set outlives the table function's global state, which references it during teardown), a combination that yields no filters is treated as no filtering, and otherwise the operator's own filters are used; this effective set is what both the function's initialization and subsequent local-source initialization must observe. If the table function defines `init_global`, the state must invoke it with the scan's bind data, column ids, projection ids, effective filters, sample options, and the originating operator, then adopt the returned global state's `MaxThreads` as the scan's thread limit; if `init_global` is absent the scan must report single-threaded execution (`max_threads == 1`), and a function that produces no global state must likewise remain non-parallel. For in-out table functions, the state must additionally allocate a shared input chunk typed by the operator's parameters, with each parameter referenced as a single-row value, so the in-out function is fed its arguments. `MaxThreads()` must report the resolved limit, and `GetTableFilters` must expose the effective combined filters when present, falling back to the operator's static filters, so local source states initialize against the same filtering the global state used."} +{"repo": "duckdb/duckdb", "buggy_commit": "feab3c8e2bfe35fce1f08aa2289f0ab3df9898ef", "bug_issue": 26048, "solve_pr": 26131, "call_graph": {"nodes": [{"id": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::ReadSingleCSVFileBind"}, {"id": "src/execution/operator/csv_scanner/util/csv_reader_options.cpp::CSVReaderOptions::Verify"}], "edges": [{"source": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::ReadSingleCSVFileBind", "target": "src/execution/operator/csv_scanner/util/csv_reader_options.cpp::CSVReaderOptions::Verify"}]}, "graph_spec": "The scope binds a single-file CSV scan and validates the resulting reader options. `ReadSingleCSVFileBind` must reject a NULL file-name argument, resolve exactly one target file (no globbing/expansion), parse every named parameter into `CSVReaderOptions` using the CSV option vocabulary, aliases, and user-set flags, and derive `MultiFileOptions` from the enclosing scan (defaults when none is supplied). When the enclosing scan already knows the schema, it must seed the options from that scan's bind data—or, for COPY, from the target columns—so the file's dialect is reconciled rather than re-detected; otherwise it must obtain the schema by sniffing/schema discovery, or require the `columns` option, and must fail when the resulting name and type counts disagree. Immediately after the options and file options are final it must call `CSVReaderOptions::Verify` exactly once, before schema reconciliation and force-not-null checks against the file. `Verify` must be a deterministic consistency check plus dependent-default normalization over the options it receives and the scan's `union_by_name`: it enforces that `rejects_table`/`rejects_scan` may not be combined with an explicit `store_rejects=false`; that naming a rejects target or table implies `store_rejects` and `ignore_errors` (erroring on an explicit `ignore_errors=false`); that rejects are incompatible with `union_by_name`; that `rejects_limit > 0` requires rejects to be enabled; and that `buffer_size >= maximum_line_size`, raising `buffer_size` to accommodate a user-specified `maximum_line_size` above the default and reporting overflow, while never treating an auto-adjusted value as user-set. All violations must surface as binder errors at bind time."} +{"repo": "duckdb/duckdb", "buggy_commit": "eb620c77f811ba00b7ff4febc4ac8dc9bef9b451", "bug_issue": 26049, "solve_pr": 26100, "call_graph": {"nodes": [{"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddPossiblyEscapedValue"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddQuotedValue"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddRow"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddValue"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::UnsetComment"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::FinalizeChunkProcess"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::FinishBoundaryScan"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::FinishMoveToNextBuffer"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessExtraRow"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessOverBufferValue"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessRemainingBuffers"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ResumeParse"}, {"id": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::TryMoveToNextBuffer"}], "edges": [{"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddQuotedValue", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddPossiblyEscapedValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddRow", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddPossiblyEscapedValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddRow", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddQuotedValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddValue", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddPossiblyEscapedValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddValue", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddQuotedValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::UnsetComment", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddRow"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::FinalizeChunkProcess", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::TryMoveToNextBuffer"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::FinishBoundaryScan", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessExtraRow"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::FinishBoundaryScan", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::TryMoveToNextBuffer"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::FinishMoveToNextBuffer", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessOverBufferValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessExtraRow", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddRow"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessExtraRow", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessExtraRow", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::UnsetComment"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessOverBufferValue", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessOverBufferValue", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::UnsetComment"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ProcessRemainingBuffers", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::TryMoveToNextBuffer"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::ResumeParse", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::TryMoveToNextBuffer"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::TryMoveToNextBuffer", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddRow"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::TryMoveToNextBuffer", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::AddValue"}, {"source": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueScanner::TryMoveToNextBuffer", "target": "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp::StringValueResult::UnsetComment"}]}, "graph_spec": "This scope realizes DuckDB's string-typed CSV scanning of a single (possibly boundary-limited) buffer region and the ordered handoff of parsed fields into the result vectors. StringValueResult::AddValue terminates the field at a delimiter and dispatches by scanning mode: a quoted field goes to AddQuotedValue, an escaped field to AddPossiblyEscapedValue, and any other field directly to AddValueToVector; it must ignore replayed positions where the pending start is already past the delimiter and always advance the pending start past the delimiter (accounting for multi-byte delimiters and CARRY_ON newlines). AddQuotedValue must record an unterminated-quote error when the quoted region never closed, and, when empty-value stripping is enabled, trim trailing spaces and compute the content length before delegating; AddPossiblyEscapedValue must, for escaped content, drop projected-out columns, enforce strict-mode over-column checks, emit a cast error for non-varchar targets, and otherwise remove escape characters, and for unescaped content write either the raw slice or, for an empty value, a zero-length string, clearing the escaped flag in all paths. AddValueToVector must write into the chunk while enforcing column-count limits: strict mode records a too-many-columns error (with the null-over-value exception) and non-strict mode flags strictness bypass and skips. AddRow must first flush the pending value using the same mode dispatch, then advance the pending start past the record terminator (one byte normally, two for CARRY_ON), then invoke AddRowInternal; AddRowInternal must track the line span, flag maximum-line-size violations, emit too-few-columns errors unless null padding is on, on error mark borked rows so unwritten columns are invalidated (never left valid-but-uninitialized), null-pad missing columns when enabled, reset per-row column counters, and increment number_of_rows, reporting a full chunk at result_size. UnsetComment must, when a comment ends a line, add the row only if it contained non-space content before the comment marker or already had parsed columns, mark the first line as a comment when no rows exist, clear the comment flag, and reset the line/column state past the terminator. The scanner must maintain these invariants across buffer transitions: TryMoveToNextBuffer must report NOT_MOVED while the current buffer has unread bytes, suspend (NOT_IN_MEMORY) instead of blocking when the next buffer is not resident and suspension is allowed, otherwise release the out-of-scope prior buffer, install the next buffer via FinishMoveToNextBuffer, and, at end of file, finalize the trailing row/value depending on the current state while treating an unterminated quote in strict mode as an error; FinishMoveToNextBuffer must rotate the handles, advance the buffer index, reset the position, and process any value straddling the boundary; ProcessOverBufferValue must reassemble exactly the bytes belonging to one logical value/row, tracking quoted/escaped/comment state, consume newline runs that span the boundary exactly once, flush the row/value through AddRow/AddValue/UnsetComment, set added_last_line at the final buffer, and clear quoted/escaped. ProcessExtraRow must classify the tail of a line (record separators, carriage returns, delimiters, quotes, escapes, comments, quoted newlines) and route to AddValue, AddRow, UnsetComment, EmptyLine, or InvalidState, including empty-line handling when the schema has a single column. ResumeParse must clear suspension and either finish a boundary scan according to the move result or drain remaining buffers; FinalizeChunkProcess must return once the chunk is full or the iterator is done, else mark the iterator done (unless unterminated-quote/invalid-state errors exist) and continue via boundary finalization or ProcessRemainingBuffers, suspending on NOT_IN_MEMORY; FinishBoundaryScan must process the trailing row of the current buffer, flush the final buffer, detect unterminated quotes (strict error vs. flagged unstrictness), and mark the iterator done at the region end; ProcessRemainingBuffers must loop moving and processing buffers until the file is exhausted or the chunk is full, suspend on NOT_IN_MEMORY, apply null-padding tail fill, and set iterator.done. Collectively, the obligation is that every physical record split across buffers or terminated by any supported newline style yields exactly one logical row of values with correct column counts, comment lines are excluded without consuming data rows, and the reported row/column counts, validity, and errors remain consistent with the strict/null-padding/invalid-state options."} +{"repo": "duckdb/duckdb", "buggy_commit": "795e1c1090a52bbac5d2d3b298bd26670d85122b", "bug_issue": 26052, "solve_pr": 26074, "call_graph": {"nodes": [{"id": "src/function/scalar/string/like.cpp::ILikeOperatorASCII::Operation"}, {"id": "src/function/scalar/string/like.cpp::NotILikeOperatorASCII::Operation"}, {"id": "src/function/scalar/string/like.cpp::duckdb::LikeOperatorFunction"}, {"id": "src/function/scalar/string/like.cpp::duckdb::TemplatedLikeOperator"}], "edges": [{"source": "src/function/scalar/string/like.cpp::ILikeOperatorASCII::Operation", "target": "src/function/scalar/string/like.cpp::duckdb::TemplatedLikeOperator"}, {"source": "src/function/scalar/string/like.cpp::NotILikeOperatorASCII::Operation", "target": "src/function/scalar/string/like.cpp::ILikeOperatorASCII::Operation"}, {"source": "src/function/scalar/string/like.cpp::duckdb::LikeOperatorFunction", "target": "src/function/scalar/string/like.cpp::duckdb::TemplatedLikeOperator"}, {"source": "src/function/scalar/string/like.cpp::duckdb::TemplatedLikeOperator", "target": "src/function/scalar/string/like.cpp::duckdb::TemplatedLikeOperator"}]}, "graph_spec": "Scope: the SQL LIKE/ILIKE core matcher in src/function/scalar/string/like.cpp. Obligations: (1) `LikeOperatorFunction` is the entry for LIKE/`~~`; each overload must delegate to `TemplatedLikeOperator` instantiated with `%`/`_`, enabling escape handling only for the escape overload and disabling it otherwise (escape char `'\\0'` meaning none). (2) `TemplatedLikeOperator` must implement whole-string matching: return true only when the entire reader-folded subject is consumed by the entire pattern; `%` matches any sequence including empty and consecutive `%` collapse; `_` matches exactly one reader-advanced character; all other characters must match literally after reader folding; a trailing unescaped `%` must match an empty suffix. When escape handling is on, the escape character must make the next pattern character literal and a pattern ending in the escape character must raise an error rather than match. On mismatch after a `%`, matching must backtrack by resuming from the position recorded after the last `%` with the subject start advanced by one character (the retry/self-reference edge), terminating and remaining equivalent to exhaustive backtracking search. (3) `ILikeOperatorASCII::Operation` must delegate to `TemplatedLikeOperator` with the ASCII-lowercasing reader, no escape, and `%`/`_` semantics, yielding byte-wise ASCII case-insensitive matching on subject and pattern. (4) `NotILikeOperatorASCII::Operation` must return the logical complement of `ILikeOperatorASCII::Operation`. Across these nodes, NULL inputs must propagate as NULL, valid inputs must never raise spurious errors, and the ASCII callbacks must agree with the general case-insensitive LIKE path on all ASCII-only inputs."} +{"repo": "duckdb/duckdb", "buggy_commit": "feab3c8e2bfe35fce1f08aa2289f0ab3df9898ef", "bug_issue": 26065, "solve_pr": 26130, "call_graph": {"nodes": [{"id": "extension/parquet/writer/variant/convert_variant.cpp::duckdb::ToParquetVariantFunction"}, {"id": "src/common/arrow/arrow_type_extension.cpp::ArrowVariant::DuckToArrow"}, {"id": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantConversion::ToParquetVariant"}, {"id": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantShredding::WriteVariantValues"}, {"id": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::AnalyzeValueData"}, {"id": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::CreateValues"}, {"id": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::WritePrimitiveValueData"}, {"id": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::WriteValueData"}, {"id": "src/execution/expression_executor.cpp::ExpressionExecutor::Execute"}, {"id": "src/execution/expression_executor.cpp::ExpressionExecutor::Verify"}, {"id": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedArrayValues"}, {"id": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedObjectValues"}, {"id": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedValues"}, {"id": "src/storage/table/variant/variant_shredding.cpp::DuckDBVariantShredding::WriteVariantValues"}, {"id": "src/storage/table/variant/variant_shredding.cpp::VariantColumnData::DebugShred"}, {"id": "src/storage/table/variant/variant_shredding.cpp::VariantColumnData::ShredVariantData"}, {"id": "src/storage/table/variant_column_data.cpp::VariantColumnData::Checkpoint"}, {"id": "src/storage/table/variant_column_data.cpp::VariantColumnData::WriteShreddedData"}, {"id": "src/storage/table/variant_column_data.cpp::duckdb::AppendShredded"}], "edges": [{"source": "extension/parquet/writer/variant/convert_variant.cpp::duckdb::ToParquetVariantFunction", "target": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantConversion::ToParquetVariant"}, {"source": "src/common/arrow/arrow_type_extension.cpp::ArrowVariant::DuckToArrow", "target": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantConversion::ToParquetVariant"}, {"source": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantConversion::ToParquetVariant", "target": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantShredding::WriteVariantValues"}, {"source": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantShredding::WriteVariantValues", "target": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::CreateValues"}, {"source": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantShredding::WriteVariantValues", "target": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedValues"}, {"source": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::AnalyzeValueData", "target": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::AnalyzeValueData"}, {"source": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::CreateValues", "target": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::AnalyzeValueData"}, {"source": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::CreateValues", "target": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::WriteValueData"}, {"source": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::WriteValueData", "target": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::WritePrimitiveValueData"}, {"source": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::WriteValueData", "target": "src/common/types/variant/parquet_variant_encoding.cpp::duckdb::WriteValueData"}, {"source": "src/execution/expression_executor.cpp::ExpressionExecutor::Execute", "target": "src/execution/expression_executor.cpp::ExpressionExecutor::Execute"}, {"source": "src/execution/expression_executor.cpp::ExpressionExecutor::Execute", "target": "src/execution/expression_executor.cpp::ExpressionExecutor::Verify"}, {"source": "src/execution/expression_executor.cpp::ExpressionExecutor::Verify", "target": "src/storage/table/variant/variant_shredding.cpp::VariantColumnData::DebugShred"}, {"source": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedArrayValues", "target": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantShredding::WriteVariantValues"}, {"source": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedObjectValues", "target": "src/common/types/variant/parquet_variant_encoding.cpp::ParquetVariantShredding::WriteVariantValues"}, {"source": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedValues", "target": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedArrayValues"}, {"source": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedValues", "target": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedObjectValues"}, {"source": "src/storage/table/variant/variant_shredding.cpp::DuckDBVariantShredding::WriteVariantValues", "target": "src/function/variant/variant_shredding.cpp::VariantShredding::WriteTypedValues"}, {"source": "src/storage/table/variant/variant_shredding.cpp::VariantColumnData::DebugShred", "target": "src/storage/table/variant/variant_shredding.cpp::VariantColumnData::ShredVariantData"}, {"source": "src/storage/table/variant/variant_shredding.cpp::VariantColumnData::ShredVariantData", "target": "src/storage/table/variant/variant_shredding.cpp::DuckDBVariantShredding::WriteVariantValues"}, {"source": "src/storage/table/variant_column_data.cpp::VariantColumnData::Checkpoint", "target": "src/storage/table/variant_column_data.cpp::VariantColumnData::Checkpoint"}, {"source": "src/storage/table/variant_column_data.cpp::VariantColumnData::Checkpoint", "target": "src/storage/table/variant_column_data.cpp::VariantColumnData::WriteShreddedData"}, {"source": "src/storage/table/variant_column_data.cpp::VariantColumnData::WriteShreddedData", "target": "src/storage/table/variant_column_data.cpp::duckdb::AppendShredded"}, {"source": "src/storage/table/variant_column_data.cpp::duckdb::AppendShredded", "target": "src/storage/table/variant/variant_shredding.cpp::VariantColumnData::ShredVariantData"}]}, "graph_spec": "The scope converts DuckDB VARIANT values into the Parquet/Arrow VARIANT encoding and into shredded column storage, and every path must be lossless and byte-consistent. ToParquetVariant splits each row into a metadata blob (a version-1 dictionary of the row's key strings, with offsets sized to the largest value, total dictionary length bounded by uint32) and a value blob; optional SQL NULLs remain top-level NULLs, and ArrowVariant::DuckToArrow exposes the same struct storage while taking top-level nullness from the source validity rather than from an encoded variant-null. Value encoding is two-phase: AnalyzeValueData computes the exact blob length and a nested offset table, and WriteValueData must emit exactly that layout in the same traversal order, finishing at the analyzed length and consuming the offset index identically. Object field ids and offsets use byte widths derived from the highest key index and the total child offset, switching to the large form above 255 elements; arrays encode child offsets the same way; primitives carry their type in the header; strings under 64 bytes are inlined while longer strings and all BLOBs get a 4-byte length prefix. Shredding diverts a value into the typed component only when its logical type belongs to the declared shredding set (DECIMAL additionally requires an identical physical type); object fields whose names match the shredded schema are omitted from the residual untyped value, partially shredded objects retain only their unmatched fields, fully shredded objects and shredded non-object values yield a NULL untyped value, and every non-matching value stays untyped. Rows written to typed_value must be exactly those recorded in the shredding selection, with all other rows set NULL, and missing shredded fields must be NULL with a zero untyped index. Storage uses the same shredding logic: ShredVariantData produces STRUCT(unshredded, typed_value) and normalizes the residual variant; checkpointing decides whether to shred (only when enabled, above the minimum size, and when a shreddable type is derivable), rescans the source column, and appends both components, while the debug path derives the schema from the first value with a forced overlay so later values may partially shred, doing nothing when the vector is already shredded, empty, or not shreddable. ExpressionExecutor::Verify may invoke this debug shredding and then re-verifies the vector. Across all entry points, unshredding and normalizing the result must reproduce the original values."} +{"repo": "duckdb/duckdb", "buggy_commit": "209e98f4f2e3142b73f574d01b4440606d9bf5d8", "bug_issue": 26069, "solve_pr": 26168, "call_graph": {"nodes": [{"id": "src/catalog/catalog_entry/sequence_catalog_entry.cpp::SequenceCatalogEntry::NextValue"}, {"id": "src/catalog/catalog_entry/sequence_catalog_entry.cpp::SequenceCatalogEntry::SetValue"}, {"id": "src/function/scalar/sequence/nextval.cpp::NextSequenceValueOperator::Operation"}, {"id": "src/function/scalar/sequence/nextval.cpp::SetValValueOperator::Operation"}], "edges": [{"source": "src/catalog/catalog_entry/sequence_catalog_entry.cpp::SequenceCatalogEntry::SetValue", "target": "src/catalog/catalog_entry/sequence_catalog_entry.cpp::SequenceCatalogEntry::NextValue"}, {"source": "src/function/scalar/sequence/nextval.cpp::NextSequenceValueOperator::Operation", "target": "src/catalog/catalog_entry/sequence_catalog_entry.cpp::SequenceCatalogEntry::NextValue"}, {"source": "src/function/scalar/sequence/nextval.cpp::SetValValueOperator::Operation", "target": "src/catalog/catalog_entry/sequence_catalog_entry.cpp::SequenceCatalogEntry::SetValue"}]}, "graph_spec": "Within this scope, sequence state (counter, last_value, usage_count) is mutated only while holding the entry's mutex, so concurrent nextval/setval calls observe a serialized, gap-free progression. SequenceCatalogEntry::NextValue returns the entry's current counter as the produced value and then advances the counter by increment; it must detect arithmetic overflow of that advance and, when cycle is enabled, wrap the next counter to the opposite bound (max_value when the increment would move below min_value and vice versa), while with cycle disabled it must raise a sequence error whenever the produced value or the advance would leave [min_value, max_value] instead of returning an out-of-range value. Every successful NextValue records the produced value as the sequence's most recently returned value (so currval can report it), increments usage_count, and, for non-temporary sequences, publishes the new {usage_count, counter} state to the enclosing DuckTransaction. SequenceCatalogEntry::SetValue rejects any value outside [min_value, max_value] with a sequence error before mutating state, then positions the counter at value; with is_called = false the counter stays at value and the call returns value so the next nextval yields value, whereas with is_called = true the call must behave as though nextval had just produced value — returning value and advancing the counter by increment so the following nextval yields value + increment, carrying the same overflow/bounds and usage-tracking bookkeeping as NextValue. The scalar operators are thin per-row forwarders: nextval delegates to NextValue and setval forwards (value, is_called) to SetValue, preserving NULL propagation (NULL value or is_called yields NULL) and the default is_called = true when the third argument is absent."} +{"repo": "duckdb/duckdb", "buggy_commit": "d8a1bd4f4fbccdf3d22d8f1fe27a94c11c805d0a", "bug_issue": 26207, "solve_pr": 26208, "call_graph": {"nodes": [{"id": "src/common/types/value.cpp::Value::operator<"}, {"id": "src/common/types/value.cpp::Value::operator<="}, {"id": "src/common/types/value.cpp::Value::operator>"}, {"id": "src/common/types/value.cpp::Value::operator>="}, {"id": "src/common/value_operations/comparison_operations.cpp::Final::GreaterThan>"}, {"id": "src/common/value_operations/comparison_operations.cpp::TemplatedBooleanOperation"}, {"id": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctGreaterThan"}, {"id": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctGreaterThanEquals"}, {"id": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctLessThan"}, {"id": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctLessThanEquals"}, {"id": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThan"}, {"id": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThanEquals"}, {"id": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThan"}, {"id": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThanEquals"}, {"id": "src/execution/operator/persistent/physical_copy_to_file.cpp::VectorOfValuesLess::operator()"}, {"id": "src/function/table/table_scan.cpp::duckdb::ExtractFilterExpressions"}, {"id": "src/function/table/table_scan.cpp::duckdb::ExtractValuesFromExpression"}, {"id": "src/function/table/table_scan.cpp::duckdb::TableScanInitGlobal"}, {"id": "src/function/table/table_scan.cpp::duckdb::TryScanIndex"}, {"id": "src/function/table/table_scan.cpp::duckdb::ValueQualifies"}, {"id": "src/planner/filter/table_filter_dynamic_function.cpp::DynamicFilterData::CompareValue"}, {"id": "src/planner/filter/table_filter_dynamic_function.cpp::duckdb::DynamicFilterSelect"}, {"id": "src/planner/filter/table_filter_dynamic_function.cpp::duckdb::SelectDynamicFilter"}], "edges": [{"source": "src/common/types/value.cpp::Value::operator<", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThan"}, {"source": "src/common/types/value.cpp::Value::operator<=", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThanEquals"}, {"source": "src/common/types/value.cpp::Value::operator>", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThan"}, {"source": "src/common/types/value.cpp::Value::operator>=", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThanEquals"}, {"source": "src/common/value_operations/comparison_operations.cpp::Final::GreaterThan>", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctGreaterThan"}, {"source": "src/common/value_operations/comparison_operations.cpp::TemplatedBooleanOperation", "target": "src/common/value_operations/comparison_operations.cpp::TemplatedBooleanOperation"}, {"source": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctGreaterThan", "target": "src/common/value_operations/comparison_operations.cpp::TemplatedBooleanOperation"}, {"source": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctGreaterThanEquals", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctGreaterThan"}, {"source": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctLessThan", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctGreaterThan"}, {"source": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctLessThanEquals", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctGreaterThan"}, {"source": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThan", "target": "src/common/value_operations/comparison_operations.cpp::TemplatedBooleanOperation"}, {"source": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThanEquals", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThan"}, {"source": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThan", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThan"}, {"source": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThanEquals", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThan"}, {"source": "src/execution/operator/persistent/physical_copy_to_file.cpp::VectorOfValuesLess::operator()", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::DistinctLessThan"}, {"source": "src/function/table/table_scan.cpp::duckdb::ExtractFilterExpressions", "target": "src/function/table/table_scan.cpp::duckdb::ExtractValuesFromExpression"}, {"source": "src/function/table/table_scan.cpp::duckdb::ExtractValuesFromExpression", "target": "src/function/table/table_scan.cpp::duckdb::ValueQualifies"}, {"source": "src/function/table/table_scan.cpp::duckdb::TableScanInitGlobal", "target": "src/function/table/table_scan.cpp::duckdb::TryScanIndex"}, {"source": "src/function/table/table_scan.cpp::duckdb::TryScanIndex", "target": "src/function/table/table_scan.cpp::duckdb::ExtractFilterExpressions"}, {"source": "src/function/table/table_scan.cpp::duckdb::ValueQualifies", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThan"}, {"source": "src/function/table/table_scan.cpp::duckdb::ValueQualifies", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThanEquals"}, {"source": "src/function/table/table_scan.cpp::duckdb::ValueQualifies", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThan"}, {"source": "src/function/table/table_scan.cpp::duckdb::ValueQualifies", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThanEquals"}, {"source": "src/planner/filter/table_filter_dynamic_function.cpp::DynamicFilterData::CompareValue", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThan"}, {"source": "src/planner/filter/table_filter_dynamic_function.cpp::DynamicFilterData::CompareValue", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::GreaterThanEquals"}, {"source": "src/planner/filter/table_filter_dynamic_function.cpp::DynamicFilterData::CompareValue", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThan"}, {"source": "src/planner/filter/table_filter_dynamic_function.cpp::DynamicFilterData::CompareValue", "target": "src/common/value_operations/comparison_operations.cpp::ValueOperations::LessThanEquals"}, {"source": "src/planner/filter/table_filter_dynamic_function.cpp::duckdb::DynamicFilterSelect", "target": "src/planner/filter/table_filter_dynamic_function.cpp::duckdb::SelectDynamicFilter"}, {"source": "src/planner/filter/table_filter_dynamic_function.cpp::duckdb::SelectDynamicFilter", "target": "src/planner/filter/table_filter_dynamic_function.cpp::DynamicFilterData::CompareValue"}]}, "graph_spec": "This scope fixes the semantics of Value comparison and the callers that rely on it. Value::operator<, <=, >, >= must delegate to the matching ValueOperations predicate, and the non-distinct predicates must be derived consistently from one strict primitive: GreaterThan is the only operation routed through TemplatedBooleanOperation, with GreaterThanEquals(a,b) == !GreaterThan(b,a), LessThan(a,b) == GreaterThan(b,a) and LessThanEquals(a,b) == !GreaterThan(a,b); the DISTINCT variants keep the same algebraic relations while treating NULL as greater than every non-NULL value and two NULLs as equal, so DistinctGreaterThan is true only for a>b or a non-NULL vs b NULL, DistinctGreaterThanEquals/DistinctLessThan/DistinctLessThanEquals are its exact negations/swaps, and NotDistinctFrom/DistinctFrom are complementary (false rather than an error when either side is NULL). TemplatedBooleanOperation must compare same-type values by physical type, coerce differing types to a common maximum logical type before recursing, return false when coercion fails, and compare nested types lexicographically - STRUCT position by position, LIST/ARRAY element-wise with length as tie-break - while EQUALS requires every position to match. Callers must honor these semantics: VectorOfValuesLess must use DISTINCT ordering to define a strict weak ordering over value vectors so COPY partition selection is deterministic and equal keys share a partition; the table-scan index path (TableScanInitGlobal -> TryScanIndex -> ExtractFilterExpressions -> ExtractValuesFromExpression -> ValueQualifies) must retain a candidate value only if it satisfies every extracted condition in the original predicate's operand order, excluding NULL constants from exact-value extraction; and DynamicFilterData::CompareValue must map each ExpressionType to the corresponding predicate with the scanned value on the left and the constant on the right, with SelectDynamicFilter skipping NULL inputs and applying the produced selection unchanged."} +{"repo": "duckdb/duckdb", "buggy_commit": "09eb7f7004cb682d877c4e50ac0f296f4a0fc8e4", "bug_issue": 26216, "solve_pr": 26223, "call_graph": {"nodes": [{"id": "src/function/cast/string_cast.cpp::VectorStringToMap::StringToNestedTypeCastLoop"}], "edges": []}, "graph_spec": "`VectorStringToMap::StringToNestedTypeCastLoop` is the vectorized VARCHAR-to-MAP cast kernel: over `count` output rows it parses each source string into a `{key=value, ...}` map, reading values through the optional selection vector while writing list entries/validity at the positional output index. It runs two passes: first summing `CountPartsMap` over valid rows to size the shared VARCHAR key/value buffers and reserve that many map child slots, then re-parsing each valid row with `SplitStringMap` to fill disjoint `[offset, offset+length)` child ranges, where `length` is exactly the slots produced by that row and the running total must not exceed the pre-counted reservation. NULL source rows become NULL map rows and consume no slots. A string that fails to parse must not yield a partially populated map: its row is set NULL and the failure is reported through `HandleVectorCastError`, with the overall result marked not fully converted. The bound key and value cast infos are then applied to the first `total` VARCHAR child entries; because those casts may replace child buffers, the map list size is assigned only after both casts, followed by `MapConversionVerify`. A converted row is valid only if it parses and both key and value casts succeed; any key that fails to convert leaves a NULL key, which forces that entire map row to NULL, whereas a NULL value is permitted without nullifying the row. The boolean result is the conjunction of parse success and both child casts, which callers use for constant-vector handling and error propagation."} +{"repo": "duckdb/duckdb", "buggy_commit": "d8a1bd4f4fbccdf3d22d8f1fe27a94c11c805d0a", "bug_issue": 26217, "solve_pr": 26222, "call_graph": {"nodes": [{"id": "extension/icu/icu-strptime.cpp::ICUStrptime::Parse"}, {"id": "extension/icu/icu-strptime.cpp::ICUStrptime::ParseOne"}, {"id": "extension/icu/icu-strptime.cpp::ICUStrptime::TryParse"}, {"id": "extension/icu/icu-strptime.cpp::ICUStrptime::TryParseOne"}, {"id": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::AdaptiveSniff"}, {"id": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::MinimalSniff"}, {"id": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::SniffCSV"}, {"id": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::DetectDateAndTimeStampFormats"}, {"id": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::DetectTypes"}, {"id": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::SniffTypes"}, {"id": "src/execution/operator/csv_scanner/table_function/csv_file_scanner.cpp::CSVFileScan::CSVFileScan"}, {"id": "src/execution/operator/csv_scanner/table_function/csv_schema_discovery.cpp::CSVSchemaDiscovery::SchemaDiscovery"}, {"id": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::ReadSingleCSVFileBind"}, {"id": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::SniffCSVFile"}, {"id": "src/function/scalar/date/strftime.cpp::StrpTimeFunction::Parse"}, {"id": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::Parse"}, {"id": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::TryParse"}, {"id": "src/function/table/sniff_csv.cpp::duckdb::CSVSniffFunction"}, {"id": "src/main/relation/read_csv_relation.cpp::ReadCSVRelation::ReadCSVRelation"}, {"id": "src/main/relation/read_csv_relation.cpp::duckdb::ReadCSVRelationBind"}], "edges": [{"source": "extension/icu/icu-strptime.cpp::ICUStrptime::Parse", "target": "extension/icu/icu-strptime.cpp::ICUStrptime::ParseOne"}, {"source": "extension/icu/icu-strptime.cpp::ICUStrptime::ParseOne", "target": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::Parse"}, {"source": "extension/icu/icu-strptime.cpp::ICUStrptime::TryParse", "target": "extension/icu/icu-strptime.cpp::ICUStrptime::TryParseOne"}, {"source": "extension/icu/icu-strptime.cpp::ICUStrptime::TryParseOne", "target": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::Parse"}, {"source": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::AdaptiveSniff", "target": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::MinimalSniff"}, {"source": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::AdaptiveSniff", "target": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::SniffCSV"}, {"source": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::MinimalSniff", "target": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::SniffTypes"}, {"source": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::SniffCSV", "target": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::DetectTypes"}, {"source": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::DetectDateAndTimeStampFormats", "target": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::Parse"}, {"source": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::DetectTypes", "target": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::SniffTypes"}, {"source": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::SniffTypes", "target": "src/execution/operator/csv_scanner/sniffer/type_detection.cpp::CSVSniffer::DetectDateAndTimeStampFormats"}, {"source": "src/execution/operator/csv_scanner/table_function/csv_file_scanner.cpp::CSVFileScan::CSVFileScan", "target": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::AdaptiveSniff"}, {"source": "src/execution/operator/csv_scanner/table_function/csv_file_scanner.cpp::CSVFileScan::CSVFileScan", "target": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::SniffCSV"}, {"source": "src/execution/operator/csv_scanner/table_function/csv_schema_discovery.cpp::CSVSchemaDiscovery::SchemaDiscovery", "target": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::SniffCSV"}, {"source": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::ReadSingleCSVFileBind", "target": "src/execution/operator/csv_scanner/table_function/csv_schema_discovery.cpp::CSVSchemaDiscovery::SchemaDiscovery"}, {"source": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::ReadSingleCSVFileBind", "target": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::SniffCSVFile"}, {"source": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::SniffCSVFile", "target": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::AdaptiveSniff"}, {"source": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::SniffCSVFile", "target": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::SniffCSV"}, {"source": "src/function/scalar/date/strftime.cpp::StrpTimeFunction::Parse", "target": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::Parse"}, {"source": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::Parse", "target": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::Parse"}, {"source": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::TryParse", "target": "src/function/scalar/strftime_format.cpp::StrpTimeFormat::Parse"}, {"source": "src/function/table/sniff_csv.cpp::duckdb::CSVSniffFunction", "target": "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp::CSVSniffer::SniffCSV"}, {"source": "src/main/relation/read_csv_relation.cpp::ReadCSVRelation::ReadCSVRelation", "target": "src/main/relation/read_csv_relation.cpp::duckdb::ReadCSVRelationBind"}, {"source": "src/main/relation/read_csv_relation.cpp::duckdb::ReadCSVRelationBind", "target": "src/execution/operator/csv_scanner/table_function/csv_schema_discovery.cpp::CSVSchemaDiscovery::SchemaDiscovery"}]}, "graph_spec": "This scope couples CSV auto-detection with the strptime parsers it relies on. Entry points (ReadSingleCSVFileBind/SniffCSVFile, both CSVFileScan constructors, CSVSchemaDiscovery::SchemaDiscovery, CSVSniffFunction, ReadCSVRelationBind) must drive the sniffer to settle on a dialect (delimiter, quote, escape, newline, skip rows, header) and a schema (column names and types) that the scanner can replay verbatim, so the options stored in CSVReaderOptions and reported by sniff_csv reproduce the same read with auto_detect disabled. Sniffing is layered: SniffCSV runs DetectDialect, DetectTypes, RefineTypes, DetectHeader and ReplaceTypes, while MinimalSniff is a cheap prefix that fixes column count, header and candidate types, and AdaptiveSniff must accept that minimal result only when it is error free and consistent with any supplied CSVSchema, otherwise fall back to the full SniffCSV and raise a schema-mismatch error unless errors are ignored. Type detection must be conservative and value-grounded: SniffTypes walks each column's ordered candidate list from narrowest to widest, excluding the header row and NULLs from evidence, accepting the first type that parses every sampled value, and widening to VARCHAR as soon as any value fails to parse. For numeric-leading values under DATE/TIMESTAMP candidates, DetectDateAndTimeStampFormats must first attempt format narrowing: it builds candidate formats from the observed separator and the built-in templates (ISO-8601 templates excluded), commits to the first format that parses the value, only keeps formats that parse all observed values, and if no candidate parses and none has matched yet, resets and rejects the date/timestamp type; the accepted format must then be stored as date_format[DATE]/date_format[TIMESTAMP], reported by sniff_csv, and used to parse every value typed DATE/TIMESTAMP, with user-set formats honored rather than overridden. Parsing itself is the shared contract: StrpTimeFormat::Parse must match text against the specifier and report positional errors on failure while correctly resolving year-without-century crossover, ISO week/year/weekday, day-of-year and week-offset interpretations, AM/PM, fractional seconds, strict numeric widths, and full-length matching; StrpTimeFunction::Parse/try_strptime must iterate the format list and throw (respectively return NULL) when no format matches, and the ICU Parse/ParseOne/TryParse/TryParseOne paths must defer to the same parse for pattern matching before converting to a zoned timestamp, honoring special values, UTC offsets and time-zone names and returning NULL for the try variants. Finally, SchemaDiscovery must merge per-file schemas into one best schema: empty or header-only files contribute no data rows, files with data rows take precedence, conflicts merge via null padding, and when every file is empty or header-only the discovered types default to VARCHAR unless explicitly set."} +{"repo": "duckdb/duckdb", "buggy_commit": "09eb7f7004cb682d877c4e50ac0f296f4a0fc8e4", "bug_issue": 26221, "solve_pr": 26224, "call_graph": {"nodes": [{"id": "src/execution/operator/csv_scanner/table_function/global_csv_state.cpp::CSVGlobalState::FillRejectsTable"}, {"id": "src/execution/operator/csv_scanner/table_function/global_csv_state.cpp::CSVGlobalState::FinishFile"}, {"id": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::ReadSingleCSVFileInitGlobal"}, {"id": "src/execution/operator/persistent/csv_rejects_table.cpp::CSVRejectsTable::GetOrCreate"}], "edges": [{"source": "src/execution/operator/csv_scanner/table_function/global_csv_state.cpp::CSVGlobalState::FillRejectsTable", "target": "src/execution/operator/csv_scanner/table_function/global_csv_state.cpp::CSVGlobalState::FillRejectsTable"}, {"source": "src/execution/operator/csv_scanner/table_function/global_csv_state.cpp::CSVGlobalState::FillRejectsTable", "target": "src/execution/operator/persistent/csv_rejects_table.cpp::CSVRejectsTable::GetOrCreate"}, {"source": "src/execution/operator/csv_scanner/table_function/global_csv_state.cpp::CSVGlobalState::FinishFile", "target": "src/execution/operator/csv_scanner/table_function/global_csv_state.cpp::CSVGlobalState::FillRejectsTable"}, {"source": "src/execution/operator/csv_scanner/table_function/read_single_csv_file.cpp::duckdb::ReadSingleCSVFileInitGlobal", "target": "src/execution/operator/persistent/csv_rejects_table.cpp::CSVRejectsTable::GetOrCreate"}]}, "graph_spec": "This scope covers how CSV reject reporting is created and populated. `CSVRejectsTable::GetOrCreate` must produce a single shared, cached rejects-table object for a given (scan-name, error-name) pair: the two names must differ, lookups must be case-insensitive and keyed so distinct name pairs cannot alias each other, and conflicts with existing temporary-catalog tables must be raised as an error unless they refer to this same cached pair; the cache entry is otherwise created on demand. Initialization of that object (`InitializeTable`) must be idempotent and reentrant, creating the temporary CSV_ERROR_TYPE enum plus the scan-info and error tables with ignore-on-conflict so parallel file initialization is safe, and resetting the accumulated reject count. `FinishFile` must finalize a file's scan exactly once and then record its rejects: validation must run when reading is multi-threaded and errors are neither ignored nor stored, pending scan errors must always be surfaced, and reject filing must occur regardless. `FillRejectsTable` must be a no-op unless `store_rejects` is enabled; when active it must resolve the shared rejects object, serialize writes under the reject-table write lock, derive a deterministic file index scoped to the scan and query so files of different scans in the same query do not collide and parallel reads preserve per-file identity, append the per-row error records, and only append the scan/options row when the file actually produced at least one reject. `ReadSingleCSVFileInitGlobal` must ensure that object exists and its tables are initialized before any file of the scan can report rejects. Overall, reject rows must be attributed to the correct scan and file, must not be written when storing is disabled, and must not be duplicated or lost under parallel file reads."} +{"repo": "duckdb/duckdb", "buggy_commit": "71f47d410f6acceabd4c0d1329ed0f7b2f315f93", "bug_issue": 28158, "solve_pr": 28171, "call_graph": {"nodes": [{"id": "src/storage/table/row_group_collection.cpp::RowGroupCollection::FinalizeAppend"}, {"id": "src/storage/table/row_group_collection.cpp::RowGroupCollection::NextParallelScan"}], "edges": []}, "graph_spec": "These functions support writing and parallel reading of table data organized into row groups, which are storage units containing groups of table rows. FinalizeAppend completes and flushes an append using transaction and append state, while NextParallelScan assigns scan work using collection scan state and returns the assignment’s row count."} +{"repo": "duckdb/duckdb", "buggy_commit": "fd4d42e4604a08dcfc7a481ee1bfb734e6d6c1f7", "bug_issue": 28160, "solve_pr": 28346, "call_graph": {"nodes": [{"id": "extension/core_functions/aggregate/algebraic/avg.cpp::duckdb::KahanAverageOperation::Finalize"}, {"id": "extension/core_functions/aggregate/algebraic/avg.cpp::duckdb::KahanAvgState::Combine"}, {"id": "extension/core_functions/include/core_functions/aggregate/sum_helpers.hpp::KahanAdd::AddConstant"}, {"id": "extension/core_functions/include/core_functions/aggregate/sum_helpers.hpp::KahanAdd::AddNumber"}, {"id": "extension/core_functions/include/core_functions/aggregate/sum_helpers.hpp::duckdb::KahanAddInternal"}], "edges": [{"source": "extension/core_functions/aggregate/algebraic/avg.cpp::duckdb::KahanAvgState::Combine", "target": "extension/core_functions/include/core_functions/aggregate/sum_helpers.hpp::duckdb::KahanAddInternal"}, {"source": "extension/core_functions/include/core_functions/aggregate/sum_helpers.hpp::KahanAdd::AddConstant", "target": "extension/core_functions/include/core_functions/aggregate/sum_helpers.hpp::duckdb::KahanAddInternal"}, {"source": "extension/core_functions/include/core_functions/aggregate/sum_helpers.hpp::KahanAdd::AddNumber", "target": "extension/core_functions/include/core_functions/aggregate/sum_helpers.hpp::duckdb::KahanAddInternal"}]}, "graph_spec": "These functions support numerically accurate floating-point averaging through compensated summation, which reduces accumulated rounding error. KahanAdd::AddNumber, KahanAdd::AddConstant, and KahanAddInternal provide numeric accumulation support; KahanAvgState::Combine merges partial average states, and KahanAverageOperation::Finalize produces the aggregate’s average result."} +{"repo": "duckdb/duckdb", "buggy_commit": "15ee9801d5935e00bb1fa0b1c20d98c728d94cf2", "bug_issue": 28211, "solve_pr": 28333, "call_graph": {"nodes": [{"id": "src/storage/standard_buffer_manager.cpp::StandardBufferManager::StandardBufferManager"}], "edges": []}, "graph_spec": "StandardBufferManager::StandardBufferManager constructs a database’s buffer manager from a database instance and a temporary-directory path. The manager provides memory buffers for internal database use, cooperates with other databases through a shared buffer pool, and supports database-specific management of temporary buffers on disk."} +{"repo": "duckdb/duckdb", "buggy_commit": "a5e99a4fbdedea6b96d8d4a9d5395f39d1d9bd8a", "bug_issue": 28284, "solve_pr": 28293, "call_graph": {"nodes": [{"id": "src/function/scalar/list/list_select.cpp::duckdb::ListSelectFunction"}], "edges": []}, "graph_spec": "ListSelectFunction supports list selection and filtering, producing lists of selected elements from input lists using index lists or Boolean masks. These operations express selection within list-valued data through the public list_select and list_where interfaces."} +{"repo": "duckdb/duckdb", "buggy_commit": "ad2d8e9acc9e570855c1a5a3143a6d843160a795", "bug_issue": 28308, "solve_pr": 28331, "call_graph": {"nodes": [{"id": "src/planner/expression/bound_constant_expression.cpp::BoundConstantExpression::Equals"}, {"id": "src/planner/expression/bound_constant_expression.cpp::BoundConstantExpression::Hash"}], "edges": []}, "graph_spec": "BoundConstantExpression represents a constant value as a bound, typed SQL expression in DuckDB’s planner. Equals compares it with another expression for equality, while Hash produces an expression hash; together they support expression comparison and hashing within planning."} +{"repo": "duckdb/duckdb", "buggy_commit": "3588b975298a10db11ecd61c54e9361485873378", "bug_issue": 28357, "solve_pr": 28407, "call_graph": {"nodes": [{"id": "extension/parquet/writer/enum_column_writer.cpp::EnumColumnWriter::DictionarySize"}, {"id": "extension/parquet/writer/enum_column_writer.cpp::EnumColumnWriter::EnumColumnWriter"}, {"id": "extension/parquet/writer/enum_column_writer.cpp::EnumColumnWriter::FlushDictionary"}, {"id": "extension/parquet/writer/enum_column_writer.cpp::EnumColumnWriter::InitializePageState"}, {"id": "extension/parquet/writer/enum_column_writer.cpp::EnumColumnWriter::WriteEnumInternal"}, {"id": "extension/parquet/writer/enum_column_writer.cpp::EnumColumnWriter::WriteVector"}, {"id": "extension/parquet/writer/enum_column_writer.cpp::EnumWriterPageState::EnumWriterPageState"}], "edges": [{"source": "extension/parquet/writer/enum_column_writer.cpp::EnumColumnWriter::WriteVector", "target": "extension/parquet/writer/enum_column_writer.cpp::EnumColumnWriter::WriteEnumInternal"}]}, "graph_spec": "These functions support writing enum columns to Parquet by constructing the column writer, creating page-specific writing state, and serializing vector data through enum-specific writing support. They also report dictionary entry counts and write dictionary contents, supporting Parquet’s dictionary encoding, which represents column values through references to dictionary entries."} +{"repo": "duckdb/duckdb", "buggy_commit": "5632eb730e9c15914517fe027d6f0e9761caa89d", "bug_issue": 28370, "solve_pr": 28390, "call_graph": {"nodes": [{"id": "src/parser/peg/transformer/transform_select.cpp::PEGTransformerFactory::FinalizeWithClauseTrampoline"}, {"id": "src/parser/peg/transformer/transform_select.cpp::PEGTransformerFactory::InitializeWithClauseTrampoline"}], "edges": []}, "graph_spec": "InitializeWithClauseTrampoline and FinalizeWithClauseTrampoline provide the initialization and completion phases of transforming a parsed SQL WITH clause into DuckDB’s query representation. A WITH clause defines named common table expressions for use within a statement; these functions support representing those definitions during parsing."} +{"repo": "duckdb/duckdb", "buggy_commit": "c3dc01af116ce439464d582448b9c4d8dc412aec", "bug_issue": 28452, "solve_pr": 28455, "call_graph": {"nodes": [{"id": "src/planner/binder/expression/bind_aggregate_expression.cpp::BaseSelectBinder::BindAggregate"}], "edges": []}, "graph_spec": "BaseSelectBinder::BindAggregate binds a parsed aggregate-function expression against its catalog entry, returning a binding result for query planning within the SELECT, HAVING, and QUALIFY binder context. Aggregate functions summarize rows into group-level values; this function connects those SQL expressions to the planner’s bound expression representation."} +{"repo": "element-hq/element-web", "buggy_commit": "0997e0a747f7cb957eaf4dda6277d35763a024d9", "bug_issue": 29192, "solve_pr": 29388, "call_graph": {"nodes": [{"id": "src/components/structures/MatrixChat.tsx::MatrixChat::onAction"}, {"id": "src/components/views/dialogs/UserSettingsDialog.tsx::UserSettingsDialog"}, {"id": "src/components/views/settings/encryption/ResetIdentityPanel.tsx::ResetIdentityPanel"}, {"id": "src/components/views/settings/tabs/user/EncryptionUserSettingsTab.tsx::EncryptionUserSettingsTab"}], "edges": [{"source": "src/components/structures/MatrixChat.tsx::MatrixChat::onAction", "target": "src/components/views/dialogs/UserSettingsDialog.tsx::UserSettingsDialog"}, {"source": "src/components/views/dialogs/UserSettingsDialog.tsx::UserSettingsDialog", "target": "src/components/views/settings/tabs/user/EncryptionUserSettingsTab.tsx::EncryptionUserSettingsTab"}, {"source": "src/components/views/settings/tabs/user/EncryptionUserSettingsTab.tsx::EncryptionUserSettingsTab", "target": "src/components/views/settings/encryption/ResetIdentityPanel.tsx::ResetIdentityPanel"}]}, "graph_spec": "MatrixChat.onAction handles application action payloads, providing access to the user settings interface represented by UserSettingsDialog. Within that interface, EncryptionUserSettingsTab presents controls for encryption setup, key storage, and recovery, while ResetIdentityPanel provides the interface for resetting the current user’s cryptographic identity. These responsibilities concern end-to-end encryption, where identity keys and message keys support the user’s encrypted communications and their recovery."} +{"repo": "etcd-io/etcd", "buggy_commit": "1fa2b222386bd0b7840bb6006cd5452fb2d539e1", "bug_issue": 22564, "solve_pr": 22565, "call_graph": {"nodes": [{"id": "tests/framework/e2e/cluster.go::EtcdProcessClusterConfig::EtcdServerProcessConfig"}], "edges": []}, "graph_spec": "EtcdProcessClusterConfig.EtcdServerProcessConfig produces a server-process configuration for an individual etcd member from cluster-level settings, a testing context, and a member index. In the end-to-end testing framework, it connects configuration of an etcd cluster—a group of members providing a distributed key-value store—to the process settings needed to run one member."} +{"repo": "etcd-io/etcd", "buggy_commit": "b25719d10cdc41fb707b0d9f819c2529dec5d590", "bug_issue": 22608, "solve_pr": 22609, "call_graph": {"nodes": [{"id": "server/storage/mvcc/kvstore.go::store::hash"}], "edges": []}, "graph_spec": "The store’s hash method provides a testing-oriented hash of the whole backend keyspace, encompassing key-value data, leases, and other stored metadata. In this multi-version concurrency control (MVCC) storage context, the hash serves as a compact fingerprint of stored contents, returned alongside a storage revision and error status."} +{"repo": "etcd-io/etcd", "buggy_commit": "f3221acd10232a9f6ef0c36438517bdbc918ea26", "bug_issue": 22646, "solve_pr": 22655, "call_graph": {"nodes": [{"id": "server/etcdserver/bootstrap.go::bootstrap"}, {"id": "server/etcdserver/bootstrap.go::bootstrapWALFromSnapshot"}, {"id": "server/etcdserver/server.go::NewServer"}], "edges": [{"source": "server/etcdserver/bootstrap.go::bootstrap", "target": "server/etcdserver/bootstrap.go::bootstrapWALFromSnapshot"}, {"source": "server/etcdserver/server.go::NewServer", "target": "server/etcdserver/bootstrap.go::bootstrap"}]}, "graph_spec": "NewServer creates an etcd server from its configuration, with bootstrap preparing the server’s startup foundation and bootstrapWALFromSnapshot preparing write-ahead-log recovery in relation to a Raft snapshot. These responsibilities connect server initialization to etcd’s durable consensus state: Raft manages the replicated log, while the write-ahead log and snapshots preserve Raft state for recovery."} +{"repo": "etcd-io/etcd", "buggy_commit": "4b0b745025716b893c64dbee443e3f969931a16b", "bug_issue": 22653, "solve_pr": 22699, "call_graph": {"nodes": [{"id": "server/etcdserver/server.go::EtcdServer::Alarms"}, {"id": "server/etcdserver/server.go::EtcdServer::Start"}, {"id": "server/etcdserver/server.go::EtcdServer::applyAll"}, {"id": "server/etcdserver/server.go::EtcdServer::applySnapshot"}, {"id": "server/etcdserver/server.go::EtcdServer::restoreAlarms"}, {"id": "server/etcdserver/server.go::EtcdServer::run"}, {"id": "server/etcdserver/server.go::EtcdServer::start"}], "edges": [{"source": "server/etcdserver/server.go::EtcdServer::Start", "target": "server/etcdserver/server.go::EtcdServer::start"}, {"source": "server/etcdserver/server.go::EtcdServer::applyAll", "target": "server/etcdserver/server.go::EtcdServer::applySnapshot"}, {"source": "server/etcdserver/server.go::EtcdServer::applySnapshot", "target": "server/etcdserver/server.go::EtcdServer::restoreAlarms"}, {"source": "server/etcdserver/server.go::EtcdServer::run", "target": "server/etcdserver/server.go::EtcdServer::applyAll"}, {"source": "server/etcdserver/server.go::EtcdServer::start", "target": "server/etcdserver/server.go::EtcdServer::run"}]}, "graph_spec": "Start and start prepare and launch EtcdServer, while run supports its ongoing operation and applyAll applies committed Raft updates to the server’s replicated state. applySnapshot restores server state from a snapshot, a captured representation of that state. restoreAlarms restores alarm state, and Alarms exposes member-associated alarms representing cluster health concerns."} +{"repo": "flipt-io/flipt", "buggy_commit": "43fef2a22ff316cda74f92e527cb56fe3a57d802", "bug_issue": 1155, "solve_pr": 1156, "call_graph": {"nodes": [{"id": "cmd/flipt/main.go::main"}, {"id": "cmd/flipt/main.go::run"}, {"id": "internal/telemetry/telemetry.go::Reporter::Report"}], "edges": [{"source": "cmd/flipt/main.go::main", "target": "cmd/flipt/main.go::run"}, {"source": "cmd/flipt/main.go::run", "target": "internal/telemetry/telemetry.go::Reporter::Report"}]}, "graph_spec": "Flipt is a self-hosted feature flag service, where flags control application functionality; `main` provides its command-line entry point, and `run` represents service execution with a context, logger, and error result. The scoped telemetry responsibility is to send a ping event to an analytics service, although the repository declares this method as `Reporter.report`, rather than `Reporter.Report`."} +{"repo": "flipt-io/flipt", "buggy_commit": "b61e9858257eb37f1a1b34f60e914675f45d279e", "bug_issue": 1801, "solve_pr": 1803, "call_graph": {"nodes": [{"id": "internal/cmd/auth.go::authenticationGRPC"}, {"id": "internal/server/auth/middleware.go::UnaryInterceptor"}, {"id": "internal/server/middleware/grpc/middleware.go::ErrorUnaryInterceptor"}], "edges": [{"source": "internal/cmd/auth.go::authenticationGRPC", "target": "internal/server/auth/middleware.go::UnaryInterceptor"}]}, "graph_spec": "authenticationGRPC prepares Flipt’s gRPC authentication services and middleware from server configuration, returning service registrations, interceptors, and lifecycle cleanup support. UnaryInterceptor provides request authentication middleware using client credentials from request metadata and an authentication-provider contract, supporting authentication’s role in securing access to Flipt. ErrorUnaryInterceptor translates service errors into gRPC status codes, giving RPC clients a standard representation of failures."} +{"repo": "flipt-io/flipt", "buggy_commit": "9c3299ef96451cc7a9708943dcabd7e1cafc9289", "bug_issue": 2126, "solve_pr": 2144, "call_graph": {"nodes": [{"id": "cmd/flipt/main.go::buildConfig"}, {"id": "cmd/flipt/main.go::main"}, {"id": "internal/config/config.go::Load"}], "edges": [{"source": "cmd/flipt/main.go::main", "target": "cmd/flipt/main.go::buildConfig"}]}, "graph_spec": "These functions support startup and configuration of Flipt, a self-hosted feature flag application used to control feature availability and run experiments across services. `main` provides the command-line entry point and uses `buildConfig` to obtain application configuration and a logger; `Load` accepts a configuration path and returns application settings with configuration warnings and an error result."} +{"repo": "flipt-io/flipt", "buggy_commit": "b6edc5e46af598a3c187d917ad42b2d013e4dfee", "bug_issue": 2294, "solve_pr": 2295, "call_graph": {"nodes": [{"id": "cmd/flipt/main.go::exec"}, {"id": "cmd/flipt/main.go::run"}, {"id": "internal/cmd/grpc.go::NewGRPCServer"}, {"id": "internal/server/audit/logfile/logfile.go::NewSink"}], "edges": [{"source": "cmd/flipt/main.go::exec", "target": "cmd/flipt/main.go::run"}, {"source": "cmd/flipt/main.go::run", "target": "internal/cmd/grpc.go::NewGRPCServer"}, {"source": "internal/cmd/grpc.go::NewGRPCServer", "target": "internal/server/audit/logfile/logfile.go::NewSink"}]}, "graph_spec": "These functions support launching Flipt, a self-hosted feature flag service for controlling feature availability: exec provides the command-line entry point, and run coordinates the configured service runtime. NewGRPCServer constructs the core gRPC service and its dependencies, while logfile.NewSink creates a file-backed destination for audit events, which record activity and changes to Flipt resources."} +{"repo": "flipt-io/flipt", "buggy_commit": "dbe263961b187e1c5d7fe34c65b000985a2da5a0", "bug_issue": 2532, "solve_pr": 2579, "call_graph": {"nodes": [{"id": "internal/config/authentication.go::AuthenticationMethodGithubConfig::validate"}, {"id": "internal/config/authentication.go::AuthenticationMethodOIDCConfig::validate"}], "edges": []}, "graph_spec": "These methods validate authentication configuration for GitHub OAuth 2.0 and OpenID Connect (OIDC), returning an error as part of the configuration validation contract. GitHub configuration supports authentication with GitHub as the provider, while OIDC configuration supports provider-based authentication for establishing browser sessions."} +{"repo": "flipt-io/flipt", "buggy_commit": "c2c0f7761620a8348be46e2f1a3cedca84577eeb", "bug_issue": 2907, "solve_pr": 2908, "call_graph": {"nodes": [{"id": "cmd/flipt/bundle.go::bundleCommand::build"}, {"id": "internal/oci/file.go::Store::Build"}], "edges": [{"source": "cmd/flipt/bundle.go::bundleCommand::build", "target": "internal/oci/file.go::Store::Build"}]}, "graph_spec": "These functions support building Flipt feature bundles, which package declarative feature-flag state as OCI artifacts for repository storage. `bundleCommand.build` provides the command-line entry point for bundle creation, delegating to `Store.Build`, which accepts a source filesystem and repository reference, packages the feature state into the store’s target, and returns metadata describing the resulting bundle."} +{"repo": "flipt-io/flipt", "buggy_commit": "ffd5a7c26bf69564d81cbea14295c1f296333899", "bug_issue": 2972, "solve_pr": 2973, "call_graph": {"nodes": [{"id": "cmd/flipt/main.go::exec"}, {"id": "cmd/flipt/main.go::run"}, {"id": "internal/cmd/authn.go::authenticationGRPC"}, {"id": "internal/cmd/grpc.go::NewGRPCServer"}, {"id": "internal/config/authentication.go::AuthenticationMethodJWTConfig::info"}], "edges": [{"source": "cmd/flipt/main.go::exec", "target": "cmd/flipt/main.go::run"}, {"source": "cmd/flipt/main.go::run", "target": "internal/cmd/grpc.go::NewGRPCServer"}, {"source": "internal/cmd/grpc.go::NewGRPCServer", "target": "internal/cmd/authn.go::authenticationGRPC"}]}, "graph_spec": "The CLI entrypoint must execute the root command with a cancellable context that is cancelled on interrupt or termination, build the configured runtime, and propagate startup errors; normal execution must construct the gRPC service before starting dependent serving work and, after cancellation, shut services down using a bounded shutdown context. gRPC construction must bind the configured listener, compose its standard request middleware with authentication middleware before later request-processing and cache middleware, register the core and enabled authentication services, and retain cleanup callbacks for reverse-order teardown. Authentication is enforced only when required: excluded API service groups and health remain bypassable, while enabled JWT authentication validates tokens using exactly the configured JWKS source or public-key source, permits only the supported asymmetric signing algorithms, and applies configured issuer and audience constraints. JWT must be identified as the JWT method, non-session-compatible, and not database-requiring, so its enablement does not itself require authentication storage."} +{"repo": "flipt-io/flipt", "buggy_commit": "8d72418bf67cec833da7f59beeecb5abfd48cb05", "bug_issue": 3412, "solve_pr": 3556, "call_graph": {"nodes": [{"id": "internal/server/ofrep/errors.go::newFlagsMissingError"}, {"id": "internal/server/ofrep/evaluation.go::Server::EvaluateBulk"}, {"id": "rpc/flipt/ofrep/ofrep.pb.gw.go::RegisterOFREPServiceHandlerClient"}, {"id": "rpc/flipt/ofrep/ofrep.pb.gw.go::request_OFREPService_EvaluateBulk_0"}, {"id": "rpc/flipt/ofrep/ofrep_grpc.pb.go::OFREPServiceClient::EvaluateBulk"}], "edges": [{"source": "internal/server/ofrep/evaluation.go::Server::EvaluateBulk", "target": "internal/server/ofrep/errors.go::newFlagsMissingError"}, {"source": "rpc/flipt/ofrep/ofrep.pb.gw.go::RegisterOFREPServiceHandlerClient", "target": "rpc/flipt/ofrep/ofrep.pb.gw.go::request_OFREPService_EvaluateBulk_0"}, {"source": "rpc/flipt/ofrep/ofrep.pb.gw.go::request_OFREPService_EvaluateBulk_0", "target": "rpc/flipt/ofrep/ofrep_grpc.pb.go::OFREPServiceClient::EvaluateBulk"}, {"source": "rpc/flipt/ofrep/ofrep_grpc.pb.go::OFREPServiceClient::EvaluateBulk", "target": "internal/server/ofrep/evaluation.go::Server::EvaluateBulk"}]}, "graph_spec": "The scoped gateway registration, request adapter, client method, and server method expose OFREP bulk feature-flag evaluation across HTTP/JSON and gRPC, accepting evaluation context and returning a collection of flag values with evaluation reasons and metadata. The supplied newFlagsMissingError node has no declaration in the current repository, so its responsibility cannot be established from the available contracts."} +{"repo": "flipt-io/flipt", "buggy_commit": "1f6255dda6648ecafd94826cda3fac2486af4b0f", "bug_issue": 3635, "solve_pr": 3639, "call_graph": {"nodes": [{"id": "internal/ext/encoding.go::Encoding::NewDecoder"}], "edges": []}, "graph_spec": "Encoding.NewDecoder provides a decoder for reading serialized data from an input stream in the format represented by Encoding. The API covers JSON and YAML serialization and exposes a common Decoder interface for decoding data into application values."} +{"repo": "flipt-io/flipt", "buggy_commit": "1f6255dda6648ecafd94826cda3fac2486af4b0f", "bug_issue": 3636, "solve_pr": 3639, "call_graph": {"nodes": [{"id": "internal/ext/importer.go::Importer::Import"}], "edges": []}, "graph_spec": "Importer.Import brings serialized feature-flag configuration from an input stream into Flipt’s backing service, supporting configuration managed as code and returning an error status. Its scope covers namespaces, feature flags and their variants, and segments and targeting rules—the configuration concepts used to organize flags and control feature exposure to groups of users."} +{"repo": "flipt-io/flipt", "buggy_commit": "866ba43dd49c238c97831362cdab50630b0b9aa7", "bug_issue": 3688, "solve_pr": 3692, "call_graph": {"nodes": [{"id": "cmd/flipt/main.go::exec"}, {"id": "cmd/flipt/main.go::main"}, {"id": "cmd/flipt/main.go::run"}, {"id": "internal/cmd/grpc.go::NewGRPCServer"}, {"id": "internal/cmd/grpc.go::getAuthz"}, {"id": "internal/server/authz/engine/rego/engine.go::Engine::updatePolicy"}, {"id": "internal/server/authz/engine/rego/engine.go::NewEngine"}, {"id": "internal/server/authz/engine/rego/engine.go::newEngine"}, {"id": "internal/server/authz/middleware/grpc/middleware.go::AuthorizationRequiredInterceptor"}, {"id": "internal/server/namespace.go::Server::ListNamespaces"}], "edges": [{"source": "cmd/flipt/main.go::exec", "target": "cmd/flipt/main.go::run"}, {"source": "cmd/flipt/main.go::main", "target": "cmd/flipt/main.go::exec"}, {"source": "cmd/flipt/main.go::run", "target": "internal/cmd/grpc.go::NewGRPCServer"}, {"source": "internal/cmd/grpc.go::NewGRPCServer", "target": "internal/cmd/grpc.go::getAuthz"}, {"source": "internal/cmd/grpc.go::getAuthz", "target": "internal/server/authz/engine/rego/engine.go::NewEngine"}, {"source": "internal/server/authz/engine/rego/engine.go::NewEngine", "target": "internal/server/authz/engine/rego/engine.go::newEngine"}, {"source": "internal/server/authz/engine/rego/engine.go::newEngine", "target": "internal/server/authz/engine/rego/engine.go::Engine::updatePolicy"}]}, "graph_spec": "The scoped functions provide Flipt’s command-line entry and service startup, construct its gRPC service and authorization verifier, and create and refresh a local Rego policy engine. The authorization interceptor applies policy-based access control to gRPC requests, while ListNamespaces provides namespace listings; namespaces group feature flags, segments, and rules under a shared name."} +{"repo": "flipt-io/flipt", "buggy_commit": "1d550f0c0d693844b6f4b44fd7859254ef3569c0", "bug_issue": 4179, "solve_pr": 4184, "call_graph": {"nodes": [{"id": "internal/storage/fs/git/store.go::SnapshotStore::View"}, {"id": "internal/storage/fs/git/store.go::SnapshotStore::fetch"}, {"id": "internal/storage/fs/git/store.go::SnapshotStore::update"}], "edges": [{"source": "internal/storage/fs/git/store.go::SnapshotStore::View", "target": "internal/storage/fs/git/store.go::SnapshotStore::fetch"}, {"source": "internal/storage/fs/git/store.go::SnapshotStore::update", "target": "internal/storage/fs/git/store.go::SnapshotStore::fetch"}]}, "graph_spec": "These functions support Git-backed snapshots of Flipt feature flag state, where a snapshot provides a read-only view and a reference identifies a repository revision. View supplies a reference-associated snapshot to a caller-provided function, while fetch retrieves upstream repository updates for references used by the store. update refreshes the store’s snapshots from upstream revisions, sharing fetch with View to support both snapshot access and ongoing synchronization."} +{"repo": "flipt-io/flipt", "buggy_commit": "358e13bf5748bba4418ffdcdd913bcbfdedc9d3f", "bug_issue": 4342, "solve_pr": 4343, "call_graph": {"nodes": [{"id": "cmd/flipt/main.go::buildConfig"}, {"id": "cmd/flipt/main.go::run"}, {"id": "internal/cmd/http.go::NewHTTPServer"}, {"id": "internal/config/authentication.go::AuthenticationConfig::setDefaults"}, {"id": "internal/config/config.go::Default"}, {"id": "internal/config/config.go::Load"}], "edges": [{"source": "cmd/flipt/main.go::buildConfig", "target": "internal/config/config.go::Load"}, {"source": "cmd/flipt/main.go::run", "target": "internal/cmd/http.go::NewHTTPServer"}, {"source": "internal/config/config.go::Load", "target": "internal/config/config.go::Default"}]}, "graph_spec": "The startup path must resolve an explicit, user, or built-in configuration source, load it with environment substitution and format handling, apply complete baseline defaults (including authentication session values and per-enabled-method cleanup settings), then unmarshal and validate the resulting configuration before constructing logging. With no usable file, `Load` must produce `Default()` values such as HTTP on 0.0.0.0:8080, enabled UI/metrics, and the default database path; invalid or unreadable supplied configuration must be reported. `run` must use that configuration to initialize services, start the HTTP server, and on context cancellation perform bounded graceful shutdown while propagating startup errors. `NewHTTPServer` must register the configured gateway APIs against the supplied gRPC connection, apply security, CORS, tracing, compression, diagnostics, health, metrics, authentication, and optional UI behavior, select HTTP versus HTTPS ports from the protocol, and expose TLS with the configured certificate/key and secure minimum settings. CSRF protection for browser-facing state-changing requests must issue and validate a usable token under the selected protocol, with cookie attributes consistent with that protocol."} +{"repo": "future-architect/vuls", "buggy_commit": "8a8ab8cb18161244ee6f078b43a89b3588d99a4d", "bug_issue": 1042, "solve_pr": 1051, "call_graph": {"nodes": [{"id": "scan/freebsd.go::bsd::scanInstalledPackages"}], "edges": []}, "graph_spec": "The bsd.scanInstalledPackages method gathers an inventory of installed software packages on a FreeBSD host and returns package information with an error status. This inventory describes installed software and its versions, providing context for Vuls’ assessment of package vulnerabilities."} +{"repo": "future-architect/vuls", "buggy_commit": "bfe0db77b4e16e3099a1e58b8db8f18120a11117", "bug_issue": 1559, "solve_pr": 1591, "call_graph": {"nodes": [{"id": "gost/ubuntu.go::Ubuntu::DetectCVEs"}], "edges": []}, "graph_spec": "Ubuntu.DetectCVEs enriches an Ubuntu scan result with CVE vulnerability information available through Gost, returning a CVE count and an error status. Within the repository’s vulnerability-scanning domain, CVEs identify known security vulnerabilities, and this function connects Ubuntu scan results with that vulnerability information."} +{"repo": "future-architect/vuls", "buggy_commit": "827f2cb8d86509c4455b2df2fe79b9d59533d3b0", "bug_issue": 1906, "solve_pr": 1907, "call_graph": {"nodes": [{"id": "detector/detector.go::Detect"}, {"id": "detector/detector.go::DetectPkgCves"}, {"id": "detector/detector.go::detectPkgsCvesWithGost"}, {"id": "gost/gost.go::NewGostClient"}, {"id": "gost/redhat.go::RedHat::DetectCVEs"}, {"id": "gost/redhat.go::RedHat::mergePackageStates"}, {"id": "gost/redhat.go::RedHat::setUnfixedCveToScanResult"}, {"id": "server/server.go::VulsHandler::ServeHTTP"}, {"id": "subcmds/report.go::ReportCmd::Execute"}, {"id": "subcmds/report_windows.go::ReportCmd::Execute"}, {"id": "subcmds/tui.go::TuiCmd::Execute"}], "edges": [{"source": "detector/detector.go::Detect", "target": "detector/detector.go::DetectPkgCves"}, {"source": "detector/detector.go::DetectPkgCves", "target": "detector/detector.go::detectPkgsCvesWithGost"}, {"source": "detector/detector.go::detectPkgsCvesWithGost", "target": "gost/gost.go::NewGostClient"}, {"source": "gost/redhat.go::RedHat::setUnfixedCveToScanResult", "target": "gost/redhat.go::RedHat::mergePackageStates"}, {"source": "server/server.go::VulsHandler::ServeHTTP", "target": "detector/detector.go::DetectPkgCves"}, {"source": "subcmds/report.go::ReportCmd::Execute", "target": "detector/detector.go::Detect"}, {"source": "subcmds/report_windows.go::ReportCmd::Execute", "target": "detector/detector.go::Detect"}, {"source": "subcmds/tui.go::TuiCmd::Execute", "target": "detector/detector.go::Detect"}]}, "graph_spec": "The scoped functions support vulnerability detection and reporting by associating software packages with CVEs and enriching scan results with vulnerability details. They provide operating-system-family Gost clients and HTTP, report-command, and terminal-view entry points for vulnerability analysis and reporting."} +{"repo": "future-architect/vuls", "buggy_commit": "61c39637f2f3809e1b5dad05f0c57c799dce1587", "bug_issue": 1913, "solve_pr": 1914, "call_graph": {"nodes": [{"id": "gost/debian.go::Debian::ConvertToModel"}, {"id": "gost/debian.go::Debian::DetectCVEs"}, {"id": "gost/debian.go::Debian::detect"}, {"id": "gost/debian.go::Debian::detectCVEsWithFixState"}], "edges": [{"source": "gost/debian.go::Debian::DetectCVEs", "target": "gost/debian.go::Debian::detectCVEsWithFixState"}, {"source": "gost/debian.go::Debian::detect", "target": "gost/debian.go::Debian::ConvertToModel"}]}, "graph_spec": "These functions support Debian vulnerability detection using Gost, relating CVE records—identifiers and information for known vulnerabilities—to package and kernel information in Vuls scan results. DetectCVEs enriches scan results with vulnerability information, detectCVEsWithFixState supports detection by remediation status, and detect relates Debian CVE records to source-package and running-kernel context. ConvertToModel translates Gost’s Debian CVE representation into Vuls’s common vulnerability-content model."} +{"repo": "future-architect/vuls", "buggy_commit": "ef2be3d6ea4c0a13674aaab08b182eca4e2b9a17", "bug_issue": 1915, "solve_pr": 1381, "call_graph": {"nodes": [{"id": "oval/alpine.go::Alpine::FillWithOval"}, {"id": "oval/redhat.go::RedHatBase::FillWithOval"}, {"id": "oval/suse.go::SUSE::FillWithOval"}, {"id": "oval/util.go::getDefsByPackNameFromOvalDB"}, {"id": "oval/util.go::getDefsByPackNameViaHTTP"}, {"id": "oval/util.go::isOvalDefAffected"}, {"id": "scanner/redhatbase.go::redhatBase::detectEnabledDnfModules"}, {"id": "scanner/redhatbase.go::redhatBase::getOwnerPkgs"}, {"id": "scanner/redhatbase.go::redhatBase::parseDnfModuleList"}, {"id": "scanner/redhatbase.go::redhatBase::parseInstalledPackages"}, {"id": "scanner/redhatbase.go::redhatBase::parseInstalledPackagesLine"}, {"id": "scanner/redhatbase.go::redhatBase::parseRpmQfLine"}, {"id": "scanner/redhatbase.go::redhatBase::rpmQa"}, {"id": "scanner/redhatbase.go::redhatBase::scanInstalledPackages"}, {"id": "scanner/redhatbase.go::redhatBase::scanPackages"}], "edges": [{"source": "oval/alpine.go::Alpine::FillWithOval", "target": "oval/util.go::getDefsByPackNameFromOvalDB"}, {"source": "oval/alpine.go::Alpine::FillWithOval", "target": "oval/util.go::getDefsByPackNameViaHTTP"}, {"source": "oval/redhat.go::RedHatBase::FillWithOval", "target": "oval/util.go::getDefsByPackNameFromOvalDB"}, {"source": "oval/redhat.go::RedHatBase::FillWithOval", "target": "oval/util.go::getDefsByPackNameViaHTTP"}, {"source": "oval/suse.go::SUSE::FillWithOval", "target": "oval/util.go::getDefsByPackNameFromOvalDB"}, {"source": "oval/suse.go::SUSE::FillWithOval", "target": "oval/util.go::getDefsByPackNameViaHTTP"}, {"source": "oval/util.go::getDefsByPackNameFromOvalDB", "target": "oval/util.go::isOvalDefAffected"}, {"source": "oval/util.go::getDefsByPackNameViaHTTP", "target": "oval/util.go::isOvalDefAffected"}, {"source": "scanner/redhatbase.go::redhatBase::detectEnabledDnfModules", "target": "scanner/redhatbase.go::redhatBase::parseDnfModuleList"}, {"source": "scanner/redhatbase.go::redhatBase::getOwnerPkgs", "target": "scanner/redhatbase.go::redhatBase::parseRpmQfLine"}, {"source": "scanner/redhatbase.go::redhatBase::parseInstalledPackages", "target": "scanner/redhatbase.go::redhatBase::parseInstalledPackagesLine"}, {"source": "scanner/redhatbase.go::redhatBase::parseRpmQfLine", "target": "scanner/redhatbase.go::redhatBase::parseInstalledPackagesLine"}, {"source": "scanner/redhatbase.go::redhatBase::scanInstalledPackages", "target": "scanner/redhatbase.go::redhatBase::rpmQa"}, {"source": "scanner/redhatbase.go::redhatBase::scanPackages", "target": "scanner/redhatbase.go::redhatBase::detectEnabledDnfModules"}]}, "graph_spec": "The scope must preserve consistent OVAL enrichment across Alpine, Red Hat-family, and SUSE scans regardless of DB or HTTP source: normalize family/release (including CentOS Stream and Amazon variants), query both binary and source packages, and retain only definitions whose package name, architecture, repository, modular stream, kernel major, and installed-versus-fixed version state match the scan. OVAL results must represent unresolved and resolution states accurately, expand source findings to binary packages, deduplicate affected packages/definitions, merge with existing CVE content without losing confidence or advisory data, sort deterministically, and expose distro-appropriate advisory links. Red Hat package scanning must discover enabled DNF modules, parse module-list and RPM/repoquery output formats with epoch, release, architecture, repository, and modularity metadata intact, reject malformed records, select only the running (or latest when unknown) kernel package, tolerate per-path ownership failures while retaining valid owners, choose rpm query syntax compatible with distro/version, and ensure scanPackages records installed packages before optional update data while honoring offline/fast boundaries."} +{"repo": "future-architect/vuls", "buggy_commit": "053306944695e6616f320393f865f667e984481d", "bug_issue": 1916, "solve_pr": 1950, "call_graph": {"nodes": [{"id": "scanner/redhatbase.go::redhatBase::parseInstalledPackages"}, {"id": "scanner/utils.go::isRunningKernel"}], "edges": [{"source": "scanner/redhatbase.go::redhatBase::parseInstalledPackages", "target": "scanner/utils.go::isRunningKernel"}]}, "graph_spec": "These functions support installed-package inventory for Red Hat-family vulnerability scanning: `parseInstalledPackages` translates package-listing text into package records, with source-package records and an error result in its interface. Within that scope, `isRunningKernel` uses package, distribution, and kernel information to identify kernel packages and their relationship to the running kernel, distinguishing installed software from the operating-system kernel currently in use."} +{"repo": "future-architect/vuls", "buggy_commit": "878c25bf5a9c9fd88ac32eb843f5636834d5712d", "bug_issue": 1924, "solve_pr": 1929, "call_graph": {"nodes": [{"id": "contrib/trivy/parser/parser.go::Parser::Parse"}, {"id": "contrib/trivy/parser/v2/parser.go::ParserV2::Parse"}, {"id": "contrib/trivy/pkg/converter.go::Convert"}], "edges": [{"source": "contrib/trivy/parser/parser.go::Parser::Parse", "target": "contrib/trivy/parser/v2/parser.go::ParserV2::Parse"}, {"source": "contrib/trivy/parser/v2/parser.go::ParserV2::Parse", "target": "contrib/trivy/pkg/converter.go::Convert"}]}, "graph_spec": "The scope is one conversion pipeline that turns a Trivy JSON report into a single fully-populated Vuls `*models.ScanResult`: the exported `Parser` interface's `Parse([]byte) (*models.ScanResult, error)` is the sole entry point, the schema-v2 parser is its concrete implementation, and it delegates the report's vulnerability results to `Convert`. Correct behavior requires: `Parse` accepts raw Trivy report bytes, returns a non-nil result with a nil error only on complete success, and on any failure (JSON decode, conversion, or metadata setup) returns a nil result with a propagated error rather than a partially-filled one; the interface's only supported realization is the schema-v2 path, so callers route through it when the report's schema is v2. `ParserV2::Parse` must pass the report's results through unchanged, then enrich that same result in place with metadata: server name from the artifact name (for container images, split into image name and tag with `latest` when the tag is absent, and expose the same via optional image name/tag keys), OS family/release derived from report OS metadata with a pseudo-server-type fallback, and scan provenance (timestamp, scanned-by/via trivy). It must reject a report with no results as unsupported. `Convert` must produce one `VulnInfo` per distinct vulnerability ID (deduplicated by ID), each carrying the Trivy detection confidence, sorted references, and severity/CVSS content merged without duplicate score entries; OS-package targets route to installed `Packages` plus `AffectedPackages` (marking affected/not-fixed when no fixed version exists and normalizing version with release and epoch), while non-OS/library targets route to `LibraryFixedIns` and per-target library scanners; package and source-package maps must reflect the same inputs, libraries must be deduplicated by name+version within each target, and library scanners must be ordered deterministically by lockfile path, making repeated conversion of the same input yield identical output. `JSONVersion` and empty (non-nil) collections are set as declared so downstream Vuls consumers see a well-formed result even when there are no vulnerabilities. The callers' metadata step must not overwrite the converted vulnerability/package data, and the pipeline must remain faithful to the input: no invented or dropped vulnerabilities, packages, or libraries."} +{"repo": "future-architect/vuls", "buggy_commit": "98cbe6ed837ce5983ddcb138f5c1577b9b7cf2bf", "bug_issue": 2034, "solve_pr": 2037, "call_graph": {"nodes": [{"id": "scanner/alpine.go::alpine::parseApkInfo"}, {"id": "scanner/alpine.go::alpine::parseInstalledPackages"}, {"id": "scanner/alpine.go::alpine::scanInstalledPackages"}, {"id": "scanner/alpine.go::alpine::scanPackages"}], "edges": [{"source": "scanner/alpine.go::alpine::parseInstalledPackages", "target": "scanner/alpine.go::alpine::parseApkInfo"}, {"source": "scanner/alpine.go::alpine::scanInstalledPackages", "target": "scanner/alpine.go::alpine::parseApkInfo"}]}, "graph_spec": "These functions support Alpine Linux package inventory for vulnerability scanning by collecting and parsing installed-package information. The inventory describes installed software and source-package metadata used in vulnerability assessment."} +{"repo": "future-architect/vuls", "buggy_commit": "6fca8d97c145fbe50a247dd222947a240639fd50", "bug_issue": 2217, "solve_pr": 2218, "call_graph": {"nodes": [{"id": "scanner/redhatbase.go::redhatBase::parseUpdatablePacksLine"}, {"id": "scanner/redhatbase.go::redhatBase::parseUpdatablePacksLines"}, {"id": "scanner/redhatbase.go::redhatBase::scanUpdatablePackages"}], "edges": [{"source": "scanner/redhatbase.go::redhatBase::parseUpdatablePacksLines", "target": "scanner/redhatbase.go::redhatBase::parseUpdatablePacksLine"}, {"source": "scanner/redhatbase.go::redhatBase::scanUpdatablePackages", "target": "scanner/redhatbase.go::redhatBase::parseUpdatablePacksLines"}]}, "graph_spec": "These functions collect available package-update information for Red Hat–family systems and represent it as package records. scanUpdatablePackages provides the scanning entry point, while parseUpdatablePacksLines and parseUpdatablePacksLine interpret repoquery text at whole-output and individual-line levels to identify packages and candidate versions. Candidate versions describe available software updates, supplying package-update context for vulnerability assessment."} +{"repo": "future-architect/vuls", "buggy_commit": "2923cbc645fbc7a37d50398eb2ab8febda8c3264", "bug_issue": 846, "solve_pr": 1382, "call_graph": {"nodes": [{"id": "gost/debian.go::Debian::DetectCVEs"}, {"id": "oval/debian.go::Debian::FillWithOval"}, {"id": "scanner/alpine.go::alpine::scanPackages"}, {"id": "scanner/base.go::base::runningKernel"}, {"id": "scanner/debian.go::debian::scanPackages"}, {"id": "scanner/freebsd.go::bsd::scanPackages"}, {"id": "scanner/redhatbase.go::redhatBase::scanInstalledPackages"}, {"id": "scanner/serverapi.go::ViaHTTP"}], "edges": [{"source": "scanner/alpine.go::alpine::scanPackages", "target": "scanner/base.go::base::runningKernel"}, {"source": "scanner/debian.go::debian::scanPackages", "target": "scanner/base.go::base::runningKernel"}, {"source": "scanner/freebsd.go::bsd::scanPackages", "target": "scanner/base.go::base::runningKernel"}, {"source": "scanner/redhatbase.go::redhatBase::scanInstalledPackages", "target": "scanner/base.go::base::runningKernel"}]}, "graph_spec": "The scoped package scanners collect operating-system package information for Alpine, Debian, FreeBSD, and Red Hat–based systems, supported by a shared function that identifies the running kernel’s release and version. The Debian Gost and OVAL functions enrich scan results with CVE information, connecting software inventories to records of known vulnerabilities and structured vulnerability definitions. ViaHTTP provides a scanning entry point that accepts server information through HTTP headers and a request body and returns a scan result."} +{"repo": "grafana/loki", "buggy_commit": "97d51f39cc86a2961944839438d12b0005c63f24", "bug_issue": 25407, "solve_pr": 25413, "call_graph": {"nodes": [{"id": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegex"}, {"id": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegexConcat"}, {"id": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegexConcatAlternates"}, {"id": "pkg/logql/log/filter.go::NewFilter"}, {"id": "pkg/logql/log/filter.go::RegexSimplifier::Simplify"}, {"id": "pkg/logql/log/filter.go::RegexSimplifier::simplifyAlternate"}, {"id": "pkg/logql/log/filter.go::RegexSimplifier::simplifyConcat"}, {"id": "pkg/logql/log/filter.go::RegexSimplifier::simplifyConcatAlternate"}, {"id": "pkg/logql/log/filter.go::parseRegexpFilter"}], "edges": [{"source": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegex", "target": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegex"}, {"source": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegex", "target": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegexConcat"}, {"source": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegexConcat", "target": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegexConcatAlternates"}, {"source": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegexConcatAlternates", "target": "pkg/engine/internal/planner/logical/logical_optimize.go::simplifyRegexPass::simplifyRegexConcat"}, {"source": "pkg/logql/log/filter.go::NewFilter", "target": "pkg/logql/log/filter.go::parseRegexpFilter"}, {"source": "pkg/logql/log/filter.go::RegexSimplifier::Simplify", "target": "pkg/logql/log/filter.go::RegexSimplifier::Simplify"}, {"source": "pkg/logql/log/filter.go::RegexSimplifier::Simplify", "target": "pkg/logql/log/filter.go::RegexSimplifier::simplifyAlternate"}, {"source": "pkg/logql/log/filter.go::RegexSimplifier::Simplify", "target": "pkg/logql/log/filter.go::RegexSimplifier::simplifyConcat"}, {"source": "pkg/logql/log/filter.go::RegexSimplifier::simplifyAlternate", "target": "pkg/logql/log/filter.go::RegexSimplifier::Simplify"}, {"source": "pkg/logql/log/filter.go::RegexSimplifier::simplifyConcat", "target": "pkg/logql/log/filter.go::RegexSimplifier::simplifyConcatAlternate"}, {"source": "pkg/logql/log/filter.go::RegexSimplifier::simplifyConcatAlternate", "target": "pkg/logql/log/filter.go::RegexSimplifier::simplifyConcat"}, {"source": "pkg/logql/log/filter.go::parseRegexpFilter", "target": "pkg/logql/log/filter.go::RegexSimplifier::Simplify"}]}, "graph_spec": "These functions support LogQL filtering by constructing log-line filters from match expressions and simplifying regular expressions into literal-based filters or logical-plan expressions. Their simplification responsibilities cover alternation (pattern choices), concatenation (joined pattern components), and combinations of those concepts across query planning and filter construction."} +{"repo": "gravitational/teleport", "buggy_commit": "ca81b4a0c11f2a7412b8b5d086a9f8eb6e61d287", "bug_issue": 10589, "solve_pr": 10719, "call_graph": {"nodes": [{"id": "lib/sshutils/x11/display.go::Display::Dial"}, {"id": "lib/sshutils/x11/display.go::Display::Listen"}, {"id": "lib/sshutils/x11/display.go::Display::unixSocket"}], "edges": [{"source": "lib/sshutils/x11/display.go::Display::Dial", "target": "lib/sshutils/x11/display.go::Display::unixSocket"}, {"source": "lib/sshutils/x11/display.go::Display::Listen", "target": "lib/sshutils/x11/display.go::Display::unixSocket"}]}, "graph_spec": "An X server manages graphical displays and input, while X11 forwarding connects remote graphical applications to a local display. Within this scope, Display.Dial opens a connection to an X server display, Display.Listen opens a listener for display connections, and Display.unixSocket supplies the display’s associated Unix-domain socket address for these operations."} +{"repo": "gravitational/teleport", "buggy_commit": "e2b1e9f54803484660644237a5f784aa68b7190c", "bug_issue": 11779, "solve_pr": 11878, "call_graph": {"nodes": [{"id": "integration/helpers.go::TeleInstance::Create"}, {"id": "integration/helpers.go::TeleInstance::CreateEx"}, {"id": "integration/helpers.go::TeleInstance::Reset"}, {"id": "lib/auth/init.go::Init"}, {"id": "lib/auth/init.go::migrateDBAuthority"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::initAuthService"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "tool/teleport/common/teleport.go::OnStart"}], "edges": [{"source": "integration/helpers.go::TeleInstance::Create", "target": "integration/helpers.go::TeleInstance::CreateEx"}, {"source": "integration/helpers.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/auth/init.go::Init", "target": "lib/auth/init.go::migrateDBAuthority"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initAuthService"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::initAuthService", "target": "lib/auth/init.go::Init"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}]}, "graph_spec": "The scope must preserve Teleport lifecycle and auth initialization semantics: `TeleInstance.Create` delegates to `CreateEx`, which builds a complete isolated configuration (data directory, cluster identity, authorities, trusted clusters, addresses, storage, and optional services), creates the process through `NewTeleport`, and provisions configured users/roles when auth is enabled; `Reset` must fully close and wait for the prior process before recreating it from the retained configuration. `OnStart`/`Run` must construct a process, start it, require a readiness event within the startup deadline, then handle exit or reload signals, replacing processes only after the replacement is ready and gracefully shutting down the old one. `NewTeleport` must validate configuration, prepare persistent identity/storage state, and initialize only configured services; auth initialization must establish storage and audit/event plumbing before calling `auth.Init`. `Init` must serialize backend initialization, apply bootstrap resources only on first start, preserve an existing cluster name, install configured authorities/roles/tunnels and defaults, and ensure required certificate authorities exist. During that initialization, `migrateDBAuthority` must examine the local and trusted clusters, leave existing Database CAs untouched, and create a Database CA from an existing Host CA only when the Database CA is absent, while tolerating first-start cases where neither exists."} +{"repo": "gravitational/teleport", "buggy_commit": "8bca6e20c6c7374080180f7a5b5ea62bb15c136c", "bug_issue": 13898, "solve_pr": 13918, "call_graph": {"nodes": [{"id": "api/client/inventory.go::NewUpstreamInventoryControlStream"}, {"id": "lib/auth/auth.go::Server::RegisterInventoryControlStream"}, {"id": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterInventoryControlStream"}, {"id": "lib/auth/grpcserver.go::GRPCServer::InventoryControlStream"}, {"id": "lib/inventory/controller.go::Controller::RegisterControlStream"}, {"id": "lib/inventory/controller.go::Controller::handleControlStream"}, {"id": "lib/inventory/controller.go::Controller::handleHeartbeat"}, {"id": "lib/inventory/controller.go::Controller::handleSSHServerHB"}], "edges": [{"source": "lib/auth/auth.go::Server::RegisterInventoryControlStream", "target": "lib/inventory/controller.go::Controller::RegisterControlStream"}, {"source": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterInventoryControlStream", "target": "lib/auth/auth.go::Server::RegisterInventoryControlStream"}, {"source": "lib/auth/grpcserver.go::GRPCServer::InventoryControlStream", "target": "api/client/inventory.go::NewUpstreamInventoryControlStream"}, {"source": "lib/inventory/controller.go::Controller::RegisterControlStream", "target": "lib/inventory/controller.go::Controller::handleControlStream"}, {"source": "lib/inventory/controller.go::Controller::handleControlStream", "target": "lib/inventory/controller.go::Controller::handleHeartbeat"}, {"source": "lib/inventory/controller.go::Controller::handleHeartbeat", "target": "lib/inventory/controller.go::Controller::handleSSHServerHB"}]}, "graph_spec": "These functions provide the auth-server side of Teleport’s inventory control streams: bidirectional connections through which instances advertise their presence, version, and active services. They wrap the gRPC stream, support registration through authorization and auth-service layers, and manage incoming messages and keepalives in the inventory controller. The heartbeat handlers process instance-state announcements, including SSH server descriptions, to support server presence and liveness tracking."} +{"repo": "gravitational/teleport", "buggy_commit": "c2a8ff3e78b0e89c060719123caa153993d8bb46", "bug_issue": 13911, "solve_pr": 14021, "call_graph": {"nodes": [{"id": "integration/helpers/fixture.go::Fixture::NewTeleportInstance"}, {"id": "integration/helpers/fixture.go::Fixture::NewTeleportWithConfig"}, {"id": "integration/helpers/instance.go::NewInstance"}, {"id": "integration/helpers/instance.go::TeleInstance::CreateEx"}, {"id": "integration/helpers/instance.go::TeleInstance::Reset"}, {"id": "integration/helpers/instance.go::TeleInstance::StartApp"}, {"id": "integration/helpers/instance.go::TeleInstance::StartApps"}, {"id": "integration/helpers/instance.go::TeleInstance::StartDatabase"}, {"id": "integration/helpers/instance.go::TeleInstance::StartKube"}, {"id": "integration/helpers/instance.go::TeleInstance::StartNode"}, {"id": "integration/helpers/instance.go::TeleInstance::StartNodeAndProxy"}, {"id": "integration/helpers/instance.go::TeleInstance::StartProxy"}, {"id": "integration/helpers/instance.go::TeleInstance::StartReverseTunnelNode"}, {"id": "integration/helpers/instance.go::TeleInstance::startNode"}, {"id": "lib/auth/helpers.go::NewServerIdentity"}, {"id": "lib/auth/helpers.go::NewTestServer"}, {"id": "lib/auth/helpers.go::NewTestTLSServer"}, {"id": "lib/auth/helpers.go::generateCertificate"}, {"id": "lib/auth/init.go::GenerateIdentity"}, {"id": "lib/auth/native/native.go::GenerateKeyPair"}, {"id": "lib/auth/native/native.go::Keygen::GenerateKeyPair"}, {"id": "lib/client/interfaces.go::NewKey"}, {"id": "lib/reversetunnel/cache.go::certificateCache::generateHostCert"}, {"id": "lib/service/connect.go::TeleportProcess::connect"}, {"id": "lib/service/connect.go::TeleportProcess::connectToAuthService"}, {"id": "lib/service/connect.go::TeleportProcess::firstTimeConnect"}, {"id": "lib/service/connect.go::TeleportProcess::firstTimeConnectWithAssertions"}, {"id": "lib/service/connect.go::TeleportProcess::generateKeyPair"}, {"id": "lib/service/connect.go::TeleportProcess::reRegister"}, {"id": "lib/service/connect.go::TeleportProcess::reconnectToAuthService"}, {"id": "lib/service/connect.go::TeleportProcess::rotate"}, {"id": "lib/service/connect.go::TeleportProcess::syncRotationState"}, {"id": "lib/service/connect.go::TeleportProcess::syncRotationStateAndBroadcast"}, {"id": "lib/service/connect.go::TeleportProcess::syncRotationStateCycle"}, {"id": "lib/service/connect.go::TeleportProcess::syncServiceRotationState"}, {"id": "lib/service/db.go::TeleportProcess::initDatabases"}, {"id": "lib/service/desktop.go::TeleportProcess::initWindowsDesktopService"}, {"id": "lib/service/kubernetes.go::TeleportProcess::initKubernetes"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::GetIdentity"}, {"id": "lib/service/service.go::TeleportProcess::initApps"}, {"id": "lib/service/service.go::TeleportProcess::initInstance"}, {"id": "lib/service/service.go::TeleportProcess::initSSH"}, {"id": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "lib/srv/db/common/auth.go::dbAuth::appendClientCert"}, {"id": "lib/srv/db/common/auth.go::dbAuth::getClientCert"}, {"id": "lib/tbot/renew.go::Bot::generateIdentity"}, {"id": "lib/tbot/renew.go::Bot::generateImpersonatedIdentity"}, {"id": "lib/tbot/renew.go::Bot::getIdentityFromToken"}, {"id": "lib/tbot/renew.go::Bot::renew"}, {"id": "lib/tbot/renew.go::Bot::renewIdentityViaAuth"}, {"id": "lib/tbot/renew.go::Bot::renewLoop"}, {"id": "lib/tbot/renew.go::generateKeys"}, {"id": "lib/tbot/tbot.go::Bot::Run"}, {"id": "lib/tbot/tbot.go::Bot::initialize"}, {"id": "lib/tbot/testhelpers/srv.go::MakeAndRunTestAuthServer"}, {"id": "tool/tctl/common/auth_command.go::AuthCommand::GenerateAndSignKeys"}, {"id": "tool/tctl/common/auth_command.go::AuthCommand::generateHostKeys"}, {"id": "tool/teleport/common/teleport.go::OnStart"}, {"id": "tool/teleport/common/teleport.go::Run"}, {"id": "tool/teleport/main.go::main"}], "edges": [{"source": "integration/helpers/fixture.go::Fixture::NewTeleportInstance", "target": "integration/helpers/instance.go::NewInstance"}, {"source": "integration/helpers/fixture.go::Fixture::NewTeleportWithConfig", "target": "integration/helpers/fixture.go::Fixture::NewTeleportInstance"}, {"source": "integration/helpers/fixture.go::Fixture::NewTeleportWithConfig", "target": "integration/helpers/instance.go::TeleInstance::CreateEx"}, {"source": "integration/helpers/instance.go::NewInstance", "target": "lib/auth/native/native.go::Keygen::GenerateKeyPair"}, {"source": "integration/helpers/instance.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartApp", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartApps", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartDatabase", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartKube", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartNode", "target": "integration/helpers/instance.go::TeleInstance::startNode"}, {"source": "integration/helpers/instance.go::TeleInstance::StartNodeAndProxy", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartProxy", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::StartReverseTunnelNode", "target": "integration/helpers/instance.go::TeleInstance::startNode"}, {"source": "integration/helpers/instance.go::TeleInstance::startNode", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/auth/helpers.go::NewServerIdentity", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/auth/helpers.go::NewTestServer", "target": "lib/auth/helpers.go::NewTestTLSServer"}, {"source": "lib/auth/helpers.go::NewTestTLSServer", "target": "lib/auth/helpers.go::NewServerIdentity"}, {"source": "lib/auth/helpers.go::generateCertificate", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/auth/init.go::GenerateIdentity", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/auth/native/native.go::Keygen::GenerateKeyPair", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/client/interfaces.go::NewKey", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/reversetunnel/cache.go::certificateCache::generateHostCert", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::connect", "target": "lib/service/connect.go::TeleportProcess::firstTimeConnect"}, {"source": "lib/service/connect.go::TeleportProcess::connect", "target": "lib/service/connect.go::TeleportProcess::firstTimeConnectWithAssertions"}, {"source": "lib/service/connect.go::TeleportProcess::connect", "target": "lib/service/service.go::TeleportProcess::GetIdentity"}, {"source": "lib/service/connect.go::TeleportProcess::connectToAuthService", "target": "lib/service/connect.go::TeleportProcess::connect"}, {"source": "lib/service/connect.go::TeleportProcess::firstTimeConnect", "target": "lib/service/connect.go::TeleportProcess::generateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::firstTimeConnectWithAssertions", "target": "lib/service/connect.go::TeleportProcess::generateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::generateKeyPair", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::reRegister", "target": "lib/auth/init.go::GenerateIdentity"}, {"source": "lib/service/connect.go::TeleportProcess::reRegister", "target": "lib/service/connect.go::TeleportProcess::generateKeyPair"}, {"source": "lib/service/connect.go::TeleportProcess::reconnectToAuthService", "target": "lib/service/connect.go::TeleportProcess::connectToAuthService"}, {"source": "lib/service/connect.go::TeleportProcess::rotate", "target": "lib/service/connect.go::TeleportProcess::reRegister"}, {"source": "lib/service/connect.go::TeleportProcess::syncRotationState", "target": "lib/service/connect.go::TeleportProcess::syncServiceRotationState"}, {"source": "lib/service/connect.go::TeleportProcess::syncRotationStateAndBroadcast", "target": "lib/service/connect.go::TeleportProcess::syncRotationState"}, {"source": "lib/service/connect.go::TeleportProcess::syncRotationStateCycle", "target": "lib/service/connect.go::TeleportProcess::syncRotationStateAndBroadcast"}, {"source": "lib/service/connect.go::TeleportProcess::syncServiceRotationState", "target": "lib/service/connect.go::TeleportProcess::rotate"}, {"source": "lib/service/db.go::TeleportProcess::initDatabases", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/desktop.go::TeleportProcess::initWindowsDesktopService", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/kubernetes.go::TeleportProcess::initKubernetes", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/db.go::TeleportProcess::initDatabases"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/desktop.go::TeleportProcess::initWindowsDesktopService"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/kubernetes.go::TeleportProcess::initKubernetes"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initInstance"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initSSH"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::GetIdentity", "target": "lib/auth/init.go::GenerateIdentity"}, {"source": "lib/service/service.go::TeleportProcess::initApps", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/service.go::TeleportProcess::initInstance", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/service.go::TeleportProcess::initSSH", "target": "lib/service/service.go::TeleportProcess::registerWithAuthServer"}, {"source": "lib/service/service.go::TeleportProcess::registerWithAuthServer", "target": "lib/service/connect.go::TeleportProcess::reconnectToAuthService"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/srv/db/common/auth.go::dbAuth::appendClientCert", "target": "lib/srv/db/common/auth.go::dbAuth::getClientCert"}, {"source": "lib/srv/db/common/auth.go::dbAuth::getClientCert", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/tbot/renew.go::Bot::generateIdentity", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/tbot/renew.go::Bot::generateImpersonatedIdentity", "target": "lib/tbot/renew.go::Bot::generateIdentity"}, {"source": "lib/tbot/renew.go::Bot::getIdentityFromToken", "target": "lib/tbot/renew.go::generateKeys"}, {"source": "lib/tbot/renew.go::Bot::renew", "target": "lib/tbot/renew.go::Bot::generateImpersonatedIdentity"}, {"source": "lib/tbot/renew.go::Bot::renew", "target": "lib/tbot/renew.go::Bot::renewIdentityViaAuth"}, {"source": "lib/tbot/renew.go::Bot::renewIdentityViaAuth", "target": "lib/tbot/renew.go::Bot::getIdentityFromToken"}, {"source": "lib/tbot/renew.go::Bot::renewLoop", "target": "lib/tbot/renew.go::Bot::renew"}, {"source": "lib/tbot/renew.go::generateKeys", "target": "lib/auth/native/native.go::GenerateKeyPair"}, {"source": "lib/tbot/tbot.go::Bot::Run", "target": "lib/tbot/renew.go::Bot::renewLoop"}, {"source": "lib/tbot/tbot.go::Bot::Run", "target": "lib/tbot/tbot.go::Bot::initialize"}, {"source": "lib/tbot/tbot.go::Bot::initialize", "target": "lib/tbot/renew.go::Bot::getIdentityFromToken"}, {"source": "lib/tbot/testhelpers/srv.go::MakeAndRunTestAuthServer", "target": "lib/service/service.go::NewTeleport"}, {"source": "tool/tctl/common/auth_command.go::AuthCommand::GenerateAndSignKeys", "target": "tool/tctl/common/auth_command.go::AuthCommand::generateHostKeys"}, {"source": "tool/tctl/common/auth_command.go::AuthCommand::generateHostKeys", "target": "lib/client/interfaces.go::NewKey"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}, {"source": "tool/teleport/common/teleport.go::Run", "target": "tool/teleport/common/teleport.go::OnStart"}, {"source": "tool/teleport/main.go::main", "target": "tool/teleport/common/teleport.go::Run"}]}, "graph_spec": "These functions create and run Teleport services and test instances for infrastructure access, covering authentication, proxies, SSH nodes, applications, databases, Kubernetes, and Windows desktops. They manage service registration, authentication connections, cryptographic keys, and SSH/TLS identities and certificates—the credentials that establish trust between services and protected resources—including credential renewal and certificate-authority rotation. The scope also includes command-line startup and credential signing, database client authentication, and Machine ID bot initialization and identity renewal for automated access."} +{"repo": "gravitational/teleport", "buggy_commit": "adc37b4ba31b1217a36a8aadbf72655a99a6eb95", "bug_issue": 14359, "solve_pr": 14867, "call_graph": {"nodes": [{"id": "lib/utils/ec2.go::InstanceMetadataClient::IsAvailable"}], "edges": []}, "graph_spec": "InstanceMetadataClient.IsAvailable checks the availability of Amazon EC2 instance metadata, accepting a context and returning a boolean availability indication. Instance metadata provides information about the running EC2 instance; this method lets callers assess access to that information through the metadata client."} +{"repo": "gravitational/teleport", "buggy_commit": "b3822abafa5e2254886eaf320711cd1ef9eb2830", "bug_issue": 31816, "solve_pr": 32694, "call_graph": {"nodes": [{"id": "lib/devicetrust/enroll/enroll.go::Ceremony::RunAdmin"}, {"id": "tool/tsh/common/device.go::deviceEnrollCommand::run"}, {"id": "tool/tsh/common/device.go::printEnrollOutcome"}], "edges": [{"source": "tool/tsh/common/device.go::deviceEnrollCommand::run", "target": "lib/devicetrust/enroll/enroll.go::Ceremony::RunAdmin"}, {"source": "tool/tsh/common/device.go::deviceEnrollCommand::run", "target": "tool/tsh/common/device.go::printEnrollOutcome"}]}, "graph_spec": "These functions support enrolling the current device into Teleport Device Trust, where registration records a device in the inventory and enrollment establishes its credentials for trusted access. `deviceEnrollCommand.run` provides the command-line enrollment entry point, `Ceremony.RunAdmin` supports administrator-driven registration and enrollment and returns the device and an outcome indicator, and `printEnrollOutcome` presents the enrollment outcome to the user."} +{"repo": "gravitational/teleport", "buggy_commit": "88152574bf3da2236df960af5fe7cf98a236d0a0", "bug_issue": 36838, "solve_pr": 36899, "call_graph": {"nodes": [{"id": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::findUnusedID"}, {"id": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::generateRSA"}], "edges": [{"source": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::generateRSA", "target": "lib/auth/keystore/pkcs11.go::pkcs11KeyStore::findUnusedID"}]}, "graph_spec": "PKCS#11 RSA generation must serialize the combined identifier-selection and key-creation operation so concurrent requests cannot select the same HSM identifier. It must select an identifier bound to the local host: ordinary HSMs use a newly generated UUID, while YubiHSM uses the first unoccupied two-byte CKA_ID in the permitted range 0x0001–0xfffe, excluding its reserved endpoint values; lookup errors or exhaustion must prevent creation and be returned as errors. The selected logical identifier must convert to the exact PKCS#11 identifier format for that HSM, and a successful operation must create a key pair labeled with the local host UUID at the configured RSA key size, returning both its signer and a serialized PKCS#11 key reference that preserves the host and key ID for later retrieval. Any failure in ID generation, conversion, HSM creation, or reference serialization must return no partial successful result, and serialization must always be released."} +{"repo": "gravitational/teleport", "buggy_commit": "1d63421c48e300bb10efc7ab7aa759e61ce8db3a", "bug_issue": 3869, "solve_pr": 4234, "call_graph": {"nodes": [{"id": "lib/auth/apiserver.go::APIServer::getRemoteCluster"}, {"id": "lib/auth/auth_with_roles.go::AuthWithRoles::GetRemoteCluster"}, {"id": "lib/auth/trustedcluster.go::AuthServer::GetRemoteCluster"}, {"id": "lib/auth/trustedcluster.go::AuthServer::GetRemoteClusters"}, {"id": "lib/auth/trustedcluster.go::AuthServer::updateRemoteClusterStatus"}], "edges": [{"source": "lib/auth/apiserver.go::APIServer::getRemoteCluster", "target": "lib/auth/auth_with_roles.go::AuthWithRoles::GetRemoteCluster"}, {"source": "lib/auth/auth_with_roles.go::AuthWithRoles::GetRemoteCluster", "target": "lib/auth/trustedcluster.go::AuthServer::GetRemoteCluster"}, {"source": "lib/auth/trustedcluster.go::AuthServer::GetRemoteCluster", "target": "lib/auth/trustedcluster.go::AuthServer::updateRemoteClusterStatus"}, {"source": "lib/auth/trustedcluster.go::AuthServer::GetRemoteClusters", "target": "lib/auth/trustedcluster.go::AuthServer::updateRemoteClusterStatus"}]}, "graph_spec": "Remote-cluster reads must enforce the caller’s read permission for a named resource (or list permission for collection reads), retrieve the requested existing cluster, and serialize it in the requested API version while preserving its resource identity. Before returning individual or collection results, each cluster’s runtime status must be reconciled from the latest tunnel connection: use cluster keep-alive configuration to classify the connection online/offline, mark clusters with no connections offline, and report each cluster’s latest known heartbeat in UTC without regressing when connections disappear, while propagating retrieval, configuration, and tunnel errors."} +{"repo": "gravitational/teleport", "buggy_commit": "cdcb24f178e73c734eab5b6cb2c25023c6cf300f", "bug_issue": 4083, "solve_pr": 4282, "call_graph": {"nodes": [{"id": "integration/helpers.go::TeleInstance::CreateEx"}, {"id": "integration/helpers.go::TeleInstance::Reset"}, {"id": "lib/backend/report.go::Reporter::CompareAndSwap"}, {"id": "lib/backend/report.go::Reporter::Create"}, {"id": "lib/backend/report.go::Reporter::Delete"}, {"id": "lib/backend/report.go::Reporter::DeleteRange"}, {"id": "lib/backend/report.go::Reporter::Get"}, {"id": "lib/backend/report.go::Reporter::GetRange"}, {"id": "lib/backend/report.go::Reporter::KeepAlive"}, {"id": "lib/backend/report.go::Reporter::Put"}, {"id": "lib/backend/report.go::Reporter::Update"}, {"id": "lib/backend/report.go::Reporter::trackRequest"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::initAuthService"}, {"id": "lib/service/service.go::TeleportProcess::initAuthStorage"}, {"id": "lib/service/service.go::TeleportProcess::initProxy"}, {"id": "lib/service/service.go::TeleportProcess::initProxyEndpoint"}, {"id": "lib/service/service.go::TeleportProcess::initSSH"}, {"id": "lib/service/service.go::TeleportProcess::newAccessCache"}, {"id": "lib/service/service.go::TeleportProcess::newLocalCache"}, {"id": "lib/service/service.go::TeleportProcess::newLocalCacheForProxy"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "tool/teleport/common/teleport.go::OnStart"}, {"id": "tool/teleport/common/teleport.go::Run"}], "edges": [{"source": "integration/helpers.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/backend/report.go::Reporter::CompareAndSwap", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/backend/report.go::Reporter::Create", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/backend/report.go::Reporter::Delete", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/backend/report.go::Reporter::DeleteRange", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/backend/report.go::Reporter::Get", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/backend/report.go::Reporter::GetRange", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/backend/report.go::Reporter::KeepAlive", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/backend/report.go::Reporter::Put", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/backend/report.go::Reporter::Update", "target": "lib/backend/report.go::Reporter::trackRequest"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initAuthService"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initProxy"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initSSH"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::initAuthService", "target": "lib/service/service.go::TeleportProcess::initAuthStorage"}, {"source": "lib/service/service.go::TeleportProcess::initAuthService", "target": "lib/service/service.go::TeleportProcess::newAccessCache"}, {"source": "lib/service/service.go::TeleportProcess::initProxy", "target": "lib/service/service.go::TeleportProcess::initProxyEndpoint"}, {"source": "lib/service/service.go::TeleportProcess::initProxyEndpoint", "target": "lib/service/service.go::TeleportProcess::newLocalCacheForProxy"}, {"source": "lib/service/service.go::TeleportProcess::initSSH", "target": "lib/service/service.go::TeleportProcess::newLocalCache"}, {"source": "lib/service/service.go::TeleportProcess::newLocalCache", "target": "lib/service/service.go::TeleportProcess::newAccessCache"}, {"source": "lib/service/service.go::TeleportProcess::newLocalCacheForProxy", "target": "lib/service/service.go::TeleportProcess::newLocalCache"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}, {"source": "tool/teleport/common/teleport.go::Run", "target": "tool/teleport/common/teleport.go::OnStart"}]}, "graph_spec": "The CLI start path must merge configuration and run a service process; `Run` must create a non-nil process, start it, and on reload preserve exported listener descriptors, start and confirm the replacement before gracefully retiring the predecessor (or report a bounded shutdown failure). Process construction must validate and normalize configuration, establish durable process identity/state, initialize only enabled auth/node/proxy roles, and expose readiness only after their required endpoints are registered. Auth initialization must select and migrate the configured storage backend, wrap it with sanitizing/reporting, provide an authorization cache when enabled, and register authenticated TLS and heartbeat lifecycle services; node and proxy endpoints must wait for their authenticated identities and use either the configured local cache or the live access point, with proxy-specific cache setup and orderly listener/service shutdown. Integration instances must retain the generated configuration and process, configure users only when auth is enabled, and recreate a stopped process from that same configuration. Every reporter backend operation must preserve the wrapped backend’s result/error while recording latency, request, and applicable failure metrics; it must also count the request by component and a bounded, prefix-normalized key (marking ranges), ignore empty keys, and bound top-request labels through LRU eviction."} +{"repo": "gravitational/teleport", "buggy_commit": "762836a22f5540024f14f51f127c2e36721aa1bc", "bug_issue": 4145, "solve_pr": 4160, "call_graph": {"nodes": [{"id": "lib/backend/firestore/firestorebk.go::FirestoreBackend::Put"}], "edges": []}, "graph_spec": "`Put` must atomically upsert a complete record in the configured Firestore collection, using a deterministic Firestore-safe document ID derived from the byte key while retaining that original key and exact binary value. Each write records fresh backend-clock timestamp/ID metadata and stores the requested expiration in UTC-second form, clearing expiration when none is supplied so prior document fields do not persist. On a successful commit it returns a lease identifying the same key; on failure it returns no lease and propagates the converted datastore/context error."} +{"repo": "gravitational/teleport", "buggy_commit": "148d02a43019be9e8b5acaf4769da3cdcd53c642", "bug_issue": 4408, "solve_pr": 4419, "call_graph": {"nodes": [{"id": "tool/tctl/common/auth_command.go::AuthCommand::GenerateAndSignKeys"}, {"id": "tool/tctl/common/auth_command.go::AuthCommand::TryRun"}, {"id": "tool/tctl/common/auth_command.go::AuthCommand::checkProxyAddr"}, {"id": "tool/tctl/common/auth_command.go::AuthCommand::generateUserKeys"}], "edges": [{"source": "tool/tctl/common/auth_command.go::AuthCommand::GenerateAndSignKeys", "target": "tool/tctl/common/auth_command.go::AuthCommand::generateUserKeys"}, {"source": "tool/tctl/common/auth_command.go::AuthCommand::TryRun", "target": "tool/tctl/common/auth_command.go::AuthCommand::GenerateAndSignKeys"}, {"source": "tool/tctl/common/auth_command.go::AuthCommand::generateUserKeys", "target": "tool/tctl/common/auth_command.go::AuthCommand::checkProxyAddr"}]}, "graph_spec": "These functions support Teleport’s administrative identity issuance workflow: TryRun dispatches authentication commands, GenerateAndSignKeys provides key-pair generation and signing, generateUserKeys handles user identity credentials, and checkProxyAddr validates the associated proxy address. These responsibilities connect certificate-authority-signed credentials, which bind a user’s identity and roles, with identity files and proxy connection information used by clients to access a Teleport cluster."} +{"repo": "gravitational/teleport", "buggy_commit": "02dbf6a72eb851138dfa0d0e2fdde5271209e681", "bug_issue": 5096, "solve_pr": 5166, "call_graph": {"nodes": [{"id": "lib/httplib/httplib.go::MakeHandler"}, {"id": "lib/httplib/httplib.go::MakeStdHandler"}, {"id": "lib/kube/proxy/forwarder.go::Forwarder::authenticate"}, {"id": "lib/kube/proxy/forwarder.go::Forwarder::newClusterSessionDirect"}, {"id": "lib/kube/proxy/forwarder.go::Forwarder::newClusterSessionLocal"}, {"id": "lib/kube/proxy/forwarder.go::Forwarder::newClusterSessionRemoteCluster"}, {"id": "lib/kube/proxy/forwarder.go::Forwarder::withAuth"}, {"id": "lib/kube/proxy/forwarder.go::Forwarder::withAuthStd"}], "edges": []}, "graph_spec": "MakeHandler and MakeStdHandler adapt application handlers that return results and errors to httprouter and standard HTTP handler interfaces. Within the Kubernetes API proxy, authenticate establishes user and target-cluster authentication context, while withAuth and withAuthStd provide that context to HTTP handlers. newClusterSessionDirect, newClusterSessionLocal, and newClusterSessionRemoteCluster create authenticated forwarding sessions for direct service, local-cluster, and remote-cluster access, connecting the user's identity with the credentials and proxy resources needed to reach the target cluster."} +{"repo": "gravitational/teleport", "buggy_commit": "472df28f2aa78c2995ef4ca5790cf7bd27f358f3", "bug_issue": 5695, "solve_pr": 5729, "call_graph": {"nodes": [{"id": "lib/sshutils/scp/scp.go::command::Execute"}, {"id": "lib/sshutils/scp/scp.go::command::processCommand"}, {"id": "lib/sshutils/scp/scp.go::command::receiveFile"}, {"id": "lib/sshutils/scp/scp.go::command::serveSink"}], "edges": [{"source": "lib/sshutils/scp/scp.go::command::Execute", "target": "lib/sshutils/scp/scp.go::command::serveSink"}, {"source": "lib/sshutils/scp/scp.go::command::processCommand", "target": "lib/sshutils/scp/scp.go::command::receiveFile"}, {"source": "lib/sshutils/scp/scp.go::command::serveSink", "target": "lib/sshutils/scp/scp.go::command::processCommand"}]}, "graph_spec": "The scoped SCP command must dispatch non-source execution to sink mode and propagate protocol or I/O errors. Sink handling validates directory-target constraints, establishes the destination root, sends the initial success byte, then consumes the sender’s byte-oriented commands until clean EOF, rejecting malformed, warning/error, or unknown commands and acknowledging each successfully processed command. Command processing must preserve SCP state transitions: file commands create files at the target or current directory path, directory/end commands maintain and unwind nested paths, and time commands associate metadata with subsequent entries. Receiving a file must acknowledge readiness before consuming exactly the declared length, then apply the transmitted mode and any pending access/modification times, reporting failures to the peer through the command error path."} +{"repo": "gravitational/teleport", "buggy_commit": "103f3de22f3986d4f73d931b1e433e011b26a488", "bug_issue": 5708, "solve_pr": 5710, "call_graph": {"nodes": [{"id": "integration/helpers.go::TeleInstance::CreateEx"}, {"id": "integration/helpers.go::TeleInstance::Reset"}, {"id": "lib/auth/auth_with_roles.go::ServerWithRoles::DeleteRole"}, {"id": "lib/auth/init.go::Init"}, {"id": "lib/auth/init.go::migrateLegacyResources"}, {"id": "lib/auth/init.go::migrateOSS"}, {"id": "lib/auth/init.go::migrateOSSTrustedClusters"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::initAuthService"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "lib/services/role.go::NewOSSUserRole"}, {"id": "tool/tctl/common/user_command.go::UserCommand::Add"}, {"id": "tool/tctl/common/user_command.go::UserCommand::TryRun"}, {"id": "tool/tctl/common/user_command.go::UserCommand::legacyAdd"}, {"id": "tool/teleport/common/teleport.go::OnStart"}, {"id": "tool/teleport/common/teleport.go::Run"}], "edges": [{"source": "integration/helpers.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/auth/init.go::Init", "target": "lib/auth/init.go::migrateLegacyResources"}, {"source": "lib/auth/init.go::migrateLegacyResources", "target": "lib/auth/init.go::migrateOSS"}, {"source": "lib/auth/init.go::migrateOSS", "target": "lib/auth/init.go::migrateOSSTrustedClusters"}, {"source": "lib/auth/init.go::migrateOSS", "target": "lib/services/role.go::NewOSSUserRole"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initAuthService"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::initAuthService", "target": "lib/auth/init.go::Init"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "tool/tctl/common/user_command.go::UserCommand::Add", "target": "tool/tctl/common/user_command.go::UserCommand::legacyAdd"}, {"source": "tool/tctl/common/user_command.go::UserCommand::TryRun", "target": "tool/tctl/common/user_command.go::UserCommand::Add"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}, {"source": "tool/teleport/common/teleport.go::Run", "target": "tool/teleport/common/teleport.go::OnStart"}]}, "graph_spec": "The scope must initialize Teleport only from a validated configuration, establish/persist a host identity and required service defaults, construct the auth service, and run legacy-resource migration safely and idempotently: OSS migration installs the restricted built-in admin role, assigns previously implicit users and trusted-cluster mappings (including CA role maps), marks migrated resources, and leaves already migrated state unchanged while propagating backend failures. Service startup must create and start a process, support reload by bringing up the replacement before gracefully shutting down the old process, and terminate cleanly on exit. Auth role deletion must enforce authorization and preserve the OSS built-in admin role. `tctl users add` must distinguish legacy OSS arguments from role-based creation, reject mixed/roleless invalid combinations, validate referenced roles, create the user with appropriate traits/roles, and issue an invitation token. Integration instance creation and reset must rebuild a configured Teleport process, provision configured users/roles and credentials when auth is enabled, and close the prior process before recreation."} +{"repo": "gravitational/teleport", "buggy_commit": "9c25440e8d6de54447215934d4c4fae81067eb97", "bug_issue": 5804, "solve_pr": 6542, "call_graph": {"nodes": [{"id": "lib/client/mfa.go::PromptMFAChallenge"}, {"id": "lib/client/weblogin.go::SSHAgentMFALogin"}, {"id": "lib/utils/prompt/confirmation.go::Input"}, {"id": "tool/tsh/mfa.go::mfaRemoveCommand::run"}], "edges": [{"source": "lib/client/mfa.go::PromptMFAChallenge", "target": "lib/utils/prompt/confirmation.go::Input"}, {"source": "lib/client/weblogin.go::SSHAgentMFALogin", "target": "lib/client/mfa.go::PromptMFAChallenge"}, {"source": "tool/tsh/mfa.go::mfaRemoveCommand::run", "target": "lib/client/mfa.go::PromptMFAChallenge"}]}, "graph_spec": "MFA authentication must translate the server’s offered factors into an appropriate response: return an empty response when none is required; collect and preserve the entered OTP text for an OTP-only challenge; perform U2F authentication against an HTTPS proxy facet and return its signed response for U2F-only challenges; and, when both are available, offer both concurrently, accept the first successful factor, cancel the other, and report failure only if neither succeeds or the context ends. Free-form prompting must display the question followed by \": \", read from the shared context-aware standard-input reader, preserve the received text, and propagate read or cancellation errors. SSH MFA login must preserve compatibility with both legacy single-U2F and multi-U2F challenges, map challenges and responses without losing factor data, then submit the authenticated certificate request with the original login and routing parameters. MFA-device removal must authenticate the requested deletion through the server’s challenge/response stream, require the final acknowledgement before reporting success, and propagate connection, protocol, prompt, or stream errors."} +{"repo": "gravitational/teleport", "buggy_commit": "42beccb27e0e5797a10db05bf126e529273d2d95", "bug_issue": 5808, "solve_pr": 7293, "call_graph": {"nodes": [{"id": "integration/helpers.go::TeleInstance::Create"}, {"id": "integration/helpers.go::TeleInstance::CreateEx"}, {"id": "integration/helpers.go::TeleInstance::Reset"}, {"id": "integration/helpers.go::TeleInstance::StartProxy"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::initProxy"}, {"id": "lib/service/service.go::TeleportProcess::initProxyEndpoint"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "lib/srv/db/proxyserver.go::NewProxyServer"}, {"id": "lib/srv/db/proxyserver.go::ProxyServer::Connect"}, {"id": "lib/srv/db/proxyserver.go::ProxyServer::authorize"}, {"id": "lib/srv/db/proxyserver.go::ProxyServer::pickDatabaseServer"}, {"id": "lib/srv/db/proxyserver.go::ProxyServerConfig::CheckAndSetDefaults"}, {"id": "tool/teleport/common/teleport.go::OnStart"}, {"id": "tool/tsh/db.go::onListDatabases"}, {"id": "tool/tsh/tsh.go::Run"}, {"id": "tool/tsh/tsh.go::main"}], "edges": [{"source": "integration/helpers.go::TeleInstance::Create", "target": "integration/helpers.go::TeleInstance::CreateEx"}, {"source": "integration/helpers.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers.go::TeleInstance::StartProxy", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initProxy"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::initProxy", "target": "lib/service/service.go::TeleportProcess::initProxyEndpoint"}, {"source": "lib/service/service.go::TeleportProcess::initProxyEndpoint", "target": "lib/srv/db/proxyserver.go::NewProxyServer"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/srv/db/proxyserver.go::NewProxyServer", "target": "lib/srv/db/proxyserver.go::ProxyServerConfig::CheckAndSetDefaults"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}, {"source": "tool/tsh/tsh.go::Run", "target": "tool/tsh/db.go::onListDatabases"}, {"source": "tool/tsh/tsh.go::main", "target": "tool/tsh/tsh.go::Run"}]}, "graph_spec": "These functions create, recreate, and run configured Teleport processes and proxy services, supporting both integration instances with cluster trust relationships and daemon startup with lifecycle management. The database proxy functions configure the proxy, authorize client identities, select database services, and establish secure connections through reverse tunnels, which connect the proxy to services in remote clusters. The tsh entry points provide command-line execution, including listing databases available through Teleport."} +{"repo": "gravitational/teleport", "buggy_commit": "8886f8d708f7d664027e444c1e9463302e077841", "bug_issue": 6045, "solve_pr": 6721, "call_graph": {"nodes": [{"id": "lib/kube/kubeconfig/kubeconfig.go::UpdateWithClient"}, {"id": "tool/tsh/tsh.go::Run"}, {"id": "tool/tsh/tsh.go::main"}, {"id": "tool/tsh/tsh.go::onLogin"}, {"id": "tool/tsh/tsh.go::reissueWithRequests"}], "edges": [{"source": "tool/tsh/tsh.go::Run", "target": "tool/tsh/tsh.go::onLogin"}, {"source": "tool/tsh/tsh.go::main", "target": "tool/tsh/tsh.go::Run"}, {"source": "tool/tsh/tsh.go::onLogin", "target": "lib/kube/kubeconfig/kubeconfig.go::UpdateWithClient"}, {"source": "tool/tsh/tsh.go::reissueWithRequests", "target": "lib/kube/kubeconfig/kubeconfig.go::UpdateWithClient"}]}, "graph_spec": "The CLI entrypoint must normalize invocation aliases, parse flags and environment into a coherent context, dispatch the selected command through Run, and propagate command errors. Login must validate identity-format and input constraints, reuse or establish the requested proxy/cluster session, persist the resulting credentials/profile, and refresh Kubernetes configuration only when Kubernetes support is advertised. Kubernetes configuration must merge a Teleport cluster endpoint and trusted CA into the selected kubeconfig, generate either static TLS credentials or exec-plugin contexts for all registered Kubernetes clusters, preserve existing context metadata, and switch current context only to a requested registered cluster. Certificate reissuance must retain existing active access requests alongside newly supplied IDs, default routing to the current cluster when unspecified, then reissue, persist the profile, and synchronize kubeconfig."} +{"repo": "gravitational/teleport", "buggy_commit": "c12ce90636425daef82da2a7fe2a495e9064d1f8", "bug_issue": 6474, "solve_pr": 7414, "call_graph": {"nodes": [{"id": "lib/backend/etcdbk/etcd.go::EtcdBackend::asyncWatch"}, {"id": "lib/backend/etcdbk/etcd.go::EtcdBackend::watchEvents"}, {"id": "lib/backend/etcdbk/etcd.go::New"}], "edges": [{"source": "lib/backend/etcdbk/etcd.go::EtcdBackend::asyncWatch", "target": "lib/backend/etcdbk/etcd.go::EtcdBackend::watchEvents"}, {"source": "lib/backend/etcdbk/etcd.go::New", "target": "lib/backend/etcdbk/etcd.go::EtcdBackend::asyncWatch"}]}, "graph_spec": "`New` must produce a usable etcd-backed Backend that owns a live event pipeline, or fail without leaving side effects: it validates and defaults the config (non-empty prefix normalized to a leading '/', at least one peer, TLS material unless insecure, buffer-size and dial-timeout defaults), allocates the shared circular buffer at the configured size, scopes the backend's lifetime and the watch-start signal to cancelable child contexts of the caller's context, confirms the etcd nodes are reachable and meet the minimum supported version, and starts exactly one background `asyncWatch` supervisor before returning. `asyncWatch` is that supervisor: it repeatedly delegates to `watchEvents` while the backend context is live, and after each return waits a short bounded jittered delay; if the context is canceled during that wait it must stop rather than retry, otherwise it resets the shared buffer before the next watch attempt so watchers observe neither duplicates nor missing events across reconnects, and it closes `watchDone` exactly once on exit. `watchEvents` must establish an etcd watch over the configured prefix and signal watch-start promptly once established, then translate every received PUT/DELETE into a backend event (key prefix trimmed, deletes carrying no value, non-delete values decoded with lease expiry resolved) and forward them into the buffer in the same relative order as received even under concurrent processing; events that fail translation are skipped rather than aborting the watch, backpressure must never silently drop events, and the function returns promptly with a connection error when the etcd channel closes or the context ends, releasing its queue and derived context."} +{"repo": "gravitational/teleport", "buggy_commit": "c8670cdbfbe094c03cf7fd645a4b4159aaed6478", "bug_issue": 7827, "solve_pr": 7955, "call_graph": {"nodes": [{"id": "lib/auth/auth.go::Server::RegisterUsingToken"}, {"id": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterUsingToken"}, {"id": "lib/auth/clt.go::ProvisioningService::RegisterUsingToken"}], "edges": [{"source": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterUsingToken", "target": "lib/auth/auth.go::Server::RegisterUsingToken"}, {"source": "lib/auth/clt.go::ProvisioningService::RegisterUsingToken", "target": "lib/auth/auth_with_roles.go::ServerWithRoles::RegisterUsingToken"}]}, "graph_spec": "The scope implements the provisioning-token registration path, delegating from the client transport (ProvisioningService::RegisterUsingToken) through the role-scoped facade (ServerWithRoles::RegisterUsingToken) to the authoritative auth server (Server::RegisterUsingToken), with each layer preserving the same (*PackedKeys, error) contract. At the client boundary, a request lacking HostID, Token, or a valid system Role is rejected locally before any remote call; otherwise the request is sent to the token-registration endpoint and the decoded PackedKeys are returned, with transport or decode failures surfaced as errors and no keys. The role-scoped facade performs no independent authorization or request mutation and must forward both the request and the server's result/error unchanged, since the token itself carries its own authorization. The authoritative server must require a well-formed request, resolve the token against static configuration first (static tokens do not expire) and then ephemeral storage, treating unknown or expired tokens as access denied; expired ephemeral tokens are invalidated. It must reject any request whose role is not among the roles the token authorizes, and only on success generate and return credentials scoped to exactly that requested role, carrying the caller's principals, DNS names, supplied public keys, and substituting the caller's remote address for any 0.0.0.0 principal placeholder. Failures return nil keys with an error; no credentials are partially issued. Throughout this path the provisioning token is treated as a secret, so a failed registration must not disclose the caller's plaintext token in any log or diagnostic output it emits."} +{"repo": "gravitational/teleport", "buggy_commit": "885c893f2a45b8821ddcae1b4f372ee98f8065d5", "bug_issue": 7924, "solve_pr": 14712, "call_graph": {"nodes": [{"id": "integration/helpers/fixture.go::Fixture::NewTeleportWithConfig"}, {"id": "integration/helpers/instance.go::TeleInstance::CreateEx"}, {"id": "integration/helpers/instance.go::TeleInstance::Reset"}, {"id": "lib/service/service.go::NewTeleport"}, {"id": "lib/service/service.go::Run"}, {"id": "lib/service/service.go::TeleportProcess::initProxy"}, {"id": "lib/service/service.go::TeleportProcess::initProxyEndpoint"}, {"id": "lib/service/service.go::TeleportProcess::setupProxyListeners"}, {"id": "lib/service/service.go::newTeleportProcess"}, {"id": "lib/tbot/testhelpers/srv.go::MakeAndRunTestAuthServer"}, {"id": "tool/teleport/common/teleport.go::OnStart"}, {"id": "tool/teleport/common/teleport.go::Run"}, {"id": "tool/teleport/main.go::main"}], "edges": [{"source": "integration/helpers/fixture.go::Fixture::NewTeleportWithConfig", "target": "integration/helpers/instance.go::TeleInstance::CreateEx"}, {"source": "integration/helpers/instance.go::TeleInstance::CreateEx", "target": "lib/service/service.go::NewTeleport"}, {"source": "integration/helpers/instance.go::TeleInstance::Reset", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/service/service.go::NewTeleport", "target": "lib/service/service.go::TeleportProcess::initProxy"}, {"source": "lib/service/service.go::Run", "target": "lib/service/service.go::newTeleportProcess"}, {"source": "lib/service/service.go::TeleportProcess::initProxy", "target": "lib/service/service.go::TeleportProcess::initProxyEndpoint"}, {"source": "lib/service/service.go::TeleportProcess::initProxyEndpoint", "target": "lib/service/service.go::TeleportProcess::setupProxyListeners"}, {"source": "lib/service/service.go::newTeleportProcess", "target": "lib/service/service.go::NewTeleport"}, {"source": "lib/tbot/testhelpers/srv.go::MakeAndRunTestAuthServer", "target": "lib/service/service.go::NewTeleport"}, {"source": "tool/teleport/common/teleport.go::OnStart", "target": "lib/service/service.go::Run"}, {"source": "tool/teleport/common/teleport.go::Run", "target": "tool/teleport/common/teleport.go::OnStart"}, {"source": "tool/teleport/main.go::main", "target": "tool/teleport/common/teleport.go::Run"}]}, "graph_spec": "These functions support configuring, creating, and running Teleport daemons through the command-line entry point and service lifecycle APIs, including supervision, signal handling, and reloads. Teleport provides identity-aware access to infrastructure; the scoped proxy functions initialize its access endpoints and network listeners for web access, SSH forwarding, reverse tunnels, and Kubernetes connectivity. The scoped test helpers create configured Teleport instances, establish cluster trust, recreate instances, and provide running authentication servers for testing."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "58f4be9dde4e59b03c93b836c08ac606e1f94f1e", "bug_issue": 10390, "solve_pr": 10405, "call_graph": {"nodes": [{"id": "openlibrary/plugins/worksearch/schemes/works.py::WorkSearchScheme::q_to_solr_params"}], "edges": []}, "graph_spec": "`WorkSearchScheme.q_to_solr_params` must parse the user query with Open Library’s query rules and return Solr parameters that preserve both work-level relevance and edition constraints: publish a `userWorkQuery` with `work.` qualifiers normalized away and `edition.` clauses excluded (falling back to `*:*` if nothing remains), then construct an eDisMax work query with the configured text/phrase fields and bounded edition/reading-log boosts. Generated Solr query expressions must remain syntactically valid while preserving the user’s intended quoting and escaping semantics. When edition subqueries are enabled, translate only valid work predicates and applicable filter queries to edition fields (including `id_*` handling and edition-key values mapped to `/books/...`), remove unsupported predicates without invalidating the remaining query, expose consistent `userEdQuery`/`editions.userEdQuery` values, and enforce matching editions through parent/child filtering while retaining edition-less works. Edition subqueries must remain scoped to each matched work, request one edition, and project the requested edition fields (with sensible defaults that omit work-only author fields), while ordinary queries omit this edition machinery."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "08c5f93d9ba1d3a93efa2257c7cc5fd3515914da", "bug_issue": 2410, "solve_pr": 8296, "call_graph": {"nodes": [{"id": "openlibrary/catalog/add_book/__init__.py::find_enriched_match"}, {"id": "openlibrary/catalog/add_book/__init__.py::find_match"}, {"id": "openlibrary/catalog/add_book/__init__.py::load"}, {"id": "openlibrary/catalog/add_book/match.py::editions_match"}, {"id": "openlibrary/catalog/add_book/match.py::try_merge"}, {"id": "openlibrary/catalog/merge/merge_marc.py::build_titles"}, {"id": "openlibrary/catalog/utils/__init__.py::expand_record"}], "edges": [{"source": "openlibrary/catalog/add_book/__init__.py::find_enriched_match", "target": "openlibrary/catalog/add_book/match.py::editions_match"}, {"source": "openlibrary/catalog/add_book/__init__.py::find_enriched_match", "target": "openlibrary/catalog/utils/__init__.py::expand_record"}, {"source": "openlibrary/catalog/add_book/__init__.py::find_match", "target": "openlibrary/catalog/add_book/__init__.py::find_enriched_match"}, {"source": "openlibrary/catalog/add_book/__init__.py::load", "target": "openlibrary/catalog/add_book/__init__.py::find_match"}, {"source": "openlibrary/catalog/add_book/match.py::editions_match", "target": "openlibrary/catalog/utils/__init__.py::expand_record"}, {"source": "openlibrary/catalog/add_book/match.py::try_merge", "target": "openlibrary/catalog/add_book/match.py::editions_match"}, {"source": "openlibrary/catalog/utils/__init__.py::expand_record", "target": "openlibrary/catalog/merge/merge_marc.py::build_titles"}]}, "graph_spec": "The scope must load an import record only after required metadata is validated and normalized, build a candidate pool, and search deterministically through quick/exact checks before enriched matching; if no candidate qualifies it creates a new edition, otherwise it resolves redirects and updates the matched edition/work while preserving existing relationships and enriching missing metadata. Enriched identity decisions (and any merge attempt) must reject deleted records, compare normalized title variants, ISBNs, identifiers, dates, publishers, pagination, countries, and author names/dates through a thresholded score, and avoid duplicate candidate processing. Record expansion must consistently combine title and subtitle, normalize punctuation/articles and parenthetical variants, flatten all ISBN forms, omit unknown country sentinels, and derive comparable author database names; title-building must provide full, normalized, article-stripped, parenthetical, and bounded short forms for comparison rather than display."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "8221875b7c3f05c1a21ab7db1ddf542aee4fda3d", "bug_issue": 6294, "solve_pr": 6979, "call_graph": {"nodes": [{"id": "openlibrary/plugins/upstream/addbook.py::addbook::POST"}, {"id": "openlibrary/plugins/upstream/addbook.py::addbook::find_matches"}, {"id": "openlibrary/plugins/upstream/addbook.py::addbook::try_edition_match"}, {"id": "openlibrary/plugins/upstream/addbook.py::make_work"}], "edges": [{"source": "openlibrary/plugins/upstream/addbook.py::addbook::POST", "target": "openlibrary/plugins/upstream/addbook.py::addbook::find_matches"}, {"source": "openlibrary/plugins/upstream/addbook.py::addbook::find_matches", "target": "openlibrary/plugins/upstream/addbook.py::addbook::try_edition_match"}, {"source": "openlibrary/plugins/upstream/addbook.py::addbook::try_edition_match", "target": "openlibrary/plugins/upstream/addbook.py::make_work"}]}, "graph_spec": "The `/books/add` POST entrypoint is the sole caller of `find_matches`: after spam/recaptcha screening it unflattens the form, and only when no new author was created does it delegate match lookup, then dispatch on the result's shape (a list renders the candidate check page, an Edition routes to the edition-match flow, a Work routes to the work flow, and no result routes to creating a new work/edition). `find_matches` must normalize the input (publish year derived from the freeform publish date, author key taken from the first author) and return exactly one of the documented outcomes: `None` when the user chose 'none-of-these' or Solr found nothing, a Work when a single work but no edition matches, an Edition when an edition matches, or a list of candidate works when several match. When a work key is supplied it must consult `try_edition_match` for that work and fall back to the work itself if no edition matches; otherwise it attempts an edition match from the form fields first, and only if that fails does it run the looser title+author Solr query, treating the returned document count as the boundary (zero -> `None`, one -> that work, more than one -> candidates). `try_edition_match` must return `None` for insufficient evidence (no publisher, publish year, or id value), must return a list when Solr yields multiple work candidates, and when exactly one work is found must return the first edition consistent with the supplied publisher (fuzzy), publish year, and identifier, or `None` if none qualifies. `make_work` is the shared Solr document wrapper: it must preserve the source document's fields while presenting each result as a storage object whose authors are constructed from parallel `author_key`/`author_name` lists, and it must supply stable defaults (`cover_url`, `ia`, `first_publish_year`) so downstream match/rendering logic can rely on those attributes existing."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "4871a56fea27916cf3241a29ca57d75f9f3033b9", "bug_issue": 7264, "solve_pr": 7652, "call_graph": {"nodes": [{"id": "openlibrary/catalog/marc/parse.py::read_author_person"}, {"id": "openlibrary/catalog/marc/parse.py::read_authors"}, {"id": "openlibrary/catalog/marc/parse.py::read_contributions"}, {"id": "openlibrary/catalog/marc/parse.py::read_edition"}, {"id": "openlibrary/catalog/marc/parse.py::read_publisher"}, {"id": "openlibrary/catalog/marc/parse.py::read_title"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::POST"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"id": "openlibrary/plugins/importapi/code.py::importapi::POST"}, {"id": "openlibrary/plugins/importapi/code.py::parse_data"}, {"id": "openlibrary/plugins/openlibrary/code.py::bookpage::GET"}], "edges": [{"source": "openlibrary/catalog/marc/parse.py::read_authors", "target": "openlibrary/catalog/marc/parse.py::read_author_person"}, {"source": "openlibrary/catalog/marc/parse.py::read_contributions", "target": "openlibrary/catalog/marc/parse.py::read_author_person"}, {"source": "openlibrary/catalog/marc/parse.py::read_edition", "target": "openlibrary/catalog/marc/parse.py::read_authors"}, {"source": "openlibrary/catalog/marc/parse.py::read_edition", "target": "openlibrary/catalog/marc/parse.py::read_contributions"}, {"source": "openlibrary/catalog/marc/parse.py::read_edition", "target": "openlibrary/catalog/marc/parse.py::read_title"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::POST", "target": "openlibrary/catalog/marc/parse.py::read_edition"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::POST", "target": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import", "target": "openlibrary/catalog/marc/parse.py::read_edition"}, {"source": "openlibrary/plugins/importapi/code.py::importapi::POST", "target": "openlibrary/plugins/importapi/code.py::parse_data"}, {"source": "openlibrary/plugins/importapi/code.py::parse_data", "target": "openlibrary/catalog/marc/parse.py::read_edition"}, {"source": "openlibrary/plugins/openlibrary/code.py::bookpage::GET", "target": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}]}, "graph_spec": "These functions support importing bibliographic metadata into Open Library and accessing edition book pages by identifier. The MARC readers interpret library catalog records to produce author, contributor, title, publisher, and edition metadata; an edition is the book record prepared for import. The import interfaces accept submitted bibliographic data or retrieve Internet Archive items and metadata, while the book-page interface provides identifier-based access to editions."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "9a2c50c0e5a984b388fdea1b47cafb2cf46fdeca", "bug_issue": 7403, "solve_pr": 7405, "call_graph": {"nodes": [{"id": "openlibrary/catalog/marc/parse.py::read_edition"}, {"id": "openlibrary/catalog/marc/parse.py::read_languages"}, {"id": "openlibrary/catalog/marc/parse_xml.py::parse"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::POST"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"id": "openlibrary/plugins/importapi/code.py::importapi::POST"}, {"id": "openlibrary/plugins/importapi/code.py::parse_data"}], "edges": [{"source": "openlibrary/catalog/marc/parse_xml.py::parse", "target": "openlibrary/catalog/marc/parse.py::read_edition"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::POST", "target": "openlibrary/catalog/marc/parse.py::read_edition"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import", "target": "openlibrary/catalog/marc/parse.py::read_edition"}, {"source": "openlibrary/plugins/importapi/code.py::importapi::POST", "target": "openlibrary/plugins/importapi/code.py::parse_data"}, {"source": "openlibrary/plugins/importapi/code.py::parse_data", "target": "openlibrary/catalog/marc/parse.py::read_edition"}]}, "graph_spec": "The scope must preserve a consistent MARC-to-edition contract across XML parsing, direct import parsing, and Archive.org import: `read_edition` builds an importable edition dictionary, selecting usable 008 data, deriving publication/copyright metadata and country, combining valid 008 and 041 language codes with canonical mappings and duplicate suppression, retaining identifiers, bibliographic fields, contributors, subjects, and requiring a meaningful title (with documented work-title fallback). XML `parse` must normalize MARC XML records or collections, reject records with blank tags, and yield an empty result when no valid edition can be read. `parse_data` must discriminate supported RDF/OPDS/MARCXML, JSON, and binary-MARC payloads, invoke the same edition conversion for MARC, apply metadata headers, and report unsupported or malformed input through its defined errors. The import endpoints must enforce write authorization, validate identifiers/options, honor MARC and monograph requirements, propagate conversion failures as import errors, attach Archive.org source/cover fields, and load only the resulting validated edition while preserving bulk-record continuation metadata."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "409914bf541b32b2160200b7623060f2b5fab6c0", "bug_issue": 8245, "solve_pr": 8463, "call_graph": {"nodes": [{"id": "openlibrary/plugins/openlibrary/lists.py::ListRecord::from_input"}, {"id": "openlibrary/plugins/openlibrary/lists.py::lists_edit::POST"}, {"id": "openlibrary/plugins/upstream/addbook.py::addbook::POST"}, {"id": "openlibrary/plugins/upstream/addbook.py::author_edit::POST"}, {"id": "openlibrary/plugins/upstream/addbook.py::author_edit::process_input"}, {"id": "openlibrary/plugins/upstream/addtag.py::addtag::POST"}, {"id": "openlibrary/plugins/upstream/addtag.py::tag_edit::POST"}, {"id": "openlibrary/plugins/upstream/addtag.py::tag_edit::process_input"}, {"id": "openlibrary/plugins/upstream/utils.py::unflatten"}], "edges": [{"source": "openlibrary/plugins/openlibrary/lists.py::ListRecord::from_input", "target": "openlibrary/plugins/upstream/utils.py::unflatten"}, {"source": "openlibrary/plugins/openlibrary/lists.py::lists_edit::POST", "target": "openlibrary/plugins/openlibrary/lists.py::ListRecord::from_input"}, {"source": "openlibrary/plugins/upstream/addbook.py::addbook::POST", "target": "openlibrary/plugins/upstream/utils.py::unflatten"}, {"source": "openlibrary/plugins/upstream/addbook.py::author_edit::POST", "target": "openlibrary/plugins/upstream/addbook.py::author_edit::process_input"}, {"source": "openlibrary/plugins/upstream/addbook.py::author_edit::process_input", "target": "openlibrary/plugins/upstream/utils.py::unflatten"}, {"source": "openlibrary/plugins/upstream/addtag.py::addtag::POST", "target": "openlibrary/plugins/upstream/utils.py::unflatten"}, {"source": "openlibrary/plugins/upstream/addtag.py::tag_edit::POST", "target": "openlibrary/plugins/upstream/addtag.py::tag_edit::process_input"}, {"source": "openlibrary/plugins/upstream/addtag.py::tag_edit::process_input", "target": "openlibrary/plugins/upstream/utils.py::unflatten"}]}, "graph_spec": "The scoped handlers must decode submitted form/query data consistently: when prepopulation query parameters and submitted form fields provide the same key, the submitted form value must take precedence for the persisted record. `unflatten` recursively turns `--`-delimited keys into nested mappings and contiguous numeric-key mappings into ordered lists, while preserving scalar values. `ListRecord.from_input` must apply this to either request body or query input, normalize seed identifiers (including subject paths, OLIDs, comma-separated entries), discard empty seeds, and produce a record with defaults; `lists_edit.POST` must enforce write access, require a nonempty name, assign a new list key when creating, persist the complete list representation, and redirect to its key. Book/tag creation and edit flows must feed correctly nested data into matching or update logic, trim empty fields, preserve required list defaults and author-name normalization, then save or create/delete the addressed resource, honor spam/recaptcha and permission gates, report validation failures without losing form context, and redirect only after successful state transitions."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "eb8da9e755f4bf59f8f0bd2b021d3e49a87ccf4e", "bug_issue": 9002, "solve_pr": 10768, "call_graph": {"nodes": [{"id": "openlibrary/core/vendors.py::AmazonAPI::get_product"}, {"id": "openlibrary/core/vendors.py::AmazonAPI::get_products"}, {"id": "openlibrary/core/vendors.py::AmazonAPI::serialize"}, {"id": "openlibrary/core/vendors.py::clean_amazon_metadata_for_load"}, {"id": "scripts/affiliate_server.py::Submit::GET"}, {"id": "scripts/affiliate_server.py::process_amazon_batch"}], "edges": [{"source": "openlibrary/core/vendors.py::AmazonAPI::get_product", "target": "openlibrary/core/vendors.py::AmazonAPI::serialize"}, {"source": "openlibrary/core/vendors.py::AmazonAPI::get_products", "target": "openlibrary/core/vendors.py::AmazonAPI::serialize"}, {"source": "scripts/affiliate_server.py::Submit::GET", "target": "openlibrary/core/vendors.py::clean_amazon_metadata_for_load"}, {"source": "scripts/affiliate_server.py::process_amazon_batch", "target": "openlibrary/core/vendors.py::clean_amazon_metadata_for_load"}]}, "graph_spec": "Amazon lookups must accept one or many identifiers, honor throttling and marketplace/resource parameters, tolerate request/API failures, and return only present products; optional serialization must consistently transform each product into Open Library metadata, including affiliate URL/source record, ISBN-10/ISBN-13 derivation, title, contributors, publication, publisher, format, language, pricing and cover fields, while yielding an empty result for absent products and excluding DVD products. Metadata cleaning must retain only importable catalog fields, normalize Amazon titles into title/full-title/subtitle (recording the original when normalization removes content), and preserve non-ISBN Amazon identifiers separately when applicable. The affiliate GET endpoint must reject unrecognized identifiers, serve cached products as cleaned metadata, route valid ISBN-13 requests to the documented fallback when appropriate, enqueue cache misses with priority and staging intent, and distinguish immediate success, not-found, and asynchronous submission responses. Batch processing must fetch and serialize queued identifiers, cache every returned product under a stable ISBN-13 or ASIN key with expiration, and, when import storage is configured, stage cleaned records except those explicitly marked not to stage."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "2fba6ec7a455ce752662d45579d65fc8361e8784", "bug_issue": 927, "solve_pr": 5234, "call_graph": {"nodes": [{"id": "openlibrary/plugins/openlibrary/dev_instance.py::update_solr"}, {"id": "openlibrary/solr/update_work.py::do_updates"}, {"id": "openlibrary/solr/update_work.py::main"}, {"id": "openlibrary/solr/update_work.py::update_keys"}, {"id": "scripts/new-solr-updater.py::main"}, {"id": "scripts/new-solr-updater.py::update_keys"}, {"id": "scripts/solr_builder/solr_builder/solr_builder.py::main"}], "edges": [{"source": "openlibrary/plugins/openlibrary/dev_instance.py::update_solr", "target": "openlibrary/solr/update_work.py::update_keys"}, {"source": "openlibrary/solr/update_work.py::do_updates", "target": "openlibrary/solr/update_work.py::update_keys"}, {"source": "openlibrary/solr/update_work.py::main", "target": "openlibrary/solr/update_work.py::update_keys"}, {"source": "scripts/new-solr-updater.py::main", "target": "scripts/new-solr-updater.py::update_keys"}, {"source": "scripts/new-solr-updater.py::update_keys", "target": "openlibrary/solr/update_work.py::do_updates"}, {"source": "scripts/solr_builder/solr_builder/solr_builder.py::main", "target": "scripts/new-solr-updater.py::update_keys"}]}, "graph_spec": "These functions maintain Open Library’s Solr search index, the searchable representation of its catalog records, through edit-triggered updates, updates identified by record keys, and bulk index building. The development hook, update helpers, and command-line entry points connect catalog edits and reindexing workflows to the shared responsibility of inserting or updating search documents."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "6e27575f742fee046afbbb422ee423c75ccf8eae", "bug_issue": 9794, "solve_pr": 9839, "call_graph": {"nodes": [{"id": "openlibrary/catalog/add_book/__init__.py::find_exact_match"}, {"id": "openlibrary/catalog/add_book/__init__.py::find_match"}, {"id": "openlibrary/catalog/add_book/__init__.py::load"}, {"id": "openlibrary/core/imports.py::ImportItem::import_first_staged"}, {"id": "openlibrary/core/imports.py::ImportItem::single_import"}, {"id": "openlibrary/core/models.py::Edition::from_isbn"}, {"id": "openlibrary/plugins/books/code.py::books_json::GET"}, {"id": "openlibrary/plugins/books/dynlinks.py::dynlinks"}, {"id": "openlibrary/plugins/books/dynlinks.py::get_isbn_editiondict_map"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::POST"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::load_book"}, {"id": "openlibrary/plugins/importapi/code.py::importapi::POST"}, {"id": "openlibrary/plugins/openlibrary/api.py::sponsorship_eligibility_check::GET"}, {"id": "openlibrary/plugins/openlibrary/code.py::bookpage::GET"}, {"id": "openlibrary/plugins/openlibrary/code.py::isbn_lookup::GET"}, {"id": "openlibrary/plugins/worksearch/code.py::search::GET"}, {"id": "openlibrary/plugins/worksearch/code.py::search::isbn_redirect"}], "edges": [{"source": "openlibrary/catalog/add_book/__init__.py::find_match", "target": "openlibrary/catalog/add_book/__init__.py::find_exact_match"}, {"source": "openlibrary/catalog/add_book/__init__.py::load", "target": "openlibrary/catalog/add_book/__init__.py::find_match"}, {"source": "openlibrary/core/imports.py::ImportItem::import_first_staged", "target": "openlibrary/core/imports.py::ImportItem::single_import"}, {"source": "openlibrary/core/imports.py::ImportItem::single_import", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/core/models.py::Edition::from_isbn", "target": "openlibrary/core/imports.py::ImportItem::import_first_staged"}, {"source": "openlibrary/plugins/books/code.py::books_json::GET", "target": "openlibrary/plugins/books/dynlinks.py::dynlinks"}, {"source": "openlibrary/plugins/books/dynlinks.py::dynlinks", "target": "openlibrary/plugins/books/dynlinks.py::get_isbn_editiondict_map"}, {"source": "openlibrary/plugins/books/dynlinks.py::get_isbn_editiondict_map", "target": "openlibrary/core/models.py::Edition::from_isbn"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::POST", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::POST", "target": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import", "target": "openlibrary/plugins/importapi/code.py::ia_importapi::load_book"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::load_book", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/plugins/importapi/code.py::importapi::POST", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/plugins/openlibrary/api.py::sponsorship_eligibility_check::GET", "target": "openlibrary/core/models.py::Edition::from_isbn"}, {"source": "openlibrary/plugins/openlibrary/code.py::bookpage::GET", "target": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"source": "openlibrary/plugins/openlibrary/code.py::isbn_lookup::GET", "target": "openlibrary/core/models.py::Edition::from_isbn"}, {"source": "openlibrary/plugins/worksearch/code.py::search::GET", "target": "openlibrary/plugins/worksearch/code.py::search::isbn_redirect"}, {"source": "openlibrary/plugins/worksearch/code.py::search::isbn_redirect", "target": "openlibrary/core/models.py::Edition::from_isbn"}]}, "graph_spec": "The scoped functions support matching, importing, and retrieving Open Library edition records using bibliographic metadata and identifiers such as ISBNs, which identify published editions. They connect general, staged, and Internet Archive imports with catalog lookup, and expose edition information through book links, identifier-based pages, search navigation, and sponsorship eligibility responses."} +{"repo": "internetarchive/openlibrary", "buggy_commit": "6e27575f742fee046afbbb422ee423c75ccf8eae", "bug_issue": 9808, "solve_pr": 9839, "call_graph": {"nodes": [{"id": "openlibrary/catalog/add_book/__init__.py::find_exact_match"}, {"id": "openlibrary/catalog/add_book/__init__.py::find_match"}, {"id": "openlibrary/catalog/add_book/__init__.py::load"}, {"id": "openlibrary/core/imports.py::ImportItem::import_first_staged"}, {"id": "openlibrary/core/imports.py::ImportItem::single_import"}, {"id": "openlibrary/core/models.py::Edition::from_isbn"}, {"id": "openlibrary/core/vendors.py::create_edition_from_amazon_metadata"}, {"id": "openlibrary/plugins/books/code.py::books_json::GET"}, {"id": "openlibrary/plugins/books/dynlinks.py::dynlinks"}, {"id": "openlibrary/plugins/books/dynlinks.py::get_isbn_editiondict_map"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::POST"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"id": "openlibrary/plugins/importapi/code.py::ia_importapi::load_book"}, {"id": "openlibrary/plugins/importapi/code.py::importapi::POST"}, {"id": "openlibrary/plugins/openlibrary/api.py::price_api::GET"}, {"id": "openlibrary/plugins/openlibrary/api.py::sponsorship_eligibility_check::GET"}, {"id": "openlibrary/plugins/openlibrary/code.py::bookpage::GET"}, {"id": "openlibrary/plugins/openlibrary/code.py::isbn_lookup::GET"}, {"id": "openlibrary/plugins/worksearch/code.py::search::GET"}, {"id": "openlibrary/plugins/worksearch/code.py::search::isbn_redirect"}], "edges": [{"source": "openlibrary/catalog/add_book/__init__.py::find_match", "target": "openlibrary/catalog/add_book/__init__.py::find_exact_match"}, {"source": "openlibrary/catalog/add_book/__init__.py::load", "target": "openlibrary/catalog/add_book/__init__.py::find_match"}, {"source": "openlibrary/core/imports.py::ImportItem::import_first_staged", "target": "openlibrary/core/imports.py::ImportItem::single_import"}, {"source": "openlibrary/core/imports.py::ImportItem::single_import", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/core/models.py::Edition::from_isbn", "target": "openlibrary/core/imports.py::ImportItem::import_first_staged"}, {"source": "openlibrary/core/vendors.py::create_edition_from_amazon_metadata", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/plugins/books/code.py::books_json::GET", "target": "openlibrary/plugins/books/dynlinks.py::dynlinks"}, {"source": "openlibrary/plugins/books/dynlinks.py::dynlinks", "target": "openlibrary/plugins/books/dynlinks.py::get_isbn_editiondict_map"}, {"source": "openlibrary/plugins/books/dynlinks.py::get_isbn_editiondict_map", "target": "openlibrary/core/models.py::Edition::from_isbn"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::POST", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::POST", "target": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import", "target": "openlibrary/plugins/importapi/code.py::ia_importapi::load_book"}, {"source": "openlibrary/plugins/importapi/code.py::ia_importapi::load_book", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/plugins/importapi/code.py::importapi::POST", "target": "openlibrary/catalog/add_book/__init__.py::load"}, {"source": "openlibrary/plugins/openlibrary/api.py::price_api::GET", "target": "openlibrary/core/vendors.py::create_edition_from_amazon_metadata"}, {"source": "openlibrary/plugins/openlibrary/api.py::sponsorship_eligibility_check::GET", "target": "openlibrary/core/models.py::Edition::from_isbn"}, {"source": "openlibrary/plugins/openlibrary/code.py::bookpage::GET", "target": "openlibrary/plugins/importapi/code.py::ia_importapi::ia_import"}, {"source": "openlibrary/plugins/openlibrary/code.py::isbn_lookup::GET", "target": "openlibrary/core/models.py::Edition::from_isbn"}, {"source": "openlibrary/plugins/worksearch/code.py::search::GET", "target": "openlibrary/plugins/worksearch/code.py::search::isbn_redirect"}, {"source": "openlibrary/plugins/worksearch/code.py::search::isbn_redirect", "target": "openlibrary/core/models.py::Edition::from_isbn"}]}, "graph_spec": "These functions connect bibliographic identifiers and metadata to Open Library edition records, supporting catalog matching, staged imports, and imports from Internet Archive and Amazon. Editions represent particular publications associated with a broader work, while identifiers such as ISBNs support lookup and links to their catalog records. The scoped web handlers expose these capabilities through book metadata and link responses, identifier-based book pages and search navigation, pricing information, and sponsorship eligibility checks."} +{"repo": "kubernetes/kubernetes", "buggy_commit": "ae4a6e5e0e2e695d331c4f2cce8e6220a0bd051f", "bug_issue": 143268, "solve_pr": 143226, "call_graph": {"nodes": [{"id": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::MoveAllToActiveOrBackoffQueue"}, {"id": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::flushUnschedulableEntitiesLeftover"}, {"id": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::isEntityWorthRequeuing"}, {"id": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::moveAllToActiveOrBackoffQueue"}, {"id": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::moveEntitiesToActiveOrBackoffQueue"}], "edges": [{"source": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::MoveAllToActiveOrBackoffQueue", "target": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::moveAllToActiveOrBackoffQueue"}, {"source": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::flushUnschedulableEntitiesLeftover", "target": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::moveEntitiesToActiveOrBackoffQueue"}, {"source": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::moveAllToActiveOrBackoffQueue", "target": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::moveEntitiesToActiveOrBackoffQueue"}, {"source": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::moveEntitiesToActiveOrBackoffQueue", "target": "pkg/scheduler/backend/queue/scheduling_queue.go::PriorityQueue::isEntityWorthRequeuing"}]}, "graph_spec": "These functions support the scheduler’s management of pods and pod groups awaiting scheduling by assessing whether queued entities merit reconsideration and moving them from the unschedulable pool to active or backoff queues. They cover event-related requeueing and the periodic reconsideration of entities left in the unschedulable pool."} +{"repo": "kubernetes/kubernetes", "buggy_commit": "d285472482503c249133440979b51e49949030ea", "bug_issue": 143275, "solve_pr": 143340, "call_graph": {"nodes": [{"id": "cmd/kube-proxy/app/options.go::Options::runLoop"}, {"id": "cmd/kube-proxy/app/server.go::ProxyServer::Run"}, {"id": "cmd/kube-proxy/app/server.go::proxyRun::Run"}, {"id": "pkg/proxy/config/config.go::NewNodeTopologyConfig"}, {"id": "pkg/proxy/config/config.go::NodeTopologyConfig::RegisterEventHandler"}, {"id": "pkg/proxy/config/config.go::NodeTopologyConfig::handleNodeEvent"}, {"id": "pkg/proxy/config/config.go::newNodeTopologyConfig"}], "edges": [{"source": "cmd/kube-proxy/app/options.go::Options::runLoop", "target": "cmd/kube-proxy/app/server.go::proxyRun::Run"}, {"source": "cmd/kube-proxy/app/server.go::ProxyServer::Run", "target": "pkg/proxy/config/config.go::NewNodeTopologyConfig"}, {"source": "cmd/kube-proxy/app/server.go::ProxyServer::Run", "target": "pkg/proxy/config/config.go::NodeTopologyConfig::RegisterEventHandler"}, {"source": "cmd/kube-proxy/app/server.go::proxyRun::Run", "target": "cmd/kube-proxy/app/server.go::ProxyServer::Run"}, {"source": "pkg/proxy/config/config.go::NewNodeTopologyConfig", "target": "pkg/proxy/config/config.go::newNodeTopologyConfig"}]}, "graph_spec": "The scoped run methods provide kube-proxy’s server execution contract and configuration monitoring, supporting its role in forwarding Kubernetes Service traffic on nodes. The node-topology functions construct tracking configuration, associate notification handlers, and process Node events to communicate changes in proxy-relevant topology labels, which describe nodes’ placement within the cluster."} +{"repo": "kubernetes/kubernetes", "buggy_commit": "54618b159253bdf59a9a9624acc3c325443844cb", "bug_issue": 143292, "solve_pr": 143288, "call_graph": {"nodes": [{"id": "staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier_v3.go::supportsQueryParamV3"}, {"id": "staging/src/k8s.io/kubectl/pkg/cmd/util/factory_client_access.go::factoryImpl::Validator"}], "edges": []}, "graph_spec": "These functions support kubectl's handling of Kubernetes resource validation and API capabilities. Validator returns a schema for validating objects stored on disk, while supportsQueryParamV3 uses an OpenAPI v3 document to determine whether a resource's PATCH endpoint supports a query parameter."} +{"repo": "kubernetes/kubernetes", "buggy_commit": "2af1ee8d0b379c06efa5357d2e9c3c25546d96e5", "bug_issue": 143361, "solve_pr": 143765, "call_graph": {"nodes": [{"id": "pkg/scheduler/framework/plugins/noderesources/fit.go::NewFit"}, {"id": "pkg/scheduler/framework/plugins/noderesources/fit.go::getScorer"}], "edges": []}, "graph_spec": "NewFit constructs the NodeResourcesFit scheduler plugin from plugin configuration and scheduler framework context; the plugin supports assessing whether nodes have sufficient resources for Pods and scoring nodes by resource allocation. getScorer provides a resource-allocation scorer from a scoring strategy and feature settings, supporting resource-based preferences when choosing where to schedule Pods."} +{"repo": "kubernetes/kubernetes", "buggy_commit": "102768513626f23c4797733f528525f054ba76c6", "bug_issue": 143373, "solve_pr": 143376, "call_graph": {"nodes": [{"id": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::claimEvictionTime"}, {"id": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleClaimChange"}, {"id": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleRuleChange"}, {"id": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleSliceChange"}, {"id": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleWork"}, {"id": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::maybeUpdateRuleStatus"}], "edges": [{"source": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleClaimChange", "target": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::claimEvictionTime"}, {"source": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleClaimChange", "target": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleClaimChange"}, {"source": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleRuleChange", "target": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::claimEvictionTime"}, {"source": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleSliceChange", "target": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::claimEvictionTime"}, {"source": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleWork", "target": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::maybeUpdateRuleStatus"}, {"source": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::maybeUpdateRuleStatus", "target": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::handleRuleChange"}]}, "graph_spec": "These controller methods coordinate device-taint eviction for pods using allocated ResourceClaims: they assess claim eviction timing from applicable NoExecute device taints and tolerations, and revisit affected claims and pods when claims, DeviceTaintRules, or ResourceSlices change. The worker method processes queued controller work, while rule-status processing maintains the public status that reports ongoing pod eviction; DeviceTaintRules and ResourceSlices provide the API context for taints applied to devices and the resources they describe."} +{"repo": "kubernetes/kubernetes", "buggy_commit": "64dc7059ed1ab699737ecbf6268b9e77c7f548c4", "bug_issue": 143636, "solve_pr": 143791, "call_graph": {"nodes": [{"id": "pkg/scheduler/schedule_one.go::Scheduler::ScheduleOne"}, {"id": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::podGroupCycle"}, {"id": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::scheduleOnePodGroup"}, {"id": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::submitPodGroupAlgorithmResult"}, {"id": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::submitPodGroupResult"}, {"id": "pkg/scheduler/schedule_one_podgroup.go::applyPodGroupPostFilterResult"}, {"id": "pkg/scheduler/scheduler.go::Scheduler::Run"}], "edges": [{"source": "pkg/scheduler/schedule_one.go::Scheduler::ScheduleOne", "target": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::scheduleOnePodGroup"}, {"source": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::podGroupCycle", "target": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::submitPodGroupAlgorithmResult"}, {"source": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::podGroupCycle", "target": "pkg/scheduler/schedule_one_podgroup.go::applyPodGroupPostFilterResult"}, {"source": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::scheduleOnePodGroup", "target": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::podGroupCycle"}, {"source": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::submitPodGroupAlgorithmResult", "target": "pkg/scheduler/schedule_one_podgroup.go::Scheduler::submitPodGroupResult"}, {"source": "pkg/scheduler/scheduler.go::Scheduler::Run", "target": "pkg/scheduler/schedule_one.go::Scheduler::ScheduleOne"}]}, "graph_spec": "Run manages the scheduler’s watching and scheduling lifecycle, while ScheduleOne handles a scheduling entity: a pod or a pod group. scheduleOnePodGroup and podGroupCycle coordinate workload-aware scheduling for related pods organized into groups and group hierarchies. applyPodGroupPostFilterResult incorporates post-filter outcomes, including preemption nominations, into group scheduling results; submitPodGroupAlgorithmResult and submitPodGroupResult process group and member-pod outcomes for status reporting, binding to nodes, and requeueing."} +{"repo": "kubernetes/kubernetes", "buggy_commit": "de06dce3c02d5731a0dc4161861b9c34b1444280", "bug_issue": 143719, "solve_pr": 143727, "call_graph": {"nodes": [{"id": "pkg/volume/csi/nodeinfomanager/nodeinfomanager.go::nodeInfoManager::CreateCSINode"}, {"id": "pkg/volume/csi/nodeinfomanager/nodeinfomanager.go::nodeInfoManager::ensureNodeOwnsCSINode"}, {"id": "pkg/volume/csi/nodeinfomanager/nodeinfomanager.go::nodeInfoManager::tryUpdateNode"}, {"id": "pkg/volume/csi/nodeinfomanager/nodeinfomanager.go::nodeInfoManager::updateNode"}], "edges": [{"source": "pkg/volume/csi/nodeinfomanager/nodeinfomanager.go::nodeInfoManager::updateNode", "target": "pkg/volume/csi/nodeinfomanager/nodeinfomanager.go::nodeInfoManager::tryUpdateNode"}]}, "graph_spec": "These functions manage Kubernetes node information associated with the Container Storage Interface (CSI): a Node represents a worker machine, while a CSINode records the CSI drivers installed on it and references its owning Node. CreateCSINode creates and returns a CSINode resource, ensureNodeOwnsCSINode maintains its ownership relationship, and updateNode and tryUpdateNode support changes to the corresponding Node through supplied update functions, reporting errors through their return values."} +{"repo": "kubernetes/kubernetes", "buggy_commit": "aa54d42eb56fe26378272b5f7cb9d6f5c010b1a8", "bug_issue": 143789, "solve_pr": 143790, "call_graph": {"nodes": [{"id": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::addConditionAndDeletePod"}, {"id": "pkg/controller/devicetainteviction/device_taint_eviction.go::Controller::maybeDeletePod"}], "edges": []}, "graph_spec": "These functions support Pod eviction for Dynamic Resource Allocation, where device taints express usage restrictions and ResourceClaim tolerations describe which restrictions a claim accepts. Given a Pod reference, maybeDeletePod assesses and carries out deletion work, reporting retry timing and errors; addConditionAndDeletePod records a Pod condition and requests deletion, reporting deletion status and errors."} +{"repo": "libuv/libuv", "buggy_commit": "4cf8d9bf396e6370a7992fb59cb7901abc2aa05d", "bug_issue": 5358, "solve_pr": 5361, "call_graph": {"nodes": [{"id": "docs/code/dns/main.c::main"}, {"id": "docs/code/dns/main.c::on_resolved"}, {"id": "src/unix/tcp.c::uv__tcp_connect"}, {"id": "src/uv-common.c::uv_tcp_connect"}], "edges": [{"source": "docs/code/dns/main.c::main", "target": "docs/code/dns/main.c::on_resolved"}, {"source": "docs/code/dns/main.c::on_resolved", "target": "src/uv-common.c::uv_tcp_connect"}, {"source": "src/uv-common.c::uv_tcp_connect", "target": "src/unix/tcp.c::uv__tcp_connect"}]}, "graph_spec": "These functions illustrate asynchronous DNS resolution followed by TCP connection establishment: the DNS example’s main function runs the demonstration, and on_resolved receives address-resolution results and initiates a connection. DNS resolution translates host and service names into network addresses; uv_tcp_connect exposes the connection API using a TCP handle, connection request, destination address, and completion callback, while uv__tcp_connect provides its Unix-side connection support."} +{"repo": "libuv/libuv", "buggy_commit": "a267f5688be25e8d4628e296245a041adc2ca072", "bug_issue": 5359, "solve_pr": 5360, "call_graph": {"nodes": [{"id": "src/unix/linux.c::uv__get_cgroup1_memory_limits"}, {"id": "src/unix/linux.c::uv__get_cgroup_constrained_memory"}, {"id": "src/unix/linux.c::uv_get_available_memory"}, {"id": "src/unix/linux.c::uv_get_constrained_memory"}], "edges": [{"source": "src/unix/linux.c::uv__get_cgroup_constrained_memory", "target": "src/unix/linux.c::uv__get_cgroup1_memory_limits"}, {"source": "src/unix/linux.c::uv_get_available_memory", "target": "src/unix/linux.c::uv__get_cgroup_constrained_memory"}, {"source": "src/unix/linux.c::uv_get_constrained_memory", "target": "src/unix/linux.c::uv__get_cgroup_constrained_memory"}]}, "graph_spec": "These functions support Linux process memory reporting under cgroups, the operating system mechanism for imposing resource limits on groups of processes. The internal helpers obtain cgroup v1 memory limits and determine cgroup-constrained memory, supporting public APIs that report the process’s total memory allowance and remaining available memory in bytes."} +{"repo": "libuv/libuv", "buggy_commit": "19bbf90e1a7a1526da6daa1c79eec2e3ff8b6c55", "bug_issue": 5374, "solve_pr": 5378, "call_graph": {"nodes": [{"id": "src/unix/linux.c::uv__get_cgroupv2_constrained_cpu"}, {"id": "src/unix/linux.c::uv__get_constrained_cpu"}], "edges": [{"source": "src/unix/linux.c::uv__get_constrained_cpu", "target": "src/unix/linux.c::uv__get_cgroupv2_constrained_cpu"}]}, "graph_spec": "These functions obtain Linux cgroup CPU quota information, representing limits on the CPU resources available to a process. uv__get_constrained_cpu provides the general retrieval interface, while uv__get_cgroupv2_constrained_cpu accepts cgroup information and supplies the cgroup v2-specific quota result."} +{"repo": "libuv/libuv", "buggy_commit": "716390fe9e0a0ef38ac26e18d894672fc35dc870", "bug_issue": 5410, "solve_pr": 5413, "call_graph": {"nodes": [{"id": "src/unix/linux.c::uv_cpu_info"}], "edges": []}, "graph_spec": "uv_cpu_info retrieves information about the system’s CPUs, providing CPU records and their count. Each record describes the processor’s model and speed alongside CPU time accounting across execution and idle categories, supporting inspection of processor characteristics and activity."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "5ca694b38d861c0e24cd8743753427dda839b90b", "bug_issue": 12926, "solve_pr": 26113, "call_graph": {"nodes": [{"id": "lib/matplotlib/axes/_axes.py::Axes::hexbin"}], "edges": []}, "graph_spec": "`Axes.hexbin` must convert paired x/y data (and optional per-point C values) into a `PolyCollection` of hexagonal cells whose centers and values reflect a regular grid over the supplied or data-derived extent. It must discard masked/nonfinite paired inputs consistently; reject non-positive coordinates when a logarithmic axis is requested; make empty or singular data produce a valid nonsingular grid; and exclude cells that do not meet the applicable minimum-count rule. Without C, cell values are point counts; with C, each populated cell value is produced by `reduce_C_function`, with out-of-range points omitted. Linear axes use offset hexagons, while log axes create geometrically transformed polygons and set the corresponding axis scale; in either case the collection’s colormap, normalization, alpha, styling, data limits, and tight autoscaling must be applied. `bins='log'` supplies logarithmic normalization unless an explicit norm takes precedence, and numeric/edge bins discretize displayed cell values. When marginals are requested, attached horizontal and vertical bar collections must summarize the same data with the same reduction, visual mapping, and subsequent cmap/clim changes as the main collection."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "a3e2897bfaf9eaac1d6649da535c4e721c89fa69", "bug_issue": 13982, "solve_pr": 13989, "call_graph": {"nodes": [{"id": "lib/matplotlib/axes/_axes.py::Axes::hist"}], "edges": []}, "graph_spec": "`Axes.hist` must accept a scalar, one dataset, or multiple datasets (including 2-D column-wise input), convert their x-units consistently, validate per-dataset weights and colors, and derive one shared set of bin edges across datasets; when `range` is explicitly supplied and bins are not explicit edges, the returned bin edges must span that requested range and values outside it must be ignored; explicit bin edges retain their boundary semantics (all but the final bin are right-exclusive, while the final bin includes its right edge). It must compute floating bin values using weights when supplied, support stacking as cumulative dataset totals, normalize density histograms so the relevant total area is one, and apply forward or reverse cumulative accumulation with normalized endpoints of one. It must render bar/bar-stacked or step/filled-step geometry with the requested alignment, orientation, baseline, widths, colors, labels, and optional logarithmic axis while preserving autoscaling behavior; return `(n, bins, patches)` with scalar-input shape for one dataset and per-dataset collections for multiple datasets, keeping legend labels only on each dataset’s first patch."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "5140177a69f4bfc195975aa24f244e97e2ff1ab6", "bug_issue": 17566, "solve_pr": 26466, "call_graph": {"nodes": [{"id": "lib/matplotlib/text.py::Annotation::__init__"}, {"id": "lib/matplotlib/text.py::_AnnotationBase::__init__"}], "edges": [{"source": "lib/matplotlib/text.py::Annotation::__init__", "target": "lib/matplotlib/text.py::_AnnotationBase::__init__"}]}, "graph_spec": "Scope covers `Annotation.__init__` and the base initializer it delegates to, `_AnnotationBase.__init__`. Correctness obligations are stated as observable behavior of a constructed annotation. The base step must run first and fully establish annotation state before the Text state, and the Text base must be initialized last so that text position, content, and propagated kwargs are applied last and cannot be overwritten by the annotation setup. `xy` must be accepted only as a two-element pair, and a constructed annotation's position and the endpoint its arrow resolves to are fixed to the coordinates supplied at construction. Offset-style coordinate specs must be rejected for `xy` (surfacing an error), while offset forms remain valid only for the text position, never for `xy`. `annotation_clip` must preserve `None` distinctly from `True`/`False` to mean clip-only-for-data-coordinates. A newly constructed annotation must not be draggable until draggability is explicitly enabled. The derived initializer must then resolve coordinates and position consistently: `textcoords` defaults to the resolved `xycoords` when omitted (and supplying `textcoords` without `xytext` should surface a user-visible warning), `xytext` defaults to the annotation point when omitted, and the text position must end up as the resolved text location. Arrow behavior must be optional: with no `arrowprops` no arrow patch is created, and when provided, the caller's `arrowprops` mapping must not be mutated, with relative-position and legacy arrow keys honored when the patch is built."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "f285c3f3f126fef862b6d3c73208c5171f409da6", "bug_issue": 20044, "solve_pr": 24637, "call_graph": {"nodes": [{"id": "lib/matplotlib/offsetbox.py::AnnotationBbox::draw"}], "edges": []}, "graph_spec": "AnnotationBbox.draw renders a box-based annotation and its associated visual elements using a supplied Matplotlib renderer. An AnnotationBbox associates OffsetBox content with a point in a plot, allowing boxed content to serve as an annotation with a connecting arrow."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "2a3037fdefa2daab0b5e27cc400c6d9453bc091b", "bug_issue": 20487, "solve_pr": 20488, "call_graph": {"nodes": [{"id": "lib/matplotlib/image.py::AxesImage::make_image"}, {"id": "lib/matplotlib/image.py::BboxImage::make_image"}, {"id": "lib/matplotlib/image.py::FigureImage::make_image"}, {"id": "lib/matplotlib/image.py::_ImageBase::_make_image"}], "edges": [{"source": "lib/matplotlib/image.py::AxesImage::make_image", "target": "lib/matplotlib/image.py::_ImageBase::_make_image"}, {"source": "lib/matplotlib/image.py::BboxImage::make_image", "target": "lib/matplotlib/image.py::_ImageBase::_make_image"}, {"source": "lib/matplotlib/image.py::FigureImage::make_image", "target": "lib/matplotlib/image.py::_ImageBase::_make_image"}]}, "graph_spec": "These image renderers must delegate their array, placement geometry, clipping region, magnification, and unsampled mode to the shared image builder, which returns either a uint8 RGBA image with its pixel-space draw origin and affine transform, or an empty result when the display region has no intersection or zero size. Axes images use their data extent transformed into canvas coordinates and honor the active clip box (or axes/figure bounds); bbox images render within the renderer canvas using their resolved window bbox; and figure images use their pixel offsets and full figure bounds while compensating offsets and magnification for renderer-versus-figure DPI, without pixel-border rounding. The shared builder must reject missing or empty source data, preserve the configured upper/lower origin through the returned transform, crop to the clip region, and produce dimensions consistent with clipping and magnification. In sampled rendering it must accept only scalar 2-D or RGB/RGBA input, resample to the target geometry, apply normalization/colormapping for scalar data, preserve RGB(A) color and alpha semantics, account for masks and scalar or per-pixel alpha, and return RGBA bytes; in unsampled rendering it must retain the native RGBA pixels, crop them to the visible subset, and return the corresponding affine placement transform."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "6786f437df54ca7780a047203cbcfaa1db8dc542", "bug_issue": 20665, "solve_pr": 20676, "call_graph": {"nodes": [{"id": "lib/matplotlib/widgets.py::SpanSelector::__init__"}, {"id": "lib/matplotlib/widgets.py::SpanSelector::_setup_edge_handle"}, {"id": "lib/matplotlib/widgets.py::SpanSelector::direction"}], "edges": [{"source": "lib/matplotlib/widgets.py::SpanSelector::__init__", "target": "lib/matplotlib/widgets.py::SpanSelector::_setup_edge_handle"}, {"source": "lib/matplotlib/widgets.py::SpanSelector::direction", "target": "lib/matplotlib/widgets.py::SpanSelector::_setup_edge_handle"}]}, "graph_spec": "SpanSelector must accept only horizontal or vertical directions and use the selected data axis consistently. Construction must create the span rectangle for that direction and, when interaction is enabled, add exactly two edge-handle artists initially positioned at the corresponding axis bounds, with handle styling derived from the selection appearance and animation consistent with blitting. Changing direction after construction must replace the direction-dependent rectangle and interactive handles: old artists are removed from both the axes and selector artist tracking, new handles use the new axis bounds and preserve their existing line properties, and non-interactive selectors must not create or manipulate handles."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "a0d2e399729d36499a1924e5ca5bc067c8396810", "bug_issue": 20721, "solve_pr": 20826, "call_graph": {"nodes": [{"id": "lib/matplotlib/axes/_base.py::_AxesBase::tick_params"}, {"id": "lib/matplotlib/axis.py::Axis::_reset_minor_tick_kw"}, {"id": "lib/matplotlib/axis.py::Axis::cla"}, {"id": "lib/matplotlib/axis.py::Axis::clear"}, {"id": "lib/matplotlib/axis.py::Axis::set_tick_params"}, {"id": "lib/mpl_toolkits/mplot3d/axes3d.py::Axes3D::tick_params"}], "edges": [{"source": "lib/matplotlib/axes/_base.py::_AxesBase::tick_params", "target": "lib/matplotlib/axis.py::Axis::set_tick_params"}, {"source": "lib/matplotlib/axis.py::Axis::_reset_minor_tick_kw", "target": "lib/matplotlib/axis.py::Axis::clear"}, {"source": "lib/matplotlib/axis.py::Axis::cla", "target": "lib/matplotlib/axis.py::Axis::clear"}, {"source": "lib/matplotlib/axis.py::Axis::clear", "target": "lib/matplotlib/axis.py::Axis::_reset_minor_tick_kw"}, {"source": "lib/matplotlib/axis.py::Axis::set_tick_params", "target": "lib/matplotlib/axis.py::Axis::_reset_minor_tick_kw"}, {"source": "lib/mpl_toolkits/mplot3d/axes3d.py::Axes3D::tick_params", "target": "lib/matplotlib/axis.py::Axis::set_tick_params"}, {"source": "lib/mpl_toolkits/mplot3d/axes3d.py::Axes3D::tick_params", "target": "lib/mpl_toolkits/mplot3d/axes3d.py::Axes3D::tick_params"}]}, "graph_spec": "This scope covers tick-appearance parameter handling for 2D axes and their axes, plus the 3D override. `_AxesBase.tick_params` must validate `axis` in {'x','y','both'}, defaulting to 'both', and forward the caller's keyword arguments to the selected axes: for the x-axis it must drop right-side-specific keys (`left`, `right`, `labelleft`, `labelright`), and for the y-axis drop top/bottom-specific keys (`top`, `bottom`, `labeltop`, `labelbottom`), leaving unrelated keys untouched, then delegate to each axis's `set_tick_params`. `Axis.set_tick_params` must accept `which` in {'major','minor','both'} and `reset`, translate raw keywords into canonical tick properties, and persistently record them in the axis's major/minor keyword state so that ticks created later inherit them; when `reset` is true it must first clear the affected group's stored parameters and re-seed grid state, then reinitialize the tick lists, whereas when `reset` is false it must additionally push the translated parameters onto all existing ticks of the selected groups and update the offset text visibility/color when label or labelcolor settings change. `_reset_minor_tick_kw` must clear the stored minor-tick keywords and re-establish `gridOn` from the current rcParams grid settings and grid.which, so that a reset state reflects configuration rather than leftover per-axis overrides. `Axis.clear` must restore the axis to defaults — empty label, linear scale, fresh callback registry, grid state recomputed for both major and minor groups — and invalidate the canvas via the stale flag; `Axis.cla` is the clearing entry point with the same observable effect. `Axes3D.tick_params` must accept `axis` in {'x','y','z','both'}, treat 'both' as all three axes and 'z' as the z-axis alone, and forward x/y handling to the 2D behavior while stripping top/bottom-specific keys before applying settings to the z-axis; it must also support being re-entered (self-edge) without corrupting forwarded state. Across all nodes, tick appearance changes should be observable through the axis's stored parameters and live tick objects, and clearing an axis must discard previously applied per-axis tick customizations."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "64619e53e9d0ed417daba287ac0d3a06943a54d5", "bug_issue": 20723, "solve_pr": 20859, "call_graph": {"nodes": [{"id": "lib/matplotlib/legend.py::Legend::__init__"}], "edges": []}, "graph_spec": "Legend.__init__ initializes a legend associated with an Axes or Figure from graphical artist handles and descriptive labels. A legend connects visual keys to text so readers can identify what plotted elements represent; the constructor also accepts controls for its placement, layout, and appearance."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "b525983fb5ad295ee8a789df46989574b452369a", "bug_issue": 21518, "solve_pr": 21568, "call_graph": {"nodes": [{"id": "lib/matplotlib/dates.py::ConciseDateFormatter::format_ticks"}, {"id": "lib/matplotlib/dates.py::DateFormatter::__call__"}, {"id": "lib/matplotlib/dates.py::_wrap_in_tex"}], "edges": [{"source": "lib/matplotlib/dates.py::ConciseDateFormatter::format_ticks", "target": "lib/matplotlib/dates.py::_wrap_in_tex"}, {"source": "lib/matplotlib/dates.py::DateFormatter::__call__", "target": "lib/matplotlib/dates.py::_wrap_in_tex"}]}, "graph_spec": "These functions produce readable axis labels from Matplotlib date tick values, which represent time as days since an epoch. ConciseDateFormatter.format_ticks provides compact labels across a collection of ticks while retaining complete date context, and DateFormatter.__call__ formats an individual tick using a strftime-style date format. The shared _wrap_in_tex helper supports preparing formatted date text for TeX math-mode rendering."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "a7b7260bf06c20d408215d95ce20a1a01c12e5b1", "bug_issue": 22472, "solve_pr": 22871, "call_graph": {"nodes": [{"id": "lib/matplotlib/dates.py::ConciseDateFormatter::format_ticks"}], "edges": []}, "graph_spec": "The formatter must convert each numeric tick to its configured timezone and return one concise, order-preserving label per input value. It must select the finest calendar/time field that varies across the displayed ticks, use the corresponding normal or boundary (zero) format so transitions such as a new year, month, day, or time unit remain intelligible, and use a date/time offset only when enabled and not redundant with labels; the offset together with the labels must fully identify the dates. At second/subsecond precision, it must retain a common meaningful fractional precision while removing only shared trailing zero padding and an orphan decimal point. Each formatting operation must refresh the displayed date/time offset, clearing it when suppressed, respect user-supplied formats and `show_offset`, and TeX-wrap both labels and any offset consistently when TeX rendering is enabled."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "f06c2c3abdaf4b90285ce5ca7fedbb8ace715911", "bug_issue": 22977, "solve_pr": 23412, "call_graph": {"nodes": [{"id": "lib/matplotlib/patches.py::Arc::draw"}, {"id": "lib/matplotlib/patches.py::Patch::draw"}], "edges": [{"source": "lib/matplotlib/patches.py::Arc::draw", "target": "lib/matplotlib/patches.py::Patch::draw"}]}, "graph_spec": "Drawing an Arc must be a no-op when it is invisible; otherwise it must recompute its geometry, convert dimensions to display scale, and preserve the requested counterclockwise angular extent (including correct angle handling for non-circular ellipses and full turns). For arcs whose ordinary Bezier approximation is sub-pixel accurate, it must install the corresponding arc path and delegate to Patch drawing. For very large arcs, it must determine the portions inside the axes or figure bounds in unit-circle coordinates and render only those visible portions at the required accuracy, while restoring the Arc’s original path afterward. Each delegated Patch draw must honor the common patch contract: create renderer state from the patch’s stroke, clipping, alpha, hatch, snapping, URL, sketch, and path-effect properties; transform the path’s non-affine part separately from its affine part; render with no face color when the face is fully transparent; clean up renderer state; and mark the artist non-stale after successful drawing."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "d58e966dd12c1aec3654e384ddce178573b6e440", "bug_issue": 23298, "solve_pr": 23299, "call_graph": {"nodes": [{"id": "lib/matplotlib/__init__.py::rc_context"}], "edges": []}, "graph_spec": "Matplotlib’s rc_context returns a context manager for temporarily customizing rcParams, the package-wide runtime settings that govern plotting defaults and appearance. It accepts settings through a mapping or a configuration file, supporting scoped customization of plotting code."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "33a0599711d26dc2b79f851c6daed4947df7c167", "bug_issue": 23471, "solve_pr": 23476, "call_graph": {"nodes": [{"id": "lib/matplotlib/figure.py::Figure::__getstate__"}], "edges": [{"source": "lib/matplotlib/figure.py::Figure::__getstate__", "target": "lib/matplotlib/figure.py::Figure::__getstate__"}]}, "graph_spec": "Figure.__getstate__ supplies a figure’s state for Python pickle serialization, supporting short-term storage of plots for later restoration and modification. A Figure is the top-level container for plot elements, so this method participates in preserving the plot as an object."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "5c4595267ccd3daf78f5fd05693b7ecbcd575c1e", "bug_issue": 24024, "solve_pr": 24026, "call_graph": {"nodes": [{"id": "lib/matplotlib/stackplot.py::stackplot"}], "edges": []}, "graph_spec": "`stackplot` must interpret the supplied y inputs as unstacked series sharing the x positions, promote accumulation to a floating-capable dtype, and render exactly one filled `PolyCollection` per series: the first between the selected baseline and the first cumulative boundary, then each later one between adjacent cumulative boundaries. It must support only the documented `zero`, `sym`, `wiggle`, and `weighted_wiggle` baseline layouts, positioning all cumulative boundaries consistently with the selected baseline (including finite zero-total handling for weighted wiggle). Colors and labels must be consumed in series order, with provided colors cycling and omitted labels left unset; remaining fill options must be forwarded to every area. The first collection must retain a zero y sticky edge for autoscaling behavior, and the returned list must preserve drawing order."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "c744161bdaf8b2a40bf96dcc0ebcd37ea0444319", "bug_issue": 24097, "solve_pr": 24177, "call_graph": {"nodes": [{"id": "lib/matplotlib/axes/_axes.py::Axes::fill"}, {"id": "lib/matplotlib/axes/_axes.py::Axes::stairs"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::_unit_change_handler"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::_update_patch_limits"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::add_patch"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::relim"}], "edges": [{"source": "lib/matplotlib/axes/_axes.py::Axes::fill", "target": "lib/matplotlib/axes/_base.py::_AxesBase::add_patch"}, {"source": "lib/matplotlib/axes/_axes.py::Axes::stairs", "target": "lib/matplotlib/axes/_base.py::_AxesBase::add_patch"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::_unit_change_handler", "target": "lib/matplotlib/axes/_base.py::_AxesBase::relim"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::add_patch", "target": "lib/matplotlib/axes/_base.py::_AxesBase::_update_patch_limits"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::relim", "target": "lib/matplotlib/axes/_base.py::_AxesBase::_update_patch_limits"}]}, "graph_spec": "Axes.fill must turn each supplied polygonal fill into an Axes-owned patch, return the complete patch list, and request autoscaling after their data limits have been incorporated. Axes.stairs must construct and register a unit-converted StepPatch with the requested orientation, baseline, fill styling, and default edges when omitted; it must preserve the baseline as a sticky data edge and include it in the relevant data limit before requesting autoscaling. Registering any patch must establish its Axes properties and default clip path, retain it as a removable child, and update limits from its geometry. Patch-limit calculation must use path extrema (including curve extrema), transform them into data coordinates, and update only dimensions governed by the patch transform; it must ignore fully zero-size rectangles and avoid irrelevant axis updates for non-rectilinear axis transforms. relim must rebuild limits from eligible current child artists (optionally excluding invisible ones), including patches through the same calculation, while unit changes must recache lines, recompute limits, and request autoscaling only for the changed valid axis."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "5ec2bd279729ff534719b8bf238dbbca907b93c5", "bug_issue": 24821, "solve_pr": 25122, "call_graph": {"nodes": [{"id": "lib/matplotlib/axes/_axes.py::Axes::cohere"}, {"id": "lib/matplotlib/axes/_axes.py::Axes::csd"}, {"id": "lib/matplotlib/axes/_axes.py::Axes::psd"}, {"id": "lib/matplotlib/axes/_axes.py::Axes::specgram"}, {"id": "lib/matplotlib/mlab.py::_spectral_helper"}, {"id": "lib/matplotlib/mlab.py::cohere"}, {"id": "lib/matplotlib/mlab.py::csd"}, {"id": "lib/matplotlib/mlab.py::psd"}, {"id": "lib/matplotlib/mlab.py::specgram"}], "edges": [{"source": "lib/matplotlib/axes/_axes.py::Axes::cohere", "target": "lib/matplotlib/mlab.py::cohere"}, {"source": "lib/matplotlib/axes/_axes.py::Axes::csd", "target": "lib/matplotlib/mlab.py::csd"}, {"source": "lib/matplotlib/axes/_axes.py::Axes::psd", "target": "lib/matplotlib/mlab.py::psd"}, {"source": "lib/matplotlib/axes/_axes.py::Axes::specgram", "target": "lib/matplotlib/mlab.py::specgram"}, {"source": "lib/matplotlib/mlab.py::cohere", "target": "lib/matplotlib/mlab.py::csd"}, {"source": "lib/matplotlib/mlab.py::cohere", "target": "lib/matplotlib/mlab.py::psd"}, {"source": "lib/matplotlib/mlab.py::csd", "target": "lib/matplotlib/mlab.py::_spectral_helper"}, {"source": "lib/matplotlib/mlab.py::psd", "target": "lib/matplotlib/mlab.py::csd"}, {"source": "lib/matplotlib/mlab.py::specgram", "target": "lib/matplotlib/mlab.py::_spectral_helper"}]}, "graph_spec": "The spectral routines must compute consistently aligned Welch-style spectra: split 1-D signals into overlapping NFFT-length segments, zero-pad inputs shorter than NFFT, detrend and window each segment, FFT to `pad_to`, and return frequencies and segment-center times matching the spectrum rows and columns. Defaults are NFFT=256, Fs=2, no overlap except spectrogram’s 128; default sidedness is one-sided for real input and two-sided for complex input, with correct frequency ordering and density/power normalization (including one-sided interior-bin scaling). `csd` returns the segment-averaged complex cross spectrum, `psd` is the corresponding real auto-spectrum, and coherence requires sufficient data for averaged NFFT segments and returns `|Pxy|²/(Pxx*Pyy)`. Spectrogram preserves the per-segment 2-D result, supports only valid spectral modes (with non-PSD modes limited to identical input data), and returns real values except in complex mode. Axes methods must pass spectral options through, offset returned/plotted frequencies by `Fc`, plot PSD/CSD in dB while returning unscaled spectral arrays (and optionally the line for PSD/CSD), and for spectrogram reject complex display and dB phase/angle displays, use 10-log power versus 20-log amplitude scaling, vertically orient the image correctly, derive a segment-bin time extent when absent, and return the spectrum, shifted frequencies, times, and image."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "a3011dfd1aaa2487cce8aa7369475533133ef777", "bug_issue": 24865, "solve_pr": 24970, "call_graph": {"nodes": [{"id": "lib/matplotlib/colors.py::Colormap::__call__"}], "edges": []}, "graph_spec": "Colormap.__call__ must lazily initialize its lookup table, then map scalar or array-like inputs to RGBA by treating floating values in [0, 1] as quantized positions (with exactly 1 selecting the final regular color) and integer values as direct color indices. Values below or above the regular index range must use the configured under or over color, while NaN and masked values must use the bad color; this classification must remain correct for copied inputs and non-native-endian arrays. It must preserve input dimensionality by returning X.shape + (4,) for array-like X and an RGBA tuple for scalar X, optionally producing uint8 components rather than normalized floats. A supplied alpha is clipped to its valid range and may be scalar or exactly X-shaped, otherwise raising ValueError; it replaces the output alpha except that a fully transparent default bad color remains transparent for bad values. Valid integer inputs, including empty unsigned-integer arrays, must be accepted without emitting warnings."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "9ff38a890e50a58f7f3497329854bc9f760c6f5e", "bug_issue": 25165, "solve_pr": 25287, "call_graph": {"nodes": [{"id": "lib/matplotlib/axes/_base.py::_AxesBase::__clear"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::__init__"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::cla"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::clear"}, {"id": "lib/matplotlib/axis.py::Axis::__init__"}, {"id": "lib/matplotlib/axis.py::Axis::clear"}, {"id": "lib/matplotlib/axis.py::XAxis::__init__"}, {"id": "lib/matplotlib/axis.py::XAxis::_init"}, {"id": "lib/matplotlib/axis.py::YAxis::__init__"}, {"id": "lib/matplotlib/axis.py::YAxis::_init"}, {"id": "lib/matplotlib/colorbar.py::Colorbar::_cbar_cla"}], "edges": [{"source": "lib/matplotlib/axes/_base.py::_AxesBase::__clear", "target": "lib/matplotlib/axis.py::Axis::clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::__init__", "target": "lib/matplotlib/axes/_base.py::_AxesBase::clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::cla", "target": "lib/matplotlib/axes/_base.py::_AxesBase::__clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::cla", "target": "lib/matplotlib/axes/_base.py::_AxesBase::clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::clear", "target": "lib/matplotlib/axes/_base.py::_AxesBase::__clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::clear", "target": "lib/matplotlib/axes/_base.py::_AxesBase::cla"}, {"source": "lib/matplotlib/axis.py::Axis::__init__", "target": "lib/matplotlib/axis.py::Axis::clear"}, {"source": "lib/matplotlib/axis.py::Axis::clear", "target": "lib/matplotlib/axis.py::XAxis::_init"}, {"source": "lib/matplotlib/axis.py::XAxis::__init__", "target": "lib/matplotlib/axis.py::XAxis::_init"}, {"source": "lib/matplotlib/axis.py::YAxis::__init__", "target": "lib/matplotlib/axis.py::YAxis::_init"}, {"source": "lib/matplotlib/colorbar.py::Colorbar::_cbar_cla", "target": "lib/matplotlib/axes/_base.py::_AxesBase::cla"}]}, "graph_spec": "These functions construct and clear Matplotlib Axes—the plotting regions within figures—and their associated x- and y-axis objects, which manage coordinate scales, ticks, and labels. The axis initialization functions establish labels and tick-offset text, while the clearing functions reset plotting and axis state; the colorbar clearing function clears interactive state for a color scale displayed in an Axes."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "17db60b4de127347b319e60a7ae24224efbea09e", "bug_issue": 25300, "solve_pr": 25311, "call_graph": {"nodes": [{"id": "lib/matplotlib/offsetbox.py::DraggableBase::__init__"}], "edges": []}, "graph_spec": "Initializing a draggable helper must retain the referenced artist, ensure that artist can emit pick events without overriding an existing picker, start with no active drag, and derive blitting eligibility from both the caller’s request and the owning canvas’s capabilities. It must register pick and button-release callbacks on the referenced artist’s figure canvas using picklable callback registration, retain their connection identifiers for later cleanup, and remain serializable with its owning figure."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "7d7f6da20ef11afb8eed37bce32286ad4ec43431", "bug_issue": 25511, "solve_pr": 25960, "call_graph": {"nodes": [{"id": "lib/matplotlib/figure.py::FigureBase::subfigures"}], "edges": []}, "graph_spec": "FigureBase.subfigures creates and returns a grid of subfigures within a figure or another subfigure, accepting layout dimensions, spacing, and relative sizing parameters. Subfigures are figure-like containers with their own artists and layouts, supporting grouped or nested plot compositions within a larger figure."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "f0f133943d3e4f1e2e665291fe1c8f658a84cc09", "bug_issue": 26194, "solve_pr": 26208, "call_graph": {"nodes": [{"id": "lib/matplotlib/axes/_base.py::_AxesBase::twinx"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::twiny"}], "edges": []}, "graph_spec": "`twinx` and `twiny` must create and return a distinct, overlaid Axes that remains geometrically coupled to the original and is registered as its twin, while sharing exactly the requested coordinate dimension (`x` for `twinx`, `y` for `twiny`) and retaining an independent opposite dimension. The twin must inherit autoscaling and units for the shared axis, make its patch and shared axis invisible, and place its independent axis on the opposite side (right y-axis for `twinx`, top x-axis for `twiny`); the original axis is kept on its normal complementary side (left y-axis or bottom x-axis). Both axes must use data-limit adjustability so the shared/twinned layout behaves consistently."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "fff2a79ce22ab39bea95067d30438bfdbe47f560", "bug_issue": 26287, "solve_pr": 26291, "call_graph": {"nodes": [{"id": "lib/mpl_toolkits/axes_grid1/inset_locator.py::AnchoredLocatorBase::__call__"}], "edges": []}, "graph_spec": "The anchored layout operation must successfully return the anchored box’s final position and size in the containing subfigure’s normalized coordinate system, including during tight-bounding-box processing when no renderer is available. The result must reflect anchor-dependent geometry, preserve the resolved width and height while placing the box at its anchored position, and remain correct for figures with nested subfigures as well as ordinary figures."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "1d1d8bad098caf498871f3e8ac8df1fdfafeccae", "bug_issue": 5087, "solve_pr": 25479, "call_graph": {"nodes": [{"id": "lib/matplotlib/cm.py::ColormapRegistry::register"}], "edges": []}, "graph_spec": "ColormapRegistry.register makes a colormap available by name for use through Matplotlib’s colormap interfaces. Colormaps map scalar data to colors, and registration lets plotting APIs refer to these mappings through a shared named registry."} +{"repo": "matplotlib/matplotlib", "buggy_commit": "0aac9f17b9373f66c709f436149568bda69595b3", "bug_issue": 6982, "solve_pr": 24627, "call_graph": {"nodes": [{"id": "lib/matplotlib/animation.py::Animation::_on_resize"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::__clear"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::cla"}, {"id": "lib/matplotlib/axes/_base.py::_AxesBase::clear"}, {"id": "lib/matplotlib/colorbar.py::Colorbar::_cbar_cla"}, {"id": "lib/matplotlib/offsetbox.py::AuxTransformBox::set_offset"}, {"id": "lib/matplotlib/offsetbox.py::DrawingArea::set_offset"}], "edges": [{"source": "lib/matplotlib/animation.py::Animation::_on_resize", "target": "lib/matplotlib/axes/_base.py::_AxesBase::clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::cla", "target": "lib/matplotlib/axes/_base.py::_AxesBase::__clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::cla", "target": "lib/matplotlib/axes/_base.py::_AxesBase::clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::clear", "target": "lib/matplotlib/axes/_base.py::_AxesBase::__clear"}, {"source": "lib/matplotlib/axes/_base.py::_AxesBase::clear", "target": "lib/matplotlib/axes/_base.py::_AxesBase::cla"}, {"source": "lib/matplotlib/colorbar.py::Colorbar::_cbar_cla", "target": "lib/matplotlib/axes/_base.py::_AxesBase::cla"}, {"source": "lib/matplotlib/offsetbox.py::AuxTransformBox::set_offset", "target": "lib/matplotlib/axes/_base.py::_AxesBase::clear"}, {"source": "lib/matplotlib/offsetbox.py::DrawingArea::set_offset", "target": "lib/matplotlib/axes/_base.py::_AxesBase::clear"}]}, "graph_spec": "Axes clearing must provide the same complete reset through either `clear()` or `cla()`, while honoring subclasses that override the legacy `cla` entry point without recursion or bypassing that override. A reset must detach existing child artists and rebuild the axes’ baseline state: axes and spines, callbacks, rcParam-derived margins/grid/minor ticks/titles/background, linear default scale and auto limits, while preserving appropriate visibility for shared axes and marking the axes stale. Resize-driven animation reinitialization must pause its event source, discard blit state, redraw, and then restore normal event handling. Clearing an interactive colorbar must remove its temporary interactive hooks before restoring ordinary axes clearing. Setting an offset on `DrawingArea` or `AuxTransformBox` must replace—not accumulate—the display translation, retain the supplied offset, and mark the container stale; for the auxiliary box this translation remains separate from the child-extent reference adjustment."} +{"repo": "mwaskom/seaborn", "buggy_commit": "22cdfb0c93f8ec78492d87edb810f10cb7f57a31", "bug_issue": 3174, "solve_pr": 3187, "call_graph": {"nodes": [{"id": "seaborn/_core/scales.py::ContinuousBase::_setup"}, {"id": "seaborn/relational.py::_LinePlotter::plot"}, {"id": "seaborn/relational.py::_RelationalPlotter::add_legend_data"}, {"id": "seaborn/relational.py::_ScatterPlotter::plot"}, {"id": "seaborn/utils.py::locator_to_legend_entries"}], "edges": [{"source": "seaborn/relational.py::_LinePlotter::plot", "target": "seaborn/relational.py::_RelationalPlotter::add_legend_data"}, {"source": "seaborn/relational.py::_RelationalPlotter::add_legend_data", "target": "seaborn/utils.py::locator_to_legend_entries"}, {"source": "seaborn/relational.py::_ScatterPlotter::plot", "target": "seaborn/relational.py::_RelationalPlotter::add_legend_data"}]}, "graph_spec": "Continuous-scale setup must establish unit conversion, the selected transform, optional normalization over either explicit or data-derived limits, and property mapping as one coherent pipeline; when legend values are enabled, it must retain only locator positions inside those limits and format them without unrepresented offset or scientific notation. Line and scatter plotting must add legends only when requested and only create a displayed legend when labeled handles exist. Their shared legend data must faithfully combine hue, size, and style semantics into representative artists, preserve a single semantic title or separate semantic subtitles as appropriate, and support validated auto/brief/full verbosity. Brief numeric hue and size legends must use linear or logarithmic locators appropriate to the mapping, restrict generated levels to the data limits, preserve the data dtype, and pair every retained level with a readable scalar or logarithmic label."} +{"repo": "navidrome/navidrome", "buggy_commit": "4e0177ee5340b888126092d1146c1c7b6a92fed8", "bug_issue": 1091, "solve_pr": 1138, "call_graph": {"nodes": [{"id": "core/agents/interfaces.go::ArtistTopSongsRetriever::GetTopSongs"}, {"id": "core/agents/lastfm.go::lastfmAgent::GetBiography"}, {"id": "core/agents/lastfm.go::lastfmAgent::GetSimilar"}, {"id": "core/agents/lastfm.go::lastfmAgent::GetTopSongs"}, {"id": "core/agents/lastfm.go::lastfmAgent::GetURL"}, {"id": "core/agents/lastfm.go::lastfmAgent::callArtistGetInfo"}, {"id": "core/agents/lastfm.go::lastfmAgent::callArtistGetSimilar"}, {"id": "core/agents/lastfm.go::lastfmAgent::callArtistGetTopTracks"}, {"id": "core/external_metadata.go::externalMetadata::SimilarSongs"}, {"id": "core/external_metadata.go::externalMetadata::TopSongs"}, {"id": "core/external_metadata.go::externalMetadata::UpdateArtistInfo"}, {"id": "core/external_metadata.go::externalMetadata::callGetSimilar"}, {"id": "core/external_metadata.go::externalMetadata::callGetTopSongs"}, {"id": "core/external_metadata.go::externalMetadata::callGetURL"}, {"id": "core/external_metadata.go::externalMetadata::refreshArtistInfo"}, {"id": "utils/lastfm/client.go::Client::ArtistGetInfo"}, {"id": "utils/lastfm/client.go::Client::ArtistGetSimilar"}, {"id": "utils/lastfm/client.go::Client::ArtistGetTopTracks"}, {"id": "utils/lastfm/client.go::Client::makeRequest"}], "edges": [{"source": "core/agents/interfaces.go::ArtistTopSongsRetriever::GetTopSongs", "target": "core/agents/lastfm.go::lastfmAgent::GetTopSongs"}, {"source": "core/agents/lastfm.go::lastfmAgent::GetBiography", "target": "core/agents/lastfm.go::lastfmAgent::callArtistGetInfo"}, {"source": "core/agents/lastfm.go::lastfmAgent::GetSimilar", "target": "core/agents/lastfm.go::lastfmAgent::callArtistGetSimilar"}, {"source": "core/agents/lastfm.go::lastfmAgent::GetTopSongs", "target": "core/agents/lastfm.go::lastfmAgent::callArtistGetTopTracks"}, {"source": "core/agents/lastfm.go::lastfmAgent::GetURL", "target": "core/agents/lastfm.go::lastfmAgent::callArtistGetInfo"}, {"source": "core/external_metadata.go::externalMetadata::SimilarSongs", "target": "core/external_metadata.go::externalMetadata::callGetSimilar"}, {"source": "core/external_metadata.go::externalMetadata::TopSongs", "target": "core/external_metadata.go::externalMetadata::callGetTopSongs"}, {"source": "core/external_metadata.go::externalMetadata::UpdateArtistInfo", "target": "core/external_metadata.go::externalMetadata::refreshArtistInfo"}, {"source": "core/external_metadata.go::externalMetadata::callGetSimilar", "target": "core/agents/lastfm.go::lastfmAgent::GetSimilar"}, {"source": "core/external_metadata.go::externalMetadata::callGetTopSongs", "target": "core/agents/lastfm.go::lastfmAgent::GetTopSongs"}, {"source": "core/external_metadata.go::externalMetadata::callGetURL", "target": "core/agents/lastfm.go::lastfmAgent::GetURL"}, {"source": "core/external_metadata.go::externalMetadata::refreshArtistInfo", "target": "core/external_metadata.go::externalMetadata::callGetSimilar"}, {"source": "core/external_metadata.go::externalMetadata::refreshArtistInfo", "target": "core/external_metadata.go::externalMetadata::callGetURL"}, {"source": "utils/lastfm/client.go::Client::ArtistGetInfo", "target": "utils/lastfm/client.go::Client::makeRequest"}]}, "graph_spec": "These functions support external artist metadata and music discovery: biographies and profile links describe artists, while similar artists and top tracks provide related music and prominent songs. The scoped contracts connect artist and song retrieval through the Last.fm agent and API client, including request handling, with services that refresh artist information and return similar or top songs as library media files."} +{"repo": "navidrome/navidrome", "buggy_commit": "5360283bb0368c5226b301f99b7095a54407b053", "bug_issue": 1928, "solve_pr": 3182, "call_graph": {"nodes": [{"id": "core/players.go::players::Register"}, {"id": "persistence/player_repository.go::playerRepository::FindMatch"}, {"id": "server/subsonic/api.go::Router::routes"}, {"id": "server/subsonic/middlewares.go::getPlayer"}], "edges": [{"source": "server/subsonic/api.go::Router::routes", "target": "server/subsonic/middlewares.go::getPlayer"}, {"source": "server/subsonic/middlewares.go::getPlayer", "target": "core/players.go::players::Register"}]}, "graph_spec": "Router.routes must place getPlayer before every player-dependent Subsonic handler. getPlayer derives the authenticated username and client from request context, canonicalizes the User-Agent and remote IP, resolves the username-scoped player cookie, and invokes Players.Register; on success it refreshes that cookie and adds the player plus any configured transcoding profile to the request context, while registration failures do not prevent the downstream handler from running. Register must reuse a supplied player ID only when its client identity is compatible, otherwise find an existing player by the authenticated user ID, exact client, and canonical User-Agent, or create a new player with a unique ID and scrobbling enabled. Each registration refreshes name, agent, IP, and last-seen state, persists it, propagates persistence/transcoding lookup errors, and returns the referenced transcoding configuration when present."} +{"repo": "navidrome/navidrome", "buggy_commit": "53607fe11446a1bac581bc551ba740456dd4720d", "bug_issue": 2630, "solve_pr": 2633, "call_graph": {"nodes": [{"id": "scanner/tag_scanner.go::TagScanner::Scan"}, {"id": "scanner/walk_dir_tree.go::isDirReadable"}, {"id": "scanner/walk_dir_tree.go::loadDir"}, {"id": "scanner/walk_dir_tree.go::walkDirTree"}, {"id": "scanner/walk_dir_tree.go::walkFolder"}], "edges": [{"source": "scanner/tag_scanner.go::TagScanner::Scan", "target": "scanner/walk_dir_tree.go::walkDirTree"}, {"source": "scanner/walk_dir_tree.go::loadDir", "target": "scanner/walk_dir_tree.go::isDirReadable"}, {"source": "scanner/walk_dir_tree.go::walkDirTree", "target": "scanner/walk_dir_tree.go::walkFolder"}, {"source": "scanner/walk_dir_tree.go::walkFolder", "target": "scanner/walk_dir_tree.go::loadDir"}, {"source": "scanner/walk_dir_tree.go::walkFolder", "target": "scanner/walk_dir_tree.go::walkFolder"}]}, "graph_spec": "These functions support music-library scanning, connecting music files and their metadata with Navidrome’s library records. TagScanner.Scan detects library changes and reports progress and a change count; walkDirTree and walkFolder provide directory traversal, loadDir gathers directory information, and isDirReadable assesses directory readability."} +{"repo": "netty/netty", "buggy_commit": "23540b042cbe95e8044eb5deb8a02c64e1ea256f", "bug_issue": 17784, "solve_pr": 17943, "call_graph": {"nodes": [{"id": "codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/DeflateEncoder.java::DeflateEncoder::encode"}], "edges": []}, "graph_spec": "DeflateEncoder.encode compresses outbound WebSocket frame payloads using DEFLATE and produces encoded WebSocket frames for the outbound pipeline. It supports WebSocket compression extensions, which reduce the size of payload data transmitted over a WebSocket connection."} +{"repo": "netty/netty", "buggy_commit": "12c5eb76d620212b63f33e52062bdc28d84a9dc5", "bug_issue": 17897, "solve_pr": 18035, "call_graph": {"nodes": [{"id": "transport/src/main/java/io/netty/channel/SingleThreadIoEventLoop.java::SingleThreadIoEventLoop::registerForIo0"}, {"id": "transport/src/main/java/io/netty/channel/SingleThreadIoEventLoop.java::SingleThreadIoEventLoop::run"}], "edges": []}, "graph_spec": "These functions support a single-thread I/O event loop: one registers an `IoHandle` for I/O processing and obtains a future for its registration, while the loop’s run method coordinates task execution with I/O dispatch through its `IoHandler`. Together, they connect registered handles to the event loop that processes their I/O events."} +{"repo": "netty/netty", "buggy_commit": "c9aba2dd96aa46186654140f995d315dded18599", "bug_issue": 18249, "solve_pr": 18263, "call_graph": {"nodes": [{"id": "resolver-dns/src/main/java/io/netty/resolver/dns/DnsQueryContextManager.java::DnsQueryContextManager::getOrCreateContextMap"}], "edges": []}, "graph_spec": "The scoped function provides access to DNS query-context tracking for a nameserver address, establishing that tracking as needed. Its role supports associating DNS query identifiers with the contexts representing queries sent to that server."} +{"repo": "netty/netty", "buggy_commit": "be3e8d42e821318795c8dbf7aab0acdbbd5cfb18", "bug_issue": 18318, "solve_pr": 18322, "call_graph": {"nodes": [{"id": "codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/WebSocketClientExtensionHandler.java::WebSocketClientExtensionHandler::channelRead"}], "edges": []}, "graph_spec": "WebSocketClientExtensionHandler.channelRead handles inbound messages as part of client-side WebSocket extension negotiation and initialization. WebSocket extensions augment the protocol through negotiated encoding and decoding capabilities; this handler’s inbound role supports establishing those capabilities with the server and integrating them into the channel pipeline."} +{"repo": "nginx/nginx", "buggy_commit": "797c039a9884f69aae96286dcdf1ba633e5ebf81", "bug_issue": 1907, "solve_pr": 1908, "call_graph": {"nodes": [{"id": "src/http/modules/ngx_http_geoip_module.c::ngx_http_geoip_city_float_variable"}, {"id": "src/http/modules/ngx_http_geoip_module.c::ngx_http_geoip_float"}, {"id": "src/stream/ngx_stream_geoip_module.c::ngx_stream_geoip_city_float_variable"}, {"id": "src/stream/ngx_stream_geoip_module.c::ngx_stream_geoip_float"}], "edges": [{"source": "src/http/modules/ngx_http_geoip_module.c::ngx_http_geoip_city_float_variable", "target": "src/http/modules/ngx_http_geoip_module.c::ngx_http_geoip_float"}, {"source": "src/stream/ngx_stream_geoip_module.c::ngx_stream_geoip_city_float_variable", "target": "src/stream/ngx_stream_geoip_module.c::ngx_stream_geoip_float"}]}, "graph_spec": "The HTTP and stream geoip_city_float_variable functions expose geographic coordinates from IP geolocation data as NGINX variables for requests and sessions, respectively; latitude and longitude describe geographic position. Their corresponding geoip_float functions retrieve floating-point values from MaxMind database entries to support these coordinate variables."} +{"repo": "nushell/nushell", "buggy_commit": "c7c8ebaa9e0d0f61322d01fabb14dc075a828147", "bug_issue": 19357, "solve_pr": 19358, "call_graph": {"nodes": [{"id": "crates/nu-cli/src/repl.rs::evaluate_repl"}, {"id": "crates/nu-cli/src/repl.rs::run_command"}, {"id": "crates/nu-cli/src/repl.rs::run_shell_integration_osc7"}, {"id": "src/main.rs::main"}, {"id": "src/run.rs::run_repl"}], "edges": [{"source": "crates/nu-cli/src/repl.rs::evaluate_repl", "target": "crates/nu-cli/src/repl.rs::run_shell_integration_osc7"}, {"source": "crates/nu-cli/src/repl.rs::run_command", "target": "crates/nu-cli/src/repl.rs::run_shell_integration_osc7"}, {"source": "src/main.rs::main", "target": "src/run.rs::run_repl"}, {"source": "src/run.rs::run_repl", "target": "crates/nu-cli/src/repl.rs::evaluate_repl"}]}, "graph_spec": "These functions support Nushell’s interactive shell: main is the application entry point, run_repl launches an interactive session using shell state and command-line arguments, and evaluate_repl manages the prompt and read–evaluate–print loop. Within that session, run_command executes entered commands in the shell context, while run_shell_integration_osc7 provides terminal integration by reporting the shell’s current working directory through the OSC 7 terminal protocol."} +{"repo": "prometheus/prometheus", "buggy_commit": "c052a79dc7fd0f2df2219ffe336f510b0d149b72", "bug_issue": 20045, "solve_pr": 20046, "call_graph": {"nodes": [{"id": "cmd/promtool/main.go::main"}, {"id": "cmd/promtool/unittest.go::RulesUnitTest"}, {"id": "cmd/promtool/unittest.go::RulesUnitTestResult"}, {"id": "cmd/promtool/unittest.go::ruleUnitTest"}, {"id": "cmd/promtool/unittest.go::testGroup::test"}, {"id": "promql/promqltest/test.go::LazyLoader::clear"}, {"id": "promql/promqltest/test.go::NewLazyLoader"}], "edges": [{"source": "cmd/promtool/main.go::main", "target": "cmd/promtool/unittest.go::RulesUnitTestResult"}, {"source": "cmd/promtool/unittest.go::RulesUnitTest", "target": "cmd/promtool/unittest.go::RulesUnitTestResult"}, {"source": "cmd/promtool/unittest.go::RulesUnitTestResult", "target": "cmd/promtool/unittest.go::ruleUnitTest"}, {"source": "cmd/promtool/unittest.go::ruleUnitTest", "target": "cmd/promtool/unittest.go::testGroup::test"}, {"source": "promql/promqltest/test.go::NewLazyLoader", "target": "promql/promqltest/test.go::LazyLoader::clear"}]}, "graph_spec": "These functions support promtool’s rule unit testing: main provides the command-line entry point, while RulesUnitTest, RulesUnitTestResult, ruleUnitTest, and testGroup.test coordinate test files and groups, report results, and return status or errors. Tests associate time-series samples with checks of alerting rules and PromQL expressions, linking metric data to alert behavior and query results. NewLazyLoader initializes the sample-loading support used for rule tests, and LazyLoader.clear clears samples from its test storage."} +{"repo": "prometheus/prometheus", "buggy_commit": "3ba925757f8ff39315e7530414e51652379a710b", "bug_issue": 20066, "solve_pr": 20073, "call_graph": {"nodes": [{"id": "tsdb/head_append_v2.go::headAppenderV2::appendFloat"}, {"id": "tsdb/head_append_v2.go::headAppenderV2::appendFloatHistogram"}, {"id": "tsdb/head_append_v2.go::headAppenderV2::appendHistogram"}], "edges": []}, "graph_spec": "These functions append timestamped samples to time series in the TSDB Head: appendFloat handles scalar floating-point samples, appendHistogram handles histograms with integer counts, and appendFloatHistogram handles histograms with floating-point counts. Histograms represent distributions of observations across buckets, while scalar samples represent individual numeric values; each function returns the series receiving the sample and an error status."} +{"repo": "prometheus/prometheus", "buggy_commit": "798401c7557d0ce4a9b8521e8087b89b42c9089a", "bug_issue": 20067, "solve_pr": 20074, "call_graph": {"nodes": [{"id": "tsdb/agent/db_append_v2.go::appenderV2::bestEffortAppendSTZeroSample"}, {"id": "tsdb/head_append_v2.go::headAppenderV2::bestEffortAppendSTZeroSample"}], "edges": []}, "graph_spec": "The two bestEffortAppendSTZeroSample methods support start-timestamp ingestion by attempting to append synthetic zero-valued samples associated with a time series, respectively in the agent and TSDB head appenders. Start timestamps, also called created timestamps, describe the beginning of a metric’s accumulation period; these methods represent that information as samples using series, timestamp, and sample-type context."} +{"repo": "prometheus/prometheus", "buggy_commit": "1d4faeaf10281aa16c4a5e73e4bfda92f81bc366", "bug_issue": 20085, "solve_pr": 20401, "call_graph": {"nodes": [{"id": "storage/remote/otlptranslator/prometheusremotewrite/helper.go::PrometheusConverter::addResourceTargetInfo"}, {"id": "storage/remote/otlptranslator/prometheusremotewrite/metrics_to_prw.go::PrometheusConverter::FromMetrics"}, {"id": "storage/remote/write_otlp_handler.go::rwExporter::ConsumeMetrics"}], "edges": [{"source": "storage/remote/otlptranslator/prometheusremotewrite/metrics_to_prw.go::PrometheusConverter::FromMetrics", "target": "storage/remote/otlptranslator/prometheusremotewrite/helper.go::PrometheusConverter::addResourceTargetInfo"}, {"source": "storage/remote/write_otlp_handler.go::rwExporter::ConsumeMetrics", "target": "storage/remote/otlptranslator/prometheusremotewrite/metrics_to_prw.go::PrometheusConverter::FromMetrics"}]}, "graph_spec": "These functions support ingestion of OpenTelemetry metrics into Prometheus: rwExporter.ConsumeMetrics accepts metric batches for ingestion, and PrometheusConverter.FromMetrics translates and appends them to Prometheus storage, returning annotations and errors. Within that conversion, addResourceTargetInfo represents resource metadata as a target_info metric, carrying descriptive context about the resource associated with the measurements."} +{"repo": "prometheus/prometheus", "buggy_commit": "ef78ff64267724c8ecd1a1283cad49b365a8b67f", "bug_issue": 20253, "solve_pr": 20250, "call_graph": {"nodes": [{"id": "cmd/prometheus/main.go::main"}, {"id": "cmd/promtool/main.go::CheckConfig"}, {"id": "cmd/promtool/main.go::CheckRules"}, {"id": "cmd/promtool/main.go::checkRules"}, {"id": "cmd/promtool/main.go::checkRulesFromStdin"}, {"id": "cmd/promtool/main.go::main"}, {"id": "model/rulefmt/rulefmt.go::Parse"}, {"id": "model/rulefmt/rulefmt.go::ParseFile"}, {"id": "rules/manager.go::FileLoader::Load"}, {"id": "rules/manager.go::Manager::LoadGroups"}, {"id": "rules/manager.go::Manager::Update"}, {"id": "rules/manager.go::ParseFiles"}], "edges": [{"source": "cmd/prometheus/main.go::main", "target": "rules/manager.go::Manager::Update"}, {"source": "cmd/prometheus/main.go::main", "target": "rules/manager.go::ParseFiles"}, {"source": "cmd/promtool/main.go::CheckConfig", "target": "cmd/promtool/main.go::checkRules"}, {"source": "cmd/promtool/main.go::CheckRules", "target": "cmd/promtool/main.go::checkRules"}, {"source": "cmd/promtool/main.go::CheckRules", "target": "cmd/promtool/main.go::checkRulesFromStdin"}, {"source": "cmd/promtool/main.go::checkRules", "target": "model/rulefmt/rulefmt.go::ParseFile"}, {"source": "cmd/promtool/main.go::checkRulesFromStdin", "target": "model/rulefmt/rulefmt.go::Parse"}, {"source": "cmd/promtool/main.go::main", "target": "cmd/promtool/main.go::CheckConfig"}, {"source": "cmd/promtool/main.go::main", "target": "cmd/promtool/main.go::CheckRules"}, {"source": "model/rulefmt/rulefmt.go::ParseFile", "target": "model/rulefmt/rulefmt.go::Parse"}, {"source": "rules/manager.go::FileLoader::Load", "target": "model/rulefmt/rulefmt.go::ParseFile"}, {"source": "rules/manager.go::Manager::LoadGroups", "target": "rules/manager.go::FileLoader::Load"}, {"source": "rules/manager.go::Manager::Update", "target": "rules/manager.go::Manager::LoadGroups"}, {"source": "rules/manager.go::ParseFiles", "target": "model/rulefmt/rulefmt.go::ParseFile"}]}, "graph_spec": "These functions connect the Prometheus server and promtool entry points to configuration checking and rule parsing, validation, loading, and manager updates. Recording rules precompute time series from expressions, while alerting rules define expression-based alert conditions; both are organized into rule groups. Within this scope, promtool checks configuration and rules from files or standard input, rulefmt produces parsed rule groups and validation diagnostics, and the rule-loading and manager APIs bring file-based rule definitions into the server’s configured rule state."} +{"repo": "prometheus/prometheus", "buggy_commit": "4a933f89fa96c56ad69e7c02dc5f40e06d93440e", "bug_issue": 20297, "solve_pr": 20299, "call_graph": {"nodes": [{"id": "model/textparse/openmetricsparse.go::OpenMetricsParser::Exemplar"}], "edges": []}, "graph_spec": "OpenMetricsParser.Exemplar exposes exemplar information associated with the current sample parsed from OpenMetrics text, writing it into a caller-provided exemplar and returning an availability indicator. Exemplars provide additional context linking metric observations to data outside the metrics themselves."} +{"repo": "protocolbuffers/protobuf", "buggy_commit": "8dd0a018df315fd44d7a7ae27db4df078396b5dc", "bug_issue": 31030, "solve_pr": 31047, "call_graph": {"nodes": [{"id": "upb/conformance/conformance_upb.c::DoTestIo"}, {"id": "upb/conformance/conformance_upb.c::main"}, {"id": "upb/conformance/conformance_upb_harness.c::DoTest"}, {"id": "upb/conformance/conformance_upb_harness.c::serialize_json"}, {"id": "upb/conformance/conformance_upb_harness.c::upb_ConformanceHarness_Run"}, {"id": "upb/conformance/conformance_upb_harness.c::write_output"}, {"id": "upb/json/encode.c::jsonenc_any"}, {"id": "upb/json/encode.c::jsonenc_array"}, {"id": "upb/json/encode.c::jsonenc_fieldval"}, {"id": "upb/json/encode.c::jsonenc_getanymsg"}, {"id": "upb/json/encode.c::jsonenc_map"}, {"id": "upb/json/encode.c::jsonenc_msg"}, {"id": "upb/json/encode.c::jsonenc_msgfield"}, {"id": "upb/json/encode.c::jsonenc_msgfields"}, {"id": "upb/json/encode.c::jsonenc_scalar"}, {"id": "upb/json/encode.c::jsonenc_wrapper"}, {"id": "upb/json/encode.c::upb_JsonEncode"}, {"id": "upb/json/encode.c::upb_JsonEncoder_Encode"}], "edges": [{"source": "upb/conformance/conformance_upb.c::DoTestIo", "target": "upb/conformance/conformance_upb_harness.c::upb_ConformanceHarness_Run"}, {"source": "upb/conformance/conformance_upb.c::main", "target": "upb/conformance/conformance_upb.c::DoTestIo"}, {"source": "upb/conformance/conformance_upb_harness.c::DoTest", "target": "upb/conformance/conformance_upb_harness.c::write_output"}, {"source": "upb/conformance/conformance_upb_harness.c::serialize_json", "target": "upb/json/encode.c::upb_JsonEncode"}, {"source": "upb/conformance/conformance_upb_harness.c::upb_ConformanceHarness_Run", "target": "upb/conformance/conformance_upb_harness.c::DoTest"}, {"source": "upb/conformance/conformance_upb_harness.c::write_output", "target": "upb/conformance/conformance_upb_harness.c::serialize_json"}, {"source": "upb/json/encode.c::jsonenc_any", "target": "upb/json/encode.c::jsonenc_getanymsg"}, {"source": "upb/json/encode.c::jsonenc_any", "target": "upb/json/encode.c::jsonenc_msgfield"}, {"source": "upb/json/encode.c::jsonenc_any", "target": "upb/json/encode.c::jsonenc_msgfields"}, {"source": "upb/json/encode.c::jsonenc_array", "target": "upb/json/encode.c::jsonenc_scalar"}, {"source": "upb/json/encode.c::jsonenc_fieldval", "target": "upb/json/encode.c::jsonenc_array"}, {"source": "upb/json/encode.c::jsonenc_fieldval", "target": "upb/json/encode.c::jsonenc_map"}, {"source": "upb/json/encode.c::jsonenc_fieldval", "target": "upb/json/encode.c::jsonenc_scalar"}, {"source": "upb/json/encode.c::jsonenc_map", "target": "upb/json/encode.c::jsonenc_scalar"}, {"source": "upb/json/encode.c::jsonenc_msg", "target": "upb/json/encode.c::jsonenc_msgfields"}, {"source": "upb/json/encode.c::jsonenc_msgfield", "target": "upb/json/encode.c::jsonenc_any"}, {"source": "upb/json/encode.c::jsonenc_msgfield", "target": "upb/json/encode.c::jsonenc_msg"}, {"source": "upb/json/encode.c::jsonenc_msgfield", "target": "upb/json/encode.c::jsonenc_wrapper"}, {"source": "upb/json/encode.c::jsonenc_msgfields", "target": "upb/json/encode.c::jsonenc_fieldval"}, {"source": "upb/json/encode.c::jsonenc_scalar", "target": "upb/json/encode.c::jsonenc_msgfield"}, {"source": "upb/json/encode.c::jsonenc_wrapper", "target": "upb/json/encode.c::jsonenc_scalar"}, {"source": "upb/json/encode.c::upb_JsonEncode", "target": "upb/json/encode.c::upb_JsonEncoder_Encode"}, {"source": "upb/json/encode.c::upb_JsonEncoder_Encode", "target": "upb/json/encode.c::jsonenc_msgfield"}]}, "graph_spec": "These functions support upb’s Protocol Buffers conformance testee, exchanging serialized test requests and responses through a harness and standard input/output to assess parsing and serialization compatibility. The scoped JSON encoding functions convert protobuf messages into JSON using schema reflection, covering message fields, scalar values, repeated fields, maps, Any message containers, and primitive wrapper messages. Together, they connect conformance request processing and response generation with protobuf-to-JSON serialization."} +{"repo": "psf/requests", "buggy_commit": "22623bd8c265b78b161542663ee980738441c307", "bug_issue": 1051, "solve_pr": 1142, "call_graph": {"nodes": [{"id": "requests/api.py::get"}, {"id": "requests/api.py::request"}, {"id": "requests/models.py::PreparedRequest::prepare_auth"}, {"id": "requests/models.py::PreparedRequest::prepare_body"}, {"id": "requests/models.py::PreparedRequest::prepare_content_length"}, {"id": "requests/models.py::Request::prepare"}, {"id": "requests/sessions.py::Session::get"}, {"id": "requests/sessions.py::Session::request"}], "edges": [{"source": "requests/api.py::get", "target": "requests/api.py::request"}, {"source": "requests/api.py::request", "target": "requests/sessions.py::Session::request"}, {"source": "requests/models.py::PreparedRequest::prepare_auth", "target": "requests/models.py::PreparedRequest::prepare_content_length"}, {"source": "requests/models.py::PreparedRequest::prepare_body", "target": "requests/models.py::PreparedRequest::prepare_content_length"}, {"source": "requests/models.py::Request::prepare", "target": "requests/models.py::PreparedRequest::prepare_body"}, {"source": "requests/sessions.py::Session::get", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::request", "target": "requests/models.py::Request::prepare"}]}, "graph_spec": "The module-level and Session request/get functions provide general HTTP request and GET interfaces, accepting destination and request information and returning Response objects representing server replies; the Session interfaces operate within a context that persists request parameters and cookies. Request.prepare produces a PreparedRequest for transmission, while prepare_body, prepare_auth, and prepare_content_length prepare its payload, HTTP authentication information, and content-length metadata."} +{"repo": "psf/requests", "buggy_commit": "1ba83c47ce7b177efe90d5f51f7760680f72eda0", "bug_issue": 1723, "solve_pr": 1724, "call_graph": {"nodes": [{"id": "requests/api.py::request"}], "edges": []}, "graph_spec": "The public `requests.api.request` function constructs and sends an HTTP request using a method, a destination URL, and optional request content and communication settings, returning a `Response` object. It provides a general entry point for HTTP’s request–response exchange, where the method expresses the requested operation and the URL identifies the target resource."} +{"repo": "psf/requests", "buggy_commit": "847735553aeda6e6633f2b32e14ba14ba86887a4", "bug_issue": 1765, "solve_pr": 1766, "call_graph": {"nodes": [{"id": "requests/auth.py::HTTPDigestAuth::__call__"}, {"id": "requests/auth.py::HTTPDigestAuth::build_digest_header"}, {"id": "requests/auth.py::HTTPDigestAuth::handle_401"}], "edges": [{"source": "requests/auth.py::HTTPDigestAuth::__call__", "target": "requests/auth.py::HTTPDigestAuth::build_digest_header"}, {"source": "requests/auth.py::HTTPDigestAuth::handle_401", "target": "requests/auth.py::HTTPDigestAuth::build_digest_header"}]}, "graph_spec": "These methods support HTTP Digest authentication within Requests, connecting request authentication with response-based authentication negotiation. `__call__` applies the authentication handler during request setup, `build_digest_header` constructs Digest authorization header content for an HTTP method and URL, and `handle_401` processes a response to attempt Digest authentication."} +{"repo": "psf/requests", "buggy_commit": "3c88e520da24ae6f736929a750876e7654accc3d", "bug_issue": 1920, "solve_pr": 1921, "call_graph": {"nodes": [{"id": "requests/sessions.py::Session::prepare_request"}, {"id": "requests/sessions.py::Session::request"}, {"id": "requests/sessions.py::merge_setting"}], "edges": [{"source": "requests/sessions.py::Session::prepare_request", "target": "requests/sessions.py::merge_setting"}, {"source": "requests/sessions.py::Session::request", "target": "requests/sessions.py::Session::prepare_request"}]}, "graph_spec": "These functions support HTTP requests within a Session, which provides shared settings across requests. Session.request accepts an HTTP method, URL, and request options to construct, prepare, and send a request and return a Response; Session.prepare_request produces a transmission-ready PreparedRequest incorporating request and session settings. merge_setting reconciles request-level and session-level settings to support this preparation."} +{"repo": "psf/requests", "buggy_commit": "091991be0da19de9108dbe5e3752917fea3d7fdc", "bug_issue": 2316, "solve_pr": 2317, "call_graph": {"nodes": [{"id": "requests/sessions.py::Session::request"}], "edges": []}, "graph_spec": "Session.request provides the session-level interface for making HTTP requests, accepting a method, destination URL, and request data and settings, and returning a Response representing the server’s reply. It operates within a Session, which provides shared configuration, persistent cookies, and connection pooling across requests."} +{"repo": "psf/requests", "buggy_commit": "5f7a3a74aab1625c2bb65f643197ee885e3da576", "bug_issue": 2930, "solve_pr": 2931, "call_graph": {"nodes": [{"id": "requests/api.py::delete"}, {"id": "requests/api.py::head"}, {"id": "requests/api.py::options"}, {"id": "requests/api.py::patch"}, {"id": "requests/api.py::post"}, {"id": "requests/api.py::request"}, {"id": "requests/models.py::PreparedRequest::prepare"}, {"id": "requests/models.py::PreparedRequest::prepare_body"}, {"id": "requests/models.py::Request::prepare"}, {"id": "requests/models.py::RequestEncodingMixin::_encode_params"}, {"id": "requests/sessions.py::Session::delete"}, {"id": "requests/sessions.py::Session::head"}, {"id": "requests/sessions.py::Session::options"}, {"id": "requests/sessions.py::Session::patch"}, {"id": "requests/sessions.py::Session::post"}, {"id": "requests/sessions.py::Session::prepare_request"}, {"id": "requests/sessions.py::Session::put"}, {"id": "requests/sessions.py::Session::request"}], "edges": [{"source": "requests/api.py::delete", "target": "requests/api.py::request"}, {"source": "requests/api.py::head", "target": "requests/api.py::request"}, {"source": "requests/api.py::options", "target": "requests/api.py::request"}, {"source": "requests/api.py::patch", "target": "requests/api.py::request"}, {"source": "requests/api.py::post", "target": "requests/api.py::request"}, {"source": "requests/api.py::request", "target": "requests/sessions.py::Session::request"}, {"source": "requests/models.py::PreparedRequest::prepare", "target": "requests/models.py::PreparedRequest::prepare_body"}, {"source": "requests/models.py::PreparedRequest::prepare_body", "target": "requests/models.py::RequestEncodingMixin::_encode_params"}, {"source": "requests/models.py::Request::prepare", "target": "requests/models.py::PreparedRequest::prepare"}, {"source": "requests/sessions.py::Session::delete", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::head", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::options", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::patch", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::post", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::prepare_request", "target": "requests/models.py::PreparedRequest::prepare"}, {"source": "requests/sessions.py::Session::put", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::request", "target": "requests/sessions.py::Session::prepare_request"}]}, "graph_spec": "The scoped API and Session methods provide general and HTTP-method-specific interfaces for sending requests from URLs, request data, and configuration and returning Response objects; sessions supply persistent settings and cookies across requests. Request.prepare, Session.prepare_request, and PreparedRequest.prepare turn request descriptions into transmission-ready requests, with session preparation incorporating session settings. PreparedRequest.prepare_body and RequestEncodingMixin._encode_params support this preparation by preparing HTTP body data and encoding request parameters."} +{"repo": "psf/requests", "buggy_commit": "39d0fdd9096f7dceccbc8f82e1eda7dd64717a8e", "bug_issue": 5367, "solve_pr": 5414, "call_graph": {"nodes": [{"id": "requests/api.py::delete"}, {"id": "requests/api.py::get"}, {"id": "requests/api.py::head"}, {"id": "requests/api.py::options"}, {"id": "requests/api.py::patch"}, {"id": "requests/api.py::post"}, {"id": "requests/api.py::put"}, {"id": "requests/api.py::request"}, {"id": "requests/models.py::PreparedRequest::prepare"}, {"id": "requests/models.py::PreparedRequest::prepare_url"}, {"id": "requests/models.py::Request::prepare"}, {"id": "requests/sessions.py::Session::delete"}, {"id": "requests/sessions.py::Session::get"}, {"id": "requests/sessions.py::Session::head"}, {"id": "requests/sessions.py::Session::options"}, {"id": "requests/sessions.py::Session::patch"}, {"id": "requests/sessions.py::Session::post"}, {"id": "requests/sessions.py::Session::prepare_request"}, {"id": "requests/sessions.py::Session::put"}, {"id": "requests/sessions.py::Session::request"}], "edges": [{"source": "requests/api.py::delete", "target": "requests/api.py::request"}, {"source": "requests/api.py::get", "target": "requests/api.py::request"}, {"source": "requests/api.py::head", "target": "requests/api.py::request"}, {"source": "requests/api.py::options", "target": "requests/api.py::request"}, {"source": "requests/api.py::patch", "target": "requests/api.py::request"}, {"source": "requests/api.py::post", "target": "requests/api.py::request"}, {"source": "requests/api.py::put", "target": "requests/api.py::request"}, {"source": "requests/api.py::request", "target": "requests/sessions.py::Session::request"}, {"source": "requests/models.py::PreparedRequest::prepare", "target": "requests/models.py::PreparedRequest::prepare_url"}, {"source": "requests/models.py::Request::prepare", "target": "requests/models.py::PreparedRequest::prepare"}, {"source": "requests/sessions.py::Session::delete", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::get", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::head", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::options", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::patch", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::post", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::prepare_request", "target": "requests/models.py::PreparedRequest::prepare"}, {"source": "requests/sessions.py::Session::put", "target": "requests/sessions.py::Session::request"}, {"source": "requests/sessions.py::Session::request", "target": "requests/sessions.py::Session::prepare_request"}]}, "graph_spec": "All module-level and Session verb helpers must delegate with their intended HTTP method and preserve caller-supplied request options; GET supplies query parameters, POST carries both data and JSON, and HEAD defaults to not following redirects unless explicitly overridden. The module-level API must perform the request through a temporary Session whose resources are closed afterward, while Session.request must construct, prepare, and send a request using its per-call settings together with applicable Session defaults. Session preparation must merge request headers, parameters, authentication, cookies, and hooks with Session state without discarding explicit request values, normalize the method, and yield a fully prepared request. Preparation must canonicalize HTTP(S) URLs by accepting string-like or UTF-8 byte input, trimming leading whitespace, requiring a scheme and host, rejecting invalid host labels, IDNA-encoding Unicode hosts, supplying '/' for an empty path, preserving existing query and fragment components, appending encoded parameters, and percent-quoting the reconstructed URL; non-HTTP schemes remain unmodified. The prepared request must have method, URL, headers, cookies, body, authentication, and hooks established in an order that lets authentication operate on the complete request and lets its changes be reflected in final content metadata."} +{"repo": "pydata/xarray", "buggy_commit": "aebe60c8593447c7ef95ca6af6eaef1f7fedc6d5", "bug_issue": 2097, "solve_pr": 2905, "call_graph": {"nodes": [{"id": "xarray/core/variable.py::Variable::__setitem__"}, {"id": "xarray/core/variable.py::as_compatible_data"}], "edges": [{"source": "xarray/core/variable.py::Variable::__setitem__", "target": "xarray/core/variable.py::as_compatible_data"}]}, "graph_spec": "`Variable.__setitem__` must apply orthogonal indexed assignment while treating a non-`Variable` right-hand side as compatible variable data: preserve supported array backends and existing Variables appropriately, unwrap pandas/xarray containers to their values, represent tuples as scalar object data, normalize timestamp/timedelta and object-like temporal values, and convert masked values to a dtype-appropriate missing-value representation. The normalized value must have no more dimensions than the indexed result, then be associated with the trailing target dimensions and broadcast by dimension name to the selected shape; scalars must be assignable, incompatible ranks must raise `ValueError`, and any indexing-axis reordering must be reversed before writing into the underlying data."} +{"repo": "pydata/xarray", "buggy_commit": "83706af66c9cb42032dbc5536b30be1da38100c0", "bug_issue": 2840, "solve_pr": 4695, "call_graph": {"nodes": [{"id": "xarray/core/dataarray.py::_LocIndexer::__getitem__"}], "edges": []}, "graph_spec": "`DataArray.loc[...]` must provide label-based selection and return the corresponding new `DataArray`. A mapping key is passed through as named label indexers; a non-mapping key is interpreted positionally across the array’s dimensions, with ellipses expanded to the full dimensionality and each resulting label bound to its dimension in order. The resulting selection must retain the normal `sel` label-indexing semantics, including scalar, slice, array, datetime, and MultiIndex label handling (with label slices inclusive at both endpoints), along with the selected data and compatible coordinate metadata."} +{"repo": "pydata/xarray", "buggy_commit": "8f0d9e5c9909c93a90306ed7cb5a80c1c2e1c97d", "bug_issue": 3094, "solve_pr": 3095, "call_graph": {"nodes": [{"id": "xarray/core/variable.py::IndexVariable::copy"}], "edges": []}, "graph_spec": "`IndexVariable.copy` must return a new instance of the same index-variable type that preserves the sole dimension and independent attribute and encoding mappings. With no replacement data, it must copy the underlying pandas-index representation using the requested `deep` argument while retaining index semantics and the class’s required one-dimensional, immutable index-backed form. With replacement data, it must first normalize it to compatible array data and reject any shape different from the original; otherwise the replacement becomes the new index values while the original remains unchanged."} +{"repo": "pydata/xarray", "buggy_commit": "118f4d996e7711c9aced916e6049af9f28d5ec66", "bug_issue": 3150, "solve_pr": 3151, "call_graph": {"nodes": [{"id": "xarray/backends/api.py::open_mfdataset"}, {"id": "xarray/core/combine.py::combine_by_coords"}], "edges": [{"source": "xarray/backends/api.py::open_mfdataset", "target": "xarray/core/combine.py::combine_by_coords"}]}, "graph_spec": "With `combine='by_coords'`, `open_mfdataset` must open every requested input dataset (applying any preprocessing first) and delegate their combination to `combine_by_coords`, forwarding the compatibility and variable/coordinate selection policies. The result must be determined by varying dimension-coordinate values rather than input-path order: datasets sharing the same data-variable set are tiled and concatenated in an inferable order across all varying coordinate dimensions, then the groups are merged under the requested compatibility rule, filling newly absent values as appropriate. Nonvarying and non-coordinate dimensions must not drive concatenation; ambiguous tiling or a non-monotonic global index along any concatenated dimension must be rejected. The returned dataset retains the first opened dataset’s attributes and owns closers for all opened files, while failures during combination leave those opened datasets closed."} +{"repo": "pydata/xarray", "buggy_commit": "69c7e01e5167a3137c285cb50d1978252bb8bcbf", "bug_issue": 3304, "solve_pr": 3305, "call_graph": {"nodes": [{"id": "xarray/core/dataset.py::Dataset::quantile"}, {"id": "xarray/core/variable.py::Variable::quantile"}], "edges": []}, "graph_spec": "Dataset.quantile must validate requested dimensions, coerce q to floating-point quantile values, and compute NaN-skipping percentiles for each eligible data variable using the selected interpolation rule. Each variable must reduce only over its requested dimensions (or all of its dimensions when appropriate), preserving unreduced dimension order; a scalar q produces no quantile dimension, whereas array-like q prepends a \"quantile\" dimension, and the Dataset must expose q as the corresponding quantile coordinate in either case. Dataset coordinates involved in reduction are not treated as data variables, unaffected variables and applicable indexes remain intact, and numeric_only excludes non-numeric data variables while retaining numeric and boolean ones. Attribute retention follows keep_attrs (or its configured default) for both the Dataset and reduced Variables, and quantile computation must reject unsupported lazy dask-backed Variable data rather than silently changing execution semantics."} +{"repo": "pydata/xarray", "buggy_commit": "ef6e6a7b86f8479b9a1fecf15ad5b88a2326b31e", "bug_issue": 3676, "solve_pr": 3677, "call_graph": {"nodes": [{"id": "xarray/core/dataset.py::Dataset::_calculate_binary_op"}, {"id": "xarray/core/dataset.py::Dataset::merge"}, {"id": "xarray/core/dataset.py::_binary_op::func"}, {"id": "xarray/core/dataset.py::_inplace_binary_op::func"}], "edges": [{"source": "xarray/core/dataset.py::Dataset::_calculate_binary_op", "target": "xarray/core/dataset.py::Dataset::merge"}, {"source": "xarray/core/dataset.py::_binary_op::func", "target": "xarray/core/dataset.py::Dataset::_calculate_binary_op"}, {"source": "xarray/core/dataset.py::_inplace_binary_op::func", "target": "xarray/core/dataset.py::Dataset::_calculate_binary_op"}]}, "graph_spec": "Dataset binary operators must first handle grouped operands according to their supported protocol, align Dataset/DataArray operands using the selected arithmetic join (including operand reversal for reflected operators), and then apply the operation independently to data variables while preserving compatible coordinates and recomputing dimensions. For Dataset-to-Dataset operations, shared data-variable names are combined pairwise; names present on only one side are retained only when the join selects that side, with missing counterparts represented as missing values. Mapping-like operands are applied by data-variable name and yield a Dataset from those results, while scalar or variable-like operands are applied to every data variable. Coordinate merging must retain only mutually compatible coordinate information. In-place arithmetic must reindex the right operand to the left Dataset, require identical data-variable name sets, replace the caller’s variables, coordinates, indexes, dimensions, and attributes with the computed state, and return that same Dataset; grouped operands are disallowed in this mode. Dataset merging itself must support DataArray conversion, reject conflicting variables under the requested compatibility rule unless explicitly overwritten, honor the requested index join and fill value, and return a Dataset built from the merged variables and metadata."} +{"repo": "pydata/xarray", "buggy_commit": "484d1ce5ff8969b6ca6fa942b344379725f33b9c", "bug_issue": 4049, "solve_pr": 4094, "call_graph": {"nodes": [{"id": "xarray/core/dataarray.py::DataArray::to_unstacked_dataset"}], "edges": []}, "graph_spec": "`DataArray.to_unstacked_dataset(dim, level=0)` must convert a DataArray whose named dimension has a pandas MultiIndex into a Dataset by treating the selected MultiIndex level as the variable axis. It must reject a dimension that is not stacked, resolve `level` by either its integer position or name, and create one Dataset data variable for every value in that level. Each variable must contain the DataArray slice selected for that level value, with the expanded level and any resulting singleton dimensions removed while retaining the remaining data and applicable coordinates, so that it serves as the inverse of stacking Dataset variables along that level."} +{"repo": "pydata/xarray", "buggy_commit": "2542a63f6ebed1a464af7fc74b9f3bf302925803", "bug_issue": 4074, "solve_pr": 4075, "call_graph": {"nodes": [{"id": "xarray/core/weighted.py::Weighted::_sum_of_weights"}, {"id": "xarray/core/weighted.py::Weighted::_weighted_mean"}], "edges": [{"source": "xarray/core/weighted.py::Weighted::_weighted_mean", "target": "xarray/core/weighted.py::Weighted::_sum_of_weights"}]}, "graph_spec": "These functions support weighted reductions of labeled array data, where associated weights determine each value’s contribution. `_sum_of_weights` produces weight totals across dimensions while accounting for missing data, and `_weighted_mean` produces a weighted average across dimensions, using those totals as its normalization basis."} +{"repo": "pydata/xarray", "buggy_commit": "d9ebcafaddf0bb80052d30f43ca5ea18a5c7229f", "bug_issue": 4354, "solve_pr": 4356, "call_graph": {"nodes": [{"id": "xarray/core/nanops.py::_maybe_null_out"}, {"id": "xarray/core/nanops.py::nanprod"}, {"id": "xarray/core/nanops.py::nansum"}], "edges": [{"source": "xarray/core/nanops.py::nanprod", "target": "xarray/core/nanops.py::_maybe_null_out"}, {"source": "xarray/core/nanops.py::nansum", "target": "xarray/core/nanops.py::_maybe_null_out"}]}, "graph_spec": "`nansum` and `nanprod` provide missing-value-aware sum and product reductions, aggregating array data across axes into reduced results. In this scope, NaN denotes missing data, and `_maybe_null_out` supports both reductions by managing result missingness in relation to valid-data count requirements."} +{"repo": "pydata/xarray", "buggy_commit": "180e76d106c697b1dd94b814a49dc2d7e58c8551", "bug_issue": 4627, "solve_pr": 4629, "call_graph": {"nodes": [{"id": "xarray/core/concat.py::_dataarray_concat"}, {"id": "xarray/core/concat.py::_dataset_concat"}, {"id": "xarray/core/concat.py::concat"}, {"id": "xarray/core/dataset.py::Dataset::__init__"}, {"id": "xarray/core/merge.py::dataset_update_method"}, {"id": "xarray/core/merge.py::merge"}, {"id": "xarray/core/merge.py::merge_attrs"}, {"id": "xarray/core/merge.py::merge_core"}, {"id": "xarray/core/merge.py::merge_data_and_coords"}], "edges": [{"source": "xarray/core/concat.py::_dataarray_concat", "target": "xarray/core/merge.py::merge_attrs"}, {"source": "xarray/core/concat.py::_dataset_concat", "target": "xarray/core/merge.py::merge_attrs"}, {"source": "xarray/core/concat.py::concat", "target": "xarray/core/concat.py::_dataarray_concat"}, {"source": "xarray/core/concat.py::concat", "target": "xarray/core/concat.py::_dataset_concat"}, {"source": "xarray/core/dataset.py::Dataset::__init__", "target": "xarray/core/merge.py::merge_data_and_coords"}, {"source": "xarray/core/merge.py::dataset_update_method", "target": "xarray/core/merge.py::merge_core"}, {"source": "xarray/core/merge.py::merge", "target": "xarray/core/merge.py::merge_core"}, {"source": "xarray/core/merge.py::merge_core", "target": "xarray/core/merge.py::merge_attrs"}, {"source": "xarray/core/merge.py::merge_data_and_coords", "target": "xarray/core/merge.py::merge_core"}]}, "graph_spec": "The scope covers xarray's shared attribute-combination and labeled-merge paths. merge_attrs is the common sink from both concat entry points and from merge_core: for a nonempty sequence of attribute mappings it must apply combine_attrs deterministically ('drop' yields an empty mapping, 'override' copies only the first input's attrs, 'no_conflicts' takes a union while treating same-named keys with differing values as a MergeError, 'identical' requires all inputs' attrs to be equivalent and otherwise raises MergeError, any other mode raises ValueError); for an empty sequence it must yield None so that 'no attrs present' remains distinguishable from 'empty attrs'. merge_core must validate compat, coerce pandas values, deep-align inputs subject to join/indexes/fill_value, let priority_arg designate which input wins conflicts, treat dims present in variables as coordinates, validate explicit_coords against resulting dims (rejecting a coordinate that shares a dimension name but is not 1-D along it), raise MergeError when a name is ambiguously both coordinate and data variable, and return a _MergeResult of variables, coord names, dims, indexes and attrs. merge must default to compat 'no_conflicts' with combine_attrs 'drop' and return a Dataset. dataset_update_method must, when other is not a Dataset, drop non-dimension coordinates of incoming DataArray values that clash with the target's coordinates, then merge with other as the priority input, reusing the target's indexes and overriding attrs. merge_data_and_coords, invoked by Dataset.__init__, must treat coords as explicit coordinates and derive their indexes. concat must reject empty input and invalid compat values, dispatch on the first object's type, and have _dataset_concat combine datasets' global attrs via merge_attrs with the requested combine_attrs while separately enforcing attr equality when compat is 'identical'; _dataarray_concat must delegate variable-level concatenation with attrs dropped and then combine the DataArrays' attrs via merge_attrs so the result carries the requested attribute outcome."} +{"repo": "pydata/xarray", "buggy_commit": "bdba889aa187b905343c94f3168703801f265e5b", "bug_issue": 4682, "solve_pr": 4687, "call_graph": {"nodes": [{"id": "xarray/core/computation.py::where"}], "edges": []}, "graph_spec": "The where function provides elementwise conditional selection between two sources of values, accepting scalars, arrays, and xarray objects and returning array-like or labeled data. It supports xarray’s dimension-aware broadcasting, which lets computations span named dimensions, within a contract of aligned dimension coordinates."} +{"repo": "pydata/xarray", "buggy_commit": "f74c446332feba47615fa02e75cda961c974c2c0", "bug_issue": 4954, "solve_pr": 4966, "call_graph": {"nodes": [{"id": "xarray/coding/variables.py::UnsignedIntegerCoder::decode"}], "edges": []}, "graph_spec": "UnsignedIntegerCoder.decode converts a serialized variable into an xarray variable with the integer signedness interpretation described by serialization metadata. It participates in xarray’s variable decoding conventions, where metadata conveys how stored numeric data should be interpreted in the in-memory data model."} +{"repo": "pydata/xarray", "buggy_commit": "8389fe6e8c86a04d57f25fe137b6f2db77065523", "bug_issue": 6444, "solve_pr": 6461, "call_graph": {"nodes": [{"id": "xarray/core/computation.py::where"}], "edges": []}, "graph_spec": "`where(cond, x, y, keep_attrs=None)` performs elementwise conditional selection—taking `x` wherever `cond` is true and `y` otherwise—while applying xarray’s labeled broadcasting and coordinate merging rules. Any indexes requiring alignment among labeled inputs must already be exactly equal, and Dataset inputs must expose the same data-variable set; otherwise alignment must fail rather than silently reindexing or filling values. Scalars and unlabeled arrays may participate and broadcast normally; the result preserves the highest-priority input container type (Dataset, then DataArray, then Variable, then array), its compatible dimensions and coordinates, and uses a shared promoted dtype for the two value branches. Lazy dask-backed inputs remain supported. Attribute handling follows the configured default unless overridden; `keep_attrs=True` copies `x`’s attributes."} +{"repo": "pydata/xarray", "buggy_commit": "6bb2b855498b5c68d7cca8cceb710365d58e6048", "bug_issue": 6597, "solve_pr": 6599, "call_graph": {"nodes": [{"id": "xarray/core/computation.py::_ensure_numeric"}, {"id": "xarray/core/computation.py::polyval"}], "edges": [{"source": "xarray/core/computation.py::polyval", "target": "xarray/core/computation.py::_ensure_numeric"}]}, "graph_spec": "`polyval` evaluates polynomials represented by coefficients along a polynomial-degree dimension at supplied values, accepting and returning xarray DataArray or Dataset objects. `_ensure_numeric` supports this numerical evaluation by converting datetime-valued variables to numeric representations within those objects, connecting temporal data with polynomial computation."} +{"repo": "pydata/xarray", "buggy_commit": "c4e40d991c28be51de9ac560ce895ac7f9b14924", "bug_issue": 6931, "solve_pr": 6938, "call_graph": {"nodes": [{"id": "xarray/core/variable.py::IndexVariable::to_index_variable"}], "edges": []}, "graph_spec": "IndexVariable.to_index_variable returns the variable as an xarray.IndexVariable, providing its index-oriented representation. An IndexVariable accommodates a pandas.Index within xarray’s variable model, representing immutable, one-dimensional values associated with a named dimension."} +{"repo": "pydata/xarray", "buggy_commit": "076bd8e15f04878d7b97100fb29177697018138f", "bug_issue": 7220, "solve_pr": 7229, "call_graph": {"nodes": [{"id": "xarray/core/computation.py::where"}], "edges": []}, "graph_spec": "`where(cond, x, y, keep_attrs=None)` must perform elementwise conditional selection—choosing `x` where `cond` is true and `y` otherwise—while applying xarray’s labeled broadcasting across all three inputs. Labeled indexes and Dataset data-variable sets that require alignment must match exactly, rather than being implicitly joined or reindexed; differing unlabeled dimensions may broadcast. It must preserve the highest-priority xarray container represented by the inputs (Dataset, then DataArray, then Variable, otherwise an array), use compatible shared value dtypes for the two alternatives, and allow supported lazy array inputs. Attribute handling follows the configured/default policy; when explicitly enabled, output-level, data-variable, and coordinate attributes are derived from `x`, including the Dataset-promotion case where only a named `x` variable receives its attributes."} +{"repo": "pylint-dev/pylint", "buggy_commit": "754b487f4d892e3d4872b6fc7468a71db4e31c13", "bug_issue": 6385, "solve_pr": 6386, "call_graph": {"nodes": [{"id": "pylint/checkers/base_checker.py::BaseChecker::__init__"}, {"id": "pylint/config/argument.py::_CallableArgument::__init__"}, {"id": "pylint/config/arguments_manager.py::_ArgumentsManager::_add_parser_option"}, {"id": "pylint/config/arguments_manager.py::_ArgumentsManager::_register_options_provider"}, {"id": "pylint/config/arguments_provider.py::_ArgumentsProvider::__init__"}, {"id": "pylint/config/utils.py::_convert_option_to_argument"}, {"id": "pylint/config/utils.py::_preprocess_options"}, {"id": "pylint/lint/base_options.py::_make_run_options"}, {"id": "pylint/lint/run.py::Run::__init__"}], "edges": [{"source": "pylint/checkers/base_checker.py::BaseChecker::__init__", "target": "pylint/config/arguments_provider.py::_ArgumentsProvider::__init__"}, {"source": "pylint/config/arguments_manager.py::_ArgumentsManager::_register_options_provider", "target": "pylint/config/utils.py::_convert_option_to_argument"}, {"source": "pylint/config/arguments_provider.py::_ArgumentsProvider::__init__", "target": "pylint/config/arguments_manager.py::_ArgumentsManager::_register_options_provider"}, {"source": "pylint/lint/run.py::Run::__init__", "target": "pylint/config/utils.py::_preprocess_options"}]}, "graph_spec": "Run initialization must preprocess only the designated early command-line options before creating the linter: consume them (including either `--option=value` or a following non-option value when required), apply their effects to the Run state, preserve all other arguments in order, and reject missing required values or values supplied to valueless options. Checker/provider construction must normalize a non-null checker name to lowercase, retain its manager, and immediately register every declared option. Registration must translate each option definition into the appropriate argparse argument, retaining long/short flags, default, type conversion, choices, destination, grouping, help visibility, and deprecation or extension semantics; callback actions must retain their action class, supplied keyword arguments, and metavar and be added with those keyword arguments. Options must be placed in their declared section (or the provider-derived section), share groups consistently, and parsing an empty argument list after registration must load the accumulated defaults into the common configuration namespace."} +{"repo": "pylint-dev/pylint", "buggy_commit": "0220a39f6d4dddd1bf8f2f6d83e11db58a093fbe", "bug_issue": 6471, "solve_pr": 6528, "call_graph": {"nodes": [{"id": "pylint/lint/pylinter.py::PyLinter::_discover_files"}, {"id": "pylint/lint/pylinter.py::PyLinter::check"}, {"id": "pylint/lint/run.py::Run::__init__"}], "edges": [{"source": "pylint/lint/pylinter.py::PyLinter::check", "target": "pylint/lint/pylinter.py::PyLinter::_discover_files"}, {"source": "pylint/lint/run.py::Run::__init__", "target": "pylint/lint/pylinter.py::PyLinter::check"}]}, "graph_spec": "These functions support Pylint’s analysis of Python code for errors, coding-standard issues, and code smells. Run.__init__ provides the command-line-oriented startup interface and initiates linting; PyLinter.check is the main entry point for checking named files or modules; and PyLinter._discover_files identifies Python modules and packages within directories and yields their paths as analysis targets."} +{"repo": "pylint-dev/pylint", "buggy_commit": "cfc393a8dff9ec09bd2fcb25857e772ae04a4991", "bug_issue": 7229, "solve_pr": 8898, "call_graph": {"nodes": [{"id": "pylint/config/argument.py::_regexp_csv_transfomer"}], "edges": []}, "graph_spec": "`_regexp_csv_transfomer` converts a comma-separated string of regular expressions into a sequence of compiled patterns for Pylint’s option-parsing system. Regular expressions describe text-matching patterns, allowing configuration options to express multiple matching criteria."} +{"repo": "pylint-dev/pylint", "buggy_commit": "684a1d6aa0a6791e20078bc524f97c8906332390", "bug_issue": 7231, "solve_pr": 7277, "call_graph": {"nodes": [{"id": "pylint/__init__.py::modify_sys_path"}], "edges": []}, "graph_spec": "`modify_sys_path` mutates `sys.path` for module execution so imports do not resolve from the current working directory: it removes an initial empty string, `'.'`, or exact cwd entry; then, when `PYTHONPATH` begins or ends with an empty path component, removes the corresponding cwd-derived entry near the front unless `PYTHONPATH` explicitly names the cwd or `'.'`. It must preserve later `sys.path` entries, including an editable-install path, and leave entries unchanged when these conditions do not apply."} +{"repo": "pytest-dev/pytest", "buggy_commit": "da9a2b584eb7a6c7e924b2621ed0ddaeca0a7bea", "bug_issue": 10060, "solve_pr": 10081, "call_graph": {"nodes": [{"id": "src/_pytest/unittest.py::TestCaseFunction::runtest"}], "edges": []}, "graph_spec": "The `runtest` method executes a collected standard-library `unittest.TestCase` test through pytest’s test-item interface. It serves as the integration point between unittest’s test execution and result protocol and pytest’s test-running and reporting model."} +{"repo": "pytest-dev/pytest", "buggy_commit": "c98e7aed940d4f3b36f537d66079b4dc3490e5d4", "bug_issue": 5606, "solve_pr": 5631, "call_graph": {"nodes": [{"id": "src/_pytest/compat.py::getfuncargnames"}, {"id": "src/_pytest/compat.py::num_mock_patch_args"}, {"id": "src/_pytest/fixtures.py::FixtureDef::__init__"}, {"id": "src/_pytest/fixtures.py::FixtureManager::getfixtureinfo"}, {"id": "src/_pytest/fixtures.py::fillfixtures"}, {"id": "src/_pytest/python.py::Function::setup"}, {"id": "src/_pytest/python.py::PyCollector::_genfunctions"}, {"id": "src/_pytest/python.py::PyCollector::_makeitem"}, {"id": "src/_pytest/python.py::PyCollector::collect"}, {"id": "src/_pytest/python.py::pytest_pycollect_makeitem"}], "edges": [{"source": "src/_pytest/compat.py::getfuncargnames", "target": "src/_pytest/compat.py::num_mock_patch_args"}, {"source": "src/_pytest/fixtures.py::FixtureDef::__init__", "target": "src/_pytest/compat.py::getfuncargnames"}, {"source": "src/_pytest/fixtures.py::FixtureManager::getfixtureinfo", "target": "src/_pytest/compat.py::getfuncargnames"}, {"source": "src/_pytest/fixtures.py::fillfixtures", "target": "src/_pytest/fixtures.py::FixtureManager::getfixtureinfo"}, {"source": "src/_pytest/python.py::Function::setup", "target": "src/_pytest/fixtures.py::fillfixtures"}, {"source": "src/_pytest/python.py::PyCollector::_genfunctions", "target": "src/_pytest/fixtures.py::FixtureManager::getfixtureinfo"}, {"source": "src/_pytest/python.py::PyCollector::_makeitem", "target": "src/_pytest/python.py::pytest_pycollect_makeitem"}, {"source": "src/_pytest/python.py::PyCollector::collect", "target": "src/_pytest/python.py::PyCollector::_makeitem"}, {"source": "src/_pytest/python.py::pytest_pycollect_makeitem", "target": "src/_pytest/python.py::PyCollector::_genfunctions"}]}, "graph_spec": "Python collection must traverse an object's own and inherited namespace deterministically, honor opt-out and configured test naming rules, defer item creation through the collection hook, and provide default handling that recognizes eligible classes and callable test functions while rejecting non-functions with an appropriate collection warning. A collected test function must expand into one runnable item per generated parameter call (or one unparameterized item), retaining its fixture metadata and parameter identity. Fixture requirements must be derived in declaration order from mandatory positional-or-keyword and keyword-only parameters, excluding bound instance/class receivers, defaulted or partial-bound parameters, and mock-injected arguments; fixtures apply the analogous method rule. Fixture information must combine explicit arguments with usefixtures and visible autouse/dependency closure, while direct parametrization prevents same-named fixtures from being treated as dependencies. At setup, every required fixture must be resolved and populated before invocation; compatibility setup without a preexisting request must construct equivalent fixture information and retain only declared function arguments."} +{"repo": "pytest-dev/pytest", "buggy_commit": "0215bcd84e900d9271558df98bed89f4b96187f8", "bug_issue": 5786, "solve_pr": 5787, "call_graph": {"nodes": [{"id": "src/_pytest/reports.py::BaseReport::_from_json"}, {"id": "src/_pytest/reports.py::BaseReport::_to_json"}, {"id": "src/_pytest/reports.py::pytest_report_from_serializable"}, {"id": "src/_pytest/reports.py::pytest_report_to_serializable"}], "edges": [{"source": "src/_pytest/reports.py::pytest_report_from_serializable", "target": "src/_pytest/reports.py::BaseReport::_from_json"}, {"source": "src/_pytest/reports.py::pytest_report_to_serializable", "target": "src/_pytest/reports.py::BaseReport::_to_json"}]}, "graph_spec": "These functions support converting pytest test-execution and collection reports into serializable data and restoring report objects, enabling report exchange by plugins. BaseReport._to_json and BaseReport._from_json provide the report-level conversion interface, while pytest_report_to_serializable and pytest_report_from_serializable expose that responsibility through pytest’s experimental serialization hooks."} +{"repo": "pytest-dev/pytest", "buggy_commit": "8aba863a634f40560e25055d179220f0eefabe9a", "bug_issue": 5806, "solve_pr": 5809, "call_graph": {"nodes": [{"id": "src/_pytest/pastebin.py::create_new_paste"}, {"id": "src/_pytest/pastebin.py::pytest_terminal_summary"}, {"id": "src/_pytest/pastebin.py::pytest_unconfigure"}], "edges": [{"source": "src/_pytest/pastebin.py::pytest_terminal_summary", "target": "src/_pytest/pastebin.py::create_new_paste"}, {"source": "src/_pytest/pastebin.py::pytest_unconfigure", "target": "src/_pytest/pastebin.py::create_new_paste"}]}, "graph_spec": "These functions support sharing pytest failure reports and test-session logs through a pastebin, a remote service that makes submitted text accessible by URL. create_new_paste accepts report contents and returns a paste URL; pytest_terminal_summary integrates failure-report sharing with terminal summary reporting, while pytest_unconfigure supports session-log sharing as the test process concludes."} +{"repo": "pytest-dev/pytest", "buggy_commit": "73c5b7f4b11a81e971f7d1bb18072e06a87060f4", "bug_issue": 5819, "solve_pr": 5840, "call_graph": {"nodes": [{"id": "src/_pytest/config/__init__.py::Config::_getconftest_pathlist"}, {"id": "src/_pytest/config/__init__.py::Config::_preparse"}, {"id": "src/_pytest/config/__init__.py::Config::fromdictargs"}, {"id": "src/_pytest/config/__init__.py::Config::parse"}, {"id": "src/_pytest/config/__init__.py::Config::pytest_cmdline_parse"}, {"id": "src/_pytest/config/__init__.py::Config::pytest_load_initial_conftests"}, {"id": "src/_pytest/config/__init__.py::PytestPluginManager::_getconftestmodules"}, {"id": "src/_pytest/config/__init__.py::PytestPluginManager::_importconftest"}, {"id": "src/_pytest/config/__init__.py::PytestPluginManager::_rget_with_confmod"}, {"id": "src/_pytest/config/__init__.py::PytestPluginManager::_set_initial_conftests"}, {"id": "src/_pytest/config/__init__.py::PytestPluginManager::_try_load_conftest"}, {"id": "src/_pytest/doctest.py::DoctestModule::collect"}, {"id": "src/_pytest/main.py::Session::_collect"}, {"id": "src/_pytest/main.py::Session::_collectfile"}, {"id": "src/_pytest/main.py::Session::_recurse"}, {"id": "src/_pytest/main.py::Session::collect"}, {"id": "src/_pytest/main.py::Session::gethookproxy"}, {"id": "src/_pytest/main.py::pytest_ignore_collect"}, {"id": "src/_pytest/pathlib.py::unique_path"}, {"id": "src/_pytest/python.py::Package::_collectfile"}, {"id": "src/_pytest/python.py::Package::_recurse"}, {"id": "src/_pytest/python.py::Package::collect"}, {"id": "src/_pytest/python.py::Package::gethookproxy"}], "edges": [{"source": "src/_pytest/config/__init__.py::Config::_getconftest_pathlist", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_rget_with_confmod"}, {"source": "src/_pytest/config/__init__.py::Config::_preparse", "target": "src/_pytest/config/__init__.py::Config::pytest_load_initial_conftests"}, {"source": "src/_pytest/config/__init__.py::Config::fromdictargs", "target": "src/_pytest/config/__init__.py::Config::parse"}, {"source": "src/_pytest/config/__init__.py::Config::parse", "target": "src/_pytest/config/__init__.py::Config::_preparse"}, {"source": "src/_pytest/config/__init__.py::Config::pytest_cmdline_parse", "target": "src/_pytest/config/__init__.py::Config::parse"}, {"source": "src/_pytest/config/__init__.py::Config::pytest_load_initial_conftests", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_set_initial_conftests"}, {"source": "src/_pytest/config/__init__.py::PytestPluginManager::_getconftestmodules", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_importconftest"}, {"source": "src/_pytest/config/__init__.py::PytestPluginManager::_getconftestmodules", "target": "src/_pytest/pathlib.py::unique_path"}, {"source": "src/_pytest/config/__init__.py::PytestPluginManager::_importconftest", "target": "src/_pytest/pathlib.py::unique_path"}, {"source": "src/_pytest/config/__init__.py::PytestPluginManager::_rget_with_confmod", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_getconftestmodules"}, {"source": "src/_pytest/config/__init__.py::PytestPluginManager::_set_initial_conftests", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_try_load_conftest"}, {"source": "src/_pytest/config/__init__.py::PytestPluginManager::_try_load_conftest", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_getconftestmodules"}, {"source": "src/_pytest/doctest.py::DoctestModule::collect", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_importconftest"}, {"source": "src/_pytest/main.py::Session::_collect", "target": "src/_pytest/main.py::Session::_collectfile"}, {"source": "src/_pytest/main.py::Session::_collect", "target": "src/_pytest/main.py::Session::collect"}, {"source": "src/_pytest/main.py::Session::_collectfile", "target": "src/_pytest/main.py::Session::gethookproxy"}, {"source": "src/_pytest/main.py::Session::_recurse", "target": "src/_pytest/main.py::Session::gethookproxy"}, {"source": "src/_pytest/main.py::Session::collect", "target": "src/_pytest/main.py::Session::_collect"}, {"source": "src/_pytest/main.py::Session::gethookproxy", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_getconftestmodules"}, {"source": "src/_pytest/main.py::pytest_ignore_collect", "target": "src/_pytest/config/__init__.py::Config::_getconftest_pathlist"}, {"source": "src/_pytest/python.py::Package::_collectfile", "target": "src/_pytest/python.py::Package::gethookproxy"}, {"source": "src/_pytest/python.py::Package::_recurse", "target": "src/_pytest/python.py::Package::gethookproxy"}, {"source": "src/_pytest/python.py::Package::collect", "target": "src/_pytest/python.py::Package::_collectfile"}, {"source": "src/_pytest/python.py::Package::gethookproxy", "target": "src/_pytest/config/__init__.py::PytestPluginManager::_getconftestmodules"}]}, "graph_spec": "The scoped functions support pytest configuration and test discovery, constructing configuration from options and arguments and loading or consulting conftest.py files, which provide directory-scoped plugin hooks and settings. Session, package, and doctest collection discover collectors and test items from filesystem and Python sources, with related responsibilities for collection exclusions, path handling, and access to hooks applicable to a collection location."} +{"repo": "pytest-dev/pytest", "buggy_commit": "3a668ea6ff24b0c8f00498c3144c63bac561d925", "bug_issue": 6189, "solve_pr": 6202, "call_graph": {"nodes": [{"id": "src/_pytest/python.py::PyobjMixin::getmodpath"}, {"id": "src/_pytest/python.py::PyobjMixin::reportinfo"}], "edges": [{"source": "src/_pytest/python.py::PyobjMixin::reportinfo", "target": "src/_pytest/python.py::PyobjMixin::getmodpath"}]}, "graph_spec": "PyobjMixin must derive a stable dotted path from a node’s collection ancestry: omit instance wrapper nodes, strip a module filename’s extension, and by default stop before the containing module so the result names the object within that module; optional flags must allow retaining the module component or continuing beyond it. reportinfo must return a `(file path, integer line number, display path)` tuple for the underlying object, using the compatibility first-line attribute and normalized source filename when supplied, otherwise ordinary source-location discovery, and must use the default module-relative path as the display path."} +{"repo": "pytest-dev/pytest", "buggy_commit": "e856638ba086fcf5bebf1bebea32d5cf78de87b4", "bug_issue": 6194, "solve_pr": 6197, "call_graph": {"nodes": [{"id": "src/_pytest/python.py::Package::collect"}], "edges": []}, "graph_spec": "Package collection treats the package’s directory as the collection root: it first exposes that package’s own `__init__.py` as a module only when it exists and matches the configured Python-file patterns, then traverses entries deterministically while honoring directory-recursion and collection-ignore policy. The root `__init__.py` must not be collected twice; files are delegated through normal file-collection filtering and duplicate handling; non-filesystem entries are ignored; and once a nested directory is recognized as a package, its descendants must be withheld from this collector so that nested packages retain their own collection boundary."} +{"repo": "pytest-dev/pytest", "buggy_commit": "741a8b8023ecc72635e6b258cd88212620e06ff5", "bug_issue": 7126, "solve_pr": 7205, "call_graph": {"nodes": [{"id": "src/_pytest/setuponly.py::_show_fixture_action"}, {"id": "src/_pytest/setuponly.py::pytest_fixture_post_finalizer"}], "edges": [{"source": "src/_pytest/setuponly.py::pytest_fixture_post_finalizer", "target": "src/_pytest/setuponly.py::_show_fixture_action"}]}, "graph_spec": "These functions support reporting fixture lifecycle activity in pytest. `_show_fixture_action` presents fixture action information, while `pytest_fixture_post_finalizer` connects fixture teardown to that reporting."} +{"repo": "pytest-dev/pytest", "buggy_commit": "c98bc4cd3d687fe9b392d8eecd905627191d4f06", "bug_issue": 7215, "solve_pr": 7236, "call_graph": {"nodes": [{"id": "src/_pytest/unittest.py::TestCaseFunction::runtest"}], "edges": []}, "graph_spec": "TestCaseFunction.runtest executes a collected unittest.TestCase test method within pytest’s test-running lifecycle. It bridges unittest’s class-based testing model with pytest’s role as a test runner, allowing existing unittest suites to run under pytest."} +{"repo": "pytest-dev/pytest", "buggy_commit": "cc283cfe79b9ab97edd2d10fb05d217ff498b809", "bug_issue": 7322, "solve_pr": 7324, "call_graph": {"nodes": [{"id": "src/_pytest/mark/__init__.py::deselect_by_keyword"}, {"id": "src/_pytest/mark/__init__.py::deselect_by_mark"}, {"id": "src/_pytest/mark/__init__.py::pytest_collection_modifyitems"}, {"id": "src/_pytest/mark/evaluate.py::MarkEvaluator::_istrue"}, {"id": "src/_pytest/mark/evaluate.py::MarkEvaluator::istrue"}, {"id": "src/_pytest/mark/evaluate.py::cached_eval"}, {"id": "src/_pytest/mark/expression.py::Expression::compile"}, {"id": "src/_pytest/mark/expression.py::MatcherAdapter::__getitem__"}, {"id": "src/_pytest/mark/expression.py::and_expr"}, {"id": "src/_pytest/mark/expression.py::expr"}, {"id": "src/_pytest/mark/expression.py::expression"}, {"id": "src/_pytest/mark/expression.py::not_expr"}, {"id": "src/_pytest/skipping.py::check_strict_xfail"}, {"id": "src/_pytest/skipping.py::check_xfail_no_run"}, {"id": "src/_pytest/skipping.py::pytest_pyfunc_call"}, {"id": "src/_pytest/skipping.py::pytest_runtest_makereport"}, {"id": "src/_pytest/skipping.py::pytest_runtest_setup"}], "edges": [{"source": "src/_pytest/mark/__init__.py::deselect_by_keyword", "target": "src/_pytest/mark/expression.py::Expression::compile"}, {"source": "src/_pytest/mark/__init__.py::deselect_by_mark", "target": "src/_pytest/mark/expression.py::Expression::compile"}, {"source": "src/_pytest/mark/__init__.py::pytest_collection_modifyitems", "target": "src/_pytest/mark/__init__.py::deselect_by_keyword"}, {"source": "src/_pytest/mark/__init__.py::pytest_collection_modifyitems", "target": "src/_pytest/mark/__init__.py::deselect_by_mark"}, {"source": "src/_pytest/mark/evaluate.py::MarkEvaluator::_istrue", "target": "src/_pytest/mark/evaluate.py::cached_eval"}, {"source": "src/_pytest/mark/evaluate.py::MarkEvaluator::istrue", "target": "src/_pytest/mark/evaluate.py::MarkEvaluator::_istrue"}, {"source": "src/_pytest/mark/evaluate.py::cached_eval", "target": "src/_pytest/mark/expression.py::Expression::compile"}, {"source": "src/_pytest/mark/expression.py::Expression::compile", "target": "src/_pytest/mark/expression.py::Expression::compile"}, {"source": "src/_pytest/mark/expression.py::Expression::compile", "target": "src/_pytest/mark/expression.py::expression"}, {"source": "src/_pytest/mark/expression.py::and_expr", "target": "src/_pytest/mark/expression.py::not_expr"}, {"source": "src/_pytest/mark/expression.py::expr", "target": "src/_pytest/mark/expression.py::and_expr"}, {"source": "src/_pytest/mark/expression.py::expression", "target": "src/_pytest/mark/expression.py::expr"}, {"source": "src/_pytest/mark/expression.py::not_expr", "target": "src/_pytest/mark/expression.py::expr"}, {"source": "src/_pytest/mark/expression.py::not_expr", "target": "src/_pytest/mark/expression.py::not_expr"}, {"source": "src/_pytest/skipping.py::check_strict_xfail", "target": "src/_pytest/mark/evaluate.py::MarkEvaluator::istrue"}, {"source": "src/_pytest/skipping.py::check_xfail_no_run", "target": "src/_pytest/mark/evaluate.py::MarkEvaluator::istrue"}, {"source": "src/_pytest/skipping.py::pytest_pyfunc_call", "target": "src/_pytest/skipping.py::check_strict_xfail"}, {"source": "src/_pytest/skipping.py::pytest_pyfunc_call", "target": "src/_pytest/skipping.py::check_xfail_no_run"}, {"source": "src/_pytest/skipping.py::pytest_runtest_makereport", "target": "src/_pytest/mark/evaluate.py::MarkEvaluator::istrue"}, {"source": "src/_pytest/skipping.py::pytest_runtest_setup", "target": "src/_pytest/mark/evaluate.py::MarkEvaluator::istrue"}, {"source": "src/_pytest/skipping.py::pytest_runtest_setup", "target": "src/_pytest/skipping.py::check_xfail_no_run"}]}, "graph_spec": "Collection filtering must apply `-k` before `-m`, compile each nonempty selector into the restricted boolean expression language, and retain only items whose keyword or marker matcher satisfies it; deselection must be reported and replace the collection in place. Expressions must reject invalid syntax with a position-aware error, treat an empty expression as false, preserve standard `not`/`and`/`or` precedence and parentheses, and resolve identifiers solely through the supplied matcher. Conditional marks must be evaluated once per evaluator with short-circuit semantics across applicable marks and conditions, evaluate string conditions in the test module globals plus `os`, `sys`, `platform`, and config, cache compiled/evaluated string expressions per config, require a reason for boolean conditions, and turn evaluation errors into clear test failures. During setup and reporting, skip/skipif conditions must prevent execution with their explanation, while xfail honors `--runxfail`, `run=False`, `raises`, and configured/per-mark strictness so non-running expected failures, expected failures, unexpected successes, and strict unexpected passes receive their corresponding execution and report outcomes."} +{"repo": "pytest-dev/pytest", "buggy_commit": "61014c5f94b99624c47b1aad9ae47782597dc88f", "bug_issue": 7392, "solve_pr": 7432, "call_graph": {"nodes": [{"id": "src/_pytest/skipping.py::pytest_runtest_makereport"}], "edges": []}, "graph_spec": "As a report-wrapper hook, obtain the completed phase report and normalize it according to the item’s stored skip/xfail state without disturbing ordinary outcomes when `--runxfail` is enabled. A call-phase unexpected success must be reported as a failure with an appropriate message. An explicit xfail exception becomes a skipped report carrying its reason; an active xfail mark converts eligible failures to skipped expected failures (except failures outside its permitted exception types, which remain failures), and converts a successful call to either an XPASS or a strict failure. Finally, skips caused by skip markers must retain their reason while relocating tuple-form skip metadata to the test item’s definition location for accurate reporting."} +{"repo": "pytest-dev/pytest", "buggy_commit": "7f7a36478abe7dd1fa993b115d22606aa0e35e88", "bug_issue": 7486, "solve_pr": 7490, "call_graph": {"nodes": [{"id": "src/_pytest/skipping.py::pytest_runtest_call"}], "edges": []}, "graph_spec": "The skipping plugin’s pytest_runtest_call hook participates in the call phase of a test item, integrating expected-failure support with test execution. Expected failure (xfail) is pytest’s concept for identifying tests anticipated to fail as part of the suite’s declared expectations."} +{"repo": "pytest-dev/pytest", "buggy_commit": "41d211c24a6781843b174379d6d6538f5c17adb9", "bug_issue": 7517, "solve_pr": 7521, "call_graph": {"nodes": [{"id": "src/_pytest/capture.py::FDCaptureBinary::__init__"}], "edges": []}, "graph_spec": "FDCaptureBinary.__init__ initializes a binary I/O capture object for a specified operating-system file descriptor. File descriptors identify I/O channels at the operating-system level; this object supports pytest’s descriptor-level capture, with captured data represented as bytes."} +{"repo": "pytest-dev/pytest", "buggy_commit": "422685d0bdc110547535036c1ff398b5e1c44145", "bug_issue": 7569, "solve_pr": 7571, "call_graph": {"nodes": [{"id": "src/_pytest/logging.py::LogCaptureFixture::__init__"}, {"id": "src/_pytest/logging.py::LogCaptureFixture::_finalize"}, {"id": "src/_pytest/logging.py::LogCaptureFixture::set_level"}, {"id": "src/_pytest/logging.py::caplog"}], "edges": [{"source": "src/_pytest/logging.py::caplog", "target": "src/_pytest/logging.py::LogCaptureFixture::_finalize"}]}, "graph_spec": "These functions provide pytest’s test-scoped log capture fixture, giving tests access to captured logging output for inspection and assertions. LogCaptureFixture.__init__ creates the fixture for a test node, caplog exposes it to tests, set_level controls capture verbosity through logging levels, and _finalize restores levels changed through the fixture when the test ends."} +{"repo": "pytest-dev/pytest", "buggy_commit": "24ef7c98e88081fbd1d4050374bb50a5a3c6cb0e", "bug_issue": 7792, "solve_pr": 10356, "call_graph": {"nodes": [{"id": "src/_pytest/mark/structures.py::MarkDecorator::__call__"}, {"id": "src/_pytest/mark/structures.py::get_unpacked_marks"}, {"id": "src/_pytest/mark/structures.py::store_mark"}, {"id": "src/_pytest/python.py::Class::newinstance"}, {"id": "src/_pytest/python.py::Function::_getobj"}, {"id": "src/_pytest/python.py::PyobjMixin::obj"}], "edges": [{"source": "src/_pytest/mark/structures.py::MarkDecorator::__call__", "target": "src/_pytest/mark/structures.py::store_mark"}, {"source": "src/_pytest/mark/structures.py::store_mark", "target": "src/_pytest/mark/structures.py::get_unpacked_marks"}, {"source": "src/_pytest/python.py::Class::newinstance", "target": "src/_pytest/python.py::PyobjMixin::obj"}, {"source": "src/_pytest/python.py::Function::_getobj", "target": "src/_pytest/python.py::Class::newinstance"}, {"source": "src/_pytest/python.py::PyobjMixin::obj", "target": "src/_pytest/mark/structures.py::get_unpacked_marks"}]}, "graph_spec": "These functions support applying, storing, and retrieving pytest marks on Python test objects, including configuring mark decorators. They also provide access to the underlying Python objects represented by collection and test nodes, create test-class instances, and obtain the callable associated with a test-function item."} +{"repo": "pytest-dev/pytest", "buggy_commit": "a7e38c5c61928033a2dc1915cbee8caa8544a4d0", "bug_issue": 7981, "solve_pr": 7982, "call_graph": {"nodes": [{"id": "src/_pytest/main.py::Session::collect"}, {"id": "src/_pytest/pathlib.py::visit"}, {"id": "src/_pytest/python.py::Package::collect"}], "edges": [{"source": "src/_pytest/main.py::Session::collect", "target": "src/_pytest/pathlib.py::visit"}, {"source": "src/_pytest/python.py::Package::collect", "target": "src/_pytest/pathlib.py::visit"}]}, "graph_spec": "Directory collection must traverse deterministically: enumerate each directory’s entries in name order, expose those entries before descending, and descend only into directories accepted by the caller’s recursion policy. Session-level collection must apply that policy, process a directory’s package initializer before its other files, and delegate a recognized package’s contents to its package collector so the same file or collector is not emitted again. Package collection must optionally yield its own initializer when it matches configured file patterns, skip that initializer during the general walk, collect eligible ordinary files, and treat nested directories with an initializer as separate package boundaries: retain their initializer for package discovery while excluding their remaining descendants from the enclosing package’s results. Non-file, non-directory entries are ignored."} +{"repo": "pytest-dev/pytest", "buggy_commit": "c14a9adba35ac675ce3e825d34d01d5bb51748c3", "bug_issue": 8394, "solve_pr": 8399, "call_graph": {"nodes": [{"id": "src/_pytest/python.py::Class::_inject_setup_class_fixture"}, {"id": "src/_pytest/python.py::Class::_inject_setup_method_fixture"}, {"id": "src/_pytest/python.py::Class::collect"}, {"id": "src/_pytest/python.py::Module::_inject_setup_function_fixture"}, {"id": "src/_pytest/python.py::Module::_inject_setup_module_fixture"}, {"id": "src/_pytest/unittest.py::UnitTestCase::_inject_setup_teardown_fixtures"}, {"id": "src/_pytest/unittest.py::UnitTestCase::collect"}, {"id": "src/_pytest/unittest.py::_make_xunit_fixture"}], "edges": [{"source": "src/_pytest/python.py::Class::collect", "target": "src/_pytest/python.py::Class::_inject_setup_class_fixture"}, {"source": "src/_pytest/python.py::Class::collect", "target": "src/_pytest/python.py::Class::_inject_setup_method_fixture"}, {"source": "src/_pytest/unittest.py::UnitTestCase::_inject_setup_teardown_fixtures", "target": "src/_pytest/unittest.py::_make_xunit_fixture"}, {"source": "src/_pytest/unittest.py::UnitTestCase::collect", "target": "src/_pytest/python.py::Class::_inject_setup_class_fixture"}, {"source": "src/_pytest/unittest.py::UnitTestCase::collect", "target": "src/_pytest/unittest.py::UnitTestCase::_inject_setup_teardown_fixtures"}]}, "graph_spec": "These functions support collection of Python test classes and unittest.TestCase tests into pytest’s test hierarchy, and integrate their lifecycle hooks with pytest’s fixture system. The fixture injection and construction functions adapt module, class, function, and method setup and teardown responsibilities into automatically applied fixtures, connecting xunit-style management of test state with pytest’s scoped fixture model."} +{"repo": "qutebrowser/qutebrowser", "buggy_commit": "690813e1b10fee83660a6740ab3aabc575a9b125", "bug_issue": 7866, "solve_pr": 7933, "call_graph": {"nodes": [{"id": "qutebrowser/browser/webengine/webview.py::WebEnginePage::chooseFiles"}], "edges": [{"source": "qutebrowser/browser/webengine/webview.py::WebEnginePage::chooseFiles", "target": "qutebrowser/browser/webengine/webview.py::WebEnginePage::chooseFiles"}]}, "graph_spec": "File selection handling must preserve the browser’s file-input selection semantics while honoring the configured handler: with native/default handling, it must honor the requested mode and prior selections and make every file allowed by the full accepted-type constraint available, including equivalent filename forms, without discarding the original restrictions. With the external handler, it must translate supported single-file, multiple-file, and directory-selection modes to the corresponding external selection operation and return its selected paths. Any unrecognized selection mode must safely retain native selection behavior rather than invoking an inapplicable external command."} +{"repo": "qutebrowser/qutebrowser", "buggy_commit": "434f6906f9088172494fa7e219a856d893ed55ba", "bug_issue": 7928, "solve_pr": 7935, "call_graph": {"nodes": [{"id": "qutebrowser/browser/webengine/darkmode.py::_variant"}, {"id": "qutebrowser/browser/webengine/darkmode.py::settings"}, {"id": "qutebrowser/config/qtargs.py::_qtwebengine_args"}, {"id": "qutebrowser/config/qtargs.py::qt_args"}], "edges": [{"source": "qutebrowser/browser/webengine/darkmode.py::settings", "target": "qutebrowser/browser/webengine/darkmode.py::_variant"}, {"source": "qutebrowser/config/qtargs.py::_qtwebengine_args", "target": "qutebrowser/browser/webengine/darkmode.py::settings"}, {"source": "qutebrowser/config/qtargs.py::qt_args", "target": "qutebrowser/config/qtargs.py::_qtwebengine_args"}]}, "graph_spec": "qt_args must return the final argument vector for Qt: it preserves ordinary user flags and qt.args entries, stops after them for non-QtWebEngine backends, and for QtWebEngine inserts `--webEngineArgs` right after argv[0] when the WebEngine version is >= 6.4 so subsequent Chromium switches are treated as web-engine arguments. Flags with the `--enable-features=`, `--disable-features=` or `--blink-settings=` prefixes must be stripped from their original positions and routed into `_qtwebengine_args` via special_flags, so their content survives (possibly recombined) rather than being duplicated in place; if the WebEngine import is unavailable, qt_args must return without invoking web-engine argument generation. _qtwebengine_args must yield the dark-mode switches produced by darkmode.settings and must only ever emit the switch names `blink-settings` or `dark-mode-settings`, serialized as `--=key=value,key=value`, without disturbing the other derived arguments (language override, debug flags, feature enable/disable, Chromium settings). darkmode.settings must always return a mapping from Chromium switch name to ordered key/value pairs: preexisting `--blink-settings=` pairs are merged in first, a variant-appropriate `preferredColorScheme` value is added when the configured preferred color scheme has an encoding for that variant, and when the dark mode option is disabled the result must contain only those blink settings with no dark-mode settings emitted. When dark mode is enabled, values are drawn from the per-variant definitions with variant-specific key prefixes: mandatory options (`enabled` and `policy.images`) must always be emitted even when left at default, so Chromium's differing default image policy cannot override them, while non-mandatory options left unset must be omitted to bound command-line length; each emitted value must be stringified through the definition's mapping and boolean/enum tables so encodings and key names match the running WebEngine. A valid `QUTE_DARKMODE_VARIANT` environment override must be honored, while an invalid one is ignored with a warning and the automatic per-version choice is used instead."} +{"repo": "redis/redis", "buggy_commit": "d1a17fad7825545ce898242937036e8d5cf08ee6", "bug_issue": 16004, "solve_pr": 16006, "call_graph": {"nodes": [{"id": "src/t_stream.c::streamTrim"}, {"id": "src/t_stream.c::xaddCommand"}, {"id": "src/t_stream.c::xtrimCommand"}], "edges": [{"source": "src/t_stream.c::xaddCommand", "target": "src/t_stream.c::streamTrim"}, {"source": "src/t_stream.c::xtrimCommand", "target": "src/t_stream.c::streamTrim"}]}, "graph_spec": "Redis streams hold messages identified by entry IDs and containing field-value data. Within this scope, xaddCommand appends messages and supports trimming, while xtrimCommand exposes trimming as a standalone command; streamTrim provides their shared responsibility for removing entries according to trimming criteria. Addition reports an entry ID, while trimming reports the number of entries removed."} +{"repo": "redis/redis", "buggy_commit": "da47cd5bf47ccff66b5f406b1b4677bda0136d42", "bug_issue": 16025, "solve_pr": 16026, "call_graph": {"nodes": [{"id": "src/hotkeys.c::hotkeysCommand"}], "edges": []}, "graph_spec": "hotkeysCommand handles Redis client requests to manage hot-key tracking, retrieve tracking statistics, release tracking resources, and obtain command help. Hot keys are keys associated with prominent CPU-time or network-byte consumption; this command provides an administrative interface for identifying those resource-intensive keys."} +{"repo": "redis/redis", "buggy_commit": "9e190968035ff4a72c17c28d2b461a803a418166", "bug_issue": 16051, "solve_pr": 16053, "call_graph": {"nodes": [{"id": "src/redis-cli.c::clusterManagerCommandAddNode"}], "edges": []}, "graph_spec": "clusterManagerCommandAddNode handles redis-cli’s cluster-management command for adding a Redis server to an existing cluster, using addresses identifying the new server and an existing member. Its role is to extend cluster membership within Redis’s primary–replica model, where replicas maintain copies of a primary server’s data."} +{"repo": "redis/redis", "buggy_commit": "33c2a2a145d3f09b42503df27d3ffbc76f34e32c", "bug_issue": 16095, "solve_pr": 16096, "call_graph": {"nodes": [{"id": "src/aof.c::loadAppendOnlyFiles"}, {"id": "src/aof.c::loadPreLoadAOFFile"}, {"id": "src/aof.c::loadPreLoadManifestFile"}, {"id": "src/aof.c::loadSingleAppendOnlyFile"}, {"id": "src/debug.c::debugCommand"}, {"id": "src/multi.c::execCommand"}, {"id": "src/script.c::scriptCall"}, {"id": "src/server.c::call"}, {"id": "src/server.c::loadDataFromDisk"}, {"id": "src/server.c::main"}, {"id": "src/t_string.c::msetexCommand"}, {"id": "src/t_string.c::parseExtendedStringArgumentsOrReply"}], "edges": [{"source": "src/aof.c::loadAppendOnlyFiles", "target": "src/aof.c::loadSingleAppendOnlyFile"}, {"source": "src/aof.c::loadPreLoadAOFFile", "target": "src/aof.c::loadAppendOnlyFiles"}, {"source": "src/aof.c::loadPreLoadManifestFile", "target": "src/aof.c::loadAppendOnlyFiles"}, {"source": "src/aof.c::loadSingleAppendOnlyFile", "target": "src/multi.c::execCommand"}, {"source": "src/aof.c::loadSingleAppendOnlyFile", "target": "src/t_string.c::msetexCommand"}, {"source": "src/debug.c::debugCommand", "target": "src/aof.c::loadAppendOnlyFiles"}, {"source": "src/multi.c::execCommand", "target": "src/server.c::call"}, {"source": "src/script.c::scriptCall", "target": "src/server.c::call"}, {"source": "src/server.c::call", "target": "src/debug.c::debugCommand"}, {"source": "src/server.c::call", "target": "src/multi.c::execCommand"}, {"source": "src/server.c::call", "target": "src/t_string.c::msetexCommand"}, {"source": "src/server.c::loadDataFromDisk", "target": "src/aof.c::loadAppendOnlyFiles"}, {"source": "src/server.c::loadDataFromDisk", "target": "src/aof.c::loadPreLoadAOFFile"}, {"source": "src/server.c::loadDataFromDisk", "target": "src/aof.c::loadPreLoadManifestFile"}, {"source": "src/server.c::main", "target": "src/server.c::loadDataFromDisk"}, {"source": "src/t_string.c::msetexCommand", "target": "src/t_string.c::parseExtendedStringArgumentsOrReply"}]}, "graph_spec": "These functions connect Redis server startup and disk-data restoration with command execution: the AOF loaders restore persisted data from append-only command logs, including individual files and manifest-described file sets supplied for preloading. The execution scope covers core command invocation, commands issued by scripts, transaction execution, and debugging commands. It also includes MSETEX’s atomic assignment of multiple string keys with shared expiration and the parsing and validation of extended string-command arguments."} +{"repo": "redis/redis", "buggy_commit": "9a5c6e97884e7d8e456eaabd2a1e50f686f60125", "bug_issue": 16107, "solve_pr": 16120, "call_graph": {"nodes": [{"id": "src/db.c::delexCommand"}], "edges": []}, "graph_spec": "`delexCommand` implements Redis’s DELEX command for conditional key removal using value or digest comparisons. It accepts a key and optional comparison criteria and reports the deletion outcome, supporting conditional updates to Redis’s key-value database."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "b90661d6a46aa3619d3eec94d5281f5888add501", "bug_issue": 10901, "solve_pr": 10908, "call_graph": {"nodes": [{"id": "sklearn/feature_extraction/text.py::CountVectorizer::get_feature_names"}], "edges": []}, "graph_spec": "CountVectorizer.get_feature_names exposes the feature names associated with integer feature indices in the vectorizer’s token-count representation of text documents. It connects the numerical features of the document matrix to the vocabulary terms they represent."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "c49a5bf8a8f550a8175b5f84a5842ab4b7093700", "bug_issue": 12650, "solve_pr": 12682, "call_graph": {"nodes": [{"id": "sklearn/decomposition/dict_learning.py::DictionaryLearning::fit"}, {"id": "sklearn/decomposition/dict_learning.py::MiniBatchDictionaryLearning::fit"}, {"id": "sklearn/decomposition/dict_learning.py::MiniBatchDictionaryLearning::partial_fit"}, {"id": "sklearn/decomposition/dict_learning.py::SparseCodingMixin::transform"}, {"id": "sklearn/decomposition/dict_learning.py::_sparse_encode"}, {"id": "sklearn/decomposition/dict_learning.py::dict_learning"}, {"id": "sklearn/decomposition/dict_learning.py::dict_learning_online"}, {"id": "sklearn/decomposition/dict_learning.py::sparse_encode"}, {"id": "sklearn/decomposition/sparse_pca.py::MiniBatchSparsePCA::fit"}, {"id": "sklearn/decomposition/sparse_pca.py::SparsePCA::fit"}], "edges": [{"source": "sklearn/decomposition/dict_learning.py::DictionaryLearning::fit", "target": "sklearn/decomposition/dict_learning.py::dict_learning"}, {"source": "sklearn/decomposition/dict_learning.py::MiniBatchDictionaryLearning::fit", "target": "sklearn/decomposition/dict_learning.py::dict_learning_online"}, {"source": "sklearn/decomposition/dict_learning.py::MiniBatchDictionaryLearning::partial_fit", "target": "sklearn/decomposition/dict_learning.py::dict_learning_online"}, {"source": "sklearn/decomposition/dict_learning.py::SparseCodingMixin::transform", "target": "sklearn/decomposition/dict_learning.py::sparse_encode"}, {"source": "sklearn/decomposition/dict_learning.py::dict_learning", "target": "sklearn/decomposition/dict_learning.py::sparse_encode"}, {"source": "sklearn/decomposition/dict_learning.py::dict_learning_online", "target": "sklearn/decomposition/dict_learning.py::sparse_encode"}, {"source": "sklearn/decomposition/dict_learning.py::sparse_encode", "target": "sklearn/decomposition/dict_learning.py::_sparse_encode"}, {"source": "sklearn/decomposition/sparse_pca.py::MiniBatchSparsePCA::fit", "target": "sklearn/decomposition/dict_learning.py::dict_learning_online"}, {"source": "sklearn/decomposition/sparse_pca.py::SparsePCA::fit", "target": "sklearn/decomposition/dict_learning.py::dict_learning"}]}, "graph_spec": "These functions support sparse representations of data: dictionary learning fits a set of basis elements called atoms and corresponding sparse coefficients, while sparse coding and transformation express data using an existing dictionary. The dictionary-learning functions and estimator methods provide batch, online, and incremental fitting, returning learned representations or fitted estimators. The SparsePCA and MiniBatchSparsePCA fit methods learn sparse components for reconstructing data, connecting sparse component analysis to dictionary learning."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "a7b8b9e9e16d4e15fabda5ae615086c2e1c47d8a", "bug_issue": 12972, "solve_pr": 12973, "call_graph": {"nodes": [{"id": "sklearn/linear_model/least_angle.py::LassoLarsIC::fit"}], "edges": []}, "graph_spec": "LassoLarsIC.fit trains a Lasso linear regression model from feature data and target values using least angle regression, returning the fitted estimator. Lasso encourages sparse coefficients through L1 regularization, while information criteria (AIC or BIC) select the regularization strength by balancing goodness of fit with model complexity."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "c2d56a6c8fef79dadcca1db4eb8c5b1e78c30d28", "bug_issue": 13110, "solve_pr": 13124, "call_graph": {"nodes": [{"id": "sklearn/model_selection/_split.py::StratifiedKFold::_iter_test_masks"}, {"id": "sklearn/model_selection/_split.py::StratifiedKFold::_make_test_folds"}], "edges": [{"source": "sklearn/model_selection/_split.py::StratifiedKFold::_iter_test_masks", "target": "sklearn/model_selection/_split.py::StratifiedKFold::_make_test_folds"}]}, "graph_spec": "These methods support stratified K-fold cross-validation, which partitions labeled samples into training and test folds while preserving class proportions. `_make_test_folds` supplies test-fold assignments, and `_iter_test_masks` exposes test-set membership as Boolean masks for the cross-validation splits."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "703991f3f9bdf5bc95755b84a387b63394a825ee", "bug_issue": 13314, "solve_pr": 13328, "call_graph": {"nodes": [{"id": "sklearn/linear_model/huber.py::HuberRegressor::fit"}], "edges": []}, "graph_spec": "HuberRegressor.fit must validate numeric single-target training data (including CSR input) and sample-weight length, treating omitted weights as unit weights and rejecting epsilon below 1. It must optimize the regularized, scale-aware Huber objective with a strictly positive scale, using quadratic residual loss inside the epsilon-scaled threshold and linear loss outside it, so outliers remain influential but down-weighted; sample weights must affect that objective. A warm-started fitted estimator must begin from its stored coefficients, intercept, and scale, while a fresh fit initializes according to fit_intercept. On successful optimization it must set coef_, scale_, a fitted intercept (or exactly 0 when intercept fitting is disabled), a bounded iteration count, and an outliers_ mask defined by residuals exceeding epsilon times the learned scale; solver termination indicating failure must be surfaced as an error."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "abf77219043a13efbd3e709cd017eeef60852892", "bug_issue": 13976, "solve_pr": 14053, "call_graph": {"nodes": [{"id": "sklearn/tree/export.py::export_text"}], "edges": []}, "graph_spec": "export_text must return a deterministic, newline-delimited textual rule tree for a fitted decision-tree classifier or regressor: each internal node emits its feature name and rounded threshold for the <= left-child branch before the > right-child branch, with indentation derived from depth and spacing; leaves emit the predicted class for classifiers (and optional per-class weights) or numeric value vector for regressors. It must use supplied feature names only when their length matches the fitted tree’s feature count, otherwise use generic feature_i names, reject negative max_depth/decimals and nonpositive spacing, and preserve a bounded view by replacing non-leaf subtrees beyond the requested depth with their remaining subtree depth while still rendering terminal leaves. Multi-output values and class labels must be selected consistently from the estimator’s stored tree values and classes."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "da14dfdea2712c5bff08f62b6954e94cc4ab47d2", "bug_issue": 14421, "solve_pr": 14496, "call_graph": {"nodes": [{"id": "sklearn/cluster/optics_.py::OPTICS::fit"}, {"id": "sklearn/cluster/optics_.py::cluster_optics_xi"}, {"id": "sklearn/cluster/optics_.py::compute_optics_graph"}], "edges": [{"source": "sklearn/cluster/optics_.py::OPTICS::fit", "target": "sklearn/cluster/optics_.py::cluster_optics_xi"}, {"source": "sklearn/cluster/optics_.py::OPTICS::fit", "target": "sklearn/cluster/optics_.py::compute_optics_graph"}]}, "graph_spec": "These functions support OPTICS density-based clustering, whose reachability representation captures clustering structure across varying densities. `OPTICS.fit` fits the estimator to sample features or pairwise distances and assigns clustering results; `compute_optics_graph` produces the sample ordering and associated distance and predecessor information underlying that representation. `cluster_optics_xi` extracts cluster labels and hierarchical cluster groupings from OPTICS results using the Xi-steep method."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "4b6273b87442a4437d8b3873ea3022ae163f4fdf", "bug_issue": 14709, "solve_pr": 14710, "call_graph": {"nodes": [{"id": "sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py::BaseHistGradientBoosting::_check_early_stopping_scorer"}, {"id": "sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py::BaseHistGradientBoosting::fit"}], "edges": [{"source": "sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py::BaseHistGradientBoosting::fit", "target": "sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py::BaseHistGradientBoosting::_check_early_stopping_scorer"}]}, "graph_spec": "BaseHistGradientBoosting.fit trains a histogram-based gradient boosting tree model from input samples and target values and returns the fitted estimator. Within fitting, _check_early_stopping_scorer assesses model performance on training or validation data to determine whether training should stop early, connecting model fitting with score-based control of training duration."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "fdbaa58acbead5a254f2e6d597dc1ab3b947f4c6", "bug_issue": 14893, "solve_pr": 14894, "call_graph": {"nodes": [{"id": "sklearn/svm/base.py::BaseLibSVM::_sparse_fit"}], "edges": []}, "graph_spec": "BaseLibSVM._sparse_fit provides sparse-data model fitting for libsvm-backed support vector machine estimators, using training features and associated fitting inputs to establish the learned model. Support vector machines use a subset of training samples, called support vectors, to define their decision function; this method serves that training role for sparse feature representations."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "2c867b8f822eb7a684f0d5c4359e4426e1c9cfe0", "bug_issue": 25730, "solve_pr": 25747, "call_graph": {"nodes": [{"id": "sklearn/utils/_set_output.py::_wrap_data_with_container"}, {"id": "sklearn/utils/_set_output.py::_wrap_in_pandas_container"}, {"id": "sklearn/utils/_set_output.py::_wrap_method_output::wrapped"}], "edges": [{"source": "sklearn/utils/_set_output.py::_wrap_data_with_container", "target": "sklearn/utils/_set_output.py::_wrap_in_pandas_container"}, {"source": "sklearn/utils/_set_output.py::_wrap_method_output::wrapped", "target": "sklearn/utils/_set_output.py::_wrap_data_with_container"}]}, "graph_spec": "The wrapped transform/fit-transform result must remain unchanged when dense output is configured as default or the estimator is not eligible for automatic wrapping. For configured pandas output, the primary result must be a pandas DataFrame using the original input’s index when creating a new frame and feature names obtained from the estimator when available; sparse results must be rejected. An existing DataFrame is reused (with columns updated only when names are resolved), while a column-name callable that fails is treated as having no names. The method wrapper must invoke the underlying method with its original arguments and, for tuple results, wrap only the first element while preserving all remaining elements and their order."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "e3d1f9ac39e4bf0f31430e779acc50fb05fe1b64", "bug_issue": 25844, "solve_pr": 25931, "call_graph": {"nodes": [{"id": "sklearn/ensemble/_iforest.py::IsolationForest::decision_function"}, {"id": "sklearn/ensemble/_iforest.py::IsolationForest::fit"}, {"id": "sklearn/ensemble/_iforest.py::IsolationForest::predict"}, {"id": "sklearn/ensemble/_iforest.py::IsolationForest::score_samples"}], "edges": [{"source": "sklearn/ensemble/_iforest.py::IsolationForest::decision_function", "target": "sklearn/ensemble/_iforest.py::IsolationForest::score_samples"}, {"source": "sklearn/ensemble/_iforest.py::IsolationForest::fit", "target": "sklearn/ensemble/_iforest.py::IsolationForest::score_samples"}, {"source": "sklearn/ensemble/_iforest.py::IsolationForest::predict", "target": "sklearn/ensemble/_iforest.py::IsolationForest::decision_function"}]}, "graph_spec": "Scope: IsolationForest's fitted-scoring path (fit, score_samples, decision_function, predict) in sklearn/ensemble/_iforest.py.\n\nObligations: (1) fit must produce a usable model state: it validates X once, resolves max_samples to an integer in [1, n_samples] (clamping values above n_samples, \"auto\" meaning min(256, n_samples)), fits the tree ensemble with max_depth = ceil(log2(max(max_samples, 2))), and records per-tree average path lengths so scoring is well-defined. It must set offset_ such that offset_ = -0.5 when contamination == \"auto\", and otherwise equal the 100*contamination percentile of the training-sample scores, so that the fitted threshold reproduces the requested training contamination rate. (2) score_samples must validate input without re-fitting (reset=False), require a fitted model and matching n_features_in_, coerce to float32/CSR as documented, and return one signed anomaly score per sample where lower values mean more abnormal; the returned length must equal the number of input rows for dense and sparse inputs and for arbitrary batch sizes. (3) decision_function must be exactly score_samples(X) - offset_ for the same X, so it is a monotone shift of score_samples and its zero level is the inlier/outlier boundary. (4) predict must require a fitted model, derive decisions solely from decision_function, and emit an int array of the same length as X with +1 for decision_function >= 0 and -1 strictly below 0, preserving the documented convention that negative values are outliers.\n\nInvariants/boundaries to preserve: offset_ is fixed after fit and reused unchanged by all scoring calls; the four public methods agree on sample ordering and output shape; scoring accepts both array-like and CSR sparse input and supports chunked evaluation without changing results; contamination semantics (\"auto\" vs a float in (0, 0.5]) only affect offset_, never the raw score ordering."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "01b9050b690ebb07870454720f5f67ac235348e4", "bug_issue": 25957, "solve_pr": 25973, "call_graph": {"nodes": [{"id": "sklearn/feature_selection/_sequential.py::SequentialFeatureSelector::_get_best_new_feature_score"}, {"id": "sklearn/feature_selection/_sequential.py::SequentialFeatureSelector::fit"}], "edges": [{"source": "sklearn/feature_selection/_sequential.py::SequentialFeatureSelector::fit", "target": "sklearn/feature_selection/_sequential.py::SequentialFeatureSelector::_get_best_new_feature_score"}]}, "graph_spec": "SequentialFeatureSelector.fit must validate feature-selection settings and input data, derive a valid target count, and build a boolean support mask greedily from an initially empty selection/exclusion mask. At every step, _get_best_new_feature_score must evaluate each still-eligible single-feature change using the same cloned estimator, configured cross-validation, scoring, and parallelism, then choose the candidate with the greatest mean cross-validated score. Forward mode adds that candidate to the selected set; backward mode treats the working mask as exclusions and ultimately complements it so support_ denotes retained features. Iteration must honor the requested count, while automatic selection with a tolerance stops before accepting a change whose score improvement over the preceding accepted score is below tol (with negative tolerance disallowed for forward selection); after fitting, support_ and n_features_to_select_ must agree exactly."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "e886ce4e1444c61b865e7839c9cff5464ee20ace", "bug_issue": 26193, "solve_pr": 26194, "call_graph": {"nodes": [{"id": "sklearn/metrics/_plot/roc_curve.py::RocCurveDisplay::from_predictions"}, {"id": "sklearn/metrics/_ranking.py::_binary_roc_auc_score"}, {"id": "sklearn/metrics/_ranking.py::_multiclass_roc_auc_score"}, {"id": "sklearn/metrics/_ranking.py::roc_auc_score"}, {"id": "sklearn/metrics/_ranking.py::roc_curve"}], "edges": [{"source": "sklearn/metrics/_plot/roc_curve.py::RocCurveDisplay::from_predictions", "target": "sklearn/metrics/_ranking.py::roc_curve"}, {"source": "sklearn/metrics/_ranking.py::_binary_roc_auc_score", "target": "sklearn/metrics/_ranking.py::roc_curve"}, {"source": "sklearn/metrics/_ranking.py::_multiclass_roc_auc_score", "target": "sklearn/metrics/_ranking.py::_binary_roc_auc_score"}, {"source": "sklearn/metrics/_ranking.py::roc_auc_score", "target": "sklearn/metrics/_ranking.py::_binary_roc_auc_score"}, {"source": "sklearn/metrics/_ranking.py::roc_auc_score", "target": "sklearn/metrics/_ranking.py::_multiclass_roc_auc_score"}]}, "graph_spec": "This scope computes binary ROC curves, their areas, and a plotting wrapper, and must preserve the following. roc_curve is binary-only and returns fpr, tpr, thresholds that trace the same curve: fpr and tpr are non-decreasing within [0,1], thresholds are non-increasing with the initial threshold set to +inf so the curve begins at (0,0), and fpr[i]/tpr[i] equal the false/true positive rate among scores >= thresholds[i]. When drop_intermediate is set, only thresholds at corners of the curve may be removed, and the removed points must be collinear so the area is unchanged; if y_true contains no negatives or no positives, a warning is emitted and the corresponding rate is NaN. _binary_roc_auc_score requires exactly two distinct classes in y_true (otherwise ValueError) and must equal the area under the roc_curve it builds, including sample_weight. With max_fpr None or 1 it returns the full AUC; with 0 < max_fpr < 1 it returns the McClish-standardized partial AUC over [0, max_fpr], interpolating the curve at max_fpr, and the result must map non-discriminant performance to 0.5 and maximal performance to 1; out-of-range max_fpr is rejected. roc_auc_score dispatches on the target type: binary and multilabel cases route through the binary scorer with max_fpr forwarded, while multiclass requires multi_class to be 'ovr' or 'ovo' and forbids partial AUC. _multiclass_roc_auc_score requires y_score rows to sum to 1, restricts average to the options valid for the chosen multi_class, validates label ordering/uniqueness and their correspondence to y_score columns and y_true, delegates 'ovr' to per-class binary scoring on binarized labels (mirroring multilabel), and delegates 'ovo' to pairwise binary scoring with encoded labels while rejecting sample_weight. RocCurveDisplay.from_predictions must validate its inputs and pos_label/name, obtain fpr/tpr/thresholds from roc_curve using the supplied pos_label, sample_weight, and drop_intermediate, compute the displayed area with auc, and expose a display consistent with that curve."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "e860fd2d125f7869ec985599edcb6efc7b0df913", "bug_issue": 8720, "solve_pr": 11578, "call_graph": {"nodes": [{"id": "sklearn/linear_model/logistic.py::LogisticRegressionCV::fit"}, {"id": "sklearn/linear_model/logistic.py::_log_reg_scoring_path"}], "edges": [{"source": "sklearn/linear_model/logistic.py::LogisticRegressionCV::fit", "target": "sklearn/linear_model/logistic.py::_log_reg_scoring_path"}]}, "graph_spec": "`LogisticRegressionCV.fit` must validate classifier input and compatible solver options, encode labels while preserving original labels for public result keys, construct stratified classifier folds, and evaluate every requested regularization value for each required OvR class (or once for multinomial) on each fold. Each fold evaluation must train only on that fold’s training rows, apply class weights and the corresponding training subset of any sample weights, and score the held-out rows with accuracy by default or the requested scorer. OvR scoring must treat the selected class as positive and all other classes as negative, while predictions and class probabilities supplied to scoring must follow the requested OvR or multinomial semantics. Returned coefficient paths, score grids, iteration counts, and C grids must remain aligned by class, fold, and C; `fit` must use those scores to select or aggregate C and coefficients according to `refit`, expose coefficients/intercepts with the configured intercept behavior, and preserve the documented binary and multinomial output shapes."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "c61a69437568c84a2b193799b99c698c0a30f04f", "bug_issue": 9515, "solve_pr": 10844, "call_graph": {"nodes": [{"id": "sklearn/metrics/cluster/supervised.py::fowlkes_mallows_score"}], "edges": []}, "graph_spec": "`fowlkes_mallows_score` must validate that the two one-dimensional cluster labelings describe the same number of samples, then compare their induced same-cluster pair relationships rather than the numeric identities of labels. It must form the joint contingency counts and return the Fowlkes–Mallows index TP / sqrt((TP + FP) * (TP + FN)), equivalently the geometric mean of pairwise precision and recall, as a float in [0, 1]. Relabeling either partition without changing memberships must not change the score; identical partitions, including with different label names, must yield 1 when they contain co-clustered pairs. If there are no pairs placed together in both labelings—including empty inputs or partitions consisting only of singleton clusters—the score must be 0, avoiding undefined divisions."} +{"repo": "scikit-learn/scikit-learn", "buggy_commit": "a7a834bdb7a51ec260ff005715d50ab6ed01a16b", "bug_issue": 9784, "solve_pr": 9288, "call_graph": {"nodes": [{"id": "sklearn/cluster/bicluster.py::BaseSpectral::_k_means"}, {"id": "sklearn/cluster/bicluster.py::BaseSpectral::fit"}, {"id": "sklearn/cluster/bicluster.py::SpectralBiclustering::_fit"}, {"id": "sklearn/cluster/bicluster.py::SpectralBiclustering::_fit_best_piecewise"}, {"id": "sklearn/cluster/bicluster.py::SpectralBiclustering::_project_and_cluster"}, {"id": "sklearn/cluster/bicluster.py::SpectralCoclustering::_fit"}, {"id": "sklearn/cluster/bicluster.py::_fit_best_piecewise::make_piecewise"}, {"id": "sklearn/cluster/k_means_.py::KMeans::fit"}, {"id": "sklearn/cluster/k_means_.py::KMeans::fit_predict"}, {"id": "sklearn/cluster/k_means_.py::KMeans::fit_transform"}, {"id": "sklearn/cluster/k_means_.py::k_means"}], "edges": [{"source": "sklearn/cluster/bicluster.py::BaseSpectral::_k_means", "target": "sklearn/cluster/k_means_.py::KMeans::fit"}, {"source": "sklearn/cluster/bicluster.py::BaseSpectral::fit", "target": "sklearn/cluster/bicluster.py::SpectralCoclustering::_fit"}, {"source": "sklearn/cluster/bicluster.py::SpectralBiclustering::_fit", "target": "sklearn/cluster/bicluster.py::SpectralBiclustering::_fit_best_piecewise"}, {"source": "sklearn/cluster/bicluster.py::SpectralBiclustering::_fit", "target": "sklearn/cluster/bicluster.py::SpectralBiclustering::_project_and_cluster"}, {"source": "sklearn/cluster/bicluster.py::SpectralBiclustering::_fit_best_piecewise", "target": "sklearn/cluster/bicluster.py::_fit_best_piecewise::make_piecewise"}, {"source": "sklearn/cluster/bicluster.py::SpectralBiclustering::_project_and_cluster", "target": "sklearn/cluster/bicluster.py::BaseSpectral::_k_means"}, {"source": "sklearn/cluster/bicluster.py::SpectralCoclustering::_fit", "target": "sklearn/cluster/bicluster.py::BaseSpectral::_k_means"}, {"source": "sklearn/cluster/bicluster.py::_fit_best_piecewise::make_piecewise", "target": "sklearn/cluster/bicluster.py::BaseSpectral::_k_means"}, {"source": "sklearn/cluster/k_means_.py::KMeans::fit", "target": "sklearn/cluster/k_means_.py::k_means"}, {"source": "sklearn/cluster/k_means_.py::KMeans::fit_predict", "target": "sklearn/cluster/k_means_.py::KMeans::fit"}, {"source": "sklearn/cluster/k_means_.py::KMeans::fit_transform", "target": "sklearn/cluster/k_means_.py::KMeans::fit"}]}, "graph_spec": "Spectral clustering `fit` must validate a finite float CSR-or-dense input and supported parameters, then derive row and column partitions from normalized spectral embeddings using the configured, reproducible k-means variant. Co-clustering must jointly cluster the scaled row and column embeddings and split the resulting labels at the original row count, producing Boolean membership matrices in which each row and column belongs to exactly one of the requested shared clusters. Checkerboard biclustering must choose the requested number of singular-vector directions that are closest to piecewise-constant approximations, project rows and columns against the opposite selected directions, cluster each projection with its respective row or column cluster count, and construct membership matrices whose repeated row/column labels represent every row-cluster × column-cluster combination. Each internal clustering call must honor initialization, restart count, random state, and job settings, and return centers and one label per projected observation; batch KMeans must reject invalid cluster/init/input configurations, retain centers, labels, inertia, and iteration count from the best-inertia run, make training labels consistent with nearest-center prediction, while `fit_predict` returns fitted labels and `fit_transform` returns distances to the fitted centers."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "cab2d93076d0cca7c53fac885f927dde3e2a5fec", "bug_issue": 10104, "solve_pr": 10466, "call_graph": {"nodes": [{"id": "sphinx/builders/gettext.py::Catalog::__iter__"}], "edges": []}, "graph_spec": "Catalog.__iter__ provides iteration over a catalog’s translatable message entries, yielding Message objects. In Sphinx’s internationalization workflow, message catalogs collect documentation text for translation, and this interface exposes those entries for consumption."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "9141464b8bcd4f2ade902107872fd001655a5131", "bug_issue": 10318, "solve_pr": 10323, "call_graph": {"nodes": [{"id": "sphinx/directives/code.py::LiteralIncludeReader::read"}], "edges": []}, "graph_spec": "LiteralIncludeReader.read supplies external-file text for Sphinx’s literalinclude directive, which embeds code or other plain text as a literal block in documentation. It serves as the reader’s content retrieval interface and returns a text-and-integer pair."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "f1061c012e214f16fd8790dec3c283d787e3daa8", "bug_issue": 10434, "solve_pr": 10435, "call_graph": {"nodes": [{"id": "sphinx/writers/latex.py::LaTeXTranslator::visit_literal"}], "edges": []}, "graph_spec": "LaTeXTranslator.visit_literal handles inline literal document nodes as part of Sphinx’s LaTeX translation, contributing their formatting to the generated LaTeX output. Inline literals represent text presented literally within surrounding prose, including code."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "ac2b7599d212af7d04649959ce6926c63c3133fa", "bug_issue": 10570, "solve_pr": 10614, "call_graph": {"nodes": [{"id": "sphinx/ext/inheritance_diagram.py::html_visit_inheritance_diagram"}], "edges": []}, "graph_spec": "When visiting an inheritance-diagram node for HTML, the renderer must generate a stable, diagram-specific Graphviz name from the directive content and displayed-name setting, then emit the inheritance graph with the builder’s configured attributes and resolved class links. Each resolved reference must be associated with the graph node’s fully qualified class name: external targets use their URI fragment as that name, while internal targets use the reference title; internal links are fragment-only for PNG image maps but include the current output filename for SVG. Unresolved references must not create links. The rendered output must be delegated to the HTML Graphviz renderer with inheritance-specific asset/class prefixes and descriptive alternative text, and the source node must be skipped after rendering so it cannot produce duplicate child output."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "de6b18ac7de317030be4344ea7a9d553c423ffcf", "bug_issue": 10678, "solve_pr": 11510, "call_graph": {"nodes": [{"id": "sphinx/directives/other.py::Include::run"}], "edges": [{"source": "sphinx/directives/other.py::Include::run", "target": "sphinx/directives/other.py::Include::run"}]}, "graph_spec": "`Include.run` processes Sphinx’s reStructuredText include directive, which incorporates content from another source file into the current document. Its role supports reuse of documentation text within Sphinx’s document parsing framework, with a declared return type of document nodes."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "d3c91f951255c6729a53e38c895ddc0af036b5b9", "bug_issue": 11437, "solve_pr": 11445, "call_graph": {"nodes": [{"id": "sphinx/parsers.py::RSTParser::decorate"}, {"id": "sphinx/parsers.py::RSTParser::parse"}, {"id": "sphinx/util/rst.py::prepend_prolog"}], "edges": [{"source": "sphinx/parsers.py::RSTParser::decorate", "target": "sphinx/util/rst.py::prepend_prolog"}, {"source": "sphinx/parsers.py::RSTParser::parse", "target": "sphinx/parsers.py::RSTParser::decorate"}]}, "graph_spec": "RSTParser must normalize string input into source-associated, tab-aware reST lines while preserving a supplied StringList, then decorate that same content before building the document tree. Decoration must make configured global reST available to every parsed source: a nonempty prolog is inserted after any initial document-field entries (with separating blank lines so document metadata remains distinct), and its lines retain generated/prolog source provenance; empty or unset prolog leaves the original content unchanged. The resulting augmented line sequence is what the reST state machine parses, so user content, document metadata, and globally configured declarations retain their intended order and source-location semantics."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "27ac10de04697e2372d31db5548e56a7c6d9265d", "bug_issue": 4258, "solve_pr": 7910, "call_graph": {"nodes": [{"id": "sphinx/ext/napoleon/__init__.py::_skip_member"}, {"id": "sphinx/ext/napoleon/__init__.py::setup"}], "edges": [{"source": "sphinx/ext/napoleon/__init__.py::setup", "target": "sphinx/ext/napoleon/__init__.py::_skip_member"}]}, "graph_spec": "The scope covers the napoleon extension's Sphinx entry point `setup` and the autodoc member filter `_skip_member` it wires up. `setup` must act as the extension's registration boundary: for a real `Sphinx` application it must install the `autodoc-skip-member` handler `_skip_member` (the graph edge), ensure the autodoc extension is required, register napoleon's configuration values, and return extension metadata declaring the version and parallel-read safety; when invoked with a non-`Sphinx` object it must still return that metadata without wiring handlers or config. `_skip_member` is an `autodoc-skip-member` callback whose contract is a tri-state override of autodoc's own decision: it must return `None` to leave the caller's `skip` value untouched in any case it does not explicitly claim, `False` to force inclusion, and never silently claim membership it should not. It may only override for members of a class, exception, or module (`what`), only when the member actually has a docstring, and for classes/exceptions only when the documented class itself owns the member (inherited members must retain autodoc's default handling); `__weakref__` must always be excluded from consideration. For a claimed member it must classify the name into init, special (dunder), or private (single underscore) categories, treating `__init__` as init and excluding init/special names from the private category, and it must flip the decision to include only when the matching `napoleon_include_init_with_doc`, `napoleon_include_special_with_doc`, or `napoleon_include_private_with_doc` setting is enabled; otherwise the default skip decision must stand. The handler must tolerate arbitrary member objects (including ones lacking `__qualname__` or unimportable owning classes) without raising, falling back to deferring to autodoc, and it must not mutate the object or options it receives."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "b428cd2404675475a5c3dc2a2b0790ba57676202", "bug_issue": 6640, "solve_pr": 8120, "call_graph": {"nodes": [{"id": "sphinx/application.py::Sphinx::__init__"}, {"id": "sphinx/application.py::Sphinx::_init_i18n"}], "edges": [{"source": "sphinx/application.py::Sphinx::__init__", "target": "sphinx/application.py::Sphinx::_init_i18n"}]}, "graph_spec": "Sphinx.__init__ creates the main documentation application from project directories, a builder selection, configuration, and runtime settings. Its initialization scope includes _init_i18n, which loads translated strings from configured locale resources to support internationalization—the use of message catalogs that map original messages to translations."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "2e506c5ab457cba743bb47eb5b8c8eb9dd51d23d", "bug_issue": 7294, "solve_pr": 7590, "call_graph": {"nodes": [{"id": "sphinx/domains/cpp.py::DefinitionParser::_parse_cast_expression"}, {"id": "sphinx/domains/cpp.py::DefinitionParser::_parse_fold_or_paren_expression"}, {"id": "sphinx/domains/cpp.py::DefinitionParser::_parse_literal"}, {"id": "sphinx/domains/cpp.py::DefinitionParser::_parse_postfix_expression"}, {"id": "sphinx/domains/cpp.py::DefinitionParser::_parse_primary_expression"}, {"id": "sphinx/domains/cpp.py::DefinitionParser::_parse_unary_expression"}, {"id": "sphinx/domains/cpp.py::_parse_bin_op_expr::parser"}], "edges": [{"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_cast_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_cast_expression"}, {"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_cast_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_unary_expression"}, {"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_fold_or_paren_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_cast_expression"}, {"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_postfix_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_primary_expression"}, {"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_primary_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_fold_or_paren_expression"}, {"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_primary_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_literal"}, {"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_unary_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_cast_expression"}, {"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_unary_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_postfix_expression"}, {"source": "sphinx/domains/cpp.py::DefinitionParser::_parse_unary_expression", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_unary_expression"}, {"source": "sphinx/domains/cpp.py::_parse_bin_op_expr::parser", "target": "sphinx/domains/cpp.py::DefinitionParser::_parse_cast_expression"}]}, "graph_spec": "These functions parse C++ expression syntax into expression representations for Sphinx’s C++ documentation domain, covering literals, primary expressions, parenthesized and fold expressions, postfix and unary expressions, casts, and the expression parser used within binary-operator parsing. These categories describe basic expression components and ways of combining or transforming them; fold expressions express operations over parameter packs, while casts express type conversions."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "4caa7d7c379025052da8774a648dccf29426d5f0", "bug_issue": 7418, "solve_pr": 7440, "call_graph": {"nodes": [{"id": "sphinx/domains/std.py::Glossary::run"}, {"id": "sphinx/domains/std.py::make_glossary_term"}, {"id": "sphinx/transforms/i18n.py::Locale::apply"}], "edges": [{"source": "sphinx/domains/std.py::Glossary::run", "target": "sphinx/domains/std.py::make_glossary_term"}, {"source": "sphinx/transforms/i18n.py::Locale::apply", "target": "sphinx/domains/std.py::make_glossary_term"}]}, "graph_spec": "Glossary.run turns glossary directive content into document nodes representing terms and definitions that readers can cross-reference. make_glossary_term provides shared construction of individual glossary term nodes for glossary creation and localization. Locale.apply replaces translatable document content with translated document nodes, connecting glossary support to Sphinx’s document internationalization workflow."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "aca3f825f2e4a8817190f3c885a242a285aa0dba", "bug_issue": 7445, "solve_pr": 7454, "call_graph": {"nodes": [{"id": "sphinx/domains/python.py::PyObject::handle_signature"}, {"id": "sphinx/domains/python.py::_parse_annotation"}, {"id": "sphinx/domains/python.py::_parse_annotation::make_xref"}, {"id": "sphinx/domains/python.py::_parse_arglist"}], "edges": [{"source": "sphinx/domains/python.py::PyObject::handle_signature", "target": "sphinx/domains/python.py::_parse_annotation"}, {"source": "sphinx/domains/python.py::PyObject::handle_signature", "target": "sphinx/domains/python.py::_parse_arglist"}, {"source": "sphinx/domains/python.py::_parse_annotation", "target": "sphinx/domains/python.py::_parse_annotation::make_xref"}, {"source": "sphinx/domains/python.py::_parse_arglist", "target": "sphinx/domains/python.py::_parse_annotation"}]}, "graph_spec": "These functions support Sphinx’s Python-domain API descriptions by turning Python signatures into documentation nodes: `PyObject.handle_signature` handles the overall signature and returns object identity information, while `_parse_arglist` represents its parameters. `_parse_annotation` represents type annotations, which describe parameter and return types, and its nested `make_xref` creates pending cross-reference nodes that connect annotation names to Python API documentation."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "e188d56ed1248dead58f3f8018c0e9a3f99193f7", "bug_issue": 7780, "solve_pr": 8056, "call_graph": {"nodes": [{"id": "sphinx/ext/napoleon/docstring.py::GoogleDocstring::_consume_fields"}, {"id": "sphinx/ext/napoleon/docstring.py::GoogleDocstring::_parse_parameters_section"}], "edges": [{"source": "sphinx/ext/napoleon/docstring.py::GoogleDocstring::_parse_parameters_section", "target": "sphinx/ext/napoleon/docstring.py::GoogleDocstring::_consume_fields"}]}, "graph_spec": "These functions support converting Google-style parameter documentation, which describes argument names, types, and meanings, into reStructuredText for Sphinx. `_consume_fields` gathers docstring field information, while `_parse_parameters_section` uses that information to produce the parameter section’s documentation text."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "fabe685638c7f8fa24b3b0a44ac264cff5f1d160", "bug_issue": 8131, "solve_pr": 8475, "call_graph": {"nodes": [{"id": "sphinx/builders/linkcheck.py::CheckExternalLinksBuilder::check_thread"}, {"id": "sphinx/builders/linkcheck.py::CheckExternalLinksBuilder::check_thread::check_uri"}, {"id": "sphinx/builders/linkcheck.py::check_thread::check"}], "edges": [{"source": "sphinx/builders/linkcheck.py::CheckExternalLinksBuilder::check_thread", "target": "sphinx/builders/linkcheck.py::check_thread::check"}, {"source": "sphinx/builders/linkcheck.py::check_thread::check", "target": "sphinx/builders/linkcheck.py::CheckExternalLinksBuilder::check_thread::check_uri"}]}, "graph_spec": "These functions support Sphinx’s external-link checking: check_thread provides the worker context, while check and check_uri assess document links and produce link-check results. External links reference resources outside the documentation, and this scope contributes to identifying broken links and redirects for the builder’s report."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "9175da437ed84e43b00ed4c28ccfe629260d3c13", "bug_issue": 8268, "solve_pr": 8269, "call_graph": {"nodes": [{"id": "sphinx/builders/linkcheck.py::CheckExternalLinksBuilder::check_thread"}, {"id": "sphinx/builders/linkcheck.py::CheckExternalLinksBuilder::check_thread::check_uri"}, {"id": "sphinx/builders/linkcheck.py::check_thread::check"}], "edges": [{"source": "sphinx/builders/linkcheck.py::CheckExternalLinksBuilder::check_thread", "target": "sphinx/builders/linkcheck.py::check_thread::check"}, {"source": "sphinx/builders/linkcheck.py::check_thread::check", "target": "sphinx/builders/linkcheck.py::CheckExternalLinksBuilder::check_thread::check_uri"}]}, "graph_spec": "Each worker must continuously consume queued link records until a sentinel is received, classify each URI exactly once into the reported status tuple, and enqueue the original URI/location together with that result. Empty, fragment-only, mailto, unsupported-scheme, ignored, and local-path links must be resolved without unnecessary HTTP requests; cached working, broken, and redirected HTTP results must be reused consistently. For checkable HTTP(S) links, apply configured timeout, request-header selection, authentication, ignore patterns, and retry policy; encode non-ASCII request URLs, use HEAD with a GET fallback when appropriate, and optionally verify a decoded fragment anchor from streamed content. Map authorization, service-unavailability, SSL, and other request failures to their defined working/ignored/broken outcomes, preserve redirect destination (including an applicable anchor) and final redirect status code, and cache terminal working, broken, or redirected outcomes for later duplicates."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "00db1ea631bf72103d32cdb1edf4304b980502de", "bug_issue": 8365, "solve_pr": 8551, "call_graph": {"nodes": [{"id": "sphinx/domains/python.py::PyXrefMixin::make_xref"}, {"id": "sphinx/util/docfields.py::DocFieldTransformer::transform"}, {"id": "sphinx/util/docfields.py::DocFieldTransformer::transform_all"}], "edges": [{"source": "sphinx/util/docfields.py::DocFieldTransformer::transform_all", "target": "sphinx/util/docfields.py::DocFieldTransformer::transform"}]}, "graph_spec": "These functions support Sphinx object documentation, where doc fields describe aspects of an API and cross-references connect references to documented objects. DocFieldTransformer.transform reformats a single field list using domain field definitions, while transform_all applies that responsibility across an object description’s field lists. PyXrefMixin.make_xref creates documentation nodes for Python-aware cross-references used in those fields, including inline type references."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "8a622ba7ea4306a07d4b700a3776fcbc018402bd", "bug_issue": 8452, "solve_pr": 8459, "call_graph": {"nodes": [{"id": "sphinx/ext/autodoc/typehints.py::record_typehints"}], "edges": []}, "graph_spec": "`record_typehints` records a documented object's type hints in the Sphinx environment as part of autodoc processing, supporting the generation of documentation from type annotations."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "07983a5a8704ad91ae855218ecbda1c8598200ca", "bug_issue": 8592, "solve_pr": 8593, "call_graph": {"nodes": [{"id": "sphinx/ext/autodoc/__init__.py::ModuleDocumenter::get_object_members"}], "edges": []}, "graph_spec": "ModuleDocumenter.get_object_members supplies module members for Sphinx autodoc’s automatic module documentation, where members are objects exposed by a Python module. Its interface accepts a member-selection request and returns member information together with an indicator concerning module-membership checking."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "82ef497a8c88f0f6e50d84520e7276bfbf65025d", "bug_issue": 8720, "solve_pr": 8721, "call_graph": {"nodes": [{"id": "sphinx/ext/viewcode.py::collect_pages"}], "edges": []}, "graph_spec": "The `collect_pages` function supplies additional HTML pages for the viewcode extension’s highlighted source-code presentation. It accepts the Sphinx application and yields page descriptions containing page names, rendering context, and template names for the HTML builder."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "1513d5077439b6f1e69108233d1a08059f420970", "bug_issue": 9224, "solve_pr": 9230, "call_graph": {"nodes": [{"id": "sphinx/util/docfields.py::DocFieldTransformer::transform"}, {"id": "sphinx/util/docfields.py::DocFieldTransformer::transform_all"}], "edges": [{"source": "sphinx/util/docfields.py::DocFieldTransformer::transform_all", "target": "sphinx/util/docfields.py::DocFieldTransformer::transform"}]}, "graph_spec": "These methods improve the presentation of doc fields—reStructuredText field lists within object descriptions—using field definitions supplied by a Sphinx domain. `transform` updates a single field list, while `transform_all` applies that transformation to the field list children of an object-description content node."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "03c4b56c6e1be86c64d5ec3d0944dff9cd206c41", "bug_issue": 9319, "solve_pr": 9320, "call_graph": {"nodes": [{"id": "sphinx/cmd/quickstart.py::ask_user"}, {"id": "sphinx/cmd/quickstart.py::main"}], "edges": [{"source": "sphinx/cmd/quickstart.py::main", "target": "sphinx/cmd/quickstart.py::ask_user"}]}, "graph_spec": "These functions support initializing a Sphinx documentation project, whose source directory contains document sources and configuration for building documentation. `main` is the command-line entry point for creating this initial project setup, while `ask_user` collects project information and setup preferences through interactive prompts as part of that workflow."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "23ab36bcd721128b46876eae6c3fdeef96885665", "bug_issue": 9575, "solve_pr": 10449, "call_graph": {"nodes": [{"id": "sphinx/ext/autodoc/typehints.py::merge_typehints"}, {"id": "sphinx/ext/autodoc/typehints.py::modify_field_list"}], "edges": []}, "graph_spec": "These functions support autodoc’s presentation of Python type hints—annotations describing parameter and return types—in generated function and method descriptions. `merge_typehints` integrates this type information into object-description content, while `modify_field_list` updates documentation field lists with annotation information."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "80fbbb8462f075644e229c9d00293d4afde7adf2", "bug_issue": 9576, "solve_pr": 9602, "call_graph": {"nodes": [{"id": "sphinx/domains/python.py::PyObject::handle_signature"}, {"id": "sphinx/domains/python.py::PyProperty::handle_signature"}, {"id": "sphinx/domains/python.py::_parse_annotation"}, {"id": "sphinx/domains/python.py::_parse_annotation::unparse"}, {"id": "sphinx/domains/python.py::_parse_arglist"}], "edges": [{"source": "sphinx/domains/python.py::PyObject::handle_signature", "target": "sphinx/domains/python.py::_parse_annotation"}, {"source": "sphinx/domains/python.py::PyObject::handle_signature", "target": "sphinx/domains/python.py::_parse_arglist"}, {"source": "sphinx/domains/python.py::PyProperty::handle_signature", "target": "sphinx/domains/python.py::PyProperty::handle_signature"}, {"source": "sphinx/domains/python.py::PyProperty::handle_signature", "target": "sphinx/domains/python.py::_parse_annotation"}, {"source": "sphinx/domains/python.py::_parse_annotation", "target": "sphinx/domains/python.py::_parse_annotation::unparse"}, {"source": "sphinx/domains/python.py::_parse_annotation::unparse", "target": "sphinx/domains/python.py::_parse_annotation::unparse"}, {"source": "sphinx/domains/python.py::_parse_arglist", "target": "sphinx/domains/python.py::_parse_annotation"}]}, "graph_spec": "These functions support Sphinx’s Python-domain documentation by turning Python object and property signatures into documentation nodes and returning identifying name information. Argument lists describe callable parameters, while type annotations express parameter, return, and property types; the scoped argument and annotation parsers, including the annotation unparse routine, provide their document-node representations."} +{"repo": "sphinx-doc/sphinx", "buggy_commit": "a05dc0b41992b92fc4e352439a27eddd0f5a88a9", "bug_issue": 9657, "solve_pr": 9658, "call_graph": {"nodes": [{"id": "sphinx/ext/autodoc/mock.py::_MockModule::__getattr__"}, {"id": "sphinx/ext/autodoc/mock.py::_MockObject::__getattr__"}, {"id": "sphinx/ext/autodoc/mock.py::_MockObject::__init__"}, {"id": "sphinx/ext/autodoc/mock.py::_make_subclass"}], "edges": [{"source": "sphinx/ext/autodoc/mock.py::_MockModule::__getattr__", "target": "sphinx/ext/autodoc/mock.py::_make_subclass"}, {"source": "sphinx/ext/autodoc/mock.py::_MockObject::__getattr__", "target": "sphinx/ext/autodoc/mock.py::_make_subclass"}]}, "graph_spec": "These functions support Sphinx autodoc’s dependency mocking, which supplies placeholders for external dependencies during documentation builds. The two attribute-access methods provide mock objects for module and object attributes, while the initializer and subclass factory support creating those placeholders from general construction arguments and class identity information."} +{"repo": "sympy/sympy", "buggy_commit": "1e14c7c06fd37a3aa26d6c7d721b2db9c9fe8caf", "bug_issue": 11617, "solve_pr": 11618, "call_graph": {"nodes": [{"id": "sympy/geometry/ellipse.py::Ellipse::tangent_lines"}, {"id": "sympy/geometry/line.py::Segment::length"}, {"id": "sympy/geometry/point.py::Point::distance"}], "edges": [{"source": "sympy/geometry/ellipse.py::Ellipse::tangent_lines", "target": "sympy/geometry/point.py::Point::distance"}, {"source": "sympy/geometry/line.py::Segment::length", "target": "sympy/geometry/point.py::Point::distance"}]}, "graph_spec": "Ellipse.tangent_lines provides geometric lines tangent to an ellipse through a supplied point, expressing the geometric concept of tangency. Point.distance measures Euclidean separation between points as a number or symbolic expression, while Segment.length expresses that same distance concept as the length between a segment’s endpoints."} +{"repo": "sympy/sympy", "buggy_commit": "d7c3045115693e887bcd03599b7ca4650ac5f2cb", "bug_issue": 12092, "solve_pr": 12096, "call_graph": {"nodes": [{"id": "sympy/core/function.py::Function::_eval_evalf"}], "edges": []}, "graph_spec": "Function._eval_evalf is the numerical-evaluation hook for applied mathematical functions in SymPy, supporting the conversion of symbolic function expressions into numerical approximations at a requested precision. It connects symbolic mathematical functions with SymPy’s broader numerical-evaluation interface."} +{"repo": "sympy/sympy", "buggy_commit": "d4e0231b08147337745dcf601e62de7eefe2fb2d", "bug_issue": 12420, "solve_pr": 17318, "call_graph": {"nodes": [{"id": "sympy/simplify/radsimp.py::radsimp"}, {"id": "sympy/simplify/radsimp.py::radsimp::handle"}, {"id": "sympy/simplify/simplify.py::_nthroot_solve"}, {"id": "sympy/simplify/simplify.py::nthroot"}, {"id": "sympy/simplify/sqrtdenest.py::_denester"}, {"id": "sympy/simplify/sqrtdenest.py::_sqrt_match"}, {"id": "sympy/simplify/sqrtdenest.py::_sqrt_numeric_denest"}, {"id": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb"}, {"id": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb::find"}, {"id": "sympy/simplify/sqrtdenest.py::_sqrt_symbolic_denest"}, {"id": "sympy/simplify/sqrtdenest.py::_sqrtdenest0"}, {"id": "sympy/simplify/sqrtdenest.py::_sqrtdenest1"}, {"id": "sympy/simplify/sqrtdenest.py::_sqrtdenest_rec"}, {"id": "sympy/simplify/sqrtdenest.py::sqrt_biquadratic_denest"}, {"id": "sympy/simplify/sqrtdenest.py::sqrtdenest"}, {"id": "sympy/solvers/solvers.py::_tsolve"}], "edges": [{"source": "sympy/simplify/radsimp.py::radsimp", "target": "sympy/simplify/radsimp.py::radsimp::handle"}, {"source": "sympy/simplify/radsimp.py::radsimp::handle", "target": "sympy/simplify/radsimp.py::radsimp::handle"}, {"source": "sympy/simplify/radsimp.py::radsimp::handle", "target": "sympy/simplify/sqrtdenest.py::sqrtdenest"}, {"source": "sympy/simplify/simplify.py::_nthroot_solve", "target": "sympy/simplify/sqrtdenest.py::sqrtdenest"}, {"source": "sympy/simplify/simplify.py::nthroot", "target": "sympy/simplify/simplify.py::_nthroot_solve"}, {"source": "sympy/simplify/sqrtdenest.py::_denester", "target": "sympy/simplify/radsimp.py::radsimp"}, {"source": "sympy/simplify/sqrtdenest.py::_denester", "target": "sympy/simplify/sqrtdenest.py::_denester"}, {"source": "sympy/simplify/sqrtdenest.py::_denester", "target": "sympy/simplify/sqrtdenest.py::_sqrt_match"}, {"source": "sympy/simplify/sqrtdenest.py::_denester", "target": "sympy/simplify/sqrtdenest.py::_sqrtdenest1"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrt_numeric_denest", "target": "sympy/simplify/radsimp.py::radsimp"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb", "target": "sympy/simplify/radsimp.py::radsimp"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb", "target": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb", "target": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb::find"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb::find", "target": "sympy/simplify/sqrtdenest.py::sqrtdenest"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrt_symbolic_denest", "target": "sympy/simplify/sqrtdenest.py::_sqrt_match"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest0", "target": "sympy/simplify/sqrtdenest.py::_sqrt_ratcomb"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest0", "target": "sympy/simplify/sqrtdenest.py::_sqrtdenest0"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest0", "target": "sympy/simplify/sqrtdenest.py::_sqrtdenest1"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest0", "target": "sympy/simplify/sqrtdenest.py::_sqrtdenest_rec"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest1", "target": "sympy/simplify/radsimp.py::radsimp"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest1", "target": "sympy/simplify/sqrtdenest.py::_denester"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest1", "target": "sympy/simplify/sqrtdenest.py::_sqrt_match"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest1", "target": "sympy/simplify/sqrtdenest.py::_sqrt_numeric_denest"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest1", "target": "sympy/simplify/sqrtdenest.py::_sqrt_symbolic_denest"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest1", "target": "sympy/simplify/sqrtdenest.py::sqrt_biquadratic_denest"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest_rec", "target": "sympy/simplify/radsimp.py::radsimp"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest_rec", "target": "sympy/simplify/sqrtdenest.py::_sqrtdenest1"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest_rec", "target": "sympy/simplify/sqrtdenest.py::_sqrtdenest_rec"}, {"source": "sympy/simplify/sqrtdenest.py::_sqrtdenest_rec", "target": "sympy/simplify/sqrtdenest.py::sqrtdenest"}, {"source": "sympy/simplify/sqrtdenest.py::sqrt_biquadratic_denest", "target": "sympy/simplify/radsimp.py::radsimp"}, {"source": "sympy/simplify/sqrtdenest.py::sqrt_biquadratic_denest", "target": "sympy/simplify/sqrtdenest.py::sqrtdenest"}, {"source": "sympy/simplify/sqrtdenest.py::sqrtdenest", "target": "sympy/simplify/sqrtdenest.py::_sqrtdenest0"}, {"source": "sympy/solvers/solvers.py::_tsolve", "target": "sympy/simplify/sqrtdenest.py::sqrtdenest"}, {"source": "sympy/solvers/solvers.py::_tsolve", "target": "sympy/solvers/solvers.py::_tsolve"}]}, "graph_spec": "This scope must preserve exact symbolic meaning while simplifying nested square roots and radical denominators: `sqrtdenest` expands structurally, applies denesting recursively for at most `max_iter` passes, and otherwise returns an equivalent unchanged expression; it may replace a square root only through algebraically valid numeric, symbolic, biquadratic, shared-radicand, or rational-radical-combination constructions, respecting principal-root signs, positivity requirements, radical-depth limits, and a non-worsening complexity guard. Matching must select a canonical deepest radical component, and recursive denesting must stop safely when shared-radicand, depth, positivity, or algebraicity conditions do not justify a result. `radsimp` must rationalize eligible radical denominators without changing the expression, retain the original when symbolic processing is disabled or radical-term limits/validity checks preclude a safe transformation, and recursively preserve numerator and factor structure. `nthroot` must only return a denested real candidate after exact power verification (including the negative odd-root case); otherwise it retains the principal power. Solver normalization may denest irrational quantities when forming candidates, but must avoid repeated equation states and retain only values that satisfy the original equation."} +{"repo": "sympy/sympy", "buggy_commit": "739e6411c512c0649847a7a2f6ed74c2413b9876", "bug_issue": 12465, "solve_pr": 12489, "call_graph": {"nodes": [{"id": "sympy/combinatorics/permutations.py::Permutation::__add__"}, {"id": "sympy/combinatorics/permutations.py::Permutation::__invert__"}, {"id": "sympy/combinatorics/permutations.py::Permutation::__mul__"}, {"id": "sympy/combinatorics/permutations.py::Permutation::__new__"}, {"id": "sympy/combinatorics/permutations.py::Permutation::__pow__"}, {"id": "sympy/combinatorics/permutations.py::Permutation::__rmul__"}, {"id": "sympy/combinatorics/permutations.py::Permutation::__sub__"}, {"id": "sympy/combinatorics/permutations.py::Permutation::__xor__"}, {"id": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"id": "sympy/combinatorics/permutations.py::Permutation::commutator"}, {"id": "sympy/combinatorics/permutations.py::Permutation::from_inversion_vector"}, {"id": "sympy/combinatorics/permutations.py::Permutation::josephus"}, {"id": "sympy/combinatorics/permutations.py::Permutation::mul_inv"}, {"id": "sympy/combinatorics/permutations.py::Permutation::next_lex"}, {"id": "sympy/combinatorics/permutations.py::Permutation::next_nonlex"}, {"id": "sympy/combinatorics/permutations.py::Permutation::next_trotterjohnson"}, {"id": "sympy/combinatorics/permutations.py::Permutation::random"}, {"id": "sympy/combinatorics/permutations.py::Permutation::rmul_with_af"}, {"id": "sympy/combinatorics/permutations.py::Permutation::unrank_lex"}, {"id": "sympy/combinatorics/permutations.py::Permutation::unrank_nonlex"}, {"id": "sympy/combinatorics/permutations.py::Permutation::unrank_trotterjohnson"}], "edges": [{"source": "sympy/combinatorics/permutations.py::Permutation::__invert__", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::__mul__", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::__new__", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::__sub__", "target": "sympy/combinatorics/permutations.py::Permutation::__add__"}, {"source": "sympy/combinatorics/permutations.py::Permutation::__xor__", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::from_inversion_vector", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::mul_inv", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::next_lex", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::next_trotterjohnson", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::random", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::rmul_with_af", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::unrank_lex", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::unrank_nonlex", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}, {"source": "sympy/combinatorics/permutations.py::Permutation::unrank_trotterjohnson", "target": "sympy/combinatorics/permutations.py::Permutation::_af_new"}]}, "graph_spec": "A `Permutation` represents a bijection of the contiguous zero-based domain `0..size-1`, stored in an array form whose length defines its size; construction must accept supported array, cycle, `Cycle`, and existing-permutation forms, reject invalid/noncontiguous inputs, and may extend with fixed points for a larger requested size without truncating a permutation. Construction and permutation-producing operations invoked through a `Permutation` subclass must preserve that subclass in their permutation results. Internal array-form creation must preserve the supplied valid mapping and size, while public operations return new permutations rather than altering operands. Products compose so `(a*b)(i) == b(a(i))`, accommodating unequal sizes by fixed-point extension; inverse and integer powers satisfy the usual group identities, conjugation and commutators require equal sizes and retain their stated group meanings, and rank addition/subtraction wraps modulo the factorial cardinality. Lexicographic, nonlexicographic, and Trotter-Johnson ranking/unranking and successor operations must agree on their respective orderings, with successors returning `None` at the final member; inversion-vector, random, and Josephus constructors must each yield a valid permutation of their declared domain and selection/order semantics."} +{"repo": "sympy/sympy", "buggy_commit": "e8f522a4e652e41ce24acb20576e88f5d786b19b", "bug_issue": 12712, "solve_pr": 13615, "call_graph": {"nodes": [{"id": "sympy/sets/sets.py::Interval::_complement"}, {"id": "sympy/sets/sets.py::Set::_complement"}], "edges": [{"source": "sympy/sets/sets.py::Interval::_complement", "target": "sympy/sets/sets.py::Set::_complement"}]}, "graph_spec": "Set._complement and Interval._complement support symbolic relative complementation: forming the set of elements in a reference set that do not belong to the set being complemented. Set._complement provides the general set-level role, while Interval._complement specializes it for real intervals, with both operating on sets to support set-valued results."} +{"repo": "sympy/sympy", "buggy_commit": "97b9c34b41d0b8372113c20cda970ac7d061cd38", "bug_issue": 13076, "solve_pr": 13372, "call_graph": {"nodes": [{"id": "sympy/assumptions/handlers/sets.py::AskAntiHermitianHandler::Add"}, {"id": "sympy/assumptions/handlers/sets.py::AskAntiHermitianHandler::Mul"}, {"id": "sympy/assumptions/handlers/sets.py::AskAntiHermitianHandler::Pow"}, {"id": "sympy/assumptions/handlers/sets.py::AskHermitianHandler::Add"}, {"id": "sympy/assumptions/handlers/sets.py::AskHermitianHandler::Mul"}, {"id": "sympy/assumptions/handlers/sets.py::AskHermitianHandler::Pow"}, {"id": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::Add"}, {"id": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::Mul"}, {"id": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::Pow"}, {"id": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::_number"}, {"id": "sympy/assumptions/handlers/sets.py::AskRealHandler::Add"}, {"id": "sympy/assumptions/handlers/sets.py::AskRealHandler::Mul"}, {"id": "sympy/assumptions/handlers/sets.py::AskRealHandler::Pow"}, {"id": "sympy/assumptions/handlers/sets.py::AskRealHandler::_number"}, {"id": "sympy/codegen/ast.py::Declaration::__new__"}, {"id": "sympy/codegen/ast.py::FloatType::_cast_nocheck"}, {"id": "sympy/codegen/ast.py::Type::cast_check"}, {"id": "sympy/core/evalf.py::evalf"}, {"id": "sympy/core/evalf.py::get_integer_part"}, {"id": "sympy/core/evalf.py::get_integer_part::calc_part"}, {"id": "sympy/core/expr.py::Expr::__complex__"}, {"id": "sympy/core/expr.py::Expr::__float__"}, {"id": "sympy/core/numbers.py::Float::__new__"}, {"id": "sympy/functions/elementary/integers.py::RoundFunction::eval"}, {"id": "sympy/plotting/pygletplot/plot_interval.py::PlotInterval::set_v_max"}, {"id": "sympy/plotting/pygletplot/plot_interval.py::PlotInterval::set_v_min"}, {"id": "sympy/printing/llvmjitcode.py::LLVMJitCallbackPrinter::_print_Indexed"}], "edges": [{"source": "sympy/assumptions/handlers/sets.py::AskAntiHermitianHandler::Add", "target": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskAntiHermitianHandler::Mul", "target": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskAntiHermitianHandler::Pow", "target": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskHermitianHandler::Add", "target": "sympy/assumptions/handlers/sets.py::AskRealHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskHermitianHandler::Mul", "target": "sympy/assumptions/handlers/sets.py::AskRealHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskHermitianHandler::Pow", "target": "sympy/assumptions/handlers/sets.py::AskRealHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::Add", "target": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::Mul", "target": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::Pow", "target": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskImaginaryHandler::_number", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/assumptions/handlers/sets.py::AskRealHandler::Add", "target": "sympy/assumptions/handlers/sets.py::AskRealHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskRealHandler::Mul", "target": "sympy/assumptions/handlers/sets.py::AskRealHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskRealHandler::Pow", "target": "sympy/assumptions/handlers/sets.py::AskRealHandler::_number"}, {"source": "sympy/assumptions/handlers/sets.py::AskRealHandler::_number", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/codegen/ast.py::Declaration::__new__", "target": "sympy/codegen/ast.py::Type::cast_check"}, {"source": "sympy/codegen/ast.py::FloatType::_cast_nocheck", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/codegen/ast.py::Type::cast_check", "target": "sympy/codegen/ast.py::FloatType::_cast_nocheck"}, {"source": "sympy/core/evalf.py::get_integer_part", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/core/evalf.py::get_integer_part", "target": "sympy/core/evalf.py::get_integer_part::calc_part"}, {"source": "sympy/core/evalf.py::get_integer_part::calc_part", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/core/expr.py::Expr::__complex__", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/core/expr.py::Expr::__float__", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/core/numbers.py::Float::__new__", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/functions/elementary/integers.py::RoundFunction::eval", "target": "sympy/core/evalf.py::get_integer_part"}, {"source": "sympy/plotting/pygletplot/plot_interval.py::PlotInterval::set_v_max", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/plotting/pygletplot/plot_interval.py::PlotInterval::set_v_min", "target": "sympy/core/evalf.py::evalf"}, {"source": "sympy/printing/llvmjitcode.py::LLVMJitCallbackPrinter::_print_Indexed", "target": "sympy/core/evalf.py::evalf"}]}, "graph_spec": "The scoped assumption handlers assess real, imaginary, Hermitian, and anti-Hermitian properties of sums, products, powers, and numeric expressions, connecting number classifications with operator properties; anti-Hermitian operators are described as imaginary multiples of Hermitian operators. The numerical functions evaluate symbolic expressions, construct arbitrary-precision floating-point numbers, support conversion to Python numeric types, and provide integer-part evaluation for rounding. The remaining functions construct variable declarations and support numeric casting for code generation, set plotting interval bounds, and translate indexed expressions into LLVM intermediate representation for callbacks."} +{"repo": "sympy/sympy", "buggy_commit": "d1320814eda6549996190618a21eaf212cfd4d1e", "bug_issue": 13078, "solve_pr": 13091, "call_graph": {"nodes": [{"id": "sympy/core/basic.py::Basic::__eq__"}, {"id": "sympy/core/basic.py::Basic::__ne__"}, {"id": "sympy/core/numbers.py::Float::__eq__"}, {"id": "sympy/core/numbers.py::Float::__ne__"}, {"id": "sympy/core/numbers.py::Integer::__eq__"}, {"id": "sympy/core/numbers.py::Integer::__ne__"}, {"id": "sympy/core/numbers.py::NumberSymbol::__eq__"}, {"id": "sympy/core/numbers.py::NumberSymbol::__ne__"}, {"id": "sympy/core/numbers.py::Rational::__eq__"}, {"id": "sympy/core/numbers.py::Rational::__ne__"}], "edges": [{"source": "sympy/core/basic.py::Basic::__ne__", "target": "sympy/core/basic.py::Basic::__eq__"}, {"source": "sympy/core/numbers.py::Float::__ne__", "target": "sympy/core/numbers.py::Float::__eq__"}, {"source": "sympy/core/numbers.py::Integer::__eq__", "target": "sympy/core/numbers.py::Rational::__eq__"}, {"source": "sympy/core/numbers.py::Integer::__ne__", "target": "sympy/core/numbers.py::Integer::__eq__"}, {"source": "sympy/core/numbers.py::NumberSymbol::__ne__", "target": "sympy/core/numbers.py::NumberSymbol::__eq__"}, {"source": "sympy/core/numbers.py::Rational::__ne__", "target": "sympy/core/numbers.py::Rational::__eq__"}]}, "graph_spec": "Equality must return a concrete structural or numeric truth value while preserving Python comparison interoperability: symbolic trees are equal when they have the same type and hashable content (with identity fast-paths, safe sympification, and transparent unit-exponent powers), and unsupported symbolic-tree operands may yield `NotImplemented`. Numeric equality must sympify compatible inputs, treat an `Integer` as equal to matching native integers or integer values and otherwise use rational comparison, compare rationals by their reduced numerator/denominator pairs, and compare floats using the float operand’s precision (including native floats converted at that precision). Comparisons involving number symbols must preserve identity equality, reject irrational symbols as equal to ordinary numeric values, and delegate compatible numeric comparisons where appropriate; unrelated values are unequal. Every scoped `__ne__` must be the logical complement of its corresponding equality semantics, so equality and inequality remain mutually consistent across cross-type numeric comparisons."} +{"repo": "sympy/sympy", "buggy_commit": "a5e6a101869e027e7930e694f8b1cfb082603453", "bug_issue": 13079, "solve_pr": 13757, "call_graph": {"nodes": [{"id": "sympy/integrals/prde.py::limited_integrate"}, {"id": "sympy/integrals/prde.py::param_poly_rischDE"}, {"id": "sympy/integrals/prde.py::param_rischDE"}, {"id": "sympy/integrals/prde.py::parametric_log_deriv_heu"}, {"id": "sympy/integrals/prde.py::prde_no_cancel_b_large"}, {"id": "sympy/integrals/rde.py::bound_degree"}, {"id": "sympy/integrals/rde.py::cancel_exp"}, {"id": "sympy/integrals/rde.py::solve_poly_rde"}, {"id": "sympy/integrals/risch.py::integrate_hyperexponential_polynomial"}, {"id": "sympy/integrals/risch.py::integrate_primitive_polynomial"}, {"id": "sympy/polys/polytools.py::Poly"}, {"id": "sympy/polys/polytools.py::count_roots"}, {"id": "sympy/simplify/hyperexpand.py::UnShiftB::__init__"}], "edges": [{"source": "sympy/integrals/prde.py::limited_integrate", "target": "sympy/polys/polytools.py::Poly"}, {"source": "sympy/integrals/prde.py::param_poly_rischDE", "target": "sympy/integrals/prde.py::param_poly_rischDE"}, {"source": "sympy/integrals/prde.py::param_poly_rischDE", "target": "sympy/integrals/prde.py::prde_no_cancel_b_large"}, {"source": "sympy/integrals/prde.py::param_rischDE", "target": "sympy/integrals/prde.py::param_poly_rischDE"}, {"source": "sympy/integrals/prde.py::parametric_log_deriv_heu", "target": "sympy/polys/polytools.py::Poly"}, {"source": "sympy/integrals/prde.py::prde_no_cancel_b_large", "target": "sympy/polys/polytools.py::Poly"}, {"source": "sympy/integrals/rde.py::bound_degree", "target": "sympy/integrals/prde.py::limited_integrate"}, {"source": "sympy/integrals/rde.py::cancel_exp", "target": "sympy/polys/polytools.py::Poly"}, {"source": "sympy/integrals/rde.py::solve_poly_rde", "target": "sympy/integrals/prde.py::prde_no_cancel_b_large"}, {"source": "sympy/integrals/risch.py::integrate_hyperexponential_polynomial", "target": "sympy/polys/polytools.py::Poly"}, {"source": "sympy/integrals/risch.py::integrate_primitive_polynomial", "target": "sympy/integrals/prde.py::limited_integrate"}, {"source": "sympy/polys/polytools.py::count_roots", "target": "sympy/polys/polytools.py::Poly"}, {"source": "sympy/simplify/hyperexpand.py::UnShiftB::__init__", "target": "sympy/polys/polytools.py::Poly"}]}, "graph_spec": "The scope must preserve exact polynomial/rational arithmetic while solving Risch differential and limited-integration problems: any returned polynomial or rational family must satisfy the stated differential equation, obey its degree bound, and be accompanied by constant-coefficient linear constraints that characterize exactly which parameter choices are solvable; unsatisfiable or unsupported cases must be reported rather than represented by spurious solutions. Degree bounds must be sound across base, primitive, hyperexponential, and nonlinear derivations, including refinements justified by limited integration or logarithmic-derivative relations. Limited integration must normalize its rational input and return either no relation or an antiderivative together with constants such that the original integrand differs from its derivative by the declared constant combination. Polynomial construction must retain the intended generators and coefficient domain, root counting must count roots in the requested real interval or complex rectangle, and hypergeometric lower-index unshifting must construct its operator polynomial only when the shifted parameters are non-singular and do not cancel with an upper parameter."} +{"repo": "sympy/sympy", "buggy_commit": "84b8f3357176ee339f31b923e3a2a00b4b798015", "bug_issue": 13546, "solve_pr": 13551, "call_graph": {"nodes": [{"id": "sympy/concrete/delta.py::deltaproduct"}, {"id": "sympy/concrete/products.py::Product::_eval_product"}, {"id": "sympy/concrete/products.py::Product::doit"}, {"id": "sympy/concrete/products.py::product"}, {"id": "sympy/parsing/maxima.py::MaximaHelpers::maxima_product"}, {"id": "sympy/solvers/ode.py::_solve_undetermined_coefficients"}, {"id": "sympy/solvers/ode.py::checkinfsol"}, {"id": "sympy/solvers/ode.py::checkodesol"}, {"id": "sympy/solvers/ode.py::checksysodesol"}, {"id": "sympy/solvers/ode.py::lie_heuristic_bivariate"}, {"id": "sympy/solvers/ode.py::lie_heuristic_chi"}, {"id": "sympy/solvers/ode.py::ode_lie_group"}, {"id": "sympy/solvers/ode.py::ode_nth_linear_constant_coeff_undetermined_coefficients"}, {"id": "sympy/solvers/ode.py::ode_nth_linear_euler_eq_nonhomogeneous_undetermined_coefficients"}, {"id": "sympy/solvers/ode.py::sub_func_doit"}, {"id": "sympy/solvers/pde.py::checkpdesol"}, {"id": "sympy/solvers/pde.py::pde_separate"}, {"id": "sympy/solvers/pde.py::pde_separate_add"}, {"id": "sympy/solvers/pde.py::pde_separate_mul"}], "edges": [{"source": "sympy/concrete/delta.py::deltaproduct", "target": "sympy/concrete/delta.py::deltaproduct"}, {"source": "sympy/concrete/delta.py::deltaproduct", "target": "sympy/concrete/products.py::product"}, {"source": "sympy/concrete/products.py::Product::_eval_product", "target": "sympy/concrete/products.py::Product::_eval_product"}, {"source": "sympy/concrete/products.py::Product::_eval_product", "target": "sympy/concrete/products.py::Product::doit"}, {"source": "sympy/concrete/products.py::Product::doit", "target": "sympy/concrete/products.py::Product::_eval_product"}, {"source": "sympy/concrete/products.py::product", "target": "sympy/concrete/products.py::Product::doit"}, {"source": "sympy/parsing/maxima.py::MaximaHelpers::maxima_product", "target": "sympy/concrete/products.py::product"}, {"source": "sympy/solvers/ode.py::_solve_undetermined_coefficients", "target": "sympy/solvers/ode.py::sub_func_doit"}, {"source": "sympy/solvers/ode.py::checkinfsol", "target": "sympy/concrete/products.py::Product::doit"}, {"source": "sympy/solvers/ode.py::checkodesol", "target": "sympy/solvers/ode.py::checkodesol"}, {"source": "sympy/solvers/ode.py::checkodesol", "target": "sympy/solvers/ode.py::sub_func_doit"}, {"source": "sympy/solvers/ode.py::checksysodesol", "target": "sympy/solvers/ode.py::sub_func_doit"}, {"source": "sympy/solvers/ode.py::lie_heuristic_bivariate", "target": "sympy/concrete/products.py::Product::doit"}, {"source": "sympy/solvers/ode.py::lie_heuristic_chi", "target": "sympy/concrete/products.py::Product::doit"}, {"source": "sympy/solvers/ode.py::ode_lie_group", "target": "sympy/solvers/ode.py::checkinfsol"}, {"source": "sympy/solvers/ode.py::ode_nth_linear_constant_coeff_undetermined_coefficients", "target": "sympy/solvers/ode.py::_solve_undetermined_coefficients"}, {"source": "sympy/solvers/ode.py::ode_nth_linear_euler_eq_nonhomogeneous_undetermined_coefficients", "target": "sympy/solvers/ode.py::ode_nth_linear_constant_coeff_undetermined_coefficients"}, {"source": "sympy/solvers/ode.py::sub_func_doit", "target": "sympy/concrete/products.py::Product::doit"}, {"source": "sympy/solvers/pde.py::checkpdesol", "target": "sympy/concrete/products.py::Product::doit"}, {"source": "sympy/solvers/pde.py::checkpdesol", "target": "sympy/solvers/pde.py::checkpdesol"}, {"source": "sympy/solvers/pde.py::pde_separate", "target": "sympy/concrete/products.py::Product::doit"}, {"source": "sympy/solvers/pde.py::pde_separate", "target": "sympy/solvers/pde.py::pde_separate"}, {"source": "sympy/solvers/pde.py::pde_separate_add", "target": "sympy/solvers/pde.py::pde_separate"}, {"source": "sympy/solvers/pde.py::pde_separate_mul", "target": "sympy/solvers/pde.py::pde_separate"}]}, "graph_spec": "These functions support symbolic indexed products—repeated multiplication of expressions—including product evaluation, Kronecker-delta products, and Maxima parsing support. They also provide differential-equation solving through undetermined coefficients for linear constant-coefficient and Cauchy–Euler ODEs, and Lie symmetry methods whose infinitesimals describe continuous equation-preserving transformations. Related functions substitute symbolic functions with derivative evaluation, check proposed ODE, ODE-system, and PDE solutions and symmetry infinitesimals, and seek additive or multiplicative PDE separation into expressions involving distinct groups of variables."} +{"repo": "sympy/sympy", "buggy_commit": "62b1996e353fedc1e3fb51f626ffaae9583b74a6", "bug_issue": 13779, "solve_pr": 13974, "call_graph": {"nodes": [{"id": "sympy/physics/quantum/density.py::Density::_eval_trace"}, {"id": "sympy/physics/quantum/density.py::Density::_generate_outer_prod"}, {"id": "sympy/physics/quantum/density.py::Density::_represent"}, {"id": "sympy/physics/quantum/density.py::Density::doit"}, {"id": "sympy/physics/quantum/density.py::fidelity"}, {"id": "sympy/physics/quantum/tensorproduct.py::tensor_product_simp"}, {"id": "sympy/physics/quantum/tensorproduct.py::tensor_product_simp_Mul"}], "edges": [{"source": "sympy/physics/quantum/density.py::Density::_eval_trace", "target": "sympy/physics/quantum/density.py::Density::doit"}, {"source": "sympy/physics/quantum/density.py::Density::_generate_outer_prod", "target": "sympy/physics/quantum/tensorproduct.py::tensor_product_simp"}, {"source": "sympy/physics/quantum/density.py::Density::_represent", "target": "sympy/physics/quantum/density.py::Density::doit"}, {"source": "sympy/physics/quantum/density.py::Density::doit", "target": "sympy/physics/quantum/density.py::Density::_generate_outer_prod"}, {"source": "sympy/physics/quantum/density.py::fidelity", "target": "sympy/physics/quantum/density.py::Density::doit"}, {"source": "sympy/physics/quantum/tensorproduct.py::tensor_product_simp", "target": "sympy/physics/quantum/tensorproduct.py::tensor_product_simp"}]}, "graph_spec": "These functions support density operators, which represent statistical mixtures of quantum states: Density.doit and _generate_outer_prod provide outer-product expressions, while _represent and _eval_trace support representation and trace evaluation. fidelity measures similarity between quantum states described by density operators or matrices. tensor_product_simp and tensor_product_simp_Mul simplify symbolic tensor-product expressions and their products, supporting the quantum operator and state expressions used in this scope."} +{"repo": "sympy/sympy", "buggy_commit": "bde700855befc960923bb1f7e32246b0c8227940", "bug_issue": 13835, "solve_pr": 13877, "call_graph": {"nodes": [{"id": "sympy/algebras/quaternion.py::Quaternion::from_rotation_matrix"}, {"id": "sympy/crypto/crypto.py::decipher_hill"}, {"id": "sympy/matrices/dense.py::wronskian"}, {"id": "sympy/matrices/matrices.py::MatrixBase::inv_mod"}, {"id": "sympy/matrices/matrices.py::MatrixDeprecated::cofactorMatrix"}, {"id": "sympy/matrices/matrices.py::MatrixDeprecated::det_bareis"}, {"id": "sympy/matrices/matrices.py::MatrixDeprecated::det_bareiss"}, {"id": "sympy/matrices/matrices.py::MatrixDeprecated::minorEntry"}, {"id": "sympy/matrices/matrices.py::MatrixDeterminant::_eval_det_bareiss"}, {"id": "sympy/matrices/matrices.py::MatrixDeterminant::_eval_determinant"}, {"id": "sympy/matrices/matrices.py::MatrixDeterminant::adjugate"}, {"id": "sympy/matrices/matrices.py::MatrixDeterminant::cofactor"}, {"id": "sympy/matrices/matrices.py::MatrixDeterminant::cofactor_matrix"}, {"id": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"id": "sympy/matrices/matrices.py::MatrixDeterminant::minor"}, {"id": "sympy/polys/subresultants_qq_zz.py::correct_sign"}, {"id": "sympy/series/sequences.py::SeqBase::find_linear_recurrence"}, {"id": "sympy/solvers/ode.py::_solve_variation_of_parameters"}, {"id": "sympy/solvers/ode.py::ode_nth_linear_constant_coeff_variation_of_parameters"}, {"id": "sympy/solvers/ode.py::ode_nth_linear_euler_eq_nonhomogeneous_variation_of_parameters"}], "edges": [{"source": "sympy/algebras/quaternion.py::Quaternion::from_rotation_matrix", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/crypto/crypto.py::decipher_hill", "target": "sympy/matrices/matrices.py::MatrixBase::inv_mod"}, {"source": "sympy/matrices/dense.py::wronskian", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/matrices/matrices.py::MatrixBase::inv_mod", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/matrices/matrices.py::MatrixDeprecated::cofactorMatrix", "target": "sympy/matrices/matrices.py::MatrixDeterminant::cofactor_matrix"}, {"source": "sympy/matrices/matrices.py::MatrixDeprecated::det_bareis", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/matrices/matrices.py::MatrixDeprecated::det_bareiss", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/matrices/matrices.py::MatrixDeprecated::minorEntry", "target": "sympy/matrices/matrices.py::MatrixDeterminant::minor"}, {"source": "sympy/matrices/matrices.py::MatrixDeterminant::_eval_determinant", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/matrices/matrices.py::MatrixDeterminant::adjugate", "target": "sympy/matrices/matrices.py::MatrixDeterminant::cofactor_matrix"}, {"source": "sympy/matrices/matrices.py::MatrixDeterminant::cofactor", "target": "sympy/matrices/matrices.py::MatrixDeterminant::minor"}, {"source": "sympy/matrices/matrices.py::MatrixDeterminant::cofactor_matrix", "target": "sympy/matrices/matrices.py::MatrixDeterminant::cofactor"}, {"source": "sympy/matrices/matrices.py::MatrixDeterminant::det", "target": "sympy/matrices/matrices.py::MatrixDeterminant::_eval_det_bareiss"}, {"source": "sympy/matrices/matrices.py::MatrixDeterminant::minor", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/polys/subresultants_qq_zz.py::correct_sign", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/series/sequences.py::SeqBase::find_linear_recurrence", "target": "sympy/matrices/matrices.py::MatrixDeterminant::det"}, {"source": "sympy/solvers/ode.py::_solve_variation_of_parameters", "target": "sympy/matrices/dense.py::wronskian"}, {"source": "sympy/solvers/ode.py::ode_nth_linear_constant_coeff_variation_of_parameters", "target": "sympy/solvers/ode.py::_solve_variation_of_parameters"}, {"source": "sympy/solvers/ode.py::ode_nth_linear_euler_eq_nonhomogeneous_variation_of_parameters", "target": "sympy/solvers/ode.py::_solve_variation_of_parameters"}]}, "graph_spec": "The matrix-determinant scope must return the mathematical determinant for every square matrix, including the convention det([])=1 and direct 1x1–3x3 values, while rejecting nonsquare inputs and rejecting unsupported method names (accepting the documented aliases); Bareiss, Berkowitz, and LU selections must preserve that result, with fraction-free Bareiss correctly handling pivoting, row-swap parity, and a missing usable pivot as zero. A minor is the selected row-and-column deletion determinant (with valid normalized indices), a cofactor applies (-1)^(i+j), the cofactor matrix contains all cofactors, and the adjugate is its transpose; legacy entry points retain these semantics. Consequently modular inversion must succeed exactly when a square key determinant is coprime to the modulus and yield the inverse modulo that modulus, enabling Hill deciphering of complete padded blocks. Determinants must also faithfully support rotation-matrix quaternion magnitude/sign construction, Wronskians (empty family equals 1), subresultant submatrix signs, and nonsingular recurrence systems; variation-of-parameters solvers must form the prescribed Wronskian ratios from a full linearly independent homogeneous basis, reject a zero Wronskian or wrong basis size, and add the resulting particular solution to the homogeneous solution, including the Euler leading-coefficient scaling."} +{"repo": "sympy/sympy", "buggy_commit": "205da797006360fc629110937e39a19c9561313e", "bug_issue": 14530, "solve_pr": 14531, "call_graph": {"nodes": [{"id": "sympy/printing/str.py::StrPrinter::_print_AppliedPredicate"}, {"id": "sympy/printing/str.py::StrPrinter::_print_ExprCondPair"}, {"id": "sympy/printing/str.py::StrPrinter::_print_FracField"}, {"id": "sympy/printing/str.py::StrPrinter::_print_Lambda"}, {"id": "sympy/printing/str.py::StrPrinter::_print_Limit"}, {"id": "sympy/printing/str.py::StrPrinter::_print_MatrixElement"}, {"id": "sympy/printing/str.py::StrPrinter::_print_Normal"}, {"id": "sympy/printing/str.py::StrPrinter::_print_Permutation"}, {"id": "sympy/printing/str.py::StrPrinter::_print_PermutationGroup"}, {"id": "sympy/printing/str.py::StrPrinter::_print_PolyRing"}, {"id": "sympy/printing/str.py::StrPrinter::_print_Relational"}, {"id": "sympy/printing/str.py::StrPrinter::_print_Uniform"}], "edges": []}, "graph_spec": "These StrPrinter methods produce readable string representations of symbolic objects: applied predicates and relations express logical statements; expression–condition pairs associate expressions with conditions; lambdas, limits, and matrix elements represent symbolic functions, calculus constructs, and matrix entries. They also render permutations and permutation groups describing rearrangements and their algebraic structure, polynomial rings and rational function fields providing algebraic settings, and normal and uniform probability distribution objects."} +{"repo": "sympy/sympy", "buggy_commit": "c6753448b5c34f95e250105d76709fe4d349ca1f", "bug_issue": 14710, "solve_pr": 14711, "call_graph": {"nodes": [{"id": "sympy/physics/vector/vector.py::Vector::__add__"}, {"id": "sympy/physics/vector/vector.py::Vector::__sub__"}], "edges": [{"source": "sympy/physics/vector/vector.py::Vector::__sub__", "target": "sympy/physics/vector/vector.py::Vector::__add__"}]}, "graph_spec": "Vector.__add__ and Vector.__sub__ provide vector addition and subtraction, combining vector operands into vector-valued sums and differences. These operations support algebra on quantities with magnitude and direction, which the repository presents as building blocks for describing classical mechanics systems."} +{"repo": "sympy/sympy", "buggy_commit": "1592318e5d7006c197f55134dd8e9b59f012af64", "bug_issue": 15493, "solve_pr": 15599, "call_graph": {"nodes": [{"id": "sympy/core/mod.py::Mod::eval"}], "edges": []}, "graph_spec": "`Mod.eval(p, q)` must construct or simplify a modulo expression using Python’s remainder convention: whenever a remainder is determined, it has the divisor’s sign; a zero divisor raises `ZeroDivisionError`, and indeterminate/infinite operands yield `nan`. It must preserve exact numeric evaluation and safe symbolic deductions (including zero, parity, custom operand evaluation, known quotient or bounded-difference cases), while leaving unresolved cases symbolic. Algebraic normalization may denest compatible nested remainders, combine terms or factors already reduced by the same modulus, remove common factors, and simplify additive terms only when the resulting expression remains equivalent; any extracted factor must multiply the residual modulo expression so the original value is preserved. Sign normalization and reevaluation after reduction must retain correct semantics, avoid unsafe assumptions when signs or divisibility are unknown, and preserve an unevaluated canonical `Mod` form when no sound simplification is available."} +{"repo": "sympy/sympy", "buggy_commit": "6fb3ee16d1faef2392c7a5d3093dfe4c24cfc5fa", "bug_issue": 15718, "solve_pr": 15976, "call_graph": {"nodes": [{"id": "sympy/printing/mathml.py::MathMLPresentationPrinter::_print_Symbol"}], "edges": []}, "graph_spec": "Presentation MathML symbol rendering must render a symbol name as Presentation MathML, separating its base name, superscript components, and subscript components with the printer’s standard name convention and translating recognized Greek identifiers in every component to their Unicode glyphs. A plain symbol is a single `` containing the translated base; symbols with only subscripts, only superscripts, or both must use ``, ``, or `` respectively, with the base first and subscript before superscript. Each script is an `` when it has one component, or an `` of `` components separated by space `` elements when it has multiple components. When requested with bold style, the resulting outer presentation element must carry `mathvariant=\"bold\"`, without changing the name or script structure."} +{"repo": "sympy/sympy", "buggy_commit": "2b4f967740cc56f864a2271c09215269a0983dd7", "bug_issue": 15873, "solve_pr": 15875, "call_graph": {"nodes": [{"id": "sympy/core/add.py::Add::_eval_is_zero"}], "edges": []}, "graph_spec": "`Add._eval_is_zero` must provide a conservative three-valued zero classification. It must return `True` when every summand is established real zero; it must return `False` when a proven nonzero real component remains, or when the real component cancels but a definitely imaginary component remains without any possibly-zero imaginary contribution. It may conclude that a mixed real sum is zero only after the nonzero real summands themselves are established to sum to zero and no imaginary contribution is present. Noncommutative additions, summands with unknown relevant assumptions, purely real nonzero sums whose cancellation is undecidable, and mixtures where imaginary cancellation cannot be ruled out must remain indeterminate rather than being classified as zero or nonzero."} +{"repo": "sympy/sympy", "buggy_commit": "7ec680459c66036cb9d023b2bc32df8ab313ba99", "bug_issue": 16791, "solve_pr": 16792, "call_graph": {"nodes": [{"id": "sympy/utilities/autowrap.py::autowrap"}, {"id": "sympy/utilities/autowrap.py::binary_function"}, {"id": "sympy/utilities/autowrap.py::ufuncify"}, {"id": "sympy/utilities/codegen.py::CodeGen::routine"}, {"id": "sympy/utilities/codegen.py::codegen"}, {"id": "sympy/utilities/codegen.py::make_routine"}], "edges": [{"source": "sympy/utilities/autowrap.py::autowrap", "target": "sympy/utilities/codegen.py::CodeGen::routine"}, {"source": "sympy/utilities/autowrap.py::binary_function", "target": "sympy/utilities/autowrap.py::autowrap"}, {"source": "sympy/utilities/autowrap.py::ufuncify", "target": "sympy/utilities/autowrap.py::autowrap"}, {"source": "sympy/utilities/autowrap.py::ufuncify", "target": "sympy/utilities/codegen.py::make_routine"}, {"source": "sympy/utilities/codegen.py::codegen", "target": "sympy/utilities/codegen.py::CodeGen::routine"}, {"source": "sympy/utilities/codegen.py::make_routine", "target": "sympy/utilities/codegen.py::CodeGen::routine"}]}, "graph_spec": "This scope must turn symbolic expressions into routines and callable compiled interfaces without changing their declared input/output meaning: routine construction must derive inputs from free symbols (excluding requested globals and internal locals), represent equality left sides and matrix results as output or in-out arguments, retain ordinary scalar expressions as return values, and enforce any explicit argument order by rejecting omitted required arguments while permitting explicitly redundant inputs. `codegen` and `make_routine` must select a valid generator, honor language/code-generator exclusivity and generation options, normalize single versus multiple named expressions, and emit or return the corresponding source artifacts. `autowrap` must validate or infer a backend-compatible language, compile the main routine together with declared helpers, preserve requested argument ordering (including wrapper-returned pure outputs), and return the backend callable; `binary_function` must expose that callable through a symbolic implemented function. `ufuncify` must preserve the supplied argument order and perform the expression elementwise: its NumPy backend must create real broadcasting ufuncs with supported input/output arity, while other supported backends provide the documented one-dimensional array-oriented callable semantics."} +{"repo": "sympy/sympy", "buggy_commit": "30b12bacf3c837040eb71c5af4590cea9521f4e8", "bug_issue": 17624, "solve_pr": 17630, "call_graph": {"nodes": [{"id": "sympy/matrices/expressions/matexpr.py::get_postprocessor::_postprocessor"}], "edges": []}, "graph_spec": "The postprocessor for core Add or Mul expressions containing matrix-valued operands must separate matrix operands from scalar/non-matrix operands and return the appropriate matrix-expression form without requiring eager traversal of nested subexpressions. With no matrix operands, it must preserve the normal core operation. For multiplication, it must preserve the scalar coefficient together with the ordered matrix product, absorbing all scalar factors into an available explicit matrix when possible; otherwise it must construct and evaluate a MatMul with the canonical scalar factor followed by the matrix operands. For addition, a purely matrix-valued sum must become an evaluated MatAdd, while a mixed scalar-and-matrix sum must remain a core Add whose matrix portion is consolidated into an evaluated MatAdd, so scalar-plus-matrix expressions remain representable. Scalar subexpressions must be rebuilt through the originating core operation so their canonical simplification is retained."} +{"repo": "sympy/sympy", "buggy_commit": "3f8c8c2377cb8e0daaf8073e8d03ac7d87580813", "bug_issue": 17737, "solve_pr": 22080, "call_graph": {"nodes": [{"id": "sympy/printing/codeprinter.py::CodePrinter::_print_Mul"}], "edges": []}, "graph_spec": "CodePrinter._print_Mul must emit a precedence-preserving code expression for a product: honor the printer’s configured factor ordering (or retain the original factor sequence for legacy/no ordering), extract a leading negative coefficient as a single unary sign, and parenthesize factors whenever required by multiplication precedence, including the stricter binding needed for a lone negated factor. Commutative powers with negative rational exponents must be rendered as division by corresponding positive powers while noncommutative or other factors remain in the numerator; use `1` when no numerator factors remain. Emit no slash for an all-numerator product, one ungrouped denominator for a single divisor, and a parenthesized product for multiple divisors. In particular, reciprocal powers whose base is a multi-factor product must retain grouping around that base so the generated division denotes the same reciprocal product."} +{"repo": "sympy/sympy", "buggy_commit": "270cf6880b441599bda9706e3c8caf696ef20302", "bug_issue": 18186, "solve_pr": 18189, "call_graph": {"nodes": [{"id": "sympy/solvers/diophantine.py::diophantine"}], "edges": []}, "graph_spec": "`diophantine` accepts an expression assumed equal to zero (or an equality, converted to lhs−rhs) and returns a set of solution tuples ordered by SymPy’s canonical symbol ordering, or by a valid requested symbol ordering. It must accept only polynomial equations with rational coefficients, normalize removable numeric factors and rational denominators, and exclude numerator solutions that make a symbolic denominator zero. A product equation represents the union of the independently solved factor equations; each partial solution must be expanded to all equation variables with fresh integer parameters for unconstrained variables and discarded if it violates symbol assumptions. Results must contain valid integer-valued solutions, retain the all-zero solution when applicable even if no nontrivial branch is produced, and, when requested for equation classes whose symmetries permit it, include only the corresponding sign/value permutations without introducing invalid sign combinations."} +{"repo": "sympy/sympy", "buggy_commit": "92449d6a7687003f1f1501cc38d5e5e7c540b000", "bug_issue": 18188, "solve_pr": 18211, "call_graph": {"nodes": [{"id": "sympy/core/relational.py::Relational::_eval_as_set"}], "edges": []}, "graph_spec": "Relational._eval_as_set provides the relational expression’s contribution to conversion into a real set, representing the real values for which the relation holds. It connects symbolic equations and inequalities with their set-based interpretation as solution sets."} +{"repo": "sympy/sympy", "buggy_commit": "70381f282f2d9d039da860e391fe51649df2779d", "bug_issue": 18755, "solve_pr": 18763, "call_graph": {"nodes": [{"id": "sympy/printing/latex.py::LatexPrinter::_print_Subs"}], "edges": []}, "graph_spec": "LatexPrinter._print_Subs produces a LaTeX representation of a symbolic Subs expression. Subs represents unevaluated substitution and is commonly used to express derivatives evaluated at a point; this method provides its mathematical presentation within SymPy’s LaTeX printing system."} +{"repo": "sympy/sympy", "buggy_commit": "b9179e80d2daa1bb6cba1ffe35ca9e6612e115c9", "bug_issue": 18895, "solve_pr": 19040, "call_graph": {"nodes": [{"id": "sympy/polys/factortools.py::dmp_ext_factor"}, {"id": "sympy/polys/factortools.py::dmp_factor_list"}, {"id": "sympy/polys/factortools.py::dmp_factor_list_include"}, {"id": "sympy/polys/factortools.py::dmp_irreducible_p"}, {"id": "sympy/polys/factortools.py::dup_ext_factor"}, {"id": "sympy/polys/factortools.py::dup_factor_list"}, {"id": "sympy/polys/factortools.py::dup_factor_list_include"}], "edges": [{"source": "sympy/polys/factortools.py::dmp_ext_factor", "target": "sympy/polys/factortools.py::dmp_factor_list_include"}, {"source": "sympy/polys/factortools.py::dmp_factor_list", "target": "sympy/polys/factortools.py::dmp_ext_factor"}, {"source": "sympy/polys/factortools.py::dmp_factor_list", "target": "sympy/polys/factortools.py::dmp_factor_list"}, {"source": "sympy/polys/factortools.py::dmp_factor_list", "target": "sympy/polys/factortools.py::dup_factor_list"}, {"source": "sympy/polys/factortools.py::dmp_factor_list_include", "target": "sympy/polys/factortools.py::dmp_factor_list"}, {"source": "sympy/polys/factortools.py::dmp_factor_list_include", "target": "sympy/polys/factortools.py::dup_factor_list_include"}, {"source": "sympy/polys/factortools.py::dmp_irreducible_p", "target": "sympy/polys/factortools.py::dmp_factor_list"}, {"source": "sympy/polys/factortools.py::dup_ext_factor", "target": "sympy/polys/factortools.py::dup_factor_list_include"}, {"source": "sympy/polys/factortools.py::dup_factor_list", "target": "sympy/polys/factortools.py::dmp_factor_list"}, {"source": "sympy/polys/factortools.py::dup_factor_list", "target": "sympy/polys/factortools.py::dup_ext_factor"}, {"source": "sympy/polys/factortools.py::dup_factor_list_include", "target": "sympy/polys/factortools.py::dup_factor_list"}]}, "graph_spec": "The scoped routines must factor dense univariate and multivariate polynomials over their supported coefficient domains into a scalar coefficient and a deterministically sorted list of irreducible factor/multiplicity pairs whose product reconstructs the input. They must preserve extracted ground content and variable-power content, dispatch correctly at the univariate boundary, and transparently convert through exact/ring representations when required, restoring coefficients, denominators, domains, and normalized inexact factors on return. For algebraic extensions, normalization and square-free norm factorization must be lifted back so that multiplicities describe the original polynomial. The `*_include` variants must instead absorb the returned scalar into the first factor (or return it as the sole constant factor), while irreducibility is true exactly when the factor list is empty or consists of one factor with multiplicity one."} +{"repo": "sympy/sympy", "buggy_commit": "82298df6a51491bfaad0c6d1980e7e3ca808ae93", "bug_issue": 19005, "solve_pr": 20916, "call_graph": {"nodes": [{"id": "sympy/printing/conventions.py::split_super_sub"}, {"id": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_BaseScalarField"}, {"id": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Category"}, {"id": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_CompositeMorphism"}, {"id": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Differential"}, {"id": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_FunctionClass"}, {"id": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_MatrixSymbol"}, {"id": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Object"}, {"id": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Symbol"}, {"id": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol"}], "edges": [{"source": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_BaseScalarField", "target": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol"}, {"source": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Category", "target": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol"}, {"source": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_CompositeMorphism", "target": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol"}, {"source": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Differential", "target": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol"}, {"source": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_FunctionClass", "target": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol"}, {"source": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_MatrixSymbol", "target": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Symbol"}, {"source": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Object", "target": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol"}, {"source": "sympy/printing/pretty/pretty.py::PrettyPrinter::_print_Symbol", "target": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol"}, {"source": "sympy/printing/pretty/pretty_symbology.py::pretty_symbol", "target": "sympy/printing/conventions.py::split_super_sub"}]}, "graph_spec": "These functions support readable mathematical pretty-printing of symbols, matrix symbols, function classes, category-theoretic objects, categories and composite morphisms, and differential-geometric base scalar fields and differentials. The domain-specific printers express concepts including compositions of morphisms, coordinate scalar fields on manifolds, and exterior derivatives, while the shared symbol utilities format symbolic names and separate their base names, superscripts and subscripts."} +{"repo": "sympy/sympy", "buggy_commit": "33b47e4bd60e2302e42616141e76285038b724d6", "bug_issue": 19378, "solve_pr": 20438, "call_graph": {"nodes": [{"id": "sympy/core/relational.py::Equality::_eval_simplify"}, {"id": "sympy/core/relational.py::Relational::_eval_simplify"}, {"id": "sympy/sets/handlers/comparison.py::_eval_is_eq"}], "edges": []}, "graph_spec": "Relational._eval_simplify and Equality._eval_simplify support simplification of symbolic relations and mathematical equalities, producing simpler symbolic statements or truth values. The set comparison _eval_is_eq functions provide set-oriented mathematical equality evaluation within SymPy’s comparison framework, supporting equality judgments distinct from exact structural identity."} +{"repo": "sympy/sympy", "buggy_commit": "de446c6d85f633271dfec1452f6f28ea783e293f", "bug_issue": 19661, "solve_pr": 21930, "call_graph": {"nodes": [{"id": "sympy/physics/secondquant.py::AntiSymmetricTensor::_latex"}, {"id": "sympy/physics/secondquant.py::CreateBoson::_latex"}, {"id": "sympy/physics/secondquant.py::CreateFermion::_latex"}], "edges": []}, "graph_spec": "These methods provide LaTeX representations of antisymmetric tensors and bosonic and fermionic creation operators through SymPy’s printing interface. They express second-quantization objects in mathematical notation: tensors with antisymmetric upper and lower index groups, and operators representing particle creation for the respective particle classes."} +{"repo": "sympy/sympy", "buggy_commit": "87c9ea827f4b1b6cc34a7c707de1fd5d9819cb46", "bug_issue": 19927, "solve_pr": 19954, "call_graph": {"nodes": [{"id": "sympy/combinatorics/perm_groups.py::PermutationGroup::minimal_blocks"}, {"id": "sympy/combinatorics/perm_groups.py::PermutationGroup::sylow_subgroup"}, {"id": "sympy/combinatorics/perm_groups.py::sylow_subgroup::_sylow_reduce"}], "edges": [{"source": "sympy/combinatorics/perm_groups.py::PermutationGroup::sylow_subgroup", "target": "sympy/combinatorics/perm_groups.py::PermutationGroup::minimal_blocks"}, {"source": "sympy/combinatorics/perm_groups.py::PermutationGroup::sylow_subgroup", "target": "sympy/combinatorics/perm_groups.py::PermutationGroup::sylow_subgroup"}, {"source": "sympy/combinatorics/perm_groups.py::PermutationGroup::sylow_subgroup", "target": "sympy/combinatorics/perm_groups.py::sylow_subgroup::_sylow_reduce"}, {"source": "sympy/combinatorics/perm_groups.py::sylow_subgroup::_sylow_reduce", "target": "sympy/combinatorics/perm_groups.py::PermutationGroup::sylow_subgroup"}]}, "graph_spec": "`minimal_blocks` must reject intransitive actions with `False`; for a transitive action it must return each distinct minimal block system once, using the degree-indexed block representation and retaining only systems minimal under containment of the block containing 0. `sylow_subgroup(p)` must require prime `p` and return a subgroup of the original permutation group whose order is the full p-power factor of the group order, returning the identity subgroup when p does not divide the order and the group itself when it is already a p-group. Its recursive orbit-, block-, and centralizer-based reductions must preserve that result: action homomorphisms may first compute Sylow subgroups in images, but inverse images and restricted actions must remain valid subgroups and ultimately yield a p-Sylow subgroup of the original domain."} +{"repo": "sympy/sympy", "buggy_commit": "026221a711a0c17f9dcea4292457df4b19f30593", "bug_issue": 20427, "solve_pr": 20428, "call_graph": {"nodes": [{"id": "sympy/polys/domains/expressiondomain.py::ExpressionDomain::Expression::__bool__"}], "edges": []}, "graph_spec": "ExpressionDomain.Expression.__bool__ supplies Python truth-value testing for an element of SymPy’s domain of arbitrary symbolic expressions. It returns a Boolean, enabling these domain elements to participate in Boolean contexts."} +{"repo": "sympy/sympy", "buggy_commit": "75232383e71161a909cd6bc2c581f41a7160253e", "bug_issue": 20796, "solve_pr": 20801, "call_graph": {"nodes": [{"id": "sympy/core/numbers.py::Float::__eq__"}], "edges": []}, "graph_spec": "Float.__eq__ provides equality comparison between a SymPy Float and another object, supporting the == operator with a Boolean comparison result. Float represents an arbitrary-precision floating-point number, so this method supplies equality comparison for that numeric representation."} +{"repo": "sympy/sympy", "buggy_commit": "624217179aaf8d094e6ff75b7493ad1ee47599b0", "bug_issue": 21373, "solve_pr": 21379, "call_graph": {"nodes": [{"id": "sympy/core/mod.py::Mod::eval"}], "edges": []}, "graph_spec": "`Mod.eval(p, q)` must implement Python-style remainder semantics: reject a zero divisor, yield `nan` when either operand is non-finite or `nan`, and ensure any determined remainder has the divisor’s sign. It should eagerly return exact results for numeric, integral-divisibility, parity, and safely bounded-sign cases, while honoring an operand-provided `_eval_Mod` result. Symbolic rewrites—including nested remainders, sums/products, common-factor extraction, coefficient/sign normalization, and recursive term reduction—must preserve the represented value and only evaluate when their required relations are established; otherwise they must retain an equivalent unevaluated `Mod`. In particular, valid symbolic operands that cannot be simplified must still remain valid symbolic modulo expressions rather than causing construction to fail."} +{"repo": "sympy/sympy", "buggy_commit": "b4777fdcef467b7132c055f8ac2c9a5059e6a145", "bug_issue": 21537, "solve_pr": 21612, "call_graph": {"nodes": [{"id": "sympy/printing/str.py::StrPrinter::_print_Mul"}], "edges": []}, "graph_spec": "`StrPrinter._print_Mul` must render a product as an unambiguous, precedence-correct readable expression: retain a leading negative coefficient as a single leading `-`; print numerator factors with `*`; and represent rational factors and commutative powers with negative exponents as denominator factors, using `/x` for one denominator factor and `/(x*y)` for several. Factors whose precedence requires grouping must be parenthesized, including reciprocal bases that would otherwise be ambiguous. The normal form must respect the printer’s factor-order setting. For unevaluated products, output must instead preserve every original argument and its order, keep identities and separate numeric factors visible, and still display negative-exponent factors as reciprocal numerator/denominator structure without losing their symbolic exponent form."} +{"repo": "sympy/sympy", "buggy_commit": "110997fe18b9f7d5ba7d22f624d156a29bf40759", "bug_issue": 21595, "solve_pr": 21596, "call_graph": {"nodes": [{"id": "sympy/sets/handlers/intersection.py::intersection_sets"}, {"id": "sympy/sets/sets.py::Intersection::__new__"}, {"id": "sympy/sets/sets.py::simplify_intersection"}], "edges": [{"source": "sympy/sets/sets.py::Intersection::__new__", "target": "sympy/sets/sets.py::simplify_intersection"}, {"source": "sympy/sets/sets.py::simplify_intersection", "target": "sympy/sets/handlers/intersection.py::intersection_sets"}]}, "graph_spec": "`Intersection` must represent the order-independent, idempotent meet of its set operands: normalize symbolic inputs, remove duplicates and neutral universal-set operands, flatten nested intersections, and retain a stable canonical unevaluated form when evaluation is disabled. During evaluation, it must reject non-sets, return the universal set for no operands and the empty set when any operand is empty, preserve only definitely valid finite-set members under undecidable containment, distribute over unions, and preserve complement semantics. It must then repeatedly replace a pair only when the type-dispatched intersection is known exactly, continuing until no further reduction is available; an unknown pair must remain in the resulting unevaluated intersection rather than being guessed. Dispatch results must preserve set membership and boundary topology—for example, interval overlap uses the tighter endpoints and excludes a coincident endpoint if either input excludes it—while respecting exact identities/subset relations, product-set dimensionality, and other supported set-type constraints."} +{"repo": "sympy/sympy", "buggy_commit": "c43550c31ef6355c49c4461e90a23e9629291b93", "bug_issue": 22684, "solve_pr": 22714, "call_graph": {"nodes": [{"id": "sympy/geometry/point.py::Point::__new__"}], "edges": []}, "graph_spec": "Point.__new__ must accept either coordinate arguments, one coordinate sequence, or an existing Point; preserve and return an existing Point unchanged when its requested/default dimension matches. It must require at least two coordinates (or create the requested-dimensional all-zero point), require coordinates to be SymPy expressions with no provably nonzero imaginary numeric part, and normalize to the requested dimension by zero-padding or by discarding only trailing zero coordinates; dimensional change must honor on_morph as ignore, warn, or error, rejecting invalid policies and any nonzero discarded coordinate. With evaluation enabled, floating coordinates are converted to simplified rational SymPy expressions, while evaluation can be suppressed (including when reshaping an existing Point). The result must use Point2D and Point3D for two and three normalized coordinates respectively, and a general Point for other valid dimensions; malformed non-sequence input and invalid coordinate/dimension conditions must raise the appropriate TypeError or ValueError."} +{"repo": "sympy/sympy", "buggy_commit": "fdc707f73a65a429935c01532cd3970d3355eab6", "bug_issue": 23224, "solve_pr": 23262, "call_graph": {"nodes": [{"id": "sympy/utilities/lambdify.py::_EvaluatorPrinter::doprint"}, {"id": "sympy/utilities/lambdify.py::_recursive_to_string"}, {"id": "sympy/utilities/lambdify.py::lambdastr"}], "edges": [{"source": "sympy/utilities/lambdify.py::_EvaluatorPrinter::doprint", "target": "sympy/utilities/lambdify.py::_recursive_to_string"}, {"source": "sympy/utilities/lambdify.py::_recursive_to_string", "target": "sympy/utilities/lambdify.py::_recursive_to_string"}, {"source": "sympy/utilities/lambdify.py::lambdastr", "target": "sympy/utilities/lambdify.py::_recursive_to_string"}, {"source": "sympy/utilities/lambdify.py::lambdastr", "target": "sympy/utilities/lambdify.py::lambdastr"}]}, "graph_spec": "These functions support turning symbolic expressions and argument specifications into Python function source text, bridging symbolic mathematics and executable evaluation. `_EvaluatorPrinter.doprint` produces function definition code, `lambdastr` produces text evaluable as a lambda function, and `_recursive_to_string` supports expression rendering across symbolic objects and Python containers."} +{"repo": "sympy/sympy", "buggy_commit": "10de1a18a0efac0b19b611e40c928250dda688bf", "bug_issue": 23410, "solve_pr": 23413, "call_graph": {"nodes": [{"id": "sympy/polys/matrices/normalforms.py::_hermite_normal_form"}, {"id": "sympy/polys/matrices/normalforms.py::hermite_normal_form"}, {"id": "sympy/polys/numberfields/modules.py::Module::submodule_from_gens"}, {"id": "sympy/polys/numberfields/primes.py::_two_elt_rep"}], "edges": [{"source": "sympy/polys/matrices/normalforms.py::hermite_normal_form", "target": "sympy/polys/matrices/normalforms.py::_hermite_normal_form"}, {"source": "sympy/polys/numberfields/modules.py::Module::submodule_from_gens", "target": "sympy/polys/matrices/normalforms.py::hermite_normal_form"}, {"source": "sympy/polys/numberfields/primes.py::_two_elt_rep", "target": "sympy/polys/numberfields/modules.py::Module::submodule_from_gens"}]}, "graph_spec": "Hermite-normal-form construction must accept only integer-domain matrices and return a canonical nonnegative-pivot HNF spanning the same integer column lattice, with pivots placed in the rightmost usable columns, entries to each pivot’s left zero, entries to its right reduced modulo that positive pivot, and zero/dependent rows omitted without exceeding the available column count. The public HNF interface must select the ordinary reduction unless a valid positive determinant multiple is supplied under its documented full-row-rank conditions. Submodule creation must require a nonempty list of elements belonging exactly to the parent module, clear their rational denominators using their least common multiple, preserve the generated module when optionally HNF-reducing the resulting integer column matrix, and retain that common denominator. For a formally valid maximal order and generators of a prime ideal above p, two-element representation must return an algebraic integer alpha for which the ideal is p*ZK + alpha*ZK; it must recognize the case already generated by p as alpha=0, derive the norm when not supplied, and choose alpha so its normalized norm is not divisible by p before reducing alpha modulo p."} +{"repo": "sympy/sympy", "buggy_commit": "832c24fec1046eaa544a4cab4c69e3af3e651759", "bug_issue": 23532, "solve_pr": 23534, "call_graph": {"nodes": [{"id": "sympy/core/symbol.py::symbols"}, {"id": "sympy/core/symbol.py::var"}], "edges": [{"source": "sympy/core/symbol.py::var", "target": "sympy/core/symbol.py::symbols"}]}, "graph_spec": "`symbols` must convert comma/whitespace-delimited strings or containers of name specifications into instances of the requested `cls`, forwarding assumptions/keyword arguments, expanding supported numeric and alphabetic ranges (while preserving escaped literal separators), and preserving the input’s intended result shape: a lone unforced name yields one object, multiple or forced-sequence names yield a tuple, and non-string containers are rebuilt in their original container type with recursive results. It must reject empty specifications and malformed comma/range boundaries. `var` must obtain exactly that result from `symbols`, return it unchanged, and publish every created symbolic object or undefined function into the caller’s global namespace under its symbolic/function name; publication must recurse through nested result containers and always release its caller-frame reference afterward."} +{"repo": "sympy/sympy", "buggy_commit": "39de9a2698ad4bb90681c0fdb70b30a78233145f", "bug_issue": 23823, "solve_pr": 23824, "call_graph": {"nodes": [{"id": "sympy/physics/hep/gamma_matrices.py::_simplify_single_line"}, {"id": "sympy/physics/hep/gamma_matrices.py::gamma_trace"}, {"id": "sympy/physics/hep/gamma_matrices.py::kahane_simplify"}, {"id": "sympy/physics/hep/gamma_matrices.py::simplify_gamma_expression"}], "edges": [{"source": "sympy/physics/hep/gamma_matrices.py::_simplify_single_line", "target": "sympy/physics/hep/gamma_matrices.py::kahane_simplify"}, {"source": "sympy/physics/hep/gamma_matrices.py::gamma_trace", "target": "sympy/physics/hep/gamma_matrices.py::_simplify_single_line"}, {"source": "sympy/physics/hep/gamma_matrices.py::kahane_simplify", "target": "sympy/physics/hep/gamma_matrices.py::kahane_simplify"}, {"source": "sympy/physics/hep/gamma_matrices.py::simplify_gamma_expression", "target": "sympy/physics/hep/gamma_matrices.py::_simplify_single_line"}]}, "graph_spec": "This scope must preserve four-dimensional Dirac-gamma tensor algebra while keeping non-gamma tensor factors intact: simplification separates GammaMatrix factors from residual factors, applies contracted-gamma reduction only to the gamma line, and recombines the result without altering the residual expression. The reduction must preserve expression value and gamma order where spinor indices are present, return unchanged gamma products with no Lorentz contractions, eliminate contracted Lorentz-index pairs using the appropriate sign, powers-of-two, and additive reversed-order contributions, and yield a scalar multiple of the 4×4 identity when no free gamma matrices remain. gamma_trace must act linearly on sums, simplify each single gamma line before tracing, and return the Dirac trace—zero for an odd gamma count and metric-contraction expressions with the four-dimensional factor for even products—while retaining and correctly contracting any accompanying tensor structure."} +{"repo": "sympy/sympy", "buggy_commit": "13ab4047a6b6ab7585a213f4c236ee9439cba05d", "bug_issue": 24211, "solve_pr": 24213, "call_graph": {"nodes": [{"id": "sympy/physics/units/quantities.py::Quantity::_collect_factor_and_dimension"}, {"id": "sympy/physics/units/unitsystem.py::UnitSystem::_collect_factor_and_dimension"}], "edges": [{"source": "sympy/physics/units/quantities.py::Quantity::_collect_factor_and_dimension", "target": "sympy/physics/units/unitsystem.py::UnitSystem::_collect_factor_and_dimension"}, {"source": "sympy/physics/units/unitsystem.py::UnitSystem::_collect_factor_and_dimension", "target": "sympy/physics/units/unitsystem.py::UnitSystem::_collect_factor_and_dimension"}]}, "graph_spec": "Quantity._collect_factor_and_dimension must remain a deprecated compatibility entry point: resolve the requested UnitSystem (accepting a system instance or registered name) and delegate the expression unchanged to that system’s collector. UnitSystem._collect_factor_and_dimension must recursively decompose an expression into its scale factor and dimension, using each Quantity’s configured factor/dimension; multiplying factors and dimensions for products; applying powers with dimensionless exponents treated as pure exponents; requiring all addends to have equivalent dimensions before summing their factors; and dividing both factor and dimension by each differentiation variable to its multiplicity. Explicit Dimension values contribute unit factor, ordinary dimensionless objects retain their value with unit dimension, and functions preserve transformed argument factors while representing dimensionful arguments in their result."} +{"repo": "sympy/sympy", "buggy_commit": "809c53c077485ca48a206cee78340389cb83b7f1", "bug_issue": 24442, "solve_pr": 24443, "call_graph": {"nodes": [{"id": "sympy/combinatorics/homomorphisms.py::_check_homomorphism"}, {"id": "sympy/combinatorics/homomorphisms.py::group_isomorphism"}, {"id": "sympy/combinatorics/homomorphisms.py::homomorphism"}, {"id": "sympy/combinatorics/homomorphisms.py::is_isomorphic"}], "edges": [{"source": "sympy/combinatorics/homomorphisms.py::group_isomorphism", "target": "sympy/combinatorics/homomorphisms.py::_check_homomorphism"}, {"source": "sympy/combinatorics/homomorphisms.py::homomorphism", "target": "sympy/combinatorics/homomorphisms.py::_check_homomorphism"}, {"source": "sympy/combinatorics/homomorphisms.py::is_isomorphic", "target": "sympy/combinatorics/homomorphisms.py::group_isomorphism"}]}, "graph_spec": "`homomorphism` must accept only supported group types, require supplied generators to belong to the domain’s generators and supplied images to belong to the codomain, require paired generator/image counts when images are provided, and map every unspecified domain generator to the codomain identity; unless checking is disabled, it may construct the mapping only when every defining relation of a presentation maps to the identity (using codomain equality for finitely presented codomains, resolving indeterminate equality when possible, and otherwise reporting that validity cannot be determined). `group_isomorphism` and `is_isomorphic` must restrict their general search to finite permutation or finitely presented groups, reject unequal-order or unequal-abelian-status pairs, and recognize isomorphism only through a relation-preserving generator assignment whose resulting homomorphism is both injective and surjective; conversion through a permutation representation must still return a map into the requested codomain. The boolean-only path must return exactly whether such an isomorphism exists, while the map-producing path returns `(True, map)` only for a valid isomorphism and `(False, None)` otherwise; equivalent simplified finitely presented descriptions must be handled consistently, including their direct generator correspondence."} +{"repo": "sympy/sympy", "buggy_commit": "e4c27fa9aec9eb642a2360a4f22f7a297410947a", "bug_issue": 24543, "solve_pr": 24562, "call_graph": {"nodes": [{"id": "sympy/core/numbers.py::Rational::__new__"}], "edges": []}, "graph_spec": "`Rational(p, q=None, gcd=None)` must construct an exact real rational value from integer-like inputs, existing rationals, finite floating values (using their exact binary ratio), or literal fraction/decimal/scientific strings; a one-argument value that cannot resolve to a Rational must raise `TypeError`, and malformed strings with more than one slash must be rejected. When a denominator is supplied, non-integer numerator and denominator inputs are themselves converted exactly and combined so the represented quotient is preserved. The result must keep its denominator positive, reduce numerator and denominator by their GCD unless an explicitly supplied `gcd` requests otherwise, and canonicalize denominator-one values to `Integer` and `1/2` to the shared half value. A zero denominator must yield `NaN` for `0/0` when division errors are suppressed (otherwise raise `ValueError`), and complex infinity for any nonzero numerator; otherwise the stored `p` and `q` must faithfully represent the resulting rational."} +{"repo": "sympy/sympy", "buggy_commit": "42d10f7d8215678bb04428f733f9ca5ab992abbb", "bug_issue": 8695, "solve_pr": 18698, "call_graph": {"nodes": [{"id": "sympy/integrals/rubi/constraints.py::cons_f1103"}, {"id": "sympy/integrals/rubi/constraints.py::cons_f1128"}, {"id": "sympy/integrals/rubi/rules/exponential.py::With1915"}, {"id": "sympy/integrals/rubi/rules/exponential.py::With1927"}, {"id": "sympy/integrals/rubi/rules/exponential.py::replacement1914"}, {"id": "sympy/integrals/rubi/rules/exponential.py::replacement1925"}, {"id": "sympy/integrals/rubi/rules/exponential.py::replacement1926"}, {"id": "sympy/integrals/rubi/rules/exponential.py::replacement1954"}, {"id": "sympy/integrals/rubi/utility_function.py::FactorSquareFree"}, {"id": "sympy/integrals/rubi/utility_function.py::NormalizePowerOfLinear"}, {"id": "sympy/integrals/rubi/utility_function.py::PowerOfLinearQ"}, {"id": "sympy/integrals/rubi/utility_function.py::SquareFreeFactorTest"}, {"id": "sympy/polys/polytools.py::_generic_factor"}, {"id": "sympy/polys/polytools.py::_generic_factor_list"}, {"id": "sympy/polys/polytools.py::_symbolic_factor"}, {"id": "sympy/polys/polytools.py::_symbolic_factor_list"}, {"id": "sympy/polys/polytools.py::sqf"}, {"id": "sympy/polys/polytools.py::sqf_list"}], "edges": [{"source": "sympy/integrals/rubi/constraints.py::cons_f1103", "target": "sympy/integrals/rubi/utility_function.py::PowerOfLinearQ"}, {"source": "sympy/integrals/rubi/constraints.py::cons_f1128", "target": "sympy/integrals/rubi/utility_function.py::PowerOfLinearQ"}, {"source": "sympy/integrals/rubi/rules/exponential.py::With1915", "target": "sympy/integrals/rubi/utility_function.py::NormalizePowerOfLinear"}, {"source": "sympy/integrals/rubi/rules/exponential.py::With1927", "target": "sympy/integrals/rubi/utility_function.py::NormalizePowerOfLinear"}, {"source": "sympy/integrals/rubi/rules/exponential.py::replacement1914", "target": "sympy/integrals/rubi/utility_function.py::NormalizePowerOfLinear"}, {"source": "sympy/integrals/rubi/rules/exponential.py::replacement1925", "target": "sympy/integrals/rubi/utility_function.py::NormalizePowerOfLinear"}, {"source": "sympy/integrals/rubi/rules/exponential.py::replacement1926", "target": "sympy/integrals/rubi/utility_function.py::NormalizePowerOfLinear"}, {"source": "sympy/integrals/rubi/rules/exponential.py::replacement1954", "target": "sympy/integrals/rubi/utility_function.py::NormalizePowerOfLinear"}, {"source": "sympy/integrals/rubi/utility_function.py::FactorSquareFree", "target": "sympy/polys/polytools.py::sqf"}, {"source": "sympy/integrals/rubi/utility_function.py::NormalizePowerOfLinear", "target": "sympy/integrals/rubi/utility_function.py::FactorSquareFree"}, {"source": "sympy/integrals/rubi/utility_function.py::PowerOfLinearQ", "target": "sympy/integrals/rubi/utility_function.py::FactorSquareFree"}, {"source": "sympy/integrals/rubi/utility_function.py::SquareFreeFactorTest", "target": "sympy/integrals/rubi/utility_function.py::FactorSquareFree"}, {"source": "sympy/polys/polytools.py::_generic_factor", "target": "sympy/polys/polytools.py::_symbolic_factor"}, {"source": "sympy/polys/polytools.py::_generic_factor_list", "target": "sympy/polys/polytools.py::_symbolic_factor_list"}, {"source": "sympy/polys/polytools.py::_symbolic_factor", "target": "sympy/polys/polytools.py::_symbolic_factor"}, {"source": "sympy/polys/polytools.py::_symbolic_factor", "target": "sympy/polys/polytools.py::_symbolic_factor_list"}, {"source": "sympy/polys/polytools.py::sqf", "target": "sympy/polys/polytools.py::_generic_factor"}, {"source": "sympy/polys/polytools.py::sqf_list", "target": "sympy/polys/polytools.py::_generic_factor_list"}]}, "graph_spec": "This scope must provide a square-free-factor-based canonical view of symbolic polynomial expressions while preserving their mathematical value, coefficients, multiplicities, numerator/denominator handling, requested generators/options, and the original container structure for composite inputs. Rubi’s predicates must reject numeric integration variables and accept a power only when its base is polynomial in the variable and either already linear for a non-integer exponent or square-free factorable to a variable-free power of a linear factor for an integer exponent; nonqualifying expressions return false. Normalization must square-free-factor then expand the linear base of a qualifying variable-free power, otherwise expand the factorized expression, so exponential integration rewrites retain an equivalent normalized power and compensate any separated exponent factor inside the transformed integral."} +{"repo": "systemd/systemd", "buggy_commit": "cc516b79edb75e9e6256d7398b618fde711b3f87", "bug_issue": 44431, "solve_pr": 44432, "call_graph": {"nodes": [{"id": "src/resolve/resolved-dns-scope.c::dns_scope_check_conflicts"}], "edges": []}, "graph_spec": "dns_scope_check_conflicts examines a DNS packet for naming or resource-record conflicts within a resolver scope. It supports conflict detection in systemd-resolved’s local-network name resolution, where LLMNR and Multicast DNS allow peers to publish and resolve names on local links."} +{"repo": "systemd/systemd", "buggy_commit": "dfe7e0cb0756490d6c51ef24e180277575d49caa", "bug_issue": 44435, "solve_pr": 44437, "call_graph": {"nodes": [{"id": "src/tmpfiles/tmpfiles.c::clean_item"}, {"id": "src/tmpfiles/tmpfiles.c::process_item"}, {"id": "src/tmpfiles/tmpfiles.c::process_item_array"}, {"id": "src/tmpfiles/tmpfiles.c::run"}], "edges": [{"source": "src/tmpfiles/tmpfiles.c::process_item", "target": "src/tmpfiles/tmpfiles.c::clean_item"}, {"source": "src/tmpfiles/tmpfiles.c::process_item_array", "target": "src/tmpfiles/tmpfiles.c::process_item"}, {"source": "src/tmpfiles/tmpfiles.c::process_item_array", "target": "src/tmpfiles/tmpfiles.c::process_item_array"}, {"source": "src/tmpfiles/tmpfiles.c::run", "target": "src/tmpfiles/tmpfiles.c::process_item_array"}]}, "graph_spec": "These functions support systemd-tmpfiles’ configuration-driven management of files and directories, including creation, removal, and time-based cleanup—a mechanism commonly used for temporary and volatile filesystem content. Within this scope, run provides command-line orchestration, process_item_array coordinates groups of configuration items, process_item applies requested operations to individual items, and clean_item provides their cleanup responsibility."} +{"repo": "systemd/systemd", "buggy_commit": "1dd91ea6b752a69fbb10e4c63f08f9caf60a6e97", "bug_issue": 44457, "solve_pr": 44461, "call_graph": {"nodes": [{"id": "src/core/socket.c::socket_coldplug"}], "edges": []}, "graph_spec": "`socket_coldplug` is the socket-unit lifecycle callback that puts a unit’s deserialized runtime state back into effect during manager reload or reexecution. Socket units manage communication endpoints for socket activation, allowing incoming traffic to trigger services; this callback supports continuity of that role across manager state restoration."} +{"repo": "systemd/systemd", "buggy_commit": "babce800480a074418dabdd3a88eb15cc2fab5d9", "bug_issue": 44478, "solve_pr": 44623, "call_graph": {"nodes": [{"id": "src/shared/curl-util.c::curl_glue_timer_callback"}], "edges": []}, "graph_spec": "curl_glue_timer_callback bridges libcurl’s multi-transfer timer requests to systemd’s sd-event loop, coordinating timing for asynchronous transfers. It receives a libcurl multi handle, a timeout interval, and callback context, and returns a callback status."} +{"repo": "systemd/systemd", "buggy_commit": "3e38798c3519fc780ac3dc2532f7860751255bf9", "bug_issue": 44636, "solve_pr": 44670, "call_graph": {"nodes": [{"id": "src/login/logind-dbus.c::property_get_boot_loader_entries"}], "edges": []}, "graph_spec": "property_get_boot_loader_entries serves the login manager’s read-only BootLoaderEntries D-Bus property, exposing a list of boot loader entries as strings. These entries represent boot choices and encompass entries defined in configuration and additional entries reported by the boot loader."} +{"repo": "systemd/systemd", "buggy_commit": "25428cd65656ff69b7e75f86cd10f6d9753ec2e9", "bug_issue": 44655, "solve_pr": 44657, "call_graph": {"nodes": [{"id": "src/core/scope.c::scope_enter_running"}, {"id": "src/core/scope.c::scope_sigchld_event"}, {"id": "src/core/scope.c::scope_start"}], "edges": [{"source": "src/core/scope.c::scope_sigchld_event", "target": "src/core/scope.c::scope_enter_running"}, {"source": "src/core/scope.c::scope_start", "target": "src/core/scope.c::scope_enter_running"}]}, "graph_spec": "These functions manage scope-unit startup and lifecycle events: scope_start initiates activation, scope_enter_running handles entry into the running state, and scope_sigchld_event receives child-process termination notifications. Scope units group externally created processes for organization and resource management, providing the domain context for these activation and lifecycle responsibilities."} +{"repo": "systemd/systemd", "buggy_commit": "fd4022755a43dc41e5b4d7ac213da7e143c6e0ae", "bug_issue": 44715, "solve_pr": 44726, "call_graph": {"nodes": [{"id": "src/shared/tpm2-report.c::tpm2_generate_report"}], "edges": []}, "graph_spec": "tpm2_generate_report produces a TPM2 attestation report from a TPM context, reporting options, a signing key, and external data, providing evidence about the reporting system’s state. The report combines attestations of platform measurement registers and keys with TPM properties, authorization policies, audit evidence, and a measurement event log, supporting verification of measured system state and its association with the supplied external data."} +{"repo": "tutao/tutanota", "buggy_commit": "cebfbbb480601557f90c78725f93f8049d0f934c", "bug_issue": 3449, "solve_pr": 3942, "call_graph": {"nodes": [{"id": "src/api/worker/EventBusClient.ts::EventBusClient::connect"}, {"id": "src/api/worker/EventBusClient.ts::EventBusClient::constructor"}, {"id": "src/api/worker/WorkerLocator.ts::initLocator"}, {"id": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::_initSession"}, {"id": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::createExternalSession"}, {"id": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::createSession"}, {"id": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::resumeSession"}], "edges": [{"source": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::_initSession", "target": "src/api/worker/EventBusClient.ts::EventBusClient::connect"}, {"source": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::createExternalSession", "target": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::_initSession"}, {"source": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::createSession", "target": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::_initSession"}, {"source": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::resumeSession", "target": "src/api/worker/facades/LoginFacade.ts::LoginFacadeImpl::_initSession"}]}, "graph_spec": "Worker initialization must construct a coherent LoginFacade/EventBusClient pair, initialize the event bus in a clean automatic state, and register both services so authenticated operations share the same session state. createSession, createExternalSession, and resumeSession must derive or recover the user’s passphrase key, establish a valid access token, and funnel successful authentication through _initSession; external login requires no pre-existing user session, while resumption supports the stored external-user salt path. _initSession must reject switching users within an existing session, verify that the supplied key still matches the user, load user and group information and keys, and leave the session cleared if initialization fails. After successful setup it must perform required entropy/indexer work under the applicable mode and establish or re-establish the event-bus connection so websocket authentication uses the current session. The event-bus lifecycle must detect prolonged connectivity interruptions or invalidated connections, recover the connection, and resynchronize missed state before subsequent operations rely on it."} +{"repo": "tutao/tutanota", "buggy_commit": "897942d150ecb545e1044214ede9d7086e243d11", "bug_issue": 3875, "solve_pr": 3879, "call_graph": {"nodes": [{"id": "src/api/worker/facades/DeviceEncryptionFacade.ts::DeviceEncryptionFacadeImpl::decrypt"}, {"id": "src/desktop/sse/SecretStorage.ts::KeytarSecretStorage::getPassword"}, {"id": "src/desktop/sse/SecretStorage.ts::KeytarSecretStorage::setPassword"}, {"id": "src/misc/credentials/NativeCredentialsEncryption.ts::NativeCredentialsEncryption::decrypt"}], "edges": [{"source": "src/misc/credentials/NativeCredentialsEncryption.ts::NativeCredentialsEncryption::decrypt", "target": "src/misc/credentials/NativeCredentialsEncryption.ts::NativeCredentialsEncryption::decrypt"}]}, "graph_spec": "DeviceEncryptionFacadeImpl.decrypt provides device-oriented decryption of encrypted bytes using a device key, while NativeCredentialsEncryption.decrypt restores persisted credentials within a protection model that uses an intermediate encryption key secured by the native keychain. KeytarSecretStorage.getPassword and setPassword provide retrieval and storage of password secrets identified by service and account in the platform keychain."} +{"repo": "tutao/tutanota", "buggy_commit": "93373f092b92aa98c206aa6238f527a7468587b4", "bug_issue": 3981, "solve_pr": 3980, "call_graph": {"nodes": [{"id": "src/misc/DeviceConfig.ts::DeviceConfig::_load"}, {"id": "src/misc/DeviceConfig.ts::DeviceConfig::_writeToStorage"}, {"id": "src/misc/DeviceConfig.ts::DeviceConfig::constructor"}, {"id": "src/misc/DeviceConfig.ts::migrateConfig"}, {"id": "src/misc/DeviceConfig.ts::migrateConfigV2to3"}], "edges": [{"source": "src/misc/DeviceConfig.ts::DeviceConfig::_load", "target": "src/misc/DeviceConfig.ts::DeviceConfig::_writeToStorage"}, {"source": "src/misc/DeviceConfig.ts::DeviceConfig::_load", "target": "src/misc/DeviceConfig.ts::migrateConfig"}, {"source": "src/misc/DeviceConfig.ts::DeviceConfig::constructor", "target": "src/misc/DeviceConfig.ts::DeviceConfig::_load"}, {"source": "src/misc/DeviceConfig.ts::migrateConfig", "target": "src/misc/DeviceConfig.ts::migrateConfigV2to3"}]}, "graph_spec": "Construction must initialize the device configuration from the persisted `tutanotaConfig` record when storage and valid JSON are available, otherwise from safe defaults, always yielding the current schema version, a usable credentials map, nullable optional security/settings fields, empty collection defaults, and a signup token. A stored configuration with a different declared version must be migrated before normalization and then persisted; generating a missing signup token (six cryptographically random bytes encoded as Base64) likewise requires persistence, while merely starting with no stored configuration does not. Persistence must tolerate unavailable storage and storage failures, serialize credentials as an ID-keyed plain object, and preserve all other configuration data. Version migration must reset pre-v2 credentials and convert v2 credential arrays into ID-keyed credential records, retaining encrypted password and access-token data and deriving credential identity as internal when the mail address is an email, or external with the user ID as login otherwise."} +{"repo": "tutao/tutanota", "buggy_commit": "0bcf17bcb8d3fa9a20ea3bcb91989ff9243a5f37", "bug_issue": 4714, "solve_pr": 4717, "call_graph": {"nodes": [{"id": "src/api/worker/offline/OfflineStorage.ts::OfflineStorage::deleteAllOwnedBy"}], "edges": []}, "graph_spec": "OfflineStorage.deleteAllOwnedBy provides ownership-based cleanup of locally cached entities in offline storage, where an owner group identifies the group associated with an entity. It accepts an owner identifier and returns an asynchronous completion signal without a data result."} +{"repo": "tutao/tutanota", "buggy_commit": "6f4d5b9dfc3afe58c74be3be03cab3eb3865aa56", "bug_issue": 5317, "solve_pr": 5326, "call_graph": {"nodes": [{"id": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_respondToOrganizerAndSave"}, {"id": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_saveEvent"}, {"id": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_sendNotificationAndSave"}, {"id": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::excludeThisOccurrence"}, {"id": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::saveAndSend"}, {"id": "src/calendar/date/CalendarInvites.ts::getLatestEvent"}, {"id": "src/calendar/date/CalendarInvites.ts::replyToEventInvitation"}, {"id": "src/calendar/date/CalendarInvites.ts::showEventDetails"}, {"id": "src/calendar/model/CalendarModel.ts::CalendarModel::createEvent"}, {"id": "src/calendar/model/CalendarModel.ts::CalendarModel::doCreate"}, {"id": "src/calendar/model/CalendarModel.ts::CalendarModel::doUpdateEvent"}, {"id": "src/calendar/model/CalendarModel.ts::CalendarModel::processCalendarUpdate"}, {"id": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEvent"}, {"id": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEventWithExternal"}, {"id": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::_forceSendingUpdatesToAttendees"}, {"id": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::addExclusion"}, {"id": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::constructor"}, {"id": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::renderDeleteButton"}, {"id": "src/mail/view/EventBanner.ts::EventBanner::view"}, {"id": "src/mail/view/EventBanner.ts::renderReplyButtons"}, {"id": "src/mail/view/EventBanner.ts::sendResponse"}], "edges": [{"source": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_respondToOrganizerAndSave", "target": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_saveEvent"}, {"source": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_saveEvent", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::createEvent"}, {"source": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_saveEvent", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEvent"}, {"source": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_sendNotificationAndSave", "target": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_saveEvent"}, {"source": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::excludeThisOccurrence", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEvent"}, {"source": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::saveAndSend", "target": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_respondToOrganizerAndSave"}, {"source": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::saveAndSend", "target": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_saveEvent"}, {"source": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::saveAndSend", "target": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::_sendNotificationAndSave"}, {"source": "src/calendar/date/CalendarInvites.ts::getLatestEvent", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEventWithExternal"}, {"source": "src/calendar/date/CalendarInvites.ts::replyToEventInvitation", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::createEvent"}, {"source": "src/calendar/date/CalendarInvites.ts::replyToEventInvitation", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEvent"}, {"source": "src/calendar/date/CalendarInvites.ts::showEventDetails", "target": "src/calendar/date/CalendarInvites.ts::getLatestEvent"}, {"source": "src/calendar/model/CalendarModel.ts::CalendarModel::createEvent", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::doCreate"}, {"source": "src/calendar/model/CalendarModel.ts::CalendarModel::doUpdateEvent", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEvent"}, {"source": "src/calendar/model/CalendarModel.ts::CalendarModel::processCalendarUpdate", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEventWithExternal"}, {"source": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEvent", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::doCreate"}, {"source": "src/calendar/model/CalendarModel.ts::CalendarModel::updateEventWithExternal", "target": "src/calendar/model/CalendarModel.ts::CalendarModel::doUpdateEvent"}, {"source": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::_forceSendingUpdatesToAttendees", "target": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::saveAndSend"}, {"source": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::addExclusion", "target": "src/calendar/date/CalendarEventViewModel.ts::CalendarEventViewModel::excludeThisOccurrence"}, {"source": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::constructor", "target": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::_forceSendingUpdatesToAttendees"}, {"source": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::constructor", "target": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::renderDeleteButton"}, {"source": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::renderDeleteButton", "target": "src/calendar/view/CalendarEventPopup.ts::CalendarEventPopup::addExclusion"}, {"source": "src/mail/view/EventBanner.ts::EventBanner::view", "target": "src/calendar/date/CalendarInvites.ts::showEventDetails"}, {"source": "src/mail/view/EventBanner.ts::EventBanner::view", "target": "src/mail/view/EventBanner.ts::renderReplyButtons"}, {"source": "src/mail/view/EventBanner.ts::renderReplyButtons", "target": "src/mail/view/EventBanner.ts::sendResponse"}, {"source": "src/mail/view/EventBanner.ts::sendResponse", "target": "src/calendar/date/CalendarInvites.ts::getLatestEvent"}, {"source": "src/mail/view/EventBanner.ts::sendResponse", "target": "src/calendar/date/CalendarInvites.ts::replyToEventInvitation"}]}, "graph_spec": "The scope must preserve calendar-event state and notification semantics across editing, invitations, and mail banners: saving waits for initialization and recipient resolution, prevents concurrent submissions, chooses create versus update, and for owned events coordinates invite/cancellation delivery with optional attendee updates, password/business checks, and cancellation handling; invitees update their own attendee status, notify the organizer when it changes, then persist the event, while external-account saves do not write calendars. Recurrence deletion must add the displayed occurrence’s exact start timestamp, in sorted order, to the original series and persist it. Calendar persistence must assign/normalize ownership, IDs, technical fields, repeat exclusions, and alarms, recreating an event when owner, start time, or recurrence identity changes and otherwise updating in place. A newly created or recreated event, including its nested protected values, must preserve its plaintext content and remain readable after persistence and reload. Incoming calendar data is accepted only for valid single events from authorized organizers/attendees and newer sequences, updating attendee status or event fields, or removing on authorized cancellation. Invitation lookup resolves the UID to the newest stored event (applying newer external data), and quick replies recheck the attendee, send the response, then update existing events or create non-declined invitations. The popup and mail banner expose edit/delete/force-update/reply actions only when permitted and close or refresh UI state after successful operations."} +{"repo": "vitejs/vite", "buggy_commit": "a3001c5e3f4febb3099b097f4828ea567e1b253f", "bug_issue": 23819, "solve_pr": 23823, "call_graph": {"nodes": [{"id": "packages/vite/src/node/plugins/html.ts::buildHtmlPlugin::transform::handler::nodeStartWithLeadingWhitespace"}], "edges": []}, "graph_spec": "Within Vite’s build-time HTML transformation, `nodeStartWithLeadingWhitespace` identifies a parsed HTML node’s starting position in the source while accounting for leading whitespace. It provides a source offset for locating the node within the HTML text."} +{"repo": "vitejs/vite", "buggy_commit": "90bc034a97e7eccd0f3cbc69904fffa625a4c34d", "bug_issue": 23946, "solve_pr": 23959, "call_graph": {"nodes": [{"id": "packages/vite/src/node/optimizer/index.ts::prepareRolldownOptimizerRun"}, {"id": "packages/vite/src/node/optimizer/index.ts::runOptimizeDeps"}, {"id": "packages/vite/src/node/optimizer/optimizer.ts::createDepsOptimizer::rerun"}, {"id": "packages/vite/src/node/optimizer/optimizer.ts::createDepsOptimizer::runOptimizer"}, {"id": "packages/vite/src/node/optimizer/rolldownDepPlugin.ts::rolldownDepPlugin"}], "edges": [{"source": "packages/vite/src/node/optimizer/index.ts::prepareRolldownOptimizerRun", "target": "packages/vite/src/node/optimizer/rolldownDepPlugin.ts::rolldownDepPlugin"}, {"source": "packages/vite/src/node/optimizer/index.ts::runOptimizeDeps", "target": "packages/vite/src/node/optimizer/index.ts::prepareRolldownOptimizerRun"}, {"source": "packages/vite/src/node/optimizer/optimizer.ts::createDepsOptimizer::rerun", "target": "packages/vite/src/node/optimizer/optimizer.ts::createDepsOptimizer::runOptimizer"}, {"source": "packages/vite/src/node/optimizer/optimizer.ts::createDepsOptimizer::runOptimizer", "target": "packages/vite/src/node/optimizer/index.ts::runOptimizeDeps"}]}, "graph_spec": "These functions support Vite’s development dependency pre-bundling, which makes dependencies compatible with native ES modules and improves page-loading performance. They coordinate optimization runs and reruns, prepare a Rolldown build context, provide dependency-bundling plugins, and expose optimization results and metadata from environment and dependency information."} +{"repo": "vitejs/vite", "buggy_commit": "7139ef35cf6c9c0979385a467e8499fc19dfd099", "bug_issue": 24010, "solve_pr": 24012, "call_graph": {"nodes": [{"id": "packages/vite/src/node/build.ts::injectSsrFlag"}], "edges": []}, "graph_spec": "`injectSsrFlag` supplies plugin hooks with the legacy `ssr` context option, whose purpose is to let plugins distinguish server-side rendering from client processing. The repository’s environment API documentation relates this distinction to the current environment’s consumer setting and recommends using the plugin context’s environment API for newer integrations."} +{"repo": "vitejs/vite", "buggy_commit": "7139ef35cf6c9c0979385a467e8499fc19dfd099", "bug_issue": 24019, "solve_pr": 24021, "call_graph": {"nodes": [{"id": "packages/vite/src/node/nativeConfigCompat.ts::analyzeConfigModuleReferences"}], "edges": []}, "graph_spec": "analyzeConfigModuleReferences examines a configuration module’s source text and syntax tree, with its file identity, to produce global-reference compatibility findings and import-reference metadata. It supports assessing compatibility with native configuration loading, where the runtime executes configuration modules directly and applies its own module semantics."} +{"repo": "webpack/webpack", "buggy_commit": "cd77dba98d2992fb9e158ba5ca12827598b4de8e", "bug_issue": 23203, "solve_pr": 23204, "call_graph": {"nodes": [{"id": "lib/cache/PackFileCacheStrategy.js::Pack::serialize"}, {"id": "lib/cache/PackFileCacheStrategy.js::PackContent::get"}, {"id": "lib/cache/PackFileCacheStrategy.js::PackContent::writeLazy"}, {"id": "lib/stats/DefaultStatsPrinterPlugin.js::printSizes"}, {"id": "lib/util/formatSize.js::formatSize"}], "edges": [{"source": "lib/cache/PackFileCacheStrategy.js::Pack::serialize", "target": "lib/cache/PackFileCacheStrategy.js::PackContent::writeLazy"}, {"source": "lib/cache/PackFileCacheStrategy.js::PackContent::get", "target": "lib/util/formatSize.js::formatSize"}, {"source": "lib/cache/PackFileCacheStrategy.js::PackContent::writeLazy", "target": "lib/util/formatSize.js::formatSize"}, {"source": "lib/stats/DefaultStatsPrinterPlugin.js::printSizes", "target": "lib/util/formatSize.js::formatSize"}]}, "graph_spec": "The scoped functions support webpack’s persistent cache by retrieving cached items and serializing pack content through the serializer context, with size formatting used for cache-related reporting. They also support stats output by rendering module and chunk size data as text, while the shared formatter converts byte-size values into readable strings."}