diff --git a/build.txt b/build.txt
index 8a140fd2ad2308ccca8660ccc60bce0436d3d9ea..40c6079d272caec77a1346d8adbafb988a780e2c 100644
--- a/build.txt
+++ b/build.txt
@@ -1 +1 @@
-12931
\ No newline at end of file
+12934
\ No newline at end of file
diff --git a/modeling/DIPLODOCUS/CloneCompositeComponentTest.xml b/modeling/DIPLODOCUS/CloneCompositeComponentTest.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a589cd04ec8c340b2c5318c4f941f20be826d3d2
--- /dev/null
+++ b/modeling/DIPLODOCUS/CloneCompositeComponentTest.xml
@@ -0,0 +1,444 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<TURTLEGMODELING version="1.0beta">
+
+<Modeling type="TML Component Design" nameTab="DIPLODOCUS_C_Design" >
+<TMLComponentTaskDiagramPanel name="TML Component Task Diagram" minX="10" maxX="2500" minY="10" maxY="1500" channels="true" events="true" requests="true" zoom="1.0" >
+<CONNECTOR type="126" id="1" >
+<cdparam x="878" y="469" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="Connector between ports" />
+<P1  x="449" y="413" id="18" />
+<P2  x="597" y="413" id="5" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="126" id="2" >
+<cdparam x="1021" y="460" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="Connector between ports" />
+<P1  x="597" y="368" id="3" />
+<P2  x="449" y="368" id="16" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<COMPONENT type="1200" id="37" >
+<cdparam x="208" y="148" />
+<sizeparam width="672" height="511" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="Composite component" value="CompositeComponent" />
+<TGConnectingPoint num="0" id="29" />
+<TGConnectingPoint num="1" id="30" />
+<TGConnectingPoint num="2" id="31" />
+<TGConnectingPoint num="3" id="32" />
+<TGConnectingPoint num="4" id="33" />
+<TGConnectingPoint num="5" id="34" />
+<TGConnectingPoint num="6" id="35" />
+<TGConnectingPoint num="7" id="36" />
+<extraparam>
+<info hiddeni="false" />
+</extraparam>
+</COMPONENT>
+<SUBCOMPONENT type="1202" id="15" >
+<father id="37" num="0" />
+<cdparam x="610" y="320" />
+<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="472" minY="0" maxY="361" />
+<infoparam name="Primitive component" value="PrimitiveComp2" />
+<TGConnectingPoint num="0" id="7" />
+<TGConnectingPoint num="1" id="8" />
+<TGConnectingPoint num="2" id="9" />
+<TGConnectingPoint num="3" id="10" />
+<TGConnectingPoint num="4" id="11" />
+<TGConnectingPoint num="5" id="12" />
+<TGConnectingPoint num="6" id="13" />
+<TGConnectingPoint num="7" id="14" />
+<extraparam>
+<Data isAttacker="No" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="4" >
+<father id="15" num="0" />
+<cdparam x="597" y="355" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" />
+<infoparam name="Primitive port" value="Channel channel" />
+<TGConnectingPoint num="0" id="3" />
+<extraparam>
+<Prop commName="channel" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="6" >
+<father id="15" num="1" />
+<cdparam x="597" y="400" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" />
+<infoparam name="Primitive port" value="Event event" />
+<TGConnectingPoint num="0" id="5" />
+<extraparam>
+<Prop commName="event" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1202" id="28" >
+<father id="37" num="1" />
+<cdparam x="236" y="321" />
+<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="472" minY="0" maxY="361" />
+<infoparam name="Primitive component" value="PrimitiveComp1" />
+<TGConnectingPoint num="0" id="20" />
+<TGConnectingPoint num="1" id="21" />
+<TGConnectingPoint num="2" id="22" />
+<TGConnectingPoint num="3" id="23" />
+<TGConnectingPoint num="4" id="24" />
+<TGConnectingPoint num="5" id="25" />
+<TGConnectingPoint num="6" id="26" />
+<TGConnectingPoint num="7" id="27" />
+<extraparam>
+<Data isAttacker="No" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="17" >
+<father id="28" num="0" />
+<cdparam x="423" y="355" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" />
+<infoparam name="Primitive port" value="Channel channel" />
+<TGConnectingPoint num="0" id="16" />
+<extraparam>
+<Prop commName="channel" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="19" >
+<father id="28" num="1" />
+<cdparam x="423" y="400" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" />
+<infoparam name="Primitive port" value="Event event" />
+<TGConnectingPoint num="0" id="18" />
+<extraparam>
+<Prop commName="event" commType="1" origin="true" finite="true" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+
+
+</TMLComponentTaskDiagramPanel>
+
+<TMLActivityDiagramPanel name="PrimitiveComp1" minX="10" maxX="2500" minY="10" maxY="1500" >
+<COMPONENT type="1001" id="150" >
+<cdparam x="397" y="440" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="149" />
+</COMPONENT>
+
+<COMPONENT type="1001" id="152" >
+<cdparam x="302" y="444" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="151" />
+</COMPONENT>
+
+<COMPONENT type="1008" id="155" >
+<cdparam x="285" y="326" />
+<sizeparam width="55" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="send event" value="event()" />
+<TGConnectingPoint num="0" id="153" />
+<TGConnectingPoint num="1" id="154" />
+<extraparam>
+<Data eventName="event" nbOfParams="5" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1006" id="158" >
+<cdparam x="368" y="324" />
+<sizeparam width="78" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="write channel" value="channel(1)" />
+<TGConnectingPoint num="0" id="156" />
+<TGConnectingPoint num="1" id="157" />
+<extraparam>
+<Data channelName="channel" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1012" id="166" >
+<cdparam x="392" y="183" />
+<sizeparam width="30" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="choice" value="null" />
+<TGConnectingPoint num="0" id="162" />
+<TGConnectingPoint num="1" id="163" />
+<TGConnectingPoint num="2" id="164" />
+<TGConnectingPoint num="3" id="165" />
+</COMPONENT>
+<SUBCOMPONENT type="-1" id="159" >
+<father id="166" num="0" />
+<cdparam x="367" y="193" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" />
+<infoparam name="guard 1" value="[ ]" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="-1" id="160" >
+<father id="166" num="1" />
+<cdparam x="427" y="193" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" />
+<infoparam name="guard 2" value="[ ]" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="-1" id="161" >
+<father id="166" num="2" />
+<cdparam x="412" y="228" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" />
+<infoparam name="guard 3" value="[ ]" />
+</SUBCOMPONENT>
+
+<COMPONENT type="1000" id="168" >
+<cdparam x="400" y="50" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="167" />
+</COMPONENT>
+
+<CONNECTOR type="115" id="170" >
+<cdparam x="367" y="198" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="367" y="198" id="163" />
+<P2  x="312" y="321" id="153" />
+<Point x="312" y="198" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="169" >
+<father id="170" num="0" />
+<cdparam x="312" y="198" />
+<sizeparam width="1" height="1" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="point " value="null" />
+</SUBCOMPONENT>
+
+<CONNECTOR type="115" id="171" >
+<cdparam x="407" y="65" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="65" id="167" />
+<P2  x="407" y="173" id="162" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="172" >
+<cdparam x="407" y="238" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="238" id="165" />
+<P2  x="407" y="319" id="156" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="173" >
+<cdparam x="312" y="351" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="312" y="351" id="154" />
+<P2  x="312" y="439" id="151" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="174" >
+<cdparam x="407" y="349" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="349" id="157" />
+<P2  x="407" y="435" id="149" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+
+</TMLActivityDiagramPanel>
+
+<TMLActivityDiagramPanel name="PrimitiveComp2" minX="10" maxX="2500" minY="10" maxY="1500" >
+<COMPONENT type="1001" id="176" >
+<cdparam x="520" y="416" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="175" />
+</COMPONENT>
+
+<COMPONENT type="1001" id="178" >
+<cdparam x="397" y="418" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="177" />
+</COMPONENT>
+
+<COMPONENT type="1010" id="181" >
+<cdparam x="501" y="302" />
+<sizeparam width="59" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="wait event" value="event() " />
+<TGConnectingPoint num="0" id="179" />
+<TGConnectingPoint num="1" id="180" />
+<extraparam>
+<Data eventName="event" nbOfParams="5" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1009" id="184" >
+<cdparam x="366" y="296" />
+<sizeparam width="82" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="read channel" value="channel(1) " />
+<TGConnectingPoint num="0" id="182" />
+<TGConnectingPoint num="1" id="183" />
+<extraparam>
+<Data channelName="channel" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1012" id="192" >
+<cdparam x="392" y="175" />
+<sizeparam width="30" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="choice" value="null" />
+<TGConnectingPoint num="0" id="188" />
+<TGConnectingPoint num="1" id="189" />
+<TGConnectingPoint num="2" id="190" />
+<TGConnectingPoint num="3" id="191" />
+</COMPONENT>
+<SUBCOMPONENT type="-1" id="185" >
+<father id="192" num="0" />
+<cdparam x="367" y="185" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" />
+<infoparam name="guard 1" value="[ ]" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="-1" id="186" >
+<father id="192" num="1" />
+<cdparam x="427" y="185" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" />
+<infoparam name="guard 2" value="[ ]" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="-1" id="187" >
+<father id="192" num="2" />
+<cdparam x="412" y="220" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" />
+<infoparam name="guard 3" value="[ ]" />
+</SUBCOMPONENT>
+
+<COMPONENT type="1000" id="194" >
+<cdparam x="400" y="50" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="193" />
+</COMPONENT>
+
+<CONNECTOR type="115" id="196" >
+<cdparam x="447" y="190" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="447" y="190" id="190" />
+<P2  x="530" y="297" id="179" />
+<Point x="530" y="190" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="195" >
+<father id="196" num="0" />
+<cdparam x="530" y="190" />
+<sizeparam width="1" height="1" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="point " value="null" />
+</SUBCOMPONENT>
+
+<CONNECTOR type="115" id="197" >
+<cdparam x="407" y="65" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="65" id="193" />
+<P2  x="407" y="165" id="188" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="198" >
+<cdparam x="407" y="230" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="230" id="191" />
+<P2  x="407" y="291" id="182" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="199" >
+<cdparam x="407" y="321" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="321" id="183" />
+<P2  x="407" y="413" id="177" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="200" >
+<cdparam x="530" y="327" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="530" y="327" id="180" />
+<P2  x="530" y="411" id="175" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+
+</TMLActivityDiagramPanel>
+
+</Modeling>
+
+
+
+
+</TURTLEGMODELING>
\ No newline at end of file
diff --git a/src/main/java/ui/GTURTLEModeling.java b/src/main/java/ui/GTURTLEModeling.java
index f2cb434ff5e8aa53c03d557a353f31c4b21aa45e..315d0a0adce084aad62d0e1cc27e3b2fc56d0be7 100644
--- a/src/main/java/ui/GTURTLEModeling.java
+++ b/src/main/java/ui/GTURTLEModeling.java
@@ -7716,6 +7716,23 @@ public class GTURTLEModeling {
             tgc.loadExtraParam(elt1.getElementsByTagName("extraparam"), decX, decY, decId);
             //TraceManager.addDev("Extra param ok");
 
+            //#issue 82
+            if ((myValue != null) && (!myValue.equals(null))) {
+                if ((tgc instanceof TMLCPrimitivePort) && (decId > 0)) {
+                    if (tdp.isAlreadyATMLPrimitivePortName(myValue)) {
+                        myValue = tdp.findTMLCPrimitivePortName(myValue + "_");
+                        //TraceManager.addDev("MyValue=" + myValue);
+                        ((TMLCPrimitivePort) tgc).setPortName(((TMLCPrimitivePort) tgc).getPortNameFromValue(myValue));
+                        ((TMLCPrimitivePort) tgc).commName = ((TMLCPrimitivePort) tgc).getPortNameFromValue(myValue);
+                        // ((TMLCPrimitivePort) tgc).loadExtraParam(elt1.getElementsByTagName("extraparam"), decX, decY, decId);
+                        // TraceManager.addDev("getPortType = " + ((TMLCPrimitivePort) tgc).getPortTypeName() + "" +
+                        //        "\ngetPortName = " + ((TMLCPrimitivePort) tgc).getPortName());
+                        tgc.setValue(myValue);
+                    }
+                }
+            }
+
+
             if ((tgc instanceof TCDTObject) && (decId > 0)) {
                 TCDTObject to = (TCDTObject) tgc;
                 //TraceManager.addDev("Setting TObject name to: " + to.getObjectName());
diff --git a/src/main/java/ui/TDiagramPanel.java b/src/main/java/ui/TDiagramPanel.java
index d657461cbc1e544c8379f61b787123954cf0c4a9..b8677f1c39b3b99d525990076aedcf419b79fcb9 100644
--- a/src/main/java/ui/TDiagramPanel.java
+++ b/src/main/java/ui/TDiagramPanel.java
@@ -2371,24 +2371,55 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
         }
     }
 
