MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / build_parallel_fixture

Function build_parallel_fixture

tests/repro/repro_issue842.c:164–192  ·  view source on GitHub ↗

Build the >50-file fixture into files[]/name_bufs[]/body_bufs[] (caller * arrays sized k_nfiles + REPRO842_FILLER_COUNT). Returns total file count. * Caller frees name_bufs/body_bufs entries [k_nfiles..total). */

Source from the content-addressed store, hash-verified

162 * arrays sized k_nfiles + REPRO842_FILLER_COUNT). Returns total file count.
163 * Caller frees name_bufs/body_bufs entries [k_nfiles..total). */
164static int build_parallel_fixture(RFile *files, char **name_bufs, char **body_bufs) {
165 int n = 0;
166 for (int i = 0; i < k_nfiles; i++) {
167 files[n++] = k_files[i];
168 }
169 for (int i = 0; i < REPRO842_FILLER_COUNT; i++) {
170 char *name = malloc(REPRO842_NAME_SZ);
171 char *body = malloc(REPRO842_BODY_SZ);
172 if (!name || !body) {
173 free(name);
174 free(body);
175 break;
176 }
177 snprintf(name, REPRO842_NAME_SZ, "owner/Filler%02d.java", i);
178 snprintf(body, REPRO842_BODY_SZ,
179 "package org.example.owner;\n"
180 "\n"
181 "public class Filler%02d {\n"
182 " private int value%02d;\n"
183 "}\n",
184 i, i);
185 name_bufs[n] = name;
186 body_bufs[n] = body;
187 files[n].name = name;
188 files[n].content = body;
189 n++;
190 }
191 return n;
192}
193
194/* ── Helper: collect distinct inbound-edge source file_paths for a node ──── */
195

Callers 1

repro_issue842.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected