Program: 131012
Project: 131012
Buggy source:
@Override public View getView(int position,View view,ViewGroup parent){
  int type=getItemViewType(position);
  Object value=values.get(position);
  ViewHolder viewHolder;
  if (view == null) {
    viewHolder=new ViewHolder();
    if (type == TYPE_DIRECTORY) {
      view=inflater.inflate(R.layout.folder_item,parent,false);
      viewHolder.title=(TextView)view.findViewById(R.id.textViewFolderItemFolder);
      viewHolder.menu=(ImageButton)view.findViewById(R.id.buttonMenu);
    }
 else     if (type == TYPE_SONG) {
      view=inflater.inflate(R.layout.song_item,parent,false);
      viewHolder.title=(TextView)view.findViewById(R.id.textViewSongItemTitle);
      viewHolder.artist=(TextView)view.findViewById(R.id.textViewSongItemArtist);
      viewHolder.image=(ImageView)view.findViewById(R.id.imageViewItemImage);
      viewHolder.card=view.findViewById(R.id.card);
      viewHolder.menu=(ImageButton)view.findViewById(R.id.buttonMenu);
    }
  }
 else {
    viewHolder=(ViewHolder)view.getTag();
  }
  if (type == TYPE_DIRECTORY) {
    final File file=(File)value;
    viewHolder.title.setText(file.getName());
    final PopupMenu popup=new PopupMenu(fragment.getActivity(),viewHolder.menu);
    popup.getMenuInflater().inflate(R.menu.contextmenu_browserdirectory,popup.getMenu());
    popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
      public boolean onMenuItemClick(      MenuItem item){
switch (item.getItemId()) {
case R.id.menu_addFolderToPlaylist:
          AddToPlaylistDialog.showDialog(activity,file);
        return true;
case R.id.menu_setAsBaseFolder:
      activity.setBaseFolder(file);
    return true;
}
return true;
}
}
);
viewHolder.menu.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View view){
popup.show();
}
}
);
}
 else if (type == TYPE_SONG) {
final BrowserSong song=(BrowserSong)value;
String trackNumber="String_Node_Str";
if (song.getTrackNumber() != null) trackNumber=song.getTrackNumber() + "String_Node_Str";
viewHolder.title.setText(trackNumber + song.getTitle());
viewHolder.artist.setText(song.getArtist());
if (song.equals(playingSong)) {
viewHolder.card.setBackgroundResource(R.drawable.card_playing);
viewHolder.image.setImageResource(R.drawable.play_orange);
}
 else {
viewHolder.card.setBackgroundResource(R.drawable.card);
viewHolder.image.setImageDrawable(songImage);
if (song.hasImage()) {
imagesCache.getImageAsync(song,viewHolder.image);
}
}
viewHolder.menu.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View view){
AddToPlaylistDialog.showDialog(activity,song);
}
}
);
}
viewHolder.menu.setFocusable(false);
view.setTag(viewHolder);
return view;
}

Fixed version (ground truth):
@Override public View getView(int position,View view,ViewGroup parent){
  int type=getItemViewType(position);
  Object value=values.get(position);
  ViewHolder viewHolder;
  if (view == null) {
    viewHolder=new ViewHolder();
    if (type == TYPE_DIRECTORY) {
      view=inflater.inflate(R.layout.folder_item,parent,false);
      viewHolder.title=(TextView)view.findViewById(R.id.textViewFolderItemFolder);
      viewHolder.menu=(ImageButton)view.findViewById(R.id.buttonMenu);
    }
 else     if (type == TYPE_SONG) {
      view=inflater.inflate(R.layout.song_item,parent,false);
      viewHolder.title=(TextView)view.findViewById(R.id.textViewSongItemTitle);
      viewHolder.artist=(TextView)view.findViewById(R.id.textViewSongItemArtist);
      viewHolder.image=(ImageView)view.findViewById(R.id.imageViewItemImage);
      viewHolder.card=view.findViewById(R.id.card);
      viewHolder.menu=(ImageButton)view.findViewById(R.id.buttonMenu);
    }
  }
 else {
    viewHolder=(ViewHolder)view.getTag();
  }
  if (type == TYPE_DIRECTORY) {
    final File file=(File)value;
    viewHolder.title.setText(file.getName());
    final PopupMenu popup=new PopupMenu(fragment.getActivity(),viewHolder.menu);
    popup.getMenuInflater().inflate(R.menu.contextmenu_browserdirectory,popup.getMenu());
    popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
      public boolean onMenuItemClick(      MenuItem item){
switch (item.getItemId()) {
case R.id.menu_addFolderToPlaylist:
          AddToPlaylistDialog.showDialog(activity,file);
        return true;
case R.id.menu_setAsBaseFolder:
      activity.setBaseFolder(file);
    return true;
}
return true;
}
}
);
viewHolder.menu.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View view){
popup.show();
}
}
);
}
 else if (type == TYPE_SONG) {
final BrowserSong song=(BrowserSong)value;
String trackNumber="String_Node_Str";
if (song.getTrackNumber() != null) trackNumber=song.getTrackNumber() + "String_Node_Str";
viewHolder.title.setText(trackNumber + song.getTitle());
viewHolder.artist.setText(song.getArtist());
if (song.equals(playingSong)) {
viewHolder.card.setBackgroundResource(R.drawable.card_playing);
viewHolder.image.setImageResource(R.drawable.play_orange);
}
 else {
viewHolder.card.setBackgroundResource(R.drawable.card);
viewHolder.image.setImageResource(R.drawable.audio);
if (song.hasImage()) {
imagesCache.getImageAsync(song,viewHolder.image);
}
}
viewHolder.menu.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View view){
AddToPlaylistDialog.showDialog(activity,song);
}
}
);
}
viewHolder.menu.setFocusable(false);
view.setTag(viewHolder);
return view;
}