<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi Pallavi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">To understand what happens here, I would need a lot more detail. What do you mean by “null result”? Is there some exception? What is the stack trace?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Secondly, why do you attempt to run the PackManager twice at all? This is not the intended use of the PackManager and I don’t really see a reason why this should
 be necessary.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">  Steven<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Soot-list [mailto:soot-list-bounces@cs.mcgill.ca]
<b>On Behalf Of </b>Pallavi Majumder<br>
<b>Sent:</b> Thursday, March 9, 2017 11:49 AM<br>
<b>To:</b> soot-list@cs.mcgill.ca<br>
<b>Subject:</b> [Soot-list] Pack Manager and removing phase<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif">Hello All,<br>
<br>
I execute, the following code twice. Each time for different classname. However, when I execute them in the same program run the result of the second transform is incorrect.<br>
<br>
<em><span style="font-family:"Arial",sans-serif">PackManager.v().getPack("jtp")</span></em><o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><em><span style="font-size:10.5pt;font-family:"Arial",sans-serif">.add(new Transform("jtp.mainInstrumentation", classname));</span></em><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br>
<br>
When I execute the PackManager twice in 2 different program runs, everything works fine but executing them together creates a null result. I tried to remove the particular phase name before the second execution, but that does not help.<br>
<br>
Just to make it clear, here is what I tried:<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><em><span style="font-size:10.5pt;font-family:"Arial",sans-serif">PackManager.v().getPack("jtp")</span></em><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><em><span style="font-size:10.5pt;font-family:"Arial",sans-serif">.add(new Transform("jtp.mainInstrumentation", new XMLConversion()));</span></em><i><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br>
<em><span style="font-family:"Arial",sans-serif">PackManager.v().getPack("jtp").remove("jtp.mainInstrumentation");</span></em></span></i><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><em><span style="font-size:10.5pt;font-family:"Arial",sans-serif">PackManager.v().getPack("jtp")</span></em><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><em><span style="font-size:10.5pt;font-family:"Arial",sans-serif">.add(new Transform("jtp.xmlInstrumentation", new XMLConversion()));</span></em><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
</div>
</div>
</div>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br>
jtp.mainInstrumentation works fine, but jtp.xmlInstrumentation does not work here. However , if I execute them individually, I get perfect results.<br>
<br>
Please note that I want them to use "jtp" and not "wjtp" or any other packs.<br>
<br>
I would really appreciate if anyone has an idea why this happens in PackManager.<br>
<br>
Thanks,<br>
Pallavi<o:p></o:p></span></p>
</div>
</body>
</html>