nus-yam/ex-repair huggingface dataset:
Program: 141274
Project: 141274
Buggy source:
/** 
 * Create a GenomeDescription object from a Fasta file.
 * @param genomeFastaIs InputStream
 */
public static GenomeDescription createGenomeDescFromFasta(final InputStream genomeFastaIs,final String filename) throws BadBioEntryException, IOException {
  checkNotNull(genomeFastaIs,"String_Node_Str");
  final GenomeDescription result=new GenomeDescription();
  result.setGenomeName(StringUtils.basename(filename));
  MessageDigest md5Digest;
  try {
    md5Digest=MessageDigest.getInstance("String_Node_Str");
  }
 catch (  NoSuchAlgorithmException e) {
    md5Digest=null;
  }
  final FastaReader reader=new FastaReader(genomeFastaIs);
  for (  final Sequence sequence : reader) {
    long len=checkBases(sequence);
    final String name=parseChromosomeName(sequence.getName());
    if (md5Digest != null) {
      md5Digest.update(name.getBytes());
      for (      final String s : StringUtils.splitStringIterator(sequence.getSequence(),STRING_LENGTH_BUFFER))       md5Digest.update(s.getBytes());
    }
    result.addSequence(name,len);
  }
  reader.throwException();
  if (md5Digest != null)   result.setMD5Sum(digestToString(md5Digest));
  genomeFastaIs.close();
  return result;
}

Fixed version (ground truth):
/** 
 * Create a GenomeDescription object from a Fasta file.
 * @param genomeFastaIs InputStream
 */
