nus-yam/ex-repair huggingface dataset:
Program: 43313
Project: 43313
Buggy source:
/** 
 * Unlocks Wifi Multicast, restoring the filter of packets not addressed specifically to this device and saving power. If this MulticastLock is reference-counted, each call to  {@code release} will decrement the reference count, and themulticast packets will only stop being received when the reference count reaches zero.  If the reference count goes below zero (that is, if  {@code release} is called a greater number of times than{@link #acquire}), an exception is thrown. If this MulticastLock is not reference-counted, the first call to  {@code release} (after the radio was multicast locked using{@linke #acquire}) will unlock the multicast, and subsequent calls will be ignored. Note that if any other Wifi Multicast Locks are still outstanding this   {@code release} call will not have an immediate effect.  Onlywhen all applications have released all their Multicast Locks will the Multicast filter be turned back on. Also note that when an app exits or crashes all of its Multicast Locks will be automatically released.
 */
public void release(){
synchronized (mBinder) {
    if (mRefCounted ? (--mRefCount == 0) : (mHeld)) {
      try {
        mService.releaseMulticastLock();
synchronized (WifiManager.this) {
          mActiveLockCount--;
        }
      }
 catch (      RemoteException ignore) {
      }
      mHeld=false;
    }
    if (mRefCount < 0) {
      throw new RuntimeException("String_Node_Str" + mTag);
    }
  }
}

Fixed version (ground truth):
/** 
 * Unlocks Wifi Multicast, restoring the filter of packets not addressed specifically to this device and saving power. If this MulticastLock is reference-counted, each call to  {@code release} will decrement the reference count, and themulticast packets will only stop being received when the reference count reaches zero.  If the reference count goes below zero (that is, if  {@code release} is called a greater number of times than{@link #acquire}), an exception is thrown. If this MulticastLock is not reference-counted, the first call to  {@code release} (after the radio was multicast locked using{@link #acquire}) will unlock the multicast, and subsequent calls will be ignored. Note that if any other Wifi Multicast Locks are still outstanding this   {@code release} call will not have an immediate effect.  Onlywhen all applications have released all their Multicast Locks will the Multicast filter be turned back on. Also note that when an app exits or crashes all of its Multicast Locks will be automatically released.
 */
public void release(){
synchronized (mBinder) {
    if (mRefCounted ? (--mRefCount == 0) : (mHeld)) {
      try {
        mService.releaseMulticastLock();
synchronized (WifiManager.this) {
          mActiveLockCount--;
        }
      }
 catch (      RemoteException ignore) {
      }
      mHeld=false;
    }
    if (mRefCount < 0) {
      throw new RuntimeException("String_Node_Str" + mTag);
    }
  }
}
Program: 43316
Project: 43316
Buggy source:
/** 
 * True if c is ISO-LATIN characters 0-9, *, # , +, WILD, WAIT, PAUSE   
 */
public final static boolean isNonSeparator(char c){
  return (c >= '0' && c <= '9') || c == '*' || c == '#' || c == '+' || c == WILD || c == WAIT || c == PAUSE;
}

Fixed version (ground truth):
private static boolean isNonSeparator(String address){
  for (int i=0, count=address.length(); i < count; i++) {
    if (!isNonSeparator(address.charAt(i))) {
      return false;
    }
  }
  return true;
}
Program: 43317
Project: 43317
Buggy source:
private static char findPOrWCharToAppend(String phoneNumber,int currPwIndex,int nextNonPwCharIndex){
  char c=phoneNumber.charAt(currPwIndex);
  char ret;
  ret=(isPause(c)) ? PhoneNumberUtils.PAUSE : PhoneNumberUtils.WAIT;
  if (isPause(c) && (nextNonPwCharIndex > (currPwIndex + 1))) {
    ret=PhoneNumberUtils.WAIT;
  }
  return ret;
}

Fixed version (ground truth):
private static char findPOrWCharToAppend(String phoneNumber,int currPwIndex,int nextNonPwCharIndex){
  char c=phoneNumber.charAt(currPwIndex);
  char ret;
  ret=(isPause(c)) ? PhoneNumberUtils.PAUSE : PhoneNumberUtils.WAIT;
  if (isPause(c) && (nextNonPwCharIndex > (currPwIndex + 2))) {
    ret=PhoneNumberUtils.WAIT;
  }
  return ret;
}
Program: 43318
Project: 43318
Buggy source:
private static int findNextPCharOrNonPOrNonWCharIndex(String phoneNumber,int currIndex){
  boolean wMatched=false;
  int index=currIndex + 1;
  int length=phoneNumber.length();
  while (index < length) {
    char cNext=phoneNumber.charAt(index);
    if (isWait(cNext)) {
      wMatched=true;
    }
    if (!isWait(cNext) && !isPause(cNext)) {
      break;
    }
    index++;
  }
  if ((index < length) && (index > (currIndex + 1)) && ((wMatched == false) && isPause(phoneNumber.charAt(currIndex)))) {
    return (currIndex + 1);
  }
  return index;
}

Fixed version (ground truth):
private static int findNextPCharOrNonPOrNonWCharIndex(String phoneNumber,int currIndex){
  boolean wMatched=isWait(phoneNumber.charAt(currIndex));
  int index=currIndex + 1;
  int length=phoneNumber.length();
  while (index < length) {
    char cNext=phoneNumber.charAt(index);
    if (isWait(cNext)) {
      wMatched=true;
    }
    if (!isWait(cNext) && !isPause(cNext)) {
      break;
    }
    index++;
  }
  if ((index < length) && (index > (currIndex + 1)) && ((wMatched == false) && isPause(phoneNumber.charAt(currIndex)))) {
    return (currIndex + 1);
  }
  return index;
}
Program: 43319
Project: 43319
Buggy source:
/** 
 * format orignal dial string 1) convert international dialing prefix "+" to string specified per region 2) handle corner cases for PAUSE/WAIT dialing: If PAUSE/WAIT sequence at the end, ignore them. If consecutive PAUSE/WAIT sequence in the middle of the string, and if there is any WAIT in PAUSE/WAIT sequence, treat them like WAIT.
 */
