nus-yam/ex-repair huggingface dataset:
Program: 197739
Project: 197739
Buggy source:
public void init(PageContentProvider provider,MediaSize mediaSize,Margins minMargins){
  if (mProvider == null ? provider == null : mProvider.equals(provider) && ((mAttributes.getMediaSize() == null) ? mediaSize == null : mAttributes.getMediaSize().equals(mediaSize)) && ((mAttributes.getMinMargins() == null) ? minMargins == null : mAttributes.getMinMargins().equals(minMargins))) {
    return;
  }
  mProvider=provider;
  mAttributes.setMediaSize(mediaSize);
  mAttributes.setMinMargins(minMargins);
  mContentRequested=false;
  if (mProvider == null && getBackground() != mEmptyState) {
    setBackground(mEmptyState);
  }
  requestPageContentIfNeeded();
}

Fixed version (ground truth):
public void init(PageContentProvider provider,MediaSize mediaSize,Margins minMargins){
  final boolean providerChanged=(mProvider == null) ? provider != null : !mProvider.equals(provider);
  final boolean mediaSizeChanged=(mMediaSize == null) ? mediaSize != null : !mMediaSize.equals(mediaSize);
  final boolean marginsChanged=(mMinMargins == null) ? minMargins != null : !mMinMargins.equals(minMargins);
  if (!providerChanged && !mediaSizeChanged && !marginsChanged) {
    return;
  }
  mProvider=provider;
  mMediaSize=mediaSize;
  mMinMargins=minMargins;
  mContentRequested=false;
  mNeedsLayout=mNeedsLayout || mediaSizeChanged || marginsChanged;
  if (mProvider == null && getBackground() != mEmptyState) {
    setBackground(mEmptyState);
  }
  requestPageContentIfNeeded();
}
Program: 197740
Project: 197740
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  requestPageContentIfNeeded();
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  mNeedsLayout=false;
  requestPageContentIfNeeded();
}
Program: 197741
Project: 197741
Buggy source:
private void requestPageContentIfNeeded(){
  if (getWidth() > 0 && getHeight() > 0 && !mContentRequested && mProvider != null) {
    mContentRequested=true;
    mProvider.getPageContent(new RenderSpec(getWidth(),getHeight(),mAttributes),this);
  }
}

Fixed version (ground truth):
private void requestPageContentIfNeeded(){
  if (getWidth() > 0 && getHeight() > 0 && !mContentRequested && mProvider != null && !mNeedsLayout) {
    mContentRequested=true;
    mProvider.getPageContent(new RenderSpec(getWidth(),getHeight(),mMediaSize,mMinMargins),this);
  }
}
Program: 197743
Project: 197743
Buggy source:
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
}

Fixed version (ground truth):
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
  updateNotificationAnimationStates();
}
Program: 197744
Project: 197744
Buggy source:
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
}

Fixed version (ground truth):
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(mAnimationsEnabled && mIsExpanded,child);
}
Program: 197745
Project: 197745
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  child.setClipBounds(null);
}

Fixed version (ground truth):
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  updateAnimationState(false,child);
  child.setClipBounds(null);
}
Program: 197746
Project: 197746
Buggy source:
private void setIsExpanded(boolean isExpanded){
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
}

Fixed version (ground truth):
private void setIsExpanded(boolean isExpanded){
  boolean changed=isExpanded != mIsExpanded;
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
  if (changed) {
    updateNotificationAnimationStates();
  }
}
Program: 197747
Project: 197747
Buggy source:
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mConfig=RecentsConfiguration.reinitialize(this,RecentsTaskLoader.getInstance().getSystemServicesProxy());
  mAppWidgetHost=new RecentsAppWidgetHost(this,Constants.Values.App.AppWidgetHostId);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setCallbacks(this);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mEmptyViewStub=(ViewStub)findViewById(R.id.empty_view_stub);
  mDebugOverlayStub=(ViewStub)findViewById(R.id.debug_overlay_stub);
  mScrimViews=new SystemBarScrimViews(this,mConfig);
  inflateDebugOverlay();
  bindSearchBarAppWidget();
  updateRecentsTasks(getIntent());
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  registerReceiver(mSystemBroadcastReceiver,filter);
  try {
    Utilities.setShadowProperty("String_Node_Str",String.valueOf(1.5f));
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  if (savedInstanceState != null) {
    mConfig.updateOnConfigurationChange();
    onConfigurationChange();
  }
}

