Dataset Viewer
Auto-converted to Parquet Duplicate
rem
stringlengths
0
83.5k
add
stringlengths
0
223k
context
stringlengths
10
471k
meta
stringlengths
120
236
unsigned32 regno, unsigned32 value
uint32_t regno, uint32_t value
void erc32_sonic_write_register( void *base, unsigned32 regno, unsigned32 value){ volatile unsigned32 *p = base;#if (SONIC_DEBUG & SONIC_DEBUG_PRINT_REGISTERS) printf( "%p Write 0x%04x to %s (0x%02x)\n", &p[regno], value, SONIC_Reg_name[regno], regno ); fflush( stdout );#endif p[regno] = 0x0ffff & v...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1be1e913564b73bf50ce1aa58c003e564ddae83a/erc32sonic.c/buggy/c/src/lib/libbsp/sparc/erc32/erc32sonic/erc32sonic.c
volatile unsigned32 *p = base;
volatile uint32_t *p = base;
void erc32_sonic_write_register( void *base, unsigned32 regno, unsigned32 value){ volatile unsigned32 *p = base;#if (SONIC_DEBUG & SONIC_DEBUG_PRINT_REGISTERS) printf( "%p Write 0x%04x to %s (0x%02x)\n", &p[regno], value, SONIC_Reg_name[regno], regno ); fflush( stdout );#endif p[regno] = 0x0ffff & v...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1be1e913564b73bf50ce1aa58c003e564ddae83a/erc32sonic.c/buggy/c/src/lib/libbsp/sparc/erc32/erc32sonic/erc32sonic.c
return Flx_renormalize(res,lg(res));
return FlxX_renormalize(res,lg(res));
FlxqX_Flxq_mul(GEN P, GEN U, GEN T, ulong p){ int i, lP = lg(P); GEN res = cgetg(lP,t_POL); res[1] = P[1]; for(i=2; i<lP; i++) res[i] = (long)Flxq_mul(U,(GEN)P[i], T,p); return Flx_renormalize(res,lg(res));}
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/f3ec8a59d89f1785548e82595e87bd99224ed762/Flx.c/buggy/src/basemath/Flx.c
for (i=2; i<ly; i++) z[i] = (long) FpX_add((GEN)x[i], (GEN)y[i], p);
for (i=2; i<ly; i++) z[i] = (long) Fq_add((GEN)x[i], (GEN)y[i], NULL, p);
FpXX_add(GEN x, GEN y, GEN p){ long i,lz; GEN z; long lx=lg(x); long ly=lg(y); if (ly>lx) swapspec(x,y, lx,ly); lz = lx; z = cgetg(lz, t_POL); z[1]=x[1]; for (i=2; i<ly; i++) z[i] = (long) FpX_add((GEN)x[i], (GEN)y[i], p); for ( ; i<lx; i++) z[i] = (long) gcopy((GEN)x[i]); return FpXX_renormalize(z, lz);}
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/819c29b05ce2b9ff19e5d336713ce0753f46d652/polarit3.c/clean/src/basemath/polarit3.c
#define base vmeUniverse0BaseAddr
cfgUniversePort( unsigned long ismaster, unsigned long port, unsigned long address_space, unsigned long vme_address, unsigned long local_address, unsigned long length){#define base vmeUniverse0BaseAddrvolatile LERegister *preg;unsigned long p=port;unsigned long mode=0; /* check parameters */ if (port >= (ismaster ? UNI...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/784e792a04c600b79d535ad81a5ba32b4f4de33e/vmeUniverse.c/clean/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c
else
else
cfgUniversePort( unsigned long ismaster, unsigned long port, unsigned long address_space, unsigned long vme_address, unsigned long local_address, unsigned long length){#define base vmeUniverse0BaseAddrvolatile LERegister *preg;unsigned long p=port;unsigned long mode=0; /* check parameters */ if (port >= (ismaster ? UNI...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/784e792a04c600b79d535ad81a5ba32b4f4de33e/vmeUniverse.c/clean/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c
#undef base
cfgUniversePort( unsigned long ismaster, unsigned long port, unsigned long address_space, unsigned long vme_address, unsigned long local_address, unsigned long length){#define base vmeUniverse0BaseAddrvolatile LERegister *preg;unsigned long p=port;unsigned long mode=0; /* check parameters */ if (port >= (ismaster ? UNI...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/784e792a04c600b79d535ad81a5ba32b4f4de33e/vmeUniverse.c/clean/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c
x += 2; y += 2; dz = dx-dy;
dz = dx-dy;
u_FpX_divrem(GEN x, GEN y, ulong p, int malloc, GEN *pr){ GEN z,q,c; long dx,dy,dz,i,j; ulong p1,inv; dy = deg(y); if (!dy) { if (pr) { if (pr == ONLY_REM) return u_zeropol(malloc); *pr = u_zeropol(malloc); } if (y[2] == 1UL) return u_copy(x,malloc); return u_FpX_Fp_mul(x, u_invmod(y[2], ...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/8fb106e433493a99b7b083a32bc824515ed57d1c/polarit3.c/buggy/src/basemath/polarit3.c
c = u_copy(x-2, malloc);
c = u_copy(x, malloc);
u_FpX_divrem(GEN x, GEN y, ulong p, int malloc, GEN *pr){ GEN z,q,c; long dx,dy,dz,i,j; ulong p1,inv; dy = deg(y); if (!dy) { if (pr) { if (pr == ONLY_REM) return u_zeropol(malloc); *pr = u_zeropol(malloc); } if (y[2] == 1UL) return u_copy(x,malloc); return u_FpX_Fp_mul(x, u_invmod(y[2], ...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/8fb106e433493a99b7b083a32bc824515ed57d1c/polarit3.c/buggy/src/basemath/polarit3.c
x += 2; y += 2;
u_FpX_divrem(GEN x, GEN y, ulong p, int malloc, GEN *pr){ GEN z,q,c; long dx,dy,dz,i,j; ulong p1,inv; dy = deg(y); if (!dy) { if (pr) { if (pr == ONLY_REM) return u_zeropol(malloc); *pr = u_zeropol(malloc); } if (y[2] == 1UL) return u_copy(x,malloc); return u_FpX_Fp_mul(x, u_invmod(y[2], ...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/8fb106e433493a99b7b083a32bc824515ed57d1c/polarit3.c/buggy/src/basemath/polarit3.c
GEN a = gzero, b = gzero;
GEN a = gzero, b = gzero, run = realun(DEFAULTPREC);
ZY_ZXY_ResBound(GEN A, GEN B){ ulong av = avma; GEN a = gzero, b = gzero; long i , lA = lgef(A), lB = lgef(B); for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i])); for (i=2; i<lB; i++) { GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t)); } b = mulii(gpowgs(a, deg(B)), gpow...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/8fb106e433493a99b7b083a32bc824515ed57d1c/polarit3.c/buggy/src/basemath/polarit3.c
for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i]));
for (i=2; i<lA; i++) a = gadd(a, gmul(gsqr((GEN)A[i]),run));
ZY_ZXY_ResBound(GEN A, GEN B){ ulong av = avma; GEN a = gzero, b = gzero; long i , lA = lgef(A), lB = lgef(B); for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i])); for (i=2; i<lB; i++) { GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t)); } b = mulii(gpowgs(a, deg(B)), gpow...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/8fb106e433493a99b7b083a32bc824515ed57d1c/polarit3.c/buggy/src/basemath/polarit3.c
GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t));
GEN t = gmul((GEN)B[i], run); if (typ(t) == t_POL) t = gnorml1(t, 0); b = gadd(b, gsqr(t));
ZY_ZXY_ResBound(GEN A, GEN B){ ulong av = avma; GEN a = gzero, b = gzero; long i , lA = lgef(A), lB = lgef(B); for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i])); for (i=2; i<lB; i++) { GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t)); } b = mulii(gpowgs(a, deg(B)), gpow...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/8fb106e433493a99b7b083a32bc824515ed57d1c/polarit3.c/buggy/src/basemath/polarit3.c
b = mulii(gpowgs(a, deg(B)), gpowgs(b, deg(A))); return gerepileupto(av, addis(racine(b), 1));
b = gmul(gpowgs(a, deg(B)), gpowgs(b, deg(A))); avma = av; return 1 + (gexpo(b)>>1);
ZY_ZXY_ResBound(GEN A, GEN B){ ulong av = avma; GEN a = gzero, b = gzero; long i , lA = lgef(A), lB = lgef(B); for (i=2; i<lA; i++) a = addii(a, sqri((GEN)A[i])); for (i=2; i<lB; i++) { GEN t = (GEN)B[i]; if (typ(t) != t_INT) t = gnorml1(t, 0); b = addii(b, sqri(t)); } b = mulii(gpowgs(a, deg(B)), gpow...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/8fb106e433493a99b7b083a32bc824515ed57d1c/polarit3.c/buggy/src/basemath/polarit3.c
if ( !temp_loc.ops->utime_h )
if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc );
int utime( const char *path, const struct utimbuf *times){ rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) return -1; if ( !temp_loc.ops->utime_h ) set_errno_and_return_minus_one( ENOTSUP )...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/efb5450a87d50c53584d361c92d5928098233f58/utime.c/clean/cpukit/libcsupport/src/utime.c
}
int utime( const char *path, const struct utimbuf *times){ rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) return -1; if ( !temp_loc.ops->utime_h ) set_errno_and_return_minus_one( ENOTSUP )...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/efb5450a87d50c53584d361c92d5928098233f58/utime.c/clean/cpukit/libcsupport/src/utime.c
while (( off < sizeof(buf) ) && ( uread(BSP_UART_COM1, LSR) & DR )) { buf[off++] = uread(BSP_UART_COM1, RBR);
while (( off < sizeof(buf) ) && ( uread(BSP_UART_COM2, LSR) & DR )) { buf[off++] = uread(BSP_UART_COM2, RBR);
BSP_uart_termios_read_com2(int uart){ int off = (int)0; char buf[40]; /* read current byte */ while (( off < sizeof(buf) ) && ( uread(BSP_UART_COM1, LSR) & DR )) { buf[off++] = uread(BSP_UART_COM1, RBR); } /* write out data */ if ( off > 0 ) { rtems_termios_enqueue_raw_characters(termios_ttyp_com2, ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/b9ff276c358906706798417185a88f59facb8293/uart.c/buggy/c/src/lib/libbsp/i386/shared/comm/uart.c
unsigned32 buf_size = 0;
uint32_t buf_size = 0;
void fileio_read_file(void){ char fname[1024]; char tmp_str[32]; unsigned32 buf_size = 0; size_t curr_pos; int fd = -1; ssize_t n; rtems_interval start_tick,curr_tick,ticks_per_sec; char *bufptr = NULL; boolean failed = FALSE; printf(" =========================\n"); printf(" READ FILE ... \n");...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/4c84d7b760ceb1e140c1cfc0fa64289ca4d243ed/init.c/buggy/testsuites/samples/fileio/init.c
boolean fileio_str2size(const char *str,unsigned32 *res_ptr)
boolean fileio_str2size(const char *str,uint32_t *res_ptr)
boolean fileio_str2size(const char *str,unsigned32 *res_ptr){ boolean failed = FALSE; unsigned long size; char suffix = ' '; if (1 > sscanf(str,"%lu%c",&size,&suffix)) { failed = TRUE; } else if (toupper(suffix) == 'K') { size *= 1024; } else if (toupper(suffix) == 'M') { size *= 1024UL*1024UL; } els...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/4c84d7b760ceb1e140c1cfc0fa64289ca4d243ed/init.c/buggy/testsuites/samples/fileio/init.c
unsigned32 flen = 0;
uint32_t flen = 0;
void fileio_list_file(void){ char fname[1024]; char *buf_ptr = NULL; unsigned32 flen = 0; int fd = -1; ssize_t n; size_t buf_size = 100; rtems_interval start_tick,curr_tick,ticks_per_sec; printf(" =========================\n"); printf(" LIST FILE ... \n"); printf(" =========================\n"); f...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/4c84d7b760ceb1e140c1cfc0fa64289ca4d243ed/init.c/buggy/testsuites/samples/fileio/init.c
dst = strdup(src);
if (src) dst = strdup(src);
void *bootp_strdup_realloc(char *dst,const char *src){ size_t len; void *realloc(void * __r, size_t __size); if (dst == NULL) { /* first allocation, simply use strdup */ dst = strdup(src); } else { /* already allocated, so use realloc/strcpy */ len = strlen(src) + 1; dst = realloc(dst,len); if ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/7ac73e6ee2af1a0bcdcccf76344e60db558efe9a/bootp_subr.c/buggy/cpukit/libnetworking/nfs/bootp_subr.c
len = strlen(src) + 1;
len = src ? strlen(src) + 1 : 0; /* src == NULL tells us to effectively free dst */
void *bootp_strdup_realloc(char *dst,const char *src){ size_t len; void *realloc(void * __r, size_t __size); if (dst == NULL) { /* first allocation, simply use strdup */ dst = strdup(src); } else { /* already allocated, so use realloc/strcpy */ len = strlen(src) + 1; dst = realloc(dst,len); if ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/7ac73e6ee2af1a0bcdcccf76344e60db558efe9a/bootp_subr.c/buggy/cpukit/libnetworking/nfs/bootp_subr.c
so->so_rcv.sb_flags |= SB_WAIT;
so->so_snd.sb_flags |= SB_WAIT;
socket_select (struct socket *so, int which, rtems_id tid){ switch (which) { case FREAD: if (soreadable(so)) return (1); so->so_rcv.sb_flags |= SB_WAIT; so->so_rcv.sb_sel.si_pid = tid; break; case FWRITE: if (sowriteable(so)) return (1); so->so_rcv.sb_flags |= SB_WAIT; so->so_snd.sb_sel.si_pid = tid; break;...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/182813e16485b2fba25923cc7be23b3acb73382c/rtems_select.c/clean/cpukit/libnetworking/rtems/rtems_select.c
unsigned32 count;
uint32_t count;
nvram_driver_write(rtems_device_major_number major, rtems_device_minor_number minor, void *arg){ rtems_libio_rw_args_t *args = arg; unsigned32 count; i2c_bus_number bus = DS1307_I2C_BUS_NUMBER; i2c_address addr = DS1307_I2C_ADDRESS; i2c_message_status status; ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/b7044dc94e1e4ee9f69ad6841e60c9602d5ea86b/nvram.c/buggy/c/src/lib/libbsp/m68k/mcf5206elite/nvram/nvram.c
rtems_unsigned8 buf[DS1307_NVRAM_SIZE + 1];
uint8_t buf[DS1307_NVRAM_SIZE + 1];
nvram_driver_write(rtems_device_major_number major, rtems_device_minor_number minor, void *arg){ rtems_libio_rw_args_t *args = arg; unsigned32 count; i2c_bus_number bus = DS1307_I2C_BUS_NUMBER; i2c_address addr = DS1307_I2C_ADDRESS; i2c_message_status status; ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/b7044dc94e1e4ee9f69ad6841e60c9602d5ea86b/nvram.c/buggy/c/src/lib/libbsp/m68k/mcf5206elite/nvram/nvram.c
volatile rtems_unsigned8 *VME_interrupt_enable; rtems_unsigned8 value;
volatile uint8_t *VME_interrupt_enable; uint8_t value;
void VME_interrupt_Enable ( VME_interrupt_Mask mask /* IN */){ volatile rtems_unsigned8 *VME_interrupt_enable; rtems_unsigned8 value;#if 0 VME_interrupt_enable = ACC_VIE;#else VME_interrupt_enable = 0;#endif value = *VME_interrupt_enable; value |= mask; /* turn on interr...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/ed9e44994265d3dccca845c7aade2f634184c339/vmeintr.c/clean/c/src/lib/libbsp/powerpc/dmv177/startup/vmeintr.c
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc)
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN u, GEN gell, long rc)
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc){ long i, l = lg(cycgen); GEN y, logdisc, b; y = isprincipalgenforce(bnfz,id); logdisc = gmod((GEN)y[1], gell); b = to_famat_all((GEN)y[2], gun); for (i=rc+1; i<l; i++) { GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell); b = famat...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/73929b165be3dc8f342788321bf5a06394a0cf3d/kummer.c/clean/src/modules/kummer.c
GEN y, logdisc, b;
GEN logdisc, b, y = isprincipalgenforce(bnfz,id);
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc){ long i, l = lg(cycgen); GEN y, logdisc, b; y = isprincipalgenforce(bnfz,id); logdisc = gmod((GEN)y[1], gell); b = to_famat_all((GEN)y[2], gun); for (i=rc+1; i<l; i++) { GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell); b = famat...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/73929b165be3dc8f342788321bf5a06394a0cf3d/kummer.c/clean/src/modules/kummer.c
y = isprincipalgenforce(bnfz,id);
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc){ long i, l = lg(cycgen); GEN y, logdisc, b; y = isprincipalgenforce(bnfz,id); logdisc = gmod((GEN)y[1], gell); b = to_famat_all((GEN)y[2], gun); for (i=rc+1; i<l; i++) { GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell); b = famat...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/73929b165be3dc8f342788321bf5a06394a0cf3d/kummer.c/clean/src/modules/kummer.c
GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell);
GEN e = modii(mulii((GEN)logdisc[i],(GEN)u[i]), gell);
isprincipalell(GEN bnfz, GEN id, GEN cycgen, GEN uu, GEN gell, long rc){ long i, l = lg(cycgen); GEN y, logdisc, b; y = isprincipalgenforce(bnfz,id); logdisc = gmod((GEN)y[1], gell); b = to_famat_all((GEN)y[2], gun); for (i=rc+1; i<l; i++) { GEN e = modii(mulii((GEN)logdisc[i],(GEN)uu[i]), gell); b = famat...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/73929b165be3dc8f342788321bf5a06394a0cf3d/kummer.c/clean/src/modules/kummer.c
return &prototab[i];
return (struct protoent *) &prototab[i];
getprotobynumber (int proto){ int i; for (i = 0 ; i < (sizeof prototab / sizeof prototab[0]) ; i++) { if (proto == prototab[i].p_proto) return &prototab[i]; } return NULL;}
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/ff0f694d466fb114c185bf464811658f97d012f1/getprotoby.c/clean/c/src/libnetworking/lib/getprotoby.c
if (*analyseur == '"') bp = readstring_i(bp, &buf,&limit); else bp = expand_string(bp, &buf,&limit);
bp = expand_string(bp, &buf,&limit);
identifier(void){ long m, i, matchcomma, deriv; gpmem_t av; char *ch1; entree *ep; GEN res, newfun, ptr; mark.identifier = analyseur; ep = entry(); if (EpVALENCE(ep)==EpVAR || EpVALENCE(ep)==EpGVAR) { /* optimized for simple variables */ switch (*analyseur) { case ')': case ',': return (GEN)ep->value...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/62a31d7cdb146350310e18b922ba1239df4ca90e/anal.c/buggy/src/language/anal.c
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi)
slotFor (Triv121PgTbl pt, unsigned long vsid, unsigned long pi)
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
int i; unsigned long hash,api; PTE pte;
int i; unsigned long hash, api; APte pte;
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
/* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found a free PTE; mark it as potentially used and return */ pte->h=0; /* found by the primary hash fn */ pte->marked...
/* primary hash */ hash = PTE_HASH1 (vsid, pi); api = API (pi); /* linear search thru all buckets for this hash */ for (i = 0, pte = ptegOf (pt, hash); i < PTE_PER_PTEG; i++, pte++) { if (!pte->v && !pte->marked) { /* found a free PTE; mark it as potentially used and return */ pte->h = 0; /* found by the ...
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
/* Strange: if the hash table was allocated big enough, * this should not happen (when using a 1:1 mapping) * Give them some information... */ PRINTF("## First hash bucket full - "); dumpPteg(vsid,pi,hash);
/* Strange: if the hash table was allocated big enough, * this should not happen (when using a 1:1 mapping) * Give them some information... */ PRINTF ("## First hash bucket full - "); dumpPteg (vsid, pi, hash);
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
hash = PTE_HASH2(hash);
hash = PTE_HASH2 (hash);
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
PRINTF(" Secondary pteg is 0x%08x\n", (unsigned)ptegOf(pt,hash));
PRINTF (" Secondary pteg is 0x%08x\n", (unsigned) ptegOf (pt, hash));
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* mark this pte as potentially used */ pte->marked=1; pte->h=1; return pte; } }
for (i = 0, pte = ptegOf (pt, hash); i < PTE_PER_PTEG; i++, pte++) { if (!pte->v && !pte->marked) { /* mark this pte as potentially used */ pte->marked = 1; pte->h = 1; return pte; } }
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
/* Even more strange - most likely, something is REALLY messed up */ PRINTF("## Second hash bucket full - "); dumpPteg(vsid,pi,hash);
/* Even more strange - most likely, something is REALLY messed up */ PRINTF ("## Second hash bucket full - "); dumpPteg (vsid, pi, hash);
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
return 0;
return 0;
slotFor(Triv121PgTbl pt, unsigned long vsid, unsigned long pi){int i;unsigned long hash,api;PTE pte; /* primary hash */ hash = PTE_HASH1(vsid,pi); api=API(pi); /* linear search thru all buckets for this hash */ for (i=0, pte=ptegOf(pt,hash); i<PTE_PER_PTEG; i++,pte++) { if (!pte->v && !pte->marked) { /* found ...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/1b1b43ccc1a6d654199ddb6329366d2e44bdaea3/pte121.c/clean/c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
printf( "gettimeofday: %s", ctime( &tv.tv_sec ) );
a_time_t = tv.tv_sec; /* ctime() takes a time_t */ printf( "gettimeofday: %s", ctime( &a_time_t) );
void check_a_tod( rtems_time_of_day *the_tod){ rtems_status_code status; rtems_time_of_day new_tod; time_t a_time_t; struct timeval tv; struct tm *a_tm; int result; int i = 0; print_time( "rtems_clock_set ", the_tod, "\n" ); status = rtems_clock_set( t...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/bfded728ec4c912f666df94867c118a1004b0165/test.c/buggy/c/src/tests/psxtests/psxtime/test.c
ulong M_2 = h->M << 1; long x = 0, count = 0;
long x = 0, count = 0, M_2 = h->M << 1;
mpqs_eval_sieve(mpqs_handle_t *h){ ulong M_2 = h->M << 1; long x = 0, count = 0; /* XX Todo: replace the following by an auto-adjusting threshold driven * XX by histogram yield measurements */ unsigned char th = h->sieve_threshold; unsigned char *sieve_array = h->sieve_array; long *candidates = h->candidates; ...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/f2ea9bd32cba7fad43082b848508b3e81edfea5d/mpqs.c/clean/src/modules/mpqs.c
GEN g = mppgcd(Qx, kN);
GEN g = gcdii(Qx, kN);
mpqs_eval_candidates(GEN A, GEN inv_A4, GEN B, GEN kN, long k, double sqrt_kN, long *FB, long *start_1, long *start_2, ulong M, long bin_index, long *candidates, long number_of_candidates, long lp_bound, long start_index_FB_for_A, FILE *FREL, FILE *LPREL) /* NB FREL, LPREL are ac...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/2edc82b0d172402925241429eca01a236af8dd01/mpqs.c/clean/src/modules/mpqs.c
if (pi < h->index0_FB) {
if ((mpqs_int32_t)pi < h->index0_FB) {
mpqs_eval_cand(mpqs_handle_t *h, long number_of_cand, FILE *FREL, FILE *LPREL) /* NB FREL, LPREL are actually FNEW, LPNEW when we get called */{ pari_sp av; long number_of_relations = 0; char *relations = h->relations; long *relaprimes = h->relaprimes; ulong i, pi; mpqs_FB_entry_t *FB = h->FB; GEN A =...
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/f2ea9bd32cba7fad43082b848508b3e81edfea5d/mpqs.c/clean/src/modules/mpqs.c
idpowred(GEN x, GEN n) { return idealpowred(static_OBJ, x, n, 0); }
idpowred(void *nf, GEN x, GEN n) { return idealpowred((GEN) nf, x, n, 0); }
idpowred(GEN x, GEN n) { return idealpowred(static_OBJ, x, n, 0); }
2195 /local/tlutelli/issta_data/temp/c/2005_temp/2005/2195/d5847452a0a61f4b94c584ee5aed865e7709a077/polarit2.c/clean/src/basemath/polarit2.c
int minor, const char *buf,
int minor, const char *buf,
MG5UART_STATIC int mg5uart_write_support_polled( int minor, const char *buf, int len){ int nwrite = 0; /* * poll each byte in the string out of the port. */ while (nwrite < len) { /* * transmit character */ mg5uart_write_polled(minor, *buf++); nwrite++; } /* * return the...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/2e7ed911d7a99274d5268498a3466de06f580d8a/mg5uart.c/buggy/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c
while (nwrite < len) { /* * transmit character */
while (nwrite < len) {
MG5UART_STATIC int mg5uart_write_support_polled( int minor, const char *buf, int len){ int nwrite = 0; /* * poll each byte in the string out of the port. */ while (nwrite < len) { /* * transmit character */ mg5uart_write_polled(minor, *buf++); nwrite++; } /* * return the...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/2e7ed911d7a99274d5268498a3466de06f580d8a/mg5uart.c/buggy/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c
progname = *argv;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/48cdb95aa2444a386a911be1a8251483d79a9935/rtemsmain.c/buggy/c/src/libnetworking/pppd/rtemsmain.c
status = EXIT_OK;
pppd_status = EXIT_OK;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/48cdb95aa2444a386a911be1a8251483d79a9935/rtemsmain.c/buggy/c/src/libnetworking/pppd/rtemsmain.c
kill_link = 0;
pppd_kill_link = 0;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/48cdb95aa2444a386a911be1a8251483d79a9935/rtemsmain.c/buggy/c/src/libnetworking/pppd/rtemsmain.c
status = EXIT_OPEN_FAILED;
pppd_status = EXIT_OPEN_FAILED;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/48cdb95aa2444a386a911be1a8251483d79a9935/rtemsmain.c/buggy/c/src/libnetworking/pppd/rtemsmain.c
status = EXIT_INIT_FAILED;
pppd_status = EXIT_INIT_FAILED;
static struct timeval *timeleft __P((struct timeval *));static void holdoff_end __P((void *));static int device_script __P((int, int, char *));extern char *ttyname __P((int));extern char *getlogin __P((void));int pppdmain __P((int, char *[]));/* * PPP Data Link Layer "protocol" table. * One entry per supported protocol...
10355 /local/tlutelli/issta_data/temp/c/2005_temp/2005/10355/48cdb95aa2444a386a911be1a8251483d79a9935/rtemsmain.c/buggy/c/src/libnetworking/pppd/rtemsmain.c
End of preview. Expand in Data Studio

Dataset Card for CoCoNuT-C(2005)

Dataset Summary

Part of the data used to train the models in the "CoCoNuT: Combining Context-Aware Neural Translation Models using Ensemble for Program Repair" paper. These datasets contain raw data extracted from GitHub, GitLab, and Bitbucket, and have neither been shuffled nor tokenized. The year in the dataset’s name is the cutting year that shows the year of the newest commit in the dataset.

Languages

  • C

Dataset Structure

Data Fields

The dataset consists of 4 columns: add, rem, context, and meta. These match the original dataset files: add.txt, rem.txt, context.txt, and meta.txt.

Data Instances

There is a mapping between the 4 columns for each instance. For example:

5 first rows of rem (i.e., the buggy line/hunk):

1 public synchronized StringBuffer append(char ch)
2 ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this;
3 public String substring(int beginIndex, int endIndex)
4 if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex;  return new String(value, beginIndex + offset, len, (len << 2) >= value.length);
5 public Object next() {

5 first rows of add (i.e., the fixed line/hunk):

1 public StringBuffer append(Object obj)
2 return append(obj == null ? "null" : obj.toString());
3 public String substring(int begin)
4 return substring(begin, count);
5 public FSEntry next() {

These map to the 5 instances:

- public synchronized StringBuffer append(char ch)
+ public StringBuffer append(Object obj)
- ensureCapacity_unsynchronized(count + 1); value[count++] = ch; return this;
+ return append(obj == null ? "null" : obj.toString());
- public String substring(int beginIndex, int endIndex)
+ public String substring(int begin)
- if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) throw new StringIndexOutOfBoundsException(); if (beginIndex == 0 && endIndex == count) return this; int len = endIndex - beginIndex;  return new String(value, beginIndex + offset, len, (len << 2) >= value.length);
+ return substring(begin, count);
- public Object next() {
+ public FSEntry next() { 

context contains the associated "context". Context is the (in-lined) buggy function (including the buggy lines and comments). For example, the context of

public synchronized StringBuffer append(char ch)

is its associated function:

public synchronized StringBuffer append(char ch)  {    ensureCapacity_unsynchronized(count + 1);    value[count++] = ch;    return this;  }

meta contains some metadata about the project:

1056	/local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/StringBuffer.java/buggy/core/src/classpath/java/java/lang/StringBuffer.java

1056 is the project id. /local/... is the absolute path to the buggy file. This can be parsed to extract the commit id: 68a6301301378680519f2b146daec37812a1bc22, the file name: StringBuffer.java and the original path within the project core/src/classpath/java/java/lang/StringBuffer.java

Number of projects Number of Instances
12,577 2,735,506

Dataset Creation

Curation Rationale

Data is collected to train automated program repair (APR) models.

Citation Information

@inproceedings{lutellierCoCoNuTCombiningContextaware2020,
  title = {{{CoCoNuT}}: Combining Context-Aware Neural Translation Models Using Ensemble for Program Repair},
  shorttitle = {{{CoCoNuT}}},
  booktitle = {Proceedings of the 29th {{ACM SIGSOFT International Symposium}} on {{Software Testing}} and {{Analysis}}},
  author = {Lutellier, Thibaud and Pham, Hung Viet and Pang, Lawrence and Li, Yitong and Wei, Moshi and Tan, Lin},
  year = {2020},
  month = jul,
  series = {{{ISSTA}} 2020},
  pages = {101--114},
  publisher = {{Association for Computing Machinery}},
  address = {{New York, NY, USA}},
  doi = {10.1145/3395363.3397369},
  url = {https://doi.org/10.1145/3395363.3397369},
  urldate = {2022-12-06},
  isbn = {978-1-4503-8008-9},
  keywords = {AI and Software Engineering,Automated program repair,Deep Learning,Neural Machine Translation}
}
Downloads last month
102

Collection including h4iku/coconut_c2005