public static String formatDialString(String phoneNumber){
  if (phoneNumber == null) {
    return null;
  }
  int length=phoneNumber.length();
  StringBuilder ret=new StringBuilder();
  char c;
  int currIndex=0;
  while (currIndex < length) {
    c=phoneNumber.charAt(currIndex);
    if (PhoneNumberUtils.isDialable(c)) {
      if (c == '+') {
        String ps=null;
        SystemProperties.get(TelephonyProperties.PROPERTY_IDP_STRING,ps);
        if (TextUtils.isEmpty(ps)) {
          ps="String_Node_Str";
        }
        ret.append(ps);
      }
 else {
        ret.append(c);
      }
    }
 else     if (isPause(c) || isWait(c)) {
      if (currIndex < length - 1) {
        int nextIndex=findNextPCharOrNonPOrNonWCharIndex(phoneNumber,currIndex);
        if (nextIndex < length) {
          char pC=findPOrWCharToAppend(phoneNumber,currIndex,nextIndex);
          ret.append(pC);
          if (nextIndex > (currIndex + 1)) {
            currIndex=nextIndex - 1;
          }
        }
 else         if (nextIndex == length) {
          currIndex=length - 1;
        }
      }
    }
 else {
      ret.append(c);
    }
    currIndex++;
  }
  return ret.toString();
}

Fixed version (ground truth):
/** 
 * format original dial string 1) convert international dialing prefix "+" to string specified per region 2) handle corner cases for PAUSE/WAIT dialing: If PAUSE/WAIT sequence at the end, ignore them. If consecutive PAUSE/WAIT sequence in the middle of the string, and if there is any WAIT in PAUSE/WAIT sequence, treat them like WAIT.
 */
public static String formatDialString(String phoneNumber){
  if (phoneNumber == null) {
    return null;
  }
  int length=phoneNumber.length();
  StringBuilder ret=new StringBuilder();
  char c;
  int currIndex=0;
  while (currIndex < length) {
    c=phoneNumber.charAt(currIndex);
    if (isPause(c) || isWait(c)) {
      if (currIndex < length - 1) {
        int nextIndex=findNextPCharOrNonPOrNonWCharIndex(phoneNumber,currIndex);
        if (nextIndex < length) {
          char pC=findPOrWCharToAppend(phoneNumber,currIndex,nextIndex);
          ret.append(pC);
          if (nextIndex > (currIndex + 2)) {
            currIndex=nextIndex - 1;
          }
        }
 else         if (nextIndex == length) {
          currIndex=length - 1;
        }
      }
    }
 else {
      ret.append(c);
    }
    currIndex++;
  }
  return PhoneNumberUtils.cdmaCheckAndProcessPlusCode(ret.toString());
}
Program: 43322
Project: 43322
Buggy source:
/** 
 * {@link AutoCompleteTextView#onKeyPreIme(int,KeyEvent)}) dismisses the drop-down on BACK, so we must override this method to modify the BACK behavior.
 */
@Override public boolean onKeyPreIme(int keyCode,KeyEvent event){
  if (mSearchDialog.mSearchable == null) {
    return false;
  }
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
    if (mSearchDialog.backToPreviousComponent()) {
      return true;
    }
    if (isInputMethodNotNeeded() || (isEmpty() && getDropDownChildCount() >= getAdapter().getCount())) {
      mSearchDialog.cancel();
      return true;
    }
    return false;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@link AutoCompleteTextView#onKeyPreIme(int,KeyEvent)}) dismisses the drop-down on BACK, so we must override this method to modify the BACK behavior.
 */
@Override public boolean onKeyPreIme(int keyCode,KeyEvent event){
  if (mSearchDialog.mSearchable == null) {
    return false;
  }
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
    if (mSearchDialog.backToPreviousComponent()) {
      return true;
    }
    if (isInputMethodNotNeeded() || (isEmpty() && getDropDownChildCount() >= getAdapterCount())) {
      mSearchDialog.cancel();
      return true;
    }
    return false;
  }
  return false;
}
Program: 43323
Project: 43323
Buggy source:
/** 
 * Returns a Locale instance describing the language currently being used by the TTS engine.
 * @return language, country (if any) and variant (if any) used by the engine stored in a Localeinstance, or null is the TTS engine has failed.
 */
