Buggy code:
public class AddClaimActivity extends Activity { private static final String FILENAME = "save.sav" ; private ClaimList Claims ; private Claim newClaim ; private String newClaimName ; private int startDateDay ; private int startDateMonth ; private int startDateYear ; private int endDateDay ; private int endDateMonth ; private int endDateYear ; private String status ; private String description ; private EditText editTextClaimName ; private EditText editTextClaimStartDateDay ; private EditText editTextClaimStartDateMonth ; private EditText editTextClaimStartDateYear ; private EditText editTextClaimEndDateDay ; private EditText editTextClaimEndDateMonth ; private EditText editTextClaimEndDateYear ; private EditText editTextClaimDescription ; private Spinner spinnerStatus ; private Button buttonNewClaimDone ; private Button buttonNewClaimCancle ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void addListenerOnSpinnerItemSelection ( ) { } @ Override protected void onStart ( ) { super . onStart ( ) ; Claims = this . loadFromFile ( ) ; editTextClaimName . setText ( newClaimName ) ; buttonNewClaimDone . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intentDone = new Intent ( ) ; newClaimName = editTextClaimName . getText ( ) . toString ( ) ; startDateDay = Integer . parseInt ( editTextClaimStartDateDay . getText ( ) . toString ( ) ) ; startDateMonth = Integer . parseInt ( editTextClaimStartDateMonth . getText ( ) . toString ( ) ) ; startDateYear = Integer . parseInt ( editTextClaimStartDateYear . getText ( ) . toString ( ) ) ; endDateDay = Integer . parseInt ( editTextClaimEndDateDay . getText ( ) . toString ( ) ) ; endDateMonth = Integer . parseInt ( editTextClaimEndDateMonth . getText ( ) . toString ( ) ) ; endDateYear = Integer . parseInt ( editTextClaimEndDateYear . getText ( ) . toString ( ) ) ; status = String . valueOf ( spinnerStatus . getSelectedItem ( ) ) ; description = editTextClaimDescription . getText ( ) . toString ( ) ; newClaim = new Claim ( newClaimName ) ; newClaim . setDescription ( description ) ; Calendar startDate = Calendar . getInstance ( ) ; startDate . set ( startDateYear , startDateMonth , startDateDay ) ; newClaim . setStartDate ( startDate ) ; Calendar endDate = Calendar . getInstance ( ) ; endDate . set ( endDateYear , endDateMonth , endDateDay ) ; <START_BUG> newClaim . setStartDate ( endDate ) ; <END_BUG> newClaim . setStatus ( status ) ; newClaim . setDescription ( description ) ; Claims . addClaim ( newClaim ) ; saveInFile ( ) ; intentDone . setClass ( AddClaimActivity . this , MainActivity . class ) ; AddClaimActivity . this . startActivity ( intentDone ) ; } } ) ; buttonNewClaimCancle . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intentCancle = new Intent ( ) ; intentCancle . setClass ( AddClaimActivity . this , MainActivity . class ) ; AddClaimActivity . this . startActivity ( intentCancle ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private ClaimList loadFromFile ( ) { } private void saveInFile ( ) { } }

Fix:
newClaim . setEndDate ( endDate ) ;