Program: 16400
Project: 16400
Buggy source:
/** 
 * Organizes groups based sorted data. <p>There are three steps to re-group data:  {@link #sortDataInGroupOrder},   {@link #organizeGroup} and then{@link #sortGroupData}. <p>It is the second step of grouping. It creates group data based on the data sorted in the group order by  {@link #sortDataInGroupOrder}.
 * @param cmpr the comparator used to compare data in the group order.Notice that the comparator is never an instance of  {@link GroupComparator}. The implementation just uses   {@link Comparator#compare} to sortthe data.
 * @param col column index
 */
@SuppressWarnings("String_Node_Str") protected void organizeGroup(Comparator<D> cmpr,int col){
  List<List<D>> group=new LinkedList<List<D>>();
  List<D> gdata=null;
  D last=null;
  D curr=null;
  for (int i=0; i < _nativedata.length; i++) {
    curr=_nativedata[i];
    boolean hitn=false;
    boolean hita=false;
    if (last == null || cmpr.compare(last,curr) != 0) {
      hitn=true;
      gdata=new LinkedList<D>();
      group.add(gdata);
    }
    gdata.add(curr);
    last=_nativedata[i];
  }
  List<D>[] gd=new List[group.size()];
  group.toArray(gd);
  Class<?> classD=_nativedata.getClass().getComponentType();
  _data=(D[][])Array.newInstance(classD,gd.length,0);
  _foots=new Object[gd.length];
  _heads=new Object[gd.length];
  _closes=new boolean[_data.length];
  for (int i=0; i < gd.length; i++) {
    gdata=gd[i];
    _data[i]=(D[])Array.newInstance(classD,gdata.size());
    gdata.toArray(_data[i]);
    _heads[i]=createGroupHead(_data[i],i,col);
    _foots[i]=createGroupFoot(_data[i],i,col);
    _closes[i]=createGroupClose(_data[i],i,col);
  }
}

Fixed version (ground truth):
/** 
 * Organizes groups based sorted data. <p>There are three steps to re-group data:  {@link #sortDataInGroupOrder},   {@link #organizeGroup} and then{@link #sortGroupData}. <p>It is the second step of grouping. It creates group data based on the data sorted in the group order by  {@link #sortDataInGroupOrder}.
 * @param cmpr the comparator used to compare data in the group order.Notice that the comparator is never an instance of  {@link GroupComparator}. The implementation just uses   {@link Comparator#compare} to sortthe data.
 * @param col column index
 */
@SuppressWarnings("String_Node_Str") protected void organizeGroup(Comparator<D> cmpr,int col){
  List<List<D>> group=new LinkedList<List<D>>();
  List<D> gdata=null;
  D last=null;
  D curr=null;
  for (int i=0; i < _nativedata.length; i++) {
    curr=_nativedata[i];
    if (last == null || cmpr.compare(last,curr) != 0) {
      gdata=new LinkedList<D>();
      group.add(gdata);
    }
    gdata.add(curr);
    last=_nativedata[i];
  }
  List<D>[] gd=new List[group.size()];
  group.toArray(gd);
  Class<?> classD=_nativedata.getClass().getComponentType();
  _data=(D[][])Array.newInstance(classD,gd.length,0);
  _foots=new Object[gd.length];
  _heads=new Object[gd.length];
  _closes=new boolean[_data.length];
  for (int i=0; i < gd.length; i++) {
    gdata=gd[i];
    _data[i]=(D[])Array.newInstance(classD,gdata.size());
    gdata.toArray(_data[i]);
    _heads[i]=createGroupHead(_data[i],i,col);
    _foots[i]=createGroupFoot(_data[i],i,col);
    _closes[i]=createGroupClose(_data[i],i,col);
  }
}