The topic of this paper is the development of sensitivity and uncertainty analysis capability to the reactor physics code CASMO-4 in the context of the UAM (Uncertainty Analysis in Best-Estimate Modelling for Design, Operation, and Safety Analysis of LWRs) benchmark. The sensitivity analysis implementation is based on generalized perturbation theory, which enables computing the sensitivity profiles of reaction rate ratios efficiently by solving one generalized adjoint system for each response. Both the theoretical background and the practical guidelines for modifying a deterministic transport code to compute the generalized adjoint solutions and sensitivity coefficients are reviewed. The implementation to CASMO-4 is described in detail. The developed uncertainty analysis methodology is deterministic, meaning that the uncertainties are computed based on the sensitivity profiles and covariance matrices for the uncertain nuclear data parameters. The main conclusions related to the approach used for creating a covariance library compatible with the cross-section libraries of CASMO-4 are presented. Numerical results are given for a lattice physics test problem representing a BWR, and the results are compared to the TSUNAMI-2D sequence in SCALE 6.1.