Fixed version (ground truth):
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  RecentsTaskLoader.initialize(this);
  mConfig=RecentsConfiguration.reinitialize(this,RecentsTaskLoader.getInstance().getSystemServicesProxy());
  mAppWidgetHost=new RecentsAppWidgetHost(this,Constants.Values.App.AppWidgetHostId);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setCallbacks(this);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mEmptyViewStub=(ViewStub)findViewById(R.id.empty_view_stub);
  mDebugOverlayStub=(ViewStub)findViewById(R.id.debug_overlay_stub);
  mScrimViews=new SystemBarScrimViews(this,mConfig);
  inflateDebugOverlay();
  bindSearchBarAppWidget();
  updateRecentsTasks(getIntent());
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  registerReceiver(mSystemBroadcastReceiver,filter);
  try {
    Utilities.setShadowProperty("String_Node_Str",String.valueOf(1.5f));
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  if (savedInstanceState != null) {
    mConfig.updateOnConfigurationChange();
    onConfigurationChange();
  }
}
Program: 197749
Project: 197749
Buggy source:
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
}

Fixed version (ground truth):
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
  updateNotificationAnimationStates();
}
Program: 197750
Project: 197750
Buggy source:
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
}

Fixed version (ground truth):
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(mAnimationsEnabled && mIsExpanded,child);
}
Program: 197751
Project: 197751
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  child.setClipBounds(null);
}

Fixed version (ground truth):
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  updateAnimationState(false,child);
  child.setClipBounds(null);
}
Program: 197752
Project: 197752
Buggy source:
private void setIsExpanded(boolean isExpanded){
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
}

Fixed version (ground truth):
private void setIsExpanded(boolean isExpanded){
  boolean changed=isExpanded != mIsExpanded;
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
  if (changed) {
    updateNotificationAnimationStates();
  }
}
Program: 197754
Project: 197754
Buggy source:
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
}

Fixed version (ground truth):
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
  updateNotificationAnimationStates();
}
Program: 197755
Project: 197755
Buggy source:
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
}

Fixed version (ground truth):
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(mAnimationsEnabled && mIsExpanded,child);
}
Program: 197756
Project: 197756
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  child.setClipBounds(null);
}

Fixed version (ground truth):
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  updateAnimationState(false,child);
  child.setClipBounds(null);
}
Program: 197757
Project: 197757
Buggy source:
private void setIsExpanded(boolean isExpanded){
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
}

Fixed version (ground truth):
private void setIsExpanded(boolean isExpanded){
  boolean changed=isExpanded != mIsExpanded;
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
  if (changed) {
    updateNotificationAnimationStates();
  }
}
Program: 197759
Project: 197759
Buggy source:
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
}

Fixed version (ground truth):
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
  updateNotificationAnimationStates();
}
Program: 197760
Project: 197760
Buggy source:
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
}

Fixed version (ground truth):
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(mAnimationsEnabled && mIsExpanded,child);
}
Program: 197761
Project: 197761
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  child.setClipBounds(null);
}

Fixed version (ground truth):
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  updateAnimationState(false,child);
  child.setClipBounds(null);
}
Program: 197762
Project: 197762
Buggy source:
private void setIsExpanded(boolean isExpanded){
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
}

Fixed version (ground truth):
private void setIsExpanded(boolean isExpanded){
  boolean changed=isExpanded != mIsExpanded;
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
  if (changed) {
    updateNotificationAnimationStates();
  }
}
Program: 197764
Project: 197764
Buggy source:
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
}

