The first paper filed when an immigrant enters the United States is the Declaration of Intention. When the immigrant has resided in the US and in the State or County for a required number of years, he/she can then petition the court for citizenship status by filing a Petition for Naturalization. The court then attempts to get a copy of the Declaration of Intent from the declarant or the State or County in which it was first filed, and the Certificate of Arrival. Witnesses are then subpoenaed to testify as to the character and residency of the petitioner. The court reviews the documents and testimonies and either awards citizenship status or denies the petition due to circumstances. Some denials can be related to the lack of witnesses, the petitioner does not appear in court, the petitioner has declared exemption from military service or has committed a criminal offense. 
This is one example of a file.
This is a more complete file.
Repatriation Example