nus-yam/ex-repair huggingface dataset:
Program: 193548
Project: 193548
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  if (Intent.ACTION_BATTERY_CHANGED.equals(intent.getAction())) {
    int plugged=intent.getIntExtra("String_Node_Str",0);
    updateChargingLocked(plugged != 0);
  }
 else   if (ACTION_STEP_IDLE_STATE.equals(intent.getAction())) {
synchronized (DeviceIdleController.this) {
      stepIdleStateLocked();
    }
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  if (Intent.ACTION_BATTERY_CHANGED.equals(intent.getAction())) {
    int plugged=intent.getIntExtra("String_Node_Str",0);
    updateChargingLocked(plugged != 0);
  }
 else   if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
    if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING,false)) {
      Uri data=intent.getData();
      String ssp;
      if (data != null && (ssp=data.getSchemeSpecificPart()) != null) {
        removePowerSaveWhitelistAppInternal(ssp);
      }
    }
  }
 else   if (ACTION_STEP_IDLE_STATE.equals(intent.getAction())) {
synchronized (DeviceIdleController.this) {
      stepIdleStateLocked();
    }
  }
}
Program: 193550
Project: 193550
Buggy source:
public boolean addPowerSaveWhitelistAppInternal(String name){
synchronized (this) {
    try {
      ApplicationInfo ai=getContext().getPackageManager().getApplicationInfo(name,0);
      if (mPowerSaveWhitelistUserApps.put(name,UserHandle.getAppId(ai.uid)) == null) {
        reportPowerSaveWhitelistChangedLocked();
        updateWhitelistAppIdsLocked();
        writeConfigFileLocked();
      }
      return true;
    }
 catch (    PackageManager.NameNotFoundException e) {
      return false;
    }
  }
}

Fixed version (ground truth):
public boolean addPowerSaveWhitelistAppInternal(String name){
synchronized (this) {
    try {
      ApplicationInfo ai=getContext().getPackageManager().getApplicationInfo(name,PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS);
      if (mPowerSaveWhitelistUserApps.put(name,UserHandle.getAppId(ai.uid)) == null) {
        reportPowerSaveWhitelistChangedLocked();
        updateWhitelistAppIdsLocked();
        writeConfigFileLocked();
      }
      return true;
    }
 catch (    PackageManager.NameNotFoundException e) {
      return false;
    }
  }
}
Program: 193552
Project: 193552
Buggy source:
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}

Fixed version (ground truth):
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        postParoleEndTimeout();
      }
 else {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}
Program: 193553
Project: 193553
Buggy source:
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
        postParoleEndTimeout();
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}
Program: 193554
Project: 193554
Buggy source:
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      postNextParoleTimeout();
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}

Fixed version (ground truth):
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}
Program: 193555
Project: 193555
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  if (Intent.ACTION_BATTERY_CHANGED.equals(intent.getAction())) {
    int plugged=intent.getIntExtra("String_Node_Str",0);
    updateChargingLocked(plugged != 0);
  }
 else   if (ACTION_STEP_IDLE_STATE.equals(intent.getAction())) {
synchronized (DeviceIdleController.this) {
      stepIdleStateLocked();
    }
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  if (Intent.ACTION_BATTERY_CHANGED.equals(intent.getAction())) {
    int plugged=intent.getIntExtra("String_Node_Str",0);
    updateChargingLocked(plugged != 0);
  }
 else   if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
    if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING,false)) {
      Uri data=intent.getData();
      String ssp;
      if (data != null && (ssp=data.getSchemeSpecificPart()) != null) {
        removePowerSaveWhitelistAppInternal(ssp);
      }
    }
  }
 else   if (ACTION_STEP_IDLE_STATE.equals(intent.getAction())) {
synchronized (DeviceIdleController.this) {
      stepIdleStateLocked();
    }
  }
}
Program: 193557
Project: 193557
Buggy source:
public boolean addPowerSaveWhitelistAppInternal(String name){
synchronized (this) {
    try {
      ApplicationInfo ai=getContext().getPackageManager().getApplicationInfo(name,0);
      if (mPowerSaveWhitelistUserApps.put(name,UserHandle.getAppId(ai.uid)) == null) {
        reportPowerSaveWhitelistChangedLocked();
        updateWhitelistAppIdsLocked();
        writeConfigFileLocked();
      }
      return true;
    }
 catch (    PackageManager.NameNotFoundException e) {
      return false;
    }
  }
}

