Open source software systems are becoming more popular today, and are playing important roles in many scientific and business software applications. Many companies are investing in open source projects and lots of them are also using such software in their own work. But, because open source software is often developed with a different management style than the industrial ones, the quality and reliability of the code needs to be investigated. Hence, more projects need to be measured to obtain information about the characteristics and nature of the source code. In this paper we have evaluated the object-oriented metrics given by Chidamber and Kemerer, and few other static code metrics for two open source projects. We have carried out an empirical study and tried to find out the nature of relationship between these metrics and defects. In other words, it has been investigated whether these metrics are significantly associated with defects or not. For this we have extracted source code, defects processed it for metrics .Two open source java projects of emulators have been taken from source forge and used for this purpose.