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 |
|---|---|---|---|---|---|---|---|
DIFF00000005100 | orm_schema_change | JavaScript | shipments_81.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'updated_at') | NONE | true |
DIFF00000005101 | raw_sql_safe | SQL | transactions_301.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_orders_role ON orders (balance); | NONE | false |
DIFF00000005102 | general_code_change | Python | inventory_129.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005103 | obfuscated_destructive | SQL | invoices_84.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
invoices
DROP
COLUMN
status; | DROP_COLUMN | true |
DIFF00000005104 | mentioned_in_comment | Python | users_377.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM subscriptions;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000005105 | general_code_change | Go | products_802.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005106 | raw_sql_destructive | SQL | employees_420.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000005107 | general_code_change | Ruby | tickets_536.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000005108 | test_suite_cleanup | SQL | tests/payments_116.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | false |
DIFF00000005109 | mentioned_in_comment | Python | orders_513.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE sessions;") | TRUNCATE | false |
DIFF00000005110 | general_code_change | JavaScript | orders_573.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005111 | obfuscated_destructive | SQL | notifications_617.sql | schema cleanup | @@ -1,3 +1,3 @@
+Drop taBLe PayMenTS; | DROP_TABLE | true |
DIFF00000005112 | mentioned_in_comment | Python | accounts_59.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE sessions RENAME COLUMN email TO amount_cents;") | ALTER_RENAME | false |
DIFF00000005113 | mentioned_in_comment | Python | accounts_811.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE shipments DROP COLUMN name;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000005114 | general_code_change | JavaScript | accounts_978.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 |
DIFF00000005115 | obfuscated_destructive | SQL | logs_883.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
notifications; | DELETE_UNQUALIFIED | true |
DIFF00000005116 | mentioned_in_comment | Python | comments_346.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE refunds SET status = CONCAT(status, status); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000005117 | orm_schema_change | JavaScript | logs_238.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'updated_at') | NONE | true |
DIFF00000005118 | orm_schema_change | Ruby | sessions_100.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :priority | NONE | true |
DIFF00000005119 | raw_sql_safe | SQL | notifications_342.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (score, name) VALUES (%s, %s); | NONE | false |
DIFF00000005120 | test_suite_cleanup | SQL | test/payments_65.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN address TO full_name; | ALTER_RENAME | false |
DIFF00000005121 | mentioned_in_comment | Python | customers_198.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM events;") | DELETE_UNQUALIFIED | false |
DIFF00000005122 | test_suite_cleanup | SQL | test/inventory_466.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00000005123 | test_suite_cleanup | SQL | mysql-test/suite/employees_44.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN role; | DROP_COLUMN | false |
DIFF00000005124 | orm_schema_change | Python | notifications_115.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='inventory', name='price') | NONE | true |
DIFF00000005125 | test_suite_cleanup | SQL | spec/refunds_175.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE employees; | TRUNCATE | false |
DIFF00000005126 | obfuscated_destructive | SQL | sessions_869.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table products; | TRUNCATE | true |
DIFF00000005127 | general_code_change | Java | customers_465.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005128 | general_code_change | Python | users_980.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005129 | general_code_change | Java | logs_611.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005130 | raw_sql_safe | SQL | customers_282.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE comments SET category = %s WHERE order_id = %s; | NONE | false |
DIFF00000005131 | test_suite_cleanup | SQL | mysql-test/suite/users_681.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM products; | DELETE_UNQUALIFIED | false |
DIFF00000005132 | obfuscated_destructive | SQL | shipments_497.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
shipments
DROP
COLUMN
price; | DROP_COLUMN | true |
DIFF00000005133 | obfuscated_destructive | SQL | refunds_622.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN score TO amount_cents; | ALTER_RENAME | true |
DIFF00000005134 | orm_schema_change | JavaScript | reviews_488.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('is_active')) | NONE | true |
DIFF00000005135 | obfuscated_destructive | SQL | tickets_927.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
comments
DROP
COLUMN
created_at; | DROP_COLUMN | true |
DIFF00000005136 | test_suite_cleanup | SQL | tests/customers_799.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000005137 | raw_sql_safe | SQL | products_720.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000005138 | raw_sql_destructive | SQL | employees_775.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00000005139 | obfuscated_destructive | SQL | accounts_176.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00000005140 | test_suite_cleanup | SQL | test/transactions_327.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN priority; | DROP_COLUMN | false |
DIFF00000005141 | mentioned_in_comment | Python | sessions_431.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE customers SET updated_at = CONCAT(updated_at, role); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000005142 | obfuscated_destructive | SQL | customers_395.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN score TO contact_email; | ALTER_RENAME | true |
DIFF00000005143 | raw_sql_safe | SQL | reviews_36.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (metadata, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000005144 | raw_sql_safe | SQL | customers_947.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (balance, amount) VALUES (%s, %s); | NONE | false |
DIFF00000005145 | general_code_change | Go | shipments_652.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005146 | mentioned_in_comment | Python | customers_788.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE customers;") | DROP_TABLE | false |
DIFF00000005147 | raw_sql_safe | SQL | customers_20.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET order_id = %s WHERE email = %s; | NONE | false |
DIFF00000005148 | mentioned_in_comment | Python | notifications_827.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE reviews RENAME COLUMN email TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000005149 | general_code_change | Java | users_709.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005150 | test_suite_cleanup | SQL | mysql-test/suite/subscriptions_919.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET name = CONCAT(name, metadata); | UPDATE_CONCAT | false |
DIFF00000005151 | general_code_change | TypeScript | tickets_271.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 |
DIFF00000005152 | orm_schema_change | Ruby | transactions_6.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :balance | NONE | true |
DIFF00000005153 | mentioned_in_comment | Python | shipments_32.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM accounts;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000005154 | raw_sql_safe | SQL | customers_943.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_refunds_email ON refunds (score); | NONE | false |
DIFF00000005155 | test_suite_cleanup | SQL | tests/users_523.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN priority TO user_role; | ALTER_RENAME | false |
DIFF00000005156 | mentioned_in_comment | Python | products_760.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE products DROP COLUMN price;") | DROP_COLUMN | false |
DIFF00000005157 | raw_sql_destructive | SQL | notifications_367.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000005158 | raw_sql_destructive | SQL | shipments_268.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000005159 | general_code_change | TypeScript | users_997.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 |
DIFF00000005160 | orm_schema_change | TypeScript | sessions_586.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Events { // removed field: balance } | NONE | true |
DIFF00000005161 | raw_sql_destructive | SQL | employees_716.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000005162 | raw_sql_safe | SQL | payments_97.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE description = 'active'; | NONE | false |
DIFF00000005163 | general_code_change | Ruby | events_168.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000005164 | general_code_change | TypeScript | inventory_166.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 |
DIFF00000005165 | raw_sql_safe | SQL | inventory_215.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE quantity = 'active'; | NONE | false |
DIFF00000005166 | raw_sql_safe | SQL | reviews_718.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_address ON invoices (phone); | NONE | false |
DIFF00000005167 | orm_schema_change | Ruby | employees_491.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :refunds, :created_at | NONE | true |
DIFF00000005168 | mentioned_in_comment | Python | refunds_940.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE invoices;") | DROP_TABLE | false |
DIFF00000005169 | mentioned_in_comment | Python | users_882.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE refunds RENAME COLUMN order_id TO state;") | ALTER_RENAME | false |
DIFF00000005170 | general_code_change | Go | reviews_858.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000005171 | mentioned_in_comment | Python | subscriptions_923.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE transactions DROP COLUMN role; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000005172 | orm_schema_change | Python | users_359.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='accounts', name='is_active') | NONE | true |
DIFF00000005173 | test_suite_cleanup | SQL | test/refunds_833.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN description; | DROP_COLUMN | false |
DIFF00000005174 | mentioned_in_comment | Python | comments_938.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE accounts;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000005175 | general_code_change | Java | accounts_817.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000005176 | general_code_change | JavaScript | logs_370.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 |
DIFF00000005177 | orm_schema_change | JavaScript | notifications_632.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'category') | NONE | true |
DIFF00000005178 | mentioned_in_comment | Python | employees_894.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions DROP COLUMN metadata;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000005179 | raw_sql_safe | SQL | accounts_56.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000005180 | test_suite_cleanup | SQL | test/employees_950.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | false |
DIFF00000005181 | orm_schema_change | TypeScript | shipments_862.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: amount } | NONE | true |
DIFF00000005182 | raw_sql_safe | SQL | sessions_904.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (balance, is_active) VALUES (%s, %s); | NONE | false |
DIFF00000005183 | raw_sql_destructive | SQL | payments_144.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN amount TO state; | ALTER_RENAME | true |
DIFF00000005184 | general_code_change | JavaScript | shipments_887.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005185 | general_code_change | JavaScript | employees_976.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005186 | general_code_change | Python | logs_600.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000005187 | general_code_change | TypeScript | invoices_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 |
DIFF00000005188 | raw_sql_destructive | SQL | events_228.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN score TO amount_cents; | ALTER_RENAME | true |
DIFF00000005189 | raw_sql_safe | SQL | accounts_780.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000005190 | orm_schema_change | Ruby | notifications_873.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :price | NONE | true |
DIFF00000005191 | raw_sql_safe | SQL | transactions_955.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE refunds SET priority = %s WHERE address = %s; | NONE | false |
DIFF00000005192 | orm_schema_change | JavaScript | users_712.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'metadata') | NONE | true |
DIFF00000005193 | obfuscated_destructive | SQL | subscriptions_186.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table tickets rename column address to amount_cents; | ALTER_RENAME | true |
DIFF00000005194 | orm_schema_change | JavaScript | sessions_976.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('transactions', 'quantity') | NONE | true |
DIFF00000005195 | raw_sql_safe | SQL | customers_642.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE role = 'active'; | NONE | false |
DIFF00000005196 | obfuscated_destructive | SQL | notifications_37.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTer TablE UsErs RenAmE CoLumn aDdresS tO full_nAmE; | ALTER_RENAME | true |
DIFF00000005197 | test_suite_cleanup | SQL | tests/subscriptions_879.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | false |
DIFF00000005198 | general_code_change | JavaScript | products_755.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000005199 | raw_sql_safe | SQL | events_418.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN full_name VARCHAR(255); | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.