nus-yam/ex-repair huggingface dataset:
Program: 199131
Project: 199131
Buggy source:
private void maybeReportNewChargingState(){
  final boolean stablePower=mChargeTracker.isOnStablePower();
  boolean reportChange=false;
synchronized (mTrackedTasks) {
    for (    JobStatus ts : mTrackedTasks) {
      boolean previous=ts.chargingConstraintSatisfied.getAndSet(stablePower);
      if (previous != stablePower) {
        reportChange=true;
      }
    }
  }
  if (reportChange) {
    mStateChangedListener.onControllerStateChanged();
  }
}

Fixed version (ground truth):
private void maybeReportNewChargingState(){
  final boolean stablePower=mChargeTracker.isOnStablePower();
  if (DEBUG) {
    Slog.d(TAG,"String_Node_Str" + stablePower);
  }
  boolean reportChange=false;
synchronized (mTrackedTasks) {
    for (    JobStatus ts : mTrackedTasks) {
      boolean previous=ts.chargingConstraintSatisfied.getAndSet(stablePower);
      if (previous != stablePower) {
        reportChange=true;
      }
    }
  }
  if (reportChange) {
    mStateChangedListener.onControllerStateChanged();
  }
}
Program: 199132
Project: 199132
Buggy source:
public void startTracking(){
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_BATTERY_LOW);
  filter.addAction(Intent.ACTION_BATTERY_OKAY);
  filter.addAction(Intent.ACTION_POWER_CONNECTED);
  filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
  mContext.registerReceiver(this,filter);
  BatteryService batteryService=(BatteryService)ServiceManager.getService("String_Node_Str");
  if (batteryService != null) {
    mBatteryHealthy=!batteryService.getBatteryLevelLow();
    mCharging=batteryService.isPowered(BatteryManager.BATTERY_PLUGGED_ANY);
  }
 else {
  }
}

Fixed version (ground truth):
public void startTracking(){
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_BATTERY_LOW);
  filter.addAction(Intent.ACTION_BATTERY_OKAY);
  filter.addAction(Intent.ACTION_POWER_CONNECTED);
  filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
  filter.addAction(ACTION_CHARGING_STABLE);
  mContext.registerReceiver(this,filter);
  BatteryService batteryService=(BatteryService)ServiceManager.getService("String_Node_Str");
  if (batteryService != null) {
    mBatteryHealthy=!batteryService.getBatteryLevelLow();
    mCharging=batteryService.isPowered(BatteryManager.BATTERY_PLUGGED_ANY);
  }
 else {
  }
}
Program: 199133
Project: 199133
Buggy source:
@Override public void dumpControllerState(PrintWriter pw){
}

Fixed version (ground truth):
@Override public void dumpControllerState(PrintWriter pw){
  pw.println("String_Node_Str");
  pw.println("String_Node_Str" + mChargeTracker.isOnStablePower());
synchronized (mTrackedTasks) {
    Iterator<JobStatus> it=mTrackedTasks.iterator();
    if (it.hasNext()) {
      pw.print(String.valueOf(it.next().hashCode()));
    }
    while (it.hasNext()) {
      pw.print("String_Node_Str" + String.valueOf(it.next().hashCode()));
    }
    pw.println();
  }
}
Program: 199134
Project: 199134
Buggy source:
@Override public void maybeStartTrackingJob(JobStatus taskStatus){
  if (taskStatus.hasChargingConstraint()) {
synchronized (mTrackedTasks) {
      mTrackedTasks.add(taskStatus);
      taskStatus.chargingConstraintSatisfied.set(mChargeTracker.isOnStablePower());
    }
  }
}

Fixed version (ground truth):
@Override public void maybeStartTrackingJob(JobStatus taskStatus){
  if (taskStatus.hasChargingConstraint()) {
    final boolean isOnStablePower=mChargeTracker.isOnStablePower();
synchronized (mTrackedTasks) {
      mTrackedTasks.add(taskStatus);
      taskStatus.chargingConstraintSatisfied.set(isOnStablePower);
    }
    if (isOnStablePower) {
      mStateChangedListener.onControllerStateChanged();
    }
  }
}
Program: 199136
Project: 199136
Buggy source:
/** 
 * Compares this RouteInfo object against the specified object and indicates if they are equal.
 * @return {@code true} if the objects are equal, {@code false} otherwise.
 */
public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!(obj instanceof RouteInfo))   return false;
  RouteInfo target=(RouteInfo)obj;
  return Objects.equals(mDestination,target.getDestination()) && Objects.equals(mGateway,target.getGateway()) && Objects.equals(mInterface,target.getInterface());
}

Fixed version (ground truth):
/** 
 * Compares this RouteInfo object against the specified object and indicates if they are equal.
 * @return {@code true} if the objects are equal, {@code false} otherwise.
 */
public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!(obj instanceof RouteInfo))   return false;
  RouteInfo target=(RouteInfo)obj;
  return Objects.equals(mDestination,target.getDestinationLinkAddress()) && Objects.equals(mGateway,target.getGateway()) && Objects.equals(mInterface,target.getInterface());
}
Program: 199137
Project: 199137
Buggy source:
/** 
 * Compares this RouteInfo object against the specified object and indicates if they are equal.
 * @return {@code true} if the objects are equal, {@code false} otherwise.
 */
public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!(obj instanceof RouteInfo))   return false;
  RouteInfo target=(RouteInfo)obj;
  return Objects.equals(mDestination,target.getDestination()) && Objects.equals(mGateway,target.getGateway()) && Objects.equals(mInterface,target.getInterface());
}

