Program: 103758
Project: 103758
Buggy source:
/** 
 * Implements the <tt>ListCellRenderer</tt> method. Returns this panel that has been configured to display a chat contact.
 * @param list the source list
 * @param value the value of the current cell
 * @param index the index of the current cell in the source list
 * @param isSelected indicates if this cell is selected
 * @param cellHasFocus indicates if this cell is focused
 * @return this panel
 */
@Override public Component getListCellRendererComponent(JList list,Object value,int index,boolean isSelected,boolean cellHasFocus){
  this.index=index;
  this.rightLabel.setIcon(null);
  final ChatContact chatContact=(ChatContact)value;
  ChatRoomMember member=null;
  if (chatContact.getDescriptor() instanceof ChatRoomMember)   member=(ChatRoomMember)chatContact.getDescriptor();
  this.setPreferredSize(new Dimension(20,30));
  String displayName=chatContact.getName();
  if (displayName == null || displayName.length() < 1) {
    displayName=GuiActivator.getResources().getI18NString("String_Node_Str");
  }
  this.nameLabel.setFont(this.getFont().deriveFont(Font.PLAIN));
  this.nameLabel.setText(displayName);
  if (member != null)   if (member.getRole() != null)   this.nameLabel.setIcon(ChatContactRoleIcon.getRoleIcon(member.getRole()));
  if (contactForegroundColor != null)   this.nameLabel.setForeground(contactForegroundColor);
  this.setBorder(BorderFactory.createEmptyBorder(1,5,1,1));
  ImageIcon avatar=chatContact.getAvatar();
  if (avatar != null)   this.rightLabel.setIcon(avatar);
 else   if (member != null) {
    if (chatContact.getName().equals(member.getChatRoom().getUserNickname())) {
      OperationSetServerStoredAccountInfo opSet=member.getChatRoom().getParentProvider().getOperationSet(OperationSetServerStoredAccountInfo.class);
      Iterator<GenericDetail> itr=opSet.getAllAvailableDetails();
      while (itr.hasNext()) {
        GenericDetail detail=itr.next();
        if (detail instanceof BinaryDetail) {
          BinaryDetail bin=(BinaryDetail)detail;
          if (bin.getBytes() != null)           this.rightLabel.setIcon(ImageUtils.getScaledRoundedIcon(bin.getBytes(),25,25));
          break;
        }
      }
      ChatRoomMemberRole role=member.getChatRoom().getUserRole();
      if (role != null)       this.nameLabel.setIcon(ChatContactRoleIcon.getRoleIcon(role));
    }
 else {
      OperationSetPersistentPresence opSet=member.getChatRoom().getParentProvider().getOperationSet(OperationSetPersistentPresence.class);
      Contact c=opSet.findContactByID(member.getContactAddress());
      if (opSet != null && c != null && c.getImage() != null)       this.rightLabel.setIcon(ImageUtils.getScaledRoundedIcon(c.getImage(),25,25));
    }
  }
  this.setBounds(0,0,list.getWidth() - 2,30);
  this.nameLabel.setBounds(0,0,list.getWidth() - 28,17);
  this.rightLabel.setBounds(list.getWidth() - 28,0,25,30);
  this.isLeaf=true;
  this.isSelected=isSelected;
  return this;
}

Fixed version (ground truth):
/** 
 * Implements the <tt>ListCellRenderer</tt> method. Returns this panel that has been configured to display a chat contact.
 * @param list the source list
 * @param value the value of the current cell
 * @param index the index of the current cell in the source list
 * @param isSelected indicates if this cell is selected
 * @param cellHasFocus indicates if this cell is focused
 * @return this panel
 */
@Override public Component getListCellRendererComponent(JList list,Object value,int index,boolean isSelected,boolean cellHasFocus){
  this.index=index;
  this.rightLabel.setIcon(null);
  final ChatContact chatContact=(ChatContact)value;
  ChatRoomMember member=null;
  if (chatContact.getDescriptor() instanceof ChatRoomMember)   member=(ChatRoomMember)chatContact.getDescriptor();
  this.setPreferredSize(new Dimension(20,30));
  String displayName=chatContact.getName();
  if (displayName == null || displayName.length() < 1) {
    displayName=GuiActivator.getResources().getI18NString("String_Node_Str");
  }
  this.nameLabel.setFont(this.getFont().deriveFont(Font.PLAIN));
  this.nameLabel.setText(displayName);
  if (member != null) {
    ChatRoomMemberRole memberRole=member.getRole();
    if (memberRole != null)     this.nameLabel.setIcon(ChatContactRoleIcon.getRoleIcon(memberRole));
  }
  if (contactForegroundColor != null)   this.nameLabel.setForeground(contactForegroundColor);
  this.setBorder(BorderFactory.createEmptyBorder(1,5,1,1));
  ImageIcon avatar=chatContact.getAvatar();
  if (avatar != null)   this.rightLabel.setIcon(avatar);
 else   if (member != null) {
    ChatRoom memberChatRoom=member.getChatRoom();
    ProtocolProviderService protocolProvider=memberChatRoom.getParentProvider();
    if (chatContact.getName().equals(memberChatRoom.getUserNickname())) {
      OperationSetServerStoredAccountInfo opSet=protocolProvider.getOperationSet(OperationSetServerStoredAccountInfo.class);
      if (opSet != null) {
        Iterator<GenericDetail> itr=opSet.getAllAvailableDetails();
        while (itr.hasNext()) {
          GenericDetail detail=itr.next();
          if (detail instanceof BinaryDetail) {
            BinaryDetail bin=(BinaryDetail)detail;
            byte[] binBytes=bin.getBytes();
            if (binBytes != null)             this.rightLabel.setIcon(ImageUtils.getScaledRoundedIcon(binBytes,25,25));
            break;
          }
        }
      }
      ChatRoomMemberRole role;
      try {
        role=memberChatRoom.getUserRole();
      }
 catch (      UnsupportedOperationException uoex) {
        role=member.getRole();
      }
      if (role != null)       this.nameLabel.setIcon(ChatContactRoleIcon.getRoleIcon(role));
    }
 else {
      OperationSetPersistentPresence opSet=protocolProvider.getOperationSet(OperationSetPersistentPresence.class);
      if (opSet != null) {
        Contact c=opSet.findContactByID(member.getContactAddress());
        if (c != null) {
          byte[] cImage=c.getImage();
          if (cImage != null)           this.rightLabel.setIcon(ImageUtils.getScaledRoundedIcon(cImage,25,25));
        }
      }
    }
  }
  this.setBounds(0,0,list.getWidth() - 2,30);
  this.nameLabel.setBounds(0,0,list.getWidth() - 28,17);
  this.rightLabel.setBounds(list.getWidth() - 28,0,25,30);
  this.isLeaf=true;
  this.isSelected=isSelected;
  return this;
}