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
DIFF00000005900
orm_schema_change
JavaScript
accounts_64.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('reviews', table => table.dropColumn('phone'))
NONE
true
DIFF00000005901
test_suite_cleanup
SQL
mysql-test/suite/subscriptions_389.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE payments DROP COLUMN description;
DROP_COLUMN
false
DIFF00000005902
orm_schema_change
Python
reviews_496.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='employees', name='address')
NONE
true
DIFF00000005903
raw_sql_destructive
SQL
shipments_412.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE customers;
TRUNCATE
true
DIFF00000005904
general_code_change
TypeScript
customers_378.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
DIFF00000005905
mentioned_in_comment
Python
transactions_289.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM orders;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00000005906
general_code_change
Java
invoices_826.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000005907
orm_schema_change
TypeScript
shipments_354.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Refunds { // removed field: address }
NONE
true
DIFF00000005908
raw_sql_destructive
SQL
notifications_936.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM users;
DELETE_UNQUALIFIED
true
DIFF00000005909
test_suite_cleanup
SQL
mysql-test/suite/events_743.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE tickets;
TRUNCATE
false
DIFF00000005910
test_suite_cleanup
SQL
test/orders_736.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE subscriptions DROP COLUMN address;
DROP_COLUMN
false
DIFF00000005911
raw_sql_destructive
SQL
reviews_755.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE inventory;
DROP_TABLE
true
DIFF00000005912
test_suite_cleanup
SQL
test/comments_725.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE invoices SET amount = CONCAT(amount, is_active);
UPDATE_CONCAT
false
DIFF00000005913
raw_sql_destructive
SQL
invoices_277.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM orders;
DELETE_UNQUALIFIED
true
DIFF00000005914
test_suite_cleanup
SQL
tests/shipments_31.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE refunds RENAME COLUMN description TO state;
ALTER_RENAME
false
DIFF00000005915
general_code_change
TypeScript
comments_58.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
DIFF00000005916
test_suite_cleanup
SQL
test/users_729.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE sessions;
DROP_TABLE
false
DIFF00000005917
mentioned_in_comment
Python
payments_986.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE products RENAME COLUMN name TO contact_email; -- now deprecated"""
ALTER_RENAME
false
DIFF00000005918
orm_schema_change
JavaScript
invoices_357.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('transactions', 'user_id')
NONE
true
DIFF00000005919
mentioned_in_comment
Python
transactions_79.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: TRUNCATE TABLE customers;")
TRUNCATE
false
DIFF00000005920
general_code_change
Ruby
accounts_185.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00000005921
mentioned_in_comment
Python
transactions_879.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DROP TABLE tickets;")
DROP_TABLE
false
DIFF00000005922
general_code_change
JavaScript
users_921.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
DIFF00000005923
obfuscated_destructive
SQL
inventory_948.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM logs;
DELETE_UNQUALIFIED
true
DIFF00000005924
orm_schema_change
JavaScript
customers_652.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('events', table => table.dropColumn('amount'))
NONE
true
DIFF00000005925
raw_sql_safe
SQL
subscriptions_928.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_customers_status ON customers (metadata);
NONE
false
DIFF00000005926
orm_schema_change
Ruby
tickets_74.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :employees, :name
NONE
true
DIFF00000005927
general_code_change
TypeScript
notifications_120.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
DIFF00000005928
raw_sql_destructive
SQL
accounts_932.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE invoices SET status = CONCAT(status, priority);
UPDATE_CONCAT
true
DIFF00000005929
obfuscated_destructive
SQL
accounts_881.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE shipments SET name = CONCAT(name, balance);
UPDATE_CONCAT
true
DIFF00000005930
orm_schema_change
JavaScript
sessions_240.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('employees', table => table.dropColumn('order_id'))
NONE
true
DIFF00000005931
orm_schema_change
Ruby
tickets_434.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :subscriptions, :role
NONE
true
DIFF00000005932
raw_sql_safe
SQL
logs_96.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE employees SET balance = %s WHERE name = %s;
NONE
false
DIFF00000005933
orm_schema_change
Python
users_975.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='payments', name='amount')
NONE
true
DIFF00000005934
orm_schema_change
TypeScript
refunds_393.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Notifications { // removed field: phone }
NONE
true
DIFF00000005935
raw_sql_safe
SQL
inventory_765.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_customers_priority ON customers (price);
NONE
false
DIFF00000005936
raw_sql_safe
SQL
shipments_456.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO payments (role, name) VALUES (%s, %s);
NONE
false
DIFF00000005937
raw_sql_destructive
SQL
orders_615.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE transactions DROP COLUMN name;
DROP_COLUMN
true
DIFF00000005938
test_suite_cleanup
SQL
tests/events_416.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE orders SET order_id = CONCAT(order_id, is_active);
UPDATE_CONCAT
false
DIFF00000005939
raw_sql_safe
SQL
accounts_158.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE invoices SET address = %s WHERE phone = %s;
NONE
false
DIFF00000005940
mentioned_in_comment
Python
employees_911.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM events;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00000005941
general_code_change
TypeScript
customers_500.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
DIFF00000005942
raw_sql_safe
SQL
customers_780.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE products ADD COLUMN state VARCHAR(255);
NONE
false
DIFF00000005943
general_code_change
Java
shipments_63.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000005944
mentioned_in_comment
Python
customers_4.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM comments;")
DELETE_UNQUALIFIED
false
DIFF00000005945
raw_sql_destructive
SQL
users_745.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE invoices;
TRUNCATE
true
DIFF00000005946
orm_schema_change
TypeScript
refunds_533.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Transactions { // removed field: metadata }
NONE
true
DIFF00000005947
test_suite_cleanup
SQL
spec/products_321.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE products DROP COLUMN role;
DROP_COLUMN
false
DIFF00000005948
general_code_change
JavaScript
sessions_701.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000005949
general_code_change
JavaScript
events_865.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00000005950
raw_sql_destructive
SQL
orders_293.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE invoices SET is_active = CONCAT(is_active, status);
UPDATE_CONCAT
true
DIFF00000005951
test_suite_cleanup
SQL
spec/users_139.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE shipments;
TRUNCATE
false
DIFF00000005952
general_code_change
Python
accounts_231.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000005953
raw_sql_destructive
SQL
accounts_665.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE accounts RENAME COLUMN amount TO contact_email;
ALTER_RENAME
true
DIFF00000005954
mentioned_in_comment
Python
comments_732.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE customers;' manually, handled by migration tool
DROP_TABLE
false
DIFF00000005955
raw_sql_destructive
SQL
inventory_402.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE events SET updated_at = CONCAT(updated_at, phone);
UPDATE_CONCAT
true
DIFF00000005956
raw_sql_destructive
SQL
shipments_512.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN priority TO state;
ALTER_RENAME
true
DIFF00000005957
raw_sql_destructive
SQL
payments_786.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN metadata TO contact_email;
ALTER_RENAME
true
DIFF00000005958
orm_schema_change
JavaScript
orders_771.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('logs', 'category')
NONE
true
DIFF00000005959
raw_sql_safe
SQL
invoices_656.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE inventory SET user_id = %s WHERE price = %s;
NONE
false
DIFF00000005960
orm_schema_change
JavaScript
refunds_789.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('sessions', 'status')
NONE
true
DIFF00000005961
test_suite_cleanup
SQL
tests/invoices_514.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE reviews DROP COLUMN status;
DROP_COLUMN
false
DIFF00000005962
general_code_change
Python
reviews_685.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00000005963
orm_schema_change
JavaScript
refunds_668.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('payments', 'phone')
NONE
true
DIFF00000005964
general_code_change
Go
employees_48.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000005965
mentioned_in_comment
Python
orders_31.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE refunds RENAME COLUMN phone TO full_name;")
ALTER_RENAME
false
DIFF00000005966
test_suite_cleanup
SQL
spec/shipments_973.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE employees;
TRUNCATE
false
DIFF00000005967
orm_schema_change
Python
invoices_471.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='comments', name='created_at')
NONE
true
DIFF00000005968
obfuscated_destructive
SQL
accounts_990.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE logs RENAME COLUMN amount TO state;
ALTER_RENAME
true
DIFF00000005969
raw_sql_destructive
SQL
comments_846.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE payments SET name = CONCAT(name, category);
UPDATE_CONCAT
true
DIFF00000005970
raw_sql_destructive
SQL
customers_810.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE logs;
DROP_TABLE
true
DIFF00000005971
test_suite_cleanup
SQL
spec/payments_737.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE notifications;
DROP_TABLE
false
DIFF00000005972
orm_schema_change
Python
notifications_860.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='transactions', name='email')
NONE
true
DIFF00000005973
orm_schema_change
JavaScript
products_473.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('transactions', table => table.dropColumn('phone'))
NONE
true
DIFF00000005974
raw_sql_destructive
SQL
comments_968.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE customers;
TRUNCATE
true
DIFF00000005975
test_suite_cleanup
SQL
tests/refunds_138.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE comments SET status = CONCAT(status, description);
UPDATE_CONCAT
false
DIFF00000005976
test_suite_cleanup
SQL
spec/events_608.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE reviews DROP COLUMN phone;
DROP_COLUMN
false
DIFF00000005977
raw_sql_destructive
SQL
payments_103.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE transactions;
TRUNCATE
true
DIFF00000005978
orm_schema_change
TypeScript
tickets_250.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Notifications { // removed field: address }
NONE
true
DIFF00000005979
raw_sql_destructive
SQL
shipments_285.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE transactions;
DROP_TABLE
true
DIFF00000005980
orm_schema_change
TypeScript
inventory_324.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Accounts { // removed field: amount }
NONE
true
DIFF00000005981
raw_sql_safe
SQL
tickets_925.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE orders ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00000005982
raw_sql_destructive
SQL
comments_561.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE invoices;
TRUNCATE
true
DIFF00000005983
obfuscated_destructive
SQL
accounts_494.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE events DROP COLUMN updated_at;
DROP_COLUMN
true
DIFF00000005984
raw_sql_safe
SQL
refunds_925.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM orders WHERE score = 'active';
NONE
false
DIFF00000005985
test_suite_cleanup
SQL
test/inventory_57.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE employees;
DROP_TABLE
false
DIFF00000005986
obfuscated_destructive
SQL
employees_818.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE shipments;
TRUNCATE
true
DIFF00000005987
obfuscated_destructive
SQL
subscriptions_823.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE subscriptions;
DROP_TABLE
true
DIFF00000005988
mentioned_in_comment
Python
employees_815.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE products; -- now deprecated"""
DROP_TABLE
false
DIFF00000005989
raw_sql_safe
SQL
accounts_216.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE users ADD COLUMN state VARCHAR(255);
NONE
false
DIFF00000005990
raw_sql_safe
SQL
logs_928.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_comments_status ON comments (status);
NONE
false
DIFF00000005991
general_code_change
Go
orders_193.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00000005992
general_code_change
Java
events_377.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00000005993
raw_sql_safe
SQL
notifications_833.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_users_category ON users (quantity);
NONE
false
DIFF00000005994
orm_schema_change
TypeScript
invoices_451.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Payments { // removed field: category }
NONE
true
DIFF00000005995
raw_sql_safe
SQL
accounts_15.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM tickets WHERE balance = 'active';
NONE
false
DIFF00000005996
orm_schema_change
JavaScript
logs_117.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('employees', 'status')
NONE
true
DIFF00000005997
orm_schema_change
JavaScript
refunds_435.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('tickets', table => table.dropColumn('address'))
NONE
true
DIFF00000005998
mentioned_in_comment
Python
refunds_681.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE invoices RENAME COLUMN phone TO amount_cents;")
ALTER_RENAME
false
DIFF00000005999
raw_sql_safe
SQL
notifications_190.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE comments ADD COLUMN amount_cents VARCHAR(255);
NONE
false