This method has two variants:

New ClassAds already have a compatibility version of the first variant. But it doesn't handle string escaping properly. It also leaks memory and allows multiple attributes to be inserted in a single call.

For the second variant, we'd probably use new ClassAds' Insert(), which takes the attribute name and value as separate arguments. The ExprTree's passed in as arguments come from calls to NextExpr(), Lookup(), or Parse() near the callsite. These should be straightforward to update.

The check_for_dups argument does not appear to be used anywhere.

Developer time: 1 day

Progress: First variant now behaves properly.