Program: 36028
Project: 36028
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);
  start=(Spinner)findViewById(R.id.spinner);
  end=(Spinner)findViewById(R.id.spinner2);
  mRestaurantName=(TextView)findViewById(R.id.EventEdit_RestaurantName);
  mCoverImageView=(ImageView)findViewById(R.id.EventEdit_Cover);
  start.setAdapter(adapter);
  end.setAdapter(adapter2);
  start.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      if ((position + 11 + end.getSelectedItemPosition()+ 1) <= 24) {
        order.setStart_time(position + 11);
        order.setEnd_time(end.getSelectedItemPosition() + 1);
      }
 else {
        Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
      }
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
    }
  }
);
  end.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      if (order.getStart_time() + position + 1 <= 24) {
        order.setEnd_time(order.getStart_time() + position + 1);
      }
 else {
        Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
      }
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
    }
  }
);
  mDate=(DatePicker)findViewById(R.id.datePicker);
  mDate.init(2014,4,18,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 + 1)+ "String_Node_Str"+ i3);
    }
  }
);
  mDishes=(ListView)findViewById(R.id.DishList);
  LayoutInflater inflater=(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  mDishAdapter=new DishAdapter(this,inflater);
  mDishes.setAdapter(mDishAdapter);
  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").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").setItems(itemStrings2,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          if (which == 0)           Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
 else {
            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));
        }
      }
      if (dl.size() == 0) {
        new AlertDialog.Builder(OrderEditActivity.this).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));
    }
  }
);
}

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);
  start=(Spinner)findViewById(R.id.spinner);
  end=(Spinner)findViewById(R.id.spinner2);
  mRestaurantName=(TextView)findViewById(R.id.EventEdit_RestaurantName);
  mCoverImageView=(ImageView)findViewById(R.id.EventEdit_Cover);
  start.setAdapter(adapter);
  end.setAdapter(adapter2);
  start.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      if ((position + 11 + end.getSelectedItemPosition()+ 1) <= 24) {
        order.setStart_time(position + 11);
        order.setEnd_time(end.getSelectedItemPosition() + 1);
      }
 else {
        Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
      }
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
    }
  }
);
  end.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      if (order.getStart_time() + position + 1 <= 24) {
        order.setEnd_time(order.getStart_time() + position + 1);
      }
 else {
        Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
      }
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
    }
  }
);
  mDate=(DatePicker)findViewById(R.id.datePicker);
  mDate.init(2014,4,18,new DatePicker.OnDateChangedListener(){
    @Override public void onDateChanged(    DatePicker datePicker,    int i,    int i2,    int i3){
      order.setRequest_date(i + "String_Node_Str" + (i2 + 1)+ "String_Node_Str"+ i3);
    }
  }
);
  mDishes=(ListView)findViewById(R.id.DishList);
  LayoutInflater inflater=(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  mDishAdapter=new DishAdapter(this,inflater);
  mDishes.setAdapter(mDishAdapter);
  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").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").setItems(itemStrings2,new DialogInterface.OnClickListener(){
        @Override public void onClick(        DialogInterface dialog,        int which){
          if (which == 0)           Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
 else {
            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));
        }
      }
      if (dl.size() == 0) {
        new AlertDialog.Builder(OrderEditActivity.this).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));
    }
  }
);
}