Program: 56733
Project: 56733
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public GLElement create(GLElementFactoryContext context){
  EDetailLevel detailLevel=context.get(EDetailLevel.class,EDetailLevel.LOW);
  boolean blurNotSelected=context.is("String_Node_Str");
  IHeatMapDataProvider data;
  EDimension dim;
  Function<? super Integer,Double> id2double;
  Function<? super Double,Vec2f> value2bar;
  Function<? super Integer,Color> id2color;
  if (hasTablePerspective(context)) {
    final TablePerspectiveDataProvider d=new TablePerspectiveDataProvider(context.getData());
    data=d;
    dim=EDimension.get(context.getData().getNrRecords() == 1);
    final Integer id=d.getData(dim.opposite()).get(0);
    final Function2<Integer,Integer,Double> getter=dim.isDimension() ? d : Functions2.swap(d);
    id2double=new Function<Integer,Double>(){
      @Override public Double apply(      Integer input){
        return getter.apply(input,id);
      }
    }
;
  }
 else {
    dim=context.get(EDimension.class,EDimension.RECORD);
    IDType idType=context.get(IDType.class,null);
    List<Integer> list=context.get(List.class,null);
    DimensionData d=new DimensionData(list,Functions.constant("String_Node_Str"),Collections.<Group>emptyList(),idType);
    data=new ListDataProvider(dim.select(null,d),dim.select(d,null));
    id2double=context.get("String_Node_Str",Function.class,null);
  }
  id2color=context.get("String_Node_Str",Function.class,Functions.constant(context.get("String_Node_Str",Color.class,Color.BLACK)));
  value2bar=extractValue2Bar(context);
  return new SingleBarPlotElement(data,detailLevel,blurNotSelected,dim,id2double,value2bar,id2color);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public GLElement create(GLElementFactoryContext context){
  EDetailLevel detailLevel=context.get(EDetailLevel.class,EDetailLevel.LOW);
  IHeatMapDataProvider data;
  EDimension dim;
  Function<? super Integer,Double> id2double;
  Function<? super Double,Vec2f> value2bar;
  Function<? super Integer,Color> id2color;
  if (hasTablePerspective(context)) {
    final TablePerspectiveDataProvider d=new TablePerspectiveDataProvider(context.getData());
    data=d;
    dim=EDimension.get(context.getData().getNrRecords() == 1);
    final Integer id=d.getData(dim.opposite()).get(0);
    final Function2<Integer,Integer,Double> getter=dim.isDimension() ? d : Functions2.swap(d);
    id2double=new Function<Integer,Double>(){
      @Override public Double apply(      Integer input){
        return getter.apply(input,id);
      }
    }
;
  }
 else {
    dim=context.get(EDimension.class,EDimension.RECORD);
    IDType idType=context.get(IDType.class,null);
    List<Integer> list=context.get(List.class,null);
    DimensionData d=new DimensionData(list,Functions.constant("String_Node_Str"),Collections.<Group>emptyList(),idType);
    data=new ListDataProvider(dim.select(null,d),dim.select(d,null));
    id2double=context.get("String_Node_Str",Function.class,null);
  }
  id2color=context.get("String_Node_Str",Function.class,Functions.constant(context.get("String_Node_Str",Color.class,Color.BLACK)));
  value2bar=extractValue2Bar(context);
  return new SingleBarPlotElement(data,detailLevel,dim,id2double,value2bar,id2color);
}