nus-yam/ex-repair huggingface dataset:
Program: 43854
Project: 43854
Buggy source:
public void resized(int w,int h,Rect coveredInsets,Rect visibleInsets,boolean reportDraw){
  if (localLOGV)   Log.v("String_Node_Str",SurfaceView.this + "String_Node_Str" + w+ "String_Node_Str"+ h+ "String_Node_Str"+ mCurWidth+ "String_Node_Str"+ mCurHeight);
synchronized (this) {
    if (mCurWidth != w || mCurHeight != h) {
      mCurWidth=w;
      mCurHeight=h;
    }
    if (reportDraw) {
      try {
        mSession.finishDrawing(mWindow);
      }
 catch (      RemoteException e) {
      }
    }
  }
}

Fixed version (ground truth):
public void resized(int w,int h,Rect coveredInsets,Rect visibleInsets,boolean reportDraw){
  SurfaceView surfaceView=mSurfaceView.get();
  if (surfaceView != null) {
    if (localLOGV)     Log.v("String_Node_Str",surfaceView + "String_Node_Str" + w+ "String_Node_Str"+ h+ "String_Node_Str"+ mCurWidth+ "String_Node_Str"+ mCurHeight);
synchronized (this) {
      if (mCurWidth != w || mCurHeight != h) {
        mCurWidth=w;
        mCurHeight=h;
      }
      if (reportDraw) {
        try {
          surfaceView.mSession.finishDrawing(surfaceView.mWindow);
        }
 catch (        RemoteException e) {
        }
      }
    }
  }
}
Program: 43856
Project: 43856
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void systemReady(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    Log.i(TAG,"String_Node_Str" + menuState);
    if (menuState > 0) {
      ActivityManagerNative.getDefault().enterSafeMode();
    }
 else {
      mKeyguardMediator.onSystemReady();
      android.os.SystemProperties.set("String_Node_Str","String_Node_Str");
    }
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void systemReady(){
  try {
    int menuState=mWindowManager.getKeycodeState(KeyEvent.KEYCODE_MENU);
    Log.i(TAG,"String_Node_Str" + menuState);
    if (menuState > 0) {
      ActivityManagerNative.getDefault().enterSafeMode();
    }
    mKeyguardMediator.onSystemReady();
    android.os.SystemProperties.set("String_Node_Str","String_Node_Str");
  }
 catch (  RemoteException e) {
  }
}
Program: 43857
Project: 43857
Buggy source:
public static final CharSequence getDisplayLabel(Context context,int type,CharSequence label){
  CharSequence display="String_Node_Str";
  if (type != TYPE_CUSTOM) {
    CharSequence[] labels=context.getResources().getTextArray(com.android.internal.R.array.organizationTypes);
    try {
      display=labels[type - 1];
    }
 catch (    ArrayIndexOutOfBoundsException e) {
      display=labels[People.Phones.TYPE_HOME - 1];
    }
  }
 else {
    if (!TextUtils.isEmpty(label)) {
      display=label;
    }
  }
  return display;
}

Fixed version (ground truth):
public static final CharSequence getDisplayLabel(Context context,int type,CharSequence label){
  CharSequence display="String_Node_Str";
  if (type != TYPE_CUSTOM) {
    CharSequence[] labels=context.getResources().getTextArray(com.android.internal.R.array.organizationTypes);
    try {
      display=labels[type - 1];
    }
 catch (    ArrayIndexOutOfBoundsException e) {
      display=labels[Organizations.TYPE_WORK - 1];
    }
  }
 else {
    if (!TextUtils.isEmpty(label)) {
      display=label;
    }
  }
  return display;
}
Program: 43858
Project: 43858
Buggy source:
private void addSensorInstance(ISensor sensor,Path path){
  try {
    ISensor sensorInstance=sensor.create(path);
    if (sensor != null) {
      ISensor oldSensor=sensorInstances.forcePut(path,sensorInstance);
      if (oldSensor != null) {
        removeSensorInstance(oldSensor);
      }
      HashMap<String,Object> properties=new HashMap<>();
      properties.put(SENSOR_DATA,sensorInstance);
      properties.put(SENSOR_SOURCE,path);
      properties.put(SENSOR_AVAILABLE,true);
      postSensorEvent(properties);
      log.debug("String_Node_Str" + sensorInstance + "String_Node_Str"+ path);
    }
  }
 catch (  IOException e) {
    log.error("String_Node_Str" + path,e);
  }
}

Fixed version (ground truth):
private void addSensorInstance(ISensor sensor,Path path){
  try {
    ISensor sensorInstance=sensor.create(path);
    if (sensorInstance != null) {
      ISensor oldSensor=sensorInstances.forcePut(path,sensorInstance);
      if (oldSensor != null) {
        removeSensorInstance(oldSensor);
      }
      HashMap<String,Object> properties=new HashMap<>();
      properties.put(SENSOR_DATA,sensorInstance);
      properties.put(SENSOR_SOURCE,path);
      properties.put(SENSOR_AVAILABLE,true);
      postSensorEvent(properties);
      log.debug("String_Node_Str" + sensorInstance + "String_Node_Str"+ path);
    }
  }
 catch (  IOException e) {
    log.error("String_Node_Str" + path,e);
  }
}
Program: 43859
Project: 43859
Buggy source:
private boolean checkPath(Path path) throws IOException {
  if (path == null)   return false;
  if (Files.isDirectory(path)) {
    try (DirectoryStream<Path> in=Files.newDirectoryStream(path)){
      for (      Path file : in) {
        if (file.getFileName().toString().endsWith("String_Node_Str")) {
          return true;
        }
      }
    }
   }
  return path.getFileName().toString().endsWith("String_Node_Str");
}

Fixed version (ground truth):
private boolean checkPath(Path path) throws IOException {
  if (path == null)   return false;
  if (Files.isDirectory(path)) {
    try (DirectoryStream<Path> in=Files.newDirectoryStream(path)){
      for (      Path file : in) {
        if (file.getFileName().toString().endsWith("String_Node_Str")) {
          return true;
        }
      }
    }
   }
  return path.getFileName() == null ? false : path.getFileName().toString().endsWith("String_Node_Str");
}
Program: 43860
Project: 43860
Buggy source:
@Override public ISensor create(Object source) throws IOException {
  AccelerationSensor sensor=null;
  Path path=pathFromSource(source);
  if (!checkPath(path))   return null;
  sensor=new AccelerationSensor();
  sensor.sourceDirectory=(Path)source;
  sensor.instance=true;
  return sensor;
}

Fixed version (ground truth):
@Override public ISensor create(Object source) throws IOException {
  AccelerationSensor sensor=null;
  Path path=pathFromSource(source);
  if (!checkPath(path))   return sensor;
  sensor=new AccelerationSensor();
  sensor.sourceDirectory=(Path)source;
  sensor.instance=true;
  return sensor;
}
Program: 43861
Project: 43861
Buggy source:
/** 
 * <p> Generates a filename with the given parameters like this </p> <p> <li>RAW: [from]_to_[to].[sensor.id].[sensor.filePrefix]</li> <li>TRAIN: [from]_to_[to].arff</li> <li>RESULT: [from]_to_[to].arff</li> </p> <p> For date formatting   {@link DateFormat.MEDIUM} is used.</p>
 * @param s Sensor
 * @param type - RAW, TRAIN or RESULT
 * @param from - Data recording start
 * @param to - Data recording end
 * @return
 */
private String generateFilename(Sensor s,String type,Date from,Date to){
  StringBuilder sb=new StringBuilder(32);
  sb.append(dateF.format(from)).append("String_Node_Str").append(dateF.format(to)).append("String_Node_Str");
switch (type) {
case RAW:
    return sb.append(s.getId()).append("String_Node_Str").append(s.getFilePrefix()).toString();
case TRAIN:
  return sb.append("String_Node_Str").toString();
case RESULT:
return sb.append("String_Node_Str").toString();
default :
return sb.append("String_Node_Str").toString();
}
}

Fixed version (ground truth):
/** 
 * <p> Generates a filename with the given parameters like this </p> <p> <li>RAW: [from]_to_[to].[sensor.id].[sensor.filePrefix]</li> <li>TRAIN: [from]_to_[to].arff</li> <li>RESULT: [from]_to_[to].arff</li> </p> <p> For date formatting   {@link DateFormat.MEDIUM} is used.</p>
 * @param s - Sensor
 * @param type - RAW, TRAIN or RESULT
 * @param from - Data recording start
 * @param to - Data recording end
 * @return
 */
private String generateFilename(Sensor s,String type,Date from,Date to){
  StringBuilder sb=new StringBuilder(32);
  sb.append(dateF.format(from)).append("String_Node_Str").append(dateF.format(to)).append("String_Node_Str");
switch (type) {
case RAW:
    return sb.append(s.getId()).append("String_Node_Str").append(s.getFilePrefix()).toString();
case TRAIN:
  return sb.append("String_Node_Str").toString();
case RESULT:
return sb.append("String_Node_Str").toString();
default :
return sb.append("String_Node_Str").toString();
}
}
Program: 43862
Project: 43862
Buggy source:
/** 
 * @param patient
 * @param sensor
 * @param type
 * @param inputURL
 */
@Override public DataStoreOutput store(Patient patient,ISensor sensor,String type,URI inputURL) throws IOException {
  IConverter converter=sensorManagerService.createConverter(sensor);
  if (converter == null)   return null;
  Sensor entity=sensorManagerService.loadSensorEntity(sensor);
  Interval interval=converter.getInterval();
  try (DataStoreOutput output=store(patient,entity,type,interval.getStart().toDate(),interval.getEnd().toDate());OutputStream os=output.outputStream;InputStream in=new FileInputStream(new File(inputURL))){
    byte[] buffer=new byte[4096];
    int bytesRead=0;
    while ((bytesRead=in.read(buffer)) != -1) {
      os.write(buffer,0,bytesRead);
    }
    return output;
  }
 catch (  IOException e) {
    log.error("String_Node_Str",e);
    throw e;
  }
}

Fixed version (ground truth):
/** 
 * @param patient
 * @param sensor
 * @param type
 * @param inputURI
 */
@Override public DataStoreOutput store(Patient patient,ISensor sensor,String type,URI inputURI) throws IOException {
  InputStream inputStream=sensorManagerService.createInput(sensor,inputURI);
  IConverter converter=sensor.newConverter(inputStream);
  if (converter == null)   return null;
  Sensor entity=sensorManagerService.loadSensorEntity(sensor);
  Interval interval=converter.getInterval();
  try (DataStoreOutput output=store(patient,entity,type,interval.getStart().toDate(),interval.getEnd().toDate());OutputStream os=output.outputStream){
    Files.copy(Paths.get(inputURI),os);
    return output;
  }
 catch (  IOException e) {
    log.error("String_Node_Str",e);
    throw e;
  }
}
Program: 43863
Project: 43863
Buggy source:
@Override protected Instances determineOutputFormat(Instances inputFormat) throws Exception {
  determineInputDimensions(inputFormat);
  Instances result=new Instances(inputFormat,0);
  if (dimReduction && outDimensions > 0) {
    if (inDimensions > outDimensions) {
      int toDelete=inDimensions - outDimensions;
      for (int i=inputFormat.numAttributes() - 1; toDelete > 0 && i >= 0; i--) {
        if (i != inputFormat.classIndex() && inputFormat.attribute(i).type() == Attribute.NUMERIC) {
          if (attributeNamePrefix == null || inputFormat.attribute(i).name().startsWith(attributeNamePrefix)) {
            result.deleteAttributeAt(i);
            toDelete--;
          }
        }
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + outDimensions + "String_Node_Str"+ inDimensions+ "String_Node_Str");
    }
  }
  int fvc=1;
  for (int i=0; i < result.numAttributes(); i++) {
    if (attributeNamePrefix != null && result.attribute(i).name().startsWith(attributeNamePrefix)) {
      result.renameAttribute(i,attributeNamePrefix + fvc);
      fvc++;
    }
  }
  output=result;
  return output;
}

Fixed version (ground truth):
@Override protected Instances determineOutputFormat(Instances inputFormat) throws Exception {
  if (!resetOutputFormat && output != null)   return output;
  determineInputDimensions(inputFormat);
  Instances result=new Instances(inputFormat,0);
  if (dimReduction && outDimensions > 0) {
    if (inDimensions > outDimensions) {
      int toDelete=inDimensions - outDimensions;
      for (int i=inputFormat.numAttributes() - 1; toDelete > 0 && i >= 0; i--) {
        if (i != inputFormat.classIndex() && inputFormat.attribute(i).type() == Attribute.NUMERIC) {
          if (attributeNamePrefix == null || inputFormat.attribute(i).name().startsWith(attributeNamePrefix)) {
            result.deleteAttributeAt(i);
            toDelete--;
          }
        }
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + outDimensions + "String_Node_Str"+ inDimensions+ "String_Node_Str");
    }
  }
  int fvc=1;
  for (int i=0; i < result.numAttributes(); i++) {
    if (attributeNamePrefix != null && result.attribute(i).name().startsWith(attributeNamePrefix)) {
      result.renameAttribute(i,attributeNamePrefix + fvc);
      fvc++;
    }
  }
  output=result;
  return output;
}
Program: 43864
Project: 43864
Buggy source:
private Instance buildOutputInstance(Vector<Instance> segment,Instances output){
  Instance result=new DenseInstance(numOuputAttributes);
  result.setDataset(output);
  Instance first=segment.firstElement();
  Instance last=segment.lastElement();
  for (int i=0; i < first.numAttributes(); i++) {
    if (first.attribute(i).type() == Attribute.DATE) {
      result.setValue(0,first.value(i));
    }
  }
  for (int i=0; i < last.numAttributes(); i++) {
    if (last.attribute(i).type() == Attribute.DATE) {
      result.setValue(1,last.value(i));
    }
  }
  Instances segmentData=new Instances(first.dataset(),0);
  for (  Instance s : segment) {
    segmentData.add(s);
  }
  segmentData.setClassIndex(result.attribute(REL_ATT_INDEX).relation().classIndex());
  result.setValue(2,result.attribute(REL_ATT_INDEX).addRelation(segmentData));
  if (sourceAttIndex > 0) {
    result.setValue(output.attribute(ResultsUtil.ATTRIBUTE_SOURCE()),first.stringValue(sourceAttIndex));
  }
  if (first.classIndex() >= 0) {
    result.setValue(result.classIndex(),first.stringValue(first.classIndex()));
  }
  return result;
}

Fixed version (ground truth):
private Instance buildOutputInstance(Vector<Instance> segment,Instances output){
  Instance result=new DenseInstance(numOuputAttributes);
  result.setDataset(output);
  Instance first=segment.firstElement();
  Instance last=segment.lastElement();
  for (int i=0; i < first.numAttributes(); i++) {
    if (first.attribute(i).type() == Attribute.DATE) {
      result.setValue(0,first.value(i));
    }
  }
  for (int i=0; i < last.numAttributes(); i++) {
    if (last.attribute(i).type() == Attribute.DATE) {
      result.setValue(1,last.value(i));
    }
  }
  Instances segmentData=new Instances(first.dataset(),0);
  for (  Instance s : segment) {
    segmentData.add(s);
  }
  segmentData.setClassIndex(result.attribute(REL_ATT_INDEX).relation().classIndex());
  result.setValue(REL_ATT_INDEX,result.attribute(REL_ATT_INDEX).addRelation(segmentData));
  if (sourceAttIndex > 0) {
    result.setValue(output.attribute(ResultsUtil.ATTRIBUTE_SOURCE()),first.stringValue(sourceAttIndex));
  }
  if (first.classIndex() >= 0) {
    result.setValue(result.classIndex(),first.stringValue(first.classIndex()));
  }
  return result;
}
Program: 43865
Project: 43865
Buggy source:
@Override public void build(Instances input){
  guessAndSetClassLabel(input);
  Instances segments=determineOutputFormat(input);
  Instances nonSegments=determineOutputFormat(input);
  Map<String,Instances> splittedInput=ResultsUtil.splitInstanceBySourceJava(input,false);
  for (  Instances inst : splittedInput.values()) {
    Instances s=new Instances(segments,0);
    Instances n=new Instances(nonSegments,0);
    this.calcSegmentation(inst,s,n);
    this.calcSurroundingSegmentationRates(inst,s,n);
    try {
      ResultsUtil.appendInstances(segments,s);
      ResultsUtil.appendInstances(nonSegments,n);
    }
 catch (    WekaException we) {
      we.printStackTrace();
    }
  }
  sendEvent(new Results(segments),SegmentationFactory.SEGMENTS());
  sendEvent(new Results(nonSegments),SegmentationFactory.NONSEGMENTS());
}

Fixed version (ground truth):
@Override public void build(Instances input){
  guessAndSetClassLabel(input);
  Instances segments=determineOutputFormat(input);
  Instances nonSegments=determineOutputFormat(input);
  Map<String,Instances> splittedInput=ResultsUtil.splitInstanceBySourceJava(input,false);
  for (  Instances inst : splittedInput.values()) {
    Instances s=new Instances(segments,0);
    Instances n=new Instances(nonSegments,0);
    this.calcSegmentation(inst,s,n);
    this.calcSurroundingSegmentationRates(inst,s,n);
    try {
      segments=ResultsUtil.appendInstances(segments,s);
      nonSegments=ResultsUtil.appendInstances(nonSegments,n);
    }
 catch (    WekaException we) {
      we.printStackTrace();
    }
  }
  sendEvent(new Results(segments),SegmentationFactory.SEGMENTS());
  sendEvent(new Results(nonSegments),SegmentationFactory.NONSEGMENTS());
}
Program: 43870
Project: 43870
Buggy source:
private Instances convert(String path) throws IOException {
  File oldSource=converter.retrieveFile();
  String dirPath=directory(path);
  String tmpPath=dirPath + sep + "String_Node_Str";
  File tmp=new File(tmpPath);
  converter.copy(new FileOutputStream(tmp),from,to);
  converter.setFile(tmp);
  Instances returns=converter.getDataSet();
  converter.setFile(oldSource);
  tmp.delete();
  return returns;
}

Fixed version (ground truth):
private Instances convert(String path) throws IOException {
  File oldSource=converter.retrieveFile();
  String dirPath=directory(path);
  String tmpPath=dirPath + sep + "String_Node_Str";
  File tmp=new File(tmpPath);
  converter.copy(new FileOutputStream(tmp),from,to);
  converter.reset();
  converter.setFile(tmp);
  Instances returns=converter.getDataSet();
  converter.setFile(oldSource);
  tmp.delete();
  return returns;
}
Program: 43871
Project: 43871
Buggy source:
public SDRConverter(){
  m_structure=ResultsUtil.timeSeriesResult(Arrays.asList(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}));
  dataset=new Instances(m_structure);
  timeAttribute=dataset.attribute(ResultsUtil.ATTRIBUTE_TIMESTAMP());
  List<Attribute> valueAttributes=ResultsUtil.findValueAttributes(dataset);
  for (  Attribute attribute : valueAttributes) {
    String name=attribute.getMetadata().getProperty(ResultsUtil.META_ATTRIBUTE_NAME());
    if (name.equals("String_Node_Str"))     xAttribute=attribute;
 else     if (name.equals("String_Node_Str"))     yAttribute=attribute;
 else     if (name.equals("String_Node_Str"))     zAttribute=attribute;
  }
}

