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

Function build_parallel_fixture

tests/repro/repro_issue787.c:166–194  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

repro_issue787.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected