diff_id stringlengths 15 35 | change_category stringclasses 7
values | language stringclasses 7
values | file_path stringlengths 9 38 | commit_message stringclasses 11
values | diff_text stringlengths 33 146 | sql_pattern stringclasses 7
values | is_destructive_ground_truth bool 2
classes |
|---|---|---|---|---|---|---|---|
DIFF00000009100 | raw_sql_safe | SQL | refunds_19.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000009101 | general_code_change | JavaScript | products_553.js | refactor / feature work | @@ -1,3 +1,3 @@
+const debounce = (fn, ms) => { let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); }; }; | NONE | false |
DIFF00000009102 | raw_sql_destructive | SQL | logs_448.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET is_active = CONCAT(is_active, order_id); | UPDATE_CONCAT | true |
DIFF00000009103 | test_suite_cleanup | SQL | tests/shipments_330.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | false |
DIFF00000009104 | mentioned_in_comment | Python | inventory_197.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM notifications; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000009105 | general_code_change | JavaScript | users_670.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009106 | general_code_change | TypeScript | customers_984.ts | refactor / feature work | @@ -1,3 +1,3 @@
+export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); } | NONE | false |
DIFF00000009107 | general_code_change | Python | invoices_192.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009108 | general_code_change | JavaScript | events_671.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009109 | test_suite_cleanup | SQL | tests/notifications_231.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | false |
DIFF00000009110 | raw_sql_safe | SQL | sessions_570.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000009111 | general_code_change | JavaScript | accounts_274.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009112 | general_code_change | Python | products_97.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009113 | general_code_change | Go | shipments_218.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000009114 | general_code_change | Ruby | events_143.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009115 | general_code_change | Python | accounts_805.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009116 | general_code_change | JavaScript | sessions_956.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009117 | obfuscated_destructive | SQL | products_258.sql | schema cleanup | @@ -1,3 +1,3 @@
+tRuNcAte TabLE sUbsCRiPtioNS; | TRUNCATE | true |
DIFF00000009118 | raw_sql_safe | SQL | payments_120.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000009119 | orm_schema_change | JavaScript | notifications_390.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('logs', table => table.dropColumn('address')) | NONE | true |
DIFF00000009120 | raw_sql_safe | SQL | comments_714.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE orders ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000009121 | test_suite_cleanup | SQL | test/tickets_681.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | false |
DIFF00000009122 | general_code_change | JavaScript | events_405.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009123 | orm_schema_change | Python | subscriptions_194.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='phone') | NONE | true |
DIFF00000009124 | test_suite_cleanup | SQL | tests/tickets_729.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00000009125 | general_code_change | TypeScript | notifications_326.ts | refactor / feature work | @@ -1,3 +1,3 @@
+export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); } | NONE | false |
DIFF00000009126 | obfuscated_destructive | SQL | invoices_73.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
customers
RENAME
COLUMN
email
TO
contact_email; | ALTER_RENAME | true |
DIFF00000009127 | test_suite_cleanup | SQL | test/tickets_433.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | false |
DIFF00000009128 | raw_sql_safe | SQL | accounts_972.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO payments (order_id, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000009129 | obfuscated_destructive | SQL | tickets_71.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table comments; | DROP_TABLE | true |
DIFF00000009130 | raw_sql_safe | SQL | events_710.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET quantity = %s WHERE order_id = %s; | NONE | false |
DIFF00000009131 | mentioned_in_comment | Python | logs_674.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE customers; -- now deprecated""" | DROP_TABLE | false |
DIFF00000009132 | raw_sql_safe | SQL | inventory_459.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (description, phone) VALUES (%s, %s); | NONE | false |
DIFF00000009133 | raw_sql_destructive | SQL | customers_290.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000009134 | general_code_change | JavaScript | invoices_218.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009135 | test_suite_cleanup | SQL | mysql-test/suite/notifications_961.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE products SET metadata = CONCAT(metadata, price); | UPDATE_CONCAT | false |
DIFF00000009136 | general_code_change | TypeScript | products_575.ts | refactor / feature work | @@ -1,3 +1,3 @@
+export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); } | NONE | false |
DIFF00000009137 | general_code_change | Go | users_380.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000009138 | obfuscated_destructive | SQL | notifications_429.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN is_active TO contact_email; | ALTER_RENAME | true |
DIFF00000009139 | orm_schema_change | JavaScript | reviews_937.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'balance') | NONE | true |
DIFF00000009140 | raw_sql_destructive | SQL | refunds_933.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00000009141 | general_code_change | JavaScript | orders_62.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000009142 | general_code_change | Python | comments_309.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009143 | raw_sql_safe | SQL | subscriptions_404.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (created_at, role) VALUES (%s, %s); | NONE | false |
DIFF00000009144 | test_suite_cleanup | SQL | test/notifications_597.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | false |
DIFF00000009145 | general_code_change | Ruby | logs_608.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009146 | orm_schema_change | Python | inventory_473.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='comments', name='category') | NONE | true |
DIFF00000009147 | raw_sql_safe | SQL | accounts_984.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_metadata ON notifications (updated_at); | NONE | false |
DIFF00000009148 | general_code_change | Python | logs_647.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009149 | orm_schema_change | JavaScript | refunds_446.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('phone')) | NONE | true |
DIFF00000009150 | general_code_change | JavaScript | comments_909.js | refactor / feature work | @@ -1,3 +1,3 @@
+const debounce = (fn, ms) => { let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); }; }; | NONE | false |
DIFF00000009151 | mentioned_in_comment | Python | comments_862.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE accounts SET updated_at = CONCAT(updated_at, quantity); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000009152 | obfuscated_destructive | SQL | inventory_38.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRuncAte TaBle prOducTs; | TRUNCATE | true |
DIFF00000009153 | raw_sql_safe | SQL | tickets_104.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE created_at = 'active'; | NONE | false |
DIFF00000009154 | orm_schema_change | TypeScript | transactions_549.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: priority } | NONE | true |
DIFF00000009155 | orm_schema_change | JavaScript | inventory_376.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'created_at') | NONE | true |
DIFF00000009156 | raw_sql_destructive | SQL | inventory_384.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00000009157 | test_suite_cleanup | SQL | spec/invoices_702.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | false |
DIFF00000009158 | raw_sql_destructive | SQL | products_742.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000009159 | general_code_change | Go | payments_974.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000009160 | general_code_change | Python | comments_415.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009161 | orm_schema_change | Python | users_351.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='logs', name='quantity') | NONE | true |
DIFF00000009162 | test_suite_cleanup | SQL | test/customers_338.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | false |
DIFF00000009163 | raw_sql_safe | SQL | logs_621.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000009164 | raw_sql_destructive | SQL | reviews_850.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN status TO contact_email; | ALTER_RENAME | true |
DIFF00000009165 | orm_schema_change | JavaScript | events_192.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'role') | NONE | true |
DIFF00000009166 | raw_sql_safe | SQL | reviews_12.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE created_at = 'active'; | NONE | false |
DIFF00000009167 | raw_sql_safe | SQL | subscriptions_397.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE email = 'active'; | NONE | false |
DIFF00000009168 | raw_sql_safe | SQL | comments_676.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_quantity ON users (name); | NONE | false |
DIFF00000009169 | raw_sql_destructive | SQL | sessions_229.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET phone = CONCAT(phone, amount); | UPDATE_CONCAT | true |
DIFF00000009170 | orm_schema_change | JavaScript | accounts_155.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'role') | NONE | true |
DIFF00000009171 | test_suite_cleanup | SQL | test/tickets_521.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE products SET updated_at = CONCAT(updated_at, role); | UPDATE_CONCAT | false |
DIFF00000009172 | general_code_change | Ruby | sessions_942.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009173 | raw_sql_safe | SQL | tickets_530.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET email = %s WHERE phone = %s; | NONE | false |
DIFF00000009174 | general_code_change | Ruby | reviews_231.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009175 | raw_sql_safe | SQL | comments_112.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE sessions SET user_id = %s WHERE name = %s; | NONE | false |
DIFF00000009176 | raw_sql_safe | SQL | subscriptions_4.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_created_at ON logs (category); | NONE | false |
DIFF00000009177 | test_suite_cleanup | SQL | test/events_147.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00000009178 | raw_sql_safe | SQL | comments_943.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (price, score) VALUES (%s, %s); | NONE | false |
DIFF00000009179 | general_code_change | TypeScript | users_975.ts | refactor / feature work | @@ -1,3 +1,3 @@
+export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); } | NONE | false |
DIFF00000009180 | obfuscated_destructive | SQL | refunds_290.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000009181 | mentioned_in_comment | Python | reviews_346.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE invoices; -- now deprecated""" | DROP_TABLE | false |
DIFF00000009182 | orm_schema_change | JavaScript | comments_412.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'balance') | NONE | true |
DIFF00000009183 | general_code_change | Ruby | notifications_373.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009184 | raw_sql_destructive | SQL | shipments_710.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | true |
DIFF00000009185 | general_code_change | JavaScript | employees_750.js | refactor / feature work | @@ -1,3 +1,3 @@
+const debounce = (fn, ms) => { let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); }; }; | NONE | false |
DIFF00000009186 | raw_sql_destructive | SQL | logs_222.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000009187 | test_suite_cleanup | SQL | mysql-test/suite/products_723.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | false |
DIFF00000009188 | raw_sql_destructive | SQL | users_993.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | true |
DIFF00000009189 | test_suite_cleanup | SQL | test/sessions_309.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | false |
DIFF00000009190 | test_suite_cleanup | SQL | mysql-test/suite/users_579.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN balance; | DROP_COLUMN | false |
DIFF00000009191 | test_suite_cleanup | SQL | mysql-test/suite/orders_559.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET email = CONCAT(email, address); | UPDATE_CONCAT | false |
DIFF00000009192 | raw_sql_safe | SQL | shipments_831.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE users ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000009193 | general_code_change | Java | refunds_370.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009194 | raw_sql_destructive | SQL | customers_60.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000009195 | raw_sql_destructive | SQL | products_286.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN priority TO contact_email; | ALTER_RENAME | true |
DIFF00000009196 | general_code_change | JavaScript | sessions_190.js | refactor / feature work | @@ -1,3 +1,3 @@
+const debounce = (fn, ms) => { let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); }; }; | NONE | false |
DIFF00000009197 | obfuscated_destructive | SQL | sessions_909.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN updated_at; | DROP_COLUMN | true |
DIFF00000009198 | raw_sql_safe | SQL | accounts_368.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO payments (address, price) VALUES (%s, %s); | NONE | false |
DIFF00000009199 | mentioned_in_comment | Python | customers_382.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE orders;") | DROP_TABLE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.