Fixed version (ground truth):
public SDRConverter(){
  initStructure();
}
Program: 43872
Project: 43872
Buggy source:
public void copy(OutputStream out,Date from,Date to) throws IOException {
  if (m_sourceFile == null)   throw new IOException("String_Node_Str");
  if (out == null)   throw new IOException("String_Node_Str");
  byte[] data=new byte[BLOCKSIZE];
  Calendar date=new GregorianCalendar();
  Calendar last=new GregorianCalendar();
  boolean init=false;
  FileInputStream in=new FileInputStream(m_sourceFile);
  int read=in.read(data);
  System.out.println("String_Node_Str" + from + "String_Node_Str"+ to);
  while (read != -1) {
    boolean recordEnd=setTime(date,data);
    if (!init) {
      init=true;
      last.setTimeInMillis(date.getTimeInMillis());
    }
    if (!date.getTime().before(from) && date.after(last))     out.write(data);
 else     if (recordEnd || date.before(last) || date.getTime().after(to))     break;
    last.setTimeInMillis(date.getTimeInMillis());
    read=in.read(data);
  }
  in.close();
}

Fixed version (ground truth):
public void copy(OutputStream out,Date from,Date to) throws IOException {
  if (m_sourceFile == null)   throw new IOException("String_Node_Str");
  if (out == null)   throw new IOException("String_Node_Str");
  byte[] data=new byte[BLOCKSIZE];
  Calendar date=new GregorianCalendar();
  Calendar prev=new GregorianCalendar();
  boolean init=false;
  FileInputStream in=new FileInputStream(m_sourceFile);
  int read=in.read(data);
  System.out.println("String_Node_Str" + from + "String_Node_Str"+ to);
  while (read != -1) {
    boolean recordEnd=setTime(date,data);
    if (!init) {
      init=true;
      prev.setTimeInMillis(date.getTimeInMillis());
    }
    if (date.getTime().after(from) && date.after(prev))     out.write(data);
    if (recordEnd || date.before(prev) || date.getTime().after(to))     break;
    prev.setTimeInMillis(date.getTimeInMillis());
    read=in.read(data);
  }
  in.close();
}
Program: 43873
Project: 43873
Buggy source:
public void buildContent(Instances instances){
  TimeSeriesCollection dataset=(TimeSeriesCollection)this.dataset;
  if (series == null) {
    initSeries(instances);
  }
 else {
    for (    TimeSeries s : series.values()) {
      dataset.removeSeries(s);
    }
  }
  Enumeration<Instance> enumeration=instances.enumerateInstances();
  int numInst=instances.numInstances();
  int last=0;
  int i=0;
  System.out.println("String_Node_Str" + numInst + "String_Node_Str");
  System.out.println("String_Node_Str");
  while (enumeration.hasMoreElements()) {
    Instance inst=enumeration.nextElement();
    double dateTime=inst.value(instances.attribute(ResultsUtil.ATTRIBUTE_TIMESTAMP()));
    Date date=new Date((long)dateTime);
    for (    String name : series.keySet()) {
      TimeSeries s=series.get(name);
      Attribute attribute=instances.attribute(name);
      double value=inst.value(attribute);
      s.add(new Millisecond(date),value);
    }
    last=printProgress(i,numInst,last);
    i++;
  }
  System.out.println("String_Node_Str");
  for (  TimeSeries s : series.values()) {
    dataset.addSeries(s);
  }
  if (chart != null)   chart.fireChartChanged();
}