public Locale getLanguage(){
synchronized (mStartLock) {
    if (!mStarted) {
      return null;
    }
    try {
      String[] locStrings=mITts.getLanguage();
      if (locStrings.length == 3) {
        return new Locale(locStrings[0],locStrings[1],locStrings[2]);
      }
 else {
        return null;
      }
    }
 catch (    RemoteException e) {
      Log.e("String_Node_Str","String_Node_Str");
      e.printStackTrace();
      mStarted=false;
      initTts();
    }
catch (    NullPointerException e) {
      Log.e("String_Node_Str","String_Node_Str");
      e.printStackTrace();
      mStarted=false;
      initTts();
    }
catch (    IllegalStateException e) {
      Log.e("String_Node_Str","String_Node_Str");
      e.printStackTrace();
      mStarted=false;
      initTts();
    }
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Returns a Locale instance describing the language currently being used by the TTS engine.
 * @return language, country (if any) and variant (if any) used by the engine stored in a Localeinstance, or null is the TTS engine has failed.
 */
public Locale getLanguage(){
synchronized (mStartLock) {
    if (!mStarted) {
      return null;
    }
    try {
      String[] locStrings=mITts.getLanguage();
      if ((locStrings != null) && (locStrings.length == 3)) {
        return new Locale(locStrings[0],locStrings[1],locStrings[2]);
      }
 else {
        return null;
      }
    }
 catch (    RemoteException e) {
      Log.e("String_Node_Str","String_Node_Str");
      e.printStackTrace();
      mStarted=false;
      initTts();
    }
catch (    NullPointerException e) {
      Log.e("String_Node_Str","String_Node_Str");
      e.printStackTrace();
      mStarted=false;
      initTts();
    }
catch (    IllegalStateException e) {
      Log.e("String_Node_Str","String_Node_Str");
      e.printStackTrace();
      mStarted=false;
      initTts();
    }
    return null;
  }
}
Program: 43325
Project: 43325
Buggy source:
/** 
 * Stops all speech output and removes any utterances still in the queue globally.
 */
private int stopAll(String callingApp){
  int result=TextToSpeech.ERROR;
  boolean speechQueueAvailable=false;
  try {
    speechQueueAvailable=speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT,TimeUnit.MILLISECONDS);
    if (speechQueueAvailable) {
      for (int i=mSpeechQueue.size() - 1; i > -1; i--) {
        if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE) {
          mSpeechQueue.remove(i);
        }
      }
      if ((mCurrentSpeechItem != null) && ((mCurrentSpeechItem.mType != SpeechItem.TEXT_TO_FILE) || mCurrentSpeechItem.mCallingApp.equals(callingApp))) {
        result=sNativeSynth.stop();
        mKillList.put(mCurrentSpeechItem,true);
        if (mPlayer != null) {
          try {
            mPlayer.stop();
          }
 catch (          IllegalStateException e) {
          }
        }
        mIsSpeaking=false;
        mCurrentSpeechItem=null;
      }
 else {
        result=TextToSpeech.SUCCESS;
      }
      Log.i("String_Node_Str","String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    Log.e("String_Node_Str","String_Node_Str");
    e.printStackTrace();
  }
 finally {
    if (speechQueueAvailable) {
      speechQueueLock.unlock();
    }
    return result;
  }
}

Fixed version (ground truth):
/** 
 * Stops all speech output and removes any utterances still in the queue globally, except those intended to be synthesized to file.
 */
private int stopAll(String callingApp){
  int result=TextToSpeech.ERROR;
  boolean speechQueueAvailable=false;
  try {
    speechQueueAvailable=speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT,TimeUnit.MILLISECONDS);
    if (speechQueueAvailable) {
      for (int i=mSpeechQueue.size() - 1; i > -1; i--) {
        if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE) {
          mSpeechQueue.remove(i);
        }
      }
      if ((mCurrentSpeechItem != null) && ((mCurrentSpeechItem.mType != SpeechItem.TEXT_TO_FILE) || mCurrentSpeechItem.mCallingApp.equals(callingApp))) {
        try {
          result=sNativeSynth.stop();
        }
 catch (        NullPointerException e1) {
          result=TextToSpeech.ERROR;
        }
        mKillList.put(mCurrentSpeechItem,true);
        if (mPlayer != null) {
          try {
            mPlayer.stop();
          }
 catch (          IllegalStateException e) {
          }
        }
        mIsSpeaking=false;
        mCurrentSpeechItem=null;
      }
 else {
        result=TextToSpeech.SUCCESS;
      }
      Log.i("String_Node_Str","String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    Log.e("String_Node_Str","String_Node_Str");
    e.printStackTrace();
  }
 finally {
    if (speechQueueAvailable) {
      speechQueueLock.unlock();
    }
    return result;
  }
}
Program: 43326
Project: 43326
Buggy source:
@Override public void onDestroy(){
  super.onDestroy();
  cleanUpPlayer();
  sNativeSynth.shutdown();
  sNativeSynth=null;
  mCallbacks.kill();
}

Fixed version (ground truth):
@Override public void onDestroy(){
  super.onDestroy();
  stopAll("String_Node_Str");
  cleanUpPlayer();
  if (sNativeSynth != null) {
    sNativeSynth.shutdown();
  }
  sNativeSynth=null;
  mCallbacks.kill();
}
Program: 43330
Project: 43330
Buggy source:
synchronized int getSocketError(){
  for (  DaemonProxy s : mDaemonList) {
switch (getResultFromSocket(s)) {
case 0:
      return 0;
case AUTH_ERROR_CODE:
    return VpnManager.VPN_ERROR_AUTH;
case CHALLENGE_ERROR_CODE:
  return VpnManager.VPN_ERROR_CHALLENGE;
case REMOTE_HUNG_UP_ERROR_CODE:
return VpnManager.VPN_ERROR_REMOTE_HUNG_UP;
default :
return VpnManager.VPN_ERROR_CONNECTION_FAILED;
}
}
return 0;
}

Fixed version (ground truth):
synchronized int getSocketError(){
  for (  DaemonProxy s : mDaemonList) {
switch (getResultFromSocket(s)) {
case 0:
      continue;
case AUTH_ERROR_CODE:
    return VpnManager.VPN_ERROR_AUTH;
case CHALLENGE_ERROR_CODE:
  return VpnManager.VPN_ERROR_CHALLENGE;
case REMOTE_HUNG_UP_ERROR_CODE:
return VpnManager.VPN_ERROR_REMOTE_HUNG_UP;
default :
return VpnManager.VPN_ERROR_CONNECTION_FAILED;
}
}
return 0;
}
Program: 43331
Project: 43331
Buggy source:
public void setFilename(String filename){
  mFilename=filename;
}

Fixed version (ground truth):
public void setFilename(String filename){
  if (mFilename == null || !mFilename.equals(filename)) {
    mFilename=filename;
    mCachedAttributes=null;
  }
}
Program: 43332
Project: 43332
Buggy source:
/** 
 * {@link AutoCompleteTextView#onKeyPreIme(int,KeyEvent)}) dismisses the drop-down on BACK, so we must override this method to modify the BACK behavior.
 */
@Override public boolean onKeyPreIme(int keyCode,KeyEvent event){
  if (mSearchDialog.mSearchable == null) {
    return false;
  }
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
    if (mSearchDialog.backToPreviousComponent()) {
      return true;
    }
    if (isInputMethodNotNeeded() || (isEmpty() && getDropDownChildCount() >= getAdapter().getCount())) {
      mSearchDialog.cancel();
      return true;
    }
    return false;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@link AutoCompleteTextView#onKeyPreIme(int,KeyEvent)}) dismisses the drop-down on BACK, so we must override this method to modify the BACK behavior.
 */
@Override public boolean onKeyPreIme(int keyCode,KeyEvent event){
  if (mSearchDialog.mSearchable == null) {
    return false;
  }
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
    if (mSearchDialog.backToPreviousComponent()) {
      return true;
    }
    if (isInputMethodNotNeeded() || (isEmpty() && getDropDownChildCount() >= getAdapterCount())) {
      mSearchDialog.cancel();
      return true;
    }
    return false;
  }
  return false;
}
Program: 43333
Project: 43333
Buggy source:
static public Allocation createSized(RenderScript rs,Element e,int count){
  int id;
  if (e.mIsPredefined) {
    id=rs.nAllocationCreatePredefSized(e.mPredefinedID,count);
  }
 else {
    id=rs.nAllocationCreateSized(e.mID,count);
  }
  return new Allocation(id,rs);
}

Fixed version (ground truth):
static public Allocation createSized(RenderScript rs,Element e,int count) throws IllegalArgumentException {
  int id;
  if (e.mIsPredefined) {
    id=rs.nAllocationCreatePredefSized(e.mPredefinedID,count);
  }
 else {
    id=rs.nAllocationCreateSized(e.mID,count);
    if (id == 0) {
      throw new IllegalStateException("String_Node_Str");
    }
  }
  return new Allocation(id,rs);
}
Program: 43334
Project: 43334
Buggy source:
static public Allocation createTyped(RenderScript rs,Type type){
  int id=rs.nAllocationCreateTyped(type.mID);
  return new Allocation(id,rs);
}

Fixed version (ground truth):
static public Allocation createTyped(RenderScript rs,Type type) throws IllegalArgumentException {
  if (type.mID == 0) {
    throw new IllegalStateException("String_Node_Str");
  }
  int id=rs.nAllocationCreateTyped(type.mID);
  return new Allocation(id,rs);
}
Program: 43335
Project: 43335
Buggy source:
BaseObj(RenderScript rs){
  mRS=rs;
  mID=0;
}

Fixed version (ground truth):
BaseObj(RenderScript rs){
  mRS=rs;
  mID=0;
  mDestroyed=false;
}
Program: 43336
Project: 43336
Buggy source:
protected void finalize() throws Throwable {
  if (mID != 0) {
    Log.v(RenderScript.LOG_TAG,"String_Node_Str");
  }
  super.finalize();
}

Fixed version (ground truth):
protected void finalize() throws Throwable {
  if (!mDestroyed) {
    Log.v(RenderScript.LOG_TAG,"String_Node_Str");
  }
  super.finalize();
}
Program: 43337
Project: 43337
Buggy source:
public void destroy() throws IllegalStateException {
  if (mIsPredefined) {
    throw new IllegalStateException("String_Node_Str");
  }
  mRS.nElementDestroy(mID);
  mID=0;
}

Fixed version (ground truth):
public void destroy() throws IllegalStateException {
  if (mIsPredefined) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (mDestroyed) {
    throw new IllegalStateException("String_Node_Str");
  }
  mDestroyed=true;
  mRS.nElementDestroy(mID);
}
Program: 43338
Project: 43338
Buggy source:
static synchronized Element internalCreate(RenderScript rs,Builder b){
  rs.nElementBegin();
  for (int ct=0; ct < b.mEntryCount; ct++) {
    Entry en=b.mEntries[ct];
    if (en.mElement != null) {
      rs.nElementAddPredefined(en.mElement.mPredefinedID);
    }
 else {
      int norm=0;
      if (en.mIsNormalized) {
        norm=1;
      }
      rs.nElementAdd(en.mType.mID,en.mKind.mID,norm,en.mBits);
    }
  }
  int id=rs.nElementCreate();
  return new Element(id,rs);
}

Fixed version (ground truth):
static synchronized Element internalCreate(RenderScript rs,Builder b){
  rs.nElementBegin();
  for (int ct=0; ct < b.mEntryCount; ct++) {
    Entry en=b.mEntries[ct];
    if (en.mElement != null) {
      rs.nElementAddPredefined(en.mElement.mPredefinedID);
    }
 else {
      int norm=0;
      if (en.mIsNormalized) {
        norm=1;
      }
      rs.nElementAdd(en.mKind.mID,en.mType.mID,norm,en.mBits);
    }
  }
  int id=rs.nElementCreate();
  return new Element(id,rs);
}
Program: 43339
Project: 43339
Buggy source:
public void destroy(){
  mRS.nProgramFragmentStoreDestroy(mID);
  mID=0;
}

Fixed version (ground truth):
public void destroy(){
  if (mDestroyed) {
    throw new IllegalStateException("String_Node_Str");
  }
  mDestroyed=true;
  mRS.nProgramFragmentStoreDestroy(mID);
}
Program: 43340
Project: 43340
Buggy source:
public void destroy(){
  mRS.nProgramFragmentStoreDestroy(mID);
  mID=0;
}

Fixed version (ground truth):
public void destroy(){
  if (mDestroyed) {
    throw new IllegalStateException("String_Node_Str");
  }
  mDestroyed=true;
  mRS.nProgramFragmentStoreDestroy(mID);
}
Program: 43341
Project: 43341
Buggy source:
public void destroy(){
  mRS.nScriptDestroy(mID);
  mID=0;
}

Fixed version (ground truth):
public void destroy(){
  if (mDestroyed) {
    throw new IllegalStateException("String_Node_Str");
  }
  mDestroyed=true;
  mRS.nScriptDestroy(mID);
}
Program: 43342
Project: 43342
Buggy source:
private void handleExitEmergencyCallbackMode(Message msg){
  Log.d(LOG_TAG,"String_Node_Str");
  AsyncResult ar=(AsyncResult)msg.obj;
  h.removeCallbacks(mExitEcmRunnable);
  if (mECMExitRespRegistrant != null) {
    mECMExitRespRegistrant.notifyRegistrant(ar);
  }
  if (ar.exception == null) {
    if (mIsPhoneInECMState) {
      mIsPhoneInECMState=false;
      setSystemProperty(TelephonyProperties.PROPERTY_INECM_MODE,"String_Node_Str");
    }
    sendEmergencyCallbackModeChange();
  }
}

Fixed version (ground truth):
private void handleExitEmergencyCallbackMode(Message msg){
  Log.d(LOG_TAG,"String_Node_Str");
  AsyncResult ar=(AsyncResult)msg.obj;
  h.removeCallbacks(mExitEcmRunnable);
  if (mECMExitRespRegistrant != null) {
    mECMExitRespRegistrant.notifyRegistrant(ar);
  }
  if (ar.exception == null) {
    if (mIsPhoneInECMState) {
      mIsPhoneInECMState=false;
      setSystemProperty(TelephonyProperties.PROPERTY_INECM_MODE,"String_Node_Str");
    }
    sendEmergencyCallbackModeChange();
    mDataConnection.setDataEnabled(true);
  }
}
Program: 43343
Project: 43343
Buggy source:
private void removePackageDataLI(PackageParser.Package p,PackageRemovedInfo outInfo,int flags){
  String packageName=p.packageName;
  if (outInfo != null) {
    outInfo.removedPackage=packageName;
  }
  removePackageLI(p,true);
  PackageSetting deletedPs;
synchronized (mPackages) {
    deletedPs=mSettings.mPackages.get(packageName);
  }
  if ((flags & PackageManager.DONT_DELETE_DATA) == 0) {
    if (mInstaller != null) {
      int retCode=mInstaller.remove(packageName);
      if (retCode < 0) {
        Log.w(TAG,"String_Node_Str" + packageName + "String_Node_Str"+ retCode);
      }
    }
 else {
      PackageParser.Package pkg=mPackages.get(packageName);
      File dataDir=new File(pkg.applicationInfo.dataDir);
      dataDir.delete();
    }
synchronized (mPackages) {
      if (outInfo != null) {
        outInfo.removedUid=mSettings.removePackageLP(packageName);
      }
    }
  }
synchronized (mPackages) {
    if ((deletedPs != null) && (deletedPs.sharedUser != null)) {
      mSettings.updateSharedUserPerms(deletedPs);
    }
    mSettings.writeLP();
  }
}

Fixed version (ground truth):
private void removePackageDataLI(PackageParser.Package p,PackageRemovedInfo outInfo,int flags){
  String packageName=p.packageName;
  if (outInfo != null) {
    outInfo.removedPackage=packageName;
  }
  removePackageLI(p,true);
  PackageSetting deletedPs;
synchronized (mPackages) {
    deletedPs=mSettings.mPackages.get(packageName);
  }
  if ((flags & PackageManager.DONT_DELETE_DATA) == 0) {
    if (mInstaller != null) {
      int retCode=mInstaller.remove(packageName);
      if (retCode < 0) {
        Log.w(TAG,"String_Node_Str" + packageName + "String_Node_Str"+ retCode);
      }
    }
 else {
      PackageParser.Package pkg=mPackages.get(packageName);
      File dataDir=new File(pkg.applicationInfo.dataDir);
      dataDir.delete();
    }
synchronized (mPackages) {
      if (outInfo != null) {
        outInfo.removedUid=mSettings.removePackageLP(packageName);
      }
    }
  }
synchronized (mPackages) {
    if ((deletedPs != null) && (deletedPs.sharedUser != null)) {
      mSettings.updateSharedUserPermsLP(deletedPs,mGlobalGids);
    }
    mSettings.writeLP();
  }
}
Program: 43344
Project: 43344
Buggy source:
private void removeMulticasterLocked(int i,int uid){
  Multicaster removed=mMulticasters.remove(i);
  if (removed != null) {
    removed.unlinkDeathRecipient();
  }
  if (mMulticasters.size() == 0) {
    WifiNative.startPacketFiltering();
  }
  Long ident=Binder.clearCallingIdentity();
  try {
    mBatteryStats.noteWifiMulticastDisabled(uid);
  }
 catch (  RemoteException e) {
  }
 finally {
    Binder.restoreCallingIdentity(ident);
  }
}

Fixed version (ground truth):
private void removeMulticasterLocked(int i,int uid){
  Multicaster removed=mMulticasters.remove(i);
  if (removed != null) {
    removed.unlinkDeathRecipient();
  }
  if (mMulticasters.size() == 0) {
synchronized (mWifiStateTracker) {
      WifiNative.startPacketFiltering();
    }
  }
  Long ident=Binder.clearCallingIdentity();
  try {
    mBatteryStats.noteWifiMulticastDisabled(uid);
  }
 catch (  RemoteException e) {
  }
 finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 43345
Project: 43345
Buggy source:
public void acquireMulticastLock(IBinder binder,String tag){
  enforceMulticastChangePermission();
synchronized (mMulticasters) {
    mMulticastEnabled++;
    mMulticasters.add(new Multicaster(tag,binder));
    WifiNative.stopPacketFiltering();
  }
  int uid=Binder.getCallingUid();
  Long ident=Binder.clearCallingIdentity();
  try {
    mBatteryStats.noteWifiMulticastEnabled(uid);
  }
 catch (  RemoteException e) {
  }
 finally {
    Binder.restoreCallingIdentity(ident);
  }
}

Fixed version (ground truth):
public void acquireMulticastLock(IBinder binder,String tag){
  enforceMulticastChangePermission();
synchronized (mMulticasters) {
    mMulticastEnabled++;
    mMulticasters.add(new Multicaster(tag,binder));
synchronized (mWifiStateTracker) {
      WifiNative.stopPacketFiltering();
    }
  }
  int uid=Binder.getCallingUid();
  Long ident=Binder.clearCallingIdentity();
  try {
    mBatteryStats.noteWifiMulticastEnabled(uid);
  }
 catch (  RemoteException e) {
  }
 finally {
    Binder.restoreCallingIdentity(ident);
  }
}
Program: 43348
Project: 43348
Buggy source:
/** 
 * Stops all speech output and removes any utterances still in the queue globally.
 */
private int stopAll(String callingApp){
  int result=TextToSpeech.ERROR;
  boolean speechQueueAvailable=false;
  try {
    speechQueueAvailable=speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT,TimeUnit.MILLISECONDS);
    if (speechQueueAvailable) {
      for (int i=mSpeechQueue.size() - 1; i > -1; i--) {
        if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE) {
          mSpeechQueue.remove(i);
        }
      }
      if ((mCurrentSpeechItem != null) && ((mCurrentSpeechItem.mType != SpeechItem.TEXT_TO_FILE) || mCurrentSpeechItem.mCallingApp.equals(callingApp))) {
        if (sIsKillingSynth) {
          Log.v("String_Node_Str","String_Node_Str");
          result=TextToSpeech.ERROR;
        }
 else {
          result=sNativeSynth.stop();
        }
        mKillList.put(mCurrentSpeechItem,true);
        if (mPlayer != null) {
          try {
            mPlayer.stop();
          }
 catch (          IllegalStateException e) {
          }
        }
        mIsSpeaking=false;
        mCurrentSpeechItem=null;
      }
 else {
        result=TextToSpeech.SUCCESS;
      }
      Log.i("String_Node_Str","String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    Log.e("String_Node_Str","String_Node_Str");
    e.printStackTrace();
  }
 finally {
    if (speechQueueAvailable) {
      speechQueueLock.unlock();
    }
    return result;
  }
}

Fixed version (ground truth):
/** 
 * Stops all speech output and removes any utterances still in the queue globally.
 */
private int stopAll(String callingApp){
  int result=TextToSpeech.ERROR;
  boolean speechQueueAvailable=false;
  try {
    speechQueueAvailable=speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT,TimeUnit.MILLISECONDS);
    if (speechQueueAvailable) {
      for (int i=mSpeechQueue.size() - 1; i > -1; i--) {
        if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE) {
          mSpeechQueue.remove(i);
        }
      }
      if ((mCurrentSpeechItem != null) && ((mCurrentSpeechItem.mType != SpeechItem.TEXT_TO_FILE) || mCurrentSpeechItem.mCallingApp.equals(callingApp))) {
        result=sNativeSynth.stop();
        mKillList.put(mCurrentSpeechItem,true);
        if (mPlayer != null) {
          try {
            mPlayer.stop();
          }
 catch (          IllegalStateException e) {
          }
        }
        mIsSpeaking=false;
        mCurrentSpeechItem=null;
      }
 else {
        result=TextToSpeech.SUCCESS;
      }
      Log.i("String_Node_Str","String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    Log.e("String_Node_Str","String_Node_Str");
    e.printStackTrace();
  }
 finally {
    if (speechQueueAvailable) {
      speechQueueLock.unlock();
    }
    return result;
  }
}
Program: 43349
Project: 43349
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  Log.i("String_Node_Str","String_Node_Str");
  mResolver=getContentResolver();
  String soLibPath="String_Node_Str";
  if (sNativeSynth == null) {
    sNativeSynth=new SynthProxy(soLibPath);
    sIsKillingSynth=false;
  }
  mSelf=this;
  mIsSpeaking=false;
  mEarcons=new HashMap<String,SoundResource>();
  mUtterances=new HashMap<String,SoundResource>();
  mCallbacksMap=new HashMap<String,android.speech.tts.ITtsCallback>();
  mSpeechQueue=new ArrayList<SpeechItem>();
  mPlayer=null;
  mCurrentSpeechItem=null;
  mKillList=new HashMap<SpeechItem,Boolean>();
  setDefaultSettings();
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  Log.i("String_Node_Str","String_Node_Str");
  mResolver=getContentResolver();
  String soLibPath="String_Node_Str";
  if (sNativeSynth == null) {
    sNativeSynth=new SynthProxy(soLibPath);
  }
  mSelf=this;
  mIsSpeaking=false;
  mEarcons=new HashMap<String,SoundResource>();
  mUtterances=new HashMap<String,SoundResource>();
  mCallbacksMap=new HashMap<String,android.speech.tts.ITtsCallback>();
  mSpeechQueue=new ArrayList<SpeechItem>();
  mPlayer=null;
  mCurrentSpeechItem=null;
  mKillList=new HashMap<SpeechItem,Boolean>();
  setDefaultSettings();
}
Program: 43350
Project: 43350
Buggy source:
@Override public void onDestroy(){
  super.onDestroy();
  sIsKillingSynth=true;
  Log.i("String_Node_Str","String_Node_Str");
  cleanUpPlayer();
  sNativeSynth.shutdown();
  sNativeSynth=null;
  mCallbacks.kill();
}

Fixed version (ground truth):
@Override public void onDestroy(){
  super.onDestroy();
  cleanUpPlayer();
  sNativeSynth.shutdown();
  sNativeSynth=null;
  mCallbacks.kill();
}
Program: 43354
Project: 43354
Buggy source:
/** 
 * Stops all speech output and removes any utterances still in the queue globally.
 */
private int stopAll(String callingApp){
  int result=TextToSpeech.ERROR;
  boolean speechQueueAvailable=false;
  try {
    speechQueueAvailable=speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT,TimeUnit.MILLISECONDS);
    if (speechQueueAvailable) {
      for (int i=mSpeechQueue.size() - 1; i > -1; i--) {
        if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE) {
          mSpeechQueue.remove(i);
        }
      }
      if ((mCurrentSpeechItem != null) && ((mCurrentSpeechItem.mType != SpeechItem.TEXT_TO_FILE) || mCurrentSpeechItem.mCallingApp.equals(callingApp))) {
        if (sIsKillingSynth) {
          Log.v("String_Node_Str","String_Node_Str");
          result=TextToSpeech.ERROR;
        }
 else {
          result=sNativeSynth.stop();
        }
        mKillList.put(mCurrentSpeechItem,true);
        if (mPlayer != null) {
          try {
            mPlayer.stop();
          }
 catch (          IllegalStateException e) {
          }
        }
        mIsSpeaking=false;
        mCurrentSpeechItem=null;
      }
 else {
        result=TextToSpeech.SUCCESS;
      }
      Log.i("String_Node_Str","String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    Log.e("String_Node_Str","String_Node_Str");
    e.printStackTrace();
  }
 finally {
    if (speechQueueAvailable) {
      speechQueueLock.unlock();
    }
    return result;
  }
}

Fixed version (ground truth):
/** 
 * Stops all speech output and removes any utterances still in the queue globally.
 */
private int stopAll(String callingApp){
  int result=TextToSpeech.ERROR;
  boolean speechQueueAvailable=false;
  try {
    speechQueueAvailable=speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT,TimeUnit.MILLISECONDS);
    if (speechQueueAvailable) {
      for (int i=mSpeechQueue.size() - 1; i > -1; i--) {
        if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE) {
          mSpeechQueue.remove(i);
        }
      }
      if ((mCurrentSpeechItem != null) && ((mCurrentSpeechItem.mType != SpeechItem.TEXT_TO_FILE) || mCurrentSpeechItem.mCallingApp.equals(callingApp))) {
        result=sNativeSynth.stop();
        mKillList.put(mCurrentSpeechItem,true);
        if (mPlayer != null) {
          try {
            mPlayer.stop();
          }
 catch (          IllegalStateException e) {
          }
        }
        mIsSpeaking=false;
        mCurrentSpeechItem=null;
      }
 else {
        result=TextToSpeech.SUCCESS;
      }
      Log.i("String_Node_Str","String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    Log.e("String_Node_Str","String_Node_Str");
    e.printStackTrace();
  }
 finally {
    if (speechQueueAvailable) {
      speechQueueLock.unlock();
    }
    return result;
  }
}
Program: 43355
Project: 43355
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  Log.i("String_Node_Str","String_Node_Str");
  mResolver=getContentResolver();
  String soLibPath="String_Node_Str";
  if (sNativeSynth == null) {
    sNativeSynth=new SynthProxy(soLibPath);
    sIsKillingSynth=false;
  }
  mSelf=this;
  mIsSpeaking=false;
  mEarcons=new HashMap<String,SoundResource>();
  mUtterances=new HashMap<String,SoundResource>();
  mCallbacksMap=new HashMap<String,android.speech.tts.ITtsCallback>();
  mSpeechQueue=new ArrayList<SpeechItem>();
  mPlayer=null;
  mCurrentSpeechItem=null;
  mKillList=new HashMap<SpeechItem,Boolean>();
  setDefaultSettings();
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  Log.i("String_Node_Str","String_Node_Str");
  mResolver=getContentResolver();
  String soLibPath="String_Node_Str";
  if (sNativeSynth == null) {
    sNativeSynth=new SynthProxy(soLibPath);
  }
  mSelf=this;
  mIsSpeaking=false;
  mEarcons=new HashMap<String,SoundResource>();
  mUtterances=new HashMap<String,SoundResource>();
  mCallbacksMap=new HashMap<String,android.speech.tts.ITtsCallback>();
  mSpeechQueue=new ArrayList<SpeechItem>();
  mPlayer=null;
  mCurrentSpeechItem=null;
  mKillList=new HashMap<SpeechItem,Boolean>();
  setDefaultSettings();
}
Program: 43356
Project: 43356
Buggy source:
@Override public void onDestroy(){
  super.onDestroy();
  sIsKillingSynth=true;
  Log.i("String_Node_Str","String_Node_Str");
  cleanUpPlayer();
  sNativeSynth.shutdown();
  sNativeSynth=null;
  mCallbacks.kill();
}

Fixed version (ground truth):
@Override public void onDestroy(){
  super.onDestroy();
  cleanUpPlayer();
  sNativeSynth.shutdown();
  sNativeSynth=null;
  mCallbacks.kill();
}
Program: 43359
Project: 43359
Buggy source:
public void data(float[] d){
  mRS.nAdapter1DData(mID,d);
}

Fixed version (ground truth):
public void data(float[] d){
  mRS.nAdapter2DData(mID,d);
}
Program: 43360
Project: 43360
Buggy source:
public void destroy(){
  mRS.nAdapter1DDestroy(mID);
  mID=0;
}

Fixed version (ground truth):
public void destroy(){
  mRS.nAdapter2DDestroy(mID);
  mID=0;
}
Program: 43361
Project: 43361
Buggy source:
public void setConstraint(Dimension dim,int value){
  mRS.nAdapter1DSetConstraint(mID,dim.mID,value);
}

Fixed version (ground truth):
public void setConstraint(Dimension dim,int value){
  mRS.nAdapter2DSetConstraint(mID,dim.mID,value);
}
Program: 43362
Project: 43362
Buggy source:
public void subData(int off,int count,float[] d){
  mRS.nAdapter1DSubData(mID,off,count,d);
}

Fixed version (ground truth):
public void subData(int xoff,int yoff,int w,int h,float[] d){
  mRS.nAdapter2DSubData(mID,xoff,yoff,w,h,d);
}
Program: 43364
Project: 43364
Buggy source:
/** 
 * Stops all speech output and removes any utterances still in the queue globally.
 */
private int stopAll(String callingApp){
  int result=TextToSpeech.ERROR;
  boolean speechQueueAvailable=false;
  try {
    speechQueueAvailable=speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT,TimeUnit.MILLISECONDS);
    if (speechQueueAvailable) {
      for (int i=mSpeechQueue.size() - 1; i > -1; i--) {
        if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE) {
          mSpeechQueue.remove(i);
        }
      }
      if ((mCurrentSpeechItem != null) && ((mCurrentSpeechItem.mType != SpeechItem.TEXT_TO_FILE) || mCurrentSpeechItem.mCallingApp.equals(callingApp))) {
        result=sNativeSynth.stop();
        mKillList.put(mCurrentSpeechItem,true);
        if (mPlayer != null) {
          try {
            mPlayer.stop();
          }
 catch (          IllegalStateException e) {
          }
        }
        mIsSpeaking=false;
        mCurrentSpeechItem=null;
      }
 else {
        result=TextToSpeech.SUCCESS;
      }
      Log.i("String_Node_Str","String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    Log.e("String_Node_Str","String_Node_Str");
    e.printStackTrace();
  }
 finally {
    if (speechQueueAvailable) {
      speechQueueLock.unlock();
    }
    return result;
  }
}

Fixed version (ground truth):
/** 
 * Stops all speech output and removes any utterances still in the queue globally.
 */
private int stopAll(String callingApp){
  int result=TextToSpeech.ERROR;
  boolean speechQueueAvailable=false;
  try {
    speechQueueAvailable=speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT,TimeUnit.MILLISECONDS);
    if (speechQueueAvailable) {
      for (int i=mSpeechQueue.size() - 1; i > -1; i--) {
        if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE) {
          mSpeechQueue.remove(i);
        }
      }
      if ((mCurrentSpeechItem != null) && ((mCurrentSpeechItem.mType != SpeechItem.TEXT_TO_FILE) || mCurrentSpeechItem.mCallingApp.equals(callingApp))) {
        if (sIsKillingSynth) {
          Log.v("String_Node_Str","String_Node_Str");
          result=TextToSpeech.ERROR;
        }
 else {
          result=sNativeSynth.stop();
        }
        mKillList.put(mCurrentSpeechItem,true);
        if (mPlayer != null) {
          try {
            mPlayer.stop();
          }
 catch (          IllegalStateException e) {
          }
        }
        mIsSpeaking=false;
        mCurrentSpeechItem=null;
      }
 else {
        result=TextToSpeech.SUCCESS;
      }
      Log.i("String_Node_Str","String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    Log.e("String_Node_Str","String_Node_Str");
    e.printStackTrace();
  }
 finally {
    if (speechQueueAvailable) {
      speechQueueLock.unlock();
    }
    return result;
  }
}
Program: 43365
Project: 43365
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  Log.i("String_Node_Str","String_Node_Str");
  mResolver=getContentResolver();
  String soLibPath="String_Node_Str";
  if (sNativeSynth == null) {
    sNativeSynth=new SynthProxy(soLibPath);
  }
  mSelf=this;
  mIsSpeaking=false;
  mEarcons=new HashMap<String,SoundResource>();
  mUtterances=new HashMap<String,SoundResource>();
  mCallbacksMap=new HashMap<String,android.speech.tts.ITtsCallback>();
  mSpeechQueue=new ArrayList<SpeechItem>();
  mPlayer=null;
  mCurrentSpeechItem=null;
  mKillList=new HashMap<SpeechItem,Boolean>();
  setDefaultSettings();
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  Log.i("String_Node_Str","String_Node_Str");
  mResolver=getContentResolver();
  String soLibPath="String_Node_Str";
  if (sNativeSynth == null) {
    sNativeSynth=new SynthProxy(soLibPath);
    sIsKillingSynth=false;
  }
  mSelf=this;
  mIsSpeaking=false;
  mEarcons=new HashMap<String,SoundResource>();
  mUtterances=new HashMap<String,SoundResource>();
  mCallbacksMap=new HashMap<String,android.speech.tts.ITtsCallback>();
  mSpeechQueue=new ArrayList<SpeechItem>();
  mPlayer=null;
  mCurrentSpeechItem=null;
  mKillList=new HashMap<SpeechItem,Boolean>();
  setDefaultSettings();
}
Program: 43366
Project: 43366
Buggy source:
@Override public void onDestroy(){
  super.onDestroy();
  cleanUpPlayer();
  sNativeSynth.shutdown();
  sNativeSynth=null;
  mCallbacks.kill();
}