Fixed version (ground truth):
public boolean addPowerSaveWhitelistAppInternal(String name){
synchronized (this) {
    try {
      ApplicationInfo ai=getContext().getPackageManager().getApplicationInfo(name,PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS);
      if (mPowerSaveWhitelistUserApps.put(name,UserHandle.getAppId(ai.uid)) == null) {
        reportPowerSaveWhitelistChangedLocked();
        updateWhitelistAppIdsLocked();
        writeConfigFileLocked();
      }
      return true;
    }
 catch (    PackageManager.NameNotFoundException e) {
      return false;
    }
  }
}
Program: 193559
Project: 193559
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  if (Intent.ACTION_BATTERY_CHANGED.equals(intent.getAction())) {
    int plugged=intent.getIntExtra("String_Node_Str",0);
    updateChargingLocked(plugged != 0);
  }
 else   if (ACTION_STEP_IDLE_STATE.equals(intent.getAction())) {
synchronized (DeviceIdleController.this) {
      stepIdleStateLocked();
    }
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  if (Intent.ACTION_BATTERY_CHANGED.equals(intent.getAction())) {
    int plugged=intent.getIntExtra("String_Node_Str",0);
    updateChargingLocked(plugged != 0);
  }
 else   if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
    if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING,false)) {
      Uri data=intent.getData();
      String ssp;
      if (data != null && (ssp=data.getSchemeSpecificPart()) != null) {
        removePowerSaveWhitelistAppInternal(ssp);
      }
    }
  }
 else   if (ACTION_STEP_IDLE_STATE.equals(intent.getAction())) {
synchronized (DeviceIdleController.this) {
      stepIdleStateLocked();
    }
  }
}
Program: 193561
Project: 193561
Buggy source:
public boolean addPowerSaveWhitelistAppInternal(String name){
synchronized (this) {
    try {
      ApplicationInfo ai=getContext().getPackageManager().getApplicationInfo(name,0);
      if (mPowerSaveWhitelistUserApps.put(name,UserHandle.getAppId(ai.uid)) == null) {
        reportPowerSaveWhitelistChangedLocked();
        updateWhitelistAppIdsLocked();
        writeConfigFileLocked();
      }
      return true;
    }
 catch (    PackageManager.NameNotFoundException e) {
      return false;
    }
  }
}

Fixed version (ground truth):
public boolean addPowerSaveWhitelistAppInternal(String name){
synchronized (this) {
    try {
      ApplicationInfo ai=getContext().getPackageManager().getApplicationInfo(name,PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS);
      if (mPowerSaveWhitelistUserApps.put(name,UserHandle.getAppId(ai.uid)) == null) {
        reportPowerSaveWhitelistChangedLocked();
        updateWhitelistAppIdsLocked();
        writeConfigFileLocked();
      }
      return true;
    }
 catch (    PackageManager.NameNotFoundException e) {
      return false;
    }
  }
}
Program: 193563
Project: 193563
Buggy source:
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}

Fixed version (ground truth):
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        postParoleEndTimeout();
      }
 else {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}
Program: 193564
Project: 193564
Buggy source:
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
        postParoleEndTimeout();
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}
Program: 193565
Project: 193565
Buggy source:
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      postNextParoleTimeout();
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}

Fixed version (ground truth):
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}
Program: 193566
Project: 193566
Buggy source:
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}

Fixed version (ground truth):
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        postParoleEndTimeout();
      }
 else {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}
Program: 193567
Project: 193567
Buggy source:
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
        postParoleEndTimeout();
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}
Program: 193568
Project: 193568
Buggy source:
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      postNextParoleTimeout();
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}

Fixed version (ground truth):
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}
Program: 193569
Project: 193569
Buggy source:
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}

Fixed version (ground truth):
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        postParoleEndTimeout();
      }
 else {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}
Program: 193570
Project: 193570
Buggy source:
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
        postParoleEndTimeout();
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}
Program: 193571
Project: 193571
Buggy source:
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      postNextParoleTimeout();
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}

Fixed version (ground truth):
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}
Program: 193572
Project: 193572
Buggy source:
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}

Fixed version (ground truth):
/** 
 * Paroled here means temporary pardon from being inactive 
 */
void setAppIdleParoled(boolean paroled){
synchronized (mLock) {
    if (mAppIdleParoled != paroled) {
      mAppIdleParoled=paroled;
      if (DEBUG)       Slog.d(TAG,"String_Node_Str" + mAppIdleParoled);
      if (paroled) {
        postParoleEndTimeout();
      }
 else {
        mLastAppIdleParoledTime=checkAndGetTimeLocked();
        postNextParoleTimeout();
      }
      postParoleStateChanged();
    }
  }
}
Program: 193573
Project: 193573
Buggy source:
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
        postParoleEndTimeout();
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Check if it's been a while since last parole and let idle apps do some work 
 */
void checkParoleTimeout(){
synchronized (mLock) {
    if (!mAppIdleParoled) {
      final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
      if (timeSinceLastParole > mAppIdleParoleIntervalMillis) {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        setAppIdleParoled(true);
      }
 else {
        if (DEBUG)         Slog.d(TAG,"String_Node_Str");
        postNextParoleTimeout();
      }
    }
  }
}
Program: 193574
Project: 193574
Buggy source:
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      postNextParoleTimeout();
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}

