#fixed code
                             private void updateGC() {
		if (perfDataSupport) {
			ygcCount.update((Long) ygcCountCounter.getValue());
			ygcTimeMills.update(perfData.tickToMills(ygcTimeCounter));
			fullgcCount.update((Long) fullGcCountCounter.getValue());
			fullgcTimeMills.update(perfData.tickToMills(fullgcTimeCounter));
		} else if (isJmxStateOk()) {
			try {
				ygcCount.update(jmxClient.getGarbageCollectorManager().getYoungCollector().getCollectionCount());
				ygcTimeMills.update(jmxClient.getGarbageCollectorManager().getYoungCollector().getCollectionTime());
				fullgcCount.update(jmxClient.getGarbageCollectorManager().getFullCollector().getCollectionCount());
				fullgcTimeMills.update(jmxClient.getGarbageCollectorManager().getFullCollector().getCollectionTime());
			} catch (Exception e) {
				handleJmxFetchDataError(e);
			}
		}
	}
#vulnerable code 
                             private void updateGC() {
		if (perfDataSupport) {
			ygcCount.update((Long) ygcCountCounter.getValue());
			ygcTimeMills.update(perfData.tickToMills(ygcTimeCounter));
			fullgcCount.update((Long) fullGcCountCounter.getValue());
			fullgcTimeMills.update(perfData.tickToMills(fullgcTimeCounter));
		} else if (isJmxStateOk()) {
			try {
				ygcCount.update(jmxClient.getYoungCollector().getCollectionCount());
				ygcTimeMills.update(jmxClient.getYoungCollector().getCollectionTime());
				fullgcCount.update(jmxClient.getFullCollector().getCollectionCount());
				fullgcTimeMills.update(jmxClient.getFullCollector().getCollectionTime());
			} catch (Exception e) {
				handleJmxFetchDataError(e);
			}
		}
	} 
                            #location 11 
                            #vulnerability type NULL_DEREFERENCE