content stringlengths 40 137k |
|---|
"public void onClick(View view) {\n mLoginListener.track(AnalyticsTracker.Stat.LOGIN_SOCIAL_BUTTON_CLICK);\n ActivityUtils.hideKeyboard(getActivity().getCurrentFocus());\n if (NetworkUtils.checkConnection(getActivity())) {\n mOldSitesIDs = SiteUtils.getCurrentSiteIds(mSiteStore, false);\n mIsSocialLogin = true;\n mLoginListener.showGoogleLoginScreen(LoginEmailFragment.this);\n }\n}\n"
|
"protected void afterHookedMethod(final MethodHookParam param) throws Throwable {\n MenuItem item = (MenuItem) param.args[1];\n switch(item.getItemId()) {\n case id:\n Open(Ectx);\n start = Etextview.getSelectionStart();\n end = Etextview.getSelectionEnd();\n mClipboardManager = (ClipboardManager) Ectx.getSystemService(Context.CLIPBOARD_SERVICE);\n mOnPrimaryClipChangedListener = new ClipboardManager.OnPrimaryClipChangedListener() {\n public void onPrimaryClipChanged() {\n if (mClipboardManager.getPrimaryClip().getItemAt(0).coerceToText(Ectx).toString().equals(\"String_Node_Str\")) {\n try {\n mClipboardManager.removePrimaryClipChangedListener(mOnPrimaryClipChangedListener);\n } catch (Exception e1) {\n Toast.makeText(Ectx, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n e1.printStackTrace();\n }\n } else if (pref.getBoolean(\"String_Node_Str\", false)) {\n try {\n mClipboardManager.removePrimaryClipChangedListener(mOnPrimaryClipChangedListener);\n } catch (Exception e1) {\n Toast.makeText(Ectx, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n e1.printStackTrace();\n }\n try {\n Etextview.setText(Etextview.getText().subSequence(0, start).toString() + mClipboardManager.getPrimaryClip().getItemAt(0).coerceToText(Ectx).toString() + Etextview.getText().subSequence(end, Etextview.getText().length()).toString());\n Selection.setSelection((Spannable) Etextview.getText(), start + mClipboardManager.getPrimaryClip().getItemAt(0).coerceToText(Ectx).length());\n } catch (Throwable e) {\n Toast.makeText(Ectx, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n } else {\n try {\n Etextview.setText(Etextview.getText().subSequence(0, start).toString() + mClipboardManager.getPrimaryClip().getItemAt(0).coerceToText(Ectx).toString() + Etextview.getText().subSequence(end, Etextview.getText().length()).toString());\n Selection.setSelection((Spannable) Etextview.getText(), start + mClipboardManager.getPrimaryClip().getItemAt(0).coerceToText(Ectx).length());\n } catch (Throwable e) {\n Toast.makeText(Ectx, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }\n }\n };\n mClipboardManager.addPrimaryClipChangedListener(mOnPrimaryClipChangedListener);\n param.setResult(true);\n return;\n }\n}\n"
|
"public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\n final Bookmark bmark = ((Bookmark) parent.getAdapter().getItem(position));\n final Bundle bundle = new Bundle();\n String bmarkJson = (new Gson()).toJson(bmark);\n bundle.putString(IntentConstants.EXTRAS_KEY_BMARK, bmarkJson);\n final Intent intent = new Intent(BookmarkListActivity.this, BookMarkDetailActivity.class);\n intent.putExtras(bundle);\n startActivity(intent);\n return true;\n}\n"
|
"protected static ClassLoader createProtectiveClassLoader(ClassLoader cl, String v) throws ClassNotFoundException, MalformedURLException {\n if (noHack)\n return cl;\n boolean mustang = false;\n if (JAXBContext.class.getClassLoader() == null) {\n mustang = true;\n List mask = new ArrayList(Arrays.asList(maskedPackages));\n mask.add(\"String_Node_Str\");\n cl = new MaskingClassLoader(cl, mask);\n URL apiUrl = cl.getResource(\"String_Node_Str\");\n if (apiUrl == null)\n throw new ClassNotFoundException(\"String_Node_Str\");\n cl = new URLClassLoader(new URL[] { ParallelWorldClassLoader.toJarUrl(apiUrl) }, cl);\n }\n if (v.equals(\"String_Node_Str\")) {\n if (!mustang)\n cl = new MaskingClassLoader(cl, toolPackages);\n cl = new ParallelWorldClassLoader(cl, \"String_Node_Str\");\n } else {\n if (mustang)\n cl = new ParallelWorldClassLoader(cl, \"String_Node_Str\");\n }\n return cl;\n}\n"
|
"public Collection<ResultAnnotation> getBindedAnnotations(Collection<Binding> bindings) {\n Collection<ResultAnnotation> finalAnnotations = new ArrayList<>();\n for (ResultAnnotation externalAnnotation : annotations) {\n ResultAnnotation sanitizedAnnotation = externalAnnotation;\n if (externalAnnotation.getAnnotationValue().isPresent() && externalAnnotation.getAnnotationValue().get().isLiteral()) {\n String value = externalAnnotation.getAnnotationValue().get().toString();\n for (Binding binding : bindings) {\n if (value.equals(\"String_Node_Str\" + binding.getParameterId() + \"String_Node_Str\")) {\n sanitizedAnnotation = new ResultAnnotationImpl.Builder(externalAnnotation.getResource().get(), externalAnnotation.getAnnotationProperty()).setValueRDFUnit(binding.getValue()).build();\n }\n }\n }\n finalAnnotations.add(sanitizedAnnotation);\n }\n return finalAnnotations;\n}\n"
|
"public ServiceDescriptor getInternalService(Long uoid, String serviceIdentifier) {\n for (Entry<Long, Map<String, ServiceDescriptor>> entry : uoidToInternalServices.entrySet()) {\n if (entry.getValue().containsKey(serviceIdentifier)) {\n return entry.getValue().get(serviceIdentifier);\n }\n }\n return null;\n}\n"
|
"public static void removeSnapshotAPIDocs(File mkdocsConfigFile, String documentationBaseDirectory, Log logger) {\n File apiDocsDirectory = new File(documentationBaseDirectory + File.separator + Constants.API_SUB_DIRECTORY);\n String[] documentationFileNames = apiDocsDirectory.list((directory, fileName) -> fileName.endsWith(Constants.MARKDOWN_FILE_EXTENSION));\n if (documentationFileNames != null) {\n List<String> documentationFilesList = new ArrayList<>();\n for (String documentationFileName : documentationFileNames) {\n if (documentationFileName.endsWith(Constants.SNAPSHOT_VERSION_POSTFIX + Constants.MARKDOWN_FILE_EXTENSION)) {\n File documentationFile = new File(apiDocsDirectory.getAbsolutePath() + File.separator + documentationFileName);\n if (!documentationFile.delete()) {\n logger.warn(\"String_Node_Str\" + documentationFile.getAbsolutePath());\n }\n } else {\n documentationFilesList.add(documentationFileName);\n }\n }\n try {\n updateAPIPagesInMkdocsConfig(mkdocsConfigFile, documentationBaseDirectory);\n } catch (FileNotFoundException e) {\n logger.warn(\"String_Node_Str\" + mkdocsConfigFile.getAbsolutePath() + \"String_Node_Str\");\n }\n }\n}\n"
|
"private void addEmbeddedColumnNameToDocument(String superColumnName, Document currentDoc) {\n Field luceneField = getLuceneField(SUPERCOLUMN_INDEX, superColumnName);\n currentDoc.add(luceneField);\n}\n"
|
"public void onResume() {\n super.onResume();\n if (AppController.getStoredString(Constants.Authorization) != null) {\n mBookmarkTopLay.setVisibility(View.GONE);\n mBookmarkMainLay.setVisibility(View.VISIBLE);\n if (gifts.size() <= 0 && startIndex == 0) {\n getBookmarks();\n }\n } else {\n mBookmarkTopLay.setVisibility(View.VISIBLE);\n mBookmarkMainLay.setVisibility(View.INVISIBLE);\n }\n}\n"
|
"public void compose(Element e, Turtle ttl, String base) throws Exception {\n ttl.prefix(\"String_Node_Str\", FHIR_URI_BASE);\n ttl.prefix(\"String_Node_Str\", \"String_Node_Str\");\n ttl.prefix(\"String_Node_Str\", \"String_Node_Str\");\n ttl.prefix(\"String_Node_Str\", \"String_Node_Str\");\n Section section = ttl.section(\"String_Node_Str\");\n Subject subject;\n String id = e.getChildValue(\"String_Node_Str\");\n if (base == null || id == null)\n subject = section.triple(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + e.getType());\n subject.linkedPredicate(\"String_Node_Str\", \"String_Node_Str\", linkResolver == null ? null : linkResolver.resolvePage(\"String_Node_Str\"));\n for (Element child : e.getChildren()) {\n composeElement(section, subject, child, null);\n if (\"String_Node_Str\".equals(child.getType())) {\n String refURI = getReferenceURI(child.getChildValue(\"String_Node_Str\"));\n if (refURI != null) {\n String uriType = getURIType(refURI);\n if (uriType != null)\n section.triple(refURI, \"String_Node_Str\", \"String_Node_Str\" + uriType);\n }\n }\n }\n}\n"
|
"protected ProgramStatus getProgramStatus(Id.Program id, String runId) throws NotFoundException {\n ProgramRuntimeService.RuntimeInfo runtimeInfo = findRuntimeInfo(id, runId);\n if (runtimeInfo == null) {\n if (id.getType() != ProgramType.WEBAPP) {\n ProgramSpecification spec = getProgramSpecification(id);\n if (spec == null) {\n throw new NotFoundException(id);\n }\n if (id.getType() == ProgramType.MAPREDUCE && !store.getRuns(id, ProgramRunStatus.RUNNING, 0, Long.MAX_VALUE, 1).isEmpty()) {\n return ProgramStatus.RUNNING;\n }\n return new ProgramStatus(id.getApplicationId(), id.getId(), \"String_Node_Str\");\n }\n try {\n Location webappLoc = Programs.programLocation(namespacedLocationFactory, appFabricDir, id);\n if (webappLoc != null && webappLoc.exists()) {\n return new ProgramStatus(id.getApplicationId(), id.getId(), \"String_Node_Str\");\n }\n throw new NotFoundException(id);\n } catch (IOException ioe) {\n throw new NotFoundException(id, ioe);\n }\n }\n String status = controllerStateToString(runtimeInfo.getController().getState());\n return new ProgramStatus(id.getApplicationId(), id.getId(), status);\n}\n"
|
"public String toString(final Range range) {\n return GSON_OBJECT.toJson(this.toJsonElement(range));\n}\n"
|
"public static boolean validateCredentials(Project project, String ticket) throws ServerException, IOException, URISyntaxException {\n URIBuilder requestUri = MMSUtils.getServiceUri(project);\n if (requestUri == null) {\n return \"String_Node_Str\";\n }\n requestUri.setPath(requestUri.getPath() + \"String_Node_Str\" + ticket);\n requestUri.clearParameters();\n URI requestDest = requestUri.build();\n HttpRequestBase request = new HttpGet(requestDest);\n System.out.println(\"String_Node_Str\" + requestUri.toString());\n String message = \"String_Node_Str\";\n try (CloseableHttpClient httpclient = HttpClients.createDefault();\n CloseableHttpResponse response = httpclient.execute(request);\n InputStream inputStream = response.getEntity().getContent()) {\n int responseCode = response.getStatusLine().getStatusCode();\n String responseBody = ((inputStream != null) ? IOUtils.toString(inputStream) : \"String_Node_Str\");\n String responseType = ((response.getEntity().getContentType() != null) ? response.getEntity().getContentType().getValue() : \"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + requestUri.toString() + \"String_Node_Str\" + responseCode);\n boolean throwServerException = false;\n if (responseCode != HttpURLConnection.HTTP_OK || (responseCode == HttpURLConnection.HTTP_NOT_FOUND && !responseType.equals(\"String_Node_Str\"))) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + responseCode);\n throwServerException = true;\n }\n if (!responseBody.isEmpty() && responseType.equals(\"String_Node_Str\")) {\n ObjectNode responseJson = JacksonUtils.getObjectMapper().readValue(responseBody, ObjectNode.class);\n JsonNode value;\n if (responseJson != null && (value = responseJson.get(\"String_Node_Str\")) != null && value.isTextual() && !value.asText().isEmpty()) {\n message = value.asText();\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + value.asText());\n }\n }\n if (throwServerException) {\n Utils.showPopupMessage(\"String_Node_Str\");\n throw new ServerException(responseBody, responseCode);\n }\n }\n return message.equals(\"String_Node_Str\");\n}\n"
|
"public void invalidate() {\n if (_page != null) {\n getAttachedUiEngine().addInvalidate(this);\n}\n"
|
"protected Class defineClass(String name, byte[] b, CodeSource cs) throws IOException {\n if (trace.isTraceEnabled())\n trace.enter(\"String_Node_Str\", this, new Object[] { name, b, cs });\n if (!initializingAdaptor) {\n if (adaptor == null && !initializingAdaptor) {\n createAdaptor();\n }\n try {\n b = adaptor.weaveClass(name, b, false);\n } catch (AbortException ex) {\n trace.error(\"String_Node_Str\", ex);\n throw ex;\n } catch (Throwable th) {\n trace.error(\"String_Node_Str\", th);\n }\n }\n Class clazz = super.defineClass(name, b, cs);\n if (trace.isTraceEnabled())\n trace.exit(\"String_Node_Str\", clazz);\n return clazz;\n}\n"
|
"private void foreachArray(Context context, ForeachLoop loop) throws UserException, UndefinedTypeException {\n Var arrayVar = exprWalker.eval(context, loop.getArrayVarTree(), loop.findArrayType(context), true, null);\n ArrayList<Var> usedVariables = new ArrayList<Var>();\n ArrayList<Var> keepOpenVars = new ArrayList<Var>();\n VariableUsageInfo bodyVU = loop.getBody().checkedGetVariableUsage();\n summariseBranchVariableUsage(context, Arrays.asList(bodyVU), usedVariables, keepOpenVars);\n for (Var v : keepOpenVars) {\n if (v.name().equals(arrayVar.name())) {\n throw new STCRuntimeError(\"String_Node_Str\" + v.name() + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n FunctionContext fc = context.getFunctionContext();\n int loopNum = fc.getCounterVal(\"String_Node_Str\");\n Var realArray;\n Context outsideLoopContext;\n ArrayList<Var> arrRefWaitUsedVars = null;\n if (Types.isArrayRef(arrayVar.type())) {\n arrRefWaitUsedVars = new ArrayList<Var>(usedVariables);\n arrRefWaitUsedVars.add(arrayVar);\n backend.startWaitStatement(fc.getFunctionName() + \"String_Node_Str\" + loopNum, Arrays.asList(arrayVar), arrRefWaitUsedVars, keepOpenVars, WaitMode.DATA_ONLY, false, TaskMode.LOCAL_CONTROL);\n outsideLoopContext = new LocalContext(context);\n realArray = varCreator.createTmp(outsideLoopContext, arrayVar.type().memberType(), false, true);\n backend.retrieveRef(realArray, arrayVar);\n } else {\n realArray = arrayVar;\n outsideLoopContext = context;\n }\n ArrayList<Var> waitUsedVars = new ArrayList<Var>(usedVariables);\n waitUsedVars.add(realArray);\n backend.startWaitStatement(fc.getFunctionName() + \"String_Node_Str\" + loopNum, Arrays.asList(realArray), waitUsedVars, keepOpenVars, WaitMode.DATA_ONLY, false, TaskMode.LOCAL_CONTROL);\n loop.setupLoopBodyContext(outsideLoopContext);\n Context loopBodyContext = loop.getBodyContext();\n backend.startForeachLoop(fc.getFunctionName() + \"String_Node_Str\" + loopNum, realArray, loop.getMemberVar(), loop.getLoopCountVal(), loop.getSplitDegree(), true, usedVariables, keepOpenVars);\n ArrayList<Var> iterUsedVars = null;\n if (!loop.isSyncLoop()) {\n iterUsedVars = new ArrayList<Var>(usedVariables);\n if (loop.getLoopCountVal() != null)\n iterUsedVars.add(loop.getLoopCountVal());\n backend.startWaitStatement(fc.getFunctionName() + \"String_Node_Str\" + loopNum, Collections.<Var>emptyList(), iterUsedVars, keepOpenVars, WaitMode.TASK_DISPATCH, false, TaskMode.CONTROL);\n }\n if (loop.getCountVarName() != null) {\n Var loopCountVar = varCreator.createVariable(loop.getBodyContext(), Types.F_INT, loop.getCountVarName(), VarStorage.STACK, DefType.LOCAL_USER, null);\n backend.assignInt(loopCountVar, Arg.createVar(loop.getLoopCountVal()));\n }\n Set<Var> noRefcount = Collections.singleton(loop.getMemberVar());\n block(loopBodyContext, loop.getBody(), noRefcount);\n if (!loop.isSyncLoop()) {\n backend.endWaitStatement(iterUsedVars, keepOpenVars);\n }\n backend.endForeachLoop(loop.getSplitDegree(), true, usedVariables, keepOpenVars);\n backend.endWaitStatement(waitUsedVars, keepOpenVars);\n if (Types.isArrayRef(arrayVar.type())) {\n backend.endWaitStatement(arrRefWaitUsedVars, keepOpenVars);\n }\n}\n"
|
"public String getContentType() {\n return Result.APPLICATION_JSON;\n}\n"
|
"public void handleMap(Node node) {\n BeanDefinitionBuilder mapConfigBuilder = createBeanBuilder(MapConfig.class);\n final AbstractBeanDefinition beanDefinition = mapConfigBuilder.getBeanDefinition();\n final Node attName = node.getAttributes().getNamedItem(\"String_Node_Str\");\n final String name = getValue(attName);\n mapConfigBuilder.addPropertyValue(\"String_Node_Str\", name);\n fillAttributeValues(node, mapConfigBuilder, \"String_Node_Str\", \"String_Node_Str\");\n final BeanDefinitionBuilder maxSizeConfigBuilder = createBeanBuilder(MaxSizeConfig.class);\n final AbstractBeanDefinition maxSizeConfigBeanDefinition = maxSizeConfigBuilder.getBeanDefinition();\n mapConfigBuilder.addPropertyValue(\"String_Node_Str\", maxSizeConfigBeanDefinition);\n final Node maxSizeNode = node.getAttributes().getNamedItem(\"String_Node_Str\");\n if (maxSizeNode != null) {\n maxSizeConfigBuilder.addPropertyValue(\"String_Node_Str\", getValue(maxSizeNode));\n }\n final Node maxSizePolicyNode = node.getAttributes().getNamedItem(\"String_Node_Str\");\n if (maxSizePolicyNode != null) {\n maxSizeConfigBuilder.addPropertyValue(xmlToJavaName(cleanNodeName(maxSizePolicyNode)), getValue(maxSizePolicyNode));\n }\n for (org.w3c.dom.Node childNode : new IterableNodeList(node.getChildNodes(), Node.ELEMENT_NODE)) {\n final String nodeName = cleanNodeName(childNode.getNodeName());\n if (\"String_Node_Str\".equals(nodeName)) {\n handleMapStoreConfig(childNode, mapConfigBuilder);\n } else if (\"String_Node_Str\".equals(nodeName)) {\n handleNearCacheConfig(childNode, mapConfigBuilder);\n } else if (\"String_Node_Str\".equals(nodeName)) {\n final BeanDefinitionBuilder wanReplicationRefBuilder = createBeanBuilder(WanReplicationRef.class);\n final AbstractBeanDefinition wanReplicationRefBeanDefinition = wanReplicationRefBuilder.getBeanDefinition();\n fillValues(childNode, wanReplicationRefBuilder);\n mapConfigBuilder.addPropertyValue(\"String_Node_Str\", wanReplicationRefBeanDefinition);\n } else if (\"String_Node_Str\".equals(nodeName)) {\n ManagedList indexes = new ManagedList();\n for (Node indexNode : new IterableNodeList(childNode.getChildNodes(), Node.ELEMENT_NODE)) {\n final BeanDefinitionBuilder indexConfBuilder = createBeanBuilder(MapIndexConfig.class);\n fillAttributeValues(indexNode, indexConfBuilder);\n indexes.add(indexConfBuilder.getBeanDefinition());\n }\n mapConfigBuilder.addPropertyValue(\"String_Node_Str\", indexes);\n } else if (\"String_Node_Str\".equals(nodeName)) {\n ManagedList listeners = parseListeners(childNode, EntryListenerConfig.class);\n mapConfigBuilder.addPropertyValue(\"String_Node_Str\", listeners);\n }\n }\n mapConfigManagedMap.put(name, beanDefinition);\n}\n"
|
"public boolean commit() {\n if (closed)\n return false;\n if (segment(hash).putEntry(hashEntryAdr, hash, keyLen, bytes, false, oldImpl != null ? oldImpl.hashEntryAdr() : 0L, oldImpl != null ? oldImpl.valueOffset() : 0L, oldImpl != null ? oldImpl.valueLen() : 0L)) {\n closed = true;\n return true;\n Uns.free(hashEntryAdr);\n return false;\n}\n"
|
"public void addIssue(final Issue i) throws Exception {\n if (_issues == null)\n initIssueMap();\n if (_issues.get(i.getName()) != null) {\n throw new Exception(\"String_Node_Str\" + i.getName());\n } else {\n _issues.put(i.getName(), i);\n }\n}\n"
|
"void setCourseInfo(String input) {\n Pattern pattern1 = Pattern.compile(\"String_Node_Str\");\n Matcher matcher1 = pattern1.matcher(input);\n Pattern pattern2 = Pattern.compile(\"String_Node_Str\");\n Matcher matcher2 = pattern2.matcher(input);\n coursesInfo = new ArrayList<CourseInfo>();\n if (matcher1.find() && matcher2.find()) {\n int start = matcher1.start();\n int end = matcher1.end();\n String course_link = input.substring(start, end);\n start = matcher2.start() + 1;\n end = matcher2.end() - 1;\n String course_name = input.substring(start, end).trim();\n coursesInfo.add(new CourseInfo(course_name, course_link));\n }\n}\n"
|
"private void scheduleJobs() {\n synchronized (this) {\n if (running) {\n log.debug(\"String_Node_Str\" + \"String_Node_Str\");\n return;\n }\n running = true;\n }\n if (backupNow()) {\n File backupDir = new File(\"String_Node_Str\" + System.currentTimeMillis());\n try {\n DBSpecifics.getInstance().backupDatabase(backupDir);\n lastBackupDate = new Date();\n } catch (SQLException e) {\n String errMsg = \"String_Node_Str\" + backupDir;\n log.warn(errMsg, e);\n NotificationsFactory.getInstance().errorEvent(errMsg, e);\n }\n }\n try {\n final HarvestDefinitionDAO hddao = HarvestDefinitionDAO.getInstance();\n hddao.generateJobs(new Date());\n submitNewJobs();\n } finally {\n synchronized (this) {\n running = false;\n }\n }\n}\n"
|
"public static void updateComponentList(IElement elem, IElementParameter param) {\n if (elem instanceof INode) {\n INode currentNode = (INode) elem;\n List<INode> nodeList = null;\n IJobletProviderService jobletService = getJobletProviderService(param);\n if (jobletService != null) {\n nodeList = jobletService.getConnNodesForInputTrigger(currentNode, param);\n } else {\n List<INode> list = (List<INode>) ((Node) elem).getProcess().getNodesOfType(param.getFilter());\n nodeList = new ArrayList<INode>();\n if (list != null) {\n for (INode datanode : list) {\n if (datanode.getUniqueName() != null && !datanode.getUniqueName().equals(StatsAndLogsManager.CONNECTION_UID)) {\n nodeList.add(datanode);\n }\n }\n }\n }\n List<INode> jobletnodeList = new ArrayList<INode>(nodeList);\n if (((Node) elem).getJobletNode() != null) {\n String jobletUniName = ((Node) elem).getJobletNode().getUniqueName();\n for (INode node : jobletnodeList) {\n if (!node.getUniqueName().startsWith(jobletUniName)) {\n nodeList.remove(node);\n }\n }\n }\n List<String> componentDisplayNames = new ArrayList<String>();\n List<String> componentUniqueNames = new ArrayList<String>();\n for (INode node : nodeList) {\n String uniqueName = node.getUniqueName();\n if (uniqueName.equals(currentNode.getUniqueName())) {\n continue;\n }\n String displayName = (String) node.getElementParameter(\"String_Node_Str\").getValue();\n if (displayName == null) {\n displayName = uniqueName + \"String_Node_Str\" + displayName;\n }\n if (displayName.indexOf(\"String_Node_Str\") != -1) {\n displayName = displayName.replaceAll(\"String_Node_Str\", uniqueName);\n } else {\n displayName = uniqueName + \"String_Node_Str\" + displayName;\n }\n {\n componentUniqueNames.add(uniqueName);\n componentDisplayNames.add(displayName);\n }\n }\n String[] componentNameList = componentDisplayNames.toArray(new String[0]);\n String[] componentValueList = componentUniqueNames.toArray(new String[0]);\n param.setListItemsDisplayName(componentNameList);\n param.setListItemsValue(componentValueList);\n Object value = param.getValue();\n if (!componentUniqueNames.contains(value)) {\n String newValue = null;\n if ((componentUniqueNames.size() > 0)) {\n if (value == null || value.equals(\"String_Node_Str\")) {\n elem.setPropertyValue(getParameterName(param), componentValueList[0]);\n if (elem instanceof Node) {\n Node node = (Node) elem;\n node.checkAndRefreshNode();\n ((IProcess2) node.getProcess()).setProcessModified(true);\n } else if (elem instanceof Connection) {\n ((IProcess2) ((Connection) elem).getSource().getProcess()).setProcessModified(true);\n }\n } else {\n newValue = componentValueList[0];\n }\n } else {\n newValue = \"String_Node_Str\";\n }\n if (!(\"String_Node_Str\".equals(newValue)) && newValue != null) {\n IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();\n if (part instanceof AbstractMultiPageTalendEditor) {\n AbstractTalendEditor te = ((AbstractMultiPageTalendEditor) part).getTalendEditor();\n CommandStack cmdStack = (CommandStack) te.getAdapter(CommandStack.class);\n cmdStack.execute(new PropertyChangeCommand(elem, getParameterName(param), newValue));\n }\n }\n }\n }\n}\n"
|
"protected void __execute() throws Exception {\n BaseAttributeBean attrBean = (BaseAttributeBean) context.getBean();\n boolean svgFlag = getSVGFlag(operation.getOprand());\n runReport();\n String bookmark = null;\n boolean useBookmark = false;\n String docName = attrBean.getReportDocumentName();\n long pageNumber = getPageNumber(context.getRequest(), operation.getOprand(), docName);\n if (!isValidPageNumber(context.getRequest(), pageNumber, docName)) {\n InputOptions options = new InputOptions();\n bookmark = getBookmark(operation.getOprand(), attrBean);\n if (bookmark != null && bookmark.length() > 0) {\n options.setOption(InputOptions.OPT_REQUEST, context.getRequest());\n options.setOption(InputOptions.OPT_LOCALE, attrBean.getLocale());\n pageNumber = getReportService().getPageNumberByBookmark(docName, bookmark, options);\n if (!isValidPageNumber(context.getRequest(), pageNumber, docName)) {\n AxisFault fault = new AxisFault();\n fault.setFaultReason(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_INVALID_BOOKMARK, new String[] { getBookmark(operation.getOprand(), attrBean) }));\n throw fault;\n }\n useBookmark = true;\n }\n if (!isValidPageNumber(context.getRequest(), pageNumber, docName)) {\n pageNumber = 1;\n useBookmark = false;\n }\n }\n doRenderPage(docName, pageNumber, attrBean.getFormat(), svgFlag, attrBean.isMasterPageContent(), useBookmark, bookmark, attrBean.getLocale(), attrBean.isRtl());\n}\n"
|
"protected final SoyExpression visitPlusOpNode(PlusOpNode node) {\n SoyExpression left = visit(node.getChild(0));\n SoyExpression right = visit(node.getChild(1));\n if (left.assignableToNullableInt() && right.assignableToNullableInt()) {\n return applyBinaryIntOperator(Opcodes.LADD, left, right);\n }\n if (left.assignableToNullableNumber() && right.assignableToNullableNumber()) {\n if (left.assignableToNullableInt() && right.assignableToNullableInt()) {\n return applyBinaryIntOperator(Opcodes.LADD, left, right);\n }\n if (left.assignableToNullableFloat() || right.assignableToNullableFloat()) {\n return applyBinaryFloatOperator(Opcodes.DADD, left, right);\n }\n }\n if (left.isKnownString() || right.isKnownString()) {\n SoyExpression leftString = left.coerceToString();\n SoyExpression rightString = right.coerceToString();\n return SoyExpression.forString(leftString.invoke(MethodRef.STRING_CONCAT, rightString));\n }\n return SoyExpression.forSoyValue(SoyTypes.NUMBER_TYPE, MethodRef.RUNTIME_PLUS.invoke(left.box(), right.box()));\n}\n"
|
"public Map<String, Object> queryUsersForAssign(int page, int pagesize, Long roleId, String userNameForSearch, String userAccountForSearch) {\n Map<String, Object> dataMap = new HashMap<String, Object>();\n RoleVO roleVO = new RoleVO();\n roleVO.setId(roleId);\n UserVO userVO = new UserVO();\n userVO.setName(userNameForSearch);\n userVO.setUserAccount(userAccountForSearch);\n Page<UserVO> all = roleApplication.pageQueryNotAssignUserByRole(page, pagesize, userVO, roleVO);\n dataMap.put(\"String_Node_Str\", all.getResult());\n dataMap.put(\"String_Node_Str\", page * pagesize - pagesize);\n dataMap.put(\"String_Node_Str\", pagesize);\n dataMap.put(\"String_Node_Str\", all.getTotalCount());\n return dataMap;\n}\n"
|
"private void minimizeMenuItemActionPerformed(java.awt.event.ActionEvent evt) {\n Iterator[] its = new Iterator[3];\n its[0] = schemaWindowMap.keySet().iterator();\n its[1] = mdxWindows.iterator();\n JInternalFrame sf;\n try {\n for (int i = 0; i < its.length; i++) {\n Iterator it = its[i];\n while (it.hasNext()) {\n sf = (JInternalFrame) it.next();\n if (sf != null) {\n if (sf.isIcon()) {\n } else {\n sf.setIcon(true);\n }\n }\n }\n }\n } catch (Exception ex) {\n LOGGER.error(\"String_Node_Str\", ex);\n }\n}\n"
|
"public PushBufferStream[] getStreams() {\n if (outputStream == null) {\n AudioMixer.AudioMixerPushBufferStream audioMixerOutputStream = audioMixer.getOutputStream();\n if (audioMixerOutputStream != null) {\n outputStream = new AudioMixingPushBufferStream(audioMixerOutputStream, this);\n if (started)\n try {\n outputStream.start();\n } catch (IOException ioex) {\n logger.error(\"String_Node_Str\" + outputStream.getClass().getSimpleName() + \"String_Node_Str\" + outputStream.hashCode(), ioex);\n }\n }\n }\n return (outputStream == null) ? new PushBufferStream[0] : new PushBufferStream[] { outputStream };\n}\n"
|
"public void onClick(AjaxRequestTarget target) {\n manager.executeCallback(target, \"String_Node_Str\");\n manager.closeModalWindow(target);\n}\n"
|
"public IDroneApi registerDroneApi(IApiListener listener, String appId) throws RemoteException {\n return serviceRef.registerDroneApi(listener, appId);\n}\n"
|
"public void reset() {\n if (getAbstractSession().isInTransaction()) {\n getAbstractSession().rollbackTransaction();\n }\n getSession().getIdentityMapAccessor().initializeAllIdentityMaps();\n}\n"
|
"public void setProperty(ElementPropertyDefn prop, Object value) throws SemanticException {\n checkAllowedOperation();\n if (prop.isElementType()) {\n setElementTypeProperty(prop, value);\n return;\n }\n String propName = prop.getName();\n if ((IReportItemModel.TOC_PROP.equals(propName) || IGroupElementModel.TOC_PROP.equals(propName)) && (value instanceof String)) {\n Structure oldValue = (Structure) element.getLocalProperty(module, prop);\n if (oldValue != null) {\n StructureContext ref = new StructureContext(oldValue, (PropertyDefn) oldValue.getDefn().getMember(TOC.TOC_EXPRESSION), null);\n setMember(ref, value);\n return;\n }\n value = StructureFactory.createTOC((String) value);\n }\n if (IExtendedItemModel.EXTENSION_NAME_PROP.equals(prop.getName()) && element instanceof IExtendedItemModel) {\n throw new PropertyValueException(element, IExtendedItemModel.EXTENSION_NAME_PROP, value, PropertyValueException.DESIGN_EXCEPTION_EXTENSION_SETTING_FORBIDDEN);\n }\n String mask = element.getPropertyMask(module, prop.getName());\n if (DesignChoiceConstants.PROPERTY_MASK_TYPE_LOCK.equalsIgnoreCase(mask)) {\n throw new PropertyValueException(element, prop, value, PropertyValueException.DESIGN_EXCEPTION_VALUE_LOCKED);\n }\n if (element.isVirtualElement() && element instanceof Cell) {\n propName = prop.getName();\n if (ICellModel.COL_SPAN_PROP.equalsIgnoreCase(propName) || ICellModel.ROW_SPAN_PROP.equalsIgnoreCase(propName) || ICellModel.DROP_PROP.equalsIgnoreCase(propName) || ICellModel.COLUMN_PROP.equalsIgnoreCase(propName)) {\n throw new PropertyValueException(element, prop, value, PropertyValueException.DESIGN_EXCEPTION_PROPERTY_CHANGE_FORBIDDEN);\n }\n }\n if (element instanceof MasterPage) {\n propName = prop.getName();\n if (!((MasterPage) element).isCustomType(module) && (IMasterPageModel.WIDTH_PROP.equals(propName) || IMasterPageModel.HEIGHT_PROP.equals(propName))) {\n throw new SemanticError(element, SemanticError.DESIGN_EXCEPTION_CANNOT_SPECIFY_PAGE_SIZE);\n }\n }\n value = validateCompatibleObject(prop, value);\n if (value instanceof Structure) {\n Structure struct = (Structure) value;\n if (struct.getContext() != null)\n value = struct.copy();\n }\n value = validateValue(prop, value);\n if (value instanceof ElementRefValue && prop.getTypeCode() == IPropertyType.ELEMENT_REF_TYPE) {\n checkRecursiveElementReference(prop, (ElementRefValue) value);\n checkDataBindingReference(prop, (ElementRefValue) value);\n }\n if (element instanceof GroupElement && IGroupElementModel.GROUP_NAME_PROP.equals(prop.getName())) {\n if (!isGroupNameValidInContext((String) value))\n throw new NameException(element, (String) value, NameException.DESIGN_EXCEPTION_DUPLICATE);\n }\n if (prop.isIntrinsic()) {\n setIntrinsicProperty(prop, value);\n return;\n }\n if (IDesignElementModel.REF_TEMPLATE_PARAMETER_PROP.equals(prop.getName()) && value == null) {\n clearRefTemplateParameterProp(prop, null);\n return;\n }\n if (element instanceof ContentElement) {\n if (!((ContentElement) element).isLocal()) {\n ContentElementCommand attrCmd = new ContentElementCommand(module, element, ((ContentElement) element).getValueContainer());\n attrCmd.doSetProperty(prop, value);\n return;\n }\n }\n doSetProperty(prop, value);\n}\n"
|
"private void removeStemNode(StemNode stemNode) {\n final String surfaceForm = stemNode.surfaceForm;\n if (multiStems.containsKey(surfaceForm)) {\n multiStems.remove(surfaceForm, stemNode);\n } else if (singleStems.containsKey(surfaceForm) && singleStems.get(surfaceForm).getDictionaryItem().equals(stemNode.dictionaryItem)) {\n singleStems.remove(surfaceForm);\n }\n stemNodes.remove(stemNode);\n}\n"
|
"protected FileInfo excuteOperations(DataObject dataObject, MappedEditorConfig config) {\n LOG.log(Level.INFO, \"String_Node_Str\", filePath);\n LOG.log(Level.INFO, config.toString());\n FileInfo info = new FileInfo(dataObject);\n boolean fileChangeNeeded = false;\n boolean styleFlushNeeded = false;\n FileObject primaryFile = dataObject.getPrimaryFile();\n StringBuilder content;\n try {\n MappedCharset mc = config.getCharset();\n String charset = mc != null ? mc.getCharset().name() : StandardCharsets.UTF_8.name();\n content = new StringBuilder(primaryFile.asText(charset));\n } catch (IOException ex) {\n LOG.log(Level.WARNING, \"String_Node_Str\");\n content = new StringBuilder(\"String_Node_Str\");\n }\n info.setContent(content);\n if (config.getEndOfLine() != null) {\n info.setEndOfLine(config.getEndOfLine());\n }\n EditorCookie cookie = getEditorCookie(dataObject);\n boolean isOpenedInEditor = (cookie != null) && (cookie.getDocument() != null);\n info.setOpenedInEditor(isOpenedInEditor);\n info.setCookie(cookie);\n MappedCharset mappedCharset = config.getCharset();\n if (mappedCharset != null) {\n logOperation(EditorConfigConstant.CHARSET, mappedCharset.getName());\n boolean changedCharset = new CharsetOperation().run(dataObject, mappedCharset);\n fileChangeNeeded = fileChangeNeeded || changedCharset;\n info.setCharset(mappedCharset.getCharset());\n } else {\n info.setCharset(StandardCharsets.UTF_8);\n }\n if (config.getEndOfLine() != null) {\n logOperation(EditorConfigConstant.END_OF_LINE, config.getReadableEndOfLine());\n boolean changedLineEndings = new LineEndingOperation().operate(info);\n fileChangeNeeded = fileChangeNeeded || changedLineEndings;\n }\n if (config.getIndentSize() == -2 || config.getIndentSize() > -1) {\n logOperation(EditorConfigConstant.INDENT_SIZE, config.getIndentSize());\n boolean changedIndentSize = new IndentSizeOperation(primaryFile).changeIndentSize(config.getIndentSize());\n styleFlushNeeded = styleFlushNeeded || changedIndentSize;\n }\n if (config.getIndentStyle() != null) {\n logOperation(EditorConfigConstant.INDENT_STYLE, config.getIndentStyle());\n boolean changedIndentStyle = new IndentStyleOperation(primaryFile).changeIndentStyle(config.getIndentStyle());\n styleFlushNeeded = styleFlushNeeded || changedIndentStyle;\n }\n if (config.isInsertFinalNewLine()) {\n logOperation(EditorConfigConstant.INSERT_FINAL_NEWLINE, config.isInsertFinalNewLine());\n boolean changedLineEndings = new FinalNewLineOperation().operate(info);\n fileChangeNeeded = fileChangeNeeded || changedLineEndings;\n }\n if ((config.getTabWidth() > -1) && (config.getIndentStyle() != null) && (config.getIndentStyle().equals(EditorConfigConstant.INDENT_STYLE_TAB))) {\n logOperation(EditorConfigConstant.TAB_WIDTH, config.getIndentStyle());\n boolean changedTabWidth = new TabWidthOperation(primaryFile).changeTabWidth(config.getTabWidth());\n fileChangeNeeded = fileChangeNeeded || changedTabWidth;\n }\n if (config.isTrimTrailingWhiteSpace()) {\n logOperation(EditorConfigConstant.TRIM_TRAILING_WHITESPACE, config.isTrimTrailingWhiteSpace());\n boolean trimmedWhiteSpaces = new TrimTrailingWhiteSpaceOperation().operate(info);\n fileChangeNeeded = fileChangeNeeded || trimmedWhiteSpaces;\n }\n if (mappedCharset != null) {\n } else {\n info.setCharset(StandardCharsets.UTF_8);\n }\n info.setFileChangeNeeded(fileChangeNeeded);\n info.setStyleFlushNeeded(styleFlushNeeded);\n return info;\n}\n"
|
"protected Object formBackingObject(HttpServletRequest request) throws ServletException {\n ReportData report = (ReportData) request.getSession().getAttribute(ReportingConstants.OPENMRS_REPORT_DATA);\n if (null != report) {\n return report;\n } else {\n EvaluationContext context = new EvaluationContext();\n PatientDataSetDefinition dsd = new PatientDataSetDefinition();\n MapDataSet emptyData = new MapDataSet(dsd, context);\n emptyData.setName(\"String_Node_Str\");\n Map<String, DataSet> emptyMap = new HashMap<String, DataSet>();\n emptyMap.put(\"String_Node_Str\", emptyData);\n ReportDefinition emptySchema = new ReportDefinition();\n emptySchema.setName(\"String_Node_Str\");\n ReportData emptyReport = new ReportData();\n emptyReport.setDataSets(emptyMap);\n emptyReport.setDefinition(emptySchema);\n return emptyReport;\n }\n}\n"
|
"public static void populateNode(TreeElement node, TreeElement incoming, TreeReference ref, FormDef f) {\n if (node.isLeaf()) {\n IAnswerData value = incoming.getValue();\n if (value == null) {\n node.setValue(null);\n } else if (node.dataType == Constants.DATATYPE_TEXT || node.dataType == Constants.DATATYPE_NULL) {\n node.setValue(value);\n } else {\n String textVal = (String) value.getValue();\n IAnswerData typedVal = RestoreUtils.xfFact.parseData(textVal, node.dataType, ref, f);\n node.setValue(typedVal);\n }\n } else {\n Vector names = new Vector();\n for (int i = 0; i < node.getNumChildren(); i++) {\n TreeElement child = (TreeElement) node.getChildren().elementAt(i);\n if (!names.contains(child.getName())) {\n names.addElement(child.getName());\n }\n }\n for (int i = 0; i < node.getNumChildren(); i++) {\n TreeElement child = (TreeElement) node.getChildren().elementAt(i);\n if (child.repeatable && child.getMult() != TreeReference.INDEX_TEMPLATE) {\n node.removeChildAt(i);\n i--;\n }\n }\n if (node.getNumChildren() != names.size()) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n for (int i = 0; i < node.getNumChildren(); i++) {\n TreeElement child = (TreeElement) node.getChildren().elementAt(i);\n String expectedName = (String) names.elementAt(i);\n if (!child.getName().equals(expectedName)) {\n TreeElement child2 = null;\n int j;\n for (j = i + 1; j < node.getNumChildren(); j++) {\n child2 = (TreeElement) node.getChildren().elementAt(j);\n if (child2.getName().equals(expectedName)) {\n break;\n }\n }\n if (j == node.getNumChildren()) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n node.removeChildAt(j);\n node.getChildren().insertElementAt(child2, i);\n }\n }\n for (int i = 0; i < node.getNumChildren(); i++) {\n TreeElement child = (TreeElement) node.getChildren().elementAt(i);\n Vector newChildren = incoming.getChildrenWithName(child.getName());\n TreeReference childRef = ref.clone();\n childRef.add(child.getName(), TreeReference.INDEX_UNBOUND);\n if (child.repeatable) {\n for (int k = 0; k < newChildren.size(); k++) {\n TreeElement newChild = child.deepCopy(true);\n newChild.setMult(k);\n node.getChildren().insertElementAt(newChild, k);\n populateNode(newChild, (TreeElement) newChildren.elementAt(k), childRef, f);\n i += k + 1;\n }\n } else {\n if (newChildren.size() == 0) {\n child.setRelevant(false);\n } else {\n populateNode(child, (TreeElement) newChildren.elementAt(0), childRef, f);\n }\n }\n }\n }\n}\n"
|
"public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n FloorForm floorForm = (FloorForm) form;\n RestaurantManager manager = new RestaurantManager();\n String floorId = (String) floorForm.getFloorId();\n String place = (String) floorForm.getId();\n String str = (String) floorForm.getMode();\n String[] array = null;\n int mode = 0;\n if (!str.equals(\"String_Node_Str\")) {\n mode = Integer.valueOf(str);\n }\n List<TicketLineInfo> linesList = new ArrayList<TicketLineInfo>();\n List products = new ArrayList<ProductInfoExt>();\n TicketInfo ticket;\n switch(mode) {\n case 1:\n ticket = manager.findTicket(place);\n linesList = ticket.getM_aLines();\n array = floorForm.getParameters();\n if (array != null) {\n for (int i = 0; i < array.length; i++) {\n if (linesList.get(Integer.valueOf(array[i])).getMultiply() > 1) {\n linesList.get(Integer.valueOf(array[i])).setMultiply(linesList.get(Integer.valueOf(array[i])).getMultiply() - 1);\n }\n }\n }\n manager.updateLineFromTicket(place, ticket);\n for (Object line : linesList) {\n TicketLineInfo li = (TicketLineInfo) line;\n products.add(manager.findProductById(li.getProductid()));\n }\n request.setAttribute(\"String_Node_Str\", products.get(0));\n request.setAttribute(\"String_Node_Str\", place);\n request.setAttribute(\"String_Node_Str\", manager.findPlaceNameById(place));\n request.setAttribute(\"String_Node_Str\", linesList.get(Integer.valueOf(array[0])));\n request.setAttribute(\"String_Node_Str\", array[0]);\n request.setAttribute(\"String_Node_Str\", manager.getTotalOfaTicket(place));\n return mapping.findForward(UPDATE);\n case 4:\n ticket = manager.findTicket(place);\n linesList = ticket.getM_aLines();\n array = floorForm.getParameters();\n if (array != null) {\n linesList.remove(Integer.parseInt(array[0]));\n }\n manager.updateLineFromTicket(place, ticket);\n for (Object line : linesList) {\n TicketLineInfo li = (TicketLineInfo) line;\n products.add(manager.findProductById(li.getProductid()));\n }\n request.setAttribute(\"String_Node_Str\", manager.findFloorById(manager.findPlaceById(place).getFloor()).getName());\n request.setAttribute(\"String_Node_Str\", place);\n request.setAttribute(\"String_Node_Str\", manager.findPlaceNameById(place));\n request.setAttribute(\"String_Node_Str\", floorId);\n request.setAttribute(\"String_Node_Str\", linesList);\n request.setAttribute(\"String_Node_Str\", products);\n request.setAttribute(\"String_Node_Str\", manager.getTotalOfaTicket(place));\n return mapping.findForward(SUCCESS);\n case 2:\n ticket = manager.findTicket(place);\n linesList = ticket.getM_aLines();\n String[] index = floorForm.getParameters();\n linesList.get(Integer.valueOf(index[0])).setMultiply(Double.valueOf(index[1]));\n manager.updateLineFromTicket(floorForm.getId(), ticket);\n for (Object line : linesList) {\n TicketLineInfo li = (TicketLineInfo) line;\n products.add(manager.findProductById(li.getProductid()));\n }\n break;\n case 3:\n ticket = manager.findTicket(place);\n linesList = ticket.getM_aLines();\n array = floorForm.getParameters();\n if (array != null) {\n for (int i = 0; i < array.length; i++) {\n linesList.get(Integer.valueOf(array[i])).setMultiply(linesList.get(Integer.valueOf(array[i])).getMultiply() + 1);\n }\n }\n manager.updateLineFromTicket(place, ticket);\n for (Object line : linesList) {\n TicketLineInfo li = (TicketLineInfo) line;\n products.add(manager.findProductById(li.getProductid()));\n }\n request.setAttribute(\"String_Node_Str\", products.get(0));\n request.setAttribute(\"String_Node_Str\", place);\n request.setAttribute(\"String_Node_Str\", manager.findPlaceNameById(place));\n request.setAttribute(\"String_Node_Str\", linesList.get(Integer.valueOf(array[0])));\n request.setAttribute(\"String_Node_Str\", array[0]);\n request.setAttribute(\"String_Node_Str\", manager.getTotalOfaTicket(place));\n return mapping.findForward(UPDATE);\n default:\n if (manager.findTicket(place) == null) {\n manager.initTicket(place);\n } else {\n linesList = manager.findTicketLines(place);\n }\n for (Object line : linesList) {\n TicketLineInfo li = (TicketLineInfo) line;\n products.add(manager.findProductById(li.getProductid()));\n }\n break;\n }\n request.setAttribute(\"String_Node_Str\", manager.findFloorById(manager.findPlaceById(place).getFloor()).getName());\n request.setAttribute(\"String_Node_Str\", place);\n request.setAttribute(\"String_Node_Str\", manager.findPlaceNameById(place));\n request.setAttribute(\"String_Node_Str\", floorId);\n request.setAttribute(\"String_Node_Str\", linesList);\n request.setAttribute(\"String_Node_Str\", products);\n request.setAttribute(\"String_Node_Str\", manager.getTotalOfaTicket(place));\n return mapping.findForward(SUCCESS);\n}\n"
|
"public void onBucketEmpty(final PlayerBucketEmptyEvent e) {\n if (DEBUG) {\n plugin.getLogger().info(e.getEventName());\n }\n if (inWorld(e.getPlayer())) {\n Player p = e.getPlayer();\n if (e.getBlockClicked() != null) {\n Block dumpBlock = e.getBlockClicked().getRelative(e.getBlockFace());\n if (actionAllowed(p, dumpBlock.getLocation(), SettingsFlag.BUCKET)) {\n if (e.getBlockClicked().getBiome().equals(Biome.HELL)) {\n if (plugin.getServer().getVersion().contains(\"String_Node_Str\") || plugin.getServer().getVersion().contains(\"String_Node_Str\")) {\n e.getPlayer().getWorld().playSound(e.getPlayer().getLocation(), Sound.valueOf(\"String_Node_Str\"), 1F, 2F);\n } else {\n e.getPlayer().getWorld().playSound(e.getPlayer().getLocation(), Sound.ENTITY_CREEPER_PRIMED, 1F, 2F);\n }\n Util.sendMessage(e.getPlayer(), ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).biomeSet.replace(\"String_Node_Str\", \"String_Node_Str\"));\n }\n return;\n }\n Util.sendMessage(p, ChatColor.RED + plugin.myLocale(p.getUniqueId()).islandProtected);\n e.setCancelled(true);\n }\n }\n}\n"
|
"private void initComponents() throws ParseException {\n menuBar.add(menuFile);\n menuFile.add(menuItemLogout);\n menuFile.add(menuItemExit);\n menuAssignment.add(menuItemAddAssignment);\n menuAssignment.add(menuItemRemoveAssignment);\n menuAssignment.add(menuItemShowAssignments);\n menuBar.add(menuAssignment);\n menuReview.add(menuItemAddReview);\n menuReview.add(menuItemRemoveReview);\n menuReview.add(menuItemShowReviews);\n menuBar.add(menuReview);\n menuSettings.add(menuItemAccount);\n menuSettings.add(menuItemDogs);\n menuBar.add(menuSettings);\n menuExtra.add(menuItemInfo);\n menuExtra.add(menuItemAwards);\n menuBar.add(menuItemCancel);\n menuItemCancel.setVisible(false);\n menuBar.add(menuExtra);\n add(menuBar, BorderLayout.NORTH);\n panelToday.setLayout(new GridLayout(7, 1, 5, 5));\n panelToday.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));\n labelTodayAssignments.setForeground(new Color(0, 0, 255));\n labelTodayAssignments.setFont(new Font(\"String_Node_Str\", Font.BOLD, 24));\n panelToday.add(labelTodayAssignments);\n int i;\n int nShownTodayAssignments = 0;\n nTodayAssignments = getNDailyAssignments();\n if (nTodayAssignments <= MAXVISIBLETODAYASSIGNMENT) {\n buttonTodayAssignment = new JButton[nTodayAssignments];\n for (i = 0; i < nTodayAssignments; i++) {\n buttonTodayAssignment[i] = new JButton(\"String_Node_Str\");\n buttonTodayAssignment[i].setBackground(new Color(179, 237, 255));\n buttonTodayAssignment[i].setOpaque(true);\n buttonTodayAssignment[i].setBorderPainted(false);\n buttonTodayAssignment[i].setDisplayedMnemonicIndex(i);\n panelToday.add(buttonTodayAssignment[i]);\n }\n } else {\n buttonTodayAssignment = new JButton[MAXVISIBLETODAYASSIGNMENT];\n for (i = 0; i < MAXVISIBLETODAYASSIGNMENT; i++) {\n buttonTodayAssignment[i] = new JButton(\"String_Node_Str\");\n buttonTodayAssignment[i].setBackground(new Color(179, 237, 255));\n buttonTodayAssignment[i].setOpaque(true);\n buttonTodayAssignment[i].setBorderPainted(false);\n buttonTodayAssignment[i].setDisplayedMnemonicIndex(i);\n panelToday.add(buttonTodayAssignment[i]);\n }\n }\n if ((nTodayAssignments > 0) && (nTodayAssignments <= MAXVISIBLETODAYASSIGNMENT)) {\n labelEmptyTodayAssignments = new JLabel[MAXVISIBLETODAYASSIGNMENT - nTodayAssignments + 1];\n for (i = 0; i < MAXVISIBLETODAYASSIGNMENT - nTodayAssignments + 1; i++) {\n labelEmptyTodayAssignments[i] = new JLabel();\n panelToday.add(labelEmptyTodayAssignments[i]);\n nShownTodayAssignments = nTodayAssignments;\n }\n } else if (nTodayAssignments > MAXVISIBLETODAYASSIGNMENT) {\n panelToday.add(buttonShowMoreTodayAssignments);\n nShownTodayAssignments = MAXVISIBLETODAYASSIGNMENT;\n } else {\n labelEmptyTodayAssignments = new JLabel[1];\n labelEmptyTodayAssignments[0] = new JLabel(\"String_Node_Str\", SwingConstants.CENTER);\n panelToday.add(labelEmptyTodayAssignments[0]);\n nShownTodayAssignments = 0;\n }\n loadTheFirstFiveAssignments(nTodayAssignments);\n add(panelToday, BorderLayout.EAST);\n ActionListener cal = new ActionListener() {\n public void actionPerformed(ActionEvent cae) {\n if ((!(cae.getActionCommand().equals(\"String_Node_Str\"))) && ((calendarState.equals(CalendarState.NORMAL)) || (calendarState.equals(CalendarState.REMOVING)))) {\n JButton pressedButton = (JButton) cae.getSource();\n GUIDailyAssignments guiDailyAssignments = new GUIDailyAssignments(calendarState, customer);\n guiDailyAssignments.setVisible(true);\n }\n if ((!(cae.getActionCommand().equals(\"String_Node_Str\"))) && (calendarState.equals(CalendarState.ADDING))) {\n JButton pressedButton = (JButton) cae.getSource();\n GUINewAssignment guiNewAssignment = new GUINewAssignment();\n guiNewAssignment.setVisible(true);\n }\n }\n };\n ActionListener ctrlCal = new ActionListener() {\n public void actionPerformed(ActionEvent ctrlAe) {\n if (ctrlAe.getActionCommand().equals(\"String_Node_Str\")) {\n try {\n goBackMonthCalendar();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n if (ctrlAe.getActionCommand().equals(\"String_Node_Str\")) {\n try {\n goForwardMonthCalendar();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n if (ctrlAe.getActionCommand().equals(\"String_Node_Str\")) {\n try {\n goBackYearCalendar();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n if (ctrlAe.getActionCommand().equals(\"String_Node_Str\")) {\n try {\n goForwardYearCalendar();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n if (ctrlAe.getActionCommand().equals(\"String_Node_Str\")) {\n GUIDailyAssignments guiDailyAssignments = new GUIDailyAssignments(calendarState, customer);\n guiDailyAssignments.setVisible(true);\n }\n }\n };\n ActionListener menuAl = new ActionListener() {\n public void actionPerformed(ActionEvent menuAe) {\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n System.exit(0);\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n GUILogin guiLogin = new GUILogin();\n guiLogin.setVisible(true);\n setVisible(false);\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n openListAssignment();\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n calendarState = CalendarState.REVIEWING;\n openListAssignment();\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n calendarState = CalendarState.DELETING_REVIEW;\n openListAssignment();\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n calendarState = CalendarState.SHOW_REVIEWS;\n openListAssignment();\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n try {\n enableDisableDateButtonAssignment();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n newAssignment();\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n try {\n enableDisableDateButtonAssignment();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n removeAssignment();\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n GUISettings guiSettings = new GUISettings(customer);\n guiSettings.setVisible(true);\n }\n if (menuAe.getActionCommand().equals(\"String_Node_Str\")) {\n cancel();\n }\n }\n };\n ActionListener todayAssignmentsAl = new ActionListener() {\n public void actionPerformed(ActionEvent todayAssignmentAe) {\n if (!(todayAssignmentAe.getActionCommand().equals(\"String_Node_Str\"))) {\n JButton pressedButton = (JButton) todayAssignmentAe.getSource();\n StringTokenizer cmdToken = new StringTokenizer(buttonTodayAssignment[0].getText(), \"String_Node_Str\");\n String cmd = cmdToken.nextToken();\n if (cmd.equals(\"String_Node_Str\")) {\n GUIAssignmentInformationCustomer guiAssignment = new GUIAssignmentInformationCustomer();\n guiAssignment.setVisible(true);\n }\n }\n }\n };\n startCalendar(cal, ctrlCal);\n menuItemExit.addActionListener(menuAl);\n menuItemLogout.addActionListener(menuAl);\n menuItemAddAssignment.addActionListener(menuAl);\n menuItemCancel.addActionListener(menuAl);\n menuItemRemoveAssignment.addActionListener(menuAl);\n menuItemShowAssignments.addActionListener(menuAl);\n menuItemAddReview.addActionListener(menuAl);\n menuItemRemoveReview.addActionListener(menuAl);\n menuItemShowReviews.addActionListener(menuAl);\n menuItemAccount.addActionListener(menuAl);\n buttonShowMoreTodayAssignments.addActionListener(ctrlCal);\n for (i = 0; i < nShownTodayAssignments; i++) {\n buttonTodayAssignment[i].addActionListener(todayAssignmentsAl);\n }\n}\n"
|
"private void doInvoke(InterpretContext ctx, TagInvoker invoker, Object[] arguments) throws InterpretException {\n boolean useLatest = (invoker != null);\n if (invoker == null) {\n Class<?>[] argumentTypes = ParameterUtils.getParameterTypes(arguments);\n invoker = ctx.getGlobalResolver().resolveTag(name, argumentTypes);\n if (invoker == null) {\n String signature = SignatureUtils.getFunctionSignature(name, argumentTypes);\n throw new InterpretException(Errors.TAG_NOT_FOUND, signature).set(position);\n }\n this.last = invoker;\n }\n try {\n invoker.invoke(tagContext, arguments);\n } catch (RuntimeException e) {\n if (useLatest && Errors.isReflectIllegalArgument(e)) {\n doInvoke(ctx, null, arguments);\n }\n throw new InterpretException(e).set(position);\n }\n}\n"
|
"public Void run() {\n try {\n deleteDatasetInstance(NamespaceId.SYSTEM.dataset(\"String_Node_Str\"));\n Assert.fail();\n } catch (UnauthorizedException e) {\n } catch (Exception e) {\n Assert.fail(\"String_Node_Str\");\n }\n return null;\n}\n"
|
"public ServiceCommand promptForValues() {\n CommandOptions options = serviceCommand.getOptions();\n if (options != null) {\n List<String> variables = ServiceCommand.getOptionVariables(serviceCommand, options.getOptions());\n boolean shouldPromptForNonTunnel = false;\n if (variables != null && !variables.isEmpty()) {\n Map<String, String> variableToValue = new HashMap<String, String>();\n for (String variable : variables) {\n String value = null;\n if (variable != null) {\n TunnelOptions tunnelOption = getTunnelOption(variable);\n if (tunnelOption != null) {\n switch(tunnelOption) {\n case username:\n value = descriptor.getUserName();\n break;\n case Password:\n value = descriptor.getPassword();\n break;\n case Url:\n value = descriptor.getURL();\n break;\n case Databasename:\n value = descriptor.getDatabaseName();\n break;\n case Port:\n value = descriptor.tunnelPort() + \"String_Node_Str\";\n break;\n }\n } else {\n shouldPromptForNonTunnel = true;\n }\n }\n variableToValue.put(variable, value);\n }\n if (shouldPromptForNonTunnel) {\n variableToValue = promptForUnsetValues(variableToValue);\n if (variableToValue == null) {\n return null;\n }\n }\n ServiceCommand.setOptionVariableValues(serviceCommand, variableToValue);\n }\n }\n return serviceCommand;\n}\n"
|
"private static TemplateModelException newInvocationTemplateModelException(Object parentObject, Object member, boolean isStatic, boolean isConstructor, Throwable e) {\n while (e instanceof InvocationTargetException) {\n Throwable cause = ((InvocationTargetException) e).getTargetException();\n if (cause != null) {\n e = cause;\n } else {\n break;\n }\n }\n return new _TemplateModelException(e, new Object[] { invocationErrorMessageStart(member, isConstructor), \"String_Node_Str\", isStatic || isConstructor ? (Object) \"String_Node_Str\" : new Object[] { \"String_Node_Str\", parentObject.getClass(), \"String_Node_Str\", new _DelayedJQuote(parentObject) }, \"String_Node_Str\" });\n}\n"
|
"public void projectClosed(Project project) {\n closeLocalCommitListener(project);\n}\n"
|
"public void initFromPipe(Class<? extends Pipe> pipeClass) {\n capacity = 25 * Math.min(1000, BuildCraftTransport.pipeFluidsBaseFlowRate);\n flowRate = fluidCapacities.get(pipeClass);\n travelDelay = MathUtils.clamp(Math.round(16F / (flowRate / BuildCraftTransport.pipeFluidsBaseFlowRate)), 1, MAX_TRAVEL_DELAY);\n}\n"
|
"public static boolean removeAroundPoint(Player player, String ability, Location loc, double radius) {\n boolean removed = false;\n for (int i = 0; i < instances.size(); i++) {\n FireCombo combo = instances.get(i);\n if (combo.getPlayer().equals(player))\n continue;\n if (ability.equalsIgnoreCase(\"String_Node_Str\") && combo.ability.equalsIgnoreCase(\"String_Node_Str\")) {\n for (FireComboStream fs : combo.tasks) {\n if (fs.getLocation() != null && fs.getLocation().getWorld() == loc.getWorld() && Math.abs(fs.getLocation().distance(loc)) <= radius) {\n fs.remove();\n removed = true;\n }\n }\n } else if (ability.equalsIgnoreCase(\"String_Node_Str\") && combo.ability.equalsIgnoreCase(\"String_Node_Str\")) {\n for (FireComboStream fs : combo.tasks) {\n if (fs.getLocation() != null && fs.getLocation().getWorld().equals(loc.getWorld())) {\n if (Math.abs(fs.getLocation().distance(loc)) <= radius) {\n fs.remove();\n removed = true;\n }\n }\n }\n } else if (ability.equalsIgnoreCase(\"String_Node_Str\") && combo.ability.equalsIgnoreCase(\"String_Node_Str\")) {\n if (combo.currentLoc != null && Math.abs(combo.currentLoc.distance(loc)) <= radius) {\n instances.remove(combo);\n removed = true;\n }\n }\n }\n return removed;\n}\n"
|
"public void receivedByte(byte data) {\n log(\"String_Node_Str\" + Utils.hex8(data) + \"String_Node_Str\" + stateMachine + \"String_Node_Str\" + zeroSymbols + ((stateMachine == RadioState.RX_SFD_SEARCH || stateMachine == RadioState.RX_FRAME) ? \"String_Node_Str\" : \"String_Node_Str\"));\n if (stateMachine == RadioState.RX_SFD_SEARCH) {\n if (data == 0) {\n if (zeroSymbols < 4)\n zeroSymbols++;\n return;\n } else if (zeroSymbols == 4 && data == 0x7A) {\n setSFD(true);\n if (DEBUG)\n log(\"String_Node_Str\");\n rxread = 0;\n setState(RadioState.RX_FRAME);\n } else {\n zeroSymbols = 0;\n }\n } else if (stateMachine == RadioState.RX_FRAME) {\n if (rxfifoLen == 128) {\n setRxOverflow();\n } else {\n memory[RAM_RXFIFO + rxfifoWritePos++] = data & 0xFF;\n rxfifoLen++;\n if (rxfifoWritePos == 128) {\n if (DEBUG)\n log(\"String_Node_Str\");\n rxfifoWritePos = 0;\n }\n if (rxread == 0) {\n rxlen = data & 0xff;\n if (DEBUG)\n log(\"String_Node_Str\" + rxlen);\n setFIFO(true);\n }\n if (rxread++ == rxlen) {\n memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 2) & 127)] = (registers[REG_RSSI]) & 0xff;\n memory[RAM_RXFIFO + ((rxfifoWritePos + 128 - 1) & 127)] = 37 | 0x80;\n setFIFOP(true);\n setSFD(false);\n lastPacketStart = (rxfifoWritePos + 128 - rxlen) & 127;\n if (DEBUG)\n log(\"String_Node_Str\" + lastPacketStart);\n setState(RadioState.RX_WAIT);\n }\n }\n } else if (DEBUG) {\n log(\"String_Node_Str\" + stateMachine);\n }\n}\n"
|
"public static BufferedImage getRotatedResizedImage(BufferedImage image, int width, int height, double angle) {\n int imageWidth = image.getWidth();\n int imageHeight = image.getHeight();\n if (angle == 0.0 && (width < 0 || imageWidth == width) && (height < 0 || imageHeight == height)) {\n return image;\n int resWidth;\n int resHeight;\n if (width < 0 && height < 0) {\n resWidth = imageWidth;\n resHeight = imageHeight;\n } else if ((height < 0) || (width >= 0 && imageHeight * width <= imageWidth * height)) {\n resWidth = width;\n resHeight = imageHeight * width / imageWidth;\n } else {\n resWidth = imageWidth * height / imageHeight;\n resHeight = height;\n }\n if (angle == 0.0 && imageWidth == resWidth && imageHeight == resHeight)\n return image;\n return IMAGE_CACHE.get(new Key(resWidth, resHeight, angle)).get(image);\n}\n"
|
"public InputStream getInputStream() throws IOException {\n return new ByteBufInputStream(fileUpload.getByteBuf(), true);\n}\n"
|
"public String transform(TextNode node, String original) {\n StringBuilder build = new StringBuilder();\n char[] ca = original.toCharArray();\n for (int i = 0; i < ca.length; i++) {\n switch(ca[i]) {\n case '&':\n build.append(\"String_Node_Str\");\n offsets.add(node.begin + i, 4);\n break;\n case '<':\n build.append(\"String_Node_Str\");\n offsets.add(node.begin + i, 3);\n break;\n case '>':\n build.append(\"String_Node_Str\");\n offsets.add(node.begin + i, 3);\n break;\n case '\"':\n build.append(\"String_Node_Str\");\n offsets.add(node.begin + i, 5);\n break;\n case '\\n':\n case '\\r':\n if (i + 1 < ca.length && ((ca[i] == '\\n' && ca[i + 1] == '\\r') || (ca[i] == '\\r' && ca[i + 1] == '\\n'))) {\n offsets.add(node.begin + i, 3);\n i++;\n } else {\n offsets.add(node.begin + i, 4);\n }\n build.append(\"String_Node_Str\");\n break;\n default:\n build.append(ca[i]);\n }\n }\n return build.toString();\n}\n"
|
"protected void doRun() {\n if (repositoryNode == null) {\n repositoryNode = getCurrentRepositoryNode();\n }\n HDFSConnection connection = null;\n MetadataTable metadataTable = null;\n boolean creation = false;\n if (repositoryNode.getType() == ENodeType.REPOSITORY_ELEMENT) {\n ERepositoryObjectType nodeType = (ERepositoryObjectType) repositoryNode.getProperties(EProperties.CONTENT_TYPE);\n String metadataTableLabel = (String) repositoryNode.getProperties(EProperties.LABEL);\n HDFSConnectionItem item = null;\n if (nodeType == ERepositoryObjectType.METADATA_CON_TABLE) {\n item = (HDFSConnectionItem) repositoryNode.getObject().getProperty().getItem();\n connection = (HDFSConnection) item.getConnection();\n metadataTable = TableHelper.findByLabel(connection, metadataTableLabel);\n creation = false;\n } else if (nodeType == HDFSRepositoryNodeType.HDFS) {\n item = (HDFSConnectionItem) repositoryNode.getObject().getProperty().getItem();\n connection = (HDFSConnection) item.getConnection();\n creation = true;\n } else {\n return;\n }\n boolean isOK = true;\n if (creation) {\n isOK = checkHDFSConnection((HDFSConnection) item.getConnection());\n }\n if (isOK) {\n openHDFSSchemaWizard(item, metadataTable, false, creation);\n }\n }\n}\n"
|
"public boolean isLoaded(Object entity) {\n if (Boolean.TRUE.equals(EntityManagerFactoryImpl.isLoaded(entity, session))) {\n return true;\n }\n return false;\n}\n"
|
"public String getDurationAllowedFormatted() {\n long allowedTime = mAllowedDuration;\n long days = TimeUnit.MILLISECONDS.toDays(allowedTime);\n allowedTime -= TimeUnit.DAYS.toMillis(days);\n long hours = TimeUnit.MILLISECONDS.toHours(allowedTime);\n allowedTime -= TimeUnit.HOURS.toMillis(hours);\n long minutes = TimeUnit.MILLISECONDS.toMinutes(allowedTime);\n allowedTime -= TimeUnit.MINUTES.toMillis(minutes);\n long seconds = TimeUnit.MILLISECONDS.toSeconds(allowedTime);\n StringBuilder sb = new StringBuilder(64);\n sb.append(days);\n sb.append(\"String_Node_Str\");\n sb.append(hours);\n sb.append(\"String_Node_Str\");\n sb.append(minutes);\n sb.append(\"String_Node_Str\");\n sb.append(seconds);\n sb.append(\"String_Node_Str\");\n return (sb.toString());\n}\n"
|
"private void resolveParameters() {\n if (!this.genericsResolved) {\n this.resolveGenerics();\n }\n this.parametersResolved = true;\n for (int i = 0; i < this.parameterCount; i++) {\n this.parameters[i].resolveTypes(null, this);\n }\n}\n"
|
"public static boolean openApp(String appName, String packageName) throws UiObjectNotFoundException {\n UiDevice device = UiDevice.getInstance();\n try {\n device.wakeUp();\n } catch (RemoteException e1) {\n e1.printStackTrace();\n }\n device.pressHome();\n device.pressHome();\n device.pressHome();\n UiObject okDismissHelpOverlayButton = new UiObject(new UiSelector().text(\"String_Node_Str\"));\n if (okDismissHelpOverlayButton.exists()) {\n okDismissHelpOverlayButton.click();\n }\n UiObject allAppsButton = new UiObject(new UiSelector().description(\"String_Node_Str\"));\n allAppsButton.clickAndWaitForNewWindow();\n UiObject appsTab = new UiObject(new UiSelector().text(\"String_Node_Str\"));\n appsTab.click();\n okDismissHelpOverlayButton = new UiObject(new UiSelector().text(\"String_Node_Str\"));\n if (okDismissHelpOverlayButton.exists()) {\n okDismissHelpOverlayButton.click();\n }\n UiScrollable appViews = new UiScrollable(new UiSelector().scrollable(true));\n appViews.setAsHorizontalList();\n UiObject settingsApp = appViews.getChildByText(new UiSelector().className(android.widget.TextView.class.getName()), appName);\n settingsApp.clickAndWaitForNewWindow();\n UiObject pushSampleValidation = new UiObject(new UiSelector().packageName(packageName));\n return pushSampleValidation.exists();\n}\n"
|
"public void afterCreateControl() {\n resetProjectOperationSelectionWithBusyCursor(false);\n alwaysAsk.setSelection(LoginHelper.isAlwaysAskAtStartup());\n previousButton.setVisible(false);\n}\n"
|
"public LabelledItem next() {\n index++;\n return new LabelledItem(trainingSet[_class][index - 1], _class);\n}\n"
|
"public void onResume() {\n super.onResume();\n if (isFriendsListLoaded && !isNeedToHideSearchView) {\n checkVisibilityEmptyLabel();\n }\n}\n"
|
"public SpanCustomizer currentSpanCustomizer() {\n TraceContext currentContext = currentTraceContext.get();\n return currentContext != null && Boolean.TRUE.equals(currentContext.sampled()) ? RealSpanCustomizer.create(currentContext, recorder) : NoopSpanCustomizer.INSTANCE;\n}\n"
|
"public void resolveLayoutDirection(int layoutDirection) {\n setLayoutDirection(layoutDirection);\n if (!isMarginRelative() || (mMarginFlags & NEED_RESOLUTION_MASK) != NEED_RESOLUTION_MASK)\n return;\n doResolveMargins();\n}\n"
|
"public static String getNewName() {\n int size = 5;\n int tries = 0;\n int index = Rand.getInt(stringChars.length);\n int length = stringChars[index].length;\n String result;\n char[] cNewName = new char[size];\n do {\n if (tries == size) {\n cNewName = new char[++size];\n tries = 0;\n }\n do {\n cNewName[0] = stringChars[index][Rand.getInt(length)];\n } while (!Character.isJavaIdentifierStart(cNewName[0]));\n for (int i = 1; i < cNewName.length; i++) {\n int rand = Rand.getInt(length);\n cNewName[i] = stringChars[index][rand];\n }\n result = String.copyValueOf(cNewName);\n tries++;\n } while (oldToNewMethodNames.containsValue(result) || BodyBuilder.nameList.contains(result));\n BodyBuilder.nameList.add(result);\n return result;\n}\n"
|
"public PlanItem getBestPlanItem(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder) {\n PlanItem item = new PlanItem();\n item.setIndex(getScanIndex(session));\n item.cost = item.getIndex().getCost(session, null, filters, filter, null);\n Trace t = session.getTrace();\n if (t.isDebugEnabled()) {\n t.debug(\"String_Node_Str\", item.cost, item.getIndex().getPlanSQL());\n }\n ArrayList<Index> indexes = getIndexes();\n if (indexes != null && masks != null) {\n for (int i = 1, size = indexes.size(); i < size; i++) {\n Index index = indexes.get(i);\n double cost = index.getCost(session, masks, filters, filter, sortOrder);\n session.getTrace().debug(\"String_Node_Str\", cost, index.getPlanSQL());\n if (cost < item.cost) {\n item.cost = cost;\n item.setIndex(index);\n }\n }\n }\n return item;\n}\n"
|
"public List<ProductInfo> findProductsByCategory(String categoryId) {\n Connection con = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n List<ProductInfo> vos = null;\n String sqlStr = isPostgre() ? \"String_Node_Str\" + \"String_Node_Str\" : \"String_Node_Str\" + \"String_Node_Str\";\n try {\n con = getConnection();\n ps = con.prepareStatement(sqlStr);\n ps.setString(1, categoryId);\n rs = ps.executeQuery();\n vos = transformSet(rs);\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n try {\n if (ps != null) {\n ps.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (SQLException sqlee) {\n sqlee.printStackTrace();\n }\n }\n return vos;\n}\n"
|
"private void axs(final int addr) {\n X = ((A & X) - ram.read(addr)) & 0xff;\n setflags(X);\n carryFlag = (X >= 0);\n}\n"
|
"public Class<?> getWSObjectClass() {\n return WSDataModel.class;\n}\n"
|
"public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) {\n if (!xmlField.getLastXPathFragment().nameIsText()) {\n return;\n }\n Object value = unmarshalRecord.getStringBuffer().toString();\n unmarshalRecord.resetStringBuffer();\n XMLConversionManager xmlConversionManager = (XMLConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();\n if (unmarshalRecord.getTypeQName() != null) {\n Class typeClass = xmlField.getJavaClass(unmarshalRecord.getTypeQName());\n value = xmlConversionManager.convertObject(value, typeClass, unmarshalRecord.getTypeQName());\n } else {\n value = xmlField.convertValueBasedOnSchemaType(value, xmlConversionManager, unmarshalRecord);\n }\n xmlObjectReferenceMapping.buildReference(unmarshalRecord, xmlField, value, unmarshalRecord.getSession());\n}\n"
|
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.list_view_with_spinner, null);\n mListView = (ListView) view.findViewById(R.id.list);\n mListView.setFastScrollAlwaysVisible(true);\n mProgressBar = (ProgressBar) view.findViewById(R.id.progress);\n mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n String teamKey = ((TeamCursorAdapter) adapterView.getAdapter()).getKey(position);\n Intent i = new Intent(getActivity(), ViewTeamActivity.class);\n i.putExtra(ViewTeamActivity.TEAM_KEY, teamKey);\n startActivity(i);\n }\n });\n return view;\n}\n"
|
"private AbstractFilterHandleProvider getFilterProviderDelegate() {\n AbstractFilterHandleProvider provider = ChartFilterProviderDelegate.createFilterProvider(input, null);\n return provider;\n}\n"
|
"public Personalization getPersonalization() {\n if (persoCache == null) {\n persoCache = new Profile06();\n }\n return persoCache;\n}\n"
|
"public void EstablishSpectre(CarriagePackage Package) {\n int CarriageX = Package.AnchorRecord.X;\n int CarriageY = Package.AnchorRecord.Y;\n int CarriageZ = Package.AnchorRecord.Z;\n WorldUtil.SetBlock(worldObj, CarriageX, CarriageY, CarriageZ, RIMBlocks.Spectre, BlockSpectre.Types.Rotative.ordinal());\n TileEntityRotativeSpectre theEntity = new TileEntityRotativeSpectre();\n theEntity.setAxis(pointedDir.ordinal());\n worldObj.setTileEntity(CarriageX, CarriageY, CarriageZ, theEntity);\n theEntity.Absorb(Package);\n worldObj.markBlockForUpdate(CarriageX, CarriageY, CarriageZ);\n worldObj.func_147451_t(CarriageX, CarriageY, CarriageZ);\n}\n"
|
"public void formatTo(Formatter formatter, int flags, int width, int precision) {\n final StringSymbol name = getName();\n if (\"String_Node_Str\".equals(name.getValue()) || \"String_Node_Str\".equals(name.getValue())) {\n formatter.format(\"String_Node_Str\", name.getValue());\n } else {\n formatter.format(\"String_Node_Str\", name);\n }\n for (RhsValue v : arguments) {\n formatter.format(\"String_Node_Str\", v);\n }\n formatter.format(\"String_Node_Str\");\n}\n"
|
"protected Integer doInBackground(Void... params) {\n try {\n HttpJsonRequest.createNewInstance(getActivity()).setCredentials(username, password, oc_root_path);\n String _version = OwnCloudReaderMethods.GetVersionNumber(getActivity(), oc_root_path);\n if (_version != null) {\n _version = _version.replace(\"String_Node_Str\", \"String_Node_Str\");\n return Integer.parseInt(_version);\n }\n } catch (Exception e) {\n if (e.getLocalizedMessage() != null)\n exception_message = e.getLocalizedMessage();\n else if (e instanceof NullPointerException)\n exception_message = getString(R.string.login_dialog_text_something_went_wrong);\n return -1;\n }\n return 0;\n}\n"
|
"public void init() {\n if (!(this instanceof RecordsManagementAction)) {\n super.init();\n }\n if (auditable) {\n getAuditService().registerAuditEvent(this.getActionDefinition().getName(), this.getActionDefinition().getTitle());\n }\n}\n"
|
"public QueryResult query(final Query query, final TimeUnit timeUnit) {\n return execute(this.influxDBService.query(this.username, this.password, query.getDatabase(), TimeUtil.toTimePrecision(timeUnit), query.getCommandWithUrlEncoded()));\n}\n"
|
"public String registerAgent(String toolName, String agentVersion, String osversion, String configDetails) throws InsightsCustomException {\n try {\n String agentId = getAgentkey(toolName);\n Gson gson = new Gson();\n JsonElement jelement = gson.fromJson(configDetails.trim(), JsonElement.class);\n JsonObject json = jelement.getAsJsonObject();\n json.addProperty(\"String_Node_Str\", agentId);\n json.addProperty(\"String_Node_Str\", osversion);\n json.addProperty(\"String_Node_Str\", agentVersion);\n json.get(\"String_Node_Str\").getAsJsonObject().addProperty(\"String_Node_Str\", agentId);\n boolean isDataUpdateSupported = false;\n if (json.get(\"String_Node_Str\") != null && !json.get(\"String_Node_Str\").isJsonNull()) {\n isDataUpdateSupported = json.get(\"String_Node_Str\").getAsBoolean();\n }\n String uniqueKey = agentId;\n Date updateDate = Timestamp.valueOf(LocalDateTime.now());\n AgentConfigDAL agentConfigDAL = new AgentConfigDAL();\n agentConfigDAL.saveAgentConfigFromUI(agentId, json.get(\"String_Node_Str\").getAsString(), toolName, json, isDataUpdateSupported, uniqueKey, agentVersion, osversion, updateDate);\n Path agentZipPath = updateAgentConfig(toolName, agentId, json);\n byte[] data = Files.readAllBytes(agentZipPath);\n String fileName = toolName + FILETYPE;\n sendAgentPackage(data, fileName, agentId, toolName, osversion);\n performAgentAction(agentId, AGENTSTATUS.START.name());\n } catch (Exception e) {\n LOG.error(\"String_Node_Str\" + toolName, e);\n throw new InsightsCustomException(e.toString());\n }\n return \"String_Node_Str\";\n}\n"
|
"public void createRefund(ActionRequest request, ActionResponse response) {\n Invoice invoice = request.getContext().asType(Invoice.class);\n InvoiceService is = Beans.get(InvoiceService.class);\n try {\n invoice = is.find(invoice.getId());\n Invoice refund = is.createRefund(invoice);\n response.setReload(true);\n response.setFlash(I18n.get(IExceptionMessage.INVOICE_2));\n response.setView(ActionView.define(String.format(I18n.get(IExceptionMessage.INVOICE_4), invoice.getInvoiceId())).add(\"String_Node_Str\", \"String_Node_Str\").add(\"String_Node_Str\", \"String_Node_Str\").context(\"String_Node_Str\", refund.getId().toString()).domain(\"String_Node_Str\" + invoice.getId()).map());\n } catch (Exception e) {\n TraceBackService.trace(response, e);\n }\n}\n"
|
"protected Object getFromScope(String name) {\n final BSHInterpreter ip = getInterpreter(_scope);\n final Scope curr = ip != null ? ip.getCurrent() : null;\n if (curr == null)\n return getImplicit(name);\n if (_firstGet) {\n _firstGet = false;\n final Execution exec = Executions.getCurrent();\n if (exec != null && exec != curr) {\n Object val = exec instanceof ExecutionCtrl ? ((ExecutionCtrl) exec).getExtraXelVariable(name) : null;\n if (val != null)\n return val;\n val = exec.getAttribute(name);\n if (val != null)\n return val;\n }\n if (curr != _scope && curr instanceof Component) {\n for (Component c = (Component) curr; c != null && c != _scope; c = c.getParent()) {\n if (c.getParent() instanceof ComponentCtrl && !((ComponentCtrl) c.getParent()).getShadowRoots().isEmpty()) {\n Object o = c.getShadowVariable(name, true);\n if (o != null)\n return o;\n } else {\n Object o = c.getShadowVariable(name, false);\n if (o != null)\n return o;\n }\n }\n }\n }\n Component comp = (Component) _scope;\n Object val = comp.getAttributeOrFellow(name, false);\n return val != null || comp.hasAttributeOrFellow(name, false) ? val : getImplicit(name);\n}\n"
|
"public void run() throws Exception {\n synchronized (viewUpdateListeners) {\n for (ViewUpdateListenerContainer cont : viewUpdateListeners.values()) cont.notifyListenersLogout();\n }\n}\n"
|
"private boolean checkPlayServices() {\n final int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n try {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this, PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } catch (Exception e) {\n Utils.log(e);\n return false;\n }\n } else {\n Utils.log(\"String_Node_Str\");\n finish();\n }\n return false;\n }\n return true;\n}\n"
|
"private void createRefreshButton(Composite currentSectionClient) {\n Composite buttonsComposite = new Composite(currentSectionClient, SWT.NONE);\n buttonsComposite.setLayout(new GridLayout(10, true));\n GridData labelGd = new GridData();\n labelGd.horizontalAlignment = SWT.LEFT;\n labelGd.widthHint = 30;\n createAddAndRemoveButton(commonButtonsComposite, labelGd);\n createMoveButton(commonButtonsComposite, labelGd);\n Composite refreshButtonComposite = new Composite(buttonsComposite, SWT.NONE);\n refreshButtonComposite.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));\n refreshButtonComposite.setLayout(new GridLayout(1, true));\n labelGd = new GridData();\n labelGd.horizontalAlignment = SWT.CENTER;\n labelGd.horizontalSpan = 5;\n String buttonText = DefaultMessagesImpl.getString(\"String_Node_Str\");\n labelGd.widthHint = buttonText.length() * 10;\n final Button refresh = new Button(buttonsComposite, SWT.NONE);\n refresh.setToolTipText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n refresh.setText(buttonText);\n refresh.setLayoutData(labelGd);\n refresh.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n new RefreshChartAction(AbstractMatchAnaysisTableSection.this).run();\n }\n });\n}\n"
|
"public void onBlockIgnite(BlockIgniteEvent event) {\n if (j2.safemode && !(event.getCause().equals(IgniteCause.FLINT_AND_STEEL))) {\n event.setCancelled(true);\n }\n}\n"
|
"public static String streamToString(InputStream in) throws IOException {\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n String line;\n try {\n br = new BufferedReader(new InputStreamReader(in, UTF_8));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } finally {\n if (br != null) {\n br.close();\n }\n }\n return sb.toString();\n}\n"
|
"public boolean isCellEditable(int rowIndex, int columnIndex) {\n return !this.getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).isReadonly();\n}\n"
|
"public Set<UIComponent> getDefaultUIComponentToUpdateByAjax(WebuiRequestContext context) {\n Set<UIComponent> list = new LinkedHashSet<UIComponent>(3);\n list.add(context.getUIApplication());\n return list;\n}\n"
|
"public void doJoin(AtomicBoolean joined) {\n int tryCount = 0;\n long joinStartTime = Clock.currentTimeMillis();\n long maxJoinMillis = node.getGroupProperties().MAX_JOIN_SECONDS.getInteger() * 1000;\n while (node.isActive() && !joined.get() && (Clock.currentTimeMillis() - joinStartTime < maxJoinMillis)) {\n String msg = \"String_Node_Str\" + node.getMasterAddress();\n logger.log(Level.FINEST, msg);\n systemLogService.logJoin(msg);\n Address masterAddressNow = findMasterWithMulticast();\n node.setMasterAddress(masterAddressNow);\n systemLogService.logJoin(\"String_Node_Str\" + masterAddressNow);\n if (node.getMasterAddress() == null || node.address.equals(node.getMasterAddress())) {\n TcpIpConfig tcpIpConfig = config.getNetworkConfig().getJoin().getTcpIpConfig();\n if (tcpIpConfig != null && tcpIpConfig.isEnabled()) {\n doTCP(joined);\n } else {\n systemLogService.logJoin(\"String_Node_Str\");\n node.setAsMaster();\n }\n return;\n }\n if (++tryCount > 49) {\n failedJoiningToMaster(true, tryCount);\n }\n if (!node.getMasterAddress().equals(node.address)) {\n connectAndSendJoinRequest(node.getMasterAddress());\n } else {\n node.setMasterAddress(null);\n tryCount = 0;\n }\n try {\n Thread.sleep(500L);\n } catch (InterruptedException ignored) {\n }\n }\n}\n"
|
"public void addViewBundle(OTViewBundle viewBundle) {\n Vector viewEntries = viewBundle.getViewEntries().getVector();\n Iterator it = viewEntries.iterator();\n Vector tempViewMap = new Vector();\n while (it.hasNext()) {\n InternalViewEntry internalViewEntry = createInternalViewEntry((OTViewEntry) it.next());\n if (internalViewEntry == null) {\n continue;\n }\n tempViewMap.add(internalViewEntry);\n }\n viewMap.addAll(0, tempViewMap);\n if (viewBundle.getCurrentMode() != null) {\n setDefaultViewMode(viewBundle.getCurrentMode());\n }\n viewBundles.add(0, viewBundle);\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n if (isFullScreenSupported())\n ReaderFullScreenUtils.enableActionBarOverlay(this);\n super.onCreate(savedInstanceState);\n createMenuDrawer(R.layout.reader_activity_main);\n getSupportFragmentManager().addOnBackStackChangedListener(this);\n if (savedInstanceState == null) {\n final ReaderFragmentType fragmentType;\n if (getIntent().hasExtra(ARG_READER_FRAGMENT)) {\n fragmentType = (ReaderFragmentType) getIntent().getSerializableExtra(ARG_READER_FRAGMENT);\n } else {\n fragmentType = ReaderFragmentType.POST_LIST;\n }\n switch(fragmentType) {\n case POST_LIST:\n String tagName = getIntent().getStringExtra(ReaderActivity.ARG_TAG_NAME);\n if (TextUtils.isEmpty(tagName))\n tagName = UserPrefs.getReaderTag();\n if (TextUtils.isEmpty(tagName) || !ReaderTagTable.tagExists(tagName))\n tagName = ReaderTag.TAG_NAME_DEFAULT;\n showListFragment(tagName);\n break;\n case POST_DETAIL:\n long blogId = getIntent().getLongExtra(ReaderActivity.ARG_BLOG_ID, 0);\n long postId = getIntent().getLongExtra(ReaderActivity.ARG_POST_ID, 0);\n showDetailFragment(blogId, postId);\n break;\n }\n }\n}\n"
|
"protected void resolveRelation(Relation<E> aRelation, Model<E, P, C, Q> aModel) throws Exception {\n super.resolveRelation(aRelation, aModel);\n if (aRelation instanceof ReferenceRelation<?>) {\n if (aRelation.getLeftField() != null && !aRelation.getLeftField().isFk()) {\n aRelation.setLeftField(null);\n }\n if (aRelation.getRightField() != null && !aRelation.getRightField().isPk()) {\n aRelation.setRightField(null);\n }\n if (aRelation.getLeftField() != null && aRelation.getLeftField().isFk() && aRelation.getRightField() != null && aRelation.getRightField().isPk()) {\n String leftTableName = aRelation.getLeftField().getFk().getReferee().getTable();\n String leftFieldName = aRelation.getLeftField().getFk().getReferee().getField();\n String rightTableName = aRelation.getRightField().getTableName();\n String rightFieldName = aRelation.getRightField().getOriginalName();\n boolean tablesSame = (leftTableName == null ? rightTableName == null : leftTableName.equalsIgnoreCase(rightTableName));\n boolean fieldsSame = (leftFieldName == null ? rightFieldName == null : leftFieldName.equalsIgnoreCase(rightFieldName));\n if (!tablesSame || !fieldsSame) {\n aRelation.setLeftField(null);\n aRelation.setRightField(null);\n }\n }\n }\n}\n"
|
"private TreeSet<String> updatePanel() {\n double groupSocialPosition;\n int population, panelSize;\n population = this.getDataModel().getMemberList().size();\n groupSocialPosition = this.getDataModel().getEstimatedSocialLocation();\n panelSize = (int) Math.ceil(population * groupSocialPosition - 0.5);\n if (panelSize == 0) {\n panelSize = 1;\n }\n List<Tuple<String, Double>> panelCandidates = new LinkedList<Tuple<String, Double>>();\n List<String> groupMembers = getDataModel().getMemberList();\n for (String candidate : groupMembers) {\n double sum = 0;\n int numKnownTrustValues = 0;\n for (String member : groupMembers) {\n if ((getConn().getAgentById(member).getTrust(candidate) != null) && (!member.equals(candidate))) {\n sum += getConn().getAgentById(member).getTrust(candidate);\n numKnownTrustValues++;\n }\n }\n Tuple<String, Double> tuple;\n if (numKnownTrustValues != 0) {\n tuple = new Tuple<String, Double>(candidate, sum / numKnownTrustValues);\n panelCandidates.add(tuple);\n }\n }\n Collections.sort(panelCandidates, d);\n TreeSet<String> newPanel = new TreeSet<String>();\n if (!panelCandidates.isEmpty()) {\n for (int i = 0; i < panelSize; i++) {\n newPanel.add(panelCandidates.get(i).getKey());\n }\n } else {\n newPanel = this.panel;\n }\n return newPanel;\n}\n"
|
"public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {\n NBTTagCompound plateNBT = getPlateNBT(armor);\n if (plateNBT != null) {\n return UtilPlates.getPlate(plateNBT.getString(\"String_Node_Str\")).getDamageReductionAmount(armorType, DamageSource.GENERIC);\n }\n return ArmorMaterial.LEATHER.getDamageReductionAmount(armorType);\n}\n"
|
"protected void showLayoutTargetFeedback(Request request) {\n if (getHost().getChildren().size() == 0)\n return;\n boolean isCrossTabElement = false;\n if (request instanceof ChangeBoundsRequest) {\n List editParts = ((ChangeBoundsRequest) request).getEditParts();\n if (editParts.size() > 0) {\n isCrossTabElement = editParts.get(0) instanceof CrosstabCellEditPart;\n }\n }\n if (isCrossTabElement) {\n Object template = TemplateTransfer.getInstance().getTemplate();\n if (template instanceof Object[] && ((Object[]) template).length > 0) {\n Object dragObject = ((Object[]) template)[0];\n if (!(dragObject instanceof DimensionHandle || dragObject instanceof MeasureHandle)) {\n isCrossTabElement = false;\n }\n }\n }\n if (isCrossTabElement) {\n Transposer transposer = new Transposer();\n transposer.setEnabled(!isHorizontal());\n Rectangle r = transposer.t(getAbsoluteClientBounds((GraphicalEditPart) getHost()));\n Point p = transposer.t(getLocationFromRequest(request));\n boolean before = p.x <= r.x + (r.width / 2);\n Point p1 = new Point(before ? r.x : r.x + r.width, r.y - 2);\n p1 = transposer.t(p1);\n Point p2 = new Point(before ? r.x : r.x + r.width, r.y + r.height + 7);\n p2 = transposer.t(p2);\n setTargetFeedbackPoints(p1, p2);\n } else {\n super.showLayoutTargetFeedback(request);\n }\n}\n"
|
"private SymbolImpl variablize_symbol(SymbolImpl sym) {\n IdentifierImpl id = sym.asIdentifier();\n if (id == null)\n return sym;\n if (!this.variablize_this_chunk)\n return sym;\n if (id.tc_number == this.variablization_tc) {\n return id.variablization;\n }\n id.tc_number = this.variablization_tc;\n Variable var = context.variableGenerator.generate_new_variable(Character.toString(id.getNameLetter()));\n id.variablization = var;\n return var;\n}\n"
|
"public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent convertNutritionOrderEnteralFormulaAdministrationComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestEnteralFormulaAdministrationComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent tgt = new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent();\n copyElement(src, tgt);\n tgt.setSchedule(convertTiming(src.getSchedule()));\n tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));\n tgt.setRate(convertType(src.getRate()));\n return tgt;\n}\n"
|
"public void execute(AdminCommandContext adminCommandContext) {\n if (targetUtil.getConfig(target) == null) {\n adminCommandContext.getActionReport().setMessage(\"String_Node_Str\" + targetUtil);\n adminCommandContext.getActionReport().setActionExitCode(ActionReport.ExitCode.FAILURE);\n return;\n }\n OpenApiServiceConfiguration openApiConfig = targetUtil.getConfig(target).getExtensionByType(OpenApiServiceConfiguration.class);\n try {\n ConfigSupport.apply(configProxy -> {\n if (enabled != null) {\n configProxy.setEnabled(Boolean.toString(enabled));\n }\n return configProxy;\n }, openApiConfig);\n } catch (TransactionFailure ex) {\n adminCommandContext.getActionReport().failure(LOGGER, \"String_Node_Str\", ex);\n return;\n }\n}\n"
|
"public void loadSelectedPath() {\n List<PageNode> nodes = Util.getUIPortal().getSelectedPaths();\n List<LocalPath> paths = new ArrayList<LocalPath>();\n for (PageNode node : nodes) {\n if (node.getPageReference() == null) {\n paths.add(new LocalPath(null, node.getResolvedLabel()));\n } else {\n paths.add(new LocalPath(node.getUri(), node.getResolvedLabel()));\n }\n }\n UIBreadcumbs uiBreadCumbs = getChild(UIBreadcumbs.class);\n uiBreadCumbs.setPath(paths);\n}\n"
|
"public void update(UsageIPAddressVO usage) {\n TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);\n PreparedStatement pstmt = null;\n try {\n txn.start();\n if (usage.getReleased() != null) {\n try (PreparedStatement pstmt = txn.prepareStatement(UPDATE_RELEASED)) {\n if (pstmt != null) {\n pstmt.setString(1, DateUtil.getDateDisplayString(TimeZone.getTimeZone(\"String_Node_Str\"), usage.getReleased()));\n pstmt.setLong(2, usage.getAccountId());\n pstmt.setString(3, usage.getAddress());\n pstmt.executeUpdate();\n }\n } catch (SQLException e) {\n throw new CloudException(\"String_Node_Str\" + e.getMessage(), e);\n }\n }\n pstmt.executeUpdate();\n txn.commit();\n } catch (Exception e) {\n txn.rollback();\n s_logger.warn(\"String_Node_Str\", e);\n } finally {\n txn.close();\n }\n}\n"
|
"public String onMessageReceived(String data) {\n EventMessage eventMessage = XMLConverUtil.convertToObject(EventMessage.class, data);\n if (eventMessage.getEvent() != null && eventMessage.getEvent().equals(\"String_Node_Str\")) {\n return new XMLTextMessage(eventMessage.getFromUserName(), eventMessage.getToUserName(), \"String_Node_Str\").toXML();\n }\n if (eventMessage.getContent().contains(\"String_Node_Str\")) {\n return new XMLTextMessage(eventMessage.getFromUserName(), eventMessage.getToUserName(), \"String_Node_Str\").toXML();\n } else if (eventMessage.getContent().contains(\"String_Node_Str\")) {\n return new XMLTextMessage(eventMessage.getFromUserName(), eventMessage.getToUserName(), \"String_Node_Str\").toXML();\n }\n return new XMLTextMessage(eventMessage.getFromUserName(), eventMessage.getToUserName(), \"String_Node_Str\").toXML();\n}\n"
|
"public synchronized void releaseToken(ResourceToken token) {\n LOG.debug(EventType.TOKEN_RELEASED.name() + \"String_Node_Str\" + token.toString());\n this.pendingTokens.remove(token);\n this.submittedTokens.remove(token);\n this.redeemedTokens.remove(token);\n}\n"
|
"public void updateTime(int hourOfDay, int minutes) {\n this.mHourOfDay = hourOfDay;\n this.mMinutes = minutes;\n}\n"
|
"public ContextMap<CallString, Map<Location, ValueMapping>> transfer(InstructionHandle stmt, FlowEdge edge, ContextMap<CallString, Map<Location, ValueMapping>> input, Interpreter<CallString, Map<Location, ValueMapping>> interpreter, Map<InstructionHandle, ContextMap<CallString, Map<Location, ValueMapping>>> state) {\n Context context = new Context(input.getContext());\n Map<Location, ValueMapping> in = (Map<Location, ValueMapping>) input.get(context.callString);\n ContextMap<CallString, Map<Location, ValueMapping>> retval = new ContextMap<CallString, Map<Location, ValueMapping>>(context, new HashMap<CallString, Map<Location, ValueMapping>>());\n Instruction instruction = stmt.getInstruction();\n if (in == null) {\n context.stackPtr += instruction.produceStack(context.constPool) - instruction.consumeStack(context.constPool);\n return retval;\n }\n Map<Location, ValueMapping> result = new HashMap<Location, ValueMapping>();\n retval.put(context.callString, result);\n switch(instruction.getOpcode()) {\n case Constants.ICONST_M1:\n case Constants.ICONST_0:\n case Constants.ICONST_1:\n case Constants.ICONST_2:\n case Constants.ICONST_3:\n case Constants.ICONST_4:\n case Constants.ICONST_5:\n case Constants.BIPUSH:\n case Constants.SIPUSH:\n {\n ConstantPushInstruction instr = (ConstantPushInstruction) instruction;\n result = new HashMap<Location, ValueMapping>(in);\n retval.put(context.callString, result);\n int value = instr.getValue().intValue();\n result.put(new Location(context.stackPtr), new ValueMapping(value));\n }\n break;\n case Constants.ACONST_NULL:\n result = in;\n retval.put(context.callString, result);\n break;\n case Constants.LDC:\n case Constants.LDC_W:\n {\n LDC instr = (LDC) instruction;\n result = new HashMap<Location, ValueMapping>(in);\n retval.put(context.callString, result);\n Type type = instr.getType(context.constPool);\n if (type.equals(Type.INT)) {\n Integer value = (Integer) instr.getValue(context.constPool);\n result.put(new Location(context.stackPtr), new ValueMapping(value.intValue()));\n } else if (type.equals(Type.STRING)) {\n String value = (String) instr.getValue(context.constPool);\n String name = \"String_Node_Str\";\n name += \"String_Node_Str\" + context.method + \"String_Node_Str\" + stmt.getPosition();\n result.put(new Location(name + \"String_Node_Str\"), new ValueMapping(value.length()));\n }\n }\n break;\n case Constants.LDC2_W:\n result = in;\n retval.put(context.callString, result);\n break;\n case Constants.ISTORE_0:\n case Constants.ISTORE_1:\n case Constants.ISTORE_2:\n case Constants.ISTORE_3:\n case Constants.ISTORE:\n {\n StoreInstruction instr = (StoreInstruction) instruction;\n int index = instr.getIndex();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 1 && l.stackLoc != index) {\n result.put(l, in.get(l));\n }\n if (l.stackLoc == context.stackPtr - 1) {\n ValueMapping v = new ValueMapping(in.get(l), true);\n if (in.get(l).source == null || in.get(l).source.stackLoc != index) {\n v.defscope = ValueMapping.scope;\n }\n result.put(new Location(index), v);\n }\n }\n }\n break;\n case Constants.ASTORE_0:\n case Constants.ASTORE_1:\n case Constants.ASTORE_2:\n case Constants.ASTORE_3:\n case Constants.ASTORE:\n result = in;\n retval.put(context.callString, result);\n break;\n case Constants.LSTORE_0:\n case Constants.LSTORE_1:\n case Constants.LSTORE_2:\n case Constants.LSTORE_3:\n case Constants.LSTORE:\n filterSet(in, result, context.stackPtr - 2);\n break;\n case Constants.ILOAD_0:\n case Constants.ILOAD_1:\n case Constants.ILOAD_2:\n case Constants.ILOAD_3:\n case Constants.ILOAD:\n {\n LoadInstruction instr = (LoadInstruction) instruction;\n filterSet(in, result, context.stackPtr);\n int index = instr.getIndex();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == index) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.source = l;\n result.put(new Location(context.stackPtr), m);\n }\n }\n }\n break;\n case Constants.ALOAD_0:\n case Constants.ALOAD_1:\n case Constants.ALOAD_2:\n case Constants.ALOAD_3:\n case Constants.ALOAD:\n result = in;\n retval.put(context.callString, result);\n break;\n case Constants.ARRAYLENGTH:\n {\n filterSet(in, result, context.stackPtr - 1);\n DFAAppInfo p = interpreter.getProgram();\n Set<String> receivers = p.getReceivers(stmt, context.callString);\n Location location = new Location(context.stackPtr - 1);\n boolean valid = false;\n if (receivers == null) {\n System.out.println(\"String_Node_Str\" + context.callString.toStringList() + context.method + stmt);\n } else {\n for (Iterator<String> i = receivers.iterator(); i.hasNext(); ) {\n String arrayName = i.next();\n ValueMapping m = in.get(new Location(arrayName + \"String_Node_Str\"));\n if (m != null) {\n ValueMapping value = new ValueMapping(m, false);\n value.join(result.get(location));\n result.put(location, value);\n valid = true;\n }\n }\n }\n if (!valid) {\n result.put(new Location(context.stackPtr - 1), new ValueMapping());\n }\n }\n break;\n case Constants.PUTFIELD:\n {\n PUTFIELD instr = (PUTFIELD) instruction;\n int fieldSize = instr.getFieldType(context.constPool).getSize();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc >= 0 && l.stackLoc < context.stackPtr - 1 - fieldSize) {\n result.put(l, in.get(l));\n }\n }\n DFAAppInfo p = interpreter.getProgram();\n Set<String> receivers = p.getReceivers(stmt, context.callString);\n if (receivers == null) {\n System.out.println(\"String_Node_Str\" + context.callString.asList() + context.method + stmt);\n } else {\n for (Iterator<String> i = receivers.iterator(); i.hasNext(); ) {\n String fieldName = i.next();\n String f = fieldName.substring(fieldName.lastIndexOf(\"String_Node_Str\"), fieldName.length());\n String strippedName;\n if (fieldName.indexOf(\"String_Node_Str\") >= 0) {\n strippedName = fieldName.split(\"String_Node_Str\")[0] + f;\n } else {\n strippedName = fieldName;\n }\n if (p.containsField(strippedName)) {\n for (Iterator<Location> k = in.keySet().iterator(); k.hasNext(); ) {\n Location l = k.next();\n if (l.stackLoc < 0 && !receivers.contains(l.heapLoc)) {\n result.put(l, in.get(l));\n }\n if (l.stackLoc == context.stackPtr - 1) {\n result.put(new Location(fieldName), new ValueMapping(in.get(l), false));\n }\n }\n }\n }\n }\n }\n break;\n case Constants.GETFIELD:\n {\n GETFIELD instr = (GETFIELD) instruction;\n filterSet(in, result, context.stackPtr - 1);\n DFAAppInfo p = interpreter.getProgram();\n Set<String> receivers = p.getReceivers(stmt, context.callString);\n Location location = new Location(context.stackPtr - 1);\n boolean valid = false;\n if (receivers == null) {\n System.out.println(\"String_Node_Str\" + context.callString.asList() + context.method + stmt);\n } else {\n for (Iterator<String> i = receivers.iterator(); i.hasNext(); ) {\n String fieldName = i.next();\n String f = fieldName.substring(fieldName.lastIndexOf(\"String_Node_Str\"), fieldName.length());\n String strippedName;\n if (fieldName.indexOf(\"String_Node_Str\") >= 0) {\n strippedName = fieldName.split(\"String_Node_Str\")[0] + f;\n } else {\n strippedName = fieldName;\n }\n if (p.containsField(strippedName)) {\n for (Iterator<Location> k = in.keySet().iterator(); k.hasNext(); ) {\n Location l = k.next();\n if (l.heapLoc.equals(fieldName)) {\n ValueMapping value = new ValueMapping(in.get(l), false);\n value.join(result.get(location));\n result.put(location, value);\n valid = true;\n }\n }\n }\n }\n }\n if (!valid && !(instr.getFieldType(context.constPool) instanceof ReferenceType)) {\n result.put(new Location(context.stackPtr - 1), new ValueMapping());\n }\n }\n break;\n case Constants.PUTSTATIC:\n {\n PUTSTATIC instr = (PUTSTATIC) instruction;\n int fieldSize = instr.getFieldType(context.constPool).getSize();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc >= 0 && l.stackLoc < context.stackPtr - fieldSize) {\n result.put(l, in.get(l));\n }\n }\n DFAAppInfo p = interpreter.getProgram();\n Set<String> receivers = p.getReceivers(stmt, context.callString);\n for (Iterator<String> i = receivers.iterator(); i.hasNext(); ) {\n String fieldName = i.next();\n if (p.containsField(fieldName)) {\n for (Iterator<Location> k = in.keySet().iterator(); k.hasNext(); ) {\n Location l = k.next();\n if (l.stackLoc < 0 && !receivers.contains(l.heapLoc)) {\n result.put(l, in.get(l));\n }\n if (l.stackLoc == context.stackPtr - 1) {\n result.put(new Location(fieldName), new ValueMapping(in.get(l), false));\n }\n }\n }\n }\n }\n break;\n case Constants.GETSTATIC:\n {\n GETSTATIC instr = (GETSTATIC) instruction;\n result = new HashMap<Location, ValueMapping>(in);\n retval.put(context.callString, result);\n DFAAppInfo p = interpreter.getProgram();\n Set<String> receivers = p.getReceivers(stmt, context.callString);\n Location location = new Location(context.stackPtr);\n boolean valid = false;\n for (Iterator<String> i = receivers.iterator(); i.hasNext(); ) {\n String fieldName = i.next();\n if (p.containsField(fieldName)) {\n for (Iterator<Location> k = in.keySet().iterator(); k.hasNext(); ) {\n Location l = k.next();\n if (l.heapLoc.equals(fieldName)) {\n ValueMapping value = new ValueMapping(in.get(l), false);\n value.join(result.get(location));\n result.put(location, value);\n valid = true;\n }\n }\n }\n }\n if (!valid && !(instr.getFieldType(context.constPool) instanceof ReferenceType)) {\n result.put(new Location(context.stackPtr), new ValueMapping());\n }\n }\n break;\n case Constants.IASTORE:\n case Constants.CASTORE:\n case Constants.SASTORE:\n case Constants.BASTORE:\n {\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 3) {\n result.put(l, in.get(l));\n }\n }\n DFAAppInfo p = interpreter.getProgram();\n Set<String> receivers = p.getReceivers(stmt, context.callString);\n if (receivers == null) {\n System.out.println(\"String_Node_Str\" + context.callString.asList() + context.method + stmt);\n break;\n }\n for (Iterator<String> i = receivers.iterator(); i.hasNext(); ) {\n String name = i.next();\n for (Iterator<Location> k = in.keySet().iterator(); k.hasNext(); ) {\n Location l = k.next();\n if (l.stackLoc == context.stackPtr - 1) {\n Location loc = new Location(name);\n ValueMapping val = new ValueMapping(in.get(l), false);\n val.join(in.get(loc));\n result.put(loc, val);\n }\n }\n }\n }\n break;\n case Constants.AASTORE:\n {\n filterSet(in, result, context.stackPtr - 3);\n }\n break;\n case Constants.IALOAD:\n case Constants.CALOAD:\n case Constants.SALOAD:\n case Constants.BALOAD:\n {\n filterSet(in, result, context.stackPtr - 2);\n DFAAppInfo p = interpreter.getProgram();\n Location location = new Location(context.stackPtr - 2);\n boolean valid = false;\n Set<String> receivers = p.getReceivers(stmt, context.callString);\n for (Iterator<String> i = receivers.iterator(); i.hasNext(); ) {\n String name = i.next();\n for (Iterator<Location> k = in.keySet().iterator(); k.hasNext(); ) {\n Location l = k.next();\n if (l.heapLoc.equals(name)) {\n ValueMapping value = new ValueMapping(in.get(l), false);\n value.join(result.get(location));\n result.put(location, value);\n valid = true;\n }\n }\n }\n if (!valid) {\n result.put(new Location(context.stackPtr - 2), new ValueMapping(0));\n }\n }\n break;\n case Constants.AALOAD:\n {\n ValueMapping v = in.get(new Location(context.stackPtr - 1));\n if (v == null) {\n System.out.println(\"String_Node_Str\" + context.callString.asList() + context.method + stmt);\n } else {\n recordArrayIndex(stmt, context, v.assigned);\n }\n filterSet(in, result, context.stackPtr - 2);\n }\n break;\n case Constants.DUP:\n {\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n result.put(l, in.get(l));\n if (l.stackLoc == context.stackPtr - 1) {\n result.put(new Location(context.stackPtr), new ValueMapping(in.get(l), true));\n }\n }\n }\n break;\n case Constants.DUP_X1:\n {\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 2) {\n result.put(l, in.get(l));\n }\n if (l.stackLoc == context.stackPtr - 1) {\n result.put(new Location(context.stackPtr - 2), new ValueMapping(in.get(l), true));\n result.put(new Location(context.stackPtr), new ValueMapping(in.get(l), true));\n }\n if (l.stackLoc == context.stackPtr - 2) {\n result.put(new Location(context.stackPtr - 1), new ValueMapping(in.get(l), true));\n }\n }\n }\n break;\n case Constants.DUP2:\n {\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n result.put(l, in.get(l));\n if (l.stackLoc == context.stackPtr - 2) {\n result.put(new Location(context.stackPtr), new ValueMapping(in.get(l), true));\n }\n if (l.stackLoc == context.stackPtr - 1) {\n result.put(new Location(context.stackPtr + 1), new ValueMapping(in.get(l), true));\n }\n }\n }\n break;\n case Constants.POP:\n {\n filterSet(in, result, context.stackPtr - 1);\n }\n break;\n case Constants.POP2:\n {\n filterSet(in, result, context.stackPtr - 2);\n }\n break;\n case Constants.IINC:\n {\n IINC instr = (IINC) instruction;\n int index = instr.getIndex();\n int increment = instr.getIncrement();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr) {\n result.put(l, in.get(l));\n }\n if (l.stackLoc == index) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.assigned.add(increment);\n m.constrained.add(increment);\n Interval operand = new Interval(increment, increment);\n if (m.increment != null && !m.softinc) {\n m.increment.join(operand);\n } else if (m.increment != null && m.softinc) {\n if ((m.increment.getLb() < 0 && operand.getUb() > 0) || (m.increment.getUb() > 0 && operand.getLb() < 0)) {\n m.increment.join(operand);\n } else {\n m.increment = operand;\n }\n m.softinc = false;\n } else {\n m.increment = operand;\n m.softinc = false;\n }\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.IADD:\n {\n Interval operand = new Interval();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n operand = in.get(l).assigned;\n }\n }\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 2) {\n result.put(l, in.get(l));\n } else if (l.stackLoc == context.stackPtr - 2) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.assigned.add(operand);\n m.constrained.add(operand);\n if (m.increment != null && !m.softinc) {\n m.increment.join(operand);\n } else if (m.increment != null && m.softinc) {\n if ((m.increment.getLb() < 0 && operand.getUb() > 0) || (m.increment.getUb() > 0 && operand.getLb() < 0)) {\n m.increment.join(operand);\n } else {\n m.increment = operand;\n }\n m.softinc = false;\n } else {\n m.increment = operand;\n m.softinc = false;\n }\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.ISUB:\n {\n Interval operand = new Interval();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n operand = in.get(l).assigned;\n }\n }\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 2) {\n result.put(l, in.get(l));\n } else if (l.stackLoc == context.stackPtr - 2) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.assigned.sub(operand);\n m.constrained.sub(operand);\n operand.neg();\n if (m.increment != null && !m.softinc) {\n m.increment.join(operand);\n } else if (m.increment != null && m.softinc) {\n if ((m.increment.getLb() < 0 && operand.getUb() > 0) || (m.increment.getUb() > 0 && operand.getLb() < 0)) {\n m.increment.join(operand);\n } else {\n m.increment = operand;\n }\n m.softinc = false;\n } else {\n m.increment = operand;\n m.softinc = false;\n }\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.INEG:\n {\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 1) {\n result.put(l, in.get(l));\n } else if (l.stackLoc == context.stackPtr - 1) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.assigned.neg();\n m.constrained.neg();\n m.increment = new Interval();\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.IUSHR:\n {\n Interval operand = new Interval();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n operand = in.get(l).assigned;\n }\n }\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 2) {\n result.put(l, in.get(l));\n } else if (l.stackLoc == context.stackPtr - 2) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.assigned.ushr(operand);\n m.constrained.ushr(operand);\n m.increment = new Interval();\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.ISHR:\n {\n Interval operand = new Interval();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n operand = in.get(l).assigned;\n }\n }\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 2) {\n result.put(l, in.get(l));\n } else if (l.stackLoc == context.stackPtr - 2) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.assigned.shr(operand);\n m.constrained.shr(operand);\n m.increment = new Interval();\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.IMUL:\n {\n Interval operand = new Interval();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n operand = in.get(l).assigned;\n }\n }\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 2) {\n result.put(l, in.get(l));\n } else if (l.stackLoc == context.stackPtr - 2) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.assigned.mul(operand);\n m.constrained.mul(operand);\n m.increment = new Interval();\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.IDIV:\n {\n Interval operand = new Interval();\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n operand = in.get(l).assigned;\n }\n }\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 2) {\n result.put(l, in.get(l));\n } else if (l.stackLoc == context.stackPtr - 2) {\n ValueMapping m = new ValueMapping(in.get(l), true);\n m.assigned.div(operand);\n m.constrained.div(operand);\n m.increment = new Interval();\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.IAND:\n case Constants.IOR:\n case Constants.IXOR:\n case Constants.IREM:\n case Constants.ISHL:\n {\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc < context.stackPtr - 2) {\n result.put(l, in.get(l));\n } else if (l.stackLoc == context.stackPtr - 2) {\n ValueMapping m = new ValueMapping();\n result.put(l, m);\n }\n }\n }\n break;\n case Constants.I2B:\n case Constants.I2C:\n case Constants.I2S:\n result = in;\n retval.put(context.callString, result);\n break;\n case Constants.MONITORENTER:\n result = in;\n retval.put(context.callString, result);\n context.syncLevel++;\n break;\n case Constants.MONITOREXIT:\n result = in;\n retval.put(context.callString, result);\n context.syncLevel--;\n if (context.syncLevel < 0) {\n System.err.println(\"String_Node_Str\");\n System.exit(-1);\n }\n break;\n case Constants.CHECKCAST:\n result = in;\n retval.put(context.callString, result);\n break;\n case Constants.INSTANCEOF:\n {\n filterSet(in, result, context.stackPtr - 1);\n ValueMapping bool = new ValueMapping();\n bool.assigned.setLb(0);\n bool.assigned.setUb(1);\n result.put(new Location(context.stackPtr - 1), bool);\n }\n break;\n case Constants.NEW:\n {\n result = in;\n retval.put(context.callString, result);\n }\n break;\n case Constants.NEWARRAY:\n {\n NEWARRAY instr = (NEWARRAY) instruction;\n String name = instr.getType().toString();\n name += \"String_Node_Str\" + context.method + \"String_Node_Str\" + stmt.getPosition();\n filterSet(in, result, context.stackPtr - 1);\n boolean valid = false;\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n result.put(new Location(name + \"String_Node_Str\"), in.get(l));\n recordSize(stmt, context, in.get(l).assigned);\n valid = true;\n }\n }\n if (!valid) {\n ValueMapping v = new ValueMapping();\n result.put(new Location(name + \"String_Node_Str\"), v);\n recordSize(stmt, context, v.assigned);\n }\n }\n break;\n case Constants.ANEWARRAY:\n {\n ANEWARRAY instr = (ANEWARRAY) instruction;\n String name = instr.getType(context.constPool).toString() + \"String_Node_Str\";\n name += \"String_Node_Str\" + context.method + \"String_Node_Str\" + stmt.getPosition();\n filterSet(in, result, context.stackPtr - 1);\n boolean valid = false;\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n result.put(new Location(name + \"String_Node_Str\"), in.get(l));\n recordSize(stmt, context, in.get(l).assigned);\n valid = true;\n }\n }\n if (!valid) {\n ValueMapping v = new ValueMapping();\n result.put(new Location(name + \"String_Node_Str\"), v);\n recordSize(stmt, context, v.assigned);\n }\n }\n break;\n case Constants.MULTIANEWARRAY:\n {\n MULTIANEWARRAY instr = (MULTIANEWARRAY) instruction;\n int dim = instr.getDimensions();\n filterSet(in, result, context.stackPtr - dim);\n String type = instr.getType(context.constPool).toString();\n type = type.substring(0, type.indexOf(\"String_Node_Str\"));\n Interval[] size = new Interval[dim];\n for (int i = 1; i <= dim; i++) {\n String name = type;\n for (int k = 0; k < i; k++) {\n name += \"String_Node_Str\";\n }\n name += \"String_Node_Str\" + context.method + \"String_Node_Str\" + stmt.getPosition();\n boolean valid = false;\n for (Iterator<Location> k = in.keySet().iterator(); k.hasNext(); ) {\n Location l = k.next();\n if (l.stackLoc == context.stackPtr - i) {\n result.put(new Location(name + \"String_Node_Str\"), in.get(l));\n if (size[i - 1] != null) {\n size[i - 1].join(in.get(l).assigned);\n } else {\n size[i - 1] = in.get(l).assigned;\n }\n valid = true;\n }\n }\n if (!valid) {\n ValueMapping v = new ValueMapping();\n result.put(new Location(name + \"String_Node_Str\"), v);\n size[i - 1] = v.assigned;\n }\n }\n recordSize(stmt, context, size);\n }\n break;\n case Constants.GOTO:\n result = in;\n retval.put(context.callString, result);\n break;\n case Constants.IFNULL:\n case Constants.IFNONNULL:\n {\n checkScope(context, stmt);\n filterSet(in, result, context.stackPtr - 1);\n }\n break;\n case Constants.IF_ACMPEQ:\n case Constants.IF_ACMPNE:\n {\n checkScope(context, stmt);\n filterSet(in, result, context.stackPtr - 2);\n }\n break;\n case Constants.IFEQ:\n case Constants.IFNE:\n case Constants.IFLT:\n case Constants.IFGE:\n case Constants.IFLE:\n case Constants.IFGT:\n checkScope(context, stmt);\n result = doIf(stmt, edge, context, in, result);\n retval.put(context.callString, result);\n break;\n case Constants.IF_ICMPEQ:\n case Constants.IF_ICMPNE:\n case Constants.IF_ICMPLT:\n case Constants.IF_ICMPGE:\n case Constants.IF_ICMPGT:\n case Constants.IF_ICMPLE:\n checkScope(context, stmt);\n result = doIfIcmp(stmt, edge, context, in, result);\n retval.put(context.callString, result);\n break;\n case Constants.LOOKUPSWITCH:\n case Constants.TABLESWITCH:\n result = in;\n retval.put(context.callString, result);\n break;\n case Constants.INVOKEVIRTUAL:\n case Constants.INVOKEINTERFACE:\n case Constants.INVOKESTATIC:\n case Constants.INVOKESPECIAL:\n {\n DFAAppInfo p = interpreter.getProgram();\n Set<String> receivers = p.getReceivers(stmt, context.callString);\n if (receivers == null) {\n System.out.println(context.method + \"String_Node_Str\" + instruction.toString(context.constPool.getConstantPool()) + \"String_Node_Str\" + stmt.toString(true) + \"String_Node_Str\" + \"String_Node_Str\");\n result = in;\n break;\n }\n for (Iterator<String> i = receivers.iterator(); i.hasNext(); ) {\n String methodName = i.next();\n doInvoke(methodName, stmt, context, input, interpreter, state, retval);\n }\n }\n break;\n case Constants.ARETURN:\n case Constants.RETURN:\n {\n filterSet(in, result, 0);\n }\n break;\n case Constants.IRETURN:\n {\n filterSet(in, result, 0);\n for (Iterator<Location> i = in.keySet().iterator(); i.hasNext(); ) {\n Location l = i.next();\n if (l.stackLoc == context.stackPtr - 1) {\n result.put(new Location(0), new ValueMapping(in.get(l), false));\n }\n }\n }\n break;\n default:\n result = in;\n retval.put(context.callString, result);\n break;\n }\n context.stackPtr += instruction.produceStack(context.constPool) - instruction.consumeStack(context.constPool);\n return retval;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.