Fixed version (ground truth):
/** 
 * Compares this RouteInfo object against the specified object and indicates if they are equal.
 * @return {@code true} if the objects are equal, {@code false} otherwise.
 */
public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!(obj instanceof RouteInfo))   return false;
  RouteInfo target=(RouteInfo)obj;
  return Objects.equals(mDestination,target.getDestinationLinkAddress()) && Objects.equals(mGateway,target.getGateway()) && Objects.equals(mInterface,target.getInterface());
}
Program: 199138
Project: 199138
Buggy source:
public boolean isShowingLayoutLayouted(){
  View showingLayout=mShowingPublic ? mPublicLayout : mPrivateLayout;
  return showingLayout.getWidth() != 0;
}

Fixed version (ground truth):
public boolean isShowingLayoutLayouted(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getWidth() != 0;
}
Program: 199139
Project: 199139
Buggy source:
@Override public void setActualHeight(int height,boolean notifyListeners){
  mPrivateLayout.setActualHeight(height);
  invalidate();
  super.setActualHeight(height,notifyListeners);
}

Fixed version (ground truth):
@Override public void setActualHeight(int height,boolean notifyListeners){
  mPrivateLayout.setActualHeight(height);
  mPublicLayout.setActualHeight(height);
  invalidate();
  super.setActualHeight(height,notifyListeners);
}
Program: 199140
Project: 199140
Buggy source:
@Override public boolean isContentExpandable(){
  return mPrivateLayout.isContentExpandable();
}

Fixed version (ground truth):
@Override public boolean isContentExpandable(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.isContentExpandable();
}
Program: 199141
Project: 199141
Buggy source:
@Override public int getMinHeight(){
  return mPrivateLayout.getMinHeight();
}

Fixed version (ground truth):
@Override public int getMinHeight(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getMinHeight();
}
Program: 199142
Project: 199142
Buggy source:
public void notifyContentUpdated(){
  mPrivateLayout.notifyContentUpdated();
}

Fixed version (ground truth):
public void notifyContentUpdated(){
  mPublicLayout.notifyContentUpdated();
  mPrivateLayout.notifyContentUpdated();
}
Program: 199143
Project: 199143
Buggy source:
public int getMaxExpandHeight(){
  return mMaxExpandHeight;
}

Fixed version (ground truth):
public int getMaxExpandHeight(){
  return mShowingPublic ? mRowMinHeight : mMaxExpandHeight;
}
Program: 199144
Project: 199144
Buggy source:
@Override public int getMaxHeight(){
  return mPrivateLayout.getMaxHeight();
}

Fixed version (ground truth):
@Override public int getMaxHeight(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getMaxHeight();
}
Program: 199145
Project: 199145
Buggy source:
@Override public void setClipTopAmount(int clipTopAmount){
  super.setClipTopAmount(clipTopAmount);
  mPrivateLayout.setClipTopAmount(clipTopAmount);
}

Fixed version (ground truth):
@Override public void setClipTopAmount(int clipTopAmount){
  super.setClipTopAmount(clipTopAmount);
  mPrivateLayout.setClipTopAmount(clipTopAmount);
  mPublicLayout.setClipTopAmount(clipTopAmount);
}
Program: 199146
Project: 199146
Buggy source:
private void selectLayout(){
  if (mActualHeight <= mSmallHeight || mExpandedChild == null) {
    if (mContractedChild.getVisibility() != View.VISIBLE) {
      mContractedChild.setVisibility(View.VISIBLE);
    }
    if (mExpandedChild != null && mExpandedChild.getVisibility() != View.INVISIBLE) {
      mExpandedChild.setVisibility(View.INVISIBLE);
    }
  }
 else {
    if (mExpandedChild.getVisibility() != View.VISIBLE) {
      mExpandedChild.setVisibility(View.VISIBLE);
    }
    if (mContractedChild.getVisibility() != View.INVISIBLE) {
      mContractedChild.setVisibility(View.INVISIBLE);
    }
  }
}

Fixed version (ground truth):
private void selectLayout(){
  if (mActualHeight <= mSmallHeight || mExpandedChild == null) {
    if (mContractedChild != null && mContractedChild.getVisibility() != View.VISIBLE) {
      mContractedChild.setVisibility(View.VISIBLE);
    }
    if (mExpandedChild != null && mExpandedChild.getVisibility() != View.INVISIBLE) {
      mExpandedChild.setVisibility(View.INVISIBLE);
    }
  }
 else {
    if (mExpandedChild.getVisibility() != View.VISIBLE) {
      mExpandedChild.setVisibility(View.VISIBLE);
    }
    if (mContractedChild != null && mContractedChild.getVisibility() != View.INVISIBLE) {
      mContractedChild.setVisibility(View.INVISIBLE);
    }
  }
}
Program: 199147
Project: 199147
Buggy source:
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=mFirstChildWhileExpanding.getActualHeight();
    }
 else {
      if (mFirstChildWhileExpanding.getWidth() == 0) {
        mFirstChildWhileExpanding.addOnLayoutChangeListener(new View.OnLayoutChangeListener(){
          @Override public void onLayoutChange(          View v,          int left,          int top,          int right,          int bottom,          int oldLeft,          int oldTop,          int oldRight,          int oldBottom){
            if (mFirstChildWhileExpanding != null) {
              mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
            }
 else {
              mFirstChildMaxHeight=0;
            }
            v.removeOnLayoutChangeListener(this);
          }
        }
);
      }
 else {
        mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
      }
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}