public static GenomeDescription createGenomeDescFromFasta(final InputStream genomeFastaIs,final String filename) throws BadBioEntryException, IOException {
  checkNotNull(genomeFastaIs,"String_Node_Str");
  final GenomeDescription result=new GenomeDescription();
  result.setGenomeName(StringUtils.basename(filename));
  MessageDigest md5Digest;
  try {
    md5Digest=MessageDigest.getInstance("String_Node_Str");
  }
 catch (  NoSuchAlgorithmException e) {
    md5Digest=null;
  }
  final FastaReader reader=new FastaReader(genomeFastaIs);
  for (  final Sequence sequence : reader) {
    long len=checkBases(sequence);
    final String name=parseChromosomeName(sequence.getName());
    if (md5Digest != null) {
      md5Digest.update(name.getBytes(Globals.DEFAULT_FILE_ENCODING));
      for (      final String s : StringUtils.splitStringIterator(sequence.getSequence(),STRING_LENGTH_BUFFER))       md5Digest.update(s.getBytes(Globals.DEFAULT_FILE_ENCODING));
    }
    result.addSequence(name,len);
  }
  reader.throwException();
  if (md5Digest != null)   result.setMD5Sum(digestToString(md5Digest));
  genomeFastaIs.close();
  return result;
}
Program: 141275
Project: 141275
Buggy source:
@Override public boolean next(final LongWritable key,final Text value) throws IOException {
  if (!stillInChunk)   return false;
  final long startPos=fsin.getPos();
  boolean status=readUntilMatch(endTag,true);
  final String data;
  if (startPos == 0)   data=new String(buffer.getData(),1,buffer.getLength());
 else   data=new String(buffer.getData(),0,buffer.getLength());
  final String[] lines=PATTERN.split(data);
  for (int i=0; i < lines.length; i++) {
    final String line=lines[i].trim();
    if ("String_Node_Str".equals(line))     continue;
    sb.append(line);
    if (i == 0)     sb.append("String_Node_Str");
  }
  if (sb.charAt(sb.length() - 1) == '>')   sb.setLength(sb.length() - 1);
  key.set(fsin.getPos());
  value.set(sb.toString());
  sb.setLength(0);
  buffer.reset();
  if (!status) {
    stillInChunk=false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean next(final LongWritable key,final Text value) throws IOException {
  if (!stillInChunk)   return false;
  final long startPos=fsin.getPos();
  boolean status=readUntilMatch(endTag,true);
  final String data;
  if (startPos == 0)   data=new String(buffer.getData(),1,buffer.getLength(),CHARSET);
 else   data=new String(buffer.getData(),0,buffer.getLength(),CHARSET);
  final String[] lines=PATTERN.split(data);
  for (int i=0; i < lines.length; i++) {
    final String line=lines[i].trim();
    if ("String_Node_Str".equals(line))     continue;
    sb.append(line);
    if (i == 0)     sb.append("String_Node_Str");
  }
  if (sb.charAt(sb.length() - 1) == '>')   sb.setLength(sb.length() - 1);
  key.set(fsin.getPos());
  value.set(sb.toString());
  sb.setLength(0);
  buffer.reset();
  if (!status) {
    stillInChunk=false;
  }
  return true;
}
Program: 141276
Project: 141276
Buggy source:
@Override public boolean next(final LongWritable key,final Text value) throws IOException {
  if (!stillInChunk)   return false;
  final long startPos=fsin.getPos();
  boolean status=readUntilMatch(endTag,true);
  final String data;
  if (startPos == 0)   data=new String(buffer.getData(),1,buffer.getLength());
 else   data=new String(buffer.getData(),0,buffer.getLength());
  final String[] lines=PATTERN.split(data);
  String id="String_Node_Str";
  int count=0;
  for (int i=0; i < lines.length; i++) {
    final String line=lines[i].trim();
    if ("String_Node_Str".equals(line))     continue;
    if (count == 0)     id=line;
    if (count == 2 && !id.equals(line.substring(1)))     throw new IOException("String_Node_Str" + id + "String_Node_Str"+ line.substring(1));
    if (count != 2 && count < 4) {
      if (count > 0)       sb.append("String_Node_Str");
      sb.append(line);
    }
    count++;
  }
  key.set(fsin.getPos());
  value.set(sb.toString());
  sb.setLength(0);
  buffer.reset();
  if (!status)   stillInChunk=false;
  return true;
}

Fixed version (ground truth):
@Override public boolean next(final LongWritable key,final Text value) throws IOException {
  if (!stillInChunk)   return false;
  final long startPos=fsin.getPos();
  boolean status=readUntilMatch(endTag,true);
  final String data;
  if (startPos == 0)   data=new String(buffer.getData(),1,buffer.getLength(),CHARSET);
 else   data=new String(buffer.getData(),0,buffer.getLength(),CHARSET);
  final String[] lines=PATTERN.split(data);
  String id="String_Node_Str";
  int count=0;
  for (int i=0; i < lines.length; i++) {
    final String line=lines[i].trim();
    if ("String_Node_Str".equals(line))     continue;
    if (count == 0)     id=line;
    if (count == 2 && !id.equals(line.substring(1)))     throw new IOException("String_Node_Str" + id + "String_Node_Str"+ line.substring(1));
    if (count != 2 && count < 4) {
      if (count > 0)       sb.append("String_Node_Str");
      sb.append(line);
    }
    count++;
  }
  key.set(fsin.getPos());
  value.set(sb.toString());
  sb.setLength(0);
  buffer.reset();
  if (!status)   stillInChunk=false;
  return true;
}
Program: 141277
Project: 141277
Buggy source:
/** 
 * Load the information from the index file
 * @throws IOException if an error occurs while loading the index file
 */
private void load() throws IOException {
  if (!this.dir.exists())   throw new IOException("String_Node_Str" + this.dir.getSource());
  final DataFile indexFile=new DataFile(dir,INDEX_FILENAME);
  if (!indexFile.exists()) {
    save();
    return;
  }
  final BufferedReader br=new BufferedReader(new InputStreamReader(indexFile.open()));
  final Pattern pattern=Pattern.compile("String_Node_Str");
  String line=null;
  while ((line=br.readLine()) != null) {
    final String trimmedLine=line.trim();
    if ("String_Node_Str".equals(trimmedLine) || trimmedLine.startsWith("String_Node_Str"))     continue;
    final List<String> fields=Arrays.asList(pattern.split(trimmedLine));
    if (fields.size() != 6)     continue;
    final IndexEntry e=new IndexEntry();
    e.genomeName=fields.get(0);
    e.genomeMD5=fields.get(1);
    e.mapperName=fields.get(4);
    e.file=new DataFile(dir,fields.get(5));
    if (e.file.exists())     this.entries.put(e.getKey(),e);
  }
  br.close();
}

Fixed version (ground truth):
/** 
 * Load the information from the index file
 * @throws IOException if an error occurs while loading the index file
 */
private void load() throws IOException {
  if (!this.dir.exists())   throw new IOException("String_Node_Str" + this.dir.getSource());
  final DataFile indexFile=new DataFile(dir,INDEX_FILENAME);
  if (!indexFile.exists()) {
    save();
    return;
  }
  final BufferedReader br=new BufferedReader(new InputStreamReader(indexFile.open(),Globals.DEFAULT_FILE_ENCODING));
  final Pattern pattern=Pattern.compile("String_Node_Str");
  String line=null;
  while ((line=br.readLine()) != null) {
    final String trimmedLine=line.trim();
    if ("String_Node_Str".equals(trimmedLine) || trimmedLine.startsWith("String_Node_Str"))     continue;
    final List<String> fields=Arrays.asList(pattern.split(trimmedLine));
    if (fields.size() != 6)     continue;
    final IndexEntry e=new IndexEntry();
    e.genomeName=fields.get(0);
    e.genomeMD5=fields.get(1);
    e.mapperName=fields.get(4);
    e.file=new DataFile(dir,fields.get(5));
    if (e.file.exists())     this.entries.put(e.getKey(),e);
  }
  br.close();
}
Program: 141278
Project: 141278
Buggy source:
/** 
 * Save the information in the index file
 * @throws IOException if an error occurs while saving the index file
 */
private void save() throws IOException {
  if (!this.dir.exists())   throw new IOException("String_Node_Str" + this.dir.getSource());
  final DataFile indexFile=new DataFile(dir,INDEX_FILENAME);
  final BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(indexFile.create()));
  writer.write("String_Node_Str");
  for (  Map.Entry<String,IndexEntry> e : this.entries.entrySet()) {
    IndexEntry ie=e.getValue();
    writer.append(ie.genomeName == null ? "String_Node_Str" : ie.genomeName);
    writer.append("String_Node_Str");
    writer.append(ie.genomeMD5);
    writer.append("String_Node_Str");
    writer.append(Integer.toString(ie.sequences));
    writer.append("String_Node_Str");
    writer.append(Long.toString(ie.length));
    writer.append("String_Node_Str");
    writer.append(ie.mapperName);
    writer.append("String_Node_Str");
    writer.append(ie.file.getName());
    writer.append("String_Node_Str");
  }
  writer.close();
}

Fixed version (ground truth):
/** 
 * Save the information in the index file
 * @throws IOException if an error occurs while saving the index file
 */
private void save() throws IOException {
  if (!this.dir.exists())   throw new IOException("String_Node_Str" + this.dir.getSource());
  final DataFile indexFile=new DataFile(dir,INDEX_FILENAME);
  final BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(indexFile.create(),Globals.DEFAULT_FILE_ENCODING));
  writer.write("String_Node_Str");
  for (  Map.Entry<String,IndexEntry> e : this.entries.entrySet()) {
    IndexEntry ie=e.getValue();
    writer.append(ie.genomeName == null ? "String_Node_Str" : ie.genomeName);
    writer.append("String_Node_Str");
    writer.append(ie.genomeMD5);
    writer.append("String_Node_Str");
    writer.append(Integer.toString(ie.sequences));
    writer.append("String_Node_Str");
    writer.append(Long.toString(ie.length));
    writer.append("String_Node_Str");
    writer.append(ie.mapperName);
    writer.append("String_Node_Str");
    writer.append(ie.file.getName());
    writer.append("String_Node_Str");
  }
  writer.close();
}
Program: 141279
Project: 141279
Buggy source:
/** 
 * Check a genome file.
 * @param is Input stream to read for the checking
 * @return a map the the sizes of the chromosomes
 * @throws IOException if an error occurs while reading data
 * @throws BadBioEntryException if the name or the sequence of the chromosomeis not valid
 */
