Program: 141315
Project: 141315
Buggy source:
/** 
 * Upload the file.
 */
public void upload(){
  LOGGER.info("String_Node_Str" + s3url.getSource());
  final ObjectMetadata md=new ObjectMetadata();
  if (this.metadata.getContentType() != null)   md.setContentType(this.metadata.getContentType());
  if (this.metadata.getContentEncoding() != null)   md.setContentEncoding(this.metadata.getContentEncoding());
  md.setContentLength(this.metadata.getContentLength());
  final PutObjectRequest or=new PutObjectRequest(s3url.bucket,s3url.getFilePath(),this.is,md);
  LOGGER.fine("String_Node_Str" + this.s3url + "String_Node_Str"+ md.getContentType()+ "String_Node_Str"+ md.getContentEncoding()+ "String_Node_Str"+ this.metadata.getContentLength()+ "String_Node_Str");
  int tryCount=0;
  boolean uploadOk=false;
  final long start=System.currentTimeMillis();
  AmazonClientException ace=null;
  if (multipartUpload) {
    LOGGER.info("String_Node_Str");
    final Upload myUpload=tx.upload(or);
    int count=0;
    while (!myUpload.isDone()) {
      if (count % 10 == 0)       LOGGER.info("String_Node_Str" + myUpload.getDescription() + "String_Node_Str"+ myUpload.getState()+ "String_Node_Str"+ myUpload.getProgress().getBytesTransfered());
      count++;
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    }
    uploadOk=true;
  }
 else   do {
    tryCount++;
    try {
      getS3().putObject(or);
      uploadOk=true;
    }
 catch (    AmazonClientException e) {
      ace=e;
      LOGGER.warning("String_Node_Str" + this.s3url + "String_Node_Str"+ tryCount+ "String_Node_Str"+ e.getMessage());
      try {
        Thread.sleep(10000);
      }
 catch (      InterruptedException e1) {
        e1.printStackTrace();
      }
    }
  }
 while (!uploadOk && tryCount < 3);
  if (!uploadOk)   throw ace;
  final long end=System.currentTimeMillis();
  final long duration=end - start;
  final int speedKiB=(int)(this.metadata.getContentLength() / (duration / 1000.0) / 1024.0);
  LOGGER.info("String_Node_Str" + this.s3url + "String_Node_Str"+ this.metadata.getContentLength()+ "String_Node_Str"+ StringUtils.toTimeHumanReadable(duration)+ "String_Node_Str"+ speedKiB+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Upload the file.
 */
public void upload() throws IOException {
  LOGGER.info("String_Node_Str" + s3url.getSource());
  final ObjectMetadata md=new ObjectMetadata();
  if (this.metadata.getContentType() != null)   md.setContentType(this.metadata.getContentType());
  if (this.metadata.getContentEncoding() != null)   md.setContentEncoding(this.metadata.getContentEncoding());
  md.setContentLength(this.metadata.getContentLength());
  LOGGER.info("String_Node_Str" + this.s3url + "String_Node_Str"+ md.getContentType()+ "String_Node_Str"+ md.getContentEncoding()+ "String_Node_Str"+ this.metadata.getContentLength()+ "String_Node_Str");
  int tryCount=0;
  boolean uploadOk=false;
  final long start=System.currentTimeMillis();
  AmazonClientException ace=null;
  if (multipartUpload) {
    LOGGER.info("String_Node_Str");
    final Transfer 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 IOException("String_Node_Str" + myUpload.getState());
    }
 catch (    InterruptedException e) {
      LOGGER.warning(e.getMessage());
      throw new IOException(e.getMessage());
    }
    uploadOk=true;
  }
 else   do {
    tryCount++;
    try {
      final PutObjectRequest or=new PutObjectRequest(s3url.bucket,s3url.getFilePath(),this.is,md);
      getS3().putObject(or);
      uploadOk=true;
    }
 catch (    AmazonClientException e) {
      ace=e;
      LOGGER.warning("String_Node_Str" + this.s3url + "String_Node_Str"+ tryCount+ "String_Node_Str"+ e.getMessage());
      try {
        Thread.sleep(10000);
      }
 catch (      InterruptedException e1) {
        e1.printStackTrace();
      }
    }
  }
 while (!uploadOk && tryCount < 3);
  if (!uploadOk)   throw new IOException(ace.getMessage());
  final long end=System.currentTimeMillis();
  final long duration=end - start;
  final int speedKiB=(int)(this.metadata.getContentLength() / (duration / 1000.0) / 1024.0);
  LOGGER.info("String_Node_Str" + this.s3url + "String_Node_Str"+ this.metadata.getContentLength()+ "String_Node_Str"+ StringUtils.toTimeHumanReadable(duration)+ "String_Node_Str"+ speedKiB+ "String_Node_Str");
}