It is estimated that more than 15% of the building heating, ventilation, and air conditioning (HVAC) problems are due to control software programming. The estimated annual energy impact of building HVAC control logic faults in the United States is 12 trillion BTU. Current industry practice adopts two approaches to deal with HVAC control logic faults: manual logic verification during commissioning and fault detection and diagnosis (FDD) during system operation. Both approaches have limitations that make them ineffective in verifying HVAC control logic. The manual logic verification process requires subjective ad-hoc reasoning, which is costly (knowledge and labor intensive) and error-prone. Existing FDD tools and studies do not provide an approach to specify possible logic faults that might exist, and they rely heavily on user input to diagnose faults effectively. This research targets the problem of HVAC control logic faults by proposing an HVAC control logic fault identification and diagnosis framework following the software unit testing paradigm. This research specifically focuses on air handling unit (AHU) systems, since control logic faults are more frequently found in them and they are one of the most important and prevalent types of equipment in commercial building central HVAC systems. Two specific challenges this research addresses are: 1) the need for a formalized approach to define control logic faults customized based on system-specific information, 2) the need for a computer-aided approach to help diagnose control logic fault causes in the control logic program effectively. To address the first challenge, the contributions I made in this research include: 1) developing a formalism of defining applicable AHU control logic faults based on system-specific information, and 2) developing an AHU component and control ontology that specifies the information requirements for defining control logic faults. The generality of the fault definition formalism (including the ontology) and the precision/recall of the faults it defined are validated with 27 different AHUs specified by the American Society of Heating, Refrigerating and AirConditioning Engineers (ASHRAE). The implemented prototype is able to provide customized control logic fault definition for all 27 AHUs with an average precision of 94.2% and recall of 83.0%. To address the second challenge, the contributions I made in this research include: 1) developing a framework of casting AHU control logic fault diagnosis problem into a software fault localization task, 2) evaluating the performance of spectrum-based and mutation-based fault localization algorithms for locating AHU control logic fault causes, and 3) identifying effective mutation operators and conducting sensitivity analysis to explore setup options for AHU control logic fault localization computation. The implementation of the developed framework supported the evaluation of 39 considered spectrum-based and mutationbased fault localization algorithms on 11 real-world control logic fault cases I developed from two real-world AHUs. The evaluation showed that the mutation-based Metallaxis method outperformed all other considered algorithms for diagnosing AHU control logic faults. The outcomes of this research are expected to alleviate the significant energy waste caused by HVAC control logic faults through motivating the industrial deployment of the proposed HVAC control logic fault identification and diagnosis framework for a more effective and systematic control logic verification process. This thesis also points out multiple future research directions, such as HVAC information inference for control logic specification, and HVAC control logic code analysis.