index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · spinellis codequal march 2, 2006 15:54 524 index...

40
Spinellis codequal March 2, 2006 15:54 Index |, operator, 47 ||, operator, 47, 329 ++, operator, 407 -flag, see the flag under the corresponding command -name, see the name under the corresponding letter /flag, see the flag under the corresponding command 16-bit, 297 2038, 49 64-bit, 297 6x10.h, sample, 71 80/20 rule, 163 8086, 210, 297, 301, 359 >>, operator, 47 [...], 11 ##, operator, 294 #, C library, 313 $name, see the name under the corresponding letter %name, see the name under the corresponding letter &&, operator, 47, 329 &, operator, 47 _, 74 _name, see the name under the corresponding letter abap, 434 abi, see application binary interface absorption errors, floating-point, 491 Abstract Windowing Toolkit, 308 AbstractDatabaseAction.java, sample, 31 abstraction, 401 polymorphic, 406 abstractness, 348 AbstractTextSerializer.java, sample, 395 Access, see Microsoft Access access control, 420 access control list, 139 AccessController, Java class, 141 access, Unix-specific function, 113, 114, 115, 121 acct, Unix-specific function, 138 accuracy, floating-point, 5, 465 ace, 275 ace, sample, 275 acl, 138 acm Queue, 100 acm Turing Award, 469 acos, function, 477, 496 acosh, C library, 496 ActionCopy.java, sample, 409 ActionSettings.java, sample, 375 ActionTest.java, sample, 434 activation record, 265 active class, 11 ad hoc polymorphism, 406, 407 Ada, 434, 499 adaptability, software, 7 adddi3.c, sample, 413 Addr.i, sample, 277, 279 Address Windowing Extensions, 237 AF_Unix, Unix-specific identifier, 140 af_ZA, 314 afferent couplings, 344 AfxLoadLibrary, Win32 sdk, 119 523

Upload: others

Post on 14-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index

|, operator, 47||, operator, 47, 329++, operator, 407-flag, see the flag under the corresponding

command-name, see the name under the corresponding

letter/flag, see the flag under the corresponding

command16-bit, 2972038, 4964-bit, 2976x10.h, sample, 7180/20 rule, 1638086, 210, 297, 301, 359>>, operator, 47[...], 11##, operator, 294#, C library, 313$name, see the name under the corresponding

letter%name, see the name under the corresponding

letter&&, operator, 47, 329&, operator, 47_, 74_name, see the name under the corresponding

letter

abap, 434abi, see application binary interfaceabsorption errors, floating-point, 491Abstract Windowing Toolkit, 308AbstractDatabaseAction.java, sample, 31

abstraction, 401polymorphic, 406

abstractness, 348AbstractTextSerializer.java, sample, 395Access, see Microsoft Accessaccess control, 420access control list, 139AccessController, Java class, 141access, Unix-specific function, 113, 114, 115,

121acct, Unix-specific function, 138accuracy, floating-point, 5, 465ace, 275ace, sample, 275acl, 138acm Queue, 100acm Turing Award, 469acos, function, 477, 496acosh, C library, 496ActionCopy.java, sample, 409ActionSettings.java, sample, 375ActionTest.java, sample, 434activation record, 265active class, 11ad hoc polymorphism, 406, 407Ada, 434, 499adaptability, software, 7adddi3.c, sample, 413Addr.i, sample, 277, 279Address Windowing Extensions, 237AF_Unix, Unix-specific identifier, 140af_ZA, 314afferent couplings, 344AfxLoadLibrary, Win32 sdk, 119

523

Page 2: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

524 Index

aggregate data types, 213aggregation association, 12agile software development, 4, 15, 456aio_write, Unix-specific function, 136ajax, 308algorithm complexity, 173alignment restriction, 298, 303AllPermission, Java class, 142Alloc.c, sample, 439alloca, C library, 274alloca, Unix-specific function, 273, 294Alpha, 210alternative presentation, 313ambiguity, 397ambiguity, coupling, 396amd, 13amd.c, sample, 431amd64, 210amd, Unix-specific command, 83, 431analyzability

error, 325software, 7, 325, 351

annotations, 22, 30, 146announce.c, sample, 179ansi, 209, 312antiregressive activities, 325, 331antlr, 18Any.cpp, sample, 26aop, 408Apache, 64, 79, 88, 160, 175, 228, 245, 280Apache Tomcat, 344api, 56, 58, 115, 237, 395, 425, see also under

the name of the specific api (e.g.,Win32)

API, portability, 308apispy, Windows-specific command, 160, 161application binary interface, 49, 294, 306application programming interface, see apiapplication server, 52ApplicationDispatcher.java, sample, 85apprentice.c, sample, 257ar_io.c, sample, 370arbitrary-precision facility, 50arch, sample, 301architecture, processor, 296

Argo.java, sample, 72ArgoEventPump.java, sample, 426ArgoParser.java, sample, 74, 153ArgoSecurityManager.java, sample, 140args.c, sample, 417arith.t, sample, 441arith.y, sample, 18arithmetic.c, sample, 84arm-32, 181, 210arm7tdmi, 217array, 26ArrayIndexOutOfBoundsException,

Java exception, 75, 107, 359array.h, sample, 74ArrayList, Java class, 426art_affine.c, sample, 479ascii, 309, 428ascii art, 69asin, function, 496aspect-oriented programming, 408assembly code, 13, 223, 387assertFalse, Java method, 434assertNotNull, Java method, 434assertNull, Java method, 434assertTrue, Java method, 434assert, C library, 445assertion, 45, 445, 496, 498AssertionError, Java exception, 445assignment operator, 34, 36association navigation, 11ast_module.cpp, sample, 407asymmetric ranges, 26, 100, 402asymptotic behavior, 177at.c, sample, 143atan, function, 477atanh, C library, 496atanh, function, 477atapi, 159ATM_Addr.cpp, sample, 35atomic operation, 112atomic, system call, 24atomicity, 92attack

buffer overflow, 111, 229denial-of-service, 68, 105, 134, 253

Page 3: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 525

local, 104social engineering, 125sql injection, 126stack smashing, 111timing, 124

attractiveness, software, 5attributes, class, 22, 30AudioPermission, Java class, 142AuthPermission, Java class, 142auth.c, sample, 57AuthenticatorBase.java, sample, 358autil.c, sample, 83autoconf, Unix-specific command, 294, 323automount daemon, 83, 431average-case complexity, 174awd.c, sample, 86awe, 237awk, Unix-specific command, 248, 269, 294,

310awt, 308AWTPermission, Java class, 142

backdoor, 144backup copy, 91BackupWrite, Win32 sdk, 137bandwidth, 151, 207banked memory, 236banner.c, sample, 69, 70, 117banner, Unix-specific command, 69, 117Basic, 27basic data types, 209basic_perf.cpp, sample, 68bc, Unix-specific command, 477, 488bench.cpp, sample, 438benign cancellation, 489biased, exponent, 474big-endian, 298big-Oh notation, 173BigDecimal, Java class, 50, 480binary file format, 153binary search, 173, 177bind, Unix-specific command, 188bit and, 47, 212bit or, 47, 212bitmapped fit, 253

bitwise complement, 212black-box testing, 433blacklisting, 125Block Started by Symbol, 229blocking, 189Boolean, 210, 211Boolean and, 47Boolean expressions, 372boot sector, 385bottom-up analysis, 405bottom-up integration, 437bpb.h, sample, 299branch coverage, 442break, allocated memory, 240break, keyword, 371bridge, 410bsd_video.c, sample, 244bsearch.c, sample, 173bss, 229bt_delete.c, sample, 365bt_open.c, sample, 29btree.h, sample, 29bubble sort, 153buddy system, 253buffer, 195buffer overflow, 75, 106, 115, 128, 229buffer overrun, see buffer overflowBufferedWriter, Java class, 24bugs, see errorsbuilder, 410busy-wait, 189byte ordering, 29, 298byte swapping, 300byte, Java keyword, 211byte, type, 49bytecode, 454bzip.cpp, sample, 76

C argument passing convention, 267C identifier

DBL_EPSILON, 473DEBUG, 450FE_DIVBYZERO, 496FE_INVALID, 496FE_OVERFLOW, 496

Page 4: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

526 Index

FE_UNDERFLOW, 496FLT_EPSILON, 473LDBL_EPSILON, 473NDEBUG, 445, 450NULL, 59, 424SIGFPE, 498, 499

C library#, 313acosh, 496alloca, 274assert, 445atanh, 496crypt, 136currency_symbol, 314decimal_point, 314errno.h, 293errno, 64, 143, 292execl, 267fclose, 291fgets, 171, 310fgetwc, 310FILE, 388fmod, 477, 496fopen, 291, 394fprintf, 118, 167, 291fputwc, 310frac_digits, 314free, 37, 136, 256, 274fscanf, 116, 291, 446gets, 116grouping, 314hypot, 482int_curr_symbol, 314int_frac_digits, 314isalnum, 175, 176, 180isdigit, 175, 291islower, 175isupper, 175, 394lgamma, 496localeconv, 313localeconv, 167log10, 489, 496log1p, 496log2, 496logb, 496

main, 433malloc, 36, 45, 76, 136, 143, 229, 238,

239, 240, 254, 255, 256, 258, 260,299

mblen, 310mbstowcs, 310mbtowc, 310memchr, 167memcmp, 180memcpy, 180memset, 136mon_decimal_point, 314mon_grouping, 314mon_thousands_sep, 314n_cs_precedes, 314n_sep_by_space, 314n_sign_posn, 314negative_sign, 314new, 299p_cs_precedes, 314p_sep_by_space, 314p_sign_posn, 314perror, 185positive_sign, 314pow, 484printf, 24, 118, 125, 126, 147, 267,

303, 313, 317, 428, 449putchar, 394qsort, 153rand, 122realloc, 136, 256, 258regexec, 260res_send, 89scanf, 20, 116setlocale, 313, 318signal.h, 294sin, 180size_t, 294snprintf, 116, 167sprintf, 116, 167sscanf, 116stdarg.h, 298stdio, 201, 388strcat, 116, 117strchr, 171

Page 5: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 527

strcmp, 180, 370strcol, 294strcoll, 315strcpy, 115, 116, 117, 130, 394strdup, 36strftime, 313strncat, 116strncpy, 116strtok, 381strtol, 291system, 119, 120, 121, 229tgamma, 496thousands_sep, 314tmpfile, 115, 121, 122tmpnam, 121toupper, 291vfprintf, 167, 168, 294, 298vfscanf, 116vscanf, 116vsnprintf, 116vsprintf, 116wcscat, 310wcscmp, 310wcscpy, 310wcslen, 310wcstombs, 310wctomb, 310wprintf, 310wscanf, 310see also function

C preprocessor, see preprocessorC preprocessor directive

#error, 304#if, 304#pragma, 220

C++ keyword, see keywordC++ library, vector, 76C++ method, end, 26C++ operator, see operatorC99, 33, 180, 280, 313, 429, 481, 495C# keyword, see keyword

decimal, 480internal, 420namespace, 420private, 420

protected, 420public, 420, 421

