XX:18 Program Tailoring:Slicing by Sequential Criteria a SC,making it substantially more amenable to a fully context-and fow-sensitive analysis. TAILOR's success in this case is potentially replicable for other analysis tools [9,29,37]. Case 2 There are 7 SCs spread across ANTLR,Avrora,FOP and PMD.In this case,SCEXT is not useful.These SCs share the same characteristic as SCline 12:line 2-line 27-line 12 from our motivating example in Figure 2(Section 2).For each SC,TAILOR has succeeded in removing some SC-irrelevant statements in some branches from TSLICER's thin slices. Case 3 There are 13 SCs found in FOP and PMD.In this case,TAILOR will be ineffective unless SCEXT is turned on.We take a SCin FOP ending at line 101 in class CommandLineStarter to show how TAILOR can simplify debugging tasks for object-oriented programs enormously. Given this point of interest,TSLICER returns a thin slice containing nine statements,which are distributed in five classes,including AWTStarter,PrintStarter and CommandLineStarter in package org.apache.fop.apps,where the first two are the subclasses of the last one. The first statement of this SC resides in CommandLineStarter's run()method,which is overridden in the two subclasses.During the SC extension.the object allocation site at line 522 in the CommandLineOptions class is found to be the sole object-sensitive context for CommandLineStarter's run()method.Therefore,with this extension point,TAILOR is able to remove four irrelevant statements,line 94 in AWTStarter,line 91 in PrintStarter,and lines 494 and 508 in CommandLineOptions,from TSLICER's thin slice,saving a human a lot of debugging effort on navigating through many irrelevant classes unnecessarily. Case 4 There are 14 SCs found in ANTLR and FOP.TAILOR fails to reduce TSLICER's thin slices any further.By including producer statements(and ignoring the others unsoundly), TSLICER has happened to eliminate all the SC-irrelevant statements removed by TAILOR. Remarks First,TAILOR has succeeded in making 82%(56%)of TSLICER's 77 thin slices smaller (empty),as shown in Figure 9,even though TSLICER is known to return small slices unsoundly.Second,TAILOR aims to eliminate ewm黑0 SC-irrelevant statements.As discussed in Sec- tion 2 and elaborated in Case 3,removing sev- ·ww eral or even just one SC-irrelevant statement can save a lot of debugging effort,particularly for large object-oriented programs.Finally TAILOR is fast,as compared with TSLICER 200 in Figure 10.To make the analysis times for TAILOR visible,the longest analysis times 77 SCs in Figure 9 spent by TSLICER on several SCs are depicted Figure 10 Efficiency of TAILOR vs.TSLICER. at the top-left corner.In Case 4,TAILOR is ineffective,but no harm is done,as TAILOR is fast.Without TAILOR,the practical benefits reaped from exploiting the temporal order in the other SCs in Cases 1-3 will be missed. 6.2 RQ2:Program Analysis In this second case study,we demonstrate that TAILOR can be invaluable for pointer analysis (the foundation for virtually all other analyses).In particular,we show how TAILOR can enable today's most sophisticated pointer analysis algorithms,which are unscalable for a program,to perform a more focused and thus potentially scalable analysis to its specific parts that contain usually hard-to-analyze language features such as reflection [30].ForXX:18 Program Tailoring: Slicing by Sequential Criteria a SC, making it substantially more amenable to a fully context- and flow-sensitive analysis. Tailor’s success in this case is potentially replicable for other analysis tools [9, 29, 37]. Case 2 There are 7 SCs spread across ANTLR, Avrora, FOP and PMD. In this case, SCEXT is not useful. These SCs share the same characteristic as SCline 12: line 2→line 27→line 12 from our motivating example in Figure 2 (Section 2). For each SC, Tailor has succeeded in removing some SC-irrelevant statements in some branches from TSlicer’s thin slices. Case 3 There are 13 SCs found in FOP and PMD. In this case, Tailor will be ineffective unless SCEXT is turned on. We take a SC in FOP ending at line 101 in class CommandLineStarter to show how Tailor can simplify debugging tasks for object-oriented programs enormously. Given this point of interest, TSlicer returns a thin slice containing nine statements, which are distributed in five classes, including AWTStarter, PrintStarter and CommandLineStarter in package org.apache.fop.apps, where the first two are the subclasses of the last one. The first statement of this SC resides in CommandLineStarter’s run() method, which is overridden in the two subclasses. During the SC extension, the object allocation site at line 522 in the CommandLineOptions class is found to be the sole object-sensitive context for CommandLineStarter’s run() method. Therefore, with this extension point, Tailor is able to remove four irrelevant statements, line 94 in AWTStarter, line 91 in PrintStarter, and lines 494 and 508 in CommandLineOptions, from TSlicer’s thin slice, saving a human a lot of debugging effort on navigating through many irrelevant classes unnecessarily. Case 4 There are 14 SCs found in ANTLR and FOP. Tailor fails to reduce TSlicer’s thin slices any further. By including producer statements (and ignoring the others unsoundly), TSlicer has happened to eliminate all the SC- irrelevant statements removed by Tailor. Remarks First, Tailor has succeeded in making 82% (56%) of TSlicer’s 77 thin slices smaller (empty), as shown in Figure 9, even though TSlicer is known to return small slices TSLICER TAILOR 100 200 300 400 500 Time (secs) 77 SCs in Figure 9 3017s 3072s 774s 797s 2800s ~ 3200s Figure 10 Efficiency of Tailor vs. TSlicer. unsoundly. Second, Tailor aims to eliminate SC-irrelevant statements. As discussed in Section 2 and elaborated in Case 3, removing several or even just one SC-irrelevant statement can save a lot of debugging effort, particularly for large object-oriented programs. Finally, Tailor is fast, as compared with TSlicer in Figure 10. To make the analysis times for Tailor visible, the longest analysis times spent by TSlicer on several SCs are depicted at the top-left corner. In Case 4, Tailor is ineffective, but no harm is done, as Tailor is fast. Without Tailor, the practical benefits reaped from exploiting the temporal order in the other SCs in Cases 1 – 3 will be missed. 6.2 RQ2: Program Analysis In this second case study, we demonstrate that Tailor can be invaluable for pointer analysis (the foundation for virtually all other analyses). In particular, we show how Tailor can enable today’s most sophisticated pointer analysis algorithms, which are unscalable for a program, to perform a more focused and thus potentially scalable analysis to its specific parts that contain usually hard-to-analyze language features such as reflection [30]. For