code
stringlengths
73
34.1k
label
stringclasses
1 value
public String generateTaskId() { final String uuid = UUID.randomUUID().toString().substring(0, 12); int size = this.targetHostMeta == null ? 0 : this.targetHostMeta .getHosts().size(); return "PT_" + size + "_" + PcDateUtils.getNowDateTimeStrConciseNoZone() + "_" ...
java
public Double getProgress() { if (state.equals(ParallelTaskState.IN_PROGRESS)) { if (requestNum != 0) { return 100.0 * ((double) responsedNum / (double) requestNumActual); } else { return 0.0; } } if (state.equals(ParallelTask...
java
public Map<String, SetAndCount> getAggregateResultFullSummary() { Map<String, SetAndCount> summaryMap = new ConcurrentHashMap<String, SetAndCount>(); for (Entry<String, LinkedHashSet<String>> entry : aggregateResultMap .entrySet()) { summaryMap.put(entry.getKey(), new SetAn...
java
public Map<String, Integer> getAggregateResultCountSummary() { Map<String, Integer> summaryMap = new LinkedHashMap<String, Integer>(); for (Entry<String, LinkedHashSet<String>> entry : aggregateResultMap .entrySet()) { summaryMap.put(entry.getKey(), entry.getValue().size())...
java
public PerformUsage getJVMMemoryUsage() { int mb = 1024 * 1024; Runtime rt = Runtime.getRuntime(); PerformUsage usage = new PerformUsage(); usage.totalMemory = (double) rt.totalMemory() / mb; usage.freeMemory = (double) rt.freeMemory() / mb; usage.usedMemory = (double) rt...
java
public ThreadInfo[] getThreadDump() { ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean(); return threadMxBean.dumpAllThreads(true, true); }
java
public ThreadUsage getThreadUsage() { ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean(); ThreadUsage threadUsage = new ThreadUsage(); long[] threadIds = threadMxBean.getAllThreadIds(); threadUsage.liveThreadCount = threadIds.length; for (long tId : threadIds) { ...
java
public String getHealthMemory() { StringBuilder sb = new StringBuilder(); sb.append("Logging JVM Stats\n"); MonitorProvider mp = MonitorProvider.getInstance(); PerformUsage perf = mp.getJVMMemoryUsage(); sb.append(perf.toString()); if (perf.memoryUsagePercent >= THRESHOL...
java
public void shutdown() { for (Entry<HttpClientType, AsyncHttpClient> entry : map.entrySet()) { AsyncHttpClient client = entry.getValue(); if (client != null) client.close(); } }
java
private String getContentFromPath(String sourcePath, HostsSourceType sourceType) throws IOException { String res = ""; if (sourceType == HostsSourceType.LOCAL_FILE) { res = PcFileNetworkIoUtils.readFileContentToString(sourcePath); } else if (sourceType == HostsSourceTyp...
java
@Override public List<String> setTargetHostsFromLineByLineText(String sourcePath, HostsSourceType sourceType) throws TargetHostsLoadException { List<String> targetHosts = new ArrayList<String>(); try { String content = getContentFromPath(sourcePath, sourceType); ...
java
public ConnectionlessBootstrap bootStrapUdpClient() throws HttpRequestCreateException { ConnectionlessBootstrap udpClient = null; try { // Configure the client. udpClient = new ConnectionlessBootstrap(udpMeta.getChannelFactory()); udpClient.setPipeline(...
java
public void initialize() { if (isClosed.get()) { logger.info("Initialing Parallel Client Resources: actor system, HttpClientStore, Task Manager ...."); ActorConfig.createAndGetActorSystem(); httpClientStore.init(); tcpSshPingResourceStore.init(); isClo...
java
public void reinitIfClosed() { if (isClosed.get()) { logger.info("External Resource was released. Now Re-initializing resources ..."); ActorConfig.createAndGetActorSystem(); httpClientStore.reinit(); tcpSshPingResourceStore.reinit(); try { ...
java
public ParallelTaskBuilder prepareSsh() { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.setProtocol(RequestProtocol.SSH); return cb; }
java
public ParallelTaskBuilder preparePing() { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.setProtocol(RequestProtocol.PING); return cb; }
java
public ParallelTaskBuilder prepareTcp(String command) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.setProtocol(RequestProtocol.TCP); cb.getTcpMeta().setCommand(command); return cb; }
java
public ParallelTaskBuilder prepareUdp(String command) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.setProtocol(RequestProtocol.UDP); cb.getUdpMeta().setCommand(command); return cb; }
java
public ParallelTaskBuilder prepareHttpGet(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.GET); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
java
public ParallelTaskBuilder prepareHttpPost(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.POST); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
java
public ParallelTaskBuilder prepareHttpDelete(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.DELETE); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
java
public ParallelTaskBuilder prepareHttpPut(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.PUT); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
java
public ParallelTaskBuilder prepareHttpHead(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.HEAD); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
java
public ParallelTaskBuilder prepareHttpOptions(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.OPTIONS); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
java
@SuppressWarnings("deprecation") private void cancelRequestAndWorkers() { for (ActorRef worker : workers.values()) { if (worker != null && !worker.isTerminated()) { worker.tell(OperationWorkerMsgType.CANCEL, getSelf()); } } logger.info("ExecutionMana...
java
@SuppressWarnings("deprecation") private void cancelRequestAndWorkerOnHost(List<String> targetHosts) { List<String> validTargetHosts = new ArrayList<String>(workers.keySet()); validTargetHosts.retainAll(targetHosts); logger.info("targetHosts for cancel: Total: {}" + " Valid ...
java
public Session startSshSessionAndObtainSession() { Session session = null; try { JSch jsch = new JSch(); if (sshMeta.getSshLoginType() == SshLoginType.KEY) { String workingDir = System.getProperty("user.dir"); String privKeyAbsPath = workingDir ...
java
public Channel sessionConnectGenerateChannel(Session session) throws JSchException { // set timeout session.connect(sshMeta.getSshConnectionTimeoutMillis()); ChannelExec channel = (ChannelExec) session.openChannel("exec"); channel.setCommand(sshMeta.getCommandLine()); ...
java
public ResponseOnSingeRequest genErrorResponse(Exception t) { ResponseOnSingeRequest sshResponse = new ResponseOnSingeRequest(); String displayError = PcErrorMsgUtils.replaceErrorMsg(t.toString()); sshResponse.setStackTrace(PcStringUtils.printStackTrace(t)); sshResponse.setErrorMessage(...
java
public void genNodeDataMap(ParallelTask task) { TargetHostMeta targetHostMeta = task.getTargetHostMeta(); HttpMeta httpMeta = task.getHttpMeta(); String entityBody = httpMeta.getEntityBody(); String requestContent = HttpMeta .replaceDefaultFullRequestContent(entityBody)...
java
public void filterUnsafeOrUnnecessaryRequest( Map<String, NodeReqResponse> nodeDataMapValidSource, Map<String, NodeReqResponse> nodeDataMapValidSafe) { for (Entry<String, NodeReqResponse> entry : nodeDataMapValidSource .entrySet()) { String hostName = entry....
java
public ClientBootstrap bootStrapTcpClient() throws HttpRequestCreateException { ClientBootstrap tcpClient = null; try { // Configure the client. tcpClient = new ClientBootstrap(tcpMeta.getChannelFactory()); // Configure the pipeline factory. ...
java
private void reply(final String response, final boolean error, final String errorMessage, final String stackTrace, final String statusCode, final int statusCodeInt) { if (!sentReply) { //must update sentReply first to avoid duplicated msg. s...
java
public static String stringMatcherByPattern(String input, String patternStr) { String output = PcConstants.SYSTEM_FAIL_MATCH_REGEX; // 20140105: fix the NPE issue if (patternStr == null) { logger.error("patternStr is NULL! (Expected when the aggregation rule is not defined at " ...
java
public synchronized void initTaskSchedulerIfNot() { if (scheduler == null) { scheduler = Executors .newSingleThreadScheduledExecutor(DaemonThreadFactory .getInstance()); CapacityAwareTaskScheduler runner = new CapacityAwareTaskScheduler();...
java
public synchronized void shutdownTaskScheduler(){ if (scheduler != null && !scheduler.isShutdown()) { scheduler.shutdown(); logger.info("shutdowned the task scheduler. No longer accepting new tasks"); scheduler = null; } }
java
public ParallelTask getTaskFromInProgressMap(String jobId) { if (!inprogressTaskMap.containsKey(jobId)) return null; return inprogressTaskMap.get(jobId); }
java
public int getTotalUsedCapacity() { int totalCapacity = 0; for (Entry<String, ParallelTask> entry : inprogressTaskMap.entrySet()) { ParallelTask task = entry.getValue(); if (task != null) totalCapacity += task.capacityUsed(); } return totalCapacit...
java
public synchronized void cleanWaitTaskQueue() { for (ParallelTask task : waitQ) { task.setState(ParallelTaskState.COMPLETED_WITH_ERROR); task.getTaskErrorMetas().add( new TaskErrorMeta(TaskErrorType.USER_CANCELED, "NA")); logger.info( ...
java
public synchronized boolean removeTaskFromWaitQ(ParallelTask taskTobeRemoved) { boolean removed = false; for (ParallelTask task : waitQ) { if (task.getTaskId() == taskTobeRemoved.getTaskId()) { task.setState(ParallelTaskState.COMPLETED_WITH_ERROR); task.getTa...
java
public ResponseFromManager generateUpdateExecuteTask(ParallelTask task) { // add to map now; as can only pass final ParallelTaskManager.getInstance().addTaskToInProgressMap( task.getTaskId(), task); logger.info("Added task {} to the running inprogress map...", ta...
java
@SuppressWarnings("deprecation") public ResponseFromManager sendTaskToExecutionManager(ParallelTask task) { ResponseFromManager commandResponseFromManager = null; ActorRef executionManager = null; try { // Start new job logger.info("!!STARTED sendAgentCommandToManage...
java
public static boolean isFileExist(String filePath) { File f = new File(filePath); return f.exists() && !f.isDirectory(); }
java
public static String readFileContentToString(String filePath) throws IOException { String content = ""; content = Files.toString(new File(filePath), Charsets.UTF_8); return content; }
java
public static String readStringFromUrlGeneric(String url) throws IOException { InputStream is = null; URL urlObj = null; String responseString = PcConstants.NA; try { urlObj = new URL(url); URLConnection con = urlObj.openConnection(); con....
java
public void updateRequestByAddingReplaceVarPair( ParallelTask task, String replaceVarKey, String replaceVarValue) { Map<String, NodeReqResponse> taskResult = task.getParallelTaskResult(); for (Entry<String, NodeReqResponse> entry : taskResult.entrySet()) { NodeReqResponse nodeR...
java
public static ActorSystem createAndGetActorSystem() { if (actorSystem == null || actorSystem.isTerminated()) { actorSystem = ActorSystem.create(PcConstants.ACTOR_SYSTEM, conf); } return actorSystem; }
java
public static void shutDownActorSystemForce() { if (!actorSystem.isTerminated()) { logger.info("shutting down actor system..."); actorSystem.shutdown(); actorSystem.awaitTermination(timeOutDuration); logger.info("Actor system has been shut down."); } else ...
java
public synchronized void init() { channelFactory = new NioClientSocketChannelFactory( Executors.newCachedThreadPool(), Executors.newCachedThreadPool()); datagramChannelFactory = new NioDatagramChannelFactory( Executors.newCachedThreadPool()); tim...
java
public static String replaceErrorMsg(String origMsg) { String replaceMsg = origMsg; for (ERROR_TYPE errorType : ERROR_TYPE.values()) { if (origMsg == null) { replaceMsg = PcConstants.NA; return replaceMsg; } if (origMsg.contains(erro...
java
private void disableCertificateVerification() throws KeyManagementException, NoSuchAlgorithmException { // Create a trust manager that does not validate certificate chains final TrustManager[] trustAllCerts = new TrustManager[] { new CustomTrustManager() }; // Install the all-trusti...
java
public static String replaceFullRequestContent( String requestContentTemplate, String replacementString) { return (requestContentTemplate.replace( PcConstants.COMMAND_VAR_DEFAULT_REQUEST_CONTENT, replacementString)); }
java
public void addFile(String description, FileModel fileModel) { Map<FileModel, ProblemFileSummary> files = addDescription(description); if (files.containsKey(fileModel)) { files.get(fileModel).addOccurrence(); } else { files.put(fileModel, new ProblemFileSumma...
java
private boolean shouldIgnore(String typeReference) { typeReference = typeReference.replace('/', '.').replace('\\', '.'); return JavaClassIgnoreResolver.singletonInstance().matches(typeReference); }
java
@Override public FileModel resolvePayload(GraphRewrite event, EvaluationContext context, WindupVertexFrame payload) { checkVariableName(event, context); if (payload instanceof FileReferenceModel) { return ((FileReferenceModel) payload).getFile(); } if (payload...
java
public static FreeMarkerOperation create(Furnace furnace, String templatePath, String outputFilename, String... varNames) { return new FreeMarkerOperation(furnace, templatePath, outputFilename, varNames); }
java
private void recurseAndAddFiles(GraphRewrite event, EvaluationContext context, Path tempFolder, FileService fileService, ArchiveModel archiveModel, FileModel parentFileModel, boolean subArchivesOnly) { checkCancelled(event); int numberAdded = 0; ...
java
private void renderAsLI(Writer writer, ProjectModel project, Iterator<Link> links, boolean wrap) throws IOException { if (!links.hasNext()) return; if (wrap) writer.append("<ul>"); while (links.hasNext()) { Link link = links.next(); wr...
java
private ApplicationReportIndexModel createApplicationReportIndex(GraphContext context, ProjectModel applicationProjectModel) { ApplicationReportIndexService applicationReportIndexService = new ApplicationReportIndexService(context); ApplicationReportIndexModel index = applicationRepo...
java
private void addAllProjectModels(ApplicationReportIndexModel navIdx, ProjectModel projectModel) { navIdx.addProjectModel(projectModel); for (ProjectModel childProject : projectModel.getChildProjects()) { if (!Iterators.asSet(navIdx.getProjectModels()).contains(childProject)) ...
java
public long getTimeRemainingInMillis() { long batchTime = System.currentTimeMillis() - startTime; double timePerIteration = (double) batchTime / (double) worked.get(); return (long) (timePerIteration * (total - worked.get())); }
java
public FileModel getChildFile(ArchiveModel archiveModel, String filePath) { filePath = FilenameUtils.separatorsToUnix(filePath); StringTokenizer stk = new StringTokenizer(filePath, "/"); FileModel currentFileModel = archiveModel; while (stk.hasMoreTokens() && currentFileModel != nul...
java
private void sort() { DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph = new DefaultDirectedWeightedGraph<>( DefaultEdge.class); for (RuleProvider provider : providers) { graph.addVertex(provider); } addProviderRelationships(grap...
java
private void checkForCycles(DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph) { CycleDetector<RuleProvider, DefaultEdge> cycleDetector = new CycleDetector<>(graph); if (cycleDetector.detectCycles()) { // if we have cycles, then try to throw an exception with some us...
java
private void recurseAndAddFiles(GraphRewrite event, FileService fileService, WindupJavaConfigurationService javaConfigurationService, FileModel file) { if (javaConfigurationService.checkIfIgnored(event, file)) return; String filePath = file.getFilePath(); File fileReference = ne...
java
public static void checkFileOrDirectoryToBeRead(File fileOrDir, String fileDesc) { if (fileOrDir == null) throw new IllegalArgumentException(fileDesc + " must not be null."); if (!fileOrDir.exists()) throw new IllegalArgumentException(fileDesc + " does not exist: " + fileOrDi...
java
public List<URL> scan(Predicate<String> filter) { List<URL> discoveredURLs = new ArrayList<>(128); // For each Forge addon... for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted())) { List<String> filteredResourcePaths = filterAddonResources(a...
java
public List<Class<?>> scanClasses(Predicate<String> filter) { List<Class<?>> discoveredClasses = new ArrayList<>(128); // For each Forge addon... for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted())) { List<String> discoveredFileNames = filt...
java
public List<String> filterAddonResources(Addon addon, Predicate<String> filter) { List<String> discoveredFileNames = new ArrayList<>(); List<File> addonResources = addon.getRepository().getAddonResources(addon.getId()); for (File addonFile : addonResources) { if (addonFil...
java
private void handleArchiveByFile(Predicate<String> filter, File archive, List<String> discoveredFiles) { try { try (ZipFile zip = new ZipFile(archive)) { Enumeration<? extends ZipEntry> entries = zip.entries(); while (entries.h...
java
private void handleDirectory(final Predicate<String> filter, final File rootDir, final List<String> discoveredFiles) { try { new DirectoryWalker<String>() { private Path startDir; public void walk() throws IOException { ...
java
public static Project dependsOnArtifact(Artifact artifact) { Project project = new Project(); project.artifact = artifact; return project; }
java
public static final <T> T getSingle( Iterable<T> it ) { if( ! it.iterator().hasNext() ) return null; final Iterator<T> iterator = it.iterator(); T o = iterator.next(); if(iterator.hasNext()) throw new IllegalStateException("Found multiple items in iterator over "...
java
@Override public void perform(GraphRewrite event, EvaluationContext context) { checkVariableName(event, context); WindupVertexFrame payload = resolveVariable(event, getVariableName()); if (payload instanceof FileReferenceModel) { FileModel file = ((FileReferenceModel)...
java
public Project dependsOnArtifact(Artifact artifact) { Project project = new Project(); project.setArtifact(artifact); project.setInputVariablesName(inputVarName); return project; }
java
public static JmsDestinationType getTypeFromClass(String aClass) { if (StringUtils.equals(aClass, "javax.jms.Queue") || StringUtils.equals(aClass, "javax.jms.QueueConnectionFactory")) { return JmsDestinationType.QUEUE; } else if (StringUtils.equals(aClass, "javax.jms.Topi...
java
protected void checkVariableName(GraphRewrite event, EvaluationContext context) { if (variableName == null) { setVariableName(Iteration.getPayloadVariableName(event, context)); } }
java
public static List<ClassReference> analyze(WildcardImportResolver importResolver, Set<String> libraryPaths, Set<String> sourcePaths, Path sourceFile) { ASTParser parser = ASTParser.newParser(AST.JLS11); parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]), sour...
java
public static final String vertexAsString(Vertex vertex, int depth, String withEdgesOfLabel) { StringBuilder sb = new StringBuilder(); vertexAsString(vertex, depth, withEdgesOfLabel, sb, 0, new HashSet<>()); return sb.toString(); }
java
private static String normalizeDirName(String name) { if(name == null) return null; return name.toLowerCase().replaceAll("[^a-zA-Z0-9]", "-"); }
java
private static String guessPackaging(ProjectModel projectModel) { String projectType = projectModel.getProjectType(); if (projectType != null) return projectType; LOG.warning("WINDUP-983 getProjectType() returned null for: " + projectModel.getRootFileModel().getPrettyPath()); ...
java
public static boolean xpathExists(Node document, String xpathExpression, Map<String, String> namespaceMapping) throws XPathException, MarshallingException { Boolean result = (Boolean) executeXPath(document, xpathExpression, namespaceMapping, XPathConstants.BOOLEAN); return result != ...
java
public static Object executeXPath(Node document, String xpathExpression, Map<String, String> namespaceMapping, QName result) throws XPathException, MarshallingException { NamespaceMapContext mapContext = new NamespaceMapContext(namespaceMapping); try { XPathFactor...
java
String deriveGroupIdFromPackages(ProjectModel projectModel) { Map<Object, Long> pkgsMap = new HashMap<>(); Set<String> pkgs = new HashSet<>(1000); GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(graphContext.getGraph()).V(projectModel); pkgsMap = pipeline.out(Pro...
java
@Override public JavaClassBuilderAt at(TypeReferenceLocation... locations) { if (locations != null) this.locations = Arrays.asList(locations); return this; }
java
@Override public ConditionBuilder as(String variable) { Assert.notNull(variable, "Variable name must not be null."); this.setOutputVariablesName(variable); return this; }
java
protected void setResults(GraphRewrite event, String variable, Iterable<? extends WindupVertexFrame> results) { Variables variables = Variables.instance(event); Iterable<? extends WindupVertexFrame> existingVariables = variables.findVariable(variable, 1); if (existingVariables != null) ...
java
private Map<String, Class<? extends RulePhase>> loadPhases() { Map<String, Class<? extends RulePhase>> phases; phases = new HashMap<>(); Furnace furnace = FurnaceHolder.getFurnace(); for (RulePhase phase : furnace.getAddonRegistry().getServices(RulePhase.class)) { ...
java
private void allInput(List<FileModel> vertices, GraphRewrite event, ParameterStore store) { if (StringUtils.isBlank(getInputVariablesName()) && this.filenamePattern == null) { FileService fileModelService = new FileService(event.getGraphContext()); for (FileModel fileModel : ...
java
@Override public T getById(Object id) { return context.getFramed().getFramedVertex(this.type, id); }
java
public static <T extends WindupVertexFrame> T addTypeToModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type) { Vertex vertex = frame.getElement(); graphContext.getGraphTypeManager().addTypeToElement(type, vertex); return graphContext.getFramed().frameElement(vertex, type);...
java
public static <T extends WindupVertexFrame> WindupVertexFrame removeTypeFromModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type) { Vertex vertex = frame.getElement(); graphContext.getGraphTypeManager().removeTypeFromElement(type, vertex); return graphContext.getFramed().f...
java
@SuppressWarnings("unchecked") private static synchronized Map<String, Boolean> getCache(GraphRewrite event) { Map<String, Boolean> result = (Map<String, Boolean>)event.getRewriteContext().get(ClassificationServiceCache.class); if (result == null) { result = Collections.synch...
java
public static String getEffortLevelDescription(Verbosity verbosity, int points) { EffortLevel level = EffortLevel.forPoints(points); switch (verbosity) { case ID: return level.name(); case VERBOSE: return level.getVerboseDescription(); case SH...
java
public WindupConfiguration setOptionValue(String name, Object value) { configurationOptions.put(name, value); return this; }
java
@SuppressWarnings("unchecked") public <T> T getOptionValue(String name) { return (T) configurationOptions.get(name); }
java
private void logTimeTakenByRuleProvider(GraphContext graphContext, Context context, int ruleIndex, int timeTaken) { AbstractRuleProvider ruleProvider = (AbstractRuleProvider) context.get(RuleMetadataType.RULE_PROVIDER); if (ruleProvider == null) return; if (!timeTakenByProvider....
java
private void logTimeTakenByPhase(GraphContext graphContext, Class<? extends RulePhase> phase, int timeTaken) { if (!timeTakenByPhase.containsKey(phase)) { RulePhaseExecutionStatisticsModel model = new GraphService<>(graphContext, RulePhaseExecutionStatisticsModel....
java
public static String transformXPath(String originalXPath) { // use a list to maintain the multiple joined xqueries (if there are multiple queries joined with the "|" operator) List<StringBuilder> compiledXPaths = new ArrayList<>(1); int frameIdx = -1; boolean inQuote = false; ...
java
@Override public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) { if (this.options.verbose) { this.out.println( Messages.bind(Messages.compilation_loadBinary, new String(binaryType.getName()))); // new Exception("TRACE BI...
java