+    /*
+     * #issue 82
+     * new cloneComponent added by Minh Hiep
+     */
     public void cloneComponent(TGComponent _tgc) {
-        // copy
-        String clone = mgui.gtm.makeXMLFromComponentOfADiagram(this, _tgc, getMaxIdSelected(), _tgc.getX(), _tgc.getY());
+        String clone;
+
+        Vector<TGComponent> connectorList = new Vector<>();
+        TGComponent c1, c2;
+        boolean b1,b2;
+
+        _tgc.select(true);
+
+        //list of connectors within the composite component
+        for(TGComponent tgc : this.getComponentList()) {
+            if(tgc instanceof TGConnector) {
+                c1 = getComponentToWhichBelongs(((TGConnector) tgc).getTGConnectingPointP1());
+                c2 = getComponentToWhichBelongs(((TGConnector) tgc).getTGConnectingPointP2());
+                b1 = c1.isInHierarchy(_tgc);
+                b2 = c2.isInHierarchy(_tgc);
+                if(b1 && b2){
+                    tgc.select(true);
+                    connectorList.add(tgc);
+                }
+            }
+        }
 
-        //TraceManager.addDev("clone=\n"+ clone);
+        clone = mgui.gtm.makeXMLFromSelectedComponentOfADiagram(this, getMaxIdSelected(), _tgc.getX(), _tgc.getY());
 
-        // paste
+        _tgc.select(false);
+        for(int i = 0; i < connectorList.size(); i++){
+            connectorList.get(i).select(false);
+        }
 
+        //TraceManager.addDev("clone=\n"+ clone);
+        // paste
         try {
             mgui.gtm.copyModelingFromXML(this, clone, _tgc.getX() + 50, _tgc.getY() + 25);
         } catch (MalformedModelingException mme) {
             TraceManager.addDev("Clone Exception: " + mme.getMessage());
             JOptionPane.showMessageDialog(mgui.getFrame(), "Clone creation failed", "Exception", JOptionPane.INFORMATION_MESSAGE);
         }
-        bringToBack(_tgc);
+
+        //bringToBack(_tgc);
         mgui.changeMade(this, NEW_COMPONENT);
+        repaint();
     }
 
