Buggy code:
public class AddExpenseActivity extends Activity { private static final String FILENAME = "save.sav" ; private ClaimListModel Claims ; private ExpenseModel newExpense ; private int claimID ; private String claimIDstr ; final Context context = this ; private String newExpenseName ; private String category ; private String description ; private String currencyUnit ; private int dateDay ; private int dateMonth ; private int dateYear ; private int amountSpend ; private EditText editTextExpenseName ; private EditText editTextExpenseDateDay ; private EditText editTextExpenseDateMonth ; private EditText editTextExpenseDateYear ; private EditText editTextExpenseCategory ; private EditText editTextExpenseAmoutnSpend ; private EditText editTextExpenseUnitOfCurrency ; private EditText editTextExpenseDescription ; private Button buttonNewExpenseCancle ; private Button buttonNewExpenseDone ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onStart ( ) { super . onStart ( ) ; Claims = this . loadFromFile ( ) ; editTextExpenseName . setText ( newExpenseName ) ; buttonNewExpenseDone . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intentDone = new Intent ( ) ; String t1 = editTextExpenseDateDay . getText ( ) . toString ( ) ; String t2 = editTextExpenseDateMonth . getText ( ) . toString ( ) ; String t3 = editTextExpenseDateYear . getText ( ) . toString ( ) ; String t4 = editTextExpenseAmoutnSpend . getText ( ) . toString ( ) ; if ( ( ( ( t1 . equalsIgnoreCase ( "" ) ) || ( t2 . equalsIgnoreCase ( "" ) ) ) || ( t3 . equalsIgnoreCase ( "" ) ) ) || ( t4 . equalsIgnoreCase ( "" ) ) ) { Toast . makeText ( getApplicationContext ( ) , "Emput<seq2seq4repair_space>input" , LENGTH_LONG ) . show ( ) ; } else { newExpenseName = editTextExpenseName . getText ( ) . toString ( ) ; category = editTextExpenseCategory . getText ( ) . toString ( ) ; description = editTextExpenseDescription . getText ( ) . toString ( ) ; currencyUnit = editTextExpenseUnitOfCurrency . getText ( ) . toString ( ) ; dateDay = Integer . parseInt ( editTextExpenseDateDay . getText ( ) . toString ( ) ) ; dateMonth = Integer . parseInt ( editTextExpenseDateMonth . getText ( ) . toString ( ) ) ; dateYear = Integer . parseInt ( editTextExpenseDateYear . getText ( ) . toString ( ) ) ; amountSpend = Integer . parseInt ( editTextExpenseAmoutnSpend . getText ( ) . toString ( ) ) ; newExpense = new ExpenseModel ( newExpenseName ) ; newExpense . setTextualDescription ( description ) ; Calendar date = Calendar . getInstance ( ) ; <START_BUG> date . set ( dateYear , dateMonth , dateDay ) ; <END_BUG> newExpense . setDate ( date ) ; newExpense . setCategory ( category ) ; newExpense . setUnitOfCurrency ( currencyUnit ) ; newExpense . setAmountSpent ( amountSpend ) ; ClaimModel currentClaim = Claims . getClaimList ( ) . get ( claimID ) ; currentClaim . addExpense ( newExpense ) ; intentDone . putExtra ( "claimID" , claimIDstr ) ; saveInFile ( ) ; intentDone . setClass ( AddExpenseActivity . this , ClaimActivity . class ) ; AddExpenseActivity . this . startActivity ( intentDone ) ; } } } ) ; buttonNewExpenseCancle . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { AlertDialog . Builder ADB = new AlertDialog . Builder ( context ) ; ADB . setTitle ( "Exit" ) ; ADB . setMessage ( "Are<seq2seq4repair_space>you<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>exit<seq2seq4repair_space>without<seq2seq4repair_space>saving?" ) ; ADB . setNegativeButton ( no , null ) ; ADB . setPositiveButton ( yes , new OnClickListener ( ) { public void onClick ( DialogInterface arg0 , int arg1 ) { Intent intentBackPressed = new Intent ( ) ; intentBackPressed . putExtra ( "claimID" , claimIDstr ) ; intentBackPressed . setClass ( AddExpenseActivity . this , ClaimActivity . class ) ; AddExpenseActivity . this . startActivity ( intentBackPressed ) ; } } ) . create ( ) . show ( ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private ClaimListModel loadFromFile ( ) { } private void saveInFile ( ) { } @ Override public void onBackPressed ( ) { } }

Fix:
date . set ( dateYear , ( ( dateMonth ) - 1 ) , dateDay ) ;