A North Carolina federal judge has threatened to bar an attorney from practicing in her court after citing a litany of ethical and professional missteps he allegedly made as he represented a real estate investment firm defending claims it rigged foreclosure sales.