Fixed version (ground truth):
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
  updateNotificationAnimationStates();
}
Program: 197765
Project: 197765
Buggy source:
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
}

Fixed version (ground truth):
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(mAnimationsEnabled && mIsExpanded,child);
}
Program: 197766
Project: 197766
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  child.setClipBounds(null);
}

Fixed version (ground truth):
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  updateAnimationState(false,child);
  child.setClipBounds(null);
}
Program: 197767
Project: 197767
Buggy source:
private void setIsExpanded(boolean isExpanded){
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
}

Fixed version (ground truth):
private void setIsExpanded(boolean isExpanded){
  boolean changed=isExpanded != mIsExpanded;
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
  if (changed) {
    updateNotificationAnimationStates();
  }
}
Program: 197768
Project: 197768
Buggy source:
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mConfig=RecentsConfiguration.reinitialize(this,RecentsTaskLoader.getInstance().getSystemServicesProxy());
  mAppWidgetHost=new RecentsAppWidgetHost(this,Constants.Values.App.AppWidgetHostId);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setCallbacks(this);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mEmptyViewStub=(ViewStub)findViewById(R.id.empty_view_stub);
  mDebugOverlayStub=(ViewStub)findViewById(R.id.debug_overlay_stub);
  mScrimViews=new SystemBarScrimViews(this,mConfig);
  inflateDebugOverlay();
  bindSearchBarAppWidget();
  updateRecentsTasks(getIntent());
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  registerReceiver(mSystemBroadcastReceiver,filter);
  try {
    Utilities.setShadowProperty("String_Node_Str",String.valueOf(1.5f));
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  if (savedInstanceState != null) {
    mConfig.updateOnConfigurationChange();
    onConfigurationChange();
  }
}

Fixed version (ground truth):
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  RecentsTaskLoader.initialize(this);
  mConfig=RecentsConfiguration.reinitialize(this,RecentsTaskLoader.getInstance().getSystemServicesProxy());
  mAppWidgetHost=new RecentsAppWidgetHost(this,Constants.Values.App.AppWidgetHostId);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setCallbacks(this);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mEmptyViewStub=(ViewStub)findViewById(R.id.empty_view_stub);
  mDebugOverlayStub=(ViewStub)findViewById(R.id.debug_overlay_stub);
  mScrimViews=new SystemBarScrimViews(this,mConfig);
  inflateDebugOverlay();
  bindSearchBarAppWidget();
  updateRecentsTasks(getIntent());
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  registerReceiver(mSystemBroadcastReceiver,filter);
  try {
    Utilities.setShadowProperty("String_Node_Str",String.valueOf(1.5f));
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  if (savedInstanceState != null) {
    mConfig.updateOnConfigurationChange();
    onConfigurationChange();
  }
}
Program: 197770
Project: 197770
Buggy source:
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
}

Fixed version (ground truth):
public void setAnimationsEnabled(boolean animationsEnabled){
  mAnimationsEnabled=animationsEnabled;
  updateNotificationAnimationStates();
}
Program: 197771
Project: 197771
Buggy source:
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
}

Fixed version (ground truth):
@Override protected void onViewAdded(View child){
  super.onViewAdded(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(mAnimationsEnabled && mIsExpanded,child);
}
Program: 197772
Project: 197772
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  child.setClipBounds(null);
}

Fixed version (ground truth):
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChangePositionInProgress) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
  updateAnimationState(false,child);
  child.setClipBounds(null);
}
Program: 197773
Project: 197773
Buggy source:
private void setIsExpanded(boolean isExpanded){
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
}

