nus-yam/ex-repair huggingface dataset:
Program: 195765
Project: 195765
Buggy source:
public void setDark(boolean dark,boolean fade,long delay){
  super.setDark(dark,fade,delay);
  if (mDark == dark) {
    return;
  }
  mDark=dark;
  if (!dark && fade) {
    if (mActivated) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
 else {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.INVISIBLE);
    }
    fadeDarkToDimmed(delay);
  }
 else {
    updateBackground();
  }
}

Fixed version (ground truth):
public void setDark(boolean dark,boolean fade,long delay){
  super.setDark(dark,fade,delay);
  if (mDark == dark) {
    return;
  }
  mDark=dark;
  if (!dark && fade) {
    if (mActivated) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
 else     if (mDimmed) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.INVISIBLE);
    }
 else {
      mBackgroundDimmed.setVisibility(View.INVISIBLE);
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
    fadeInFromDark(delay);
  }
 else {
    updateBackground();
  }
}
Program: 195766
Project: 195766
Buggy source:
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 {
      Runnable dimissHideFinishRunnable=new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
;
      if (mDismissView.isButtonVisible() && mIsExpanded) {
        mDismissView.setWillBeGone(true);
        mDismissView.performVisibilityAnimation(false,dimissHideFinishRunnable);
      }
 else {
        dimissHideFinishRunnable.run();
        mDismissView.showClearButton();
      }
    }
  }
}

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 {
      Runnable dimissHideFinishRunnable=new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
;
      if (mDismissView.isButtonVisible() && mIsExpanded && mAnimationsEnabled) {
        mDismissView.setWillBeGone(true);
        mDismissView.performVisibilityAnimation(false,dimissHideFinishRunnable);
      }
 else {
        dimissHideFinishRunnable.run();
        mDismissView.showClearButton();
      }
    }
  }
}
Program: 195767
Project: 195767
Buggy source:
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);
        }
      }
);
    }
  }
}

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 {
      Runnable onFinishedRunnable=new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
;
      if (mAnimationsEnabled) {
        mEmptyShadeView.setWillBeGone(true);
        mEmptyShadeView.performVisibilityAnimation(false,onFinishedRunnable);
      }
 else {
        mEmptyShadeView.setInvisible();
        onFinishedRunnable.run();
      }
    }
  }
}
Program: 195768
Project: 195768
Buggy source:
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 {
      Runnable dimissHideFinishRunnable=new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
;
      if (mDismissView.isButtonVisible() && mIsExpanded) {
        mDismissView.setWillBeGone(true);
        mDismissView.performVisibilityAnimation(false,dimissHideFinishRunnable);
      }
 else {
        dimissHideFinishRunnable.run();
        mDismissView.showClearButton();
      }
    }
  }
}

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 {
      Runnable dimissHideFinishRunnable=new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
;
      if (mDismissView.isButtonVisible() && mIsExpanded && mAnimationsEnabled) {
        mDismissView.setWillBeGone(true);
        mDismissView.performVisibilityAnimation(false,dimissHideFinishRunnable);
      }
 else {
        dimissHideFinishRunnable.run();
        mDismissView.showClearButton();
      }
    }
  }
}
Program: 195769
Project: 195769
Buggy source:
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);
        }
      }
);
    }
  }
}

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 {
      Runnable onFinishedRunnable=new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
;
      if (mAnimationsEnabled) {
        mEmptyShadeView.setWillBeGone(true);
        mEmptyShadeView.performVisibilityAnimation(false,onFinishedRunnable);
      }
 else {
        mEmptyShadeView.setInvisible();
        onFinishedRunnable.run();
      }
    }
  }
}
Program: 195770
Project: 195770
Buggy source:
@Override public void createAnimation(final LockPatternView.CellState animatedCell,long delay,long duration,float translationY,final boolean appearing,Interpolator interpolator,final Runnable finishListener){
  if (appearing) {
    animatedCell.scale=0.0f;
  }
  animatedCell.translateY=appearing ? translationY : 0;
  ValueAnimator animator=ValueAnimator.ofFloat(animatedCell.translateY,appearing ? 0 : translationY);
  animator.setInterpolator(interpolator);
  animator.setDuration(duration);
  animator.setStartDelay(delay);
  animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
    @Override public void onAnimationUpdate(    ValueAnimator animation){
      float animatedFraction=animation.getAnimatedFraction();
      if (appearing) {
        animatedCell.scale=animatedFraction;
      }
 else {
        animatedCell.alpha=1 - animatedFraction;
      }
      animatedCell.translateY=(float)animation.getAnimatedValue();
      mLockPatternView.invalidate();
    }
  }
);
  if (finishListener != null) {
    animator.addListener(new AnimatorListenerAdapter(){
      @Override public void onAnimationEnd(      Animator animation){
        finishListener.run();
      }
    }
);
    mAppearAnimationUtils.createAnimation(mEcaView,delay,duration,translationY,appearing,interpolator,null);
  }
  animator.start();
  mLockPatternView.invalidate();
}

