Program: 141915
Project: 141915
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  ImageView imageView=null;
  TextView editText=null;
  View view=null;
  try {
    if (convertView == null) {
      LayoutInflater inflater=(LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView=inflater.inflate(R.layout.device_cell,parent,false);
      view=rowView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      imageView.setPadding(8,8,8,8);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
 else {
      view=(View)convertView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
    Entity ent=ReceivedData.get().Groups.get(position);
    if (ent == null) {
      imageView.setVisibility(View.INVISIBLE);
      editText.setVisibility(View.INVISIBLE);
      return view;
    }
    imageView.setVisibility(View.VISIBLE);
    imageView.setImageBitmap(ent.getImage(ctx));
    editText.setText(ent.getName());
    final TextView finalEditText=editText;
    final View finalView=view;
    ent.setNameChangedListener(new Entity.NameChangedListener(){
      @Override public void onNameChanged(      String name){
        finalEditText.setText(name);
        finalView.invalidate();
      }
    }
);
    if (mEntityManager.isInEntitySelection(Type.DEVICE,mEntitySelection,ent.getId())) {
      imageView.setBackgroundColor(SelectionColor);
    }
 else {
      imageView.setBackgroundColor(Color.TRANSPARENT);
    }
  }
 catch (  Exception e) {
    e.toString();
  }
  return view;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  ImageView imageView=null;
  TextView editText=null;
  View view=null;
  try {
    if (convertView == null) {
      LayoutInflater inflater=(LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView=inflater.inflate(R.layout.device_cell,parent,false);
      view=rowView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      imageView.setPadding(8,8,8,8);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
 else {
      view=(View)convertView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
    Entity ent=ReceivedData.get().Groups.get(position);
    if (ent == null) {
      imageView.setVisibility(View.INVISIBLE);
      editText.setVisibility(View.INVISIBLE);
      return view;
    }
    imageView.setVisibility(View.VISIBLE);
    imageView.setImageBitmap(ent.getImage(ctx));
    editText.setText(ent.getName());
    final TextView finalEditText=editText;
    ent.setNameChangedListener(new Entity.NameChangedListener(){
      @Override public void onNameChanged(      String name){
        finalEditText.setText(name);
        notifyDataSetChanged();
      }
    }
);
    if (mEntityManager.isInEntitySelection(Type.GROUP,mEntitySelection,ent.getId())) {
      imageView.setBackgroundColor(SelectionColor);
    }
 else {
      imageView.setBackgroundColor(Color.TRANSPARENT);
    }
  }
 catch (  Exception e) {
    e.toString();
  }
  return view;
}