Fixed version (ground truth):
@Override public void onDestroy(){
  super.onDestroy();
  sIsKillingSynth=true;
  Log.i("String_Node_Str","String_Node_Str");
  cleanUpPlayer();
  sNativeSynth.shutdown();
  sNativeSynth=null;
  mCallbacks.kill();
}
Program: 43369
Project: 43369
Buggy source:
private static Integer signalParamHash(int signalType,int alertPitch,int signal){
  if ((signalType < 0) || (signalType > 256) || (alertPitch > 256)|| (alertPitch < 0)|| (signal > 256)|| (signal < 0)) {
    return new Integer(CDMA_INVALID_TONE);
  }
  return new Integer(signalType * 256 * 256 + alertPitch * 256 + signal);
}

Fixed version (ground truth):
private static Integer signalParamHash(int signalType,int alertPitch,int signal){
  if ((signalType < 0) || (signalType > 256) || (alertPitch > 256)|| (alertPitch < 0)|| (signal > 256)|| (signal < 0)) {
    return new Integer(CDMA_INVALID_TONE);
  }
  if (signalType != IS95_CONST_IR_SIGNAL_IS54B) {
    alertPitch=TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN;
  }
  return new Integer(signalType * 256 * 256 + alertPitch * 256 + signal);
}
Program: 43370
Project: 43370
Buggy source:
/** 
 * SSL certificate error callback. Handles SSL error(s) on the way up to the user.
 */
