Program: 190911
Project: 190911
Buggy source:
public void readSummaryFromParcel(Parcel in) throws ParcelFormatException {
  final int version=in.readInt();
  if (version != VERSION) {
    Slog.w("String_Node_Str","String_Node_Str" + version + "String_Node_Str"+ VERSION+ "String_Node_Str");
    return;
  }
  readHistory(in,true);
  mStartCount=in.readInt();
  mUptime=in.readLong();
  mRealtime=in.readLong();
  mStartClockTime=in.readLong();
  mStartPlatformVersion=in.readString();
  mEndPlatformVersion=in.readString();
  mOnBatteryTimeBase.readSummaryFromParcel(in);
  mOnBatteryScreenOffTimeBase.readSummaryFromParcel(in);
  mDischargeUnplugLevel=in.readInt();
  mDischargePlugLevel=in.readInt();
  mDischargeCurrentLevel=in.readInt();
  mCurrentBatteryLevel=in.readInt();
  mEstimatedBatteryCapacity=in.readInt();
  mLowDischargeAmountSinceCharge=in.readInt();
  mHighDischargeAmountSinceCharge=in.readInt();
  mDischargeAmountScreenOnSinceCharge=in.readInt();
  mDischargeAmountScreenOffSinceCharge=in.readInt();
  mDischargeStepTracker.readFromParcel(in);
  mChargeStepTracker.readFromParcel(in);
  mDailyDischargeStepTracker.readFromParcel(in);
  mDailyChargeStepTracker.readFromParcel(in);
  mDischargeCounter.readSummaryFromParcelLocked(in);
  mDischargeScreenOffCounter.readSummaryFromParcelLocked(in);
  int NPKG=in.readInt();
  if (NPKG > 0) {
    mDailyPackageChanges=new ArrayList<>(NPKG);
    while (NPKG > 0) {
      NPKG--;
      PackageChange pc=new PackageChange();
      pc.mPackageName=in.readString();
      pc.mUpdate=in.readInt() != 0;
      pc.mVersionCode=in.readInt();
      mDailyPackageChanges.add(pc);
    }
  }
 else {
    mDailyPackageChanges=null;
  }
  mDailyStartTime=in.readLong();
  mNextMinDailyDeadline=in.readLong();
  mNextMaxDailyDeadline=in.readLong();
  mStartCount++;
  mScreenState=Display.STATE_UNKNOWN;
  mScreenOnTimer.readSummaryFromParcelLocked(in);
  for (int i=0; i < NUM_SCREEN_BRIGHTNESS_BINS; i++) {
    mScreenBrightnessTimer[i].readSummaryFromParcelLocked(in);
  }
  mInteractive=false;
  mInteractiveTimer.readSummaryFromParcelLocked(in);
  mPhoneOn=false;
  mPowerSaveModeEnabledTimer.readSummaryFromParcelLocked(in);
  mLongestLightIdleTime=in.readLong();
  mLongestFullIdleTime=in.readLong();
  mDeviceIdleModeLightTimer.readSummaryFromParcelLocked(in);
  mDeviceIdleModeFullTimer.readSummaryFromParcelLocked(in);
  mDeviceLightIdlingTimer.readSummaryFromParcelLocked(in);
  mDeviceIdlingTimer.readSummaryFromParcelLocked(in);
  mPhoneOnTimer.readSummaryFromParcelLocked(in);
  for (int i=0; i < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) {
    mPhoneSignalStrengthsTimer[i].readSummaryFromParcelLocked(in);
  }
  mPhoneSignalScanningTimer.readSummaryFromParcelLocked(in);
  for (int i=0; i < NUM_DATA_CONNECTION_TYPES; i++) {
    mPhoneDataConnectionsTimer[i].readSummaryFromParcelLocked(in);
  }
  for (int i=0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {
    mNetworkByteActivityCounters[i].readSummaryFromParcelLocked(in);
    mNetworkPacketActivityCounters[i].readSummaryFromParcelLocked(in);
  }
  mMobileRadioPowerState=DataConnectionRealTimeInfo.DC_POWER_STATE_LOW;
  mMobileRadioActiveTimer.readSummaryFromParcelLocked(in);
  mMobileRadioActivePerAppTimer.readSummaryFromParcelLocked(in);
  mMobileRadioActiveAdjustedTime.readSummaryFromParcelLocked(in);
  mMobileRadioActiveUnknownTime.readSummaryFromParcelLocked(in);
  mMobileRadioActiveUnknownCount.readSummaryFromParcelLocked(in);
  mWifiRadioPowerState=DataConnectionRealTimeInfo.DC_POWER_STATE_LOW;
  mWifiOn=false;
  mWifiOnTimer.readSummaryFromParcelLocked(in);
  mGlobalWifiRunning=false;
  mGlobalWifiRunningTimer.readSummaryFromParcelLocked(in);
  for (int i=0; i < NUM_WIFI_STATES; i++) {
    mWifiStateTimer[i].readSummaryFromParcelLocked(in);
  }
  for (int i=0; i < NUM_WIFI_SUPPL_STATES; i++) {
    mWifiSupplStateTimer[i].readSummaryFromParcelLocked(in);
  }
  for (int i=0; i < NUM_WIFI_SIGNAL_STRENGTH_BINS; i++) {
    mWifiSignalStrengthsTimer[i].readSummaryFromParcelLocked(in);
  }
  mWifiActivity.readSummaryFromParcel(in);
  mBluetoothActivity.readSummaryFromParcel(in);
  mModemActivity.readSummaryFromParcel(in);
  mHasWifiReporting=in.readInt() != 0;
  mHasBluetoothReporting=in.readInt() != 0;
  mHasModemReporting=in.readInt() != 0;
  mNumConnectivityChange=mLoadedNumConnectivityChange=in.readInt();
  mFlashlightOnNesting=0;
  mFlashlightOnTimer.readSummaryFromParcelLocked(in);
  mCameraOnNesting=0;
  mCameraOnTimer.readSummaryFromParcelLocked(in);
  mBluetoothScanNesting=0;
  mBluetoothScanTimer.readSummaryFromParcelLocked(in);
  int NKW=in.readInt();
  if (NKW > 10000) {
    throw new ParcelFormatException("String_Node_Str" + NKW);
  }
  for (int ikw=0; ikw < NKW; ikw++) {
    if (in.readInt() != 0) {
      String kwltName=in.readString();
      getKernelWakelockTimerLocked(kwltName).readSummaryFromParcelLocked(in);
    }
  }
  int NWR=in.readInt();
  if (NWR > 10000) {
    throw new ParcelFormatException("String_Node_Str" + NWR);
  }
  for (int iwr=0; iwr < NWR; iwr++) {
    if (in.readInt() != 0) {
      String reasonName=in.readString();
      getWakeupReasonTimerLocked(reasonName).readSummaryFromParcelLocked(in);
    }
  }
  final int NU=in.readInt();
  if (NU > 10000) {
    throw new ParcelFormatException("String_Node_Str" + NU);
  }
  for (int iu=0; iu < NU; iu++) {
    int uid=in.readInt();
    Uid u=new Uid(this,uid);
    mUidStats.put(uid,u);
    u.mWifiRunning=false;
    if (in.readInt() != 0) {
      u.mWifiRunningTimer.readSummaryFromParcelLocked(in);
    }
    u.mFullWifiLockOut=false;
    if (in.readInt() != 0) {
      u.mFullWifiLockTimer.readSummaryFromParcelLocked(in);
    }
    u.mWifiScanStarted=false;
    if (in.readInt() != 0) {
      u.mWifiScanTimer.readSummaryFromParcelLocked(in);
    }
    u.mWifiBatchedScanBinStarted=Uid.NO_BATCHED_SCAN_STARTED;
    for (int i=0; i < Uid.NUM_WIFI_BATCHED_SCAN_BINS; i++) {
      if (in.readInt() != 0) {
        u.makeWifiBatchedScanBin(i,null);
        u.mWifiBatchedScanTimer[i].readSummaryFromParcelLocked(in);
      }
    }
    u.mWifiMulticastEnabled=false;
    if (in.readInt() != 0) {
      u.mWifiMulticastTimer.readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createAudioTurnedOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createVideoTurnedOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createFlashlightTurnedOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createCameraTurnedOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createForegroundActivityTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createBluetoothScanTimerLocked().readSummaryFromParcelLocked(in);
    }
    u.mProcessState=ActivityManager.PROCESS_STATE_NONEXISTENT;
    for (int i=0; i < Uid.NUM_PROCESS_STATE; i++) {
      if (in.readInt() != 0) {
        u.makeProcessState(i,null);
        u.mProcessStateTimer[i].readSummaryFromParcelLocked(in);
      }
    }
    if (in.readInt() != 0) {
      u.createVibratorOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      if (u.mUserActivityCounters == null) {
        u.initUserActivityLocked();
      }
      for (int i=0; i < Uid.NUM_USER_ACTIVITY_TYPES; i++) {
        u.mUserActivityCounters[i].readSummaryFromParcelLocked(in);
      }
    }
    if (in.readInt() != 0) {
      if (u.mNetworkByteActivityCounters == null) {
        u.initNetworkActivityLocked();
      }
      for (int i=0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {
        u.mNetworkByteActivityCounters[i].readSummaryFromParcelLocked(in);
        u.mNetworkPacketActivityCounters[i].readSummaryFromParcelLocked(in);
      }
      u.mMobileRadioActiveTime.readSummaryFromParcelLocked(in);
      u.mMobileRadioActiveCount.readSummaryFromParcelLocked(in);
    }
    u.mUserCpuTime.readSummaryFromParcelLocked(in);
    u.mSystemCpuTime.readSummaryFromParcelLocked(in);
    u.mCpuPower.readSummaryFromParcelLocked(in);
    if (in.readInt() != 0) {
      final int numClusters=in.readInt();
      if (mPowerProfile != null && mPowerProfile.getNumCpuClusters() != numClusters) {
        throw new ParcelFormatException("String_Node_Str");
      }
      u.mCpuClusterSpeed=new LongSamplingCounter[numClusters][];
      for (int cluster=0; cluster < numClusters; cluster++) {
        if (in.readInt() != 0) {
          final int NSB=in.readInt();
          if (mPowerProfile != null && mPowerProfile.getNumSpeedStepsInCpuCluster(cluster) != NSB) {
            throw new ParcelFormatException("String_Node_Str" + NSB);
          }
          u.mCpuClusterSpeed[cluster]=new LongSamplingCounter[NSB];
          for (int speed=0; speed < NSB; speed++) {
            if (in.readInt() != 0) {
              u.mCpuClusterSpeed[cluster][speed]=new LongSamplingCounter(mOnBatteryTimeBase);
              u.mCpuClusterSpeed[cluster][speed].readSummaryFromParcelLocked(in);
            }
          }
        }
 else {
          u.mCpuClusterSpeed[cluster]=null;
        }
      }
    }
 else {
      u.mCpuClusterSpeed=null;
    }
    if (in.readInt() != 0) {
      u.mMobileRadioApWakeupCount=new LongSamplingCounter(mOnBatteryTimeBase);
      u.mMobileRadioApWakeupCount.readSummaryFromParcelLocked(in);
    }
 else {
      u.mMobileRadioApWakeupCount=null;
    }
    if (in.readInt() != 0) {
      u.mWifiRadioApWakeupCount=new LongSamplingCounter(mOnBatteryTimeBase);
      u.mWifiRadioApWakeupCount.readSummaryFromParcelLocked(in);
    }
 else {
      u.mWifiRadioApWakeupCount=null;
    }
    int NW=in.readInt();
    if (NW > 100) {
      throw new ParcelFormatException("String_Node_Str" + NW);
    }
    for (int iw=0; iw < NW; iw++) {
      String wlName=in.readString();
      u.readWakeSummaryFromParcelLocked(wlName,in);
    }
    int NS=in.readInt();
    if (NS > 100) {
      throw new ParcelFormatException("String_Node_Str" + NS);
    }
    for (int is=0; is < NS; is++) {
      String name=in.readString();
      u.readSyncSummaryFromParcelLocked(name,in);
    }
    int NJ=in.readInt();
    if (NJ > 100) {
      throw new ParcelFormatException("String_Node_Str" + NJ);
    }
    for (int ij=0; ij < NJ; ij++) {
      String name=in.readString();
      u.readJobSummaryFromParcelLocked(name,in);
    }
    int NP=in.readInt();
    if (NP > 1000) {
      throw new ParcelFormatException("String_Node_Str" + NP);
    }
    for (int is=0; is < NP; is++) {
      int seNumber=in.readInt();
      if (in.readInt() != 0) {
        u.getSensorTimerLocked(seNumber,true).readSummaryFromParcelLocked(in);
      }
    }
    NP=in.readInt();
    if (NP > 1000) {
      throw new ParcelFormatException("String_Node_Str" + NP);
    }
    for (int ip=0; ip < NP; ip++) {
      String procName=in.readString();
      Uid.Proc p=u.getProcessStatsLocked(procName);
      p.mUserTime=p.mLoadedUserTime=in.readLong();
      p.mSystemTime=p.mLoadedSystemTime=in.readLong();
      p.mForegroundTime=p.mLoadedForegroundTime=in.readLong();
      p.mStarts=p.mLoadedStarts=in.readInt();
      p.mNumCrashes=p.mLoadedNumCrashes=in.readInt();
      p.mNumAnrs=p.mLoadedNumAnrs=in.readInt();
      p.readExcessivePowerFromParcelLocked(in);
    }
    NP=in.readInt();
    if (NP > 10000) {
      throw new ParcelFormatException("String_Node_Str" + NP);
    }
    for (int ip=0; ip < NP; ip++) {
      String pkgName=in.readString();
      Uid.Pkg p=u.getPackageStatsLocked(pkgName);
      final int NWA=in.readInt();
      if (NWA > 1000) {
        throw new ParcelFormatException("String_Node_Str" + NWA);
      }
      p.mWakeupAlarms.clear();
      for (int iwa=0; iwa < NWA; iwa++) {
        String tag=in.readString();
        Counter c=new Counter(mOnBatteryTimeBase);
        c.readSummaryFromParcelLocked(in);
        p.mWakeupAlarms.put(tag,c);
      }
      NS=in.readInt();
      if (NS > 1000) {
        throw new ParcelFormatException("String_Node_Str" + NS);
      }
      for (int is=0; is < NS; is++) {
        String servName=in.readString();
        Uid.Pkg.Serv s=u.getServiceStatsLocked(pkgName,servName);
        s.mStartTime=s.mLoadedStartTime=in.readLong();
        s.mStarts=s.mLoadedStarts=in.readInt();
        s.mLaunches=s.mLoadedLaunches=in.readInt();
      }
    }
  }
}

Fixed version (ground truth):
public void readSummaryFromParcel(Parcel in) throws ParcelFormatException {
  final int version=in.readInt();
  if (version != VERSION) {
    Slog.w("String_Node_Str","String_Node_Str" + version + "String_Node_Str"+ VERSION+ "String_Node_Str");
    return;
  }
  readHistory(in,true);
  mStartCount=in.readInt();
  mUptime=in.readLong();
  mRealtime=in.readLong();
  mStartClockTime=in.readLong();
  mStartPlatformVersion=in.readString();
  mEndPlatformVersion=in.readString();
  mOnBatteryTimeBase.readSummaryFromParcel(in);
  mOnBatteryScreenOffTimeBase.readSummaryFromParcel(in);
  mDischargeUnplugLevel=in.readInt();
  mDischargePlugLevel=in.readInt();
  mDischargeCurrentLevel=in.readInt();
  mCurrentBatteryLevel=in.readInt();
  mEstimatedBatteryCapacity=in.readInt();
  mLowDischargeAmountSinceCharge=in.readInt();
  mHighDischargeAmountSinceCharge=in.readInt();
  mDischargeAmountScreenOnSinceCharge=in.readInt();
  mDischargeAmountScreenOffSinceCharge=in.readInt();
  mDischargeStepTracker.readFromParcel(in);
  mChargeStepTracker.readFromParcel(in);
  mDailyDischargeStepTracker.readFromParcel(in);
  mDailyChargeStepTracker.readFromParcel(in);
  mDischargeCounter.readSummaryFromParcelLocked(in);
  mDischargeScreenOffCounter.readSummaryFromParcelLocked(in);
  int NPKG=in.readInt();
  if (NPKG > 0) {
    mDailyPackageChanges=new ArrayList<>(NPKG);
    while (NPKG > 0) {
      NPKG--;
      PackageChange pc=new PackageChange();
      pc.mPackageName=in.readString();
      pc.mUpdate=in.readInt() != 0;
      pc.mVersionCode=in.readInt();
      mDailyPackageChanges.add(pc);
    }
  }
 else {
    mDailyPackageChanges=null;
  }
  mDailyStartTime=in.readLong();
  mNextMinDailyDeadline=in.readLong();
  mNextMaxDailyDeadline=in.readLong();
  mStartCount++;
  mScreenState=Display.STATE_UNKNOWN;
  mScreenOnTimer.readSummaryFromParcelLocked(in);
  for (int i=0; i < NUM_SCREEN_BRIGHTNESS_BINS; i++) {
    mScreenBrightnessTimer[i].readSummaryFromParcelLocked(in);
  }
  mInteractive=false;
  mInteractiveTimer.readSummaryFromParcelLocked(in);
  mPhoneOn=false;
  mPowerSaveModeEnabledTimer.readSummaryFromParcelLocked(in);
  mLongestLightIdleTime=in.readLong();
  mLongestFullIdleTime=in.readLong();
  mDeviceIdleModeLightTimer.readSummaryFromParcelLocked(in);
  mDeviceIdleModeFullTimer.readSummaryFromParcelLocked(in);
  mDeviceLightIdlingTimer.readSummaryFromParcelLocked(in);
  mDeviceIdlingTimer.readSummaryFromParcelLocked(in);
  mPhoneOnTimer.readSummaryFromParcelLocked(in);
  for (int i=0; i < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) {
    mPhoneSignalStrengthsTimer[i].readSummaryFromParcelLocked(in);
  }
  mPhoneSignalScanningTimer.readSummaryFromParcelLocked(in);
  for (int i=0; i < NUM_DATA_CONNECTION_TYPES; i++) {
    mPhoneDataConnectionsTimer[i].readSummaryFromParcelLocked(in);
  }
  for (int i=0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {
    mNetworkByteActivityCounters[i].readSummaryFromParcelLocked(in);
    mNetworkPacketActivityCounters[i].readSummaryFromParcelLocked(in);
  }
  mMobileRadioPowerState=DataConnectionRealTimeInfo.DC_POWER_STATE_LOW;
  mMobileRadioActiveTimer.readSummaryFromParcelLocked(in);
  mMobileRadioActivePerAppTimer.readSummaryFromParcelLocked(in);
  mMobileRadioActiveAdjustedTime.readSummaryFromParcelLocked(in);
  mMobileRadioActiveUnknownTime.readSummaryFromParcelLocked(in);
  mMobileRadioActiveUnknownCount.readSummaryFromParcelLocked(in);
  mWifiRadioPowerState=DataConnectionRealTimeInfo.DC_POWER_STATE_LOW;
  mWifiOn=false;
  mWifiOnTimer.readSummaryFromParcelLocked(in);
  mGlobalWifiRunning=false;
  mGlobalWifiRunningTimer.readSummaryFromParcelLocked(in);
  for (int i=0; i < NUM_WIFI_STATES; i++) {
    mWifiStateTimer[i].readSummaryFromParcelLocked(in);
  }
  for (int i=0; i < NUM_WIFI_SUPPL_STATES; i++) {
    mWifiSupplStateTimer[i].readSummaryFromParcelLocked(in);
  }
  for (int i=0; i < NUM_WIFI_SIGNAL_STRENGTH_BINS; i++) {
    mWifiSignalStrengthsTimer[i].readSummaryFromParcelLocked(in);
  }
  mWifiActivity.readSummaryFromParcel(in);
  mBluetoothActivity.readSummaryFromParcel(in);
  mModemActivity.readSummaryFromParcel(in);
  mHasWifiReporting=in.readInt() != 0;
  mHasBluetoothReporting=in.readInt() != 0;
  mHasModemReporting=in.readInt() != 0;
  mNumConnectivityChange=mLoadedNumConnectivityChange=in.readInt();
  mFlashlightOnNesting=0;
  mFlashlightOnTimer.readSummaryFromParcelLocked(in);
  mCameraOnNesting=0;
  mCameraOnTimer.readSummaryFromParcelLocked(in);
  mBluetoothScanNesting=0;
  mBluetoothScanTimer.readSummaryFromParcelLocked(in);
  int NKW=in.readInt();
  if (NKW > 10000) {
    throw new ParcelFormatException("String_Node_Str" + NKW);
  }
  for (int ikw=0; ikw < NKW; ikw++) {
    if (in.readInt() != 0) {
      String kwltName=in.readString();
      getKernelWakelockTimerLocked(kwltName).readSummaryFromParcelLocked(in);
    }
  }
  int NWR=in.readInt();
  if (NWR > 10000) {
    throw new ParcelFormatException("String_Node_Str" + NWR);
  }
  for (int iwr=0; iwr < NWR; iwr++) {
    if (in.readInt() != 0) {
      String reasonName=in.readString();
      getWakeupReasonTimerLocked(reasonName).readSummaryFromParcelLocked(in);
    }
  }
  final int NU=in.readInt();
  if (NU > 10000) {
    throw new ParcelFormatException("String_Node_Str" + NU);
  }
  for (int iu=0; iu < NU; iu++) {
    int uid=in.readInt();
    Uid u=new Uid(this,uid);
    mUidStats.put(uid,u);
    u.mWifiRunning=false;
    if (in.readInt() != 0) {
      u.mWifiRunningTimer.readSummaryFromParcelLocked(in);
    }
    u.mFullWifiLockOut=false;
    if (in.readInt() != 0) {
      u.mFullWifiLockTimer.readSummaryFromParcelLocked(in);
    }
    u.mWifiScanStarted=false;
    if (in.readInt() != 0) {
      u.mWifiScanTimer.readSummaryFromParcelLocked(in);
    }
    u.mWifiBatchedScanBinStarted=Uid.NO_BATCHED_SCAN_STARTED;
    for (int i=0; i < Uid.NUM_WIFI_BATCHED_SCAN_BINS; i++) {
      if (in.readInt() != 0) {
        u.makeWifiBatchedScanBin(i,null);
        u.mWifiBatchedScanTimer[i].readSummaryFromParcelLocked(in);
      }
    }
    u.mWifiMulticastEnabled=false;
    if (in.readInt() != 0) {
      u.mWifiMulticastTimer.readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createAudioTurnedOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createVideoTurnedOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createFlashlightTurnedOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createCameraTurnedOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createForegroundActivityTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      u.createBluetoothScanTimerLocked().readSummaryFromParcelLocked(in);
    }
    u.mProcessState=ActivityManager.PROCESS_STATE_NONEXISTENT;
    for (int i=0; i < Uid.NUM_PROCESS_STATE; i++) {
      if (in.readInt() != 0) {
        u.makeProcessState(i,null);
        u.mProcessStateTimer[i].readSummaryFromParcelLocked(in);
      }
    }
    if (in.readInt() != 0) {
      u.createVibratorOnTimerLocked().readSummaryFromParcelLocked(in);
    }
    if (in.readInt() != 0) {
      if (u.mUserActivityCounters == null) {
        u.initUserActivityLocked();
      }
      for (int i=0; i < Uid.NUM_USER_ACTIVITY_TYPES; i++) {
        u.mUserActivityCounters[i].readSummaryFromParcelLocked(in);
      }
    }
    if (in.readInt() != 0) {
      if (u.mNetworkByteActivityCounters == null) {
        u.initNetworkActivityLocked();
      }
      for (int i=0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {
        u.mNetworkByteActivityCounters[i].readSummaryFromParcelLocked(in);
        u.mNetworkPacketActivityCounters[i].readSummaryFromParcelLocked(in);
      }
      u.mMobileRadioActiveTime.readSummaryFromParcelLocked(in);
      u.mMobileRadioActiveCount.readSummaryFromParcelLocked(in);
    }
    u.mUserCpuTime.readSummaryFromParcelLocked(in);
    u.mSystemCpuTime.readSummaryFromParcelLocked(in);
    u.mCpuPower.readSummaryFromParcelLocked(in);
    if (in.readInt() != 0) {
      final int numClusters=in.readInt();
      if (mPowerProfile != null && mPowerProfile.getNumCpuClusters() != numClusters) {
        throw new ParcelFormatException("String_Node_Str");
      }
      u.mCpuClusterSpeed=new LongSamplingCounter[numClusters][];
      for (int cluster=0; cluster < numClusters; cluster++) {
        if (in.readInt() != 0) {
          final int NSB=in.readInt();
          if (mPowerProfile != null && mPowerProfile.getNumSpeedStepsInCpuCluster(cluster) != NSB) {
            throw new ParcelFormatException("String_Node_Str" + NSB);
          }
          u.mCpuClusterSpeed[cluster]=new LongSamplingCounter[NSB];
          for (int speed=0; speed < NSB; speed++) {
            if (in.readInt() != 0) {
              u.mCpuClusterSpeed[cluster][speed]=new LongSamplingCounter(mOnBatteryTimeBase);
              u.mCpuClusterSpeed[cluster][speed].readSummaryFromParcelLocked(in);
            }
          }
        }
 else {
          u.mCpuClusterSpeed[cluster]=null;
        }
      }
    }
 else {
      u.mCpuClusterSpeed=null;
    }
    if (in.readInt() != 0) {
      u.mMobileRadioApWakeupCount=new LongSamplingCounter(mOnBatteryTimeBase);
      u.mMobileRadioApWakeupCount.readSummaryFromParcelLocked(in);
    }
 else {
      u.mMobileRadioApWakeupCount=null;
    }
    if (in.readInt() != 0) {
      u.mWifiRadioApWakeupCount=new LongSamplingCounter(mOnBatteryTimeBase);
      u.mWifiRadioApWakeupCount.readSummaryFromParcelLocked(in);
    }
 else {
      u.mWifiRadioApWakeupCount=null;
    }
    int NW=in.readInt();
    if (NW > (MAX_WAKELOCKS_PER_UID + 1)) {
      throw new ParcelFormatException("String_Node_Str" + NW);
    }
    for (int iw=0; iw < NW; iw++) {
      String wlName=in.readString();
      u.readWakeSummaryFromParcelLocked(wlName,in);
    }
    int NS=in.readInt();
    if (NS > (MAX_WAKELOCKS_PER_UID + 1)) {
      throw new ParcelFormatException("String_Node_Str" + NS);
    }
    for (int is=0; is < NS; is++) {
      String name=in.readString();
      u.readSyncSummaryFromParcelLocked(name,in);
    }
    int NJ=in.readInt();
    if (NJ > (MAX_WAKELOCKS_PER_UID + 1)) {
      throw new ParcelFormatException("String_Node_Str" + NJ);
    }
    for (int ij=0; ij < NJ; ij++) {
      String name=in.readString();
      u.readJobSummaryFromParcelLocked(name,in);
    }
    int NP=in.readInt();
    if (NP > 1000) {
      throw new ParcelFormatException("String_Node_Str" + NP);
    }
    for (int is=0; is < NP; is++) {
      int seNumber=in.readInt();
      if (in.readInt() != 0) {
        u.getSensorTimerLocked(seNumber,true).readSummaryFromParcelLocked(in);
      }
    }
    NP=in.readInt();
    if (NP > 1000) {
      throw new ParcelFormatException("String_Node_Str" + NP);
    }
    for (int ip=0; ip < NP; ip++) {
      String procName=in.readString();
      Uid.Proc p=u.getProcessStatsLocked(procName);
      p.mUserTime=p.mLoadedUserTime=in.readLong();
      p.mSystemTime=p.mLoadedSystemTime=in.readLong();
      p.mForegroundTime=p.mLoadedForegroundTime=in.readLong();
      p.mStarts=p.mLoadedStarts=in.readInt();
      p.mNumCrashes=p.mLoadedNumCrashes=in.readInt();
      p.mNumAnrs=p.mLoadedNumAnrs=in.readInt();
      p.readExcessivePowerFromParcelLocked(in);
    }
    NP=in.readInt();
    if (NP > 10000) {
      throw new ParcelFormatException("String_Node_Str" + NP);
    }
    for (int ip=0; ip < NP; ip++) {
      String pkgName=in.readString();
      Uid.Pkg p=u.getPackageStatsLocked(pkgName);
      final int NWA=in.readInt();
      if (NWA > 1000) {
        throw new ParcelFormatException("String_Node_Str" + NWA);
      }
      p.mWakeupAlarms.clear();
      for (int iwa=0; iwa < NWA; iwa++) {
        String tag=in.readString();
        Counter c=new Counter(mOnBatteryTimeBase);
        c.readSummaryFromParcelLocked(in);
        p.mWakeupAlarms.put(tag,c);
      }
      NS=in.readInt();
      if (NS > 1000) {
        throw new ParcelFormatException("String_Node_Str" + NS);
      }
      for (int is=0; is < NS; is++) {
        String servName=in.readString();
        Uid.Pkg.Serv s=u.getServiceStatsLocked(pkgName,servName);
        s.mStartTime=s.mLoadedStartTime=in.readLong();
        s.mStarts=s.mLoadedStarts=in.readInt();
        s.mLaunches=s.mLoadedLaunches=in.readInt();
      }
    }
  }
}