Unnamed: 0
int64
0
3.2k
func
stringlengths
19
4.9k
target
bool
2 classes
project
stringlengths
11
46
400
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; }
false
buggy_30.sol
401
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; }
false
buggy_30.sol
402
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; return c; }
false
buggy_30.sol
403
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; }
false
buggy_30.sol
404
function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; }
false
buggy_30.sol
405
function setManager(address account, address newManager) external;
false
buggy_30.sol
406
function getManager(address account) external view returns (address);
false
buggy_30.sol
407
function setInterfaceImplementer(address account, bytes32 interfaceHash, address implementer) external;
false
buggy_30.sol
408
function getInterfaceImplementer(address account, bytes32 interfaceHash) external view returns (address);
false
buggy_30.sol
409
function interfaceHash(string calldata interfaceName) external pure returns (bytes32);
false
buggy_30.sol
410
function updateERC165Cache(address account, bytes4 interfaceId) external;
false
buggy_30.sol
411
function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);
false
buggy_30.sol
412
function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);
false
buggy_30.sol
413
function decimals() public pure returns (uint8) { return 18; }
false
buggy_30.sol
414
function claimReward_re_ent18() public { require(redeemableEther_re_ent18[msg.sender] > 0); uint transferValue_re_ent18 = redeemableEther_re_ent18[msg.sender]; msg.sender.transfer(transferValue_re_ent18); redeemableEther_re_ent18[msg.sender] = 0; }
true
buggy_30.sol
415
function withdraw_balances_re_ent29 () public { if (msg.sender.send(balances_re_ent29[msg.sender ])) balances_re_ent29[msg.sender] = 0; }
true
buggy_30.sol
416
function bug_re_ent6() public{ require(not_called_re_ent6); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent6 = false; }
true
buggy_30.sol
417
function buyTicket_re_ent16() public{ if (!(lastPlayer_re_ent16.send(jackpot_re_ent16))) revert(); lastPlayer_re_ent16 = msg.sender; jackpot_re_ent16 = address(this).balance; }
true
buggy_30.sol
418
function withdrawFunds_re_ent24 (uint256 _weiToWithdraw) public { require(balances_re_ent24[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent24[msg.sender] -= _weiToWithdraw; }
true
buggy_30.sol
419
function withdrawBalance_re_ent5() public{ if( ! (msg.sender.send(userBalance_re_ent5[msg.sender]) ) ){ revert(); } userBalance_re_ent5[msg.sender] = 0; }
true
buggy_30.sol
420
function withdraw_balances_re_ent15 () public { if (msg.sender.send(balances_re_ent15[msg.sender ])) balances_re_ent15[msg.sender] = 0; }
true
buggy_30.sol
421
function callme_re_ent28() public{ require(counter_re_ent28<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent28 += 1; }
true
buggy_30.sol
422
function bug_re_ent34() public{ require(not_called_re_ent34); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent34 = false; }
true
buggy_30.sol
423
function callme_re_ent21() public{ require(counter_re_ent21<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent21 += 1; }
true
buggy_30.sol
424
function withdrawFunds_re_ent10 (uint256 _weiToWithdraw) public { require(balances_re_ent10[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent10[msg.sender] -= _weiToWithdraw; }
true
buggy_30.sol
425
function _mint( address operator, address account, uint256 amount, bytes memory userData, bytes memory operatorData ) internal { require(account != address(0), "ERC777: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); _callTokensReceived(operator, address(0), account, amount, userData, operatorData, true); emit Minted(operator, account, amount, userData, operatorData); emit Transfer(address(0), account, amount); }
false
buggy_30.sol
426
function withdraw_balances_re_ent21 () public { (bool success,)= msg.sender.call.value(balances_re_ent21[msg.sender ])(""); if (success) balances_re_ent21[msg.sender] = 0; }
true
buggy_30.sol
427
function _send( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) private { require(from != address(0), "ERC777: send from the zero address"); require(to != address(0), "ERC777: send to the zero address"); _callTokensToSend(operator, from, to, amount, userData, operatorData); _move(operator, from, to, amount, userData, operatorData); _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck); }
false
buggy_30.sol
428
function withdrawBalance_re_ent12() public{ if( ! (msg.sender.send(userBalance_re_ent12[msg.sender]) ) ){ revert(); } userBalance_re_ent12[msg.sender] = 0; }
true
buggy_30.sol
429
function _burn( address operator, address from, uint256 amount, bytes memory data, bytes memory operatorData ) private { require(from != address(0), "ERC777: burn from the zero address"); _callTokensToSend(operator, from, address(0), amount, data, operatorData); _totalSupply = _totalSupply.sub(amount); _balances[from] = _balances[from].sub(amount); emit Burned(operator, from, amount, data, operatorData); emit Transfer(from, address(0), amount); }
false
buggy_30.sol
430
function claimReward_re_ent11() public { require(redeemableEther_re_ent11[msg.sender] > 0); uint transferValue_re_ent11 = redeemableEther_re_ent11[msg.sender]; msg.sender.transfer(transferValue_re_ent11); redeemableEther_re_ent11[msg.sender] = 0; }
true
buggy_30.sol
431
function _move( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData ) private { _balances[from] = _balances[from].sub(amount); _balances[to] = _balances[to].add(amount); emit Sent(operator, from, to, amount, userData, operatorData); emit Transfer(from, to, amount); }
false
buggy_30.sol
432
function withdraw_balances_re_ent1 () public { (bool success,) =msg.sender.call.value(balances_re_ent1[msg.sender ])(""); if (success) balances_re_ent1[msg.sender] = 0; }
true
buggy_30.sol
433
function _approve(address holder, address spender, uint256 value) private { require(spender != address(0), "ERC777: approve to the zero address"); _allowances[holder][spender] = value; emit Approval(holder, spender, value); }
false
buggy_30.sol
434
function bug_re_ent41() public{ require(not_called_re_ent41); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent41 = false; }
true
buggy_30.sol
435
function _callTokensToSend( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData ) private { address implementer = _erc1820.getInterfaceImplementer(from, TOKENS_SENDER_INTERFACE_HASH); if (implementer != address(0)) { IERC777Sender(implementer).tokensToSend(operator, from, to, amount, userData, operatorData); } }
false
buggy_30.sol
436
function callme_re_ent42() public{ require(counter_re_ent42<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent42 += 1; }
true
buggy_30.sol
437
function _callTokensReceived( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) private { address implementer = _erc1820.getInterfaceImplementer(to, TOKENS_RECIPIENT_INTERFACE_HASH); if (implementer != address(0)) { IERC777Recipient(implementer).tokensReceived(operator, from, to, amount, userData, operatorData); } else if (requireReceptionAck) { require(!to.isContract(), "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"); } }
false
buggy_30.sol
438
function buyTicket_re_ent2() public{ if (!(lastPlayer_re_ent2.send(jackpot_re_ent2))) revert(); lastPlayer_re_ent2 = msg.sender; jackpot_re_ent2 = address(this).balance; }
true
buggy_30.sol
439
function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; }
false
buggy_30.sol
440
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; }
false
buggy_30.sol
441
function callme_re_ent35() public{ require(counter_re_ent35<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent35 += 1; }
true
buggy_30.sol
442
function withdrawBalance_re_ent40() public{ (bool success,)=msg.sender.call.value(userBalance_re_ent40[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent40[msg.sender] = 0; }
true
buggy_30.sol
443
function withdrawFunds_re_ent17 (uint256 _weiToWithdraw) public { require(balances_re_ent17[msg.sender] >= _weiToWithdraw); (bool success,)=msg.sender.call.value(_weiToWithdraw)(""); require(success); balances_re_ent17[msg.sender] -= _weiToWithdraw; }
true
buggy_30.sol
444
function isMinter(address account) public view returns (bool) { return _minters.has(account); }
false
buggy_30.sol
445
function buyTicket_re_ent37() public{ if (!(lastPlayer_re_ent37.send(jackpot_re_ent37))) revert(); lastPlayer_re_ent37 = msg.sender; jackpot_re_ent37 = address(this).balance; }
true
buggy_30.sol
446
function addMinter(address account) public onlyMinter { _addMinter(account); }
false
buggy_30.sol
447
function withdrawFunds_re_ent3 (uint256 _weiToWithdraw) public { require(balances_re_ent3[msg.sender] >= _weiToWithdraw); (bool success,)= msg.sender.call.value(_weiToWithdraw)(""); require(success); balances_re_ent3[msg.sender] -= _weiToWithdraw; }
true
buggy_30.sol
448
function renounceMinter() public { _removeMinter(msg.sender); }
false
buggy_30.sol
449
function buyTicket_re_ent9() public{ (bool success,) = lastPlayer_re_ent9.call.value(jackpot_re_ent9)(""); if (!success) revert(); lastPlayer_re_ent9 = msg.sender; jackpot_re_ent9 = address(this).balance; }
true
buggy_30.sol
450
function _addMinter(address account) internal { _minters.add(account); emit MinterAdded(account); }
false
buggy_30.sol
451
function claimReward_re_ent25() public { require(redeemableEther_re_ent25[msg.sender] > 0); uint transferValue_re_ent25 = redeemableEther_re_ent25[msg.sender]; msg.sender.transfer(transferValue_re_ent25); redeemableEther_re_ent25[msg.sender] = 0; }
true
buggy_30.sol
452
function _removeMinter(address account) internal { _minters.remove(account); emit MinterRemoved(account); }
false
buggy_30.sol
453
function withdrawBalance_re_ent19() public{ if( ! (msg.sender.send(userBalance_re_ent19[msg.sender]) ) ){ revert(); } userBalance_re_ent19[msg.sender] = 0; }
true
buggy_30.sol
454
function withdrawBalance_re_ent33() public{ (bool success,)= msg.sender.call.value(userBalance_re_ent33[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent33[msg.sender] = 0; }
true
buggy_30.sol
455
function bug_re_ent27() public{ require(not_called_re_ent27); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent27 = false; }
true
buggy_30.sol
456
function withdrawBalance_re_ent26() public{ (bool success,)= msg.sender.call.value(userBalance_re_ent26[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent26[msg.sender] = 0; }
true
buggy_30.sol
457
function isPauser(address account) public view returns (bool) { return _pausers.has(account); }
false
buggy_30.sol
458
function bug_re_ent20() public{ require(not_called_re_ent20); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent20 = false; }
true
buggy_30.sol
459
function addPauser(address account) public onlyPauser { _addPauser(account); }
false
buggy_30.sol
460
function claimReward_re_ent32() public { require(redeemableEther_re_ent32[msg.sender] > 0); uint transferValue_re_ent32 = redeemableEther_re_ent32[msg.sender]; msg.sender.transfer(transferValue_re_ent32); redeemableEther_re_ent32[msg.sender] = 0; }
true
buggy_30.sol
461
function renouncePauser() public { _removePauser(msg.sender); }
false
buggy_30.sol
462
function withdrawFunds_re_ent38 (uint256 _weiToWithdraw) public { require(balances_re_ent38[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent38[msg.sender] -= _weiToWithdraw; }
true
buggy_30.sol
463
function _addPauser(address account) internal { _pausers.add(account); emit PauserAdded(account); }
false
buggy_30.sol
464
function claimReward_re_ent4() public { require(redeemableEther_re_ent4[msg.sender] > 0); uint transferValue_re_ent4 = redeemableEther_re_ent4[msg.sender]; msg.sender.transfer(transferValue_re_ent4); redeemableEther_re_ent4[msg.sender] = 0; }
true
buggy_30.sol
465
function _removePauser(address account) internal { _pausers.remove(account); emit PauserRemoved(account); }
false
buggy_30.sol
466
function callme_re_ent7() public{ require(counter_re_ent7<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent7 += 1; }
true
buggy_30.sol
467
function withdrawFunds_re_ent31 (uint256 _weiToWithdraw) public { require(balances_re_ent31[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent31[msg.sender] -= _weiToWithdraw; }
true
buggy_30.sol
468
function bug_re_ent13() public{ require(not_called_re_ent13); (bool success,)=msg.sender.call.value(1 ether)(""); if( ! success ){ revert(); } not_called_re_ent13 = false; }
true
buggy_30.sol
469
function buyTicket_re_ent23() public{ if (!(lastPlayer_re_ent23.send(jackpot_re_ent23))) revert(); lastPlayer_re_ent23 = msg.sender; jackpot_re_ent23 = address(this).balance; }
true
buggy_30.sol
470
function paused() public view returns (bool) { return _paused; }
false
buggy_30.sol
471
function callme_re_ent14() public{ require(counter_re_ent14<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent14 += 1; }
true
buggy_30.sol
472
function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(msg.sender); }
false
buggy_30.sol
473
function buyTicket_re_ent30() public{ if (!(lastPlayer_re_ent30.send(jackpot_re_ent30))) revert(); lastPlayer_re_ent30 = msg.sender; jackpot_re_ent30 = address(this).balance; }
true
buggy_30.sol
474
function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(msg.sender); }
false
buggy_30.sol
475
function withdraw_balances_re_ent8 () public { (bool success,) = msg.sender.call.value(balances_re_ent8[msg.sender ])(""); if (success) balances_re_ent8[msg.sender] = 0; }
true
buggy_30.sol
476
function claimReward_re_ent39() public { require(redeemableEther_re_ent39[msg.sender] > 0); uint transferValue_re_ent39 = redeemableEther_re_ent39[msg.sender]; msg.sender.transfer(transferValue_re_ent39); redeemableEther_re_ent39[msg.sender] = 0; }
true
buggy_30.sol
477
function mint(address operator, address account, uint256 amount, bytes memory userData, bytes memory operatorData) public onlyMinter returns (bool) { _mint(operator, account, amount, userData, operatorData); return true; }
false
buggy_30.sol
478
function withdraw_balances_re_ent36 () public { if (msg.sender.send(balances_re_ent36[msg.sender ])) balances_re_ent36[msg.sender] = 0; }
true
buggy_30.sol
479
function add(uint a, uint b) internal pure returns(uint c) { c = a + b; require(c >= a); }
false
buggy_18.sol
480
function sub(uint a, uint b) internal pure returns(uint c) { require(b <= a); c = a - b; }
false
buggy_18.sol
481
function mul(uint a, uint b) internal pure returns(uint c) { c = a * b; require(a == 0 || c / a == b); }
false
buggy_18.sol
482
function div(uint a, uint b) internal pure returns(uint c) { require(b > 0); c = a / b; }
false
buggy_18.sol
483
function limitLessThan(uint a, uint b) internal pure returns(uint c) { if (a > b) return b; return a; }
false
buggy_18.sol
484
function totalSupply() public view returns(uint) { return _totalSupply - balances[address(0)]; }
false
buggy_18.sol
485
function callme_re_ent21() public{ require(counter_re_ent21<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent21 += 1; }
true
buggy_18.sol
486
function balanceOf(address tokenOwner) public view returns(uint balance) { return balances[tokenOwner]; }
false
buggy_18.sol
487
function withdrawFunds_re_ent10 (uint256 _weiToWithdraw) public { require(balances_re_ent10[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent10[msg.sender] -= _weiToWithdraw; }
true
buggy_18.sol
488
function allowance(address tokenOwner, address spender) public view returns(uint remaining) { return allowed[tokenOwner][spender]; }
false
buggy_18.sol
489
function withdraw_balances_re_ent21 () public { (bool success,)= msg.sender.call.value(balances_re_ent21[msg.sender ])(""); if (success) balances_re_ent21[msg.sender] = 0; }
true
buggy_18.sol
490
function transfer(address to, uint tokens) public returns(bool success) { uint toBurn = tokens.mul(burnPercent).div(1000); uint toSend = tokens.sub(toBurn); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(toSend); emit Transfer(msg.sender, to, toSend); balances[address(0)] = balances[address(0)].add(toBurn); emit Transfer(msg.sender, address(0), toBurn); return true; }
false
buggy_18.sol
491
function withdrawBalance_re_ent12() public{ if( ! (msg.sender.send(userBalance_re_ent12[msg.sender]) ) ){ revert(); } userBalance_re_ent12[msg.sender] = 0; }
true
buggy_18.sol
492
function approve(address spender, uint tokens) public returns(bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
false
buggy_18.sol
493
function claimReward_re_ent11() public { require(redeemableEther_re_ent11[msg.sender] > 0); uint transferValue_re_ent11 = redeemableEther_re_ent11[msg.sender]; msg.sender.transfer(transferValue_re_ent11); redeemableEther_re_ent11[msg.sender] = 0; }
true
buggy_18.sol
494
function transferFrom(address from, address to, uint tokens) public returns(bool success) { uint toBurn = tokens.mul(burnPercent).div(1000); uint toSend = tokens.sub(toBurn); balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(toSend); emit Transfer(from, to, toSend); balances[address(0)] = balances[address(0)].add(toBurn); emit Transfer(from, address(0), toBurn); return true; }
false
buggy_18.sol
495
function withdraw_balances_re_ent1 () public { (bool success,) =msg.sender.call.value(balances_re_ent1[msg.sender ])(""); if (success) balances_re_ent1[msg.sender] = 0; }
true
buggy_18.sol
496
function withdrawBalance_re_ent33() public{ (bool success,)= msg.sender.call.value(userBalance_re_ent33[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent33[msg.sender] = 0; }
false
buggy_18.sol
497
function bug_re_ent27() public{ require(not_called_re_ent27); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent27 = false; }
false
buggy_18.sol
498
function receiveApproval(address from, uint256 tokens, address token, bytes memory data) public;
false
buggy_18.sol
499
function bug_re_ent41() public{ require(not_called_re_ent41); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent41 = false; }
false
buggy_18.sol