public void handleSslErrorRequest(SslError error){
  int primaryError=error.getPrimaryError();
  if (Config.LOGV) {
    Log.v(LOGTAG,"String_Node_Str" + "String_Node_Str" + primaryError + "String_Node_Str"+ error.getCertificate());
  }
  eventsReceived[TEST_SSL_CERTIFICATE_ERROR]=true;
  if (notExpecting[TEST_SSL_CERTIFICATE_ERROR]) {
    expectDetails.append("String_Node_Str" + "String_Node_Str");
    expectDetails.append("String_Node_Str");
  }
  if (expectSslErrors != -1) {
    if (expectSslErrors == primaryError) {
      expectSslErrors=-1;
    }
 else {
      expectDetails.append("String_Node_Str" + expectSslErrors + "String_Node_Str"+ primaryError);
      expectDetails.append("String_Node_Str");
    }
  }
  if (expectSslErrors == -1)   expects[TEST_SSL_CERTIFICATE_ERROR]=false;
}

Fixed version (ground truth):
/** 
 * SSL certificate error callback. Handles SSL error(s) on the way up to the user.
 */
public boolean handleSslErrorRequest(SslError error){
  int primaryError=error.getPrimaryError();
  if (Config.LOGV) {
    Log.v(LOGTAG,"String_Node_Str" + "String_Node_Str" + primaryError + "String_Node_Str"+ error.getCertificate());
  }
  eventsReceived[TEST_SSL_CERTIFICATE_ERROR]=true;
  if (notExpecting[TEST_SSL_CERTIFICATE_ERROR]) {
    expectDetails.append("String_Node_Str" + "String_Node_Str");
    expectDetails.append("String_Node_Str");
  }
  if (expectSslErrors != -1) {
    if (expectSslErrors == primaryError) {
      expectSslErrors=-1;
    }
 else {
      expectDetails.append("String_Node_Str" + expectSslErrors + "String_Node_Str"+ primaryError);
      expectDetails.append("String_Node_Str");
    }
  }
  if (expectSslErrors == -1)   expects[TEST_SSL_CERTIFICATE_ERROR]=false;
  return false;
}
Program: 43371
Project: 43371
Buggy source:
private void setContentScrollBy(int cx,int cy,boolean animate){
  if (mDrawHistory) {
    return;
  }
  cx=contentToView(cx);
  cy=contentToView(cy);
  if (mHeightCanMeasure) {
    if (cy != 0) {
      Rect tempRect=new Rect();
      calcOurVisibleRect(tempRect);
      tempRect.offset(cx,cy);
      requestRectangleOnScreen(tempRect);
    }
    if (cy == 0 && cx != 0) {
      pinScrollBy(cx,0,animate,0);
    }
  }
 else {
    pinScrollBy(cx,cy,animate,0);
  }
}