Fixed version (ground truth):
@Override public void createAnimation(final LockPatternView.CellState animatedCell,long delay,long duration,float translationY,final boolean appearing,Interpolator interpolator,final Runnable finishListener){
  if (appearing) {
    animatedCell.scale=0.0f;
    animatedCell.alpha=1.0f;
  }
  animatedCell.translateY=appearing ? translationY : 0;
  ValueAnimator animator=ValueAnimator.ofFloat(animatedCell.translateY,appearing ? 0 : translationY);
  animator.setInterpolator(interpolator);
  animator.setDuration(duration);
  animator.setStartDelay(delay);
  animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
    @Override public void onAnimationUpdate(    ValueAnimator animation){
      float animatedFraction=animation.getAnimatedFraction();
      if (appearing) {
        animatedCell.scale=animatedFraction;
      }
 else {
        animatedCell.alpha=1 - animatedFraction;
      }
      animatedCell.translateY=(float)animation.getAnimatedValue();
      mLockPatternView.invalidate();
    }
  }
);
  if (finishListener != null) {
    animator.addListener(new AnimatorListenerAdapter(){
      @Override public void onAnimationEnd(      Animator animation){
        finishListener.run();
      }
    }
);
    mAppearAnimationUtils.createAnimation(mEcaView,delay,duration,translationY,appearing,interpolator,null);
  }
  animator.start();
  mLockPatternView.invalidate();
}
Program: 195771
Project: 195771
Buggy source:
public void setDark(boolean dark,boolean fade,long delay){
  super.setDark(dark,fade,delay);
  if (mDark == dark) {
    return;
  }
  mDark=dark;
  if (!dark && fade) {
    if (mActivated) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
 else {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.INVISIBLE);
    }
    fadeDarkToDimmed(delay);
  }
 else {
    updateBackground();
  }
}

Fixed version (ground truth):
public void setDark(boolean dark,boolean fade,long delay){
  super.setDark(dark,fade,delay);
  if (mDark == dark) {
    return;
  }
  mDark=dark;
  if (!dark && fade) {
    if (mActivated) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
 else     if (mDimmed) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.INVISIBLE);
    }
 else {
      mBackgroundDimmed.setVisibility(View.INVISIBLE);
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
    fadeInFromDark(delay);
  }
 else {
    updateBackground();
  }
}
Program: 195772
Project: 195772
Buggy source:
@Override public void createAnimation(final LockPatternView.CellState animatedCell,long delay,long duration,float translationY,final boolean appearing,Interpolator interpolator,final Runnable finishListener){
  if (appearing) {
    animatedCell.scale=0.0f;
  }
  animatedCell.translateY=appearing ? translationY : 0;
  ValueAnimator animator=ValueAnimator.ofFloat(animatedCell.translateY,appearing ? 0 : translationY);
  animator.setInterpolator(interpolator);
  animator.setDuration(duration);
  animator.setStartDelay(delay);
  animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
    @Override public void onAnimationUpdate(    ValueAnimator animation){
      float animatedFraction=animation.getAnimatedFraction();
      if (appearing) {
        animatedCell.scale=animatedFraction;
      }
 else {
        animatedCell.alpha=1 - animatedFraction;
      }
      animatedCell.translateY=(float)animation.getAnimatedValue();
      mLockPatternView.invalidate();
    }
  }
);
  if (finishListener != null) {
    animator.addListener(new AnimatorListenerAdapter(){
      @Override public void onAnimationEnd(      Animator animation){
        finishListener.run();
      }
    }
);
    mAppearAnimationUtils.createAnimation(mEcaView,delay,duration,translationY,appearing,interpolator,null);
  }
  animator.start();
  mLockPatternView.invalidate();
}