Fixed version (ground truth):
void onDeviceIdleModeChanged(){
  final boolean deviceIdle=mPowerManager.isDeviceIdleMode();
  if (DEBUG)   Slog.i(TAG,"String_Node_Str" + deviceIdle);
synchronized (mLock) {
    final long timeSinceLastParole=checkAndGetTimeLocked() - mLastAppIdleParoledTime;
    if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(true);
    }
 else     if (deviceIdle) {
      if (DEBUG)       Slog.i(TAG,"String_Node_Str");
      setAppIdleParoled(false);
    }
  }
}
Program: 193575
Project: 193575
Buggy source:
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service);
  }
 catch (  PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}

Fixed version (ground truth):
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service,mUser);
  }
 catch (  RemoteException|PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service,e);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}
Program: 193576
Project: 193576
Buggy source:
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}

Fixed version (ground truth):
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mUser);
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().applicationInfo.dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.print("String_Node_Str");
  pw.println(mInfo.getRecognitionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsAssist());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsLaunchFromKeyguard());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}
Program: 193577
Project: 193577
Buggy source:
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service);
  }
 catch (  PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}

Fixed version (ground truth):
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service,mUser);
  }
 catch (  RemoteException|PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service,e);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}
Program: 193578
Project: 193578
Buggy source:
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}

Fixed version (ground truth):
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mUser);
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().applicationInfo.dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.print("String_Node_Str");
  pw.println(mInfo.getRecognitionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsAssist());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsLaunchFromKeyguard());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}
Program: 193579
Project: 193579
Buggy source:
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service);
  }
 catch (  PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}

Fixed version (ground truth):
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service,mUser);
  }
 catch (  RemoteException|PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service,e);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}
Program: 193580
Project: 193580
Buggy source:
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}

Fixed version (ground truth):
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mUser);
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().applicationInfo.dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.print("String_Node_Str");
  pw.println(mInfo.getRecognitionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsAssist());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsLaunchFromKeyguard());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}
Program: 193582
Project: 193582
Buggy source:
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service);
  }
 catch (  PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}

Fixed version (ground truth):
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service,mUser);
  }
 catch (  RemoteException|PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service,e);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}
Program: 193583
Project: 193583
Buggy source:
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}

Fixed version (ground truth):
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mUser);
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().applicationInfo.dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.print("String_Node_Str");
  pw.println(mInfo.getRecognitionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsAssist());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsLaunchFromKeyguard());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}
Program: 193584
Project: 193584
Buggy source:
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service);
  }
 catch (  PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}

Fixed version (ground truth):
VoiceInteractionManagerServiceImpl(Context context,Handler handler,Object lock,int userHandle,ComponentName service){
  mContext=context;
  mHandler=handler;
  mLock=lock;
  mUser=userHandle;
  mComponent=service;
  mAm=ActivityManagerNative.getDefault();
  VoiceInteractionServiceInfo info;
  try {
    info=new VoiceInteractionServiceInfo(context.getPackageManager(),service,mUser);
  }
 catch (  RemoteException|PackageManager.NameNotFoundException e) {
    Slog.w(TAG,"String_Node_Str" + service,e);
    mInfo=null;
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mInfo=info;
  if (mInfo.getParseError() != null) {
    Slog.w(TAG,"String_Node_Str" + mInfo.getParseError());
    mSessionComponentName=null;
    mIWindowManager=null;
    mValid=false;
    return;
  }
  mValid=true;
  mSessionComponentName=new ComponentName(service.getPackageName(),mInfo.getSessionService());
  mIWindowManager=IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
  mContext.registerReceiver(mBroadcastReceiver,filter,null,handler);
}
Program: 193585
Project: 193585
Buggy source:
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}

Fixed version (ground truth):
public void dumpLocked(FileDescriptor fd,PrintWriter pw,String[] args){
  if (!mValid) {
    pw.print("String_Node_Str");
    if (mInfo == null) {
      pw.println("String_Node_Str");
    }
 else {
      pw.println(mInfo.getParseError());
    }
    return;
  }
  pw.print("String_Node_Str");
  pw.println(mUser);
  pw.print("String_Node_Str");
  pw.println(mComponent.flattenToShortString());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSessionService());
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.println("String_Node_Str");
  mInfo.getServiceInfo().applicationInfo.dump(new PrintWriterPrinter(pw),"String_Node_Str");
  pw.print("String_Node_Str");
  pw.println(mInfo.getRecognitionService());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSettingsActivity());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsAssist());
  pw.print("String_Node_Str");
  pw.println(mInfo.getSupportsLaunchFromKeyguard());
  if (mDisabledShowContext != 0) {
    pw.print("String_Node_Str");
    pw.println(Integer.toHexString(mDisabledShowContext));
  }
  pw.print("String_Node_Str");
  pw.print(mBound);
  pw.print("String_Node_Str");
  pw.println(mService);
  if (mActiveSession != null) {
    pw.println("String_Node_Str");
    mActiveSession.dump("String_Node_Str",pw);
  }
}