<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span id="ydpd127b775docs-internal-guid-288d6a87-1369-482a-d3be-385cc8e8a83b"><p dir="ltr" style="line-height:1.295;margin-top:0pt;margin-bottom:8pt;"><span style="font-size: 11pt; font-family: Calibri; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">Hello</span></p><p dir="ltr" style="line-height:1.295;margin-top:0pt;margin-bottom:8pt;"><span style="font-size: 11pt; font-family: Calibri; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">In the jimple code which is in the end of this message, tmp$713250488 represents the variable g defined at the 2nd line in the following test case. However, this variable changes to tmp$15916637 at the 3rd line. Why is that happening?</span></p><br><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; color: rgb(100, 100, 100); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">@Test</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">public</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">void</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> testBarcodeIsDrawnAtOriginForZeroZeroDraw() </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">throws</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> Exception {</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">BarcodeMock </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">barcode</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> = </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">new</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> BarcodeMock(</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(42, 0, 255); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">"12345"</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">);</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">GraphicsMock </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">g</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> = </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">new</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> GraphicsMock();// 2nd line</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">barcode</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">.paintComponent(</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">g</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">);</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">// 3rd line</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">assertEquals</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">(0, (</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">int</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">) </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">g</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">.getModifiedBounds().getX());</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">assertEquals</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">(0, (</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">int</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">) </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">g</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">.getModifiedBounds().getY());</span></p><p dir="ltr" style="line-height:1.295;margin-top:0pt;margin-bottom:8pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">}</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">protected</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">void</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> paintComponent(java.awt.Graphics </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">g</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">) {</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-indent: 35.4pt;"><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">super</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">.paintComponent(</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">g</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">);</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-indent: 35.4pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">Insets </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">insets</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> = getInsets();</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-indent: 35.4pt;"><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">try</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> {</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;margin-left: 35.4pt;text-indent: 35.4pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">draw((Graphics2D) </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">g</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">insets</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">.</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(0, 0, 192); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">left</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">insets</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">.</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(0, 0, 192); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">top</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">);</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">} </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">catch</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> (OutputException </span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 62, 62); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">e</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">) {</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;margin-left: 35.4pt;text-indent: 35.4pt;"><span style="font-size: 10pt; font-family: Consolas; color: rgb(63, 127, 95); background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">// Don't draw anything</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-indent: 35.4pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">}</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">}</span></p><br><p dir="ltr" style="line-height:1.295;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">class</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> GraphicsMock</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(127, 0, 85); background-color: transparent; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"> extends</span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"> java.awt.Graphics2D {</span></p><p dir="ltr" style="line-height:1.295;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span class="ydpd127b775Apple-tab-span"> </span></span><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">...</span></p><p dir="ltr" style="line-height:1.295;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 10pt; font-family: Consolas; background-color: transparent; vertical-align: baseline; white-space: pre-wrap;">}</span></p></span><div><span><br></span></div><div><span><br></span></div>public void testBarcodeIsDrawnAtOriginForZeroZeroDraw() throws java.lang.Exception
<br> {
<br> net.sourceforge.barbecue.BarcodeTest this;
<br> java.awt.Rectangle $r2, $r3;
<br> double $d0, $d1;
<br> int $i0, $i1;
<br> net.sourceforge.barbecue.BarcodeTest$BarcodeMock tmp$1950524369;
<br> net.sourceforge.barbecue.GraphicsMock tmp$713250488;
<br> java.awt.Graphics tmp$15916637;
<br>
<br> this := @this: net.sourceforge.barbecue.BarcodeTest;
<br>
<br> tmp$1950524369 = new net.sourceforge.barbecue.BarcodeTest$BarcodeMock;
<br>
<br> specialinvoke tmp$1950524369.<net.sourceforge.barbecue.BarcodeTest$BarcodeMock: void <init>(net.sourceforge.barbecue.BarcodeTest,java.lang.String)>(this, "12345");
<br>
<br> tmp$713250488 = new net.sourceforge.barbecue.GraphicsMock;
<br>
<br> specialinvoke tmp$713250488.<net.sourceforge.barbecue.GraphicsMock: void <init>()>();
<br>
<br> tmp$15916637 = (java.awt.Graphics) tmp$713250488;
<br>
<br> virtualinvoke tmp$1950524369.<net.sourceforge.barbecue.BarcodeTest$BarcodeMock: void paintComponent(java.awt.Graphics)>(tmp$15916637);
<br>
<br> $r2 = virtualinvoke tmp$713250488.<net.sourceforge.barbecue.GraphicsMock: java.awt.Rectangle getModifiedBounds()>();
<br>
<br> $d0 = virtualinvoke $r2.<java.awt.Rectangle: double getX()>();
<br>
<br> $i0 = (int) $d0;
<br>
<br> staticinvoke <net.sourceforge.barbecue.BarcodeTest: void assertEquals(int,int)>(0, $i0);
<br>
<br> $r3 = virtualinvoke tmp$713250488.<net.sourceforge.barbecue.GraphicsMock: java.awt.Rectangle getModifiedBounds()>();
<br>
<br> $d1 = virtualinvoke $r3.<java.awt.Rectangle: double getY()>();
<br>
<br> $i1 = (int) $d1;
<br>
<br> staticinvoke <net.sourceforge.barbecue.BarcodeTest: void assertEquals(int,int)>(0, $i1);
<br>
<br> return;
<br> } <br><!--EndFragment--></div></body></html>