C# operator, see operatorcache, 194, 233cache replacement policies, 199cache.c, sample, 199Cache.java, sample, 197, 198caching, 194, 208call, 264, 267call by reference, 59call graph, 166callback, 189callback function, 426calling convention, 306cancellation, 487Capability Maturity Model Integration, 4capacity, 152, 207case, keyword, 328, 367, 447cat.c, sample, 152, 184, 313cat, Unix-specific command, 152, 184, 269,

310, 316catastrophic cancellation, 489catch, Java keyword, 67catclose, Unix-specific function, 317catgets, Unix-specific function, 316, 317catopen, Unix-specific function, 316cbc.c, sample, 383cbo, 336, 409cbrt.c, sample, 484ccmalloc, 259cd9660_vfsops.c, sample, 33CDR_Array_Test.cpp, sample, 234chain of responsibility, 410challenge/response, 123changeability, 7, 326, 403CharToOem, Win32 sdk, 116char, keyword, 310, 312char, type, 51, 211, 309character device, 242character set, 309charts, 13chat2.pl, sample, 82checkPermission, Java method, 140, 141checkRead, Java method, 140check.cpp, sample, 437

Page 6: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

528 Index

checkpoint, 91CheckStyle, 332, 463checksum, 85children, 167chmod, Unix-specific function, 112, 113chroot, Unix-specific function, 133, 147chunking, 352cifs, 103cil, 301circular buffer, 112cisc, 217ckjm, 342cl /Op, 494clarity, code, 153class data, 224class field, 228class, Java keyword, 79ClassCastException, Java exception, 426ClassdiagramLayouter.java, sample, 401,

423client/server, 103client, sample, 131close, Java method, 66, 67close, Unix-specific function, 66, 183, 184,

189, 195, 291closed, 466closedir, Unix-specific function, 291, 424CloseFile, Win32 sdk, 291clr, 163cmd, Windows-specific command, 120cmds.c, sample, 172cmmi, 4cmp, Unix-specific command, 242cmsMath.c, sample, 484CoImpersonateClient, Win32 sdk, 134cocoon, sample, 450code attributes, see quality attributescode bloat, 274, 276, 278, 279code entropy, 326code page, 309code portability, see portabilitycode review, 397code standards, see guidelinesCodeGenerator.java, sample, 362CodeSwitcher.java, sample, 19, 67

coding standards, see guidelinescoexistence, 7cohesion, 375, 462collating sequence, 313Collator, Java class, 315Collection, Java interface, 214Column.java, sample, 328, 416ColumnDescriptor.java, sample, 47.com, file extension, 120command, Windows-specific command, 120commented-out code, 362comments, 329, 360, 361, 364, 366, 389, 390,

392, 393, 400, 405, 417, 432, 496commit point, 92commit privilege, 451commit windows, 451common coupling, 72, 383, 396, 421Common Intermediate Language, 301common.c, sample, 243common.h, sample, 277Communications of the ACM, 100, 462CompareString, Win32 sdk, 315compare, Java method, 315compatibility layer, 295compile-time assertions, 428compile-time error, 425, 428compiler, 302compiler bugs, 302compiler extensions, 303Compiler.java, sample, 382compliance, software subcharacteristic, 5composition association, 12comprehensibility, code’s, 352, 403compress, sample, 352computation errors, 42COMSPEC, environment variable, 121concurrency problems, 51concurrency utilities, 52Concurrent Versions System, see cvsConcurrentHashMap, Java method, 55cond.t, sample, 444condition coverage, 442condition synchronization, 52conditional compilation, 39config-chorus.h, sample, 430

Page 7: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 529

config-linux-common.h, sample, 304config.h, 293config_h.SH, sample, 293ConfigurationHandler.java, sample, 480configure, Unix-specific command, 293connect, Unix-specific function, 186, 187conservative garbage collection, 262consistency, program’s, 353const, keyword, 294const, type, 228constant, portable configuration, 291Containers_T.cpp, sample, 302Containers_T.h, sample, 407content coupling, 387, 397content-scrambling system, 124context handle, 124context switch, 52, 182, 193, 205, 228, 377ContextConfig.java, sample, 411continue, keyword, 371control coupling, 380conventions, see guidelinesconvolution, 176copy constructor, 34, 36CopyFile, Win32 sdk, 137core dump, 281correct input, 19correctness, software’s, 397cos, function, 477coupling, 336, 377

afferent, 344common, 72, 383, 396, 421content, 387, 397control, 380data, 377, 396domain, 409dynamic, 409efferent, 344external, 385, 424stamp, 378static, 409temporal, 381

coupling between object classes, 336, 408cp.c, sample, 266, 267, 268cp, sample, 158cp, Unix-specific command, 158, 241

CPU time, 151, 157CPU-bound, 163Cray, 441crc, 199, 200, 202CreateEnhMetaFile, Win32 sdk, 137CreateFileMapping, Win32 sdk, 241CreateFileMapping, Win32 sdk, 137, 241,

245CreateMailslot, Win32 sdk, 137CreateProcessAsSuser, Win32 sdk, 139CreateProcessAsUser, Win32 sdk, 104, 119CreateProcess, Win32 sdk, 119, 139CreateRestrictedToken, Win32 sdk, 139CREATESTRUCT, Win32 sdk, 427CreateFile, Win32 sdk, 189, 295credits, 503, 569critical section, 52cross-compiling, 455CryptCreateHash, Win32 sdk, 124CryptGenRandom, Win32 sdk, 123crypt.c, sample, 44, 300crypt, C library, 136crypt, Unix-specific function, 123CScout, 248, 269csh.h, sample, 396csh, sample, 396csh, Unix-specific command, 396css, 124ctype.h, sample, 175, 180ctype_.c, sample, 175currency_symbol, C library, 314curses, Unix-specific function, 294cuserid, Unix-specific function, 124cvs, 331, 343cyclic dependencies, 349cyclic redundancy check, 199cyclomatic complexity, 328, 333, 432, 442

dac, 134daemons, 185, 449data abstraction, 419, 423, 425data coupling, 377, 396data hiding, 419data input, 17data type, 423

Page 8: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

530 Index

data-handling, 69database log, 63, 87database server, 65database systems, 92Database.java, sample, 337, 342, 389DatabaseInformation.java, sample, 358DatabaseManager.java, sample, 339DatabaseManager, Java class, 166DatabaseMetaData, Java interface, 333, 334,

439Date, 313DateFormat, Java class, 315db, Unix-specific function, 214, 277, 286DBL_EPSILON, C identifier, 473dbm, Unix-specific function, 294DBWriter.java, sample, 62dc, Unix-specific command, 355dde, 137DdeAddData, Win32 sdk, 137DdeImpersonateClient, Win32 sdk, 139de_DE, 314deadlock, 51debug information, 280DEBUG, C identifier, 450debugging information, 229decimal, C# keyword, 480decimal_point, C library, 314decision tree, 442decorated names, 306decorator pattern, 462DefaultContext.java, sample, 209defensive coding, 446defined, 293DelegatingListener.java, sample, 224, 225DelegationPermission, Java class, 142delete, operator, 37, 256demand loading, 242demand.c, sample, 200Demeter’s Law, 410, 463denial-of-service attack, 68, 105, 253denormal value, 475dependency analysis, 455dependency, code, 377dependency isolation, 290, 291, 301, 308dependency metrics, 343

dependency relationship, 12depth of inheritance tree, 334design pattern, 54, 409, 410, 462

bridge, 410builder, 410chain of responsibility, 410decorator, 462double-checked locking, 54factory method, 410iterator, 410mediator, 410memento, 410observer, 462singleton, 375strategy, 31, 410template method, 410visitor, 410, 462

design, project, 397design review, 397design, sample, 398Design, sample, 401Designer.java, sample, 21, 384destructor, 34, 36/dev/mem, filename, 244/dev/random, filename, 123development branch, 451device drivers, 105df.c, sample, 50, 421dfa.c, sample, 402dgl_dlldemodat.h, sample, 74dgl_dllguicontrol.h, sample, 359dgl_dllsoundsystem.cpp, sample, 83dgl_dllsoundsystem.h, sample, 83dhclient.c, sample, 129dhclient, Unix-specific command, 128, 131dhcp, 128, 129diagram, uml, 11diff, Unix-specific command, 310DigestAuthenticator.java, sample, 405,

406dilithium, 2dimension analysis, 80dir.c, sample, 368, 432direct memory access, 194directed acyclic graph, 349

Page 9: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 531

dirent.h, Unix-specific function, 294discretionary access control, 134disk buffer cache, 241disk cache, 235, 236disk partitions, 385disklabel.h, sample, 385disksubr.c, sample, 387dispatch table, 222displayq.c, sample, 118Distinct.c, sample, 177dit, 334diverge, repeated instances, 414divide and conquer, algorithm, 273dll, 57, 243, 320, see also shared libraryDLL hell, 281dlopen, Unix-specific function, 119dma, 194dns, 128, 131, 187do-no-harm, 62do_command.c, sample, 139do_tris.c, sample, 492doclet, 439doio.c, sample, 293domain coupling, 409domain-name, 129domain-specific language, 22, 71, 82, 278, 409domainname.c, sample, 61DOMWriter.java, sample, 329Don’t Repeat Yourself, 413doPrivileged, Java method, 141dos, 105double-checked locking, 54Double, Java class, 477, 480, 498double, type, 212, 466, 473, 474, 477, 492doubleToLongBits, Java method, 477downcast, 425Doxygen, 392drand48, Unix-specific function, 122DrawState, Win32 sdk, 58, 59DrawText, Win32 sdk, 137draw.c, sample, 482driver.c, sample, 296DRY principle, 413dsl, 82dtrace, Unix-specific command, 160, 205

du, Unix-specific command, 421dump, Unix-specific command, 22, 93, 329dumpbin, Windows-specific command, 230,

246durability guarantees, 92dvd, 124dynamic coupling, 409Dynamic data exchange, 137dynamic link library, see dlldynamically allocated memory, 229

e_hypot.c, sample, 482early fail, unstable systems, 419Easter egg, 37, 433ebp, 179EC_ObserverStrategy.cpp, sample, 78ecc, 63, 93echo, sample, 441echo, Unix-specific command, 310, 441Eclipse, 333, 344ed.h, sample, 305ed, Unix-specific command, 383eeprom, 449EFAULT, Unix-specific identifier, 143effective user, 113efferent couplings, 344efficiency, software, 5, 89efficiency, software see also performance, 89Eindhoven University, 144ejp, 166elements.c, sample, 176else, keyword, 374emacs.c, sample, 77embedded system, 76, 171emulation layer, 295, 308en_US, 314encapsulation, 366, 419, 421end, C++ method, 26endian.h, sample, 300endianness, 29, 298engine.c, sample, 168, 169, 260EngineConfig.java, sample, 358ENOENT, Unix-specific identifier, 143Entries.java, sample, 356entropy, 326

Page 10: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

532 Index

environment variableCOMSPEC, 121IFS, 120, 125, 126LANG, 316LIBPATH, 125, 126PATH, 125TERMCAP, 126

environment variables, 317EPERM, Unix-specific identifier, 139epigram credits, 569epilogue, 268epsilon, 469equals, Java method, 34, 46err, Unix-specific function, 118, 258errno.h, C library, 293errno, C library, 64, 143, 292error-correction circuitry, 93error.c, sample, 297#error, C preprocessor directive, 304errors

