Program: 177772
Project: 177772
Buggy source:
public void init(){
  if (logger != null && logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + getClass().getSimpleName());
  }
  LayoutParams masterParams=new LayoutParams(LayoutParams.FILL_PARENT,displayUtils.getDIP(ActionBarView.ACTION_BAR_HEIGHT));
  masterParams.gravity=options.getGravity() | Gravity.CENTER_VERTICAL;
  setLayoutParams(masterParams);
  setGravity(options.getGravity());
  if (!options.isHideLike() || !options.isHideTicker()) {
    likeIcon=getIcon(options.getLikeIconResourceId(),"String_Node_Str");
    likeIconHi=getIcon(options.getLikeIconActiveResourceId(),"String_Node_Str");
  }
  if (!options.isHideComment() || !options.isHideTicker()) {
    commentIcon=getIcon(options.getCommentIconResourceId(),"String_Node_Str");
  }
  if (!options.isHideShare() || !options.isHideTicker()) {
    shareIcon=getIcon(options.getShareIconResourceId(),"String_Node_Str");
  }
  if (!options.isHideTicker()) {
    viewIcon=getIcon(options.getViewIconResourceId(),"String_Node_Str");
  }
  int accentHeight=displayUtils.getDIP(4);
  int strokeWidth=displayUtils.getDIP(1);
  int width=ActionBarView.ACTION_BAR_BUTTON_WIDTH;
  int likeWidth=width - 5;
  int commentWidth=width + 15;
  int shareWidth=width - 5;
  if (!options.isHideTicker()) {
    ticker=tickerFactory.getBean(options.getBackgroundColor());
  }
  int textColor=Color.WHITE;
  if (options.getTextColor() != null) {
    textColor=options.getTextColor();
  }
  if (!options.isHideComment() || !options.isHideTicker()) {
    commentsItem=itemFactory.getBean(textColor);
    commentsItem.setIcon(commentIcon);
    if (!options.isHideComment())     commentButton=buttonFactory.getBean();
  }
  if (!options.isHideLike() || !options.isHideTicker()) {
    likesItem=itemFactory.getBean(textColor);
    likesItem.setIcon(likeIcon);
    if (!options.isHideLike())     likeButton=buttonFactory.getBean();
  }
  if (!options.isHideShare() || !options.isHideTicker()) {
    sharesItem=itemFactory.getBean(textColor);
    sharesItem.setIcon(shareIcon);
    if (!options.isHideShare())     shareButton=buttonFactory.getBean();
  }
  if (!options.isHideTicker()) {
    viewsItem=itemFactory.getBean(textColor);
    viewsItem.setIcon(viewIcon);
    ticker.addTickerView(viewsItem);
    ticker.addTickerView(commentsItem);
    ticker.addTickerView(likesItem);
    ticker.addTickerView(sharesItem);
  }
  ActionBarButtonBackground bg=new ActionBarButtonBackground(accentHeight,strokeWidth,options.getStrokeColor(),options.getAccentColor(),options.getFillColor(),options.getHighlightColor(),options.getColorLayout());
  if (commentButton != null) {
    commentButton.setIcon(commentIcon);
    commentButton.setBackgroundDrawable(bg);
    commentButton.setListener(new ActionBarButtonListener(){
      @Override public void onClick(      ActionBarButton button){
        boolean consumed=false;
        if (onActionBarEventListener != null) {
          consumed=onActionBarEventListener.onClick(actionBarView,ActionBarEvent.COMMENT);
        }
        if (!consumed) {
          commentUtils.showCommentView(getActivity(),actionBarView.getEntity(),onCommentViewActionListener);
        }
      }
    }
);
  }
  if (likeButton != null) {
    likeButton.setIcon(likeIcon);
    likeButton.setBackgroundDrawable(bg);
    likeButton.setListener(new ActionBarButtonListener(){
      @Override public void onClick(      ActionBarButton button){
        boolean consumed=false;
        if (onActionBarEventListener != null) {
          consumed=onActionBarEventListener.onClick(actionBarView,ActionBarEvent.LIKE);
        }
        if (!consumed) {
          doLike(likeButton,null);
        }
      }
    }
);
  }
  if (shareButton != null) {
    shareButton.setIcon(shareIcon);
    shareButton.setBackgroundDrawable(bg);
    shareButton.setListener(new ActionBarButtonListener(){
      @Override public void onClick(      ActionBarButton button){
        boolean consumed=false;
        SocialNetworkDialogListener snListener=null;
        if (onActionBarEventListener != null) {
          consumed=onActionBarEventListener.onClick(actionBarView,ActionBarEvent.SHARE);
          if (onActionBarEventListener instanceof SocialNetworkDialogListener) {
            snListener=(SocialNetworkDialogListener)onActionBarEventListener;
          }
        }
        if (!consumed) {
          if (snListener == null) {
            snListener=new SocialNetworkDialogListener(){
              @Override public void onError(              SocializeException error){
                Toast.makeText(getActivity(),localizationService.getString(I18NConstants.ACTIONBAR_SHARE_FAIL),Toast.LENGTH_SHORT).show();
              }
              @Override public void onNetworkError(              Activity context,              SocialNetwork network,              Exception error){
                Toast.makeText(context,localizationService.getString(I18NConstants.ACTIONBAR_SHARE_FAIL),Toast.LENGTH_SHORT).show();
              }
              @Override public void onAfterPost(              Activity parent,              SocialNetwork socialNetwork,              JSONObject responseObject){
                Toast.makeText(parent,localizationService.getString(I18NConstants.ACTIONBAR_SHARE_SUCCESS),Toast.LENGTH_SHORT).show();
              }
            }
;
          }
          ShareUtils.showShareDialog(getActivity(),actionBarView.getEntity(),snListener);
        }
      }
    }
);
  }
  if (ticker != null) {
    ticker.setOnClickListener(new OnClickListener(){
      @Override public void onClick(      android.view.View v){
        boolean consumed=false;
        if (onActionBarEventListener != null) {
          consumed=onActionBarEventListener.onClick(actionBarView,ActionBarEvent.VIEW);
        }
        if (!consumed) {
          ticker.skipToNext();
        }
      }
    }
);
  }
  if (viewsItem != null) {
    viewsItem.init();
    viewsItem.setText(loadingText);
  }
  if (commentsItem != null) {
    commentsItem.init();
    commentsItem.setText(loadingText);
    commentButton.init(commentWidth,0.0f,textColor);
    commentButton.setText(localizationService.getString(I18NConstants.ACTIONBAR_COMMENT));
  }
  if (likesItem != null) {
    likesItem.init();
    likesItem.setText(loadingText);
    likeButton.init(likeWidth,0.0f,textColor);
    likeButton.setText(loadingText);
  }
  if (sharesItem != null) {
    sharesItem.init();
    sharesItem.setText(loadingText);
    shareButton.init(shareWidth,0.0f,textColor);
    shareButton.setText(localizationService.getString(I18NConstants.ACTIONBAR_SHARE));
  }
  if (ticker != null) {
    ticker.init(LayoutParams.FILL_PARENT,1.0f);
  }
  if (ticker != null)   addView(ticker);
  if (likeButton != null)   addView(likeButton);
  if (shareButton != null)   addView(shareButton);
  if (commentButton != null)   addView(commentButton);
}

