#fixed code
                             @Test
	public void processServerResponseTest() {
		String aString = "I'm some super long string that has multiple words";

		//Simulate /LIST response
		bot.processServerResponse(321, "Channel :Users Name");
		bot.processServerResponse(322, "PircBotXUser #PircBotXChannel 99 :" + aString);
		bot.processServerResponse(322, "PircBotXUser #PircBotXChannel1 100 :" + aString + aString);
		bot.processServerResponse(322, "PircBotXUser #PircBotXChannel2 101 :" + aString + aString + aString);
		bot.processServerResponse(323, ":End of /LIST");
		Set<ChannelListEntry> channels = ((ChannelInfo.Event) signal.event).getList();
		assertEquals(channels.size(), 3);
		boolean channelParsed = false;
		for (ChannelListEntry entry : channels)
			if (entry.getName().equals("#PircBotXChannel1")) {
				assertEquals(entry.getName(), "#PircBotXChannel1");
				assertEquals(entry.getTopic(), aString + aString);
				assertEquals(entry.getUsers(), 100);
				channelParsed = true;
			}
		assertEquals(channelParsed, true, "Channel #PircBotXChannel1 not found in /LIST results!");

		//From a /TOPIC or /JOIN
		Channel aChannel = bot.getChannel("#aChannel");
		bot.processServerResponse(332, "PircBotXUser #aChannel :" + aString + aString);
		assertEquals(aChannel.getTopic(), aString + aString);

		bot.processServerResponse(333, "PircBotXUser #aChannel ISetTopic 1564842512");
		assertEquals(aChannel.getTopicSetter(), "ISetTopic");
		assertEquals(aChannel.getTopicTimestamp(), (long) 1564842512 * 1000);
	}
#vulnerable code 
                             @Test
	public void processServerResponseTest() {
		PircBotXVisible bot = new PircBotXVisible() {
		};
		final Signal signal = new Signal();
		bot.getListeners().addListener(new MetaListener() {
			@Override
			public void onChannelInfo(Event event) {
				signal.event = event;
			}

			@Override
			public void onMotd(Motd.Event event) {
				signal.event = event;
			}

			@Override
			public void onTopic(Topic.Event event) {
				signal.event = event;
			}

			@Override
			public void onUserList(UserList.Event event) {
				signal.event = event;
			}
		});

		String aString = "I'm some super long string that has multiple words";

		//Simulate /LIST response
		bot.processServerResponse(321, "Channel :Users Name");
		bot.processServerResponse(322, "PircBotXUser #PircBotXChannel 99 :" + aString);
		bot.processServerResponse(322, "PircBotXUser #PircBotXChannel1 100 :" + aString + aString);
		bot.processServerResponse(322, "PircBotXUser #PircBotXChannel2 101 :" + aString + aString + aString);
		bot.processServerResponse(323, ":End of /LIST");
		Set<ChannelListEntry> channels = ((ChannelInfo.Event) signal.event).getList();
		assertEquals(channels.size(), 3);
		boolean channelParsed = false;
		for (ChannelListEntry entry : channels)
			if (entry.getName().equals("#PircBotXChannel1")) {
				assertEquals(entry.getName(), "#PircBotXChannel1");
				assertEquals(entry.getTopic(), aString + aString);
				assertEquals(entry.getUsers(), 100);
				channelParsed = true;
			}
		assertEquals(channelParsed, true, "Channel #PircBotXChannel1 not found in /LIST results!");

		//From a /TOPIC or /JOIN
		Channel aChannel = bot.getChannel("#aChannel");
		bot.processServerResponse(332, "PircBotXUser #aChannel :" + aString + aString);
		assertEquals(aChannel.getTopic(), aString + aString);

		bot.processServerResponse(333, "PircBotXUser #aChannel ISetTopic 1564842512");
		assertEquals(aChannel.getTopicSetter(), "ISetTopic");
		assertEquals(aChannel.getTopicTimestamp(), (long)1564842512*1000);
	} 
                            #location 36 
                            #vulnerability type NULL_DEREFERENCE