#vulnerable code 
                             @Test
	public void testGetStructure() {
		try {
			SimpleFormatter sf = new SimpleFormatter();
			String delimiter = "/";
			String bucket = "maven.kuali.org";
			AmazonS3Client client = getClient();
			KualiMavenBucketBaseCase baseCase1 = new KualiMavenBucketBaseCase();
			baseCase1.setDelimiter(delimiter);
			baseCase1.setToken("latest");
			JavaxServletOnlyBaseCase baseCase2 = new JavaxServletOnlyBaseCase();
			baseCase2.setDelimiter(delimiter);
			baseCase2.setToken("latest");

			long start = System.currentTimeMillis();
			List<String> prefixes = new ArrayList<String>();
			buildPrefixList(client, bucket, prefixes, null, delimiter, baseCase2);
			long elapsed = System.currentTimeMillis() - start;
			DefaultMutableTreeNode node = buildTree(prefixes, delimiter);
			List<DefaultMutableTreeNode> leaves = getLeaves(node);
			log.info("Total Prefixes: " + prefixes.size());
			log.info("Total Time: " + sf.getTime(elapsed));
			log.info("Leaves: " + leaves.size());
		} catch (Exception e) {
			e.printStackTrace();
		}
	} 
                            #location 20 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void testGetStructure() {
		try {
			long now = System.currentTimeMillis();
			long bytes = Long.MAX_VALUE;
			SimpleFormatter sf = new SimpleFormatter();
			log.info(sf.getSize(bytes));
			log.info(sf.getRate(now, bytes));
			log.info(sf.getTime(now));
			String delimiter = "/";
			String bucket = "maven.kuali.org";
			AmazonS3Client client = getClient();
			KualiMavenBucketBaseCase baseCase1 = new KualiMavenBucketBaseCase();
			baseCase1.setDelimiter(delimiter);
			baseCase1.setToken("latest");
			JavaxServletOnlyBaseCase baseCase2 = new JavaxServletOnlyBaseCase();
			baseCase2.setDelimiter(delimiter);
			baseCase2.setToken("latest");

			long start = System.currentTimeMillis();
			List<String> prefixes = new ArrayList<String>();
			buildPrefixList(client, bucket, prefixes, null, delimiter, baseCase2);
			long elapsed = System.currentTimeMillis() - start;
			DefaultMutableTreeNode node = buildTree(prefixes, delimiter);
			List<DefaultMutableTreeNode> leaves = getLeaves(node);
			log.info("Total Prefixes: " + prefixes.size());
			log.info("Total Time: " + sf.getTime(elapsed));
			log.info("Leaves: " + leaves.size());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}