Program: 131081
Project: 131081
Buggy source:
private void reloadContents(){
  loadingLabel.setVisible(true);
  this.s3ListModel.clear();
  String bucketName=currentAccount.getBucket();
  ListObjectsRequest listObjectsRequest=new ListObjectsRequest();
  listObjectsRequest.setBucketName(bucketName);
  listObjectsRequest.setPrefix(prefix);
  listObjectsRequest.setDelimiter("String_Node_Str");
  AWSCredentials credentials=new BasicAWSCredentials(currentAccount.getKey(),currentAccount.getSecret());
  AmazonS3 s3Client=new AmazonS3Client(credentials);
  ObjectListing objectListing=s3Client.listObjects(listObjectsRequest);
  if (prefix.trim().length() != 0) {
    S3ListModel model=new S3ListModel(MOVE_BACK,MOVE_BACK,S3ListModel.FILE_BACK);
    this.s3ListModel.addElement(model);
  }
  List<String> directories=objectListing.getCommonPrefixes();
  for (  String directory : directories) {
    String dir=stripPrefix(directory);
    int lastSlash=dir.lastIndexOf("String_Node_Str");
    String strippeDir=dir.substring(0,lastSlash);
    String alias=dir;
    if (isAccountNumber(strippeDir)) {
      if (aliasMap.containsKey(strippeDir)) {
        alias=aliasMap.get(strippeDir);
      }
    }
    S3ListModel model=new S3ListModel(dir,alias,S3ListModel.FILE_DIR);
    this.s3ListModel.addElement(model);
  }
  List<S3ObjectSummary> objectSummaries=objectListing.getObjectSummaries();
  for (  final S3ObjectSummary objectSummary : objectSummaries) {
    String file=stripPrefix(objectSummary.getKey());
    S3ListModel model=new S3ListModel(file,file,S3ListModel.FILE_DOC);
    this.s3ListModel.addElement(model);
  }
  loadingLabel.setVisible(false);
}

Fixed version (ground truth):
private void reloadContents(){
  loadingLabel.setVisible(true);
  this.s3ListModel.clear();
  String bucketName=currentAccount.getBucket();
  ListObjectsRequest listObjectsRequest=new ListObjectsRequest();
  listObjectsRequest.setBucketName(bucketName);
  listObjectsRequest.setPrefix(prefix);
  listObjectsRequest.setDelimiter("String_Node_Str");
  AWSCredentials credentials=new BasicAWSCredentials(currentAccount.getKey(),currentAccount.getSecret());
  AmazonS3 s3Client=new AmazonS3Client(credentials);
  try {
    ObjectListing objectListing=s3Client.listObjects(listObjectsRequest);
    if (prefix.trim().length() != 0) {
      S3ListModel model=new S3ListModel(MOVE_BACK,MOVE_BACK,S3ListModel.FILE_BACK);
      this.s3ListModel.addElement(model);
    }
    List<String> directories=objectListing.getCommonPrefixes();
    for (    String directory : directories) {
      String dir=stripPrefix(directory);
      int lastSlash=dir.lastIndexOf("String_Node_Str");
      String strippeDir=dir.substring(0,lastSlash);
      String alias=dir;
      if (isAccountNumber(strippeDir)) {
        if (aliasMap.containsKey(strippeDir)) {
          alias=aliasMap.get(strippeDir);
        }
      }
      S3ListModel model=new S3ListModel(dir,alias,S3ListModel.FILE_DIR);
      this.s3ListModel.addElement(model);
    }
    List<S3ObjectSummary> objectSummaries=objectListing.getObjectSummaries();
    for (    final S3ObjectSummary objectSummary : objectSummaries) {
      String file=stripPrefix(objectSummary.getKey());
      S3ListModel model=new S3ListModel(file,file,S3ListModel.FILE_DOC);
      this.s3ListModel.addElement(model);
    }
    loadingLabel.setVisible(false);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}