#vulnerable code 
                             public static void main(String[] args) {
		ConfigFactory configFactory = new ConfigFactory("zoo.host1:8181", "/projectx/modulex");

		ConfigNode propertyGroup1 = configFactory.getConfigNode("property-group1");
		System.out.println(propertyGroup1);

		// Listen changes
		propertyGroup1.register(new IObserver() {
			@Override
			public void notifiy(String data, String value) {
				// Some initialization
			}
		});

		String stringProperty = propertyGroup1.getProperty("string_property_key");
		Preconditions.checkState("Welcome here.".equals(stringProperty));
		String intProperty = propertyGroup1.getProperty("int_property_key");
		Preconditions.checkState(1123 == Integer.parseInt(intProperty));

		Object lock = new Object();
		synchronized (lock) {
			try {
				while (true)
					lock.wait();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	} 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             public static void main(String[] args) {
		ConfigFactory configFactory = new ConfigFactory("zoo.host1:8181", "/projectx/modulex", true);

		ConfigNode propertyGroup1 = configFactory.getConfigNode("property-group1");
		System.out.println(propertyGroup1);

		// Listen changes
		propertyGroup1.register(new IObserver() {
			@Override
			public void notifiy(String data, String value) {
				// Some initialization
			}
		});

		String stringProperty = propertyGroup1.getProperty("string_property_key");
		Preconditions.checkState("Welcome here.".equals(stringProperty));
		String intProperty = propertyGroup1.getProperty("int_property_key");
		Preconditions.checkState(1123 == Integer.parseInt(intProperty));

		Object lock = new Object();
		synchronized (lock) {
			try {
				while (true)
					lock.wait();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}