<commit_before>#include <stdio.h>

typedef int element_type;

typedef struct node {
	element_type data;
	struct node *next;
} node;

typedef struct node *link_list;

int get_element(link_list l, int i, element_type *e)
{
	link_list p;
	p = l->next;
	int j;
	for (j = 1; p && j < i; j++)
		p = p->next;
	if (!p || j > i)
		return -1;
	*e = p->data;
	return 0;
}<commit_msg>add insert_element function for singly-linked-list<commit_after>#include <stdio.h>

typedef int element_type;

typedef struct node {
	element_type data;
	struct node *next;
} node;

typedef struct node *link_list_node;

int get_element(link_list_node l, int i, element_type *e)
{
	link_list_node p;
	p = l->next;
	int j;
	for (j = 1; p && j < i; j++)
		p = p->next;
	if (!p || j > i)
		return -1;
	*e = p->data;
	return 0;
}

int insert_element(link_list_node *l, int i, element_type e)
{
	link_list_node p, s;
	p = *l;
	int j;
	for (j = 1; p && j < i; j++)
		p = p->next;
	if (!p || j > i)
		return -1;
	s = (link_list_node)malloc(sizeof(node));
	s->data = e;
	s->next = p->next;
	p->next = s;
	return 0;
}
{'fraction_non_alphanumeric': 0.16126042632066728, 'fraction_numerical': 0.008341056533827619, 'mean_word_length': 3.3902439024390243, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 19, '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': '5039375', 'n_tokens_mistral': 494, 'n_tokens_neox': 466, 'n_words': 143}