Fixed version (ground truth):
@Override public void createAnimation(final LockPatternView.CellState animatedCell,long delay,long duration,float translationY,final boolean appearing,Interpolator interpolator,final Runnable finishListener){
  if (appearing) {
    animatedCell.scale=0.0f;
    animatedCell.alpha=1.0f;
  }
  animatedCell.translateY=appearing ? translationY : 0;
  ValueAnimator animator=ValueAnimator.ofFloat(animatedCell.translateY,appearing ? 0 : translationY);
  animator.setInterpolator(interpolator);
  animator.setDuration(duration);
  animator.setStartDelay(delay);
  animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
    @Override public void onAnimationUpdate(    ValueAnimator animation){
      float animatedFraction=animation.getAnimatedFraction();
      if (appearing) {
        animatedCell.scale=animatedFraction;
      }
 else {
        animatedCell.alpha=1 - animatedFraction;
      }
      animatedCell.translateY=(float)animation.getAnimatedValue();
      mLockPatternView.invalidate();
    }
  }
);
  if (finishListener != null) {
    animator.addListener(new AnimatorListenerAdapter(){
      @Override public void onAnimationEnd(      Animator animation){
        finishListener.run();
      }
    }
);
    mAppearAnimationUtils.createAnimation(mEcaView,delay,duration,translationY,appearing,interpolator,null);
  }
  animator.start();
  mLockPatternView.invalidate();
}
Program: 195774
Project: 195774
Buggy source:
public void setHttpProxy(String host,String port,String exclList,Uri pacFileUrl){
  Proxy.setHttpProxySystemProperty(host,port,exclList,pacFileUrl);
}

Fixed version (ground truth):
public void setHttpProxy(String host,String port,String exclList,Uri pacFileUrl){
  final Network network=ConnectivityManager.getProcessDefaultNetwork();
  if (network != null) {
    Proxy.setHttpProxySystemProperty(ConnectivityManager.from(getSystemContext()).getDefaultProxy());
  }
 else {
    Proxy.setHttpProxySystemProperty(host,port,exclList,pacFileUrl);
  }
}
Program: 195775
Project: 195775
Buggy source:
/** 
 * Binds the current process to   {@code network}.  All Sockets created in the future (and not explicitly bound via a bound SocketFactory from  {@link Network#getSocketFactory() Network.getSocketFactory()}) will be bound to  {@code network}.  All host name resolutions will be limited to   {@code network} as well.Note that if  {@code network} ever disconnects, all Sockets created in this way will cease towork and all host name resolutions will fail.  This is by design so an application doesn't accidentally use Sockets it thinks are still bound to a particular  {@link Network}. To clear binding pass   {@code null} for {@code network}.  Using individually bound Sockets created by Network.getSocketFactory().createSocket() and performing network-specific host name resolutions via  {@link Network#getAllByName Network.getAllByName} is preferred to calling{@code setProcessDefaultNetwork}.
 * @param network The {@link Network} to bind the current process to, or {@code null} to clearthe current binding.
 * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
 */
