Program: 198839
Project: 198839
Buggy source:
/** 
 * Callback from NativeDaemonConnector
 */
public void onDaemonConnected(){
  new Thread("String_Node_Str"){
    @Override public void run(){
      try {
        final String[] vols=NativeDaemonEvent.filterMessageList(mConnector.executeForList("String_Node_Str","String_Node_Str"),VoldResponseCode.VolumeListResult);
        for (        String volstr : vols) {
          String[] tok=volstr.split("String_Node_Str");
          String path=tok[1];
          String state=Environment.MEDIA_REMOVED;
          final StorageVolume volume;
synchronized (mVolumesLock) {
            volume=mVolumesByPath.get(path);
          }
          int st=Integer.parseInt(tok[2]);
          if (st == VolumeState.NoMedia) {
            state=Environment.MEDIA_REMOVED;
          }
 else           if (st == VolumeState.Idle) {
            state=Environment.MEDIA_UNMOUNTED;
          }
 else           if (st == VolumeState.Mounted) {
            state=Environment.MEDIA_MOUNTED;
            Slog.i(TAG,"String_Node_Str");
          }
 else           if (st == VolumeState.Shared) {
            state=Environment.MEDIA_SHARED;
            Slog.i(TAG,"String_Node_Str");
          }
 else {
            throw new Exception(String.format("String_Node_Str",st));
          }
          if (state != null) {
            if (DEBUG_EVENTS)             Slog.i(TAG,"String_Node_Str" + state);
            updatePublicVolumeState(volume,state);
          }
        }
      }
 catch (      Exception e) {
        Slog.e(TAG,"String_Node_Str",e);
        final StorageVolume primary=getPrimaryPhysicalVolume();
        if (primary != null) {
          updatePublicVolumeState(primary,Environment.MEDIA_REMOVED);
        }
      }
      mConnectedSignal.countDown();
      mPms.scanAvailableAsecs();
      mAsecsScanned.countDown();
    }
  }
.start();
}

Fixed version (ground truth):
/** 
 * Callback from NativeDaemonConnector
 */
public void onDaemonConnected(){
  new Thread("String_Node_Str"){
    @Override public void run(){
      try {
        final String[] vols=NativeDaemonEvent.filterMessageList(mConnector.executeForList("String_Node_Str","String_Node_Str","String_Node_Str"),VoldResponseCode.VolumeListResult);
        for (        String volstr : vols) {
          String[] tok=volstr.split("String_Node_Str");
          String path=tok[1];
          String state=Environment.MEDIA_REMOVED;
          final StorageVolume volume;
synchronized (mVolumesLock) {
            volume=mVolumesByPath.get(path);
          }
          int st=Integer.parseInt(tok[2]);
          if (st == VolumeState.NoMedia) {
            state=Environment.MEDIA_REMOVED;
          }
 else           if (st == VolumeState.Idle) {
            state=Environment.MEDIA_UNMOUNTED;
          }
 else           if (st == VolumeState.Mounted) {
            state=Environment.MEDIA_MOUNTED;
            Slog.i(TAG,"String_Node_Str");
          }
 else           if (st == VolumeState.Shared) {
            state=Environment.MEDIA_SHARED;
            Slog.i(TAG,"String_Node_Str");
          }
 else {
            throw new Exception(String.format("String_Node_Str",st));
          }
          if (state != null) {
            if (DEBUG_EVENTS)             Slog.i(TAG,"String_Node_Str" + state);
            updatePublicVolumeState(volume,state);
          }
        }
      }
 catch (      Exception e) {
        Slog.e(TAG,"String_Node_Str",e);
        final StorageVolume primary=getPrimaryPhysicalVolume();
        if (primary != null) {
          updatePublicVolumeState(primary,Environment.MEDIA_REMOVED);
        }
      }
      mConnectedSignal.countDown();
      mPms.scanAvailableAsecs();
      mAsecsScanned.countDown();
    }
  }
.start();
}