#vulnerable code 
                             String toString( final String[] pKeys ) {
		final StringBuffer s = new StringBuffer();
		for (int i = 0; i < pKeys.length; i++) {
			final String key = pKeys[i];
			final String value = (String) values.get(key);
			if (value != null) {
				s.append(key).append(": ");

				try {
					LineNumberReader reader = new LineNumberReader(new StringReader(value));
					String line;
					while ((line = reader.readLine()) != null) {
						if (reader.getLineNumber() > 0 && line.length() != 0 && !Character.isWhitespace(line.charAt(0))) {
							// indent the line with a white space
							s.append(' ');
						}

						s.append(line).append('\n');
					}
				} catch (IOException e) {
					e.printStackTrace();
				}
			}			
		}
		return s.toString();
	} 
                            #location 12 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             String toString( final String[] pKeys ) {
		final StringBuffer s = new StringBuffer();
		for (int i = 0; i < pKeys.length; i++) {
			final String key = pKeys[i];
			final String value = (String) values.get(key);
			if (value != null) {
				s.append(key).append(":");

				try {
					BufferedReader reader = new BufferedReader(new StringReader(value));
					String line;
					while ((line = reader.readLine()) != null) {
						if (line.length() != 0 && !Character.isWhitespace(line.charAt(0))) {
							s.append(' ');
						}

						s.append(line).append('\n');
					}
				} catch (IOException e) {
					e.printStackTrace();
				}
			}			
		}
		return s.toString();
	}