Fixed version (ground truth):
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=mFirstChildWhileExpanding.getActualHeight();
    }
 else {
      if (!isMaxSizeInitialized(mFirstChildWhileExpanding)) {
        mFirstChildWhileExpanding.addOnLayoutChangeListener(new View.OnLayoutChangeListener(){
          @Override public void onLayoutChange(          View v,          int left,          int top,          int right,          int bottom,          int oldLeft,          int oldTop,          int oldRight,          int oldBottom){
            if (mFirstChildWhileExpanding != null) {
              mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
            }
 else {
              mFirstChildMaxHeight=0;
            }
            v.removeOnLayoutChangeListener(this);
          }
        }
);
      }
 else {
        mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
      }
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}
Program: 199148
Project: 199148
Buggy source:
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=mFirstChildWhileExpanding.getActualHeight();
    }
 else {
      if (mFirstChildWhileExpanding.getWidth() == 0) {
        mFirstChildWhileExpanding.addOnLayoutChangeListener(new View.OnLayoutChangeListener(){
          @Override public void onLayoutChange(          View v,          int left,          int top,          int right,          int bottom,          int oldLeft,          int oldTop,          int oldRight,          int oldBottom){
            if (mFirstChildWhileExpanding != null) {
              mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
            }
 else {
              mFirstChildMaxHeight=0;
            }
            v.removeOnLayoutChangeListener(this);
          }
        }
);
      }
 else {
        mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
      }
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}

Fixed version (ground truth):
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=mFirstChildWhileExpanding.getActualHeight();
    }
 else {
      if (!isMaxSizeInitialized(mFirstChildWhileExpanding)) {
        mFirstChildWhileExpanding.addOnLayoutChangeListener(new View.OnLayoutChangeListener(){
          @Override public void onLayoutChange(          View v,          int left,          int top,          int right,          int bottom,          int oldLeft,          int oldTop,          int oldRight,          int oldBottom){
            if (mFirstChildWhileExpanding != null) {
              mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
            }
 else {
              mFirstChildMaxHeight=0;
            }
            v.removeOnLayoutChangeListener(this);
          }
        }
);
      }
 else {
        mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
      }
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}
Program: 199149
Project: 199149
Buggy source:
public boolean isShowingLayoutLayouted(){
  View showingLayout=mShowingPublic ? mPublicLayout : mPrivateLayout;
  return showingLayout.getWidth() != 0;
}

Fixed version (ground truth):
public boolean isShowingLayoutLayouted(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getWidth() != 0;
}
Program: 199150
Project: 199150
Buggy source:
@Override public void setActualHeight(int height,boolean notifyListeners){
  mPrivateLayout.setActualHeight(height);
  invalidate();
  super.setActualHeight(height,notifyListeners);
}

Fixed version (ground truth):
@Override public void setActualHeight(int height,boolean notifyListeners){
  mPrivateLayout.setActualHeight(height);
  mPublicLayout.setActualHeight(height);
  invalidate();
  super.setActualHeight(height,notifyListeners);
}
Program: 199151
Project: 199151
Buggy source:
@Override public boolean isContentExpandable(){
  return mPrivateLayout.isContentExpandable();
}

Fixed version (ground truth):
@Override public boolean isContentExpandable(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.isContentExpandable();
}
Program: 199152
Project: 199152
Buggy source:
@Override public int getMinHeight(){
  return mPrivateLayout.getMinHeight();
}

Fixed version (ground truth):
@Override public int getMinHeight(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getMinHeight();
}
Program: 199153
Project: 199153
Buggy source:
public void notifyContentUpdated(){
  mPrivateLayout.notifyContentUpdated();
}

Fixed version (ground truth):
public void notifyContentUpdated(){
  mPublicLayout.notifyContentUpdated();
  mPrivateLayout.notifyContentUpdated();
}
Program: 199154
Project: 199154
Buggy source:
public int getMaxExpandHeight(){
  return mMaxExpandHeight;
}

Fixed version (ground truth):
public int getMaxExpandHeight(){
  return mShowingPublic ? mRowMinHeight : mMaxExpandHeight;
}
Program: 199155
Project: 199155
Buggy source:
@Override public int getMaxHeight(){
  return mPrivateLayout.getMaxHeight();
}

Fixed version (ground truth):
@Override public int getMaxHeight(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getMaxHeight();
}
Program: 199156
Project: 199156
Buggy source:
@Override public void setClipTopAmount(int clipTopAmount){
  super.setClipTopAmount(clipTopAmount);
  mPrivateLayout.setClipTopAmount(clipTopAmount);
}

Fixed version (ground truth):
@Override public void setClipTopAmount(int clipTopAmount){
  super.setClipTopAmount(clipTopAmount);
  mPrivateLayout.setClipTopAmount(clipTopAmount);
  mPublicLayout.setClipTopAmount(clipTopAmount);
}
Program: 199157
Project: 199157
Buggy source:
private void selectLayout(){
  if (mActualHeight <= mSmallHeight || mExpandedChild == null) {
    if (mContractedChild.getVisibility() != View.VISIBLE) {
      mContractedChild.setVisibility(View.VISIBLE);
    }
    if (mExpandedChild != null && mExpandedChild.getVisibility() != View.INVISIBLE) {
      mExpandedChild.setVisibility(View.INVISIBLE);
    }
  }
 else {
    if (mExpandedChild.getVisibility() != View.VISIBLE) {
      mExpandedChild.setVisibility(View.VISIBLE);
    }
    if (mContractedChild.getVisibility() != View.INVISIBLE) {
      mContractedChild.setVisibility(View.INVISIBLE);
    }
  }
}