private Map<String,Integer> checkGenomeFile(final InputStream is) throws IOException, BadBioEntryException {
  final BufferedReader br=new BufferedReader(new InputStreamReader(is));
  String line=null;
  final Map<String,Integer> chromosomes=new HashMap<String,Integer>();
  String currentChr=null;
  int currentSize=0;
  while ((line=br.readLine()) != null) {
    line=line.trim();
    if ("String_Node_Str".equals(line))     continue;
    if (line.startsWith("String_Node_Str")) {
      chromosomes.put(currentChr,currentSize);
      currentChr=parseFastaEntryHeader(line);
      if (chromosomes.containsKey(currentChr))       throw new BadBioEntryException("String_Node_Str" + currentChr,line);
      currentSize=0;
    }
 else {
      if (currentChr == null)       throw new BadBioEntryException("String_Node_Str",line);
      currentSize+=checkBases(line.trim());
    }
  }
  chromosomes.put(currentChr,currentSize);
  is.close();
  return chromosomes;
}

Fixed version (ground truth):
/** 
 * Check a genome file.
 * @param is Input stream to read for the checking
 * @return a map the the sizes of the chromosomes
 * @throws IOException if an error occurs while reading data
 * @throws BadBioEntryException if the name or the sequence of the chromosomeis not valid
 */