Fixed version (ground truth):
private boolean setContentScrollBy(int cx,int cy,boolean animate){
  if (mDrawHistory) {
    return false;
  }
  cx=contentToView(cx);
  cy=contentToView(cy);
  if (mHeightCanMeasure) {
    if (cy != 0) {
      Rect tempRect=new Rect();
      calcOurVisibleRect(tempRect);
      tempRect.offset(cx,cy);
      requestRectangleOnScreen(tempRect);
    }
    return cy == 0 && cx != 0 && pinScrollBy(cx,0,animate,0);
  }
 else {
    return pinScrollBy(cx,cy,animate,0);
  }
}
Program: 43374
Project: 43374
Buggy source:
/** 
 * Handle   {@link #MSG_BATTERY_UPDATE}
 */
private void handleBatteryUpdate(int pluggedInStatus,int batteryLevel){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  final boolean pluggedIn=isPluggedIn(pluggedInStatus);
  if (isBatteryUpdateInteresting(pluggedIn,batteryLevel)) {
    mBatteryLevel=batteryLevel;
    mDevicePluggedIn=pluggedIn;
    for (int i=0; i < mInfoCallbacks.size(); i++) {
      mInfoCallbacks.get(i).onRefreshBatteryInfo(shouldShowBatteryInfo(),pluggedIn,batteryLevel);
    }
  }
  if (batteryLevel == 0 && pluggedInStatus != BATTERY_STATUS_CHARGING && pluggedInStatus != BATTERY_STATUS_UNKNOWN) {
    ShutdownThread.shutdown(mContext,false);
  }
}

