Lightweight Techniques for Automatic Software Fault Localization: Theory and Practice