Fixed version (ground truth):
public void buildContent(final Instances instances){
  final TimeSeriesCollection dataset=(TimeSeriesCollection)this.dataset;
  if (series == null) {
    initSeries(instances);
  }
 else {
    for (    TimeSeries s : series.values()) {
      dataset.removeSeries(s);
    }
  }
  new Thread(new Runnable(){
    @Override public void run(){
      Enumeration<Instance> enumeration=instances.enumerateInstances();
      int numInst=instances.numInstances();
      System.out.println("String_Node_Str" + numInst + "String_Node_Str");
      System.out.println("String_Node_Str");
      support.firePropertyChange("String_Node_Str",-1,0);
      int last=0;
      int i=0;
      while (enumeration.hasMoreElements()) {
        Instance inst=enumeration.nextElement();
        double dateTime=inst.value(instances.attribute(ResultsUtil.ATTRIBUTE_TIMESTAMP()));
        Date date=new Date((long)dateTime);
        for (        String name : series.keySet()) {
          TimeSeries s=series.get(name);
          Attribute attribute=instances.attribute(name);
          double value=inst.value(attribute);
          s.add(new Millisecond(date),value);
        }
        last=printProgress(i,numInst,last);
        support.firePropertyChange("String_Node_Str",-1,last);
        i++;
      }
      System.out.println("String_Node_Str");
      support.firePropertyChange("String_Node_Str",-1,100);
      for (      TimeSeries s : series.values()) {
        dataset.addSeries(s);
      }
      if (chart != null)       chart.fireChartChanged();
    }
  }
).start();
}
Program: 43874
Project: 43874
Buggy source:
protected JFreeChart createChart(Dataset dataset){
  chart=ChartFactory.createTimeSeriesChart("String_Node_Str","String_Node_Str","String_Node_Str",(XYDataset)dataset,false,false,false);
  XYPlot xyplot=chart.getXYPlot();
  xyplot.setDomainCrosshairVisible(true);
  return chart;
}

