The purpose of this study is to evaluate whether the community reinforcement approach (CRA) plus contingency management (CM) is more effective overall than CRA only in reducing illicit opioid and cocaine use during agonist maintenance treatment and at 3 and 6 month follow-up after completion of study protocol, and to compare the efficacy of maintenance on buprenorphine to methadone when maintenance is combined with CRA only or CRA plus CM.