content
stringlengths
40
137k
"private void setErrorIcon(Drawable icon) {\n Drawables dr = mTextView.mDrawables;\n if (dr == null) {\n mTextView.mDrawables = dr = new Drawables(mTextView.getContext());\n }\n dr.setErrorDrawable(icon, mTextView);\n mTextView.resetResolvedDrawables();\n mTextView.invalidate();\n mTextView.requestLayout();\n}\n"
"public void createCell(CellMO cellMO) {\n final Class cellClazz = cellMO.getClass();\n final Identity identity = proxy.getCurrentOwner();\n scheduleChange(new Change(cellMO.getCellID(), cellMO.getLocalBounds(), cellMO.getLocalTransform(null)) {\n public void run() {\n SpatialCell sc = universe.createSpatialCell(cellID, cellCacheId, identity);\n sc.setLocalBounds(localBounds);\n sc.setLocalTransform(localTransform, identity);\n }\n });\n}\n"
"public String executeRequest(String clientId, ConcurrentHashMap<String, String> clientState, String request) throws Exception {\n StringBuffer rsb = new StringBuffer();\n String cmd;\n String[] args;\n if (request.indexOf(SPACE) != -1) {\n cmd = request.substring(0, request.indexOf(SPACE)).trim().toLowerCase();\n args = request.substring(request.indexOf(SPACE)).trim().split(SPACE);\n } else {\n cmd = request.trim().toLowerCase();\n args = new String[0];\n }\n if (cmd.equals(CMD_USE)) {\n if (null == dbs.get(args[0])) {\n rsb.append(R_ERR);\n rsb.append(\"String_Node_Str\");\n } else {\n if (null != clientState.get(ST_DB))\n clientState.remove(ST_DB);\n clientState.put(ST_DB, args[0]);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_CREATE)) {\n if (null != dbs.get(args[0])) {\n rsb.append(R_ERR);\n rsb.append(\"String_Node_Str\");\n } else {\n dbs.put(args[0], new Graph());\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_DROP)) {\n if (null == dbs.get(args[0])) {\n rsb.append(R_ERR);\n rsb.append(\"String_Node_Str\");\n } else {\n dbs.remove(args[0]);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_NAMECON)) {\n clientState.put(ST_NAMECON, args[0] + \"String_Node_Str\" + clientId);\n rsb.append(clientState.get(ST_NAMECON));\n rsb.append(NL);\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_CLSTATE)) {\n JSONObject result = new JSONObject(clientState);\n rsb.append(result.toString(4));\n rsb.append(NL);\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_SSTAT)) {\n JSONObject result = new JSONObject();\n JSONObject names = new JSONObject();\n names.put(\"String_Node_Str\", Graph.TYPE_FIELD);\n names.put(\"String_Node_Str\", Graph.KEY_FIELD);\n names.put(\"String_Node_Str\", Graph.WEIGHT_FIELD);\n names.put(\"String_Node_Str\", Graph.EDGE_SOURCE_FIELD);\n names.put(\"String_Node_Str\", Graph.EDGE_TARGET_FIELD);\n names.put(\"String_Node_Str\", Graph.RELATION_FIELD);\n names.put(\"String_Node_Str\", Graph.VERTEX_TYPE);\n names.put(\"String_Node_Str\", Graph.EDGE_TYPE);\n result.put(\"String_Node_Str\", names);\n rsb.append(result.toString(4));\n rsb.append(NL);\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_LISTG)) {\n for (String name : dbs.keySet()) {\n rsb.append(name);\n rsb.append(NL);\n }\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_GSTAT)) {\n Graph gr0 = dbs.get(args[0]);\n if (null == gr0) {\n rsb.append(R_NOT_EXIST);\n } else {\n JSONObject result = new JSONObject();\n result.put(\"String_Node_Str\", gr0.numVertices());\n result.put(\"String_Node_Str\", gr0.numEdges());\n rsb.append(result.toString(4));\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else {\n if (null == clientState.get(ST_DB)) {\n rsb.append(R_ERR);\n rsb.append(\"String_Node_Str\");\n } else {\n String cldb = clientState.get(ST_DB);\n Graph gr = dbs.get(cldb);\n if (cmd.equals(CMD_EXISTS)) {\n String key = args[0];\n rsb.append(\"String_Node_Str\" + gr.exists(key));\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_CVERT)) {\n String key = args[0];\n String json = request.substring(request.indexOf(SPACE + key) + (key.length() + 1)).trim();\n JSONObject jo = null;\n try {\n jo = new JSONObject(json);\n gr.addVertex(key, jo);\n rsb.append(R_OK);\n } catch (org.json.JSONException jsonEx) {\n jsonEx.printStackTrace();\n rsb.append(R_ERR);\n rsb.append(\"String_Node_Str\");\n rsb.append(jsonEx.getMessage());\n } catch (Exception ex) {\n ex.printStackTrace();\n rsb.append(R_ERR);\n rsb.append(SPACE);\n rsb.append(ex.getMessage());\n }\n } else if (cmd.equals(CMD_CEDGE)) {\n String key = args[0];\n String vFromKey = args[1];\n String vToKey = args[2];\n String rel = args[3];\n double weight = 1.0;\n String json;\n if (args[4].charAt(0) == '{') {\n json = request.substring(request.indexOf(SPACE + rel) + (rel.length() + 1)).trim();\n } else {\n weight = Double.parseDouble(args[4]);\n json = request.substring(request.indexOf(SPACE + args[4]) + (args[4].length() + 1)).trim();\n }\n JSONObject jo = null;\n try {\n jo = new JSONObject(json);\n jo.put(Graph.EDGE_SOURCE_FIELD, vFromKey);\n jo.put(Graph.EDGE_TARGET_FIELD, vToKey);\n jo.put(Graph.WEIGHT_FIELD, weight);\n jo.put(Graph.RELATION_FIELD, rel);\n gr.addEdge(key, jo, vFromKey, vToKey, rel, weight);\n rsb.append(R_OK);\n } catch (org.json.JSONException jsonEx) {\n jsonEx.printStackTrace();\n rsb.append(R_ERR);\n rsb.append(\"String_Node_Str\");\n rsb.append(jsonEx.getMessage());\n } catch (Exception ex) {\n ex.printStackTrace();\n rsb.append(R_ERR);\n rsb.append(SPACE);\n rsb.append(ex.getMessage());\n }\n } else if (cmd.equals(CMD_DEL)) {\n String key = args[0];\n JSONObject obj = gr.get(key);\n if (null == obj) {\n rsb.append(R_NOT_FOUND);\n } else {\n String _type = obj.getString(Graph.TYPE_FIELD);\n if (_type.equals(Graph.VERTEX_TYPE)) {\n JSONVertex jv = gr.getVertex(key);\n gr.removeVertex(jv);\n rsb.append(R_OK);\n } else if (_type.equals(Graph.EDGE_TYPE)) {\n JSONEdge je = gr.getEdge(key);\n gr.removeEdge(je);\n rsb.append(R_OK);\n } else {\n rsb.append(R_ERR);\n rsb.append(SPACE);\n rsb.append(R_UNKNOWN_OBJECT_TYPE);\n }\n }\n } else if (cmd.equals(CMD_GET)) {\n String key = args[0];\n JSONObject jo = gr.get(key);\n if (jo == null) {\n rsb.append(R_NOT_FOUND);\n } else {\n rsb.append(prepareResult(jo));\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_Q)) {\n String q = request.substring(request.indexOf(SPACE)).trim();\n List<JSONObject> results = gr.queryGraphIndex(q);\n JSONArray ja = new JSONArray();\n for (JSONObject jo : results) {\n ja.put(jo);\n }\n JSONObject res = new JSONObject();\n res.put(\"String_Node_Str\", ja);\n rsb.append(prepareResult(res));\n rsb.append(NL);\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_QP)) {\n String q = request.substring(request.indexOf(SPACE)).trim();\n List<JSONObject> results = gr.queryProcessIndex(q);\n JSONArray ja = new JSONArray();\n for (JSONObject jo : results) {\n ja.put(jo);\n }\n JSONObject res = new JSONObject();\n res.put(\"String_Node_Str\", ja);\n rsb.append(prepareResult(res));\n rsb.append(NL);\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_SPATH)) {\n String vFromKey = args[0];\n String vToKey = args[1];\n double radius = Double.POSITIVE_INFINITY;\n if (args.length == 3) {\n radius = Double.parseDouble(args[2]);\n }\n JSONObject result = gr.getShortestPath(vFromKey, vToKey, radius);\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(prepareResult(result));\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_SET)) {\n String key = args[0];\n String attr = args[1];\n String val;\n if (args.length == 2) {\n val = null;\n } else {\n val = request.substring(request.indexOf(SPACE + args[1]) + (args[1].length() + 1)).trim();\n }\n if (attr.startsWith(\"String_Node_Str\") && !attr.equals(Graph.WEIGHT_FIELD)) {\n rsb.append(R_ERR);\n rsb.append(\"String_Node_Str\");\n } else {\n JSONObject obj = gr.get(key);\n if (null == obj) {\n rsb.append(R_NOT_FOUND);\n } else {\n String _type = obj.getString(Graph.TYPE_FIELD);\n if (_type.equals(Graph.VERTEX_TYPE)) {\n JSONVertex jv = gr.getVertex(key);\n if (null != val) {\n jv.put(attr, val);\n } else {\n jv.remove(attr);\n }\n gr.indexObject(key, _type, jv);\n rsb.append(R_OK);\n } else if (_type.equals(Graph.EDGE_TYPE)) {\n JSONEdge je = gr.getEdge(key);\n if (null != val) {\n je.put(attr, val);\n } else {\n je.remove(attr);\n }\n if (attr.equals(Graph.WEIGHT_FIELD)) {\n gr.setEdgeWeight(je, Double.parseDouble(val));\n }\n gr.indexObject(key, _type, je.asJSONObject().getJSONObject(Graph.DATA_FIELD));\n rsb.append(R_OK);\n } else {\n rsb.append(R_ERR);\n rsb.append(R_UNKNOWN_OBJECT_TYPE);\n }\n }\n }\n } else if (cmd.equals(CMD_INCW)) {\n String key = args[0];\n double w_amt = Double.parseDouble(args[1]);\n JSONEdge je = gr.getEdge(key);\n if (null == je) {\n rsb.append(R_NOT_FOUND);\n } else {\n double weight = gr.getEdgeWeight(je);\n weight += w_amt;\n gr.setEdgeWeight(je, weight);\n je.put(Graph.WEIGHT_FIELD, \"String_Node_Str\" + weight);\n gr.indexObject(key, Graph.EDGE_TYPE, je.asJSONObject().getJSONObject(Graph.DATA_FIELD));\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_SPY)) {\n String key = args[0];\n JSONObject obj = gr.get(key);\n if (null == obj) {\n rsb.append(R_NOT_FOUND);\n } else {\n String _type = obj.getString(Graph.TYPE_FIELD);\n if (_type.equals(Graph.EDGE_TYPE)) {\n JSONEdge je = gr.getEdge(key);\n if (null == je) {\n rsb.append(R_NOT_FOUND);\n } else {\n rsb.append(je.asClientJSONObject().toString(4) + NL);\n rsb.append(R_OK);\n }\n } else if (_type.equals(Graph.VERTEX_TYPE)) {\n JSONVertex jv = gr.getVertex(key);\n if (null == jv) {\n rsb.append(R_NOT_FOUND);\n } else {\n rsb.append(jv.toString(4) + NL);\n rsb.append(R_OK);\n }\n } else {\n rsb.append(R_ERR);\n rsb.append(R_UNKNOWN_OBJECT_TYPE);\n }\n }\n } else if (cmd.equals(CMD_KSPATH)) {\n String vFromKey = args[0];\n String vToKey = args[1];\n int k = Integer.parseInt(args[2]);\n int maxHops = 0;\n if (args.length > 3) {\n maxHops = Integer.parseInt(args[3]);\n }\n JSONObject result = gr.getKShortestPaths(vFromKey, vToKey, k, maxHops);\n rsb.append(prepareResult(result));\n rsb.append(NL);\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_HC)) {\n List<JSONVertex> results = gr.getHamiltonianCycle();\n if (null == results) {\n rsb.append(R_NOT_EXIST);\n } else {\n JSONObject res = new JSONObject();\n JSONArray cycle = new JSONArray();\n for (JSONVertex jo : results) {\n cycle.put(jo);\n }\n res.put(\"String_Node_Str\", cycle);\n rsb.append(prepareResult(res));\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_EC)) {\n List<JSONVertex> results = gr.getEulerianCircuit();\n if (null == results) {\n rsb.append(R_NOT_EXIST);\n } else {\n JSONObject res = new JSONObject();\n JSONArray circuit = new JSONArray();\n for (JSONVertex jo : results) {\n circuit.put(jo);\n }\n res.put(\"String_Node_Str\", circuit);\n rsb.append(prepareResult(res));\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_EKMF)) {\n String vSourceKey = args[0];\n String vSinkKey = args[1];\n JSONObject flowResult = gr.getEKMF(vSourceKey, vSinkKey);\n if (null == flowResult) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(flowResult.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_CN)) {\n JSONObject result = new JSONObject();\n result.put(\"String_Node_Str\", gr.getChromaticNumber());\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_KMST)) {\n JSONObject result = gr.getKMST();\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_VCG)) {\n JSONObject result = gr.getGreedyVertexCover();\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_VC2A)) {\n JSONObject result = gr.get2ApproximationVertexCover();\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_CSETV)) {\n String key = args[0];\n JSONVertex v = gr.getVertex(key);\n if (null == v) {\n rsb.append(R_NOT_FOUND);\n } else {\n JSONObject result = gr.getConnectedSetByVertex(v);\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_CSETS)) {\n JSONObject result = gr.getConnectedSets();\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_ISCON)) {\n rsb.append(\"String_Node_Str\" + gr.isConnected());\n rsb.append(NL);\n rsb.append(R_OK);\n } else if (cmd.equals(CMD_UPATHEX)) {\n JSONVertex vFrom = gr.getVertex(args[0]);\n JSONVertex vTo = gr.getVertex(args[1]);\n if (null == vFrom || null == vTo) {\n rsb.append(R_NOT_FOUND);\n } else {\n rsb.append(\"String_Node_Str\" + gr.pathExists(vFrom, vTo));\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_FAMC)) {\n JSONObject result = gr.getAllMaximalCliques();\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_FBMC)) {\n JSONObject result = gr.getBiggestMaximalCliques();\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_ASPV)) {\n JSONObject result = gr.getAllShortestPathsFrom(gr.getVertex(args[0]));\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_GCYC)) {\n JSONObject result = gr.getGraphCycles();\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_VCYC)) {\n JSONObject result = gr.getGraphCyclesContainingVertex(gr.getVertex(args[0]));\n if (null == result) {\n rsb.append(R_NOT_EXIST);\n } else {\n rsb.append(result.toString());\n rsb.append(NL);\n rsb.append(R_OK);\n }\n } else if (cmd.equals(CMD_EMIT)) {\n String key = args[0];\n String processName = args[1];\n String json = request.substring(request.indexOf(SPACE + processName) + (processName.length() + 1)).trim();\n JSONObject jo = null;\n jo = new JSONObject(json);\n gr.emit(key, processName, jo);\n rsb.append(R_OK);\n }\n }\n }\n if (rsb.toString().equals(\"String_Node_Str\")) {\n log.info(\"String_Node_Str\" + cmd);\n rsb.append(R_UNK);\n rsb.append(SPACE);\n rsb.append(cmd);\n }\n rsb.append(NL);\n return rsb.toString();\n}\n"
"private Referenceable registerDatabase(String databaseName) throws Exception {\n Referenceable dbRef = getDatabaseReference(clusterName, databaseName);\n Database db = hiveClient.getDatabase(databaseName);\n if (db != null) {\n if (dbRef == null) {\n dbRef = createDBInstance(db);\n dbRef = registerInstance(dbRef);\n } else {\n LOG.info(\"String_Node_Str\", databaseName, dbRef.getId().id);\n dbRef = createOrUpdateDBInstance(db, dbRef);\n updateInstance(dbRef);\n }\n }\n return dbRef;\n}\n"
"public void actionSubsetFile() {\n ImportDataWizard wizard = new ImportDataWizard(this, model);\n new WizardDialog(main.getShell(), wizard).open();\n DataSourceConfiguration config = wizard.getResultingConfiguration();\n if (config == null) {\n return;\n }\n final WorkerImport worker = new WorkerImport(config);\n main.showProgressDialog(Resources.getMessage(\"String_Node_Str\"), worker);\n if (worker.getError() != null) {\n if (worker.getError() instanceof IllegalArgumentException) {\n main.showInfoDialog(\"String_Node_Str\", worker.getError().getMessage());\n } else {\n main.showErrorDialog(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), worker.getError());\n }\n return;\n }\n Data subsetData = worker.getResult();\n Data data = model.getInputConfig().getInput();\n try {\n DataSubset subset = DataSubset.create(data, subsetData);\n model.getInputConfig().setResearchSubset(subset.getSet());\n model.setSubsetOrigin(\"String_Node_Str\");\n update(new ModelEvent(this, ModelPart.RESEARCH_SUBSET, subset.getSet()));\n } catch (IllegalArgumentException e) {\n main.showInfoDialog(\"String_Node_Str\", worker.getError().getMessage());\n }\n}\n"
"private IDataEngine getDataEngine(Report report, String archivePath, String archiveMetaName, int mode) throws Exception {\n ExecutionContext context = new ExecutionContext();\n if (mode == MODE_GENERATION) {\n archWriter = new FileArchiveWriter(archivePath);\n archWriter.initialize();\n DataGenerationEngine dataGenEngine = new DataGenerationEngine(null, context, archWriter);\n dataGenEngine.prepare(report, null);\n return dataGenEngine;\n } else if (mode == MODE_PRESENTATION) {\n archReader = new FileArchiveReader(archivePath);\n archReader.open();\n DataPresentationEngine dataPresEngine = new DataPresentationEngine(null, context, archReader, false);\n dataPresEngine.prepare(report, null);\n return dataPresEngine;\n } else {\n return null;\n }\n}\n"
"public void testRenderTask() throws Exception {\n removeFile(TEMP_RESULT);\n removeFile(REPORT_DOCUMENT);\n createReportDocument();\n IReportDocument reportDoc = engine.openReportDocument(REPORT_DOCUMENT);\n IRenderTask task = engine.createRenderTask(reportDoc);\n task.setTimeZone(TimeZone.getTimeZone(\"String_Node_Str\"));\n IRenderOption option = new HTMLRenderOption();\n option.setOutputFormat(\"String_Node_Str\");\n option.setOutputFileName(TEMP_RESULT);\n task.setRenderOption(option);\n task.render();\n assertTrue(compareFiles(TEMP_RESULT, \"String_Node_Str\"));\n}\n"
"private void onUpdateVersionResponse(AppInfoOutput appInfoOutput) {\n AppController.storeString(Constants.SMS_CENTER, appInfoOutput.smsCenter);\n boolean isForcedUpdate;\n if (appInfoOutput.updateInfo.force_update != null && appInfoOutput.updateInfo.force_update.equalsIgnoreCase(\"String_Node_Str\")) {\n isForcedUpdate = true;\n } else {\n isForcedUpdate = false;\n }\n UpdateChecker updateChecker = new UpdateChecker(this, getResources().getString(R.string.app_name), appInfoOutput.updateInfo.version, appInfoOutput.updateInfo.apk_url, null, appInfoOutput.updateInfo.changes);\n if (Integer.valueOf(appInfoOutput.updateInfo.version) > DeviceInfo.getAppVersionCode() && (isForcedUpdate || DeviceInfo.getAppVersionCode() < Integer.valueOf(updateChecker.mUpdateDetail.latestVersion))) {\n Intent[] intents = new Intent[1];\n intents[0] = Intent.makeMainActivity(new ComponentName(AppController.getAppContext(), BottomBarActivity.class));\n updateChecker.showUpdaterDialog(context, getString(R.string.update_to_new_version), getString(R.string.exist_new_version), appInfoOutput.updateInfo.changes, appInfoOutput.updateInfo.version, intents, isForcedUpdate);\n AppController.getInstance().setIsCheckedUpdate(true);\n } else {\n Snackbari.showS(mToolbarTitleTextView, \"String_Node_Str\");\n }\n}\n"
"public void setIcon(int id) {\n Drawable drawable = DrawableCompat.wrap(VectorDrawableCompat.create(context.getResources(), id, context.getTheme()));\n DrawableCompat.setTint(drawable, Color.argb(138, 0, 0, 0));\n icon.setImageDrawable(drawable);\n}\n"
"protected void executeSequentially() {\n try {\n begin();\n if (source != null) {\n final Reader reader = source.read();\n if (reader != null)\n extractor.extract(reader);\n }\n final OETLPipeline pipeline = new OETLPipeline(this, transformers, loader, logLevel, maxRetries);\n pipeline.begin();\n while (extractor.hasNext()) {\n final OExtractedItem current = extractor.next();\n pipeline.execute(current);\n }\n end();\n } catch (OETLProcessHaltedException e) {\n out(LOG_LEVELS.ERROR, \"String_Node_Str\", e);\n }\n}\n"
"public void onDownloadProgress(final long finished, final long length) {\n final int percent = (int) (finished * 100 / length);\n if (percent != tempPercent) {\n mPlatform.execute(new Runnable() {\n\n public void run() {\n mCallback.onDownloadProgress(finished, length, percent);\n }\n });\n}\n"
"public View getView(int position, View convertView, ViewGroup parent) {\n View row = convertView;\n if (row == null) {\n LayoutInflater inflater = getLayoutInflater();\n row = inflater.inflate(R.layout.parish_search_row, parent, false);\n }\n if (getItem(position) != null) {\n parish = getItem(position);\n } else {\n parish = parishes.get(position);\n }\n TextView name = (TextView) row.findViewById(R.id.parish_name);\n name.setText(parishes.get(position).getName());\n name.setTag(parishes.get(position).getParishID());\n TextView address = (TextView) row.findViewById(R.id.parish_city);\n address.setText(parishes.get(position).getCity() + \"String_Node_Str\" + parishes.get(position).getState());\n return row;\n}\n"
"private static VM_Address pushVarArgToSpillArea(int methodID, boolean skip4Args) throws Exception, VM_PragmaNoInline {\n VM_Address currentfp = VM_Magic.getFramePointer();\n VM_Address gluefp = VM_Magic.getMemoryAddress(VM_Magic.getFramePointer().add(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET));\n gluefp = VM_Magic.getMemoryAddress(gluefp.add(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET));\n gluefp = VM_Magic.getMemoryAddress(gluefp.add(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET));\n int varargGPROffset = VARARG_AREA_OFFSET + (skip4Args ? BYTES_IN_ADDRESS : 0);\n int varargFPROffset = varargGPROffset + 5 * BYTES_IN_ADDRESS;\n int spillAreaLimit = glueFrameSize + NATIVE_FRAME_HEADER_SIZE + 8 * BYTES_IN_ADDRESS;\n int spillAreaOffset = glueFrameSize + NATIVE_FRAME_HEADER_SIZE + (skip4Args ? 4 * BYTES_IN_ADDRESS : 3 * BYTES_IN_ADDRESS);\n VM_Address varargAddress = gluefp.add(spillAreaOffset);\n VM_Method targetMethod = VM_MemberReference.getMemberRef(methodID).asMethodReference().resolve();\n VM_TypeReference[] argTypes = targetMethod.getParameterTypes();\n int argCount = argTypes.length;\n for (int i = 0; i < argCount && spillAreaOffset < spillAreaLimit; i++) {\n VM_Word hiword, loword;\n if (argTypes[i].isFloatType() || argTypes[i].isDoubleType()) {\n hiword = VM_Magic.getMemoryWord(gluefp.add(varargFPROffset));\n varargFPROffset += BYTES_IN_ADDRESS;\n if (VM.BuildFor32Addr) {\n loword = VM_Magic.getMemoryWord(gluefp.add(varargFPROffset));\n varargFPROffset += BYTES_IN_ADDRESS;\n }\n VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), hiword);\n spillAreaOffset += BYTES_IN_ADDRESS;\n if (VM.BuildFor32Addr) {\n VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), loword);\n spillAreaOffset += BYTES_IN_ADDRESS;\n }\n } else if (argTypes[i].isLongType()) {\n hiword = VM_Magic.getMemoryWord(gluefp.add(varargGPROffset));\n varargGPROffset += BYTES_IN_ADDRESS;\n VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), hiword);\n spillAreaOffset += BYTES_IN_ADDRESS;\n if (VM.BuildFor32Addr && spillAreaOffset < spillAreaLimit) {\n loword = VM_Magic.getMemoryWord(gluefp.add(varargGPROffset));\n varargGPROffset += BYTES_IN_ADDRESS;\n VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), loword);\n spillAreaOffset += BYTES_IN_ADDRESS;\n }\n } else {\n hiword = VM_Magic.getMemoryWord(gluefp.add(varargGPROffset));\n varargGPROffset += BYTES_IN_ADDRESS;\n VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), hiword);\n spillAreaOffset += BYTES_IN_ADDRESS;\n }\n }\n return varargAddress;\n}\n"
"protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, BindException errors) throws Exception {\n HttpSession httpSession = request.getSession();\n log.debug(\"String_Node_Str\");\n if (Context.isAuthenticated()) {\n PatientService ps = Context.getPatientService();\n PersonService personService = Context.getPersonService();\n ShortPatientModel shortPatient = (ShortPatientModel) obj;\n String view = getSuccessView();\n boolean isError = errors.hasErrors();\n String action = request.getParameter(\"String_Node_Str\");\n MessageSourceAccessor msa = getMessageSourceAccessor();\n if (action != null && action.equals(msa.getMessage(\"String_Node_Str\"))) {\n httpSession.setAttribute(WebConstants.OPENMRS_MSG_ATTR, \"String_Node_Str\");\n return new ModelAndView(new RedirectView(\"String_Node_Str\"));\n }\n Patient patient = null;\n if (shortPatient.getPatientId() != null) {\n patient = ps.getPatient(shortPatient.getPatientId());\n if (patient == null) {\n try {\n Person p = personService.getPerson(shortPatient.getPatientId());\n patient = new Patient(p);\n } catch (ObjectRetrievalFailureException noUserEx) {\n }\n }\n }\n if (patient == null)\n patient = new Patient();\n boolean duplicate = false;\n PersonName newName = shortPatient.getName();\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + newName.toString());\n for (PersonName pn : patient.getNames()) {\n if (((pn.getGivenName() == null && newName.getGivenName() == null) || OpenmrsUtil.nullSafeEquals(pn.getGivenName(), newName.getGivenName())) && ((pn.getMiddleName() == null && newName.getMiddleName() == null) || OpenmrsUtil.nullSafeEquals(pn.getMiddleName(), newName.getMiddleName())) && ((pn.getFamilyName() == null && newName.getFamilyName() == null) || OpenmrsUtil.nullSafeEquals(pn.getFamilyName(), newName.getFamilyName())))\n duplicate = true;\n }\n if (!duplicate) {\n if (patient.getPersonName() != null)\n patient.getPersonName().setPreferred(false);\n newName.setPersonNameId(null);\n newName.setPreferred(true);\n patient.addName(newName);\n }\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + shortPatient.getAddress());\n if (shortPatient.getAddress() != null && !shortPatient.getAddress().isBlank()) {\n duplicate = false;\n for (PersonAddress pa : patient.getAddresses()) {\n if (pa.toString().equals(shortPatient.getAddress().toString()))\n duplicate = true;\n }\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + duplicate);\n if (!duplicate) {\n PersonAddress newAddress = shortPatient.getAddress();\n newAddress.setPersonAddressId(null);\n newAddress.setPreferred(true);\n patient.addAddress(newAddress);\n }\n }\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + patient.getAddresses());\n if (patient.getIdentifiers() == null)\n patient.setIdentifiers(new TreeSet<PatientIdentifier>());\n for (PatientIdentifier pi : patient.getIdentifiers()) {\n pi.setPreferred(pref.equals(pi.getIdentifier() + pi.getIdentifierType().getPatientIdentifierTypeId()));\n }\n for (PersonAttributeType type : personService.getPersonAttributeTypes(PERSON_TYPE.PATIENT, ATTR_VIEW_TYPE.VIEWING)) {\n String value = request.getParameter(type.getPersonAttributeTypeId().toString());\n patient.addAttribute(new PersonAttribute(type, value));\n }\n for (PatientIdentifier identifier : newIdentifiers) {\n identifier.setPatient(patient);\n for (PatientIdentifier currentIdentifier : patient.getActiveIdentifiers()) {\n if (currentIdentifier.equals(identifier)) {\n patient.removeIdentifier(currentIdentifier);\n Context.evictFromSession(currentIdentifier);\n }\n }\n }\n patient.addIdentifiers(newIdentifiers);\n List<PatientIdentifier> newIdentifiersList = new Vector<PatientIdentifier>();\n newIdentifiersList.addAll(newIdentifiers);\n for (PatientIdentifier identifier : patient.getIdentifiers()) {\n if (!newIdentifiersList.contains(identifier)) {\n identifier.setVoided(true);\n }\n }\n patient.setBirthdate(shortPatient.getBirthdate());\n patient.setBirthdateEstimated(shortPatient.getBirthdateEstimated());\n patient.setGender(shortPatient.getGender());\n if (shortPatient.getTribe() == \"String_Node_Str\" || shortPatient.getTribe() == null)\n patient.setTribe(null);\n else {\n Tribe t = ps.getTribe(Integer.valueOf(shortPatient.getTribe()));\n patient.setTribe(t);\n }\n patient.setDead(shortPatient.getDead());\n if (patient.isDead()) {\n patient.setDeathDate(shortPatient.getDeathDate());\n patient.setCauseOfDeath(shortPatient.getCauseOfDeath());\n } else {\n patient.setDeathDate(null);\n patient.setCauseOfDeath(null);\n }\n Patient newPatient = null;\n try {\n newPatient = ps.savePatient(patient);\n } catch (InvalidIdentifierFormatException iife) {\n log.error(iife);\n patient.removeIdentifier(iife.getPatientIdentifier());\n httpSession.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, \"String_Node_Str\");\n isError = true;\n } catch (InvalidCheckDigitException icde) {\n log.error(icde);\n patient.removeIdentifier(icde.getPatientIdentifier());\n httpSession.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, \"String_Node_Str\");\n isError = true;\n } catch (IdentifierNotUniqueException inue) {\n log.error(inue);\n patient.removeIdentifier(inue.getPatientIdentifier());\n httpSession.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, \"String_Node_Str\");\n isError = true;\n } catch (DuplicateIdentifierException die) {\n log.error(die);\n patient.removeIdentifier(die.getPatientIdentifier());\n httpSession.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, \"String_Node_Str\");\n isError = true;\n } catch (InsufficientIdentifiersException iie) {\n log.error(iie);\n patient.removeIdentifier(iie.getPatientIdentifier());\n httpSession.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, \"String_Node_Str\");\n isError = true;\n } catch (PatientIdentifierException pie) {\n log.error(pie);\n patient.removeIdentifier(pie.getPatientIdentifier());\n httpSession.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, \"String_Node_Str\");\n isError = true;\n }\n if (!isError) {\n String[] personAs = request.getParameterValues(\"String_Node_Str\");\n String[] types = request.getParameterValues(\"String_Node_Str\");\n Person person = personService.getPerson(patient.getPatientId());\n List<Relationship> relationships;\n List<Person> newPersonAs = new Vector<Person>();\n if (person != null)\n relationships = personService.getRelationshipsByPerson(person);\n else\n relationships = new Vector<Relationship>();\n if (personAs != null) {\n for (int x = 0; x < personAs.length; x++) {\n String personAString = personAs[x];\n String typeString = types[x];\n if (personAString != null && personAString.length() > 0 && typeString != null && typeString.length() > 0) {\n Person personA = personService.getPerson(Integer.valueOf(personAString));\n RelationshipType type = personService.getRelationshipType(Integer.valueOf(typeString));\n newPersonAs.add(personA);\n boolean found = false;\n for (Relationship rel : relationships) {\n if (rel.getPersonA().equals(person))\n found = true;\n if (rel.getPersonA().equals(personA)) {\n rel.setRelationshipType(type);\n found = true;\n }\n }\n if (!found) {\n Relationship r = new Relationship(personA, person, type);\n relationships.add(r);\n }\n }\n }\n }\n for (Relationship rel : relationships) {\n if (newPersonAs.contains(rel.getPersonA()) || person.equals(rel.getPersonA()))\n personService.saveRelationship(rel);\n else\n personService.purgeRelationship(rel);\n }\n if (patient.getDead()) {\n log.debug(\"String_Node_Str\");\n String codProp = Context.getAdministrationService().getGlobalProperty(\"String_Node_Str\");\n Concept causeOfDeath = Context.getConceptService().getConcept(codProp);\n if (causeOfDeath != null) {\n List<Obs> obssDeath = Context.getObsService().getObservationsByPersonAndConcept(patient, causeOfDeath);\n if (obssDeath != null) {\n if (obssDeath.size() > 1) {\n log.error(\"String_Node_Str\" + obssDeath.size() + \"String_Node_Str\");\n } else {\n Obs obsDeath = null;\n if (obssDeath.size() == 1) {\n log.debug(\"String_Node_Str\");\n obsDeath = obssDeath.iterator().next();\n } else {\n log.debug(\"String_Node_Str\");\n obsDeath = new Obs();\n obsDeath.setPerson(patient);\n obsDeath.setConcept(causeOfDeath);\n Location loc = Context.getLocationService().getLocation(\"String_Node_Str\");\n if (loc == null)\n loc = Context.getLocationService().getLocation(new Integer(1));\n if (loc != null)\n obsDeath.setLocation(loc);\n else\n log.error(\"String_Node_Str\");\n }\n Concept currCause = patient.getCauseOfDeath();\n if (currCause == null) {\n log.debug(\"String_Node_Str\");\n String noneConcept = Context.getAdministrationService().getGlobalProperty(\"String_Node_Str\");\n currCause = Context.getConceptService().getConcept(noneConcept);\n }\n if (currCause != null) {\n log.debug(\"String_Node_Str\");\n obsDeath.setValueCoded(currCause);\n Date dateDeath = patient.getDeathDate();\n if (dateDeath == null)\n dateDeath = new Date();\n obsDeath.setObsDatetime(dateDeath);\n String otherConcept = Context.getAdministrationService().getGlobalProperty(\"String_Node_Str\");\n Concept conceptOther = Context.getConceptService().getConcept(otherConcept);\n if (conceptOther != null) {\n if (conceptOther.equals(currCause)) {\n String otherInfo = ServletRequestUtils.getStringParameter(request, \"String_Node_Str\", \"String_Node_Str\");\n log.debug(\"String_Node_Str\" + otherInfo);\n obsDeath.setValueText(otherInfo);\n } else {\n log.debug(\"String_Node_Str\");\n obsDeath.setValueText(\"String_Node_Str\");\n }\n } else {\n log.debug(\"String_Node_Str\");\n obsDeath.setValueText(\"String_Node_Str\");\n }\n Context.getObsService().saveObs(obsDeath, null);\n } else {\n log.debug(\"String_Node_Str\");\n }\n }\n }\n } else {\n log.debug(\"String_Node_Str\");\n }\n }\n }\n if (isError || errors.hasErrors()) {\n log.error(\"String_Node_Str\" + this.getFormView());\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(getCommandName(), new ShortPatientModel(patient));\n return this.showForm(request, response, errors, model);\n } else {\n httpSession.setAttribute(WebConstants.OPENMRS_MSG_ATTR, \"String_Node_Str\");\n return new ModelAndView(new RedirectView(view + \"String_Node_Str\" + newPatient.getPatientId()));\n }\n } else {\n return new ModelAndView(new RedirectView(getFormView()));\n }\n}\n"
"public static IFile getRelativeFile(IFile originalFile, String pathRelativeToOriginalFile) {\n IPath originalFolderPath = originalFile.getParent().getLocation();\n IPath newPath = originalFolderPath.append(pathRelativeToOriginalFile);\n return originalFile.getWorkspace().getRoot().getFile(newPath);\n}\n"
"private static InnerStateRuntime parse(StateElement stateElement, Map<String, AbstractDefinition> streamDefinitionMap, Map<String, AbstractDefinition> tableDefinitionMap, Map<String, AbstractDefinition> windowDefinitionMap, Map<String, Table> tableMap, MetaStateEvent metaStateEvent, SiddhiAppContext siddhiAppContext, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String, ProcessStreamReceiver> processStreamReceiverMap, StreamPreStateProcessor streamPreStateProcessor, StreamPostStateProcessor streamPostStateProcessor, StateInputStream.Type stateType, ArrayList<Map.Entry<Long, Set<Integer>>> withinStates, LatencyTracker latencyTracker, String queryName) {\n if (stateElement instanceof StreamStateElement) {\n BasicSingleInputStream basicSingleInputStream = ((StreamStateElement) stateElement).getBasicSingleInputStream();\n SingleStreamRuntime singleStreamRuntime = SingleInputStreamParser.parseInputStream(basicSingleInputStream, siddhiAppContext, variableExpressionExecutors, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, tableMap, metaStateEvent, processStreamReceiverMap.get(basicSingleInputStream.getUniqueStreamIds().get(0)), false, false, queryName);\n int stateIndex = metaStateEvent.getStreamEventCount() - 1;\n if (streamPreStateProcessor == null) {\n if (stateElement.getWithin() != null) {\n Set<Integer> withinStateset = new HashSet<Integer>();\n withinStateset.add(SiddhiConstants.ANY);\n withinStates.add(0, new AbstractMap.SimpleEntry<Long, Set<Integer>>(stateElement.getWithin().getValue(), withinStateset));\n }\n streamPreStateProcessor = new StreamPreStateProcessor(stateType, clonewithinStates(withinStates));\n streamPreStateProcessor.init(siddhiAppContext, queryName);\n if (stateElement.getWithin() != null) {\n withinStates.remove(0);\n }\n }\n streamPreStateProcessor.setStateId(stateIndex);\n streamPreStateProcessor.setNextProcessor(singleStreamRuntime.getProcessorChain());\n singleStreamRuntime.setProcessorChain(streamPreStateProcessor);\n if (streamPostStateProcessor == null) {\n streamPostStateProcessor = new StreamPostStateProcessor();\n }\n streamPostStateProcessor.setStateId(stateIndex);\n singleStreamRuntime.getProcessorChain().setToLast(streamPostStateProcessor);\n streamPostStateProcessor.setThisStatePreProcessor(streamPreStateProcessor);\n streamPreStateProcessor.setThisStatePostProcessor(streamPostStateProcessor);\n streamPreStateProcessor.setThisLastProcessor(streamPostStateProcessor);\n StreamInnerStateRuntime innerStateRuntime = new StreamInnerStateRuntime(stateType);\n innerStateRuntime.setFirstProcessor(streamPreStateProcessor);\n innerStateRuntime.setLastProcessor(streamPostStateProcessor);\n innerStateRuntime.addStreamRuntime(singleStreamRuntime);\n return innerStateRuntime;\n } else if (stateElement instanceof NextStateElement) {\n StateElement currentElement = ((NextStateElement) stateElement).getStateElement();\n InnerStateRuntime currentInnerStateRuntime = parse(currentElement, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, streamPreStateProcessor, streamPostStateProcessor, stateType, withinStates, latencyTracker, queryName);\n if (stateElement.getWithin() != null) {\n Set<Integer> withinStateSet = new HashSet<Integer>();\n withinStateSet.add(currentInnerStateRuntime.getFirstProcessor().getStateId());\n withinStateSet.add(currentInnerStateRuntime.getLastProcessor().getStateId());\n withinStates.add(0, new AbstractMap.SimpleEntry<Long, Set<Integer>>(stateElement.getWithin().getValue(), withinStateSet));\n }\n StateElement nextElement = ((NextStateElement) stateElement).getNextStateElement();\n InnerStateRuntime nextInnerStateRuntime = parse(nextElement, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, streamPreStateProcessor, streamPostStateProcessor, stateType, withinStates, latencyTracker, queryName);\n if (stateElement.getWithin() != null) {\n withinStates.remove(0);\n }\n currentInnerStateRuntime.getLastProcessor().setNextStatePreProcessor(nextInnerStateRuntime.getFirstProcessor());\n NextInnerStateRuntime nextStateRuntime = new NextInnerStateRuntime(currentInnerStateRuntime, nextInnerStateRuntime, stateType);\n nextStateRuntime.setFirstProcessor(currentInnerStateRuntime.getFirstProcessor());\n nextStateRuntime.setLastProcessor(nextInnerStateRuntime.getLastProcessor());\n for (SingleStreamRuntime singleStreamRuntime : currentInnerStateRuntime.getSingleStreamRuntimeList()) {\n nextStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n for (SingleStreamRuntime singleStreamRuntime : nextInnerStateRuntime.getSingleStreamRuntimeList()) {\n nextStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n return nextStateRuntime;\n } else if (stateElement instanceof EveryStateElement) {\n StateElement currentElement = ((EveryStateElement) stateElement).getStateElement();\n InnerStateRuntime innerStateRuntime = parse(currentElement, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, streamPreStateProcessor, streamPostStateProcessor, stateType, withinStates, latencyTracker, queryName);\n EveryInnerStateRuntime everyInnerStateRuntime = new EveryInnerStateRuntime(innerStateRuntime, stateType);\n everyInnerStateRuntime.setFirstProcessor(innerStateRuntime.getFirstProcessor());\n everyInnerStateRuntime.setLastProcessor(innerStateRuntime.getLastProcessor());\n for (SingleStreamRuntime singleStreamRuntime : innerStateRuntime.getSingleStreamRuntimeList()) {\n everyInnerStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n everyInnerStateRuntime.getLastProcessor().setNextEveryStatePerProcessor(everyInnerStateRuntime.getFirstProcessor());\n return everyInnerStateRuntime;\n } else if (stateElement instanceof LogicalStateElement) {\n LogicalStateElement.Type type = ((LogicalStateElement) stateElement).getType();\n if (stateElement.getWithin() != null) {\n Set<Integer> withinStateset = new HashSet<Integer>();\n withinStateset.add(SiddhiConstants.ANY);\n withinStates.add(0, new AbstractMap.SimpleEntry<Long, Set<Integer>>(stateElement.getWithin().getValue(), withinStateset));\n }\n LogicalPreStateProcessor logicalPreStateProcessor1 = new LogicalPreStateProcessor(type, stateType, withinStates);\n logicalPreStateProcessor1.init(siddhiAppContext, queryName);\n LogicalPostStateProcessor logicalPostStateProcessor1 = new LogicalPostStateProcessor(type);\n LogicalPreStateProcessor logicalPreStateProcessor2 = new LogicalPreStateProcessor(type, stateType, withinStates);\n logicalPreStateProcessor2.init(siddhiAppContext, queryName);\n LogicalPostStateProcessor logicalPostStateProcessor2 = new LogicalPostStateProcessor(type);\n if (stateElement.getWithin() != null) {\n withinStates.remove(0);\n }\n logicalPostStateProcessor1.setPartnerPreStateProcessor(logicalPreStateProcessor2);\n logicalPostStateProcessor2.setPartnerPreStateProcessor(logicalPreStateProcessor1);\n logicalPostStateProcessor1.setPartnerPostStateProcessor(logicalPostStateProcessor2);\n logicalPostStateProcessor2.setPartnerPostStateProcessor(logicalPostStateProcessor1);\n logicalPreStateProcessor1.setPartnerStatePreProcessor(logicalPreStateProcessor2);\n logicalPreStateProcessor2.setPartnerStatePreProcessor(logicalPreStateProcessor1);\n StateElement stateElement2 = ((LogicalStateElement) stateElement).getStreamStateElement2();\n InnerStateRuntime innerStateRuntime2 = parse(stateElement2, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, logicalPreStateProcessor2, logicalPostStateProcessor2, stateType, withinStates, latencyTracker, queryName);\n StateElement stateElement1 = ((LogicalStateElement) stateElement).getStreamStateElement1();\n InnerStateRuntime innerStateRuntime1 = parse(stateElement1, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, logicalPreStateProcessor1, logicalPostStateProcessor1, stateType, withinStates, latencyTracker, queryName);\n LogicalInnerStateRuntime logicalInnerStateRuntime = new LogicalInnerStateRuntime(innerStateRuntime1, innerStateRuntime2, stateType);\n logicalInnerStateRuntime.setFirstProcessor(innerStateRuntime1.getFirstProcessor());\n logicalInnerStateRuntime.setLastProcessor(innerStateRuntime2.getLastProcessor());\n for (SingleStreamRuntime singleStreamRuntime : innerStateRuntime2.getSingleStreamRuntimeList()) {\n logicalInnerStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n for (SingleStreamRuntime singleStreamRuntime : innerStateRuntime1.getSingleStreamRuntimeList()) {\n logicalInnerStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n return logicalInnerStateRuntime;\n } else if (stateElement instanceof CountStateElement) {\n int minCount = ((CountStateElement) stateElement).getMinCount();\n int maxCount = ((CountStateElement) stateElement).getMaxCount();\n if (minCount == SiddhiConstants.ANY) {\n minCount = 0;\n }\n if (maxCount == SiddhiConstants.ANY) {\n maxCount = Integer.MAX_VALUE;\n }\n if (stateElement.getWithin() != null) {\n Set<Integer> withinStateset = new HashSet<Integer>();\n withinStateset.add(SiddhiConstants.ANY);\n withinStates.add(0, new AbstractMap.SimpleEntry<Long, Set<Integer>>(stateElement.getWithin().getValue(), withinStateset));\n }\n CountPreStateProcessor countPreStateProcessor = new CountPreStateProcessor(minCount, maxCount, stateType, withinStates);\n countPreStateProcessor.init(siddhiAppContext, queryName);\n CountPostStateProcessor countPostStateProcessor = new CountPostStateProcessor(minCount, maxCount);\n if (stateElement.getWithin() != null) {\n withinStates.remove(0);\n }\n countPreStateProcessor.setCountPostStateProcessor(countPostStateProcessor);\n StateElement currentElement = ((CountStateElement) stateElement).getStreamStateElement();\n InnerStateRuntime innerStateRuntime = parse(currentElement, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, countPreStateProcessor, countPostStateProcessor, stateType, withinStates, latencyTracker, queryName);\n return new CountInnerStateRuntime((StreamInnerStateRuntime) innerStateRuntime);\n } else {\n throw new OperationNotSupportedException();\n }\n}\n"
"public List<IRepositoryNode> getChildren() {\n if (!children.isEmpty()) {\n return children;\n }\n IRepositoryViewObject object = this.getParent().getObject();\n createRepositoryNodeTableFolderNode(repsNodes, object);\n return repsNodes;\n}\n"
"protected Object getValueFromSubject() {\n return Boolean.valueOf(true);\n}\n"
"public Job refreshTemplates() {\n Element oldComponent = null;\n IComponentSettingsView viewer = null;\n if (!CommonUIPlugin.isFullyHeadless()) {\n viewer = (IComponentSettingsView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IComponentSettingsView.ID);\n if (viewer != null) {\n oldComponent = viewer.getElement();\n viewer.cleanDisplay();\n }\n }\n ComponentCompilations.deleteMarkers();\n ComponentsFactoryProvider.getInstance().resetCache();\n Job job = CodeGeneratorEmittersPoolFactory.initialize();\n CorePlugin.getDefault().getLibrariesService().syncLibraries();\n IDesignerCoreService designerCoreService = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);\n designerCoreService.getLastGeneratedJobsDateMap().clear();\n return job;\n}\n"
"public Node<Item> removeAfter(Node node, Node first) {\n if (first == null) {\n return null;\n }\n Node current = first;\n while (current != null) {\n if (current.equals(node)) {\n if (current.next != null) {\n current.next = current.next.next;\n return first;\n } else {\n return first;\n }\n }\n current = current.next;\n }\n return null;\n}\n"
"public void testGetArtifact() throws OseeCoreException {\n try {\n ArtifactQuery.getArtifactFromId(parentGuid, CoverageTestUtil.getTestBranch());\n Assert.fail(\"String_Node_Str\");\n } catch (ArtifactDoesNotExist ex) {\n }\n Artifact artifact = new OseeCoverageUnitStore(parentCu, CoverageTestUtil.getTestBranch(), null, readOnlyTestUnitNames).getArtifact(false);\n Assert.assertNull(\"String_Node_Str\", artifact);\n artifact = new OseeCoverageUnitStore(parentCu, CoverageTestUtil.getTestBranch(), readOnlyTestUnitNames).getArtifact(true);\n CoverageTestUtil.registerAsTestArtifact(artifact);\n artifact.persist(getClass().getSimpleName());\n Assert.assertNotNull(\"String_Node_Str\", artifact);\n}\n"
"public void widgetSelected(SelectionEvent e) {\n String filename = null;\n if (!isIDE || getProjectFolder() == null) {\n FileDialog dialog = new FileDialog(UIUtil.getDefaultShell());\n if (needFilter) {\n dialog.setFilterExtensions(fileExt);\n }\n filename = dialog.open();\n } else {\n ProjectFileDialog dialog;\n if (needFilter) {\n dialog = new ProjectFileDialog(getProjectFolder(), fileExt);\n } else {\n dialog = new ProjectFileDialog(getProjectFolder());\n if (dialog.open() == Window.OK) {\n filename = dialog.getPath();\n }\n }\n try {\n if (filename != null) {\n File file = new File(filename);\n if (!(file.isFile() && file.exists())) {\n ExceptionHandler.openErrorMessageBox(Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n return;\n }\n filename = file.toURL().toString();\n if (needFilter && checkExtensions(fileExt, filename) == false) {\n ExceptionHandler.openErrorMessageBox(Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n return;\n }\n filename = URIUtil.getRelativePath(getBasePath(), filename);\n filename = new Path(filename).toString();\n if (text.getData(ExpressionButtonUtil.EXPR_BUTTON) != null) {\n text.setData(ExpressionButtonUtil.EXPR_TYPE, ExpressionType.CONSTANT);\n ((ExpressionButton) text.getData(ExpressionButtonUtil.EXPR_BUTTON)).refresh();\n } else {\n if (needQuote) {\n filename = \"String_Node_Str\" + filename + \"String_Node_Str\";\n }\n }\n text.setText(filename);\n text.setFocus();\n }\n updateButtons();\n } catch (Exception ex) {\n ExceptionHandler.handle(ex);\n }\n}\n"
"private OperationThread[] initGenericThreads(GroupProperties groupProperties) {\n int threadCount = groupProperties.GENERIC_OPERATION_THREAD_COUNT.getInteger();\n if (threadCount <= 0) {\n int coreSize = Runtime.getRuntime().availableProcessors();\n threadCount = Math.max(2, coreSize / 2);\n }\n GenericOperationThreadFactory threadFactory = new GenericOperationThreadFactory();\n OperationThread[] threads = new OperationThread[threadCount];\n for (int threadId = 0; threadId < threads.length; threadId++) {\n String threadName = threadGroup.getThreadPoolNamePrefix(\"String_Node_Str\") + threadId;\n OperationThread operationThread = new OperationThread(threadName, false, threadId, genericWorkQueue, genericPriorityWorkQueue);\n threads[threadId] = operationThread;\n operationThread.start();\n }\n return threads;\n}\n"
"private void unpackAspectAttributes() {\n isUnpacked = true;\n List pointcuts = new ArrayList();\n typeMungers = new ArrayList();\n declares = new ArrayList();\n List l = BcelAttributes.readAjAttributes(javaClass.getClassName(), javaClass.getAttributes(), getResolvedTypeX().getSourceContext(), getResolvedTypeX().getWorld().getMessageHandler(), AjAttribute.WeaverVersionInfo.UNKNOWN);\n processAttributes(l, pointcuts, false);\n l = AtAjAttributes.readAj5ClassAttributes(javaClass, getResolvedTypeX(), getResolvedTypeX().getSourceContext(), getResolvedTypeX().getWorld().getMessageHandler(), isCodeStyleAspect);\n processAttributes(l, pointcuts, true);\n this.pointcuts = (ResolvedPointcutDefinition[]) pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);\n}\n"
"public boolean updateNeeded() {\n SVersion localVersion = getLocalVersion();\n SVersion onlineVersion = getOnlineVersion();\n if (localVersion.getMajor().compareTo(onlineVersion.getMajor()) < 0) {\n return true;\n } else if (localVersion.getMajor() == onlineVersion.getMajor()) {\n if (localVersion.getMinor() < onlineVersion.getMinor()) {\n return true;\n } else if (localVersion.getMinor() == onlineVersion.getMinor()) {\n if (onlineVersion.getRevision() != null && localVersion.getRevision() < onlineVersion.getRevision()) {\n return true;\n }\n }\n }\n return false;\n}\n"
"public Graph transform(Graph g) {\n initIDSpace(g);\n if (graphPlotter != null)\n graphPlotter.plotStartGraph(g, idSpace);\n EdgeCrossings ec = new EdgeCrossings();\n int countCrossings = -1;\n System.out.println(\"String_Node_Str\" + countCrossings);\n this.g = g;\n edges = new Edge[g.getNodes().length][];\n Node tempNode = null;\n Node currentNode = null;\n Node lastNode = null;\n Node randDst1, randDst2;\n Edge tempEdge;\n String tempEdgeString;\n removalList = new HashMap<String, Edge>();\n HashMap<String, Edge> pairEdges = null;\n removedNodes = new ArrayList<Node>();\n waveCenterNodes = new TreeSet<Node>(new NodeComparator());\n waveFrontNodes = new TreeSet<Node>(new NodeComparator());\n additionalEdges = new HashMap[g.getNodes().length];\n for (int i = 0; i < g.getNodes().length; i++) {\n additionalEdges[i] = new HashMap<String, Edge>();\n }\n nodeList = Arrays.asList(g.getNodes().clone());\n Collections.sort(nodeList, new NodeDegreeComparator());\n for (int counter = 1; counter < (nodeList.size() - 3); counter++) {\n currentNode = getNode();\n pairEdges = getPairEdges(currentNode);\n for (Edge singleEdge : pairEdges.values()) {\n removalList.put(getEdgeString(singleEdge), singleEdge);\n }\n HashMap<String, Edge> currentNodeConnections = getEdges(currentNode);\n int currentNodeDegree = currentNodeConnections.size();\n int triangulationEdgesCount = (currentNodeDegree - 1) - pairEdges.size();\n int[] outgoingEdges = filterOutgoingEdges(currentNode, currentNodeConnections);\n int firstCounter = 0;\n int secondCounter = 1;\n while (triangulationEdgesCount > 0) {\n randDst1 = g.getNode(outgoingEdges[firstCounter]);\n randDst2 = g.getNode(outgoingEdges[secondCounter]);\n if (randDst1.equals(randDst2))\n continue;\n if (removedNodes.contains(randDst1) || removedNodes.contains(randDst2)) {\n continue;\n }\n if (!connected(randDst1, randDst2)) {\n tempEdge = new Edge(Math.min(randDst1.getIndex(), randDst2.getIndex()), Math.max(randDst1.getIndex(), randDst2.getIndex()));\n tempEdgeString = getEdgeString(tempEdge);\n if (randDst1.getIndex() != randDst2.getIndex() && !additionalEdges[randDst1.getIndex()].containsKey(tempEdgeString)) {\n additionalEdges[randDst1.getIndex()].put(tempEdgeString, tempEdge);\n additionalEdges[randDst2.getIndex()].put(tempEdgeString, tempEdge);\n triangulationEdgesCount--;\n }\n } else {\n }\n secondCounter++;\n if (secondCounter == (currentNodeDegree - 1)) {\n firstCounter++;\n secondCounter = firstCounter + 1;\n }\n if (firstCounter == (currentNodeDegree - 1))\n throw new RuntimeException(\"String_Node_Str\" + currentNode.getIndex());\n }\n waveFrontNodes = new TreeSet<Node>(new NodeComparator());\n for (Edge i : getEdges(currentNode).values()) {\n int otherEnd;\n if (i.getDst() == currentNode.getIndex()) {\n otherEnd = i.getSrc();\n } else {\n otherEnd = i.getDst();\n }\n tempNode = g.getNode(otherEnd);\n if (removedNodes.contains(tempNode)) {\n continue;\n }\n waveFrontNodes.add(tempNode);\n waveCenterNodes.add(tempNode);\n }\n lastNode = currentNode;\n removedNodes.add(currentNode);\n }\n LinkedList<Node> longestPath = longestPath();\n ArrayList<Node> todoList = new ArrayList<Node>();\n todoList.addAll(nodeList);\n todoList.removeAll(longestPath);\n Node neighbor, singleNode;\n int neighborPosition = -1;\n int errors = 0;\n int modCounter = 0;\n while (!todoList.isEmpty()) {\n singleNode = todoList.get(modCounter % todoList.size());\n for (int singleNeighbor : singleNode.getOutgoingEdges()) {\n neighbor = g.getNode(singleNeighbor);\n neighborPosition = longestPath.indexOf(neighbor);\n if (neighborPosition > -1) {\n break;\n }\n }\n if (neighborPosition != -1) {\n todoList.remove(singleNode);\n longestPath.add(neighborPosition, singleNode);\n } else {\n modCounter = (modCounter + 1) % todoList.size();\n if (errors++ == 50) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n }\n }\n double lastPos = 0;\n double posDiff = modulus / partitions.length;\n RingIdentifier[] ids = new RingIdentifier[g.getNodes().length];\n for (Node n : longestPath) {\n ids[n.getIndex()] = new RingIdentifier(lastPos, idSpace);\n lastPos += posDiff;\n }\n lastNode = longestPath.getLast();\n for (Node n : longestPath) {\n partitions[n.getIndex()] = new RingPartition(ids[lastNode.getIndex()], ids[n.getIndex()]);\n lastNode = n;\n }\n countCrossings = ec.calculateCrossings(g.generateEdges(), idSpace, true);\n System.out.println(\"String_Node_Str\" + countCrossings);\n if (graphPlotter != null)\n graphPlotter.plot(g, idSpace, graphPlotter.getBasename() + \"String_Node_Str\");\n reduceCrossingsBySwapping(g);\n writeIDSpace(g);\n if (graphPlotter != null)\n graphPlotter.plotFinalGraph(g, idSpace);\n countCrossings = ec.calculateCrossings(g.generateEdges(), idSpace, true);\n System.out.println(\"String_Node_Str\" + countCrossings);\n return g;\n}\n"
"public boolean match(Shadow shadow, World world) {\n if (super.match(shadow, world)) {\n IMessage message = new Message(msg, shadow.toString(), isError ? IMessage.ERROR : IMessage.WARNING, shadow.getSourceLocation(), null, new ISourceLocation[] { this.getSourceLocation() }, true, 0);\n world.getMessageHandler().handleMessage(message);\n if (world.xrefHandler != null) {\n world.xrefHandler.addCrossReference(this.getSourceLocation(), shadow.getSourceLocation(), (this.isError ? IRelationship.Kind.DECLARE_ERROR : IRelationship.Kind.DECLARE_WARNING), false);\n }\n if (world.getModel() != null) {\n AsmRelationshipProvider.checkerMunger(world.getModel(), shadow, this);\n }\n }\n return false;\n}\n"
"private String buildCriteria(String criteria, String property, Object value) {\n value = StringEscapeUtils.escapeSql(value.toString());\n if (value != null) {\n if (property.equals(\"String_Node_Str\") || property.equals(\"String_Node_Str\") || property.equals(\"String_Node_Str\") || property.equals(\"String_Node_Str\") || property.equals(\"String_Node_Str\")) {\n criteria = criteria + \"String_Node_Str\" + columnMapping.get(property) + \"String_Node_Str\" + value.toString() + \"String_Node_Str\";\n }\n if (property.equals(\"String_Node_Str\")) {\n criteria = criteria + \"String_Node_Str\" + columnMapping.get(property) + \"String_Node_Str\" + value.toString() + \"String_Node_Str\";\n } else {\n criteria += \"String_Node_Str\" + columnMapping.get(property) + \"String_Node_Str\" + value.toString() + \"String_Node_Str\" + \"String_Node_Str\";\n }\n }\n return criteria;\n}\n"
"public void writeCall(MethodWriter writer, IValue instance, IArguments arguments, IType type) {\n if ((this.modifiers & Modifiers.STATIC) != 0) {\n if (instance != null && instance.getValueType() == IValue.CLASS_ACCESS) {\n instance = null;\n }\n if (this.intrinsicOpcodes != null) {\n this.writeIntrinsic(writer, instance, arguments);\n return;\n }\n } else if (this.intrinsicOpcodes != null && (instance == null || instance.isPrimitive())) {\n this.writeIntrinsic(writer, instance, arguments);\n return;\n }\n if ((this.modifiers & INLINABLE) != 0 && writer.inlineOffset() < INLINE_TRESHOLD) {\n }\n this.writeInvoke(writer, instance, arguments);\n if (type == Types.VOID) {\n if (this.type != Types.VOID) {\n writer.writeInsn(Opcodes.POP);\n }\n return;\n }\n if (type != null) {\n if (type != this.type && !type.isSuperTypeOf(this.type)) {\n writer.writeTypeInsn(Opcodes.CHECKCAST, this.type.getInternalName());\n }\n }\n}\n"
"public void resumeAll() {\n commonBaseList.getReadWriteLock().readLock().lock();\n try {\n for (DownloadItem item : commonBaseList) {\n if (item.getState().isResumable()) {\n item.resume();\n }\n }\n }\n}\n"
"public final Object getDefault() {\n if (service.getOutputLimit() != null && service.getOutputLimit().length >= 2 && service.getOutputLimitType() != null && service.getOutputLimitType().length == service.getOutputLimit().length) {\n if (service.getOutputLimit()[0] > 0 && service.getOutputLimitType()[0] == LimitUnit.rows)\n return service.getOutputLimit()[0];\n }\n return TAPJob.UNLIMITED_MAX_REC;\n}\n"
"public void testDateDisplayNormal2(Book book) {\n Sheet sheet = book.getSheetAt(0);\n Range r;\n Setup.setZssLocale(Locale.TAIWAN);\n r = Ranges.range(sheet, \"String_Node_Str\");\n r.setCellEditText(\"String_Node_Str\");\n Assert.assertEquals(\"String_Node_Str\", r.getCellDataFormat());\n Assert.assertEquals(\"String_Node_Str\", r.getCellFormatText());\n Assert.assertEquals(CellType.NUMERIC, r.getCellData().getType());\n Assert.assertEquals(\"String_Node_Str\", r.getCellEditText());\n CellOperationUtil.applyDataFormat(r, \"String_Node_Str\");\n Setup.setZssLocale(Locale.TAIWAN);\n Assert.assertEquals(\"String_Node_Str\", r.getCellStyle().getDataFormat());\n Assert.assertEquals(\"String_Node_Str\", r.getCellFormatText());\n Assert.assertEquals(CellType.NUMERIC, r.getCellData().getType());\n Assert.assertEquals(\"String_Node_Str\", r.getCellEditText());\n Setup.setZssLocale(Locale.US);\n Assert.assertEquals(\"String_Node_Str\", r.getCellStyle().getDataFormat());\n Assert.assertEquals(\"String_Node_Str\", r.getCellFormatText());\n Assert.assertEquals(CellType.NUMERIC, r.getCellData().getType());\n Assert.assertEquals(\"String_Node_Str\", r.getCellEditText());\n Setup.setZssLocale(Locale.UK);\n Assert.assertEquals(\"String_Node_Str\", r.getCellStyle().getDataFormat());\n Assert.assertEquals(\"String_Node_Str\", r.getCellFormatText());\n Assert.assertEquals(CellType.NUMERIC, r.getCellData().getType());\n Assert.assertEquals(\"String_Node_Str\", r.getCellEditText());\n}\n"
"public void setMyBooleanWrapperTest(java.lang.Boolean value) {\n set(START_PROPERTY_INDEX + 50, value);\n}\n"
"public Range<Long> getShardKeyRange(long timestampStart, long timestampEnd) throws ShardStrategyException {\n if (timestampStart == 0) {\n if (timestampEnd == 0) {\n throw new ShardStrategyException(\"String_Node_Str\");\n } else {\n return Range.closed(1L, getShardKey(Long.valueOf(timestampEnd)));\n }\n } else {\n long start = getShardKey(timestampStart);\n if (timestampEnd == 0) {\n return Range.closed(start, this.getShardKey(DateTime.now().getMillis()));\n } else {\n long end = getShardKey(timestampEnd);\n return Range.closed(start, end);\n }\n }\n}\n"
"protected InvoiceLine createInvoiceLine() throws AxelorException {\n InvoiceLine invoiceLine = new InvoiceLine();\n invoiceLine.setInvoice(invoice);\n invoiceLine.setProduct(product);\n invoiceLine.setProductName(productName);\n invoiceLine.setDescription(description);\n invoiceLine.setPrice(price);\n invoiceLine.setQty(qty);\n if (exTaxTotal == null) {\n exTaxTotal = computeAmount(qty, price);\n }\n invoiceLine.setExTaxTotal(exTaxTotal);\n Partner partner = invoice.getPartner();\n Currency partnerCurrency = partner.getCurrency();\n if (partnerCurrency == null) {\n throw new AxelorException(String.format(I18n.get(IExceptionMessage.INVOICE_LINE_GENERATOR_1), partner.getFullName(), partner.getPartnerSeq()), IException.CONFIGURATION_ERROR);\n }\n invoiceLine.setAccountingExTaxTotal(currencyService.getAmountCurrencyConverted(invoice.getCurrency(), partnerCurrency, exTaxTotal, today));\n Company company = invoice.getCompany();\n Currency companyCurrency = company.getCurrency();\n if (companyCurrency == null) {\n throw new AxelorException(String.format(I18n.get(IExceptionMessage.INVOICE_LINE_GENERATOR_2), company.getName()), IException.CONFIGURATION_ERROR);\n }\n invoiceLine.setCompanyExTaxTotal(currencyService.getAmountCurrencyConverted(invoice.getCurrency(), companyCurrency, exTaxTotal, invoice.getInvoiceDate()));\n invoiceLine.setPricingListUnit(unit);\n if (taxLine == null) {\n boolean isPurchase = false;\n if (invoice.getOperationTypeSelect() == InvoiceRepository.OPERATION_TYPE_SUPPLIER_PURCHASE || invoice.getOperationTypeSelect() == InvoiceRepository.OPERATION_TYPE_SUPPLIER_REFUND) {\n isPurchase = true;\n }\n taxLine = accountManagementServiceImpl.getTaxLine(invoice.getInvoiceDate(), product, invoice.getCompany(), partner.getFiscalPosition(), isPurchase);\n }\n invoiceLine.setTaxLine(taxLine);\n invoiceLine.setInvoiceLineType(invoiceLineType);\n invoiceLine.setSequence(sequence);\n invoiceLine.setDiscountTypeSelect(discountTypeSelect);\n invoiceLine.setDiscountAmount(discountAmount);\n return invoiceLine;\n}\n"
"public boolean equals(Object obj) {\n if (obj == this) {\n return true;\n }\n if (obj == null) {\n return false;\n }\n if (!(obj instanceof TransactionalCache<?, ?>)) {\n return false;\n }\n TransactionalCache that = (TransactionalCache) obj;\n return EqualsHelper.nullSafeEquals(this.name, that.name);\n}\n"
"protected Void doInBackground(Integer... integers) {\n Log.d(TAG, \"String_Node_Str\");\n SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(Constants.applicationContext);\n String authToken = pref.getString(User.AUTHENTICATION_KEY, \"String_Node_Str\");\n String mInstanceUrl = pref.getString(Constants.INSTANCE_URL_KEY, getString(R.string.default_instance_url));\n String url = mInstanceUrl + \"String_Node_Str\" + \"String_Node_Str\" + integers[0] + \"String_Node_Str\";\n try {\n HttpURLConnection httpURLConnection = (HttpURLConnection) (new URL(url)).openConnection();\n httpURLConnection.setRequestMethod(\"String_Node_Str\");\n httpURLConnection.setRequestProperty(\"String_Node_Str\", \"String_Node_Str\");\n httpURLConnection.setRequestProperty(((MifosApplication) getActivity().getApplication()).api.HEADER_AUTHORIZATION, authToken);\n httpURLConnection.setRequestProperty(\"String_Node_Str\", \"String_Node_Str\");\n httpURLConnection.setDoInput(true);\n httpURLConnection.connect();\n Log.i(\"String_Node_Str\", \"String_Node_Str\");\n InputStream inputStream = httpURLConnection.getInputStream();\n bmp = BitmapFactory.decodeStream(inputStream);\n httpURLConnection.disconnect();\n Log.i(\"String_Node_Str\", \"String_Node_Str\");\n } catch (MalformedURLException e) {\n } catch (IOException ioe) {\n }\n return null;\n}\n"
"public void testGetId() throws IOException {\n File file = new File(\"String_Node_Str\");\n URL fileURL = file.getCanonicalFile().toURL();\n URLClassLoader loader = new URLClassLoader(new URL[] { fileURL }, null);\n IWeavingContext context = new TestWeavingContext(loader) {\n public String getId() {\n called = true;\n return super.getId();\n }\n };\n ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor();\n adaptor.initialize(loader, context);\n assertTrue(\"String_Node_Str\", called);\n}\n"
"public void testSequenceObjectDefinition() {\n EntityManager em = createEntityManager(\"String_Node_Str\");\n ServerSession ss = getServerSession(\"String_Node_Str\");\n if (!ss.getLogin().getPlatform().supportsSequenceObjects() || isOnServer()) {\n closeEntityManager(em);\n return;\n }\n String seqName = \"String_Node_Str\";\n try {\n internalTestSequenceObjectDefinition(10, 1, seqName, em, ss);\n internalTestSequenceObjectDefinition(10, 5, seqName + \"String_Node_Str\", em, ss);\n internalTestSequenceObjectDefinition(10, 15, seqName + \"String_Node_Str\", em, ss);\n } finally {\n closeEntityManager(em);\n }\n}\n"
"boolean canBatch(Batch other) {\n return hasOverlappingBitKeys(other) && constraintsMatch(other) && hasSameMeasureList(other) && haveSameStarAndAggregation(other);\n}\n"
"public static QueryDefinition cloneQuery(QueryDefinition query) {\n if (query == null) {\n return null;\n }\n IBaseQueryDefinition parent = query.getParentQuery();\n QueryDefinition newQuery = null;\n if (parent instanceof BaseQueryDefinition) {\n newQuery = new QueryDefinition((BaseQueryDefinition) parent, query.needAutoBinding());\n } else {\n newQuery = new QueryDefinition();\n }\n newQuery.getBindings().putAll(query.getBindings());\n newQuery.getFilters().addAll(query.getFilters());\n newQuery.getSorts().addAll(query.getSorts());\n newQuery.getSubqueries().addAll(query.getSubqueries());\n newQuery.getGroups().addAll(query.getGroups());\n newQuery.setUsesDetails(query.usesDetails());\n newQuery.setMaxRows(query.getMaxRows());\n newQuery.setDataSetName(query.getDataSetName());\n newQuery.setAutoBinding(query.needAutoBinding());\n newQuery.setColumnProjection(query.getColumnProjection());\n newQuery.setName(query.getName());\n newQuery.setIsSummaryQuery(query.isSummaryQuery());\n newQuery.setQueryExecutionHints(query.getQueryExecutionHints());\n return newQuery;\n}\n"
"private void addSensorInstance(ISensor sensor, Path path) {\n try {\n ISensor sensorInstance = sensor.create(path);\n if (sensorInstance != null) {\n ISensor oldSensor = sensorInstances.forcePut(path, sensorInstance);\n if (oldSensor != null) {\n removeSensorInstance(oldSensor);\n }\n HashMap<String, Object> properties = new HashMap<>();\n properties.put(SENSOR_DATA, sensorInstance);\n properties.put(SENSOR_SOURCE, path);\n properties.put(SENSOR_AVAILABLE, true);\n postSensorEvent(properties);\n log.debug(\"String_Node_Str\" + sensorInstance + \"String_Node_Str\" + path);\n }\n } catch (IOException e) {\n log.error(\"String_Node_Str\" + path, e);\n }\n}\n"
"protected DhcpEntryCommand generateDhcpEntryCommand2() {\n DhcpEntryCommand cmd = new DhcpEntryCommand(\"String_Node_Str\", null, \"String_Node_Str\", \"String_Node_Str\", true);\n cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, ROUTERNAME);\n cmd.setDuid(NetUtils.getDuidLL(cmd.getVmMac()));\n return cmd;\n}\n"
"public void onPlayerInteract(PlayerInteractEvent event) {\n if (event.hasBlock() && event.getClickedBlock().getType().equals(Material.STEP)) {\n ShowcaseItem showItem = Showcase.instance.getItemByBlock(event.getClickedBlock());\n ShowcasePlayer player = ShowcasePlayer.getPlayer(event.getPlayer());\n if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {\n if (!event.getPlayer().isSneaking()) {\n if (showItem != null) {\n showItem.getExtra().onRightClick(player);\n return;\n } else {\n return;\n }\n }\n if (event.getPlayer().getLocation().getBlock().getRelative(BlockFace.DOWN).getTypeId() == 0) {\n return;\n }\n if (event.hasBlock() && showItem == null && player.mayCreateHere(event.getClickedBlock())) {\n if (event.getItem() == null && !Showcase.hasOddItem()) {\n player.sendMessage(Showcase.tr(\"String_Node_Str\"));\n event.setCancelled(true);\n return;\n }\n if (event.getClickedBlock().getType().equals(Material.STEP)) {\n event.setCancelled(true);\n if (Showcase.instance.providers.size() == 1 && Showcase.instance.providers.containsKey(\"String_Node_Str\")) {\n Location loc = event.getClickedBlock().getLocation();\n Material mat = event.getItem().getType();\n short data = event.getItem().getDurability();\n Showcase.instance.showcasedItems.add(new ShowcaseItem(loc, mat, data, event.getPlayer().getName(), \"String_Node_Str\"));\n event.getPlayer().sendMessage(Showcase.tr(\"String_Node_Str\"));\n } else {\n try {\n ShowcaseCreationAssistant assistant = new ShowcaseCreationAssistant(event.getPlayer(), event.getItem(), event.getClickedBlock().getLocation());\n assistant.start();\n } catch (NoClassDefFoundError e) {\n for (StackTraceElement element : e.getCause().getStackTrace()) {\n System.out.println(element.getFileName() + \"String_Node_Str\" + element.getLineNumber());\n }\n }\n }\n }\n } else if (showItem != null) {\n if (showItem.getPlayer().equals(event.getPlayer().getName()) || player.hasPermission(\"String_Node_Str\", true)) {\n if (showItem.getExtra() == null) {\n showItem.remove();\n Showcase.instance.showcasedItems.remove(showItem);\n event.getPlayer().sendMessage(Showcase.tr(\"String_Node_Str\"));\n System.out.println(\"String_Node_Str\");\n return;\n }\n if (showItem.getExtra().onDestroy(player)) {\n showItem.remove();\n Showcase.instance.showcasedItems.remove(showItem);\n event.getPlayer().sendMessage(Showcase.tr(\"String_Node_Str\"));\n }\n } else {\n event.getPlayer().sendMessage(Showcase.tr(\"String_Node_Str\", showItem.getPlayer()));\n }\n event.setCancelled(true);\n }\n }\n if (event.getAction().equals(Action.LEFT_CLICK_BLOCK)) {\n if (showItem != null) {\n if (showItem.getExtra() != null)\n showItem.getExtra().onClick(player);\n }\n }\n }\n}\n"
"public static void enforcePartitionTableWarmup(MapReduceService mapReduceService) throws TimeoutException {\n InternalPartitionService partitionService = mapReduceService.getNodeEngine().getPartitionService();\n InternalPartition[] partitions = partitionService.getPartitions();\n long startTime = Clock.currentTimeMillis();\n for (InternalPartition partition : partitions) {\n while (partitionService.getPartition(partition.getPartitionId()).getOwner() == null) {\n try {\n Thread.sleep(RETRY_PARTITION_TABLE_MILLIS);\n } catch (Exception ignore) {\n EmptyStatement.ignore(ignore);\n }\n if (Clock.currentTimeMillis() - startTime > PARTITION_READY_TIMEOUT) {\n throw new TimeoutException(\"String_Node_Str\");\n }\n }\n }\n}\n"
"protected final boolean isCurrentlyMatchingAll() {\n return currentMatcher == Matchers.trueMatcher();\n}\n"
"public boolean onCreateOptionsMenu(Menu menu) {\n this.menu = menu;\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n}\n"
"protected void readLine(String line, DeckCardLists deckList) {\n if (line.length() == 0 || line.startsWith(\"String_Node_Str\")) {\n return;\n }\n boolean sideboard = false;\n if (line.startsWith(\"String_Node_Str\")) {\n line = line.substring(3).trim();\n sideboard = true;\n }\n int delim = line.indexOf(' ');\n String lineNum = line.substring(0, delim).trim();\n String setCode = \"String_Node_Str\";\n if (line.indexOf('[') != -1) {\n int setStart = line.indexOf('[') + 1;\n int setEnd = line.indexOf(']');\n setCode = line.substring(setStart, setEnd).trim();\n delim = setEnd;\n }\n String lineName = line.substring(delim + 1).trim();\n try {\n int num = Integer.parseInt(lineNum);\n List<CardInfo> cards = null;\n if (!setCode.isEmpty()) {\n CardCriteria criteria = new CardCriteria();\n criteria.name(lineName);\n cards = CardRepository.instance.findCards(criteria);\n }\n if (cards.isEmpty()) {\n sbMessage.append(\"String_Node_Str\").append(lineName).append(\"String_Node_Str\").append(lineCount).append(\"String_Node_Str\");\n } else {\n Random random = new Random();\n for (int i = 0; i < num; i++) {\n CardInfo cardInfo = cards.get(random.nextInt(cards.size()));\n if (!sideboard) {\n deckList.getCards().add(new DeckCardInfo(cardInfo.getName(), cardInfo.getCardNumber(), cardInfo.getSetCode()));\n } else {\n deckList.getSideboard().add(new DeckCardInfo(cardInfo.getName(), cardInfo.getCardNumber(), cardInfo.getSetCode()));\n }\n }\n }\n } catch (NumberFormatException nfe) {\n sbMessage.append(\"String_Node_Str\").append(lineNum).append(\"String_Node_Str\").append(lineCount).append(\"String_Node_Str\");\n }\n}\n"
"public void onRunAllButton() {\n final FormStylePopup pop = new FormStylePopup();\n final TextBox sessionNameTextBox = new TextBox();\n pop.addAttribute(\"String_Node_Str\" + \"String_Node_Str\", sessionNameTextBox);\n Button ok = new Button(\"String_Node_Str\");\n ok.addClickHandler(new ClickHandler() {\n public void onClick(ClickEvent event) {\n if (sessionNameTextBox.getText() == null || \"String_Node_Str\".equals(sessionNameTextBox.getText())) {\n Window.alert(TestScenarioConstants.INSTANCE.PleaseInputSessionName());\n return;\n }\n BusyPopup.showMessage(TestScenarioConstants.INSTANCE.BuildingAndRunningScenario());\n scenarioService.call(new RemoteCallback<Void>() {\n public void callback(Void v) {\n pop.hide();\n BusyPopup.close();\n }\n }, new HasBusyIndicatorDefaultErrorCallback(BulkRunTestScenarioEditor.this)).runAllScenarios(path, sessionNameTextBox.getText());\n }\n }, new HasBusyIndicatorDefaultErrorCallback(BulkRunTestScenarioEditor.this)).runAllScenarios(path);\n}\n"
"public static String addTypeForMavenUri(String uri, String moduleName) {\n MavenArtifact parseMvnUrl = MavenUrlHelper.parseMvnUrl(uri, false);\n if (parseMvnUrl != null && parseMvnUrl.getType() == null) {\n if (moduleName != null && moduleName.lastIndexOf(\"String_Node_Str\") != -1) {\n parseMvnUrl.setType(moduleName.substring(moduleName.lastIndexOf(\"String_Node_Str\") + 1, moduleName.length()));\n } else {\n parseMvnUrl.setType(MavenConstants.TYPE_JAR);\n }\n uri = MavenUrlHelper.generateMvnUrl(parseMvnUrl.getRepositoryUrl(), parseMvnUrl.getGroupId(), parseMvnUrl.getArtifactId(), parseMvnUrl.getVersion(), parseMvnUrl.getType(), parseMvnUrl.getClassifier());\n }\n return uri;\n}\n"
"public void setSelectionInterval(int index0, int index1) {\n if (!enabled)\n return;\n swingThreadSource.getReadWriteLock().writeLock().lock();\n try {\n listSelection.setSelection(index0, index1);\n } finally {\n swingThreadSource.getReadWriteLock().writeLock().unlock();\n }\n}\n"
"public void testClosureStyleFunctionBind() {\n typeCheck(LINE_JOINER.join(CLOSURE_BASE, \"String_Node_Str\"), NewTypeInference.GOOG_BIND_EXPECTS_FUNCTION);\n typeCheck(LINE_JOINER.join(CLOSURE_BASE, \"String_Node_Str\", \"String_Node_Str\"), NewTypeInference.WRONG_ARGUMENT_COUNT);\n typeCheck(LINE_JOINER.join(CLOSURE_BASE, \"String_Node_Str\", \"String_Node_Str\"), NewTypeInference.WRONG_ARGUMENT_COUNT);\n typeCheck(LINE_JOINER.join(CLOSURE_BASE, \"String_Node_Str\", \"String_Node_Str\"), NewTypeInference.INVALID_THIS_TYPE_IN_BIND);\n typeCheck(LINE_JOINER.join(CLOSURE_BASE, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), NewTypeInference.INVALID_ARGUMENT_TYPE);\n typeCheck(LINE_JOINER.join(CLOSURE_BASE, \"String_Node_Str\", \"String_Node_Str\"), NewTypeInference.INVALID_ARGUMENT_TYPE);\n typeCheck(LINE_JOINER.join(CLOSURE_BASE, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), NewTypeInference.INVALID_ARGUMENT_TYPE);\n typeCheck(LINE_JOINER.join(CLOSURE_BASE, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n typeCheck(LINE_JOINER.join(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), NewTypeInference.INVALID_OPERAND_TYPE);\n typeCheck(\"String_Node_Str\");\n typeCheck(\"String_Node_Str\");\n}\n"
"public void testDGM44() {\n String contents = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n int offset = contents.lastIndexOf(\"String_Node_Str\");\n assertType(contents, offset, offset + 2, \"String_Node_Str\");\n}\n"
"public boolean onTouchEvent(MotionEvent event) {\n if (event.getAction() == MotionEvent.ACTION_DOWN || event.getAction() == MotionEvent.ACTION_POINTER_DOWN) {\n Log.i(\"String_Node_Str\", String.format(\"String_Node_Str\", event.getPointerCount()));\n if (mGame.getState() == Game.State.IN_PROGRESS) {\n for (int i = 0; i < event.getPointerCount(); i++) {\n float x = event.getX(i);\n float y = event.getY(i);\n Log.i(\"String_Node_Str\", String.format(\"String_Node_Str\", x, y));\n int numBuildTargets = Player.BuildTarget.values().length - 1;\n int selection = numBuildTargets;\n if (mRotation % 2 == 0) {\n selection = (int) (x * numBuildTargets / getWidth());\n } else {\n selection = (numBuildTargets - 1) - (int) (y * numBuildTargets / getHeight());\n }\n Log.i(\"String_Node_Str\", String.format(\"String_Node_Str\", selection));\n Player.BuildTarget buildTarget = Player.BuildTarget.NONE;\n if (selection < numBuildTargets) {\n buildTarget = Player.BuildTarget.values()[selection];\n }\n mGame.setBuildTarget(0, buildTarget);\n }\n } else {\n mGame.restart();\n }\n }\n return true;\n}\n"
"public void startData(IDataContent data) {\n HyperlinkDef url = parseHyperLink(data);\n addData(data.getGenerateBy(), data.getComputedStyle(), url, data.getText());\n}\n"
"public void initialize(Class<K> keyClass, Class<T> persistentClass, Properties properties) {\n super.initialize(keyClass, persistentClass, properties);\n CachingProvider cachingProvider = Caching.getCachingProvider(properties.getProperty(GORA_DEFAULT_JCACHE_PROVIDER_KEY));\n if (properties.getProperty(JCACHE_CACHE_NAMESPACE_PROPERTY_KEY) != null) {\n goraCacheNamespace = properties.getProperty(JCACHE_CACHE_NAMESPACE_PROPERTY_KEY);\n }\n try {\n this.persistentDataStore = DataStoreFactory.getDataStore(keyClass, persistentClass, new Configuration());\n } catch (GoraException ex) {\n LOG.error(\"String_Node_Str\", ex);\n }\n if (properties.getProperty(GORA_DEFAULT_JCACHE_PROVIDER_KEY).contains(HAZELCAST_SERVER_CACHE_PROVIDER_IDENTIFIER)) {\n Config config = new ClasspathXmlConfig(properties.getProperty(GORA_DEFAULT_JCACHE_HAZELCAST_CONFIG_KEY));\n hazelcastInstance = Hazelcast.newHazelcastInstance(config);\n } else {\n try {\n ClientConfig config = new XmlClientConfigBuilder(properties.getProperty(GORA_DEFAULT_JCACHE_HAZELCAST_CONFIG_KEY)).build();\n hazelcastInstance = HazelcastClient.newHazelcastClient(config);\n } catch (IOException ex) {\n LOG.error(\"String_Node_Str\", ex);\n }\n }\n Properties providerProperties = new Properties();\n providerProperties.setProperty(HazelcastCachingProvider.HAZELCAST_INSTANCE_NAME, hazelcastInstance.getName());\n try {\n manager = cachingProvider.getCacheManager(new URI(goraCacheNamespace), null, providerProperties);\n } catch (URISyntaxException ex) {\n LOG.error(\"String_Node_Str\", ex);\n manager = cachingProvider.getCacheManager();\n }\n if (((properties.getProperty(JCACHE_AUTO_CREATE_CACHE_PROPERTY_KEY) != null) && Boolean.valueOf(properties.getProperty(JCACHE_AUTO_CREATE_CACHE_PROPERTY_KEY))) || ((manager.getCache(super.getPersistentClass().getSimpleName(), keyClass, persistentClass) == null))) {\n cacheEntryList = new ConcurrentSkipListSet<>();\n cacheConfig = new CacheConfig<K, T>();\n cacheConfig.setTypes(keyClass, persistentClass);\n if (properties.getProperty(JCACHE_READ_THROUGH_PROPERTY_KEY) != null) {\n cacheConfig.setReadThrough(Boolean.valueOf(properties.getProperty(JCACHE_READ_THROUGH_PROPERTY_KEY)));\n } else {\n cacheConfig.setReadThrough(true);\n }\n if (properties.getProperty(JCACHE_WRITE_THROUGH_PROPERTY_KEY) != null) {\n cacheConfig.setWriteThrough(Boolean.valueOf(properties.getProperty(JCACHE_WRITE_THROUGH_PROPERTY_KEY)));\n } else {\n cacheConfig.setWriteThrough(true);\n }\n if (properties.getProperty(JCACHE_STORE_BY_VALUE_PROPERTY_KEY) != null) {\n cacheConfig.setStoreByValue(Boolean.valueOf(properties.getProperty(JCACHE_STORE_BY_VALUE_PROPERTY_KEY)));\n }\n if (properties.getProperty(JCACHE_STATISTICS_PROPERTY_KEY) != null) {\n cacheConfig.setStatisticsEnabled(Boolean.valueOf(properties.getProperty(JCACHE_STATISTICS_PROPERTY_KEY)));\n }\n if (properties.getProperty(JCACHE_MANAGEMENT_PROPERTY_KEY) != null) {\n cacheConfig.setStatisticsEnabled(Boolean.valueOf(properties.getProperty(JCACHE_MANAGEMENT_PROPERTY_KEY)));\n }\n if (properties.getProperty(JCACHE_EVICTION_POLICY_PROPERTY_KEY) != null) {\n cacheConfig.getEvictionConfig().setEvictionPolicy(EvictionPolicy.valueOf(properties.getProperty(JCACHE_EVICTION_POLICY_PROPERTY_KEY)));\n }\n if (properties.getProperty(JCACHE_EVICTION_MAX_SIZE_POLICY_PROPERTY_KEY) != null) {\n cacheConfig.getEvictionConfig().setMaximumSizePolicy(EvictionConfig.MaxSizePolicy.valueOf(properties.getProperty(JCACHE_EVICTION_MAX_SIZE_POLICY_PROPERTY_KEY)));\n }\n if (properties.getProperty(JCACHE_EVICTION_SIZE_PROPERTY_KEY) != null) {\n cacheConfig.getEvictionConfig().setSize(Integer.valueOf(properties.getProperty(JCACHE_EVICTION_SIZE_PROPERTY_KEY)));\n }\n if (properties.getProperty(JCACHE_EXPIRE_POLICY_PROPERTY_KEY) != null) {\n String expiryPolicyIdentifier = properties.getProperty(JCACHE_EXPIRE_POLICY_PROPERTY_KEY);\n if (expiryPolicyIdentifier.equals(JCACHE_ACCESSED_EXPIRY_IDENTIFIER)) {\n cacheConfig.setExpiryPolicyFactory(FactoryBuilder.factoryOf(new AccessedExpiryPolicy(new Duration(TimeUnit.SECONDS, Integer.valueOf(properties.getProperty(JCACHE_EXPIRE_POLICY_DURATION_PROPERTY_KEY))))));\n } else if (expiryPolicyIdentifier.equals(JCACHE_CREATED_EXPIRY_IDENTIFIER)) {\n cacheConfig.setExpiryPolicyFactory(FactoryBuilder.factoryOf(new CreatedExpiryPolicy(new Duration(TimeUnit.SECONDS, Integer.valueOf(properties.getProperty(JCACHE_EXPIRE_POLICY_DURATION_PROPERTY_KEY))))));\n } else if (expiryPolicyIdentifier.equals(JCACHE_MODIFIED_EXPIRY_IDENTIFIER)) {\n cacheConfig.setExpiryPolicyFactory(FactoryBuilder.factoryOf(new ModifiedExpiryPolicy(new Duration(TimeUnit.SECONDS, Integer.valueOf(properties.getProperty(JCACHE_EXPIRE_POLICY_DURATION_PROPERTY_KEY))))));\n } else if (expiryPolicyIdentifier.equals(JCACHE_TOUCHED_EXPIRY_IDENTIFIER)) {\n cacheConfig.setExpiryPolicyFactory(FactoryBuilder.factoryOf(new TouchedExpiryPolicy(new Duration(TimeUnit.SECONDS, Integer.valueOf(properties.getProperty(JCACHE_EXPIRE_POLICY_DURATION_PROPERTY_KEY))))));\n }\n }\n if (properties.getProperty(HAZELCAST_CACHE_IN_MEMORY_FORMAT_PROPERTY_KEY) != null) {\n String inMemoryFormat = properties.getProperty(HAZELCAST_CACHE_IN_MEMORY_FORMAT_PROPERTY_KEY);\n if (inMemoryFormat.equals(HAZELCAST_CACHE_BINARY_IN_MEMORY_FORMAT_IDENTIFIER) || inMemoryFormat.equals(HAZELCAST_CACHE_OBJECT_IN_MEMORY_FORMAT_IDENTIFIER) || inMemoryFormat.equals(HAZELCAST_CACHE_NATIVE_IN_MEMORY_FORMAT_IDENTIFIER)) {\n cacheConfig.setInMemoryFormat(InMemoryFormat.valueOf(inMemoryFormat));\n }\n }\n cacheConfig.setCacheLoaderFactory(JCacheCacheFactoryBuilder.factoryOfCacheLoader(this.persistentDataStore, keyClass, persistentClass));\n cacheConfig.setCacheWriterFactory(JCacheCacheFactoryBuilder.factoryOfCacheWriter(this.persistentDataStore, keyClass, persistentClass));\n cache = manager.createCache(persistentClass.getSimpleName(), cacheConfig).unwrap(ICache.class);\n } else {\n cache = manager.getCache(super.getPersistentClass().getSimpleName(), keyClass, persistentClass).unwrap(ICache.class);\n this.populateLocalCacheEntrySet(cache);\n this.populateLocalCacheConfig(cache);\n }\n LOG.info(\"String_Node_Str\");\n}\n"
"public void postInit(FMLPostInitializationEvent event) {\n SteamcraftRecipes.registerCasting();\n if (Config.enablePipe) {\n MinecraftForge.EVENT_BUS.register(SteamcraftBlocks.pipe);\n }\n ItemSmashedOre iso = (ItemSmashedOre) SteamcraftItems.smashedOre;\n iso.registerDusts();\n iso.addSmelting();\n iso.registerDusts();\n SteamcraftItems.reregisterPlates();\n SteamcraftRecipes.registerDustLiquids();\n CrossMod.postInit(event);\n SteamcraftBook.registerBookResearch();\n long start = System.nanoTime();\n String[] ores = OreDictionary.getOreNames();\n for (String s : ores) {\n ArrayList<ItemStack> stacks = OreDictionary.getOres(s);\n for (ItemStack stack : stacks) {\n OreDictHelper.initializeOreDicts(s, stack);\n }\n }\n long end = System.nanoTime();\n int time = (int) (end - start) / 1000000;\n FMLLog.info(\"String_Node_Str\" + \"String_Node_Str\", OreDictHelper.stones.size(), OreDictHelper.nuggets.size(), OreDictHelper.ingots.size(), OreDictHelper.leaves.size(), time);\n}\n"
"public long append(byte[] messageContent) {\n boolean isNeedNewSegmentFile = false;\n int segmentSize = startOffsetSegmentMap.size();\n try {\n if (segmentSize == 0) {\n isNeedNewSegmentFile = true;\n } else {\n Segment lastSegment = startOffsetSegmentMap.lastEntry().getValue();\n if (!lastSegment.isCanWrite()) {\n isNeedNewSegmentFile = true;\n } else {\n int maxSegmentSize = GlobalConf.getInstance().getMaxSegmentSize();\n if (lastSegment.getFileSize() + messageContent.length > maxSegmentSize) {\n isNeedNewSegmentFile = true;\n }\n lastSegment.close();\n lastSegment.setCanWrite(false);\n String newFileName = String.format(\"String_Node_Str\", lastSegment.getStartOffset(), lastSegment.getEndOffset());\n String newFullFileName = segmentDir + File.separator + newFileName;\n File newFile = new File(newFullFileName);\n newFile.createNewFile();\n String oldFullFileName = segmentDir + File.separator + lastSegment.getFileName();\n File oldFile = new File(oldFullFileName);\n oldFile.renameTo(newFile);\n lastSegment.setFileName(newFileName);\n lastSegment.setRandomAccessFile(RaftFileUtils.openFile(segmentDir, newFileName, \"String_Node_Str\"));\n lastSegment.setChannel(lastSegment.getRandomAccessFile().getChannel());\n }\n }\n Segment newSegment;\n if (isNeedNewSegmentFile) {\n long newStartOffset = getLastEndOffset();\n String newSegmentFileName = String.format(\"String_Node_Str\", newStartOffset);\n String newFullFileName = segmentDir + File.separator + newSegmentFileName;\n File newSegmentFile = new File(newFullFileName);\n if (!newSegmentFile.exists()) {\n newSegmentFile.createNewFile();\n }\n newSegment = new Segment(segmentDir, newSegmentFileName);\n } else {\n newSegment = startOffsetSegmentMap.lastEntry().getValue();\n }\n return newSegment.append(messageContent);\n } catch (IOException ex) {\n throw new RuntimeException(\"String_Node_Str\" + ex.getMessage());\n }\n}\n"
"public boolean isScheduleAllowed(String id) {\n Boolean canSchedule = isScheduleAllowed();\n if (canSchedule) {\n Map<String, Serializable> metadata = getRepository().getFileMetadata(id);\n if (metadata.containsKey(\"String_Node_Str\")) {\n canSchedule = Boolean.parseBoolean((String) metadata.get(\"String_Node_Str\"));\n }\n }\n return canSchedule;\n}\n"
"public boolean shouldExecute() {\n return this.entity.selfHoldingDrink(Drink.pinaColada);\n}\n"
"public void executeQuery(String queryParam, String resultFormatParam, OutputStream output, boolean datasetMode) throws IOException {\n OutputStream out = (output != null) ? output : System.out;\n QueryExecution qe = null;\n try {\n Query query = QueryFactory.create(queryParam, Syntax.syntaxARQ);\n if (datasetMode) {\n qe = QueryExecutionFactory.create(query, getDataset());\n } else {\n qe = QueryExecutionFactory.create(query, getJenaModel());\n }\n if (query.isSelectType()) {\n ResultSetFormat rsf = formatSymbols.get(resultFormatParam);\n if (rsf == null) {\n rsf = ResultSetFormat.syntaxText;\n }\n ResultSetFormatter.output(out, qe.execSelect(), rsf);\n } else if (query.isAskType()) {\n out.write((Boolean.toString(qe.execAsk()) + \"String_Node_Str\").getBytes());\n } else {\n Model resultModel = null;\n if (query.isConstructType()) {\n resultModel = qe.execConstruct();\n } else if (query.isDescribeType()) {\n resultModel = qe.execDescribe();\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n exportRdfToStream(resultModel, out, resultFormatParam);\n }\n } catch (QueryParseException e1) {\n try {\n executeUpdateQuery(queryParam, datasetMode);\n log.info(\"String_Node_Str\");\n } catch (QueryParseException e2) {\n log.error(\"String_Node_Str\" + queryParam);\n log.trace(\"String_Node_Str\", e1);\n log.trace(\"String_Node_Str\", e2);\n }\n } finally {\n if (qe != null) {\n qe.close();\n }\n }\n}\n"
"public void run() {\n try {\n final Connection lookForAliveConnection = client.getConnectionManager().lookForLiveConnection();\n if (lookForAliveConnection == null) {\n logger.log(Level.WARNING, \"String_Node_Str\");\n if (reconnection.get()) {\n interruptWaitingCalls();\n }\n } else {\n if (running) {\n enQueue(RECONNECT_CALL);\n }\n }\n } catch (IOException e) {\n logger.log(Level.WARNING, Thread.currentThread().getName() + \"String_Node_Str\" + e.getMessage(), e);\n } finally {\n reconnection.compareAndSet(true, false);\n }\n}\n"
"String formatCaseArgument(Word word) {\n return HtmlEscapers.htmlEscaper().escape(word.value);\n}\n"
"public boolean onTouchEvent(MotionEvent nativeMotionEvent) {\n if (mKeyboard == null)\n return false;\n final int action = MotionEventCompat.getActionMasked(nativeMotionEvent);\n final int pointerCount = MotionEventCompat.getPointerCount(nativeMotionEvent);\n final int oldPointerCount = mOldPointerCount;\n mOldPointerCount = pointerCount;\n if (pointerCount > 1)\n mLastTimeHadTwoFingers = SystemClock.elapsedRealtime();\n if (mTouchesAreDisabledTillLastFingerIsUp) {\n if (mOldPointerCount == 1 && (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP)) {\n mTouchesAreDisabledTillLastFingerIsUp = false;\n }\n return true;\n }\n if (!mHasDistinctMultitouch && pointerCount > 1 && oldPointerCount > 1) {\n return true;\n }\n if (!mMiniKeyboardPopup.isShowing() && mGestureDetector != null && mGestureDetector.onTouchEvent(nativeMotionEvent)) {\n Log.d(TAG, \"String_Node_Str\");\n mHandler.cancelKeyTimers();\n dismissKeyPreview();\n return true;\n }\n final long eventTime = nativeMotionEvent.getEventTime();\n final int index = MotionEventCompat.getActionIndex(nativeMotionEvent);\n final int id = nativeMotionEvent.getPointerId(index);\n final int x = (int) nativeMotionEvent.getX(index);\n final int y = (int) nativeMotionEvent.getY(index);\n if (mMiniKeyboard != null && mMiniKeyboardVisible) {\n final int miniKeyboardPointerIndex = nativeMotionEvent.findPointerIndex(mMiniKeyboardTrackerId);\n if (miniKeyboardPointerIndex >= 0 && miniKeyboardPointerIndex < pointerCount) {\n final int miniKeyboardX = (int) nativeMotionEvent.getX(miniKeyboardPointerIndex);\n final int miniKeyboardY = (int) nativeMotionEvent.getY(miniKeyboardPointerIndex);\n MotionEvent translated = generateMiniKeyboardMotionEvent(action, miniKeyboardX, miniKeyboardY, eventTime);\n mMiniKeyboard.onTouchEvent(translated);\n translated.recycle();\n }\n return true;\n }\n if (mHandler.isInKeyRepeat()) {\n if (action == MotionEvent.ACTION_MOVE) {\n return true;\n }\n final PointerTracker tracker = getPointerTracker(id);\n if (pointerCount > 1 && !tracker.isModifier()) {\n mHandler.cancelKeyRepeatTimer();\n }\n }\n if (!mHasDistinctMultitouch) {\n PointerTracker tracker = getPointerTracker(0);\n if (pointerCount == 1 && oldPointerCount == 2) {\n tracker.onDownEvent(x, y, eventTime);\n } else if (pointerCount == 2 && oldPointerCount == 1) {\n tracker.onUpEvent(tracker.getLastX(), tracker.getLastY(), eventTime);\n } else if (pointerCount == 1 && oldPointerCount == 1) {\n tracker.onTouchEvent(action, x, y, eventTime);\n } else {\n Log.w(TAG, \"String_Node_Str\" + pointerCount + \"String_Node_Str\" + oldPointerCount + \"String_Node_Str\");\n }\n return true;\n }\n if (action == MotionEvent.ACTION_MOVE) {\n for (int i = 0; i < pointerCount; i++) {\n PointerTracker tracker = getPointerTracker(nativeMotionEvent.getPointerId(i));\n tracker.onMoveEvent((int) nativeMotionEvent.getX(i), (int) nativeMotionEvent.getY(i), eventTime);\n }\n } else {\n PointerTracker tracker = getPointerTracker(id);\n sendOnXEvent(action, eventTime, x, y, tracker);\n }\n return true;\n}\n"
"public void fillActionBars(IActionBars actionBars) {\n super.fillActionBars(actionBars);\n CopyAction copyActionInstance = CopyAction.getInstance();\n actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyActionInstance);\n actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), PasteAction.getInstance());\n actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), DeleteAction.getInstance());\n TextActionHandler textActionHandler = new TextActionHandler(actionBars);\n textActionHandler.setCopyAction(CopyAction.getInstance());\n textActionHandler.setPasteAction(PasteAction.getInstance());\n textActionHandler.setDeleteAction(DeleteAction.getInstance());\n}\n"
"public BuildConfigModel buildModel(String configFilePath) {\n File configFile = new File(configFilePath);\n String rootPath = configFile.getParent();\n String configFileName = configFile.getName();\n BuildConfigModel model = new BuildConfigModel(configFilePath);\n List configFiles = new ArrayList();\n List importedFiles = new ArrayList();\n List badEntries = null;\n try {\n LstBuildConfigFileParser configParser = new LstBuildConfigFileParser(configFilePath);\n configParser.parseConfigFile(new File(configFilePath));\n configFiles = configParser.getFiles();\n importedFiles = configParser.getImportedFiles();\n badEntries = configParser.getProblemEntries();\n } catch (ConfigParser.ParseException pe) {\n IMessage message = new Message(pe.getMessage(), IMessage.ERROR, pe, new SourceLocation(pe.getFile(), pe.getLine(), 1));\n Ajde.getDefault().getMessageHandler().handleMessage(message);\n }\n List relativePaths = relativizeFilePaths(configFiles, rootPath);\n BuildConfigNode root = new BuildConfigNode(configFileName, BuildConfigNode.Kind.FILE_LST, rootPath);\n buildDirTree(root, rootPath, importedFiles, configFileName);\n model.setRoot(root);\n addFilesToDirTree(model, relativePaths, badEntries);\n pruneEmptyDirs(root);\n sortModel(model.getRoot(), ALPHABETICAL_COMPARATOR);\n addProblemEntries(root, badEntries);\n return model;\n}\n"
"public void fromDBObject(final DBObject dbObject, final MappedField mf, final Object entity, EntityCache cache, Mapper mapr) {\n try {\n if (mf.isMap()) {\n readMap(dbObject, mf, entity, cache, mapr);\n } else if (mf.isMultipleValues()) {\n readCollection(dbObject, mf, entity, cache, mapr);\n } else {\n Object dbVal = mf.getDbObjectValue(dbObject);\n if (dbVal != null) {\n boolean isDBObject = dbVal instanceof DBObject;\n if (isDBObject && (mapr.converters.hasDbObjectConverter(mf) || mapr.converters.hasDbObjectConverter(mf.getType()))) {\n mapr.converters.fromDBObject(((DBObject) dbVal), mf, entity);\n return;\n } else {\n Object refObj = null;\n if (mapr.converters.hasSimpleValueConverter(mf) || mapr.converters.hasSimpleValueConverter(mf.getType()))\n refObj = mapr.converters.decode(mf.getType(), dbVal, mf);\n else {\n refObj = mapr.getOptions().objectFactory.createInstance(mapr, mf, ((DBObject) dbVal));\n refObj = mapr.fromDb(((DBObject) dbVal), refObj, cache);\n }\n if (refObj != null) {\n mf.setFieldValue(entity, refObj);\n }\n }\n }\n }\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
"public static List<IRepositoryViewObject> findViewObjects(ERepositoryObjectType type, Item parentItem, IFolder folder, boolean useRepositoryViewObject, boolean withDeleted) {\n List<IRepositoryViewObject> viewObjects = new LinkedList<IRepositoryViewObject>();\n try {\n for (IResource res : folder.members()) {\n if (res instanceof IFolder) {\n if (!isDeletedFolder((IFolder) res) && !isSVNFolder((IFolder) res)) {\n IRepositoryViewObject folderObject = null;\n String resPath = parentItem.getState().getPath() + IPath.SEPARATOR + res.getName();\n folderObject = ContainerCacheService.get(type, resPath);\n if (folderObject == null) {\n folderObject = createFolderViewObject(type, res.getName(), parentItem, false);\n }\n viewObjects.add(folderObject);\n }\n }\n }\n List<IRepositoryViewObject> children = findViewObjectsInFolder(type, parentItem, useRepositoryViewObject, withDeleted);\n viewObjects.addAll(children);\n } catch (CoreException e) {\n log.error(e.getMessage(), e);\n }\n return viewObjects;\n}\n"
"private void initalizeChildren() throws BirtException {\n while (executor.hasNextChild()) {\n IReportItemExecutor childExecutor = (IReportItemExecutor) executor.getNextChild();\n childContent = childExecutor.execute();\n if (childContent == null) {\n childrenLayouts.add(null);\n } else {\n if (!executor.hasNextChild()) {\n childContent.setLastChild(true);\n } else {\n childContent.setLastChild(false);\n }\n ILayoutManager childLayout = engine.createLayoutManager(this, childContent, childExecutor, emitter);\n childrenLayouts.add(childLayout);\n }\n childrenExecutors.add(childExecutor);\n childrenFinished.add(Boolean.FALSE);\n }\n}\n"
"public void onReceive(Context context, Intent intent) {\n if (NetUtils.isConnected(getApplicationContext())) {\n restartActivity();\n }\n}\n"
"public static final ZonedDateTime tomorrowZonedDateTime() {\n return now().plus(1, ChronoUnit.DAYS);\n}\n"
"private void readProperties() {\n File f = new File(this.PROPERTIES_FILE);\n if (!f.exists() && !noRecurse) {\n System.out.println(\"String_Node_Str\");\n writeProperties();\n return;\n }\n Properties props = new java.util.Properties();\n try {\n FileInputStream fis = new FileInputStream(f);\n props.load(fis);\n fis.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n this.wtkPath = props.getProperty(this.WTK_PATH);\n this.newForm = props.getProperty(this.NEW_FORM);\n this.origJarDir = props.getProperty(this.ORIGINAL_JAR_DIR);\n openXMLWith = props.getProperty(this.OPEN_XML_WITH);\n openAtEnd = new Boolean(props.getProperty(this.OPEN_AT_END));\n}\n"
"public void check(MarkerList markers, IContext context, ElementType target) {\n if (this.type == null || !this.type.isResolved()) {\n return;\n }\n final IClass theClass = this.type.getTheClass();\n if (!theClass.hasModifier(Modifiers.ANNOTATION)) {\n markers.add(Markers.semantic(this.position, \"String_Node_Str\", this.type.getName()));\n return;\n }\n if (target == null) {\n return;\n }\n IClassMetadata metadata = theClass.getMetadata();\n if (!metadata.isTarget(target)) {\n Marker error = Markers.semantic(this.position, \"String_Node_Str\", this.type.getName());\n error.addInfo(Markers.getSemantic(\"String_Node_Str\", target));\n error.addInfo(Markers.getSemantic(\"String_Node_Str\", metadata.getTargets()));\n markers.add(error);\n }\n}\n"
"private PackedMap<Spec, Bounds> createGroupBounds() {\n Assoc<Spec, Bounds> assoc = Assoc.of(Spec.class, Bounds.class);\n for (int i = 0, N = getChildCount(); i < N; i++) {\n View c = getChildAt(i);\n LayoutParams lp = getLayoutParams(c);\n Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;\n Bounds bounds = spec.getAbsoluteAlignment(horizontal).getBounds();\n assoc.put(spec, bounds);\n }\n return assoc.pack();\n}\n"
"JMethod createConstructor(SourceInfo info, MethodBinding b) {\n JDeclaredType enclosingType = (JDeclaredType) get(b.declaringClass);\n JMethod method = new JConstructor(info, (JClassType) enclosingType, AccessModifier.fromMethodBinding(b));\n enclosingType.addMethod(method);\n int argPosition = 0;\n ReferenceBinding declaringClass = b.declaringClass;\n if (declaringClass.isNestedType() && !declaringClass.isStatic()) {\n if (declaringClass.syntheticEnclosingInstanceTypes() != null) {\n for (ReferenceBinding argType : declaringClass.syntheticEnclosingInstanceTypes()) {\n createParameter(info, argType, method, argPosition++);\n }\n }\n }\n argPosition = mapParameters(info, method, b, argPosition);\n if (declaringClass.isNestedType() && !declaringClass.isStatic()) {\n if (declaringClass.syntheticOuterLocalVariables() != null) {\n for (SyntheticArgumentBinding arg : declaringClass.syntheticOuterLocalVariables()) {\n createParameter(info, arg.type, method, argPosition++);\n }\n }\n }\n mapExceptions(method, b);\n if (b.isSynthetic()) {\n method.setSynthetic();\n }\n return method;\n}\n"
"public void putAll(Map<? extends K, ? extends V> map, ExpiryPolicy expiryPolicy) {\n final long start = System.nanoTime();\n ensureOpen();\n validateNotNull(map);\n ClientPartitionService partitionService = clientContext.getPartitionService();\n int partitionCount = partitionService.getPartitionCount();\n Map<Data, Boolean> markers = createHashMap(map.size());\n try {\n List<Map.Entry<Data, Data>>[] entriesPerPartition = groupDataToPartitions(map, partitionService, partitionCount);\n putToAllPartitionsAndWaitForCompletion(entriesPerPartition, expiryPolicy, start);\n } catch (Exception e) {\n throw rethrow(e);\n } finally {\n unmarkRemainingMarkedKeys(markers);\n }\n}\n"
"private void readValueUntilNewLine() {\n if (ignoreTrailingWhitespace) {\n while (length-- > 0 && ch != newLine) {\n output.appender.appendIgnoringWhitespaceAndPadding(ch);\n ch = input.nextChar();\n }\n } else {\n while (length-- > 0 && ch != newLine && ch != '\\0') {\n output.appender.appendIgnoringPadding(ch);\n ch = input.nextChar();\n }\n }\n}\n"
"public synchronized void deleteDatasets(Id.Namespace namespaceId) throws Exception {\n if (!exists(namespaceId)) {\n throw new NamespaceNotFoundException(namespaceId);\n }\n if (checkProgramsRunning(namespaceId.toEntityId())) {\n throw new NamespaceCannotBeDeletedException(namespaceId, String.format(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", namespaceId));\n }\n authorizerInstantiator.get().enforce(namespaceId.toEntityId(), SecurityRequestContext.toPrincipal(), Action.ADMIN);\n try {\n dsFramework.deleteAllInstances(namespaceId);\n } catch (DatasetManagementException | IOException e) {\n LOG.warn(\"String_Node_Str\", namespaceId, e);\n throw new NamespaceCannotBeDeletedException(namespaceId, e);\n }\n LOG.debug(\"String_Node_Str\", namespaceId);\n}\n"
"public static String toJsonString(Object obj) {\n if (obj == null) {\n return null;\n }\n BasicDBObject bdbo;\n if (obj instanceof DBObject) {\n bdbo = (BasicDBObject) obj;\n } else {\n DBObject dbo = MapperUtil.toDBObject(obj, true);\n bdbo = (BasicDBObject) dbo;\n }\n return bdbo.toString();\n}\n"
"public ExecutionResult execute(Item item) {\n ILibraryManagerService libService = null;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibraryManagerService.class)) {\n libService = (ILibraryManagerService) GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);\n }\n if (libService == null) {\n return null;\n }\n if (item instanceof HadoopClusterConnectionItem) {\n HadoopClusterConnectionItem hcItem = (HadoopClusterConnectionItem) item;\n HadoopClusterConnection connection = (HadoopClusterConnection) hcItem.getConnection();\n if (connection.getConfFile() == null) {\n String confJarName = HadoopParameterUtil.getConfsJarDefaultName(hcItem.getProperty().getId());\n File confsTempFolder = new File(HadoopConfsUtils.getConfsJarTempFolder());\n boolean retrieved = libService.retrieve(confJarName, confsTempFolder.getAbsolutePath(), false);\n File confJarFile = new File(confsTempFolder, confJarName);\n if (retrieved && confJarFile.exists()) {\n try {\n connection.setConfFile(FileUtils.readFileToByteArray(confJarFile));\n return ExecutionResult.SUCCESS_WITH_ALERT;\n } catch (Exception e) {\n ExceptionHandler.process(e);\n return ExecutionResult.FAILURE;\n }\n }\n }\n }\n return ExecutionResult.NOTHING_TO_DO;\n}\n"
"public synchronized List<HashMap<Long, Slicer>> getSlices() {\n List<HashMap<Long, Slicer>> slices = Collections.synchronizedList(this.slices);\n logger.error(\"String_Node_Str\" + slices.size());\n return slices;\n}\n"
"public void addHistoryToList(ArrayList<SearchStationData> items) {\n Cursor cursor = db.query(table, COLUMNS, null, null, null, null, KEY_USED + \"String_Node_Str\");\n while (cursor.moveToNext()) {\n SearchStationData station = new SearchStationData(cursor.getString(0), cursor.getString(1), cursor.getInt(2), new int[] { cursor.getInt(4), cursor.getInt(5) });\n boolean foundDuplicate = false;\n for (SearchStationData listStation : items) {\n if (station.stationId == listStation.stationId) {\n foundDuplicate = true;\n break;\n }\n }\n if (!foundDuplicate) {\n items.add(station);\n }\n }\n cursor.close();\n}\n"
"public void afterRun() {\n mapService.interceptAfterPut(name, dataValue);\n int eventType = dataOldValue == null ? EntryEvent.TYPE_ADDED : EntryEvent.TYPE_UPDATED;\n mapService.publishEvent(getCallerAddress(), name, eventType, dataKey, dataOldValue, dataValue);\n invalidateNearCaches();\n if (mapContainer.getMapConfig().isStatisticsEnabled()) {\n mapContainer.getMapOperationCounter().incrementPuts(Clock.currentTimeMillis() - getStartTime());\n }\n}\n"
"public RecordSource compileSource(JournalReaderFactory factory, CharSequence query) throws ParserException, JournalException {\n return resetAndCompile(factory, query);\n}\n"
"public void onAnimationEnd(Animator animation) {\n super.onAnimationEnd(animation);\n resetViews();\n if (listener != null)\n listener.onComplete();\n}\n"
"public void post() throws Exception {\n ClientDispatcher myClient = new ClientDispatcher();\n TransportImpl myTransport = new TransportImpl(null);\n myClient.init(myTransport);\n FDUtil.ensureFD(_tport1.getFD());\n FDUtil.ensureFD(_tport2.getFD());\n System.err.println(\"String_Node_Str\");\n for (int i = 0; i < 5; i++) {\n ByteBuffer myBuffer = ByteBuffer.allocate(4);\n myBuffer.putInt(i);\n Proposal myProp = new Proposal(\"String_Node_Str\", myBuffer.array());\n myClient.send(new Envelope(myProp), _tport2.getLocalAddress());\n VoteOutcome myEv = myClient.getNext(10000);\n Assert.assertFalse((myEv == null));\n Assert.assertTrue(myEv.getResult() == VoteOutcome.Reason.VALUE);\n Assert.assertTrue(myEv.getSeqNum() == i);\n }\n Thread.sleep(5000);\n System.err.println(\"String_Node_Str\");\n _node3 = new ServerDispatcher(new HowlLogger(_node3Log), Listener.NULL_LISTENER);\n _tport3 = new TransportImpl(new FailureDetectorImpl(5000, FailureDetectorImpl.OPEN_PIN));\n _node3.init(_tport3);\n _node3.getAcceptorLearner().setRecoveryGracePeriod(5000);\n FDUtil.ensureFD(_tport3.getFD());\n System.err.println(\"String_Node_Str\");\n ByteBuffer myBuffer = ByteBuffer.allocate(4);\n myBuffer.putInt(67);\n Proposal myProp = new Proposal(\"String_Node_Str\", myBuffer.array());\n myClient.send(new Envelope(myProp), _tport2.getLocalAddress());\n VoteOutcome myOutcome = myClient.getNext(10000);\n System.err.println(\"String_Node_Str\");\n Thread.sleep(15000);\n Assert.assertTrue(_node2.getAcceptorLearner().getLowWatermark().getSeqNum() != _node3.getAcceptorLearner().getLowWatermark().getSeqNum());\n Assert.assertFalse(_node3.getCore().getCommon().getNodeState().test(NodeState.State.RECOVERING));\n Thread.sleep(5000);\n System.err.println(\"String_Node_Str\");\n myTransport.terminate();\n}\n"
"public List<String> syncSetParam(String clusterName, Integer activeComputeNodeNum, Integer minComputeNodeNum, Integer maxComputeNodeNum, Boolean enableAuto, Priority ioPriority) throws Exception {\n ClusterEntity cluster = clusterEntityMgr.findByName(clusterName);\n ClusterRead clusterRead = getClusterByName(clusterName, false);\n if (cluster == null) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\");\n throw BddException.NOT_FOUND(\"String_Node_Str\", clusterName);\n }\n ValidationUtils.validateVersion(clusterEntityMgr, clusterName);\n clusterEntityMgr.cleanupActionError(clusterName);\n if (ioPriority != null) {\n prioritizeCluster(clusterName, ioPriority);\n }\n cluster = clusterEntityMgr.findByName(clusterName);\n if (enableAuto != null && enableAuto != cluster.getAutomationEnable()) {\n if (enableAuto && cluster.getDistroVendor().equalsIgnoreCase(Constants.MAPR_VENDOR)) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\");\n throw BddException.NOT_ALLOWED_SCALING(\"String_Node_Str\", clusterName);\n }\n cluster.setAutomationEnable(enableAuto);\n }\n if (minComputeNodeNum != null && minComputeNodeNum != cluster.getVhmMinNum()) {\n cluster.setVhmMinNum(minComputeNodeNum);\n }\n if (maxComputeNodeNum != null && maxComputeNodeNum != cluster.getVhmMaxNum()) {\n cluster.setVhmMaxNum(maxComputeNodeNum);\n }\n List<String> nodeGroupNames = new ArrayList<String>();\n if ((enableAuto != null || minComputeNodeNum != null || maxComputeNodeNum != null || activeComputeNodeNum != null) && !clusterRead.validateSetManualElasticity(nodeGroupNames)) {\n throw BddException.INVALID_PARAMETER(\"String_Node_Str\", clusterName);\n }\n if (activeComputeNodeNum != null) {\n if (!activeComputeNodeNum.equals(cluster.getVhmTargetNum())) {\n cluster.setVhmTargetNum(activeComputeNodeNum);\n }\n }\n if ((enableAuto != null) && !ClusterStatus.RUNNING.equals(cluster.getStatus())) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\" + cluster.getStatus() + \"String_Node_Str\");\n throw ClusterManagerException.SET_AUTO_ELASTICITY_NOT_ALLOWED_ERROR(clusterName, \"String_Node_Str\");\n }\n if (!ClusterStatus.RUNNING.equals(cluster.getStatus()) && !ClusterStatus.STOPPED.equals(cluster.getStatus())) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\" + cluster.getStatus() + \"String_Node_Str\");\n throw ClusterManagerException.SET_AUTO_ELASTICITY_NOT_ALLOWED_ERROR(clusterName, \"String_Node_Str\");\n }\n clusterEntityMgr.update(cluster);\n if (enableAuto != null || minComputeNodeNum != null || maxComputeNodeNum != null) {\n boolean success = clusteringService.setAutoElasticity(clusterName, false);\n if (!success) {\n throw ClusterManagerException.FAILED_TO_SET_AUTO_ELASTICITY_ERROR(clusterName, \"String_Node_Str\");\n }\n }\n if (enableAuto != null && !enableAuto && cluster.getVhmTargetNum() == null) {\n JobUtils.waitForManual(clusterName, executionService);\n }\n return nodeGroupNames;\n}\n"
"public void visitLocalVariable(final String name, final String desc, final String signature, final Label start, final Label end, final int index) {\n if (((start.status & labels.RESOLVED) != 0) && ((end.status & labels.RESOLVED) != 0)) {\n if (signature != null) {\n if (localVarType == null) {\n localVarType = new ByteVector();\n }\n ++localVarTypeCount;\n localVarType.putShort(start.position).putShort(end.position - start.position).putShort(cw.newUTF8(name)).putShort(cw.newUTF8(signature)).putShort(index);\n }\n ++localVarTypeCount;\n localVarType.putShort(start.position).putShort(end.position - start.position).putShort(cw.newUTF8(name)).putShort(cw.newUTF8(signature)).putShort(index);\n }\n if (localVar == null) {\n localVar = new ByteVector();\n }\n ++localVarCount;\n localVar.putShort(start.position).putShort(end.position - start.position).putShort(cw.newUTF8(name)).putShort(cw.newUTF8(desc)).putShort(index);\n if (compute != NOTHING) {\n char c = desc.charAt(0);\n int n = index + (c == 'J' || c == 'D' ? 2 : 1);\n if (n > maxLocals) {\n maxLocals = n;\n }\n }\n}\n"
"public void onCreateNode(ChildAssociationRef childAssocRef) {\n recordsManagementAuditService.auditEvent(childAssocRef.getChildRef(), getName());\n}\n"
"public void run() {\n String accountName = AccountUtils.getActiveAccountName(BaseActivity.this);\n if (TextUtils.isEmpty(accountName)) {\n onRefreshingStateChanged(false);\n mManualSyncRequest = false;\n return;\n }\n Account account = new Account(accountName, GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);\n boolean syncActive = ContentResolver.isSyncActive(account, ScheduleContract.CONTENT_AUTHORITY);\n onRefreshingStateChanged(syncActive);\n}\n"
"public List<Line> buildLine(String criteria) {\n List<Line> lines = new ArrayList<Line>();\n if (criteria != null) {\n String[] criterias = criteria.split(\"String_Node_Str\");\n for (String cria : criterias) {\n String[] values = cria.split(\"String_Node_Str\");\n List<String> list = new ArrayList<String>();\n list.addAll(Arrays.asList(values));\n if (list.size() == 3) {\n list.add(\"String_Node_Str\");\n }\n Line line = new Line(columns, list.toArray(new String[list.size()]));\n lines.add(line);\n }\n }\n return lines;\n}\n"
"public boolean countFlattenedDown(short x, short y) {\n int i = getIdx(x, y);\n temporaryFlatened[i]--;\n if (temporaryFlatened[i] <= -30) {\n temporaryFlatened[i] = 0;\n setLandscapeTypeAt(x, y, ELandscapeType.GRASS);\n return true;\n } else {\n return false;\n }\n}\n"
"public byte[] isIdentify(Tx tx) {\n HashSet<String> result = new HashSet<String>();\n for (In in : tx.getIns()) {\n String queryPrevTxHashSql = \"String_Node_Str\";\n final HashSet<String> each = new HashSet<String>();\n this.execQueryOneRecord(this.getReadDb(), queryPrevTxHashSql, new String[] { Base58.encode(in.getPrevTxHash()), Integer.toString(in.getPrevOutSn()) }, new Function<ICursor, Void>() {\n\n public Void apply(ICursor c) {\n each.add(c.getString(0));\n return null;\n }\n });\n each.remove(Base58.encode(tx.getTxHash()));\n result.retainAll(each);\n if (result.size() == 0) {\n break;\n }\n }\n if (result.size() == 0) {\n return new byte[0];\n } else {\n try {\n return Base58.decode((String) result.toArray()[0]);\n } catch (AddressFormatException e) {\n e.printStackTrace();\n return new byte[0];\n }\n }\n}\n"
"private void fixStructuredPostalComponents(ContentValues augmented, ContentValues update) {\n final String unstruct = update.getAsString(StructuredPostal.FORMATTED_ADDRESS);\n final boolean touchedUnstruct = !TextUtils.isEmpty(unstruct);\n final boolean touchedStruct = !areAllEmpty(update, STRUCTURED_FIELDS);\n final PostalSplitter.Postal postal = new PostalSplitter.Postal();\n if (touchedUnstruct && !touchedStruct) {\n final String unstruct = update.getAsString(StructuredPostal.FORMATTED_ADDRESS);\n mSplitter.split(postal, unstruct);\n postal.toValues(update);\n } else if (!touchedUnstruct && touchedStruct) {\n postal.fromValues(augmented);\n final String joined = mSplitter.join(postal);\n update.put(StructuredPostal.FORMATTED_ADDRESS, joined);\n }\n}\n"
"public void perform() {\n vme.shriek();\n}\n"
"public static String print(JSDocInfo info) {\n boolean multiline = false;\n List<String> parts = new ArrayList<>();\n parts.add(\"String_Node_Str\");\n if (info.isExport()) {\n parts.add(\"String_Node_Str\");\n } else if (info.getVisibility() != null && info.getVisibility() != Visibility.INHERITED) {\n parts.add(\"String_Node_Str\" + info.getVisibility().toString().toLowerCase());\n }\n if (info.isConstant() && !info.isDefine()) {\n parts.add(\"String_Node_Str\");\n }\n if (info.makesDicts()) {\n parts.add(\"String_Node_Str\");\n }\n if (info.makesStructs()) {\n parts.add(\"String_Node_Str\");\n }\n if (info.makesUnrestricted()) {\n parts.add(\"String_Node_Str\");\n }\n if (info.isConstructor()) {\n parts.add(\"String_Node_Str\");\n }\n if (info.isInterface() && !info.usesImplicitMatch()) {\n parts.add(\"String_Node_Str\");\n }\n if (info.isInterface() && info.usesImplicitMatch()) {\n parts.add(\"String_Node_Str\");\n }\n if (info.hasBaseType()) {\n multiline = true;\n Node typeNode = stripBang(info.getBaseType().getRoot());\n parts.add(buildAnnotationWithType(\"String_Node_Str\", typeNode));\n }\n for (JSTypeExpression type : info.getExtendedInterfaces()) {\n multiline = true;\n Node typeNode = stripBang(type.getRoot());\n parts.add(buildAnnotationWithType(\"String_Node_Str\", typeNode));\n }\n for (JSTypeExpression type : info.getImplementedInterfaces()) {\n multiline = true;\n Node typeNode = stripBang(type.getRoot());\n parts.add(buildAnnotationWithType(\"String_Node_Str\", typeNode));\n }\n if (info.hasThisType()) {\n multiline = true;\n Node typeNode = stripBang(info.getThisType().getRoot());\n parts.add(buildAnnotationWithType(\"String_Node_Str\", typeNode));\n }\n if (info.getParameterCount() > 0) {\n multiline = true;\n for (String name : info.getParameterNames()) {\n parts.add(\"String_Node_Str\" + buildParamType(name, info.getParameterType(name)));\n }\n }\n if (info.hasReturnType()) {\n multiline = true;\n parts.add(buildAnnotationWithType(\"String_Node_Str\", info.getReturnType()));\n }\n if (!info.getThrownTypes().isEmpty()) {\n parts.add(buildAnnotationWithType(\"String_Node_Str\", info.getThrownTypes().get(0)));\n }\n ImmutableList<String> names = info.getTemplateTypeNames();\n if (!names.isEmpty()) {\n parts.add(\"String_Node_Str\" + Joiner.on(',').join(names));\n multiline = true;\n }\n if (info.isOverride()) {\n parts.add(\"String_Node_Str\");\n }\n if (info.hasType() && !info.isDefine()) {\n if (info.isInlineType()) {\n parts.add(typeNode(info.getType().getRoot()));\n } else {\n parts.add(buildAnnotationWithType(\"String_Node_Str\", info.getType()));\n }\n }\n if (info.isDefine()) {\n parts.add(buildAnnotationWithType(\"String_Node_Str\", info.getType()));\n }\n if (info.hasTypedefType()) {\n parts.add(buildAnnotationWithType(\"String_Node_Str\", info.getTypedefType()));\n }\n if (info.hasEnumParameterType()) {\n parts.add(buildAnnotationWithType(\"String_Node_Str\", info.getEnumParameterType()));\n }\n Set<String> suppressions = info.getSuppressions();\n if (!suppressions.isEmpty()) {\n String[] arr = suppressions.toArray(new String[0]);\n Arrays.sort(arr, Ordering.<String>natural());\n parts.add(\"String_Node_Str\" + Joiner.on(',').join(Arrays.asList(arr)) + \"String_Node_Str\");\n multiline = true;\n }\n if (info.isDeprecated()) {\n parts.add(\"String_Node_Str\" + info.getDeprecationReason());\n multiline = true;\n }\n parts.add(\"String_Node_Str\");\n StringBuilder sb = new StringBuilder();\n if (multiline) {\n Joiner.on(\"String_Node_Str\").appendTo(sb, parts);\n } else {\n Joiner.on(\"String_Node_Str\").appendTo(sb, parts);\n }\n sb.append((multiline) ? \"String_Node_Str\" : \"String_Node_Str\");\n return sb.toString();\n}\n"
"private void setRemoteReceivePreset(QualityPreset preset) throws OperationFailedException {\n if (preset.compareTo(getPreferredSendPreset()) > 0)\n this.preset = getPreferredSendPreset();\n else {\n this.preset = preset;\n}\n"
"private void buildPaths(final HE_Selection cutEdges) {\n paths = new FastTable<HE_Path>();\n if (cutEdges.getNumberOfEdges() == 0) {\n return;\n }\n final List<HE_Halfedge> edges = new FastTable<HE_Halfedge>();\n for (final HE_Halfedge he : cutEdges.getEdgesAsList()) {\n final HE_Face f = he.getFace();\n if (WB_Classify.classifyPointToPlane(P, f.getFaceCenter()) == WB_Classification.BACK) {\n edges.add(he.getPair());\n } else {\n edges.add(he);\n }\n }\n while (edges.size() > 0) {\n final List<HE_Halfedge> pathedges = new FastTable<HE_Halfedge>();\n HE_Halfedge current = edges.get(0);\n pathedges.add(current);\n boolean loop = false;\n for (int i = 0; i < edges.size(); i++) {\n if (edges.get(i).getVertex() == current.getEndVertex()) {\n if (i > 0) {\n current = edges.get(i);\n pathedges.add(current);\n i = 0;\n } else {\n loop = true;\n break;\n }\n }\n }\n if (!loop) {\n final List<HE_Halfedge> reversepathedges = new FastTable<HE_Halfedge>();\n current = edges.get(0);\n for (int i = 0; i < edges.size(); i++) {\n if (edges.get(i).getEndVertex() == current.getVertex()) {\n if (i > 0) {\n current = edges.get(i);\n reversepathedges.add(current);\n i = 0;\n }\n }\n }\n final List<HE_Halfedge> finalpathedges = new FastTable<HE_Halfedge>();\n for (int i = reversepathedges.size() - 1; i > -1; i--) {\n finalpathedges.add(reversepathedges.get(i));\n }\n finalpathedges.addAll(pathedges);\n paths.add(new HE_Path(finalpathedges, loop));\n edges.removeAll(finalpathedges);\n } else {\n paths.add(new HE_Path(pathedges, loop));\n edges.removeAll(pathedges);\n }\n }\n}\n"
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.activity_enterpin);\n mTextAttempts = (TextView) findViewById(R.id.attempts);\n mTextTitle = (TextView) findViewById(R.id.title);\n mIndicatorDots = (IndicatorDots) findViewById(R.id.indicator_dots);\n mImageViewFingerView = (AppCompatImageView) findViewById(R.id.fingerView);\n mTextFingerText = (TextView) findViewById(R.id.fingerText);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n showFingerprint = (AnimatedVectorDrawable) getDrawable(R.drawable.show_fingerprint);\n fingerprintToTick = (AnimatedVectorDrawable) getDrawable(R.drawable.fingerprint_to_tick);\n fingerprintToCross = (AnimatedVectorDrawable) getDrawable(R.drawable.fingerprint_to_cross);\n }\n mSetPin = getIntent().getBooleanExtra(EXTRA_SET_PIN, false);\n if (mSetPin) {\n changeLayoutForSetPin();\n } else {\n String pin = getPinFromSharedPreferences();\n if (pin.equals(\"String_Node_Str\")) {\n changeLayoutForSetPin();\n } else {\n String pin = getPinFromSharedPreferences();\n if (pin.equals(\"String_Node_Str\")) {\n changeLayoutForSetPin();\n mSetPin = true;\n } else {\n checkForFingerPrint();\n }\n }\n final PinLockListener pinLockListener = new PinLockListener() {\n public void onComplete(String pin) {\n if (mSetPin) {\n setPin(pin);\n } else {\n checkPin(pin);\n }\n }\n public void onEmpty() {\n Log.d(TAG, \"String_Node_Str\");\n }\n public void onPinChange(int pinLength, String intermediatePin) {\n Log.d(TAG, \"String_Node_Str\" + pinLength + \"String_Node_Str\" + intermediatePin);\n }\n };\n mPinLockView = (PinLockView) findViewById(R.id.pinlockView);\n mIndicatorDots = (IndicatorDots) findViewById(R.id.indicator_dots);\n mPinLockView.attachIndicatorDots(mIndicatorDots);\n mPinLockView.setPinLockListener(pinLockListener);\n mPinLockView.setPinLength(PIN_LENGTH);\n mIndicatorDots.setIndicatorType(IndicatorDots.IndicatorType.FILL_WITH_ANIMATION);\n checkForFont();\n }\n}\n"
"private void processTypeCheckCodeFragment() {\n List<ArrayList<Statement>> typeCheckStatements = typeCheckElimination.getTypeCheckStatements();\n ArrayList<Statement> firstBlockOfStatements = typeCheckStatements.get(0);\n Statement firstStatementOfBlock = firstBlockOfStatements.get(0);\n if (firstStatementOfBlock.getParent() instanceof SwitchStatement) {\n SwitchStatement switchStatement = (SwitchStatement) firstStatementOfBlock.getParent();\n Expression switchStatementExpression = switchStatement.getExpression();\n SimpleName switchStatementExpressionName = extractOperandName(switchStatementExpression);\n if (switchStatementExpressionName != null) {\n IBinding switchStatementExpressionNameBinding = switchStatementExpressionName.resolveBinding();\n if (switchStatementExpressionNameBinding.getKind() == IBinding.VARIABLE) {\n IVariableBinding switchStatementExpressionNameVariableBinding = (IVariableBinding) switchStatementExpressionNameBinding;\n for (InheritanceTree tree : inheritanceTreeList) {\n DefaultMutableTreeNode root = tree.getRootNode();\n String rootClassName = (String) root.getUserObject();\n ITypeBinding variableTypeBinding = switchStatementExpressionNameVariableBinding.getType();\n if (rootClassName.equals(variableTypeBinding.getQualifiedName())) {\n typeCheckElimination.setExistingInheritanceTree(tree);\n break;\n }\n }\n if (switchStatementExpressionNameVariableBinding.isField()) {\n for (FieldDeclaration field : fields) {\n List<VariableDeclarationFragment> fragments = field.fragments();\n for (VariableDeclarationFragment fragment : fragments) {\n IVariableBinding fragmentVariableBinding = fragment.resolveBinding();\n if (fragmentVariableBinding.isEqualTo(switchStatementExpressionNameVariableBinding)) {\n typeCheckElimination.setTypeField(fragment);\n for (MethodDeclaration method : methods) {\n SimpleName fieldInstruction = MethodDeclarationUtility.isSetter(method);\n if (fieldInstruction != null && fragment.getName().getIdentifier().equals(fieldInstruction.getIdentifier())) {\n typeCheckElimination.setTypeFieldSetterMethod(method);\n }\n fieldInstruction = MethodDeclarationUtility.isGetter(method);\n if (fieldInstruction != null && fragment.getName().getIdentifier().equals(fieldInstruction.getIdentifier())) {\n typeCheckElimination.setTypeFieldGetterMethod(method);\n }\n }\n break;\n }\n }\n }\n } else {\n typeCheckElimination.setTypeLocalVariable(switchStatementExpressionName);\n }\n }\n }\n }\n Set<Expression> typeCheckExpressions = typeCheckElimination.getTypeCheckExpressions();\n for (Expression typeCheckExpression : typeCheckExpressions) {\n if (typeCheckExpression.getParent() instanceof SwitchCase) {\n if (typeCheckExpression instanceof SimpleName) {\n SimpleName simpleName = (SimpleName) typeCheckExpression;\n IBinding binding = simpleName.resolveBinding();\n if (binding.getKind() == IBinding.VARIABLE) {\n IVariableBinding variableBinding = (IVariableBinding) binding;\n if (variableBinding.isField() && (variableBinding.getModifiers() & Modifier.STATIC) != 0) {\n typeCheckElimination.addStaticType(typeCheckExpression, simpleName);\n }\n }\n } else if (typeCheckExpression instanceof QualifiedName) {\n QualifiedName qualifiedName = (QualifiedName) typeCheckExpression;\n IBinding binding = qualifiedName.resolveBinding();\n if (binding.getKind() == IBinding.VARIABLE) {\n IVariableBinding variableBinding = (IVariableBinding) binding;\n if (variableBinding.isField() && (variableBinding.getModifiers() & Modifier.STATIC) != 0) {\n typeCheckElimination.addStaticType(typeCheckExpression, qualifiedName.getName());\n }\n }\n } else if (typeCheckExpression instanceof FieldAccess) {\n FieldAccess fieldAccess = (FieldAccess) typeCheckExpression;\n IVariableBinding variableBinding = fieldAccess.resolveFieldBinding();\n if (variableBinding.isField() && (variableBinding.getModifiers() & Modifier.STATIC) != 0) {\n typeCheckElimination.addStaticType(typeCheckExpression, fieldAccess.getName());\n }\n }\n } else if (typeCheckExpression instanceof InstanceofExpression) {\n InstanceofExpression instanceofExpression = (InstanceofExpression) typeCheckExpression;\n SimpleName operandName = extractOperandName(instanceofExpression.getLeftOperand());\n if (operandName != null) {\n SimpleName keySimpleName = containsKey(operandName);\n if (keySimpleName != null) {\n typeVariableCounterMap.put(keySimpleName, typeVariableCounterMap.get(keySimpleName) + 1);\n } else {\n typeVariableCounterMap.put(operandName, 1);\n }\n typeCheckElimination.addSubclassType(typeCheckExpression, instanceofExpression.getRightOperand());\n }\n } else if (typeCheckExpression instanceof InfixExpression) {\n InfixExpression infixExpression = (InfixExpression) typeCheckExpression;\n IfStatementExpressionAnalyzer analyzer = new IfStatementExpressionAnalyzer(infixExpression);\n for (InfixExpression leafInfixExpression : analyzer.getInfixExpressionsWithEqualsOperator()) {\n Expression leftOperand = leafInfixExpression.getLeftOperand();\n Expression rightOperand = leafInfixExpression.getRightOperand();\n SimpleName leftOperandName = extractOperandName(leftOperand);\n SimpleName rightOperandName = extractOperandName(rightOperand);\n SimpleName typeVariableName = null;\n SimpleName staticFieldName = null;\n if (leftOperandName != null && rightOperandName != null) {\n IBinding leftOperandNameBinding = leftOperandName.resolveBinding();\n if (leftOperandNameBinding.getKind() == IBinding.VARIABLE) {\n IVariableBinding leftOperandNameVariableBinding = (IVariableBinding) leftOperandNameBinding;\n if (leftOperandNameVariableBinding.isField() && (leftOperandNameVariableBinding.getModifiers() & Modifier.STATIC) != 0)\n staticFieldName = leftOperandName;\n }\n IBinding rightOperandNameBinding = rightOperandName.resolveBinding();\n if (rightOperandNameBinding.getKind() == IBinding.VARIABLE) {\n IVariableBinding rightOperandNameVariableBinding = (IVariableBinding) rightOperandNameBinding;\n if (rightOperandNameVariableBinding.isField() && (rightOperandNameVariableBinding.getModifiers() & Modifier.STATIC) != 0)\n staticFieldName = rightOperandName;\n }\n if (staticFieldName != null && staticFieldName.equals(leftOperandName))\n typeVariableName = rightOperandName;\n else if (staticFieldName != null && staticFieldName.equals(rightOperandName))\n typeVariableName = leftOperandName;\n }\n if (typeVariableName != null && staticFieldName != null) {\n SimpleName keySimpleName = containsKey(typeVariableName);\n if (keySimpleName != null) {\n typeVariableCounterMap.put(keySimpleName, typeVariableCounterMap.get(keySimpleName) + 1);\n } else {\n typeVariableCounterMap.put(typeVariableName, 1);\n }\n if (analyzer.allParentNodesAreConditionalAndOperators()) {\n analyzer.putTypeVariableExpression(typeVariableName, leafInfixExpression);\n analyzer.putTypeVariableStaticField(typeVariableName, staticFieldName);\n }\n }\n }\n for (InstanceofExpression leafInstanceofExpression : analyzer.getInstanceofExpressions()) {\n SimpleName operandName = extractOperandName(leafInstanceofExpression.getLeftOperand());\n if (operandName != null) {\n SimpleName keySimpleName = containsKey(operandName);\n if (keySimpleName != null && analyzer.allParentNodesAreConditionalAndOperators()) {\n typeVariableCounterMap.put(keySimpleName, typeVariableCounterMap.get(keySimpleName) + 1);\n } else {\n typeVariableCounterMap.put(operandName, 1);\n }\n typeCheckElimination.addRemainingIfStatementExpression(analyzer.getCompleteExpression(), analyzer.getRemainingExpression(leafInstanceofExpression));\n typeCheckElimination.addSubclassType(typeCheckExpression, leafInstanceofExpression.getRightOperand());\n }\n }\n }\n }\n for (SimpleName typeVariable : typeVariableCounterMap.keySet()) {\n if (typeVariableCounterMap.get(typeVariable) == typeCheckExpressions.size()) {\n IBinding binding = typeVariable.resolveBinding();\n if (binding.getKind() == IBinding.VARIABLE) {\n IVariableBinding variableBinding = (IVariableBinding) binding;\n for (InheritanceTree tree : inheritanceTreeList) {\n DefaultMutableTreeNode root = tree.getRootNode();\n String rootClassName = (String) root.getUserObject();\n ITypeBinding variableTypeBinding = variableBinding.getType();\n if (rootClassName.equals(variableTypeBinding.getQualifiedName())) {\n typeCheckElimination.setExistingInheritanceTree(tree);\n break;\n }\n }\n if (variableBinding.isField()) {\n for (FieldDeclaration field : fields) {\n List<VariableDeclarationFragment> fragments = field.fragments();\n for (VariableDeclarationFragment fragment : fragments) {\n IVariableBinding fragmentVariableBinding = fragment.resolveBinding();\n if (fragmentVariableBinding.isEqualTo(variableBinding)) {\n typeCheckElimination.setTypeField(fragment);\n for (MethodDeclaration method : methods) {\n SimpleName fieldInstruction = MethodDeclarationUtility.isSetter(method);\n if (fieldInstruction != null && fragment.getName().getIdentifier().equals(fieldInstruction.getIdentifier())) {\n typeCheckElimination.setTypeFieldSetterMethod(method);\n }\n fieldInstruction = MethodDeclarationUtility.isGetter(method);\n if (fieldInstruction != null && fragment.getName().getIdentifier().equals(fieldInstruction.getIdentifier())) {\n typeCheckElimination.setTypeFieldGetterMethod(method);\n }\n }\n break;\n }\n }\n }\n } else {\n typeCheckElimination.setTypeLocalVariable(typeVariable);\n }\n }\n }\n }\n}\n"