+
     public MainGUI getGUI() {
         return mgui;
     }
@@ -2696,7 +2727,9 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
                     || (o instanceof NCEqNode && this.checkNCEqNode((NCEqNode) o, name))
                     || (o instanceof NCSwitchNode && this.checkNCSwitchNode((NCSwitchNode) o, name))
                     || (o instanceof AvatarBDDataType && this.checkAvatarBDDataType((AvatarBDDataType) o, name))
-                    || (o instanceof AvatarBDLibraryFunction && this.checkAvatarBDLibraryFunction((AvatarBDLibraryFunction) o, name));
+                    || (o instanceof AvatarBDLibraryFunction && this.checkAvatarBDLibraryFunction((AvatarBDLibraryFunction) o, name))
+                    //#issue 82
+                    || (o instanceof TMLCPrimitivePort && this.checkCPrimitivePort((TMLCPrimitivePort) o, name));
         }
 
         public boolean checkTClassInterface(TClassInterface o, String name) {
@@ -2878,6 +2911,12 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
         public boolean checkAvatarBDLibraryFunction(AvatarBDLibraryFunction o, String name) {
             return false;
         }
+
+        //#issue 82
+        public boolean checkCPrimitivePort(TMLCPrimitivePort o, String name) {
+            return  false;
+        }
+
     }
 
     private boolean isNameUnique(String name, NameChecker checker) {
@@ -2887,6 +2926,41 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
         return true;
     }
 
