<commit_before>package saar.gui;


import sim.engine.*;
import sim.display.*;
import sim.portrayal.network.*;
import sim.portrayal.continuous.*;
import sim.portrayal.simple.*;
import javax.swing.*;
import java.awt.Color;
import saar.Saar;


public class SaarWithGui extends GUIState {
	
	public Display2D display;
	public JFrame displayFrame;
	ContinuousPortrayal2D yardPortrayal = new ContinuousPortrayal2D();
	NetworkPortrayal2D buddiesPortrayal = new NetworkPortrayal2D();
	
		public static void main(String[] args)
		{
			SaarWithGui vid = new SaarWithGui();
			Console c = new Console(vid);
			c.setVisible(true);
		}
		
		public SaarWithGui() { 
			super(new Saar(System.currentTimeMillis())); 
		}
		
		public SaarWithGui(SimState state) { 
			super(state); 
		}
		
		public static String getName() { 
			return "Social Amplification and Attenuation of Risk"; 
		}
		
		public void start()
		{
			super.start();
			setupPortrayals();
		}
		
		public void load(SimState state)
		{
			super.load(state);
			setupPortrayals();
		}
		
		public void setupPortrayals()
		{
			Saar saar = (Saar) state;
			// tell the portrayals what to portray and how to portray them
			yardPortrayal.setField( saar.area );
			yardPortrayal.setPortrayalForAll(new OvalPortrayal2D());
			
			buddiesPortrayal.setField( new SpatialNetwork2D( saar.area, saar.friends ) );
			buddiesPortrayal.setPortrayalForAll(new SimpleEdgePortrayal2D());

					// reschedule the displayer
			display.reset();
			display.setBackdrop(Color.white);
			// redraw the display
			display.repaint();
		}
		
		public void init(Controller c)
		{
			super.init(c);
			display = new Display2D(600,600,this);
			display.setClipping(false);
			displayFrame = display.createFrame();
			displayFrame.setTitle("Saar Display");
			c.registerFrame(displayFrame); // so the frame appears in the "Display" list
			displayFrame.setVisible(true);
			display.attach( buddiesPortrayal, "Buddies" );
			display.attach( yardPortrayal, "Area" );
		}
		
		
		public void quit()
		{
			super.quit();
			if (displayFrame!=null) displayFrame.dispose();
			displayFrame = null;
			display = null;
		}

		
}
<commit_msg>Added code to show model tab in console<commit_after>package saar.gui;


import sim.engine.*;
import sim.display.*;
import sim.portrayal.network.*;
import sim.portrayal.continuous.*;
import sim.portrayal.simple.*;
import javax.swing.*;
import java.awt.Color;
import saar.Saar;


public class SaarWithGui extends GUIState {
	
	public Display2D display;
	public JFrame displayFrame;
	ContinuousPortrayal2D yardPortrayal = new ContinuousPortrayal2D();
	NetworkPortrayal2D buddiesPortrayal = new NetworkPortrayal2D();
	public JButton messageButton;
	
	
		public static void main(String[] args)
		{
			SaarWithGui vid = new SaarWithGui();
			Console c = new Console(vid);
			c.setVisible(true);
		
		}
		
		public SaarWithGui() { 
			super(new Saar(System.currentTimeMillis())); 
		}
		
		public SaarWithGui(SimState state) { 
			super(state); 

		}
		
		// allow the user to inspect the model
	    public Object getSimulationInspectedObject() { return state; }  // non-volatile
		
		public static String getName() { 
			return "Social Amplification and Attenuation of Risk"; 
		}
		
		public void start()
		{
			super.start();
			setupPortrayals();
		
		}
		
		public void load(SimState state)
		{
			super.load(state);
			setupPortrayals();
		}
		
		public void setupPortrayals()
		{
			Saar saar = (Saar) state;
			// tell the portrayals what to portray and how to portray them
			yardPortrayal.setField( saar.area );
			yardPortrayal.setPortrayalForAll(new OvalPortrayal2D());
			
			buddiesPortrayal.setField( new SpatialNetwork2D( saar.area, saar.friends ) );
			buddiesPortrayal.setPortrayalForAll(new SimpleEdgePortrayal2D());

					// reschedule the displayer
			display.reset();
			display.setBackdrop(Color.white);
			// redraw the display
			display.repaint();
		}
		
		public void init(Controller c)
		{
			super.init(c);
			display = new Display2D(600,600,this);
			display.setClipping(false);
			displayFrame = display.createFrame();
			displayFrame.setTitle("Saar Display");
			c.registerFrame(displayFrame); // so the frame appears in the "Display" list
			displayFrame.setVisible(true);
			display.attach( buddiesPortrayal, "Buddies" );
			display.attach( yardPortrayal, "Area" );
			
			messageButton = new JButton("Message");
			messageButton.setVisible(true);
			
		}
		
		
		public void quit()
		{
			super.quit();
			if (displayFrame!=null) displayFrame.dispose();
			displayFrame = null;
			display = null;
		}
		
	
}

{'fraction_non_alphanumeric': 0.11040940766550522, 'fraction_numerical': 0.006533101045296167, 'mean_word_length': 3.662944162436548, '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': '4866602', 'n_tokens_mistral': 1798, 'n_tokens_neox': 1467, 'n_words': 345}