nus-yam/ex-repair huggingface dataset:
Program: 194383
Project: 194383
Buggy source:
private void runPostCollapseRunnables(){
  int size=mPostCollapseRunnables.size();
  for (int i=0; i < size; i++) {
    mPostCollapseRunnables.get(i).run();
  }
  mPostCollapseRunnables.clear();
}

Fixed version (ground truth):
private void runPostCollapseRunnables(){
  ArrayList<Runnable> clonedList=new ArrayList<>(mPostCollapseRunnables);
  mPostCollapseRunnables.clear();
  int size=clonedList.size();
  for (int i=0; i < size; i++) {
    clonedList.get(i).run();
  }
}
Program: 194384
Project: 194384
Buggy source:
private void runPostCollapseRunnables(){
  int size=mPostCollapseRunnables.size();
  for (int i=0; i < size; i++) {
    mPostCollapseRunnables.get(i).run();
  }
  mPostCollapseRunnables.clear();
}

Fixed version (ground truth):
private void runPostCollapseRunnables(){
  ArrayList<Runnable> clonedList=new ArrayList<>(mPostCollapseRunnables);
  mPostCollapseRunnables.clear();
  int size=clonedList.size();
  for (int i=0; i < size; i++) {
    clonedList.get(i).run();
  }
}
Program: 194385
Project: 194385
Buggy source:
private void runPostCollapseRunnables(){
  int size=mPostCollapseRunnables.size();
  for (int i=0; i < size; i++) {
    mPostCollapseRunnables.get(i).run();
  }
  mPostCollapseRunnables.clear();
}

Fixed version (ground truth):
private void runPostCollapseRunnables(){
  ArrayList<Runnable> clonedList=new ArrayList<>(mPostCollapseRunnables);
  mPostCollapseRunnables.clear();
  int size=clonedList.size();
  for (int i=0; i < size; i++) {
    clonedList.get(i).run();
  }
}
Program: 194386
Project: 194386
Buggy source:
private void runPostCollapseRunnables(){
  int size=mPostCollapseRunnables.size();
  for (int i=0; i < size; i++) {
    mPostCollapseRunnables.get(i).run();
  }
  mPostCollapseRunnables.clear();
}

Fixed version (ground truth):
private void runPostCollapseRunnables(){
  ArrayList<Runnable> clonedList=new ArrayList<>(mPostCollapseRunnables);
  mPostCollapseRunnables.clear();
  int size=clonedList.size();
  for (int i=0; i < size; i++) {
    clonedList.get(i).run();
  }
}
Program: 194387
Project: 194387
Buggy source:
private void runPostCollapseRunnables(){
  int size=mPostCollapseRunnables.size();
  for (int i=0; i < size; i++) {
    mPostCollapseRunnables.get(i).run();
  }
  mPostCollapseRunnables.clear();
}

Fixed version (ground truth):
private void runPostCollapseRunnables(){
  ArrayList<Runnable> clonedList=new ArrayList<>(mPostCollapseRunnables);
  mPostCollapseRunnables.clear();
  int size=clonedList.size();
  for (int i=0; i < size; i++) {
    clonedList.get(i).run();
  }
}
Program: 194388
Project: 194388
Buggy source:
private void runPostCollapseRunnables(){
  int size=mPostCollapseRunnables.size();
  for (int i=0; i < size; i++) {
    mPostCollapseRunnables.get(i).run();
  }
  mPostCollapseRunnables.clear();
}

Fixed version (ground truth):
private void runPostCollapseRunnables(){
  ArrayList<Runnable> clonedList=new ArrayList<>(mPostCollapseRunnables);
  mPostCollapseRunnables.clear();
  int size=clonedList.size();
  for (int i=0; i < size; i++) {
    clonedList.get(i).run();
  }
}
Program: 194389
Project: 194389
Buggy source:
private void runPostCollapseRunnables(){
  int size=mPostCollapseRunnables.size();
  for (int i=0; i < size; i++) {
    mPostCollapseRunnables.get(i).run();
  }
  mPostCollapseRunnables.clear();
}

Fixed version (ground truth):
private void runPostCollapseRunnables(){
  ArrayList<Runnable> clonedList=new ArrayList<>(mPostCollapseRunnables);
  mPostCollapseRunnables.clear();
  int size=clonedList.size();
  for (int i=0; i < size; i++) {
    clonedList.get(i).run();
  }
}
Program: 194390
Project: 194390
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  final boolean hideWhenLocked=!(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard) || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && hideWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}
Program: 194391
Project: 194391
Buggy source:
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && group.expanded) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && (group.expanded || group.summary == null)) {
    return true;
  }
  return false;
}
Program: 194392
Project: 194392
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  final boolean hideWhenLocked=!(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard) || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && hideWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}
Program: 194393
Project: 194393
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  final boolean hideWhenLocked=!(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard) || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && hideWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}
Program: 194394
Project: 194394
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  final boolean hideWhenLocked=!(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard) || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && hideWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}
Program: 194395
Project: 194395
Buggy source:
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && group.expanded) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && (group.expanded || group.summary == null)) {
    return true;
  }
  return false;
}
Program: 194396
Project: 194396
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  final boolean hideWhenLocked=!(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard) || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && hideWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}
Program: 194397
Project: 194397
Buggy source:
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && group.expanded) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && (group.expanded || group.summary == null)) {
    return true;
  }
  return false;
}
Program: 194398
Project: 194398
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  final boolean hideWhenLocked=!(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard) || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && hideWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}
Program: 194399
Project: 194399
Buggy source:
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && group.expanded) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && (group.expanded || group.summary == null)) {
    return true;
  }
  return false;
}
Program: 194400
Project: 194400
Buggy source:
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && group.expanded) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && (group.expanded || group.summary == null)) {
    return true;
  }
  return false;
}
Program: 194401
Project: 194401
Buggy source:
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  final boolean hideWhenLocked=!(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard) || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && hideWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}

Fixed version (ground truth):
private boolean shouldForceHide(WindowState win){
  final WindowState imeTarget=mService.mInputMethodTarget;
  final boolean showImeOverKeyguard=imeTarget != null && imeTarget.isVisibleNow() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !mPolicy.canBeForceHidden(imeTarget,imeTarget.mAttrs));
  final WindowState winShowWhenLocked=(WindowState)mPolicy.getWinShowWhenLockedLw();
  final AppWindowToken appShowWhenLocked=winShowWhenLocked == null ? null : winShowWhenLocked.mAppToken;
  boolean allowWhenLocked=false;
  allowWhenLocked|=(win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
  allowWhenLocked|=(win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
  if (appShowWhenLocked != null) {
    allowWhenLocked|=appShowWhenLocked == win.mAppToken || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw() || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
  }
  boolean keyguardOn=mPolicy.isKeyguardShowingOrOccluded() && mForceHiding != KEYGUARD_ANIMATING_OUT;
  return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}
Program: 194402
Project: 194402
Buggy source:
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && group.expanded) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && (group.expanded || group.summary == null)) {
    return true;
  }
  return false;
}
Program: 194403
Project: 194403
Buggy source:
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && group.expanded) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isVisible(StatusBarNotification sbn){
  if (!sbn.getNotification().isGroupChild()) {
    return true;
  }
  NotificationGroup group=mGroupMap.get(sbn.getGroupKey());
  if (group != null && (group.expanded || group.summary == null)) {
    return true;
  }
  return false;
}
Program: 194404
Project: 194404
Buggy source:
@Override public void startAccessPoint(WifiConfiguration wifiConfig,String wlanIface){
  mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL,TAG);
  try {
    wifiFirmwareReload(wlanIface,"String_Node_Str");
    if (wifiConfig == null) {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface);
    }
 else {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface,wifiConfig.SSID,"String_Node_Str",Integer.toString(wifiConfig.apChannel),getSecurityType(wifiConfig),new SensitiveArg(wifiConfig.preSharedKey));
    }
    mConnector.execute("String_Node_Str","String_Node_Str");
  }
 catch (  NativeDaemonConnectorException e) {
    throw e.rethrowAsParcelableException();
  }
}