Fixed version (ground truth):
private void selectLayout(){
  if (mActualHeight <= mSmallHeight || mExpandedChild == null) {
    if (mContractedChild != null && mContractedChild.getVisibility() != View.VISIBLE) {
      mContractedChild.setVisibility(View.VISIBLE);
    }
    if (mExpandedChild != null && mExpandedChild.getVisibility() != View.INVISIBLE) {
      mExpandedChild.setVisibility(View.INVISIBLE);
    }
  }
 else {
    if (mExpandedChild.getVisibility() != View.VISIBLE) {
      mExpandedChild.setVisibility(View.VISIBLE);
    }
    if (mContractedChild != null && mContractedChild.getVisibility() != View.INVISIBLE) {
      mContractedChild.setVisibility(View.INVISIBLE);
    }
  }
}
Program: 199158
Project: 199158
Buggy source:
public boolean isShowingLayoutLayouted(){
  View showingLayout=mShowingPublic ? mPublicLayout : mPrivateLayout;
  return showingLayout.getWidth() != 0;
}

Fixed version (ground truth):
public boolean isShowingLayoutLayouted(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getWidth() != 0;
}
Program: 199159
Project: 199159
Buggy source:
@Override public void setActualHeight(int height,boolean notifyListeners){
  mPrivateLayout.setActualHeight(height);
  invalidate();
  super.setActualHeight(height,notifyListeners);
}

Fixed version (ground truth):
@Override public void setActualHeight(int height,boolean notifyListeners){
  mPrivateLayout.setActualHeight(height);
  mPublicLayout.setActualHeight(height);
  invalidate();
  super.setActualHeight(height,notifyListeners);
}
Program: 199160
Project: 199160
Buggy source:
@Override public boolean isContentExpandable(){
  return mPrivateLayout.isContentExpandable();
}

Fixed version (ground truth):
@Override public boolean isContentExpandable(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.isContentExpandable();
}
Program: 199161
Project: 199161
Buggy source:
@Override public int getMinHeight(){
  return mPrivateLayout.getMinHeight();
}

Fixed version (ground truth):
@Override public int getMinHeight(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getMinHeight();
}
Program: 199162
Project: 199162
Buggy source:
public void notifyContentUpdated(){
  mPrivateLayout.notifyContentUpdated();
}

Fixed version (ground truth):
public void notifyContentUpdated(){
  mPublicLayout.notifyContentUpdated();
  mPrivateLayout.notifyContentUpdated();
}
Program: 199163
Project: 199163
Buggy source:
public int getMaxExpandHeight(){
  return mMaxExpandHeight;
}

Fixed version (ground truth):
public int getMaxExpandHeight(){
  return mShowingPublic ? mRowMinHeight : mMaxExpandHeight;
}
Program: 199164
Project: 199164
Buggy source:
@Override public int getMaxHeight(){
  return mPrivateLayout.getMaxHeight();
}

Fixed version (ground truth):
@Override public int getMaxHeight(){
  NotificationContentView showingLayout=getShowingLayout();
  return showingLayout.getMaxHeight();
}
Program: 199165
Project: 199165
Buggy source:
@Override public void setClipTopAmount(int clipTopAmount){
  super.setClipTopAmount(clipTopAmount);
  mPrivateLayout.setClipTopAmount(clipTopAmount);
}

Fixed version (ground truth):
@Override public void setClipTopAmount(int clipTopAmount){
  super.setClipTopAmount(clipTopAmount);
  mPrivateLayout.setClipTopAmount(clipTopAmount);
  mPublicLayout.setClipTopAmount(clipTopAmount);
}
Program: 199166
Project: 199166
Buggy source:
private void selectLayout(){
  if (mActualHeight <= mSmallHeight || mExpandedChild == null) {
    if (mContractedChild.getVisibility() != View.VISIBLE) {
      mContractedChild.setVisibility(View.VISIBLE);
    }
    if (mExpandedChild != null && mExpandedChild.getVisibility() != View.INVISIBLE) {
      mExpandedChild.setVisibility(View.INVISIBLE);
    }
  }
 else {
    if (mExpandedChild.getVisibility() != View.VISIBLE) {
      mExpandedChild.setVisibility(View.VISIBLE);
    }
    if (mContractedChild.getVisibility() != View.INVISIBLE) {
      mContractedChild.setVisibility(View.INVISIBLE);
    }
  }
}

Fixed version (ground truth):
private void selectLayout(){
  if (mActualHeight <= mSmallHeight || mExpandedChild == null) {
    if (mContractedChild != null && mContractedChild.getVisibility() != View.VISIBLE) {
      mContractedChild.setVisibility(View.VISIBLE);
    }
    if (mExpandedChild != null && mExpandedChild.getVisibility() != View.INVISIBLE) {
      mExpandedChild.setVisibility(View.INVISIBLE);
    }
  }
 else {
    if (mExpandedChild.getVisibility() != View.VISIBLE) {
      mExpandedChild.setVisibility(View.VISIBLE);
    }
    if (mContractedChild != null && mContractedChild.getVisibility() != View.INVISIBLE) {
      mContractedChild.setVisibility(View.INVISIBLE);
    }
  }
}
Program: 199167
Project: 199167
Buggy source:
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=mFirstChildWhileExpanding.getActualHeight();
    }
 else {
      if (mFirstChildWhileExpanding.getWidth() == 0) {
        mFirstChildWhileExpanding.addOnLayoutChangeListener(new View.OnLayoutChangeListener(){
          @Override public void onLayoutChange(          View v,          int left,          int top,          int right,          int bottom,          int oldLeft,          int oldTop,          int oldRight,          int oldBottom){
            if (mFirstChildWhileExpanding != null) {
              mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
            }
 else {
              mFirstChildMaxHeight=0;
            }
            v.removeOnLayoutChangeListener(this);
          }
        }
);
      }
 else {
        mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
      }
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}

