A positive Thomas test, in which the tested leg rises off the table when the contralateral hip is fully flexed, indicates tightness of the: