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
DIFF00099999900
general_code_change
Go
accounts_855.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999901
mentioned_in_comment
Python
refunds_635.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: TRUNCATE TABLE reviews; -- now deprecated"""
TRUNCATE
false
DIFF00099999902
raw_sql_safe
SQL
events_440.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_products_is_active ON products (user_id);
NONE
false
DIFF00099999903
test_suite_cleanup
SQL
tests/tickets_652.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
false
DIFF00099999904
orm_schema_change
Ruby
orders_125.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :reviews, :phone
NONE
true
DIFF00099999905
obfuscated_destructive
SQL
customers_562.sql
schema cleanup
@@ -1,3 +1,3 @@ +drop table reviews;
DROP_TABLE
true
DIFF00099999906
raw_sql_safe
SQL
subscriptions_265.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM refunds WHERE user_id = 'active';
NONE
false
DIFF00099999907
mentioned_in_comment
Python
invoices_887.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE inventory RENAME COLUMN is_active TO amount_cents;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099999908
raw_sql_destructive
SQL
refunds_169.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE comments;
DROP_TABLE
true
DIFF00099999909
obfuscated_destructive
SQL
tickets_710.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE users;
TRUNCATE
true
DIFF00099999910
orm_schema_change
JavaScript
payments_580.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('payments', table => table.dropColumn('balance'))
NONE
true
DIFF00099999911
raw_sql_safe
SQL
transactions_161.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_comments_address ON comments (price);
NONE
false
DIFF00099999912
mentioned_in_comment
Python
employees_88.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE shipments RENAME COLUMN name TO full_name;' manually, handled by migration tool
ALTER_RENAME
false
DIFF00099999913
test_suite_cleanup
SQL
spec/tickets_908.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN priority TO user_role;
ALTER_RENAME
false
DIFF00099999914
raw_sql_destructive
SQL
orders_556.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE comments;
TRUNCATE
true
DIFF00099999915
orm_schema_change
JavaScript
logs_985.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('products', 'name')
NONE
true
DIFF00099999916
general_code_change
Python
products_575.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999917
obfuscated_destructive
SQL
payments_425.sql
schema cleanup
@@ -1,3 +1,3 @@ +TRUNCATE TABLE shipments;
TRUNCATE
true
DIFF00099999918
raw_sql_safe
SQL
notifications_151.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO comments (updated_at, balance) VALUES (%s, %s);
NONE
false
DIFF00099999919
general_code_change
Java
employees_530.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999920
orm_schema_change
TypeScript
inventory_392.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Customers { // removed field: quantity }
NONE
true
DIFF00099999921
obfuscated_destructive
SQL
inventory_655.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALter taBle NOTIFicaTIoNs rEnaMe COluMn CategORy to STATe;
ALTER_RENAME
true
DIFF00099999922
orm_schema_change
Ruby
transactions_349.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :orders, :name
NONE
true
DIFF00099999923
general_code_change
Java
users_546.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999924
test_suite_cleanup
SQL
tests/events_721.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE users;
TRUNCATE
false
DIFF00099999925
obfuscated_destructive
SQL
comments_675.sql
schema cleanup
@@ -1,3 +1,3 @@ +DeLEte FrOm rEvIewS;
DELETE_UNQUALIFIED
true
DIFF00099999926
general_code_change
TypeScript
orders_337.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
DIFF00099999927
obfuscated_destructive
SQL
comments_246.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table orders drop column score;
DROP_COLUMN
true
DIFF00099999928
general_code_change
Python
transactions_912.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999929
test_suite_cleanup
SQL
tests/payments_740.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +UPDATE users SET amount = CONCAT(amount, updated_at);
UPDATE_CONCAT
false
DIFF00099999930
orm_schema_change
Ruby
inventory_605.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :reviews, :score
NONE
true
DIFF00099999931
general_code_change
Go
events_560.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999932
orm_schema_change
Ruby
employees_315.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :logs, :email
NONE
true
DIFF00099999933
raw_sql_safe
SQL
employees_223.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE subscriptions SET name = %s WHERE created_at = %s;
NONE
false
DIFF00099999934
orm_schema_change
Python
notifications_801.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='subscriptions', name='balance')
NONE
true
DIFF00099999935
obfuscated_destructive
SQL
comments_651.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE employees RENAME COLUMN category TO amount_cents;
ALTER_RENAME
true
DIFF00099999936
mentioned_in_comment
Python
products_23.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE customers DROP COLUMN amount; -- now deprecated"""
DROP_COLUMN
false
DIFF00099999937
test_suite_cleanup
SQL
spec/subscriptions_493.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +TRUNCATE TABLE accounts;
TRUNCATE
false
DIFF00099999938
raw_sql_safe
SQL
products_323.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE comments ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099999939
raw_sql_safe
SQL
comments_20.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_users_role ON users (is_active);
NONE
false
DIFF00099999940
orm_schema_change
JavaScript
accounts_458.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('orders', 'phone')
NONE
true
DIFF00099999941
test_suite_cleanup
SQL
test/customers_514.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE orders RENAME COLUMN user_id TO state;
ALTER_RENAME
false
DIFF00099999942
raw_sql_safe
SQL
orders_519.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_orders_category ON orders (price);
NONE
false
DIFF00099999943
general_code_change
Python
payments_217.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999944
raw_sql_safe
SQL
customers_271.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM transactions WHERE updated_at = 'active';
NONE
false
DIFF00099999945
obfuscated_destructive
SQL
subscriptions_204.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE invoices DROP COLUMN created_at;
DROP_COLUMN
true
DIFF00099999946
raw_sql_destructive
SQL
invoices_762.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE subscriptions DROP COLUMN created_at;
DROP_COLUMN
true
DIFF00099999947
general_code_change
Go
comments_747.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999948
general_code_change
Java
employees_659.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999949
mentioned_in_comment
Python
orders_341.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM products; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099999950
mentioned_in_comment
Python
invoices_590.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DROP TABLE tickets;")
DROP_TABLE
false
DIFF00099999951
general_code_change
Ruby
orders_468.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999952
general_code_change
Go
transactions_813.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999953
general_code_change
Python
subscriptions_463.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099999954
raw_sql_safe
SQL
employees_797.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE invoices ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099999955
orm_schema_change
TypeScript
users_327.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Payments { // removed field: balance }
NONE
true
DIFF00099999956
raw_sql_destructive
SQL
events_873.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE employees RENAME COLUMN created_at TO full_name;
ALTER_RENAME
true
DIFF00099999957
raw_sql_destructive
SQL
sessions_432.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM transactions;
DELETE_UNQUALIFIED
true
DIFF00099999958
obfuscated_destructive
SQL
transactions_448.sql
schema cleanup
@@ -1,3 +1,3 @@ +alTeR taBLe cuSToMErs DrOp cOLumN MEtAdata;
DROP_COLUMN
true
DIFF00099999959
general_code_change
Python
shipments_222.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099999960
general_code_change
Java
employees_459.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999961
mentioned_in_comment
Python
events_651.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM inventory;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00099999962
general_code_change
Java
tickets_875.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999963
test_suite_cleanup
SQL
test/shipments_667.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE reviews RENAME COLUMN address TO user_role;
ALTER_RENAME
false
DIFF00099999964
orm_schema_change
TypeScript
users_562.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Customers { // removed field: price }
NONE
true
DIFF00099999965
mentioned_in_comment
Python
logs_569.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'TRUNCATE TABLE logs;' manually, handled by migration tool
TRUNCATE
false
DIFF00099999966
raw_sql_safe
SQL
invoices_992.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM transactions WHERE status = 'active';
NONE
false
DIFF00099999967
mentioned_in_comment
Python
shipments_895.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DROP TABLE refunds;' manually, handled by migration tool
DROP_TABLE
false
DIFF00099999968
general_code_change
Go
logs_703.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999969
raw_sql_safe
SQL
accounts_511.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM customers WHERE price = 'active';
NONE
false
DIFF00099999970
raw_sql_destructive
SQL
events_357.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE employees SET updated_at = CONCAT(updated_at, created_at);
UPDATE_CONCAT
true
DIFF00099999971
mentioned_in_comment
Python
users_257.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM subscriptions;")
DELETE_UNQUALIFIED
false
DIFF00099999972
general_code_change
Ruby
notifications_799.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999973
orm_schema_change
JavaScript
shipments_478.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('comments', table => table.dropColumn('address'))
NONE
true
DIFF00099999974
mentioned_in_comment
Python
tickets_706.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE subscriptions SET score = CONCAT(score, role);")
UPDATE_CONCAT
false
DIFF00099999975
general_code_change
JavaScript
sessions_210.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099999976
general_code_change
Go
inventory_872.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999977
raw_sql_safe
SQL
inventory_263.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE orders SET email = %s WHERE name = %s;
NONE
false
DIFF00099999978
raw_sql_safe
SQL
customers_768.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE transactions SET description = %s WHERE status = %s;
NONE
false
DIFF00099999979
raw_sql_destructive
SQL
shipments_696.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM employees;
DELETE_UNQUALIFIED
true
DIFF00099999980
general_code_change
Ruby
employees_625.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999981
general_code_change
JavaScript
invoices_816.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
DIFF00099999982
orm_schema_change
JavaScript
payments_117.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('comments', table => table.dropColumn('priority'))
NONE
true
DIFF00099999983
orm_schema_change
JavaScript
comments_902.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('transactions', table => table.dropColumn('address'))
NONE
true
DIFF00099999984
general_code_change
Go
reviews_176.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999985
raw_sql_safe
SQL
customers_892.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE tickets ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099999986
raw_sql_destructive
SQL
users_791.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE orders DROP COLUMN priority;
DROP_COLUMN
true
DIFF00099999987
raw_sql_destructive
SQL
comments_609.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE logs DROP COLUMN description;
DROP_COLUMN
true
DIFF00099999988
obfuscated_destructive
SQL
employees_508.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table notifications rename column email to full_name;
ALTER_RENAME
true
DIFF00099999989
general_code_change
Go
reviews_628.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099999990
general_code_change
Ruby
orders_400.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099999991
raw_sql_safe
SQL
comments_517.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE tickets ADD COLUMN user_role VARCHAR(255);
NONE
false
DIFF00099999992
mentioned_in_comment
Python
invoices_958.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'DELETE FROM sessions;' manually, handled by migration tool
DELETE_UNQUALIFIED
false
DIFF00099999993
general_code_change
Python
reviews_286.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099999994
general_code_change
Java
tickets_12.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099999995
general_code_change
TypeScript
employees_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
DIFF00099999996
orm_schema_change
Ruby
shipments_10.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :products, :priority
NONE
true
DIFF00099999997
raw_sql_destructive
SQL
subscriptions_522.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM accounts;
DELETE_UNQUALIFIED
true
DIFF00099999998
general_code_change
JavaScript
refunds_819.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099999999
obfuscated_destructive
SQL
events_105.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table customers drop column phone;
DROP_COLUMN
true