Fixed version (ground truth):
private void setIsExpanded(boolean isExpanded){
  boolean changed=isExpanded != mIsExpanded;
  mIsExpanded=isExpanded;
  mStackScrollAlgorithm.setIsExpanded(isExpanded);
  if (changed) {
    updateNotificationAnimationStates();
  }
}
Program: 197774
Project: 197774
Buggy source:
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mConfig=RecentsConfiguration.reinitialize(this,RecentsTaskLoader.getInstance().getSystemServicesProxy());
  mAppWidgetHost=new RecentsAppWidgetHost(this,Constants.Values.App.AppWidgetHostId);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setCallbacks(this);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mEmptyViewStub=(ViewStub)findViewById(R.id.empty_view_stub);
  mDebugOverlayStub=(ViewStub)findViewById(R.id.debug_overlay_stub);
  mScrimViews=new SystemBarScrimViews(this,mConfig);
  inflateDebugOverlay();
  bindSearchBarAppWidget();
  updateRecentsTasks(getIntent());
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  registerReceiver(mSystemBroadcastReceiver,filter);
  try {
    Utilities.setShadowProperty("String_Node_Str",String.valueOf(1.5f));
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  if (savedInstanceState != null) {
    mConfig.updateOnConfigurationChange();
    onConfigurationChange();
  }
}

Fixed version (ground truth):
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  RecentsTaskLoader.initialize(this);
  mConfig=RecentsConfiguration.reinitialize(this,RecentsTaskLoader.getInstance().getSystemServicesProxy());
  mAppWidgetHost=new RecentsAppWidgetHost(this,Constants.Values.App.AppWidgetHostId);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setCallbacks(this);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mEmptyViewStub=(ViewStub)findViewById(R.id.empty_view_stub);
  mDebugOverlayStub=(ViewStub)findViewById(R.id.debug_overlay_stub);
  mScrimViews=new SystemBarScrimViews(this,mConfig);
  inflateDebugOverlay();
  bindSearchBarAppWidget();
  updateRecentsTasks(getIntent());
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  registerReceiver(mSystemBroadcastReceiver,filter);
  try {
    Utilities.setShadowProperty("String_Node_Str",String.valueOf(1.5f));
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  if (savedInstanceState != null) {
    mConfig.updateOnConfigurationChange();
    onConfigurationChange();
  }
}
Program: 197780
Project: 197780
Buggy source:
protected SwipeHelper.LongPressListener getNotificationLongClicker(){
  return new SwipeHelper.LongPressListener(){
    @Override public boolean onLongPress(    View v,    int x,    int y){
      dismissPopups();
      if (v.getWindowToken() == null)       return false;
      final NotificationGuts guts=(NotificationGuts)v.findViewById(R.id.notification_guts);
      if (guts == null)       return false;
      if (guts.getVisibility() == View.VISIBLE)       return false;
      guts.setVisibility(View.VISIBLE);
      final double horz=Math.max(guts.getWidth() - x,x);
      final double vert=Math.max(guts.getActualHeight() - y,y);
      final float r=(float)Math.hypot(horz,vert);
      final Animator a=ViewAnimationUtils.createCircularReveal(guts,x,y,0,r);
      a.setDuration(400);
      a.setInterpolator(mLinearOutSlowIn);
      a.start();
      mNotificationGutsExposed=guts;
      return true;
    }
  }
;
}

Fixed version (ground truth):
protected SwipeHelper.LongPressListener getNotificationLongClicker(){
  return new SwipeHelper.LongPressListener(){
    @Override public boolean onLongPress(    View v,    int x,    int y){
      dismissPopups();
      if (v.getWindowToken() == null) {
        Log.e(TAG,"String_Node_Str");
        return false;
      }
      final NotificationGuts guts=(NotificationGuts)v.findViewById(R.id.notification_guts);
      if (guts.getVisibility() == View.VISIBLE) {
        Log.e(TAG,"String_Node_Str");
        return false;
      }
      guts.setVisibility(View.VISIBLE);
      final double horz=Math.max(guts.getWidth() - x,x);
      final double vert=Math.max(guts.getActualHeight() - y,y);
      final float r=(float)Math.hypot(horz,vert);
      final Animator a=ViewAnimationUtils.createCircularReveal(guts,x,y,0,r);
      a.setDuration(400);
      a.setInterpolator(mLinearOutSlowIn);
      a.start();
      mNotificationGutsExposed=guts;
      return true;
    }
  }
;
}
Program: 197781
Project: 197781
Buggy source:
@Override public boolean onLongPress(View v,int x,int y){
  dismissPopups();
  if (v.getWindowToken() == null)   return false;
  final NotificationGuts guts=(NotificationGuts)v.findViewById(R.id.notification_guts);
  if (guts == null)   return false;
  if (guts.getVisibility() == View.VISIBLE)   return false;
  guts.setVisibility(View.VISIBLE);
  final double horz=Math.max(guts.getWidth() - x,x);
  final double vert=Math.max(guts.getActualHeight() - y,y);
  final float r=(float)Math.hypot(horz,vert);
  final Animator a=ViewAnimationUtils.createCircularReveal(guts,x,y,0,r);
  a.setDuration(400);
  a.setInterpolator(mLinearOutSlowIn);
  a.start();
  mNotificationGutsExposed=guts;
  return true;
}