Fixed version (ground truth):
/** 
 * Handle   {@link #MSG_BATTERY_UPDATE}
 */
private void handleBatteryUpdate(int pluggedInStatus,int batteryLevel){
  if (DEBUG)   Log.d(TAG,"String_Node_Str");
  final boolean pluggedIn=isPluggedIn(pluggedInStatus);
  if (isBatteryUpdateInteresting(pluggedIn,batteryLevel)) {
    mBatteryLevel=batteryLevel;
    mDevicePluggedIn=pluggedIn;
    for (int i=0; i < mInfoCallbacks.size(); i++) {
      mInfoCallbacks.get(i).onRefreshBatteryInfo(shouldShowBatteryInfo(),pluggedIn,batteryLevel);
    }
  }
}
Program: 43375
Project: 43375
Buggy source:
public void setImageMatrix(Matrix matrix){
  if (matrix != null && matrix.isIdentity()) {
    matrix=null;
  }
  if (matrix == null && !mMatrix.isIdentity() || matrix != null && !mMatrix.equals(matrix)) {
    mMatrix.set(matrix);
    invalidate();
  }
}

Fixed version (ground truth):
public void setImageMatrix(Matrix matrix){
  if (matrix != null && matrix.isIdentity()) {
    matrix=null;
  }
  if (matrix == null && !mMatrix.isIdentity() || matrix != null && !mMatrix.equals(matrix)) {
    mMatrix.set(matrix);
    configureBounds();
    invalidate();
  }
}