I've never messed with this code before, but I assume you just need to check to see if line
matches the specific polyline you're looking for and then remove it. Something like this:
for(Polyline line : polylines)
{
if (isSpecificPolyline(line))
line.remove();
}