absorption, 491algorithm, 42api, 57, 115buffer overflow, 75, 106, 115cancellation, 487computation, 42concurrency, 51cryptographic, 122data, 69data leakage, 134detection, 62domain, 495expression, 43, 47, 48, 49extreme conditions, 27fencepost, 26floating-point, 465forgotten steps or cases, 29format, 24, 118function domain, 495inconsistent data, 82initialization, 69input, 17interface, 56logic, 26memory leak, 65, 255, 256

metacharacter vulnerabilities, 119misinterpretation, 40missing methods, 34missing output, 21object-oriented code, 68off-by-one, 26operand, 43operator, 47operator precedence, 48output, 21overflow, 49, 481packing, 80privilege leakage, 134race conditions, 112recovery, 62resource leak, 36, 65result verification, 59, 131return value checks, 59, 131rounding, 478scale, 79security, 101sign-conversion, 49subscript, 77temporary files, 121timing, 23, 51underflow, 49, 483unit, 79unnecessary functionality, 37unpacking, 80untrusted input, 125variable references, 71

errx, Unix-specific function, 118/etc/passwd, filename, 195ethereal, Unix-specific command, 160ethernet, 191ethernet interface, 160eval.c, sample, 362, 373event performance counters, 164ex, Unix-specific command, 242Excel, see Microsoft Excelexception, 62, 65, 67, 329, 498Exception, Java class, 46exclusion synchronization, 52exclusive-or, 200.exe, file extension, 120

Page 11: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 533

exec.c, sample, 27, 424exec, Unix-specific function, 114execl, C library, 267execlp, Unix-specific function, 119execute, Java method, 127execution time, 151execv, Unix-specific function, 121execvp, Unix-specific function, 119exercises, 14exf.c, sample, 193, 239exp, function, 477expand.c, sample, 47exploit, 107ext2fs, 236ExtendableRendererFactory.java, sam-

ple, 55extended cyclomatic complexity, 329Extensible Java Profiler, 166eXtensible Markup Language, see xmlExtension.java, sample, 368extern.h, sample, 215external coupling, 385, 424external data representation, 298external fragmentation, 252external quality attributes, 2extreme conditions, 27eXtreme Programming, 4

factory method, 410fail-safe mode, 134fail, Java method, 434failure, system, 85Fast Fourier Transforms, 205fat, 252fault, software/hardware, 85fault tolerance, 5, 17, 63, 85, 422fchdir, Unix-specific function, 113, 116fchflags, Unix-specific function, 113fchmod, Unix-specific function, 112, 113fchown, Unix-specific function, 113fclose, C library, 291fcntl, Unix-specific function, 427fcs, 199fd.c, sample, 417fdd, 4

fddi, 448fdisk.c, sample, 385, 386fdisk, Unix-specific command, 385FE_DIVBYZERO, C identifier, 496FE_INVALID, C identifier, 496FE_OVERFLOW, C identifier, 496FE_UNDERFLOW, C identifier, 496Feature Driven Development, 4feenableexcept, Unix-specific function, 499fencepost error, 26, 100fenv.h, filename, 495fesetround, function, 481fetch.c, sample, 380ffs, 236ffs_vfsops.c, sample, 391fft, 205fgets, C library, 171, 310fgets, Unix-specific function, 116fgetwc, C library, 310Fibonacci numbers, 483FigSeqLink.java, sample, 413file descriptor, 66file extension

.com, 120

.exe, 120

.gmo, 320

.pdb, 280

.po, 318, 320

.pot, 318

.pox, 320

.property, 321jar, 282

file permissiongroup, 139others, 139owner, 139

FilePermission, Java class, 142FILE, C library, 388Filecache.h, sample, 199filehandle, 65filename

/dev/mem, 244/dev/random, 123/etc/passwd, 195fenv.h, 495

Page 12: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

534 Index

float.h, 473, 477makefile, 145, 455

FileStore.java, sample, 406final, Java keyword, 68, 357, 388finally, Java keyword, 63financial calculations, 50, 480find, Unix-specific command, 14, 166FindBugs, Java program, 3, 21, 45, 56, 99, 450finger, Unix-specific command, 277first-in first-out, 199fixed-space requirements, 208fixture, 434flat profile, 169Flawfinder, 146flight simulator, 37float.h, filename, 473, 477Float, Java class, 480float, type, 212, 466, 473, 474, 493floating-point, 465

arithmetic, 465memory format, 472negative, 475

flock, Unix-specific function, 295FLT_EPSILON, C identifier, 473fmod, C library, 477, 496fmtcheck, Unix-specific function, 119fopen, C library, 291, 394for, keyword, 26, 78, 328, 424foreach, keyword, 78forgotten steps or cases, 29fork, Unix-specific function, 93, 121, 139format errors, 24format string, 118FormatMessage, Win32 sdk, 118Format, Java class, 315Formatter, Java class, 24Forth, 355Fortran, 204, 387fortune.c, sample, 374fortunes, sample, 238, 569Foundation Class Library, 308fprintf, C library, 118, 167, 291fpsetround, function, 481fputwc, C library, 310frac_digits, C library, 314

fragile base class problem, 336fragility, code, 418fragmentation, memory, 247frame buffer, 244frame check sequence, 199frame pointer, 179, 267free, C library, 37, 136, 256, 274fs.h, sample, 87fscanf, C library, 116, 291, 446fsck, Unix-specific command, 88fsi_lex.l, sample, 18fstat, sample, 104fstat, Unix-specific function, 112, 113, 162fstat, Unix-specific command, 104, 246fstatfs, Unix-specific function, 113ftp, 107, 134ftp, Unix-specific command, 109ftpd.c, sample, 118ftpd, Unix-specific command, 107ftpd, sample, 107ftruncate, Unix-specific function, 113function

acos, 477, 496asin, 496atan, 477atanh, 477cos, 477exp, 477fesetround, 481fpsetround, 481isinf, 498isnan, 498lgamma, 477log, 477, 496pow, 477, 484, 496sqrt, 477, 489, 496

function inlining, 281function overloading, 406functional characteristics, 423functional testing, 433functionality, software, 5, 9futimes, Unix-specific function, 113

g++ -ffloat-store, 494Gang of Four, 410

Page 13: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 535

garbage collection, 66, 226, 259, 262garbage collector, 256garbage-in garbage-out, 498gcc, 303gcc -ffloat-store, 494gcc, Unix-specific command, 44, 57, 269, 280,

441, 453, 481, 485, 486gcov, Unix-specific command, 441, 443gdi, 65gencat, Unix-specific command, 317generality, code, 153generalization relationship, 12GeneratorJava.java, sample, 67generic programming, 278generic types, 449generics, 426GetCurrencyFormat, Win32 sdk, 315GetDateFormat, Win32 sdk, 315GetFileSecurity, Win32 sdk, 139GetFileSizeEx, Win32 sdk, 59GetFileSize, Win32 sdk, 59, 60GetLastError, Win32 sdk, 64GetLocaleInfo, Win32 sdk, 315GetNumberFormat, Win32 sdk, 315GetTimeFormat, Win32 sdk, 315getCollationKey, Java method, 316GetConsoleScreenBufferInfo, Win32 sdk,

291getcwd, Unix-specific function, 116getdate, Unix-specific function, 18getdents, Unix-specific function, 424getInstance, Java method, 315GetLocaleInfo, Win32 sdk, 315GetLocales02.java, sample, 46getlogin, Unix-specific function, 124GetMessage, Win32 sdk, 189getnetbyname, Unix-specific function, 128getnetnamadr.c, sample, 128, 418getObject, Java method, 321getopt, Unix-specific function, 30, 115getpass, Unix-specific function, 115, 136getpgr, Unix-specific function, 294getpwent.c, sample, 75getpwuid, Unix-specific function, 195, 196getretmips.c, sample, 199

gets, C library, 116getsockname, Unix-specific function, 82getString, Java method, 321getStringArray, Java method, 321gettext, Unix-specific function, 316, 317,

318_getvideoconfig, 291getwd, Unix-specific function, 116gid_t, Unix-specific identifier, 294glibc, 498glob.c, sample, 315global namespace, 72global.c, sample, 42.gmo, file extension, 320gmon.c, sample, 61gnats, 343gnome, 307, 316gnu, 14, 498gnu c compiler, see gccGNU Classpath, 275gnu mp, 480Goal-Question-Metric, 462gprof, Unix-specific command, 164, 167, 170,

171, 205gqm, 462gradual underflow, 475graphical user interface, 307graphics interface system, 244GraphViz, 11grep, Unix-specific command, 14, 146, 259,

451group, file permission, 139grouping, C library, 314gsp_inst.c, sample, 221gtk, 308guarantee, algorithm’s, 175gui, 307, 449gui toolkit, 18guidelines, 354, 363, 364, 462, 463

half-open, 26Halstead complexity, 327handle, 66, 226hanoi.sed, sample, 255hard real-time systems, 152

Page 14: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

536 Index

hashCode, Java method, 34hash.c, sample, 328, 329hash_page.c, sample, 361HashMap, Java class, 35HashSet, Java class, 35Haskell, 364hasNext, Java method, 27hdc9224.c, sample, 191head, Unix-specific command, 310header files, 292, 294, 308, 323, 388, 452, 454,

455heap, 107, 229heap fragmentation, 226HeapFree, Win32 sdk, 240HeapAlloc, Win32 sdk, 240Heron, 494Hewlett-Packard, 355HexUtils.java, sample, 417high-water mark, 197histo.pl, sample, 497host.c, sample, 356hprof, Java program, 164hsqldb, 165, 190, 343hsqldb, sample, 190, 333HsqlTimestamp.java, sample, 47html, 126, 308htonl, Unix-specific function, 300htons, Unix-specific function, 300http, 228, 245, 308http_config.c, sample, 255http_main.c, sample, 79, 88, 245http_protocol.c, sample, 55httpd.h, sample, 120HttpProcessor.java, sample, 52HttpRequestStream.java, sample, 60HttpResponseBase.java, sample, 52humanize_number, Unix-specific function, 25Hungarian naming notation, 359hypot, C library, 482

I/O bound, 158i10n, 309i18n, 309i386, 110, 111, 210i82365.c, sample, 44

ia, 215, 231, 297ia-32, 210ia-64, 210, 230iBCS2, 135ibcs2_stat.h, sample, 135ibm, 229ide, 332, 389idea ide, 332identification, software changeability, 403identifier name

MSDOS, 293NULL, 146, 228PIPE_MINDIRECT, 187

identifying elements to change, 403idle, 151idle time, 157iec, 466iec 60559

1989, see also IEEE 754-1985ieee 754, 466, 469, 481, 483, 487, 489, 494,

498, 499, 501, 502IEEE Software, 15, 461, 463IEEE Standard 1003.1, 42ieee_handler.h, sample, 430if.t, sample, 440#if, C preprocessor directive, 304if, keyword, 64, 328, 329, 368, 373, 374, 498if_ie.c, sample, 376, 414if_strip.c, sample, 429ifconfig.c, sample, 31IFS, environment variable, 120, 125, 126ilities, xxvi, see also quality attributesImpersonateDdeClientWindow, Win32 sdk,