public static boolean setProcessDefaultNetwork(Network network){
  int netId=(network == null) ? NETID_UNSET : network.netId;
  if (netId == NetworkUtils.getNetworkBoundToProcess()) {
    return true;
  }
  if (NetworkUtils.bindProcessToNetwork(netId)) {
    InetAddress.clearDnsCache();
    NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Binds the current process to   {@code network}.  All Sockets created in the future (and not explicitly bound via a bound SocketFactory from  {@link Network#getSocketFactory() Network.getSocketFactory()}) will be bound to  {@code network}.  All host name resolutions will be limited to   {@code network} as well.Note that if  {@code network} ever disconnects, all Sockets created in this way will cease towork and all host name resolutions will fail.  This is by design so an application doesn't accidentally use Sockets it thinks are still bound to a particular  {@link Network}. To clear binding pass   {@code null} for {@code network}.  Using individually bound Sockets created by Network.getSocketFactory().createSocket() and performing network-specific host name resolutions via  {@link Network#getAllByName Network.getAllByName} is preferred to calling{@code setProcessDefaultNetwork}.
 * @param network The {@link Network} to bind the current process to, or {@code null} to clearthe current binding.
 * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
 */
public static boolean setProcessDefaultNetwork(Network network){
  int netId=(network == null) ? NETID_UNSET : network.netId;
  if (netId == NetworkUtils.getNetworkBoundToProcess()) {
    return true;
  }
  if (NetworkUtils.bindProcessToNetwork(netId)) {
    Proxy.setHttpProxySystemProperty(getInstance().getDefaultProxy());
    InetAddress.clearDnsCache();
    NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
    return true;
  }
 else {
    return false;
  }
}
Program: 195776
Project: 195776
Buggy source:
/** 
 * {@hide}
 */
public ConnectivityManager(IConnectivityManager service){
  mService=checkNotNull(service,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@hide}
 */
public ConnectivityManager(IConnectivityManager service){
  mService=checkNotNull(service,"String_Node_Str");
  sInstance=this;
}
Program: 195778
Project: 195778
Buggy source:
public void setHttpProxy(String host,String port,String exclList,Uri pacFileUrl){
  Proxy.setHttpProxySystemProperty(host,port,exclList,pacFileUrl);
}

Fixed version (ground truth):
public void setHttpProxy(String host,String port,String exclList,Uri pacFileUrl){
  final Network network=ConnectivityManager.getProcessDefaultNetwork();
  if (network != null) {
    Proxy.setHttpProxySystemProperty(ConnectivityManager.from(getSystemContext()).getDefaultProxy());
  }
 else {
    Proxy.setHttpProxySystemProperty(host,port,exclList,pacFileUrl);
  }
}
Program: 195779
Project: 195779
Buggy source:
/** 
 * Binds the current process to   {@code network}.  All Sockets created in the future (and not explicitly bound via a bound SocketFactory from  {@link Network#getSocketFactory() Network.getSocketFactory()}) will be bound to  {@code network}.  All host name resolutions will be limited to   {@code network} as well.Note that if  {@code network} ever disconnects, all Sockets created in this way will cease towork and all host name resolutions will fail.  This is by design so an application doesn't accidentally use Sockets it thinks are still bound to a particular  {@link Network}. To clear binding pass   {@code null} for {@code network}.  Using individually bound Sockets created by Network.getSocketFactory().createSocket() and performing network-specific host name resolutions via  {@link Network#getAllByName Network.getAllByName} is preferred to calling{@code setProcessDefaultNetwork}.
 * @param network The {@link Network} to bind the current process to, or {@code null} to clearthe current binding.
 * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
 */
public static boolean setProcessDefaultNetwork(Network network){
  int netId=(network == null) ? NETID_UNSET : network.netId;
  if (netId == NetworkUtils.getNetworkBoundToProcess()) {
    return true;
  }
  if (NetworkUtils.bindProcessToNetwork(netId)) {
    InetAddress.clearDnsCache();
    NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Binds the current process to   {@code network}.  All Sockets created in the future (and not explicitly bound via a bound SocketFactory from  {@link Network#getSocketFactory() Network.getSocketFactory()}) will be bound to  {@code network}.  All host name resolutions will be limited to   {@code network} as well.Note that if  {@code network} ever disconnects, all Sockets created in this way will cease towork and all host name resolutions will fail.  This is by design so an application doesn't accidentally use Sockets it thinks are still bound to a particular  {@link Network}. To clear binding pass   {@code null} for {@code network}.  Using individually bound Sockets created by Network.getSocketFactory().createSocket() and performing network-specific host name resolutions via  {@link Network#getAllByName Network.getAllByName} is preferred to calling{@code setProcessDefaultNetwork}.
 * @param network The {@link Network} to bind the current process to, or {@code null} to clearthe current binding.
 * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
 */
public static boolean setProcessDefaultNetwork(Network network){
  int netId=(network == null) ? NETID_UNSET : network.netId;
  if (netId == NetworkUtils.getNetworkBoundToProcess()) {
    return true;
  }
  if (NetworkUtils.bindProcessToNetwork(netId)) {
    Proxy.setHttpProxySystemProperty(getInstance().getDefaultProxy());
    InetAddress.clearDnsCache();
    NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
    return true;
  }
 else {
    return false;
  }
}
Program: 195780
Project: 195780
Buggy source:
/** 
 * {@hide}
 */
public ConnectivityManager(IConnectivityManager service){
  mService=checkNotNull(service,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@hide}
 */
public ConnectivityManager(IConnectivityManager service){
  mService=checkNotNull(service,"String_Node_Str");
  sInstance=this;
}
Program: 195782
Project: 195782
Buggy source:
public void setHttpProxy(String host,String port,String exclList,Uri pacFileUrl){
  Proxy.setHttpProxySystemProperty(host,port,exclList,pacFileUrl);
}

Fixed version (ground truth):
public void setHttpProxy(String host,String port,String exclList,Uri pacFileUrl){
  final Network network=ConnectivityManager.getProcessDefaultNetwork();
  if (network != null) {
    Proxy.setHttpProxySystemProperty(ConnectivityManager.from(getSystemContext()).getDefaultProxy());
  }
 else {
    Proxy.setHttpProxySystemProperty(host,port,exclList,pacFileUrl);
  }
}
Program: 195783
Project: 195783
Buggy source:
/** 
 * Binds the current process to   {@code network}.  All Sockets created in the future (and not explicitly bound via a bound SocketFactory from  {@link Network#getSocketFactory() Network.getSocketFactory()}) will be bound to  {@code network}.  All host name resolutions will be limited to   {@code network} as well.Note that if  {@code network} ever disconnects, all Sockets created in this way will cease towork and all host name resolutions will fail.  This is by design so an application doesn't accidentally use Sockets it thinks are still bound to a particular  {@link Network}. To clear binding pass   {@code null} for {@code network}.  Using individually bound Sockets created by Network.getSocketFactory().createSocket() and performing network-specific host name resolutions via  {@link Network#getAllByName Network.getAllByName} is preferred to calling{@code setProcessDefaultNetwork}.
 * @param network The {@link Network} to bind the current process to, or {@code null} to clearthe current binding.
 * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
 */
public static boolean setProcessDefaultNetwork(Network network){
  int netId=(network == null) ? NETID_UNSET : network.netId;
  if (netId == NetworkUtils.getNetworkBoundToProcess()) {
    return true;
  }
  if (NetworkUtils.bindProcessToNetwork(netId)) {
    InetAddress.clearDnsCache();
    NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Binds the current process to   {@code network}.  All Sockets created in the future (and not explicitly bound via a bound SocketFactory from  {@link Network#getSocketFactory() Network.getSocketFactory()}) will be bound to  {@code network}.  All host name resolutions will be limited to   {@code network} as well.Note that if  {@code network} ever disconnects, all Sockets created in this way will cease towork and all host name resolutions will fail.  This is by design so an application doesn't accidentally use Sockets it thinks are still bound to a particular  {@link Network}. To clear binding pass   {@code null} for {@code network}.  Using individually bound Sockets created by Network.getSocketFactory().createSocket() and performing network-specific host name resolutions via  {@link Network#getAllByName Network.getAllByName} is preferred to calling{@code setProcessDefaultNetwork}.
 * @param network The {@link Network} to bind the current process to, or {@code null} to clearthe current binding.
 * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
 */
public static boolean setProcessDefaultNetwork(Network network){
  int netId=(network == null) ? NETID_UNSET : network.netId;
  if (netId == NetworkUtils.getNetworkBoundToProcess()) {
    return true;
  }
  if (NetworkUtils.bindProcessToNetwork(netId)) {
    Proxy.setHttpProxySystemProperty(getInstance().getDefaultProxy());
    InetAddress.clearDnsCache();
    NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
    return true;
  }
 else {
    return false;
  }
}
Program: 195784
Project: 195784
Buggy source:
/** 
 * {@hide}
 */
public ConnectivityManager(IConnectivityManager service){
  mService=checkNotNull(service,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@hide}
 */
public ConnectivityManager(IConnectivityManager service){
  mService=checkNotNull(service,"String_Node_Str");
  sInstance=this;
}
Program: 195787
Project: 195787
Buggy source:
private static final View createScrim(Context context){
  View view=new View(context);
  int flags=WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
  final int stretch=ViewGroup.LayoutParams.MATCH_PARENT;
  final int type=WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM;
  WindowManager.LayoutParams lp=new WindowManager.LayoutParams(stretch,stretch,type,flags,PixelFormat.TRANSLUCENT);
  lp.softInputMode=WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
  lp.screenOrientation=ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
  lp.privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
  lp.setTitle("String_Node_Str");
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  wm.addView(view,lp);
  view.setVisibility(View.GONE);
  view.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_RECENT| View.STATUS_BAR_DISABLE_EXPAND| View.STATUS_BAR_DISABLE_SEARCH);
  return view;
}

Fixed version (ground truth):
private static final View createScrim(Context context){
  View view=new View(context);
  int flags=WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
  final int stretch=ViewGroup.LayoutParams.MATCH_PARENT;
  final int type=WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM;
  WindowManager.LayoutParams lp=new WindowManager.LayoutParams(stretch,stretch,type,flags,PixelFormat.TRANSLUCENT);
  lp.softInputMode=WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
  lp.screenOrientation=ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
  lp.privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
  lp.setTitle("String_Node_Str");
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  wm.addView(view,lp);
  view.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_RECENT| View.STATUS_BAR_DISABLE_EXPAND| View.STATUS_BAR_DISABLE_SEARCH);
  return view;
}
Program: 195788
Project: 195788
Buggy source:
public void onScreenTurnedOn(final ShowListener showListener){
  if (mKeyguardService != null) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + showListener + "String_Node_Str");
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));
  }
 else {
    Slog.w(TAG,"String_Node_Str");
    showListener.onShown(null);
  }
  mKeyguardState.screenIsOn=true;
}

Fixed version (ground truth):
public void onScreenTurnedOn(final ShowListener showListener){
  if (mKeyguardService != null) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + showListener + "String_Node_Str");
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));
  }
 else {
    Slog.w(TAG,"String_Node_Str");
    mShowListenerWhenConnect=showListener;
    showScrim();
  }
  mKeyguardState.screenIsOn=true;
}
Program: 195789
Project: 195789
Buggy source:
@Override public void onServiceConnected(ComponentName name,IBinder service){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  mKeyguardService=new KeyguardServiceWrapper(mContext,IKeyguardService.Stub.asInterface(service));
  if (mKeyguardState.systemIsReady) {
    mKeyguardService.onSystemReady();
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(null));
  }
  if (mKeyguardState.bootCompleted) {
    mKeyguardService.onBootCompleted();
  }
}

Fixed version (ground truth):
@Override public void onServiceConnected(ComponentName name,IBinder service){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  mKeyguardService=new KeyguardServiceWrapper(mContext,IKeyguardService.Stub.asInterface(service));
  if (mKeyguardState.systemIsReady) {
    mKeyguardService.onSystemReady();
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(mShowListenerWhenConnect));
    if (mShowListenerWhenConnect != null) {
      Log.v(TAG,"String_Node_Str");
      mShowListenerWhenConnect=null;
      hideScrim();
    }
  }
  if (mKeyguardState.bootCompleted) {
    mKeyguardService.onBootCompleted();
  }
}
Program: 195790
Project: 195790
Buggy source:
/** 
 * @hide
 */
public void callActivityOnNewIntent(Activity activity,ReferrerIntent intent){
  final String oldReferrer=activity.mReferrer;
  try {
    activity.mReferrer=intent.mReferrer;
    callActivityOnNewIntent(activity,new Intent(intent));
  }
  finally {
    activity.mReferrer=oldReferrer;
  }
}

Fixed version (ground truth):
/** 
 * @hide
 */
public void callActivityOnNewIntent(Activity activity,ReferrerIntent intent){
  final String oldReferrer=activity.mReferrer;
  try {
    if (intent != null) {
      activity.mReferrer=intent.mReferrer;
    }
    callActivityOnNewIntent(activity,intent != null ? new Intent(intent) : null);
  }
  finally {
    activity.mReferrer=oldReferrer;
  }
}
Program: 195792
Project: 195792
Buggy source:
private void toUriFragment(StringBuilder uri,String scheme,String defAction,String defPackage,int flags){
  StringBuilder frag=new StringBuilder(128);
  toUriInner(frag,scheme,defAction,defPackage,flags);
  if (mSelector != null) {
    uri.append("String_Node_Str");
    mSelector.toUriInner(frag,mSelector.mData != null ? mSelector.mData.getScheme() : null,null,null,flags);
  }
  if (frag.length() > 0) {
    uri.append("String_Node_Str");
    uri.append(frag);
    uri.append("String_Node_Str");
  }
}

Fixed version (ground truth):
private void toUriFragment(StringBuilder uri,String scheme,String defAction,String defPackage,int flags){
  StringBuilder frag=new StringBuilder(128);
  toUriInner(frag,scheme,defAction,defPackage,flags);
  if (mSelector != null) {
    frag.append("String_Node_Str");
    mSelector.toUriInner(frag,mSelector.mData != null ? mSelector.mData.getScheme() : null,null,null,flags);
  }
  if (frag.length() > 0) {
    uri.append("String_Node_Str");
    uri.append(frag);
    uri.append("String_Node_Str");
  }
}
Program: 195796
Project: 195796
Buggy source:
public void setHttpProxy(String host,String port,String exclList,Uri pacFileUrl){
  Proxy.setHttpProxySystemProperty(host,port,exclList,pacFileUrl);
}

Fixed version (ground truth):
public void setHttpProxy(String host,String port,String exclList,Uri pacFileUrl){
  final Network network=ConnectivityManager.getProcessDefaultNetwork();
  if (network != null) {
    Proxy.setHttpProxySystemProperty(ConnectivityManager.from(getSystemContext()).getDefaultProxy());
  }
 else {
    Proxy.setHttpProxySystemProperty(host,port,exclList,pacFileUrl);
  }
}
Program: 195797
Project: 195797
Buggy source:
/** 
 * Binds the current process to   {@code network}.  All Sockets created in the future (and not explicitly bound via a bound SocketFactory from  {@link Network#getSocketFactory() Network.getSocketFactory()}) will be bound to  {@code network}.  All host name resolutions will be limited to   {@code network} as well.Note that if  {@code network} ever disconnects, all Sockets created in this way will cease towork and all host name resolutions will fail.  This is by design so an application doesn't accidentally use Sockets it thinks are still bound to a particular  {@link Network}. To clear binding pass   {@code null} for {@code network}.  Using individually bound Sockets created by Network.getSocketFactory().createSocket() and performing network-specific host name resolutions via  {@link Network#getAllByName Network.getAllByName} is preferred to calling{@code setProcessDefaultNetwork}.
 * @param network The {@link Network} to bind the current process to, or {@code null} to clearthe current binding.
 * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
 */
public static boolean setProcessDefaultNetwork(Network network){
  int netId=(network == null) ? NETID_UNSET : network.netId;
  if (netId == NetworkUtils.getNetworkBoundToProcess()) {
    return true;
  }
  if (NetworkUtils.bindProcessToNetwork(netId)) {
    InetAddress.clearDnsCache();
    NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Binds the current process to   {@code network}.  All Sockets created in the future (and not explicitly bound via a bound SocketFactory from  {@link Network#getSocketFactory() Network.getSocketFactory()}) will be bound to  {@code network}.  All host name resolutions will be limited to   {@code network} as well.Note that if  {@code network} ever disconnects, all Sockets created in this way will cease towork and all host name resolutions will fail.  This is by design so an application doesn't accidentally use Sockets it thinks are still bound to a particular  {@link Network}. To clear binding pass   {@code null} for {@code network}.  Using individually bound Sockets created by Network.getSocketFactory().createSocket() and performing network-specific host name resolutions via  {@link Network#getAllByName Network.getAllByName} is preferred to calling{@code setProcessDefaultNetwork}.
 * @param network The {@link Network} to bind the current process to, or {@code null} to clearthe current binding.
 * @return {@code true} on success, {@code false} if the {@link Network} is no longer valid.
 */
public static boolean setProcessDefaultNetwork(Network network){
  int netId=(network == null) ? NETID_UNSET : network.netId;
  if (netId == NetworkUtils.getNetworkBoundToProcess()) {
    return true;
  }
  if (NetworkUtils.bindProcessToNetwork(netId)) {
    Proxy.setHttpProxySystemProperty(getInstance().getDefaultProxy());
    InetAddress.clearDnsCache();
    NetworkEventDispatcher.getInstance().onNetworkConfigurationChanged();
    return true;
  }
 else {
    return false;
  }
}
Program: 195798
Project: 195798
Buggy source:
/** 
 * {@hide}
 */
public ConnectivityManager(IConnectivityManager service){
  mService=checkNotNull(service,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@hide}
 */
public ConnectivityManager(IConnectivityManager service){
  mService=checkNotNull(service,"String_Node_Str");
  sInstance=this;
}
Program: 195799
Project: 195799
Buggy source:
/** 
 * @hide
 */
public void callActivityOnNewIntent(Activity activity,ReferrerIntent intent){
  final String oldReferrer=activity.mReferrer;
  try {
    activity.mReferrer=intent.mReferrer;
    callActivityOnNewIntent(activity,new Intent(intent));
  }
  finally {
    activity.mReferrer=oldReferrer;
  }
}

Fixed version (ground truth):
/** 
 * @hide
 */
public void callActivityOnNewIntent(Activity activity,ReferrerIntent intent){
  final String oldReferrer=activity.mReferrer;
  try {
    if (intent != null) {
      activity.mReferrer=intent.mReferrer;
    }
    callActivityOnNewIntent(activity,intent != null ? new Intent(intent) : null);
  }
  finally {
    activity.mReferrer=oldReferrer;
  }
}
Program: 195801
Project: 195801
Buggy source:
private void toUriFragment(StringBuilder uri,String scheme,String defAction,String defPackage,int flags){
  StringBuilder frag=new StringBuilder(128);
  toUriInner(frag,scheme,defAction,defPackage,flags);
  if (mSelector != null) {
    uri.append("String_Node_Str");
    mSelector.toUriInner(frag,mSelector.mData != null ? mSelector.mData.getScheme() : null,null,null,flags);
  }
  if (frag.length() > 0) {
    uri.append("String_Node_Str");
    uri.append(frag);
    uri.append("String_Node_Str");
  }
}

Fixed version (ground truth):
private void toUriFragment(StringBuilder uri,String scheme,String defAction,String defPackage,int flags){
  StringBuilder frag=new StringBuilder(128);
  toUriInner(frag,scheme,defAction,defPackage,flags);
  if (mSelector != null) {
    frag.append("String_Node_Str");
    mSelector.toUriInner(frag,mSelector.mData != null ? mSelector.mData.getScheme() : null,null,null,flags);
  }
  if (frag.length() > 0) {
    uri.append("String_Node_Str");
    uri.append(frag);
    uri.append("String_Node_Str");
  }
}
Program: 195803
Project: 195803
Buggy source:
/** 
 * @hide
 */
public void callActivityOnNewIntent(Activity activity,ReferrerIntent intent){
  final String oldReferrer=activity.mReferrer;
  try {
    activity.mReferrer=intent.mReferrer;
    callActivityOnNewIntent(activity,new Intent(intent));
  }
  finally {
    activity.mReferrer=oldReferrer;
  }
}

Fixed version (ground truth):
/** 
 * @hide
 */
public void callActivityOnNewIntent(Activity activity,ReferrerIntent intent){
  final String oldReferrer=activity.mReferrer;
  try {
    if (intent != null) {
      activity.mReferrer=intent.mReferrer;
    }
    callActivityOnNewIntent(activity,intent != null ? new Intent(intent) : null);
  }
  finally {
    activity.mReferrer=oldReferrer;
  }
}
Program: 195805
Project: 195805
Buggy source:
private void toUriFragment(StringBuilder uri,String scheme,String defAction,String defPackage,int flags){
  StringBuilder frag=new StringBuilder(128);
  toUriInner(frag,scheme,defAction,defPackage,flags);
  if (mSelector != null) {
    uri.append("String_Node_Str");
    mSelector.toUriInner(frag,mSelector.mData != null ? mSelector.mData.getScheme() : null,null,null,flags);
  }
  if (frag.length() > 0) {
    uri.append("String_Node_Str");
    uri.append(frag);
    uri.append("String_Node_Str");
  }
}

Fixed version (ground truth):
private void toUriFragment(StringBuilder uri,String scheme,String defAction,String defPackage,int flags){
  StringBuilder frag=new StringBuilder(128);
  toUriInner(frag,scheme,defAction,defPackage,flags);
  if (mSelector != null) {
    frag.append("String_Node_Str");
    mSelector.toUriInner(frag,mSelector.mData != null ? mSelector.mData.getScheme() : null,null,null,flags);
  }
  if (frag.length() > 0) {
    uri.append("String_Node_Str");
    uri.append(frag);
    uri.append("String_Node_Str");
  }
}
Program: 195806
Project: 195806
Buggy source:
/** 
 * @hide
 */
public void callActivityOnNewIntent(Activity activity,ReferrerIntent intent){
  final String oldReferrer=activity.mReferrer;
  try {
    activity.mReferrer=intent.mReferrer;
    callActivityOnNewIntent(activity,new Intent(intent));
  }
  finally {
    activity.mReferrer=oldReferrer;
  }
}

Fixed version (ground truth):
/** 
 * @hide
 */
public void callActivityOnNewIntent(Activity activity,ReferrerIntent intent){
  final String oldReferrer=activity.mReferrer;
  try {
    if (intent != null) {
      activity.mReferrer=intent.mReferrer;
    }
    callActivityOnNewIntent(activity,intent != null ? new Intent(intent) : null);
  }
  finally {
    activity.mReferrer=oldReferrer;
  }
}
Program: 195808
Project: 195808
Buggy source:
private void toUriFragment(StringBuilder uri,String scheme,String defAction,String defPackage,int flags){
  StringBuilder frag=new StringBuilder(128);
  toUriInner(frag,scheme,defAction,defPackage,flags);
  if (mSelector != null) {
    uri.append("String_Node_Str");
    mSelector.toUriInner(frag,mSelector.mData != null ? mSelector.mData.getScheme() : null,null,null,flags);
  }
  if (frag.length() > 0) {
    uri.append("String_Node_Str");
    uri.append(frag);
    uri.append("String_Node_Str");
  }
}

Fixed version (ground truth):
private void toUriFragment(StringBuilder uri,String scheme,String defAction,String defPackage,int flags){
  StringBuilder frag=new StringBuilder(128);
  toUriInner(frag,scheme,defAction,defPackage,flags);
  if (mSelector != null) {
    frag.append("String_Node_Str");
    mSelector.toUriInner(frag,mSelector.mData != null ? mSelector.mData.getScheme() : null,null,null,flags);
  }
  if (frag.length() > 0) {
    uri.append("String_Node_Str");
    uri.append(frag);
    uri.append("String_Node_Str");
  }
}
Program: 195809
Project: 195809
Buggy source:
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 {
      Runnable dimissHideFinishRunnable=new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
;
      if (mDismissView.isButtonVisible() && mIsExpanded) {
        mDismissView.setWillBeGone(true);
        mDismissView.performVisibilityAnimation(false,dimissHideFinishRunnable);
      }
 else {
        dimissHideFinishRunnable.run();
        mDismissView.showClearButton();
      }
    }
  }
}

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 {
      Runnable dimissHideFinishRunnable=new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
;
      if (mDismissView.isButtonVisible() && mIsExpanded && mAnimationsEnabled) {
        mDismissView.setWillBeGone(true);
        mDismissView.performVisibilityAnimation(false,dimissHideFinishRunnable);
      }
 else {
        dimissHideFinishRunnable.run();
        mDismissView.showClearButton();
      }
    }
  }
}