content stringlengths 40 137k |
|---|
"public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putInt(KEY_IN_PROGRESS_MESSAGE_ID, mInProgressMessageId);\n outState.putIntegerArrayList(KEY_OLD_SITES_IDS, mOldSitesIDs);\n outState.putString(KEY_NONCE_AUTHENTICATOR, mNonceAuthenticator);\n outState.putString(KEY_NONCE_BACKUP, mNonceBackup);\n outState.putString(KEY_NONCE_SMS, mNonceSms);\n outState.putString(KEY_2FA_TYPE, mType);\n outState.putString(KEY_SMS_NUMBER, mPhoneNumber);\n outState.putBoolean(KEY_SMS_SENT, mSentSmsCode);\n}\n"
|
"public static ClassificationStatistics adaptedRandIndexStats3D(ImagePlus originalLabels, ImagePlus proposedLabels) {\n if (originalLabels.getImageStack().getProcessor(1) instanceof ShortProcessor == false || proposedLabels.getImageStack().getProcessor(1) instanceof ShortProcessor == false)\n return null;\n int nSlices = originalLabels.getImageStackSize();\n int maxIDGroundTruth = 0;\n int maxIDProposal = 0;\n for (int slice = 1; slice <= nSlices; slice++) {\n ImageProcessor gt = originalLabels.getImageStack().getProcessor(slice);\n gt.resetMinAndMax();\n if (maxIDGroundTruth < gt.getMax())\n maxIDGroundTruth = (int) gt.getMax();\n ImageProcessor proposal = proposedLabels.getImageStack().getProcessor(slice);\n proposal.resetMinAndMax();\n if (maxIDProposal < proposal.getMax())\n maxIDProposal = (int) proposal.getMax();\n }\n double agreements = 0;\n long[][] cont = new long[maxIDGroundTruth + 1][maxIDProposal + 1];\n double[] ni = new double[cont.length];\n double[] nj = new double[cont[0].length];\n double n = 0;\n for (int slice = 1; slice <= nSlices; slice++) {\n ShortProcessor cluster1 = (ShortProcessor) originalLabels.getImageStack().getProcessor(slice);\n ShortProcessor cluster2 = (ShortProcessor) proposedLabels.getImageStack().getProcessor(slice);\n final short[] pixels1 = (short[]) cluster1.getPixels();\n final short[] pixels2 = (short[]) cluster2.getPixels();\n double nPixels = pixels1.length;\n for (int i = 0; i < nPixels; i++) {\n cont[pixels1[i] & 0xffff][pixels2[i] & 0xffff]++;\n if (pixels1[i] > 0)\n n++;\n }\n }\n for (int i = 1; i < cont.length; i++) for (int j = 0; j < cont[0].length; j++) {\n ni[i] += cont[i][j];\n }\n for (int j = 1; j < cont[0].length; j++) for (int i = 1; i < cont.length; i++) {\n nj[j] += cont[i][j];\n }\n double truePositives = 0;\n for (int j = 1; j < cont[0].length; j++) for (int i = 1; i < cont.length; i++) truePositives += cont[i][j] * (cont[i][j] - 1.0);\n double nPairsTotal = n * (n - 1.0);\n double nPosTrue = 0;\n for (int k = 0; k < ni.length; k++) nPosTrue += ni[k] * (ni[k] - 1.0);\n double nPosActual = 0;\n for (int k = 0; k < nj.length; k++) nPosActual += nj[k] * (nj[k] - 1.0);\n double trueNegatives = nPairsTotal + truePositives - nPosTrue - nPosActual;\n agreements += truePositives + trueNegatives;\n double falsePositives = nPosActual - truePositives;\n double nNegActual = nPairsTotal - nPosActual;\n double falseNegatives = nNegActual - trueNegatives;\n truePositives /= 2.0;\n trueNegatives /= 2.0;\n falsePositives /= 2.0;\n falseNegatives /= 2.0;\n double randIndex = agreements / nPairsTotal;\n return new ClassificationStatistics(truePositives, trueNegatives, falsePositives, falseNegatives, randIndex);\n}\n"
|
"private void replyPost(UComment comment) {\n if (!UserAPI.isLoggedIn()) {\n gotoLogin();\n } else {\n Intent intent = new Intent(this, ReplyActivity.class);\n intent.putExtra(Consts.Extra_Ace_Model, post);\n if (comment != null) {\n intent.putExtra(Consts.Extra_Simple_Comment, comment);\n }\n startOneActivityForResult(intent, Consts.Code_Reply_Post);\n }\n}\n"
|
"private void test(String... args) {\n for (int i = 0; i < args.length; i++) {\n if (\"String_Node_Str\".equals(args[i])) {\n url = args[++i];\n } else if (\"String_Node_Str\".equals(args[i])) {\n driver = args[++i];\n } else if (\"String_Node_Str\".equals(args[i])) {\n user = args[++i];\n } else if (\"String_Node_Str\".equals(args[i])) {\n password = args[++i];\n }\n }\n System.out.println(\"String_Node_Str\" + driver + \"String_Node_Str\" + url + \"String_Node_Str\" + user + \"String_Node_Str\" + password);\n try {\n System.out.println(\"String_Node_Str\");\n Random random = new Random();\n boolean wasRunning = false;\n for (int i = 0; i < 3000; i++) {\n if (i > 1000 && connections.size() > 1 && tables.size() > 1) {\n System.out.println(\"String_Node_Str\" + connections.size() + \"String_Node_Str\" + tables.size());\n wasRunning = true;\n }\n if (connections.size() < 1) {\n openConnection();\n }\n if (tables.size() < 1) {\n createTable(random);\n }\n int p = random.nextInt(100);\n if ((p -= 2) <= 0) {\n if (connections.size() < 5) {\n openConnection();\n }\n } else if ((p -= 1) <= 0) {\n if (connections.size() > 1) {\n Connection conn = connections.remove(random.nextInt(connections.size()));\n if (random.nextBoolean()) {\n conn.close();\n }\n }\n } else if ((p -= 10) <= 0) {\n createTable(random);\n } else if ((p -= 20) <= 0) {\n if (tables.size() > 0) {\n Connection conn = connections.get(random.nextInt(connections.size()));\n Statement stat = conn.createStatement();\n String table = tables.get(random.nextInt(tables.size()));\n if (random.nextBoolean()) {\n stat.execute(\"String_Node_Str\" + table + \"String_Node_Str\");\n } else if (random.nextBoolean()) {\n stat.execute(\"String_Node_Str\" + table + \"String_Node_Str\");\n } else {\n stat.execute(\"String_Node_Str\" + table);\n }\n }\n } else if ((p -= 5) < 0) {\n if (tables.size() > 0) {\n Connection conn = connections.get(random.nextInt(connections.size()));\n Statement stat = conn.createStatement();\n String table = tables.get(random.nextInt(tables.size()));\n if (random.nextBoolean()) {\n stat.execute(\"String_Node_Str\" + table);\n } else {\n stat.execute(\"String_Node_Str\" + table);\n System.out.println(\"String_Node_Str\" + table);\n tables.remove(table);\n }\n }\n } else if ((p -= 30) <= 0) {\n if (tables.size() > 0) {\n Connection conn = connections.get(random.nextInt(connections.size()));\n Statement stat = conn.createStatement();\n String table = tables.get(random.nextInt(tables.size()));\n stat.execute(\"String_Node_Str\" + table + \"String_Node_Str\");\n }\n } else {\n if (tables.size() > 0) {\n Connection conn = connections.get(random.nextInt(connections.size()));\n Statement stat = conn.createStatement();\n String table = tables.get(random.nextInt(tables.size()));\n stat.execute(\"String_Node_Str\" + table + \"String_Node_Str\" + table);\n }\n }\n }\n System.out.println(\"String_Node_Str\" + wasRunning);\n System.out.println(\"String_Node_Str\");\n } catch (Throwable e) {\n System.out.println(\"String_Node_Str\" + openCount + \"String_Node_Str\" + url + \"String_Node_Str\" + e.toString());\n e.printStackTrace(System.out);\n System.out.println(\"String_Node_Str\");\n }\n}\n"
|
"public List<String> get(String webhook) {\n return limitChildren(webhook);\n}\n"
|
"public void onGcpClick(MarkerSource gcp) {\n ((com.droidplanner.gcp.Gcp) gcp).toogleState();\n gcpMapFragment.markers.updateMarker(gcp);\n}\n"
|
"public AdapterStore getAdapterStore(final PropertyManagement runTimeProperties) throws Exception {\n PersistableStore store = (PersistableStore) StoreParameters.StoreParam.INPUT_STORE.getHelper().getValue(runTimeProperties);\n return store.getDataStoreOptions().createAdapterStore();\n}\n"
|
"private final int computeOomAdjLocked(ProcessRecord app, int cachedAdj, ProcessRecord TOP_APP, boolean doingAll, long now) {\n if (mAdjSeq == app.adjSeq) {\n return app.curRawAdj;\n }\n if (app.thread == null) {\n app.adjSeq = mAdjSeq;\n app.curSchedGroup = Process.THREAD_GROUP_BG_NONINTERACTIVE;\n app.curProcState = ActivityManager.PROCESS_STATE_CACHED_EMPTY;\n return (app.curAdj = app.curRawAdj = ProcessList.CACHED_APP_MAX_ADJ);\n }\n app.adjTypeCode = ActivityManager.RunningAppProcessInfo.REASON_UNKNOWN;\n app.adjSource = null;\n app.adjTarget = null;\n app.empty = false;\n app.cached = false;\n final int activitiesSize = app.activities.size();\n if (app.maxAdj <= ProcessList.FOREGROUND_APP_ADJ) {\n app.adjType = \"String_Node_Str\";\n app.adjSeq = mAdjSeq;\n app.curRawAdj = app.maxAdj;\n app.foregroundActivities = false;\n app.keeping = true;\n app.curSchedGroup = Process.THREAD_GROUP_DEFAULT;\n app.curProcState = ActivityManager.PROCESS_STATE_PERSISTENT;\n app.systemNoUi = true;\n if (app == TOP_APP) {\n app.systemNoUi = false;\n } else if (activitiesSize > 0) {\n for (int j = 0; j < activitiesSize; j++) {\n final ActivityRecord r = app.activities.get(j);\n if (r.visible) {\n app.systemNoUi = false;\n }\n }\n }\n if (!app.systemNoUi) {\n app.curProcState = ActivityManager.PROCESS_STATE_PERSISTENT_UI;\n }\n return (app.curAdj = app.maxAdj);\n }\n app.keeping = false;\n app.systemNoUi = false;\n int adj;\n int schedGroup;\n int procState;\n boolean foregroundActivities = false;\n boolean interesting = false;\n BroadcastQueue queue;\n if (app == TOP_APP) {\n adj = ProcessList.FOREGROUND_APP_ADJ;\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n app.adjType = \"String_Node_Str\";\n foregroundActivities = true;\n interesting = true;\n procState = ActivityManager.PROCESS_STATE_TOP;\n } else if (app.instrumentationClass != null) {\n adj = ProcessList.FOREGROUND_APP_ADJ;\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n app.adjType = \"String_Node_Str\";\n interesting = true;\n procState = ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;\n } else if ((queue = isReceivingBroadcast(app)) != null) {\n adj = ProcessList.FOREGROUND_APP_ADJ;\n schedGroup = (queue == mFgBroadcastQueue) ? Process.THREAD_GROUP_DEFAULT : Process.THREAD_GROUP_BG_NONINTERACTIVE;\n app.adjType = \"String_Node_Str\";\n procState = ActivityManager.PROCESS_STATE_RECEIVER;\n } else if (app.executingServices.size() > 0) {\n adj = ProcessList.FOREGROUND_APP_ADJ;\n schedGroup = app.execServicesFg ? Process.THREAD_GROUP_DEFAULT : Process.THREAD_GROUP_BG_NONINTERACTIVE;\n app.adjType = \"String_Node_Str\";\n procState = ActivityManager.PROCESS_STATE_SERVICE;\n } else {\n schedGroup = Process.THREAD_GROUP_BG_NONINTERACTIVE;\n adj = cachedAdj;\n procState = ActivityManager.PROCESS_STATE_CACHED_EMPTY;\n app.cached = true;\n app.empty = true;\n app.adjType = \"String_Node_Str\";\n }\n if (!foregroundActivities && activitiesSize > 0) {\n for (int j = 0; j < activitiesSize; j++) {\n final ActivityRecord r = app.activities.get(j);\n if (r.app != app) {\n Slog.w(TAG, \"String_Node_Str\" + r + \"String_Node_Str\" + app + \"String_Node_Str\");\n continue;\n }\n if (r.visible) {\n if (adj > ProcessList.VISIBLE_APP_ADJ) {\n adj = ProcessList.VISIBLE_APP_ADJ;\n app.adjType = \"String_Node_Str\";\n }\n if (procState > ActivityManager.PROCESS_STATE_TOP) {\n procState = ActivityManager.PROCESS_STATE_TOP;\n }\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n app.cached = false;\n app.empty = false;\n foregroundActivities = true;\n break;\n } else if (r.state == ActivityState.PAUSING || r.state == ActivityState.PAUSED) {\n if (adj > ProcessList.PERCEPTIBLE_APP_ADJ) {\n adj = ProcessList.PERCEPTIBLE_APP_ADJ;\n app.adjType = \"String_Node_Str\";\n }\n if (procState > ActivityManager.PROCESS_STATE_TOP) {\n procState = ActivityManager.PROCESS_STATE_TOP;\n }\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n app.cached = false;\n app.empty = false;\n foregroundActivities = true;\n } else if (r.state == ActivityState.STOPPING) {\n if (adj > ProcessList.PERCEPTIBLE_APP_ADJ) {\n adj = ProcessList.PERCEPTIBLE_APP_ADJ;\n app.adjType = \"String_Node_Str\";\n }\n if (!r.finishing) {\n if (procState > ActivityManager.PROCESS_STATE_CACHED_ACTIVITY) {\n procState = ActivityManager.PROCESS_STATE_CACHED_ACTIVITY;\n }\n }\n app.cached = false;\n app.empty = false;\n foregroundActivities = true;\n } else {\n if (procState > ActivityManager.PROCESS_STATE_CACHED_ACTIVITY) {\n procState = ActivityManager.PROCESS_STATE_CACHED_ACTIVITY;\n app.adjType = \"String_Node_Str\";\n }\n }\n }\n }\n if (adj > ProcessList.PERCEPTIBLE_APP_ADJ) {\n if (app.foregroundServices) {\n adj = ProcessList.PERCEPTIBLE_APP_ADJ;\n procState = ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;\n app.cached = false;\n app.adjType = \"String_Node_Str\";\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n } else if (app.forcingToForeground != null) {\n adj = ProcessList.PERCEPTIBLE_APP_ADJ;\n procState = ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;\n app.cached = false;\n app.adjType = \"String_Node_Str\";\n app.adjSource = app.forcingToForeground;\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n }\n }\n if (app.foregroundServices) {\n interesting = true;\n }\n if (app == mHeavyWeightProcess) {\n if (adj > ProcessList.HEAVY_WEIGHT_APP_ADJ) {\n adj = ProcessList.HEAVY_WEIGHT_APP_ADJ;\n schedGroup = Process.THREAD_GROUP_BG_NONINTERACTIVE;\n app.cached = false;\n app.adjType = \"String_Node_Str\";\n }\n if (procState > ActivityManager.PROCESS_STATE_HEAVY_WEIGHT) {\n procState = ActivityManager.PROCESS_STATE_HEAVY_WEIGHT;\n }\n }\n if (app == mHomeProcess) {\n if (adj > ProcessList.HOME_APP_ADJ) {\n adj = ProcessList.HOME_APP_ADJ;\n schedGroup = Process.THREAD_GROUP_BG_NONINTERACTIVE;\n app.cached = false;\n app.adjType = \"String_Node_Str\";\n }\n if (procState > ActivityManager.PROCESS_STATE_HOME) {\n procState = ActivityManager.PROCESS_STATE_HOME;\n }\n }\n if (app == mPreviousProcess && app.activities.size() > 0) {\n if (adj > ProcessList.PREVIOUS_APP_ADJ) {\n adj = ProcessList.PREVIOUS_APP_ADJ;\n schedGroup = Process.THREAD_GROUP_BG_NONINTERACTIVE;\n app.cached = false;\n app.adjType = \"String_Node_Str\";\n }\n if (procState > ActivityManager.PROCESS_STATE_LAST_ACTIVITY) {\n procState = ActivityManager.PROCESS_STATE_LAST_ACTIVITY;\n }\n }\n if (false)\n Slog.i(TAG, \"String_Node_Str\" + app + \"String_Node_Str\" + adj + \"String_Node_Str\" + app.adjType);\n app.adjSeq = mAdjSeq;\n app.curRawAdj = adj;\n app.hasStartedServices = false;\n if (mBackupTarget != null && app == mBackupTarget.app) {\n if (adj > ProcessList.BACKUP_APP_ADJ) {\n if (DEBUG_BACKUP)\n Slog.v(TAG, \"String_Node_Str\" + app);\n adj = ProcessList.BACKUP_APP_ADJ;\n if (procState > ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND) {\n procState = ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND;\n }\n app.adjType = \"String_Node_Str\";\n app.cached = false;\n }\n if (procState > ActivityManager.PROCESS_STATE_BACKUP) {\n procState = ActivityManager.PROCESS_STATE_BACKUP;\n }\n }\n boolean mayBeTop = false;\n for (int is = app.services.size() - 1; is >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ || schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE || procState > ActivityManager.PROCESS_STATE_TOP); is--) {\n ServiceRecord s = app.services.valueAt(is);\n if (s.startRequested) {\n app.hasStartedServices = true;\n if (procState > ActivityManager.PROCESS_STATE_SERVICE) {\n procState = ActivityManager.PROCESS_STATE_SERVICE;\n }\n if (app.hasShownUi && app != mHomeProcess) {\n if (adj > ProcessList.SERVICE_ADJ) {\n app.adjType = \"String_Node_Str\";\n }\n } else {\n if (now < (s.lastActivity + ActiveServices.MAX_SERVICE_INACTIVITY)) {\n if (adj > ProcessList.SERVICE_ADJ) {\n adj = ProcessList.SERVICE_ADJ;\n app.adjType = \"String_Node_Str\";\n app.cached = false;\n }\n }\n if (adj > ProcessList.SERVICE_ADJ) {\n app.adjType = \"String_Node_Str\";\n }\n }\n app.keeping = true;\n }\n for (int conni = s.connections.size() - 1; conni >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ || schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE || procState > ActivityManager.PROCESS_STATE_TOP); conni--) {\n ArrayList<ConnectionRecord> clist = s.connections.valueAt(conni);\n for (int i = 0; i < clist.size() && (adj > ProcessList.FOREGROUND_APP_ADJ || schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE || procState > ActivityManager.PROCESS_STATE_TOP); i++) {\n ConnectionRecord cr = clist.get(i);\n if (cr.binding.client == app) {\n continue;\n }\n if ((cr.flags & Context.BIND_WAIVE_PRIORITY) == 0) {\n ProcessRecord client = cr.binding.client;\n int clientAdj = computeOomAdjLocked(client, cachedAdj, TOP_APP, doingAll, now);\n int clientProcState = client.curProcState;\n if (clientProcState >= ActivityManager.PROCESS_STATE_CACHED_ACTIVITY) {\n clientProcState = ActivityManager.PROCESS_STATE_CACHED_EMPTY;\n }\n String adjType = null;\n if ((cr.flags & Context.BIND_ALLOW_OOM_MANAGEMENT) != 0) {\n if (app.hasShownUi && app != mHomeProcess) {\n if (adj > clientAdj) {\n adjType = \"String_Node_Str\";\n }\n app.cached = false;\n clientAdj = adj;\n clientProcState = procState;\n } else {\n if (now >= (s.lastActivity + ActiveServices.MAX_SERVICE_INACTIVITY)) {\n if (adj > clientAdj) {\n adjType = \"String_Node_Str\";\n }\n clientAdj = adj;\n }\n }\n }\n if (adj > clientAdj) {\n if (app.hasShownUi && app != mHomeProcess && clientAdj > ProcessList.PERCEPTIBLE_APP_ADJ) {\n adjType = \"String_Node_Str\";\n } else {\n if ((cr.flags & (Context.BIND_ABOVE_CLIENT | Context.BIND_IMPORTANT)) != 0) {\n adj = clientAdj;\n } else if ((cr.flags & Context.BIND_NOT_VISIBLE) != 0 && clientAdj < ProcessList.PERCEPTIBLE_APP_ADJ && adj > ProcessList.PERCEPTIBLE_APP_ADJ) {\n adj = ProcessList.PERCEPTIBLE_APP_ADJ;\n } else if (clientAdj > ProcessList.VISIBLE_APP_ADJ) {\n adj = clientAdj;\n } else {\n if (adj > ProcessList.VISIBLE_APP_ADJ) {\n adj = ProcessList.VISIBLE_APP_ADJ;\n }\n }\n if (!client.cached) {\n app.cached = false;\n }\n if (client.keeping) {\n app.keeping = true;\n }\n adjType = \"String_Node_Str\";\n }\n }\n if ((cr.flags & Context.BIND_NOT_FOREGROUND) == 0) {\n if (client.curSchedGroup == Process.THREAD_GROUP_DEFAULT) {\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n }\n if (clientProcState <= ActivityManager.PROCESS_STATE_TOP) {\n if (clientProcState == ActivityManager.PROCESS_STATE_TOP) {\n mayBeTop = true;\n clientProcState = ActivityManager.PROCESS_STATE_CACHED_EMPTY;\n } else {\n clientProcState = ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;\n }\n }\n } else {\n if (clientProcState < ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND) {\n clientProcState = ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND;\n }\n }\n if (procState > clientProcState) {\n procState = clientProcState;\n }\n if (procState < ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND && (cr.flags & Context.BIND_SHOWING_UI) != 0) {\n app.pendingUiClean = true;\n }\n if (adjType != null) {\n app.adjType = adjType;\n app.adjTypeCode = ActivityManager.RunningAppProcessInfo.REASON_SERVICE_IN_USE;\n app.adjSource = cr.binding.client;\n app.adjSourceOom = clientAdj;\n app.adjTarget = s.name;\n }\n }\n if ((cr.flags & Context.BIND_TREAT_LIKE_ACTIVITY) != 0) {\n app.treatLikeActivity = true;\n }\n final ActivityRecord a = cr.activity;\n if ((cr.flags & Context.BIND_ADJUST_WITH_ACTIVITY) != 0) {\n if (a != null && adj > ProcessList.FOREGROUND_APP_ADJ && (a.visible || a.state == ActivityState.RESUMED || a.state == ActivityState.PAUSING)) {\n adj = ProcessList.FOREGROUND_APP_ADJ;\n if ((cr.flags & Context.BIND_NOT_FOREGROUND) == 0) {\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n }\n app.cached = false;\n app.adjType = \"String_Node_Str\";\n app.adjTypeCode = ActivityManager.RunningAppProcessInfo.REASON_SERVICE_IN_USE;\n app.adjSource = a;\n app.adjSourceOom = adj;\n app.adjTarget = s.name;\n }\n }\n }\n }\n }\n for (int provi = app.pubProviders.size() - 1; provi >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ || schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE || procState > ActivityManager.PROCESS_STATE_TOP); provi--) {\n ContentProviderRecord cpr = app.pubProviders.valueAt(provi);\n for (int i = cpr.connections.size() - 1; i >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ || schedGroup == Process.THREAD_GROUP_BG_NONINTERACTIVE || procState > ActivityManager.PROCESS_STATE_TOP); i--) {\n ContentProviderConnection conn = cpr.connections.get(i);\n ProcessRecord client = conn.client;\n if (client == app) {\n continue;\n }\n int clientAdj = computeOomAdjLocked(client, cachedAdj, TOP_APP, doingAll, now);\n int clientProcState = client.curProcState;\n if (clientProcState >= ActivityManager.PROCESS_STATE_CACHED_ACTIVITY) {\n clientProcState = ActivityManager.PROCESS_STATE_CACHED_EMPTY;\n }\n if (adj > clientAdj) {\n if (app.hasShownUi && app != mHomeProcess && clientAdj > ProcessList.PERCEPTIBLE_APP_ADJ) {\n app.adjType = \"String_Node_Str\";\n } else {\n adj = clientAdj > ProcessList.FOREGROUND_APP_ADJ ? clientAdj : ProcessList.FOREGROUND_APP_ADJ;\n app.adjType = \"String_Node_Str\";\n }\n app.cached &= client.cached;\n app.keeping |= client.keeping;\n app.adjTypeCode = ActivityManager.RunningAppProcessInfo.REASON_PROVIDER_IN_USE;\n app.adjSource = client;\n app.adjSourceOom = clientAdj;\n app.adjTarget = cpr.name;\n }\n if (clientProcState <= ActivityManager.PROCESS_STATE_TOP) {\n if (clientProcState == ActivityManager.PROCESS_STATE_TOP) {\n mayBeTop = true;\n clientProcState = ActivityManager.PROCESS_STATE_CACHED_EMPTY;\n } else {\n clientProcState = ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;\n }\n }\n if (procState > clientProcState) {\n procState = clientProcState;\n }\n if (client.curSchedGroup == Process.THREAD_GROUP_DEFAULT) {\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n }\n }\n if (cpr.hasExternalProcessHandles()) {\n if (adj > ProcessList.FOREGROUND_APP_ADJ) {\n adj = ProcessList.FOREGROUND_APP_ADJ;\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n app.cached = false;\n app.keeping = true;\n app.adjType = \"String_Node_Str\";\n app.adjTarget = cpr.name;\n }\n if (procState > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND) {\n procState = ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;\n }\n }\n }\n if (mayBeTop && procState > ActivityManager.PROCESS_STATE_TOP) {\n switch(procState) {\n case ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND:\n case ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND:\n case ActivityManager.PROCESS_STATE_SERVICE:\n procState = ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;\n break;\n default:\n procState = ActivityManager.PROCESS_STATE_TOP;\n break;\n }\n }\n if (procState >= ActivityManager.PROCESS_STATE_CACHED_EMPTY) {\n if (app.hasClientActivities) {\n procState = ActivityManager.PROCESS_STATE_CACHED_ACTIVITY_CLIENT;\n app.adjType = \"String_Node_Str\";\n } else if (app.treatLikeActivity) {\n procState = ActivityManager.PROCESS_STATE_CACHED_ACTIVITY;\n app.adjType = \"String_Node_Str\";\n }\n }\n if (adj == ProcessList.SERVICE_ADJ) {\n if (doingAll) {\n app.serviceb = mNewNumAServiceProcs > (mNumServiceProcs / 3);\n mNewNumServiceProcs++;\n if (!app.serviceb) {\n if (mLastMemoryLevel > ProcessStats.ADJ_MEM_FACTOR_NORMAL && app.lastPss >= mProcessList.getCachedRestoreThresholdKb()) {\n app.serviceHighRam = true;\n app.serviceb = true;\n } else {\n mNewNumAServiceProcs++;\n }\n } else {\n app.serviceHighRam = false;\n }\n }\n if (app.serviceb) {\n adj = ProcessList.SERVICE_B_ADJ;\n }\n }\n app.curRawAdj = adj;\n if (adj > app.maxAdj) {\n adj = app.maxAdj;\n if (app.maxAdj <= ProcessList.PERCEPTIBLE_APP_ADJ) {\n schedGroup = Process.THREAD_GROUP_DEFAULT;\n }\n }\n if (adj < ProcessList.CACHED_APP_MIN_ADJ) {\n app.keeping = true;\n }\n app.curAdj = app.modifyRawOomAdj(adj);\n app.curSchedGroup = schedGroup;\n app.curProcState = procState;\n app.foregroundActivities = foregroundActivities;\n return app.curRawAdj;\n}\n"
|
"public Expression createCaseOperandExpression(final String expression, final MacroConfiguration macroConfiguration, Set<String> usedMacros) {\n return getOrDefault(\"String_Node_Str\", delegate, expression, false, macroConfiguration, CASE_OPERAND_EXPRESSION_SUPPLIER);\n}\n"
|
"public static void trackModuleRelativePageView(String page) {\n trackPageViewAsync(GWT.getModuleName() + \"String_Node_Str\" + page);\n}\n"
|
"private static Object convertCollectionToJavaTypes(Collection<?> coll, Object empty, Type genericReturnType) {\n Object ret = Transient.invoke(empty);\n for (Object o : coll) ret = ConjBang.invoke(ret, convertCollectionElementToJavaTypes(o, genericReturnType));\n return Persistent.invoke(ret);\n}\n"
|
"private void addNullMap(TrackerNode node) {\n final Object propName = node.getFieldScript();\n LinkedHashSet<TrackerNode> nodes = _nullMap.get(propName);\n if (nodes == null) {\n nodes = new HashSet<TrackerNode>();\n _nullMap.put(propName, nodes);\n }\n nodes.add(node);\n removeBeanMap(node);\n}\n"
|
"protected void handleDestinationBrowseButtonPressed() {\n FileDialog dialog = new FileDialog(getContainer().getShell(), SWT.SAVE);\n JobExportType jobExportType = getCurrentExportType1();\n switch(jobExportType) {\n case WSWAR:\n dialog.setFilterExtensions(new String[] { \"String_Node_Str\" + FileConstants.WAR_FILE_SUFFIX, \"String_Node_Str\" });\n break;\n case JBOSSESB:\n dialog.setFilterExtensions(new String[] { \"String_Node_Str\" + FileConstants.ESB_FILE_SUFFIX, \"String_Node_Str\" });\n break;\n case OSGI:\n if (isAddMavenScript()) {\n dialog.setFilterExtensions(new String[] { \"String_Node_Str\" + FileConstants.ZIP_FILE_SUFFIX, \"String_Node_Str\" });\n } else {\n dialog.setFilterExtensions(new String[] { \"String_Node_Str\" + FileConstants.JAR_FILE_SUFFIX, \"String_Node_Str\" });\n }\n break;\n case PETALSESB:\n dialog.setFilterExtensions(new String[] { \"String_Node_Str\" + FileConstants.ZIP_FILE_SUFFIX, \"String_Node_Str\" });\n break;\n default:\n dialog.setFilterExtensions(new String[] { \"String_Node_Str\" + FileConstants.ZIP_FILE_SUFFIX, \"String_Node_Str\" });\n }\n if (jobExportType.equals(JobExportType.PETALSESB)) {\n IPath destPath = new Path(saDestinationFilePath);\n String fileName, directory;\n if (destPath.toFile().isDirectory()) {\n fileName = getPetalsDefaultSaName();\n directory = destPath.toOSString();\n } else {\n fileName = destPath.lastSegment();\n directory = destPath.removeLastSegments(1).toOSString();\n }\n dialog.setFileName(fileName);\n dialog.setFilterPath(directory);\n } else {\n dialog.setText(\"String_Node_Str\");\n dialog.setFileName(getDefaultFileName().get(0));\n String currentSourceString = getDestinationValue();\n int lastSeparatorIndex = currentSourceString.lastIndexOf(File.separator);\n if (lastSeparatorIndex != -1) {\n dialog.setFilterPath(currentSourceString.substring(0, lastSeparatorIndex));\n }\n }\n String selectedFileName = dialog.open();\n if (selectedFileName == null) {\n return;\n }\n if (!selectedFileName.endsWith(getOutputSuffix())) {\n selectedFileName += getOutputSuffix();\n }\n if (selectedFileName != null && !selectedFileName.endsWith(getSelectedJobVersion() + getOutputSuffix())) {\n String b = selectedFileName.substring(0, (selectedFileName.length() - 4));\n File file = new File(b);\n String str = file.getName();\n String s = getDefaultFileName().get(0);\n if (str.equals(s)) {\n if (getDefaultFileName().get(1) != null && !\"String_Node_Str\".equals(getDefaultFileName().get(1))) {\n selectedFileName = b + ((JobExportType.OSGI.equals(jobExportType)) ? \"String_Node_Str\" : \"String_Node_Str\") + getDefaultFileName().get(1) + getOutputSuffix();\n } else {\n selectedFileName = b + getOutputSuffix();\n }\n } else {\n selectedFileName = b + getOutputSuffix();\n }\n }\n if (selectedFileName != null) {\n setErrorMessage(null);\n saDestinationFilePath = selectedFileName;\n setDestinationValue(selectedFileName);\n if (getDialogSettings() != null) {\n IDialogSettings section = getDialogSettings().getSection(DESTINATION_FILE);\n if (section == null) {\n section = getDialogSettings().addNewSection(DESTINATION_FILE);\n }\n section.put(DESTINATION_FILE, selectedFileName);\n }\n }\n}\n"
|
"public void testCrashingOnBadCode_GRE290_2() {\n runNegativeTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" }, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
|
"public List<QBHistoryMessage> getDialogMessages(QBDialog dialog, String roomJidId) throws QBResponseException {\n Bundle bundle = new Bundle();\n QBCustomObjectRequestBuilder customObjectRequestBuilder = new QBCustomObjectRequestBuilder();\n customObjectRequestBuilder.setPagesLimit(Consts.DIALOG_MESSAGES_PER_PAGE);\n List<QBHistoryMessage> dialogMessagesList = QBChatService.getDialogMessages(dialog, customObjectRequestBuilder, bundle);\n if (dialogMessagesList != null) {\n deleteMessagesByRoomJidId(roomJidId);\n saveChatMessagesToCache(dialogMessagesList, roomJidId);\n }\n return dialogMessagesList;\n}\n"
|
"public List executeQuery(String cqlQuery, Class clazz, List<String> relationalField, CassandraDataHandler dataHandler) {\n EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(clazz);\n CqlResult result = null;\n List returnedEntities = new ArrayList();\n try {\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\", cqlQuery);\n }\n result = executeCQLQuery(cqlQuery, isCql3Enabled);\n if (result != null && (result.getRows() != null || result.getRowsSize() > 0)) {\n returnedEntities = new ArrayList<Object>(result.getRowsSize());\n Iterator<CqlRow> iter = result.getRowsIterator();\n while (iter.hasNext()) {\n CqlRow row = iter.next();\n Object rowKey = null;\n ThriftRow thriftRow = null;\n thriftRow = new ThriftRow(rowKey, entityMetadata.getTableName(), row.getColumns(), new ArrayList<SuperColumn>(0), new ArrayList<CounterColumn>(0), new ArrayList<CounterSuperColumn>(0));\n Object entity = dataHandler.populateEntity(thriftRow, entityMetadata, relationalField, relationalField != null && !relationalField.isEmpty());\n if (entity != null) {\n returnedEntities.add(entity);\n } else {\n returnedEntities.add(row.getColumns().get(0));\n }\n }\n }\n } catch (InvalidRequestException e) {\n log.error(\"String_Node_Str\", e);\n throw new PersistenceException(e);\n } catch (UnavailableException e) {\n log.error(\"String_Node_Str\", e);\n throw new PersistenceException(e);\n } catch (TimedOutException e) {\n log.error(\"String_Node_Str\", e);\n throw new PersistenceException(e);\n } catch (SchemaDisagreementException e) {\n log.error(\"String_Node_Str\", e);\n throw new PersistenceException(e);\n } catch (TException e) {\n log.error(\"String_Node_Str\", e);\n throw new PersistenceException(e);\n } catch (Exception e) {\n log.error(\"String_Node_Str\", e);\n throw new PersistenceException(e);\n }\n return returnedEntities;\n}\n"
|
"public AutoFilter autoFilter(int field, Object criteria1, int filterOp, Object criteria2, boolean visibleDropDown) {\n AutoFilter af = _sheet.getAutoFilter();\n if (af == null) {\n af = autoFilter();\n }\n final FilterColumn fc = BookHelper.getOrCreateFilterColumn(af, field - 1);\n BookHelper.setProperties(fc, criteria1, filterOp, criteria2, visibleDropDown);\n final CellRangeAddress affectedArea = af.getRangeAddress();\n final int row1 = affectedArea.getFirstRow();\n final int col1 = affectedArea.getFirstColumn();\n final int col = col1 + field - 1;\n final int row = row1 + 1;\n final int row2 = affectedArea.getLastRow();\n final int col2 = affectedArea.getLastColumn();\n final Set cr1 = fc.getCriteria1();\n final Set<Ref> all = new HashSet<Ref>();\n for (int r = row; r <= row2; ++r) {\n final Cell cell = BookHelper.getCell(_sheet, r, col);\n final String val = BookHelper.isBlankCell(cell) ? \"String_Node_Str\" : BookHelper.getCellText(cell);\n if (!cr1.contains(val)) {\n final Row rowobj = _sheet.getRow(r);\n if (rowobj == null || !rowobj.getZeroHeight()) {\n new RangeImpl(r, col, _sheet, _sheet).getRows().setHidden(true);\n }\n } else {\n final Row rowobj = _sheet.getRow(r);\n if (rowobj != null && rowobj.getZeroHeight() && canUnhide(af, fc, r, col1)) {\n final RangeImpl rng = (RangeImpl) new RangeImpl(r, col1, r, col2, _sheet, _sheet).getRows();\n all.addAll(rng.getRefs());\n rng.getRows().setHidden(false);\n }\n }\n }\n BookHelper.notifyCellChanges(_sheet.getBook(), all);\n final RangeImpl buttonChange = (RangeImpl) Ranges.range(_sheet, row1, col, row1, col);\n BookHelper.notifyBtnChanges(new HashSet<Ref>(buttonChange.getRefs()));\n return af;\n}\n"
|
"public boolean incrementToken() throws IOException {\n if (!emitSingleTokens && unusedTokens.size() > 0) {\n Log.debug(\"String_Node_Str\");\n Token aToken = unusedTokens.remove(0);\n emit(aToken);\n return true;\n }\n if (lastToken != null) {\n emit(lastToken);\n lastToken = null;\n return true;\n }\n char[] nextToken = nextToken();\n if (nextToken == null) {\n if (lastEmitted == null && (currentPhrase != null && currentPhrase.length() > 0)) {\n char[] lastTok = getCurrentBuffer(new char[0]);\n if (currentSetToCheck.contains(lastTok, 0, lastTok.length)) {\n emit(lastTok);\n currentPhrase.setLength(0);\n return true;\n } else if (lastValid != null) {\n emit(lastValid);\n return true;\n } else if (!emitSingleTokens) {\n discardCharTokens(currentPhrase, unusedTokens);\n currentSetToCheck = null;\n currentPhrase.setLength(0);\n if (unusedTokens.size() > 0) {\n Token aToken = unusedTokens.remove(0);\n Log.debug(\"String_Node_Str\");\n emit(aToken);\n return true;\n }\n }\n }\n return false;\n }\n if (emitSingleTokens) {\n lastToken = nextToken;\n }\n if (currentSetToCheck == null || currentSetToCheck.size() == 0) {\n Log.debug(\"String_Node_Str\" + new String(nextToken) + \"String_Node_Str\");\n if (phraseMap.keySet().contains(nextToken, 0, nextToken.length)) {\n currentSetToCheck = phraseMap.get(nextToken, 0, nextToken.length);\n if (currentPhrase == null)\n currentPhrase = new StringBuffer();\n else\n currentPhrase.setLength(0);\n currentPhrase.append(nextToken);\n return incrementToken();\n } else {\n emit(nextToken);\n lastToken = null;\n return true;\n }\n } else {\n char[] currentBuffer = getCurrentBuffer(nextToken);\n if (currentSetToCheck.contains(currentBuffer, 0, currentBuffer.length)) {\n currentSetToCheck = remove(currentSetToCheck, currentBuffer);\n if (currentSetToCheck.size() == 0) {\n emit(currentBuffer);\n lastValid = null;\n } else {\n if (emitSingleTokens) {\n lastToken = currentBuffer;\n return true;\n }\n lastValid = currentBuffer;\n }\n if (phraseMap.keySet().contains(nextToken, 0, nextToken.length)) {\n currentSetToCheck = phraseMap.get(nextToken, 0, nextToken.length);\n if (currentPhrase == null)\n currentPhrase = new StringBuffer();\n else\n currentPhrase.setLength(0);\n currentPhrase.append(nextToken);\n }\n return (lastValid != null) ? incrementToken() : true;\n }\n Iterator<Object> phraseIt = currentSetToCheck.iterator();\n while (phraseIt != null && phraseIt.hasNext()) {\n char[] phrase = (char[]) phraseIt.next();\n if (startsWith(phrase, currentBuffer)) {\n return incrementToken();\n }\n }\n if (lastValid != null) {\n emit(lastValid);\n lastValid = null;\n return true;\n }\n if (!emitSingleTokens) {\n discardCharTokens(currentPhrase, unusedTokens);\n currentPhrase.setLength(0);\n currentSetToCheck = null;\n if (unusedTokens.size() > 0) {\n Token aToken = unusedTokens.remove(0);\n Log.debug(\"String_Node_Str\");\n emit(aToken);\n return true;\n }\n }\n currentSetToCheck = null;\n Log.debug(\"String_Node_Str\");\n return incrementToken();\n }\n}\n"
|
"public boolean runCommand() {\n if (args.length < 1) {\n return false;\n }\n String playerName = this.getPlayerNameFromArgs(args[0]);\n if (playerName != null) {\n String reason = MCBouncerUtil.getReasonOrDefault(args, MCBouncerUtil.implodeWithoutFirstElement(args, \"String_Node_Str\"), MCBConfiguration.getDefaultReason());\n boolean result = MCBouncerUtil.addBan(playerName, this.getSenderName(), reason);\n if (result) {\n MCBouncer.log.info(this.getSenderName() + \"String_Node_Str\" + playerName + \"String_Node_Str\" + reason);\n this.sendMessageToSender(ChatColor.GREEN + \"String_Node_Str\" + playerName + \"String_Node_Str\");\n } else {\n this.sendMessageToSender(ChatColor.RED + MCBouncerAPI.getError());\n }\n this.kickPlayer(playerName, \"String_Node_Str\" + reason);\n }\n this.kickPlayer(playerName, \"String_Node_Str\" + reason);\n return true;\n}\n"
|
"public synchronized void openConnection() {\n if (isConnected() || isConnecting())\n return;\n final String tag = toString();\n final int connectionType = connParams.getConnectionType();\n final Bundle paramsBundle = connParams.getParamsBundle();\n if (mavlinkConn == null) {\n switch(connectionType) {\n case ConnectionType.TYPE_USB:\n final int baudRate = paramsBundle.getInt(ConnectionType.EXTRA_USB_BAUD_RATE, ConnectionType.DEFAULT_USB_BAUD_RATE);\n mavlinkConn = new UsbConnection(context, baudRate);\n Timber.i(\"String_Node_Str\");\n break;\n case ConnectionType.TYPE_BLUETOOTH:\n final String bluetoothAddress = paramsBundle.getString(ConnectionType.EXTRA_BLUETOOTH_ADDRESS);\n mavlinkConn = new BluetoothConnection(context, bluetoothAddress);\n Timber.i(\"String_Node_Str\");\n break;\n case ConnectionType.TYPE_TCP:\n final String tcpServerIp = paramsBundle.getString(ConnectionType.EXTRA_TCP_SERVER_IP);\n final int tcpServerPort = paramsBundle.getInt(ConnectionType.EXTRA_TCP_SERVER_PORT, ConnectionType.DEFAULT_TCP_SERVER_PORT);\n mavlinkConn = new AndroidTcpConnection(context, tcpServerIp, tcpServerPort, new WifiConnectionHandler(context));\n Timber.i(\"String_Node_Str\");\n break;\n case ConnectionType.TYPE_UDP:\n final int udpServerPort = paramsBundle.getInt(ConnectionType.EXTRA_UDP_SERVER_PORT, ConnectionType.DEFAULT_UDP_SERVER_PORT);\n mavlinkConn = new AndroidUdpConnection(context, udpServerPort);\n Timber.i(\"String_Node_Str\");\n break;\n case ConnectionType.TYPE_SOLO:\n {\n Timber.i(\"String_Node_Str\");\n final String soloLinkId = paramsBundle.getString(ConnectionType.EXTRA_SOLO_LINK_ID, null);\n final String linkPassword = paramsBundle.getString(ConnectionType.EXTRA_SOLO_LINK_PASSWORD, null);\n mavlinkConn = new SoloConnection(context, soloLinkId, linkPassword);\n break;\n }\n default:\n Timber.e(\"String_Node_Str\", connectionType);\n return;\n }\n }\n mavlinkConn.addMavLinkConnectionListener(tag, mConnectionListener);\n if (connectionType == ConnectionType.TYPE_UDP) {\n final String pingIpAddress = paramsBundle.getString(ConnectionType.EXTRA_UDP_PING_RECEIVER_IP);\n if (!TextUtils.isEmpty(pingIpAddress)) {\n try {\n final InetAddress resolvedAddress = InetAddress.getByName(pingIpAddress);\n final int pingPort = paramsBundle.getInt(ConnectionType.EXTRA_UDP_PING_RECEIVER_PORT);\n final long pingPeriod = paramsBundle.getLong(ConnectionType.EXTRA_UDP_PING_PERIOD, ConnectionType.DEFAULT_UDP_PING_PERIOD);\n final byte[] pingPayload = paramsBundle.getByteArray(ConnectionType.EXTRA_UDP_PING_PAYLOAD);\n ((AndroidUdpConnection) mavlinkConn).addPingTarget(resolvedAddress, pingPort, pingPeriod, pingPayload);\n } catch (UnknownHostException e) {\n Timber.e(e, \"String_Node_Str\");\n }\n }\n }\n if (mavlinkConn.getConnectionStatus() == MavLinkConnection.MAVLINK_DISCONNECTED) {\n mavlinkConn.connect();\n GAUtils.sendEvent(new HitBuilders.EventBuilder().setCategory(GAUtils.Category.MAVLINK_CONNECTION).setAction(\"String_Node_Str\").setLabel(connParams.toString()));\n }\n}\n"
|
"public static AccessKeyMetadataType getAccessKey(ServiceConfiguration configuration, String accessKeyId, String userName, String effectiveUserId) throws Exception {\n AccessKeyMetadataType retVal = null;\n boolean seenAllAccessKeys = false;\n String accessKeyMarker = null;\n while (!seenAllAccessKeys && (retVal == null)) {\n ListAccessKeysType listAccessKeysType = MessageHelper.createMessage(ListAccessKeysType.class, effectiveUserId);\n listAccessKeysType.setUserName(userName);\n if (accessKeyMarker != null) {\n listAccessKeysType.setMarker(accessKeyMarker);\n }\n ListAccessKeysResponseType listAccessKeysResponseType = AsyncRequests.<ListAccessKeysType, ListAccessKeysResponseType>sendSync(configuration, listAccessKeysType);\n if (Boolean.TRUE.equals(listAccessKeysResponseType.getListAccessKeysResult().getIsTruncated())) {\n accessKeyMarker = listAccessKeysResponseType.getListAccessKeysResult().getMarker();\n } else {\n seenAllAccessKeys = true;\n }\n if (listAccessKeysResponseType.getListAccessKeysResult().getAccessKeyMetadata() != null && listAccessKeysResponseType.getListAccessKeysResult().getAccessKeyMetadata().getMemberList() != null) {\n for (AccessKeyMetadataType accessKeyMetadataType : listAccessKeysResponseType.getListAccessKeysResult().getAccessKeyMetadata().getMemberList()) {\n if (accessKeyMetadataType.getAccessKeyId().equals(accessKeyId)) {\n retVal = accessKeyMetadataType;\n break;\n }\n }\n }\n }\n return retVal;\n}\n"
|
"public void testInsertionSpeed() {\n BatchInserter inserter = new BatchInserterImpl(PATH);\n BatchInserterIndexProvider provider = new LuceneBatchInserterIndexProvider(inserter);\n BatchInserterIndex index = provider.nodeIndex(\"String_Node_Str\", EXACT_CONFIG);\n index.setCacheCapacity(\"String_Node_Str\", 1000000);\n long t = System.currentTimeMillis();\n for (int i = 0; i < 1000000; i++) {\n Map<String, Object> properties = MapUtil.map(\"String_Node_Str\", \"String_Node_Str\" + i);\n long id = inserter.createNode(properties);\n index.add(id, properties);\n }\n System.out.println(\"String_Node_Str\" + (System.currentTimeMillis() - t));\n index.flush();\n t = System.currentTimeMillis();\n for (int i = 0; i < 1000000; i++) {\n IteratorUtil.count((Iterator<Long>) index.get(\"String_Node_Str\", \"String_Node_Str\" + i));\n }\n System.out.println(\"String_Node_Str\" + (System.currentTimeMillis() - t));\n}\n"
|
"public Resource copyDefinitionsIntoFolder(URI destinationUri) {\n Resource resource = getIndicatorsDefinitions().eResource();\n EMFUtil.getInstance().changeUri(resource, destinationUri);\n if (EMFUtil.getInstance().saveResource(resource)) {\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\" + resource.getURI());\n }\n } else {\n log.error(\"String_Node_Str\" + resource.getURI());\n }\n return resource;\n}\n"
|
"public static Date fromCGL(String str) {\n SimpleDateFormat sdf = QuotesStreamReader.DATE_FORMAT_SHORT;\n try {\n return sdf.parse(str);\n } catch (ParseException e) {\n throw new RuntimeException(\"String_Node_Str\" + str, e);\n }\n}\n"
|
"public void updateFiltersFromUIDL(UIDL uidl, ApplicationConnection client) {\n if (uidl == null) {\n return;\n }\n getWidget().filters.filtersVisible = uidl.hasAttribute(\"String_Node_Str\") ? uidl.getBooleanAttribute(\"String_Node_Str\") : false;\n getWidget().filters.setVisible(getWidget().filters.filtersVisible);\n getWidget().setContainerHeight();\n boolean forceRender = uidl.getBooleanAttribute(\"String_Node_Str\");\n if (!getWidget().filters.filtersVisible) {\n getWidget().filters.container.clear();\n getWidget().filters.filters.clear();\n } else {\n getWidget().filters.filters.clear();\n for (final Iterator<Object> it = uidl.getChildIterator(); it.hasNext(); ) {\n final UIDL cc = (UIDL) it.next();\n if (cc.getTag().startsWith(\"String_Node_Str\")) {\n String cid = cc.getStringAttribute(\"String_Node_Str\");\n UIDL uidld = cc.getChildUIDL(0);\n ComponentConnector connector = client.getPaintable(uidld);\n getWidget().filters.filters.put(cid, connector.getWidget());\n }\n }\n getWidget().filters.reRenderFilterComponents();\n }\n}\n"
|
"public Composite createArea(Composite parent) {\n int numColumns = 2;\n if (description != null && description.length() > 0) {\n numColumns++;\n }\n if ((style & BUTTON_AGGREGATION) == BUTTON_AGGREGATION) {\n numColumns++;\n }\n if ((style & BUTTON_GROUP) == BUTTON_GROUP) {\n numColumns++;\n }\n cmpTop = new Composite(parent, SWT.NONE);\n {\n GridLayout glContent = new GridLayout();\n glContent.numColumns = numColumns;\n glContent.marginHeight = 0;\n glContent.marginWidth = 0;\n glContent.horizontalSpacing = 2;\n cmpTop.setLayout(glContent);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n cmpTop.setLayoutData(gd);\n }\n Label lblDesc = null;\n if (description != null && description.length() > 0) {\n lblDesc = new Label(cmpTop, SWT.NONE);\n lblDesc.setText(description);\n lblDesc.setToolTipText(tooltipWhenBlank);\n }\n if ((style & BUTTON_AGGREGATION) == BUTTON_AGGREGATION) {\n createAggregationItem(cmpTop);\n }\n boolean isSharingChart = context.getDataServiceProvider().checkState(IDataServiceProvider.SHARE_CHART_QUERY);\n final Object[] predefinedQuery = context.getPredefinedQuery(queryType);\n sbHelper.reset(predefinedQuery);\n IDataServiceProvider provider = context.getDataServiceProvider();\n boolean needComboField = predefinedQuery != null && predefinedQuery.length > 0 && (provider.checkState(IDataServiceProvider.SHARE_QUERY) || provider.checkState(IDataServiceProvider.HAS_CUBE) || (provider.checkState(IDataServiceProvider.INHERIT_CUBE) && !provider.checkState(IDataServiceProvider.PART_CHART)) || provider.checkState(IDataServiceProvider.INHERIT_COLUMNS_GROUPS));\n needComboField &= !isSharingChart;\n boolean hasContentAssist = (!isSharingChart && predefinedQuery != null && predefinedQuery.length > 0);\n IAssistField assistField = null;\n if (needComboField) {\n Composite control = new Composite(cmpTop, SWT.NONE);\n GridData gd = new GridData(GridData.FILL_BOTH);\n gd.widthHint = 80;\n control.setLayoutData(gd);\n GridLayout gl = new GridLayout();\n FieldAssistHelper.getInstance().initDecorationMargin(gl);\n control.setLayout(gl);\n cmbDefinition = new CCombo(control, context.getDataServiceProvider().checkState(IDataServiceProvider.PART_CHART) ? SWT.READ_ONLY | SWT.BORDER : SWT.BORDER);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = true;\n cmbDefinition.setLayoutData(gd);\n if (hasContentAssist) {\n assistField = new CComboAssistField(cmbDefinition, null, null);\n }\n cmbDefinition.addListener(SWT.Selection, new Listener() {\n public void handleEvent(Event event) {\n String oldQuery = query.getDefinition() == null ? \"String_Node_Str\" : query.getDefinition();\n String text = btnBuilder.getExpression();\n if (!isTableSharedBinding() && !(isInXTabNonAggrCellAndInheritCube()) && text.equals(oldQuery)) {\n return;\n }\n if (!oldQuery.equals(text) && queryType == ChartUIConstants.QUERY_VALUE) {\n context.getDataServiceProvider().update(ChartUIConstants.QUERY_VALUE, text);\n }\n if (context.getDataServiceProvider().checkState(IDataServiceProvider.PART_CHART) && ChartUIConstants.QUERY_CATEGORY.equals(queryType) && context.getModel() instanceof ChartWithAxes) {\n ((ChartWithAxes) context.getModel()).setTransposed(cmbDefinition.getSelectionIndex() > 0);\n }\n if (predefinedQuery.length == 0 && (getQuery().getDefinition() == null || getQuery().getDefinition().equals(\"String_Node_Str\"))) {\n cmbDefinition.setEnabled(false);\n btnBuilder.setEnabled(false);\n }\n }\n });\n } else {\n Composite control = cmpTop;\n if (hasContentAssist) {\n control = new Composite(cmpTop, SWT.NONE);\n GridData gd = new GridData(GridData.FILL_BOTH);\n gd.widthHint = 80;\n control.setLayoutData(gd);\n GridLayout gl = new GridLayout();\n FieldAssistHelper.getInstance().initDecorationMargin(gl);\n control.setLayout(gl);\n }\n txtDefinition = new Text(control, SWT.BORDER | SWT.SINGLE);\n GridData gdTXTDefinition = new GridData(GridData.FILL_HORIZONTAL);\n gdTXTDefinition.widthHint = 80;\n gdTXTDefinition.grabExcessHorizontalSpace = true;\n txtDefinition.setLayoutData(gdTXTDefinition);\n if (hasContentAssist) {\n assistField = new TextAssistField(txtDefinition, null, null);\n }\n }\n try {\n btnBuilder = (IExpressionButton) context.getUIServiceProvider().invoke(IUIServiceProvider.Command.EXPRESS_BUTTON_CREATE, cmpTop, getInputControl(), context.getExtendedItem(), IUIServiceProvider.COMMAND_EXPRESSION_DATA_BINDINGS, new Listener() {\n public void handleEvent(Event event) {\n onModifyExpression();\n }\n });\n } catch (ChartException e) {\n WizardBase.displayException(e);\n }\n if (needComboField) {\n if (predefinedQuery.length == 0 && (getQuery().getDefinition() == null || getQuery().getDefinition().equals(\"String_Node_Str\"))) {\n cmbDefinition.setEnabled(false);\n btnBuilder.setEnabled(false);\n }\n }\n btnBuilder.setPredefinedQuery(predefinedQuery);\n btnBuilder.setAssitField(assistField);\n if (query != null) {\n btnBuilder.setExpression(query.getDefinition());\n }\n Control dropControl = getInputControl();\n DropTarget target = new DropTarget(dropControl, DND.DROP_COPY);\n Transfer[] types = new Transfer[] { SimpleTextTransfer.getInstance() };\n target.setTransfer(types);\n target.addDropListener(new DataTextDropListener(dropControl, btnBuilder));\n DataDefinitionTextManager.getInstance().addDataDefinitionText(dropControl, this);\n if ((style & BUTTON_GROUP) == BUTTON_GROUP) {\n btnGroup = new Button(cmpTop, SWT.PUSH);\n GridData gdBTNGroup = new GridData();\n ChartUIUtil.setChartImageButtonSizeByPlatform(gdBTNGroup);\n btnGroup.setLayoutData(gdBTNGroup);\n btnGroup.setImage(UIHelper.getImage(\"String_Node_Str\"));\n btnGroup.addSelectionListener(this);\n btnGroup.setToolTipText(Messages.getString(\"String_Node_Str\"));\n }\n boolean isCubeNoMultiDimensions = (provider.checkState(IDataServiceProvider.HAS_CUBE) || provider.checkState(IDataServiceProvider.SHARE_CROSSTAB_QUERY)) && !provider.checkState(IDataServiceProvider.MULTI_CUBE_DIMENSIONS);\n if (context.getDataServiceProvider().checkState(IDataServiceProvider.PART_CHART) || context.getDataServiceProvider().checkState(IDataServiceProvider.SHARE_QUERY)) {\n if (txtDefinition != null && (!context.getDataServiceProvider().checkState(IDataServiceProvider.SHARE_CROSSTAB_QUERY) || isSharingChart)) {\n if (!ChartUIConstants.QUERY_OPTIONAL.equals(queryType) || !provider.checkState(IDataServiceProvider.SHARE_TABLE_QUERY) || getQuery().getDefinition() == null || getQuery().getDefinition().trim().length() == 0) {\n txtDefinition.setEnabled(false);\n btnBuilder.setEnabled(false);\n }\n }\n if (btnGroup != null) {\n btnGroup.setEnabled(false);\n }\n }\n if (cmbDefinition != null && ChartUIConstants.QUERY_OPTIONAL.equals(queryType) && (isCubeNoMultiDimensions || !ChartUIUtil.isGroupingSupported(context))) {\n cmbDefinition.setEnabled(false);\n btnBuilder.setEnabled(false);\n }\n setTooltipForInputControl();\n boolean isRequiredField = (ChartUIConstants.QUERY_CATEGORY.equals(queryType));\n if (lblDesc != null && isRequiredField) {\n FieldAssistHelper.getInstance().addRequiredFieldIndicator(lblDesc);\n }\n return cmpTop;\n}\n"
|
"public Object[] getChildren(Object model) {\n LibraryHandle handle = ((LibraryHandle) model);\n ArrayList list = new ArrayList();\n if (handle.getNamespace() == null) {\n list.add(handle.getDataSources());\n list.add(handle.getDataSets());\n }\n return list.toArray();\n}\n"
|
"public void clearWeed() {\n this.weed = false;\n this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, 0, 2);\n this.markDirtyAndMarkForUpdate();\n}\n"
|
"protected boolean wakeAll(Slot nd) {\n boolean res = false;\n if (nd != null)\n for (; nd != null; nd = nd.getNext()) nd.wake();\n}\n"
|
"public void run() {\n XMLRPCClientInterface client = XMLRPCFactory.instantiate(blog.getUri(), blog.getHttpuser(), blog.getHttppassword());\n Map<String, Object> replyHash = new HashMap<String, Object>();\n replyHash.put(\"String_Node_Str\", Long.toString(comment.commentID));\n replyHash.put(\"String_Node_Str\", replyText);\n replyHash.put(\"String_Node_Str\", \"String_Node_Str\");\n replyHash.put(\"String_Node_Str\", \"String_Node_Str\");\n replyHash.put(\"String_Node_Str\", \"String_Node_Str\");\n Object[] params = { blog.getRemoteBlogId(), blog.getUsername(), blog.getPassword(), Long.toString(comment.postID), replyHash };\n long newCommentID;\n try {\n Object newCommentIDObject = client.call(Method.NEW_COMMENT, params);\n if (newCommentIDObject instanceof Integer) {\n newCommentID = ((Integer) newCommentIDObject).longValue();\n } else if (newCommentIDObject instanceof Long) {\n newCommentID = (Long) newCommentIDObject;\n } else {\n AppLog.e(T.COMMENTS, \"String_Node_Str\");\n newCommentID = -1;\n }\n } catch (XMLRPCException e) {\n AppLog.e(T.COMMENTS, \"String_Node_Str\", e);\n newCommentID = -1;\n } catch (IOException e) {\n AppLog.e(T.COMMENTS, \"String_Node_Str\", e);\n newCommentID = -1;\n } catch (XmlPullParserException e) {\n AppLog.e(T.COMMENTS, \"String_Node_Str\", e);\n newCommentID = -1;\n }\n final boolean succeeded = (newCommentID >= 0);\n if (actionListener != null) {\n handler.post(new Runnable() {\n public void run() {\n actionListener.onActionResult(succeeded);\n }\n });\n }\n}\n"
|
"protected void updateSelection() {\n ConfigTreeNode node = _tree.getSelectedNode();\n _epanel.setObject(node == null ? null : node.getRawConfig());\n boolean enable = (node != null);\n _exportConfigs.setEnabled(enable);\n _cut.setEnabled(enable);\n _copy.setEnabled(enable);\n _delete.setEnabled(enable);\n _findUses.setEnabled(enable);\n}\n"
|
"public String readRawContent(ZVerseBackendState rafBook, Key key) throws IOException {\n SwordBookMetaData bookMetaData = getBookMetaData();\n final String charset = bookMetaData.getBookCharset();\n final String compressType = (String) bookMetaData.getProperty(ConfigEntryType.COMPRESS_TYPE);\n final String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();\n final Versification v11n = Versifications.instance().getVersification(v11nName);\n Verse verse = KeyUtil.getVerse(key);\n int index = verse.getOrdinal();\n final Testament testament = v11n.getTestament(index);\n index = v11n.getTestamentOrdinal(index);\n final RandomAccessFile compRaf;\n final RandomAccessFile idxRaf;\n final RandomAccessFile textRaf;\n if (testament == Testament.OLD) {\n compRaf = rafBook.getOtCompRaf();\n idxRaf = rafBook.getOtIdxRaf();\n textRaf = rafBook.getOtTextRaf();\n } else {\n compRaf = rafBook.getNtCompRaf();\n idxRaf = rafBook.getNtIdxRaf();\n textRaf = rafBook.getNtTextRaf();\n }\n if (idxRaf == null) {\n return \"String_Node_Str\";\n }\n byte[] temp = SwordUtil.readRAF(compRaf, 1L * index * COMP_ENTRY_SIZE, COMP_ENTRY_SIZE);\n if (temp == null || temp.length == 0) {\n return \"String_Node_Str\";\n }\n final long blockNum = SwordUtil.decodeLittleEndian32(temp, 0);\n final int verseStart = SwordUtil.decodeLittleEndian32(temp, 4);\n final int verseSize = SwordUtil.decodeLittleEndian16(temp, 8);\n byte[] uncompressed = null;\n if (blockNum == rafBook.getLastBlockNum() && testament == rafBook.getLastTestament()) {\n uncompressed = rafBook.getLastUncompressed();\n } else {\n temp = SwordUtil.readRAF(idxRaf, blockNum * IDX_ENTRY_SIZE, IDX_ENTRY_SIZE);\n if (temp == null || temp.length == 0) {\n return \"String_Node_Str\";\n }\n final int blockStart = SwordUtil.decodeLittleEndian32(temp, 0);\n final int blockSize = SwordUtil.decodeLittleEndian32(temp, 4);\n final int uncompressedSize = SwordUtil.decodeLittleEndian32(temp, 8);\n final byte[] data = SwordUtil.readRAF(textRaf, blockStart, blockSize);\n decipher(data);\n uncompressed = CompressorType.fromString(compressType).getCompressor(data).uncompress(uncompressedSize).toByteArray();\n rafBook.setLastBlockNum(blockNum);\n rafBook.setLastTestament(testament);\n rafBook.setLastUncompressed(uncompressed);\n }\n final byte[] chopped = new byte[verseSize];\n System.arraycopy(uncompressed, verseStart, chopped, 0, verseSize);\n return SwordUtil.decode(key.getName(), chopped, charset);\n}\n"
|
"private List<Map<String, Object>> getFileListDataSorted(String path, int sort_type) {\n updatePathShow(path);\n return getFileListDataSortedAsync(path, sort_type);\n}\n"
|
"public void testInsert() throws Exception {\n DataHubKey key = new DataHubKey((short) 1003);\n String channelName = \"String_Node_Str\";\n byte[] data = \"String_Node_Str\".getBytes();\n long millis = 90210L;\n Optional<String> contentType = Optional.of(\"String_Node_Str\");\n DataHubCompositeValue value = new DataHubCompositeValue(contentType, Optional.<String>absent(), data, millis);\n ValueInsertionResult expected = new ValueInsertionResult(key, null, null);\n DataHubKey lastUpdateKey = new DataHubKey((short) 1000);\n CassandraChannelsCollection channelsCollection = mock(CassandraChannelsCollection.class);\n CassandraValueWriter inserter = mock(CassandraValueWriter.class);\n CassandraValueReader reader = mock(CassandraValueReader.class);\n ConcurrentMap<String, DataHubKey> lastUpdatedMap = mock(ConcurrentMap.class);\n TimeProvider timeProvider = mock(TimeProvider.class);\n LastKeyFinder lastUpdatedKeyFinder = mock(LastKeyFinder.class);\n when(timeProvider.getMillis()).thenReturn(millis);\n when(inserter.write(channelName, value, Optional.of((int) millis / 1000))).thenReturn(new ValueInsertionResult(key, null, null));\n when(lastUpdatedKeyFinder.queryForLatestKey(channelName)).thenReturn(lastUpdateKey);\n CassandraChannelDao testClass = new CassandraChannelDao(channelsCollection, inserter, reader, lastUpdatedMap, lastUpdatedKeyFinder, null, timeProvider);\n ValueInsertionResult result = testClass.insert(channelName, contentType, Optional.<String>absent(), data);\n assertEquals(expected, result);\n}\n"
|
"public boolean equals(final Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null) {\n return false;\n }\n if (!(obj instanceof FilterKey)) {\n final Throwable t = new RuntimeException(\"String_Node_Str\");\n t.printStackTrace();\n return false;\n }\n final FilterKey other = (FilterKey) obj;\n if (!attribute.equals(other.attribute)) {\n return false;\n }\n if (value == null) {\n if (other.value != null) {\n return false;\n }\n } else if (!value.equals(other.value)) {\n return false;\n }\n return true;\n}\n"
|
"public boolean searcherInitialization(IndexSearcher searcher, Weight firstOrderWeight) throws IOException {\n if (invertedIndex == null) {\n if (cacheGetter != null) {\n invertedIndex = (int[][]) cacheGetter.getCache();\n } else {\n invertedIndex = DictionaryRecIdCache.INSTANCE.getCache(DictionaryRecIdCache.UnInvertedArray.MULTIVALUED_STRING, searcher, uniqueIdField, referenceField);\n }\n boostCache = FieldCache.DEFAULT.getFloats(DictionaryRecIdCache.INSTANCE.getAtomicReader(((IndexSearcher) searcher).getIndexReader()), boostField, false);\n }\n if (invertedIndex == null || invertedIndex.length == 0 || boostCache.length == 0) {\n return false;\n }\n return super.searcherInitialization(searcher, firstOrderWeight);\n}\n"
|
"private void doFireball(final SnipeData v) {\n final Vector targetCoords = new Vector(this.getTargetBlock().getX() + .5 * this.getTargetBlock().getX() / Math.abs(this.getTargetBlock().getX()), this.getTargetBlock().getY() + .5, this.getTargetBlock().getZ() + .5 * this.getTargetBlock().getZ() / Math.abs(this.getTargetBlock().getZ()));\n final Location playerLocation = v.owner().getPlayer().getEyeLocation();\n final Vector slope = targetCoords.subtract(playerLocation.toVector());\n if (useBigBalls) {\n v.owner().getPlayer().launchProjectile(LargeFireball.class).setVelocity(slope.normalize());\n } else {\n v.owner().getPlayer().launchProjectile(SmallFireball.class).setVelocity(slope.normalize());\n }\n}\n"
|
"private void initUIListenerForBaseTypeCombos() {\n customChangedListener = new ISelectionChangedListener() {\n\n public void selectionChanged(SelectionChangedEvent event) {\n if (section != null && getSelectedBaseTypeName().length() > 0) {\n section.autoCommit();\n }\n }\n });\n comboCustomTypes.getCombo().addMouseListener(new MouseAdapter() {\n public void mouseDown(MouseEvent e) {\n ISelection oldSelection = comboCustomTypes.getSelection();\n List<String> allCustomTypeNames = Util.getAllCustomTypeNames(xsdSimpleType.getSchema());\n allCustomTypeNames.remove(xsdSimpleType.getName());\n comboCustomTypes.setInput(allCustomTypeNames);\n comboCustomTypes.setSelection(oldSelection);\n }\n });\n comboBuildInTypes.addSelectionChangedListener(new ISelectionChangedListener() {\n public void selectionChanged(SelectionChangedEvent event) {\n if (section != null && getSelectedBaseTypeName().length() > 0) {\n section.autoCommit();\n }\n }\n });\n comboBuildInTypes.getCombo().addMouseListener(new MouseAdapter() {\n public void mouseDown(MouseEvent e) {\n ISelection oldSelection = comboBuildInTypes.getSelection();\n comboBuildInTypes.setInput(Util.getAllBuildInTypes(xsdSimpleType.getSchema()));\n comboBuildInTypes.setSelection(oldSelection);\n }\n });\n}\n"
|
"public static <ModelClass extends Model> Update table(Class<ModelClass> table) {\n return new Update<>(table);\n}\n"
|
"public static OTDataObject copy(OTDataObject original, OTDatabase otDb, OTDataList orphanDataList, int maxDepth, OTExternalIDProvider idProvider) throws Exception {\n OTDataObject copy = otDb.createDataObject(original.getType());\n copyInto(original, copy, orphanDataList, maxDepth, idProvider, dataObjectFinder);\n return copy;\n}\n"
|
"protected void setUp() throws MojoExecutionException, MojoFailureException {\n if (sourcePaths == null) {\n List<String> sourceRoots = project.getCompileSourceRoots();\n List<File> sources = new ArrayList<File>();\n for (String sourceRoot : sourceRoots) {\n File source = new File(sourceRoot);\n if (source.exists()) {\n sources.add(source);\n }\n }\n sourcePaths = sources.toArray(new File[sources.size()]);\n }\n if (docSources == null && docClasses == null && docNamespaces == null) {\n getLog().warn(\"String_Node_Str\");\n docSources = sourcePaths;\n }\n libraries = new ArrayList<File>();\n for (Artifact artifact : getDependencyArtifacts()) {\n if (\"String_Node_Str\".equals(artifact.getType())) {\n libraries.add(artifact.getFile());\n }\n }\n if (output == null) {\n output = new File(build.getDirectory(), \"String_Node_Str\");\n if (!output.exists()) {\n output.mkdirs();\n }\n }\n if (configFile == null) {\n List<Resource> resources = build.getResources();\n for (Resource resource : resources) {\n File cfg = new File(resource.getDirectory(), getConfigFileName());\n if (cfg.exists()) {\n configFile = cfg;\n break;\n }\n }\n }\n if (configFile == null) {\n URL url = getClass().getResource(\"String_Node_Str\" + getConfigFileName());\n configFile = new File(build.getDirectory(), getConfigFileName());\n try {\n FileUtils.copyURLToFile(url, configFile);\n } catch (IOException e) {\n throw new MojoExecutionException(\"String_Node_Str\");\n }\n }\n if (!configFile.exists()) {\n throw new MojoExecutionException(\"String_Node_Str\" + configFile);\n }\n if (fontsSnapshot == null) {\n URL url;\n if (MavenUtils.isMac()) {\n url = getClass().getResource(\"String_Node_Str\");\n } else {\n url = getClass().getResource(\"String_Node_Str\");\n }\n File fontsSer = new File(build.getDirectory(), \"String_Node_Str\");\n try {\n FileUtils.copyURLToFile(url, fontsSer);\n } catch (IOException e) {\n throw new MojoExecutionException(\"String_Node_Str\");\n }\n fontsSnapshot = fontsSer;\n }\n if (templatesPath == null) {\n templatesPath = generateDefaultTemplate();\n }\n}\n"
|
"private void processTransferredResource(ModelService model, Report report, SimpleJobPluginInfo jobPluginInfo, Job job, List<TransferredResource> resources) {\n if (destinationId == null) {\n destinationId = \"String_Node_Str\";\n }\n try {\n Map<String, String> moveResult = RodaCoreFactory.getTransferredResourcesScanner().moveTransferredResource(resources, destinationId, false, true);\n for (TransferredResource resource : resources) {\n if (!moveResult.containsKey(resource.getUUID())) {\n addFailedReport(model, report, jobPluginInfo, job, resource.getId());\n } else {\n jobPluginInfo.incrementObjectsProcessedWithSuccess();\n }\n }\n } catch (GenericException | IsStillUpdatingException | NotFoundException | RuntimeException e) {\n LOGGER.error(\"String_Node_Str\", e);\n for (TransferredResource resource : resources) {\n addFailedReport(model, report, jobPluginInfo, job, resource.getId());\n }\n }\n}\n"
|
"private void extractFile(final FSFile rec, final File outDir, final ExtractProgressMonitor progressDialog, final LinkedList<String> errorMessages, final ExtractProperties extractProperties, final ObjectContainer<Boolean> skipDirectory, final FSForkType forkType) {\n final String originalFileName;\n if (forkType == FSForkType.DATA)\n originalFileName = rec.getName();\n else if (forkType == FSForkType.MACOS_RESOURCE)\n originalFileName = \"String_Node_Str\" + rec.getName();\n else\n throw new RuntimeException(\"String_Node_Str\" + forkType);\n CreateFileFailedAction defaultCreateFileFailedAction = extractProperties.getCreateFileFailedAction();\n FileExistsAction defaultFileExistsAction = extractProperties.getFileExistsAction();\n UnhandledExceptionAction defaultUnhandledExceptionAction = extractProperties.getUnhandledExceptionAction();\n String fileName = originalFileName;\n while (fileName != null) {\n String curFileName = fileName;\n fileName = null;\n final FSFork theFork = rec.getForkByType(forkType);\n if (theFork == null)\n throw new RuntimeException(\"String_Node_Str\" + forkType);\n else if (forkType == FSForkType.MACOS_RESOURCE && theFork.getLength() == 0)\n return;\n progressDialog.updateCurrentFile(curFileName, theFork.getLength());\n final File outFile = new File(outDir, curFileName);\n if (defaultFileExistsAction != FileExistsAction.OVERWRITE && outFile.exists()) {\n FileExistsAction a;\n if (defaultFileExistsAction == FileExistsAction.PROMPT_USER)\n a = progressDialog.fileExists(outFile);\n else {\n a = defaultFileExistsAction;\n defaultFileExistsAction = FileExistsAction.PROMPT_USER;\n }\n if (a == FileExistsAction.OVERWRITE) {\n } else if (a == FileExistsAction.OVERWRITE_ALL) {\n extractProperties.setFileExistsAction(FileExistsAction.OVERWRITE);\n defaultFileExistsAction = FileExistsAction.OVERWRITE;\n } else if (a == FileExistsAction.SKIP_FILE) {\n errorMessages.addLast(\"String_Node_Str\" + outFile.getAbsolutePath() + \"String_Node_Str\");\n break;\n } else if (a == FileExistsAction.SKIP_DIRECTORY) {\n errorMessages.addLast(\"String_Node_Str\" + outDir.getAbsolutePath() + \"String_Node_Str\");\n skipDirectory.o = true;\n break;\n } else if (a == FileExistsAction.RENAME) {\n fileName = progressDialog.displayRenamePrompt(curFileName, outDir);\n if (fileName == null)\n fileName = curFileName;\n continue;\n } else if (a == FileExistsAction.AUTO_RENAME) {\n fileName = FileNameTools.autoRenameIllegalFilename(curFileName, outDir, false);\n if (fileName == null)\n fileName = curFileName;\n continue;\n } else if (a == FileExistsAction.CANCEL) {\n progressDialog.signalCancel();\n break;\n } else {\n throw new RuntimeException(\"String_Node_Str\" + a);\n }\n }\n try {\n try {\n outFile.getCanonicalPath();\n } catch (Exception e) {\n throw new FileNotFoundException();\n }\n if (!outFile.getParentFile().equals(outDir) || !outFile.getName().equals(curFileName)) {\n throw new FileNotFoundException();\n }\n FileOutputStream fos = new FileOutputStream(outFile);\n if (forkType == FSForkType.MACOS_RESOURCE)\n extractResourceForkToAppleDoubleStream(theFork, fos, progressDialog);\n else\n extractForkToStream(theFork, fos, progressDialog);\n fos.close();\n setExtractedEntryAttributes(outFile, rec, errorMessages);\n if (curFileName != (Object) originalFileName && !curFileName.equals(originalFileName))\n errorMessages.addLast(\"String_Node_Str\" + originalFileName + \"String_Node_Str\" + curFileName + \"String_Node_Str\" + outDir.getAbsolutePath() + \"String_Node_Str\");\n } catch (FileNotFoundException fnfe) {\n System.out.println(\"String_Node_Str\" + outFile + \"String_Node_Str\");\n fnfe.printStackTrace();\n char[] filenameChars = curFileName.toCharArray();\n System.out.println(\"String_Node_Str\" + filenameChars.length + \"String_Node_Str\");\n System.out.print(\"String_Node_Str\");\n for (char c : filenameChars) {\n System.out.print(\"String_Node_Str\" + Util.toHexStringBE(c));\n }\n System.out.println();\n CreateFileFailedAction a;\n if (defaultCreateFileFailedAction == CreateFileFailedAction.PROMPT_USER)\n a = progressDialog.createFileFailed(curFileName, outDir);\n else {\n a = defaultCreateFileFailedAction;\n defaultCreateFileFailedAction = CreateFileFailedAction.PROMPT_USER;\n }\n if (a == CreateFileFailedAction.SKIP_FILE) {\n errorMessages.addLast(\"String_Node_Str\" + outFile.getAbsolutePath() + \"String_Node_Str\");\n break;\n } else if (a == CreateFileFailedAction.SKIP_DIRECTORY) {\n errorMessages.addLast(\"String_Node_Str\" + outDir.getAbsolutePath() + \"String_Node_Str\");\n skipDirectory.o = true;\n break;\n } else if (a == CreateFileFailedAction.RENAME) {\n fileName = progressDialog.displayRenamePrompt(curFileName, outDir);\n if (fileName == null)\n fileName = curFileName;\n continue;\n } else if (a == CreateFileFailedAction.AUTO_RENAME) {\n fileName = FileNameTools.autoRenameIllegalFilename(curFileName, outDir, false);\n if (fileName == null)\n fileName = curFileName;\n continue;\n } else if (a == CreateFileFailedAction.CANCEL) {\n progressDialog.signalCancel();\n break;\n } else {\n throw new RuntimeException(\"String_Node_Str\" + a);\n }\n } catch (IOException ioe) {\n System.err.println(\"String_Node_Str\" + outFile + \"String_Node_Str\");\n ioe.printStackTrace();\n String msg = ioe.getMessage();\n int reply = JOptionPane.showConfirmDialog(this, \"String_Node_Str\" + curFileName + \"String_Node_Str\" + outDir.getAbsolutePath() + (msg != null ? \"String_Node_Str\" + msg + \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\", \"String_Node_Str\", JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE);\n errorMessages.addLast(\"String_Node_Str\" + curFileName + \"String_Node_Str\");\n if (reply == JOptionPane.NO_OPTION) {\n progressDialog.signalCancel();\n }\n } catch (Throwable e) {\n e.printStackTrace();\n errorMessages.addLast(\"String_Node_Str\" + \"String_Node_Str\" + curFileName + \"String_Node_Str\" + \"String_Node_Str\");\n UnhandledExceptionAction a;\n if (defaultUnhandledExceptionAction == UnhandledExceptionAction.PROMPT_USER) {\n a = progressDialog.unhandledException(curFileName, e);\n } else {\n a = defaultUnhandledExceptionAction;\n }\n if (a == UnhandledExceptionAction.ABORT) {\n progressDialog.signalCancel();\n } else if (a == UnhandledExceptionAction.CONTINUE || a == UnhandledExceptionAction.ALWAYS_CONTINUE) {\n if (a == UnhandledExceptionAction.ALWAYS_CONTINUE) {\n extractProperties.setUnhandledExceptionAction(UnhandledExceptionAction.CONTINUE);\n defaultUnhandledExceptionAction = UnhandledExceptionAction.CONTINUE;\n }\n } else {\n throw new RuntimeException(\"String_Node_Str\" + \"String_Node_Str\" + a + \"String_Node_Str\");\n }\n }\n break;\n }\n}\n"
|
"public JSONObject createPathUpdateJson(GeometryPath path, int typeOfEdit, int atIndex) {\n JSONObject topJson = new JSONObject();\n UUID pathUuid = pathList.get(path);\n topJson.put(\"String_Node_Str\", \"String_Node_Str\");\n topJson.put(\"String_Node_Str\", pathUuid.toString());\n if (typeOfEdit == 2) {\n JSONArray pathpoint_jsonArr = new JSONArray();\n for (int i = 0; i < path.getPathPointSet().getSize(); i++) {\n AbstractPathPoint pathPoint = path.getPathPointSet().get(i);\n ArrayList<UUID> vis_uuidList = mapComponentToUUID.get(pathPoint);\n if (vis_uuidList != null) {\n UUID pathpoint_uuid = mapComponentToUUID.get(pathPoint).get(0);\n pathpoint_jsonArr.add(pathpoint_uuid.toString());\n }\n }\n topJson.put(\"String_Node_Str\", pathpoint_jsonArr);\n topJson.put(\"String_Node_Str\", \"String_Node_Str\");\n } else if (typeOfEdit == 1) {\n topJson.put(\"String_Node_Str\", \"String_Node_Str\");\n AbstractPathPoint newPoint = path.getPathPointSet().get(atIndex);\n JSONObject newPointJson = createPathPointObjectJson(newPoint, newPoint.getName(), true, null);\n newPointJson.put(\"String_Node_Str\", mapComponentToUUID.get(newPoint.getBody()).get(0).toString());\n topJson.put(\"String_Node_Str\", newPointJson);\n ArrayList<UUID> vis_uuidList = new ArrayList<UUID>(1);\n UUID newPointMeshUUID = UUID.fromString((String) newPointJson.get(\"String_Node_Str\"));\n vis_uuidList.add(newPointMeshUUID);\n mapComponentToUUID.put(newPoint, vis_uuidList);\n mapUUIDToComponent.put(newPointMeshUUID, newPoint);\n JSONArray pathpoint_jsonArr = new JSONArray();\n for (int i = 0; i < path.getPathPointSet().getSize(); i++) {\n AbstractPathPoint pathPoint = path.getPathPointSet().get(i);\n UUID pathpoint_uuid = mapComponentToUUID.get(pathPoint).get(0);\n pathpoint_jsonArr.add(pathpoint_uuid.toString());\n }\n topJson.put(\"String_Node_Str\", pathpoint_jsonArr);\n } else {\n topJson.put(\"String_Node_Str\", \"String_Node_Str\");\n JSONArray pathpoint_jsonArr = new JSONArray();\n for (int i = 0; i < path.getPathPointSet().getSize(); i++) {\n AbstractPathPoint pathPoint = path.getPathPointSet().get(i);\n JSONObject pathpointupdateJson = new JSONObject();\n UUID pathpoint_uuid = mapComponentToUUID.get(pathPoint).get(0);\n pathpointupdateJson.put(\"String_Node_Str\", pathpoint_uuid.toString());\n Transform localTransform = new Transform();\n Vec3 location = null;\n if (true)\n location = pathPoint.getLocation(state);\n else {\n }\n localTransform.setP(location);\n pathpointupdateJson.put(\"String_Node_Str\", JSONUtilities.createMatrixFromTransform(localTransform, new Vec3(1.0), visScaleFactor));\n pathpoint_jsonArr.add(pathpointupdateJson);\n }\n topJson.put(\"String_Node_Str\", pathpoint_jsonArr);\n }\n return topJson;\n}\n"
|
"public static void oneTimeSetup() {\n mgr = IntegrationTestHelper.createRedmineManager();\n userManager = mgr.getUserManager();\n try {\n createNonAdminUser();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
|
"public boolean setVoiceInput(VoiceInput vi) {\n if (mVoiceInput == null && vi != null) {\n mService.onKeyboardLanguageChanged();\n mVoiceInput = vi;\n if (isVoiceMode() && mVoiceInput != null) {\n if (DBG) {\n Log.d(TAG, \"String_Node_Str\");\n }\n mService.onKey(LatinKeyboardView.KEYCODE_VOICE, null, 0, 0);\n return true;\n }\n }\n return false;\n}\n"
|
"public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Exception {\n try {\n final String mname = method.getName();\n if (mname.equals(\"String_Node_Str\")) {\n int a = (_origin != null) ? (Integer) method.invoke(_origin, args) : 0;\n return 37 * 31 + a;\n }\n if (mname.equals(\"String_Node_Str\")) {\n if (_origin != null) {\n if (_origin instanceof FormProxyObject) {\n return method.invoke(((FormProxyObject) _origin).getOriginObject(), args);\n } else if (args.length == 1 && args[0] instanceof FormProxyObject) {\n return method.invoke(_origin, new Object[] { ((FormProxyObject) args[0]).getOriginObject() });\n } else {\n return method.invoke(_origin, args);\n }\n }\n return args.length == 1 && args[0] == null;\n }\n if (method.getDeclaringClass().isAssignableFrom(FormProxyObject.class)) {\n if (\"String_Node_Str\".equals(mname)) {\n if (_dirtyFieldNames != null && _origin != null) {\n for (Map.Entry<String, Object> me : _cache.entrySet()) {\n final Object value = me.getValue();\n if (value instanceof FormProxyObject) {\n ((FormProxyObject) value).submitToOrigin((BindContext) args[0]);\n } else if (_dirtyFieldNames.contains(me.getKey())) {\n final String setter = toSetter(me.getKey());\n try {\n final Method m = Classes.getMethodByObject(_origin.getClass(), setter, new Object[] { value });\n m.invoke(_origin, Classes.coerce(m.getParameterTypes()[0], value));\n BindELContext.addNotifys(m, _origin, me.getKey(), value, (BindContext) args[0]);\n } catch (NoSuchMethodException e) {\n throw UiException.Aide.wrap(e);\n }\n }\n }\n _dirtyFieldNames.clear();\n }\n } else if (\"String_Node_Str\".equals(mname)) {\n return _origin;\n } else if (\"String_Node_Str\".equals(mname)) {\n if (_dirtyFieldNames != null)\n _dirtyFieldNames.clear();\n if (_cache != null)\n _cache.clear();\n } else if (\"String_Node_Str\".equals(mname)) {\n boolean dirty = false;\n if (_dirtyFieldNames != null && _cache != null) {\n for (Map.Entry<String, Object> me : _cache.entrySet()) {\n final Object value = me.getValue();\n if (value instanceof FormProxyObject) {\n if (((FormProxyObject) value).isFormDirty()) {\n dirty = true;\n break;\n }\n } else if (_dirtyFieldNames.contains(me.getKey())) {\n dirty = true;\n break;\n }\n }\n }\n return dirty;\n } else if (\"String_Node_Str\".equals(mname)) {\n return null;\n } else {\n throw new IllegalAccessError(\"String_Node_Str\" + mname + \"String_Node_Str\");\n }\n } else {\n if (mname.startsWith(\"String_Node_Str\")) {\n if (_origin == null)\n return null;\n final String attr = toAttrName(method);\n if (_cache != null) {\n if (_cache.containsKey(attr)) {\n return _cache.get(attr);\n }\n }\n Object value = method.invoke(_origin, args);\n if (value != null) {\n if (_origin.getClass().getAnnotation(ImmutableFields.class) == null && !(self instanceof ImmutableFields)) {\n value = ProxyHelper.createProxyIfAny(value, method.getAnnotations());\n }\n addCache(attr, value);\n if (value instanceof FormProxyObject) {\n addDirtyField(attr);\n }\n }\n return value;\n } else if (mname.startsWith(\"String_Node_Str\")) {\n if (_origin == null)\n return false;\n final String attr = toAttrName(method, 2);\n if (_cache != null) {\n if (_cache.containsKey(attr)) {\n return _cache.get(attr);\n }\n }\n return method.invoke(_origin, args);\n } else {\n final String attrName = toAttrName(method);\n addCache(attrName, args[0]);\n addDirtyField(attrName);\n }\n }\n } catch (Exception e) {\n throw UiException.Aide.wrap(e);\n }\n return null;\n}\n"
|
"protected EObject getMatchedEObject(EObject from, int side) throws IllegalArgumentException {\n if (side != LEFT_OBJECT && side != RIGHT_OBJECT && side != ANCESTOR_OBJECT) {\n throw new IllegalArgumentException(EMFCompareDiffMessages.getString(\"String_Node_Str\"));\n }\n EObject matchedEObject = null;\n if (matchCrossReferencer != null) {\n final Collection<Setting> settings = matchCrossReferencer.get(from);\n if (settings == null)\n return null;\n for (final org.eclipse.emf.ecore.EStructuralFeature.Setting setting : settings) {\n if (setting.getEObject() instanceof Match2Elements) {\n if (side == LEFT_OBJECT) {\n matchedEObject = ((Match2Elements) setting.getEObject()).getLeftElement();\n } else if (side == RIGHT_OBJECT) {\n matchedEObject = ((Match2Elements) setting.getEObject()).getRightElement();\n } else if (setting.getEObject() instanceof Match3Elements) {\n matchedEObject = ((Match3Elements) setting.getEObject()).getOriginElement();\n }\n }\n }\n } else {\n final Match2Elements matchElem = eObjectToMatch.get(from);\n if (matchElem != null) {\n if (side == LEFT_OBJECT) {\n matchedEObject = matchElem.getLeftElement();\n } else if (side == RIGHT_OBJECT) {\n matchedEObject = matchElem.getRightElement();\n } else if (side == ANCESTOR_OBJECT && matchElem instanceof Match3Elements) {\n matchedEObject = ((Match3Elements) matchElem).getOriginElement();\n }\n }\n }\n return matchedEObject;\n}\n"
|
"private void startRecording(AudioFormat audioFormat) throws SoundTransformException {\n final TargetDataLine line;\n DataLine.Info info = new DataLine.Info(TargetDataLine.class, audioFormat);\n this.baos = new ByteArrayOutputStream();\n if (!AudioSystem.isLineSupported(info)) {\n throw new SoundTransformException(TargetDataLineRecordSoundProcessorErrorCode.AUDIO_FORMAT_NOT_SUPPORTED, new UnsupportedOperationException(), audioFormat);\n }\n try {\n this.line = (TargetDataLine) AudioSystem.getLine(info);\n this.line.open(audioFormat);\n } catch (LineUnavailableException ex) {\n throw new SoundTransformException(TargetDataLineRecordSoundProcessorErrorCode.TARGET_LINE_UNAVAILABLE, ex);\n }\n this.isRecording = true;\n line.start();\n new Thread() {\n public void run() {\n byte[] data = new byte[line.getBufferSize() / 5];\n while (TargetDataLineRecordSoundProcessor.this.isRecording) {\n final int numBytesRead = line.read(data, 0, data.length);\n TargetDataLineRecordSoundProcessor.this.baos.write(data, 0, numBytesRead);\n }\n }\n }.start();\n line.close();\n}\n"
|
"public int compareTo(T o) {\n if (!(this.clazz.isInstance(o))) {\n try {\n if ((this.clazz).equals(Long.class)) {\n Integer value = Integer.valueOf(this.getStringValue());\n Integer obj = Integer.valueOf(o.toString());\n return value.compareTo(obj);\n } else if ((this.clazz).equals(Double.class)) {\n Double value = Double.valueOf(this.getStringValue());\n Double obj = Double.valueOf(o.toString());\n return value.compareTo(obj);\n }\n } catch (NumberFormatException | ClassCastException e) {\n }\n return -1;\n }\n return this.value.compareTo(o);\n}\n"
|
"public Long deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {\n customDeserializerInvoked.value = true;\n if (json == null || json.isJsonNull()) {\n return null;\n } else {\n Number number = json.getAsJsonPrimitive().getAsNumber();\n return number == null ? null : number.longValue();\n }\n}\n"
|
"public boolean equals(Object o) {\n if (o instanceof ExpressionCacheKey) {\n ExpressionCacheKey other = (ExpressionCacheKey) o;\n return this.expr.equals(other.expr) && contextsEqual(this, other) && originalContextsEqual(this, other);\n }\n return false;\n}\n"
|
"public void fire() throws IllegalActionException {\n BooleanToken value = null;\n BooleanToken in = null;\n for (int i = 0; i < input.getWidth(); i++) {\n if (input.hasToken(i)) {\n in = (BooleanToken) (input.get(i));\n if (in != null)\n value = _updateFunction(in, value);\n }\n }\n if (value != null)\n value = _nullifyIncompleteResults(value);\n if (value != null) {\n if (_negate)\n value = value.not();\n output.send(0, (BooleanToken) value);\n }\n}\n"
|
"private void handleRankingReconsideration(Message message) {\n if (!(message.obj instanceof RankingReconsideration))\n return;\n RankingFuture future = (RankingFuture) message.obj;\n future.run();\n try {\n NotificationRecord record = future.get();\n synchronized (mNotificationList) {\n int before = mNotificationList.indexOf(record);\n if (before != -1) {\n Collections.sort(mNotificationList, mRankingComparator);\n int after = mNotificationList.indexOf(record);\n if (before != after) {\n scheduleSendRankingUpdate();\n }\n }\n }\n } catch (InterruptedException e) {\n } catch (ExecutionException e) {\n }\n}\n"
|
"private boolean modifyJointCondition() throws SemanticException {\n JointDataSetHandle handle = null;\n if (leftDataSetName == null || rightDataSetName == null)\n return false;\n if (propertyPageContainer instanceof DataSetEditor) {\n boolean selectionChanged = true;\n handle = (JointDataSetHandle) ((DataSetEditor) propertyPageContainer).getModel();\n Iterator iter = handle.getPropertyHandle(JointDataSet.JOIN_CONDITONS_PROP).iterator();\n while (iter.hasNext()) {\n conditionHandle = (JoinConditionHandle) iter.next();\n if ((conditionHandle.getLeftDataSet() != null && conditionHandle.getLeftDataSet().equals(this.leftDataSetName)) && (conditionHandle.getLeftDataSet() != null && conditionHandle.getRightDataSet().equals(this.rightDataSetName))) {\n selectionChanged = false;\n }\n }\n if (selectionChanged) {\n List datasetName = handle.getDataSetNames();\n for (int i = 0; i < datasetName.size(); i++) {\n try {\n handle.removeDataSet((String) datasetName.get(i));\n } catch (SemanticException e) {\n }\n }\n if (leftDataSetName.equals(rightDataSetName))\n handle.addDataSet(leftDataSetName);\n else {\n handle.addDataSet(leftDataSetName);\n handle.addDataSet(rightDataSetName);\n }\n setParameters(handle);\n addColumnHints(handle);\n if (propertyHandle != null) {\n JoinCondition condition = createJoinCondition();\n propertyHandle.removeItem(0);\n propertyHandle.addItem(condition);\n return true;\n } else\n return false;\n }\n }\n return true;\n}\n"
|
"public static void resizeAndCenter(final Component component) {\n final GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();\n final int screenWidth = gd.getDisplayMode().getWidth();\n final int screenHeight = gd.getDisplayMode().getHeight();\n component.setSize((int) (screenWidth * 0.8), (int) (screenHeight * 0.8));\n center(component);\n}\n"
|
"public static TableDescriptor getTableDescriptor(HTableDescriptor descriptor) {\n Set<ColumnFamilyDescriptor> families = new HashSet<>();\n for (HColumnDescriptor family : descriptor.getColumnFamilies()) {\n families.add(getColumnFamilyDescriptor(family));\n }\n Set<CoprocessorDescriptor> coprocessors = new HashSet<>();\n coprocessors.addAll(CoprocessorUtil.getCoprocessors(descriptor).values());\n Map<String, String> properties = CoprocessorUtil.getNonCoprocessorProperties(descriptor);\n return new TableDescriptor(descriptor.getTableName().getNamespaceAsString(), descriptor.getTableName().getQualifierAsString(), families, coprocessors, properties);\n}\n"
|
"public String resolveDestination(String name) throws DestinationResolutionException {\n String queueName = name;\n if (this.resourceIdResolver != null) {\n queueName = this.resourceIdResolver.resolveToPhysicalResourceId(name);\n }\n if (isValidQueueUrl(queueName)) {\n return queueName;\n }\n if (this.autoCreate) {\n CreateQueueResult createQueueResult = this.amazonSqs.createQueue(new CreateQueueRequest(queueName));\n return createQueueResult.getQueueUrl();\n } else {\n try {\n GetQueueUrlResult getQueueUrlResult = this.amazonSqs.getQueueUrl(new GetQueueUrlRequest(name));\n return getQueueUrlResult.getQueueUrl();\n } catch (QueueDoesNotExistException e) {\n throw new DestinationResolutionException(e.getMessage(), e);\n }\n }\n}\n"
|
"public double[] getQuality(Random rand, double[] ids) {\n double[] res = new double[ids.length];\n double log2 = Math.log(2);\n double dist;\n int r;\n int max = ((RegionCoverageEmbedding) this.embedding).getMax();\n for (int i = 0; i < res.length; i++) {\n Vector<Integer> numb = new Vector<Integer>(this.knownIDs.length);\n for (int j = 0; j < this.knownIDs.length; j++) {\n if (ids[i] != this.knownIDs[j]) {\n dist = this.embedding.computeDistance(ids[i], this.knownIDs[j]);\n } else {\n dist = this.embedding.computeDistance(ids[i], ids[(i + 1) % 2]);\n }\n r = (int) (Math.min(Math.ceil(-Math.log(Math.abs(dist)) / log2), max) * Math.signum(dist));\n if (!numb.contains(r)) {\n numb.add(r);\n }\n if (this.embedding.getDistance() == Distance.SIGNED && numb.size() == 2 * (max - 1)) {\n break;\n }\n if (this.embedding.getDistance() == Distance.RING && numb.size() == (max - 1)) {\n break;\n }\n if (this.embedding.getDistance() == Distance.CLOCKWISE && numb.size() == max) {\n break;\n }\n }\n res[i] = numb.size();\n }\n return res;\n}\n"
|
"public static CheckException chainCheckExceptions(List<CheckException> exs) {\n CheckException last = null;\n for (final CheckException ex : Lists.reverse(exs)) {\n if (last != null) {\n ex.addOtherException(ex);\n }\n last = ex;\n }\n return last;\n}\n"
|
"public static boolean isNPC(Player player) {\n Plugin plugin = server.getPluginManager().getPlugin(\"String_Node_Str\");\n if (plugin != null) {\n return com.citizens.npcs.NPCManager.isNPC(player);\n }\n return false;\n}\n"
|
"public boolean isOnLocalWCETPath(MethodInfo method, InstructionHandle ih) {\n ControlFlowGraph cfg = method.getCode().getControlFlowGraph(false);\n BasicBlockNode block = cfg.getHandleNode(ih, true);\n if (block == null) {\n return false;\n }\n for (ExecutionContext node : wcetTool.getCallGraph().getNodes(method)) {\n Long flow = wcaNodeFlow.get(node).get(block);\n if (flow > 0)\n return true;\n }\n return false;\n}\n"
|
"public RenderProps createRenderProps() {\n MeshBase mesh = getMesh();\n if (mesh != null) {\n RenderProps props = mesh.createRenderProps(this);\n return props;\n } else {\n return RenderProps.createRenderProps(this);\n }\n}\n"
|
"public void offer(SagaEvent sagaEvent) {\n boolean success = false;\n do {\n try {\n persistentStore1.offer(sagaEvent);\n success = true;\n } catch (Exception e) {\n e.printStackTrace();\n try {\n sleep(retryDelay);\n } catch (InterruptedException e1) {\n e1.printStackTrace();\n }\n }\n } while (!success);\n}\n"
|
"public int getDefaultWidth(int colNumber) {\n Dimension size = getPreferredSize().shrink(getFigure().getInsets().getWidth(), getFigure().getInsets().getHeight());\n ;\n if (getRowCount() == 0) {\n return size.width;\n }\n int allNumbers = getColumnCount();\n if (allNumbers <= 0) {\n return size.width;\n }\n if (colNumber <= 0) {\n return size.width;\n }\n int width = size.width;\n int columnNumber = allNumbers;\n for (int i = 1; i < columnNumber + 1; i++) {\n DimensionHandle dimHandle = getCrosstabHandleAdapter().getColumnWidth(colNumber);\n if (dimHandle != null && dimHandle.getMeasure() > 0) {\n allNumbers = allNumbers - 1;\n width = width - getColumnWidthValue(colNumber);\n } else if (dimHandle == null) {\n ITableLayoutOwner.DimensionInfomation info = getColumnWidth(colNumber);\n if (DesignChoiceConstants.UNITS_PERCENTAGE.equals(info.getUnits())) {\n Dimension dim = getFigure().getParent().getClientArea().getSize();\n int containerWidth = dim.width;\n width = width - ((int) (info.getMeasure() * containerWidth / 100));\n }\n }\n }\n if (colNumber == allNumbers) {\n return width / allNumbers + width % allNumbers;\n }\n return (width / allNumbers);\n}\n"
|
"public void test() {\n boolean[][] blocked = { { false, false, false, false, false, false, false, false, false, false, false, false }, { false, false, false, false, false, false, false, false, false, false, false, false }, { false, false, false, false, false, false, false, false, false, false, false, false }, { false, false, false, false, false, false, true, false, false, false, false, false }, { false, false, false, false, false, false, true, false, false, false, false, false }, { false, false, false, false, false, false, false, false, false, false, false, false }, { false, false, false, false, false, false, false, false, false, false, false, false }, { false, false, false, false, false, false, false, false, false, false, false, false }, { false, false, false, false, false, false, false, false, false, false, false, false }, { false, false, false, false, false, false, false, false, false, false, false, false }, { false, false, false, false, false, false, false, false, false, false, false, false } };\n boolean[][] buildingMask = { { false, false, true, false, false }, { true, true, true, true, true }, { false, false, false, false, false } };\n MapRectangle mapArea = new MapRectangle(-15, -15, 30, 30);\n BuildingAreaBitSet buildingSet = new BuildingAreaBitSet(BuildingAreaBitSetTest.createRelativePoints(buildingMask));\n TestMap map = new TestMap(blocked);\n NewConstructionMarksAlgorithm algorithm = new NewConstructionMarksAlgorithm(map, (byte) 0);\n algorithm.calculateConstructMarks(mapArea, buildingSet, null, null, false);\n for (int y = 0; y < map.height; y++) {\n for (int x = 0; x < map.width; x++) {\n assertEquals(x + \"String_Node_Str\" + y, canCostructAt(map, x, y, buildingSet), map.marksSet[x + y * map.width] > 0);\n }\n }\n}\n"
|
"private SimpleHttpResponse requestHttpResponse(String url, Map<String, String> header, Map<String, Object> postMap, Map<String, String> getMap, int method) throws HttpConnectMatjiException {\n SimpleHttpResponse httpResponse = null;\n NetworkInfo netInfo_mobile = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);\n NetworkInfo netInfo_wifi = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n Map<String, String> getParam = (getMap == null) ? null : (new Hashtable(getMap));\n Map<String, Object> postParam = (postMap == null) ? null : (new Hashtable(postMap));\n if ((netInfo_mobile.getState() == NetworkInfo.State.CONNECTED) || (netInfo_wifi.getState() == NetworkInfo.State.CONNECTED)) {\n Map<String, String> baseHeader = new HashMap<String, String>();\n if (header != null) {\n baseHeader.putAll(header);\n }\n if (postParam != null) {\n if (session.isLogin())\n postParam.put(\"String_Node_Str\", \"String_Node_Str\" + session.getToken());\n postParam.put(\"String_Node_Str\", \"String_Node_Str\");\n } else if (getParam != null) {\n Log.d(\"String_Node_Str\", \"String_Node_Str\");\n if (session != null && session.isLogin()) {\n Log.d(\"String_Node_Str\", \"String_Node_Str\" + session.getToken());\n getParam.put(\"String_Node_Str\", \"String_Node_Str\" + session.getToken());\n }\n getParam.put(\"String_Node_Str\", \"String_Node_Str\");\n }\n if (method == HttpUtility.ASYNC_METHOD_POST) {\n HttpUtility utility = HttpUtility.getInstance();\n httpResponse = utility.post(url, baseHeader, postParam, this);\n } else {\n httpResponse = HttpUtility.getInstance().get(url, baseHeader, getParam, this);\n }\n } else {\n httpResponse = null;\n }\n if (httpResponse == null) {\n throw new HttpConnectMatjiException();\n } else\n return httpResponse;\n}\n"
|
"public void createCriteriaAndDefinition(ModelConfiguration config) {\n config.removeAllCriteria();\n for (String attr : config.getInput().getDefinition().getQuasiIdentifyingAttributes()) {\n Hierarchy hierarchy = config.getHierarchy(attr);\n Integer min = config.getMinimumGeneralization(attr);\n Integer max = config.getMaximumGeneralization(attr);\n if (min == null) {\n min = 0;\n }\n if (max == null) {\n if (hierarchy.getHierarchy().length == 0) {\n max = 0;\n } else {\n max = hierarchy.getHierarchy()[0].length - 1;\n }\n }\n config.getInput().getDefinition().setAttributeType(attr, hierarchy);\n config.getInput().getDefinition().setMinimumGeneralization(attr, min);\n config.getInput().getDefinition().setMaximumGeneralization(attr, max);\n }\n if (this.kAnonymityModel != null && this.kAnonymityModel.isActive() && this.kAnonymityModel.isEnabled()) {\n config.addCriterion(this.kAnonymityModel.getCriterion(this));\n }\n if (this.dPresenceModel != null && this.dPresenceModel.isActive() && this.dPresenceModel.isEnabled()) {\n config.addCriterion(this.dPresenceModel.getCriterion(this));\n }\n for (Entry<String, ModelLDiversityCriterion> entry : this.lDiversityModel.entrySet()) {\n if (entry.getValue() != null && entry.getValue().isActive() && entry.getValue().isEnabled()) {\n config.addCriterion(entry.getValue().getCriterion(this));\n }\n }\n for (Entry<String, ModelTClosenessCriterion> entry : this.tClosenessModel.entrySet()) {\n if (entry.getValue() != null && entry.getValue().isActive() && entry.getValue().isEnabled()) {\n if (entry.getValue().getVariant() == 1) {\n if (config.getHierarchy(entry.getValue().getAttribute()) == null) {\n config.setHierarchy(entry.getValue().getAttribute(), Hierarchy.create());\n }\n }\n PrivacyCriterion criterion = entry.getValue().getCriterion(this);\n config.addCriterion(criterion);\n }\n }\n if (!config.containsCriterion(DPresence.class)) {\n if (getInputConfig() != null && getInputConfig().getInput() != null && getInputConfig().getResearchSubset() != null) {\n DataSubset subset = DataSubset.create(getInputConfig().getInput(), getInputConfig().getResearchSubset());\n config.addCriterion(new Inclusion(subset));\n }\n }\n}\n"
|
"public Object freeze(ColumnLoader.ValueSet valueSet, int[] sources) {\n final int chunksPerWord = 64 / bitCount;\n final List<Comparable> valueList = permuteList(valueSet.values, sources);\n final int valueCount = valueList.size();\n final int wordCount = (valueCount + (chunksPerWord - 1)) / chunksPerWord;\n final int remainingChunkCount = valueCount % chunksPerWord;\n final long[] longs = new long[wordCount];\n final int n = valueCount / chunksPerWord;\n int i;\n int k = 0;\n if (valueCount > 0 && valueList.get(0) instanceof Boolean) {\n final List<Boolean> booleans = (List) valueList;\n for (i = 0; i < n; i++) {\n long v = 0;\n for (int j = 0; j < chunksPerWord; j++) {\n v |= (booleans.get(k++) ? (1 << (bitCount * j)) : 0);\n }\n longs[i] = v;\n }\n if (remainingChunkCount > 0) {\n long v = 0;\n for (int j = 0; j < remainingChunkCount; j++) {\n v |= (booleans.get(k++) ? (1 << (bitCount * j)) : 0);\n }\n longs[i] = v;\n }\n } else {\n final List<Number> numbers = (List) valueSet.values;\n for (i = 0; i < n; i++) {\n long v = 0;\n for (int j = 0; j < chunksPerWord; j++) {\n v |= (numbers.get(k++).longValue() << (bitCount * j));\n }\n longs[i] = v;\n }\n if (remainingChunkCount > 0) {\n long v = 0;\n for (int j = 0; j < remainingChunkCount; j++) {\n v |= (numbers.get(k++).longValue() << (bitCount * j));\n }\n longs[i] = v;\n }\n }\n return longs;\n}\n"
|
"public MapReactiveUserDetailsService userDetailsService() {\n UserDetails user = User.withDefaultPasswordEncoder().username(\"String_Node_Str\").password(\"String_Node_Str\").roles(\"String_Node_Str\").build();\n UserDetails admin = User.withDefaultPasswordEncoder().username(\"String_Node_Str\").password(\"String_Node_Str\").roles(\"String_Node_Str\", \"String_Node_Str\").build();\n return new MapReactiveUserDetailsService(user, admin);\n}\n"
|
"public static boolean startCompany(String playerName, String companyName, StockSpace startSpace) {\n Player player = Game.getPlayerManager().getPlayerByName(playerName);\n PublicCompany company = (PublicCompany) Game.getCompanyManager().getPublicCompany(companyName);\n Certificate cert = (Certificate) Bank.getIpo().getCertificates().get(0);\n if (player.getCash() >= (startSpace.getPrice() * 2)) {\n company.setParPrice(startSpace);\n company.setClosed(false);\n Bank.transferCash(player, company, startSpace.getPrice() * 2);\n return true;\n } else\n return false;\n}\n"
|
"public SchemaTypeInfo addClass(JavaClass javaClass) {\n if (javaClass == null) {\n return null;\n } else if (helper.isAnnotationPresent(javaClass, XmlTransient.class)) {\n return null;\n }\n if (typeInfo == null) {\n this.typeInfoClasses = new ArrayList<JavaClass>();\n this.typeInfo = new HashMap<String, TypeInfo>();\n this.typeQNames = new ArrayList<QName>();\n this.userDefinedSchemaTypes = new HashMap<String, QName>();\n this.packageToNamespaceMappings = new HashMap<String, NamespaceInfo>();\n this.namespaceResolver = new NamespaceResolver();\n }\n JavaClass[] jClasses = new JavaClass[] { javaClass };\n preBuildTypeInfo(jClasses);\n postBuildTypeInfo(jClasses);\n TypeInfo info = typeInfo.get(javaClass.getQualifiedName());\n NamespaceInfo namespaceInfo;\n String packageName = javaClass.getPackageName();\n namespaceInfo = this.packageToNamespaceMappings.get(packageName);\n SchemaTypeInfo schemaInfo = new SchemaTypeInfo();\n schemaInfo.setSchemaTypeName(new QName(info.getClassNamespace(), info.getSchemaTypeName()));\n if (helper.isAnnotationPresent(javaClass, XmlRootElement.class)) {\n XmlRootElement rootElemAnnotation = (XmlRootElement) helper.getAnnotation(javaClass, XmlRootElement.class);\n String elementName = rootElemAnnotation.name();\n if (elementName.equals(\"String_Node_Str\") || elementName.equals(\"String_Node_Str\")) {\n if (javaClass.getName().indexOf(\"String_Node_Str\") != -1) {\n elementName = Introspector.decapitalize(javaClass.getName().substring(javaClass.getName().lastIndexOf('$') + 1));\n } else {\n elementName = Introspector.decapitalize(javaClass.getName().substring(javaClass.getName().lastIndexOf('.') + 1));\n }\n if (elementName.length() >= 3) {\n int idx = elementName.length() - 1;\n char ch = elementName.charAt(idx - 1);\n if (Character.isDigit(ch)) {\n char lastCh = Character.toUpperCase(elementName.charAt(idx));\n elementName = elementName.substring(0, idx) + lastCh;\n }\n }\n }\n String rootNamespace = rootElemAnnotation.namespace();\n QName rootElemName = null;\n if (rootNamespace.equals(\"String_Node_Str\")) {\n rootElemName = new QName(namespaceInfo.getNamespace(), elementName);\n } else {\n rootElemName = new QName(rootNamespace, elementName);\n }\n schemaInfo.getGlobalElementDeclarations().add(rootElemName);\n ElementDeclaration declaration = new ElementDeclaration(rootElemName, javaClass, javaClass.getRawName(), false);\n this.globalElements.put(rootElemName, declaration);\n }\n return schemaInfo;\n}\n"
|
"public boolean apply(Game game, Ability source) {\n boolean conditionApplies = false;\n switch(this.type) {\n case FEWER_THAN:\n conditionApplies = game.getBattlefield().countControlled(filter, source.getSourceId(), source.getControllerId(), game) < this.count;\n break;\n case MORE_THAN:\n conditionApplies = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) > this.count;\n break;\n case EQUAL_TO:\n conditionApplies = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) == this.count;\n break;\n }\n if (this.condition != null) {\n conditionApplies = conditionApplies && this.condition.apply(game, source);\n }\n return conditionApplies;\n}\n"
|
"private byte[] bytes(Object b) {\n if (b == null)\n return null;\n final Wire wire = toWire();\n wire.getValueOut().object(b);\n wire.bytes().flip();\n return toWire().getValueIn().bytes();\n}\n"
|
"public void run() {\n try {\n Set<Sha256Hash> ignoredFalsePositives = Sets.newHashSet();\n informListenerForNewTransactions(block, newBlockType, filteredTxHashList, filteredTxn, newStoredBlock, notFirst, registration.listener, ignoredFalsePositives);\n if (newBlockType == NewBlockType.BEST_CHAIN)\n registration.listener.notifyNewBestBlock(newStoredBlock);\n } catch (VerificationException e) {\n log.error(\"String_Node_Str\", e);\n }\n}\n"
|
"private void addLinkTemplatesAndCuries(final HttpServerExchange exchange, final RequestContext context, final Representation rep, final String requestPath) {\n if (context.isParentAccessible()) {\n rep.addLink(new Link(\"String_Node_Str\", URLUtils.getParentPath(requestPath)));\n }\n rep.addLink(new Link(\"String_Node_Str\", URLUtils.getParentPath(requestPath) + \"String_Node_Str\", true));\n rep.addLink(new Link(\"String_Node_Str\", requestPath + \"String_Node_Str\", true));\n rep.addLink(new Link(\"String_Node_Str\", requestPath + \"String_Node_Str\" + RequestContext.FS_FILES_SUFFIX, true));\n rep.addLink(new Link(\"String_Node_Str\", requestPath + \"String_Node_Str\", true));\n rep.addLink(new Link(\"String_Node_Str\", \"String_Node_Str\", Configuration.RESTHEART_ONLINE_DOC_URL + \"String_Node_Str\", true), true);\n}\n"
|
"public void handleEvent(Event event) {\n EventContext context = event.getContext();\n CoreSession session = context.getCoreSession();\n DocumentModel doc = ((DocumentEventContext) context).getSourceDocument();\n try {\n DocumentService docService = Framework.getService(DocumentService.class);\n DocumentModel workspace = docService.getWorkspace(session, doc);\n ServiceValidationService validationService = Framework.getService(ServiceValidationService.class);\n boolean hasReferenceEnvironment = workspace.getProperty(Workspace.SCHEMA, Workspace.PROP_REFERENCEDENVIRONMENT) != null;\n if (hasReferenceEnvironment) {\n Boolean wasValidated = (Boolean) workspace.getProperty(Workspace.SCHEMA, Workspace.PROP_ISVALIDATED);\n boolean isValidated;\n if (wasValidated != null && wasValidated) {\n isValidated = validationService.validateServices(session, doc).isEveryValidationPassed();\n } else {\n isValidated = validationService.validateServices(session, workspace).isEveryValidationPassed();\n }\n if (wasValidated == null || wasValidated != isValidated) {\n workspace.setProperty(Workspace.SCHEMA, Workspace.PROP_ISVALIDATED, isValidated);\n session.saveDocument(workspace);\n }\n session.save();\n }\n if (wasValidated == null || wasValidated != isValidated) {\n workspace.setProperty(Workspace.SCHEMA, Workspace.PROP_ISVALIDATED, isValidated);\n session.saveDocument(workspace);\n }\n session.save();\n } catch (Exception e) {\n log.error(\"String_Node_Str\" + doc.getType(), e);\n }\n}\n"
|
"private void selectAndShowFirstPost() {\n Post post = new Post(WordPress.currentBlog.getLocalTableBlogId(), Integer.valueOf(mPostIDs[0]), isPage);\n if (post.getId() >= 0) {\n WordPress.currentPost = post;\n mOnPostSelectedListener.onPostSelected(post);\n FragmentManager fm = getActivity().getSupportFragmentManager();\n ViewPostFragment f = (ViewPostFragment) fm.findFragmentById(R.id.postDetail);\n if (f != null && f.isInLayout()) {\n getListView().setItemChecked(0, true);\n }\n}\n"
|
"public Account getAccount() throws AuthException {\n return NOBODY_ACCOUNT;\n}\n"
|
"public void beginLine(int iTextSize) {\n m_ticketcurrent.beginLine(iTextSize);\n}\n"
|
"public boolean removeParticipant(String id) {\n if (agents.remove(id) == null) {\n return (agentGroups.remove(id) != null);\n }\n return true;\n}\n"
|
"public void onTap(final PointOverlay pointOverlay) {\n if (pointOverlay.getPoint() == null)\n return;\n AlertDialog.Builder builder = new AlertDialog.Builder(MapsforgeActivity.this).setTitle(pointOverlay.getLabel()).setMessage(UtilsFormat.formatGeoPoint(pointOverlay.getGeoPoint()) + \"String_Node_Str\" + Html.fromHtml(pointOverlay.getDescription(), null, null)).setNegativeButton(R.string.close, new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n }).show();\n}\n"
|
"private void performAction(String id, int type) {\n Api api = App.api;\n String where = BasicColumns.ID + \"String_Node_Str\";\n String[] whereArgs = new String[] { id };\n try {\n switch(type) {\n case Commons.ACTION_STATUS_SHOW:\n {\n Status s = api.statusesShow(id, FanFouApiConfig.FORMAT_HTML, FanFouApiConfig.MODE_LITE);\n if (s == null || s.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n if (!FanFouProvider.updateUserInfo(this, s.user)) {\n FanFouProvider.insertUserInfo(this, s.user);\n }\n FanFouProvider.updateUserInfo(this, s.user);\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_STATUS, s);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n }\n break;\n case Commons.ACTION_STATUS_DELETE:\n {\n Status s = api.statusesDelete(id, FanFouApiConfig.FORMAT_HTML, FanFouApiConfig.MODE_LITE);\n if (s == null || s.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n ContentResolver cr = getContentResolver();\n Uri uri = Uri.parse(StatusInfo.CONTENT_URI + \"String_Node_Str\" + id);\n int result = cr.delete(uri, null, null);\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_STATUS, s);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n }\n break;\n case Commons.ACTION_STATUS_FAVORITE:\n {\n Status s = api.favoritesCreate(id, FanFouApiConfig.FORMAT_HTML, FanFouApiConfig.MODE_LITE);\n if (s == null || s.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n ContentResolver cr = getContentResolver();\n ContentValues values = new ContentValues();\n values.put(StatusInfo.FAVORITED, true);\n int result = cr.update(StatusInfo.CONTENT_URI, values, where, whereArgs);\n FanFouProvider.updateUserInfo(this, s.user);\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_STATUS, s);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n }\n break;\n case Commons.ACTION_STATUS_UNFAVORITE:\n {\n Status s = api.favoritesDelete(id, FanFouApiConfig.FORMAT_HTML, FanFouApiConfig.MODE_LITE);\n if (s == null || s.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n ContentResolver cr = getContentResolver();\n ContentValues values = new ContentValues();\n values.put(StatusInfo.FAVORITED, false);\n int result = cr.update(StatusInfo.CONTENT_URI, values, where, whereArgs);\n FanFouProvider.updateUserInfo(this, s.user);\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_STATUS, s);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n }\n break;\n case Commons.ACTION_USER_SHOW:\n {\n User u = api.userShow(id, FanFouApiConfig.MODE_LITE);\n if (u == null || u.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n if (!FanFouProvider.updateUserInfo(this, u)) {\n FanFouProvider.insertUserInfo(this, u);\n }\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_USER, u);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n }\n break;\n case Commons.ACTION_USER_FOLLOW:\n {\n User u = api.friendshipsCreate(id, FanFouApiConfig.MODE_LITE);\n if (u == null || u.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n u.type = User.TYPE_FRIENDS;\n getContentResolver().insert(UserInfo.CONTENT_URI, u.toContentValues());\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_USER, u);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n break;\n }\n case Commons.ACTION_USER_UNFOLLOW:\n {\n User u = api.friendshipsDelete(id, FanFouApiConfig.MODE_LITE);\n if (u == null || u.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n u.type = Commons.TYPE_NONE;\n ContentResolver cr = getContentResolver();\n cr.delete(UserInfo.CONTENT_URI, BasicColumns.ID + \"String_Node_Str\", new String[] { id });\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_USER, u);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n cr.delete(StatusInfo.CONTENT_URI, StatusInfo.USER_ID + \"String_Node_Str\", new String[] { id });\n }\n }\n break;\n case Commons.ACTION_USER_BLOCK:\n {\n User u = api.blocksCreate(id, FanFouApiConfig.MODE_LITE);\n if (u == null || u.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n getContentResolver().delete(UserInfo.CONTENT_URI, where, whereArgs);\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_USER, u);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n }\n break;\n case Commons.ACTION_USER_UNBLOCK:\n {\n User u = api.blocksDelete(id, FanFouApiConfig.MODE_LITE);\n if (u == null || u.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_USER, u);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n }\n break;\n case Commons.ACTION_DIRECT_MESSAGE_DELETE:\n {\n DirectMessage dm = api.directMessagesDelete(id, FanFouApiConfig.MODE_LITE);\n if (dm == null || dm.isNull()) {\n receiver.send(Commons.RESULT_CODE_FINISH, null);\n } else {\n ContentResolver cr = getContentResolver();\n int result = cr.delete(DirectMessageInfo.CONTENT_URI, where, whereArgs);\n Bundle data = new Bundle();\n data.putInt(Commons.EXTRA_TYPE, type);\n data.putParcelable(Commons.EXTRA_MESSAGE, dm);\n receiver.send(Commons.RESULT_CODE_FINISH, data);\n }\n }\n break;\n case Commons.ACTION_DIRECT_MESSAGE_SHOW:\n break;\n case Commons.ACTION_DIRECT_MESSAGE_CREATE:\n break;\n default:\n break;\n }\n } catch (ApiException e) {\n if (App.DEBUG) {\n Log.e(TAG, \"String_Node_Str\" + id + \"String_Node_Str\" + type + e.getMessage());\n }\n String message = e.getMessage();\n if (e.statusCode == ResponseCode.ERROR_IO_EXCEPTION || e.statusCode >= 500) {\n message = getString(R.string.connection_error_msg);\n }\n Bundle b = new Bundle();\n b.putInt(Commons.EXTRA_TYPE, type);\n b.putInt(Commons.EXTRA_ERROR_CODE, e.statusCode);\n b.putString(Commons.EXTRA_ERROR_MESSAGE, message);\n receiver.send(Commons.RESULT_CODE_ERROR, b);\n }\n}\n"
|
"public static void introVarOuter(final Statement taskContent, final Statement beliefContent, final int index, final DerivationContext nal) {\n if (!(taskContent instanceof Inheritance)) {\n return;\n }\n final Variable varInd1 = new Variable(\"String_Node_Str\");\n final Variable varInd2 = new Variable(\"String_Node_Str\");\n Term term11dependent = null, term12dependent = null, term21dependent = null, term22dependent = null;\n Term term11 = index == 0 ? varInd1 : taskContent.getSubject();\n Term term21 = index == 0 ? varInd1 : beliefContent.getSubject();\n Term term12 = index == 0 ? taskContent.getPredicate() : varInd1;\n Term term22 = index == 0 ? beliefContent.getPredicate() : varInd1;\n if (index == 0) {\n term12dependent = term12;\n term22dependent = term22;\n } else {\n term11dependent = term11;\n term21dependent = term21;\n }\n Term commonTerm = null;\n final Map<Term, Term> subs = new HashMap<>();\n if (index == 0) {\n if (term12 instanceof ImageExt) {\n boolean firstIsImage = term22 instanceof ImageExt;\n boolean secondIsSameImage = true;\n commonTerm = findCommonTermPredicate(term12, term22, commonTerm, firstIsImage, secondIsSameImage);\n if (commonTerm != null) {\n subs.put(commonTerm, varInd2);\n term12 = ((CompoundTerm) term12).applySubstitute(subs);\n term22 = applySubstituteIfCompoundTerm(varInd2, term22, subs);\n }\n }\n if (commonTerm == null && term22 instanceof ImageExt) {\n boolean firstIsImage = term12 instanceof ImageExt;\n boolean secondIsSameImage = true;\n commonTerm = findCommonTermPredicate(term22, term12, commonTerm, firstIsImage, secondIsSameImage);\n if (commonTerm != null) {\n subs.put(commonTerm, varInd2);\n term22 = ((CompoundTerm) term22).applySubstitute(subs);\n term12 = applySubstituteIfCompoundTerm(varInd2, term12, subs);\n }\n }\n } else {\n if (term21 instanceof ImageInt) {\n boolean firstIsImage = true;\n boolean secondIsSameImage = term11 instanceof ImageInt;\n commonTerm = findCommonSubject(term11, term21, commonTerm, firstIsImage, secondIsSameImage);\n if (commonTerm != null) {\n subs.put(commonTerm, varInd2);\n term21 = ((CompoundTerm) term21).applySubstitute(subs);\n term11 = applySubstituteIfCompoundTerm(varInd2, term11, subs);\n }\n }\n if (commonTerm == null && term11 instanceof ImageInt) {\n boolean firstIsImage = true;\n boolean secondIsSameImage = term21 instanceof ImageInt;\n commonTerm = findCommonSubject(term21, term11, commonTerm, firstIsImage, secondIsSameImage);\n if (commonTerm != null) {\n subs.put(commonTerm, varInd2);\n term11 = ((CompoundTerm) term11).applySubstitute(subs);\n term21 = applySubstituteIfCompoundTerm(varInd2, term21, subs);\n }\n }\n }\n Statement state1 = Inheritance.make(term11, term12);\n Statement state2 = Inheritance.make(term21, term22);\n Term content = Implication.make(state1, state2);\n if (content == null) {\n return;\n }\n final TruthValue truthT = nal.getCurrentTask().sentence.truth;\n final TruthValue truthB = nal.getCurrentBelief().truth;\n if ((truthT == null) || (truthB == null)) {\n if (Parameters.DEBUG) {\n System.out.println(\"String_Node_Str\");\n }\n return;\n }\n TruthValue truth = induction(truthT, truthB);\n BudgetValue budget = BudgetFunctions.compoundForward(truth, content, nal);\n nal.doublePremiseTask(content, truth, budget, false, false);\n content = Implication.make(state2, state1);\n truth = induction(truthB, truthT);\n budget = BudgetFunctions.compoundForward(truth, content, nal);\n nal.doublePremiseTask(content, truth, budget, false, false);\n content = Equivalence.make(state1, state2);\n truth = comparison(truthT, truthB);\n budget = BudgetFunctions.compoundForward(truth, content, nal);\n nal.doublePremiseTask(content, truth, budget, false, false);\n final Variable varDep = new Variable(\"String_Node_Str\");\n if (index == 0) {\n state1 = Inheritance.make(varDep, term12dependent);\n state2 = Inheritance.make(varDep, term22dependent);\n } else {\n state1 = Inheritance.make(term11dependent, varDep);\n state2 = Inheritance.make(term21dependent, varDep);\n }\n if ((state1 == null) || (state2 == null)) {\n return;\n content = Conjunction.make(state1, state2);\n truth = intersection(truthT, truthB);\n budget = BudgetFunctions.compoundForward(truth, content, nal);\n nal.doublePremiseTask(content, truth, budget, false, false);\n}\n"
|
"public void addPowerSaveTempWhitelistAppInternal(String packageName, long duration, int userId) {\n try {\n int uid = getContext().getPackageManager().getPackageUid(packageName, userId);\n int appId = UserHandle.getAppId(uid);\n addPowerSaveTempWhitelistAppDirectInternal(callingUid, appId, duration);\n } catch (NameNotFoundException e) {\n }\n}\n"
|
"private ValidateResult checkTrainSetting(ModelConfig modelConfig, ModelTrainConf train) {\n ValidateResult result = new ValidateResult(true);\n if (train.getBaggingNum() == null || train.getBaggingNum() < 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n if (train.getBaggingSampleRate() == null || train.getBaggingSampleRate().compareTo(Double.valueOf(0)) <= 0 || train.getBaggingSampleRate().compareTo(Double.valueOf(1)) > 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n if (train.getValidSetRate() == null || train.getValidSetRate().compareTo(Double.valueOf(0)) < 0 || train.getValidSetRate().compareTo(Double.valueOf(1)) >= 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n if (train.getNumTrainEpochs() == null || train.getNumTrainEpochs() <= 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n if (train.getEpochsPerIteration() != null && train.getEpochsPerIteration() <= 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n if (train.getWorkerThreadCount() != null && (train.getWorkerThreadCount() <= 0 || train.getWorkerThreadCount() > 32)) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n if (train.getConvergenceThreshold() != null && train.getConvergenceThreshold().compareTo(0.0) < 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n if (modelConfig.isClassification() && train.isOneVsAll() && !CommonUtils.isDesicionTreeAlgorithm(train.getAlgorithm()) && !train.getAlgorithm().equalsIgnoreCase(\"String_Node_Str\")) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n if (modelConfig.isClassification() && train.getMultiClassifyMethod() == MultipleClassification.NATIVE && train.getAlgorithm().equalsIgnoreCase(CommonConstants.RF_ALG_NAME)) {\n Object impurity = train.getParams().get(\"String_Node_Str\");\n if (impurity != null && !\"String_Node_Str\".equalsIgnoreCase(impurity.toString()) && !\"String_Node_Str\".equalsIgnoreCase(impurity.toString())) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n GridSearch gs = new GridSearch(train.getParams());\n if (modelConfig.isRegression() && !gs.hasHyperParam()) {\n if (train.getAlgorithm().equalsIgnoreCase(\"String_Node_Str\")) {\n Map<String, Object> params = train.getParams();\n int layerCnt = (Integer) params.get(NNTrainer.NUM_HIDDEN_LAYERS);\n if (layerCnt < 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n List<Integer> hiddenNode = (List<Integer>) params.get(NNTrainer.NUM_HIDDEN_NODES);\n List<String> activateFucs = (List<String>) params.get(NNTrainer.ACTIVATION_FUNC);\n if (hiddenNode.size() != activateFucs.size() || layerCnt != activateFucs.size()) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(NNTrainer.NUM_HIDDEN_LAYERS + \"String_Node_Str\" + NNTrainer.NUM_HIDDEN_NODES + \"String_Node_Str\" + \"String_Node_Str\" + NNTrainer.ACTIVATION_FUNC + \"String_Node_Str\" + \"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n Double learningRate = Double.valueOf(params.get(NNTrainer.LEARNING_RATE).toString());\n if (learningRate != null && (learningRate.compareTo(Double.valueOf(0)) <= 0)) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n Object learningDecayO = params.get(\"String_Node_Str\");\n if (learningDecayO != null) {\n Double learningDecay = Double.valueOf(learningDecayO.toString());\n if (learningDecay != null && ((learningDecay.compareTo(Double.valueOf(0)) < 0) || (learningDecay.compareTo(Double.valueOf(1)) >= 0))) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n }\n if (train.getAlgorithm().equalsIgnoreCase(CommonConstants.GBT_ALG_NAME) || train.getAlgorithm().equalsIgnoreCase(CommonConstants.RF_ALG_NAME)) {\n Map<String, Object> params = train.getParams();\n if (train.getAlgorithm().equalsIgnoreCase(CommonConstants.GBT_ALG_NAME)) {\n Object loss = params.get(\"String_Node_Str\");\n if (loss != null && !\"String_Node_Str\".equalsIgnoreCase(loss.toString()) && !\"String_Node_Str\".equalsIgnoreCase(loss.toString()) && !\"String_Node_Str\".equalsIgnoreCase(loss.toString()) && !\"String_Node_Str\".equalsIgnoreCase(loss.toString())) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n Object maxDepthObj = params.get(\"String_Node_Str\");\n if (maxDepthObj != null) {\n int maxDepth = Integer.valueOf(maxDepthObj.toString());\n if (maxDepth <= 0 || maxDepth > 20) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n Object maxStatsMemoryMBObj = params.get(\"String_Node_Str\");\n if (maxStatsMemoryMBObj != null) {\n int maxStatsMemoryMB = Integer.valueOf(maxStatsMemoryMBObj.toString());\n if (maxStatsMemoryMB <= 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n if (train.getAlgorithm().equalsIgnoreCase(CommonConstants.GBT_ALG_NAME)) {\n Object learningRateObj = params.get(NNTrainer.LEARNING_RATE);\n if (learningRateObj != null) {\n Double learningRate = Double.valueOf(learningRateObj.toString());\n if (learningRate != null && (learningRate.compareTo(Double.valueOf(0)) <= 0)) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n }\n Object minInstancesPerNodeObj = params.get(\"String_Node_Str\");\n if (minInstancesPerNodeObj != null) {\n int minInstancesPerNode = Integer.valueOf(minInstancesPerNodeObj.toString());\n if (minInstancesPerNode <= 0) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n Object treeNumObj = params.get(\"String_Node_Str\");\n if (treeNumObj != null) {\n int treeNum = Integer.valueOf(treeNumObj.toString());\n if (treeNum <= 0 || treeNum > 2000) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n Object minInfoGainObj = params.get(\"String_Node_Str\");\n if (minInfoGainObj != null) {\n Double minInfoGain = Double.valueOf(minInfoGainObj.toString());\n if (minInfoGain != null && (minInfoGain.compareTo(Double.valueOf(0)) < 0)) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n Object impurityObj = params.get(\"String_Node_Str\");\n if (train.getAlgorithm().equalsIgnoreCase(CommonConstants.GBT_ALG_NAME)) {\n if (impurityObj != null && !\"String_Node_Str\".equalsIgnoreCase(impurityObj.toString()) && !\"String_Node_Str\".equalsIgnoreCase(impurityObj.toString())) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n if (train.getAlgorithm().equalsIgnoreCase(CommonConstants.RF_ALG_NAME)) {\n if (impurityObj != null && !\"String_Node_Str\".equalsIgnoreCase(impurityObj.toString()) && !\"String_Node_Str\".equalsIgnoreCase(impurityObj.toString()) && !\"String_Node_Str\".equalsIgnoreCase(impurityObj.toString()) && !\"String_Node_Str\".equalsIgnoreCase(impurityObj.toString())) {\n ValidateResult tmpResult = new ValidateResult(true);\n tmpResult.setStatus(false);\n tmpResult.getCauses().add(\"String_Node_Str\");\n result = ValidateResult.mergeResult(result, tmpResult);\n }\n }\n }\n }\n return result;\n}\n"
|
"public Future<?> disconnect(OfflineCause cause) {\n boolean online = isOnline();\n boolean terminateNow = false;\n if (isSlaveRemoved(cause)) {\n try {\n LOGGER.info(MessageFormat.format(\"String_Node_Str\", slave.getNodeName(), slave.getInstancePageUrl()));\n } catch (IOException ex) {\n LOGGER.info(MessageFormat.format(\"String_Node_Str\", slave.getNodeName(), ex.getMessage()));\n }\n for (LabelAtom label : ElasticBoxLabelFinder.INSTANCE.findLabels(slave)) {\n for (NodeProvisioner.PlannedNode plannedNode : label.nodeProvisioner.getPendingLaunches()) {\n if (plannedNode.displayName.equals(slave.getNodeName())) {\n plannedNode.future.cancel(false);\n }\n }\n }\n if (online) {\n terminateOnOffline = true;\n } else {\n terminateNow = true;\n }\n }\n Future<?> future = super.disconnect(cause);\n if (terminateNow) {\n terminate();\n }\n return future;\n}\n"
|
"public void delWidget(int oldId) {\n List<Integer> ids = this.getIds();\n if (!ids.contains(oldId)) {\n return;\n }\n ids.remove((Integer) oldId);\n this.setIds(ids);\n}\n"
|
"public void start(BundleContext context) throws Exception {\n super.start(context);\n IExtensionPointLimiter extensionPointLimiter = new ExtensionPointLimiterImpl(\"String_Node_Str\", \"String_Node_Str\");\n runProcessContextManagerList = ExtensionImplementationProvider.getInstance(extensionPointLimiter);\n runProcessContextManagerList.add(runProcessContextManager);\n}\n"
|
"public static void setSign(Player plr, Plot p) {\n World world = Bukkit.getWorld(p.world);\n PlotWorld plotworld = PlotMain.getWorldSettings(world);\n Location pl = new Location(world, getPlotBottomLoc(world, p.id).getBlockX(), plotworld.ROAD_HEIGHT + 1, getPlotBottomLoc(world, p.id).getBlockZ());\n Block bs = pl.add(0, 0, -1).getBlock();\n bs.setType(Material.AIR);\n bs.setTypeIdAndData(Material.WALL_SIGN.getId(), (byte) 2, false);\n String id = p.id.y + \"String_Node_Str\" + p.id.x;\n Sign sign = (Sign) bs.getState();\n sign.setLine(0, C.OWNER_SIGN_LINE_1.translated().replaceAll(\"String_Node_Str\", id));\n sign.setLine(1, C.OWNER_SIGN_LINE_2.translated().replaceAll(\"String_Node_Str\", id).replaceAll(\"String_Node_Str\", plr.getName()));\n sign.setLine(2, C.OWNER_SIGN_LINE_3.translated().replaceAll(\"String_Node_Str\", id).replaceAll(\"String_Node_Str\", plr.getName()));\n sign.setLine(3, C.OWNER_SIGN_LINE_4.translated().replaceAll(\"String_Node_Str\", id).replaceAll(\"String_Node_Str\", plr.getName()));\n sign.update(true);\n}\n"
|
"public org.hl7.fhir.dstu2.model.EnrollmentRequest convertEnrollmentRequest(org.hl7.fhir.dstu3.model.EnrollmentRequest src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.EnrollmentRequest tgt = new org.hl7.fhir.dstu2.model.EnrollmentRequest();\n copyDomainResource(src, tgt);\n for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));\n tgt.setRuleset(convertCoding(src.getRuleset()));\n tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));\n tgt.setCreated(src.getCreated());\n tgt.setCoverage(convertReference(src.getCoverage()));\n return tgt;\n}\n"
|
"public void onUpdate() {\n super.onUpdate();\n if (world.isRemote) {\n if (ConfigSound.soundEnabled) {\n if (this.horn == null) {\n this.horn = ImmersiveRailroading.proxy.newSound(this.getDefinition().horn, false, 100, gauge);\n this.idle = ImmersiveRailroading.proxy.newSound(this.getDefinition().idle, true, 80, gauge);\n }\n if (isRunning()) {\n if (!idle.isPlaying()) {\n this.idle.play(getPositionVector());\n }\n } else {\n if (idle.isPlaying()) {\n idle.stop();\n }\n }\n if (this.getDataManager().get(HORN) != 0 && !horn.isPlaying() && isRunning()) {\n horn.play(getPositionVector());\n }\n float absThrottle = Math.abs(this.getThrottle());\n if (this.soundThrottle > absThrottle) {\n this.soundThrottle -= Math.min(0.01f, this.soundThrottle - absThrottle);\n } else if (this.soundThrottle < absThrottle) {\n this.soundThrottle += Math.min(0.01f, absThrottle - this.soundThrottle);\n }\n if (horn.isPlaying()) {\n horn.setPosition(getPositionVector());\n horn.setVelocity(getVelocity());\n horn.update();\n }\n if (idle.isPlaying()) {\n idle.setPitch(0.7f + this.soundThrottle / 4);\n idle.setVolume(Math.max(0.1f, this.soundThrottle));\n idle.setPosition(getPositionVector());\n idle.setVelocity(getVelocity());\n idle.update();\n }\n }\n if (!ConfigGraphics.particlesEnabled) {\n return;\n }\n Vec3d fakeMotion = new Vec3d(this.motionX, this.motionY, this.motionZ);\n List<RenderComponent> exhausts = this.getDefinition().getComponents(RenderComponentType.DIESEL_EXHAUST_X, gauge);\n float throttle = Math.abs(this.getThrottle()) + 0.05f;\n if (exhausts != null && isRunning()) {\n for (RenderComponent exhaust : exhausts) {\n Vec3d particlePos = this.getPositionVector().add(VecUtil.rotateYaw(exhaust.center(), this.rotationYaw + 180)).addVector(0, 0.35 * gauge.scale(), 0);\n double smokeMod = (1 + Math.min(1, Math.max(0.2, Math.abs(this.getCurrentSpeed().minecraft()) * 2))) / 2;\n EntitySmokeParticle sp = new EntitySmokeParticle(world, (int) (40 * (1 + throttle) * smokeMod), throttle, throttle, exhaust.width());\n particlePos = particlePos.subtract(fakeMotion);\n sp.setPosition(particlePos.x, particlePos.y, particlePos.z);\n sp.setVelocity(fakeMotion.x, fakeMotion.y + 0.4 * gauge.scale(), fakeMotion.z);\n world.spawnEntity(sp);\n }\n }\n return;\n }\n float engineTemperature = getEngineTemperature();\n float heatUpSpeed = 0.0029167f * Config.ConfigBalance.dieselLocoHeatTimeScale;\n float coolDownSpeed = heatUpSpeed * ((engineTemperature - ambientTemperature()) / 200);\n if (this.getLiquidAmount() > 0 && isRunning()) {\n float consumption = Math.abs(getThrottle()) + 0.05f;\n float burnTime = BurnUtil.getBurnTime(this.getLiquid());\n if (burnTime == 0) {\n burnTime = 200;\n }\n burnTime *= getDefinition().getFuelEfficiency() / 100f;\n burnTime *= (Config.ConfigBalance.locoDieselFuelEfficiency / 100f);\n while (internalBurn < 0 && this.getLiquidAmount() > 0) {\n internalBurn += burnTime;\n theTank.drain(1, true);\n }\n consumption *= 100;\n consumption *= gauge.scale();\n internalBurn -= consumption;\n if (engineTemperature < 75) {\n setEngineTemperature(engineTemperature + heatUpSpeed);\n }\n }\n if (isRunning()) {\n if (engineTemperature > 70 && !isEngineOverheated()) {\n engineTemperature += heatUpSpeed * (Math.abs(getThrottle()) + 0.1f);\n }\n if (engineTemperature > 150 && Config.ConfigBalance.canDieselEnginesOverheat) {\n engineTemperature = 150;\n setEngineOverheated(true);\n }\n if ((engineTemperature < 50 || !Config.ConfigBalance.canDieselEnginesOverheat) && isEngineOverheated()) {\n setEngineOverheated(false);\n }\n }\n if (this.getThrottle() == 0 && (engineTemperature > 75 || (!isTurnedOn() && engineTemperature >= ambientTemperature()))) {\n engineTemperature -= coolDownSpeed;\n }\n if (engineTemperature < ambientTemperature() && !isTurnedOn()) {\n setEngineTemperature(ambientTemperature());\n }\n if (turnOnOffDelay > 0) {\n turnOnOffDelay -= 1;\n }\n}\n"
|
"public List<LoginModuleConfig> getClientLoginModuleConfigs() {\n return staticSecurityConfig.getClientLoginModuleConfigs();\n}\n"
|
"private void toggle(boolean enabled) {\n LocalAddressFactory.enabled = enabled;\n}\n"
|
"public void run() {\n try {\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\");\n }\n while (!terminated) {\n try {\n TextMessage message = messageQueue.take();\n String type = message.getStringProperty(Constants.EVENT_CLASS_NAME);\n String json = message.getText();\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\", type));\n }\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\", type));\n }\n processorChain.process(type, json, null);\n } catch (Exception e) {\n log.error(\"String_Node_Str\", e);\n }\n }\n } catch (Exception e) {\n if (log.isErrorEnabled()) {\n log.error(\"String_Node_Str\", e);\n }\n }\n}\n"
|
"public void prepare(Report report, Map appContext) {\n ReportDesignHandle rptHandle = report.getReportDesign();\n ModelDteApiAdapter adaptor = new ModelDteApiAdapter(context, context.getSharedScope());\n List dataSourceList = rptHandle.getAllDataSources();\n for (int i = 0; i < dataSourceList.size(); i++) {\n DataSourceHandle dataSource = (DataSourceHandle) dataSourceList.get(i);\n try {\n dteEngine.defineDataSource(adaptor.createDataSourceDesign(dataSource));\n } catch (BirtException be) {\n logger.log(Level.SEVERE, be.getMessage(), be);\n context.addException(dataSource, be);\n }\n }\n List dataSetList = rptHandle.getAllDataSets();\n for (int i = 0; i < dataSetList.size(); i++) {\n DataSetHandle dataset = (DataSetHandle) dataSetList.get(i);\n try {\n adapter.defineDataSet(dataset, dteEngine);\n } catch (BirtException be) {\n logger.log(Level.SEVERE, be.getMessage(), be);\n context.addException(dataset, be);\n }\n }\n new ReportQueryBuilder().build(report, context);\n doPrepareQuery(report, appContext);\n}\n"
|
"public void searchMetadata(HttpRequest request, HttpResponder responder, String namespaceId, String searchQuery, List<String> targets, String sort, int offset, int limit, int numCursors, String cursor) throws Exception {\n Set<MetadataSearchTargetType> types = Collections.emptySet();\n if (targets != null) {\n types = ImmutableSet.copyOf(Iterables.transform(targets, STRING_TO_TARGET_TYPE));\n }\n SortInfo sortInfo = SortInfo.of(URLDecoder.decode(sort, \"String_Node_Str\"));\n if (SortInfo.DEFAULT.equals(sortInfo)) {\n if (!(cursor.isEmpty()) || 0 != numCursors) {\n throw new BadRequestException(\"String_Node_Str\");\n }\n }\n MetadataSearchResponse response = metadataAdmin.search(namespaceId, URLDecoder.decode(searchQuery, \"String_Node_Str\"), types, sortInfo, offset, limit, numCursors, cursor);\n responder.sendJson(HttpResponseStatus.OK, response, MetadataSearchResponse.class, GSON);\n}\n"
|
"private void fetchMDocsByFolder(String completePath) {\n desiredProfile = m_tableProfiles.getProfile(\"String_Node_Str\");\n elementTableDecPanel.removeStyleName(\"String_Node_Str\");\n pageManager.setPageManagerBackend(new MDocFolderBackend(completePath, m_login));\n}\n"
|
"public double branchLength() {\n return Posterior.branchLength(f1, n, lambda);\n}\n"
|
"public static <T extends HasOwningAccount> T doPrivileged(String identifier, Function<String, T> lookupFunction) throws AuthException, IllegalContextAccessException, NoSuchElementException, PersistenceException {\n Context ctx = Contexts.lookup();\n Class<? extends BaseMessage> msgType = ctx.getRequest().getClass();\n LOG.debug(\"String_Node_Str\" + identifier + \"String_Node_Str\" + lookupFunction + \"String_Node_Str\" + Classes.genericsToClasses(lookupFunction));\n List<Class<?>> lookupTypes = Classes.genericsToClasses(lookupFunction);\n if (lookupTypes.isEmpty() || lookupTypes.size() != 2) {\n throw new IllegalArgumentException(\"String_Node_Str\" + lookupFunction.getClass() + \"String_Node_Str\" + identifier + \"String_Node_Str\");\n } else {\n Class<?> rscType = lookupTypes.get(0);\n Ats ats = Ats.inClassHierarchy(rscType);\n Ats msgAts = Ats.inClassHierarchy(msgType);\n if (!ats.has(PolicyVendor.class) && !msgAts.has(PolicyVendor.class)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + identifier + \"String_Node_Str\" + rscType.getCanonicalName() + \"String_Node_Str\" + msgType.getCanonicalName());\n } else if (!ats.has(PolicyResourceType.class) && !msgAts.has(PolicyResourceType.class)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + identifier + \"String_Node_Str\" + rscType.getCanonicalName() + \"String_Node_Str\" + msgType.getCanonicalName());\n } else {\n PolicyVendor vendor = ats.get(PolicyVendor.class);\n PolicyResourceType type = ats.get(PolicyResourceType.class);\n String action = PolicySpec.requestToAction(ctx.getRequest());\n if (action == null) {\n action = vendor.value() + \"String_Node_Str\" + ctx.getRequest().getClass().getSimpleName().replaceAll(\"String_Node_Str\", \"String_Node_Str\").toLowerCase();\n }\n User requestUser = ctx.getUser();\n T requestedObject;\n try {\n requestedObject = lookupFunction.apply(identifier);\n if (requestedObject == null) {\n throw new NoSuchElementException(\"String_Node_Str\" + rscType.getCanonicalName() + \"String_Node_Str\" + identifier + \"String_Node_Str\" + lookupFunction.getClass());\n }\n } catch (PersistenceException ex) {\n Logs.extreme().error(ex, ex);\n LOG.error(ex);\n throw ex;\n } catch (Exception ex) {\n Logs.extreme().error(ex, ex);\n LOG.error(ex);\n throw new PersistenceException(\"String_Node_Str\" + identifier + \"String_Node_Str\" + lookupFunction + \"String_Node_Str\" + Classes.genericsToClasses(lookupFunction), ex);\n }\n Account owningAccount = Accounts.lookupUserById(requestedObject.getOwner().getUniqueId()).getAccount();\n if (!Permissions.isAuthorized(vendor.value(), type.value(), identifier, owningAccount, action, requestUser)) {\n throw new AuthException(\"String_Node_Str\" + type.value() + \"String_Node_Str\" + identifier + \"String_Node_Str\" + requestUser.getName());\n }\n return requestedObject;\n }\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.