private Map<String,Integer> checkGenomeFile(final InputStream is) throws IOException, BadBioEntryException {
  final BufferedReader br=new BufferedReader(new InputStreamReader(is,Globals.DEFAULT_FILE_ENCODING));
  String line=null;
  final Map<String,Integer> chromosomes=new HashMap<String,Integer>();
  String currentChr=null;
  int currentSize=0;
  while ((line=br.readLine()) != null) {
    line=line.trim();
    if ("String_Node_Str".equals(line))     continue;
    if (line.startsWith("String_Node_Str")) {
      chromosomes.put(currentChr,currentSize);
      currentChr=parseFastaEntryHeader(line);
      if (chromosomes.containsKey(currentChr))       throw new BadBioEntryException("String_Node_Str" + currentChr,line);
      currentSize=0;
    }
 else {
      if (currentChr == null)       throw new BadBioEntryException("String_Node_Str",line);
      currentSize+=checkBases(line.trim());
    }
  }
  chromosomes.put(currentChr,currentSize);
  is.close();
  return chromosomes;
}
Program: 141280
Project: 141280
Buggy source:
private void writeDirectoryCatalog(final Path catPath,final FileSystem fs) throws IOException {
  final Writer writer=new OutputStreamWriter(fs.create(catPath));
  final Path basePath=new Path(getContext().getBasePathname());
  final FileSystem baseFs=basePath.getFileSystem(this.conf);
  final StringBuilder sb=new StringBuilder();
  final FileStatus[] files=baseFs.listStatus(basePath);
  long count=0;
  if (files != null)   for (  FileStatus f : files) {
    if (f.isDir())     sb.append("String_Node_Str");
 else     sb.append("String_Node_Str");
    sb.append(new Date(f.getModificationTime()));
    sb.append("String_Node_Str");
    sb.append(String.format("String_Node_Str",f.getLen()));
    sb.append("String_Node_Str");
    sb.append(f.getPath().getName());
    sb.append("String_Node_Str");
    count+=f.getLen();
  }
  sb.append(count);
  sb.append("String_Node_Str");
  sb.append(basePath);
  sb.append("String_Node_Str");
  writer.write(sb.toString());
  writer.close();
}

