<commit_before>package hu.elte.txtuml.examples.clock.model.classes;

import hu.elte.txtuml.api.model.Action;
import hu.elte.txtuml.api.model.BehaviorPort;
import hu.elte.txtuml.api.model.From;
import hu.elte.txtuml.api.model.Interface;
import hu.elte.txtuml.api.model.ModelClass;
import hu.elte.txtuml.api.model.Port;
import hu.elte.txtuml.api.model.To;
import hu.elte.txtuml.api.model.Trigger;
import hu.elte.txtuml.examples.clock.model.interfaces.ValueIfc;
import hu.elte.txtuml.examples.clock.model.signals.HandValue;

public class Display extends ModelClass {
	int hour;
	int minute;
	int second;
	
	@BehaviorPort
	public class HourPort extends Port<Interface.Empty,ValueIfc> {}

	@BehaviorPort
	public class MinutePort extends Port<Interface.Empty,ValueIfc> {}

	@BehaviorPort
	public class SecondPort extends Port<Interface.Empty,ValueIfc> {}
	
	public Display(int hour, int minute, int second) {
		this.hour = hour;
		this.minute = minute;
		this.second = second;
	}
	
	private void refresh() {
		Action.log("" + hour + ":" + minute + ":" + second);
	}
	
	class Init extends Initial {}
	class Accepting extends State {}
	
	@From(Init.class) @To(Accepting.class)
	class Initialize extends Transition {}
	
	@From(Accepting.class) @To(Accepting.class) @Trigger(port = HourPort.class, value = HandValue.class)
	class HourChanged extends Transition {
		public void effect() {
			hour = getSignal(HandValue.class).value;
			refresh();
		}
	}

	@From(Accepting.class) @To(Accepting.class) @Trigger(port = MinutePort.class, value = HandValue.class)
	class MinuteChanged extends Transition {
		public void effect() {
			minute = getSignal(HandValue.class).value;
			if(minute > 0) {
				refresh();
			}
		}
	}

	@From(Accepting.class) @To(Accepting.class) @Trigger(port = SecondPort.class, value = HandValue.class)
	class SecondChanged extends Transition {
		public void effect() {
			second = getSignal(HandValue.class).value;
			if(second > 0) {
				refresh();
			}
		}
	}
}<commit_msg>Clock example's getSignal() calls updated.<commit_after>package hu.elte.txtuml.examples.clock.model.classes;

import hu.elte.txtuml.api.model.Action;
import hu.elte.txtuml.api.model.BehaviorPort;
import hu.elte.txtuml.api.model.From;
import hu.elte.txtuml.api.model.Interface;
import hu.elte.txtuml.api.model.ModelClass;
import hu.elte.txtuml.api.model.Port;
import hu.elte.txtuml.api.model.To;
import hu.elte.txtuml.api.model.Trigger;
import hu.elte.txtuml.examples.clock.model.interfaces.ValueIfc;
import hu.elte.txtuml.examples.clock.model.signals.HandValue;

public class Display extends ModelClass {
	int hour;
	int minute;
	int second;
	
	@BehaviorPort
	public class HourPort extends Port<Interface.Empty,ValueIfc> {}

	@BehaviorPort
	public class MinutePort extends Port<Interface.Empty,ValueIfc> {}

	@BehaviorPort
	public class SecondPort extends Port<Interface.Empty,ValueIfc> {}
	
	public Display(int hour, int minute, int second) {
		this.hour = hour;
		this.minute = minute;
		this.second = second;
	}
	
	private void refresh() {
		Action.log("" + hour + ":" + minute + ":" + second);
	}
	
	class Init extends Initial {}
	class Accepting extends State {}
	
	@From(Init.class) @To(Accepting.class)
	class Initialize extends Transition {}
	
	@From(Accepting.class) @To(Accepting.class) @Trigger(port = HourPort.class, value = HandValue.class)
	class HourChanged extends Transition {
		public void effect() {
			hour = ((HandValue)getSignal()).value;
			refresh();
		}
	}

	@From(Accepting.class) @To(Accepting.class) @Trigger(port = MinutePort.class, value = HandValue.class)
	class MinuteChanged extends Transition {
		public void effect() {
			minute = ((HandValue)getSignal()).value;
			if(minute > 0) {
				refresh();
			}
		}
	}

	@From(Accepting.class) @To(Accepting.class) @Trigger(port = SecondPort.class, value = HandValue.class)
	class SecondChanged extends Transition {
		public void effect() {
			second = ((HandValue)getSignal()).value;
			if(second > 0) {
				refresh();
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.12991239048811012, 'fraction_numerical': 0.0010012515644555694, 'mean_word_length': 4.407307171853857, 'pattern_counts': {'":': 4, '<': 9, '<?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': '3962199', 'n_tokens_mistral': 1460, 'n_tokens_neox': 1337, 'n_words': 278}