Fixed version (ground truth):
@Override public boolean onLongPress(View v,int x,int y){
  dismissPopups();
  if (v.getWindowToken() == null) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  final NotificationGuts guts=(NotificationGuts)v.findViewById(R.id.notification_guts);
  if (guts.getVisibility() == View.VISIBLE) {
    Log.e(TAG,"String_Node_Str");
    return false;
  }
  guts.setVisibility(View.VISIBLE);
  final double horz=Math.max(guts.getWidth() - x,x);
  final double vert=Math.max(guts.getActualHeight() - y,y);
  final float r=(float)Math.hypot(horz,vert);
  final Animator a=ViewAnimationUtils.createCircularReveal(guts,x,y,0,r);
  a.setDuration(400);
  a.setInterpolator(mLinearOutSlowIn);
  a.start();
  mNotificationGutsExposed=guts;
  return true;
}
Program: 197782
Project: 197782
Buggy source:
private int getPositionInLinearLayout(View requestedChild){
  int position=0;
  for (int i=0; i < getChildCount(); i++) {
    View child=getChildAt(i);
    if (child == requestedChild) {
      return position;
    }
    if (child.getVisibility() != View.GONE) {
      position+=child.getHeight();
      if (i < getChildCount() - 1) {
        position+=mPaddingBetweenElements;
      }
    }
  }
  return 0;
}

Fixed version (ground truth):
private int getPositionInLinearLayout(View requestedChild){
  int position=0;
  for (int i=0; i < getChildCount(); i++) {
    View child=getChildAt(i);
    if (child == requestedChild) {
      return position;
    }
    if (child.getVisibility() != View.GONE) {
      position+=getIntrinsicHeight(child);
      if (i < getChildCount() - 1) {
        position+=mPaddingBetweenElements;
      }
    }
  }
  return 0;
}
Program: 197783
Project: 197783
Buggy source:
public ExpandableView getChildAtPosition(float touchX,float touchY){
  final int count=getChildCount();
  for (int childIdx=0; childIdx < count; childIdx++) {
    ExpandableView slidingChild=(ExpandableView)getChildAt(childIdx);
    if (slidingChild.getVisibility() == GONE) {
      continue;
    }
    float childTop=slidingChild.getTranslationY();
    float top=childTop + slidingChild.getClipTopAmount();
    float bottom=top + slidingChild.getActualHeight();
    int left=0;
    int right=getWidth();
    if (touchY >= top && touchY <= bottom && touchX >= left && touchX <= right) {
      return slidingChild;
    }
  }
  return null;
}

