I am doing a renovation project at an apartment housing complex and during my initial fieldwork came across something I've never seen before: copper and aluminum wiring being used on the same circuit. There were copper "pigtails" at the panel and at the device and spliced to these copper "pigtails" was aluminum NM cable for the run. There was some "goop" applied to the CU/AL splice which I am guessing was to prevent interaction of the metals. Is this code compliant? I don't understand why the contractor did this because the electrical panel is within close proximity to all the devices in the apartment. And the other thing is that if the panel had eleven circuits, they only did this CU/AL combination on seven of them, the other four circuits were copper all the way.