Fixed version (ground truth):
private void writeDirectoryCatalog(final Path catPath,final FileSystem fs) throws IOException {
  final Writer writer=new OutputStreamWriter(fs.create(catPath),Globals.DEFAULT_FILE_ENCODING);
  final Path basePath=new Path(getContext().getBasePathname());
  final FileSystem baseFs=basePath.getFileSystem(this.conf);
  final StringBuilder sb=new StringBuilder();
  final FileStatus[] files=baseFs.listStatus(basePath);
  long count=0;
  if (files != null)   for (  FileStatus f : files) {
    if (f.isDir())     sb.append("String_Node_Str");
 else     sb.append("String_Node_Str");
    sb.append(new Date(f.getModificationTime()));
    sb.append("String_Node_Str");
    sb.append(String.format("String_Node_Str",f.getLen()));
    sb.append("String_Node_Str");
    sb.append(f.getPath().getName());
    sb.append("String_Node_Str");
    count+=f.getLen();
  }
  sb.append(count);
  sb.append("String_Node_Str");
  sb.append(basePath);
  sb.append("String_Node_Str");
  writer.write(sb.toString());
  writer.close();
}
Program: 141281
Project: 141281
Buggy source:
private void writeErrorLog(final Path logPath,final FileSystem fs,final StepResult result) throws IOException {
  final Writer writer=new OutputStreamWriter(fs.create(logPath));
  final String data=result.getErrorMessage();
  final Exception e=result.getException();
  if (data != null)   writer.write(data);
  if (e != null) {
    writer.write("String_Node_Str");
    writer.write("String_Node_Str" + e.getClass().getName() + "String_Node_Str");
    writer.write("String_Node_Str" + e.getMessage() + "String_Node_Str");
    writer.write("String_Node_Str");
    e.printStackTrace(new PrintWriter(writer));
  }
  writer.close();
}

Fixed version (ground truth):
private void writeErrorLog(final Path logPath,final FileSystem fs,final StepResult result) throws IOException {
  final Writer writer=new OutputStreamWriter(fs.create(logPath),Globals.DEFAULT_FILE_ENCODING);
  final String data=result.getErrorMessage();
  final Exception e=result.getException();
  if (data != null)   writer.write(data);
  if (e != null) {
    writer.write("String_Node_Str");
    writer.write("String_Node_Str" + e.getClass().getName() + "String_Node_Str");
    writer.write("String_Node_Str" + e.getMessage() + "String_Node_Str");
    writer.write("String_Node_Str");
    e.printStackTrace(new PrintWriter(writer));
  }
  writer.close();
}
Program: 141282
Project: 141282
Buggy source:
private void writeResultLog(final Path logPath,final FileSystem fs,final StepResult result) throws IOException {
  final Writer writer=new OutputStreamWriter(fs.create(logPath));
  final String data=result.getLogMessage();
  if (data != null)   writer.write(data);
  writer.close();
}

Fixed version (ground truth):
private void writeResultLog(final Path logPath,final FileSystem fs,final StepResult result) throws IOException {
  final Writer writer=new OutputStreamWriter(fs.create(logPath),Globals.DEFAULT_FILE_ENCODING);
  final String data=result.getLogMessage();
  if (data != null)   writer.write(data);
  writer.close();
}
Program: 141283
Project: 141283
Buggy source:
private void standardUpload(final ObjectMetadata md){
  final PutObjectRequest or;
  if (file != null)   or=new PutObjectRequest(s3url.bucket,s3url.getFilePath(),file);
 else   or=new PutObjectRequest(s3url.bucket,s3url.getFilePath(),this.is,md);
  getS3().putObject(or);
}

