Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
code
stringlengths
2
2.01M
language
stringclasses
1 value
/* * Copyright 2010, Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
C
/* Copyright (C) 2007 Eric Blake * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. * * Modifications for Android written Jul 2009 by Alan Viverette */ /* FUNCTION <<fmemopen>>---open a stream around a fixed-length string INDEX fmemopen ...
C
/* Copyright (C) 2007 Eric Blake * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. * * Modifications for Android written Jul 2009 by Alan Viverette */ /* FUNCTION <<open_memstream>>---open a write stream around an arbitrary-length string ...
C
#ifndef LEPTONICA__STDIO_H #define LEPTONICA__STDIO_H #ifndef BUILD_HOST #include <stdio.h> #include <stdint.h> typedef struct cookie_io_functions_t { ssize_t (*read)(void *cookie, char *buf, size_t n); ssize_t (*write)(void *cookie, const char *buf, size_t n); int (*seek)(void *cookie, off_t *pos, int when...
C
/* Copyright (C) 2007 Eric Blake * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. * * Modifications for Android written Jul 2009 by Alan Viverette */ /* FUNCTION <<fopencookie>>---open a stream with custom callbacks INDEX fopencookie A...
C
/* * Copyright 2010, Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
C
/* * Copyright 2010, Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
C
/* --------------------------------------------------------------------------- Copyright (c) 2003, Dominik Reichl <dominik.reichl@t-online.de>, Germany. All rights reserved. Distributed under the terms of the GNU General Public License v2. This software is provided 'as is' with no explicit or implied warr...
C
/* ___________________________________________________ Opcode Length Disassembler. Coded By Ms-Rem ( Ms-Rem@yandex.ru ) ICQ 286370715 --------------------------------------------------- 12.08.2005 - fixed many bugs... 09.08.2005 - fixed bug with 0F BA opcode. 07.08.2005 - added SSE, SSE2, SSE3 and ...
C
#ifndef _LDASM_ #define _LDASM_ #ifdef __cplusplus extern "C" { #endif unsigned long __fastcall SizeOfCode(void *Code, unsigned char **pOpcode); unsigned long __fastcall SizeOfProc(void *Proc); char __fastcall IsRelativeCmd(unsigned char *pOpcode); #ifdef __cplusplus } #endif #endif
C
#ifndef __NONAME_UNDOCUMENT_H__ #define __NONAME_UNDOCUMENT_H__ #include <ntifs.h> #define IMAGE_DIRECTORY_ENTRY_EXPORT 0 typedef struct _IMAGE_EXPORT_DIRECTORY { ULONG Characteristics; ULONG TimeDateStamp; USHORT MajorVersion; USHORT MinorVersion; ULONG Name; ULONG Base; ULONG Numb...
C
#ifndef __SECTOR_MON_H__ #define __SECTOR_MON_H__ #include <ntifs.h> #include <Ntddvol.h> #define DEVICE_TYPE_CTRL 0 #define DEVICE_TYPE_FILTER 1 typedef struct _DISK_FLT_DEVICE_EXT { ULONG DeviceType; PDEVICE_OBJECT FilterDeviceObject; PDEVICE_OBJECT LowerDeviceObject; PDEVICE_OBJECT Physic...
C
#include "SectorMon.h" BOOLEAN StartFilter = FALSE; BOOLEAN InitFilter = FALSE; NTFS_BOOT_SEC BootSec; GLOBAL_CONTEXT GlobalContext = {0}; USHORT BytesPerSector = 512; NTSTATUS RecoverBootStatus() { NTSTATUS ns; HANDLE FileHandle; OBJECT_ATTRIBUTES oa; IO_STATUS_BLOCK Iob; LARGE_INTEGER Offset =...
C
#ifndef INCLUDES_H #define INCLUDES_H // Application properties #include "Properties.h" /* Common includes for classes */ #include <QApplication> #include <QObject> #include <QDebug> // GUI /*#include <QSplashScreen> #include <QLabel> #include <QMessageBox> #include <QCheckBox> #include <QFil...
C
#include "Python.h" #include "structmember.h" #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TYPE) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #endif #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #define PyInt_F...
C
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MP...
C
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MP...
C
#pragma once // The following macros define the minimum required platform. The minimum required platform // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run // your application. The macros work by enabling all features available on platform versions up to and /...
C
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MP...
C
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MP...
C
//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by npactivex.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTRO...
C
#ifndef _HOOK_H_ #define _HOOK_H_ typedef struct _HOOKINFO_ { PBYTE Stub; DWORD CodeLength; LPVOID FuncAddr; LPVOID FakeAddr; }HOOKINFO, *PHOOKINFO; VOID HEInitHook(PHOOKINFO HookInfo, LPVOID FuncAddr, LPVOID FakeAddr); BOOL HEStartHook(PHOOKINFO HookInfo); BOOL HEStopHook(PHOOKINFO HookInfo); #en...
C
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * t...
C
/* * Copyright 2002 Damien Miller <djm@mindrot.org> All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this lis...
C
/* * Copyright (c) 2007 Damien Miller. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditi...
C
End of preview. Expand in Data Studio

C-Code-Large

C-Code-Large is a large-scale corpus of C programming language source code comprising more than 4 million code samples stored in .jsonl format. The dataset is designed to support research and development in large language model (LLM) pretraining, static analysis, systems programming, and software engineering automation for the C ecosystem.

By offering a high-volume, language-focused dataset, C-Code-Large enables targeted experimentation in low-level programming, memory-constrained environments, and performance-critical systems, where C continues to be a dominant language.

C-Code-Large addresses the lack of large, curated, C-specific datasets, making it possible to conduct focused research on procedural programming paradigms, manual memory management, and system-level abstractions.


1. Dataset Composition

Programming Language

C (ANSI C / C89 / C99 / C11 variants)

Total Size

4M+ C code samples

File Format

.jsonl (JSON Lines)

Each entry typically contains structured representations of:

  • Source code snippets
  • Full C source files
  • Header files

2. Content Overview

The dataset captures a wide spectrum of C programming constructs, ranging from foundational syntax to advanced system-level patterns.

2.1 Core Language Features

  • Functions and declarations
  • Function pointers
  • Recursion
  • Macros and preprocessor directives (#define, #ifdef, etc.)
  • Header inclusion patterns
  • Inline functions (compiler-dependent)
  • Typedef usage
  • Enumeration types (enum)
  • Structs and unions
  • Bit fields

2.2 Procedural Programming Paradigm

  • Modular function design

  • Separation of interface and implementation via headers

  • Control flow constructs:

    • if, else
    • switch
    • loops (for, while, do-while)
  • Error handling via return codes and flags


2.3 Memory Management

  • Manual memory allocation (malloc, calloc, realloc, free)
  • Stack vs heap allocation patterns
  • Pointer arithmetic
  • Double pointers and multi-level indirection
  • Memory safety patterns
  • Buffer management techniques
  • Common pitfalls (e.g., dangling pointers, leaks)

2.4 Data Structures

  • Arrays (static and dynamic)
  • Linked lists (singly, doubly)
  • Stacks and queues
  • Trees and graph representations
  • Hash tables (custom implementations)
  • Circular buffers
  • Struct-based abstractions

3. Intended Research Applications

3.1 Pretraining

  • Training C-specific foundation models
  • Continued pretraining for code LLMs
  • Tokenizer design for low-level languages
  • Domain adaptation for systems programming

3.2 Fine-Tuning and Adaptation

  • Code completion engines for C
  • Intelligent IDE assistants
  • Automated refactoring tools
  • Conversational programming agents
  • Static analysis enhancement models

3.3 Code Intelligence Tasks

  • Code summarization
  • Code-to-text generation
  • Documentation generation
  • Bug detection (e.g., null dereferences, memory leaks)
  • Security vulnerability detection (e.g., buffer overflows)
  • Clone detection
  • Code similarity analysis
  • Dead code detection
  • Complexity estimation
  • Pointer and memory flow analysis

4. Key Advantages

  • Large-scale: Millions of real-world C code samples
  • Language-specific: Focused purely on C (no cross-language noise)
  • Diverse: Covers multiple domains and coding styles
  • Research-ready: Suitable for ML pipelines and static analysis tools

Thanks to open source community for all the guidance & support!!

Downloads last month
676