Homeless man should have double leg amputation to save his life, says judge