<commit_before>#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int xarr[8];
    int yarr[argc];
    int x, y, *p, **q;

    p = &x;
    q = &p;
    *q = &y;

    int *ptr;

    ptr = malloc(sizeof(int));

    x = 5;
    *ptr = x;

    y = *ptr;

    if (y != x)
        return EXIT_FAILURE;

    ptr = &x;
    printf("%d", *ptr);
    ptr = &argc;

    int *ptr2 = yarr;

    return EXIT_SUCCESS;
}<commit_msg>Extend memory example.<commit_after>#include <stdio.h>
#include <stdlib.h>

int *ep;
int ep2;
int **ep3;

int main(int argc, char *argv[])
{
    int xarr[8];
    int yarr[argc];
    int x, y, *p, **q;

    p = &x;
    q = &p;
    *q = &y;

    int *ptr;

    ptr = malloc(sizeof(int));

    x = 5;
    *ptr = x;

    y = *ptr;

    if (y != x)
        return EXIT_FAILURE;

    ptr = &x;
    printf("%d", *ptr);
    ptr = &argc;

    int *ptr2 = yarr;

    return EXIT_SUCCESS;
}

void *f1() {            /* constant address */
    int *ptr = (int *) 0xabcd;
    return ptr;
}

void *f2() {            /* global pointer */
    int *ptr = ep;
    int *ptr2 = &ep2;
    int val = *ep;
    int val2 = ep2;
    return ptr;
}

void *f3() {            /* malloc */
    int *ptr = malloc(100 * sizeof(int));
    return ptr;
}

void *f4(int *ptr) {
    return ptr + 5;
}

void *f5() {
    void *(*fp)(int*);

    fp = &f4;
    return fp;
}

void *f6() {
    int **array = malloc(10 * sizeof(int *));

    for (int i = 0; i < 10; i++)
        array[i] = malloc(100 * sizeof(int));

    return array;
}

void foo() {
    void *p, *q, *r, *s, *t;

    p = f1();

    ep = malloc(sizeof(int));
    ep = (int *) p;

    ep2 = (int) &ep;
    *ep3 = ep;

    q = f2();
    r = f3();
    s = f4(q);                  /*  */
    t = f5();

    int **u = f6();

    int *u0 = *u;               /*  */
    int *u1 = u[1];             /*  */
}

void bar(int cond) {
    int x, y, *ptr;

    ptr = cond > 0 ? &x : &y;
}
{'fraction_non_alphanumeric': 0.19514713474445017, 'fraction_numerical': 0.022715539494062985, 'mean_word_length': 1.6475409836065573, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1601083', 'n_tokens_mistral': 855, 'n_tokens_neox': 806, 'n_words': 226}