<commit_before>package de.fhpotsdam.unfolding.marker;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.log4j.Logger;

import processing.core.PGraphics;
import de.fhpotsdam.unfolding.Map;

public class MarkerManager {

	public static Logger log = Logger.getLogger(MarkerManager.class);

	Map map;
	List<Marker> markers;

	public MarkerManager(Map map, Marker... markers) {
		this(map, Arrays.asList(markers));
	}

	public MarkerManager(Map map, List<Marker> markers) {
		this.map = map;
		this.markers = markers;
	}

	public void setMarkers(List<Marker> markers) {
		this.markers = markers;
	}

	public void addMarker(Marker marker) {
		if (markers == null) {
			markers = new ArrayList<Marker>();
		}
		markers.add(marker);
	}

	public List<Marker> getMarkers() {
		return markers;
	}

	public Marker isInside(float checkX, float checkY) {
		Marker foundMarker = null;
		for (Marker marker : markers) {
			if (marker.isInside(map, checkX, checkY)) {
				foundMarker = marker;
				break;
			}
		}
		return foundMarker;
	}

	public void draw() {
		for (Marker marker : markers) {
			PGraphics pg = map.mapDisplay.getPG();
			float[] xy = map.mapDisplay.getInnerObjectFromLocation(marker.getLocation());
			float x = xy[0];
			float y = xy[1];
			marker.draw(pg, x, y);
		}
	}

	public void drawOuter() {
		for (Marker marker : markers) {
			PGraphics pg = map.mapDisplay.getPG();
			float[] xy = map.mapDisplay.getObjectFromLocation(marker.getLocation());
			float x = xy[0];
			float y = xy[1];
			marker.drawOuter(pg, x, y);
		}
	}

}
<commit_msg>Fixed marker outerDraw bug (rendering on wrong PGraphics)<commit_after>package de.fhpotsdam.unfolding.marker;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.log4j.Logger;

import processing.core.PGraphics;
import de.fhpotsdam.unfolding.Map;

public class MarkerManager {

	public static Logger log = Logger.getLogger(MarkerManager.class);

	Map map;
	List<Marker> markers;

	public MarkerManager(Map map, Marker... markers) {
		this(map, Arrays.asList(markers));
	}

	public MarkerManager(Map map, List<Marker> markers) {
		this.map = map;
		this.markers = markers;
	}

	public void setMarkers(List<Marker> markers) {
		this.markers = markers;
	}

	public void addMarker(Marker marker) {
		if (markers == null) {
			markers = new ArrayList<Marker>();
		}
		markers.add(marker);
	}

	public List<Marker> getMarkers() {
		return markers;
	}

	public Marker isInside(float checkX, float checkY) {
		Marker foundMarker = null;
		for (Marker marker : markers) {
			if (marker.isInside(map, checkX, checkY)) {
				foundMarker = marker;
				break;
			}
		}
		return foundMarker;
	}

	public void draw() {
		for (Marker marker : markers) {
			PGraphics pg = map.mapDisplay.getPG();
			float[] xy = map.mapDisplay.getInnerObjectFromLocation(marker.getLocation());
			float x = xy[0];
			float y = xy[1];
			marker.draw(pg, x, y);
		}
	}

	public void drawOuter() {
		for (Marker marker : markers) {
			PGraphics pg = map.mapDisplay.getOuterPG();
			float[] xy = map.mapDisplay.getObjectFromLocation(marker.getLocation());
			float x = xy[0];
			float y = xy[1];
			marker.drawOuter(pg, x, y);
		}
	}

}

{'fraction_non_alphanumeric': 0.12913191226444237, 'fraction_numerical': 0.0030892801977139327, 'mean_word_length': 3.8473053892215567, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '14613', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1135, 'n_words': 267}