134ImpersonateNamedPipeClient, Win32 sdk,

134ImpersonateAnonymousToken, Win32 sdk,

134ImpersonateLoggedOnUser, Win32 sdk, 134,

139ImpersonateNamedPipeClient, Win32 sdk,

139ImpersonateSecurityContext, Win32 sdk,

134ImpersonateSelf, Win32 sdk, 134

Page 15: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 537

implementation inheritance, 336import, Java keyword, 75in_cksum.c, sample, 85in_cksum_arm32.c, sample, 181include files, see header filesincomplete output, 21inconsistent data, 82inconsistent synchronization, 56incorrect input, 19incremental build, 452indent, Unix-specific command, 354, 463indentation, code, 363, 364index, array, 26indexed fit, 253INF, 495infinity, 470, 476, 495, 496inheritance, 12, 277init.c, sample, 136, 257, 277init, Unix-specific command, 136, 257, 277init_main.c, sample, 72, 452injection attack, 126inline

functions, 179methods, 179

inline assembly, 181inline, keyword, 180, 276, 280, 294inner class, 358input problems, 17InputStreamReader, Java class, 312inspection-time, 432instability metric, 346install, Unix-specific command, 269, 271, 272,

281, 294installability, software, 7int, keyword, 294int, type, 211, 216, 225int_curr_symbol, C library, 314int_frac_digits, C library, 314integer size, 296integer.h, sample, 80Integrated Development Environment, see ideintegration testing, 432, 437Intel, 210, 236Intel Binary Compatibility Standard 2, 135interact.c, sample, 25

interface, 12interface inheritance, 336internal field separator, 121internal fragmentation, 252internal quality attributes, 3internal, C# keyword, 420International Obfuscated C Code Contest, 332internationalization, 119, 309internet packet filter, 228interoperability, 5, 153interprocedural optimizations, 279interprocess communication, 186, 187, 241,

244interrupt, hardware, 51, 194interrupt service routine, 194interval arithmetic, 470, 481intrinsic functions, 180INVALID_HANDLE_VALUE, Win32 sdk, 245invariant expression, 445, 463io.c, sample, 201ioctl, Unix-specific function, 291, 294, 426,

427IOException, Java class, 46iostat, sample, 159iostat, Unix-specific command, 159ip, 85ip_output.c, sample, 86ipc, 186iperlsys.h, sample, 303ipresend, Unix-specific command, 228ipsec, 128ipv4, 127ipv6, 128isalnum, C library, 175, 176, 180isctype.c, sample, 175isdigit, C library, 175, 291isinf, function, 498isInfinite, Java method, 498islower, C library, 175isnan, function, 498isNaN, Java method, 498iso, 311, 312iso 9001, 4iso C, 309iso/iec, 15

Page 16: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

538 Index

iso/iec 9126, 4isolation of dependencies, see

dependency isolationisupper, C library, 175, 394it_IT, 314iterator, 26, 410Iterator, Java interface, 27, 424its, 149its4, 146

j2se, 312Jalopy, Java program, 463January 19, 2038, 49jar, file extension, 282jarg, Java program, 282Jasper, 224, 382JasperLogger.java, sample, 46java

-client, 152-server, 152

Java 1.5, 426Java 5.0 memory model, 286Java applets, 274Java class

AccessController, 141AllPermission, 142ArrayList, 426AudioPermission, 142AuthPermission, 142AWTPermission, 142BigDecimal, 50, 480BufferedWriter, 24Collator, 315DatabaseManager, 166DateFormat, 315DelegationPermission, 142Double, 477, 480, 498Exception, 46FilePermission, 142Float, 480Format, 315Formatter, 24HashMap, 35HashSet, 35InputStreamReader, 312

IOException, 46java.security.SecureRandom, 123JFormattedTextField, 18LoggingPermission, 142ManagementPermission, 142Map, 54MBean…Permission, 142NetPermission, 142NumberFormat, 315Object, 334, 425, 426OutputStreamWriter, 312PreparedStatement, 66PrintStream, 24PrivateCredentialPermission, 142PropertyPermission, 142ReflectPermission, 142ResourceBundle, 320RuntimePermission, 142ScriptTool, 166SecurityManager, 140SecurityPermission, 142SerializablePermission, 142ServicePermission, 142SimpleDateFormat, 18SimpleDateFormat, 315SocketPermission, 142SQLPermission, 142SSLPermission, 142SubjectDelegationPermission, 142Throwable, 46toString, 22UnresolvedPermission, 142Vector, 76volatile, 55

Java exceptionArrayIndexOutOfBoundsException, 75,

107, 359AssertionError, 445ClassCastException, 426NullPointerException, 47SecurityException, 140

Java interfaceCollection, 214DatabaseMetaData, 333, 334, 439Iterator, 27, 424

Page 17: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 539

TranformerHandler, 395Java keyword

byte, 211catch, 67class, 79final, 68, 357, 388finally, 63import, 75new, 262package, 343, 420private, 420, 422protected, 420public, 420, 421, 422static, 262, 357strictfp, 485, 494synchronized, 52, 55try, 46, 67volatile, 56see also keyword

Java Management Extensions, 348Java method

assertFalse, 434assertNotNull, 434assertNull, 434assertTrue, 434checkPermission, 140, 141checkRead, 140close, 66, 67compare, 315ConcurrentHashMap, 55doPrivileged, 141doubleToLongBits, 477equals, 34, 46execute, 127fail, 434getCollationKey, 316getInstance, 315getObject, 321getString, 321getStringArray, 321hashCode, 34hasNext, 27isInfinite, 498isNaN, 498Locale.getDefault(), 321

Math.pow, 484next, 27notify, 52, 55notifyAll, 55parseDouble, 480parseFloat, 480println, 449sort, 403synchronizedMap, 55System.gc, 246toString, 480wait, 52, 54, 55see also function

Java operator, see operatorJava package

java.applet, 334java.awt, 334java.text, 315java.util.concurrent, 52java.util.Random, 122javax.xml.transform.sax, 396log4j, 449, 463util.logging, 449

Java programFindBugs, 3, 21, 45, 56, 99, 450hprof, 164Jalopy, 463jarg, 282javac, 305javadoc, 389, 392, 393, 439JavaGuard, 282JODE, 282PMD, 463ProGuard, 282RetroGuard, 282

Java virtual machine, see jvmJava virtual machine tool interface, 164java.applet, Java package, 334java.awt, Java package, 334java.security.SecureRandom, Java class,

123java.text, Java package, 315java.util.concurrent, Java package, 52java.util.Random, Java package, 122javac, Java program, 305

Page 18: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

540 Index

javadoc, Java program, 389, 392, 393, 439JavaGuard, Java program, 282JavaOne, 501javax.xml.transform.sax, Java package,

396jdbc, 65, 66, 333jdbcDatabaseMetaData.java, sample, 126jdbcDatabaseMetaData.java, sample, 333jdbcResultSet.java, sample, 394jdbcStatement.java, sample, 390JDBCStore.java, sample, 63, 407JDepend, 350JFormattedTextField, Java class, 18JikesJavaCompiler.java, sample, 432JispFilesystemStore.java, sample, 373JODE, Java program, 282join, Unix-specific command, 310jot.c, sample, 20journal log, 236JspC.java, sample, 26JspEngineContext.java, sample, 382JspParseEventListener.java, sample, 31JspServlet.java, sample, 140JspWriterImpl.java, sample, 76JTidyTask.java, sample, 358JUnit, 2, 347, 434just-in-time compilers, 205jvm, 142, 163, 210, 211, 234, 298jvmti, 164

kde, 307, 316Kerberos, 142kern, sample, 404kern_descrip.c, sample, 66kern_fork.c, sample, 145kern_malloc.c, sample, 247kern_subr.c, sample, 377kern_time.c, sample, 133kernel code, 105kernel time, 157kernel-bound, 161kernel-loadable modules, 105key.c, sample, 91keyword

break, 371

case, 328, 367, 447char, 310, 312const, 294continue, 371else, 374for, 26, 78, 328, 424foreach, 78if, 64, 328, 329, 368, 373, 374, 498inline, 180, 276, 280, 294int, 294long double, 294long int, 294long long, 305namespace, 343, 420packed, 220private, 420protected, 420public, 420, 421register, 232return, 265sizeof, 417static, 196, 421struct, 79switch, 328, 367, 370, 371, 447this, 74typedef, 79, 222union, 298, 477using, 75void, 305volatile, 232wchar_t, 310, 312while, 328, 368

kill, Unix-specific function, 447kilo, unit of measure, 25

Lachesis, 332lack of cohesion in methods, 339, 408LANG, environment variable, 316language extension, 302language features, 304late binding, 222Latin-1, 311Law of Demeter, 410, 463lbx, 398, 400lbxdelta.c, sample, 399

Page 19: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 541

lbxdeltastr.h, sample, 399lbxmain.c, sample, 399lbxopts.h, sample, 399lcmd1.c, sample, 298lcom, 339LDBL_EPSILON, C identifier, 473leak, 135

data, 134memory, 65, 255, 256privilege, 134resource, 36, 65

Lean Software Development, 4learnability, effort, 5least recently used, 198left-shift operation, 48legacy code, 133length, string, 310level 1 cache, 233level 2 cache, 233level 3 cache, 233lex.c, sample, 372lex, Unix-specific command, 18lexical analyzer, 18lfs_vfsops.c, sample, 390, 391lgamma, C library, 496lgamma, function, 477libc, sample, 404LIBPATH, environment variable, 125, 126library.c, sample, 48lifetime, allocated memory, 246lifo, 264lim ems, 237line printer, 69line printer daemon, 422linear search, 173, 175linked list traversal, 374lint, Unix-specific command, 20, 21, 99, 450Linux, 14, 145, 295Linux Standard Base, 316linux_file.c, sample, 295little-endian, 298ln, Unix-specific command, 294load sensitivity, 152LoadLibraryEx, Win32 sdk, 119LoadLibrary, Win32 sdk, 119

Load_Balancer_i.h, sample, 84LoadLibrary, Win32 sdk, 320LoadString, Win32 sdk, 320local attacks, 104locale, 210, 313localeconv, C library, 313Locale.getDefault(), Java method, 321localeconv, C library, 167locality of reference, 192, 195, 205, 233, 234,

235, 236, 238, 242locality-of-reference, 252localization, 71, 309LocalStrings_en.properties, sample, 321LocalStrings_es.properties, sample, 321log file, 92log scale, 13Log.java, sample, 92log10, C library, 489, 496log1p, C library, 496log2, C library, 496log4j, Java package, 449, 463log, function, 477, 496logb, C library, 496logger, Unix-specific command, 186LoggingPermission, Java class, 142Logging_Strategy.cpp, sample, 360, 361logic problems, 26logical and, 329logical or, 329logresolve.c, sample, 160, 161logresolve, Unix-specific command, 160, 161long double, keyword, 294long double, type, 466, 473long int, keyword, 294long long, keyword, 305long, type, 211look, Unix-specific command, 242lookup table, 199, 428loop unrolling, 281loop, 301Low Bandwidth X, 398lp, sample, 422lp, Unix-specific command, 422lParam, Win32 sdk, 427lpc, sample, 422

