Program: 51389
Project: 51389
Buggy source:
private void init(){
  if (initialized)   return;
  setBackgroundResource(R.drawable.wp_banner_background);
  ImageView shild=new ImageView(getContext());
  shild.setImageResource(R.drawable.wp_banner_shild);
  shild.setMaxWidth(9);
  addView(shild,new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT,0.03125f));
  this.flipper=new ViewFlipper(getContext());
  flipper.setFlipInterval(3000);
  flipper.setInAnimation(AnimationUtils.loadAnimation(getContext(),android.R.anim.fade_in));
  flipper.setOutAnimation(AnimationUtils.loadAnimation(getContext(),android.R.anim.fade_out));
  LinearLayout ll=new LinearLayout(getContext());
  ll.setOrientation(VERTICAL);
  this.title=new TextView(getContext());
  title.setTypeface(Typeface.SANS_SERIF,Typeface.BOLD);
  title.setTextSize(14f);
  title.setTextColor(Color.rgb(115,154,208));
  title.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
  ll.addView(title);
  this.content=new TextView(getContext());
  content.setTypeface(Typeface.SANS_SERIF);
  content.setTextSize(13f);
  content.setTextColor(Color.WHITE);
  content.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
  ll.addView(content);
  flipper.addView(ll);
  this.image=new Plus1ImageView(getContext());
  flipper.addView(image);
  addView(flipper,new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT,0.90625f + (isHaveCloseButton() ? 0f : 0.0625f)));
  if (isHaveCloseButton()) {
    Button closeButton=new Button(getContext());
    closeButton.setBackgroundResource(R.drawable.wp_banner_close);
    closeButton.setOnClickListener(new OnClickListener(){
      public void onClick(      View v){
        closed=true;
        flipper.stopFlipping();
        if (getVisibility() == VISIBLE) {
          if (hideAnimation != null)           startAnimation(hideAnimation);
          setVisibility(INVISIBLE);
          if (viewStateListener != null)           viewStateListener.onCloseBannerView();
        }
      }
    }
);
    addView(closeButton,new LinearLayout.LayoutParams(18,17,0.0625f));
  }
  setOnClickListener(new OnClickListener(){
    public void onClick(    View view){
      if ((banner == null) || (banner.getLink() == null))       return;
      getContext().startActivity(new Intent(Intent.ACTION_VIEW,android.net.Uri.parse(banner.getLink())));
    }
  }
);
  setVisibility(INVISIBLE);
  if (viewStateListener != null)   viewStateListener.onHideBannerView();
  initialized=true;
}

Fixed version (ground truth):
private void init(){
  if (initialized)   return;
  setBackgroundResource(R.drawable.wp_banner_background);
  ImageView shield=new ImageView(getContext());
  shield.setImageResource(R.drawable.wp_banner_shild);
  shield.setMaxWidth(9);
  addView(shield,new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT,0.03125f));
  this.flipper=new ViewFlipper(getContext());
  flipper.setFlipInterval(3000);
  flipper.setInAnimation(AnimationUtils.loadAnimation(getContext(),android.R.anim.fade_in));
  flipper.setOutAnimation(AnimationUtils.loadAnimation(getContext(),android.R.anim.fade_out));
  LinearLayout ll=new LinearLayout(getContext());
  ll.setOrientation(VERTICAL);
  this.title=new TextView(getContext());
  title.setTypeface(Typeface.SANS_SERIF,Typeface.BOLD);
  title.setTextSize(14f);
  title.setTextColor(Color.rgb(115,154,208));
  title.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
  ll.addView(title);
  this.content=new TextView(getContext());
  content.setTypeface(Typeface.SANS_SERIF);
  content.setTextSize(13f);
  content.setTextColor(Color.WHITE);
  content.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
  ll.addView(content);
  flipper.addView(ll);
  this.image=new Plus1ImageView(getContext());
  flipper.addView(image);
  addView(flipper,new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT,0.90625f + (isHaveCloseButton() ? 0f : 0.0625f)));
  if (isHaveCloseButton()) {
    Button closeButton=new Button(getContext());
    closeButton.setBackgroundResource(R.drawable.wp_banner_close);
    closeButton.setOnClickListener(new OnClickListener(){
      public void onClick(      View v){
        closed=true;
        flipper.stopFlipping();
        if (getVisibility() == VISIBLE) {
          if (hideAnimation != null)           startAnimation(hideAnimation);
          setVisibility(INVISIBLE);
          if (viewStateListener != null)           viewStateListener.onCloseBannerView();
        }
      }
    }
);
    addView(closeButton,new LinearLayout.LayoutParams(18,17,0.0625f));
  }
  setOnClickListener(new OnClickListener(){
    public void onClick(    View view){
      if ((banner == null) || (banner.getLink() == null))       return;
      getContext().startActivity(new Intent(Intent.ACTION_VIEW,android.net.Uri.parse(banner.getLink())));
    }
  }
);
  setVisibility(INVISIBLE);
  if (viewStateListener != null)   viewStateListener.onHideBannerView();
  initialized=true;
}