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
DIFF00099994900
obfuscated_destructive
SQL
refunds_258.sql
schema cleanup
@@ -1,3 +1,3 @@ +delete from customers;
DELETE_UNQUALIFIED
true
DIFF00099994901
test_suite_cleanup
SQL
tests/logs_373.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE transactions;
DROP_TABLE
false
DIFF00099994902
obfuscated_destructive
SQL
transactions_318.sql
schema cleanup
@@ -1,3 +1,3 @@ +trUncATE tABLE REVIEWS;
TRUNCATE
true
DIFF00099994903
general_code_change
Go
employees_260.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994904
raw_sql_safe
SQL
users_637.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE notifications ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00099994905
orm_schema_change
JavaScript
tickets_78.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('refunds', 'user_id')
NONE
true
DIFF00099994906
test_suite_cleanup
SQL
test/invoices_964.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE orders SET description = CONCAT(description, category);
UPDATE_CONCAT
false
DIFF00099994907
general_code_change
TypeScript
shipments_823.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
DIFF00099994908
orm_schema_change
JavaScript
orders_938.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('customers', table => table.dropColumn('status'))
NONE
true
DIFF00099994909
general_code_change
Python
employees_173.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994910
raw_sql_safe
SQL
refunds_176.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO logs (address, score) VALUES (%s, %s);
NONE
false
DIFF00099994911
orm_schema_change
JavaScript
inventory_650.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('subscriptions', table => table.dropColumn('metadata'))
NONE
true
DIFF00099994912
general_code_change
Ruby
invoices_343.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994913
general_code_change
TypeScript
refunds_724.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
DIFF00099994914
raw_sql_destructive
SQL
reviews_132.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
true
DIFF00099994915
obfuscated_destructive
SQL
customers_186.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE orders RENAME COLUMN address TO user_role;
ALTER_RENAME
true
DIFF00099994916
general_code_change
Python
tickets_238.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994917
raw_sql_destructive
SQL
notifications_169.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM invoices;
DELETE_UNQUALIFIED
true
DIFF00099994918
mentioned_in_comment
Python
subscriptions_153.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE orders;' manually, handled by migration tool
TRUNCATE
false
DIFF00099994919
general_code_change
Go
users_39.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994920
mentioned_in_comment
Python
invoices_322.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE shipments DROP COLUMN category;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00099994921
mentioned_in_comment
Python
employees_626.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: TRUNCATE TABLE events;")
TRUNCATE
false
DIFF00099994922
raw_sql_safe
SQL
inventory_617.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM orders WHERE name = 'active';
NONE
false
DIFF00099994923
raw_sql_safe
SQL
transactions_626.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM orders WHERE category = 'active';
NONE
false
DIFF00099994924
general_code_change
Java
orders_279.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099994925
mentioned_in_comment
Python
logs_535.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM products; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099994926
obfuscated_destructive
SQL
payments_323.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE subscriptions SET score = CONCAT(score, role);
UPDATE_CONCAT
true
DIFF00099994927
raw_sql_destructive
SQL
refunds_489.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE notifications SET balance = CONCAT(balance, quantity);
UPDATE_CONCAT
true
DIFF00099994928
raw_sql_destructive
SQL
transactions_903.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE tickets DROP COLUMN category;
DROP_COLUMN
true
DIFF00099994929
raw_sql_safe
SQL
orders_186.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO payments (name, updated_at) VALUES (%s, %s);
NONE
false
DIFF00099994930
general_code_change
Python
users_880.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994931
raw_sql_safe
SQL
accounts_217.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE employees ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099994932
mentioned_in_comment
Python
accounts_54.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE invoices RENAME COLUMN status TO contact_email;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099994933
obfuscated_destructive
SQL
shipments_968.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE events DROP COLUMN email;
DROP_COLUMN
true
DIFF00099994934
mentioned_in_comment
Python
subscriptions_352.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: ALTER TABLE orders RENAME COLUMN order_id TO contact_email;")
ALTER_RENAME
false
DIFF00099994935
mentioned_in_comment
Python
refunds_560.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: TRUNCATE TABLE subscriptions; -- now deprecated"""
TRUNCATE
false
DIFF00099994936
orm_schema_change
TypeScript
logs_169.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Users { // removed field: price }
NONE
true
DIFF00099994937
general_code_change
Ruby
sessions_164.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994938
raw_sql_destructive
SQL
transactions_810.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE tickets RENAME COLUMN status TO amount_cents;
ALTER_RENAME
true
DIFF00099994939
raw_sql_safe
SQL
accounts_709.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE sessions ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00099994940
orm_schema_change
JavaScript
orders_780.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('customers', table => table.dropColumn('score'))
NONE
true
DIFF00099994941
test_suite_cleanup
SQL
tests/notifications_423.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE reviews DROP COLUMN order_id;
DROP_COLUMN
false
DIFF00099994942
raw_sql_destructive
SQL
accounts_198.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM orders;
DELETE_UNQUALIFIED
true
DIFF00099994943
general_code_change
Go
sessions_983.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994944
mentioned_in_comment
Python
shipments_677.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM sessions; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099994945
mentioned_in_comment
Python
customers_665.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE reviews RENAME COLUMN status TO amount_cents; -- now deprecated"""
ALTER_RENAME
false
DIFF00099994946
test_suite_cleanup
SQL
test/events_507.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE invoices SET updated_at = CONCAT(updated_at, role);
UPDATE_CONCAT
false
DIFF00099994947
raw_sql_safe
SQL
logs_314.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE payments SET address = %s WHERE name = %s;
NONE
false
DIFF00099994948
general_code_change
Go
logs_795.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994949
test_suite_cleanup
SQL
spec/payments_625.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
false
DIFF00099994950
general_code_change
Python
notifications_541.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994951
test_suite_cleanup
SQL
test/users_920.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE products;
DROP_TABLE
false
DIFF00099994952
test_suite_cleanup
SQL
mysql-test/suite/logs_463.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE transactions SET category = CONCAT(category, address);
UPDATE_CONCAT
false
DIFF00099994953
general_code_change
Java
products_567.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099994954
general_code_change
TypeScript
customers_28.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
DIFF00099994955
general_code_change
Go
employees_492.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994956
orm_schema_change
Python
users_526.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='customers', name='category')
NONE
true
DIFF00099994957
general_code_change
JavaScript
sessions_745.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
DIFF00099994958
raw_sql_safe
SQL
orders_734.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM invoices WHERE email = 'active';
NONE
false
DIFF00099994959
raw_sql_safe
SQL
sessions_272.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE tickets ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099994960
general_code_change
Python
transactions_787.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994961
general_code_change
JavaScript
orders_839.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
DIFF00099994962
raw_sql_safe
SQL
users_616.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_comments_created_at ON comments (priority);
NONE
false
DIFF00099994963
raw_sql_destructive
SQL
subscriptions_733.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE shipments SET user_id = CONCAT(user_id, balance);
UPDATE_CONCAT
true
DIFF00099994964
general_code_change
Java
tickets_273.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099994965
raw_sql_safe
SQL
employees_998.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE shipments SET metadata = %s WHERE name = %s;
NONE
false
DIFF00099994966
general_code_change
Ruby
sessions_265.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994967
raw_sql_safe
SQL
employees_430.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM refunds WHERE balance = 'active';
NONE
false
DIFF00099994968
general_code_change
Python
inventory_142.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994969
orm_schema_change
TypeScript
orders_180.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Reviews { // removed field: name }
NONE
true
DIFF00099994970
general_code_change
Ruby
shipments_284.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994971
test_suite_cleanup
SQL
mysql-test/suite/sessions_977.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE logs SET price = CONCAT(price, score);
UPDATE_CONCAT
false
DIFF00099994972
obfuscated_destructive
SQL
events_797.sql
schema cleanup
@@ -1,3 +1,3 @@ +DRoP taBLe eMployees;
DROP_TABLE
true
DIFF00099994973
general_code_change
JavaScript
sessions_680.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994974
raw_sql_safe
SQL
tickets_252.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE events ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099994975
test_suite_cleanup
SQL
test/comments_967.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE tickets;
TRUNCATE
false
DIFF00099994976
raw_sql_destructive
SQL
customers_463.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE refunds DROP COLUMN user_id;
DROP_COLUMN
true
DIFF00099994977
raw_sql_safe
SQL
accounts_541.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_products_category ON products (status);
NONE
false
DIFF00099994978
general_code_change
Go
logs_299.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994979
raw_sql_safe
SQL
orders_610.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM transactions WHERE amount = 'active';
NONE
false
DIFF00099994980
mentioned_in_comment
Python
notifications_764.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE payments;' manually, handled by migration tool
DROP_TABLE
false
DIFF00099994981
raw_sql_safe
SQL
events_800.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE transactions ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099994982
mentioned_in_comment
Python
users_297.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE shipments DROP COLUMN name; -- now deprecated"""
DROP_COLUMN
false
DIFF00099994983
general_code_change
Java
accounts_27.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099994984
general_code_change
Python
users_662.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994985
mentioned_in_comment
Python
customers_93.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE subscriptions;' manually, handled by migration tool
TRUNCATE
false
DIFF00099994986
general_code_change
Python
employees_591.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994987
orm_schema_change
Python
shipments_961.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='inventory', name='price')
NONE
true
DIFF00099994988
mentioned_in_comment
Python
accounts_526.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE orders;' manually, handled by migration tool
TRUNCATE
false
DIFF00099994989
raw_sql_destructive
SQL
employees_690.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM products;
DELETE_UNQUALIFIED
true
DIFF00099994990
raw_sql_destructive
SQL
reviews_484.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE sessions RENAME COLUMN updated_at TO state;
ALTER_RENAME
true
DIFF00099994991
general_code_change
Python
inventory_650.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994992
obfuscated_destructive
SQL
payments_992.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE inventory SET metadata = CONCAT(metadata, metadata);
UPDATE_CONCAT
true
DIFF00099994993
raw_sql_safe
SQL
products_31.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_inventory_updated_at ON inventory (score);
NONE
false
DIFF00099994994
orm_schema_change
Ruby
subscriptions_935.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :accounts, :priority
NONE
true
DIFF00099994995
raw_sql_destructive
SQL
employees_990.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE refunds DROP COLUMN priority;
DROP_COLUMN
true
DIFF00099994996
test_suite_cleanup
SQL
mysql-test/suite/events_253.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE employees RENAME COLUMN order_id TO contact_email;
ALTER_RENAME
false
DIFF00099994997
general_code_change
Python
notifications_708.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994998
raw_sql_destructive
SQL
employees_43.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM users;
DELETE_UNQUALIFIED
true
DIFF00099994999
obfuscated_destructive
SQL
notifications_564.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table users rename column is_active to full_name;
ALTER_RENAME
true