For purposes of this subsection, the term qualified allocation plan means any plan which— (A) sets forth the selection criteria to be used to prioritize qualified projects for allocations of State neighborhood homes credit dollar amounts, including— (i) the need for new or substantially rehabilitated owner-occupied homes in the area addressed by the project, (ii) the expected contribution of the project to neighborhood stability and revitalization, including the impact on neighborhood residents, (iii) the capability and prior performance of the project sponsor, and (iv) the likelihood the project will result in long-term homeownership, (B) has been made available for public comment, and (C) provides a procedure that the neighborhood homes credit agency (or any agent or contractor of such agency) shall follow for purposes of— (i) identifying noncompliance with any provisions of this section, and (ii) notifying the Internal Revenue Service of any such noncompliance of which the agency becomes aware. (g) Repayment (1) In general (A) Sold during 5-year period If a qualified residence is sold during the 5-year period beginning immediately after the affordable sale of such qualified residence referred to in subsection (a), the seller shall transfer an amount equal to the repayment amount to the relevant neighborhood homes credit agency. (B) Use of repayments A neighborhood homes credit agency shall use any amount received pursuant to subparagraph (A) only for purposes of qualified projects. (2) Repayment amount For purposes of paragraph (1)(A)— (A) In general The repayment amount is an amount equal to the applicable percentage of the gain from the sale to which the repayment relates. (B) Applicable percentage For purposes of subparagraph (A), the applicable percentage is 50 percent, reduced by 10 percentage points for each year of the 5-year period referred to in paragraph (1)(A) which ends before the date of such sale. (3) Lien for repayment amount A neighborhood homes credit agency receiving an allocation under this