1.1 | Examples of the various software quality views: in use, external, internal, process | 3 |
1.2 | Book map: elements of software quality | 6 |
1.3 | Conflicts between quality characteristics | 8 |
1.4 | Example of an annotated listing | 10 |
1.5 | UML-based diagram notation | 12 |
|
2.1 | Reflective implementation of toString , using annotations | 23 |
2.2 | Associating code with data, using the Strategy pattern | 32 |
2.3 | Establishing handlers through interface implementation | 34 |
2.4 | Explicit management of an object's private resource | 36 |
2.5 | Debugging code in the sendmail MTA daemon | 38 |
2.6 | Detecting null pointer references through static analysis | 45 |
2.7 | Managing the use of a resource with wait and notify | 53 |
2.8 | Use of the flawed double-checking locking pattern | 54 |
2.9 | The relationship between memory and resource leaks | 65 |
2.10 | Allocating and freeing file descriptors in the NetBSD kernel | 66 |
2.11 | Definition of a font's glyphs in automatically generated source code | 70 |
2.12 | Locations of global variable definitions (left) and references (right) in the NetBSD source code | 72 |
2.13 | Use of types by the NetBSD kernel global variables | 73 |
2.14 | Encoding a string into a modified UTF-8 format | 81 |
2.15 | Retransmission of a command sequence in a SCSI device driver | 90 |
2.16 | Recovering data from a failing disk | 94 |
|
3.1 | Buffer overflow in the FTP daemon | 108 |
3.2 | A race condition in the PPP daemon code | 113 |
3.3 | Time-of-check-to-time-of-use exploitation of the pppd vulnerability. | 114 |
3.4 | Time-of-check-to-time-of-use exploitation sequence diagram | 114 |
3.5 | Unsafe use of strcat | 117 |
3.6 | strcat correctly applied on a dynamically sized buffer | 117 |
3.7 | Insecure scrubbing of the environment | 126 |
3.8 | Secure scrubbing of the environment | 127 |
3.9 | Failing to check an error return in the traceroute implementation | 132 |
3.10 | Trojan horse code embedded in the TCP Wrappers program | 144 |
|
4.1 | Experts caution against optimizing code | 155 |
4.2 | EJP illustrates the Pareto Principle in the HSQLDB code | 165 |
4.3 | Example of gprof output for the vfprintf function | 168 |
4.4 | Propagation of processing times in a call graph | 170 |
4.5 | Relative performance of some common algorithm classes | 174 |
4.6 | System calls of a simple cat invocation | 184 |
4.7 | System calls for local IPC in a logger invocation | 186 |
4.8 | System calls in remote DNS IPC for a ping name query | 188 |
4.9 | The effect of thrashing on runtime performance | 192 |
4.10 | The user ID to name cache code | 196 |
4.11 | Caching database row entries | 198 |
|
5.1 | A structure padded to ensure optimal alignment (top) and packed to conserve memory (bottom) | 219 |
5.2 | Ordering the structure elements from largest to smallest, ensuring alignment and memory conservation | 220 |
5.3 | UML class diagram of the OpenCL algorithm inheritance tree | 223 |
5.4 | The C++ virtual tables of three OpenCL algorithm classes | 224 |
5.5 | Java objects pointing to instance data | 225 |
5.6 | Java objects with a handle pointing to instance data and class data | 226 |
5.7 | Types of memory resources | 227 |
5.8 | Process memory organization | 227 |
5.9 | A modern computer's storage hierarchy | 231 |
5.10 | Size distribution of 1 million allocated objects | 249 |
5.11 | Lifetime distribution of 1 million allocated objects | 250 |
5.12 | Memory pool snapshots illustrating memory fragmentation | 251 |
5.13 | Example of an external memory fragmentation scenario | 252 |
5.14 | Example of an internal memory fragmentation scenario | 253 |
5.15 | A memory allocation profile of the Apache HTTP server | 254 |
5.16 | A memory allocation profile of the sed stream editor | 256 |
5.17 | Report from the valgrind memory leak test tool | 260 |
5.18 | A memory leak in the C regular expression library | 261 |
5.19 | Typical contents of a stack frame | 265 |
5.20 | Contents of a stack frame | 266 |
5.21 | Stack size snapshots | 270 |
5.22 | Relationship between data and stack size | 271 |
5.23 | Relationships between source file and object file size | 275 |
5.24 | Inheritance in the ACE address types | 277 |
|
6.1 | Providing portability through an isolation layer | 292 |
6.2 | The integer 0x04030201 stored in a little-endian and a big-endian architecture | 298 |
6.3 | Examples of GUI portability strategies | 307 |
6.4 | Message handling using the catgets interface | 317 |
6.5 | Message handling using the gettext interface | 317 |
6.6 | Message-localization process using the GNU gettext tools | 319 |
6.7 | Accessing localized messages in a Java servlet | 321 |
|
7.1 | Measuring extended cyclomatic complexity | 330 |
7.2 | Program growth and maintainability index over time in the FreeBSD kernel and user programs | 330 |
7.3 | Distribution of maintainability indices for all FreeBSD modules | 331 |
7.4 | Weighted methods per class metric: for each HSQLDB class (left); number of Eclipse classes for different values (right) | 334 |
7.5 | Depth of inheritance tree metric: for each HSQLDB class (left); number of Eclipse classes for different values (right) | 335 |
7.6 | HSQLDB: inheritance tree of classes with a high DIT metric and the number of methods they define | 336 |
7.7 | Number of children metric for Eclipse classes | 337 |
7.8 | Coupling between object classes: for each HSQLDB class (left); number of Eclipse classes for different values (right) | 338 |
7.9 | Response for a class: for each HSQLDB class (left); number of Eclipse classes for different values (right) | 339 |
7.10 | Lack of cohesion in methods: for each HSQLDB class (left); number of Eclipse classes for different values (right). | 342 |
7.11 | Public and private classes in the org.hsqldb package | 343 |
7.12 | An unstable package in Tomcat | 345 |
7.13 | A stable package in the Eclipse distribution | 345 |
7.14 | Relationship between afferent and efferent couplings in Eclipse | 346 |
7.15 | Instability distribution of the Eclipse packages (left) and third-party bundled packages (right) | 347 |
7.16 | Stable dependencies in the junit packages | 348 |
7.17 | Less stable dependencies in the mx4j packages | 348 |
7.18 | Instability over abstractness for the Eclipse packages | 350 |
7.19 | Cyclic dependencies in Xerces and Eclipse | 351 |
7.20 | Maintainability index versus module size for all FreeBSD modules | 366 |
7.21 | Function length distribution for 65,000 C functions | 367 |
7.22 | Lack of regularity in processing a user response | 369 |
7.23 | A regular control structure for processing a user response | 370 |
7.24 | Different break and continue scopes in the same code block | 371 |
7.25 | Common coupling in the ed's DES CBC implementation | 383 |
7.26 | Common coupling relationships in the ed's DES CBC implementation | 384 |
7.27 | Reading and using a disk's partition kernel in the NetBSD kernel | 387 |
7.28 | The design of delta caching in the Low Bandwidth X (LBX) extension | 398 |
7.29 | Implementation of delta caching in the Low Bandwidth X (LBX) extension | 400 |
7.30 | Unwanted relationships between servlet container elements | 410 |
7.31 | Separating classes, using the chain of responsibility design pattern | 411 |
7.32 | Common lines between two different Catalina files | 415 |
7.33 | A formatted comment that is difficult to modify (left) and one that is easy to modify (right) | 418 |
7.34 | Declaring a variable within the innermost block | 420 |
7.35 | Directly interpreting a directory's data in the Seventh Edition Unix | 425 |
7.36 | Playing loose with types in pre--Java 1.5 code | 426 |
7.37 | Ad hoc unit testing in a C library's fmod implementation | 435 |
7.38 | Unit testing with the JUnit test framework | 436 |
7.39 | Test coverage (left) and branch coverage (right) of Perl's source code versus the number of executed test cases | 443 |
7.40 | Use of assertions in the regular expression engine | 446 |
7.41 | A simplified graph of include file dependencies | 453 |
7.42 | Documentation dependencies | 456 |
|
8.1 | Quadratic equation cancellation errors and the effect of precision | 490 |
8.2 | Absorption errors when calculating the area of a far-away triangle | 491 |
8.3 | Code verifying a floating-point result | 498 |