Page 20: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

542 Index

lpc, Unix-specific command, 422lpd, sample, 422lpd, Unix-specific command, 422lpq, sample, 422lpq, Unix-specific command, 422lpr.c, sample, 114, 227lpr, sample, 422lpr, Unix-specific command, 422lprm, sample, 422lprm, Unix-specific command, 422LRGB.c, sample, 177lru, 199, 202, 205ls.c, sample, 33, 162ls, Unix-specific command, 33, 162, 195, 313,

424lsb, 316lsof, Unix-specific command, 104, 246lstat, Unix-specific function, 162ltrace, Unix-specific command, 160, 167, 171,

172lynx, Unix-specific command, 318, 321LZCopy, Win32 sdk, 137

m_, 74Mac, 307mac, 134Mach, 286macro constants, 291macros, 449magic numbers, 416Mail slot, 137MailSessionFactory.java, sample, 141main memory, 232main sequence, 349main.c, sample, 77, 112, 116, 167, 217, 431Main.java, sample, 402main, C library, 433maintainability index, 326, 327, 329maintainability measurements, 326maintainability, software, 5, 7, 71, 82, 325,

461maintenance, code, 40, 302, 325, 461make, sample, 191make, Unix-specific command, 191, 192, 454,

455

makedepend, sample, 453makedepend, Unix-specific command, 453makefile, 145Makefile.std, sample, 304makefile, filename, 145, 455Makefile, sample, 455, 456makewhatis.sh, sample, 55malloc.c, sample, 218, 240, 247Malloc.cpp, sample, 247malloc, C library, 36, 45, 76, 136, 143, 229,

238, 239, 240, 254, 255, 256, 258,260, 299

management console, 159ManagementPermission, Java class, 142ManagerServlet.java, sample, 75mandatory access control, 134MapViewOfFile, Win32 sdk, 241, 245map.c, sample, 277Map, Java class, 54mapping, 31MapStackResolver.java, sample, 371Mark.java, sample, 34master boot record, 385Math.pow, Java method, 484maturity, 17, see also errorsmaturity, software, 5, 17MBean…Permission, Java class, 142mblen, C library, 310mbstowcs, C library, 310mbtowc, C library, 310mcount.c, sample, 171, 172mcount, Unix-specific function, 171, 172md4.h, sample, 306md5.c, sample, 50measurements

maintainability, 326time performance, 156

mediator, 410mega, unit, 25memchr, C library, 167memcmp, C library, 180memcpy, C library, 180memento, 410

Page 21: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 543

memoryphysical, 193virtual, 192

memory allocation, 218, 438memory allocator, 247memory hog, 209memory leak, 65, 255memory model, 211memory-alignment, 216MemoryRealm.java, sample, 18memset, C library, 136merge sort, 239message identifier, 317MessageBox, Win32 sdk, 137messages, 316metaconfig, Unix-specific command, 294metadata, 236method area, 224method table, 224metrics

dependency, 343maintainability, 327object-oriented, 333

MetricsReloaded, 332mfc, 308mga_storm.c, sample, 235miarc.c, sample, 487, 488, 496microreboot, 100Microsoft

Access, 434C/C++ compiler, 485C#, see C#compilers, 494dos, see ms-dosExcel 97, 37Foundation Class Library, 308sdk element, see Win32 sdkVisual Basic, 434Windows, 307Windows sdk, see Win32 sdkWord, 136

microSPARC I, 233Mil. Spec., 4Minix, 297mips, 230, 268

misc.c, sample, 258, 402, 478, 479misintepretation, specification, 40missing methods, 34missing output, 21mitigation, reliability and, 5mkdep, sample, 453mkdep, Unix-specific command, 453mknodes.c, sample, 311mkstemp, Unix-specific function, 121, 122mktemp, Unix-specific function, 121mmap, Unix-specific function, 137, 241, 242,

244, 294mock object, 437mod_isapi.c, sample, 359mode_t, Unix-specific identifier, 294model-driven architectures, 441modular implementation, 419modularity, 87, 422mon_decimal_point, C library, 314mon_grouping, C library, 314mon_thousands_sep, C library, 314monetary values, 480monitor code, 52more, Unix-specific command, 30motd, sample, 184Motif, 307mount.c, sample, 447mount, Unix-specific command, 447mp3, 171mp, Unix-specific function, 50, 294ms-dos, 229MSDOS, identifier name, 293msgfmt, Unix-specific command, 320msgmerge, Unix-specific command, 320msgs.c, sample, 20mt.c, sample, 427mt, Unix-specific command, 427MTIOCGET, Unix-specific identifier, 427MTIOCRDHPOS, Unix-specific identifier, 427MTIOCRDSPOS, Unix-specific identifier, 427MTIOCTOP, Unix-specific identifier, 427mulaw.c, sample, 453multibyte, 309multicore, 454multiprocessor system, 55

Page 22: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

544 Index

multithread.c, sample, 447mx4j, 348

n_cs_precedes, C library, 314n_fmod.c, sample, 433n_sep_by_space, C library, 314n_sign_posn, C library, 314name mangling, 306Name_Handler.cpp, sample, 302namespace, 382namespace, C# keyword, 420namespace, keyword, 343, 420NamingEntry.java, sample, 35NaN, 477, 485, 495, 496, 498, 499NAN, 495nasa, 341ncr5380sbc.c, sample, 89ncrstat.c, sample, 25NDEBUG, C identifier, 445, 450negative numbers, 475negative_sign, C library, 314.net, 210, 301NetJoinDomain, Win32 sdk, 139NetMessageBufferSend, Win32 sdk, 137NetPermission, Java class, 142netbios-scope, 129netstat, sample, 159netstat, Unix-specific command, 104, 159, 161netstat, Windows-specific command, 104Network Information Service, 195, 439new(), operator, 68new[], operator, 229new, C library, 299new, Java keyword, 262new, operator, 229, 240, 248, 256newfs.c, sample, 87, 372newfs, Unix-specific command, 87Newton-Raphson, 484next, Java method, 27nfs, 424, 431nfsstat, sample, 159nfsstat, Unix-specific command, 159nis, 195, 439nis-domain, 129nlist_aout.c, sample, 75

nm, Unix-specific command, 230noc, 335nonce, 123nonfunctional properties, see quality attributesnonfunctional requirements, xxvi, 15normalization, 83, 494normalized, 474Not a Number, 477, see also nannot frequently used, 199not recently used, 199notify, Java method, 52, 55notifyAll, Java method, 55ntohl, Unix-specific function, 300ntohs, Unix-specific function, 300NullPointerException, Java exception, 47NULL, 45NULL, C identifier, 59, 424NULL, identifier name, 146, 228number of children in a class, 335NumberFormat, Java class, 315nvi, Unix-specific command, 91, 239

O-notation, 173obfuscation, 138obfuscators, 282objdump, Unix-specific command, 230Object, Java class, 334, 425, 426observer pattern, 462odbc, 65OemToChar, Win32 sdk, 116off-by-one, 107off-by-one error, 26, 108oftodclock.c, sample, 354old-style C declarations, 57open range, 466open source software, xxviiOpenProcessToken, Win32 sdk, 139open, Unix-specific function, 114, 116, 143,

183, 184, 189, 195, 291, 295OpenCL, 223, 437opencl.ps, sample, 355opendir, Unix-specific function, 424OpenFile, Win32 sdk, 291OpenSSL, 124, 269operability, software, 5

Page 23: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 545

operating system, 228, 240, 290operating system kernel, 65, 182operation not permitted, 139operator

|, 47||, 47, 329++, 407>>, 47##, 294&&, 47, 329&, 47delete, 37, 256new(), 68new[], 229new, 229, 240, 248, 256sizeof, 215

operator overloading, 80, 179, 406operator precedence, 48oprofile, Unix-specific command, 164ops_host.c, sample, 449optimization, performance, 84optimize for space, 281optimize.c, sample, 180, 365option.c, sample, 30options.c, sample, 129, 399os x, 260os.c, sample, 273os/2, 292ossaudio.c, sample, 50others, file permission, 139out-of-band channel, 143output problems, 21OutputStreamWriter, Java class, 312overflow, 49, 481owner, file permission, 139

p_cs_precedes, C library, 314p_sep_by_space, C library, 314p_sign_posn, C library, 314pack, Perl function, 82package metrics, 343package visibility, 420package, Java keyword, 343, 420packages, 421packed, keyword, 220

padding space, 217pae, 237paes, 237page fault, 192, 242PageContextImpl.java, sample, 447pagesize.sh, sample, 119paging, 192, 205paging file, 238panic, operating system, 91parallel compilation, 454parallelism, 51param.h, sample, 271, 272parametric polymorphism, 278, 406, 407parents, 167Pareto Principle, 163, 164, 204parms.c, sample, 45Parrot virtual machine, 301parseDouble, Java method, 480parseFloat, Java method, 480parser, 18parser.c, sample, 18Parser.java, sample, 358ParserController.java, sample, 62partition, 385passwd.c, sample, 118paste.c, sample, 171paste, Unix-specific command, 171pat_rep.c, sample, 40, 41, 374patcache.c, sample, 199patch.c, sample, 238path, 119path coverage, 442path vulnerability, 119PATH, environment variable, 125pattern, see design patternpax, Unix-specific command, 40.pdb, file extension, 280pdp-11, 296, 300pdp11, Unix-specific identifier, 296pdq.c, sample, 448PeekMessage, Win32 sdk, 189Pentium, 289, 298perfmon, Windows-specific command, 159performance

algorithm, 173

Page 24: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

546 Index

build, 451caching, 194code space, 274cpu, 163heap space, 246i/o, 158interrupts, 194kernel, 161operating system, 182peripherals, 190stack space, 264thrashing, 191time, 151, 207

performance measurement, 156performance model, 182Perl, 28, 147, 182, 280, 293, 301Perl function

pack, 82unpack, 82

Perl keywordsee keyword

Perl operator, see operatorperlsdio.h, sample, 388perror.c, sample, 185perror, C library, 185persistent software attributes, 15, see

quality attributesPersistentManagerBase.java, sample, 406pgp, 144phantasia, sample, 478phantasia, Unix-specific command, 478phantstruct.h, sample, 478php, 147, 261php 4, 38Physical Address Extensions, 237physical memory, 193, 244pid_t, Unix-specific identifier, 294ping, Unix-specific command, 187, 188, 189pio, 159pipe, Unix-specific function, 121PIPE_MINDIRECT, identifier name, 187pldi, 501pmd, 332PMD, Java program, 463.po, file extension, 318, 320

poll, Unix-specific function, 189polling, 189polymorphic abstraction, 406polymorphic functions, 297polymorphism, 277, 397pom.c, sample, 485pom, sample, 80pop, stack structure, 264popen.c, sample, 423popen, Unix-specific function, 119, 120, 121,

125portability, 7, 81, 128, 153, 208, 218, 289

character set, 309compiler, 302graphical user interface, 307hardware, 296internationalization, 309language, 302locale, 313localization, 309messages, 316operating system, 290processor, 296

