We look at research that shows that companies manage their software badly, leading to legal troubles and extra costs.