This duplicates the topmost path in a selected compound path. (The duplicate will still be within the compound path; if it should be out, it will have to be moved out.)
var dup = app.selection[0].pathItems[0].duplicate();
dup.position = [0, 0];
If you want to duplicate the bottommost path, change the path's index to app.selection[0].pathItems.length - 1.