portability layer, 308portability, software, 5portable platform, 308positive_sign, C library, 314posix, 15, 291postcondition, 390, 445PostScript, 355, 456.pot, file extension, 318pow, C library, 484pow, function, 477, 484, 496power law, 13PowerPC, 230, 299.pox, file extension, 320pp.c, sample, 296ppp, 112, 199, 202ppp_defs.h, sample, 201ppp_tty.c, sample, 200, 201pppd, Unix-specific command, 112, 113, 114#pragma, C preprocessor directive, 220pre.h, sample, 303precision, 465precision, floating-point, 465

Page 25: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 547

precomputing, 199precondition, 390, 445predicate, program flow, 328prefetched, data elements, 234PreparedStatement, Java class, 66preprocessor, see header filespresenter, 166prevention, reliability and, 5primitive types, 209PrintStream, Java class, 24print.c, sample, 314printer spooler, 422printf, C library, 24, 118, 125, 126, 147, 267,

303, 313, 317, 428, 449println, Java method, 449PrivateCredentialPermission, Java class,

142private.h, sample, 318private, C# keyword, 420private, Java keyword, 420, 422private, keyword, 420privilege escalation, 103, 104, 105privileges, 139privs.h, sample, 143proc.c, sample, 25process, 4, 102, 422

in uml diagrams, 11Process Explorer, Windows-specific command,

104process identifier, 446process quality, 4process.c, sample, 167, 260ProcessHelper.java, sample, 393processor architecture, 296processor time requirements, 151, 189product, complex interactions, 102profiler, 163program database, 280programmed input/output, 159Programming Language Design and Imple-

mentation Conference, 501progressive activities, 325ProGuard, Java program, 282Project.java, sample, 262, 385prologue, 267

PropertyPermission, Java class, 142.property, file extension, 321protected, C# keyword, 420protected, Java keyword, 420protected, keyword, 420proto.h, sample, 297, 417proxy_cache.c, sample, 199ps, Unix-specific command, 137PScan, 147pseudorandom number, 122psout.c, sample, 116pthread_rwlock_*, Unix-specific function,

55pthread_barrier_*, Unix-specific function,

55pthread_cond_*, Unix-specific function, 55pthread_mutex_*, Unix-specific function, 55Pthreads, 100ptr, 128ptyx.h, sample, 209public, C# keyword, 420, 421public, Java keyword, 420, 421, 422public, keyword, 420, 421pure virtual method called, 223pure virtual, type, 223push, stack structure, 264putchar, C library, 394pwcache.c, sample, 195pwcache, Unix-specific function, 195pwrite, Unix-specific function, 136, 190Python, 147, 182, 364

qsort.c, sample, 153, 173, 272qsort, C library, 153Qt, 308quad, 473quadratic equation, 487quality attributes, 4

analyzability, see analyzabilitychangeability, see changeabilitycomprehensibility, see comprehensibil-

ityconsistency, see consistencyefficiency, see efficiencyfault tolerance, see fault tolerance

Page 26: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

548 Index

functionality, see functionalitymaintainability, see maintainabilitymaturity, see maturityportability, see portabilityrecoverability, see recoverabilityredundancy, see redundancyreliability, see reliabilityreviewability, see reviewabilitystability, see stabilitytestability, see testabilitytraceability, see traceabilityusability, see usability

quality in use, 2, 15quality of implementation, 240queue.h, sample, 392quicksort, 153, 173, 174, 272

race condition, 51, 52, 112radix sort, 246radixsort.c, sample, 246raid, 63, 87rand.c, sample, 42, 122rand, C library, 122random number, 122random selection, 199random-access container, 26random, Unix-specific function, 122ranlib, Unix-specific command, 294rats, 147rcp.c, sample, 18rdbms, 187read-only data, 228read.c, sample, 75read, Unix-specific function, 93, 183, 189,

195, 291readability, 153, 352readdir, Unix-specific function, 424ReadFile, Win32 sdk, 291readv, Unix-specific function, 190real estate, 357, 360, 362, 390, 445, 449real numbers, 466real time, 157real user, 113real-time response, 151real-time system, 152

realization relationship, 12realloc, C library, 136, 256, 258Realm.java, sample, 406RealmBase.java, sample, 406, 449reboot, 91recognizability, code, 374recoverability, software, 5, 17, 90recovery, reliability and, 5recurrence relation, 122recursive descent parser, 18recv, Unix-specific function, 183, 186recvfrom, Unix-specific function, 186, 187,

188recvmsg, Unix-specific function, 140redundancy, 83, 85, 87, 89reentrant, routine, 383refactoring, 325, 334ReflectPermission, Java class, 142reflection, 22, 30, 434refresh.c, sample, 191RegSetValueEx, Win32 sdk, 137regcomp.c, sample, 378, 379, 445regcomp, Unix-specific function, 379regerror.c, sample, 75regerror, Unix-specific function, 258regex, sample, 168regexec.c, sample, 168, 260regexec, C library, 260regexp.c, sample, 57register, keyword, 232registers, 268relational database, see also sqlrelative error, 469release branch, 451release engineering, 4reliability, 5, 17, 153, 397, 419remote procedure call, 298repleceability, software, 7report generator, 25ReportEvent, Win32 sdk, 137representation, floating-point numbers, 472RequestInfoExample.java, sample, 321RequestParameterExistsAction.java,

sample, 450RequestUtil.java, sample, 315

Page 27: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 549

requirement, project, 397res_send.c, sample, 89res_send, C library, 89resend.c, sample, 228resource leak, 36, 65resource, program, 320resource section, 71resource utilization, 7ResourceBundle, Java class, 320response for a class, 338response time, 151ResponseBase.java, sample, 64Result.java, sample, 81ret, stack structure, 264RetroGuard, Java program, 282return value, 60return, keyword, 265reuse, class, 333, 335, 336reverse Polish notation, 355RevertToSelf, Win32 sdk, 139reviewability, software, 353, 397rfc, 338right-shift operator, 47rigidity, software, 403ring.c, sample, 361risc, 216risk analysis, 101rm.c, sample, 371rmi, 189rmtlib.c, sample, 356robustness, 82robustness, application, 263robustness, code, 25, 432robustness, system, 17root-path, 129round.c, sample, 445rounding, 478Row.java, sample, 198rpc, 124RpcImpersonateClient, Win32 sdk, 134rpc.statd, Unix-specific command, 242RpcImpersonateClient, Win32 sdk, 139rpn, 355RTP.cpp, sample, 278rtquery.c, sample, 77

rtti, 222Ruby, 182run_test.pl, sample, 28runtime error, 425runtime type information, 222, 223RuntimePermission, Java class, 142

safety-critical software, 76, 397Samba, 103sampling, 163San Diego Supercomputer Center, 123, 149sandbox, 133sata, 290save.c, sample, 153savecore.c, sample, 19, 20sbrk, Unix-specific function, 240scalability, system, 152scanf, C library, 20, 116scanner.c, sample, 18scatter/gather, 190scientific notation, 25SCM_CREDS, Unix-specific identifier, 140SCM_RIGHTS, Unix-specific identifier, 140score.c, sample, 405scoreboard, structure, 245screen real estate, see real estatescreen.c, sample, 291scripting language, 211ScriptTool, Java class, 166_scrsize, 291Scrum, 4scsi, 89, 290sdp, 347sdsc, 123security manager, 140security, software, 5, 101security vulnerability, 39SecurityException, Java exception, 140SecurityManager, Java class, 140SecurityPermission, Java class, 142security, sample, 104sed, Unix-specific command, 166, 167, 310seed, random number, 122seek, Unix-specific function, 190segment register, 264

Page 28: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

550 Index

segregated free list, 253select.2, sample, 132select, Unix-specific function, 131, 132, 186,

188, 189SelfTest.java, sample, 66SendMessage, Win32 sdk, 137send, Unix-specific function, 136, 183, 186,

187send, Win32 sdk, 137sendfile, Unix-specific function, 190sendmail, Unix-specific command, 39, 277sendmsg, Unix-specific function, 136, 140sendto, Unix-specific function, 136, 186, 187,

188separability, code modifications, 408separation, software changeability, 403sequence diagram, 12, 183sequential fit, 253SerializablePermission, Java class, 142server.cpp, sample, 26Server.h, sample, 393service capacity, 152, 207service, Windows, 125, 185ServicePermission, Java class, 142services, 449session.c, sample, 57set identifier, 317SetClipboardData, Win32 sdk, 137SetDlgItemText, Win32 sdk, 137SetNamedSecurityInfo, Win32 sdk, 138SetSystemPowerState, Win32 sdk, 139SetThreadToken, Win32 sdk, 134, 139SetAssignPrimaryTokenPrivilege, 102setegid, Unix-specific function, 114, 134seteuid, Unix-specific function, 114, 139setgid, 104setgroups, Unix-specific function, 114, 134seti, 5setlocale, C library, 313, 318setproctitle, Unix-specific function, 118SettingsResourceBundle_fr.java, sam-

ple, 363setuid, 102, 104setuid, Unix-specific function, 134, 139Seventh Edition Unix, 329, 388, 424

sh.h, sample, 430sh, Unix-specific command, 120shared library, 184, 243, see also dllshared memory, 241, 244shared secret, 123Shared Source Common Language Infrastruc-

ture, 275shell metacharacter vulnerability, 119, 128shell script, 131ShellExecuteEx, Win32 sdk, 119ShellExecute, Win32 sdk, 119shf.c, sample, 24, 297shm_open, Unix-specific function, 244shmat, Unix-specific function, 137short-term memory, 351short, type, 211, 216show.c, sample, 276si, 25, 315SIGFPE, C identifier, 498, 499sign-conversion errors, 50signal, 60, 498signal.h, C library, 294signal.h, sample, 182signed, type, 51signposts, 449Sigplan Notices, 501SIGQUIT, Unix-specific identifier, 137Simian, 414SimpleDateFormat, Java class, 18SimpleDateFormat, Java class, 315SimpleProfiler.java, sample, 54simplicity, code, 153sin, C library, 180singleton, 55, 375size of data types, 296size_t, C library, 294sizeof, keyword, 417sizeof, operator, 215sleep, Unix-specific function, 79Sleep, Win32 sdk, 79slices (disk partitions), 385smival.h, sample, 37snapshot (backup copy), 91snprintf, C library, 116, 167soap, 189

Page 29: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 551

social-engineering attack, 125SOCK_Dgram.cpp, sample, 279SocketPermission, Java class, 142socket, Unix-specific function, 186, 187sockets, 298soft real-time systems, 152soft updates, 236software

adaptability, 7efficiency, 5functionality, 5installability, 7maintainability, 7portability, 7reliability, 5replaceability, 7usability, 5

software analyzability, 7, 325, 351software maintenance, see maintenancesoftware performance antipatterns, 204software performance engineering, 154, 204SOL_SOCKET, Unix-specific identifier, 140Solaris, 294, 316sort, Java method, 403sort, Unix-specific command, 239source code real estate, see real estatesource examples, see example sourceSourceHandlerImpl.java, sample, 55space performance, 207, see also performancespace probe, 1, 90space redundancy, 87space requirements, 208, 438sparc, 215, 230, 268, 289, 298, 473sparc-64, 210spawnlp, Win32 sdk, 119spawnv, Win32 sdk, 121spawnvp, Win32 sdk, 119special case, performance optimization, 153speed, see performanceSplint, 146, 149spp_usrreq.c, sample, 221spreadsheet, 492__sprint, Unix-specific function, 167sprintf, C library, 116, 167sql, 126, 142, 179