+    //#issue 82
+    private Vector<TMLCPrimitivePort> getPortList () {
+        Vector<TMLCPrimitivePort> portList = new Vector<>();
+        //create list of ports
+        for (TGComponent o : componentList) {
+            if (o instanceof  TGConnector) {
+                if (this.getComponentToWhichBelongs(((TGConnector) o).getTGConnectingPointP1()) instanceof TMLCPrimitivePort) {
+                    TMLCPrimitivePort c1 = (TMLCPrimitivePort) getComponentToWhichBelongs(((TGConnector) o).getTGConnectingPointP1());
+                    portList.add(c1);
+                    // TraceManager.addDev("input port : " + c1.getValue());
+                }
+                if (this.getComponentToWhichBelongs(((TGConnector) o).getTGConnectingPointP2()) instanceof TMLCPrimitivePort) {
+                    TMLCPrimitivePort c2 = (TMLCPrimitivePort) getComponentToWhichBelongs(((TGConnector) o).getTGConnectingPointP2());
+                    portList.add(c2);
+                    // TraceManager.addDev("output port : " + c2.getValue());
+                }
+            }
+        }
+        return portList;
+    }
+
+    //#issue 82
+    private  boolean isPortNameUnique (String name, NameChecker checker) {
+        Vector<TMLCPrimitivePort> portList = getPortList();
+        //TraceManager.addDev("port list size : " + portList.size());
+        for (int i = 0; i < portList.size(); i++) {
+            if (checker.isNameAlreadyTaken(portList.get(i), name)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+
     private String findGoodName(String name, NameChecker checker) {
         // index >= 0 catch overflows
         for (int index = 0; index >= 0; index++) {
@@ -2898,6 +2972,19 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
         throw new RuntimeException("Integer Overflow");
     }
 
+    //#issue 82
+    private String findGoodPortName(String name, NameChecker checker) {
+        // index >= 0 catch overflows
+        for (int index = 0; index >= 0; index++) {
+            String tryName = name + index;
+            if (this.isPortNameUnique(tryName, checker))
+                return tryName;
+        }
+
+        throw new RuntimeException("Integer Overflow");
+    }
+
+
     public String findTClassName(String name) {
         return this.findGoodName(name, new NameChecker() {
             public boolean checkTClassInterface(TClassInterface o, String name) {
@@ -2945,6 +3032,16 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
         });
     }
 
+    //#issue 82
+    public String findTMLCPrimitivePortName(String name) {
+        return this.findGoodPortName(name, new NameChecker() {
+            public boolean checkCPrimitivePort(TMLCPrimitivePort o, String name) {
+                //TraceManager.addDev("in CheckCPrimitivePort : port value " + o.getValue());
+                return  o.getValue().equals(name);
+            }
+        });
+    }
+
     public String findTMLRecordComponentName(String name) {
         return this.findTMLPrimitiveComponentName(name);
     }
@@ -3263,6 +3360,16 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
         });
     }
 
+    //#issue 82;
+    public boolean isAlreadyATMLPrimitivePortName(String name) {
+        return !this.isPortNameUnique(name, new NameChecker() {
+            public boolean checkCPrimitivePort(TMLCPrimitivePort o, String name) {
+                return o.getValue().equals(name);
+            }
+        });
+    }
+
+
     public boolean isAlreadyATOSClassName(String name) {
         return !this.isTOSClassNameUnique(name);
     }
diff --git a/src/main/java/ui/TGComponent.java b/src/main/java/ui/TGComponent.java
index 2dd13d6693a5f4e9c650924fecb9c7967606b3dc..a19e82047fc2777c8719355db43e777034d8f615 100644
--- a/src/main/java/ui/TGComponent.java
+++ b/src/main/java/ui/TGComponent.java
@@ -3496,4 +3496,16 @@ public abstract class TGComponent  extends AbstractCDElement implements /*CDElem
    public boolean nameUsed(String s) {
     	return this.tdp.tp.refNameUsed(s);
    }
+
+    /* #issue 82
+     * added by Minh Hiep
+     */
+    public boolean isInHierarchy(TGComponent mainTgc) {
+        TGComponent tgctmp = getFather();
+        if (tgctmp == null) return tgctmp == mainTgc;
+        while(tgctmp != null && tgctmp != mainTgc) {
+            tgctmp = tgctmp.getFather();
+        }
+        return tgctmp == mainTgc;
+    }
 }
diff --git a/src/main/java/ui/tmlcompd/TMLCPrimitivePort.java b/src/main/java/ui/tmlcompd/TMLCPrimitivePort.java
index bbda5bc30bd80740e678b455426629b6d4e65dad..29cbe118e509cfcdf5b552507bba79423467f377 100755
--- a/src/main/java/ui/tmlcompd/TMLCPrimitivePort.java
+++ b/src/main/java/ui/tmlcompd/TMLCPrimitivePort.java
@@ -156,7 +156,6 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
     protected String conflictMessage;
     protected String dataFlowType = "VOID";
     protected String associatedEvent = "VOID";
-    
 
 
     public int verification;
@@ -178,7 +177,10 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
         removable = true;
         userResizable = false;
         checkConf=false;
-        commName = "comm";
+
+        //#issue 82
+        commName = tdp.findTMLCPrimitivePortName("comm_");
+        //commName = "comm";
         //value = "MyName";
         makeValue();
         setName("Primitive port");
@@ -1125,5 +1127,29 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
         }
     }
 
