A patient has chronic cough with purulent sputum and recurrent hemoptysis for over 10 years, with multiple chest X-rays showing no abnormalities. In the past two weeks, high fever developed, with increased foul-smelling purulent sputum. Chest X-ray reveals a large dense shadow in the right lower lobe, containing a cavity with air-fluid level. WBC count is 18×10<sup>9</sup>/L. The diagnosis is: