Program: 146482
Project: 146482
Buggy source:
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  mTickersContainer=(FixedGridView)getView().findViewById(R.id.tickersContainer);
  mTickersContainer.setExpanded(true);
  final int dashboardSpacing=getResources().getDimensionPixelSize(R.dimen.dashboard_spacing);
  final int dahboardItemSize=getResources().getDimensionPixelSize(R.dimen.dashboard_item_size);
  mTickersContainer.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
    @Override public void onGlobalLayout(){
      if (mTickersDashboardAdapter.getNumColumns() == 0) {
        final int numColumns=(int)Math.floor(mTickersContainer.getWidth() / (dashboardSpacing + dahboardItemSize));
        if (numColumns > 0) {
          mTickersDashboardAdapter.setNumColumns(numColumns);
          mTickersContainer.setNumColumns(numColumns);
        }
      }
    }
  }
);
  mTickersDashboardAdapter=new TickersDashboardAdapter(getActivity(),this);
  updateStorageWithTickers();
  mTickersDashboardAdapter.update();
  mTickersContainer.setAdapter(mTickersDashboardAdapter);
  mTickersContainer.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
      return event.getAction() == MotionEvent.ACTION_MOVE;
    }
  }
);
  mGetStatsReceiver=new BroadcastReceiver(){
    @Override public void onReceive(    Context context,    Intent intent){
      if (isVisible()) {
        mTickersDashboardAdapter.update();
      }
    }
  }
;
  LocalBroadcastManager.getInstance(getActivity().getApplicationContext()).registerReceiver(mGetStatsReceiver,new IntentFilter("String_Node_Str"));
  View.OnClickListener tradeListener=new View.OnClickListener(){
    @Override public void onClick(    View v){
      new RegisterTradeRequestTask().execute((v.getId() == R.id.BuyButton) ? "String_Node_Str" : "String_Node_Str");
    }
  }
;
  Button SellButton=(Button)getView().findViewById(R.id.SellButton);
  Button BuyButton=(Button)getView().findViewById(R.id.BuyButton);
  SellButton.setOnClickListener(tradeListener);
  BuyButton.setOnClickListener(tradeListener);
  Button UpdateAccountInfoButton=(Button)getView().findViewById(R.id.UpdateAccountInfoButton);
  UpdateAccountInfoButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      new UpdateFundsTask().execute();
    }
  }
);
  getActivity().sendBroadcast(new Intent(getActivity(),StartServiceReceiver.class));
}

Fixed version (ground truth):
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  mTickersContainer=(FixedGridView)getView().findViewById(R.id.tickersContainer);
  mTickersContainer.setExpanded(true);
  final int dashboardSpacing=getResources().getDimensionPixelSize(R.dimen.dashboard_spacing);
  final int dashboardItemSize=getResources().getDimensionPixelSize(R.dimen.dashboard_item_size);
  mTickersContainer.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
    @Override public void onGlobalLayout(){
      if (mTickersDashboardAdapter.getNumColumns() == 0) {
        final int numColumns=(int)Math.floor(mTickersContainer.getWidth() / (dashboardSpacing + dashboardItemSize));
        if (numColumns > 0) {
          mTickersDashboardAdapter.setNumColumns(numColumns);
          mTickersContainer.setNumColumns(numColumns);
        }
      }
    }
  }
);
  mTickersDashboardAdapter=new TickersDashboardAdapter(getActivity(),this);
  updateStorageWithTickers();
  mTickersDashboardAdapter.update();
  mTickersContainer.setAdapter(mTickersDashboardAdapter);
  TextView emptyView=(TextView)getView().findViewById(R.id.emptyView);
  mTickersContainer.setEmptyView(emptyView);
  mTickersContainer.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
      return event.getAction() == MotionEvent.ACTION_MOVE;
    }
  }
);
  mGetStatsReceiver=new BroadcastReceiver(){
    @Override public void onReceive(    Context context,    Intent intent){
      if (isVisible()) {
        mTickersDashboardAdapter.update();
      }
    }
  }
;
  LocalBroadcastManager.getInstance(getActivity().getApplicationContext()).registerReceiver(mGetStatsReceiver,new IntentFilter("String_Node_Str"));
  View.OnClickListener tradeListener=new View.OnClickListener(){
    @Override public void onClick(    View v){
      new RegisterTradeRequestTask().execute((v.getId() == R.id.BuyButton) ? "String_Node_Str" : "String_Node_Str");
    }
  }
;
  Button SellButton=(Button)getView().findViewById(R.id.SellButton);
  Button BuyButton=(Button)getView().findViewById(R.id.BuyButton);
  SellButton.setOnClickListener(tradeListener);
  BuyButton.setOnClickListener(tradeListener);
  Button UpdateAccountInfoButton=(Button)getView().findViewById(R.id.UpdateAccountInfoButton);
  UpdateAccountInfoButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      new UpdateFundsTask().execute();
    }
  }
);
  getActivity().sendBroadcast(new Intent(getActivity(),StartServiceReceiver.class));
}