MA Gen L ch 53 § 70e (2021)
2021 Massachusetts General Laws|Part I - Administration of the Government|Title VIII - Elections|Chapter 53 - Nominations, Questions to Be Submitted to the Voters, Primaries and Caucuses|Section 70e - Order of Names on Ballots; Statement of Preference; Preferential Vote Count

Section 70E. The state secretary shall cause to be placed on the official ballot for use at presidential primaries the names of those candidates or potential candidates for the office of president of the United States whom he shall have determined to be generally advocated or recognized in national news media throughout the United States, the names of any other candidates or potential candidates for nomination for president whose names are proposed therefor by nomination papers prepared and furnished by the state secretary, signed in the aggregate by at least twenty-five hundred voters, and the names of those candidates or potential candidates for nomination for president whose names appear on written lists signed by the chairman of the state committees of the political parties, arranged in such order as may be determined by lot under the direction of the state secretary, a blank space in which the voter may, if he does not vote for any of the candidates for president whose names are printed on the ballot insert the name of any person of his choice as a candidate for president and a blank space in which a voter may vote no preference. A vote both for no preference and for a candidate whose name has been inserted by the voter shall be counted as a vote for that candidate. The chairman of the state committee of a political party and the state secretary shall submit lists or prepare lists of candidates for president, as aforesaid, no later than the first Friday in January and shall notify each such candidate forthwith, by registered mail, of the presence of his name on said lists. No name shall be removed from said lists, nor from the ballot, unless such candidate shall file with the state secretary an affidavit stating that he does not desire his name printed upon said ballot at the forthcoming presidential primary. Such affidavit shall be filed with the state secretary no later than five o'clock post meridian on the second Friday in January.  The names of candidates for state committee shall next be placed upon the ballot in the manner provided in section thirty-four. The names of candidates for ward or town committee appearing in nomination papers containing three or more nominations shall next be placed upon said ballot, arranged in groups and in the same order as in the nomination papers. The order in which the groups shall appear shall be determined by lot in the manner provided in section thirty-four. The names of candidates appearing in nomination papers containing one or two nominations shall follow, alphabetically arranged.  There shall also be printed on the ballot appropriate instructions to aid the voter with respect to expressing his preference for a candidate for nomination as president. Election officers in the presidential primaries, in counting and tabulating the votes showing the voters' preference for president, shall disregard the omission or inaccuracy of initials, the omission, inaccuracy or misspelling of Christian names, and the misspelling of surnames, if the intent of the voter to express a preference for any particular individual can be ascertained. Such statements of voters of presidential preference shall be counted, tabulated and entered in the records of election officers of votes cast.