+    //#issue 82
+    public String getPortNameFromValue(String myValue) {
+        String s = "";
+        String string[] = myValue.split("\\s");
+        for (int i = 1; i < string.length; i++) {
+            s = s + string[i];
+        }
+        return s;
+    }
+
+    //#issue 82
+    public int getPortTypeFromValue(String myValue) {
+        String typePortName = myValue.split("\\s")[0];
+        int typePort = 0;
+        if (typePortName.equals("Channel"))
+            typePort = 0;
+        if (typePortName.equals("Event"))
+            typePort = 1;
+        if (typePortName.equals("Request"))
+            typePort = 2;
+        return typePort;
+    }
+
+
 
 }
diff --git a/src/main/java/ui/util/DefaultText.java b/src/main/java/ui/util/DefaultText.java
index a4082624009d9596b55d401a66fb459cdb39553e..c879694ae34970f739ef37bb89688b7b49e175ba 100755
--- a/src/main/java/ui/util/DefaultText.java
+++ b/src/main/java/ui/util/DefaultText.java
@@ -50,8 +50,8 @@ package ui.util;
  */
 public class DefaultText {
 
-    public static String BUILD = "12930";
-    public static String DATE = "2019/02/01 08:56:44 CET";
+    public static String BUILD = "12933";
+    public static String DATE = "2019/02/04 03:02:14 CET";
 
     public static StringBuffer sbAbout = makeAbout();
 
diff --git a/ttool/src/test/java/ui/TDiagramPanelCloneTest.java b/ttool/src/test/java/ui/TDiagramPanelCloneTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..6f1e8f6132f059571ec9ee61bebe354ae1a865de
--- /dev/null
+++ b/ttool/src/test/java/ui/TDiagramPanelCloneTest.java
@@ -0,0 +1,67 @@
+package ui;
+
+import org.junit.*;
+import tmltranslator.compareTMLTest.CompareTML;
+import ui.tmlcompd.TMLCCompositeComponent;
+import ui.tmlcompd.TMLComponentTaskDiagramPanel;
+
+import java.io.*;
+
+import static org.junit.Assert.*;
+/*
+ * #issue 82
+ * author : Minh Hiep
+ */
+public class TDiagramPanelCloneTest extends AbstractUITest {
+
+    static TDiagramPanel diagramPanel;
+    static  TGComponent tgComponent;
+    final static String EXPECTED_FILE = getBaseResourcesDir() + "tmltranslator/expected/expected_spec.tml";
+
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        RESOURCES_DIR = getBaseResourcesDir() + "/ui/diagram2tml/input/CloneCompositeComponentTest.xml";
+    }
+
+    public TDiagramPanelCloneTest() {
+        super();
+        mainGUI.openProjectFromFile(new File(RESOURCES_DIR));
+    }
+
+    @Before
+    public void setUp() {
+        diagramPanel = null;
+        for(TURTLEPanel _tab : mainGUI.getTabs()) {
+            if(_tab instanceof TMLComponentDesignPanel) {
+                for (TDiagramPanel tdp : _tab.getPanels()) {
+                    if (tdp instanceof  TMLComponentTaskDiagramPanel) {
+                        diagramPanel = tdp;
+                        mainGUI.selectTab(tdp);
+                        break;
+                    }
+                }
+                break;
+            }
+        }
+
+        //tgComponent = findDiagComponent(238, diagramPanel);
+        for (TGComponent tgc : diagramPanel.getComponentList()) {
+            if (tgc instanceof TMLCCompositeComponent) {
+                tgComponent = tgc;
+            }
+        }
+    }
+
+    @Test
+    public void testCloneComponent() throws Exception{
+        CompareTML compTML = new CompareTML();
+        diagramPanel.cloneComponent(tgComponent);
+       // mainGUI.modelChecking();
+        mainGUI.checkModelingSyntax(true);
+        mainGUI.generateTMLTxt();
+        File f1 = new File(EXPECTED_FILE);
+        File f2 = new File("spec.tml");  //generated file after making TML generation
+        assertTrue(compTML.compareTML(f1,f2));
+    }
+}
\ No newline at end of file
diff --git a/ttool/src/test/resources/tmltranslator/expected/expected_spec.tml b/ttool/src/test/resources/tmltranslator/expected/expected_spec.tml
new file mode 100644
index 0000000000000000000000000000000000000000..b9481b48d061c6f3c95cebf60f27f15dff381005
--- /dev/null
+++ b/ttool/src/test/resources/tmltranslator/expected/expected_spec.tml
@@ -0,0 +1,70 @@
+// TML Application - FORMAT 0.1
+// Application: /home/pham/Documents/TToolDev/TTool/modeling/DIPLODOCUS/CloneCompositeComponentTest.xml
+// Generated: Fri Jan 25 12:05:27 CET 2019
+
+// Channels
+CHANNEL DIPLODOCUS_C_Design__channel BRBW 4 8 OUT DIPLODOCUS_C_Design__PrimitiveComp1 IN DIPLODOCUS_C_Design__PrimitiveComp2
+CHANNEL DIPLODOCUS_C_Design__channel_0 BRBW 4 8 OUT DIPLODOCUS_C_Design__PrimitiveComp1_0 IN DIPLODOCUS_C_Design__PrimitiveComp2_0
+
+// Events
+EVENT DIPLODOCUS_C_Design__event_0__DIPLODOCUS_C_Design__event_0() NIB 8 DIPLODOCUS_C_Design__PrimitiveComp1_0 DIPLODOCUS_C_Design__PrimitiveComp2_0
+EVENT DIPLODOCUS_C_Design__event__DIPLODOCUS_C_Design__event() NIB 8 DIPLODOCUS_C_Design__PrimitiveComp1 DIPLODOCUS_C_Design__PrimitiveComp2
+
+// Requests
+
+TASK DIPLODOCUS_C_Design__PrimitiveComp1
+    //Local variables
+    
+    //Behavior
+    RAND
+        CASERAND 50
+            NOTIFY DIPLODOCUS_C_Design__event__DIPLODOCUS_C_Design__event
+        ENDCASERAND
+        CASERAND 50
+            WRITE DIPLODOCUS_C_Design__channel 1
+        ENDCASERAND
+    ENDRAND
+ENDTASK
+
+TASK DIPLODOCUS_C_Design__PrimitiveComp1_0
+    //Local variables
+    
+    //Behavior
+    RAND
+        CASERAND 50
+            NOTIFY DIPLODOCUS_C_Design__event_0__DIPLODOCUS_C_Design__event_0
+        ENDCASERAND
+        CASERAND 50
+            WRITE DIPLODOCUS_C_Design__channel_0 1
+        ENDCASERAND
+    ENDRAND
+ENDTASK
+
+TASK DIPLODOCUS_C_Design__PrimitiveComp2
+    //Local variables
+    
+    //Behavior
+    RAND
+        CASERAND 50
+            WAIT DIPLODOCUS_C_Design__event__DIPLODOCUS_C_Design__event
+        ENDCASERAND
+        CASERAND 50
+            READ DIPLODOCUS_C_Design__channel 1
+        ENDCASERAND
+    ENDRAND
+ENDTASK
+
+TASK DIPLODOCUS_C_Design__PrimitiveComp2_0
+    //Local variables
+    
+    //Behavior
+    RAND
+        CASERAND 50
+            WAIT DIPLODOCUS_C_Design__event_0__DIPLODOCUS_C_Design__event_0
+        ENDCASERAND
+        CASERAND 50
+            READ DIPLODOCUS_C_Design__channel_0 1
+        ENDCASERAND
+    ENDRAND
+ENDTASK
+
diff --git a/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml b/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a589cd04ec8c340b2c5318c4f941f20be826d3d2
--- /dev/null
+++ b/ttool/src/test/resources/ui/diagram2tml/input/CloneCompositeComponentTest.xml
@@ -0,0 +1,444 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<TURTLEGMODELING version="1.0beta">
+
+<Modeling type="TML Component Design" nameTab="DIPLODOCUS_C_Design" >
+<TMLComponentTaskDiagramPanel name="TML Component Task Diagram" minX="10" maxX="2500" minY="10" maxY="1500" channels="true" events="true" requests="true" zoom="1.0" >
+<CONNECTOR type="126" id="1" >
+<cdparam x="878" y="469" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="Connector between ports" />
+<P1  x="449" y="413" id="18" />
+<P2  x="597" y="413" id="5" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="126" id="2" >
+<cdparam x="1021" y="460" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="Connector between ports" />
+<P1  x="597" y="368" id="3" />
+<P2  x="449" y="368" id="16" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<COMPONENT type="1200" id="37" >
+<cdparam x="208" y="148" />
+<sizeparam width="672" height="511" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="Composite component" value="CompositeComponent" />
+<TGConnectingPoint num="0" id="29" />
+<TGConnectingPoint num="1" id="30" />
+<TGConnectingPoint num="2" id="31" />
+<TGConnectingPoint num="3" id="32" />
+<TGConnectingPoint num="4" id="33" />
+<TGConnectingPoint num="5" id="34" />
+<TGConnectingPoint num="6" id="35" />
+<TGConnectingPoint num="7" id="36" />
+<extraparam>
+<info hiddeni="false" />
+</extraparam>
+</COMPONENT>
+<SUBCOMPONENT type="1202" id="15" >
+<father id="37" num="0" />
+<cdparam x="610" y="320" />
+<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="472" minY="0" maxY="361" />
+<infoparam name="Primitive component" value="PrimitiveComp2" />
+<TGConnectingPoint num="0" id="7" />
+<TGConnectingPoint num="1" id="8" />
+<TGConnectingPoint num="2" id="9" />
+<TGConnectingPoint num="3" id="10" />
+<TGConnectingPoint num="4" id="11" />
+<TGConnectingPoint num="5" id="12" />
+<TGConnectingPoint num="6" id="13" />
+<TGConnectingPoint num="7" id="14" />
+<extraparam>
+<Data isAttacker="No" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="4" >
+<father id="15" num="0" />
+<cdparam x="597" y="355" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" />
+<infoparam name="Primitive port" value="Channel channel" />
+<TGConnectingPoint num="0" id="3" />
+<extraparam>
+<Prop commName="channel" commType="0" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="6" >
+<father id="15" num="1" />
+<cdparam x="597" y="400" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" />
+<infoparam name="Primitive port" value="Event event" />
+<TGConnectingPoint num="0" id="5" />
+<extraparam>
+<Prop commName="event" commType="1" origin="false" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1202" id="28" >
+<father id="37" num="1" />
+<cdparam x="236" y="321" />
+<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="472" minY="0" maxY="361" />
+<infoparam name="Primitive component" value="PrimitiveComp1" />
+<TGConnectingPoint num="0" id="20" />
+<TGConnectingPoint num="1" id="21" />
+<TGConnectingPoint num="2" id="22" />
+<TGConnectingPoint num="3" id="23" />
+<TGConnectingPoint num="4" id="24" />
+<TGConnectingPoint num="5" id="25" />
+<TGConnectingPoint num="6" id="26" />
+<TGConnectingPoint num="7" id="27" />
+<extraparam>
+<Data isAttacker="No" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="17" >
+<father id="28" num="0" />
+<cdparam x="423" y="355" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" />
+<infoparam name="Primitive port" value="Channel channel" />
+<TGConnectingPoint num="0" id="16" />
+<extraparam>
+<Prop commName="channel" commType="0" origin="true" finite="false" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1203" id="19" >
+<father id="28" num="1" />
+<cdparam x="423" y="400" />
+<sizeparam width="26" height="26" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-13" maxX="187" minY="-13" maxY="137" />
+<infoparam name="Primitive port" value="Event event" />
+<TGConnectingPoint num="0" id="18" />
+<extraparam>
+<Prop commName="event" commType="1" origin="true" finite="true" blocking="true" maxSamples="8" widthSamples="4" isLossy="false" isPrex="false" isPostex="false" lossPercentage="0" maxNbOfLoss="0" dataFlowType="int16_t" associatedEvent="" checkConf="false" checkConfStatus="0" checkAuth="false" checkWeakAuthStatus="0" checkStrongAuthStatus="0" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+<Type type="0" typeOther="" />
+</extraparam>
+</SUBCOMPONENT>
+
+
+</TMLComponentTaskDiagramPanel>
+
+<TMLActivityDiagramPanel name="PrimitiveComp1" minX="10" maxX="2500" minY="10" maxY="1500" >
+<COMPONENT type="1001" id="150" >
+<cdparam x="397" y="440" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="149" />
+</COMPONENT>
+
+<COMPONENT type="1001" id="152" >
+<cdparam x="302" y="444" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="151" />
+</COMPONENT>
+
+<COMPONENT type="1008" id="155" >
+<cdparam x="285" y="326" />
+<sizeparam width="55" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="send event" value="event()" />
+<TGConnectingPoint num="0" id="153" />
+<TGConnectingPoint num="1" id="154" />
+<extraparam>
+<Data eventName="event" nbOfParams="5" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1006" id="158" >
+<cdparam x="368" y="324" />
+<sizeparam width="78" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="write channel" value="channel(1)" />
+<TGConnectingPoint num="0" id="156" />
+<TGConnectingPoint num="1" id="157" />
+<extraparam>
+<Data channelName="channel" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1012" id="166" >
+<cdparam x="392" y="183" />
+<sizeparam width="30" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="choice" value="null" />
+<TGConnectingPoint num="0" id="162" />
+<TGConnectingPoint num="1" id="163" />
+<TGConnectingPoint num="2" id="164" />
+<TGConnectingPoint num="3" id="165" />
+</COMPONENT>
+<SUBCOMPONENT type="-1" id="159" >
+<father id="166" num="0" />
+<cdparam x="367" y="193" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" />
+<infoparam name="guard 1" value="[ ]" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="-1" id="160" >
+<father id="166" num="1" />
+<cdparam x="427" y="193" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" />
+<infoparam name="guard 2" value="[ ]" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="-1" id="161" >
+<father id="166" num="2" />
+<cdparam x="412" y="228" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" />
+<infoparam name="guard 3" value="[ ]" />
+</SUBCOMPONENT>
+
+<COMPONENT type="1000" id="168" >
+<cdparam x="400" y="50" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="167" />
+</COMPONENT>
+
+<CONNECTOR type="115" id="170" >
+<cdparam x="367" y="198" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="367" y="198" id="163" />
+<P2  x="312" y="321" id="153" />
+<Point x="312" y="198" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="169" >
+<father id="170" num="0" />
+<cdparam x="312" y="198" />
+<sizeparam width="1" height="1" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="point " value="null" />
+</SUBCOMPONENT>
+
+<CONNECTOR type="115" id="171" >
+<cdparam x="407" y="65" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="65" id="167" />
+<P2  x="407" y="173" id="162" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="172" >
+<cdparam x="407" y="238" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="238" id="165" />
+<P2  x="407" y="319" id="156" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="173" >
+<cdparam x="312" y="351" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="312" y="351" id="154" />
+<P2  x="312" y="439" id="151" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="174" >
+<cdparam x="407" y="349" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="349" id="157" />
+<P2  x="407" y="435" id="149" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+
+</TMLActivityDiagramPanel>
+
+<TMLActivityDiagramPanel name="PrimitiveComp2" minX="10" maxX="2500" minY="10" maxY="1500" >
+<COMPONENT type="1001" id="176" >
+<cdparam x="520" y="416" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="175" />
+</COMPONENT>
+
+<COMPONENT type="1001" id="178" >
+<cdparam x="397" y="418" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="stop state" value="null" />
+<TGConnectingPoint num="0" id="177" />
+</COMPONENT>
+
+<COMPONENT type="1010" id="181" >
+<cdparam x="501" y="302" />
+<sizeparam width="59" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="wait event" value="event() " />
+<TGConnectingPoint num="0" id="179" />
+<TGConnectingPoint num="1" id="180" />
+<extraparam>
+<Data eventName="event" nbOfParams="5" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1009" id="184" >
+<cdparam x="366" y="296" />
+<sizeparam width="82" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="read channel" value="channel(1) " />
+<TGConnectingPoint num="0" id="182" />
+<TGConnectingPoint num="1" id="183" />
+<extraparam>
+<Data channelName="channel" nbOfSamples="1" secPattern="" isAttacker="No" isEncForm="Yes" />
+</extraparam>
+</COMPONENT>
+
+<COMPONENT type="1012" id="192" >
+<cdparam x="392" y="175" />
+<sizeparam width="30" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="choice" value="null" />
+<TGConnectingPoint num="0" id="188" />
+<TGConnectingPoint num="1" id="189" />
+<TGConnectingPoint num="2" id="190" />
+<TGConnectingPoint num="3" id="191" />
+</COMPONENT>
+<SUBCOMPONENT type="-1" id="185" >
+<father id="192" num="0" />
+<cdparam x="367" y="185" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" />
+<infoparam name="guard 1" value="[ ]" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="-1" id="186" >
+<father id="192" num="1" />
+<cdparam x="427" y="185" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" />
+<infoparam name="guard 2" value="[ ]" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="-1" id="187" >
+<father id="192" num="2" />
+<cdparam x="412" y="220" />
+<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" />
+<infoparam name="guard 3" value="[ ]" />
+</SUBCOMPONENT>
+
+<COMPONENT type="1000" id="194" >
+<cdparam x="400" y="50" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="193" />
+</COMPONENT>
+
+<CONNECTOR type="115" id="196" >
+<cdparam x="447" y="190" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="447" y="190" id="190" />
+<P2  x="530" y="297" id="179" />
+<Point x="530" y="190" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="195" >
+<father id="196" num="0" />
+<cdparam x="530" y="190" />
+<sizeparam width="1" height="1" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
+<infoparam name="point " value="null" />
+</SUBCOMPONENT>
+
+<CONNECTOR type="115" id="197" >
+<cdparam x="407" y="65" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="65" id="193" />
+<P2  x="407" y="165" id="188" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="198" >
+<cdparam x="407" y="230" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="230" id="191" />
+<P2  x="407" y="291" id="182" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="199" >
+<cdparam x="407" y="321" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="407" y="321" id="183" />
+<P2  x="407" y="413" id="177" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+<CONNECTOR type="115" id="200" >
+<cdparam x="530" y="327" />
+<sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<infoparam name="connector" value="null" />
+<P1  x="530" y="327" id="180" />
+<P2  x="530" y="411" id="175" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR>
+
+</TMLActivityDiagramPanel>
+
+</Modeling>
+
+
+
+
+</TURTLEGMODELING>
\ No newline at end of file