Program: 177865
Project: 177865
Buggy source:
protected View showActionBar(Activity parent,View original,String entityKey,String entityName,boolean isEntityKeyUrl,boolean addScrollView,ActionBarListener listener){
  RelativeLayout barLayout=newRelativeLayout(parent);
  RelativeLayout originalLayout=newRelativeLayout(parent);
  ActionBarView socializeActionBar=newActionBarView(parent);
  socializeActionBar.assignId(original);
  socializeActionBar.setEntityKey(entityKey);
  socializeActionBar.setEntityName(entityName);
  socializeActionBar.setEntityKeyIsUrl(isEntityKeyUrl);
  LayoutParams barParams=newLayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT);
  barParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
  LayoutParams originalParams=newLayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT);
  originalParams.addRule(RelativeLayout.ABOVE,socializeActionBar.getId());
  socializeActionBar.setLayoutParams(barParams);
  originalLayout.setLayoutParams(originalParams);
  if (listener != null) {
    listener.onCreate(socializeActionBar);
  }
  if (addScrollView && !(original instanceof ScrollView)) {
    LayoutParams scrollViewParams=newLayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
    ScrollView scrollView=newScrollView(parent);
    scrollView.setFillViewport(true);
    scrollView.setLayoutParams(scrollViewParams);
    scrollView.addView(original);
    originalLayout.addView(scrollView);
  }
 else {
    originalLayout.addView(original);
  }
  barLayout.addView(originalLayout);
  barLayout.addView(socializeActionBar);
  return barLayout;
}

Fixed version (ground truth):
protected View showActionBar(Activity parent,View original,String entityKey,String entityName,boolean isEntityKeyUrl,boolean addScrollView,ActionBarListener listener){
  RelativeLayout barLayout=newRelativeLayout(parent);
  RelativeLayout originalLayout=newRelativeLayout(parent);
  ActionBarView socializeActionBar=newActionBarView(parent);
  socializeActionBar.assignId(original);
  socializeActionBar.setEntityKey(entityKey);
  socializeActionBar.setEntityName(entityName);
  socializeActionBar.setEntityKeyIsUrl(isEntityKeyUrl);
  LayoutParams barParams=newLayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT);
  barParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
  LayoutParams originalParams=newLayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT);
  originalParams.addRule(RelativeLayout.ABOVE,socializeActionBar.getId());
  socializeActionBar.setLayoutParams(barParams);
  originalLayout.setLayoutParams(originalParams);
  if (listener != null) {
    listener.onCreate(socializeActionBar);
  }
  if (addScrollView && !(original instanceof ScrollView)) {
    LayoutParams scrollViewParams=newLayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
    ScrollView scrollView=newScrollView(parent);
    scrollView.setFillViewport(true);
    scrollView.setLayoutParams(scrollViewParams);
    scrollView.addView(original);
    scrollView.setScrollContainer(false);
    originalLayout.addView(scrollView);
  }
 else {
    originalLayout.addView(original);
  }
  barLayout.addView(originalLayout);
  barLayout.addView(socializeActionBar);
  return barLayout;
}