Program: 162634
Project: 162634
Buggy source:
public View getView(int position,View convertView,ViewGroup parent){
  final Layoutelements rowItem=getItem(position);
  if (main.aBoolean) {
    View view=convertView;
    final int p=position;
    if (convertView == null) {
      LayoutInflater mInflater=(LayoutInflater)context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
      view=mInflater.inflate(R.layout.rowlayout,parent,false);
      final ViewHolder vholder=new ViewHolder();
      vholder.txtTitle=(TextView)view.findViewById(R.id.firstline);
      vholder.viewmageV=(CircularImageView)view.findViewById(R.id.cicon);
      vholder.imageView=(ImageView)view.findViewById(R.id.icon);
      vholder.rl=view.findViewById(R.id.second);
      vholder.perm=(TextView)view.findViewById(R.id.permis);
      vholder.date=(TextView)view.findViewById(R.id.date);
      vholder.txtDesc=(TextView)view.findViewById(R.id.secondLine);
      view.setTag(vholder);
      GradientDrawable gradientDrawable=(GradientDrawable)vholder.imageView.getBackground();
      gradientDrawable.setColor(Color.parseColor(main.skin));
    }
    final ViewHolder holder=(ViewHolder)view.getTag();
    Boolean checked=myChecked.get(position);
    if (checked != null) {
      if (checked) {
        holder.rl.setBackgroundColor(main.skinselection);
      }
 else {
        if (main.uimode == 0) {
          holder.rl.setBackgroundResource(R.drawable.listitem1);
        }
 else         if (main.uimode == 1) {
          holder.rl.setBackgroundResource(R.drawable.bg_card);
        }
      }
    }
    holder.rl.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        main.onListItemClicked(p,v);
      }
    }
);
    holder.rl.setOnLongClickListener(new View.OnLongClickListener(){
      public boolean onLongClick(      View p1){
        if (main.results) {
          utils.longClickSearchItem(main,rowItem.getDesc());
        }
 else         if (!main.selection) {
          if (main.current.equals("String_Node_Str")) {
            toggleChecked(p);
          }
 else           if (p != 0) {
            toggleChecked(p);
          }
        }
        return true;
      }
    }
);
    holder.txtTitle.setText(rowItem.getTitle());
    holder.imageView.setImageDrawable(rowItem.getImageId());
    holder.imageView.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        toggleChecked(p);
      }
    }
);
    holder.viewmageV.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        toggleChecked(p);
      }
    }
);
    holder.imageView.setVisibility(View.VISIBLE);
    holder.viewmageV.setVisibility(View.INVISIBLE);
    if (Icons.isPicture((rowItem.getDesc().toLowerCase()))) {
      holder.imageView.setVisibility(View.GONE);
      holder.viewmageV.setVisibility(View.VISIBLE);
      holder.viewmageV.setImageDrawable(main.getResources().getDrawable(R.drawable.ic_doc_image));
      main.ic.cancelLoad(holder.viewmageV);
      main.ic.loadDrawable(holder.viewmageV,new File(rowItem.getDesc()),null);
    }
 else     if (Icons.isApk((rowItem.getDesc()))) {
      main.ic.cancelLoad(holder.imageView);
      main.ic.loadDrawable(holder.imageView,new File(rowItem.getDesc()),main.getResources().getDrawable(R.drawable.ic_doc_apk));
    }
    if (checked != null) {
      if (checked)       holder.imageView.setImageDrawable(main.getResources().getDrawable(R.drawable.abc_ic_cab_done_holo_dark));
    }
    if (main.showPermissions)     holder.perm.setText(rowItem.getPermissions());
    if (main.showLastModified)     holder.date.setText(rowItem.getDate("String_Node_Str"));
    if (main.showSize)     holder.txtDesc.setText(rowItem.getSize());
    return view;
  }
 else {
    View view;
    final int p=position;
    if (convertView == null) {
      LayoutInflater mInflater=(LayoutInflater)context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
      view=mInflater.inflate(R.layout.griditem,parent,false);
      final ViewHolder vholder=new ViewHolder();
      vholder.rl=view.findViewById(R.id.frame);
      vholder.txtTitle=(TextView)view.findViewById(R.id.title);
      vholder.imageView=(ImageView)view.findViewById(R.id.icon_mime);
      vholder.imageView1=(ImageView)view.findViewById(R.id.icon_thumb);
      vholder.date=(TextView)view.findViewById(R.id.date);
      vholder.txtDesc=(TextView)view.findViewById(R.id.size);
      vholder.perm=(TextView)view.findViewById(R.id.perm);
      if (main.theme == 1)       view.findViewById(R.id.icon_frame).setBackgroundColor(Color.parseColor("String_Node_Str"));
      view.setTag(vholder);
    }
 else {
      view=convertView;
    }
    final ViewHolder holder=(ViewHolder)view.getTag();
    Boolean checked=myChecked.get(position);
    if (checked != null) {
      if (checked) {
        holder.rl.setBackgroundColor(main.skinselection);
      }
 else {
        if (main.uimode == 0) {
          if (main.theme == 0)           holder.rl.setBackgroundResource(R.drawable.item_doc_grid);
 else           holder.rl.setBackgroundResource(R.drawable.ic_grid_card_background_dark);
        }
 else         if (main.uimode == 1) {
          holder.rl.setBackgroundResource(R.drawable.bg_card);
        }
      }
    }
    holder.rl.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        main.onListItemClicked(p,v);
      }
    }
);
    holder.rl.setOnLongClickListener(new View.OnLongClickListener(){
      public boolean onLongClick(      View p1){
        if (main.results) {
          utils.longClickSearchItem(main,rowItem.getDesc());
        }
 else         if (main.current.equals("String_Node_Str")) {
          toggleChecked(p);
        }
 else         if (p != 0) {
          toggleChecked(p);
        }
        return true;
      }
    }
);
    holder.txtTitle.setText(rowItem.getTitle());
    holder.imageView1.setVisibility(View.INVISIBLE);
    holder.imageView.setVisibility(View.VISIBLE);
    holder.imageView.setColorFilter(colorMatrixColorFilter);
    holder.imageView.setImageDrawable(rowItem.getImageId());
    if (Icons.isPicture((rowItem.getDesc().toLowerCase()))) {
      holder.imageView.setColorFilter(null);
      holder.imageView1.setVisibility(View.VISIBLE);
      holder.imageView1.setImageDrawable(null);
      if (main.theme == 1)       holder.imageView1.setBackgroundColor(Color.parseColor("String_Node_Str"));
      main.ic.cancelLoad(holder.imageView1);
      main.ic.loadDrawable(holder.imageView1,new File(rowItem.getDesc()),null);
    }
    if (Icons.isApk((rowItem.getDesc()))) {
      holder.imageView.setColorFilter(null);
      main.ic.cancelLoad(holder.imageView);
      main.ic.loadDrawable(holder.imageView,new File(rowItem.getDesc()),main.getResources().getDrawable(R.drawable.ic_doc_apk));
    }
    if (main.showLastModified)     holder.date.setText(rowItem.getDate("String_Node_Str"));
    if (main.showSize)     holder.txtDesc.setText(rowItem.getSize());
    if (main.showPermissions)     holder.perm.setText(rowItem.getPermissions());
    return view;
  }
}

