Program: 44217
Project: 44217
Buggy source:
/** 
 * Create a historic preview for the given stream within the given time frame, using the set of parameters provided
 * @param start      a timestamp of when to start the preview from
 * @param end        optionally when the preview ends -  If not specified, i.e. set to a value less than 1,defaults to the earliest out of start + 24 hours or now - 1 hour.
 * @param stream     the stream/filter to create the preview for
 * @param parameters A list of at least one but no more than 20 Historics Preview parameters e.g.  target,analysis,argument  see http://dev.datasift.com/docs/api/1/previewcreate for documentation of available parameters
 * @return the preview created
 */
public FutureData<HistoricsPreview> create(long start,long end,Stream stream,String[] parameters){
  if (stream == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (parameters == null || parameters.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (parameters.length > 20) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  FutureData<HistoricsPreview> future=new FutureData<HistoricsPreview>();
  URI uri=newParams().forURL(config.newAPIEndpointURI(CREATE));
  POST request=config.http().POST(uri,new PageReader(newRequestCallback(future,new HistoricsPreview(),config))).form("String_Node_Str",start).form("String_Node_Str",stream.hash());
  StringBuilder b=new StringBuilder();
  for (  String p : parameters) {
    b.append(p).append(',');
  }
  request.form("String_Node_Str",b.toString().substring(0,b.length() - 1));
  if (end > 0) {
    request.form("String_Node_Str",end);
  }
  applyConfig(request).execute();
  return future;
}

Fixed version (ground truth):
/** 
 * Create a historic preview for the given stream within the given time frame, using the set of parameters provided
 * @param start      a timestamp of when to start the preview from
 * @param end        optionally when the preview ends -  If not specified, i.e. set to a value less than 1,defaults to the earliest out of start + 24 hours or now - 1 hour.
 * @param stream     the stream/filter to create the preview for
 * @param parameters A list of at least one but no more than 20 Historics Preview parameters e.g.  target,analysis,argument  see http://dev.datasift.com/docs/api/1/previewcreate for documentation of available parameters
 * @return the preview created
 */
public FutureData<HistoricsPreview> create(long start,long end,Stream stream,String[] parameters){
  if (stream == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (parameters == null || parameters.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (parameters.length > 20) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  FutureData<HistoricsPreview> future=new FutureData<HistoricsPreview>();
  URI uri=newParams().forURL(config.newAPIEndpointURI(CREATE));
  POST request=config.http().POST(uri,new PageReader(newRequestCallback(future,new HistoricsPreview(),config))).form("String_Node_Str",start).form("String_Node_Str",stream.hash());
  StringBuilder b=new StringBuilder();
  for (  String p : parameters) {
    b.append(p).append(',');
  }
  request.form("String_Node_Str",b.toString().substring(0,b.length() - 1));
  if (end > 0) {
    request.form("String_Node_Str",end);
  }
  performRequest(future,request);
  return future;
}