Fixed version (ground truth):
protected JFreeChart createChart(Dataset dataset){
  chart=ChartFactory.createTimeSeriesChart("String_Node_Str","String_Node_Str","String_Node_Str",(XYDataset)dataset,true,false,false);
  XYPlot xyplot=chart.getXYPlot();
  xyplot.setDomainCrosshairVisible(true);
  return chart;
}
Program: 43875
Project: 43875
Buggy source:
@Override public void copy(OutputStream out,Date from,Date to) throws IOException {
  if (m_sourceFile == null)   throw new IOException("String_Node_Str");
  if (out == null)   throw new IOException("String_Node_Str");
  byte[] data=new byte[BLOCKSIZE];
  Calendar date=new GregorianCalendar();
  Calendar last=new GregorianCalendar();
  boolean init=false;
  FileInputStream in=new FileInputStream(m_sourceFile);
  int read=in.read(data);
  System.out.println("String_Node_Str" + from + "String_Node_Str"+ to);
  while (read != -1) {
    boolean recordEnd=setTime(date,data);
    if (!init) {
      init=true;
      last.setTimeInMillis(date.getTimeInMillis());
    }
    if (!date.getTime().before(from) && date.after(last))     out.write(data);
 else     if (recordEnd || date.before(last) || date.getTime().after(to))     break;
    last.setTimeInMillis(date.getTimeInMillis());
    read=in.read(data);
  }
  in.close();
}