Fixed version (ground truth):
public ExpandableView getChildAtPosition(float touchX,float touchY){
  final int count=getChildCount();
  for (int childIdx=0; childIdx < count; childIdx++) {
    ExpandableView slidingChild=(ExpandableView)getChildAt(childIdx);
    if (slidingChild.getVisibility() == GONE) {
      continue;
    }
    float childTop=slidingChild.getTranslationY();
    float top=childTop + slidingChild.getClipTopAmount();
    float bottom=childTop + slidingChild.getActualHeight();
    int left=0;
    int right=getWidth();
    if (touchY >= top && touchY <= bottom && touchX >= left && touchX <= right) {
      return slidingChild;
    }
  }
  return null;
}
Program: 197784
Project: 197784
Buggy source:
@Override @ServiceThreadOnly protected boolean handleReportPhysicalAddress(HdmiCecMessage message){
  assertRunOnServiceThread();
  int path=HdmiUtils.twoBytesToInt(message.getParams());
  int address=message.getSource();
  int type=message.getParams()[2];
  if (updateCecSwitchInfo(address,type,path))   return true;
  if (hasAction(DeviceDiscoveryAction.class)) {
    Slog.i(TAG,"String_Node_Str" + message);
    return true;
  }
  if (!isInDeviceList(path,address)) {
    handleNewDeviceAtTheTailOfActivePath(path);
  }
  startNewDeviceAction(ActiveSource.of(address,path));
  return true;
}

Fixed version (ground truth):
@Override @ServiceThreadOnly protected boolean handleReportPhysicalAddress(HdmiCecMessage message){
  assertRunOnServiceThread();
  int path=HdmiUtils.twoBytesToInt(message.getParams());
  int address=message.getSource();
  int type=message.getParams()[2];
  if (updateCecSwitchInfo(address,type,path))   return true;
  if (hasAction(DeviceDiscoveryAction.class)) {
    Slog.i(TAG,"String_Node_Str" + message);
    return true;
  }
  if (!isInDeviceList(address,path)) {
    handleNewDeviceAtTheTailOfActivePath(path);
  }
  startNewDeviceAction(ActiveSource.of(address,path));
  return true;
}
Program: 197785
Project: 197785
Buggy source:
/** 
 * Whether a device of the specified physical address and logical address exists in a device info list. However, both are minimal condition and it could be different device from the original one.
 * @param logicalAddress logical address of a device to be searched
 * @param physicalAddress physical address of a device to be searched
 * @return true if exist; otherwise false
 */
@ServiceThreadOnly boolean isInDeviceList(int logicalAddress,int physicalAddress){
  assertRunOnServiceThread();
  HdmiDeviceInfo device=getCecDeviceInfo(logicalAddress);
  if (device == null) {
    return false;
  }
  return device.getPhysicalAddress() == physicalAddress;
}

Fixed version (ground truth):
/** 
 * Whether a device of the specified physical address and logical address exists in a device info list. However, both are minimal condition and it could be different device from the original one.
 * @param logicalAddress logical address of a device to be searched
 * @param physicalAddress physical address of a device to be searched
 * @return true if exist; otherwise false
 */
@ServiceThreadOnly private boolean isInDeviceList(int logicalAddress,int physicalAddress){
  assertRunOnServiceThread();
  HdmiDeviceInfo device=getCecDeviceInfo(logicalAddress);
  if (device == null) {
    return false;
  }
  return device.getPhysicalAddress() == physicalAddress;
}
Program: 197786
Project: 197786
Buggy source:
@ServiceThreadOnly void handleRemoveActiveRoutingPath(int path){
  assertRunOnServiceThread();
  if (isTailOfActivePath(path,getActivePath())) {
    removeAction(RoutingControlAction.class);
    int newPath=mService.portIdToPath(getActivePortId());
    mService.sendCecCommand(HdmiCecMessageBuilder.buildRoutingChange(mAddress,getActivePath(),newPath));
    addAndStartAction(new RoutingControlAction(this,getActivePortId(),true,null));
  }
}

Fixed version (ground truth):
@ServiceThreadOnly void handleRemoveActiveRoutingPath(int path){
  assertRunOnServiceThread();
  if (isTailOfActivePath(path,getActivePath())) {
    removeAction(RoutingControlAction.class);
    int newPath=mService.portIdToPath(getActivePortId());
    mService.sendCecCommand(HdmiCecMessageBuilder.buildRoutingChange(mAddress,getActivePath(),newPath));
    mActiveSource.invalidate();
    addAndStartAction(new RoutingControlAction(this,getActivePath(),true,null));
  }
}
Program: 197787
Project: 197787
Buggy source:
/** 
 * Return a list of all   {@link HdmiDeviceInfo}. <p>Declared as package-private. accessed by   {@link HdmiControlService} only.This is not thread-safe. For thread safety, call  {@link #getSafeExternalInputsLocked} whichdoes not include local device.
 */