Fixed version (ground truth):
private void updateFirstChildHeightWhileExpanding(ViewGroup hostView){
  mFirstChildWhileExpanding=(ExpandableView)findFirstVisibleChild(hostView);
  if (mFirstChildWhileExpanding != null) {
    if (mExpandedOnStart) {
      mFirstChildMaxHeight=mFirstChildWhileExpanding.getActualHeight();
    }
 else {
      if (!isMaxSizeInitialized(mFirstChildWhileExpanding)) {
        mFirstChildWhileExpanding.addOnLayoutChangeListener(new View.OnLayoutChangeListener(){
          @Override public void onLayoutChange(          View v,          int left,          int top,          int right,          int bottom,          int oldLeft,          int oldTop,          int oldRight,          int oldBottom){
            if (mFirstChildWhileExpanding != null) {
              mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
            }
 else {
              mFirstChildMaxHeight=0;
            }
            v.removeOnLayoutChangeListener(this);
          }
        }
);
      }
 else {
        mFirstChildMaxHeight=getMaxAllowedChildHeight(mFirstChildWhileExpanding);
      }
    }
  }
 else {
    mFirstChildMaxHeight=0;
  }
}
Program: 199168
Project: 199168
Buggy source:
@Override public void onUnconfigured(CameraDevice camera){
  mUnconfigureDrainer.taskFinished();
}

Fixed version (ground truth):
@Override public void onUnconfigured(CameraDevice camera){
synchronized (session) {
    if (mClosed) {
      mUnconfigureDrainer.taskFinished();
    }
  }
}
Program: 199170
Project: 199170
Buggy source:
@Override public void onUnconfigured(CameraDevice camera){
  mUnconfigureDrainer.taskFinished();
}

Fixed version (ground truth):
@Override public void onUnconfigured(CameraDevice camera){
synchronized (session) {
    if (mClosed) {
      mUnconfigureDrainer.taskFinished();
    }
  }
}
Program: 199172
Project: 199172
Buggy source:
@Override protected void onBootCompleted(){
  mBootCompleted=true;
}

Fixed version (ground truth):
@Override protected void onBootCompleted(){
  if (mUseAlternateRecents) {
    if (mAlternateRecents != null) {
      mAlternateRecents.onBootCompleted();
    }
  }
  mBootCompleted=true;
}
Program: 199173
Project: 199173
Buggy source:
/** 
 * Hides the recents 
 */