Fixed version (ground truth):
private void standardUpload(final ObjectMetadata md){
  final PutObjectRequest or;
  if (file != null)   or=new PutObjectRequest(s3url.bucket,s3url.getFilePath(),file);
 else   or=new PutObjectRequest(s3url.bucket,s3url.getFilePath(),this.is,md);
  getS3().putObject(or);
  if (this.is != null)   try {
    this.is.close();
  }
 catch (  IOException e) {
    throw new AmazonClientException(e.getMessage());
  }
}
Program: 141284
Project: 141284
Buggy source:
private void multipartUpload(final ObjectMetadata md){
  LOGGER.info("String_Node_Str");
  final Transfer myUpload;
  if (file != null)   myUpload=tx.upload(s3url.bucket,s3url.getFilePath(),file);
 else   myUpload=tx.upload(s3url.bucket,s3url.getFilePath(),this.is,md);
  try {
    while (myUpload.isDone() == false) {
      Thread.sleep(500);
    }
    if (myUpload.getState() != TransferState.Completed)     throw new AmazonClientException("String_Node_Str" + myUpload.getState());
  }
 catch (  InterruptedException e) {
    LOGGER.warning(e.getMessage());
    throw new AmazonClientException(e.getMessage());
  }
}

Fixed version (ground truth):
private void multipartUpload(final ObjectMetadata md){
  LOGGER.info("String_Node_Str");
  final Transfer myUpload;
  if (file != null)   myUpload=tx.upload(s3url.bucket,s3url.getFilePath(),file);
 else   myUpload=tx.upload(s3url.bucket,s3url.getFilePath(),this.is,md);
  try {
    while (myUpload.isDone() == false) {
      Thread.sleep(500);
    }
    if (myUpload.getState() != TransferState.Completed)     throw new AmazonClientException("String_Node_Str" + myUpload.getState());
  }
 catch (  InterruptedException e) {
    LOGGER.warning(e.getMessage());
    throw new AmazonClientException(e.getMessage());
  }
 finally {
    try {
      if (this.is != null)       this.is.close();
    }
 catch (    IOException e) {
      throw new AmazonClientException(e.getMessage());
    }
  }
}
Program: 141285
Project: 141285
Buggy source:
public FileToUpload(final DataFile dest,final InputStream is,final DataFileMetadata md) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=is;
  this.metadata=md == null ? new SimpleDataFileMetadata() : md;
}

Fixed version (ground truth):
public FileToUpload(final DataFile dest,final File file) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=null;
  this.file=file;
  this.metadata=new SimpleDataFileMetadata();
}
Program: 141287
Project: 141287
Buggy source:
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  new FileToUpload(dest,src.open(),mdSrc).upload();
}

Fixed version (ground truth):
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  LOGGER.finest("String_Node_Str" + dest);
  final File file=src.toFile();
  final FileToUpload toUpload;
  if (file != null)   toUpload=new FileToUpload(dest,file);
 else   toUpload=new FileToUpload(dest,src.open(),mdSrc);
  toUpload.upload();
}
Program: 141288
Project: 141288
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  LOGGER.finest("String_Node_Str" + f.getAbsolutePath());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141289
Project: 141289
Buggy source:
public FileToUpload(final DataFile dest,final InputStream is,final DataFileMetadata md) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=is;
  this.metadata=md == null ? new SimpleDataFileMetadata() : md;
}

Fixed version (ground truth):
public FileToUpload(final DataFile dest,final File file) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=null;
  this.file=file;
  this.metadata=new SimpleDataFileMetadata();
}
Program: 141291
Project: 141291
Buggy source:
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  new FileToUpload(dest,src.open(),mdSrc).upload();
}

Fixed version (ground truth):
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  LOGGER.finest("String_Node_Str" + dest);
  final File file=src.toFile();
  final FileToUpload toUpload;
  if (file != null)   toUpload=new FileToUpload(dest,file);
 else   toUpload=new FileToUpload(dest,src.open(),mdSrc);
  toUpload.upload();
}
Program: 141292
Project: 141292
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  LOGGER.finest("String_Node_Str" + f.getAbsolutePath());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141293
Project: 141293
Buggy source:
public FileToUpload(final DataFile dest,final InputStream is,final DataFileMetadata md) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=is;
  this.metadata=md == null ? new SimpleDataFileMetadata() : md;
}

