<commit_before>package cs201.gui.transit;

import java.awt.Color;
import java.awt.Graphics2D;

import cs201.agents.transit.CarAgent;
import cs201.agents.transit.VehicleAgent;
import cs201.gui.CityPanel;

public class CarGui extends VehicleGui
{

	public CarGui(VehicleAgent vehicle, CityPanel city, int x, int y)
	{
		super(vehicle, city, x, y);
	}

	public CarGui(CarAgent car, CityPanel cityPanel)
	{
		super(car,cityPanel);
	}

	@Override
	public void drawBody(Graphics2D g)
	{
		g.setColor(Color.YELLOW);
		g.fillRect(getX(),getY(),CityPanel.GRID_SIZE,CityPanel.GRID_SIZE);
		
		g.setColor(Color.BLACK);
		g.drawString(""+((CarAgent)getVehicle()).getPassenger().getClass().getSimpleName(),getX()+CityPanel.GRID_SIZE,getY()+CityPanel.GRID_SIZE);
	}

}
<commit_msg>Fixed NullPointer in drawBody method<commit_after>package cs201.gui.transit;

import java.awt.Color;
import java.awt.Graphics2D;

import cs201.agents.transit.CarAgent;
import cs201.agents.transit.VehicleAgent;
import cs201.gui.CityPanel;

public class CarGui extends VehicleGui
{

	public CarGui(VehicleAgent vehicle, CityPanel city, int x, int y)
	{
		super(vehicle, city, x, y);
	}

	public CarGui(CarAgent car, CityPanel cityPanel)
	{
		super(car,cityPanel);
	}

	@Override
	public void drawBody(Graphics2D g)
	{
		g.setColor(Color.YELLOW);
		g.fillRect(getX(),getY(),CityPanel.GRID_SIZE,CityPanel.GRID_SIZE);
		
		g.setColor(Color.BLACK);
		if(((CarAgent)getVehicle()).getPassenger() != null)
		{
			g.drawString(""+((CarAgent)getVehicle()).getPassenger().getClass().getSimpleName(),getX()+CityPanel.GRID_SIZE,getY()+CityPanel.GRID_SIZE);
		}
	}

}

{'fraction_non_alphanumeric': 0.14135802469135803, 'fraction_numerical': 0.01728395061728395, 'mean_word_length': 5.698347107438017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6698907', 'n_tokens_mistral': 651, 'n_tokens_neox': 605, 'n_words': 96}