Fixed version (ground truth):
@Override public void startAccessPoint(WifiConfiguration wifiConfig,String wlanIface){
  mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL,TAG);
  try {
    if (wifiConfig == null) {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface);
    }
 else {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface,wifiConfig.SSID,"String_Node_Str",Integer.toString(wifiConfig.apChannel),getSecurityType(wifiConfig),new SensitiveArg(wifiConfig.preSharedKey));
    }
    mConnector.execute("String_Node_Str","String_Node_Str");
  }
 catch (  NativeDaemonConnectorException e) {
    throw e.rethrowAsParcelableException();
  }
}
Program: 194405
Project: 194405
Buggy source:
@Override public void startAccessPoint(WifiConfiguration wifiConfig,String wlanIface){
  mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL,TAG);
  try {
    wifiFirmwareReload(wlanIface,"String_Node_Str");
    if (wifiConfig == null) {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface);
    }
 else {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface,wifiConfig.SSID,"String_Node_Str",Integer.toString(wifiConfig.apChannel),getSecurityType(wifiConfig),new SensitiveArg(wifiConfig.preSharedKey));
    }
    mConnector.execute("String_Node_Str","String_Node_Str");
  }
 catch (  NativeDaemonConnectorException e) {
    throw e.rethrowAsParcelableException();
  }
}

Fixed version (ground truth):
@Override public void startAccessPoint(WifiConfiguration wifiConfig,String wlanIface){
  mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL,TAG);
  try {
    if (wifiConfig == null) {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface);
    }
 else {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface,wifiConfig.SSID,"String_Node_Str",Integer.toString(wifiConfig.apChannel),getSecurityType(wifiConfig),new SensitiveArg(wifiConfig.preSharedKey));
    }
    mConnector.execute("String_Node_Str","String_Node_Str");
  }
 catch (  NativeDaemonConnectorException e) {
    throw e.rethrowAsParcelableException();
  }
}
Program: 194406
Project: 194406
Buggy source:
@Override public void startAccessPoint(WifiConfiguration wifiConfig,String wlanIface){
  mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL,TAG);
  try {
    wifiFirmwareReload(wlanIface,"String_Node_Str");
    if (wifiConfig == null) {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface);
    }
 else {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface,wifiConfig.SSID,"String_Node_Str",Integer.toString(wifiConfig.apChannel),getSecurityType(wifiConfig),new SensitiveArg(wifiConfig.preSharedKey));
    }
    mConnector.execute("String_Node_Str","String_Node_Str");
  }
 catch (  NativeDaemonConnectorException e) {
    throw e.rethrowAsParcelableException();
  }
}

Fixed version (ground truth):
@Override public void startAccessPoint(WifiConfiguration wifiConfig,String wlanIface){
  mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL,TAG);
  try {
    if (wifiConfig == null) {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface);
    }
 else {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface,wifiConfig.SSID,"String_Node_Str",Integer.toString(wifiConfig.apChannel),getSecurityType(wifiConfig),new SensitiveArg(wifiConfig.preSharedKey));
    }
    mConnector.execute("String_Node_Str","String_Node_Str");
  }
 catch (  NativeDaemonConnectorException e) {
    throw e.rethrowAsParcelableException();
  }
}
Program: 194407
Project: 194407
Buggy source:
@Override public void startAccessPoint(WifiConfiguration wifiConfig,String wlanIface){
  mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL,TAG);
  try {
    wifiFirmwareReload(wlanIface,"String_Node_Str");
    if (wifiConfig == null) {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface);
    }
 else {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface,wifiConfig.SSID,"String_Node_Str",Integer.toString(wifiConfig.apChannel),getSecurityType(wifiConfig),new SensitiveArg(wifiConfig.preSharedKey));
    }
    mConnector.execute("String_Node_Str","String_Node_Str");
  }
 catch (  NativeDaemonConnectorException e) {
    throw e.rethrowAsParcelableException();
  }
}

