Program: 141862
Project: 141862
Buggy source:
@Override public View getView(final int position,View convertView,ViewGroup parent){
  final ViewHolder holder;
  LayoutInflater inflater=context.getLayoutInflater();
  if (convertView == null) {
    convertView=inflater.inflate(R.layout.installed_apps,null);
    holder=new ViewHolder();
    holder.apkName=(TextView)convertView.findViewById(R.id.appname);
    holder.apkName.setTypeface(Typeface.createFromAsset(context.getAssets(),"String_Node_Str"));
    holder.ck1=(CheckBox)convertView.findViewById(R.id.checkBox1);
    holder.packageName=(TextView)convertView.findViewById(R.id.app_package);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  final PackageInfo packageInfo=(PackageInfo)getItem(position);
  Drawable appIcon=packageManager.getApplicationIcon(packageInfo.applicationInfo);
  PACKAGE_NAME=packageInfo.packageName;
  final String appName=packageManager.getApplicationLabel(packageInfo.applicationInfo).toString();
  appIcon.setBounds(0,0,80,80);
  holder.apkName.setCompoundDrawables(appIcon,null,null,null);
  holder.apkName.setCompoundDrawablePadding(15);
  holder.apkName.setText(appName);
  holder.ck1.setChecked(false);
  if (itemChecked[position])   holder.ck1.setChecked(true);
 else   holder.ck1.setChecked(false);
  checked=new HashSet();
  PACKAGE_NAME=packageInfo.packageName;
  sharedPrefs=context.getSharedPreferences(context.getApplicationContext().getPackageName(),Context.MODE_PRIVATE);
  sharedPrefsapp=context.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  holder.ck1.setChecked(sharedPrefs.getBoolean(PACKAGE_NAME,false));
  endTimerPreferences=context.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  timerends=endTimerPreferences.getLong("String_Node_Str",0);
  if (System.currentTimeMillis() < timerends) {
    if (holder.ck1.isChecked()) {
      holder.ck1.setClickable(false);
      holder.ck1.setEnabled(false);
    }
  }
  holder.ck1.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      SharedPreferences.Editor editor=context.getSharedPreferences(context.getApplicationContext().getPackageName(),Context.MODE_PRIVATE).edit();
      SharedPreferences.Editor editorapp=context.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE).edit();
      if (holder.ck1.isChecked()) {
        itemChecked[position]=true;
        holder.ck1.setChecked(true);
        editor.putBoolean(packageInfo.packageName,true);
        editorapp.putString(packageInfo.packageName,packageInfo.packageName);
        editor.apply();
        editorapp.apply();
      }
 else {
        itemChecked[position]=false;
        holder.ck1.setChecked(false);
        editor.putBoolean(packageInfo.packageName,false);
        editorapp.remove(packageInfo.packageName);
        editor.apply();
        editorapp.apply();
      }
    }
  }
);
  return convertView;
}

Fixed version (ground truth):
@Override public View getView(final int position,View convertView,ViewGroup parent){
  final ViewHolder holder;
  LayoutInflater inflater=context.getLayoutInflater();
  if (convertView == null) {
    convertView=inflater.inflate(R.layout.installed_apps,null);
    holder=new ViewHolder();
    holder.apkName=(TextView)convertView.findViewById(R.id.appname);
    holder.apkName.setTypeface(Typeface.createFromAsset(context.getAssets(),"String_Node_Str"));
    holder.ck1=(CheckBox)convertView.findViewById(R.id.checkBox1);
    holder.packageName=(TextView)convertView.findViewById(R.id.app_package);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  final PackageInfo packageInfo=(PackageInfo)getItem(position);
  Drawable appIcon=packageManager.getApplicationIcon(packageInfo.applicationInfo);
  PACKAGE_NAME=packageInfo.packageName;
  final String appName=packageManager.getApplicationLabel(packageInfo.applicationInfo).toString();
  appIcon.setBounds(0,0,80,80);
  holder.apkName.setCompoundDrawables(appIcon,null,null,null);
  holder.apkName.setCompoundDrawablePadding(15);
  holder.apkName.setText(appName);
  holder.ck1.setChecked(false);
  if (itemChecked[position])   holder.ck1.setChecked(true);
 else   holder.ck1.setChecked(false);
  checked=new HashSet();
  PACKAGE_NAME=packageInfo.packageName;
  sharedPrefs=context.getSharedPreferences(context.getApplicationContext().getPackageName(),Context.MODE_PRIVATE);
  sharedPrefsapp=context.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  holder.ck1.setChecked(sharedPrefs.getBoolean(PACKAGE_NAME,false));
  endTimerPreferences=context.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  timerends=endTimerPreferences.getLong("String_Node_Str",0);
  if (System.currentTimeMillis() < timerends) {
    if (holder.ck1.isChecked()) {
      holder.ck1.setClickable(false);
      holder.ck1.setEnabled(false);
    }
 else {
      holder.ck1.setClickable(true);
      holder.ck1.setEnabled(true);
    }
  }
  holder.ck1.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      SharedPreferences.Editor editor=context.getSharedPreferences(context.getApplicationContext().getPackageName(),Context.MODE_PRIVATE).edit();
      SharedPreferences.Editor editorapp=context.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE).edit();
      if (holder.ck1.isChecked()) {
        itemChecked[position]=true;
        holder.ck1.setChecked(true);
        editor.putBoolean(packageInfo.packageName,true);
        editorapp.putString(packageInfo.packageName,packageInfo.packageName);
        editor.apply();
        editorapp.apply();
      }
 else {
        itemChecked[position]=false;
        holder.ck1.setChecked(false);
        editor.putBoolean(packageInfo.packageName,false);
        editorapp.remove(packageInfo.packageName);
        editor.apply();
        editorapp.apply();
      }
    }
  }
);
  return convertView;
}