Program: 181303
Project: 181303
Buggy source:
ActivityRecord(ActivityManagerService _service,ActivityStack _stack,ProcessRecord _caller,int _launchedFromUid,Intent _intent,String _resolvedType,ActivityInfo aInfo,Configuration _configuration,ActivityRecord _resultTo,String _resultWho,int _reqCode,boolean _componentSpecified){
  service=_service;
  stack=_stack;
  info=aInfo;
  launchedFromUid=_launchedFromUid;
  intent=_intent;
  shortComponentName=_intent.getComponent().flattenToShortString();
  resolvedType=_resolvedType;
  componentSpecified=_componentSpecified;
  configuration=_configuration;
  resultTo=_resultTo;
  resultWho=_resultWho;
  requestCode=_reqCode;
  state=ActivityState.INITIALIZING;
  frontOfTask=false;
  launchFailed=false;
  haveState=false;
  stopped=false;
  delayedResume=false;
  finishing=false;
  configDestroy=false;
  keysPaused=false;
  inHistory=false;
  persistent=false;
  visible=true;
  waitingVisible=false;
  nowVisible=false;
  thumbnailNeeded=false;
  idle=false;
  hasBeenLaunched=false;
  if (aInfo != null) {
    if (aInfo.targetActivity == null || aInfo.launchMode == ActivityInfo.LAUNCH_MULTIPLE || aInfo.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP) {
      realActivity=_intent.getComponent();
    }
 else {
      realActivity=new ComponentName(aInfo.packageName,aInfo.targetActivity);
    }
    taskAffinity=aInfo.taskAffinity;
    stateNotNeeded=(aInfo.flags & ActivityInfo.FLAG_STATE_NOT_NEEDED) != 0;
    baseDir=aInfo.applicationInfo.sourceDir;
    resDir=aInfo.applicationInfo.publicSourceDir;
    dataDir=aInfo.applicationInfo.dataDir;
    nonLocalizedLabel=aInfo.nonLocalizedLabel;
    labelRes=aInfo.labelRes;
    if (nonLocalizedLabel == null && labelRes == 0) {
      ApplicationInfo app=aInfo.applicationInfo;
      nonLocalizedLabel=app.nonLocalizedLabel;
      labelRes=app.labelRes;
    }
    icon=aInfo.getIconResource();
    theme=aInfo.getThemeResource();
    if ((aInfo.flags & ActivityInfo.FLAG_MULTIPROCESS) != 0 && _caller != null && (aInfo.applicationInfo.uid == Process.SYSTEM_UID || aInfo.applicationInfo.uid == _caller.info.uid)) {
      processName=_caller.processName;
    }
 else {
      processName=aInfo.processName;
    }
    if (intent != null && (aInfo.flags & ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS) != 0) {
      intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
    }
    packageName=aInfo.applicationInfo.packageName;
    launchMode=aInfo.launchMode;
    AttributeCache.Entry ent=AttributeCache.instance().get(packageName,theme != 0 ? theme : android.R.style.Theme,com.android.internal.R.styleable.Window);
    fullscreen=ent != null && !ent.array.getBoolean(com.android.internal.R.styleable.Window_windowIsFloating,false) && !ent.array.getBoolean(com.android.internal.R.styleable.Window_windowIsTranslucent,false);
    if (!_componentSpecified || _launchedFromUid == Process.myUid() || _launchedFromUid == 0) {
      if (Intent.ACTION_MAIN.equals(_intent.getAction()) && _intent.hasCategory(Intent.CATEGORY_HOME) && _intent.getCategories().size() == 1 && _intent.getData() == null && _intent.getType() == null && (intent.getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0 && !"String_Node_Str".equals(realActivity.getClassName())) {
        isHomeActivity=true;
      }
 else {
        isHomeActivity=false;
      }
    }
 else {
      isHomeActivity=false;
    }
  }
 else {
    realActivity=null;
    taskAffinity=null;
    stateNotNeeded=false;
    baseDir=null;
    resDir=null;
    dataDir=null;
    processName=null;
    packageName=null;
    fullscreen=true;
    isHomeActivity=false;
  }
}

Fixed version (ground truth):
ActivityRecord(ActivityManagerService _service,ActivityStack _stack,ProcessRecord _caller,int _launchedFromUid,Intent _intent,String _resolvedType,ActivityInfo aInfo,Configuration _configuration,ActivityRecord _resultTo,String _resultWho,int _reqCode,boolean _componentSpecified){
  service=_service;
  stack=_stack;
  info=aInfo;
  launchedFromUid=_launchedFromUid;
  intent=_intent;
  shortComponentName=_intent.getComponent().flattenToShortString();
  resolvedType=_resolvedType;
  componentSpecified=_componentSpecified;
  configuration=_configuration;
  resultTo=_resultTo;
  resultWho=_resultWho;
  requestCode=_reqCode;
  state=ActivityState.INITIALIZING;
  frontOfTask=false;
  launchFailed=false;
  haveState=false;
  stopped=false;
  delayedResume=false;
  finishing=false;
  configDestroy=false;
  keysPaused=false;
  inHistory=false;
  visible=true;
  waitingVisible=false;
  nowVisible=false;
  thumbnailNeeded=false;
  idle=false;
  hasBeenLaunched=false;
  if (aInfo != null) {
    if (aInfo.targetActivity == null || aInfo.launchMode == ActivityInfo.LAUNCH_MULTIPLE || aInfo.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP) {
      realActivity=_intent.getComponent();
    }
 else {
      realActivity=new ComponentName(aInfo.packageName,aInfo.targetActivity);
    }
    taskAffinity=aInfo.taskAffinity;
    stateNotNeeded=(aInfo.flags & ActivityInfo.FLAG_STATE_NOT_NEEDED) != 0;
    baseDir=aInfo.applicationInfo.sourceDir;
    resDir=aInfo.applicationInfo.publicSourceDir;
    dataDir=aInfo.applicationInfo.dataDir;
    nonLocalizedLabel=aInfo.nonLocalizedLabel;
    labelRes=aInfo.labelRes;
    if (nonLocalizedLabel == null && labelRes == 0) {
      ApplicationInfo app=aInfo.applicationInfo;
      nonLocalizedLabel=app.nonLocalizedLabel;
      labelRes=app.labelRes;
    }
    icon=aInfo.getIconResource();
    theme=aInfo.getThemeResource();
    if ((aInfo.flags & ActivityInfo.FLAG_MULTIPROCESS) != 0 && _caller != null && (aInfo.applicationInfo.uid == Process.SYSTEM_UID || aInfo.applicationInfo.uid == _caller.info.uid)) {
      processName=_caller.processName;
    }
 else {
      processName=aInfo.processName;
    }
    if (intent != null && (aInfo.flags & ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS) != 0) {
      intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
    }
    packageName=aInfo.applicationInfo.packageName;
    launchMode=aInfo.launchMode;
    AttributeCache.Entry ent=AttributeCache.instance().get(packageName,theme != 0 ? theme : android.R.style.Theme,com.android.internal.R.styleable.Window);
    fullscreen=ent != null && !ent.array.getBoolean(com.android.internal.R.styleable.Window_windowIsFloating,false) && !ent.array.getBoolean(com.android.internal.R.styleable.Window_windowIsTranslucent,false);
    if (!_componentSpecified || _launchedFromUid == Process.myUid() || _launchedFromUid == 0) {
      if (Intent.ACTION_MAIN.equals(_intent.getAction()) && _intent.hasCategory(Intent.CATEGORY_HOME) && _intent.getCategories().size() == 1 && _intent.getData() == null && _intent.getType() == null && (intent.getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0 && !"String_Node_Str".equals(realActivity.getClassName())) {
        isHomeActivity=true;
      }
 else {
        isHomeActivity=false;
      }
    }
 else {
      isHomeActivity=false;
    }
  }
 else {
    realActivity=null;
    taskAffinity=null;
    stateNotNeeded=false;
    baseDir=null;
    resDir=null;
    dataDir=null;
    processName=null;
    packageName=null;
    fullscreen=true;
    isHomeActivity=false;
  }
}