content
stringlengths
40
137k
"int bindServiceLocked(IApplicationThread caller, IBinder token, Intent service, String resolvedType, IServiceConnection connection, int flags, int userId) {\n if (DEBUG_SERVICE)\n Slog.v(TAG, \"String_Node_Str\" + service + \"String_Node_Str\" + resolvedType + \"String_Node_Str\" + connection.asBinder() + \"String_Node_Str\" + Integer.toHexString(flags));\n final ProcessRecord callerApp = mAm.getRecordForAppLocked(caller);\n if (callerApp == null) {\n throw new SecurityException(\"String_Node_Str\" + caller + \"String_Node_Str\" + Binder.getCallingPid() + \"String_Node_Str\" + service);\n }\n ActivityRecord activity = null;\n if (token != null) {\n activity = ActivityRecord.isInStackLocked(token);\n if (activity == null) {\n Slog.w(TAG, \"String_Node_Str\" + token);\n return 0;\n }\n }\n int clientLabel = 0;\n PendingIntent clientIntent = null;\n if (callerApp.info.uid == Process.SYSTEM_UID) {\n try {\n clientIntent = service.getParcelableExtra(Intent.EXTRA_CLIENT_INTENT);\n } catch (RuntimeException e) {\n }\n if (clientIntent != null) {\n clientLabel = service.getIntExtra(Intent.EXTRA_CLIENT_LABEL, 0);\n if (clientLabel != 0) {\n service = service.cloneFilter();\n }\n }\n }\n if ((flags & Context.BIND_TREAT_LIKE_ACTIVITY) != 0) {\n mAm.enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS, \"String_Node_Str\");\n }\n final boolean callerFg = callerApp.setSchedGroup != Process.THREAD_GROUP_BG_NONINTERACTIVE;\n ServiceLookupResult res = retrieveServiceLocked(service, resolvedType, Binder.getCallingPid(), Binder.getCallingUid(), userId, true, callerFg);\n if (res == null) {\n return 0;\n }\n if (res.record == null) {\n return -1;\n }\n ServiceRecord s = res.record;\n final long origId = Binder.clearCallingIdentity();\n try {\n if (unscheduleServiceRestartLocked(s, callerApp.info.uid, false)) {\n if (DEBUG_SERVICE)\n Slog.v(TAG, \"String_Node_Str\" + s);\n }\n if ((flags & Context.BIND_AUTO_CREATE) != 0) {\n s.lastActivity = SystemClock.uptimeMillis();\n if (!s.hasAutoCreateConnections()) {\n ProcessStats.ServiceState stracker = s.getTracker();\n if (stracker != null) {\n stracker.setBound(true, mAm.mProcessStats.getMemFactorLocked(), s.lastActivity);\n }\n }\n }\n AppBindRecord b = s.retrieveAppBindingLocked(service, callerApp);\n ConnectionRecord c = new ConnectionRecord(b, activity, connection, flags, clientLabel, clientIntent);\n IBinder binder = connection.asBinder();\n ArrayList<ConnectionRecord> clist = s.connections.get(binder);\n if (clist == null) {\n clist = new ArrayList<ConnectionRecord>();\n s.connections.put(binder, clist);\n }\n clist.add(c);\n b.connections.add(c);\n if (activity != null) {\n if (activity.connections == null) {\n activity.connections = new HashSet<ConnectionRecord>();\n }\n activity.connections.add(c);\n }\n b.client.connections.add(c);\n if ((c.flags & Context.BIND_ABOVE_CLIENT) != 0) {\n b.client.hasAboveClient = true;\n }\n if (s.app != null) {\n updateServiceClientActivitiesLocked(s.app, c, true);\n }\n clist = mServiceConnections.get(binder);\n if (clist == null) {\n clist = new ArrayList<ConnectionRecord>();\n mServiceConnections.put(binder, clist);\n }\n clist.add(c);\n if ((flags & Context.BIND_AUTO_CREATE) != 0) {\n s.lastActivity = SystemClock.uptimeMillis();\n if (bringUpServiceLocked(s, service.getFlags(), callerFg, false) != null) {\n return 0;\n }\n }\n if (s.app != null) {\n if ((flags & Context.BIND_TREAT_LIKE_ACTIVITY) != 0) {\n s.app.treatLikeActivity = true;\n }\n mAm.updateLruProcessLocked(s.app, s.app.hasClientActivities || s.app.treatLikeActivity, b.client);\n mAm.updateOomAdjLocked(s.app);\n }\n if (DEBUG_SERVICE)\n Slog.v(TAG, \"String_Node_Str\" + s + \"String_Node_Str\" + b + \"String_Node_Str\" + b.intent.received + \"String_Node_Str\" + b.intent.apps.size() + \"String_Node_Str\" + b.intent.doRebind);\n if (s.app != null && b.intent.received) {\n try {\n c.conn.connected(s.name, b.intent.binder);\n } catch (Exception e) {\n Slog.w(TAG, \"String_Node_Str\" + s.shortName + \"String_Node_Str\" + c.conn.asBinder() + \"String_Node_Str\" + c.binding.client.processName + \"String_Node_Str\", e);\n }\n if (b.intent.apps.size() == 1 && b.intent.doRebind) {\n requestServiceBindingLocked(s, b.intent, callerFg, true);\n }\n } else if (!b.intent.requested) {\n requestServiceBindingLocked(s, b.intent, callerFg, false);\n }\n getServiceMap(s.userId).ensureNotStartingBackground(s);\n } finally {\n Binder.restoreCallingIdentity(origId);\n }\n return 1;\n}\n"
"public void testProcessAllTerraSARX() throws Exception {\n TestUtils.testProcessAllInPath(spi, TestUtils.rootPathsTerraSarX, productTypeExemptions, exceptionExemptions);\n}\n"
"public static MismatchInfo whyNotSubtypeOf(JSType t1, JSType t2) {\n if (t1.isSingletonObj() && t2.isSingletonObj()) {\n MismatchInfo[] boxedInfo = new MismatchInfo[1];\n ObjectType.whyNotSubtypeOf(found.getObjTypeIfSingletonObj(), expected.getObjTypeIfSingletonObj(), boxedInfo);\n return boxedInfo[0];\n }\n if (t1.isUnion()) {\n MismatchInfo[] boxedInfo = new MismatchInfo[1];\n boolean areSubtypes = t1.isSubtypeOfHelper(true, t2, SubtypeCache.create(), boxedInfo);\n Preconditions.checkState(!areSubtypes);\n return boxedInfo[0];\n }\n return null;\n}\n"
"public void testRemotelyCloseProducerAndAttemptAsyncCompletionSendThrowsAndLeavesMessageReadable() throws Exception {\n try (TestAmqpPeer testPeer = new TestAmqpPeer()) {\n JmsConnection connection = (JmsConnection) testFixture.establishConnecton(testPeer);\n final CountDownLatch producerClosed = new CountDownLatch(1);\n connection.addConnectionListener(new JmsDefaultConnectionListener() {\n public void onProducerClosed(MessageProducer producer, Throwable cause) {\n producerClosed.countDown();\n }\n });\n testPeer.expectBegin();\n testPeer.expectSenderAttach();\n testPeer.remotelyDetachLastOpenedLinkOnLastOpenedSession(true, true);\n Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n Queue queue = session.createQueue(\"String_Node_Str\");\n MessageProducer producer = session.createProducer(queue);\n Message message = session.createTextMessage(\"String_Node_Str\");\n message.setIntProperty(\"String_Node_Str\", 1);\n assertNull(\"String_Node_Str\", message.getJMSDestination());\n testPeer.waitForAllHandlersToComplete(100);\n assertTrue(\"String_Node_Str\", producerClosed.await(2, TimeUnit.SECONDS));\n TestJmsCompletionListener listener = new TestJmsCompletionListener();\n try {\n producer.send(message, listener);\n fail(\"String_Node_Str\");\n } catch (JMSException e) {\n LOG.trace(\"String_Node_Str\", e.getMessage());\n }\n assertFalse(\"String_Node_Str\", listener.awaitCompletion(5, TimeUnit.MILLISECONDS));\n assertNull(\"String_Node_Str\", message.getJMSDestination());\n assertEquals(\"String_Node_Str\", \"String_Node_Str\", ((TextMessage) message).getText());\n assertEquals(\"String_Node_Str\", 1, message.getIntProperty(\"String_Node_Str\"));\n testPeer.expectClose();\n connection.close();\n testPeer.waitForAllHandlersToComplete(2000);\n }\n}\n"
"public void update(float delta) {\n if (relinkHeldItem) {\n linkHeldItemLocationForLocalPlayer(localPlayer.getCharacterEntity(), currentHeldItem, null);\n relinkHeldItem = false;\n }\n for (EntityRef entityRef : entityManager.getEntitiesWith(ItemIsHeldComponent.class)) {\n if (!entityRef.equals(currentHeldItem) && !entityRef.equals(handEntity)) {\n entityRef.removeComponent(ItemIsHeldComponent.class);\n EntityRef camera = localPlayer.getCameraEntity();\n FirstPersonHeldItemMountPointComponent mountPointComponent = camera.getComponent(FirstPersonHeldItemMountPointComponent.class);\n LocationComponent locationComponent = entityRef.getComponent(LocationComponent.class);\n if (mountPointComponent != null && locationComponent != null && locationComponent.getParent().equals(mountPointComponent.mountPointEntity)) {\n entityRef.removeComponent(LocationComponent.class);\n }\n }\n }\n CharacterHeldItemComponent characterHeldItemComponent = localPlayer.getCharacterEntity().getComponent(CharacterHeldItemComponent.class);\n FirstPersonHeldItemMountPointComponent mountPointComponent = localPlayer.getCameraEntity().getComponent(FirstPersonHeldItemMountPointComponent.class);\n if (characterHeldItemComponent == null || mountPointComponent == null) {\n return;\n }\n LocationComponent locationComponent = mountPointComponent.mountPointEntity.getComponent(LocationComponent.class);\n if (locationComponent == null) {\n return;\n }\n long timeElapsedSinceLastUsed = time.getGameTimeInMs() - characterHeldItemComponent.lastItemUsedTime;\n float animateAmount = 0f;\n if (timeElapsedSinceLastUsed < USEANIMATIONLENGTH) {\n animateAmount = 1f - Math.abs(((float) timeElapsedSinceLastUsed / (float) USEANIMATIONLENGTH) - 0.5f);\n }\n float addPitch = 15f * animateAmount;\n float addYaw = 10f * animateAmount;\n locationComponent.setLocalRotation(new Quat4f(TeraMath.DEG_TO_RAD * (mountPointComponent.rotateDegrees.y + addYaw), TeraMath.DEG_TO_RAD * (mountPointComponent.rotateDegrees.x + addPitch), TeraMath.DEG_TO_RAD * mountPointComponent.rotateDegrees.z));\n Vector3f offset = new Vector3f(0.25f * animateAmount, -0.12f * animateAmount, 0f);\n offset.add(mountPointComponent.translate);\n locationComponent.setLocalPosition(offset);\n mountPointComponent.mountPointEntity.saveComponent(locationComponent);\n}\n"
"public int doSolutionOnline(MainActivity activity) {\n String str1 = SystemProperties.get(\"String_Node_Str\");\n if (TextUtils.isEmpty(str1))\n str1 = \"String_Node_Str\";\n String str2 = Build.MODEL;\n if (TextUtils.isEmpty(str2))\n str2 = \"String_Node_Str\";\n String str3 = \"String_Node_Str\";\n if ((!TextUtils.isEmpty(SystemProperties.get(\"String_Node_Str\"))) || (!TextUtils.isEmpty(SystemProperties.get(\"String_Node_Str\"))))\n str3 = \"String_Node_Str\";\n String str4 = com.qihoo.permmgr.util.k.a(mContext);\n String str5 = com.qihoo.permmgr.util.f.a(str4);\n if (TextUtils.isEmpty(str4))\n str5 = \"String_Node_Str\";\n File localFile = new File(\"String_Node_Str\");\n String[] arrayOfString = new String[2];\n arrayOfString[0] = \"String_Node_Str\";\n arrayOfString[1] = \"String_Node_Str\";\n String str6 = com.qihoo.permmgr.util.b.a(localFile, arrayOfString);\n String str7 = str6.split(\"String_Node_Str\")[2];\n String str8 = \"String_Node_Str\" + URLEncoder.encode(str2) + \"String_Node_Str\" + URLEncoder.encode(str7) + \"String_Node_Str\" + URLEncoder.encode(str1) + \"String_Node_Str\" + URLEncoder.encode(str3);\n String url = \"String_Node_Str\" + str8 + \"String_Node_Str\" + a.e + \"String_Node_Str\" + URLEncoder.encode(str5) + \"String_Node_Str\" + 1 + \"String_Node_Str\";\n try {\n HttpGet localHttpGet2 = new HttpGet(url);\n HttpResponse localHttpResponse = new DefaultHttpClient().execute(localHttpGet2);\n int statusCode = localHttpResponse.getStatusLine().getStatusCode();\n String jsonData = AESUtils.b(EntityUtils.toString(localHttpResponse.getEntity()));\n JSONArray arr = new JSONArray(jsonData);\n byte[] bs = new byte[1024];\n int len;\n for (int i = 0; i < arr.length(); i++) {\n JSONObject temp = (JSONObject) arr.get(i);\n String md5 = temp.getString(\"String_Node_Str\");\n String solution = temp.getString(\"String_Node_Str\");\n activity.setStatus(\"String_Node_Str\" + solution + \"String_Node_Str\");\n URL sUrl = new URL(solution);\n URLConnection con = sUrl.openConnection();\n InputStream is = con.getInputStream();\n String md5FilePath = mContext.getFilesDir().getAbsoluteFile() + \"String_Node_Str\" + md5;\n OutputStream os = new FileOutputStream(md5FilePath);\n while ((len = is.read(bs)) != -1) {\n os.write(bs, 0, len);\n }\n os.close();\n is.close();\n if (RootMan.getInstance(mContext).doRoot(md5FilePath) == Constants.ROOT_SUCCESS) {\n return Constants.ROOT_SUCCESS;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return Constants.NOTSUPPORT;\n}\n"
"private void initializeScheduleTable() throws IOException, DatasetManagementException {\n table = tableUtil.getMetaTable();\n Preconditions.checkNotNull(table, \"String_Node_Str\", ScheduleStoreTableUtil.SCHEDULE_STORE_DATASET_NAME);\n if (cacheLoaderInitialized.compareAndSet(false, true)) {\n upgradeCacheLoader = CacheBuilder.newBuilder().expireAfterWrite(1, TimeUnit.MINUTES).build(new UpgradeValueLoader(NAME, factory, tableUtil.getMetaTable()));\n }\n}\n"
"public boolean contains(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder) {\n Set<StreamEvent> compareStreamEvents = findEventSet(matchingEvent, indexedEventHolder);\n if (compareStreamEvents == null) {\n return exhaustiveCollectionExecutor.contains(matchingEvent, indexedEventHolder);\n } else {\n return compareStreamEvents.size() > 0;\n }\n}\n"
"public void setRotationMode(RotationMode mode) {\n if (myRotationMode != mode) {\n myRotationMode = mode;\n if (mode == RotationMode.DEFAULT) {\n setEyeToWorld(getEye(), myViewState.myCenter, getUpVector());\n }\n }\n}\n"
"public static List filterAdminObjects(HandlerContext context) {\n List result = new ArrayList();\n FilterTreeEvent event = null;\n try {\n if (context.getEventObject() instanceof FilterTreeEvent) {\n event = FilterTreeEvent.class.cast(context.getEventObject());\n } else {\n return result;\n }\n List<String> jmsResources = event.getChildObjects();\n if (jmsResources == null || jmsResources.size() <= 0) {\n return result;\n }\n List adminObjs = new ArrayList();\n Map responseMap = RestUtil.restRequest(GuiUtil.getSessionValue(\"String_Node_Str\") + \"String_Node_Str\", null, \"String_Node_Str\", null, false);\n Map<String, Object> extraPropsMap = (Map<String, Object>) ((Map<String, Object>) responseMap.get(\"String_Node_Str\")).get(\"String_Node_Str\");\n if (extraPropsMap != null) {\n Map<String, Object> childRes = (Map<String, Object>) extraPropsMap.get(\"String_Node_Str\");\n if (childRes != null) {\n adminObjs = new ArrayList(childRes.keySet());\n }\n }\n for (String oneJms : jmsResources) {\n if (!adminObjs.contains(oneJms)) {\n result.add(oneJms);\n }\n }\n } catch (Exception ex) {\n GuiUtil.getLogger().warning(\"String_Node_Str\");\n }\n return result;\n}\n"
"protected void checkForErrors() {\n errors = new ArrayList<String>();\n if (!new File(dirTxt.getText()).exists()) {\n errors.add(Messages.getString(\"String_Node_Str\"));\n }\n ItemRecord[] elements = getElements();\n for (ItemRecord record : elements) {\n Map<File, ModelElement> dependencyMap = record.getDependencyMap();\n for (File depFile : dependencyMap.keySet()) {\n if (!repositoryTree.getChecked(ItemRecord.findRecord(depFile))) {\n ModelElement element = dependencyMap.get(depFile);\n String fileName = element != null ? element.getName() : depFile.getName();\n errors.add(\"String_Node_Str\" + record.getElement().getName() + \"String_Node_Str\" + fileName);\n }\n }\n }\n if (!errors.isEmpty()) {\n setErrorMessage(errors.get(0));\n } else {\n setErrorMessage(null);\n }\n updatePageStatus();\n}\n"
"public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n super.reshape(drawable, x, y, width, height);\n if (!waitForMinSizeApplication && isRendered) {\n Rectangle2D drawingArea = calculateGraphDrawingArea();\n graphLayout.applyIncrementalLayout(drawingArea);\n }\n}\n"
"private MediaDesc prerenderVideo(MediaDesc mediaIn, boolean preconvertMP4) throws Exception {\n FfmpegController ffmpegc = new FfmpegController(mContext);\n File outPath = createOutputFile(mediaIn.path, \"String_Node_Str\");\n mMediaManager.applyExportSettings(mediaIn);\n MediaDesc mediaOut = ffmpegc.convertToMP4Stream(mediaIn, outPath.getAbsolutePath(), mShellCallback);\n return mediaOut;\n}\n"
"protected void setUp() throws Exception {\n super.setUp();\n action = (DeleteArtifactAction) getActionProxy(\"String_Node_Str\").getAction();\n assertNotNull(action);\n configurationControl = MockControl.createControl(ArchivaConfiguration.class);\n configuration = (ArchivaConfiguration) configurationControl.getMock();\n repositoryFactoryControl = MockClassControl.createControl(RepositoryContentFactory.class);\n repositoryFactory = (RepositoryContentFactory) repositoryFactoryControl.getMock();\n metadataRepositoryControl = MockControl.createControl(MetadataRepository.class);\n metadataRepository = (MetadataRepository) metadataRepositoryControl.getMock();\n RepositorySession repositorySession = mock(RepositorySession.class);\n when(repositorySession.getRepository()).thenReturn(metadataRepository);\n TestRepositorySessionFactory repositorySessionFactory = (TestRepositorySessionFactory) lookup(RepositorySessionFactory.class);\n repositorySessionFactory.setRepositorySession(repositorySession);\n action.setConfiguration(configuration);\n action.setRepositoryFactory(repositoryFactory);\n}\n"
"public boolean hasNormalEdge(T src, T dst) {\n return cfg.getNormalSuccessors(src).contains(dst);\n}\n"
"protected Object evaluateTemplate(Component eachComp, final Object eachData, final int index, final int size, final String subType) {\n Object oldEach = null;\n Object oldStatus = null;\n try {\n oldEach = eachComp.setAttribute(EACH_VAR, eachData);\n oldStatus = eachComp.setAttribute(EACH_STATUS_VAR, new AbstractForEachStatus() {\n private static final long serialVersionUID = 1L;\n public int getIndex() {\n return index;\n }\n public Object getCurrent() {\n return eachData;\n }\n public Integer getEnd() {\n if (size < 0) {\n throw new UiException(\"String_Node_Str\");\n }\n return size;\n }\n });\n final BindEvaluatorX eval = _binder.getEvaluatorX();\n final BindContext ctx = BindContextUtil.newBindContext(_binder, null, false, null, eachComp, null);\n final Object value = eval.getValue(ctx, eachComp, _expression);\n return value;\n } finally {\n if (oldEach != null) {\n eachComp.setAttribute(EACH_VAR, oldEach);\n } else {\n eachComp.removeAttribute(EACH_VAR);\n }\n if (oldStatus != null) {\n eachComp.setAttribute(EACH_STATUS_VAR, oldStatus);\n } else {\n eachComp.removeAttribute(EACH_STATUS_VAR);\n }\n }\n}\n"
"public void drawValues(Canvas c) {\n PointF center = mChart.getCenterCircleBox();\n float radius = mChart.getRadius();\n float rotationAngle = mChart.getRotationAngle();\n float[] drawAngles = mChart.getDrawAngles();\n float[] absoluteAngles = mChart.getAbsoluteAngles();\n float phaseX = mAnimator.getPhaseX();\n float phaseY = mAnimator.getPhaseY();\n final float holeRadiusPercent = mChart.getHoleRadius() / 100.f;\n float labelRadiusOffset = radius / 10f * 3.6f;\n if (mChart.isDrawHoleEnabled()) {\n labelRadiusOffset = (radius - (radius * holeRadiusPercent)) / 2f;\n }\n final float labelRadius = radius - labelRadiusOffset;\n PieData data = mChart.getData();\n List<IPieDataSet> dataSets = data.getDataSets();\n float yValueSum = data.getYValueSum();\n boolean drawXVals = mChart.isDrawSliceTextEnabled();\n float angle;\n int xIndex = 0;\n c.save();\n for (int i = 0; i < dataSets.size(); i++) {\n IPieDataSet dataSet = dataSets.get(i);\n final boolean drawYVals = dataSet.isDrawValuesEnabled();\n if (!drawYVals && !drawXVals)\n continue;\n final PieDataSet.ValuePosition xValuePosition = dataSet.getXValuePosition();\n final PieDataSet.ValuePosition yValuePosition = dataSet.getYValuePosition();\n applyValueTextStyle(dataSet);\n float lineHeight = Utils.calcTextHeight(mValuePaint, \"String_Node_Str\") + Utils.convertDpToPixel(4f);\n ValueFormatter formatter = dataSet.getValueFormatter();\n int entryCount = dataSet.getEntryCount();\n mValueLinePaint.setColor(dataSet.getValueLineColor());\n mValueLinePaint.setStrokeWidth(Utils.convertDpToPixel(dataSet.getValueLineWidth()));\n float offset = Utils.convertDpToPixel(5.f);\n for (int j = 0; j < entryCount; j++) {\n PieEntry entry = dataSet.getEntryForIndex(j);\n if (xIndex == 0)\n angle = 0.f;\n else\n angle = absoluteAngles[xIndex - 1] * phaseX;\n final float sliceAngle = drawAngles[xIndex];\n final float sliceSpace = dataSet.getSliceSpace();\n final float sliceSpaceMiddleAngle = sliceSpace / (Utils.FDEG2RAD * labelRadius);\n final float angleOffset = (sliceAngle - sliceSpaceMiddleAngle / 2.f) / 2.f;\n angle = angle + angleOffset;\n final float transformedAngle = rotationAngle + angle * phaseY;\n float value = mChart.isUsePercentValuesEnabled() ? entry.getY() / yValueSum * 100f : entry.getY();\n final float sliceXBase = (float) Math.cos(transformedAngle * Utils.FDEG2RAD);\n final float sliceYBase = (float) Math.sin(transformedAngle * Utils.FDEG2RAD);\n final boolean drawXOutside = drawXVals && xValuePosition == PieDataSet.ValuePosition.OUTSIDE_SLICE;\n final boolean drawYOutside = drawYVals && yValuePosition == PieDataSet.ValuePosition.OUTSIDE_SLICE;\n final boolean drawXInside = drawXVals && xValuePosition == PieDataSet.ValuePosition.INSIDE_SLICE;\n final boolean drawYInside = drawYVals && yValuePosition == PieDataSet.ValuePosition.INSIDE_SLICE;\n if (drawXOutside || drawYOutside) {\n final float valueLineLength1 = dataSet.getValueLinePart1Length();\n final float valueLineLength2 = dataSet.getValueLinePart2Length();\n final float valueLinePart1OffsetPercentage = dataSet.getValueLinePart1OffsetPercentage() / 100.f;\n float pt2x, pt2y;\n float labelPtx, labelPty;\n float line1Radius;\n if (mChart.isDrawHoleEnabled())\n line1Radius = (radius - (radius * holeRadiusPercent)) * valueLinePart1OffsetPercentage + (radius * holeRadiusPercent);\n else\n line1Radius = radius * valueLinePart1OffsetPercentage;\n final float polyline2Width = dataSet.isValueLineVariableLength() ? labelRadius * valueLineLength2 * (float) Math.abs(Math.sin(transformedAngle * Utils.FDEG2RAD)) : labelRadius * valueLineLength2;\n final float pt0x = line1Radius * sliceXBase + center.x;\n final float pt0y = line1Radius * sliceYBase + center.y;\n final float pt1x = labelRadius * (1 + valueLineLength1) * sliceXBase + center.x;\n final float pt1y = labelRadius * (1 + valueLineLength1) * sliceYBase + center.y;\n if (transformedAngle % 360.0 >= 90.0 && transformedAngle % 360.0 <= 270.0) {\n pt2x = pt1x - polyline2Width;\n pt2y = pt1y;\n mValuePaint.setTextAlign(Align.RIGHT);\n labelPtx = pt2x - offset;\n labelPty = pt2y;\n } else {\n pt2x = pt1x + polyline2Width;\n pt2y = pt1y;\n mValuePaint.setTextAlign(Align.LEFT);\n labelPtx = pt2x + offset;\n labelPty = pt2y;\n }\n if (dataSet.getValueLineColor() != ColorTemplate.COLOR_NONE) {\n c.drawLine(pt0x, pt0y, pt1x, pt1y, mValueLinePaint);\n c.drawLine(pt1x, pt1y, pt2x, pt2y, mValueLinePaint);\n }\n if (drawXOutside && drawYOutside) {\n drawValue(c, formatter, value, entry, 0, labelPtx, labelPty, dataSet.getValueTextColor(j));\n if (j < data.getEntryCount() && entry.getLabel() != null) {\n c.drawText(entry.getLabel(), labelPtx, labelPty + lineHeight, mValuePaint);\n }\n } else if (drawXOutside) {\n if (j < data.getEntryCount()) {\n mValuePaint.setColor(dataSet.getValueTextColor(j));\n c.drawText(entry.getLabel(), labelPtx, labelPty + lineHeight / 2.f, mValuePaint);\n }\n } else if (drawYOutside) {\n drawValue(c, formatter, value, entry, 0, labelPtx, labelPty + lineHeight / 2.f, dataSet.getValueTextColor(j));\n }\n }\n if (drawXInside || drawYInside) {\n float x = labelRadius * sliceXBase + center.x;\n float y = labelRadius * sliceYBase + center.y;\n mValuePaint.setTextAlign(Align.CENTER);\n if (drawXInside && drawYInside) {\n drawValue(c, formatter, value, entry, 0, x, y, dataSet.getValueTextColor(j));\n if (j < data.getEntryCount()) {\n c.drawText(entry.getLabel(), x, y + lineHeight, mValuePaint);\n }\n } else if (drawXInside) {\n if (j < data.getEntryCount()) {\n mValuePaint.setColor(dataSet.getValueTextColor(j));\n c.drawText(entry.getLabel(), x, y + lineHeight / 2f, mValuePaint);\n }\n } else if (drawYInside) {\n drawValue(c, formatter, value, entry, 0, x, y + lineHeight / 2f, dataSet.getValueTextColor(j));\n }\n }\n xIndex++;\n }\n }\n c.restore();\n}\n"
"public OngoingFinalSetOperationSubqueryBuilder<Z> endSetWith() {\n subListener.verifySubqueryBuilderEnded();\n listener.onBuilderEnded(this);\n return (OngoingFinalSetOperationSubqueryBuilder<Z>) (OngoingFinalSetOperationSubqueryBuilder) finalSetOperationBuilder;\n}\n"
"protected String getInjectionMethodPropertyName(Method method, AnnotationInfo ainfo) throws AnnotationProcessorException {\n String methodName = method.getName();\n String propertyName = null;\n if ((methodName.length() > 3) && methodName.startsWith(\"String_Node_Str\")) {\n propertyName = methodName.substring(3, 4).toLowerCase(Locale.US) + methodName.substring(4);\n } else {\n throw new AnnotationProcessorException(localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\"), ainfo);\n }\n return propertyName;\n}\n"
"public IStatus doAction() {\n try {\n conceptList = WorkbenchClipboard.getWorkbenchClipboard().getConcepts();\n XSDFactory factory = XSDFactory.eINSTANCE;\n if (!conceptList.isEmpty()) {\n int index = 0;\n for (Iterator it = conceptList.iterator(); it.hasNext(); ) {\n if (conceptList.get(index).getSchema() != null) {\n typeList = Util.getTypeDefinition(conceptList.get(index).getSchema());\n }\n index++;\n Object concept = it.next();\n if (concept instanceof XSDElementDeclaration) {\n XSDElementDeclaration copy_concept = (XSDElementDeclaration) concept;\n XSDElementDeclaration new_copy_concept = factory.createXSDElementDeclaration();\n ;\n new_copy_concept = (XSDElementDeclaration) copy_concept.cloneConcreteComponent(true, false);\n InputDialog id = new InputDialog(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + copy_concept.getName(), new IInputValidator() {\n public String isValid(String newText) {\n if ((newText == null) || \"String_Node_Str\".equals(newText))\n return \"String_Node_Str\";\n EList list = schema.getElementDeclarations();\n for (Iterator iter = list.iterator(); iter.hasNext(); ) {\n XSDElementDeclaration d = (XSDElementDeclaration) iter.next();\n if (d.getName().equals(newText))\n return \"String_Node_Str\";\n }\n return null;\n }\n });\n id.setBlockOnOpen(true);\n int ret = id.open();\n if (ret == Window.CANCEL) {\n return Status.CANCEL_STATUS;\n }\n new_copy_concept.setName(id.getValue());\n for (int i = 0; i < new_copy_concept.getIdentityConstraintDefinitions().size(); i++) {\n String name = new_copy_concept.getIdentityConstraintDefinitions().get(i).getName().replaceAll(copy_concept.getName(), new_copy_concept.getName());\n new_copy_concept.getIdentityConstraintDefinitions().get(i).setName(name);\n }\n new_copy_concept.updateElement();\n schema.getContents().add(new_copy_concept);\n addAnnotationForXSDElementDeclaration(copy_concept, new_copy_concept);\n }\n }\n HashMap<String, XSDTypeDefinition> typeDef = Util.getTypeDefinition(schema);\n for (XSDTypeDefinition type : copyTypeSet) {\n if (typeDef.containsKey(type.getName()))\n continue;\n XSDTypeDefinition typedefinitionClone = null;\n if (type instanceof XSDComplexTypeDefinition) {\n typedefinitionClone = factory.createXSDComplexTypeDefinition();\n typedefinitionClone = (XSDComplexTypeDefinition) type.cloneConcreteComponent(true, false);\n schema.getContents().add((XSDComplexTypeDefinition) typedefinitionClone);\n addAnnotationForComplexType((XSDComplexTypeDefinition) type, (XSDComplexTypeDefinition) typedefinitionClone);\n } else if (type instanceof XSDSimpleTypeDefinition) {\n schema.getContents().add((XSDSimpleTypeDefinition) type.cloneConcreteComponent(true, false));\n }\n }\n schema.getElement();\n page.markDirty();\n page.refresh();\n getOperationHistory();\n WorkbenchClipboard.getWorkbenchClipboard().conceptsReset();\n typeList.clear();\n return Status.OK_STATUS;\n } else if (WorkbenchClipboard.getWorkbenchClipboard().getParticles().size() > 0) {\n copyElements();\n WorkbenchClipboard.getWorkbenchClipboard().particlesReset();\n page.markDirty();\n page.refresh();\n getOperationHistory();\n return Status.OK_STATUS;\n } else\n return Status.CANCEL_STATUS;\n } catch (Exception e) {\n e.printStackTrace();\n MessageDialog.openError(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getLocalizedMessage());\n }\n return Status.OK_STATUS;\n}\n"
"public String getReference(String name) throws IllegalActionException {\n boolean isInputPort = false;\n name = processCode(name);\n String[] nameChannelOffset = parseName(name);\n String portName = nameChannelOffset[0];\n String channel = nameChannelOffset[1];\n TypedIOPort port = getPort(portName);\n CodeGeneratorHelper sourceHelper = this;\n if (port != null && port.isInput()) {\n isInputPort = true;\n int channelNumber = new Integer(channel).intValue();\n Receiver receiver = port.getReceivers()[channelNumber][0];\n Iterator sourcePorts = port.sourcePortList().iterator();\n breakOutLabel: while (sourcePorts.hasNext()) {\n IOPort sourcePort = (IOPort) sourcePorts.next();\n Receiver[][] remoteReceivers = sourcePort.getRemoteReceivers();\n for (int i = 0; i < remoteReceivers.length; i++) {\n for (int j = 0; j < remoteReceivers[i].length; j++) {\n if (remoteReceivers[i][j] == receiver) {\n portName = sourcePort.getName();\n channel = \"String_Node_Str\" + i;\n sourceHelper = (CodeGeneratorHelper) _getHelper(sourcePort.getContainer());\n break breakOutLabel;\n }\n }\n }\n }\n }\n String refName = _getReference(name);\n String convertMethod = (String) sourceHelper._portConversions.get(portName + \"String_Node_Str\" + channel);\n if (convertMethod != null) {\n String type = (String) sourceHelper._portDeclareTypes.get(portName + \"String_Node_Str\" + channel);\n if (type.equals(\"String_Node_Str\")) {\n String typeName = convertMethod.substring(0, convertMethod.indexOf(\"String_Node_Str\"));\n if (_isPrimitiveType(typeName)) {\n refName += \"String_Node_Str\" + typeName;\n sourceHelper._newTypesUsed.add(typeName);\n }\n } else if (type.equals(\"String_Node_Str\")) {\n if (!isInputPort) {\n refName = refName.replace('[', '_').replace(']', '_');\n }\n } else {\n }\n }\n return refName;\n}\n"
"private void computeTransientFields() {\n final int capacity = Containers.hashMapCapacity(properties.size());\n byName = new LinkedHashMap<>(capacity);\n indices = new LinkedHashMap<>(capacity);\n assignableTo = new HashSet<>(4);\n assignableTo.add(getName());\n scanPropertiesFrom(this);\n byName = compact(byName);\n assignableTo = CollectionsExt.unmodifiableOrCopy(assignableTo);\n allProperties = byName.values();\n if (byName instanceof HashMap<?, ?>) {\n allProperties = Collections.unmodifiableCollection(allProperties);\n }\n isSimple = true;\n int mandatory = 0;\n for (final Map.Entry<String, PropertyType> entry : byName.entrySet()) {\n final int minimumOccurs, maximumOccurs;\n final PropertyType property = entry.getValue();\n if (property instanceof DefaultAttributeType<?>) {\n minimumOccurs = ((DefaultAttributeType<?>) property).getMinimumOccurs();\n maximumOccurs = ((DefaultAttributeType<?>) property).getMaximumOccurs();\n isSimple &= (minimumOccurs == maximumOccurs);\n } else if (property instanceof FieldType) {\n minimumOccurs = ((FieldType) property).getMinimumOccurs();\n maximumOccurs = ((FieldType) property).getMaximumOccurs();\n isSimple = false;\n } else {\n continue;\n }\n if (maximumOccurs != 0) {\n isSimple &= (maximumOccurs == 1);\n indices.put(entry.getKey(), indices.size());\n if (minimumOccurs != 0) {\n mandatory++;\n }\n }\n }\n indices = compact(indices);\n final int n = indices.size();\n isSparse = (n > 24) && (mandatory <= n / 2);\n}\n"
"public void update(User user, Object entity, PropertyMap changes) {\n ProjectModel model = null;\n if (projectModel != null) {\n model = em.find(ProjectModel.class, new Integer(projectModel.getId()).longValue());\n }\n if (model != null) {\n if (changes.get(AdminUtil.PROP_PM_NAME) != null)\n model.setName((String) changes.get(AdminUtil.PROP_PM_NAME));\n if (changes.get(AdminUtil.PROP_PM_STATUS) != null)\n model.setStatus((ProjectModelStatus) changes.get(AdminUtil.PROP_PM_STATUS));\n if (changes.get(AdminUtil.PROP_PM_USE) != null) {\n List<ProjectModelVisibility> visibilities = model.getVisibilities();\n for (ProjectModelVisibility v : visibilities) {\n if (user.getOrganization().equals(v.getOrganization())) {\n v.setType((ProjectModelType) changes.get(AdminUtil.PROP_PM_USE));\n em.merge(v);\n }\n }\n }\n model = em.merge(model);\n if (changes.get(AdminUtil.PROP_LOG_FRAME) != null && (Boolean) changes.get(AdminUtil.PROP_LOG_FRAME)) {\n LogFrameModel logFrameModel = null;\n if (model.getLogFrameModel() != null) {\n logFrameModel = em.find(LogFrameModel.class, model.getLogFrameModel().getId());\n } else {\n logFrameModel = new LogFrameModel();\n logFrameModel.setProjectModel(model);\n }\n if (changes.get(AdminUtil.PROP_LOG_FRAME_NAME) != null)\n log_frame_name = (String) changes.get(AdminUtil.PROP_LOG_FRAME_NAME);\n if (changes.get(AdminUtil.PROP_OBJ_MAX) != null)\n objectives_max = (Integer) changes.get(AdminUtil.PROP_OBJ_MAX);\n if (changes.get(AdminUtil.PROP_OBJ_MAX_PER_GROUP) != null)\n objectives_max_per_group = (Integer) changes.get(AdminUtil.PROP_OBJ_MAX_PER_GROUP);\n if (changes.get(AdminUtil.PROP_OBJ_ENABLE_GROUPS) != null)\n objectives_enable_groups = (Boolean) changes.get(AdminUtil.PROP_OBJ_ENABLE_GROUPS);\n if (changes.get(AdminUtil.PROP_OBJ_MAX_GROUPS) != null)\n objectives_max_groups = (Integer) changes.get(AdminUtil.PROP_OBJ_MAX_GROUPS);\n if (changes.get(AdminUtil.PROP_A_MAX) != null)\n activities_max = (Integer) changes.get(AdminUtil.PROP_A_MAX);\n if (changes.get(AdminUtil.PROP_A_ENABLE_GROUPS) != null)\n activities_enable_groups = (Boolean) changes.get(AdminUtil.PROP_A_ENABLE_GROUPS);\n if (changes.get(AdminUtil.PROP_A_MAX_PER_RESULT) != null)\n activities_max_per_result = (Integer) changes.get(AdminUtil.PROP_A_MAX_PER_RESULT);\n if (changes.get(AdminUtil.PROP_A_MAX_GROUPS) != null)\n activities_max_groups = (Integer) changes.get(AdminUtil.PROP_A_MAX_GROUPS);\n if (changes.get(AdminUtil.PROP_A_MAX_PER_GROUP) != null)\n activities_max_per_group = (Integer) changes.get(AdminUtil.PROP_A_MAX_PER_GROUP);\n if (changes.get(AdminUtil.PROP_R_MAX) != null)\n results_max = (Integer) changes.get(AdminUtil.PROP_R_MAX);\n if (changes.get(AdminUtil.PROP_R_ENABLE_GROUPS) != null)\n results_enable_groups = (Boolean) changes.get(AdminUtil.PROP_R_ENABLE_GROUPS);\n if (changes.get(AdminUtil.PROP_R_MAX_PER_OBJ) != null)\n results_max_per_obj = (Integer) changes.get(AdminUtil.PROP_R_MAX_PER_OBJ);\n if (changes.get(AdminUtil.PROP_R_MAX_GROUPS) != null)\n results_max_groups = (Integer) changes.get(AdminUtil.PROP_R_MAX_GROUPS);\n if (changes.get(AdminUtil.PROP_R_MAX_PER_GROUP) != null)\n results_max_per_group = (Integer) changes.get(AdminUtil.PROP_R_MAX_PER_GROUP);\n if (changes.get(AdminUtil.PROP_P_MAX) != null)\n prerequisites_max = (Integer) changes.get(AdminUtil.PROP_P_MAX);\n if (changes.get(AdminUtil.PROP_P_ENABLE_GROUPS) != null)\n prerequisites_enable_groups = (Boolean) changes.get(AdminUtil.PROP_P_ENABLE_GROUPS);\n if (changes.get(AdminUtil.PROP_P_MAX_GROUPS) != null)\n prerequisites_max_groups = (Integer) changes.get(AdminUtil.PROP_P_MAX_GROUPS);\n if (changes.get(AdminUtil.PROP_P_MAX_PER_GROUP) != null)\n prerequisites_max_per_group = (Integer) changes.get(AdminUtil.PROP_P_MAX_PER_GROUP);\n logFrameModel.setName(log_frame_name);\n logFrameModel.setActivitiesGroupsMax(activities_max_groups);\n logFrameModel.setActivitiesMax(activities_max);\n logFrameModel.setActivitiesPerExpectedResultMax(activities_max_per_result);\n logFrameModel.setActivitiesPerGroupMax(activities_max_per_group);\n logFrameModel.setEnableActivitiesGroups(activities_enable_groups);\n logFrameModel.setEnableExpectedResultsGroups(results_enable_groups);\n logFrameModel.setExpectedResultsGroupsMax(results_max_groups);\n logFrameModel.setExpectedResultsMax(results_max);\n logFrameModel.setExpectedResultsPerGroupMax(results_max_per_group);\n logFrameModel.setExpectedResultsPerSpecificObjectiveMax(results_max_per_obj);\n logFrameModel.setSpecificObjectivesGroupsMax(objectives_max_groups);\n logFrameModel.setEnableSpecificObjectivesGroups(objectives_enable_groups);\n logFrameModel.setSpecificObjectivesMax(objectives_max);\n logFrameModel.setSpecificObjectivesPerGroupMax(objectives_max_per_group);\n logFrameModel.setPrerequisitesGroupsMax(prerequisites_max_groups);\n logFrameModel.setEnablePrerequisitesGroups(prerequisites_enable_groups);\n logFrameModel.setPrerequisitesMax(prerequisites_max);\n logFrameModel.setPrerequisitesPerGroupMax(prerequisites_max_per_group);\n if (model.getLogFrameModel() != null) {\n logFrameModel = em.merge(logFrameModel);\n } else {\n em.persist(logFrameModel);\n }\n modelToUpdate = model;\n modelToUpdate.setLogFrameModel(logFrameModel);\n }\n if (changes.get(AdminUtil.PROP_FX_FLEXIBLE_ELEMENT) != null) {\n ModelUtil.persistFlexibleElement(em, mapper, changes, model);\n modelToUpdate = em.find(ProjectModel.class, model.getId());\n }\n final PhaseModelDTO phaseDTOToSave = (PhaseModelDTO) changes.get(AdminUtil.PROP_PHASE_MODEL);\n final Integer displayOrder = (Integer) changes.get(AdminUtil.PROP_PHASE_ORDER);\n final Boolean root = (Boolean) changes.get(AdminUtil.PROP_PHASE_ROOT);\n final Integer numRows = (Integer) changes.get(AdminUtil.PROP_PHASE_ROWS);\n final String guide = (String) changes.get(AdminUtil.PROP_PHASE_GUIDE);\n PhaseModel phaseToSave = new PhaseModel();\n if (phaseDTOToSave != null) {\n phaseToSave.setName(phaseDTOToSave.getName());\n if (displayOrder != null)\n phaseToSave.setDisplayOrder(displayOrder);\n if (guide != null && !guide.isEmpty())\n phaseToSave.setGuide(guide);\n for (PhaseModelDTO sucDTO : phaseDTOToSave.getSuccessorsDTO()) {\n if (sucDTO.getId() != 0) {\n PhaseModel suc = em.find(PhaseModel.class, Long.valueOf(String.valueOf(sucDTO.getId())));\n phaseToSave.getSuccessors().add(suc);\n }\n }\n PhaseModel phaseFound = null;\n for (PhaseModel phase : model.getPhases()) {\n if (phaseDTOToSave.getId() == phase.getId()) {\n phaseFound = phase;\n }\n }\n if (phaseFound != null) {\n phaseFound.setName(phaseToSave.getName());\n phaseFound.setSuccessors(phaseToSave.getSuccessors());\n if (numRows != null)\n phaseFound.getLayout().setRowsCount(numRows);\n if (displayOrder != null)\n phaseFound.setDisplayOrder(displayOrder);\n if (guide != null && !guide.isEmpty())\n phaseFound.setGuide(guide);\n phaseToSave = em.merge(phaseFound);\n } else {\n phaseToSave.setParentProjectModel(model);\n Layout phaseLayout = new Layout();\n phaseLayout.setColumnsCount(1);\n if (numRows != null)\n phaseLayout.setRowsCount(numRows);\n else\n phaseLayout.setRowsCount(1);\n LayoutGroup phaseGroup = new LayoutGroup();\n phaseGroup.setTitle(phaseToSave.getName() + \"String_Node_Str\");\n phaseGroup.setColumn(0);\n phaseGroup.setRow(0);\n phaseGroup.setParentLayout(phaseLayout);\n List<LayoutGroup> phaseGroups = new ArrayList<LayoutGroup>();\n phaseGroups.add(phaseGroup);\n phaseLayout.setGroups(phaseGroups);\n phaseToSave.setLayout(phaseLayout);\n em.persist(phaseToSave);\n }\n model.addPhase(phaseToSave);\n if (root != null && root)\n model.setRootPhase(phaseToSave);\n else if (root != null && !root && phaseFound != null && model.getRootPhase().getId() == phaseFound.getId())\n model.setRootPhase(null);\n modelToUpdate = em.merge(model);\n }\n }\n}\n"
"public static void createTemplatesFile() {\n try {\n if (Config.templatesFile.exists()) {\n Config.templatesFile.delete();\n }\n Config.templatesFile.createNewFile();\n Config.templates = YamlConfiguration.loadConfiguration(Config.templatesFile);\n Config.templates.set(\"String_Node_Str\", \"String_Node_Str\");\n Config.templates.set(\"String_Node_Str\", \"String_Node_Str\");\n Config.templates.set(\"String_Node_Str\", \"String_Node_Str\");\n Config.templates.set(\"String_Node_Str\", \"String_Node_Str\");\n Config.templates.set(\"String_Node_Str\", 4);\n Config.templates.save(Config.templatesFile);\n } catch (Exception e) {\n e.printStackTrace();\n FactionsPlusPlugin.info(\"String_Node_Str\");\n return;\n }\n}\n"
"default public void save(String title) {\n T webDriver = get();\n if (webDriver instanceof TakesScreenshot) {\n logger.info(\"String_Node_Str\", title);\n File scrFile = null;\n try {\n copyFile(scrFile, new File(\"String_Node_Str\" + new Date().getTime() + \"String_Node_Str\"));\n } catch (IOException e1) {\n logger.info(\"String_Node_Str\", e1);\n }\n }\n}\n"
"public Answer backupSnapshot(CopyCommand cmd) {\n DataTO srcData = cmd.getSrcTO();\n DataTO destData = cmd.getDestTO();\n SnapshotObjectTO snapshot = (SnapshotObjectTO) srcData;\n PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO) snapshot.getDataStore();\n SnapshotObjectTO destSnapshot = (SnapshotObjectTO) destData;\n DataStoreTO imageStore = destData.getDataStore();\n if (!(imageStore instanceof NfsTO)) {\n return backupSnapshotForObjectStore(cmd);\n }\n NfsTO nfsImageStore = (NfsTO) imageStore;\n String secondaryStoragePoolUrl = nfsImageStore.getUrl();\n int index = snapshot.getPath().lastIndexOf(\"String_Node_Str\");\n String snapshotName = snapshot.getPath().substring(index + 1);\n String volumePath = snapshot.getVolume().getPath();\n String snapshotDestPath = null;\n String snapshotRelPath = null;\n String vmName = snapshot.getVmName();\n KVMStoragePool secondaryStoragePool = null;\n try {\n Connect conn = LibvirtConnection.getConnectionByVmName(vmName);\n secondaryStoragePool = storagePoolMgr.getStoragePoolByURI(secondaryStoragePoolUrl);\n String ssPmountPath = secondaryStoragePool.getLocalPath();\n snapshotRelPath = destSnapshot.getPath();\n snapshotDestPath = ssPmountPath + File.separator + snapshotRelPath;\n KVMPhysicalDisk snapshotDisk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), volumePath);\n KVMStoragePool primaryPool = snapshotDisk.getPool();\n if (primaryPool.getType() == StoragePoolType.RBD) {\n try {\n Rados r = new Rados(primaryPool.getAuthUserName());\n r.confSet(\"String_Node_Str\", primaryPool.getSourceHost() + \"String_Node_Str\" + primaryPool.getSourcePort());\n r.confSet(\"String_Node_Str\", primaryPool.getAuthSecret());\n r.connect();\n s_logger.debug(\"String_Node_Str\" + r.confGet(\"String_Node_Str\"));\n IoCTX io = r.ioCtxCreate(primaryPool.getSourceDir());\n Rbd rbd = new Rbd(io);\n RbdImage image = rbd.open(snapshotDisk.getName(), snapshotName);\n long startTime = System.currentTimeMillis() / 1000;\n File snapDir = new File(snapshotDestPath);\n s_logger.debug(\"String_Node_Str\" + snapDir.getAbsolutePath() + \"String_Node_Str\");\n FileUtils.forceMkdir(snapDir);\n File snapFile = new File(snapshotDestPath + \"String_Node_Str\" + snapshotName);\n s_logger.debug(\"String_Node_Str\" + snapFile.getAbsolutePath());\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(snapFile));\n int chunkSize = 4194304;\n long offset = 0;\n while (true) {\n byte[] buf = new byte[chunkSize];\n int bytes = image.read(offset, buf, chunkSize);\n if (bytes <= 0) {\n break;\n }\n bos.write(buf, 0, bytes);\n offset += bytes;\n }\n s_logger.debug(\"String_Node_Str\" + snapshotName + \"String_Node_Str\" + snapFile.getAbsolutePath() + \"String_Node_Str\" + offset);\n bos.close();\n s_logger.debug(\"String_Node_Str\" + snapshotName + \"String_Node_Str\" + snapshotDisk.getName());\n image.snapRemove(snapshotName);\n r.ioCtxDestroy(io);\n } catch (RadosException e) {\n s_logger.error(\"String_Node_Str\" + e.getMessage());\n return new CopyCmdAnswer(e.toString());\n } catch (RbdException e) {\n s_logger.error(\"String_Node_Str\" + snapshotDisk.getName() + \"String_Node_Str\" + e.getMessage());\n return new CopyCmdAnswer(e.toString());\n } catch (FileNotFoundException e) {\n s_logger.error(\"String_Node_Str\" + snapshotDestPath + \"String_Node_Str\" + e.getMessage());\n return new CopyCmdAnswer(e.toString());\n } catch (IOException e) {\n s_logger.debug(\"String_Node_Str\" + snapshotDestPath);\n return new CopyCmdAnswer(e.toString());\n }\n } else {\n Script command = new Script(_manageSnapshotPath, cmd.getWaitInMillSeconds(), s_logger);\n command.add(\"String_Node_Str\", snapshotDisk.getPath());\n command.add(\"String_Node_Str\", snapshotName);\n command.add(\"String_Node_Str\", snapshotDestPath);\n command.add(\"String_Node_Str\", snapshotName);\n String result = command.execute();\n if (result != null) {\n s_logger.debug(\"String_Node_Str\" + result);\n return new CopyCmdAnswer(result);\n }\n }\n DomainInfo.DomainState state = null;\n Domain vm = null;\n if (vmName != null) {\n try {\n vm = this.resource.getDomain(conn, vmName);\n state = vm.getInfo().state;\n } catch (LibvirtException e) {\n s_logger.trace(\"String_Node_Str\", e);\n }\n }\n KVMStoragePool primaryStorage = storagePoolMgr.getStoragePool(primaryStore.getPoolType(), primaryStore.getUuid());\n if (state == DomainInfo.DomainState.VIR_DOMAIN_RUNNING && !primaryStorage.isExternalSnapshot()) {\n DomainSnapshot snap = vm.snapshotLookupByName(snapshotName);\n snap.delete(0);\n vm = this.resource.getDomain(conn, vmName);\n state = vm.getInfo().state;\n if (state == DomainInfo.DomainState.VIR_DOMAIN_PAUSED) {\n vm.resume();\n }\n } else {\n if (primaryPool.getType() != StoragePoolType.RBD) {\n Script command = new Script(_manageSnapshotPath, _cmdsTimeout, s_logger);\n command.add(\"String_Node_Str\", snapshotDisk.getPath());\n command.add(\"String_Node_Str\", snapshotName);\n String result = command.execute();\n if (result != null) {\n s_logger.debug(\"String_Node_Str\" + result);\n return new CopyCmdAnswer(\"String_Node_Str\" + result);\n }\n }\n }\n SnapshotObjectTO newSnapshot = new SnapshotObjectTO();\n newSnapshot.setPath(snapshotRelPath + File.separator + snapshotName);\n return new CopyCmdAnswer(newSnapshot);\n } catch (LibvirtException e) {\n s_logger.debug(\"String_Node_Str\" + e.toString());\n return new CopyCmdAnswer(e.toString());\n } catch (CloudRuntimeException e) {\n s_logger.debug(\"String_Node_Str\" + e.toString());\n return new CopyCmdAnswer(e.toString());\n } finally {\n if (secondaryStoragePool != null) {\n secondaryStoragePool.delete();\n }\n }\n}\n"
"public static AnnotatedDocument createAnnotatedDocument(String text, HashSet<Mention> mentions) {\n List<Annotation> annotations = new ArrayList<Annotation>();\n if (mentions != null) {\n for (Mention mention : mentions) {\n annotations.add(translateMention2Annotation(mention));\n }\n }\n return new AnnotatedDocumentImpl(text, annotations);\n}\n"
"protected void _execute() throws Exception {\n super._execute();\n link.setTail(newLinkTail);\n if (relationNameToAdd != null) {\n ComponentRelation relation = (ComponentRelation) container.getRelation(relationNameToAdd);\n link.setRelation(relation);\n } else {\n link.setRelation(null);\n }\n}\n"
"public Optional<String> toImageBlock(List<File> dropFiles) {\n if (!current.currentPath().isPresent())\n asciiDocController.saveDoc();\n Path currentPath = current.currentPath().map(Path::getParent).get();\n IOHelper.createDirectories(currentPath.resolve(\"String_Node_Str\"));\n List<Path> paths = dropFiles.stream().map(File::toPath).filter(pathResolver::isImage).collect(Collectors.toList());\n List<String> buffer = new LinkedList<>();\n for (Path path : paths) {\n Path targetImage = currentPath.resolve(\"String_Node_Str\").resolve(path.getFileName());\n if (!path.equals(targetImage))\n IOHelper.copy(path, targetImage);\n buffer.add(String.format(\"String_Node_Str\", path.getFileName()));\n }\n if (buffer.size() > 0)\n return Optional.of(String.join(\"String_Node_Str\", buffer));\n return Optional.empty();\n}\n"
"private void deployJarToDes(final ResourcesManager manager, Set<String> extRoutines) {\n File file = null;\n if (extRoutines.isEmpty()) {\n return;\n }\n for (Object element : manager.getPaths()) {\n String value = element.toString();\n file = new File(value);\n if (extRoutines.contains(file.getName())) {\n try {\n CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());\n } catch (MalformedURLException e) {\n ExceptionHandler.process(e);\n } catch (IOException e) {\n ExceptionHandler.process(e);\n }\n }\n }\n}\n"
"public void startDockerImage(BeforeStart event, CubeConfiguration cubeConfiguration, ContainerMapping containerMapping) {\n Map<String, Object> dockerContainersContent = cubeConfiguration.getDockerContainersContent();\n Container container = getContainerByDeployableContainer(event.getDeployableContainer());\n String containerName = container.getName();\n Map<String, Object> containerConfiguration = (Map<String, Object>) dockerContainersContent.get(containerName);\n if (containerConfiguration == null) {\n return;\n }\n log.fine(String.format(\"String_Node_Str\", containerName, containerConfiguration));\n String containerId = this.dockerClientExecutor.createContainer(containerName, containerConfiguration);\n log.fine(String.format(\"String_Node_Str\", containerId));\n dockerClientExecutor.startContainer(containerId, containerConfiguration);\n if (!AwaitStrategyFactory.create(this.dockerClientExecutor, containerId, containerConfiguration).await()) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", containerName));\n }\n containerMapping.addContainer(containerName, createContainer.getId());\n}\n"
"public static Dataset getDataSetInstance(String datasetName, Transaction tx) throws IOException {\n DatasetManager manager = RuntimeHiveServer.getDatasetManager();\n try {\n Dataset dataset = manager.getDataset(datasetName, null);\n if (dataset instanceof TransactionAware) {\n ((TransactionAware) dataset).startTx(tx);\n }\n return dataset;\n } catch (DatasetManagementException e) {\n throw new IOException(e);\n }\n}\n"
"public boolean checkForItems() {\n ItemStack items = new ItemStack(RCConfig.itemID, 2304);\n if (player.getInventory().contains(RCConfig.itemID)) {\n HashMap<Integer, ItemStack> difference = player.getInventory().removeItem(items);\n int exp = 0;\n for (ItemStack s : difference.values()) exp += s.getAmount();\n exp = 2304 - exp;\n addExp(exp);\n Messaging.sendMessage(player, Language.your + \"String_Node_Str\" + ChatColor.YELLOW + exp + \"String_Node_Str\" + ChatColor.WHITE + RCConfig.itemName + \"String_Node_Str\" + Language.haveBeenExchangedForExp + \"String_Node_Str\");\n return true;\n }\n return false;\n}\n"
"public void testVerify() throws NoSuchAlgorithmException {\n byte[] expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n byte[] expected_x = new BigInteger(\"String_Node_Str\", 16).toByteArray();\n byte[] expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n byte[] expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n String username = \"String_Node_Str\", password = \"String_Node_Str\", salt = \"String_Node_Str\", a = \"String_Node_Str\";\n byte[] a_byte = new BigInteger(a, 16).toByteArray();\n LeapSRPSession client = new LeapSRPSession(username, password, a_byte);\n byte[] x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray());\n assertTrue(Arrays.equals(x, expected_x));\n byte[] A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n String B = \"String_Node_Str\";\n byte[] M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n boolean verified = client.verify(expected_M2);\n assertTrue(verified);\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a = \"String_Node_Str\";\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray());\n A = client.exponential();\n B = \"String_Node_Str\";\n M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a = \"String_Node_Str\";\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, new BigInteger(salt, 16).toByteArray());\n A = client.exponential();\n B = \"String_Node_Str\";\n M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n username = \"String_Node_Str\";\n password = \"String_Node_Str\";\n salt = \"String_Node_Str\";\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_x = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a = \"String_Node_Str\";\n B = \"String_Node_Str\";\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray()));\n assertTrue(Arrays.equals(x, expected_x));\n A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n M1 = client.response(trim(new BigInteger(salt, 16).toByteArray()), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n username = \"String_Node_Str\";\n password = \"String_Node_Str\";\n salt = \"String_Node_Str\";\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_x = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a = \"String_Node_Str\";\n B = \"String_Node_Str\";\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray()));\n assertTrue(Arrays.equals(x, expected_x));\n A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n M1 = client.response(trim(new BigInteger(salt, 16).toByteArray()), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n username = \"String_Node_Str\";\n password = \"String_Node_Str\";\n salt = \"String_Node_Str\";\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n String x_string = \"String_Node_Str\";\n expected_x = trim(new BigInteger(x_string, 16).toByteArray());\n assertEquals(new BigInteger(1, expected_x).toString(16), x_string);\n a = \"String_Node_Str\";\n B = \"String_Node_Str\";\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray()));\n assertTrue(Arrays.equals(x, expected_x));\n assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16));\n A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n username = \"String_Node_Str\";\n password = \"String_Node_Str\";\n salt = \"String_Node_Str\";\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n x_string = \"String_Node_Str\";\n expected_x = trim(new BigInteger(x_string, 16).toByteArray());\n assertEquals(new BigInteger(1, expected_x).toString(16), x_string);\n a = \"String_Node_Str\";\n B = \"String_Node_Str\";\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray()));\n assertTrue(Arrays.equals(x, expected_x));\n assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16));\n A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n username = \"String_Node_Str\";\n password = \"String_Node_Str\";\n a = \"String_Node_Str\";\n salt = \"String_Node_Str\";\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n x_string = \"String_Node_Str\";\n expected_x = trim(new BigInteger(x_string, 16).toByteArray());\n assertEquals(new BigInteger(1, expected_x).toString(16), x_string);\n B = \"String_Node_Str\";\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray()));\n assertTrue(Arrays.equals(x, expected_x));\n assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16));\n A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n username = \"String_Node_Str\";\n password = \"String_Node_Str\";\n a = \"String_Node_Str\";\n salt = \"String_Node_Str\";\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n x_string = \"String_Node_Str\";\n expected_x = trim(new BigInteger(x_string, 16).toByteArray());\n assertEquals(new BigInteger(1, expected_x).toString(16), x_string);\n B = \"String_Node_Str\";\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray()));\n assertTrue(Arrays.equals(x, expected_x));\n assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16));\n A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n username = \"String_Node_Str\";\n password = \"String_Node_Str\";\n a = \"String_Node_Str\";\n salt = \"String_Node_Str\";\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n x_string = \"String_Node_Str\";\n expected_x = trim(new BigInteger(x_string, 16).toByteArray());\n assertEquals(new BigInteger(1, expected_x).toString(16), x_string);\n B = \"String_Node_Str\";\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray()));\n assertTrue(Arrays.equals(x, expected_x));\n assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16));\n A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n username = \"String_Node_Str\";\n password = \"String_Node_Str\";\n a = \"String_Node_Str\";\n salt = \"String_Node_Str\";\n expected_A = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n x_string = \"String_Node_Str\";\n expected_x = trim(new BigInteger(x_string, 16).toByteArray());\n assertEquals(new BigInteger(1, expected_x).toString(16), x_string);\n B = \"String_Node_Str\";\n expected_M1 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n expected_M2 = trim(new BigInteger(\"String_Node_Str\", 16).toByteArray());\n a_byte = new BigInteger(a, 16).toByteArray();\n params = new SRPParameters(new BigInteger(ConfigHelper.NG_1024, 16).toByteArray(), new BigInteger(\"String_Node_Str\").toByteArray(), new BigInteger(salt, 16).toByteArray(), \"String_Node_Str\");\n client = new LeapSRPSession(username, password, params, a_byte);\n x = client.calculatePasswordHash(username, password, trim(new BigInteger(salt, 16).toByteArray()));\n assertTrue(Arrays.equals(x, expected_x));\n assertEquals(new BigInteger(1, expected_x).toString(16), new BigInteger(1, x).toString(16));\n A = client.exponential();\n assertTrue(Arrays.equals(A, expected_A));\n M1 = client.response(new BigInteger(salt, 16).toByteArray(), new BigInteger(B, 16).toByteArray());\n assertTrue(Arrays.equals(M1, expected_M1));\n verified = client.verify(expected_M2);\n assertTrue(verified);\n}\n"
"protected void onCreate(Bundle arg0) {\n super.onCreate(arg0);\n setContentView(R.layout.activity_friend_info_layout);\n schoolMate = (SchoolMate) params;\n mLayout.bindSchoolMate(schoolMate);\n mLayout.showButton(false);\n updateLayout();\n}\n"
"protected void progress(double pct, int blocksSoFar, Date date) {\n log.info(String.format(\"String_Node_Str\", (int) pct, blocksSoFar, DateFormat.getDateTimeInstance().format(date)));\n}\n"
"private void testClobWithRandomUnicodeChars() throws Exception {\n deleteDb(\"String_Node_Str\");\n Connection conn = getConnection(\"String_Node_Str\");\n Statement stat = conn.createStatement();\n stat.execute(\"String_Node_Str\");\n PreparedStatement s1 = conn.prepareStatement(\"String_Node_Str\");\n final Random rand = new Random(1);\n for (int i = 1; i <= 100; i++) {\n String data = randomUnicodeString(rand);\n s1.setString(1, data);\n s1.executeUpdate();\n ResultSet rs = stat.executeQuery(\"String_Node_Str\");\n rs.next();\n String read = rs.getString(2);\n assertEquals(read, data);\n }\n conn.close();\n}\n"
"private void fitVideoSurfaceToScreen(boolean statusBarShown) {\n SurfaceHolder holder = mSurfv.getHolder();\n int vw = mMp.getVideoWidth();\n int vh = mMp.getVideoHeight();\n if (0 >= vw || 0 >= vh)\n return;\n int sw = Utils.getVisibleFrameWidth(this);\n int sh = Utils.getVisibleFrameHeight(this);\n if (statusBarShown)\n sh -= mStatusBarHeight;\n if (sw < sh) {\n int tmp = sw;\n sw = sh;\n sh = tmp;\n }\n int[] sz = new int[2];\n Utils.fitFixedRatio(sw, sh, vw, vh, sz);\n holder.setFixedSize(sz[0], sz[1]);\n ViewGroup.LayoutParams lp = mSurfv.getLayoutParams();\n lp.width = sz[0];\n lp.height = sz[1];\n mSurfv.setLayoutParams(lp);\n mSurfv.requestLayout();\n}\n"
"public void managerMode(InventoryClickEvent event) {\n boolean top = event.getView().convertSlot(event.getRawSlot()) == event.getRawSlot();\n Player p = (Player) event.getWhoClicked();\n DecimalFormat f = new DecimalFormat(\"String_Node_Str\");\n int clickedSlot = event.getSlot();\n if (clickedSlot < 0) {\n event.setCursor(null);\n switchInventory(getBasicManageModeByWool());\n return;\n }\n if (top) {\n setInventoryClicked(true);\n if (isManagementSlot(clickedSlot, 3)) {\n if (isWool(event.getCurrentItem(), config.getItemManagement(6))) {\n if (isSellModeByWool())\n this.setTraderStatus(TraderStatus.MANAGE_SELL);\n if (isBuyModeByWool())\n this.setTraderStatus(TraderStatus.MANAGE_BUY);\n getInventory().setItem(getInventory().getSize() - 2, config.getItemManagement(2));\n getInventory().setItem(getInventory().getSize() - 3, (getBasicManageModeByWool().equals(TraderStatus.MANAGE_SELL) ? config.getItemManagement(5) : config.getItemManagement(3)));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (isWool(event.getCurrentItem(), config.getItemManagement(2))) {\n if (!permissions.has(p, \"String_Node_Str\")) {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n this.setTraderStatus(TraderStatus.MANAGE_PRICE);\n getInventory().setItem(getInventory().getSize() - 2, config.getItemManagement(6));\n getInventory().setItem(getInventory().getSize() - 3, new ItemStack(Material.AIR));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n }\n } else if (isWool(event.getCurrentItem(), config.getItemManagement(3))) {\n if (!permissions.has(p, \"String_Node_Str\")) {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n setTraderStatus(TraderStatus.MANAGE_LIMIT_GLOBAL);\n getInventory().setItem(getInventory().getSize() - 2, new ItemStack(Material.WOOL, 1, (short) 0, (byte) 0));\n getInventory().setItem(getInventory().getSize() - 3, new ItemStack(Material.AIR));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n }\n } else if (isWool(event.getCurrentItem(), config.getItemManagement(1))) {\n if (!permissions.has(p, \"String_Node_Str\")) {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n switchInventory(TraderStatus.MANAGE_BUY);\n getInventory().setItem(getInventory().getSize() - 1, config.getItemManagement(0));\n getInventory().setItem(getInventory().getSize() - 3, config.getItemManagement(3));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n }\n } else if (isWool(event.getCurrentItem(), config.getItemManagement(0))) {\n if (!permissions.has(p, \"String_Node_Str\")) {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n switchInventory(TraderStatus.MANAGE_SELL);\n getInventory().setItem(getInventory().getSize() - 1, config.getItemManagement(1));\n getInventory().setItem(getInventory().getSize() - 3, config.getItemManagement(4));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n }\n } else if (isWool(event.getCurrentItem(), config.getItemManagement(7))) {\n this.saveManagedAmouts();\n this.switchInventory(TraderStatus.MANAGE_SELL);\n getInventory().setItem(getInventory().getSize() - 1, config.getItemManagement(1));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n }\n event.setCancelled(true);\n return;\n } else {\n if (event.isShiftClick()) {\n event.setCancelled(true);\n if (isSellModeByWool()) {\n if (selectItem(clickedSlot, TraderStatus.MANAGE_SELL, p).hasSelectedItem()) {\n if (event.isLeftClick()) {\n int leftAmount = getSelectedItem().getLimitSystem().getGlobalLimit() - getSelectedItem().getLimitSystem().getGlobalAmount();\n if (inventoryHasPlaceAmount(p, leftAmount)) {\n if (isBuyModeByWool())\n getTraderStock().removeItem(false, clickedSlot);\n if (isSellModeByWool())\n getTraderStock().removeItem(true, clickedSlot);\n this.addAmountToInventory(p, leftAmount);\n getInventory().setItem(clickedSlot, new ItemStack(0));\n selectItem(null);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + leftAmount));\n }\n } else {\n if (permissions.has(p, \"String_Node_Str\")) {\n switchInventory(getSelectedItem());\n setTraderStatus(TraderStatus.MANAGE_SELL_AMOUNT);\n } else\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n }\n }\n } else if (isBuyModeByWool()) {\n if (selectItem(clickedSlot, TraderStatus.MANAGE_BUY, p).hasSelectedItem()) {\n int stockedAmount = getSelectedItem().getLimitSystem().getGlobalAmount();\n if (inventoryHasPlaceAmount(p, stockedAmount)) {\n if (event.isLeftClick()) {\n if (isBuyModeByWool())\n getTraderStock().removeItem(false, clickedSlot);\n if (isSellModeByWool())\n getTraderStock().removeItem(true, clickedSlot);\n getInventory().setItem(clickedSlot, new ItemStack(0));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + stockedAmount));\n } else {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + stockedAmount));\n getSelectedItem().getLimitSystem().setGlobalAmount(0);\n }\n this.addAmountToInventory(p, stockedAmount);\n selectItem(null);\n }\n }\n }\n return;\n }\n if (equalsTraderStatus(getBasicManageModeByWool())) {\n if (event.isRightClick()) {\n if (selectItem(event.getSlot(), getTraderStatus(), p).hasSelectedItem()) {\n if (!permissions.has(p, \"String_Node_Str\")) {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n selectItem(null);\n event.setCancelled(true);\n return;\n }\n if (getSelectedItem().hasStackPrice()) {\n getSelectedItem().setStackPrice(false);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n getSelectedItem().setStackPrice(true);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\"));\n }\n }\n selectItem(null);\n event.setCancelled(true);\n return;\n }\n if (hasSelectedItem()) {\n StockItem stockItem = getSelectedItem();\n if (selectItem(clickedSlot, getTraderStatus(), p).hasSelectedItem()) {\n getSelectedItem().setSlot(-2);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", getSelectedMarketItem().getItemOwner()));\n } else if (selectItem(clickedSlot, getTraderStatus()).hasSelectedItem()) {\n event.setCancelled(true);\n selectItem(stockItem);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\"));\n return;\n }\n stockItem.setSlot(clickedSlot);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", ((MarketItem) stockItem).getItemOwner()));\n } else {\n if (selectItem(clickedSlot, getTraderStatus(), p).hasSelectedItem()) {\n getSelectedItem().setSlot(-2);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", getSelectedMarketItem().getItemOwner()));\n } else if (selectItem(clickedSlot, getTraderStatus()).hasSelectedItem()) {\n event.setCancelled(true);\n selectItem(null);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\"));\n return;\n }\n }\n return;\n } else if (equalsTraderStatus(TraderStatus.MANAGE_PRICE)) {\n if (event.getCursor().getType().equals(Material.AIR)) {\n if (selectItem(event.getSlot(), getBasicManageModeByWool(), p).hasSelectedItem())\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", f.format(getSelectedItem().getRawPrice())));\n } else {\n if (selectItem(event.getSlot(), getBasicManageModeByWool(), p).hasSelectedItem()) {\n if (event.isRightClick())\n getSelectedItem().lowerPrice(calculatePrice(event.getCursor()));\n else\n getSelectedItem().increasePrice(calculatePrice(event.getCursor()));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", f.format(getSelectedItem().getRawPrice())));\n }\n }\n selectItem(null);\n event.setCancelled(true);\n } else if (equalsTraderStatus(TraderStatus.MANAGE_LIMIT_GLOBAL)) {\n if (event.getCursor().getType().equals(Material.AIR)) {\n if (selectItem(clickedSlot, getBasicManageModeByWool(), p).hasSelectedItem()) {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getLimitSystem().getGlobalLimit()).replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getLimitSystem().getGlobalAmount()));\n }\n } else {\n if (selectItem(clickedSlot, getBasicManageModeByWool(), p).hasSelectedItem()) {\n if (event.isRightClick())\n getSelectedItem().getLimitSystem().changeGlobalLimit(-calculateLimit(event.getCursor()));\n else\n getSelectedItem().getLimitSystem().changeGlobalLimit(calculateLimit(event.getCursor()));\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getLimitSystem().getGlobalLimit()));\n }\n }\n selectItem(null);\n event.setCancelled(true);\n } else if (equalsTraderStatus(TraderStatus.MANAGE_LIMIT_PLAYER)) {\n } else if (equalsTraderStatus(TraderStatus.MANAGE_SELL_AMOUNT)) {\n event.setCancelled(true);\n if (event.isLeftClick()) {\n if (event.getCurrentItem().getType().equals(Material.AIR)) {\n ItemStack clonedStack = getSelectedItem().getItemStack().clone();\n getInventory().setItem(clickedSlot, clonedStack);\n event.setCancelled(false);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n int addAmount = event.getCursor().getAmount();\n if (event.getCursor().getTypeId() == 0)\n addAmount = 1;\n int oldAmount = event.getCurrentItem().getAmount();\n if (event.getCurrentItem().getMaxStackSize() < oldAmount + addAmount)\n event.getCurrentItem().setAmount(event.getCurrentItem().getMaxStackSize());\n else\n event.getCurrentItem().setAmount(oldAmount + addAmount);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n }\n } else {\n if (event.getCurrentItem().getTypeId() == 0) {\n return;\n }\n int removeAmount = event.getCursor().getAmount();\n if (event.getCursor().getTypeId() == 0)\n removeAmount = 1;\n int oldAmount = event.getCurrentItem().getAmount();\n if (oldAmount - removeAmount <= 0) {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n event.setCurrentItem(new ItemStack(Material.AIR, 0));\n } else {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n event.getCurrentItem().setAmount(oldAmount - removeAmount);\n }\n }\n }\n }\n } else {\n if (equalsTraderStatus(TraderStatus.MANAGE_PRICE) || equalsTraderStatus(TraderStatus.MANAGE_LIMIT_GLOBAL) || equalsTraderStatus(TraderStatus.MANAGE_SELL_AMOUNT)) {\n if (event.isShiftClick())\n event.setCancelled(true);\n return;\n }\n event.setCancelled(true);\n if (hasSelectedItem()) {\n if (event.getCursor().getTypeId() != 0) {\n event.setCursor(null);\n selectItem(null);\n switchInventory(getBasicManageModeByWool());\n }\n }\n if (event.isLeftClick() && event.getCurrentItem().getTypeId() != 0) {\n int backUpAmount = event.getCurrentItem().getAmount();\n ItemStack itemToAdd = event.getCurrentItem();\n itemToAdd.setAmount(1);\n this.selectItem(itemToAdd, getBasicManageModeByWool(), false, false);\n if (hasSelectedItem()) {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\"));\n itemToAdd.setAmount(backUpAmount);\n selectItem(null);\n setInventoryClicked(false);\n return;\n }\n int firstEmpty = getInventory().firstEmpty();\n if (firstEmpty >= 0 && firstEmpty < getInventory().getSize() - 3) {\n getInventory().setItem(firstEmpty, itemToAdd.clone());\n MarketItem marketItem = toMarketItem(itemToAdd.clone());\n marketItem.setAsPatternItem(false);\n marketItem.setPetternListening(false);\n marketItem.setItemOwner(p.getName());\n marketItem.setSlot(firstEmpty);\n LimitSystem limitSystem = marketItem.getLimitSystem();\n limitSystem.setGlobalLimit(0);\n limitSystem.setGlobalTimeout(-2000);\n if (isSellModeByWool())\n getTraderStock().addItem(true, marketItem);\n if (isBuyModeByWool())\n getTraderStock().addItem(false, marketItem);\n itemToAdd.setAmount(backUpAmount);\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n }\n } else if (event.getCurrentItem().getTypeId() != 0) {\n if (!event.isShiftClick()) {\n selectItem(null);\n setInventoryClicked(false);\n return;\n }\n if (equalsTraderStatus(TraderStatus.MANAGE_BUY))\n return;\n ItemStack itemToAdd = event.getCurrentItem();\n this.selectMarketItem(itemToAdd, getBasicManageModeByWool(), p.getName(), false, false);\n if (hasSelectedItem()) {\n event.setCancelled(false);\n LimitSystem limitSystem = getSelectedItem().getLimitSystem();\n limitSystem.setGlobalTimeout(-2000);\n int getItemsLeft = limitSystem.getGlobalLimit() - limitSystem.getGlobalAmount();\n if (getItemsLeft < 0)\n getItemsLeft = 0;\n limitSystem.setGlobalLimit(getItemsLeft + itemToAdd.getAmount());\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\").replace(\"String_Node_Str\", itemToAdd.getAmount() + \"String_Node_Str\").replace((itemToAdd.getAmount() != 1 ? \"String_Node_Str\" : \"String_Node_Str\"), \"String_Node_Str\"));\n itemToAdd.setAmount(0);\n event.setCurrentItem(itemToAdd);\n limitSystem.setGlobalAmount(0);\n selectItem(null);\n } else {\n p.sendMessage(locale.getLocaleString(\"String_Node_Str\"));\n }\n }\n }\n setInventoryClicked(false);\n}\n"
"protected Rectangle backwardMapRect(Rectangle destRect, int sourceIndex) {\n if (destRect == null) {\n throw new IllegalArgumentException(JaiI18N.getString(\"String_Node_Str\"));\n } else if (sourceIndex != 0) {\n throw new IllegalArgumentException(JaiI18N.getString(\"String_Node_Str\"));\n }\n Point2D p1 = mapDestPoint(new Point2D.Double(destRect.x, destRect.y));\n Point2D p2 = mapDestPoint(new Point2D.Double(destRect.x + destRect.width - 1, destRect.y + destRect.height - 1));\n int x1 = (int) Math.floor(p1.getX());\n int y1 = (int) Math.floor(p1.getY());\n int x2 = (int) Math.floor(p2.getX());\n int y2 = (int) Math.floor(p2.getY());\n return new Rectangle(x1, y1, x2 - x1 + 1, y2 - y1 + 1);\n}\n"
"protected IDocument createDocument(Object element) throws CoreException {\n ICFDocument document = null;\n document = new ICFDocument();\n if (setDocumentContent(document, (IEditorInput) element, getEncoding(element))) {\n setupDocument(element, document);\n }\n if (document != null) {\n IDocumentPartitioner partitioner = new CFEDefaultPartitioner(new CFPartitionScanner(), new String[] { CFPartitionScanner.ALL_TAG, CFPartitionScanner.CF_COMMENT, CFPartitionScanner.HTM_COMMENT, CFPartitionScanner.DOCTYPE, CFPartitionScanner.CF_TAG, CFPartitionScanner.CF_END_TAG, CFPartitionScanner.CF_SCRIPT, CFPartitionScanner.J_SCRIPT, CFPartitionScanner.CSS_TAG, CFPartitionScanner.UNK_TAG, CFPartitionScanner.FORM_TAG, CFPartitionScanner.TABLE_TAG });\n partitioner.connect(document);\n try {\n if (element instanceof FileEditorInput) {\n document.setParserResource(((FileEditorInput) element).getFile());\n document.clearAllMarkers();\n document.parseDocument();\n } else if (element instanceof JavaFileEditorInput) {\n String filepath = ((JavaFileEditorInput) element).getPath(element).toString();\n Path path = new Path(filepath);\n Workspace workspace = (Workspace) CFMLPlugin.getWorkspace();\n ExternalFile file = new ExternalFile(path, workspace);\n model = file.getAnnotationModel();\n document.setParserResource(file);\n document.clearAllMarkers();\n document.parseDocument();\n } else if (element instanceof RemoteFileEditorInput) {\n String filepath = ((RemoteFileEditorInput) element).getPath(element).toString();\n Path path = new Path(filepath);\n Workspace workspace = (Workspace) CFMLPlugin.getWorkspace();\n ExternalFile file = new ExternalFile(path, workspace);\n model = file.getAnnotationModel();\n document.setParserResource(file);\n document.clearAllMarkers();\n document.parseDocument();\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n document.setDocumentPartitioner(partitioner);\n }\n return document;\n}\n"
"private static String getHostName(ILaunchConfiguration config) {\n String projectName = null;\n try {\n projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, \"String_Node_Str\");\n } catch (CoreException e) {\n return null;\n }\n if (projectName.equals(\"String_Node_Str\")) {\n return null;\n }\n IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);\n if (project == null) {\n return null;\n }\n return project.getLocationURI().getHost();\n}\n"
"public void postEditContract() {\n Validator existentContractStatusValidator = ServiceValidators.getExistentContractStatusValidator();\n if (existentContractStatusValidator.isValid()) {\n try {\n this.servicesManager.updateContractStatus(this.in(\"String_Node_Str\"), ServiceContractStatus.valueOf(this.in(\"String_Node_Str\")), this.currentUser());\n this.redirect(SHOW_CONTRACTS_URL);\n } catch (NotServiceProviderException e) {\n this.echo();\n this.out(\"String_Node_Str\", i18n.get(this.locales(), e.getMessage()));\n this.invalid(EDIT_CONTRACT_TPL);\n } catch (DataDoesNotExistsException e) {\n this.notFound();\n }\n } else {\n this.jsonInvalid();\n }\n}\n"
"private void deliverChangeToOther(IModelChangeMessage[] changeMessages) {\n for (int i = 0; i < changeMessages.length; i++) {\n try {\n System.out.println(name + \"String_Node_Str\" + changeMessages[i]);\n otherQueue.enqueue(changeMessages[i].serialize());\n } catch (SerializationException e) {\n e.printStackTrace();\n }\n }\n}\n"
"protected void onResume() {\n super.onResume();\n if (debug)\n Log.d(TAG, \"String_Node_Str\");\n if (isSignedIn() == false) {\n Intent frontdoor = new Intent(this, FrontDoor.class);\n startActivity(frontdoor);\n finish();\n }\n showFirstTimeWarningDialog();\n}\n"
"protected void fill() {\n String actor = actorPanel.getText().trim();\n while (e.getAttributes().getLength() > 0) {\n e.removeAttribute(e.getAttributes().item(0).getNodeName());\n }\n if (!actor.isEmpty())\n e.setAttribute(\"String_Node_Str\", actor);\n String id = actionPanel.getText();\n if (id.equals(\"String_Node_Str\")) {\n e.setAttribute(\"String_Node_Str\", classPanel.getText());\n } else {\n e.setAttribute(\"String_Node_Str\", id);\n super.fill();\n }\n}\n"
"public void upgrade(ISkillInfo upgrade, boolean quiet) {\n if (upgrade instanceof HPInfo) {\n if (upgrade.getProperties().getValue().containsKey(\"String_Node_Str\")) {\n int hp = ((IntTag) upgrade.getProperties().getValue().get(\"String_Node_Str\")).getValue();\n upgrade.getProperties().getValue().remove(\"String_Node_Str\");\n DoubleTag doubleTag = new DoubleTag(\"String_Node_Str\", hp);\n getProperties().getValue().put(\"String_Node_Str\", doubleTag);\n }\n if (upgrade.getProperties().getValue().containsKey(\"String_Node_Str\")) {\n if (!upgrade.getProperties().getValue().containsKey(\"String_Node_Str\") || ((StringTag) upgrade.getProperties().getValue().get(\"String_Node_Str\")).getValue().equals(\"String_Node_Str\")) {\n hpIncrease += ((DoubleTag) upgrade.getProperties().getValue().get(\"String_Node_Str\")).getValue();\n } else {\n hpIncrease = ((DoubleTag) upgrade.getProperties().getValue().get(\"String_Node_Str\")).getValue();\n }\n if (getMyPet().getStatus() == PetState.Here) {\n getMyPet().getCraftPet().setMaxHealth(getMyPet().getMaxHealth());\n }\n if (!quiet) {\n myPet.sendMessageToOwner(MyPetBukkitUtil.setColors(MyPetLocales.getString(\"String_Node_Str\", myPet.getOwner().getLanguage())).replace(\"String_Node_Str\", myPet.getPetName()).replace(\"String_Node_Str\", \"String_Node_Str\" + (MyPet.getStartHP(myPet.getClass()) + hpIncrease)));\n }\n }\n }\n}\n"
"public ExternalLoadBalancerDeviceVO addExternalLoadBalancer(long physicalNetworkId, String url, String username, String password, String deviceName, ServerResource resource, boolean gslbProvider, String gslbSitePublicIp, String gslbSitePrivateIp) {\n PhysicalNetworkVO pNetwork = null;\n NetworkDevice ntwkDevice = NetworkDevice.getNetworkDevice(deviceName);\n long zoneId;\n if ((ntwkDevice == null) || (url == null) || (username == null) || (resource == null) || (password == null)) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n pNetwork = _physicalNetworkDao.findById(physicalNetworkId);\n if (pNetwork == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + physicalNetworkId);\n }\n zoneId = pNetwork.getDataCenterId();\n PhysicalNetworkServiceProviderVO ntwkSvcProvider = _physicalNetworkServiceProviderDao.findByServiceProvider(pNetwork.getId(), ntwkDevice.getNetworkServiceProvder());\n if (gslbProvider) {\n ExternalLoadBalancerDeviceVO zoneGslbProvider = _externalLoadBalancerDeviceDao.findGslbServiceProvider(physicalNetworkId, ntwkDevice.getNetworkServiceProvder());\n if (zoneGslbProvider != null) {\n throw new CloudRuntimeException(\"String_Node_Str\");\n }\n } else {\n ntwkSvcProvider = _physicalNetworkServiceProviderDao.findByServiceProvider(pNetwork.getId(), ntwkDevice.getNetworkServiceProvder());\n if (ntwkSvcProvider == null) {\n throw new CloudRuntimeException(\"String_Node_Str\" + ntwkDevice.getNetworkServiceProvder() + \"String_Node_Str\" + physicalNetworkId + \"String_Node_Str\");\n } else if (ntwkSvcProvider.getState() == PhysicalNetworkServiceProvider.State.Shutdown) {\n throw new CloudRuntimeException(\"String_Node_Str\" + ntwkSvcProvider.getProviderName() + \"String_Node_Str\" + physicalNetworkId + \"String_Node_Str\");\n }\n }\n URI uri;\n try {\n uri = new URI(url);\n } catch (Exception e) {\n s_logger.debug(e);\n throw new InvalidParameterValueException(e.getMessage());\n }\n String ipAddress = uri.getHost();\n Map hostDetails = new HashMap<String, String>();\n String hostName = getExternalLoadBalancerResourceGuid(pNetwork.getId(), deviceName, ipAddress);\n hostDetails.put(\"String_Node_Str\", hostName);\n hostDetails.put(\"String_Node_Str\", UUID.randomUUID().toString());\n hostDetails.put(\"String_Node_Str\", String.valueOf(pNetwork.getDataCenterId()));\n hostDetails.put(\"String_Node_Str\", ipAddress);\n hostDetails.put(\"String_Node_Str\", String.valueOf(pNetwork.getId()));\n hostDetails.put(\"String_Node_Str\", username);\n hostDetails.put(\"String_Node_Str\", password);\n hostDetails.put(\"String_Node_Str\", deviceName);\n Map<String, String> configParams = new HashMap<String, String>();\n UrlUtil.parseQueryParameters(uri.getQuery(), false, configParams);\n hostDetails.putAll(configParams);\n Transaction txn = Transaction.currentTxn();\n try {\n resource.configure(hostName, hostDetails);\n Host host = _resourceMgr.addHost(zoneId, resource, Host.Type.ExternalLoadBalancer, hostDetails);\n if (host != null) {\n boolean dedicatedUse = (configParams.get(ApiConstants.LOAD_BALANCER_DEVICE_DEDICATED) != null) ? Boolean.parseBoolean(configParams.get(ApiConstants.LOAD_BALANCER_DEVICE_DEDICATED)) : false;\n long capacity = NumbersUtil.parseLong(configParams.get(ApiConstants.LOAD_BALANCER_DEVICE_CAPACITY), 0);\n if (capacity == 0) {\n capacity = _defaultLbCapacity;\n }\n ExternalLoadBalancerDeviceVO lbDeviceVO;\n txn.start();\n lbDeviceVO = new ExternalLoadBalancerDeviceVO(host.getId(), pNetwork.getId(), ntwkDevice.getNetworkServiceProvder(), deviceName, capacity, dedicatedUse, gslbProvider);\n if (gslbProvider) {\n lbDeviceVO.setGslbSitePublicIP(gslbSitePublicIp);\n lbDeviceVO.setGslbSitePrivateIP(gslbSitePrivateIp);\n }\n _externalLoadBalancerDeviceDao.persist(lbDeviceVO);\n DetailVO hostDetail = new DetailVO(host.getId(), ApiConstants.LOAD_BALANCER_DEVICE_ID, String.valueOf(lbDeviceVO.getId()));\n _hostDetailDao.persist(hostDetail);\n txn.commit();\n return lbDeviceVO;\n } else {\n throw new CloudRuntimeException(\"String_Node_Str\");\n }\n } catch (ConfigurationException e) {\n txn.rollback();\n throw new CloudRuntimeException(e.getMessage());\n }\n}\n"
"public Pair<P1, P2> MkAtom(Choice<S1, S2> s) throws TimeoutException {\n if (s.isLeft()) {\n InL<S1, S2> cast = (InL<S1, S2>) s;\n return new Pair<P1, P2>(ba1.MkAtom(cast.left), ba2.False());\n } else {\n InR<S1, S2> cast = (InR<S1, S2>) s;\n return new Pair<P1, P2>(ba1.False(), ba2.MkAtom(cast.right));\n }\n}\n"
"public void event(Event event) {\n if (event instanceof InstantMessagingEvent) {\n processInstantMessageEvent((InstantMessagingEvent) event);\n } else if (event instanceof AssessmentEvent) {\n processAssessmentEvent((AssessmentEvent) event);\n } else if (event instanceof OpenInstantMessageEvent) {\n processOpenInstantMessageEvent((OpenInstantMessageEvent) event);\n } else if (event instanceof CloseInstantMessagingEvent) {\n processCloseInstantMessageEvent((CloseInstantMessagingEvent) event);\n } else if (Window.BEFORE_INLINE_RENDERING.equals(event)) {\n if (++stateUpdateCounter % 25 == 0) {\n updateBuddyStats();\n }\n }\n}\n"
"private void parse(XMLStreamReader xmlStreamReader) throws SAXException {\n if (null == getContentHandler()) {\n return;\n }\n switch(xmlStreamReader.getEventType()) {\n case XMLStreamReader.ATTRIBUTE:\n {\n break;\n }\n case XMLStreamReader.CDATA:\n {\n if (null == lexicalHandler) {\n getContentHandler().characters(xmlStreamReader.getTextCharacters(), xmlStreamReader.getTextStart(), xmlStreamReader.getTextLength());\n } else {\n lexicalHandler.startCDATA();\n getContentHandler().characters(xmlStreamReader.getTextCharacters(), xmlStreamReader.getTextStart(), xmlStreamReader.getTextLength());\n lexicalHandler.endCDATA();\n }\n break;\n }\n case XMLStreamReader.CHARACTERS:\n {\n getContentHandler().characters(xmlStreamReader.getTextCharacters(), xmlStreamReader.getTextStart(), xmlStreamReader.getTextLength());\n break;\n }\n case XMLStreamReader.COMMENT:\n {\n if (null != lexicalHandler) {\n lexicalHandler.comment(xmlStreamReader.getTextCharacters(), xmlStreamReader.getTextStart(), xmlStreamReader.getTextLength());\n }\n break;\n }\n case XMLStreamReader.DTD:\n {\n break;\n }\n case XMLStreamReader.END_DOCUMENT:\n {\n depth--;\n getContentHandler().endDocument();\n return;\n }\n case XMLStreamReader.END_ELEMENT:\n {\n depth--;\n String prefix = xmlStreamReader.getPrefix();\n if (null == prefix || prefix.length() == 0) {\n getContentHandler().endElement(xmlStreamReader.getNamespaceURI(), xmlStreamReader.getLocalName(), xmlStreamReader.getLocalName());\n } else {\n getContentHandler().endElement(xmlStreamReader.getNamespaceURI(), xmlStreamReader.getLocalName(), prefix + XMLConstants.COLON + xmlStreamReader.getLocalName());\n }\n break;\n }\n case XMLStreamReader.ENTITY_DECLARATION:\n {\n break;\n }\n case XMLStreamReader.ENTITY_REFERENCE:\n {\n break;\n }\n case XMLStreamReader.NAMESPACE:\n {\n break;\n }\n case XMLStreamReader.NOTATION_DECLARATION:\n {\n break;\n }\n case XMLStreamReader.PROCESSING_INSTRUCTION:\n {\n getContentHandler().processingInstruction(xmlStreamReader.getPITarget(), xmlStreamReader.getPIData());\n break;\n }\n case XMLStreamReader.SPACE:\n {\n char[] characters = xmlStreamReader.getTextCharacters();\n getContentHandler().characters(characters, 0, characters.length);\n break;\n }\n case XMLStreamReader.START_DOCUMENT:\n {\n depth++;\n getContentHandler().startDocument();\n break;\n }\n case XMLStreamReader.START_ELEMENT:\n {\n depth++;\n String prefix = xmlStreamReader.getPrefix();\n if (null == prefix || prefix.length() == 0) {\n getContentHandler().startElement(xmlStreamReader.getNamespaceURI(), xmlStreamReader.getLocalName(), xmlStreamReader.getLocalName(), new IndexedAttributeList(xmlStreamReader));\n } else {\n getContentHandler().startElement(xmlStreamReader.getNamespaceURI(), xmlStreamReader.getLocalName(), prefix + XMLConstants.COLON + xmlStreamReader.getLocalName(), new IndexedAttributeList(xmlStreamReader));\n }\n break;\n }\n }\n try {\n parseEvent(xmlStreamReader);\n while (depth > 0 && xmlStreamReader.hasNext()) {\n xmlStreamReader.next();\n parse(xmlStreamReader);\n }\n } catch (XMLStreamException e) {\n throw new RuntimeException(e);\n }\n}\n"
"private void createCoGroupAlternative(List<OptimizerNode> target, OptimizerNode subPlan1, OptimizerNode subPlan2, ShipStrategy ss1, ShipStrategy ss2, CostEstimator estimator) {\n GlobalProperties gp1, gp2;\n LocalProperties lp1, lp2;\n gp1 = PactConnection.getGlobalPropertiesAfterConnection(subPlan1, this, ss1);\n lp1 = PactConnection.getLocalPropertiesAfterConnection(subPlan1, this, ss1);\n gp2 = PactConnection.getGlobalPropertiesAfterConnection(subPlan2, this, ss2);\n lp2 = PactConnection.getLocalPropertiesAfterConnection(subPlan2, this, ss2);\n int[] scrambledKeyOrder1 = null;\n int[] scrambledKeyOrder2 = null;\n if (ss1 == ShipStrategy.FORWARD && ss2 == ShipStrategy.PARTITION_HASH) {\n scrambledKeyOrder1 = getScrambledKeyOrder(this.keySet1, gp1.getPartitionedFields());\n if (scrambledKeyOrder1 != null) {\n FieldList scrambledKeys2 = new FieldList();\n for (int i = 0; i < scrambledKeyOrder1.length; i++) {\n scrambledKeys2.add(this.keySet2.get(scrambledKeyOrder1[i]));\n }\n gp2.setPartitioning(gp2.getPartitioning(), scrambledKeys2);\n }\n }\n if (ss2 == ShipStrategy.FORWARD && ss1 == ShipStrategy.PARTITION_HASH) {\n scrambledKeyOrder2 = getScrambledKeyOrder(this.keySet2, gp2.getPartitionedFields());\n if (scrambledKeyOrder2 != null) {\n FieldList scrambledKeys1 = new FieldList();\n for (int i = 0; i < scrambledKeyOrder2.length; i++) {\n scrambledKeys1.set(i, this.keySet1.get(scrambledKeyOrder2[i]));\n }\n gp1.setPartitioning(gp1.getPartitioning(), scrambledKeys1);\n }\n }\n int[] keyColumns1 = getPactContract().getKeyColumnNumbers(0);\n Ordering ordering1 = new Ordering();\n for (int keyColumn : keyColumns1) {\n ordering1.appendOrdering(keyColumn, null, Order.ASCENDING);\n }\n int[] keyColumns2 = getPactContract().getKeyColumnNumbers(1);\n Ordering ordering2 = new Ordering();\n for (int keyColumn : keyColumns2) {\n ordering2.appendOrdering(keyColumn, null, Order.ASCENDING);\n }\n GlobalProperties outGp = new GlobalProperties();\n outGp.setPartitioning(gp1.getPartitioning(), gp1.getPartitionedFields());\n CoGroupNode n = new CoGroupNode(this, subPlan1, subPlan2, this.input1, this.input2, outGp, new LocalProperties());\n n.input1.setShipStrategy(ss1);\n n.input1.setScramblePartitionedFields(scrambledKeyOrder2);\n n.input2.setShipStrategy(ss2);\n n.input2.setScramblePartitionedFields(scrambledKeyOrder1);\n n.getLocalProperties().setOrdering(ordering1);\n n.getLocalProperties().setGrouped(true, new FieldSet(keyColumns1));\n if (n.getLocalStrategy() == LocalStrategy.NONE) {\n if (ordering1.isMetBy(lp1.getOrdering()) && ordering2.isMetBy(lp2.getOrdering())) {\n n.setLocalStrategy(LocalStrategy.MERGE);\n } else if (!ordering1.isMetBy(lp1.getOrdering()) && ordering2.isMetBy(lp2.getOrdering())) {\n n.setLocalStrategy(LocalStrategy.SORT_FIRST_MERGE);\n } else if (ordering1.isMetBy(lp1.getOrdering()) && !ordering2.isMetBy(lp2.getOrdering())) {\n n.setLocalStrategy(LocalStrategy.SORT_SECOND_MERGE);\n } else {\n n.setLocalStrategy(LocalStrategy.SORT_BOTH_MERGE);\n }\n }\n n.getGlobalProperties().filterByNodesConstantSet(this, 0);\n n.getLocalProperties().filterByNodesConstantSet(this, 0);\n estimator.costOperator(n);\n target.add(n);\n outGp = new GlobalProperties();\n outGp.setPartitioning(gp2.getPartitioning(), gp2.getPartitionedFields());\n n = new CoGroupNode(this, subPlan1, subPlan2, input1, input2, outGp, new LocalProperties());\n n.input1.setShipStrategy(ss1);\n n.input1.setScramblePartitionedFields(scrambledKeyOrder2);\n n.input2.setShipStrategy(ss2);\n n.input2.setScramblePartitionedFields(scrambledKeyOrder1);\n n.getLocalProperties().setOrdering(ordering2);\n n.getLocalProperties().setGrouped(true, new FieldSet(keyColumns2));\n if (n.getLocalStrategy() == LocalStrategy.NONE) {\n if (ordering1.isMetBy(lp1.getOrdering()) && ordering2.isMetBy(lp2.getOrdering())) {\n n.setLocalStrategy(LocalStrategy.MERGE);\n } else if (!ordering1.isMetBy(lp1.getOrdering()) && ordering2.isMetBy(lp2.getOrdering())) {\n n.setLocalStrategy(LocalStrategy.SORT_FIRST_MERGE);\n } else if (ordering1.isMetBy(lp1.getOrdering()) && !ordering2.isMetBy(lp2.getOrdering())) {\n n.setLocalStrategy(LocalStrategy.SORT_SECOND_MERGE);\n } else {\n n.setLocalStrategy(LocalStrategy.SORT_BOTH_MERGE);\n }\n }\n n.getGlobalProperties().filterByNodesConstantSet(this, 1);\n n.getLocalProperties().filterByNodesConstantSet(this, 1);\n estimator.costOperator(n);\n target.add(n);\n}\n"
"public int getBlockId(int x, int y, int z) {\n int index = getIndex(x, y, z);\n int spins = 0;\n boolean interrupted = false;\n try {\n while (true) {\n if (spins++ > SPINS) {\n interrupted |= atomicWait(index);\n }\n checkCompressing();\n int seq = getSequence(x, y, z);\n short blockId = blockIds.get(index);\n if (auxStore.isReserved(blockId)) {\n blockId = auxStore.getId(blockId);\n if (testSequence(x, y, z, seq)) {\n return blockId & 0x0000FFFF;\n }\n } else {\n return blockId & 0x0000FFFF;\n }\n }\n } finally {\n if (interrupted) {\n Thread.currentThread().interrupt();\n }\n }\n}\n"
"public static CharSelectInfo getLoadout() {\n CharSelectInfo selectInfo = new CharSelectInfo(\"String_Node_Str\", \"String_Node_Str\", START_HP, START_HP, 2, 99, 5, EnumPatch.BLACK_MAGE_CLASS, getStartingRelics(), getStartingDeck(), false);\n return selectInfo;\n}\n"
"public static final long[][] applyBinaryOperation(LongBinaryOperation op, final long[][] matrix1, final long[][] matrix2) {\n int rows = _rows(matrix1);\n int columns = _columns(matrix1);\n _checkSameDimension(\"String_Node_Str\", matrix1, matrix2);\n long[][] returnValue = new long[rows][columns];\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < columns; j++) {\n returnValue[i][j] = op.operate(matrix1[i][j], matrix2[i][j]);\n }\n }\n return returnValue;\n}\n"
"public void addTenant(String admin, String firstName, String lastName, String password, String domain, String email) throws CommandException {\n DefaultHttpClient httpClient = new DefaultHttpClient();\n try {\n TenantInfoBean tenantInfo = new TenantInfoBean();\n tenantInfo.setAdmin(admin);\n tenantInfo.setFirstName(firstName);\n tenantInfo.setLastName(lastName);\n tenantInfo.setAdminPassword(password);\n tenantInfo.setTenantDomain(domain);\n tenantInfo.setEmail(email);\n GsonBuilder gsonBuilder = new GsonBuilder();\n Gson gson = gsonBuilder.create();\n String jsonString = gson.toJson(tenantInfo, TenantInfoBean.class);\n HttpResponse response = restClient.doPost(httpClient, restClient.getBaseURL() + ENDPOINT_ADD_TENANT, jsonString);\n int responseCode = response.getStatusLine().getStatusCode();\n if (responseCode == 201) {\n System.out.println(\"String_Node_Str\" + domain);\n }\n } catch (Exception e) {\n String message = \"String_Node_Str\" + domain;\n printError(message, e);\n } finally {\n httpClient.getConnectionManager().shutdown();\n }\n}\n"
"public static MatchMetaData isPHITerm(final MatchMetaData data, final String text) {\n if (CommonUtils.isEmptyString(text)) {\n return null;\n }\n if (data.getColumnType().equals(\"String_Node_Str\") && phiList.contains(text.trim().toLowerCase(Locale.ENGLISH))) {\n log.info(\"String_Node_Str\" + text);\n data.setModel(\"String_Node_Str\");\n data.setAverageProbability(1);\n return data;\n }\n return null;\n}\n"
"private Map<String, DocWeight> computeWeight(QueryContext ctx, QueryPlanner planner) {\n Iterator<List<QueryTerm>> stepsItr = planner.sequences.iterator();\n int stepsT = planner.sequences.size();\n StringBuilder sb = new StringBuilder(100);\n long bucketId = -1;\n int termSize = -1;\n Iterator<Long> bucketItr = null;\n TermList tl = null;\n int bytePos = -1;\n float thisWt = -1;\n List<QueryTerm> qts = null;\n int qtSize = -1;\n Iterator<QueryTerm> qtItr = null;\n String mappedDocId = null;\n Map<String, DocWeight> docWeightMap = new Hashtable<String, DocWeight>(250);\n for (int stepsIndex = 0; stepsIndex < stepsT; stepsIndex++) {\n qts = stepsItr.next();\n stepsItr.remove();\n if (null == qts)\n continue;\n qtSize = qts.size();\n qtItr = qts.iterator();\n for (int qtIndex = 0; qtIndex < qtSize; qtIndex++) {\n QueryTerm qt = qtItr.next();\n qtItr.remove();\n if (null == qt)\n continue;\n Map<Long, TermList> founded = qt.foundIds;\n if (null == founded)\n continue;\n bucketItr = founded.keySet().iterator();\n termSize = founded.size();\n for (int termIndex = 0; termIndex < termSize; termIndex++) {\n bucketId = bucketItr.next();\n tl = founded.get(bucketId);\n if (null == tl)\n continue;\n bytePos = -1;\n for (short docPos : tl.docPos) {\n bytePos++;\n if (-1 == docPos)\n continue;\n sb.delete(0, 100);\n sb.append(bucketId).append('_').append(docPos);\n mappedDocId = sb.toString();\n thisWt = (tl.termWeight[bytePos] * qt.preciousNess) + 1;\n if (docWeightMap.containsKey(mappedDocId)) {\n docWeightMap.get(mappedDocId).add(thisWt);\n } else {\n docWeightMap.put(mappedDocId, new DocWeight(mappedDocId, thisWt));\n }\n tl.cleanup();\n bucketItr.remove();\n }\n }\n }\n }\n return docWeightMap;\n}\n"
"public String format(Object aValue) throws ParseException {\n if (numberFormat != null) {\n if (aValue instanceof Number)\n return numberFormat.format((Number) aValue);\n else\n return null;\n } else if (dateFormat != null) {\n if (aValue instanceof Date)\n return dateFormat.format((Date) aValue);\n else\n return null;\n } else if (maskFormat != null) {\n return maskFormat.format(aValue);\n } else if (regExpFormat != null) {\n if (aValue instanceof String)\n return regExpFormat.format((String) aValue);\n else\n return null;\n } else if (bypassFormat != null) {\n return aValue != null ? bypassFormat.format(String.valueOf(aValue)) : null;\n } else {\n return aValue != null ? aValue.toString() : null;\n }\n}\n"
"public void testHorizonStatistics() {\n HorizonCounter hc = HorizonCounter.instance();\n ManagedConnection mc = new ManagedConnection(\"String_Node_Str\", 1);\n HorizonCounter.HORIZON_UPDATE_TIME = 1 * 200;\n PingReply pr1 = PingReply.create(GUID.makeGuid(), (byte) 3, 6346, new byte[] { (byte) 127, (byte) 0, (byte) 0, (byte) 1 }, 1, 10, false, 0, false);\n PingReply pr2 = PingReply.create(GUID.makeGuid(), (byte) 3, 6347, new byte[] { (byte) 127, (byte) 0, (byte) 0, (byte) 1 }, 2, 20, false, 0, false);\n PingReply pr3 = PingReply.create(GUID.makeGuid(), (byte) 3, 6346, new byte[] { (byte) 127, (byte) 0, (byte) 0, (byte) 2 }, 3, 30, false, 0, false);\n assertEquals(\"String_Node_Str\", 0, hc.getNumFiles());\n assertEquals(\"String_Node_Str\", 0, hc.getNumHosts());\n assertEquals(\"String_Node_Str\", 0, hc.getTotalFileSize());\n mc.updateHorizonStats(pr1);\n mc.updateHorizonStats(pr1);\n assertEquals(\"String_Node_Str\", 1, hc.getNumFiles());\n assertEquals(\"String_Node_Str\", 1, hc.getNumHosts());\n assertEquals(\"String_Node_Str\", 10, hc.getTotalFileSize());\n try {\n Thread.sleep(HorizonCounter.HORIZON_UPDATE_TIME * 2);\n } catch (InterruptedException e) {\n }\n hc.refresh();\n mc.updateHorizonStats(pr1);\n mc.updateHorizonStats(pr2);\n mc.updateHorizonStats(pr3);\n assertEquals(\"String_Node_Str\", 1, hc.getNumFiles());\n assertEquals(\"String_Node_Str\", 1, hc.getNumHosts());\n assertEquals(\"String_Node_Str\", 10, hc.getTotalFileSize());\n hc.refresh();\n assertEquals(\"String_Node_Str\", 1, hc.getNumFiles());\n assertEquals(\"String_Node_Str\", 1, hc.getNumHosts());\n assertEquals(\"String_Node_Str\", 10, hc.getTotalFileSize());\n try {\n Thread.sleep(HorizonCounter.HORIZON_UPDATE_TIME * 2);\n } catch (InterruptedException e) {\n }\n hc.refresh();\n assertEquals(\"String_Node_Str\", 1 + 2 + 3, hc.getNumFiles());\n assertEquals(\"String_Node_Str\", 3, hc.getNumHosts());\n assertEquals(\"String_Node_Str\", 10 + 20 + 30, hc.getTotalFileSize());\n try {\n Thread.sleep(HorizonCounter.HORIZON_UPDATE_TIME * 2);\n } catch (InterruptedException e) {\n }\n hc.refresh();\n assertEquals(\"String_Node_Str\", 0, hc.getNumFiles());\n assertEquals(\"String_Node_Str\", 0, hc.getNumHosts());\n assertEquals(\"String_Node_Str\", 0, hc.getTotalFileSize());\n mc.close();\n}\n"
"private void startListening() {\n LOG.info(\"String_Node_Str\");\n while (on) {\n JSONObject response;\n String responseString = \"String_Node_Str\";\n try {\n responseString = Connection.getRequestResponse(\"String_Node_Str\" + server + \"String_Node_Str\" + key + \"String_Node_Str\" + ts + \"String_Node_Str\" + wait + \"String_Node_Str\" + mode + \"String_Node_Str\" + version + \"String_Node_Str\");\n response = new JSONObject(responseString);\n } catch (JSONException ignored) {\n LOG.error(\"String_Node_Str\", responseString);\n continue;\n }\n LOG.info(\"String_Node_Str\", response);\n if (response.has(\"String_Node_Str\")) {\n int code = response.getInt(\"String_Node_Str\");\n LOG.error(\"String_Node_Str\", code);\n switch(code) {\n default:\n {\n if (response.has(\"String_Node_Str\")) {\n ts = response.getInt(\"String_Node_Str\");\n }\n setData(null, null, null, null, null);\n break;\n }\n case 4:\n {\n version = response.getInt(\"String_Node_Str\");\n setData(null, null, null, null, null);\n break;\n }\n }\n } else {\n if (response.has(\"String_Node_Str\"))\n ts = response.getInt(\"String_Node_Str\");\n if (response.has(\"String_Node_Str\"))\n this.pts = response.getInt(\"String_Node_Str\");\n if (this.updatesHandler.callbacksCount() > 0 || this.updatesHandler.commandsCount() > 0) {\n if (response.has(\"String_Node_Str\") && response.has(\"String_Node_Str\")) {\n this.updatesHandler.handle(response.getJSONArray(\"String_Node_Str\"));\n } else {\n LOG.error(\"String_Node_Str\", response);\n }\n }\n }\n }\n}\n"
"public Sound transform(Sound sound) {\n int threshold = 100;\n int channelNum = sound.getChannelNum();\n Sound builtSound = new Sound(new long[sound.getSamples().length], sound.getNbBytesPerSample(), sound.getFreq(), channelNum);\n double[] freqs = new double[sound.getSamples().length / threshold + 1];\n this.log(new LogEvent(LogLevel.VERBOSE, \"String_Node_Str\"));\n Sound2Note.getSoundLoudestFreqs(freqs, sound, threshold);\n double lastFreq = freqs[0];\n int lastBegining = 0;\n for (int i = 0; i < freqs.length; i++) {\n this.log(new LogEvent(LogLevel.VERBOSE, \"String_Node_Str\" + i + \"String_Node_Str\" + freqs.length));\n int length = (i - 1 - lastBegining) * threshold;\n if (Math.abs(freqs[i] - lastFreq) > freqs[i] / 100 && length > sound.getFreq() / 2) {\n Note note = this.pack.get(this.instrument).getNearestNote((int) lastFreq);\n Sound attack = note.getAttack((int) lastFreq, channelNum, length);\n Sound decay = note.getDecay((int) lastFreq, channelNum, length);\n Sound sustain = note.getSustain((int) lastFreq, channelNum, length);\n Sound release = note.getRelease((int) lastFreq, channelNum, length);\n builtSound.append(threshold * lastBegining, attack, decay, sustain, release);\n lastBegining = i;\n lastFreq = freqs[i];\n }\n }\n return builtSound;\n}\n"
"public Set<Comment> find(Set<Long> ids, List<QueryConstraint> constraints) throws IOException {\n Set<Comment> foundSet = new HashSet<Comment>();\n if (query.getConstraints() == null || query.getConstraints().isEmpty()) {\n Set<Long> ids = query.getIdSet();\n if (ids != null && !ids.isEmpty()) {\n return find(ids);\n }\n return foundSet;\n }\n StringBuilder statementString = new StringBuilder();\n statementString.append(\"String_Node_Str\");\n Iterator<QueryConstraint> iter = constraints.iterator();\n while (iter.hasNext()) {\n QueryConstraint constraint = iter.next();\n Enum field = constraint.getField();\n IQueryOperator operator = constraint.getOperator();\n statementString.append(field).append(operator.getSqlStatement());\n if (iter.hasNext()) {\n statementString.append(\"String_Node_Str\");\n }\n }\n if (ids != null && !ids.isEmpty())\n statementString.append(\"String_Node_Str\" + getIdSetCondition(ids));\n statementString.append(\"String_Node_Str\");\n PreparedStatement preparedStatement = getPreparedStatement(statementString.toString());\n int index = 0;\n for (QueryConstraint constraint : constraints) {\n Comment._Fields field = (Comment._Fields) constraint.getField();\n for (Object parameter : constraint.getParameters()) {\n if (parameter == null) {\n continue;\n }\n try {\n switch(field) {\n case content:\n preparedStatement.setString(++index, (String) parameter);\n break;\n case commenter_id:\n preparedStatement.setInt(++index, (Integer) parameter);\n break;\n case commented_on_id:\n preparedStatement.setLong(++index, (Long) parameter);\n break;\n case created_at:\n preparedStatement.setTimestamp(++index, new Timestamp((Long) parameter));\n break;\n }\n } catch (SQLException e) {\n throw new IOException(e);\n }\n }\n }\n executeQuery(foundSet, preparedStatement);\n return foundSet;\n}\n"
"public void setObserver(IPrintDocumentAdapterObserver observer) {\n final boolean destroyed;\n synchronized (mLock) {\n mObserver = observer;\n destroyed = isDestroyedLocked();\n }\n if (destroyed && observer != null) {\n try {\n observer.onDestroy();\n } catch (RemoteException re) {\n Log.e(LOG_TAG, \"String_Node_Str\", re);\n }\n }\n}\n"
"public Closeable mountDeploymentContent(String name, byte[] deploymentHash, VirtualFile mountPoint) throws IOException {\n String sha1 = bytesToHexString(deploymentHash);\n String partA = sha1.substring(0, 2);\n String partB = sha1.substring(2);\n File base = new File(repoRoot, partA);\n File hashDir = new File(base, partB);\n File content = new File(hashDir, CONTENT);\n return VFS.mountZip(content, mountPoint, TempFileProviderService.provider());\n}\n"
"public void showConceptAnnotations() throws IllegalActionException {\n OntologySolver solver = (OntologySolver) getContainer();\n for (Object propertyable : solver.getAllPropertyables()) {\n if (propertyable instanceof NamedObj) {\n Concept concept = solver.getConcept(propertyable);\n if (concept != null) {\n String request = \"String_Node_Str\" + concept.toString() + \"String_Node_Str\";\n MoMLChangeRequest change = new MoMLChangeRequest(this, (NamedObj) propertyable, request, false);\n ((NamedObj) propertyable).requestChange(change);\n }\n }\n }\n solver.requestChange(new MoMLChangeRequest(this, solver, \"String_Node_Str\"));\n}\n"
"public void updateStatus() {\n StartItem item;\n int i, j;\n for (i = 0; i < ni; i++) {\n setItemNameButton(i, false);\n actionableItems[i] = null;\n }\n dummyButton.setSelected(true);\n for (PossibleAction action : possibleActions.getList()) {\n log.debug(action.getPlayerName() + \"String_Node_Str\" + action);\n }\n List<StartItemAction> actions = possibleActions.getType(StartItemAction.class);\n if (actions == null || actions.isEmpty()) {\n close();\n return;\n }\n int nextPlayerIndex = ((PossibleAction) actions.get(0)).getPlayerIndex();\n setSRPlayerTurn(nextPlayerIndex);\n boolean passAllowed = false;\n boolean buyAllowed = false;\n boolean bidAllowed = false;\n boolean selected = false;\n BuyStartItem buyAction;\n for (StartItemAction action : actions) {\n j = action.getItemIndex();\n i = crossIndex[j];\n actionableItems[i] = action;\n item = action.getStartItem();\n if (action instanceof BuyStartItem) {\n buyAction = (BuyStartItem) action;\n if (!buyAction.setSharePriceOnly()) {\n selected = buyAction.isSelected();\n if (selected) {\n buyButton.setPossibleAction(action);\n } else {\n itemNameButton[i].setPossibleAction(action);\n }\n itemNameButton[i].setSelected(selected);\n itemNameButton[i].setEnabled(!selected);\n setItemNameButton(i, true);\n if (includeBidding && showBasePrices)\n minBid[i].setText(\"String_Node_Str\");\n buyAllowed = selected;\n } else {\n PossibleAction lastAction = gameUIManager.getLastAction();\n if (lastAction instanceof GameAction && (((GameAction) lastAction).getMode() == GameAction.UNDO || ((GameAction) lastAction).getMode() == GameAction.FORCED_UNDO)) {\n setItemNameButton(i, true);\n itemNameButton[i].setSelected(true);\n itemNameButton[i].setEnabled(false);\n buyButton.setPossibleAction(action);\n buyAllowed = true;\n } else {\n immediateAction = action;\n }\n }\n } else if (action instanceof BidStartItem) {\n BidStartItem bidAction = (BidStartItem) action;\n selected = bidAction.isSelected();\n if (selected) {\n bidButton.addPossibleAction(action);\n bidButton.setPossibleAction(action);\n int mb = bidAction.getMinimumBid();\n spinnerModel.setMinimum(mb);\n spinnerModel.setStepSize(bidAction.getBidIncrement());\n spinnerModel.setValue(mb);\n } else {\n itemNameButton[i].setPossibleAction(action);\n }\n bidAllowed = selected;\n itemNameButton[i].setSelected(selected);\n itemNameButton[i].setEnabled(!selected);\n setItemNameButton(i, true);\n minBid[i].setText(Bank.format(item.getMinimumBid()));\n }\n }\n passAllowed = false;\n List<NullAction> inactiveItems = possibleActions.getType(NullAction.class);\n if (inactiveItems != null) {\n for (NullAction na : inactiveItems) {\n switch(na.getMode()) {\n case NullAction.PASS:\n passButton.setText(LocalText.getText(\"String_Node_Str\"));\n passAllowed = true;\n passButton.setPossibleAction(na);\n passButton.setMnemonic(KeyEvent.VK_P);\n break;\n }\n }\n }\n buyButton.setEnabled(buyAllowed);\n if (includeBidding) {\n bidButton.setEnabled(bidAllowed);\n passButton.setEnabled(passAllowed);\n requestFocus();\n}\n"
"public List<Map<String, String>> getDisplayInfo() {\n NumberFormat numberFormat = NumberFormat.getInstance(Locale.getDefault());\n List<Map<String, String>> info = new ArrayList<>();\n for (String symbol : this.getSortedSymbols()) {\n StockQuote quote = this.stocksQuotes.get(symbol);\n PortfolioStock stock = this.getStock(symbol);\n Map<String, String> itemInfo = new HashMap<>();\n populateDisplayNames(quote, stock, itemInfo);\n String currentPrice = populateDisplayCurrentPrice(quote, itemInfo);\n if (hasInfoForStock(stock)) {\n String buyPrice = stock.getPrice();\n itemInfo.put(\"String_Node_Str\", buyPrice);\n itemInfo.put(\"String_Node_Str\", stock.getDate());\n populateDisplayHighLimit(stock, itemInfo);\n populateDisplayLowLimit(stock, itemInfo);\n itemInfo.put(\"String_Node_Str\", stock.getQuantity());\n populateDisplayLastChange(numberFormat, symbol, quote, stock, itemInfo);\n populateDisplayTotalChange(numberFormat, symbol, stock, itemInfo, currentPrice, buyPrice);\n populateDisplayHoldingValue(numberFormat, symbol, stock, itemInfo, currentPrice);\n }\n itemInfo.put(\"String_Node_Str\", symbol);\n info.add(itemInfo);\n }\n return info;\n}\n"
"private Property buildTransformationProperty(JavaHasAnnotations javaHasAnnotations, JavaClass cls) {\n Property property = new Property(helper);\n org.eclipse.persistence.oxm.annotations.XmlTransformation transformationAnnotation = (org.eclipse.persistence.oxm.annotations.XmlTransformation) helper.getAnnotation(javaHasAnnotations, org.eclipse.persistence.oxm.annotations.XmlTransformation.class);\n XmlTransformation transformation = new XmlTransformation();\n transformation.setOptional(transformationAnnotation.optional());\n org.eclipse.persistence.oxm.annotations.XmlReadTransformer readTransformer = (org.eclipse.persistence.oxm.annotations.XmlReadTransformer) helper.getAnnotation(javaHasAnnotations, org.eclipse.persistence.oxm.annotations.XmlReadTransformer.class);\n if (readTransformer != null) {\n org.eclipse.persistence.jaxb.xmlmodel.XmlTransformation.XmlReadTransformer xmlReadTransformer = new org.eclipse.persistence.jaxb.xmlmodel.XmlTransformation.XmlReadTransformer();\n if (!(readTransformer.transformerClass() == AttributeTransformer.class)) {\n xmlReadTransformer.setTransformerClass(readTransformer.transformerClass().getName());\n } else if (!(readTransformer.method().equals(\"String_Node_Str\"))) {\n xmlReadTransformer.setMethod(readTransformer.method());\n }\n transformation.setXmlReadTransformer(xmlReadTransformer);\n }\n org.eclipse.persistence.oxm.annotations.XmlWriteTransformer[] transformers = null;\n if (helper.isAnnotationPresent(javaHasAnnotations, org.eclipse.persistence.oxm.annotations.XmlWriteTransformer.class)) {\n org.eclipse.persistence.oxm.annotations.XmlWriteTransformer writeTransformer = (org.eclipse.persistence.oxm.annotations.XmlWriteTransformer) helper.getAnnotation(javaHasAnnotations, org.eclipse.persistence.oxm.annotations.XmlWriteTransformer.class);\n transformers = new org.eclipse.persistence.oxm.annotations.XmlWriteTransformer[] { writeTransformer };\n } else if (helper.isAnnotationPresent(javaHasAnnotations, XmlWriteTransformers.class)) {\n XmlWriteTransformers writeTransformers = (XmlWriteTransformers) helper.getAnnotation(javaHasAnnotations, XmlWriteTransformers.class);\n transformers = writeTransformers.value();\n }\n if (transformers != null) {\n for (org.eclipse.persistence.oxm.annotations.XmlWriteTransformer next : transformers) {\n org.eclipse.persistence.jaxb.xmlmodel.XmlTransformation.XmlWriteTransformer xmlWriteTransformer = new org.eclipse.persistence.jaxb.xmlmodel.XmlTransformation.XmlWriteTransformer();\n if (!(next.transformerClass() == void.class)) {\n xmlWriteTransformer.setTransformerClass(next.transformerClass().getName());\n } else if (!(next.method().equals(\"String_Node_Str\"))) {\n xmlWriteTransformer.setMethod(next.method());\n }\n xmlWriteTransformer.setXmlPath(next.xpath());\n transformation.getXmlWriteTransformer().add(xmlWriteTransformer);\n }\n }\n property.setXmlTransformation(transformation);\n property.setIsXmlTransformation(true);\n return property;\n}\n"
"public void layout(Object composite) {\n KielerLayoutConnector.setLayoutInProgress(true);\n KielerLayoutArcConnector.setLayoutInProgress(true);\n long overallTime = System.currentTimeMillis();\n _report(\"String_Node_Str\");\n long graphOverhead = overallTime;\n _graphModel = getLayoutTarget().getGraphModel();\n KNode parentNode = KimlUtil.createInitializedNode();\n KShapeLayout parentLayout = parentNode.getData(KShapeLayout.class);\n if (_top != null) {\n Dimension contentSize = _top.getContentSize();\n parentLayout.setWidth(contentSize.width);\n parentLayout.setHeight(contentSize.height);\n }\n KNode mainModelNode = parentNode;\n KShapeLayout mainModelLayout = parentLayout;\n if (_graphModel instanceof FSMGraphModel) {\n mainModelNode = _createFsmSkeleton(parentNode);\n mainModelLayout = mainModelNode.getData(KShapeLayout.class);\n }\n try {\n Parameters parameters = new Parameters(_compositeEntity);\n parameters.configureLayout(mainModelLayout, getLayoutTarget().getGraphModel());\n _createGraph(composite, mainModelNode);\n graphOverhead = System.currentTimeMillis() - graphOverhead;\n InstancePool<AbstractLayoutProvider> layouterPool = _getLayouterPool();\n AbstractLayoutProvider layoutProvider = layouterPool.fetch();\n IKielerProgressMonitor progressMonitor = new BasicProgressMonitor();\n _recursivelyLayout(parentNode, layoutProvider, progressMonitor);\n if (DEBUG) {\n KimlUtil.persistDataElements(parentNode);\n KielerGraphUtil._writeToFile(parentNode);\n }\n KVector offset = KielerGraphUtil._getUpperLeftCorner(parentNode);\n parentLayout.setXpos(parentLayout.getXpos() - (float) offset.x);\n parentLayout.setYpos(parentLayout.getYpos() - (float) offset.y);\n long momlRequestOverhead = System.currentTimeMillis();\n ApplyLayoutRequest layoutRequest = new ApplyLayoutRequest(_compositeEntity);\n _recursivelyApplyLayout(parentNode, layoutRequest);\n _compositeEntity.requestChange(layoutRequest);\n momlRequestOverhead = System.currentTimeMillis() - momlRequestOverhead;\n overallTime = System.currentTimeMillis() - overallTime;\n _report(\"String_Node_Str\" + overallTime + \"String_Node_Str\" + graphOverhead + \"String_Node_Str\" + Math.round(progressMonitor.getExecutionTime() * 1000) + \"String_Node_Str\" + momlRequestOverhead + \"String_Node_Str\");\n layouterPool.release(layoutProvider);\n } catch (IllegalActionException exception) {\n throw new InternalErrorException(exception);\n }\n KielerLayoutConnector.setLayoutInProgress(false);\n KielerLayoutArcConnector.setLayoutInProgress(false);\n}\n"
"public <K extends TBase<?, ?>> ThriftCacheKey<K> getKey(String table, K tkey, Class<K> clazz) {\n User user = UserContext.getUser();\n return new ThriftCacheKey<K>(user, table, shards, tkey, clazz);\n}\n"
"private void handleCursorDraggingLevel1(final GL gl) {\n Point currentPoint = glMouseListener.getPickedPoint();\n float[] fArTargetWorldCoordinates = new float[3];\n int iselElement;\n int iNrSamples;\n fArTargetWorldCoordinates = GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl, currentPoint.x, currentPoint.y);\n float fTextureHeight = viewFrustum.getHeight() - 0.6f;\n float fStep = fTextureHeight / iNumberOfElements;\n float fYPosMouse = fArTargetWorldCoordinates[1] - 0.4f;\n if (iDraggedCursorLevel1 == 1) {\n if (fYPosMouse > fPosCursorLastElementLevel1 && fYPosMouse <= viewFrustum.getHeight() - 0.6f) {\n iselElement = (int) Math.floor((fTextureHeight - fYPosMouse) / fStep);\n iNrSamples = iLastSampleLevel1 - iselElement + 1;\n if (iNrSamples >= MIN_SAMPLES_LEVEL_2 && iNrSamples < MAX_SAMPLES_LEVEL_2) {\n fPosCursorFirstElementLevel1 = fYPosMouse;\n iFirstSampleLevel1 = iselElement;\n iSamplesLevel2 = iLastSampleLevel1 - iFirstSampleLevel1 + 1;\n }\n }\n }\n if (iDraggedCursorLevel1 == 2) {\n if (fYPosMouse < fPosCursorFirstElementLevel1 && fYPosMouse >= 0.0f) {\n iselElement = (int) Math.floor((fTextureHeight - fYPosMouse) / fStep);\n iNrSamples = iselElement - iFirstSampleLevel1 + 1;\n if (iNrSamples >= MIN_SAMPLES_PER_TEXTURE && iNrSamples < MAX_SAMPLES_PER_TEXTURE) {\n fPosCursorLastElementLevel1 = fYPosMouse;\n iLastSampleLevel1 = iselElement;\n iSamplesLevel2 = iLastSampleLevel1 - iFirstSampleLevel1 + 1;\n }\n }\n }\n setDisplayListDirty();\n setEmbeddedHeatMapData();\n if (glMouseListener.wasMouseReleased()) {\n bIsDraggingActiveLevel1 = false;\n bDisableBlockDraggingLevel1 = false;\n bActivateDraggingLevel1 = false;\n }\n}\n"
"public void iterate(Object object) {\n if (isClassReadOnly(object.getClass(), this.getCurrentDescriptor())) {\n this.setShouldBreak(true);\n return;\n }\n if (isSmartMerge() && isOriginalNewObject(object)) {\n return;\n } else if (!isObjectRegistered(object)) {\n if (shouldPerformNoValidation() && checkForUnregisteredExistingObject(object)) {\n unregisteredExistingObjects.put(object, object);\n this.setShouldBreak(true);\n return;\n }\n knownNewObjects.put(object, object);\n }\n}\n"
"public void varcharTest() {\n Invocation invocation = new Invocation(\"String_Node_Str\");\n invocation.setParameter(\"String_Node_Str\", \"String_Node_Str\");\n Operation op = xrService.getOperation(invocation.getName());\n Object result = op.invoke(xrService, invocation);\n assertNotNull(\"String_Node_Str\", result);\n Document doc = xmlPlatform.createDocument();\n XMLMarshaller marshaller = xrService.getXMLContext().createMarshaller();\n marshaller.marshal(result, doc);\n Document controlDoc = xmlParser.parse(new StringReader(VALUE_1_XML));\n assertTrue(\"String_Node_Str\" + documentToString(controlDoc) + \"String_Node_Str\" + documentToString(doc), comparer.isNodeEqual(controlDoc, doc));\n}\n"
"public void testGetAllUnigrams() {\n extractAllUnigramFeats(0, 3);\n}\n"
"public void setAccountsVisible(boolean visible) {\n if (visible == accountsVisible)\n return;\n accountsVisible = visible;\n if (accountsVisible) {\n accountsList.setVisibility(View.VISIBLE);\n if (Build.VERSION.SDK_INT >= 12) {\n accountsList.setAlpha(0);\n accountsList.animate().alpha(1.0f).setListener(null);\n }\n } else {\n ViewPropertyAnimator.animate(accountsList).alpha(0.0f).setListener(new AnimatorListenerAdapter() {\n public void onAnimationEnd(Animator animation) {\n if (accountsList != null) {\n accountsList.setVisibility(View.GONE);\n }\n }\n });\n }\n}\n"
"private String sendRequest(String service, String xmlRequest) throws ExecutionException {\n org.apache.commons.httpclient.protocol.Protocol myhttps = null;\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(_ip, 443, myhttps);\n byte[] response = null;\n PostMethod method = new PostMethod(\"String_Node_Str\" + service);\n method.setRequestBody(xmlRequest);\n try {\n int statusCode = client.executeMethod(method);\n if (statusCode != HttpStatus.SC_OK) {\n throw new Exception(\"String_Node_Str\" + statusCode);\n }\n response = method.getResponseBody();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n throw new ExecutionException(e.getMessage());\n }\n System.out.println(new String(response));\n return new String(response);\n}\n"
"private Alignments.AlignmentEntry andBack(final int index, int originalIndex, final Alignments.AlignmentEntry reduced) {\n final Alignments.AlignmentEntry.Builder result = Alignments.AlignmentEntry.newBuilder(reduced);\n final int multiplicity = multiplicities.get(index);\n final int k = multiplicity - 1;\n multiplicities.set(index, k);\n if (!multiplicityFieldsAllMissing) {\n result.setMultiplicity(1);\n }\n final int queryIndex = queryIndices.getInt(originalIndex);\n result.setQueryIndex(queryIndex);\n if (originalIndex == 0 || reduced.hasPosition() || reduced.hasTargetIndex()) {\n previousPosition = reduced.getPosition();\n previousTargetIndex = reduced.getTargetIndex();\n } else {\n final int deltaPos = deltaPositions.getInt(deltaPosIndex);\n final int deltaTarget = deltaTargetIndices.getInt(deltaPosIndex);\n final int position = previousPosition + deltaPos;\n final int targetIndex = previousTargetIndex + deltaTarget;\n result.setPosition(position);\n result.setTargetIndex(targetIndex);\n previousPosition += deltaPos;\n previousTargetIndex += deltaTarget;\n deltaPosIndex++;\n }\n int anInt = mappingQualities.getInt(index);\n if (anInt != MISSING_VALUE) {\n result.setMappingQuality(anInt);\n }\n anInt = fragmentIndices.getInt(index);\n if (anInt != MISSING_VALUE) {\n result.setFragmentIndex(anInt);\n }\n anInt = matchingReverseStrand.getInt(index);\n if (anInt != MISSING_VALUE) {\n result.setMatchingReverseStrand(anInt == 1);\n }\n anInt = numberOfMismatches.getInt(index);\n if (anInt != MISSING_VALUE) {\n result.setNumberOfMismatches(anInt);\n }\n anInt = numberOfIndels.getInt(index);\n if (anInt != MISSING_VALUE) {\n result.setNumberOfIndels(anInt);\n }\n final int queryLength = queryLengths.getInt(index);\n if (queryLength != MISSING_VALUE) {\n result.setQueryLength(queryLength);\n }\n anInt = queryAlignedLengths.getInt(index);\n if (anInt != MISSING_VALUE) {\n result.setQueryAlignedLength(anInt);\n }\n anInt = queryPositions.getInt(index);\n if (anInt != MISSING_VALUE) {\n result.setQueryPosition(anInt);\n }\n anInt = targetAlignedLengths.getInt(index);\n if (anInt != MISSING_VALUE) {\n result.setTargetAlignedLength(anInt);\n }\n final boolean entryMatchingReverseStrand = result.hasMatchingReverseStrand() ? result.getMatchingReverseStrand() : false;\n Alignments.RelatedAlignmentEntry link = pairLinks.decode(originalIndex, entryMatchingReverseStrand, reduced.getPairAlignmentLink());\n if (link != null) {\n result.setPairAlignmentLink(link);\n }\n link = forwardSpliceLinks.decode(originalIndex, entryMatchingReverseStrand, reduced.getSplicedForwardAlignmentLink());\n if (link != null) {\n result.setSplicedForwardAlignmentLink(link);\n }\n link = backwardSpliceLinks.decode(originalIndex, entryMatchingReverseStrand, reduced.getSplicedBackwardAlignmentLink());\n if (link != null) {\n result.setSplicedBackwardAlignmentLink(link);\n }\n final boolean templateHasSequenceVariations = reduced.getSequenceVariationsCount() > 0;\n final int numVariations = variationCount.getInt(index);\n for (int varIndex = 0; varIndex < numVariations; varIndex++) {\n final Alignments.SequenceVariation template = templateHasSequenceVariations ? reduced.getSequenceVariations(varIndex) : null;\n final Alignments.SequenceVariation.Builder varBuilder = templateHasSequenceVariations ? Alignments.SequenceVariation.newBuilder(template) : Alignments.SequenceVariation.newBuilder();\n from.setLength(0);\n to.setLength(0);\n final int fromLength = fromLengths.getInt(varPositionIndex);\n final int toLength = toLengths.getInt(varPositionIndex);\n varBuilder.setPosition(varPositions.getInt(varPositionIndex));\n varBuilder.setReadIndex(varReadIndex.getInt(varPositionIndex));\n final int toQualLength = varToQualLength.getInt(varToQualsLength);\n varToQualsLength++;\n final byte[] quals = getQualArray(toQualLength);\n ++varPositionIndex;\n final int maxLength = Math.max(fromLength, toLength);\n for (int i = 0; i < maxLength; i++) {\n final int fromTo = varFromTo.getInt(varFromToIndex++);\n if (i < fromLength) {\n from.append((char) (fromTo >> 8));\n }\n if (i < toLength) {\n to.append((char) (fromTo & 0xFF));\n }\n if (i < toQualLength) {\n if (varQualIndex < varQuals.size()) {\n quals[i] = (byte) varQuals.getInt(varQualIndex);\n ++varQualIndex;\n }\n }\n }\n varBuilder.setFrom(from.toString());\n varBuilder.setTo(to.toString());\n if (toQualLength > 0) {\n varBuilder.setToQuality(ByteString.copyFrom(quals));\n }\n if (templateHasSequenceVariations) {\n result.setSequenceVariations(varIndex, varBuilder);\n } else {\n result.addSequenceVariations(varBuilder);\n }\n }\n return result.build();\n}\n"
"protected void initialize() {\n getConnection().setInputModel(false);\n this.treePopulator = new TreePopulator(availableXmlTree);\n if (getConnection().getXmlFilePath() != null) {\n xmlXsdFilePath.setText(getConnection().getXmlFilePath().replace(\"String_Node_Str\", \"String_Node_Str\"));\n checkFieldsValue();\n String xmlXsdPath = xmlXsdFilePath.getText();\n if (isContextMode()) {\n ContextType contextType = ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection());\n xmlXsdPath = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType, xmlXsdFilePath.getText()));\n }\n if (!new File(xmlXsdPath).exists() && getConnection().getFileContent() != null && getConnection().getFileContent().length > 0) {\n initFileContent();\n xmlXsdPath = tempXmlXsdPath;\n }\n if (xmlXsdPath != null && !\"String_Node_Str\".equals(xmlXsdPath) && (XmlUtil.isXSDFile(xmlXsdPath) || xmlXsdPath.endsWith(\"String_Node_Str\"))) {\n try {\n XSDPopulationUtil2 xsdPopulationUtil = new XSDPopulationUtil2();\n XSDSchema xsdSchema = TreeUtil.getXSDSchema(xsdPopulationUtil, xmlXsdPath);\n List<ATreeNode> rootNodes = xsdPopulationUtil.getAllRootNodes(xsdSchema);\n if (rootNodes.size() > 0) {\n ATreeNode rootNode = getDefaultRootNode(rootNodes);\n List<ATreeNode> treeNodes = new ArrayList<ATreeNode>();\n if (rootNode == null) {\n valid = treePopulator.populateTree(xsdSchema, rootNodes.get(0), treeNodes);\n } else {\n valid = treePopulator.populateTree(xsdSchema, rootNode, treeNodes);\n if (treeNodes.size() > 0) {\n treeNode = treeNodes.get(0);\n }\n }\n }\n } catch (Exception e) {\n ExceptionHandler.process(e);\n }\n } else {\n valid = this.treePopulator.populateTree(xmlXsdPath, treeNode);\n }\n }\n if (getConnection().getEncoding() != null && !getConnection().getEncoding().equals(\"String_Node_Str\")) {\n encodingCombo.setText(getConnection().getEncoding());\n } else {\n encodingCombo.select(0);\n }\n encodingCombo.clearSelection();\n if (getConnection().getOutputFilePath() != null) {\n outputFilePath.setText(getConnection().getOutputFilePath());\n }\n adaptFormToEditable();\n}\n"
"protected void doRun() throws EngineException {\n doValidateParameters();\n loadDesign();\n prepareDesign();\n startFactory();\n openReportDocument();\n try {\n ReportRunnable newRunnable = writer.saveDesign(executionContext.getRunnable(), executionContext.getOriginalRunnable());\n executionContext.updateRunnable(newRunnable);\n writer.saveReportIR(executionContext.getReport());\n writer.saveParamters(inputValues);\n executionContext.openDataEngine();\n synchronized (this) {\n if (!executionContext.isCanceled()) {\n documentBuilder = new ReportDocumentBuilder(executionContext, writer);\n }\n }\n if (documentBuilder != null) {\n if (pageHandler != null) {\n documentBuilder.setPageHandler(pageHandler);\n }\n IContentEmitter emitter = documentBuilder.getContentEmitter();\n IReportExecutor executor = new ReportExecutor(executionContext);\n executor = new ReportEmitterExecutor(executor, emitter);\n executor = new SuppressDuplciateReportExecutor(executor);\n executionContext.setExecutor(executor);\n initializeContentEmitter(emitter, executor);\n documentBuilder.build();\n }\n executionContext.closeDataEngine();\n } catch (Exception ex) {\n log.log(Level.SEVERE, \"String_Node_Str\", ex);\n throw new EngineException(MessageConstants.REPORT_RUN_ERROR, ex);\n } catch (OutOfMemoryError err) {\n log.log(Level.SEVERE, \"String_Node_Str\");\n throw err;\n } catch (Throwable t) {\n log.log(Level.SEVERE, \"String_Node_Str\", t);\n throw new EngineException(\"String_Node_Str\", t);\n } finally {\n documentBuilder = null;\n closeFactory();\n writer.savePersistentObjects(executionContext.getGlobalBeans());\n closeReportDocument();\n if (pageHandler != null && !executionContext.isCanceled()) {\n int totalPage = (int) executionContext.getTotalPage();\n IReportDocumentInfo docInfo = new ReportDocumentInfo(executionContext, totalPage, true);\n pageHandler.onPage(totalPage, true, docInfo);\n }\n }\n}\n"
"public boolean performOk() {\n if (isValid()) {\n saveOutputColumns();\n ((DataSetHandle) getContainer().getModel()).removeListener(this);\n if (this.modelChanged) {\n ((DataSetEditor) this.getContainer()).updateDataSetDesign(this);\n this.modelChanged = false;\n }\n try {\n if (!pageActivated) {\n setAnalysisTypeForColumn();\n }\n } catch (BirtException e) {\n ExceptionHandler.handle(e, true);\n }\n ((DataSetHandle) getContainer().getModel()).removeListener(this);\n return super.performOk();\n } else {\n ((DataSetHandle) getContainer().getModel()).removeListener(this);\n return false;\n }\n}\n"
"public static void merge(org.eclipse.microprofile.openapi.annotations.headers.Header header, Map<String, Header> headers, boolean override, Map<String, Schema> currentSchemas) {\n if (isAnnotationNull(header)) {\n return;\n }\n String headerName = header.name();\n if (header.name() == null || header.name().isEmpty()) {\n headerName = UNKNOWN_NAME;\n }\n Header model = headers.getOrDefault(headerName, new HeaderImpl());\n headers.put(headerName, model);\n merge(header, model, override, currentSchemas);\n if (model.getRef() != null) {\n headers.remove(headerName);\n headers.put(model.getRef().split(\"String_Node_Str\")[3], model);\n }\n}\n"
"public void update(String key, Object[] plist) throws UpdateApiException, Exception {\n try {\n Server server = ServerManager.getAuthorizedServer(key, JIPDBSXmlRpc3Servlet.getClientIpAddress());\n List<PlayerInfo> list = new ArrayList<PlayerInfo>();\n for (Object o : plist) {\n try {\n list.add(processEventInfo(o));\n } catch (Exception e) {\n log.error(e.getMessage());\n }\n }\n if (list.size() > 0) {\n if (list.size() > maxListSize) {\n log.warn(\"String_Node_Str\" + Integer.toString(list.size()));\n list = list.subList(list.size() - maxListSize, list.size());\n } else {\n log.info(\"String_Node_Str\" + Integer.toString(list.size()));\n }\n updateApi.updatePlayer(server, list);\n } else {\n if (server.getOnlinePlayers() > 0 || server.getDirty()) {\n log.debug(\"String_Node_Str\" + server.getName());\n updateApi.cleanServer(server);\n }\n }\n } catch (UnauthorizedUpdateException e) {\n log.warn(e.getMessage());\n } catch (Exception e) {\n log.error(e.getMessage());\n StringWriter w = new StringWriter();\n e.printStackTrace(new PrintWriter(w));\n log.error(w.getBuffer().toString());\n throw e;\n }\n}\n"
"public boolean write(IProgressMonitor monitor) throws CoreException {\n ApplicationDeploymentInfo deploymentInfo = appModule.getDeploymentInfo();\n if (deploymentInfo == null) {\n return false;\n }\n String appName = deploymentInfo.getDeploymentName();\n Map<Object, Object> deploymentInfoYaml = parseManifestFromFile();\n if (deploymentInfoYaml == null) {\n deploymentInfoYaml = new LinkedHashMap<Object, Object>();\n }\n Object applicationsObj = deploymentInfoYaml.get(APPLICATIONS_PROP);\n List<Map<Object, Object>> applicationsList = null;\n if (applicationsObj == null) {\n applicationsList = new ArrayList<Map<Object, Object>>();\n deploymentInfoYaml.put(APPLICATIONS_PROP, applicationsList);\n } else if (applicationsObj instanceof List<?>) {\n applicationsList = (List<Map<Object, Object>>) applicationsObj;\n } else {\n throw CloudErrorUtil.toCoreException(\"String_Node_Str\" + relativePath + \"String_Node_Str\");\n }\n Map<Object, Object> applicationWithSameName = null;\n Map<Object, Object> oldApplication = null;\n for (Object appMap : applicationsList) {\n if (appMap instanceof Map<?, ?>) {\n applicationProperties = (Map<Object, Object>) appMap;\n if (!appName.equals(applicationProperties.get(NAME_PROP))) {\n applicationProperties = null;\n } else {\n break;\n }\n }\n }\n if (applicationProperties == null) {\n applicationProperties = new LinkedHashMap<Object, Object>();\n applicationsList.add(applicationProperties);\n }\n applicationProperties.put(NAME_PROP, appName);\n String memory = getMemoryAsString(deploymentInfo.getMemory());\n if (memory != null) {\n applicationProperties.put(MEMORY_PROP, memory);\n }\n int instances = deploymentInfo.getInstances();\n if (instances > 0) {\n applicationProperties.put(INSTANCES_PROP, instances);\n }\n List<String> urls = deploymentInfo.getUris();\n if (urls != null && !urls.isEmpty()) {\n String url = urls.get(0);\n CloudApplicationUrlLookup lookup = CloudApplicationUrlLookup.getCurrentLookup(cloudServer);\n CloudApplicationURL cloudUrl = lookup.getCloudApplicationURL(url);\n String subdomain = cloudUrl.getSubdomain();\n String domain = cloudUrl.getDomain();\n if (subdomain != null) {\n applicationProperties.put(SUB_DOMAIN_PROP, subdomain);\n }\n if (domain != null) {\n applicationProperties.put(DOMAIN_PROP, domain);\n }\n }\n Staging staging = deploymentInfo.getStaging();\n if (staging != null && staging.getBuildpackUrl() != null) {\n applicationProperties.put(BUILDPACK_PROP, staging.getBuildpackUrl());\n }\n Map<Object, Object> services = new LinkedHashMap<Object, Object>();\n applicationProperties.put(SERVICES_PROP, services);\n List<CloudService> servicesToBind = deploymentInfo.getServices();\n if (servicesToBind != null) {\n for (CloudService service : servicesToBind) {\n String serviceName = service.getName();\n if (!services.containsKey(serviceName)) {\n if (containsServiceCreationDescription(service)) {\n Map<String, String> serviceDescription = new LinkedHashMap<String, String>();\n String label = service.getLabel();\n if (label != null) {\n serviceDescription.put(LABEL_PROP, label);\n }\n String version = service.getVersion();\n if (version != null) {\n serviceDescription.put(VERSION_PROP, version);\n }\n String plan = service.getPlan();\n if (plan != null) {\n serviceDescription.put(PLAN_PROP, plan);\n }\n String provider = service.getProvider();\n if (provider != null) {\n serviceDescription.put(PROVIDER_PROP, provider);\n }\n services.put(serviceName, serviceDescription);\n }\n }\n }\n }\n if (deploymentInfoYaml.isEmpty()) {\n return false;\n }\n DumperOptions options = new DumperOptions();\n options.setCanonical(false);\n options.setPrettyFlow(true);\n options.setDefaultFlowStyle(FlowStyle.BLOCK);\n Yaml yaml = new Yaml(options);\n String manifestValue = yaml.dump(deploymentInfoYaml);\n if (manifestValue == null) {\n throw CloudErrorUtil.toCoreException(\"String_Node_Str\" + appModule.getDeployedApplicationName() + \"String_Node_Str\" + deploymentInfoYaml);\n }\n OutputStream outStream = null;\n try {\n outStream = getOutStream();\n if (outStream == null) {\n throw CloudErrorUtil.toCoreException(\"String_Node_Str\" + relativePath + \"String_Node_Str\" + appModule.getDeployedApplicationName());\n }\n outStream.write(manifestValue.getBytes());\n outStream.flush();\n IProject project = CloudUtil.getProject(appModule);\n if (project != null) {\n project.refreshLocal(IResource.DEPTH_INFINITE, monitor);\n }\n return true;\n } catch (IOException io) {\n throw CloudErrorUtil.toCoreException(io);\n } finally {\n if (outStream != null) {\n try {\n outStream.close();\n } catch (IOException io) {\n }\n }\n }\n}\n"
"public boolean performOk() {\n for (int i = 0; i < bindingName.size(); i++) {\n try {\n String value = null;\n Text propertyText = (Text) propertyTextList.get(i);\n if (!propertyText.isDisposed() && propertyText.getText() != null && propertyText.getText().trim().length() > 0) {\n value = propertyText.getText().trim();\n Expression expr = new Expression(value, (String) propertyText.getData(DataUIConstants.EXPR_TYPE));\n if (ds instanceof DataSourceHandle)\n ((DataSourceHandle) ds).setPropertyBinding((String) bindingName.get(i), value);\n else if (ds instanceof DataSetHandle)\n ((DataSetHandle) ds).setPropertyBinding((String) bindingName.get(i), expr);\n } catch (SemanticException e) {\n logger.log(Level.FINE, e.getMessage(), e);\n }\n }\n return super.performOk();\n}\n"
"public void buildModObjectList() {\n ImmutableBiMap.Builder<ModContainer, Object> builder = ImmutableBiMap.<ModContainer, Object>builder();\n for (ModContainer mc : activeModList) {\n if (!mc.isImmutable()) {\n builder.put(mc, mc.getMod());\n }\n }\n modObjectList = builder.build();\n}\n"
"public void handleMessage(Message message) {\n if (message.what == PassphraseDialogFragment.MESSAGE_OKAY) {\n Intent finishIntent = new Intent();\n finishIntent.putExtra(OpenPgpConstants.PI_RESULT_PARAMS, params);\n RemoteServiceActivity.this.setResult(RESULT_OK, finishIntent);\n } else {\n setResult(RESULT_CANCELED);\n }\n finish();\n}\n"
"public int compare(Edge o1, Edge o2) {\n Integer o1Idx = (Integer) o1.getProperty(Properties.collection_index.name());\n Integer o2Idx = (Integer) o2.getProperty(Properties.collection_index.name());\n if (null == o1Idx && null == o2Idx)\n return 0;\n if (null == o1Idx)\n return -1;\n if (null == o2Idx)\n return 1;\n return o1Idx.compareTo(o2Idx);\n}\n"
"public FinishedBuildingResponse finishedBuilding(FinishedBuildingRequest request) throws TException {\n LOG.info(String.format(\"String_Node_Str\", request.getMinionId()));\n checkBuildId(request.getStampedeId());\n synchronized (lock) {\n Preconditions.checkArgument(request.isSetMinionId());\n Preconditions.checkArgument(request.isSetBuildExitCode());\n FinishedBuildingResponse response = new FinishedBuildingResponse();\n if (request.getBuildExitCode() != 0) {\n exitCode = request.getBuildExitCode();\n removeRunningMinion(request.getMinionId());\n response.setContinueBuilding(false);\n } else {\n allocator.finishedBuildingTargets(request.getMinionId());\n if (getExitCode().isDone()) {\n response.setContinueBuilding(false);\n } else {\n if (allocator.isBuildFinished()) {\n setBuildExitCode(0);\n response.setContinueBuilding(false);\n } else {\n response.setContinueBuilding(true);\n }\n }\n }\n return response;\n }\n}\n"
"protected boolean equalsAs(PossibleAction pa, boolean asOption) {\n if (pa == this)\n return true;\n if (!super.equalsAs(pa, asOption))\n return false;\n DiscardTrain action = (DiscardTrain) pa;\n boolean options = Objects.equal(this.getOwnedTrainTypes(), action.getOwnedTrainTypes()) && Objects.equal(this.forced, action.forced);\n if (asOption)\n return options;\n return options && Objects.equal(this.discardedTrain, action.discardedTrain);\n}\n"
"public static int getEmcValue(ItemStack stack) {\n if (stack == null) {\n return 0;\n }\n SimpleStack iStack = new SimpleStack(stack);\n if (!iStack.isValid()) {\n return 0;\n }\n if (!EMCMapper.mapContains(iStack) && ItemHelper.isDamageable(stack)) {\n iStack = iStack.withMeta(0);\n if (EMCMapper.mapContains(iStack)) {\n int emc = EMCMapper.getEmcValue(iStack);\n int relDamage = (stack.getMaxDamage() + 1 - stack.getItemDamage());\n if (relDamage <= 0) {\n return emc;\n }\n long result = emc * relDamage;\n if (result <= 0) {\n return emc;\n }\n result /= stack.getMaxDamage();\n result += getEnchantEmcBonus(stack);\n result += getStoredEMCBonus(stack);\n if (result > Integer.MAX_VALUE) {\n return emc;\n }\n if (result <= 0) {\n return 1;\n }\n return (int) result;\n }\n } else {\n if (EMCMapper.mapContains(iStack)) {\n return EMCMapper.getEmcValue(iStack) + getEnchantEmcBonus(stack) + (int) getStoredEMCBonus(stack);\n }\n }\n return 0;\n}\n"
"public void getBoundingBoxTest() {\n for (byte zoom = (byte) 0; zoom < 25; zoom++) {\n Tile tile1 = new Tile(0, 0, zoom, TILE_SIZE);\n if (zoom == 0) {\n Assert.assertTrue(tile1.getBoundingBox().equals(new BoundingBox(MercatorProjection.LATITUDE_MIN, -180, MercatorProjection.LATITUDE_MAX, 180)));\n }\n Tile tile2 = new Tile(0, 0, zoom, TILE_SIZE);\n Assert.assertEquals(tile1.getBoundingBox().maxLatitude, tile2.getBoundingBox().maxLatitude, 0.0001);\n Assert.assertEquals(tile1.getBoundingBox().minLongitude, tile2.getBoundingBox().minLongitude, 0.0001);\n if (zoom >= 1) {\n Tile tile3 = new Tile(1, 1, zoom, TILE_SIZE);\n Assert.assertEquals(tile1.getBelow().getBoundingBox().minLatitude, tile3.getBoundingBox().minLatitude, 0.0001);\n Assert.assertEquals(tile1.getRight().getBoundingBox().minLongitude, tile3.getBoundingBox().minLongitude, 0.0001);\n if (zoom == 1) {\n Assert.assertEquals(tile3.getBoundingBox().minLongitude, 0, 0.0001);\n Assert.assertEquals(tile3.getBoundingBox().maxLongitude, 180, 0.0001);\n }\n Assert.assertEquals(tile3.getBoundingBox(), Tile.getBoundingBox(tile3, tile3));\n }\n Tile tile4 = new Tile(0, 0, zoom, TILE_SIZE);\n Assert.assertEquals(tile1.getBoundingBox().maxLatitude, tile4.getBoundingBox().maxLatitude, 0.0001);\n Assert.assertEquals(tile1.getBoundingBox().minLongitude, tile4.getBoundingBox().minLongitude, 0.0001);\n Tile tile5 = new Tile(0, 0, zoom, TILE_SIZE);\n Assert.assertEquals(tile1.getBoundingBox().maxLatitude, tile5.getBoundingBox().maxLatitude, 0.0001);\n Assert.assertEquals(tile1.getBoundingBox().minLongitude, tile5.getBoundingBox().minLongitude, 0.0001);\n Assert.assertEquals(tile1.getBoundingBox(), Tile.getBoundingBox(tile1, tile1));\n Assert.assertEquals(tile2.getBoundingBox(), Tile.getBoundingBox(tile2, tile2));\n Assert.assertEquals(tile4.getBoundingBox(), Tile.getBoundingBox(tile4, tile4));\n Assert.assertEquals(tile4.getBoundingBox(), Tile.getBoundingBox(tile5, tile5));\n }\n}\n"
"public HitEnum buildHitEnum() throws IOException {\n HitEnum e = buildHitEnumForSource();\n e = weigher.wrap(context.fieldName, e);\n FieldOptions options = context.field.fieldOptions();\n if (!options.scoreOrdered()) {\n Boolean topScoring = (Boolean) executionContext.getOption(\"String_Node_Str\");\n if (topScoring == null || !topScoring) {\n return new WeightFilteredHitEnumWrapper(e, 0f);\n }\n }\n Map<String, Object> boostBefore = (Map<String, Object>) executionContext.getOption(\"String_Node_Str\");\n if (boostBefore != null) {\n TreeMap<Integer, Float> ordered = new TreeMap<Integer, Float>();\n for (Map.Entry<String, Object> entry : boostBefore.entrySet()) {\n if (!(entry.getValue() instanceof Number)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n ordered.put(Integer.valueOf(entry.getKey()), ((Number) entry.getValue()).floatValue());\n }\n PositionBoostingHitEnumWrapper boosting = new PositionBoostingHitEnumWrapper(e);\n e = boosting;\n for (Map.Entry<Integer, Float> entry : ordered.entrySet()) {\n boosting.add(entry.getKey(), entry.getValue());\n }\n }\n e = new WeightFilteredHitEnumWrapper(e, 0f);\n return e;\n}\n"
"public void watch(GameEvent event, Game game) {\n if (event.getType() == GameEvent.EventType.DECLARE_ATTACKERS_STEP_PRE) {\n Player activePlayer = game.getPlayer(game.getActivePlayerId());\n for (Permanent permanent : game.getBattlefield().getAllActivePermanents(activePlayer.getId())) {\n if (permanent.isCreature()) {\n for (UUID defender : game.getCombat().getDefenders()) {\n if (!defender.equals(activePlayer.getId())) {\n if (permanent.canAttack(defender, game)) {\n if (!game.getContinuousEffects().checkIfThereArePayCostToAttackBlockEffects(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, defender, permanent.getId(), permanent.getControllerId()), game)) {\n this.couldAttackThisTurnCreatures.add(new MageObjectReference(permanent.getId(), game));\n break;\n }\n }\n }\n }\n }\n }\n }\n}\n"
"public static Location parseLocationFromJsonObj(Map<String, Object> locationMap) {\n String country = Utils.getNullForEmptyString((String) locationMap.get(\"String_Node_Str\"));\n String state = Utils.getNullForEmptyString((String) locationMap.get(\"String_Node_Str\"));\n String county = Utils.getNullForEmptyString((String) locationMap.get(\"String_Node_Str\"));\n String city = Utils.getNullForEmptyString((String) locationMap.get(\"String_Node_Str\"));\n int id = Integer.parseInt((String) locationMap.get(\"String_Node_Str\"));\n double latitude = 0;\n double longitude = 0;\n if (locationMap.containsKey(\"String_Node_Str\"))\n latitude = Double.parseDouble((String) locationMap.get(\"String_Node_Str\"));\n if (locationMap.containsKey(\"String_Node_Str\"))\n longitude = Double.parseDouble((String) locationMap.get(\"String_Node_Str\"));\n int parentId = Integer.parseInt((String) locationMap.get(\"String_Node_Str\"));\n return new Location(country, state, county, city, latitude, longitude, id, parentId, true);\n}\n"
"public void openIndexTable(String tableName) throws BimserverDatabaseException {\n if (tables.containsKey(tableName)) {\n throw new BimserverDatabaseException(\"String_Node_Str\" + tableName + \"String_Node_Str\");\n }\n DatabaseConfig databaseConfig = new DatabaseConfig();\n databaseConfig.setAllowCreate(false);\n databaseConfig.setDeferredWrite(!(transactional && useTransactions));\n databaseConfig.setTransactional(transactional && useTransactions);\n databaseConfig.setSortedDuplicates(true);\n Database database = environment.openDatabase(null, tableName, databaseConfig);\n if (database == null) {\n throw new BimserverDatabaseException(\"String_Node_Str\" + tableName + \"String_Node_Str\");\n }\n tables.put(tableName, database);\n}\n"
"public static Image getRobonoboIconImage() {\n return GuiUtil.getImage(\"String_Node_Str\");\n}\n"
"public void onTextChanged(String s) {\n if (!isFinishing()) {\n mSlideshowEditor.changeText(mPosition, s);\n }\n}\n"
"public ShortPoint2D next() {\n return hasNext() ? waypoints[i++] : null;\n}\n"
"public void onStartMoving(StartMovingEvent startMove) {\n Entity et = startMove.getThisEntity();\n int agentID = et.get(AgentIdentifiers.class).agentID;\n GWVector pos = et.get(Position.class).position;\n GWVector dir = startMove.getDirection();\n et.get(Direction.class).direction = dir.getUnit();\n Movement move = et.get(Movement.class);\n move.moveType = startMove.getType();\n move.moveState = MovementState.Moving;\n GWVector futurePos = pos.add(dir.mul(0.001F * heartBeatInterval));\n for (Session session : lookupTable.getAllSessions()) {\n MovementView.sendChangeDirection(session, agentID, dir, move.moveType);\n MovementView.sendUpdateMovement(session, agentID, futurePos, move.moveType);\n }\n}\n"