/** * @return names of the Jar files holding J2EE libraries * @throws IllegalStateException if the J2EE_DIR property is not set */ public static String[] getJ2EEJarFiles() { Properties p = null; try { p = WalaProperties.loadProperties(); } catch (WalaException e) { e.printStackTrace(); throw new IllegalStateException("problem loading wala.properties"); } String dir = p.getProperty(WalaProperties.J2EE_DIR); if (dir == null) { throw new IllegalStateException("No J2EE directory specified"); } return getJarsInDirectory(dir); }
/** * @return names of the Jar files holding J2EE libraries * @throws IllegalStateException if the J2EE_DIR property is not set */ public static String[] getJ2EEJarFiles() { Properties p = null; try { p = WalaProperties.loadProperties(); } catch (WalaException e) { e.printStackTrace(); throw new IllegalStateException("problem loading wala.properties"); } String dir = p.getProperty(WalaProperties.J2EE_DIR); if (dir == null) { throw new IllegalStateException("No J2EE directory specified"); } return getJarsInDirectory(dir); }
public static <T, P, F> void viewIFDS(TabulationResult<T, P, F> r, Collection<? extends P> roots, NodeDecorator<T> labels) throws WalaException { Properties p = null; try { p = WalaProperties.loadProperties(); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); } String scratch = p.getProperty(WalaProperties.OUTPUT_DIR); viewIFDS(r, roots, labels, scratch); }
@Override public String getText(Object element) { try { return (d == null) ? super.getText(element) : d.getLabel(element); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); return null; } }
/** * @see org.eclipse.jface.action.IAction#run() * * @throws IllegalStateException if the viewer is not running */ @Override public void run() { IR ir = getIRForSelection(); // spawn the viewer System.err.println("Spawn IR Viewer for " + ir.getMethod()); try { PDFViewUtil.ghostviewIR(cg.getClassHierarchy(), ir, psFile, dotFile, dotExe, gvExe); } catch (WalaException e) { e.printStackTrace(); } }
@Override public void run() { try { final P proc = getProcedureForSelection(); Predicate<T> filter = o -> supergraph.getProcOf(o).equals(proc); Graph<T> localGraph = GraphSlicer.prune(supergraph, filter); // spawn the viewer System.err.println("Spawn Viewer for " + proc); DotUtil.dotify(localGraph, labels, dotFile, pdfFile, dotExe); if (DotUtil.getOutputType() == DotUtil.DotOutputType.PDF) { PDFViewUtil.launchPDFView(pdfFile, pdfViewExe); } } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); } }
public static void main(String[] args) throws IllegalArgumentException, CancelException, IOException { try { Properties p = new Properties(); p.putAll(WalaProperties.loadProperties()); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); } runTestCase(TestConstants.JLEX_MAIN, TestConstants.JLEX, "JLex"); // runTestCase(TestConstants.HELLO_MAIN, TestConstants.HELLO, "Hello"); }
/** * @param appJar something like "c:/temp/testdata/java_cup.jar" */ public static Process run(String appJar, String exclusionFile) throws IllegalArgumentException, CancelException { try { Graph<CGNode> g = buildPrunedCallGraph(appJar, (new FileProvider()).getFile(exclusionFile)); Properties p = null; try { p = WalaExamplesProperties.loadProperties(); p.putAll(WalaProperties.loadProperties()); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); } String pdfFile = p.getProperty(WalaProperties.OUTPUT_DIR) + File.separatorChar + PDF_FILE; String dotExe = p.getProperty(WalaExamplesProperties.DOT_EXE); DotUtil.dotify(g, null, PDFTypeHierarchy.DOT_FILE, pdfFile, dotExe); String gvExe = p.getProperty(WalaExamplesProperties.PDFVIEW_EXE); return PDFViewUtil.launchPDFView(pdfFile, gvExe); } catch (WalaException e) { e.printStackTrace(); return null; } catch (IOException e) { e.printStackTrace(); return null; } }
public static Process run(String[] args) throws IOException { try { validateCommandLine(args); String classpath = args[CLASSPATH_INDEX]; AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(classpath, (new FileProvider()).getFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS)); // invoke WALA to build a class hierarchy ClassHierarchy cha = ClassHierarchyFactory.make(scope); Graph<IClass> g = typeHierarchy2Graph(cha); g = pruneForAppLoader(g); String dotFile = p.getProperty(WalaProperties.OUTPUT_DIR) + File.separatorChar + DOT_FILE; String pdfFile = p.getProperty(WalaProperties.OUTPUT_DIR) + File.separatorChar + PDF_FILE; String dotExe = p.getProperty(WalaExamplesProperties.DOT_EXE); String gvExe = p.getProperty(WalaExamplesProperties.PDFVIEW_EXE); DotUtil.dotify(g, null, dotFile, pdfFile, dotExe); return PDFViewUtil.launchPDFView(pdfFile, gvExe); } catch (WalaException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } }
wp.putAll(WalaExamplesProperties.loadProperties()); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE();
wp.putAll(WalaExamplesProperties.loadProperties()); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); e.printStackTrace(); return null;
p.putAll(WalaProperties.loadProperties()); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); e.printStackTrace(); return null;
wp.putAll(WalaExamplesProperties.loadProperties()); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); e.printStackTrace(); return null;
p.putAll(WalaProperties.loadProperties()); } catch (WalaException e) { e.printStackTrace(); Assertions.UNREACHABLE(); e.printStackTrace(); return null;