Oil and natural-gas producer XTO Energy Inc. said it will buy closely held Hunt Petroleum Corp. for $4.19 billion in cash and stock, in a deal that highlights the changing of the guard in the U.S. oil patch. Hunt Petroleum, which traces its lineage to legendary wildcatter H.L. Hunt, is the largest in a series of private companies, many of them family-owned, that have sold to larger public companies in recent months. Large players are rushing to snap up assets in emerging oil and natural-gas fields, while small producers are seeking to cash in on holdings whose values have soared...