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
DIFF00099993700
mentioned_in_comment
Python
employees_494.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DROP TABLE sessions; -- now deprecated"""
DROP_TABLE
false
DIFF00099993701
raw_sql_destructive
SQL
shipments_996.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE reviews RENAME COLUMN user_id TO user_role;
ALTER_RENAME
true
DIFF00099993702
mentioned_in_comment
Python
notifications_720.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE notifications;' manually, handled by migration tool
DROP_TABLE
false
DIFF00099993703
general_code_change
TypeScript
shipments_618.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
DIFF00099993704
orm_schema_change
JavaScript
sessions_609.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('refunds', table => table.dropColumn('user_id'))
NONE
true
DIFF00099993705
raw_sql_destructive
SQL
sessions_664.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE transactions;
DROP_TABLE
true
DIFF00099993706
raw_sql_destructive
SQL
inventory_686.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
true
DIFF00099993707
obfuscated_destructive
SQL
tickets_714.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE logs DROP COLUMN quantity;
DROP_COLUMN
true
DIFF00099993708
test_suite_cleanup
SQL
spec/reviews_678.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM events;
DELETE_UNQUALIFIED
false
DIFF00099993709
obfuscated_destructive
SQL
logs_592.sql
schema cleanup
@@ -1,3 +1,3 @@ +dEletE frOM PaYMENTs;
DELETE_UNQUALIFIED
true
DIFF00099993710
test_suite_cleanup
SQL
spec/payments_135.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE accounts SET user_id = CONCAT(user_id, is_active);
UPDATE_CONCAT
false
DIFF00099993711
general_code_change
Python
reviews_326.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099993712
general_code_change
Python
transactions_13.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099993713
obfuscated_destructive
SQL
transactions_737.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE orders;
TRUNCATE
true
DIFF00099993714
raw_sql_safe
SQL
shipments_170.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE shipments SET order_id = %s WHERE email = %s;
NONE
false
DIFF00099993715
orm_schema_change
JavaScript
logs_218.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('inventory', 'price')
NONE
true
DIFF00099993716
general_code_change
TypeScript
orders_156.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
DIFF00099993717
raw_sql_destructive
SQL
refunds_104.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE invoices DROP COLUMN status;
DROP_COLUMN
true
DIFF00099993718
raw_sql_destructive
SQL
transactions_613.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
true
DIFF00099993719
general_code_change
Python
notifications_886.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099993720
test_suite_cleanup
SQL
spec/users_293.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM shipments;
DELETE_UNQUALIFIED
false
DIFF00099993721
general_code_change
Ruby
employees_361.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993722
test_suite_cleanup
SQL
tests/users_280.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE users RENAME COLUMN balance TO user_role;
ALTER_RENAME
false
DIFF00099993723
test_suite_cleanup
SQL
mysql-test/suite/inventory_367.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE logs DROP COLUMN phone;
DROP_COLUMN
false
DIFF00099993724
raw_sql_safe
SQL
invoices_436.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM products WHERE metadata = 'active';
NONE
false
DIFF00099993725
raw_sql_safe
SQL
invoices_495.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_comments_description ON comments (score);
NONE
false
DIFF00099993726
general_code_change
Java
payments_670.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099993727
general_code_change
Go
tickets_132.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099993728
orm_schema_change
Python
events_846.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='invoices', name='quantity')
NONE
true
DIFF00099993729
orm_schema_change
TypeScript
logs_978.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Accounts { // removed field: amount }
NONE
true
DIFF00099993730
obfuscated_destructive
SQL
orders_856.sql
schema cleanup
@@ -1,3 +1,3 @@ +tRUNcAtE TAblE cOMMeNTS;
TRUNCATE
true
DIFF00099993731
raw_sql_destructive
SQL
accounts_253.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE logs;
TRUNCATE
true
DIFF00099993732
raw_sql_safe
SQL
accounts_507.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM events WHERE priority = 'active';
NONE
false
DIFF00099993733
obfuscated_destructive
SQL
refunds_28.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE orders;
DROP_TABLE
true
DIFF00099993734
test_suite_cleanup
SQL
tests/notifications_134.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
false
DIFF00099993735
general_code_change
JavaScript
tickets_697.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
DIFF00099993736
test_suite_cleanup
SQL
mysql-test/suite/products_846.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE transactions;
DROP_TABLE
false
DIFF00099993737
orm_schema_change
Python
shipments_407.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='users', name='is_active')
NONE
true
DIFF00099993738
orm_schema_change
JavaScript
subscriptions_670.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('payments', table => table.dropColumn('balance'))
NONE
true
DIFF00099993739
test_suite_cleanup
SQL
mysql-test/suite/refunds_566.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE users DROP COLUMN role;
DROP_COLUMN
false
DIFF00099993740
orm_schema_change
JavaScript
tickets_506.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('subscriptions', table => table.dropColumn('quantity'))
NONE
true
DIFF00099993741
obfuscated_destructive
SQL
notifications_712.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE invoices;
TRUNCATE
true
DIFF00099993742
test_suite_cleanup
SQL
spec/products_430.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE payments DROP COLUMN name;
DROP_COLUMN
false
DIFF00099993743
raw_sql_safe
SQL
notifications_736.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE users ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00099993744
general_code_change
JavaScript
products_874.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099993745
raw_sql_safe
SQL
events_693.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO employees (created_at, score) VALUES (%s, %s);
NONE
false
DIFF00099993746
general_code_change
JavaScript
accounts_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
DIFF00099993747
mentioned_in_comment
Python
inventory_468.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'UPDATE payments SET metadata = CONCAT(metadata, category);' manually, handled by migration tool
UPDATE_CONCAT
false
DIFF00099993748
orm_schema_change
JavaScript
users_910.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('users', table => table.dropColumn('metadata'))
NONE
true
DIFF00099993749
obfuscated_destructive
SQL
transactions_66.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE transactions DROP COLUMN balance;
DROP_COLUMN
true
DIFF00099993750
test_suite_cleanup
SQL
tests/tickets_919.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE reviews SET is_active = CONCAT(is_active, amount);
UPDATE_CONCAT
false
DIFF00099993751
raw_sql_safe
SQL
refunds_145.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE tickets ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099993752
raw_sql_safe
SQL
inventory_169.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE comments SET status = %s WHERE is_active = %s;
NONE
false
DIFF00099993753
mentioned_in_comment
Python
users_290.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: TRUNCATE TABLE customers; -- now deprecated"""
TRUNCATE
false
DIFF00099993754
raw_sql_destructive
SQL
comments_578.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE customers RENAME COLUMN user_id TO amount_cents;
ALTER_RENAME
true
DIFF00099993755
raw_sql_safe
SQL
invoices_90.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE accounts ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099993756
general_code_change
Python
shipments_70.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099993757
general_code_change
TypeScript
shipments_245.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
DIFF00099993758
test_suite_cleanup
SQL
spec/notifications_92.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE inventory DROP COLUMN balance;
DROP_COLUMN
false
DIFF00099993759
general_code_change
Go
invoices_425.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099993760
orm_schema_change
JavaScript
logs_383.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('orders', 'created_at')
NONE
true
DIFF00099993761
raw_sql_destructive
SQL
accounts_378.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE accounts;
DROP_TABLE
true
DIFF00099993762
obfuscated_destructive
SQL
transactions_626.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table users drop column metadata;
DROP_COLUMN
true
DIFF00099993763
general_code_change
JavaScript
subscriptions_462.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099993764
general_code_change
Java
comments_84.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099993765
general_code_change
Go
reviews_566.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099993766
general_code_change
TypeScript
sessions_376.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
DIFF00099993767
raw_sql_safe
SQL
tickets_342.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE notifications SET created_at = %s WHERE role = %s;
NONE
false
DIFF00099993768
general_code_change
Ruby
sessions_558.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099993769
orm_schema_change
Ruby
notifications_28.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :employees, :score
NONE
true
DIFF00099993770
raw_sql_destructive
SQL
employees_541.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN metadata TO contact_email;
ALTER_RENAME
true
DIFF00099993771
raw_sql_destructive
SQL
comments_174.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE invoices;
DROP_TABLE
true
DIFF00099993772
test_suite_cleanup
SQL
tests/orders_235.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE shipments;
TRUNCATE
false
DIFF00099993773
general_code_change
Python
comments_707.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099993774
test_suite_cleanup
SQL
spec/inventory_906.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE users SET order_id = CONCAT(order_id, created_at);
UPDATE_CONCAT
false
DIFF00099993775
raw_sql_safe
SQL
reviews_124.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO reviews (balance, is_active) VALUES (%s, %s);
NONE
false
DIFF00099993776
test_suite_cleanup
SQL
mysql-test/suite/shipments_752.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE invoices SET phone = CONCAT(phone, status);
UPDATE_CONCAT
false
DIFF00099993777
orm_schema_change
JavaScript
inventory_452.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('sessions', table => table.dropColumn('score'))
NONE
true
DIFF00099993778
test_suite_cleanup
SQL
spec/accounts_20.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
false
DIFF00099993779
orm_schema_change
Ruby
notifications_188.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :customers, :balance
NONE
true
DIFF00099993780
mentioned_in_comment
Python
orders_825.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: TRUNCATE TABLE sessions;")
TRUNCATE
false
DIFF00099993781
mentioned_in_comment
Python
comments_637.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE tickets;' manually, handled by migration tool
DROP_TABLE
false
DIFF00099993782
raw_sql_safe
SQL
comments_103.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO tickets (role, email) VALUES (%s, %s);
NONE
false
DIFF00099993783
orm_schema_change
Ruby
employees_897.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :accounts, :quantity
NONE
true
DIFF00099993784
general_code_change
Python
sessions_921.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099993785
test_suite_cleanup
SQL
tests/tickets_566.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE inventory SET description = CONCAT(description, is_active);
UPDATE_CONCAT
false
DIFF00099993786
general_code_change
Java
logs_647.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099993787
raw_sql_destructive
SQL
transactions_336.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE products SET amount = CONCAT(amount, quantity);
UPDATE_CONCAT
true
DIFF00099993788
test_suite_cleanup
SQL
test/logs_994.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE logs;
TRUNCATE
false
DIFF00099993789
raw_sql_safe
SQL
invoices_225.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE accounts SET metadata = %s WHERE status = %s;
NONE
false
DIFF00099993790
general_code_change
Go
comments_813.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099993791
mentioned_in_comment
Python
inventory_938.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM subscriptions; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099993792
orm_schema_change
JavaScript
transactions_606.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('payments', 'is_active')
NONE
true
DIFF00099993793
general_code_change
JavaScript
comments_919.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
DIFF00099993794
obfuscated_destructive
SQL
products_748.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELete frOm paYMentS;
DELETE_UNQUALIFIED
true
DIFF00099993795
mentioned_in_comment
Python
users_608.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE inventory RENAME COLUMN created_at TO state;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099993796
orm_schema_change
Ruby
inventory_299.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :users, :address
NONE
true
DIFF00099993797
general_code_change
Python
payments_418.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099993798
raw_sql_destructive
SQL
accounts_86.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN status TO state;
ALTER_RENAME
true
DIFF00099993799
test_suite_cleanup
SQL
tests/logs_778.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE accounts SET user_id = CONCAT(user_id, created_at);
UPDATE_CONCAT
false