Program: 40418
Project: 40418
Buggy source:
@Override public void loadArtistTopTracks(ArtistSpecificsTopTracksContract.View view){
  lastFmApiClient.getLastFmApiService().getArtistTopTracks(artist.getName(),LIMIT).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<ArtistTopTracks>(){
    @Override public void onSubscribe(    Disposable d){
      detailView.showProgressBar();
      compositeDisposable.add(d);
    }
    @Override public void onNext(    ArtistTopTracks artistTopTracks){
      List<BarEntry> entries=new ArrayList<>();
      List<String> labels=new ArrayList<>();
      List<Track> tracks=artistTopTracks.getToptracks().getTrack();
      if (tracks == null || tracks.isEmpty())       return;
      Collections.sort(tracks,(o1,o2) -> Integer.valueOf(o2.getPlaycount()).compareTo(Integer.valueOf(o1.getPlaycount())));
      int counter=0;
      for (int i=tracks.size() - 1; i >= 0; i--) {
        Track track=tracks.get(i);
        float playcount=Float.parseFloat(track.getPlaycount());
        entries.add(new BarEntry(counter,playcount >= 0 ? playcount : 0f,track.getName()));
        labels.add(track.getName());
        counter++;
      }
      BarDataSet barDataSet=new BarDataSet(entries,BAR_CHART_TITLE);
      BarData barData=new BarData(barDataSet);
      HorizontalBarChart barChart=view.getHorizontalBarChart();
      configureBarChart(labels,barDataSet,barData,barChart);
    }
    @Override public void onError(    Throwable e){
      AppLog.log(TAG,e.getMessage());
      compositeDisposable.clear();
      detailView.hideProgressBar();
    }
    @Override public void onComplete(){
      compositeDisposable.clear();
      detailView.hideProgressBar();
    }
  }
);
}

Fixed version (ground truth):
@Override public void loadArtistTopTracks(ArtistSpecificsTopTracksContract.View view){
  if (artist == null && artist.getName() == null) {
    return;
  }
  lastFmApiClient.getLastFmApiService().getArtistTopTracks(artist.getName(),LIMIT).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<ArtistTopTracks>(){
    @Override public void onSubscribe(    Disposable d){
      detailView.showProgressBar();
      compositeDisposable.add(d);
    }
    @Override public void onNext(    ArtistTopTracks artistTopTracks){
      List<BarEntry> entries=new ArrayList<>();
      List<String> labels=new ArrayList<>();
      List<Track> tracks=artistTopTracks.getToptracks().getTrack();
      if (tracks == null || tracks.isEmpty())       return;
      Collections.sort(tracks,(o1,o2) -> Integer.valueOf(o2.getPlaycount()).compareTo(Integer.valueOf(o1.getPlaycount())));
      int counter=0;
      for (int i=tracks.size() - 1; i >= 0; i--) {
        Track track=tracks.get(i);
        float playcount=Float.parseFloat(track.getPlaycount());
        entries.add(new BarEntry(counter,playcount >= 0 ? playcount : 0f,track.getName()));
        labels.add(track.getName());
        counter++;
      }
      BarDataSet barDataSet=new BarDataSet(entries,BAR_CHART_TITLE);
      BarData barData=new BarData(barDataSet);
      HorizontalBarChart barChart=view.getHorizontalBarChart();
      configureBarChart(labels,barDataSet,barData,barChart);
    }
    @Override public void onError(    Throwable e){
      AppLog.log(TAG,e.getMessage());
      compositeDisposable.clear();
      detailView.hideProgressBar();
    }
    @Override public void onComplete(){
      compositeDisposable.clear();
      detailView.hideProgressBar();
    }
  }
);
}