sql injection attack, 126SQLPermission, Java class, 142sqrt, function, 477, 489, 496srvr_nfs.c, sample, 429srvrsmtp.c, sample, 39sscanf, C library, 116ssl, 128, 142SSLPermission, Java class, 142SString.cpp, sample, 179st_blocks, Unix-specific identifier, 294st_rdev, Unix-specific identifier, 294stability, software, 7, 326, 418stable dependencies principle, 347stable package, 345stable unit, 433stack, 107, 229, 264stack frame, 108, 265, 279stack pointer, 264stack-smashing, 111stackbottom.c, sample, 262stamp coupling, 378standard input, 242Standard Template Library, see stlStandardClassLoader.java, sample, 62, 414StandardContext.java, sample, 39, 357StandardPipeline.java, sample, 412standards, see guidelinesStandardWrapper.java, sample, 373starvation, concurrent operations, 51stat, Unix-specific function, 162state machine, 18statfs, Unix-specific function, 135static analysis, 60static analysis tool, 45static coupling, 409static, Java keyword, 262, 357static, keyword, 196, 421static, type, 228statistics.c, sample, 495stdarg.h, C library, 298stdio, 24stdio.h, sample, 201, 276stdio, C library, 201, 388sticky bit, 472stl, 26, 28, 214, 276, 402

Page 30: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

552 Index

stoc.c, sample, 368strace, Unix-specific command, 160, 161, 162strategy, 31, 410strcasecmp, Unix-specific function, 370strcat, C library, 116, 117strchr, C library, 171strcmp, C library, 180, 370strcol, C library, 294strcoll, C library, 315strcpy, C library, 115, 116, 117, 130, 394strcpy, Unix-specific function, 146strdup, C library, 36__strerror.c, sample, 316strftime, C library, 313stricmp, Win32 sdk, 370strictfp, Java keyword, 485, 494StringManager.java, sample, 63strip, Unix-specific command, 242, 281strlcat, Unix-specific function, 116strlcpy, Unix-specific function, 116strlen.c, sample, 404strncat, C library, 116strncpy, C library, 116strtod.c, sample, 475strtok.c, sample, 381strtok, C library, 381strtol, C library, 291struct, keyword, 79struct, type, 214, 222structural testing, 433structure packing, 218, 303structured programming, 387Structured Query Language, see sqlstyle guide, see guidelinesstyle in program readability, 352style, sample, 234subclass, 277SubjectDelegationPermission, Java class,

142subr_prf.c, sample, 91subtyping polymorphism, 277, 406suitability in software’s functionality, 5Sun, 316sunGX.c, sample, 48superblock, 87

supercomputer, 234supermodel, 123superuser, 125, 130, 136, 138, 145, 146supplementary material, 14svgaInit.c, sample, 446swap area, 238swap space, 238swapon, Unix-specific function, 238swill, 172Swing, 308switch, keyword, 328, 367, 370, 371, 447swt, 308synchronization, 52synchronizedMap, Java method, 55synchronized, Java keyword, 52, 55synchronous writes, 236sys, sample, 452sys_generic.c, sample, 132sys_term.c, sample, 125, 180, 257syslog, Unix-specific function, 115, 118, 449syslogd, Unix-specific command, 186system testing, 432, 439system time, 157system-level undo, 100System.Double, 473System.gc, Java method, 246System.Single, 473system, C library, 119, 120, 121, 229systime.c, sample, 450SysV/386, 481

t1malloc.c, sample, 247t1test.c, sample, 370t, sample, 440TabConstraints.java, sample, 359Table Maker’s Dilemma, 471table.java, sample, 92tables.c, sample, 201tail recursion, 273tail, Unix-specific command, 242, 310tainted, variable, 146tao_ifr.cpp, sample, 29tape.c, sample, 22, 61, 93target.cpp, sample, 37tasklist, Windows-specific command, 104, 246

Page 31: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 553

taskmgr, Windows-specific command, 157tc2.c, sample, 51_TCHAR, Win32 sdk, 312Tcl, 182Tcl/Tk, 308tcp, 298tcp/ip, 65tcp_input.c, sample, 235, 366tcpd, Unix-specific command, 130tcpdump.c, sample, 152tcpdump, Unix-specific command, 152, 160,

161tdd, 4telnet, 125telnetd.c, sample, 419telnetd, Unix-specific command, 125template, 276, 449template method, 410template specialization, 397tempnam, Unix-specific function, 121temporal coupling, 381temporary files, 121TERMCAP, environment variable, 126test cases, 433test coverage analysis, 60, 441, 443test data, 438test driver, 434, 437test harness, 437, 440test plan, 433test stub, 437, 438test suite, 434, 439Test-Driven Design, 4testability, 7, 326, 432, 442testing, 31, 302TestRunner, 434Texas Instruments, 269text (compiled code), 228Text.c, sample, 310textdomain, Unix-specific function, 318tftp.c, sample, 154tftpd.c, sample, 134tftpd, Unix-specific command, 134tgamma, C library, 496this, keyword, 74thousands_sep, C library, 314

thrashing, 193, 194, 205, 233thread, 51throughput, 151Throwable, Java class, 46time, 313time behavior, 7time performance, 151, 438, see also perfor-

mancetime variability, 152time-of-check-to-time-of-use, 112time-to-live, 131time.h, sample, 79time, sample, 157time, Unix-specific command, 157, 158, 160Timer_Heap_T.h, sample, 178Timing attacks, 124TIOCGWINSZ, Unix-specific identifier, 292tip, Unix-specific command, 172Tk, 308tm, Unix-specific identifier, 294TMparse.c, sample, 153tmpfile, C library, 115, 121, 122tmpnam, C library, 121tmpnam, Unix-specific function, 121tms-34010, 221tocttou, 112, 149tokenizer, 18tolower_.c, sample, 428, 429Tomcat, 344, 410tools, 14top-down analysis, 405top-down testing, 437top, Unix-specific command, 157topological sort, 272toString, Java class, 22toString, Java method, 480toupper, C library, 291Towers of Hanoi, 255traceability, software, 352, 397, 445tracer, 166traceroute, sample, 131traceroute, Unix-specific command, 131, 133tracert, Windows-specific command, 131tracing, 352train wrecks, 409

Page 32: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

554 Index

TranformerHandler, Java interface, 395TransactNamedPipe, Win32 sdk, 137transaction, 92transaction-monitor, 52transient fault, 89transitive closure, 338translation compendium, 320translation memory, 320TransmitCommChar, Win32 sdk, 137trap.c, sample, 71, 448traverse.c, sample, 93tree.c, sample, 498Tree.java, sample, 76triangle area, 491, 494TriggerDef.java, sample, 53trivially parallelizable compilation, 454Trojan horse, 143, 433truss, Unix-specific command, 160trustworthiness, software, 397try, Java keyword, 46, 67tsort.c, sample, 272, 277tsort, Unix-specific command, 269, 272, 277tty_tb.c, sample, 194ttyname, Unix-specific function, 124type

byte, 49char, 51, 211, 309const, 228double, 212, 466, 473, 474, 477, 492float, 212, 466, 473, 474, 493int, 211, 216, 225long double, 466, 473long, 211pure virtual, 223short, 211, 216signed, 51static, 228struct, 214, 222unsigned char, 49unsigned, 51void, 20, 61, 62volatile, 213wchar_t, 210

type checking, 419type information, 222

type mismatch, 73type signature, 57type size, 296type-checking, 425type1.c, sample, 486typedef, keyword, 79, 222typographical conventions, 10

udp, 189, 190uhareg.h, sample, 220ulp, 469, 472, 482Ultra-DMA, 159Ultrix, 302uml, xxvii, 400, see also diagramUnbounded_Queue.cpp, sample, 74Unbounded_Set.cpp, sample, 407Unbounded_Set.h, sample, 407uncache, 208uncaching, 238underflow, 49, 483understandability, software, 5unexpected effects, 418Unicode, 80, 309_UNICODE, Win32 sdk, 312UNICODE, Win32 sdk, 312unifdef.c, sample, 79Unified Modeling Language, see umlUniforum, 316union, keyword, 298, 477uniq, Unix-specific command, 310Unit in the Last Place, see ulpunit testing, 432, 433unit tests, 337Unix, xxviiiUnix-specific command

amd, 83, 431autoconf, 294, 323awk, 248, 269, 294, 310banner, 69, 117bc, 477, 488bind, 188cat, 152, 184, 269, 310, 316cmp, 242configure, 293cp, 158, 241

Page 33: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 555

csh, 396dc, 355dhclient, 128, 131diff, 310dtrace, 160, 205du, 421dump, 22, 93, 329echo, 310, 441ed, 383ethereal, 160ex, 242fdisk, 385find, 14, 166finger, 277fsck, 88fstat, 104, 246ftp, 109ftpd, 107gcc, 44, 57, 269, 280, 441, 453, 481, 485,

486gcov, 441, 443gencat, 317gprof, 164, 167, 170, 171, 205grep, 14, 146, 259, 451head, 310indent, 354, 463init, 136, 257, 277install, 269, 271, 272, 281, 294iostat, 159ipresend, 228join, 310lex, 18lint, 20, 21, 99, 450ln, 294logger, 186logresolve, 160, 161look, 242lp, 422lpc, 422lpd, 422lpq, 422lpr, 422lprm, 422ls, 33, 162, 195, 313, 424lsof, 104, 246

ltrace, 160, 167, 171, 172lynx, 318, 321make, 191, 192, 454, 455makedepend, 453metaconfig, 294mkdep, 453more, 30mount, 447msgfmt, 320msgmerge, 320mt, 427netstat, 104, 159, 161newfs, 87nfsstat, 159nm, 230nvi, 91, 239objdump, 230oprofile, 164paste, 171pax, 40phantasia, 478ping, 187, 188, 189pppd, 112, 113, 114ps, 137ranlib, 294rpc.statd, 242sed, 166, 167, 310sendmail, 39, 277sh, 120sort, 239strace, 160, 161, 162strip, 242, 281syslogd, 186tail, 242, 310tcpd, 130tcpdump, 152, 160, 161telnetd, 125tftpd, 134time, 157, 158, 160tip, 172top, 157traceroute, 131, 133truss, 160tsort, 269, 272, 277uniq, 310

Page 34: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

556 Index

vacation, 277vi, 277vmstat, 159x2p, 367xargs, 310xlint, 242yacc, 18

Unix-specific function__sprint, 167access, 113, 114, 115, 121acct, 138aio_write, 136alloca, 273, 294catclose, 317catgets, 316, 317catopen, 316chmod, 112, 113chroot, 133, 147close, 66, 183, 184, 189, 195, 291closedir, 291, 424connect, 186, 187crypt, 123curses, 294cuserid, 124db, 214, 277, 286dbm, 294dirent.h, 294dlopen, 119drand48, 122err, 118, 258errx, 118exec, 114execlp, 119execv, 121execvp, 119fchdir, 113, 116fchflags, 113fchmod, 112, 113fchown, 113fcntl, 427feenableexcept, 499fgets, 116flock, 295fmtcheck, 119fork, 93, 121, 139