@ServiceThreadOnly List<HdmiDeviceInfo> getDeviceInfoList(boolean includelLocalDevice){
  assertRunOnServiceThread();
  if (includelLocalDevice) {
    return HdmiUtils.sparseArrayToList(mDeviceInfos);
  }
 else {
    ArrayList<HdmiDeviceInfo> infoList=new ArrayList<>();
    for (int i=0; i < mDeviceInfos.size(); ++i) {
      HdmiDeviceInfo info=mDeviceInfos.valueAt(i);
      if (!isLocalDeviceAddress(info.getLogicalAddress())) {
        infoList.add(info);
      }
    }
    return infoList;
  }
}

Fixed version (ground truth):
/** 
 * Return a list of all   {@link HdmiDeviceInfo}. <p>Declared as package-private. accessed by   {@link HdmiControlService} only.This is not thread-safe. For thread safety, call  {@link #getSafeExternalInputsLocked} whichdoes not include local device.
 */
@ServiceThreadOnly List<HdmiDeviceInfo> getDeviceInfoList(boolean includeLocalDevice){
  assertRunOnServiceThread();
  if (includeLocalDevice) {
    return HdmiUtils.sparseArrayToList(mDeviceInfos);
  }
 else {
    ArrayList<HdmiDeviceInfo> infoList=new ArrayList<>();
    for (int i=0; i < mDeviceInfos.size(); ++i) {
      HdmiDeviceInfo info=mDeviceInfos.valueAt(i);
      if (!isLocalDeviceAddress(info.getLogicalAddress())) {
        infoList.add(info);
      }
    }
    return infoList;
  }
}
Program: 197788
Project: 197788
Buggy source:
@Override protected void dump(final IndentingPrintWriter pw){
  super.dump(pw);
  pw.println("String_Node_Str" + mArcEstablished);
  pw.println("String_Node_Str" + mArcFeatureEnabled);
  pw.println("String_Node_Str" + mSystemAudioActivated);
  pw.println("String_Node_Str" + mSystemAudioMute);
  pw.println("String_Node_Str" + mAutoDeviceOff);
  pw.println("String_Node_Str" + mAutoWakeup);
  pw.println("String_Node_Str" + mSkipRoutingControl);
}

Fixed version (ground truth):
@Override protected void dump(final IndentingPrintWriter pw){
  super.dump(pw);
  pw.println("String_Node_Str" + mArcEstablished);
  pw.println("String_Node_Str" + mArcFeatureEnabled);
  pw.println("String_Node_Str" + mSystemAudioActivated);
  pw.println("String_Node_Str" + mSystemAudioMute);
  pw.println("String_Node_Str" + mAutoDeviceOff);
  pw.println("String_Node_Str" + mAutoWakeup);
  pw.println("String_Node_Str" + mSkipRoutingControl);
  pw.println("String_Node_Str");
  pw.increaseIndent();
  for (  HdmiDeviceInfo info : mSafeAllDeviceInfos) {
    pw.println(info);
  }
  pw.decreaseIndent();
}
Program: 197789
Project: 197789
Buggy source:
@ServiceThreadOnly void updateActiveInput(int path,boolean notifyInputChange){
  assertRunOnServiceThread();
  if (path == getActivePath()) {
    return;
  }
  setPrevPortId(getActivePortId());
  int portId=mService.pathToPortId(path);
  setActivePath(path);
  if (notifyInputChange) {
    ActiveSource activeSource=getActiveSource();
    HdmiDeviceInfo info=getCecDeviceInfo(activeSource.logicalAddress);
    if (info == null) {
      info=new HdmiDeviceInfo(Constants.ADDR_INVALID,path,portId,HdmiDeviceInfo.DEVICE_RESERVED,0,null);
    }
    mService.invokeInputChangeListener(info);
  }
}