public void onHideRecents(boolean triggeredFromAltTab){
  if (Console.Enabled) {
    Console.log(Constants.Log.App.RecentsComponent,"String_Node_Str");
  }
  if (mServiceIsBound) {
    try {
      Bundle data=new Bundle();
      Message msg=Message.obtain(null,MSG_HIDE_RECENTS,triggeredFromAltTab ? 1 : 0,0);
      msg.setData(data);
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Hides the recents 
 */
public void onHideRecents(boolean triggeredFromAltTab){
  if (Console.Enabled) {
    Console.log(Constants.Log.App.RecentsComponent,"String_Node_Str");
  }
  if (mServiceIsBound && mBootCompleted) {
    try {
      Bundle data=new Bundle();
      Message msg=Message.obtain(null,MSG_HIDE_RECENTS,triggeredFromAltTab ? 1 : 0,0);
      msg.setData(data);
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}
Program: 199174
Project: 199174
Buggy source:
/** 
 * Updates each of the task animation rects. 
 */
void updateAnimationRects(){
  if (mServiceIsBound) {
    Resources res=mContext.getResources();
    int statusBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
    int navBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height);
    Rect rect=new Rect();
    WindowManager wm=(WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
    wm.getDefaultDisplay().getRectSize(rect);
    try {
      Bundle data=new Bundle();
      data.putParcelable(KEY_WINDOW_RECT,rect);
      data.putParcelable(KEY_SYSTEM_INSETS,new Rect(0,statusBarHeight,0,0));
      Message msg=Message.obtain(null,MSG_UPDATE_FOR_CONFIGURATION,0,0);
      msg.setData(data);
      msg.replyTo=mMessenger;
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates each of the task animation rects. 
 */
void updateAnimationRects(){
  if (mServiceIsBound && mBootCompleted) {
    Resources res=mContext.getResources();
    int statusBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
    int navBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height);
    Rect rect=new Rect();
    WindowManager wm=(WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
    wm.getDefaultDisplay().getRectSize(rect);
    try {
      Bundle data=new Bundle();
      data.putParcelable(KEY_WINDOW_RECT,rect);
      data.putParcelable(KEY_SYSTEM_INSETS,new Rect(0,statusBarHeight,0,0));
      Message msg=Message.obtain(null,MSG_UPDATE_FOR_CONFIGURATION,0,0);
      msg.setData(data);
      msg.replyTo=mMessenger;
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}
Program: 199175
Project: 199175
Buggy source:
@Override protected void onBootCompleted(){
  mBootCompleted=true;
}

Fixed version (ground truth):
@Override protected void onBootCompleted(){
  if (mUseAlternateRecents) {
    if (mAlternateRecents != null) {
      mAlternateRecents.onBootCompleted();
    }
  }
  mBootCompleted=true;
}
Program: 199176
Project: 199176
Buggy source:
/** 
 * Hides the recents 
 */
public void onHideRecents(boolean triggeredFromAltTab){
  if (Console.Enabled) {
    Console.log(Constants.Log.App.RecentsComponent,"String_Node_Str");
  }
  if (mServiceIsBound) {
    try {
      Bundle data=new Bundle();
      Message msg=Message.obtain(null,MSG_HIDE_RECENTS,triggeredFromAltTab ? 1 : 0,0);
      msg.setData(data);
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Hides the recents 
 */
public void onHideRecents(boolean triggeredFromAltTab){
  if (Console.Enabled) {
    Console.log(Constants.Log.App.RecentsComponent,"String_Node_Str");
  }
  if (mServiceIsBound && mBootCompleted) {
    try {
      Bundle data=new Bundle();
      Message msg=Message.obtain(null,MSG_HIDE_RECENTS,triggeredFromAltTab ? 1 : 0,0);
      msg.setData(data);
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}
Program: 199177
Project: 199177
Buggy source:
/** 
 * Updates each of the task animation rects. 
 */
void updateAnimationRects(){
  if (mServiceIsBound) {
    Resources res=mContext.getResources();
    int statusBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
    int navBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height);
    Rect rect=new Rect();
    WindowManager wm=(WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
    wm.getDefaultDisplay().getRectSize(rect);
    try {
      Bundle data=new Bundle();
      data.putParcelable(KEY_WINDOW_RECT,rect);
      data.putParcelable(KEY_SYSTEM_INSETS,new Rect(0,statusBarHeight,0,0));
      Message msg=Message.obtain(null,MSG_UPDATE_FOR_CONFIGURATION,0,0);
      msg.setData(data);
      msg.replyTo=mMessenger;
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates each of the task animation rects. 
 */
void updateAnimationRects(){
  if (mServiceIsBound && mBootCompleted) {
    Resources res=mContext.getResources();
    int statusBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
    int navBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height);
    Rect rect=new Rect();
    WindowManager wm=(WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
    wm.getDefaultDisplay().getRectSize(rect);
    try {
      Bundle data=new Bundle();
      data.putParcelable(KEY_WINDOW_RECT,rect);
      data.putParcelable(KEY_SYSTEM_INSETS,new Rect(0,statusBarHeight,0,0));
      Message msg=Message.obtain(null,MSG_UPDATE_FOR_CONFIGURATION,0,0);
      msg.setData(data);
      msg.replyTo=mMessenger;
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}
Program: 199178
Project: 199178
Buggy source:
@Override protected void onBootCompleted(){
  mBootCompleted=true;
}

Fixed version (ground truth):
@Override protected void onBootCompleted(){
  if (mUseAlternateRecents) {
    if (mAlternateRecents != null) {
      mAlternateRecents.onBootCompleted();
    }
  }
  mBootCompleted=true;
}
Program: 199179
Project: 199179
Buggy source:
/** 
 * Hides the recents 
 */
public void onHideRecents(boolean triggeredFromAltTab){
  if (Console.Enabled) {
    Console.log(Constants.Log.App.RecentsComponent,"String_Node_Str");
  }
  if (mServiceIsBound) {
    try {
      Bundle data=new Bundle();
      Message msg=Message.obtain(null,MSG_HIDE_RECENTS,triggeredFromAltTab ? 1 : 0,0);
      msg.setData(data);
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Hides the recents 
 */
public void onHideRecents(boolean triggeredFromAltTab){
  if (Console.Enabled) {
    Console.log(Constants.Log.App.RecentsComponent,"String_Node_Str");
  }
  if (mServiceIsBound && mBootCompleted) {
    try {
      Bundle data=new Bundle();
      Message msg=Message.obtain(null,MSG_HIDE_RECENTS,triggeredFromAltTab ? 1 : 0,0);
      msg.setData(data);
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}
Program: 199180
Project: 199180
Buggy source:
/** 
 * Updates each of the task animation rects. 
 */
void updateAnimationRects(){
  if (mServiceIsBound) {
    Resources res=mContext.getResources();
    int statusBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
    int navBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height);
    Rect rect=new Rect();
    WindowManager wm=(WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
    wm.getDefaultDisplay().getRectSize(rect);
    try {
      Bundle data=new Bundle();
      data.putParcelable(KEY_WINDOW_RECT,rect);
      data.putParcelable(KEY_SYSTEM_INSETS,new Rect(0,statusBarHeight,0,0));
      Message msg=Message.obtain(null,MSG_UPDATE_FOR_CONFIGURATION,0,0);
      msg.setData(data);
      msg.replyTo=mMessenger;
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates each of the task animation rects. 
 */
void updateAnimationRects(){
  if (mServiceIsBound && mBootCompleted) {
    Resources res=mContext.getResources();
    int statusBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height);
    int navBarHeight=res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height);
    Rect rect=new Rect();
    WindowManager wm=(WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
    wm.getDefaultDisplay().getRectSize(rect);
    try {
      Bundle data=new Bundle();
      data.putParcelable(KEY_WINDOW_RECT,rect);
      data.putParcelable(KEY_SYSTEM_INSETS,new Rect(0,statusBarHeight,0,0));
      Message msg=Message.obtain(null,MSG_UPDATE_FOR_CONFIGURATION,0,0);
      msg.setData(data);
      msg.replyTo=mMessenger;
      mService.send(msg);
    }
 catch (    RemoteException re) {
      re.printStackTrace();
    }
  }
}
Program: 199181
Project: 199181
Buggy source:
/** 
 * Change the position of child to a new location
 * @param child the view to change the position for
 * @param newIndex the new index
 */
public void changeViewPosition(View child,int newIndex){
  if (child != null && child.getParent() == this) {
    mChildrenChangingPositions.add(child);
    removeView(child);
    addView(child,newIndex);
    mNeedsAnimation=true;
  }
}

Fixed version (ground truth):
/** 
 * Change the position of child to a new location
 * @param child the view to change the position for
 * @param newIndex the new index
 */
public void changeViewPosition(View child,int newIndex){
  if (child != null && child.getParent() == this) {
    mChangePositionInProgress=true;
    removeView(child);
    addView(child,newIndex);
    mChangePositionInProgress=false;
    if (mIsExpanded && mAnimationsEnabled) {
      mChildrenChangingPositions.add(child);
      mNeedsAnimation=true;
    }
  }
}
Program: 199182
Project: 199182
Buggy source:
/** 
 * Generate an animation for an added child view.
 * @param child The view to be added.
 */
public void generateAddAnimation(View child){
  if (mIsExpanded && mAnimationsEnabled && !mChildrenChangingPositions.contains(child)) {
    mChildrenToAddAnimated.add(child);
    mNeedsAnimation=true;
  }
}

Fixed version (ground truth):
/** 
 * Generate an animation for an added child view.
 * @param child The view to be added.
 */
public void generateAddAnimation(View child){
  if (mIsExpanded && mAnimationsEnabled && !mChangePositionInProgress) {
    mChildrenToAddAnimated.add(child);
    mNeedsAnimation=true;
  }
}
Program: 199183
Project: 199183
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChildrenChangingPositions.contains(child)) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
}

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);
  }
}
Program: 199184
Project: 199184
Buggy source:
/** 
 * Change the position of child to a new location
 * @param child the view to change the position for
 * @param newIndex the new index
 */
public void changeViewPosition(View child,int newIndex){
  if (child != null && child.getParent() == this) {
    mChildrenChangingPositions.add(child);
    removeView(child);
    addView(child,newIndex);
    mNeedsAnimation=true;
  }
}

Fixed version (ground truth):
/** 
 * Change the position of child to a new location
 * @param child the view to change the position for
 * @param newIndex the new index
 */
public void changeViewPosition(View child,int newIndex){
  if (child != null && child.getParent() == this) {
    mChangePositionInProgress=true;
    removeView(child);
    addView(child,newIndex);
    mChangePositionInProgress=false;
    if (mIsExpanded && mAnimationsEnabled) {
      mChildrenChangingPositions.add(child);
      mNeedsAnimation=true;
    }
  }
}
Program: 199185
Project: 199185
Buggy source:
/** 
 * Generate an animation for an added child view.
 * @param child The view to be added.
 */
public void generateAddAnimation(View child){
  if (mIsExpanded && mAnimationsEnabled && !mChildrenChangingPositions.contains(child)) {
    mChildrenToAddAnimated.add(child);
    mNeedsAnimation=true;
  }
}

Fixed version (ground truth):
/** 
 * Generate an animation for an added child view.
 * @param child The view to be added.
 */
public void generateAddAnimation(View child){
  if (mIsExpanded && mAnimationsEnabled && !mChangePositionInProgress) {
    mChildrenToAddAnimated.add(child);
    mNeedsAnimation=true;
  }
}
Program: 199186
Project: 199186
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChildrenChangingPositions.contains(child)) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
}

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);
  }
}
Program: 199187
Project: 199187
Buggy source:
/** 
 * Change the position of child to a new location
 * @param child the view to change the position for
 * @param newIndex the new index
 */
public void changeViewPosition(View child,int newIndex){
  if (child != null && child.getParent() == this) {
    mChildrenChangingPositions.add(child);
    removeView(child);
    addView(child,newIndex);
    mNeedsAnimation=true;
  }
}

Fixed version (ground truth):
/** 
 * Change the position of child to a new location
 * @param child the view to change the position for
 * @param newIndex the new index
 */
public void changeViewPosition(View child,int newIndex){
  if (child != null && child.getParent() == this) {
    mChangePositionInProgress=true;
    removeView(child);
    addView(child,newIndex);
    mChangePositionInProgress=false;
    if (mIsExpanded && mAnimationsEnabled) {
      mChildrenChangingPositions.add(child);
      mNeedsAnimation=true;
    }
  }
}
Program: 199188
Project: 199188
Buggy source:
/** 
 * Generate an animation for an added child view.
 * @param child The view to be added.
 */
public void generateAddAnimation(View child){
  if (mIsExpanded && mAnimationsEnabled && !mChildrenChangingPositions.contains(child)) {
    mChildrenToAddAnimated.add(child);
    mNeedsAnimation=true;
  }
}

Fixed version (ground truth):
/** 
 * Generate an animation for an added child view.
 * @param child The view to be added.
 */
public void generateAddAnimation(View child){
  if (mIsExpanded && mAnimationsEnabled && !mChangePositionInProgress) {
    mChildrenToAddAnimated.add(child);
    mNeedsAnimation=true;
  }
}
Program: 199189
Project: 199189
Buggy source:
@Override protected void onViewRemoved(View child){
  super.onViewRemoved(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  if (mChildrenChangingPositions.contains(child)) {
    return;
  }
  ((ExpandableView)child).setOnHeightChangedListener(null);
  mCurrentStackScrollState.removeViewStateForView(child);
  updateScrollStateForRemovedChild(child);
  boolean animationGenerated=generateRemoveAnimation(child);
  if (animationGenerated && !mSwipedOutViews.contains(child)) {
    getOverlay().add(child);
  }
}

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);
  }
}
Program: 199190
Project: 199190
Buggy source:
@Override public void setAlpha(int alpha){
  if (mAlpha != alpha) {
    mAlpha=alpha;
    invalidateSelf();
  }
}

Fixed version (ground truth):
@Override public void setAlpha(int alpha){
  if (mVectorState.mVPathRenderer.getRootAlpha() != alpha) {
    mVectorState.mVPathRenderer.setRootAlpha(alpha);
    invalidateSelf();
  }
}
Program: 199191
Project: 199191
Buggy source:
public void draw(Canvas canvas,int w,int h){
  drawGroupTree(mRootGroup,IDENTITY_MATRIX,canvas,w,h);
}

Fixed version (ground truth):
public void draw(Canvas canvas,int w,int h){
  drawGroupTree(mRootGroup,IDENTITY_MATRIX,((float)mRootAlpha) / 0xFF,canvas,w,h);
}
Program: 199192
Project: 199192
Buggy source:
private void drawGroupTree(VGroup currentGroup,Matrix currentMatrix,Canvas canvas,int w,int h){
  currentGroup.mStackedMatrix.set(currentMatrix);
  currentGroup.mStackedMatrix.preConcat(currentGroup.mLocalMatrix);
  drawPath(currentGroup,canvas,w,h);
  for (int i=0; i < currentGroup.mChildGroupList.size(); i++) {
    drawGroupTree(currentGroup.mChildGroupList.get(i),currentGroup.mStackedMatrix,canvas,w,h);
  }
}

Fixed version (ground truth):
private void drawGroupTree(VGroup currentGroup,Matrix currentMatrix,float currentAlpha,Canvas canvas,int w,int h){
  currentGroup.mStackedMatrix.set(currentMatrix);
  currentGroup.mStackedMatrix.preConcat(currentGroup.mLocalMatrix);
  float stackedAlpha=currentAlpha * currentGroup.mGroupAlpha;
  drawPath(currentGroup,stackedAlpha,canvas,w,h);
  for (int i=0; i < currentGroup.mChildGroupList.size(); i++) {
    drawGroupTree(currentGroup.mChildGroupList.get(i),currentGroup.mStackedMatrix,stackedAlpha,canvas,w,h);
  }
}
Program: 199193
Project: 199193
Buggy source:
private void updateColorAlphas(){
  if (!Float.isNaN(mFillOpacity)) {
    mFillColor&=0x00FFFFFF;
    mFillColor|=((int)(0xFF * mFillOpacity)) << 24;
  }
  if (!Float.isNaN(mStrokeOpacity)) {
    mStrokeColor&=0x00FFFFFF;
    mStrokeColor|=((int)(0xFF * mStrokeOpacity)) << 24;
  }
}

Fixed version (ground truth):
private void updateColorAlphas(){
  if (!Float.isNaN(mFillOpacity)) {
    mFillColor=applyAlpha(mFillColor,mFillOpacity);
  }
  if (!Float.isNaN(mStrokeOpacity)) {
    mStrokeColor=applyAlpha(mStrokeColor,mStrokeOpacity);
  }
}
Program: 199195
Project: 199195
Buggy source:
@Override public void setAlpha(int alpha){
  if (mAlpha != alpha) {
    mAlpha=alpha;
    invalidateSelf();
  }
}

Fixed version (ground truth):
@Override public void setAlpha(int alpha){
  if (mVectorState.mVPathRenderer.getRootAlpha() != alpha) {
    mVectorState.mVPathRenderer.setRootAlpha(alpha);
    invalidateSelf();
  }
}
Program: 199196
Project: 199196
Buggy source:
public void draw(Canvas canvas,int w,int h){
  drawGroupTree(mRootGroup,IDENTITY_MATRIX,canvas,w,h);
}

Fixed version (ground truth):
public void draw(Canvas canvas,int w,int h){
  drawGroupTree(mRootGroup,IDENTITY_MATRIX,((float)mRootAlpha) / 0xFF,canvas,w,h);
}
Program: 199197
Project: 199197
Buggy source:
private void drawGroupTree(VGroup currentGroup,Matrix currentMatrix,Canvas canvas,int w,int h){
  currentGroup.mStackedMatrix.set(currentMatrix);
  currentGroup.mStackedMatrix.preConcat(currentGroup.mLocalMatrix);
  drawPath(currentGroup,canvas,w,h);
  for (int i=0; i < currentGroup.mChildGroupList.size(); i++) {
    drawGroupTree(currentGroup.mChildGroupList.get(i),currentGroup.mStackedMatrix,canvas,w,h);
  }
}

Fixed version (ground truth):
private void drawGroupTree(VGroup currentGroup,Matrix currentMatrix,float currentAlpha,Canvas canvas,int w,int h){
  currentGroup.mStackedMatrix.set(currentMatrix);
  currentGroup.mStackedMatrix.preConcat(currentGroup.mLocalMatrix);
  float stackedAlpha=currentAlpha * currentGroup.mGroupAlpha;
  drawPath(currentGroup,stackedAlpha,canvas,w,h);
  for (int i=0; i < currentGroup.mChildGroupList.size(); i++) {
    drawGroupTree(currentGroup.mChildGroupList.get(i),currentGroup.mStackedMatrix,stackedAlpha,canvas,w,h);
  }
}
Program: 199198
Project: 199198
Buggy source:
private void updateColorAlphas(){
  if (!Float.isNaN(mFillOpacity)) {
    mFillColor&=0x00FFFFFF;
    mFillColor|=((int)(0xFF * mFillOpacity)) << 24;
  }
  if (!Float.isNaN(mStrokeOpacity)) {
    mStrokeColor&=0x00FFFFFF;
    mStrokeColor|=((int)(0xFF * mStrokeOpacity)) << 24;
  }
}

Fixed version (ground truth):
private void updateColorAlphas(){
  if (!Float.isNaN(mFillOpacity)) {
    mFillColor=applyAlpha(mFillColor,mFillOpacity);
  }
  if (!Float.isNaN(mStrokeOpacity)) {
    mStrokeColor=applyAlpha(mStrokeColor,mStrokeOpacity);
  }
}