fstat, 112, 113, 162fstatfs, 113ftruncate, 113futimes, 113getcwd, 116getdate, 18getdents, 424getlogin, 124getnetbyname, 128getopt, 30, 115getpass, 115, 136getpgr, 294getpwuid, 195, 196getsockname, 82gettext, 316, 317, 318getwd, 116htonl, 300htons, 300humanize_number, 25ioctl, 291, 294, 426, 427kill, 447lstat, 162mcount, 171, 172mkstemp, 121, 122mktemp, 121mmap, 137, 241, 242, 244, 294mp, 50, 294ntohl, 300ntohs, 300open, 114, 116, 143, 183, 184, 189, 195,

291, 295opendir, 424pipe, 121poll, 189popen, 119, 120, 121, 125pthread_rwlock_*, 55pthread_barrier_*, 55pthread_cond_*, 55pthread_mutex_*, 55pwcache, 195pwrite, 136, 190random, 122read, 93, 183, 189, 195, 291readdir, 424readv, 190

Page 35: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 557

recv, 183, 186recvfrom, 186, 187, 188recvmsg, 140regcomp, 379regerror, 258sbrk, 240seek, 190select, 131, 132, 186, 188, 189send, 136, 183, 186, 187sendfile, 190sendmsg, 136, 140sendto, 136, 186, 187, 188setegid, 114, 134seteuid, 114, 139setgroups, 114, 134setproctitle, 118setuid, 134, 139shm_open, 244shmat, 137sleep, 79socket, 186, 187stat, 162statfs, 135strcasecmp, 370strcpy, 146strlcat, 116strlcpy, 116swapon, 238syslog, 115, 118, 449tempnam, 121textdomain, 318tmpnam, 121ttyname, 124user_from_uid, 195, 196vfork, 294wait.h, 294wait4, 145, 146wait, 121warn, 118warnx, 118write, 22, 24, 61, 136, 183, 185, 190,

241, 291writev, 136, 185, 186, 190xgettext, 318

Unix-specific identifier

AF_Unix, 140EFAULT, 143ENOENT, 143EPERM, 139gid_t, 294mode_t, 294MTIOCGET, 427MTIOCRDHPOS, 427MTIOCRDSPOS, 427MTIOCTOP, 427pdp11, 296pid_t, 294SCM_CREDS, 140SCM_RIGHTS, 140SIGQUIT, 137SOL_SOCKET, 140st_blocks, 294st_rdev, 294TIOCGWINSZ, 292tm, 294

unnecessary functionality, 37unpack, Perl function, 82UnresolvedPermission, Java class, 142unsigned char, type, 49unsigned, type, 51unstable package, 344unused elements (cache), 199upcast, 425update.c, sample, 368uri, 175url, 64URLTestCase.java, sample, 434us, 315us-ascii, 312usability, software, 5, 8user time, 157user_from_uid, Unix-specific function, 195,

196using, keyword, 75utf-16, 312utf-16be, 312utf-16le, 312utf-8, 80, 310, 312util.c, sample, 64, 119, 277, 380util.logging, Java package, 449

Page 36: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

558 Index

util_uri.c, sample, 175utils.c, sample, 241utl_labellist.cpp, sample, 305uudecode.c, sample, 20

vacation.c, sample, 277vacation, Unix-specific command, 277valgrind (memory profiler), 254validate.cpp, sample, 276validate.dat, sample, 438Valve.java, sample, 411var.c, sample, 212, 232, 373variable-space requirements, 208variable-width, 309vax, 300vector, 26vector, C++ library, 76Vector, Java class, 76version control system, 452vfork, Unix-specific function, 294vfprintf.c, sample, 313vfprintf, C library, 167, 168, 294, 298vfs_cache.c, sample, 199vfs_subr.c, sample, 139, 377vfscanf, C library, 116vga, 153, 219vga.c, sample, 50, 244, 416, 417vga.h, sample, 219vga_isa.c, sample, 416vgaFasm.h, sample, 153vi, Unix-specific command, 277vidcconsole.c, sample, 355video buffer, 244video graphics adapter, 219virtual address space, 227virtual function table, 222virtual memory, 192, 227virtual memory map, 264virtual method, 179, 222virtual table, 223VirtualAllocEx, Win32 sdk, 241viscosity, 403viscosity, code, 419visitor, 462visitor pattern, 410

Visual …, see Microsoft …vm_page.c, sample, 192vm_pageout.c, sample, 199vms, 388vmstat, sample, 159vmstat, Unix-specific command, 159void, keyword, 305void, type, 20, 61, 62volatile, Java class, 55volatile, Java keyword, 56volatile, keyword, 232volatile, type, 213vscanf, C library, 116vsnprintf, C library, 116vsprintf, C library, 116vtbl, 223

wait.h, Unix-specific function, 294wait4, Unix-specific function, 145, 146wait, Java method, 52, 54, 55wait, Unix-specific function, 121walk.c, sample, 367wall clock time, 151, 157, 189warn, Unix-specific function, 118warnx, Unix-specific function, 118WarpConnector.java, sample, 56wc.cc, sample, 36wc.h, sample, 36wchar_t, keyword, 310, 312wchar_t, type, 210wcscat, C library, 310wcscmp, C library, 310wcscpy, C library, 310wcslen, C library, 310wcstombs, C library, 310wctomb, C library, 310wds.c, sample, 213WebObjects, 434WebappClassLoader.java, sample, 414WebServerConnection.java, sample, 60, 340weighted methods per class, 333Western Digital, 87while, keyword, 328, 368white-box testing, 433whitelisting, 126

Page 37: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 559

wide character, 309WildcardSessionAttribute-

MatcherFactory.java, sample, 357WinExec, Win32 sdk, 119Win32, 58, 59, 312Win32 API, 58, 59, 100Win32 sdk

_TCHAR, 312_UNICODE, 312CloseFile, 291CreateFile, 189, 295GetConsoleScreenBufferInfo, 291GetLocaleInfo, 315GetMessage, 189HeapAlloc, 240LoadLibrary, 320LoadString, 320lParam, 427LZCopy, 137OpenFile, 291PeekMessage, 189ReadFile, 291RpcImpersonateClient, 139send, 137Sleep, 79spawnlp, 119spawnv, 121spawnvp, 119stricmp, 370UNICODE, 312WriteFile, 291AfxLoadLibrary, 119BackupWrite, 137CharToOem, 116CoImpersonateClient, 134CompareString, 315CopyFile, 137CreateMailslot, 137CreateProcess, 119, 139CREATESTRUCT, 427CreateEnhMetaFile, 137CreateFileMapping, 137, 241, 245CreateFileMapping, 241CreateProcessAsSuser, 139CreateProcessAsUser, 104, 119

CreateRestrictedToken, 139CryptCreateHash, 124CryptGenRandom, 123DdeAddData, 137DdeImpersonateClient, 139DrawState, 58, 59DrawText, 137FormatMessage, 118GetCurrencyFormat, 315GetDateFormat, 315GetFileSecurity, 139GetFileSize, 59, 60GetFileSizeEx, 59GetLastError, 64GetLocaleInfo, 315GetNumberFormat, 315GetTimeFormat, 315HeapFree, 240ImpersonateDdeClientWindow, 134ImpersonateNamedPipeClient, 134ImpersonateSelf, 134ImpersonateAnonymousToken, 134ImpersonateLoggedOnUser, 134, 139ImpersonateNamedPipeClient, 139ImpersonateSecurityContext, 134INVALID_HANDLE_VALUE, 245LoadLibrary, 119LoadLibraryEx, 119MapViewOfFile, 241, 245MessageBox, 137NetJoinDomain, 139NetMessageBufferSend, 137OemToChar, 116OpenProcessToken, 139RegSetValueEx, 137ReportEvent, 137RevertToSelf, 139RpcImpersonateClient, 134SendMessage, 137SetClipboardData, 137SetDlgItemText, 137SetNamedSecurityInfo, 138SetSystemPowerState, 139SetThreadToken, 134, 139ShellExecute, 119

Page 38: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

560 Index

ShellExecuteEx, 119TransactNamedPipe, 137TransmitCommChar, 137VirtualAllocEx, 241WinExec, 119WM_CREATE, 427WM_ENDSESSION, 427WM_QUERYENDSESSION, 427WriteFile, 24, 137WritePrinter, 137WriteConsoleOutput, 137

Win32FilePeer.cpp, sample, 59Win32FileStream.cpp, sample, 60Win9xConHook.c, sample, 58, 426Wind/U, 308Windows …, see Microsoft Windows …Windows platform API, 426Windows-specific command

apispy, 160, 161cmd, 120command, 120dumpbin, 230, 246netstat, 104perfmon, 159Process Explorer, 104tasklist, 104, 246taskmgr, 157tracert, 131windump, 160

windump, Windows-specific command, 160WM_CREATE, Win32 sdk, 427WM_ENDSESSION, Win32 sdk, 427WM_QUERYENDSESSION, Win32 sdk, 427wm_motif, 308wmc, 333Word, see Microsoft Wordworking set, 234, 235workload characterization, 157workspace register, 269worm.c, sample, 354worst-case complexity, 174wprintf, C library, 310WriteConsoleOutput, Win32 sdk, 137WriteFile, Win32 sdk, 24, 137WritePrinter, Win32 sdk, 137

write, Unix-specific function, 22, 24, 61, 136,183, 185, 190, 241, 291

WriteFile, Win32 sdk, 291writev, Unix-specific function, 136, 185, 186,

190wscanf, C library, 310wxWindows, 308

X Image Extension, 176X Window System, 137, 153, 187, 215, 244,

307, 398, 438X Window System library, StringToKeySym,

153X/Open Portability Guide Issue 4, 316x2p, Unix-specific command, 367x86-64, 210xalloc.c, sample, 438xargs, Unix-specific command, 310xcalc.c, sample, 499xcmisc.c, sample, 27xdr, 299Xerces, 350xf86bcache.c, sample, 199xf86Beta.c, sample, 360xf86Config.c, sample, 153xgettext, Unix-specific function, 318xieperf.h, sample, 79xinstall.c, sample, 271Xlcint.h, sample, 302Xlib.h, sample, 215xlint, Unix-specific command, 242xml, 18, 82, 94, 147, 153XMLByteStreamCompiler.java, sample, 80,

355XmlMapper.java, sample, 75, 214xms, 237xp, 4xpg4, 316xref.c, sample, 360xslt, 434XSPUtil.java, sample, 56Xt, 153xwud.c, sample, 212XXX, 432

Page 39: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54

Index 561

yacc, Unix-specific command, 18year 2038 problem, 49yes.c, sample, 11ying and yang (elements of computation), 5yperr_string.c, sample, 75yplib.c, sample, 439

zic.c, sample, 318, 360zone of pain, packages, 349zone of uselessness, packages, 349zutil.h, sample, 292

Page 40: Index [ptgmedia.pearsoncmg.com] · 2009. 6. 9. · Spinellis codequal March 2, 2006 15:54 524 Index aggregate data types, 213 aggregation association, 12 agile software development,

Spinellis codequal March 2, 2006 15:54