Fixed version (ground truth):
public FileToUpload(final DataFile dest,final File file) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=null;
  this.file=file;
  this.metadata=new SimpleDataFileMetadata();
}
Program: 141295
Project: 141295
Buggy source:
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  new FileToUpload(dest,src.open(),mdSrc).upload();
}

Fixed version (ground truth):
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  LOGGER.finest("String_Node_Str" + dest);
  final File file=src.toFile();
  final FileToUpload toUpload;
  if (file != null)   toUpload=new FileToUpload(dest,file);
 else   toUpload=new FileToUpload(dest,src.open(),mdSrc);
  toUpload.upload();
}
Program: 141296
Project: 141296
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  LOGGER.finest("String_Node_Str" + f.getAbsolutePath());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141297
Project: 141297
Buggy source:
public FileToUpload(final DataFile dest,final InputStream is,final DataFileMetadata md) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=is;
  this.metadata=md == null ? new SimpleDataFileMetadata() : md;
}

Fixed version (ground truth):
public FileToUpload(final DataFile dest,final File file) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=null;
  this.file=file;
  this.metadata=new SimpleDataFileMetadata();
}
Program: 141299
Project: 141299
Buggy source:
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  new FileToUpload(dest,src.open(),mdSrc).upload();
}

Fixed version (ground truth):
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  LOGGER.finest("String_Node_Str" + dest);
  final File file=src.toFile();
  final FileToUpload toUpload;
  if (file != null)   toUpload=new FileToUpload(dest,file);
 else   toUpload=new FileToUpload(dest,src.open(),mdSrc);
  toUpload.upload();
}
Program: 141300
Project: 141300
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  LOGGER.finest("String_Node_Str" + f.getAbsolutePath());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141301
Project: 141301
Buggy source:
public FileToUpload(final DataFile dest,final InputStream is,final DataFileMetadata md) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=is;
  this.metadata=md == null ? new SimpleDataFileMetadata() : md;
}

Fixed version (ground truth):
public FileToUpload(final DataFile dest,final File file) throws IOException {
  this.s3url=new S3URL(dest);
  this.is=null;
  this.file=file;
  this.metadata=new SimpleDataFileMetadata();
}
Program: 141303
Project: 141303
Buggy source:
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  new FileToUpload(dest,src.open(),mdSrc).upload();
}

Fixed version (ground truth):
@Override public void putData(final DataFile src,final DataFile dest) throws IOException {
  if (src == null)   throw new NullPointerException("String_Node_Str");
  if (dest == null)   throw new NullPointerException("String_Node_Str");
  final DataFileMetadata mdSrc=src.getMetaData();
  LOGGER.finest("String_Node_Str" + dest);
  final File file=src.toFile();
  final FileToUpload toUpload;
  if (file != null)   toUpload=new FileToUpload(dest,file);
 else   toUpload=new FileToUpload(dest,src.open(),mdSrc);
  toUpload.upload();
}
Program: 141304
Project: 141304
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  LOGGER.finest("String_Node_Str" + f.getAbsolutePath());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141305
Project: 141305
Buggy source:
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : this.metadataData.keySet())   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}

Fixed version (ground truth):
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : new HashSet<String>(this.metadataData.keySet()))   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}
Program: 141306
Project: 141306
Buggy source:
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : this.metadataData.keySet())   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}

Fixed version (ground truth):
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : new HashSet<String>(this.metadataData.keySet()))   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}
Program: 141308
Project: 141308
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,new FileInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141310
Project: 141310
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,new FileInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141311
Project: 141311
Buggy source:
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : this.metadataData.keySet())   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}

Fixed version (ground truth):
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : new HashSet<String>(this.metadataData.keySet()))   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}
Program: 141312
Project: 141312
Buggy source:
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : this.metadataData.keySet())   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}

Fixed version (ground truth):
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : new HashSet<String>(this.metadataData.keySet()))   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}
Program: 141314
Project: 141314
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,new FileInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141316
Project: 141316
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,new FileInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141317
Project: 141317
Buggy source:
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : this.metadataData.keySet())   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}