Fixed version (ground truth):
@Override public void startAccessPoint(WifiConfiguration wifiConfig,String wlanIface){
  mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL,TAG);
  try {
    if (wifiConfig == null) {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface);
    }
 else {
      mConnector.execute("String_Node_Str","String_Node_Str",wlanIface,wifiConfig.SSID,"String_Node_Str",Integer.toString(wifiConfig.apChannel),getSecurityType(wifiConfig),new SensitiveArg(wifiConfig.preSharedKey));
    }
    mConnector.execute("String_Node_Str","String_Node_Str");
  }
 catch (  NativeDaemonConnectorException e) {
    throw e.rethrowAsParcelableException();
  }
}
Program: 194408
Project: 194408
Buggy source:
private void onViewAddedInternal(View child){
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}

Fixed version (ground truth):
private void onViewAddedInternal(View child){
  updateHideSensitiveForChild(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}
Program: 194410
Project: 194410
Buggy source:
private void onViewAddedInternal(View child){
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}

Fixed version (ground truth):
private void onViewAddedInternal(View child){
  updateHideSensitiveForChild(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}
Program: 194411
Project: 194411
Buggy source:
private void onViewAddedInternal(View child){
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}

Fixed version (ground truth):
private void onViewAddedInternal(View child){
  updateHideSensitiveForChild(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}
Program: 194412
Project: 194412
Buggy source:
private void onViewAddedInternal(View child){
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}

Fixed version (ground truth):
private void onViewAddedInternal(View child){
  updateHideSensitiveForChild(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}
Program: 194413
Project: 194413
Buggy source:
private void onViewAddedInternal(View child){
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}

Fixed version (ground truth):
private void onViewAddedInternal(View child){
  updateHideSensitiveForChild(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}
Program: 194415
Project: 194415
Buggy source:
private void onViewAddedInternal(View child){
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}

Fixed version (ground truth):
private void onViewAddedInternal(View child){
  updateHideSensitiveForChild(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}
Program: 194418
Project: 194418
Buggy source:
private void onViewAddedInternal(View child){
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}

Fixed version (ground truth):
private void onViewAddedInternal(View child){
  updateHideSensitiveForChild(child);
  mStackScrollAlgorithm.notifyChildrenChanged(this);
  ((ExpandableView)child).setOnHeightChangedListener(this);
  generateAddAnimation(child,false);
  updateAnimationState(child);
  if (canChildBeDismissed(child)) {
    mDismissView.showClearButton();
  }
}
Program: 194422
Project: 194422
Buggy source:
/** 
 * Set indents. Arguments are arrays holding an indent amount, one per line, measured in pixels. For lines past the last element in the array, the last element repeats.
 * @param leftIndents array of indent values for left margin, in pixels
 * @param rightIndents array of indent values for right margin, in pixels
 * @return this builder, useful for chaining
 * @see android.widget.TextView#setIndents
 */
public Builder setIndents(int[] leftIndents,int[] rightIndents){
  int leftLen=leftIndents == null ? 0 : leftIndents.length;
  int rightLen=rightIndents == null ? 0 : rightIndents.length;
  int[] indents=new int[Math.max(leftLen,rightLen)];
  for (int i=0; i < indents.length; i++) {
    int leftMargin=i < leftLen ? leftIndents[i] : 0;
    int rightMargin=i < rightLen ? rightIndents[i] : 0;
    indents[i]=leftMargin + rightMargin;
  }
  nSetIndents(mNativePtr,indents);
  return this;
}

Fixed version (ground truth):
/** 
 * Set indents. Arguments are arrays holding an indent amount, one per line, measured in pixels. For lines past the last element in the array, the last element repeats.
 * @param leftIndents array of indent values for left margin, in pixels
 * @param rightIndents array of indent values for right margin, in pixels
 * @return this builder, useful for chaining
 */
public Builder setIndents(int[] leftIndents,int[] rightIndents){
  mLeftIndents=leftIndents;
  mRightIndents=rightIndents;
  int leftLen=leftIndents == null ? 0 : leftIndents.length;
  int rightLen=rightIndents == null ? 0 : rightIndents.length;
  int[] indents=new int[Math.max(leftLen,rightLen)];
  for (int i=0; i < indents.length; i++) {
    int leftMargin=i < leftLen ? leftIndents[i] : 0;
    int rightMargin=i < rightLen ? rightIndents[i] : 0;
    indents[i]=leftMargin + rightMargin;
  }
  nSetIndents(mNativePtr,indents);
  return this;
}
Program: 194423
Project: 194423
Buggy source:
private static void recycle(Builder b){
  b.mPaint=null;
  b.mText=null;
  MeasuredText.recycle(b.mMeasuredText);
  b.mMeasuredText=null;
  nFinishBuilder(b.mNativePtr);
  sPool.release(b);
}

Fixed version (ground truth):
private static void recycle(Builder b){
  b.mPaint=null;
  b.mText=null;
  MeasuredText.recycle(b.mMeasuredText);
  b.mMeasuredText=null;
  b.mLeftIndents=null;
  b.mRightIndents=null;
  nFinishBuilder(b.mNativePtr);
  sPool.release(b);
}
Program: 194425
Project: 194425
Buggy source:
private StaticLayout(Builder b){
  super((b.mEllipsize == null) ? b.mText : (b.mText instanceof Spanned) ? new SpannedEllipsizer(b.mText) : new Ellipsizer(b.mText),b.mPaint,b.mWidth,b.mAlignment,b.mSpacingMult,b.mSpacingAdd);
  if (b.mEllipsize != null) {
    Ellipsizer e=(Ellipsizer)getText();
    e.mLayout=this;
    e.mWidth=b.mEllipsizedWidth;
    e.mMethod=b.mEllipsize;
    mEllipsizedWidth=b.mEllipsizedWidth;
    mColumns=COLUMNS_ELLIPSIZE;
  }
 else {
    mColumns=COLUMNS_NORMAL;
    mEllipsizedWidth=b.mWidth;
  }
  mLineDirections=ArrayUtils.newUnpaddedArray(Directions.class,2 * mColumns);
  mLines=new int[mLineDirections.length];
  mMaximumVisibleLineCount=b.mMaxLines;
  generate(b,b.mIncludePad,b.mIncludePad);
}

Fixed version (ground truth):
private StaticLayout(Builder b){
  super((b.mEllipsize == null) ? b.mText : (b.mText instanceof Spanned) ? new SpannedEllipsizer(b.mText) : new Ellipsizer(b.mText),b.mPaint,b.mWidth,b.mAlignment,b.mSpacingMult,b.mSpacingAdd);
  if (b.mEllipsize != null) {
    Ellipsizer e=(Ellipsizer)getText();
    e.mLayout=this;
    e.mWidth=b.mEllipsizedWidth;
    e.mMethod=b.mEllipsize;
    mEllipsizedWidth=b.mEllipsizedWidth;
    mColumns=COLUMNS_ELLIPSIZE;
  }
 else {
    mColumns=COLUMNS_NORMAL;
    mEllipsizedWidth=b.mWidth;
  }
  mLineDirections=ArrayUtils.newUnpaddedArray(Directions.class,2 * mColumns);
  mLines=new int[mLineDirections.length];
  mMaximumVisibleLineCount=b.mMaxLines;
  mLeftIndents=b.mLeftIndents;
  mRightIndents=b.mRightIndents;
  generate(b,b.mIncludePad,b.mIncludePad);
}
Program: 194428
Project: 194428
Buggy source:
/** 
 * Set indents. Arguments are arrays holding an indent amount, one per line, measured in pixels. For lines past the last element in the array, the last element repeats.
 * @param leftIndents array of indent values for left margin, in pixels
 * @param rightIndents array of indent values for right margin, in pixels
 * @return this builder, useful for chaining
 * @see android.widget.TextView#setIndents
 */
public Builder setIndents(int[] leftIndents,int[] rightIndents){
  int leftLen=leftIndents == null ? 0 : leftIndents.length;
  int rightLen=rightIndents == null ? 0 : rightIndents.length;
  int[] indents=new int[Math.max(leftLen,rightLen)];
  for (int i=0; i < indents.length; i++) {
    int leftMargin=i < leftLen ? leftIndents[i] : 0;
    int rightMargin=i < rightLen ? rightIndents[i] : 0;
    indents[i]=leftMargin + rightMargin;
  }
  nSetIndents(mNativePtr,indents);
  return this;
}

Fixed version (ground truth):
/** 
 * Set indents. Arguments are arrays holding an indent amount, one per line, measured in pixels. For lines past the last element in the array, the last element repeats.
 * @param leftIndents array of indent values for left margin, in pixels
 * @param rightIndents array of indent values for right margin, in pixels
 * @return this builder, useful for chaining
 */
public Builder setIndents(int[] leftIndents,int[] rightIndents){
  mLeftIndents=leftIndents;
  mRightIndents=rightIndents;
  int leftLen=leftIndents == null ? 0 : leftIndents.length;
  int rightLen=rightIndents == null ? 0 : rightIndents.length;
  int[] indents=new int[Math.max(leftLen,rightLen)];
  for (int i=0; i < indents.length; i++) {
    int leftMargin=i < leftLen ? leftIndents[i] : 0;
    int rightMargin=i < rightLen ? rightIndents[i] : 0;
    indents[i]=leftMargin + rightMargin;
  }
  nSetIndents(mNativePtr,indents);
  return this;
}
Program: 194429
Project: 194429
Buggy source:
private static void recycle(Builder b){
  b.mPaint=null;
  b.mText=null;
  MeasuredText.recycle(b.mMeasuredText);
  b.mMeasuredText=null;
  nFinishBuilder(b.mNativePtr);
  sPool.release(b);
}

Fixed version (ground truth):
private static void recycle(Builder b){
  b.mPaint=null;
  b.mText=null;
  MeasuredText.recycle(b.mMeasuredText);
  b.mMeasuredText=null;
  b.mLeftIndents=null;
  b.mRightIndents=null;
  nFinishBuilder(b.mNativePtr);
  sPool.release(b);
}
Program: 194431
Project: 194431
Buggy source:
private StaticLayout(Builder b){
  super((b.mEllipsize == null) ? b.mText : (b.mText instanceof Spanned) ? new SpannedEllipsizer(b.mText) : new Ellipsizer(b.mText),b.mPaint,b.mWidth,b.mAlignment,b.mSpacingMult,b.mSpacingAdd);
  if (b.mEllipsize != null) {
    Ellipsizer e=(Ellipsizer)getText();
    e.mLayout=this;
    e.mWidth=b.mEllipsizedWidth;
    e.mMethod=b.mEllipsize;
    mEllipsizedWidth=b.mEllipsizedWidth;
    mColumns=COLUMNS_ELLIPSIZE;
  }
 else {
    mColumns=COLUMNS_NORMAL;
    mEllipsizedWidth=b.mWidth;
  }
  mLineDirections=ArrayUtils.newUnpaddedArray(Directions.class,2 * mColumns);
  mLines=new int[mLineDirections.length];
  mMaximumVisibleLineCount=b.mMaxLines;
  generate(b,b.mIncludePad,b.mIncludePad);
}

Fixed version (ground truth):
private StaticLayout(Builder b){
  super((b.mEllipsize == null) ? b.mText : (b.mText instanceof Spanned) ? new SpannedEllipsizer(b.mText) : new Ellipsizer(b.mText),b.mPaint,b.mWidth,b.mAlignment,b.mSpacingMult,b.mSpacingAdd);
  if (b.mEllipsize != null) {
    Ellipsizer e=(Ellipsizer)getText();
    e.mLayout=this;
    e.mWidth=b.mEllipsizedWidth;
    e.mMethod=b.mEllipsize;
    mEllipsizedWidth=b.mEllipsizedWidth;
    mColumns=COLUMNS_ELLIPSIZE;
  }
 else {
    mColumns=COLUMNS_NORMAL;
    mEllipsizedWidth=b.mWidth;
  }
  mLineDirections=ArrayUtils.newUnpaddedArray(Directions.class,2 * mColumns);
  mLines=new int[mLineDirections.length];
  mMaximumVisibleLineCount=b.mMaxLines;
  mLeftIndents=b.mLeftIndents;
  mRightIndents=b.mRightIndents;
  generate(b,b.mIncludePad,b.mIncludePad);
}
Program: 194434
Project: 194434
Buggy source:
/** 
 * Set indents. Arguments are arrays holding an indent amount, one per line, measured in pixels. For lines past the last element in the array, the last element repeats.
 * @param leftIndents array of indent values for left margin, in pixels
 * @param rightIndents array of indent values for right margin, in pixels
 * @return this builder, useful for chaining
 * @see android.widget.TextView#setIndents
 */
public Builder setIndents(int[] leftIndents,int[] rightIndents){
  int leftLen=leftIndents == null ? 0 : leftIndents.length;
  int rightLen=rightIndents == null ? 0 : rightIndents.length;
  int[] indents=new int[Math.max(leftLen,rightLen)];
  for (int i=0; i < indents.length; i++) {
    int leftMargin=i < leftLen ? leftIndents[i] : 0;
    int rightMargin=i < rightLen ? rightIndents[i] : 0;
    indents[i]=leftMargin + rightMargin;
  }
  nSetIndents(mNativePtr,indents);
  return this;
}

Fixed version (ground truth):
/** 
 * Set indents. Arguments are arrays holding an indent amount, one per line, measured in pixels. For lines past the last element in the array, the last element repeats.
 * @param leftIndents array of indent values for left margin, in pixels
 * @param rightIndents array of indent values for right margin, in pixels
 * @return this builder, useful for chaining
 */
public Builder setIndents(int[] leftIndents,int[] rightIndents){
  mLeftIndents=leftIndents;
  mRightIndents=rightIndents;
  int leftLen=leftIndents == null ? 0 : leftIndents.length;
  int rightLen=rightIndents == null ? 0 : rightIndents.length;
  int[] indents=new int[Math.max(leftLen,rightLen)];
  for (int i=0; i < indents.length; i++) {
    int leftMargin=i < leftLen ? leftIndents[i] : 0;
    int rightMargin=i < rightLen ? rightIndents[i] : 0;
    indents[i]=leftMargin + rightMargin;
  }
  nSetIndents(mNativePtr,indents);
  return this;
}
Program: 194435
Project: 194435
Buggy source:
private static void recycle(Builder b){
  b.mPaint=null;
  b.mText=null;
  MeasuredText.recycle(b.mMeasuredText);
  b.mMeasuredText=null;
  nFinishBuilder(b.mNativePtr);
  sPool.release(b);
}

Fixed version (ground truth):
private static void recycle(Builder b){
  b.mPaint=null;
  b.mText=null;
  MeasuredText.recycle(b.mMeasuredText);
  b.mMeasuredText=null;
  b.mLeftIndents=null;
  b.mRightIndents=null;
  nFinishBuilder(b.mNativePtr);
  sPool.release(b);
}
Program: 194437
Project: 194437
Buggy source:
private StaticLayout(Builder b){
  super((b.mEllipsize == null) ? b.mText : (b.mText instanceof Spanned) ? new SpannedEllipsizer(b.mText) : new Ellipsizer(b.mText),b.mPaint,b.mWidth,b.mAlignment,b.mSpacingMult,b.mSpacingAdd);
  if (b.mEllipsize != null) {
    Ellipsizer e=(Ellipsizer)getText();
    e.mLayout=this;
    e.mWidth=b.mEllipsizedWidth;
    e.mMethod=b.mEllipsize;
    mEllipsizedWidth=b.mEllipsizedWidth;
    mColumns=COLUMNS_ELLIPSIZE;
  }
 else {
    mColumns=COLUMNS_NORMAL;
    mEllipsizedWidth=b.mWidth;
  }
  mLineDirections=ArrayUtils.newUnpaddedArray(Directions.class,2 * mColumns);
  mLines=new int[mLineDirections.length];
  mMaximumVisibleLineCount=b.mMaxLines;
  generate(b,b.mIncludePad,b.mIncludePad);
}

Fixed version (ground truth):
private StaticLayout(Builder b){
  super((b.mEllipsize == null) ? b.mText : (b.mText instanceof Spanned) ? new SpannedEllipsizer(b.mText) : new Ellipsizer(b.mText),b.mPaint,b.mWidth,b.mAlignment,b.mSpacingMult,b.mSpacingAdd);
  if (b.mEllipsize != null) {
    Ellipsizer e=(Ellipsizer)getText();
    e.mLayout=this;
    e.mWidth=b.mEllipsizedWidth;
    e.mMethod=b.mEllipsize;
    mEllipsizedWidth=b.mEllipsizedWidth;
    mColumns=COLUMNS_ELLIPSIZE;
  }
 else {
    mColumns=COLUMNS_NORMAL;
    mEllipsizedWidth=b.mWidth;
  }
  mLineDirections=ArrayUtils.newUnpaddedArray(Directions.class,2 * mColumns);
  mLines=new int[mLineDirections.length];
  mMaximumVisibleLineCount=b.mMaxLines;
  mLeftIndents=b.mLeftIndents;
  mRightIndents=b.mRightIndents;
  generate(b,b.mIncludePad,b.mIncludePad);
}
Program: 194439
Project: 194439
Buggy source:
@Override public void calculateApp(BatterySipper app,BatteryStats.Uid u,long rawUptimeUs,long rawRealtimeUs,int statsType){
  long wakeLockTimeUs=0;
  final ArrayMap<String,? extends BatteryStats.Uid.Wakelock> wakelockStats=u.getWakelockStats();
  final int wakelockStatsCount=wakelockStats.size();
  for (int i=0; i < wakelockStatsCount; i++) {
    final BatteryStats.Uid.Wakelock wakelock=wakelockStats.valueAt(i);
    BatteryStats.Timer timer=wakelock.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL);
    if (timer != null) {
      wakeLockTimeUs+=timer.getTotalTimeLocked(rawRealtimeUs,statsType);
    }
  }
  app.wakeLockTimeMs=wakeLockTimeUs / 1000;
  mTotalAppWakelockTimeMs+=app.wakeLockTimeMs;
  app.wakeLockPowerMah=(app.wakeLockTimeMs * mPowerWakelock) / (1000 * 60 * 60);
  if (DEBUG && app.wakeLockPowerMah != 0) {
    Log.d(TAG,"String_Node_Str" + u.getUid() + "String_Node_Str"+ app.wakeLockTimeMs+ "String_Node_Str"+ BatteryStatsHelper.makemAh(app.wakeLockPowerMah));
  }
}

Fixed version (ground truth):
@Override public void calculateApp(BatterySipper app,BatteryStats.Uid u,long rawRealtimeUs,long rawUptimeUs,int statsType){
  long wakeLockTimeUs=0;
  final ArrayMap<String,? extends BatteryStats.Uid.Wakelock> wakelockStats=u.getWakelockStats();
  final int wakelockStatsCount=wakelockStats.size();
  for (int i=0; i < wakelockStatsCount; i++) {
    final BatteryStats.Uid.Wakelock wakelock=wakelockStats.valueAt(i);
    BatteryStats.Timer timer=wakelock.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL);
    if (timer != null) {
      wakeLockTimeUs+=timer.getTotalTimeLocked(rawRealtimeUs,statsType);
    }
  }
  app.wakeLockTimeMs=wakeLockTimeUs / 1000;
  mTotalAppWakelockTimeMs+=app.wakeLockTimeMs;
  app.wakeLockPowerMah=(app.wakeLockTimeMs * mPowerWakelock) / (1000 * 60 * 60);
  if (DEBUG && app.wakeLockPowerMah != 0) {
    Log.d(TAG,"String_Node_Str" + u.getUid() + "String_Node_Str"+ app.wakeLockTimeMs+ "String_Node_Str"+ BatteryStatsHelper.makemAh(app.wakeLockPowerMah));
  }
}