Program: 36045
Project: 36045
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  init();
  setContentView(R.layout.activity_order_edit);
  ref=this;
  mRestaurantID=getIntent().getIntExtra(ARG_RESTAURANT_ID,0);
  mPeriod=(Spinner)findViewById(R.id.spinner);
  mPeriod.setAdapter(adapter);
  mPeriod.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      if (position == 0) {
        order.setStart_time(17);
        order.setEnd_time(19);
      }
 else       if (position == 1) {
        order.setStart_time(17);
        order.setEnd_time(19);
      }
 else       if (position == 2) {
        order.setStart_time(17);
        order.setEnd_time(19);
      }
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
    }
  }
);
  mDate=(DatePicker)findViewById(R.id.datePicker);
  mDate.init(2014,5,14,new DatePicker.OnDateChangedListener(){
    @Override public void onDateChanged(    DatePicker datePicker,    int i,    int i2,    int i3){
      order.setRequest_date(i + "String_Node_Str" + i2+ "String_Node_Str"+ i3);
      System.out.println("String_Node_Str" + i + "String_Node_Str"+ i2+ "String_Node_Str"+ i3);
    }
  }
);
  mDishes=(ListView)findViewById(R.id.DishList);
  mDishes.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> arg0,    View arg1,    int arg2,    long arg3){
      TextView tmp=(TextView)arg1.findViewById(R.id.textView2);
      int i=Integer.parseInt(tmp.getText().toString());
      i++;
      tmp.setText(i + "String_Node_Str");
      dishes.get(arg2).addDish();
    }
  }
);
  deleteDish=(Button)mDishes.findViewById(R.id.delete);
  friendList=(TextView)findViewById(R.id.friendList);
  mAddFriend=(Button)findViewById(R.id.addFriend);
  mAddFriend.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      final String[] itemStrings=new String[friends.size()];
      for (int i=0; i < friends.size(); i++) {
        itemStrings[i]=friends.get(i).getName();
      }
      AlertDialog.Builder builder=new AlertDialog.Builder(OrderEditActivity.this);
      builder.setTitle("String_Node_Str").setIcon(android.R.drawable.ic_lock_lock).setItems(itemStrings,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          String tmp=friendList.getText().toString();
          tmp+=itemStrings[which] + "String_Node_Str";
          friendList.setText(tmp);
          User t=friends.get(which);
          inFriends.add(t);
          friends.remove(which);
        }
      }
).create().show();
    }
  }
);
  mDelFriend=(Button)findViewById(R.id.delFriend);
  mDelFriend.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      final String[] itemStrings2=new String[inFriends.size()];
      for (int i=0; i < inFriends.size(); i++) {
        itemStrings2[i]=inFriends.get(i).getName();
      }
      AlertDialog.Builder builder=new AlertDialog.Builder(OrderEditActivity.this);
      builder.setTitle("String_Node_Str").setIcon(android.R.drawable.ic_lock_lock).setItems(itemStrings2,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          friends.add(inFriends.get(which));
          inFriends.remove(which);
          String tmp="String_Node_Str";
          for (int i=0; i < inFriends.size(); i++) {
            tmp+=inFriends.get(i).getName() + "String_Node_Str";
          }
          friendList.setText(tmp);
        }
      }
).create().show();
    }
  }
);
  mSendInvitationButton=(Button)findViewById(R.id.SendActivityButton);
  mSendInvitationButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      order.setCustomer_id(cust_id);
      order.setRestaurant_id(mRestaurantID);
      int[] l=new int[inFriends.size()];
      for (int i=0; i < inFriends.size(); i++) {
        l[i]=inFriends.get(i).getCust_id();
      }
      order.setCustomer_ids(l);
      List<Dishe> dl=new ArrayList<Dishe>();
      for (int i=0; i < dishes.size(); i++) {
        if (dishes.get(i).getQuantity() > 0) {
          dl.add(dishes.get(i));
        }
      }
      order.setDishes(dl);
      progressDialog=new ProgressDialog(ref);
      progressDialog.setTitle("String_Node_Str");
      progressDialog.setMessage("String_Node_Str");
      progressDialog.show();
      BusProvider.get().post(new SaveOrderEvent(order));
      System.out.println(new Gson().toJson(order));
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  init();
  setContentView(R.layout.activity_order_edit);
  ref=this;
  mRestaurantID=getIntent().getIntExtra(ARG_RESTAURANT_ID,0);
  mPeriod=(Spinner)findViewById(R.id.spinner);
  mPeriod.setAdapter(adapter);
  mPeriod.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      if (position == 0) {
        order.setStart_time(17);
        order.setEnd_time(19);
      }
 else       if (position == 1) {
        order.setStart_time(17);
        order.setEnd_time(19);
      }
 else       if (position == 2) {
        order.setStart_time(17);
        order.setEnd_time(19);
      }
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
    }
  }
);
  mDate=(DatePicker)findViewById(R.id.datePicker);
  mDate.init(2014,5,14,new DatePicker.OnDateChangedListener(){
    @Override public void onDateChanged(    DatePicker datePicker,    int i,    int i2,    int i3){
      order.setRequest_date(i + "String_Node_Str" + i2+ "String_Node_Str"+ i3);
      System.out.println("String_Node_Str" + i + "String_Node_Str"+ i2+ "String_Node_Str"+ i3);
    }
  }
);
  mDishes=(ListView)findViewById(R.id.DishList);
  mDishes.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> arg0,    View arg1,    int arg2,    long arg3){
      TextView tmp=(TextView)arg1.findViewById(R.id.textView2);
      int i=Integer.parseInt(tmp.getText().toString());
      i++;
      tmp.setText(i + "String_Node_Str");
      dishes.get(arg2).addDish();
    }
  }
);
  deleteDish=(Button)mDishes.findViewById(R.id.delete);
  friendList=(TextView)findViewById(R.id.friendList);
  mAddFriend=(Button)findViewById(R.id.addFriend);
  mAddFriend.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      final String[] itemStrings=new String[friends.size()];
      for (int i=0; i < friends.size(); i++) {
        itemStrings[i]=friends.get(i).getName();
      }
      AlertDialog.Builder builder=new AlertDialog.Builder(OrderEditActivity.this);
      builder.setTitle("String_Node_Str").setIcon(android.R.drawable.ic_lock_lock).setItems(itemStrings,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          String tmp=friendList.getText().toString();
          tmp+=itemStrings[which] + "String_Node_Str";
          friendList.setText(tmp);
          User t=friends.get(which);
          inFriends.add(t);
          friends.remove(which);
        }
      }
).create().show();
    }
  }
);
  mDelFriend=(Button)findViewById(R.id.delFriend);
  mDelFriend.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      if (inFriends.size() == 1)       return;
      final String[] itemStrings2=new String[inFriends.size() - 1];
      for (int i=1; i < inFriends.size(); i++) {
        itemStrings2[i]=inFriends.get(i).getName();
      }
      AlertDialog.Builder builder=new AlertDialog.Builder(OrderEditActivity.this);
      builder.setTitle("String_Node_Str").setIcon(android.R.drawable.ic_lock_lock).setItems(itemStrings2,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          friends.add(inFriends.get(which + 1));
          inFriends.remove(which + 1);
          String tmp="String_Node_Str";
          for (int i=0; i < inFriends.size(); i++) {
            tmp+=inFriends.get(i).getName() + "String_Node_Str";
          }
          friendList.setText(tmp);
        }
      }
).create().show();
    }
  }
);
  mSendInvitationButton=(Button)findViewById(R.id.SendActivityButton);
  mSendInvitationButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      order.setCustomer_id(cust_id);
      order.setRestaurant_id(mRestaurantID);
      int[] l=new int[inFriends.size()];
      for (int i=0; i < inFriends.size(); i++) {
        l[i]=inFriends.get(i).getCust_id();
      }
      order.setCustomer_ids(l);
      List<Dishe> dl=new ArrayList<Dishe>();
      for (int i=0; i < dishes.size(); i++) {
        if (dishes.get(i).getQuantity() > 0) {
          dl.add(dishes.get(i));
        }
      }
      if (dl.size() == 0) {
        new AlertDialog.Builder(OrderEditActivity.this).setTitle("String_Node_Str").setMessage("String_Node_Str").setPositiveButton("String_Node_Str",null).show();
        return;
      }
      order.setDishes(dl);
      progressDialog=new ProgressDialog(ref);
      progressDialog.setTitle("String_Node_Str");
      progressDialog.setMessage("String_Node_Str");
      progressDialog.show();
      BusProvider.get().post(new SaveOrderEvent(order));
      System.out.println(new Gson().toJson(order));
    }
  }
);
}