Fixed version (ground truth):
public void init(){
  if (logger != null && logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + getClass().getSimpleName());
  }
  int height=ActionBarView.ACTION_BAR_HEIGHT;
  if (displayUtils != null) {
    height=displayUtils.getDIP(ActionBarView.ACTION_BAR_HEIGHT);
  }
  LayoutParams masterParams=new LayoutParams(LayoutParams.FILL_PARENT,height);
  masterParams.gravity=options.getGravity() | Gravity.CENTER_VERTICAL;
  setLayoutParams(masterParams);
  setGravity(options.getGravity());
  if (!options.isHideLike() || !options.isHideTicker()) {
    likeIcon=getIcon(options.getLikeIconResourceId(),"String_Node_Str");
    likeIconHi=getIcon(options.getLikeIconActiveResourceId(),"String_Node_Str");
  }
  if (!options.isHideComment() || !options.isHideTicker()) {
    commentIcon=getIcon(options.getCommentIconResourceId(),"String_Node_Str");
  }
  if (!options.isHideShare() || !options.isHideTicker()) {
    shareIcon=getIcon(options.getShareIconResourceId(),"String_Node_Str");
  }
  if (!options.isHideTicker()) {
    viewIcon=getIcon(options.getViewIconResourceId(),"String_Node_Str");
  }
  int accentHeight=displayUtils.getDIP(4);
  int strokeWidth=displayUtils.getDIP(1);
  int width=ActionBarView.ACTION_BAR_BUTTON_WIDTH;
  int likeWidth=width - 5;
  int commentWidth=width + 15;
  int shareWidth=width - 5;
  if (!options.isHideTicker()) {
    ticker=tickerFactory.getBean(options.getBackgroundColor());
  }
  int textColor=Color.WHITE;
  if (options.getTextColor() != null) {
    textColor=options.getTextColor();
  }
  if (!options.isHideComment() || !options.isHideTicker()) {
    commentsItem=itemFactory.getBean(textColor);
    commentsItem.setIcon(commentIcon);
    if (!options.isHideComment())     commentButton=buttonFactory.getBean();
  }
  if (!options.isHideLike() || !options.isHideTicker()) {
    likesItem=itemFactory.getBean(textColor);
    likesItem.setIcon(likeIcon);
    if (!options.isHideLike())     likeButton=buttonFactory.getBean();
  }
  if (!options.isHideShare() || !options.isHideTicker()) {
    sharesItem=itemFactory.getBean(textColor);
    sharesItem.setIcon(shareIcon);
    if (!options.isHideShare())     shareButton=buttonFactory.getBean();
  }
  if (!options.isHideTicker()) {
    viewsItem=itemFactory.getBean(textColor);
    viewsItem.setIcon(viewIcon);
    ticker.addTickerView(viewsItem);
    ticker.addTickerView(commentsItem);
    ticker.addTickerView(likesItem);
    ticker.addTickerView(sharesItem);
  }
  ActionBarButtonBackground bg=new ActionBarButtonBackground(accentHeight,strokeWidth,options.getStrokeColor(),options.getAccentColor(),options.getFillColor(),options.getHighlightColor(),options.getColorLayout());
  if (commentButton != null) {
    commentButton.setIcon(commentIcon);
    commentButton.setBackgroundDrawable(bg);
    commentButton.setListener(new ActionBarButtonListener(){
      @Override public void onClick(      ActionBarButton button){
        boolean consumed=false;
        if (onActionBarEventListener != null) {
          consumed=onActionBarEventListener.onClick(actionBarView,ActionBarEvent.COMMENT);
        }
        if (!consumed) {
          commentUtils.showCommentView(getActivity(),actionBarView.getEntity(),onCommentViewActionListener);
        }
      }
    }
);
  }
  if (likeButton != null) {
    likeButton.setIcon(likeIcon);
    likeButton.setBackgroundDrawable(bg);
    likeButton.setListener(new ActionBarButtonListener(){
      @Override public void onClick(      ActionBarButton button){
        boolean consumed=false;
        if (onActionBarEventListener != null) {
          consumed=onActionBarEventListener.onClick(actionBarView,ActionBarEvent.LIKE);
        }
        if (!consumed) {
          doLike(likeButton,null);
        }
      }
    }
);
  }
  if (shareButton != null) {
    shareButton.setIcon(shareIcon);
    shareButton.setBackgroundDrawable(bg);
    shareButton.setListener(new ActionBarButtonListener(){
      @Override public void onClick(      ActionBarButton button){
        boolean consumed=false;
        SocialNetworkDialogListener snListener=null;
        if (onActionBarEventListener != null) {
          consumed=onActionBarEventListener.onClick(actionBarView,ActionBarEvent.SHARE);
          if (onActionBarEventListener instanceof SocialNetworkDialogListener) {
            snListener=(SocialNetworkDialogListener)onActionBarEventListener;
          }
        }
        if (!consumed) {
          if (snListener == null) {
            snListener=new SocialNetworkDialogListener(){
              @Override public void onError(              SocializeException error){
                Toast.makeText(getActivity(),localizationService.getString(I18NConstants.ACTIONBAR_SHARE_FAIL),Toast.LENGTH_SHORT).show();
              }
              @Override public void onNetworkError(              Activity context,              SocialNetwork network,              Exception error){
                Toast.makeText(context,localizationService.getString(I18NConstants.ACTIONBAR_SHARE_FAIL),Toast.LENGTH_SHORT).show();
              }
              @Override public void onAfterPost(              Activity parent,              SocialNetwork socialNetwork,              JSONObject responseObject){
                Toast.makeText(parent,localizationService.getString(I18NConstants.ACTIONBAR_SHARE_SUCCESS),Toast.LENGTH_SHORT).show();
              }
            }
;
          }
          ShareUtils.showShareDialog(getActivity(),actionBarView.getEntity(),snListener);
        }
      }
    }
);
  }
  if (ticker != null) {
    ticker.setOnClickListener(new OnClickListener(){
      @Override public void onClick(      android.view.View v){
        boolean consumed=false;
        if (onActionBarEventListener != null) {
          consumed=onActionBarEventListener.onClick(actionBarView,ActionBarEvent.VIEW);
        }
        if (!consumed) {
          ticker.skipToNext();
        }
      }
    }
);
  }
  if (viewsItem != null) {
    viewsItem.init();
    viewsItem.setText(loadingText);
  }
  if (commentsItem != null) {
    commentsItem.init();
    commentsItem.setText(loadingText);
    commentButton.init(commentWidth,0.0f,textColor);
    commentButton.setText(localizationService.getString(I18NConstants.ACTIONBAR_COMMENT));
  }
  if (likesItem != null) {
    likesItem.init();
    likesItem.setText(loadingText);
    likeButton.init(likeWidth,0.0f,textColor);
    likeButton.setText(loadingText);
  }
  if (sharesItem != null) {
    sharesItem.init();
    sharesItem.setText(loadingText);
    shareButton.init(shareWidth,0.0f,textColor);
    shareButton.setText(localizationService.getString(I18NConstants.ACTIONBAR_SHARE));
  }
  if (ticker != null) {
    ticker.init(LayoutParams.FILL_PARENT,1.0f);
  }
  if (ticker != null)   addView(ticker);
  if (likeButton != null)   addView(likeButton);
  if (shareButton != null)   addView(shareButton);
  if (commentButton != null)   addView(commentButton);
}