Fixed version (ground truth):
public View getView(int position,View convertView,ViewGroup parent){
  final Layoutelements rowItem=getItem(position);
  if (main.aBoolean) {
    View view=convertView;
    final int p=position;
    if (convertView == null) {
      LayoutInflater mInflater=(LayoutInflater)context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
      view=mInflater.inflate(R.layout.rowlayout,parent,false);
      final ViewHolder vholder=new ViewHolder();
      vholder.txtTitle=(TextView)view.findViewById(R.id.firstline);
      vholder.viewmageV=(CircularImageView)view.findViewById(R.id.cicon);
      vholder.imageView=(ImageView)view.findViewById(R.id.icon);
      vholder.rl=view.findViewById(R.id.second);
      vholder.perm=(TextView)view.findViewById(R.id.permis);
      vholder.date=(TextView)view.findViewById(R.id.date);
      vholder.txtDesc=(TextView)view.findViewById(R.id.secondLine);
      view.setTag(vholder);
      GradientDrawable gradientDrawable=(GradientDrawable)vholder.imageView.getBackground();
      gradientDrawable.setColor(Color.parseColor(main.skin));
    }
    final ViewHolder holder=(ViewHolder)view.getTag();
    Boolean checked=myChecked.get(position);
    if (checked != null) {
      if (checked) {
        holder.rl.setBackgroundColor(main.skinselection);
      }
 else {
        if (main.uimode == 0) {
          holder.rl.setBackgroundResource(R.drawable.listitem1);
        }
 else         if (main.uimode == 1) {
          holder.rl.setBackgroundResource(R.drawable.bg_card);
        }
      }
    }
    holder.rl.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        main.onListItemClicked(p,v);
      }
    }
);
    holder.rl.setOnLongClickListener(new View.OnLongClickListener(){
      public boolean onLongClick(      View p1){
        if (main.results) {
          utils.longClickSearchItem(main,rowItem.getDesc());
        }
 else         if (!main.selection) {
          if (main.current.equals("String_Node_Str")) {
            toggleChecked(p);
          }
 else           if (p != 0) {
            toggleChecked(p);
          }
        }
        return true;
      }
    }
);
    holder.txtTitle.setText(rowItem.getTitle());
    holder.imageView.setImageDrawable(rowItem.getImageId());
    holder.imageView.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        if (!rowItem.getSize().equals("String_Node_Str"))         toggleChecked(p);
 else         main.goBack();
      }
    }
);
    holder.viewmageV.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        if (!rowItem.getSize().equals("String_Node_Str"))         toggleChecked(p);
 else         main.goBack();
      }
    }
);
    holder.imageView.setVisibility(View.VISIBLE);
    holder.viewmageV.setVisibility(View.INVISIBLE);
    if (Icons.isPicture((rowItem.getDesc().toLowerCase()))) {
      holder.imageView.setVisibility(View.GONE);
      holder.viewmageV.setVisibility(View.VISIBLE);
      holder.viewmageV.setImageDrawable(rowItem.getImageId());
      main.ic.cancelLoad(holder.viewmageV);
      main.ic.loadDrawable(holder.viewmageV,new File(rowItem.getDesc()),null);
    }
 else     if (Icons.isApk((rowItem.getDesc()))) {
      main.ic.cancelLoad(holder.imageView);
      main.ic.loadDrawable(holder.imageView,new File(rowItem.getDesc()),null);
    }
    if (checked != null) {
      if (checked)       holder.imageView.setImageDrawable(main.getResources().getDrawable(R.drawable.abc_ic_cab_done_holo_dark));
    }
    if (main.showPermissions)     holder.perm.setText(rowItem.getPermissions());
    if (main.showLastModified)     holder.date.setText(rowItem.getDate("String_Node_Str"));
    if (main.showSize)     holder.txtDesc.setText(rowItem.getSize());
    return view;
  }
 else {
    View view;
    final int p=position;
    if (convertView == null) {
      LayoutInflater mInflater=(LayoutInflater)context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
      view=mInflater.inflate(R.layout.griditem,parent,false);
      final ViewHolder vholder=new ViewHolder();
      vholder.rl=view.findViewById(R.id.frame);
      vholder.txtTitle=(TextView)view.findViewById(R.id.title);
      vholder.imageView=(ImageView)view.findViewById(R.id.icon_mime);
      vholder.imageView1=(ImageView)view.findViewById(R.id.icon_thumb);
      vholder.date=(TextView)view.findViewById(R.id.date);
      vholder.txtDesc=(TextView)view.findViewById(R.id.size);
      vholder.perm=(TextView)view.findViewById(R.id.perm);
      if (main.theme == 1)       view.findViewById(R.id.icon_frame).setBackgroundColor(Color.parseColor("String_Node_Str"));
      view.setTag(vholder);
    }
 else {
      view=convertView;
    }
    final ViewHolder holder=(ViewHolder)view.getTag();
    Boolean checked=myChecked.get(position);
    if (checked != null) {
      if (checked) {
        holder.rl.setBackgroundColor(main.skinselection);
      }
 else {
        if (main.uimode == 0) {
          if (main.theme == 0)           holder.rl.setBackgroundResource(R.drawable.item_doc_grid);
 else           holder.rl.setBackgroundResource(R.drawable.ic_grid_card_background_dark);
        }
 else         if (main.uimode == 1) {
          holder.rl.setBackgroundResource(R.drawable.bg_card);
        }
      }
    }
    holder.rl.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        main.onListItemClicked(p,v);
      }
    }
);
    holder.rl.setOnLongClickListener(new View.OnLongClickListener(){
      public boolean onLongClick(      View p1){
        if (main.results) {
          utils.longClickSearchItem(main,rowItem.getDesc());
        }
 else         if (main.current.equals("String_Node_Str")) {
          toggleChecked(p);
        }
 else         if (p != 0) {
          toggleChecked(p);
        }
        return true;
      }
    }
);
    holder.txtTitle.setText(rowItem.getTitle());
    holder.imageView1.setVisibility(View.INVISIBLE);
    holder.imageView.setVisibility(View.VISIBLE);
    holder.imageView.setColorFilter(colorMatrixColorFilter);
    holder.imageView.setImageDrawable(rowItem.getImageId());
    if (Icons.isPicture((rowItem.getDesc().toLowerCase()))) {
      holder.imageView.setColorFilter(null);
      holder.imageView1.setVisibility(View.VISIBLE);
      holder.imageView1.setImageDrawable(null);
      if (main.theme == 1)       holder.imageView1.setBackgroundColor(Color.parseColor("String_Node_Str"));
      main.ic.cancelLoad(holder.imageView1);
      main.ic.loadDrawable(holder.imageView1,new File(rowItem.getDesc()),null);
    }
    if (Icons.isApk((rowItem.getDesc()))) {
      holder.imageView.setColorFilter(null);
      main.ic.cancelLoad(holder.imageView);
      main.ic.loadDrawable(holder.imageView,new File(rowItem.getDesc()),null);
    }
    if (main.showLastModified)     holder.date.setText(rowItem.getDate("String_Node_Str"));
    if (main.showSize)     holder.txtDesc.setText(rowItem.getSize());
    if (main.showPermissions)     holder.perm.setText(rowItem.getPermissions());
    return view;
  }
}