Fixed version (ground truth):
@Override public void copy(OutputStream out,Date from,Date to) throws IOException {
  if (m_sourceFile == null)   throw new IOException("String_Node_Str");
  if (out == null)   throw new IOException("String_Node_Str");
  byte[] data=new byte[BLOCKSIZE];
  Calendar date=new GregorianCalendar();
  Calendar last=new GregorianCalendar();
  boolean init=false;
  FileInputStream in=new FileInputStream(m_sourceFile);
  int read=in.read(data);
  System.out.println("String_Node_Str" + from + "String_Node_Str"+ to);
  while (read != -1) {
    boolean recordEnd=setTime(date,data);
    if (!init) {
      init=true;
      last.setTimeInMillis(date.getTimeInMillis());
    }
    if (!date.getTime().before(from) && date.after(last))     out.write(data);
    if (recordEnd || date.before(last) || date.getTime().after(to))     break;
    last.setTimeInMillis(date.getTimeInMillis());
    read=in.read(data);
  }
  in.close();
}
Program: 43876
Project: 43876
Buggy source:
@Override public void actionPerformed(ActionEvent event){
  JFileChooser dialog=new JFileChooser();
  String sep=System.getProperty("String_Node_Str");
  String out=tInput.getText();
  int index=out.lastIndexOf(sep);
  out=out.substring(index,out.length() - 3) + configuration.getOutput();
  dialog.setSelectedFile(new File(out.substring(0,index) + out));
  int ret=dialog.showSaveDialog(contentPane);
  if (ret != JFileChooser.APPROVE_OPTION)   return;
  outputFile=dialog.getSelectedFile();
  configureConverter();
  Date from=(Date)sFrom.getValue();
  Date to=(Date)sTo.getValue();
  Persister persister=new Persister(from,to,converter,configuration.isRelativeOutput());
  try {
    if (configuration.getOutput().equals("String_Node_Str"))     persister.persistAsARFF(outputFile);
 else     persister.persistAsCSV(outputFile,getAppFrame());
  }
 catch (  IOException e) {
    JOptionPane.showMessageDialog(contentPane,e.getMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent event){
  JFileChooser dialog=new JFileChooser();
  String out=tInput.getText();
  int index=out.lastIndexOf(File.separator);
  String file=out.substring(index,out.length() - 3) + configuration.getOutput();
  dialog.setSelectedFile(new File(out.substring(0,index) + file));
  int ret=dialog.showSaveDialog(contentPane);
  if (ret != JFileChooser.APPROVE_OPTION)   return;
  outputFile=dialog.getSelectedFile();
  configureConverter();
  Date from=(Date)sFrom.getValue();
  Date to=(Date)sTo.getValue();
  Persister persister=new Persister(from,to,converter,configuration.isRelativeOutput());
  try {
    if (configuration.getOutput().equals("String_Node_Str"))     persister.persistAsARFF(outputFile);
 else     persister.persistAsCSV(outputFile,getAppFrame());
  }
 catch (  IOException e) {
    JOptionPane.showMessageDialog(contentPane,e.getMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    e.printStackTrace();
  }
}
Program: 43878
Project: 43878
Buggy source:
/** 
 * @param listener 
 * @param path - output file
 * @throws IOException
 */
public void persistAsCSV(File file,PropertyChangeListener listener) throws IOException {
  Instances dataset=convert(file.getAbsolutePath());
  CSVSaver saver=new CSVSaver();
  saver.addPropertyChangeListener(listener);
  saver.setFile(file);
  saver.setInstances(dataset);
  saver.setSeparator("String_Node_Str");
  saver.writeBatch();
}

Fixed version (ground truth):
/** 
 * @param listener
 * @param path - output file
 * @throws IOException
 */
public void persistAsCSV(File file,PropertyChangeListener listener) throws IOException {
  Instances dataset=convert(file.getAbsolutePath());
  CSVSaver saver=new CSVSaver();
  saver.addPropertyChangeListener(listener);
  saver.setFile(file);
  saver.setInstances(dataset);
  saver.setSeparator("String_Node_Str");
  saver.writeBatch();
}
Program: 43879
Project: 43879
Buggy source:
/** 
 * <p>Converter must have a valid sourceFile</p>
 * @param from - from which date to persist
 * @param to - to which date to persist
 * @param converter
 */
public Persister(Date from,Date to,SDRConverter converter,boolean relative){
  this.from=from;
  this.to=to;
  this.relative=relative;
  this.converter=converter;
}

Fixed version (ground truth):
/** 
 * <p> Converter must have a valid sourceFile </p>
 * @param from - from which date to persist
 * @param to - to which date to persist
 * @param converter
 */
public Persister(Date from,Date to,SDRConverter converter,boolean relative){
  this.from=from;
  this.to=to;
  this.relative=relative;
  this.converter=converter;
}
Program: 43880
Project: 43880
Buggy source:
private Instances convert(String path) throws IOException {
  File oldSource=converter.retrieveFile();
  String dirPath=directory(path);
  String tmpPath=dirPath + sep + "String_Node_Str";
  File tmp=new File(tmpPath);
  converter.copy(new FileOutputStream(tmp),from,to);
  converter.reset();
  converter.setFile(tmp);
  converter.setAggregate(SDRConverter.AGGREGATE_NONE);
  converter.setRelativeTimestamp(relative);
  Instances returns=converter.getDataSet();
  converter.setFile(oldSource);
  tmp.delete();
  return returns;
}

Fixed version (ground truth):
private Instances convert(String path) throws IOException {
  File oldSource=converter.retrieveFile();
  String dirPath=directory(path);
  String tmpPath=dirPath + sep + "String_Node_Str";
  File tmp=new File(tmpPath);
  converter.copy(new FileOutputStream(tmp),from,to);
  converter.reset();
  converter.setFile(tmp);
  converter.setAggregate(SDRConverter.AGGREGATE_NONE);
  converter.setRelativeTimestamp(relative);
  Instances returns=converter.getDataSet();
  converter.setFile(oldSource);
  if (!tmp.delete())   System.err.println("String_Node_Str");
  return returns;
}
Program: 43881
Project: 43881
Buggy source:
/** 
 * Read CDMI blob and save the contents to a file.
 * @param remoteFileName The remote file path
 * @param localFileName Absolute path of the local file
 * @return Returns an integer containing the HTTP response code
 */
public int readToFile(String remoteFileName,String localFileName) throws IOException, URISyntaxException, CDMIOperationException, ParseException {
  HttpResponse response=read(remoteFileName);
  int responseCode=response.getStatusLine().getStatusCode();
  if (responseCode != REQUEST_OK)   throw new CDMIOperationException("String_Node_Str" + remoteFileName,responseCode);
  String mimeType=(String)Utils.getElement(response,"String_Node_Str");
  FileOutputStream outputFile=new FileOutputStream(localFileName);
  if (mimeType.equals("String_Node_Str")) {
    outputFile.write(Utils.getObjectContent(response).getBytes());
  }
 else {
    outputFile.write(Utils.getTextContent(response).getBytes());
  }
  outputFile.close();
  return responseCode;
}

Fixed version (ground truth):
/** 
 * Read CDMI blob and save the contents to a file.
 * @param remoteFileName The remote file path
 * @param localFileName Absolute path of the local file
 * @return Returns an integer containing the HTTP response code
 */
public int readToFile(String remoteFileName,String localFileName) throws IOException, URISyntaxException, CDMIOperationException, ParseException {
  HttpResponse response=read(remoteFileName);
  int responseCode=response.getStatusLine().getStatusCode();
  if (responseCode != REQUEST_OK)   throw new CDMIOperationException("String_Node_Str" + remoteFileName,responseCode);
  FileOutputStream outputFile=new FileOutputStream(localFileName);
  outputFile.write(Utils.getContent(response).getBytes());
  outputFile.close();
  return responseCode;
}
Program: 43882
Project: 43882
Buggy source:
public static String getContent(String file) throws IOException {
  FileReader fileReader=new FileReader(file);
  BufferedReader in=new BufferedReader(fileReader);
  StringBuilder content=new StringBuilder("String_Node_Str");
  String str;
  while ((str=in.readLine()) != null) {
    content.append(str);
  }
  return content.toString();
}

Fixed version (ground truth):
/** 
 * Extract value of a CDMI object. The binary files are decoded according to JSON BASE64 rules.
 */
public static String getContent(HttpResponse response) throws IOException, ParseException {
  JSONParser parser=new JSONParser();
  InputStream stream=response.getEntity().getContent();
  InputStreamReader is=new InputStreamReader(stream);
  parser=new JSONParser();
  stream=response.getEntity().getContent();
  is=new InputStreamReader(stream);
  ContainerFactory containerFactory=new ContainerFactory(){
    public List creatArrayContainer(){
      return new LinkedList();
    }
    public Map createObjectContainer(){
      return new LinkedHashMap();
    }
  }
;
  Map jsonMap=(Map)parser.parse(is,containerFactory);
  String mimetype=jsonMap.get("String_Node_Str").toString();
  String content=jsonMap.get("String_Node_Str").toString();
  if (!mimetype.equals("String_Node_Str")) {
    byte[] decodedObj=Base64.decodeBase64(content);
    content=new String(decodedObj);
  }
  stream.close();
  is.close();
  return content;
}
Program: 43883
Project: 43883
Buggy source:
public static String getTextContent(HttpResponse response) throws IOException, ParseException {
  JSONParser parser=new JSONParser();
  InputStream stream=response.getEntity().getContent();
  InputStreamReader is=new InputStreamReader(stream);
  ContainerFactory containerFactory=new ContainerFactory(){
    public List creatArrayContainer(){
      return new LinkedList();
    }
    public Map createObjectContainer(){
      return new LinkedHashMap();
    }
  }
;
  Map jsonMap=(Map)parser.parse(is,containerFactory);
  String content=jsonMap.get("String_Node_Str").toString();
  stream.close();
  is.close();
  return content;
}

Fixed version (ground truth):
/** 
 * @deprecated Use getContent instead.
 */
public static String getTextContent(HttpResponse response) throws IOException, ParseException {
  return getContent(response);
}
Program: 43884
Project: 43884
Buggy source:
/** 
 * To extract a binary CDMI object contents. The binary files are decoded as JSON BASE64 rules.
 * @param response
 * @return
 * @throws IOException
 * @throws ParseException
 */
public static String getObjectContent(HttpResponse response) throws IOException, ParseException {
  JSONParser parser=new JSONParser();
  InputStream stream=response.getEntity().getContent();
  InputStreamReader is=new InputStreamReader(stream);
  parser=new JSONParser();
  stream=response.getEntity().getContent();
  is=new InputStreamReader(stream);
  ContainerFactory containerFactory=new ContainerFactory(){
    public List creatArrayContainer(){
      return new LinkedList();
    }
    public Map createObjectContainer(){
      return new LinkedHashMap();
    }
  }
;
  Map jsonMap=(Map)parser.parse(is,containerFactory);
  String content=jsonMap.get("String_Node_Str").toString();
  byte[] decodedObj=Base64.decodeBase64(content);
  stream.close();
  is.close();
  return new String(decodedObj);
}

Fixed version (ground truth):
/** 
 * @deprecated Use getContent instead.
 */
public static String getObjectContent(HttpResponse response) throws IOException, ParseException {
  return getContent(response);
}
Program: 43885
Project: 43885
Buggy source:
public BlobOperations(URL endpoint,DefaultHttpClient httpclient){
  this.httpclient=httpclient;
  this.endpoint=endpoint;
}

Fixed version (ground truth):
public BlobOperations(URL endpoint,HttpClient httpclient){
  this.httpclient=httpclient;
  this.endpoint=endpoint;
}
Program: 43886
Project: 43886
Buggy source:
public DefaultHttpClient getHttpclient(){
  return httpclient;
}

Fixed version (ground truth):
public HttpClient getHttpclient(){
  return httpclient;
}
Program: 43888
Project: 43888
Buggy source:
public ContainerOperations(URL endpoint,DefaultHttpClient httpclient){
  this.httpclient=httpclient;
  this.endpoint=endpoint;
}

Fixed version (ground truth):
public ContainerOperations(URL endpoint,HttpClient httpclient){
  this.httpclient=httpclient;
  this.endpoint=endpoint;
}
Program: 43889
Project: 43889
Buggy source:
public NonCDMIBlobOperations(URL endpoint,DefaultHttpClient httpclient){
  this.httpclient=httpclient;
  this.endpoint=endpoint;
}

Fixed version (ground truth):
public NonCDMIBlobOperations(URL endpoint,HttpClient httpclient){
  this.httpclient=httpclient;
  this.endpoint=endpoint;
}
Program: 43890
Project: 43890
Buggy source:
public NonCDMIContainerOperations(URL endpoint,DefaultHttpClient httpclient){
  this.httpclient=httpclient;
  this.endpoint=endpoint;
}

Fixed version (ground truth):
public NonCDMIContainerOperations(URL endpoint,HttpClient httpclient){
  this.httpclient=httpclient;
  this.endpoint=endpoint;
}
Program: 43891
Project: 43891
Buggy source:
protected void createConnection() throws KeyManagementException, UnrecoverableKeyException, CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException {
  cdmiServer=new URL("String_Node_Str");
  parameters=new HashMap<String,Object>();
  creds=new UsernamePasswordCredentials("String_Node_Str","String_Node_Str");
  cdmiConnection=new CDMIConnection(creds,cdmiServer);
}

Fixed version (ground truth):
protected void createConnection() throws KeyManagementException, UnrecoverableKeyException, CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException {
  cdmiServer=new URL("String_Node_Str");
  parameters=new HashMap<String,Object>();
  credentials=new UsernamePasswordCredentials("String_Node_Str","String_Node_Str");
  cdmiConnection=new CDMIConnection(credentials,cdmiServer);
}
Program: 43892
Project: 43892
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  String remoteFNM="String_Node_Str";
  String localfile="String_Node_Str";
  CDMIMQOperations mq=new CDMIMQOperations();
  try {
    mq.createQueueObj(remoteFNM);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  String remoteFNM="String_Node_Str";
  String localfile="String_Node_Str";
  CDMIBlobOperations cd=new CDMIBlobOperations();
  try {
    cd.create(localfile,remoteFNM);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 43893
Project: 43893
Buggy source:
public String[] getChildren(String remoteContainer) throws Exception {
  HttpResponse response=null;
  HttpGet httpget=new HttpGet(endpoint + remoteContainer);
  httpget.setHeader("String_Node_Str",CDMIContentType.CDMI_CONTAINER);
  httpget.setHeader("String_Node_Str",CDMIContentType.CDMI_OBJECT);
  httpget.setHeader("String_Node_Str",CDMIContentType.CDMI_SPEC_VERSION);
  response=httpclient.execute(httpget);
  int responseCode=response.getStatusLine().getStatusCode();
switch (responseCode) {
case 200:
    break;
case 302:
  throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 400:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 401:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 403:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 404:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 406:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
}
InputStream respStream=response.getEntity().getContent();
Gson gson=new Gson();
ContainerReadRequest responseBody=gson.fromJson(Utils.convertStreamToString(respStream),ContainerReadRequest.class);
return responseBody.children;
}

Fixed version (ground truth):
public String[] getChildren(String remoteContainer) throws Exception {
  HttpResponse response=null;
  HttpGet httpget=new HttpGet(endpoint + remoteContainer);
  httpget.setHeader("String_Node_Str",CDMIContentType.CDMI_CONTAINER);
  httpget.setHeader("String_Node_Str",CDMIContentType.CDMI_OBJECT);
  httpget.setHeader("String_Node_Str",CDMIContentType.CDMI_SPEC_VERSION);
  response=httpclient.execute(httpget);
  int responseCode=response.getStatusLine().getStatusCode();
switch (responseCode) {
case 200:
    break;
case 302:
  throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 400:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 401:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 403:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 404:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
case 406:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteContainer,responseCode);
}
InputStream respStream=response.getEntity().getContent();
Gson gson=new Gson();
ContainerReadRequest responseBody=gson.fromJson(Utils.convertStreamToString(respStream),ContainerReadRequest.class);
HttpEntity ent=response.getEntity();
EntityUtils.consume(ent);
return responseBody.children;
}
Program: 43896
Project: 43896
Buggy source:
public void delete(String remoteFNM) throws Exception {
  HttpDelete httpdelete=new HttpDelete(endpoint + remoteFNM);
  httpdelete.setHeader("String_Node_Str",CDMIContentType.CDMI_DATA);
  httpdelete.setHeader("String_Node_Str",CDMIContentType.CDMI_DATA);
  httpdelete.setHeader("String_Node_Str",CDMIContentType.CDMI_SPEC_VERSION);
  HttpResponse response=httpclient.execute(httpdelete);
  int responseCode=response.getStatusLine().getStatusCode();
switch (responseCode) {
case 200:
    break;
case 400:
  throw new CDMIOperationException("String_Node_Str" + remoteFNM,responseCode);
case 401:
throw new CDMIOperationException("String_Node_Str" + remoteFNM,responseCode);
case 403:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteFNM,responseCode);
case 404:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteFNM,responseCode);
case 409:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteFNM,responseCode);
}
}

Fixed version (ground truth):
public void delete(String remoteFNM) throws Exception {
  HttpDelete httpdelete=new HttpDelete(endpoint + remoteFNM);
  httpdelete.setHeader("String_Node_Str",CDMIContentType.CDMI_DATA);
  httpdelete.setHeader("String_Node_Str",CDMIContentType.CDMI_DATA);
  httpdelete.setHeader("String_Node_Str",CDMIContentType.CDMI_SPEC_VERSION);
  HttpResponse response=httpclient.execute(httpdelete);
  int responseCode=response.getStatusLine().getStatusCode();
  HttpEntity entity=response.getEntity();
  EntityUtils.consume(entity);
switch (responseCode) {
case 200:
    break;
case 400:
  throw new CDMIOperationException("String_Node_Str" + remoteFNM,responseCode);
case 401:
throw new CDMIOperationException("String_Node_Str" + remoteFNM,responseCode);
case 403:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteFNM,responseCode);
case 404:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteFNM,responseCode);
case 409:
throw new CDMIOperationException("String_Node_Str" + endpoint + remoteFNM,responseCode);
}
}
Program: 43897
Project: 43897
Buggy source:
/** 
 * This method can be used to extract an element array from the response.
 * @param response
 * @param elementName
 * @return
 * @throws IllegalStateException
 * @throws IOException
 */
