Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 6 new columns ({'length', 'label', 'line', 'code', 'cve', 'cwe'}) and 3 missing columns ({'instruction', 'input', 'output'}).

This happened while the json dataset builder was generating data using

hf://datasets/xuefen/VulResource/bigvul/split/bigvul_0-512_train.json (at revision 0faab253a3195e0bba9200338933ed995ab95f9f)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1870, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 622, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2292, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2240, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              index: int64
              code: string
              line: string
              label: int64
              cwe: string
              cve: string
              length: int64
              -- schema metadata --
              pandas: '{"index_columns": [], "column_indexes": [], "columns": [{"name":' + 889
              to
              {'instruction': Value(dtype='string', id=None), 'input': Value(dtype='string', id=None), 'output': Value(dtype='string', id=None), 'index': Value(dtype='int64', id=None)}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1417, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1049, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 924, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1000, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1741, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1872, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 6 new columns ({'length', 'label', 'line', 'code', 'cve', 'cwe'}) and 3 missing columns ({'instruction', 'input', 'output'}).
              
              This happened while the json dataset builder was generating data using
              
              hf://datasets/xuefen/VulResource/bigvul/split/bigvul_0-512_train.json (at revision 0faab253a3195e0bba9200338933ed995ab95f9f)
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

instruction
string
input
string
output
string
index
int64
Detect whether the following code contains vulnerabilities.
static void wakeup_pipe_readers(struct pipe_inode_info *pipe) { smp_mb(); if (waitqueue_active(&pipe->wait)) wake_up_interruptible(&pipe->wait); kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); }
0
46,400
Detect whether the following code contains vulnerabilities.
static Long Current_Ratio( EXEC_OP ) { if ( CUR.metrics.ratio ) return CUR.metrics.ratio; if ( CUR.GS.projVector.y == 0 ) CUR.metrics.ratio = CUR.metrics.x_ratio; else if ( CUR.GS.projVector.x == 0 ) CUR.metrics.ratio = CUR.metrics.y_ratio; else { Long x, y; x...
0
5,352
Detect whether the following code contains vulnerabilities.
virtual bool MyIpAddress(std::string* ip_address) { my_ip_address_count++; *ip_address = my_ip_address_result; return !my_ip_address_result.empty(); }
0
177,729
Detect whether the following code contains vulnerabilities.
void InputDispatcher::finishDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection, uint32_t seq, bool handled) { #if DEBUG_DISPATCH_CYCLE ALOGD("channel '%s' ~ finishDispatchCycle - seq=%u, handled=%s", connection->getInputChannelName(), seq, toString(handled)); #endif connecti...
0
176,938
Detect whether the following code contains vulnerabilities.
void WebContentsImpl::NotifySwappedFromRenderManager(RenderViewHost* rvh) { NotifySwapped(rvh); if (delegate_) view_->SetOverscrollControllerEnabled(delegate_->CanOverscrollContent()); view_->RenderViewSwappedIn(render_manager_.current_host()); FrameTreeNode* root = NULL; RenderViewHostImpl* new_rvh = ...
0
118,966
Detect whether the following code contains vulnerabilities.
void Gfx::opEndIgnoreUndef(Object args[], int numArgs) { if (ignoreUndef > 0) --ignoreUndef; }
0
8,121
Detect whether the following code contains vulnerabilities.
static void rfcomm_sock_kill(struct sock *sk) { if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket) return; BT_DBG("sk %p state %d refcnt %d", sk, sk->sk_state, atomic_read(&sk->sk_refcnt)); /* Kill poor orphan */ bt_sock_unlink(&rfcomm_sk_list, sk); sock_set_flag(sk, SOCK_DEAD); sock_put(sk); }
0
30,742
Detect whether the following code contains vulnerabilities.
char *bin2hex(const unsigned char *p, size_t len) { ssize_t slen; char *s; slen = len * 2 + 1; if (slen % 4) slen += 4 - (slen % 4); s = (char *)calloc(slen, 1); if (unlikely(!s)) quithere(1, "Failed to calloc"); __bin2hex(s, p, len); return s; }
0
36,558
Detect whether the following code contains vulnerabilities.
status_t HevcParameterSets::parseVps(const uint8_t* data, size_t size) { NALBitReader reader(data, size); reader.skipBits(4); reader.skipBits(1); reader.skipBits(1); reader.skipBits(6); reader.skipBits(1); reader.skipBits(16); if (reader.atLeastNumBitsLeft(96)) { mParams.add(kGeneralP...
0
175,569
Detect whether the following code contains vulnerabilities.
static inline struct inode *orphan_list_entry(struct list_head *l) { return &list_entry(l, struct ext3_inode_info, i_orphan)->vfs_inode; }
0
32,958
Detect whether the following code contains vulnerabilities.
void BackgroundLoaderOffliner::CanDownload( base::OnceCallback<void(bool)> callback) { if (!pending_request_.get()) { std::move(callback).Run(false); // Shouldn't happen though... return; } bool should_allow_downloads = false; Offliner::RequestStatus final_status = Offliner::RequestStatus::L...
0
151,782
Detect whether the following code contains vulnerabilities.
static void nfs4_open_confirm_release(void *calldata) { struct nfs4_opendata *data = calldata; struct nfs4_state *state = NULL; /* If this request hasn't been cancelled, do nothing */ if (data->cancelled == 0) goto out_free; /* In case of error, no cleanup! */ if (!data->rpc_done) goto out_free; state = n...
1
178,866
Detect whether the following code contains vulnerabilities.
FrameLoaderClient::FrameLoaderClient(WebKitWebFrame* frame) : m_frame(frame) , m_policyDecision(0) , m_pluginView(0) , m_hasSentResponseToPlugin(false) { ASSERT(m_frame); }
0
98,271
Detect whether the following code contains vulnerabilities.
WebLocalFrameImpl* WebLocalFrameImpl::CreateMainFrame( WebView* web_view, WebFrameClient* client, InterfaceRegistry* interface_registry, WebFrame* opener, const WebString& name, WebSandboxFlags sandbox_flags) { WebLocalFrameImpl* frame = new WebLocalFrameImpl(WebTreeScopeType::kDocument, ...
0
146,944
Detect whether the following code contains vulnerabilities.
int get_sda(void) { I2C_TRISTATE; return I2C_READ; }
0
89,304
Detect whether the following code contains vulnerabilities.
bool SelectWindow(const aura::Window* window) { if (GetSelectedWindow() == nullptr) SendKey(ui::VKEY_TAB); const aura::Window* start_window = GetSelectedWindow(); if (start_window == window) return true; do { SendKey(ui::VKEY_TAB); } while (GetSelectedWindow() != window && ...
0
145,898
Detect whether the following code contains vulnerabilities.
void drop_inmem_page(struct inode *inode, struct page *page) { struct f2fs_inode_info *fi = F2FS_I(inode); struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct list_head *head = &fi->inmem_pages; struct inmem_pages *cur = NULL; f2fs_bug_on(sbi, !IS_ATOMIC_WRITTEN_PAGE(page)); mutex_lock(&fi->inmem_lock); list_f...
0
85,381
Detect whether the following code contains vulnerabilities.
void SyncBackendHost::Core::DoUpdateCredentials( const SyncCredentials& credentials) { DCHECK(MessageLoop::current() == host_->core_thread_.message_loop()); syncapi_->UpdateCredentials(credentials); }
0
106,312
Detect whether the following code contains vulnerabilities.
FakeWindowEventDispatcher(aura::WindowTreeHost* host) : WindowEventDispatcher(host, true), processed_touch_event_count_(0) {}
0
158,406
Detect whether the following code contains vulnerabilities.
static void resume_send(h2o_http2_conn_t *conn) { if (h2o_http2_conn_get_buffer_window(conn) <= 0) return; #if 0 /* TODO reenable this check for performance? */ if (conn->scheduler.list.size == 0) return; #endif request_gathered_write(conn); }
0
52,578
Detect whether the following code contains vulnerabilities.
static int apparmor_getprocattr(struct task_struct *task, char *name, char **value) { int error = -ENOENT; /* released below */ const struct cred *cred = get_task_cred(task); struct aa_task_cxt *cxt = cred_cxt(cred); struct aa_profile *profile = NULL; if (strcmp(name, "current") == 0) profile = aa_get_newe...
0
51,082
Detect whether the following code contains vulnerabilities.
CustomElementRegistry* LocalDOMWindow::customElements() const { if (!custom_elements_ && document_) custom_elements_ = CustomElementRegistry::Create(this); return custom_elements_; }
0
136,798
Detect whether the following code contains vulnerabilities.
_dbus_header_free (DBusHeader *header) { _dbus_string_free (&header->data); }
0
2,745
Detect whether the following code contains vulnerabilities.
void InspectorNetworkAgent::DidReceiveScriptResponse(unsigned long identifier) { resources_data_->SetResourceType(IdentifiersFactory::RequestId(identifier), InspectorPageAgent::kScriptResource); }
0
151,170
Detect whether the following code contains vulnerabilities.
static s32 brcmf_dongle_roam(struct brcmf_if *ifp) { s32 err; u32 bcn_timeout; __le32 roamtrigger[2]; __le32 roam_delta[2]; /* Configure beacon timeout value based upon roaming setting */ if (ifp->drvr->settings->roamoff) bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_OFF; else bcn_timeout = BRCMF_DEFAULT_BCN...
0
49,065
Detect whether the following code contains vulnerabilities.
static int remove_marked_parents(struct rev_info *revs, struct commit *commit) { struct commit_list **pp, *p; int nth_parent, removed = 0; pp = &commit->parents; nth_parent = 0; while ((p = *pp) != NULL) { struct commit *parent = p->item; if (parent->object.flags & TMP_MARK) { parent->object.flags &= ~TMP_...
0
55,032
Detect whether the following code contains vulnerabilities.
static int dcbnl_setfeatcfg(struct net_device *netdev, struct nlmsghdr *nlh, u32 seq, struct nlattr **tb, struct sk_buff *skb) { struct nlattr *data[DCB_FEATCFG_ATTR_MAX + 1]; int ret, i; u8 value; if (!netdev->dcbnl_ops->setfeatcfg) return -ENOTSUPP; if (!tb[DCB_ATTR_FEATCFG]) return -EINVAL; ret =...
0
31,115
Detect whether the following code contains vulnerabilities.
bool ExtensionAppItem::RunExtensionEnableFlow() { if (extensions::util::IsAppLaunchableWithoutEnabling(extension_id_, profile_)) return false; if (!extension_enable_flow_) { extension_enable_flow_controller_ = GetController(); extension_enable_flow_controller_->OnShowChildDialog(); extension_enabl...
0
134,022
Detect whether the following code contains vulnerabilities.
WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNewWindowAction(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleNavigationActionRef navigationAction, WKURLRequestRef request, WKStringRef frameName, WKTypeRef* userData, const void* clientInfo) { return static_cast<InjectedBundlePage*>(const_cast<vo...
0
115,360
Detect whether the following code contains vulnerabilities.
memory_handle(const media::BitstreamBuffer& input) { base::SharedMemoryHandle input_handle = base::SharedMemory::DuplicateHandle(input.handle()); if (!base::SharedMemory::IsHandleValid(input_handle)) { DLOG(ERROR) << "Failed to duplicate handle of BitstreamBuffer"; return mojo::ScopedSharedBuffe...
1
186,852
Detect whether the following code contains vulnerabilities.
static void gen_helper_in_func(TCGMemOp ot, TCGv v, TCGv_i32 n) { switch (ot) { case MO_8: gen_helper_inb(v, cpu_env, n); break; case MO_16: gen_helper_inw(v, cpu_env, n); break; case MO_32: gen_helper_inl(v, cpu_env, n); break; default: tcg_ab...
0
66,340
Detect whether the following code contains vulnerabilities.
void netdev_rx_handler_unregister(struct net_device *dev) { ASSERT_RTNL(); rcu_assign_pointer(dev->rx_handler, NULL); rcu_assign_pointer(dev->rx_handler_data, NULL); }
0
35,283
Detect whether the following code contains vulnerabilities.
int json_string_set_nocheck(json_t *json, const char *value) { char *dup; json_string_t *string; if(!json_is_string(json) || !value) return -1; dup = jsonp_strdup(value); if(!dup) return -1; string = json_to_string(json); jsonp_free(string->value); string->value = dup;...
0
40,936
Detect whether the following code contains vulnerabilities.
void RenderFrameHostImpl::CreateWebSocket( network::mojom::WebSocketRequest request) { WebSocketManager::CreateWebSocket(process_->GetID(), routing_id_, last_committed_origin_, std::move(request)); }
0
169,149
Detect whether the following code contains vulnerabilities.
static int fwnet_add_peer(struct fwnet_device *dev, struct fw_unit *unit, struct fw_device *device) { struct fwnet_peer *peer; peer = kmalloc(sizeof(*peer), GFP_KERNEL); if (!peer) return -ENOMEM; dev_set_drvdata(&unit->device, peer); peer->dev = dev; peer->guid = (u64)device->config_rom[3] << 32 | devi...
0
49,316
Detect whether the following code contains vulnerabilities.
static enum event_type_t get_event_type(struct perf_event *event) { struct perf_event_context *ctx = event->ctx; enum event_type_t event_type; lockdep_assert_held(&ctx->lock); event_type = event->attr.pinned ? EVENT_PINNED : EVENT_FLEXIBLE; if (!ctx->task) event_type |= EVENT_CPU; return event_type; }
0
85,212
Detect whether the following code contains vulnerabilities.
xsltRegisterPersistRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT) { if ((ctxt == NULL) || (RVT == NULL)) return(-1); RVT->next = (xmlNodePtr) ctxt->persistRVT; if (ctxt->persistRVT != NULL) ctxt->persistRVT->prev = (xmlNodePtr) RVT; ctxt->persistRVT = RVT; return(0); }
0
170,042
Detect whether the following code contains vulnerabilities.
long jas_stream_length(jas_stream_t *stream) { long oldpos; long pos; if ((oldpos = jas_stream_tell(stream)) < 0) { return -1; } if (jas_stream_seek(stream, 0, SEEK_END) < 0) { return -1; } if ((pos = jas_stream_tell(stream)) < 0) { return -1; } if (jas_stream_seek(stream, oldpos, SEEK_SET) < 0) { retu...
0
67,921
Detect whether the following code contains vulnerabilities.
SYSCALL_DEFINE2(timer_gettime, timer_t, timer_id, struct itimerspec __user *, setting) { struct itimerspec64 cur_setting; int ret = do_timer_gettime(timer_id, &cur_setting); if (!ret) { if (put_itimerspec64(&cur_setting, setting)) ret = -EFAULT; } return ret; }
0
85,127
Detect whether the following code contains vulnerabilities.
asmlinkage int __exception do_debug_exception(unsigned long addr, unsigned int esr, struct pt_regs *regs) { const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr); struct siginfo info; if (!inf->fn(addr, esr, regs)) return 1; pr_alert("Unhandled debug exception: %s (0x%08x) at ...
0
58,392
Detect whether the following code contains vulnerabilities.
void CustomDrag::OnDragEnd(GtkWidget* widget, GdkDragContext* drag_context) { delete this; }
0
99,553
Detect whether the following code contains vulnerabilities.
php_mysqlnd_net_field_length_ll(zend_uchar **packet) { register zend_uchar *p= (zend_uchar *)*packet; if (*p < 251) { (*packet)++; return (uint64_t) *p; } switch (*p) { case 251: (*packet)++; return (uint64_t) MYSQLND_NULL_LENGTH; case 252: (*packet) += 3; return (uint64_t) uint2korr(p + 1); ...
0
49,942
Detect whether the following code contains vulnerabilities.
void V8TestObject::UnscopableRuntimeEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_unscopableRuntimeEnabledLongAttribute_Getter"); test_object_v8_internal::UnscopableRuntimeEnabledLongA...
0
147,972
Detect whether the following code contains vulnerabilities.
void Document::ReportFeaturePolicyViolation( mojom::FeaturePolicyFeature feature, mojom::FeaturePolicyDisposition disposition, const String& message) const { if (!RuntimeEnabledFeatures::FeaturePolicyReportingEnabled()) return; LocalFrame* frame = GetFrame(); if (!frame) return; const String...
0
165,456
Detect whether the following code contains vulnerabilities.
bool Textfield::GetCompositionTextRange(gfx::Range* range) const { if (!ImeEditingAllowed()) return false; model_->GetCompositionTextRange(range); return true; }
0
137,187
Detect whether the following code contains vulnerabilities.
static void __perf_event_enable(struct perf_event *event, struct perf_cpu_context *cpuctx, struct perf_event_context *ctx, void *info) { struct perf_event *leader = event->group_leader; struct perf_event_context *task_ctx; if (event->state >= PERF_EVENT_STATE_INACTIVE || event->state <= PERF_EVENT_...
0
68,290
Detect whether the following code contains vulnerabilities.
void refresh_sit_entry(struct f2fs_sb_info *sbi, block_t old, block_t new) { update_sit_entry(sbi, new, 1); if (GET_SEGNO(sbi, old) != NULL_SEGNO) update_sit_entry(sbi, old, -1); locate_dirty_segment(sbi, GET_SEGNO(sbi, old)); locate_dirty_segment(sbi, GET_SEGNO(sbi, new)); }
0
85,416
Detect whether the following code contains vulnerabilities.
void WebLocalFrameImpl::PageSizeAndMarginsInPixels(int page_index, WebDoubleSize& page_size, int& margin_top, int& margin_right, ...
0
147,037
Detect whether the following code contains vulnerabilities.
EventListener* Document::getWindowAttributeEventListener(const AtomicString& eventType, DOMWrapperWorld* isolatedWorld) { DOMWindow* domWindow = this->domWindow(); if (!domWindow) return 0; return domWindow->getAttributeEventListener(eventType, isolatedWorld); }
0
109,688
Detect whether the following code contains vulnerabilities.
P2PQuicTransportTest() {}
0
145,429
Detect whether the following code contains vulnerabilities.
followTab(TabBuffer * tab) { Buffer *buf; Anchor *a; #ifdef USE_IMAGE a = retrieveCurrentImg(Currentbuf); if (!(a && a->image && a->image->map)) #endif a = retrieveCurrentAnchor(Currentbuf); if (a == NULL) return; if (tab == CurrentTab) { check_target = FALSE; followA(); check_target = TR...
0
84,497
Detect whether the following code contains vulnerabilities.
void kvm_vcpu_kick(struct kvm_vcpu *vcpu) { int me; int cpu = vcpu->cpu; if (kvm_vcpu_wake_up(vcpu)) return; me = get_cpu(); if (cpu != me && (unsigned)cpu < nr_cpu_ids && cpu_online(cpu)) if (kvm_arch_vcpu_should_kick(vcpu)) smp_send_reschedule(cpu); put_cpu(); }
0
91,591
Detect whether the following code contains vulnerabilities.
WM_SYMBOL int WildMidi_Shutdown(void) { if (!WM_Initialized) { _WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0); return (-1); } while (first_handle) { /* closes open handle and rotates the handles list. */ WildMidi_Close((struct _mdi *) first_handle->handle)...
0
85,114
Detect whether the following code contains vulnerabilities.
static void msix_clr_pending(PCIDevice *dev, int vector) { *msix_pending_byte(dev, vector) &= ~msix_pending_mask(vector); }
0
15,876
Detect whether the following code contains vulnerabilities.
MockDataWriter* NavigateAndReturnMockWriter(const GURL& url) { content::WebContentsTester* web_contents_tester = content::WebContentsTester::For(web_contents()); EXPECT_TRUE(web_contents_tester); web_contents_tester->NavigateAndCommit(url); return static_cast<MockDataWriter*>(observer_->GetWr...
0
144,769
Detect whether the following code contains vulnerabilities.
bool OmniboxViewViews::ShouldShowPlaceholderText() const { return Textfield::ShouldShowPlaceholderText() && !model()->is_caret_visible() && !model()->is_keyword_selected(); }
1
186,512
Detect whether the following code contains vulnerabilities.
void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, const LayoutRect& rect, BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderObject* backgroundObject) { paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, 0, LayoutSize(), o...
0
124,918
Detect whether the following code contains vulnerabilities.
void PrintODTiming(GF_Terminal *term, GF_ObjectManager *odm, u32 indent) { GF_MediaInfo odi; u32 ind = indent; u32 i, count; if (!odm) return; if (gf_term_get_object_info(term, odm, &odi) != GF_OK) return; if (!odi.od) { fprintf(stderr, "Service not attached\n"); return; } while (ind) { fprintf(stderr, "...
0
92,807
Detect whether the following code contains vulnerabilities.
_XcursorCommentLength (XcursorComment *comment) { return XCURSOR_COMMENT_HEADER_LEN + strlen (comment->comment); }
0
1,420
Detect whether the following code contains vulnerabilities.
String HTMLInputElement::SanitizeValue(const String& proposed_value) const { return input_type_->SanitizeValue(proposed_value); }
0
136,955
Detect whether the following code contains vulnerabilities.
rdp_out_ts_glyphcache_capabilityset(STREAM s) { uint16 supportlvl = GLYPH_SUPPORT_FULL; uint32 fragcache = 0x01000100; out_uint16_le(s, RDP_CAPSET_GLYPHCACHE); out_uint16_le(s, RDP_CAPLEN_GLYPHCACHE); /* GlyphCache - 10 TS_CACHE_DEFINITION structures */ rdp_out_ts_cache_definition(s, 254, 4); rdp_out_ts_cache_d...
0
93,019
Detect whether the following code contains vulnerabilities.
void ecryptfs_put_lower_file(struct inode *inode) { struct ecryptfs_inode_info *inode_info; inode_info = ecryptfs_inode_to_private(inode); if (atomic_dec_and_mutex_lock(&inode_info->lower_file_count, &inode_info->lower_file_mutex)) { filemap_write_and_wait(inode->i_mapping); fput(inode_info->lower_fil...
0
74,573
Detect whether the following code contains vulnerabilities.
static void tcp_ecn_create_request(struct request_sock *req, const struct sk_buff *skb, const struct sock *listen_sk, const struct dst_entry *dst) { const struct tcphdr *th = tcp_hdr(skb); const struct net *net = sock_net(listen_sk); bool th_ecn = th->ece && th->cwr; bool ect, ecn_ok; u32 ecn_...
0
51,540
Detect whether the following code contains vulnerabilities.
void RenderWidgetHostViewAura::UpdateLegacyWin() { if (legacy_window_destroyed_ || !GetHostWindowHWND()) return; if (!legacy_render_widget_host_HWND_) { legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create(GetHostWindowHWND()); } if (legacy_render_widget_host_HWND_) { legac...
0
144,996
Detect whether the following code contains vulnerabilities.
void WebContentsImpl::FriendZone::RemoveCreatedCallbackForTesting( const CreatedCallback& callback) { for (size_t i = 0; i < g_created_callbacks.Get().size(); ++i) { if (g_created_callbacks.Get().at(i).Equals(callback)) { g_created_callbacks.Get().erase(g_created_callbacks.Get().begin() + i); retu...
0
144,634
Detect whether the following code contains vulnerabilities.
void MessageLoop::SetThreadTaskRunnerHandle() { DCHECK_EQ(this, current()); thread_task_runner_handle_.reset(); thread_task_runner_handle_.reset(new ThreadTaskRunnerHandle(task_runner_)); }
0
137,461
Detect whether the following code contains vulnerabilities.
InitializeTemporaryOriginsInfoTask( QuotaManager* manager, UsageTracker* temporary_usage_tracker) : DatabaseTaskBase(manager), has_registered_origins_(false) { DCHECK(temporary_usage_tracker); temporary_usage_tracker->GetCachedOrigins(&origins_); }
0
101,033
Detect whether the following code contains vulnerabilities.
static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) { ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "TestObject", info.Holder(), info.GetIsolate()); TestObject* imp = V8TestObject::toNative(info.Holder()); V8TRYCATCH_EXCEPT...
0
130,828
Detect whether the following code contains vulnerabilities.
void RenderView::OnImeSetComposition( const string16& text, const std::vector<WebKit::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { if (!pepper_delegate_.IsPluginFocused()) { RenderWidget::OnImeSetComposition(text, underlines,...
0
103,818
Detect whether the following code contains vulnerabilities.
static NTSTATUS TCReadWriteDevice (BOOL write, PDEVICE_OBJECT deviceObject, PVOID buffer, LARGE_INTEGER offset, ULONG length) { NTSTATUS status; IO_STATUS_BLOCK ioStatusBlock; PIRP irp; KEVENT completionEvent; ASSERT (KeGetCurrentIrql() <= APC_LEVEL); KeInitializeEvent (&completionEvent, NotificationEvent, FALS...
0
87,213
Detect whether the following code contains vulnerabilities.
void BassSetStrength(EffectContext *pContext, uint32_t strength){ pContext->pBundledContext->BassStrengthSaved = (int)strength; LVM_ControlParams_t ActiveParams; /* Current control Parameters */ LVM_ReturnStatus_en LvmStatus=LVM_SUCCESS; /* Function call status */ /* Get the current settings */ LvmSta...
0
174,808
Detect whether the following code contains vulnerabilities.
jbig2_hd_new(Jbig2Ctx *ctx, const Jbig2PatternDictParams *params, Jbig2Image *image) { Jbig2PatternDict *new; const int N = params->GRAYMAX + 1; const int HPW = params->HDPW; const int HPH = params->HDPH; int i; /* allocate a new struct */ new = jbig2_new(ctx, Jbig2PatternDict, 1); if (...
0
18,035
Detect whether the following code contains vulnerabilities.
bool FrameSelection::ShouldShowBlockCursor() const { return frame_caret_->ShouldShowBlockCursor(); }
0
135,686
Detect whether the following code contains vulnerabilities.
void CompositorImpl::SetWindowBounds(const gfx::Size& size) { if (size_ == size) return; size_ = size; if (host_) { host_->SetViewportSizeAndScale(size_, root_window_->GetDipScale(), GenerateLocalSurfaceId()); } if (display_) display_->Resize(size); if (displ...
0
143,537
Detect whether the following code contains vulnerabilities.
bool LockContentsView::AcceleratorPressed(const ui::Accelerator& accelerator) { auto entry = accel_map_.find(accelerator); if (entry == accel_map_.end()) return false; PerformAction(entry->second); return true; }
0
144,166
Detect whether the following code contains vulnerabilities.
int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, unsigned int cond, snd_pcm_hw_param_t var, const struct snd_pcm_hw_constraint_ratdens *r) { return snd_pcm_hw_rule_add(runtime, cond, var, snd_pcm_hw_rule_ratdens, (void *)r, var, -1); }
0
47,813
Detect whether the following code contains vulnerabilities.
static bool NeedsHistoryItemRestore(WebFrameLoadType type) { return type == WebFrameLoadType::kBackForward || IsReloadLoadType(type); }
0
107,757
Detect whether the following code contains vulnerabilities.
vmcs12_guest_cr0(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { return /*1*/ (vmcs_readl(GUEST_CR0) & vcpu->arch.cr0_guest_owned_bits) | /*2*/ (vmcs12->guest_cr0 & vmcs12->cr0_guest_host_mask) | /*3*/ (vmcs_readl(CR0_READ_SHADOW) & ~(vmcs12->cr0_guest_host_mask | vcpu->arch.cr0_guest_owned_bits)); }
0
37,197
Detect whether the following code contains vulnerabilities.
static int brcmf_dev_pno_config(struct brcmf_if *ifp, struct cfg80211_sched_scan_request *request) { struct brcmf_pno_param_le pfn_param; struct brcmf_pno_macaddr_le pfn_mac; s32 err; u8 *mac_mask; int i; memset(&pfn_param, 0, sizeof(pfn_param)); pfn_param.version = cpu_to_le32(BRCMF_PNO_VERSION); /* set ...
0
49,063
Detect whether the following code contains vulnerabilities.
void AudioRendererHost::SendErrorMessage(int32 render_view_id, int32 stream_id) { ViewMsg_AudioStreamState_Params state; state.state = ViewMsg_AudioStreamState_Params::kError; Send(new ViewMsg_NotifyAudioStreamStateChanged( render_view_id, stream_id, state)); }
0
108,384
Detect whether the following code contains vulnerabilities.
void SimpleSoftOMXComponent::onPortEnable(OMX_U32 portIndex, bool enable) { CHECK_LT(portIndex, mPorts.size()); PortInfo *port = &mPorts.editItemAt(portIndex); CHECK_EQ((int)port->mTransition, (int)PortInfo::NONE); CHECK(port->mDef.bEnabled == !enable); if (!enable) { port->mDef.bEnabled = OMX_F...
0
177,169
Detect whether the following code contains vulnerabilities.
void DefragTrackerRelease(DefragTracker *t) { (void) DefragTrackerDecrUsecnt(t); SCMutexUnlock(&t->lock); }
0
67,833
Detect whether the following code contains vulnerabilities.
bool param_get_location( const char *parameter, MyString &filename, int &line_number) { bool found_it; if (parameter != NULL && extra_info != NULL) { found_it = extra_info->GetParam(parameter, filename, line_number); } else { found_it = false; } return found_it; }
0
16,514
Detect whether the following code contains vulnerabilities.
int phar_open_or_create_zip(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error) /* {{{ */ { phar_archive_data *phar; int ret = phar_create_or_parse_filename(fname, fname_len, alias, alias_len, is_data, options, &phar, error); if (FAILURE == ret)...
0
49,904
Detect whether the following code contains vulnerabilities.
static void mem_cgroup_oom_notify(struct mem_cgroup *memcg) { struct mem_cgroup *iter; for_each_mem_cgroup_tree(iter, memcg) mem_cgroup_oom_notify_cb(iter); }
0
21,100
Detect whether the following code contains vulnerabilities.
bool Document::IsLoadCompleted() { return ready_state_ == kComplete; }
0
146,777
Detect whether the following code contains vulnerabilities.
bool UrlData::IsPreloading() const { return preloading_ > 0 && playing_ == 0; }
0
157,140
Detect whether the following code contains vulnerabilities.
static void deprecatedStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::StaticReadonlyAttribute); TestO...
0
130,725
Detect whether the following code contains vulnerabilities.
void Set(const std::string& addr, int value) { base::AutoLock lock(lock_); map_[addr] = value; }
1
184,416
Detect whether the following code contains vulnerabilities.
unsigned HTMLFormElement::length() const { unsigned len = 0; for (const auto& element : ListedElements()) { if (element->IsEnumeratable()) ++len; } return len; }
0
165,167
Detect whether the following code contains vulnerabilities.
virDomainPMSuspendForDuration(virDomainPtr dom, unsigned int target, unsigned long long duration, unsigned int flags) { virConnectPtr conn; VIR_DOMAIN_DEBUG(dom, "target=%u duration=%llu flags=%x", ta...
0
93,892
Detect whether the following code contains vulnerabilities.
void GLES2DecoderImpl::RestoreStateForNonRenderableTextures() { DCHECK(current_program_); DCHECK(!current_program_->IsDeleted()); const ProgramManager::ProgramInfo::SamplerIndices& sampler_indices = current_program_->sampler_indices(); for (size_t ii = 0; ii < sampler_indices.size(); ++ii) { const Prog...
0
108,141
Detect whether the following code contains vulnerabilities.
FontSelector* OffscreenCanvas::GetFontSelector() { if (auto* document = DynamicTo<Document>(GetExecutionContext())) { return document->GetStyleEngine().GetFontSelector(); } return To<WorkerGlobalScope>(GetExecutionContext())->GetFontSelector(); }
0
165,062
Detect whether the following code contains vulnerabilities.
const URLPatternSet& PermissionsData::default_policy_allowed_hosts() { return default_policy_restrictions.Get().allowed_hosts; }
0
164,430
Detect whether the following code contains vulnerabilities.
void HostCache::Entry::GetStaleness(base::TimeTicks now, int network_changes, EntryStaleness* out) const { DCHECK(out); out->expired_by = now - expires_; out->network_changes = network_changes - network_changes_; out->stale_hits = stale_hit...
0
139,348
Detect whether the following code contains vulnerabilities.
explicit ResourceUsageReporterImpl( mojo::InterfaceRequest<ResourceUsageReporter> req) : binding_(this, req.Pass()) {}
0
133,844
Detect whether the following code contains vulnerabilities.
void install_local_socket(asocket* s) { adb_mutex_lock(&socket_list_lock); s->id = local_socket_next_id++; if (local_socket_next_id == 0) { local_socket_next_id = 1; } insert_local_socket(s, &local_socket_list); adb_mutex_unlock(&socket_list_lock); }
1
188,174
Detect whether the following code contains vulnerabilities.
bool ContentSecurityPolicy::IsValidCSPAttr(const String& attr, const String& context_required_csp) { if (attr.Contains('\n') || attr.Contains('\r')) return false; ContentSecurityPolicy* attr_policy = ContentSecurityPolicy::Create(); attr_policy->AddPolicyFromHeaderV...
0
165,529
Detect whether the following code contains vulnerabilities.
static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val) { int ret; if (!tg3_flag(tp, NVRAM)) return tg3_nvram_read_using_eeprom(tp, offset, val); offset = tg3_nvram_phys_addr(tp, offset); if (offset > NVRAM_ADDR_MSK) return -EINVAL; ret = tg3_nvram_lock(tp); if (ret) return ret; tg3_enable_nvr...
0
32,637
Detect whether the following code contains vulnerabilities.
static int ioperm_active(struct task_struct *target, const struct user_regset *regset) { return target->thread.io_bitmap_max / regset->size; }
0
25,900
End of preview.

We provide pre-processed code vulnerbility detection datasets to facilitate LLM fine-tuning.

Downloads last month
45