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 |
|---|---|---|---|---|---|---|---|
DIFF00099998100 | mentioned_in_comment | Python | employees_599.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE users;") | DROP_TABLE | false |
DIFF00099998101 | obfuscated_destructive | SQL | employees_958.sql | schema cleanup | @@ -1,3 +1,3 @@
+update products set priority = concat(priority, priority); | UPDATE_CONCAT | true |
DIFF00099998102 | general_code_change | TypeScript | users_109.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 |
DIFF00099998103 | obfuscated_destructive | SQL | tickets_483.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | true |
DIFF00099998104 | mentioned_in_comment | Python | events_854.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE inventory; -- now deprecated""" | DROP_TABLE | false |
DIFF00099998105 | raw_sql_safe | SQL | employees_683.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET address = %s WHERE priority = %s; | NONE | false |
DIFF00099998106 | raw_sql_safe | SQL | notifications_764.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET description = %s WHERE order_id = %s; | NONE | false |
DIFF00099998107 | raw_sql_destructive | SQL | transactions_687.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN name TO state; | ALTER_RENAME | true |
DIFF00099998108 | general_code_change | TypeScript | logs_302.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 |
DIFF00099998109 | raw_sql_safe | SQL | logs_313.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099998110 | orm_schema_change | JavaScript | orders_730.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'order_id') | NONE | true |
DIFF00099998111 | obfuscated_destructive | SQL | orders_570.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE transactions; | DROP_TABLE | true |
DIFF00099998112 | general_code_change | JavaScript | events_682.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998113 | raw_sql_destructive | SQL | invoices_670.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN updated_at TO user_role; | ALTER_RENAME | true |
DIFF00099998114 | general_code_change | Go | comments_743.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998115 | general_code_change | Python | tickets_821.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099998116 | raw_sql_safe | SQL | logs_113.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET score = %s WHERE order_id = %s; | NONE | false |
DIFF00099998117 | general_code_change | Java | products_516.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099998118 | general_code_change | JavaScript | tickets_444.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998119 | orm_schema_change | JavaScript | inventory_498.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('priority')) | NONE | true |
DIFF00099998120 | general_code_change | Ruby | orders_536.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998121 | general_code_change | Ruby | transactions_290.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998122 | general_code_change | JavaScript | accounts_31.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 |
DIFF00099998123 | raw_sql_destructive | SQL | notifications_998.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE orders SET user_id = CONCAT(user_id, phone); | UPDATE_CONCAT | true |
DIFF00099998124 | raw_sql_safe | SQL | customers_316.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_is_active ON comments (role); | NONE | false |
DIFF00099998125 | test_suite_cleanup | SQL | test/sessions_820.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00099998126 | orm_schema_change | JavaScript | invoices_469.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'is_active') | NONE | true |
DIFF00099998127 | general_code_change | Ruby | employees_945.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998128 | orm_schema_change | Ruby | tickets_942.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :address | NONE | true |
DIFF00099998129 | raw_sql_destructive | SQL | invoices_171.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00099998130 | orm_schema_change | Ruby | logs_114.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :email | NONE | true |
DIFF00099998131 | raw_sql_safe | SQL | transactions_708.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_logs_balance ON logs (status); | NONE | false |
DIFF00099998132 | general_code_change | TypeScript | subscriptions_213.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 |
DIFF00099998133 | mentioned_in_comment | Python | invoices_134.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE employees; -- now deprecated""" | TRUNCATE | false |
DIFF00099998134 | raw_sql_destructive | SQL | accounts_245.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00099998135 | general_code_change | TypeScript | inventory_698.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 |
DIFF00099998136 | orm_schema_change | Python | notifications_726.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='notifications', name='address') | NONE | true |
DIFF00099998137 | orm_schema_change | Python | events_14.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='events', name='status') | NONE | true |
DIFF00099998138 | orm_schema_change | TypeScript | users_573.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: score } | NONE | true |
DIFF00099998139 | obfuscated_destructive | SQL | tickets_769.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
notifications
DROP
COLUMN
priority; | DROP_COLUMN | true |
DIFF00099998140 | general_code_change | Java | reviews_851.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099998141 | mentioned_in_comment | Python | subscriptions_775.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE reviews;") | TRUNCATE | false |
DIFF00099998142 | test_suite_cleanup | SQL | mysql-test/suite/orders_880.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE employees SET status = CONCAT(status, category); | UPDATE_CONCAT | false |
DIFF00099998143 | general_code_change | TypeScript | transactions_921.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 |
DIFF00099998144 | mentioned_in_comment | Python | orders_498.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE transactions DROP COLUMN balance;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099998145 | mentioned_in_comment | Python | transactions_581.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE invoices SET amount = CONCAT(amount, created_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099998146 | raw_sql_safe | SQL | logs_756.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO payments (phone, address) VALUES (%s, %s); | NONE | false |
DIFF00099998147 | mentioned_in_comment | Python | transactions_941.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM transactions;") | DELETE_UNQUALIFIED | false |
DIFF00099998148 | obfuscated_destructive | SQL | payments_934.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTEr tAbLe SeSsIoNs ReName coluMN AdDrEss to AMoUnt_ceNtS; | ALTER_RENAME | true |
DIFF00099998149 | general_code_change | Go | employees_787.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998150 | general_code_change | Ruby | payments_55.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998151 | general_code_change | Python | shipments_425.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099998152 | raw_sql_destructive | SQL | transactions_855.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN updated_at; | DROP_COLUMN | true |
DIFF00099998153 | obfuscated_destructive | SQL | logs_175.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
invoices; | DELETE_UNQUALIFIED | true |
DIFF00099998154 | general_code_change | JavaScript | notifications_868.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998155 | orm_schema_change | JavaScript | transactions_263.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('name')) | NONE | true |
DIFF00099998156 | test_suite_cleanup | SQL | mysql-test/suite/sessions_298.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | false |
DIFF00099998157 | mentioned_in_comment | Python | shipments_360.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE logs; -- now deprecated""" | TRUNCATE | false |
DIFF00099998158 | mentioned_in_comment | Python | sessions_402.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE invoices;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099998159 | test_suite_cleanup | SQL | tests/orders_196.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | false |
DIFF00099998160 | obfuscated_destructive | SQL | employees_924.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE shipments SET priority = CONCAT(priority, address); | UPDATE_CONCAT | true |
DIFF00099998161 | general_code_change | JavaScript | inventory_33.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 |
DIFF00099998162 | raw_sql_safe | SQL | shipments_18.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET order_id = %s WHERE metadata = %s; | NONE | false |
DIFF00099998163 | mentioned_in_comment | Python | customers_166.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE notifications;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099998164 | general_code_change | Go | payments_703.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998165 | general_code_change | JavaScript | refunds_5.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998166 | general_code_change | Go | products_146.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998167 | obfuscated_destructive | SQL | employees_938.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00099998168 | raw_sql_safe | SQL | comments_150.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099998169 | test_suite_cleanup | SQL | tests/logs_546.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN status TO full_name; | ALTER_RENAME | false |
DIFF00099998170 | general_code_change | Ruby | refunds_24.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998171 | general_code_change | Python | inventory_618.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099998172 | general_code_change | TypeScript | inventory_758.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 |
DIFF00099998173 | obfuscated_destructive | SQL | employees_793.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
refunds
SET
created_at
=
CONCAT(created_at,
name); | UPDATE_CONCAT | true |
DIFF00099998174 | raw_sql_destructive | SQL | subscriptions_222.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE accounts; | DROP_TABLE | true |
DIFF00099998175 | orm_schema_change | TypeScript | accounts_472.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Subscriptions { // removed field: name } | NONE | true |
DIFF00099998176 | general_code_change | Go | sessions_680.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998177 | general_code_change | Go | customers_204.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998178 | raw_sql_safe | SQL | refunds_989.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099998179 | general_code_change | Go | notifications_422.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998180 | obfuscated_destructive | SQL | products_368.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALter tABLe ORDERS rENAme COlUMn rOlE tO fUlL_naMe; | ALTER_RENAME | true |
DIFF00099998181 | raw_sql_safe | SQL | accounts_387.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_price ON invoices (description); | NONE | false |
DIFF00099998182 | orm_schema_change | JavaScript | sessions_252.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('accounts', table => table.dropColumn('phone')) | NONE | true |
DIFF00099998183 | test_suite_cleanup | SQL | spec/sessions_405.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | false |
DIFF00099998184 | test_suite_cleanup | SQL | mysql-test/suite/inventory_344.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099998185 | orm_schema_change | TypeScript | orders_359.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: category } | NONE | true |
DIFF00099998186 | raw_sql_destructive | SQL | inventory_590.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE events SET balance = CONCAT(balance, score); | UPDATE_CONCAT | true |
DIFF00099998187 | general_code_change | Python | shipments_781.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099998188 | general_code_change | Python | refunds_991.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099998189 | raw_sql_safe | SQL | events_400.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_role ON tickets (score); | NONE | false |
DIFF00099998190 | general_code_change | Ruby | accounts_284.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998191 | general_code_change | Java | events_312.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099998192 | test_suite_cleanup | SQL | mysql-test/suite/invoices_579.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | false |
DIFF00099998193 | raw_sql_safe | SQL | employees_837.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE is_active = 'active'; | NONE | false |
DIFF00099998194 | raw_sql_destructive | SQL | customers_312.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET quantity = CONCAT(quantity, address); | UPDATE_CONCAT | true |
DIFF00099998195 | test_suite_cleanup | SQL | tests/logs_880.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | false |
DIFF00099998196 | orm_schema_change | Ruby | subscriptions_783.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :events, :price | NONE | true |
DIFF00099998197 | raw_sql_safe | SQL | customers_155.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE amount = 'active'; | NONE | false |
DIFF00099998198 | mentioned_in_comment | Python | accounts_58.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE sessions;") | TRUNCATE | false |
DIFF00099998199 | orm_schema_change | JavaScript | logs_853.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('description')) | NONE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.