Detecting Leaks in Pipelines