Fixed version (ground truth):
@Override public void removeMetadataField(final String fieldName){
  if (fieldName == null)   throw new EoulsanRuntimeException("String_Node_Str");
  if (!isMetadataField(fieldName))   throw new EoulsanRuntimeException("String_Node_Str");
  final String suffix="String_Node_Str" + this.metadataFields.get(fieldName);
  for (  String key : new HashSet<String>(this.metadataData.keySet()))   if (key.endsWith(suffix))   this.metadataData.remove(key);
  this.metadataFields.remove(fieldName);
  this.metadataOrder.remove(fieldName);
}
Program: 141319
Project: 141319
Buggy source:
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,FileUtils.createInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  super.close();
  final SimpleDataFileMetadata md2=new SimpleDataFileMetadata(md);
  if (md2.getContentLength() < 0)   md2.setContentLength(f.length());
  new FileToUpload(dest,new FileInputStream(f),md2).upload();
  if (!f.delete())   LOGGER.severe("String_Node_Str" + f.getAbsolutePath());
}
Program: 141320
Project: 141320
Buggy source:
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
}

Fixed version (ground truth):
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
  if (this.reuse)   this.result=new ReadSequence();
}
Program: 141321
Project: 141321
Buggy source:
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
}

Fixed version (ground truth):
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
  if (this.reuse)   this.result=new ReadSequence();
}
Program: 141322
Project: 141322
Buggy source:
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
}

Fixed version (ground truth):
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
  if (this.reuse)   this.result=new ReadSequence();
}
Program: 141323
Project: 141323
Buggy source:
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
}

Fixed version (ground truth):
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
  if (this.reuse)   this.result=new ReadSequence();
}
Program: 141324
Project: 141324
Buggy source:
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
}

Fixed version (ground truth):
/** 
 * Public constructor
 * @param file File to use
 * @param reuseResultObject if the object returns by the next() method will bealways the same
 */
public FastqReader(final File file,final boolean reuseResultObject) throws FileNotFoundException {
  if (file == null)   throw new NullPointerException("String_Node_Str");
  if (!file.isFile())   throw new FileNotFoundException("String_Node_Str" + file.getAbsolutePath());
  this.reader=FileUtils.createBufferedReader(file);
  this.reuse=reuseResultObject;
  if (this.reuse)   this.result=new ReadSequence();
}
Program: 141326
Project: 141326
Buggy source:
/** 
 * Convert the S3 URLs to S3N URLs in source, genome and annotation fields of the design.
 */
private void convertDesignS3URLs(){
  for (  Sample s : this.design.getSamples()) {
    final List<String> readsSources=s.getMetadata().getReads();
    for (int i=0; i < readsSources.size(); i++)     readsSources.set(i,convertS3URL(readsSources.get(i)));
    s.getMetadata().setReads(readsSources);
    if (s.getMetadata().isGenomeField())     s.getMetadata().setGenome(convertS3URL(s.getMetadata().getGenome()));
    if (s.getMetadata().isAnnotationField())     s.getMetadata().setAnnotation(convertS3URL(s.getMetadata().getAnnotation()));
  }
}

Fixed version (ground truth):
/** 
 * Convert the S3 URLs to S3N URLs in source, genome and annotation fields of the design.
 */
private void convertDesignS3URLs(){
  for (  Sample s : this.design.getSamples()) {
    final List<String> readsSources=Lists.newArrayList(s.getMetadata().getReads());
    for (int i=0; i < readsSources.size(); i++)     readsSources.set(i,convertS3URL(readsSources.get(i)));
    s.getMetadata().setReads(readsSources);
    if (s.getMetadata().isGenomeField())     s.getMetadata().setGenome(convertS3URL(s.getMetadata().getGenome()));
    if (s.getMetadata().isAnnotationField())     s.getMetadata().setAnnotation(convertS3URL(s.getMetadata().getAnnotation()));
  }
}