public static Object[] getElementArrary(HttpResponse response,String elementName) throws IllegalStateException, IOException {
  JSONParser parser=new JSONParser();
  InputStream stream=response.getEntity().getContent();
  InputStreamReader is=new InputStreamReader(stream);
  ContainerFactory containerFactory=new ContainerFactory(){
    public List creatArrayContainer(){
      return new LinkedList();
    }
    public Map createObjectContainer(){
      return new LinkedHashMap();
    }
  }
;
  try {
    Map json=(Map)parser.parse(is,containerFactory);
    LinkedList theList=(LinkedList)json.get(elementName);
    return theList.toArray();
  }
 catch (  ParseException pe) {
    System.err.println(pe.getMessage());
  }
 finally {
    stream.close();
    is.close();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * This method can be used to extract an element array from the response.
 * @param response
 * @param elementName
 * @return
 * @throws IllegalStateException
 * @throws IOException
 * @throws ParseException 
 */
public static Object[] getElementArrary(HttpResponse response,String elementName) throws IllegalStateException, IOException, ParseException {
  JSONParser parser=new JSONParser();
  InputStream stream=response.getEntity().getContent();
  InputStreamReader is=new InputStreamReader(stream);
  ContainerFactory containerFactory=new ContainerFactory(){
    public List creatArrayContainer(){
      return new LinkedList();
    }
    public Map createObjectContainer(){
      return new LinkedHashMap();
    }
  }
;
  Map json=(Map)parser.parse(is,containerFactory);
  LinkedList theList=(LinkedList)json.get(elementName);
  return theList.toArray();
}
Program: 43898
Project: 43898
Buggy source:
/** 
 * This method extracts a specific element from the response
 * @param response
 * @param elementName
 * @return
 * @throws IllegalStateException
 * @throws IOException
 */
public static Object getElement(HttpResponse response,String elementName) throws IllegalStateException, IOException {
  JSONParser parser=new JSONParser();
  InputStream stream=response.getEntity().getContent();
  InputStreamReader is=new InputStreamReader(stream);
  ContainerFactory containerFactory=new ContainerFactory(){
    public List creatArrayContainer(){
      return new LinkedList();
    }
    public Map createObjectContainer(){
      return new LinkedHashMap();
    }
  }
;
  try {
    Map json=(Map)parser.parse(is,containerFactory);
    return json.get(elementName);
  }
 catch (  ParseException pe) {
    System.err.println(pe.getMessage());
  }
 finally {
    stream.close();
    is.close();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * This method extracts a specific element from the response
 * @param response
 * @param elementName
 * @return
 * @throws IllegalStateException
 * @throws IOException
 * @throws ParseException
 */
public static Object getElement(HttpResponse response,String elementName) throws IOException, ParseException {
  JSONParser parser=new JSONParser();
  InputStream stream=response.getEntity().getContent();
  InputStreamReader is=new InputStreamReader(stream);
  ContainerFactory containerFactory=new ContainerFactory(){
    public List creatArrayContainer(){
      return new LinkedList();
    }
    public Map createObjectContainer(){
      return new LinkedHashMap();
    }
  }
;
  Map json=(Map)parser.parse(is,containerFactory);
  return json.get(elementName);
}