<commit_before>package air;

import java.util.HashSet;
import java.util.LinkedList;


/**
 * @author ps
 * Simple airport with a single runway used for landing and starting
 */
public class Airport implements EventHandler {
	
	private String name;
	
	// Start goes from (x1,y1) to (x2,y2)
	// landing goes from (x2,y2) to (x1,y1)
	private double x1; 
	private double y1; 
	private double x2;    
	private double y2;
	private double runwayLength;
	private boolean runWayFree=true;	
	private int waitingForTakeOff;
	private int waitingForLanding;
	HashSet<Aircraft> aircrafts = new HashSet<Aircraft>(); 
	LinkedList<Aircraft> waitingForTakeOffQueue = new LinkedList<Aircraft>();
	LinkedList<Aircraft> waitingForLandingQueue = new LinkedList<Aircraft>();
	
	public Airport(String name, double x1, double y1, double x2, double y2){
		this.name = name;
		this.x1 = x1;
		this.y1 = y1;
		this.x2 = x2;
		this.y2 = y2;
		runwayLength=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
	}
	
	/**
	 * All aircrafts which are on ground or taking off or in the holding loop
	 * @param the aircraft arriving at this airport
	 */
	public void subscribeAircraft(Aircraft a){
		aircrafts.add(a);
	}

	/**
	 * Aircrafts leaving this airport (after take-off)
	 * @param a the aircraft after taking off
	 */
	public void unscribeAircraft(Aircraft a){
		aircrafts.remove(a);
	}
	<commit_msg>Added rank field to the airport<commit_after>package air;

import java.util.HashSet;
import java.util.LinkedList;


/**
 * @author ps
 * Simple airport with a single runway used for landing and starting
 */
public class Airport implements EventHandler {
	
	private String name;
	
	// Start goes from (x1,y1) to (x2,y2)
	// landing goes from (x2,y2) to (x1,y1)
	private double x1; 
	private double y1; 
	private double x2;    
	private double y2;
	private double runwayLength;
	private boolean runWayFree=true;	
	private int waitingForTakeOff;
	private int waitingForLanding;
	HashSet<Aircraft> aircrafts = new HashSet<Aircraft>(); 
	LinkedList<Aircraft> waitingForTakeOffQueue = new LinkedList<Aircraft>();
	LinkedList<Aircraft> waitingForLandingQueue = new LinkedList<Aircraft>();
	
	private int rank;
	
	public int getRank() {
		return rank;
	}

	public void setRank(int rank) {
		this.rank = rank;
	}

	public Airport(String name, int rank, double x1, double y1, double x2, double y2){
		this.rank = rank;
		this.name = name;
		this.x1 = x1;
		this.y1 = y1;
		this.x2 = x2;
		this.y2 = y2;
		runwayLength=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
	}
	
	/**
	 * All aircrafts which are on ground or taking off or in the holding loop
	 * @param the aircraft arriving at this airport
	 */
	public void subscribeAircraft(Aircraft a){
		aircrafts.add(a);
	}

	/**
	 * Aircrafts leaving this airport (after take-off)
	 * @param a the aircraft after taking off
	 */
	public void unscribeAircraft(Aircraft a){
		aircrafts.remove(a);
	}
	
{'fraction_non_alphanumeric': 0.10727837185236289, 'fraction_numerical': 0.02207657813038979, 'mean_word_length': 3.974271012006861, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '2333318', 'n_tokens_mistral': 1050, 'n_tokens_neox': 971, 'n_words': 305}