This paper presents a pattern-based framework for developing tool support to detect software anomalies. The use of a pattern-based approach is important because it provides the flexibility needed to address domain-specific needs, with respect to the types of problems the tools detect and the strategies used to inspect and adapt the code. Patterns can be used to detect a variety of problems, ranging from simple syntactic issues to difficult semantic problems requiring global analysis. Patterns can also be used to describe transformations of the software, used to rectify problems detected through software inspection, and to support interactive inspection and adaptation when full automation is impractical. This paper describes a part of the Knowledge Centric Software (KCS) framework that embodies the pattern-based approach and provides capabilities for addressing different languages and different application domains. While only the part of the framework relevant to code inspections is addressed in this paper, in future, we also expect to address UML analysis and design models. As an application of the research, we present an overview of an inspection tool being developed for high assurance software for avionics systems.