Fixed version (ground truth):
@ServiceThreadOnly void updateActiveInput(int path,boolean notifyInputChange){
  assertRunOnServiceThread();
  if (path == getActivePath()) {
    return;
  }
  setPrevPortId(getActivePortId());
  setActivePath(path);
  if (notifyInputChange) {
    ActiveSource activeSource=getActiveSource();
    HdmiDeviceInfo info=getCecDeviceInfo(activeSource.logicalAddress);
    if (info == null) {
      info=new HdmiDeviceInfo(Constants.ADDR_INVALID,path,getActivePortId(),HdmiDeviceInfo.DEVICE_RESERVED,0,null);
    }
    mService.invokeInputChangeListener(info);
  }
}
Program: 197790
Project: 197790
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  mMaxExpandHeight=mPrivateLayout.getMaxHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  updateMaxExpandHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}
Program: 197791
Project: 197791
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    setActualHeight(getInitialHeight());
  }
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    int initialHeight=getInitialHeight();
    if (initialHeight != 0) {
      setActualHeight(initialHeight);
    }
  }
}
Program: 197792
Project: 197792
Buggy source:
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
}

Fixed version (ground truth):
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
  notifyHeightChangeListener(mDismissView);
}
Program: 197793
Project: 197793
Buggy source:
public void updateDismissView(boolean visible){
  int oldVisibility=mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (oldVisibility == GONE) {
      if (mDismissView.willBeGone()) {
        mDismissView.cancelAnimation();
      }
 else {
        mDismissView.setInvisible();
        mDismissView.setVisibility(newVisibility);
      }
      mDismissView.setWillBeGone(false);
      updateContentHeight();
    }
 else {
      mDismissView.setWillBeGone(true);
      mDismissView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void updateDismissView(boolean visible){
  int oldVisibility=mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (newVisibility != GONE) {
      if (mDismissView.willBeGone()) {
        mDismissView.cancelAnimation();
      }
 else {
        mDismissView.setInvisible();
      }
      mDismissView.setVisibility(newVisibility);
      mDismissView.setWillBeGone(false);
      updateContentHeight();
      notifyHeightChangeListener(mDismissView);
    }
 else {
      mDismissView.setWillBeGone(true);
      mDismissView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
);
    }
  }
}
Program: 197794
Project: 197794
Buggy source:
public void updateEmptyShadeView(boolean visible){
  int oldVisibility=mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (oldVisibility == GONE) {
      if (mEmptyShadeView.willBeGone()) {
        mEmptyShadeView.cancelAnimation();
      }
 else {
        mEmptyShadeView.setInvisible();
        mEmptyShadeView.setVisibility(newVisibility);
      }
      mEmptyShadeView.setWillBeGone(false);
      updateContentHeight();
    }
 else {
      mEmptyShadeView.setWillBeGone(true);
      mEmptyShadeView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void updateEmptyShadeView(boolean visible){
  int oldVisibility=mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (newVisibility != GONE) {
      if (mEmptyShadeView.willBeGone()) {
        mEmptyShadeView.cancelAnimation();
      }
 else {
        mEmptyShadeView.setInvisible();
      }
      mEmptyShadeView.setVisibility(newVisibility);
      mEmptyShadeView.setWillBeGone(false);
      updateContentHeight();
      notifyHeightChangeListener(mDismissView);
    }
 else {
      mEmptyShadeView.setWillBeGone(true);
      mEmptyShadeView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
);
    }
  }
}
Program: 197796
Project: 197796
Buggy source:
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top + mDensity,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left + mDensity,mOutlineRect.right);
  invalidateOutline();
}

Fixed version (ground truth):
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left,mOutlineRect.right);
  invalidateOutline();
}
Program: 197797
Project: 197797
Buggy source:
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  mDensity=getResources().getDisplayMetrics().density;
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}

Fixed version (ground truth):
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}