I agree, the summary and quoted code don't shed any light on the issue, but the big, and possibly illegal, problem is that the databases are heavily self-modifying. Random example:
/* Table : CONTEST */
/* Description: Election specific contest. There could be multiple
contests per office differentiated by party, Precinct,
and Gender. There are also contests uhat are not for an
office such as System Contest (e.g Straight Party) and
Proposals. */
begin
Exec("
create table CONTEST
-- identifer of contest
CONTEST_ID T_GLOBAL_ID identity
-- identifer of political subdivision
, PSD_ID T_GLOBAL_ID null
-- 0 = all, 1=exclude, 2=include
-- 1 = Some voters can vote ONLY for this office
-- 2 =Some voters in the psd cannot vote for the office
, ELIGIBILITY !numeric(1) null default 0
-- if office is precinct level, identifier of contest's precinct
, PRECINCT_ID T_GLOBAL_ID null
-- identifier of proposal in contest
, PROPOSAL_ID T_GLOBAL_ID null
-- Combined from office/proposal name and modifier such as
-- precinct name or gender
, NAME T_STANDARD_NAME null
-- If contest is NOT a proposal: reference to the office at
-- the source of this contest
etc. The Program seems to have created and destroyed tables, columns, views, etc, on the fly, an incredibly odd practice for data that is meant to be audited.