content stringlengths 40 137k |
|---|
"private void processImports(Map imports) {\n if ((imports == null) || (imports.size() == 0) || !isProcessImports()) {\n return;\n }\n Iterator iter = imports.iterator();\n while (iter.hasNext()) {\n Import nextImport = (Import) iter.next();\n processImport(nextImport);\n }\n}\n"
|
"public static int openError(Shell parentShell, String title, String message, IStatus status, int displayMask) {\n RuntimeErrorDialog dialog = new RuntimeErrorDialog(parentShell, title, message, status, displayMask);\n return dialog.open();\n}\n"
|
"public EntityPlayer.EnumStatus sleepInCoffinAt(int x, int y, int z) {\n PlayerSleepInBedEvent event = new PlayerSleepInBedEvent(this.player, x, y, z);\n MinecraftForge.EVENT_BUS.post(event);\n if (event.result != null) {\n return event.result;\n }\n if (!this.player.worldObj.isRemote) {\n if (this.sleepingCoffin || !this.isTheEntityAlive()) {\n return EntityPlayer.EnumStatus.OTHER_PROBLEM;\n }\n if (!this.player.worldObj.provider.isSurfaceWorld()) {\n return EntityPlayer.EnumStatus.NOT_POSSIBLE_HERE;\n }\n if (!this.player.worldObj.isDaytime()) {\n return EntityPlayer.EnumStatus.NOT_POSSIBLE_NOW;\n }\n if (Math.abs(this.player.posX - (double) x) > 3.0D || Math.abs(this.player.posY - (double) y) > 2.0D || Math.abs(this.player.posZ - (double) z) > 3.0D) {\n return EntityPlayer.EnumStatus.TOO_FAR_AWAY;\n }\n double d0 = 8.0D;\n double d1 = 5.0D;\n List list = this.player.worldObj.getEntitiesWithinAABB(EntityMob.class, AxisAlignedBB.getBoundingBox((double) x - d0, (double) y - d1, (double) z - d0, (double) x + d0, (double) y + d1, (double) z + d0));\n if (!list.isEmpty()) {\n return EntityPlayer.EnumStatus.NOT_SAFE;\n }\n }\n if (this.player.isRiding()) {\n this.player.mountEntity((Entity) null);\n }\n Helper.Reflection.callMethod(Entity.class, this.player, Helper.Obfuscation.getPosNames(\"String_Node_Str\"), new Class[] { float.class, float.class }, new Object[] { 0.2F, 0.2F });\n this.player.yOffset = 0.2F;\n if (this.player.worldObj.blockExists(x, y, z)) {\n int direction = ((BlockCoffin) player.worldObj.getBlock(x, y, z)).getDirection(player.worldObj, x, y, z);\n float f1 = 0.5F;\n float f = 0.5F;\n switch(direction) {\n case 0:\n f = 0.9F;\n break;\n case 1:\n f1 = 0.1F;\n break;\n case 2:\n f = 0.1F;\n break;\n case 3:\n f1 = 0.9F;\n }\n this.func_71013_b(direction);\n this.player.setPosition((double) ((float) x + f1), (double) ((float) y + 0.9375F), (double) ((float) z + f));\n } else {\n this.player.setPosition((double) ((float) x + 0.5F), (double) ((float) y + 0.9375F), (double) ((float) z + 0.5F));\n }\n this.sleepingCoffin = true;\n this.sleeptimerCoffin = 0;\n this.player.playerLocation = new ChunkCoordinates(x, y, z);\n this.player.motionX = this.player.motionZ = this.player.motionY = 0.0D;\n if (!this.player.worldObj.isRemote) {\n }\n return EntityPlayer.EnumStatus.OK;\n}\n"
|
"public String getLabel() {\n switch(getType()) {\n case REFERENCED_PROJECT:\n return properties.get(EProperties.LABEL).toString();\n case REPOSITORY_ELEMENT:\n case SIMPLE_FOLDER:\n final ERepositoryObjectType objectType = getObjectType();\n if (objectType != null) {\n objectType.toString();\n }\n default:\n final ERepositoryObjectType contentType = getContentType();\n if (contentType != null) {\n if (\"String_Node_Str\".equals(contentType.toString())) {\n return getProperties(EProperties.LABEL).toString();\n }\n if (contentType.equals(ERepositoryObjectType.PROCESS)) {\n return getProperties(EProperties.LABEL).toString();\n }\n if (ERepositoryObjectType.TDQ_INDICATOR_ELEMENT.equals(contentType) || ERepositoryObjectType.TDQ_PATTERN_ELEMENT.equals(contentType) || ERepositoryObjectType.TDQ_RULES.equals(contentType)) {\n return getObject().getLabel();\n }\n return contentType.toString();\n }\n }\n return \"String_Node_Str\";\n}\n"
|
"public void onLoginSuccess(Map requestParamsMap, HttpServletRequest request, HttpServletResponse response, SSOToken ssoToken) {\n try {\n final String metaAlias = ssoToken.getProperty(SAML2Constants.METAALIAS);\n final String sessionIndex = ssoToken.getProperty(SAML2Constants.SESSION_INDEX);\n final String spEntityId = ssoToken.getProperty(SAML2Constants.SPENTITYID);\n final String idpEntityId = ssoToken.getProperty(SAML2Constants.IDPENTITYID);\n final String nameIdXML = ssoToken.getProperty(SAML2Constants.NAMEID);\n final NameID nameId = new NameIDImplWithoutSPNameQualifier(nameIdXML);\n final boolean isTransient = Boolean.parseBoolean(ssoToken.getProperty(Constants.IS_TRANSIENT));\n final String requestId = ssoToken.getProperty(Constants.REQUEST_ID);\n final NameIDInfo info = new NameIDInfo(spEntityId, idpEntityId, nameId, SAML2Constants.SP_ROLE, false);\n final String ssOutEnabled = ssoToken.getProperty(SAML2Constants.SINGLE_LOGOUT);\n if (Boolean.parseBoolean(ssOutEnabled)) {\n setupSingleLogOut(ssoToken, metaAlias, sessionIndex, spEntityId, idpEntityId, nameId);\n }\n configureIdpInitSLO(sessionProvider, ssoToken, sessionIndex, metaAlias, info, isTransient, requestId);\n configurePostSSO(spEntityId, realm, request, response, ssoToken, sessionProvider, data.getResponseInfo(), cacheKey);\n clearSession(ssoToken);\n } catch (SAML2Exception | SessionException | SSOException e) {\n DEBUG.warning(\"String_Node_Str\");\n }\n}\n"
|
"private void adicionaAgentes() {\n int i;\n int x = Constants.LARGURA_TELA / 2, y = Constants.ALTURA_TELA / 2;\n for (i = 0; i < 15; i++) {\n adicionaEntidade(new AgenteDummy(x, y, Constants.ENTIDADE_ENERGIA_INICIAL));\n adicionaEntidade(new AgenteInimigo(x, y, Constants.ENTIDADE_ENERGIA_INICIAL));\n }\n}\n"
|
"private void getAllKnownSubClasses(DotName name, Set<ClassInfo> allKnown, Set<DotName> subClassesToProcess, Set<DotName> processedClasses) {\n for (Index index : indexes) {\n final List<ClassInfo> list = index.getKnownDirectSubclasses(name);\n if (list != null) {\n for (final ClassInfo clazz : list) {\n final DotName className = clazz.name();\n if (!processedClasses.contains(className)) {\n allKnown.add(clazz);\n subClassesToProcess.add(className);\n }\n }\n }\n }\n}\n"
|
"protected void a() {\n super.a();\n this.datawatcher.a(12, new Integer(0));\n this.datawatcher.a(16, new Byte((byte) 0));\n this.datawatcher.a(18, new Byte((byte) 0));\n}\n"
|
"public void init(Config cfg, DataFlowOperation op, Map<Integer, List<Integer>> expectedIds) {\n this.executor = op.getTaskPlan().getThisExecutor();\n this.operation = op;\n this.sendPendingMax = MPIContext.sendPendingMax(cfg);\n this.reducedValues = new ArrayBlockingQueue<>(sendPendingMax);\n for (Map.Entry<Integer, List<Integer>> e : expectedIds.entrySet()) {\n Map<Integer, Queue<Object>> messagesPerTask = new HashMap<>();\n Map<Integer, Integer> countsPerTask = new HashMap<>();\n Map<Integer, Integer> totalCountsPerTask = new HashMap<>();\n for (int i : e.getValue()) {\n messagesPerTask.put(i, new ArrayBlockingQueue<>(sendPendingMax));\n countsPerTask.put(i, 0);\n totalCountsPerTask.put(i, 0);\n }\n LOG.fine(String.format(\"String_Node_Str\", executor, e.getKey(), e.getValue().toString()));\n messages.put(e.getKey(), messagesPerTask);\n counts.put(e.getKey(), countsPerTask);\n totalCounts.put(e.getKey(), totalCountsPerTask);\n }\n}\n"
|
"private <T> void patchAnnotatedCallable(AnnotatedCallable<T> callable, AnnotatedCallableImpl<T> newCallable, Map<AnnotatedParameter<T>, PatchInformation> parameterToPatchInfoMap) {\n List<AnnotatedParameter<T>> newParams = new ArrayList<AnnotatedParameter<T>>();\n for (AnnotatedParameter<? super T> parameter : callable.getParameters()) {\n PatchInformation patchInfo = parameterToPatchInfoMap.get(parameter);\n if (patchInfo != null) {\n Set<Annotation> annotations = new HashSet<Annotation>();\n if (patchInfo.mustAddInject()) {\n annotations.add(injectAnnotationLiteral);\n }\n if (patchInfo.getSyntheticQualifier() != null) {\n annotations.add(patchInfo.getSyntheticQualifier());\n Annotation skippedQualifier = patchInfo.getParameter().getAnnotation();\n for (Annotation annotation : parameter.getAnnotations()) {\n if (annotation != skippedQualifier) {\n annotations.add(annotation);\n }\n }\n } else {\n annotations.addAll(parameter.getAnnotations());\n }\n if (patchInfo.getAnnotation() != null) {\n annotations.add(patchInfo.getAnnotation());\n }\n newParams.add(new AnnotatedParameterImpl<T>(parameter, annotations, callable));\n } else {\n newParams.add(new AnnotatedParameterImpl<T>(parameter, newCallable));\n }\n }\n newCallable.setParameters(newParams);\n}\n"
|
"public static String getClassFromAnnotation(ForeignKeyReference annotation) {\n String clazz = null;\n if (annotation != null) {\n try {\n annotation.tableClass();\n } catch (MirroredTypeException mte) {\n clazz = mte.getTypeMirror().toString();\n }\n }\n return clazz;\n}\n"
|
"public void updateAllChunks() {\n for (int x = 0; x < Configuration.VIEWING_DISTANCE_IN_CHUNKS.x; x++) {\n for (int z = 0; z < Configuration.VIEWING_DISTANCE_IN_CHUNKS.y; z++) {\n Chunk c = getChunk(x, z);\n queueChunkForUpdate(c);\n }\n }\n}\n"
|
"public static void onSellItemCheck(PreTransactionEvent event) {\n if (event.isCancelled() || event.getTransactionType() != SELL) {\n return;\n }\n ItemStack[] stock = event.getStock();\n Inventory clientInventory = event.getClientInventory();\n if (isOwnerEconomicalyActive(event) && !Economy.hasEnough(event.getOwner().getName(), event.getPrice())) {\n event.setCancelled(SHOP_DOES_NOT_HAVE_ENOUGH_MONEY);\n return;\n }\n if (!hasItems(clientInventory, stock)) {\n event.setCancelled(NOT_ENOUGH_STOCK_IN_INVENTORY);\n }\n}\n"
|
"public void handleInterrupt(Console console, Action action) {\n if (action == Action.INTERRUPT) {\n console.getShell().out().println(\"String_Node_Str\");\n console.clearBufferAndDisplayPrompt();\n } else if (action == Action.IGNOREEOF) {\n console.getShell().out().println(\"String_Node_Str\");\n console.clearBufferAndDisplayPrompt();\n } else {\n try {\n CommandContainer exitCommand = registry.getCommand(\"String_Node_Str\", \"String_Node_Str\");\n console.getShell().out().println();\n exitCommand.getCommand().execute(new AeshCommandInvocation(ShellImpl.this.console, ControlOperator.NONE, null));\n } catch (CommandNotFoundException | IOException e) {\n log.log(Level.WARNING, \"String_Node_Str\", e);\n }\n }\n}\n"
|
"private JSONObject getProperties(Class<?> clazz) throws JSONException {\n Map<String, ParamMetadata> map = new HashMap<String, ParamMetadata>();\n JSONObject props = new JSONObject();\n if (clazz.isInterface()) {\n Object model = CompositeUtil.instance().getModel(clazz);\n clazz = model.getClass();\n }\n for (Class<?> ifaces : clazz.getInterfaces()) {\n for (Method m : ifaces.getDeclaredMethods()) {\n String methodName = m.getName();\n if (methodName.startsWith(\"String_Node_Str\")) {\n String propertyName = methodName.substring(3, 4).toLowerCase(Locale.getDefault()) + methodName.substring(4);\n map.put(propertyName, new ParamMetadata(context, m.getReturnType(), propertyName, m.getAnnotations()));\n }\n }\n }\n for (Map.Entry<String, ParamMetadata> entry : map.entrySet()) {\n props.put(entry.getKey(), entry.getValue().toJson());\n }\n return props;\n}\n"
|
"private boolean flockToDecentralize() {\n ShortPoint2D decentVector = grid.calcDecentralizeVector(position.x, position.y);\n EDirection randomDirection = direction.getNeighbor(MatchConstants.random().nextInt(-1, 1));\n int dx = randomDirection.gridDeltaX + decentVector.x;\n int dy = randomDirection.gridDeltaY + decentVector.y;\n if (ShortPoint2D.getOnGridDist(dx, dy) >= 2) {\n flockDelay = Math.max(flockDelay - 100, 500);\n return this.goInDirection(EDirection.getApproxDirection(0, 0, dx, dy), EGoInDirectionMode.GO_IF_ALLOWED_AND_FREE);\n } else {\n flockDelay = Math.min(flockDelay + 100, 1000);\n return false;\n }\n}\n"
|
"public Set<JCRUserNode> searchUsers(String newsletterUUID, SearchCriteria searchCriteria) {\n Set<JCRUserNode> notSubscribeUsers = new LinkedHashSet<JCRUserNode>();\n JCRNodeWrapper newsletter = getNodeByUUID(newsletterUUID, getCurrentUserSession(\"String_Node_Str\"));\n Set<JCRUserNode> searchResult = null;\n if (newsletter != null) {\n for (JCRUserNode user : searchResult) {\n try {\n if (subscriptionService.getSubscription(newsletter, user.getPath(), getCurrentUserSession(\"String_Node_Str\")) == null) {\n notSubscribeUsers.add(user);\n }\n } catch (RepositoryException e) {\n logger.warn(\"String_Node_Str\" + user.getName() + \"String_Node_Str\" + newsletterUUID);\n }\n }\n }\n return notSubscribeUsers;\n}\n"
|
"private void init() {\n if (resourceSet == null) {\n resourceSet = new ResourceSetImpl();\n }\n if (allItemRecords == null) {\n allItemRecords = new ArrayList<ItemRecord>();\n }\n allItemRecords.add(this);\n if (property == null) {\n property = (Property) EObjectHelper.retrieveEObject(getPropertyPath(), PropertiesPackage.eINSTANCE.getProperty());\n }\n if (element == null && !isJRXml()) {\n Resource resource = resourceSet.getResource(fileURI, true);\n EList<EObject> contents = resource.getContents();\n if (contents != null && !contents.isEmpty()) {\n if (property.getItem() instanceof ConnectionItem) {\n element = ((ConnectionItem) property.getItem()).getConnection();\n } else {\n EObject object = contents.get(0);\n if (object instanceof ModelElement) {\n element = (ModelElement) object;\n }\n }\n } catch (Exception e) {\n Log.warn(\"String_Node_Str\" + getName());\n }\n }\n computeDependencies();\n}\n"
|
"public boolean doCommand(ILayerCommand command) {\n if (!registered && context.getTable() != null) {\n registered = true;\n context.getTable().addControlListener(new ControlAdapter() {\n public void controlResized(ControlEvent arg0) {\n checkScrollBars();\n }\n });\n }\n return super.doCommand(command);\n}\n"
|
"public void postInit(FMLPostInitializationEvent event) {\n proxy.cape();\n crossBC = new CrossBuildcraft();\n CrossBigReactors.isRegistrationInOrder();\n crossIC2 = new CrossIndustrialCraft2();\n crossRailcraft = new CrossRailcraft();\n crossRF = new CrossRF();\n if (recipes.equalsIgnoreCase(\"String_Node_Str\")) {\n RecipesNew.addRecipes();\n }\n if (recipes.toLowerCase().equals(\"String_Node_Str\")) {\n logger.error(\"String_Node_Str\");\n RecipesOld.addOldRecipes();\n }\n if (recipes.toLowerCase().equals(\"String_Node_Str\")) {\n GregtechRecipes.addRecipes();\n logger.info(\"String_Node_Str\");\n }\n}\n"
|
"public void send(Datagram p) throws IOException {\n Payload pay = null;\n int dgRemPort = StringFunctions.getPortFromConnectorStr(p.getAddress());\n int dgRemAddr = dgRemPort > -1 ? StringFunctions.getAddrFromConnectorStr(p.getAddress()) : 0;\n while (true) {\n pay = UDP.preparePayload((short) dgRemPort, (short) localPort);\n if (pay != null)\n break;\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n UDPPacket.setData(pay, ((DatagramPacket) p).getBuffer(), 0, p.getLength());\n UDPPacket.setLength(pay, (short) pay.length);\n if (Debug.enabled)\n Debug.println(\"String_Node_Str\", Debug.DBG_UDP);\n IP.asyncSendPayload(pay, dgRemAddr, IP.PROT_UDP);\n}\n"
|
"public String toString() {\n return \"String_Node_Str\" + direction + \"String_Node_Str\" + mapsTos + \"String_Node_Str\";\n}\n"
|
"static List<CodeLocation> extractCodeLocations(String str) throws Exception {\n ArrayList<CodeLocation> back = new ArrayList<CodeLocation>();\n if (str == null) {\n return back;\n }\n Matcher m = finder.matcher(str);\n int offset = 0;\n int maxOffset = str.length() - 3;\n while (offset < maxOffset && m.find(offset)) {\n String n = m.group(2);\n int code = (n.length() == 0) ? 0 : Integer.parseInt(n);\n if (m.group(4) == null) {\n back.add(new CodeLocation(code, m.start(), m.end() - 1));\n } else {\n back.add(new CodeLocation(code, m.start(), m.start(4) - 1));\n back.add(new CodeLocation(Integer.parseInt(m.group(4)), m.start(4), m.end() - 1));\n }\n offset = m.end();\n }\n return back;\n}\n"
|
"protected double calculateNumericalVariance() {\n final double sh = getShape();\n final double sc = getScale();\n final double mn = getNumericalMean();\n return (sc * sc) * FastMath.exp(Gamma.logGamma(1 + (2 / sh))) - (mn * mn);\n}\n"
|
"public void listChanged(ListEvent listChanges) {\n ListEvent firstPass = new ListEvent(listChanges);\n ListEvent secondPass = listChanges;\n LinkedList removedValues = new LinkedList();\n while (firstPass.next()) {\n int changeIndex = firstPass.getIndex();\n int changeType = firstPass.getType();\n if (changeType == ListEvent.INSERT) {\n duplicatesList.add(changeIndex, TEMP_UNIQUE);\n } else if (changeType == ListEvent.UPDATE) {\n Object replaced = duplicatesList.get(changeIndex);\n if (replaced == UNIQUE) {\n if (changeIndex + 1 < duplicatesList.size() && duplicatesList.get(changeIndex + 1) == DUPLICATE) {\n duplicatesList.set(changeIndex, TEMP_UNIQUE);\n duplicatesList.set(changeIndex + 1, UNIQUE);\n replaced = null;\n }\n }\n } else if (changeType == ListEvent.DELETE) {\n Object deleted = duplicatesList.remove(changeIndex);\n if (deleted == UNIQUE) {\n if (changeIndex < duplicatesList.size() && duplicatesList.get(changeIndex) == DUPLICATE) {\n duplicatesList.set(changeIndex, UNIQUE);\n deleted = TEMP_UNIQUE;\n }\n }\n removedValues.addLast(deleted);\n }\n }\n updates.beginEvent();\n while (secondPass.next()) {\n int changeIndex = secondPass.getIndex();\n int changeType = secondPass.getType();\n if (changeType == ListEvent.INSERT) {\n int neighbourSide = handleOldNeighbour(changeIndex);\n if (neighbourSide != NEIGHBOUR_NONE) {\n enqueueEvent(ListEvent.UPDATE, duplicatesList.getCompressedIndex(changeIndex, true), false);\n } else {\n enqueueEvent(ListEvent.INSERT, duplicatesList.getCompressedIndex(changeIndex), true);\n }\n } else if (changeType == ListEvent.UPDATE) {\n Object updated = duplicatesList.get(changeIndex);\n boolean wasDuplicate = (updated == DUPLICATE);\n boolean hadDuplicate = (updated == TEMP_UNIQUE);\n boolean wasUnique = (updated == UNIQUE);\n boolean isUnique = !handleOldNeighbour(changeIndex);\n int compressedIndex = duplicatesList.getCompressedIndex(changeIndex, true);\n if (isUnique) {\n if (wasUnique) {\n enqueueEvent(ListEvent.UPDATE, compressedIndex, true);\n } else {\n if (wasDuplicate)\n enqueueEvent(ListEvent.UPDATE, compressedIndex - 1, false);\n enqueueEvent(ListEvent.INSERT, compressedIndex, true);\n if (hadDuplicate)\n enqueueEvent(ListEvent.UPDATE, compressedIndex + 1, false);\n }\n } else {\n if (wasUnique) {\n enqueueEvent(ListEvent.DELETE, compressedIndex, true);\n enqueueEvent(ListEvent.UPDATE, compressedIndex, false);\n } else {\n enqueueEvent(ListEvent.UPDATE, compressedIndex, false);\n if (compressedIndex + 1 < duplicatesList.getCompressedList().size())\n enqueueEvent(ListEvent.UPDATE, compressedIndex + 1, false);\n }\n }\n } else if (changeType == ListEvent.DELETE) {\n Object deleted = removedValues.removeFirst();\n int uncompressedIndex = -1;\n if (deleted == DUPLICATE)\n uncompressedIndex = changeIndex - 1;\n else\n uncompressedIndex = changeIndex;\n int deletedIndex = -1;\n if (uncompressedIndex < duplicatesList.size())\n deletedIndex = duplicatesList.getCompressedIndex(uncompressedIndex, true);\n else\n deletedIndex = duplicatesList.getCompressedList().size();\n if (deleted == UNIQUE) {\n enqueueEvent(ListEvent.DELETE, deletedIndex, true);\n } else {\n enqueueEvent(ListEvent.UPDATE, deletedIndex, false);\n }\n }\n }\n flushEnqueuedEvents();\n updates.commitEvent();\n}\n"
|
"public void actionPerformed(ActionEvent arg0) {\n NewAccountDialog.showNewAccountDialog();\n}\n"
|
"public void cmdPatReload(Context ctx) {\n boolean success = Bot.loadPatreonData();\n if (success) {\n ctx.send(Emotes.getSuccess() + \"String_Node_Str\").queue();\n } else {\n ctx.send(Emotes.getFailure() + \"String_Node_Str\");\n }\n}\n"
|
"protected Control createDialogArea(Composite parent) {\n endpoints = Arrays.asList(new String[] { Util.default_endpoint_address });\n parent.getShell().setText(this.title);\n Composite composite = (Composite) super.createDialogArea(parent);\n GridLayout layout = (GridLayout) composite.getLayout();\n layout.numColumns = 2;\n Label endpointsLabel = new Label(composite, SWT.NONE);\n endpointsLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n endpointsLabel.setText(\"String_Node_Str\");\n endpointsCombo = new Combo(composite, SWT.NONE);\n endpointsCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n ((GridData) endpointsCombo.getLayoutData()).widthHint = 400;\n for (Iterator<String> iter = endpoints.iterator(); iter.hasNext(); ) {\n String host = iter.next();\n endpointsCombo.add(host);\n }\n endpointsCombo.select(0);\n authenticationGroup = new Group(composite, SWT.NONE);\n authenticationGroup.setVisible(true);\n authenticationGroup.setText(\"String_Node_Str\");\n authenticationGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n authenticationGroup.setLayout(new GridLayout(2, false));\n Label usernameLabel = new Label(authenticationGroup, SWT.NONE);\n usernameLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n usernameLabel.setText(\"String_Node_Str\");\n userText = new Text(authenticationGroup, SWT.BORDER);\n userText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n userText.setDoubleClickEnabled(false);\n Label passwordLabel = new Label(authenticationGroup, SWT.NONE);\n passwordLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n passwordLabel.setText(\"String_Node_Str\");\n passwordText = new Text(authenticationGroup, SWT.PASSWORD | SWT.BORDER);\n passwordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n savePasswordButton = new Button(authenticationGroup, SWT.CHECK);\n savePasswordButton.setText(\"String_Node_Str\");\n savePasswordButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n if (Util.IsEnterPrise()) {\n Label universeLabel = new Label(composite, SWT.NONE);\n universeLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n universeLabel.setText(\"String_Node_Str\");\n universeCombo = new Combo(composite, SWT.NONE);\n universeCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n ((GridData) universeCombo.getLayoutData()).widthHint = 300;\n if (universes != null) {\n java.util.List<String> hostList = new ArrayList<String>();\n for (int i = 0; i < universes.size(); i++) {\n String host = universes.get(i).getPk();\n universeCombo.add(host);\n }\n universeCombo.select(0);\n }\n return composite;\n}\n"
|
"public boolean canChoose(UUID sourceControllerId, Game game) {\n return canChoose(null, sourceControllerId, game);\n}\n"
|
"public void testWithResolveId() throws Exception {\n IvyResolve resolve = new IvyResolve();\n resolve.setProject(project);\n resolve.setFile(new File(\"String_Node_Str\"));\n resolve.setResolveId(\"String_Node_Str\");\n resolve.execute();\n resolve = new IvyResolve();\n resolve.setProject(project);\n resolve.setFile(new File(\"String_Node_Str\"));\n resolve.execute();\n deliver.setResolveId(\"String_Node_Str\");\n deliver.setPubrevision(\"String_Node_Str\");\n deliver.setDeliverpattern(\"String_Node_Str\");\n deliver.execute();\n File deliveredIvyFile = new File(\"String_Node_Str\");\n assertTrue(deliveredIvyFile.exists());\n ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(), deliveredIvyFile.toURI().toURL(), true);\n assertEquals(ModuleRevisionId.newInstance(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), md.getModuleRevisionId());\n DependencyDescriptor[] dds = md.getDependencies();\n assertEquals(1, dds.length);\n assertEquals(ModuleRevisionId.newInstance(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), dds[0].getDependencyRevisionId());\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n logger.debug(\"String_Node_Str\");\n PrngFixes.apply();\n SharedPreferences prefs = LoadPrefsUtil.getPrefs(getBaseContext());\n prefs.registerOnSharedPreferenceChangeListener(prefsChangeListener);\n theme = LoadPrefsUtil.theme(prefs);\n setTheme(theme.resourceId());\n setContentView(R.layout.main);\n calcPubkeyFingerprints();\n showKeyFingerprints();\n ((TextView) findViewById(R.id.addressesLabel)).setText(String.format(\"String_Node_Str\", getText(R.string.ipAddrLabel), getText(R.string.ifacesLabel)));\n ((TextView) findViewById(R.id.portsLabel)).setText(String.format(\"String_Node_Str\", getText(R.string.protocolLabel), getText(R.string.portLabel), getText(R.string.state)));\n EventBus.getDefault().register(this);\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {\n View storageContainer = findViewById(R.id.storageContainer);\n ((ViewManager) storageContainer.getParent()).removeView(storageContainer);\n View safExplainHeading = findViewById(R.id.safExplainHeading);\n ((ViewManager) safExplainHeading.getParent()).removeView(safExplainHeading);\n View safExplain = findViewById(R.id.safExplain);\n ((ViewManager) storageContainer.getParent()).removeView(safExplain);\n }\n}\n"
|
"private DTMasterParams buildInitialMasterParams() {\n Map<Integer, TreeNode> todoNodes = new HashMap<Integer, TreeNode>(treeNum, 1.0f);\n int nodeIndexInGroup = 0;\n List<Integer> depthList = new ArrayList<Integer>();\n DTMasterParams masterParams = new DTMasterParams(trees, todoNodes);\n if (isRF) {\n for (int i = 0; i < this.treeNum; i++) {\n depthList.add(-1);\n }\n for (TreeNode treeNode : trees) {\n List<Integer> features = getSubsamplingFeatures(this.featureSubsetStrategy, this.featureSubsetRate);\n treeNode.setFeatures(features);\n todoNodes.put(nodeIndexInGroup, treeNode);\n int treeId = treeNode.getTreeId();\n int oldDepth = depthList.get(treeId);\n int currDepth = Node.indexToLevel(treeNode.getNode().getId());\n if (currDepth > oldDepth) {\n depthList.set(treeId, currDepth);\n }\n nodeIndexInGroup += 1;\n }\n masterParams.setTrees(this.trees);\n } else if (isGBDT) {\n depthList.add(-1);\n List<Integer> features = getSubsamplingFeatures(this.featureSubsetStrategy);\n TreeNode treeNode = trees.get(trees.size() - 1);\n treeNode.setFeatures(features);\n todoNodes.put(nodeIndexInGroup, treeNode);\n int oldDepth = depthList.get(0);\n int currDepth = Node.indexToLevel(treeNode.getNode().getId());\n if (currDepth > oldDepth) {\n depthList.set(0, currDepth);\n }\n nodeIndexInGroup += 1;\n masterParams.setContinuousRunningStart(this.isContinuousEnabled);\n masterParams.setSwitchToNextTree(true);\n masterParams.setFirstTree(this.trees.size() == 1);\n if (this.trees.size() > 0) {\n masterParams.setTrees(this.trees.subList(this.trees.size() - 1, this.trees.size()));\n }\n masterParams.setTmpTrees(this.trees);\n }\n masterParams.setTreeDepth(depthList);\n return masterParams;\n}\n"
|
"public void testMirrorOnYearDimension() throws DataException {\n ICubeQueryDefinition cqd = createMirroredQueryDefinition(\"String_Node_Str\");\n BirtCubeView cubeView = new BirtCubeView(new CubeQueryExecutor(null, cqd, de.getSession(), this.scope, de.getContext()), cube, null);\n CubeCursor dataCursor = cubeView.getCubeCursor(new StopSign(), cube, false);\n List rowEdgeBindingNames = new ArrayList();\n rowEdgeBindingNames.add(\"String_Node_Str\");\n rowEdgeBindingNames.add(\"String_Node_Str\");\n rowEdgeBindingNames.add(\"String_Node_Str\");\n rowEdgeBindingNames.add(\"String_Node_Str\");\n List columnEdgeBindingNames = new ArrayList();\n columnEdgeBindingNames.add(\"String_Node_Str\");\n List measureBindingNames = new ArrayList();\n measureBindingNames.add(\"String_Node_Str\");\n try {\n testOut.print(new CubeUtility().printCubeAlongEdge(dataCursor, columnEdgeBindingNames, rowEdgeBindingNames, measureBindingNames, null, null, null, null));\n this.checkOutputFile();\n } catch (Exception e) {\n fail(\"String_Node_Str\");\n }\n}\n"
|
"protected Path createDirectories(final String path) throws GenieException {\n Path result = null;\n try {\n final File pathFile = new File(new URI(path).getPath());\n final Path result = pathFile.toPath();\n if (!Files.exists(result)) {\n Files.createDirectories(result);\n }\n } catch (Exception e) {\n throw new GenieServerException(\"String_Node_Str\" + path, e);\n }\n return result;\n}\n"
|
"public void perform(Run<?, ?> run, FilePath filePath, Launcher launcher, TaskListener taskListener) throws InterruptedException, IOException {\n Map<String, String> envs = run instanceof AbstractBuild ? ((AbstractBuild) run).getBuildVariables() : Collections.<String, String>emptyMap();\n healthReports = createJacocoHealthReportThresholds();\n final PrintStream logger = taskListener.getLogger();\n FilePath[] matchedClassDirs = null;\n FilePath[] matchedSrcDirs = null;\n if (run.getResult() == Result.FAILURE || run.getResult() == Result.ABORTED) {\n return;\n }\n logger.println(\"String_Node_Str\");\n EnvVars env = run.getEnvironment(taskListener);\n env.overrideAll(envs);\n if ((execPattern == null) || (classPattern == null) || (sourcePattern == null)) {\n if (run.getResult().isWorseThan(Result.UNSTABLE)) {\n return;\n }\n logger.println(\"String_Node_Str\");\n run.setResult(Result.FAILURE);\n return;\n }\n logger.println(\"String_Node_Str\" + execPattern + \"String_Node_Str\" + classPattern + \"String_Node_Str\" + sourcePattern + \"String_Node_Str\" + \"String_Node_Str\");\n JacocoReportDir dir = new JacocoReportDir(run.getRootDir());\n if (run instanceof AbstractBuild) {\n execPattern = resolveFilePaths((AbstractBuild) run, taskListener, execPattern);\n }\n List<FilePath> matchedExecFiles = Arrays.asList(filePath.list(resolveFilePaths(run, taskListener, execPattern, env)));\n logger.println(\"String_Node_Str\" + execPattern + \"String_Node_Str\" + matchedExecFiles.size());\n logger.print(\"String_Node_Str\");\n dir.addExecFiles(matchedExecFiles);\n logger.print(\"String_Node_Str\" + Util.join(matchedExecFiles, \"String_Node_Str\"));\n matchedClassDirs = resolveDirPaths(filePath, taskListener, classPattern);\n logger.print(\"String_Node_Str\" + classPattern + \"String_Node_Str\");\n for (FilePath file : matchedClassDirs) {\n dir.saveClassesFrom(file);\n logger.print(\"String_Node_Str\" + file);\n }\n matchedSrcDirs = resolveDirPaths(filePath, taskListener, sourcePattern);\n logger.print(\"String_Node_Str\" + sourcePattern + \"String_Node_Str\");\n for (FilePath file : matchedSrcDirs) {\n dir.saveSourcesFrom(file);\n logger.print(\"String_Node_Str\" + file);\n }\n logger.println(\"String_Node_Str\");\n String[] includes = {};\n if (inclusionPattern != null) {\n includes = inclusionPattern.split(DIR_SEP);\n logger.println(\"String_Node_Str\" + Arrays.toString(includes));\n }\n String[] excludes = {};\n if (exclusionPattern != null) {\n excludes = exclusionPattern.split(DIR_SEP);\n logger.println(\"String_Node_Str\" + Arrays.toString(excludes));\n }\n final JacocoBuildAction action = JacocoBuildAction.load(run, healthReports, taskListener, dir, includes, excludes);\n action.getThresholds().ensureValid();\n logger.println(\"String_Node_Str\" + action.getThresholds());\n run.getActions().add(action);\n logger.println(\"String_Node_Str\");\n final CoverageReport result = action.getResult();\n if (result == null) {\n logger.println(\"String_Node_Str\");\n run.setResult(Result.FAILURE);\n } else {\n logger.println(\"String_Node_Str\" + result.getClassCoverage().getPercentage() + \"String_Node_Str\" + result.getMethodCoverage().getPercentage() + \"String_Node_Str\" + result.getLineCoverage().getPercentage() + \"String_Node_Str\" + result.getBranchCoverage().getPercentage() + \"String_Node_Str\" + result.getInstructionCoverage().getPercentage());\n result.setThresholds(healthReports);\n if (changeBuildStatus) {\n run.setResult(checkResult(action));\n }\n }\n return;\n}\n"
|
"public void testAttachDetachOrder(HasWidgets container, WidgetAdder adder) {\n HasWidgetsTester.testAll(new FormPanel());\n}\n"
|
"private <T> void convertToPrimitiveType(Class<T> primitiveType, final Class<T> wrapperType) {\n try {\n final Method parser = wrapperType.getMethod(\"String_Node_Str\" + capitalize(primitiveType.getName()), String.class);\n TypeConverter typeConverter = new TypeConverter() {\n public Object convert(String value, TypeLiteral<?> toType) {\n try {\n return parser.invoke(null, value);\n } catch (IllegalAccessException e) {\n throw new AssertionError(e);\n } catch (InvocationTargetException e) {\n throw new RuntimeException(e.getTargetException().getMessage());\n }\n }\n public String toString() {\n return \"String_Node_Str\" + wrapperType.getSimpleName() + \"String_Node_Str\";\n }\n };\n convertToClass(injector, wrapperType, typeConverter);\n } catch (NoSuchMethodException e) {\n throw new AssertionError(e);\n }\n}\n"
|
"private static double[] predict(BufferedReader input, DataOutputStream output, svm_model model, int predict_probability) throws IOException {\n int correct = 0;\n int total = 0;\n double error = 0, pvalue = 0;\n double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0;\n int svm_type = svm.svm_get_svm_type(model);\n int nr_class = svm.svm_get_nr_class(model);\n double[] prob_estimates = null;\n if (predict_probability == 1) {\n if (svm_type == svm_parameter.EPSILON_SVR || svm_type == svm_parameter.NU_SVR) {\n svm_predict.info(\"String_Node_Str\" + svm.svm_get_svr_probability(model) + \"String_Node_Str\");\n } else {\n int[] labels = new int[nr_class];\n svm.svm_get_labels(model, labels);\n prob_estimates = new double[nr_class];\n output.writeBytes(\"String_Node_Str\");\n for (int j = 0; j < nr_class; j++) output.writeBytes(\"String_Node_Str\" + labels[j]);\n output.writeBytes(\"String_Node_Str\");\n }\n }\n while (true) {\n String line = input.readLine();\n if (line == null)\n break;\n StringTokenizer st = new StringTokenizer(line, \"String_Node_Str\");\n double target = atof(st.nextToken());\n int m = st.countTokens() / 2;\n svm_node[] x = new svm_node[m];\n for (int j = 0; j < m; j++) {\n x[j] = new svm_node();\n x[j].index = atoi(st.nextToken());\n x[j].value = atof(st.nextToken());\n }\n double v;\n if (predict_probability == 1 && (svm_type == svm_parameter.C_SVC || svm_type == svm_parameter.NU_SVC)) {\n v = svm.svm_predict_probability(model, x, prob_estimates);\n output.writeBytes(v + \"String_Node_Str\");\n for (int j = 0; j < nr_class; j++) output.writeBytes(prob_estimates[j] + \"String_Node_Str\");\n output.writeBytes(\"String_Node_Str\");\n } else {\n v = svm.svm_predict(model, x);\n output.writeBytes(v + \"String_Node_Str\");\n }\n if (v == target)\n ++correct;\n error += (v - target) * (v - target);\n sumv += v;\n sumy += target;\n sumvv += v * v;\n sumyy += target * target;\n sumvy += v * target;\n ++total;\n }\n if (svm_type == svm_parameter.EPSILON_SVR || svm_type == svm_parameter.NU_SVR) {\n svm_predict.info(\"String_Node_Str\" + error / total + \"String_Node_Str\");\n svm_predict.info(\"String_Node_Str\" + ((total * sumvy - sumv * sumy) * (total * sumvy - sumv * sumy)) / ((total * sumvv - sumv * sumv) * (total * sumyy - sumy * sumy)) + \"String_Node_Str\");\n } else {\n svm_predict.info(\"String_Node_Str\" + (double) correct / total * 100 + \"String_Node_Str\" + correct + \"String_Node_Str\" + total + \"String_Node_Str\");\n System.out.println(total + \"String_Node_Str\" + correct + \"String_Node_Str\" + (double) 1 / nr_class + \"String_Node_Str\");\n BinomialTest btest = new BinomialTest();\n pvalue = btest.binomialTest(total, correct, (double) 0.5, AlternativeHypothesis.TWO_SIDED);\n }\n return new double[] { correct, total, pvalue };\n}\n"
|
"public synchronized boolean addNewKubernetesHost(String kubernetesGroupId, KubernetesHost kubernetesHost) throws InvalidKubernetesHostException, NonExistingKubernetesGroupException {\n if (kubernetesHost == null) {\n throw new InvalidKubernetesHostException(\"String_Node_Str\");\n }\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\" + kubernetesHost + \"String_Node_Str\" + kubernetesGroupId);\n }\n validateKubernetesHost(kubernetesHost);\n try {\n KubernetesGroup kubernetesGroupStored = getKubernetesGroup(kubernetesGroupId);\n if (kubernetesHostExists(kubernetesHost.getHostId())) {\n throw new InvalidKubernetesHostException(\"String_Node_Str\" + kubernetesHost.getHostId());\n }\n ArrayList<KubernetesHost> kubernetesHostArrayList = new ArrayList<KubernetesHost>(Arrays.asList(kubernetesGroupStored.getKubernetesHosts()));\n kubernetesHostArrayList.add(kubernetesHost);\n KubernetesHost[] kubernetesHostArray = new KubernetesHost[kubernetesHostArrayList.size()];\n KubernetesGroup clonedObj = SerializationUtils.clone(kubernetesGroupStored);\n clonedObj.setKubernetesHosts(kubernetesHostArrayList.toArray(kubernetesHostArray));\n RegistryManager.getInstance().persistKubernetesGroup(clonedObj);\n kubernetesGroupStored.setKubernetesHosts(kubernetesHostArrayList.toArray(kubernetesHostArray));\n if (log.isInfoEnabled()) {\n log.info(String.format(\"String_Node_Str\", kubernetesGroupStored.getGroupId()));\n }\n return true;\n } catch (Exception e) {\n throw new InvalidKubernetesHostException(e.getMessage(), e);\n }\n}\n"
|
"public static Object evaluateCompiledExpression(CompiledExpression expr, IResultIterator odiResult, Scriptable scope) throws DataException {\n if (expr instanceof ColumnReferenceExpression) {\n ColumnReferenceExpression colref = (ColumnReferenceExpression) expr;\n if (colref.isIndexed()) {\n int idx = colref.getColumnindex();\n if (idx == 0)\n return new Integer(index);\n else if (roObject != null)\n return roObject.getFieldValue(idx);\n else\n return null;\n } else {\n String name = colref.getColumnName();\n if (JSRowObject.ROW_POSITION.equals(name))\n return new Integer(odiResult.getCurrentResultIndex());\n else if (odiResult.getCurrentResult() != null)\n return odiResult.getCurrentResult().getFieldValue(name);\n else\n return null;\n }\n } else {\n Context cx = Context.enter();\n try {\n return expr.evaluate(cx, scope);\n } finally {\n Context.exit();\n }\n }\n}\n"
|
"public static Vector2m toVector2m(Vector3 o) {\n return new Vector2m(o.x, o.z);\n}\n"
|
"public void onUpdate() {\n super.onUpdate();\n if (!this.worldObj.isRemote) {\n if (ticksExisted > 400 || !this.worldObj.blockExists(((int) this.posX), ((int) this.posY), ((int) this.posZ))) {\n this.setDead();\n return;\n }\n if (getThrower() instanceof EntityPlayerMP) {\n EntityPlayerMP player = ((EntityPlayerMP) getThrower());\n for (int x = (int) (this.posX - 3); x <= this.posX + 3; x++) for (int y = (int) (this.posY - 3); y <= this.posY + 3; y++) for (int z = (int) (this.posZ - 3); z <= this.posZ + 3; z++) {\n Block block = this.worldObj.getBlock(x, y, z);\n if (block == Blocks.lava) {\n PlayerHelper.checkedReplaceBlock(player, x, y, z, Blocks.obsidian, 0);\n } else if (block == Blocks.flowing_lava) {\n PlayerHelper.checkedReplaceBlock(player, x, y, z, Blocks.cobblestone, 0);\n }\n this.worldObj.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, \"String_Node_Str\", 0.5F, 2.6F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.8F);\n }\n this.worldObj.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), \"String_Node_Str\", 0.5F, 2.6F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.8F);\n }\n if (this.isInWater()) {\n this.setDead();\n }\n if (this.posY > 128) {\n WorldInfo worldInfo = this.worldObj.getWorldInfo();\n worldInfo.setRaining(true);\n this.setDead();\n }\n }\n}\n"
|
"private static void configureLogging() {\n SysOutOverSLF4J.sendSystemOutAndErrToSLF4J();\n}\n"
|
"private void handleNewMessage(SessionEvent ev) {\n logger.debug(\"String_Node_Str\" + ev);\n String formattedMessage = ev.getMessage();\n logger.debug(\"String_Node_Str\" + formattedMessage);\n formattedMessage = processLinks(messageDecoder.decodeToHTML(formattedMessage));\n formattedMessage = formattedMessage.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n formattedMessage = formattedMessage.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n logger.debug(\"String_Node_Str\" + formattedMessage);\n Message newMessage = createMessage(formattedMessage, HTML_MIME_TYPE, DEFAULT_MIME_ENCODING, null);\n Contact sourceContact = opSetPersPresence.findContactByID(ev.getFrom());\n if (sourceContact == null) {\n logger.debug(\"String_Node_Str\" + ev.getFrom());\n sourceContact = opSetPersPresence.createVolatileContact(ev.getFrom());\n }\n MessageReceivedEvent msgReceivedEvt = new MessageReceivedEvent(newMessage, sourceContact, new Date());\n fireMessageEvent(msgReceivedEvt);\n}\n"
|
"public void setFactory(Factory factory) {\n if (factorySet) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n addFactory(factory, 0);\n factorySet = true;\n}\n"
|
"private void setAuthorAndCommitter(CommitCommand commitCommand) throws TeamException {\n final Date commitDate = new Date();\n final TimeZone timeZone = TimeZone.getDefault();\n final PersonIdent enteredAuthor = RawParseUtils.parsePersonIdent(author);\n final PersonIdent enteredCommitter = RawParseUtils.parsePersonIdent(committer);\n if (enteredAuthor == null)\n throw new TeamException(NLS.bind(CoreText.CommitOperation_errorParsingPersonIdent, author));\n if (enteredCommitter == null)\n throw new TeamException(NLS.bind(CoreText.CommitOperation_errorParsingPersonIdent, committer));\n PersonIdent authorIdent;\n if (repo.getRepositoryState().equals(RepositoryState.CHERRY_PICKING_RESOLVED)) {\n try (RevWalk rw = new RevWalk(repo)) {\n ObjectId cherryPickHead = repo.readCherryPickHead();\n authorIdent = rw.parseCommit(cherryPickHead).getAuthorIdent();\n } catch (IOException e) {\n Activator.logError(CoreText.CommitOperation_ParseCherryPickCommitFailed, e);\n throw new IllegalStateException(e);\n }\n } else {\n authorIdent = new PersonIdent(enteredAuthor, commitDate, timeZone);\n }\n final PersonIdent committerIdent = new PersonIdent(enteredCommitter, commitDate, timeZone);\n if (amending) {\n RepositoryUtil repoUtil = Activator.getDefault().getRepositoryUtil();\n RevCommit headCommit = repoUtil.parseHeadCommit(repo);\n if (headCommit != null) {\n final PersonIdent headAuthor = headCommit.getAuthorIdent();\n authorIdent = new PersonIdent(enteredAuthor, headAuthor.getWhen(), headAuthor.getTimeZone());\n }\n }\n commitCommand.setAuthor(authorIdent);\n commitCommand.setCommitter(committerIdent);\n}\n"
|
"private boolean isAnonymousThread(String url) {\n return url.contains(\"String_Node_Str\") || url.contains(\"String_Node_Str\") || url.contains(\"String_Node_Str\") || url.contains(\"String_Node_Str\");\n}\n"
|
"public void testWrite_dataExceedingMinBufferSize() throws IOException {\n final File file = folder.newFile();\n try (final RandomAccessFile raf = new RandomAccessFile(file, \"String_Node_Str\")) {\n final OutputStream os = NullOutputStream.NULL_OUTPUT_STREAM;\n final int bufferSize = 1;\n final RandomAccessFileManager manager = new RandomAccessFileManager(raf, file.getName(), os, bufferSize, null, null, true);\n final int size = bufferSize * 3 + 1;\n final byte[] data = new byte[size];\n manager.write(data);\n assertEquals(bufferSize * 3 + 1, raf.length());\n manager.flush();\n assertEquals(size, raf.length());\n }\n}\n"
|
"public void widgetSelected(SelectionEvent e) {\n Context ctx = CorePlugin.getContext();\n ctx.putProperty(Context.REPOSITORY_CONTEXT_KEY, loginComposite.getRepositoryContext());\n if (projectList.getSelectionCount() > 0) {\n String selection = projectList.getSelection()[0];\n if (selection != null && !selection.equals(\"String_Node_Str\")) {\n Project project = (Project) projectsMap.get(selection.toUpperCase());\n boolean flag = dialog.logIn(project);\n if (flag) {\n dialog.okPressed();\n }\n }\n }\n}\n"
|
"private static ModuleNeeded getModuleValue(final IProcess process, String moduleValue) {\n if (ContextParameterUtils.isContainContextParam(moduleValue)) {\n String var = ContextParameterUtils.getVariableFromCode(moduleValue);\n if (var != null) {\n IContext selectedContext = CorePlugin.getDefault().getRunProcessService().getSelectedContext();\n if (selectedContext == null) {\n selectedContext = process.getContextManager().getDefaultContext();\n }\n IContextParameter param = selectedContext.getContextParameter(var);\n if (param != null) {\n ModuleNeeded module = getModuleNeededForContextParam(param);\n return module;\n }\n }\n }\n return new ModuleNeeded(null, TalendTextUtils.removeQuotes(moduleValue), null, true);\n}\n"
|
"public void testHeadRequestConnectionIsNotClosed() throws Exception {\n Socket socket = new Socket(address.getAddress(), address.getPort());\n socket.setKeepAlive(true);\n socket.setSoTimeout(3000);\n OutputStream outputStream = socket.getOutputStream();\n outputStream.write(\"String_Node_Str\".getBytes(StandardCharsets.UTF_8));\n outputStream.write(\"String_Node_Str\".getBytes(StandardCharsets.UTF_8));\n outputStream.flush();\n BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8));\n int linesRead = 0;\n while (linesRead < 3) {\n String line = reader.readLine();\n System.out.println(line);\n linesRead++;\n }\n assertSocketIsConnected(socket);\n pw.print(\"String_Node_Str\");\n pw.print(\"String_Node_Str\");\n pw.flush();\n int read = reader.read();\n assertThat(read, greaterThan(-1));\n assertSocketIsConnected(socket);\n}\n"
|
"public <T> T fromJson(Type typeOfT, String json) throws ParseException {\n try {\n StringReader reader = new StringReader(json);\n JsonParser parser = new JsonParser(reader);\n JsonElement root = parser.parse();\n JsonDeserializer.Context context = new JsonDeserializationContext(navigatorFactory, deserializers, objectConstructor, typeAdapter);\n return (T) context.deserialize(typeOfT, root);\n } catch (TokenMgrError e) {\n throw new ParseException(\"String_Node_Str\" + json + \"String_Node_Str\", e);\n } catch (com.google.gson.parser.ParseException e) {\n throw new ParseException(\"String_Node_Str\" + json + \"String_Node_Str\", e);\n }\n}\n"
|
"void updateReportedVisibilityLocked() {\n if (appToken == null) {\n return;\n }\n int numInteresting = 0;\n int numVisible = 0;\n boolean nowGone = true;\n if (DEBUG_VISIBILITY)\n Log.v(TAG, \"String_Node_Str\" + this);\n final int N = allAppWindows.size();\n for (int i = 0; i < N; i++) {\n WindowState win = allAppWindows.get(i);\n if (win == startingWindow || win.mAppFreezing || win.mViewVisibility != View.VISIBLE) {\n continue;\n }\n if (DEBUG_VISIBILITY) {\n Log.v(TAG, \"String_Node_Str\" + win + \"String_Node_Str\" + win.isDrawnLw() + \"String_Node_Str\" + win.isAnimating());\n if (!win.isDrawnLw()) {\n Log.v(TAG, \"String_Node_Str\" + win.mSurface + \"String_Node_Str\" + win.mPolicyVisibility + \"String_Node_Str\" + win.mDrawPending + \"String_Node_Str\" + win.mCommitDrawPending + \"String_Node_Str\" + win.mAttachedHidden + \"String_Node_Str\" + (win.mAppToken != null ? win.mAppToken.hiddenRequested : false) + \"String_Node_Str\" + win.mAnimating);\n }\n }\n numInteresting++;\n if (win.isDrawnLw()) {\n if (!win.isAnimating()) {\n numVisible++;\n }\n nowGone = false;\n } else if (win.isAnimating()) {\n nowGone = false;\n }\n }\n boolean nowVisible = numInteresting > 0 && numVisible >= numInteresting;\n if (DEBUG_VISIBILITY)\n Log.v(TAG, \"String_Node_Str\" + this + \"String_Node_Str\" + numInteresting + \"String_Node_Str\" + numVisible);\n if (nowVisible != reportedVisible) {\n if (DEBUG_VISIBILITY)\n Log.v(TAG, \"String_Node_Str\" + this + \"String_Node_Str\" + nowVisible);\n reportedVisible = nowVisible;\n Message m = mH.obtainMessage(H.REPORT_APPLICATION_TOKEN_WINDOWS, nowVisible ? 1 : 0, nowGone ? 1 : 0, this);\n mH.sendMessage(m);\n }\n}\n"
|
"public void writeMarshallable(WireOut wire) {\n if (lastAcknowledgedIndexReplicated == null)\n lastAcknowledgedIndexReplicated = wire.newLongReference();\n wire.write(MetaDataField.wireType).object(wireType).writeAlignTo(8, 0).write(MetaDataField.writePosition).int64forBinding(0L, writePosition).write(MetaDataField.roll).typedMarshallable(this.roll).write(MetaDataField.indexing).typedMarshallable(this.indexing).write(MetaDataField.lastAcknowledgedIndexReplicated).int64forBinding(-1L, lastAcknowledgedIndexReplicated);\n wire.write(MetaDataField.recovery).typedMarshallable(recovery);\n wire.write(MetaDataField.deltaCheckpointInterval).int32(this.deltaCheckpointInterval);\n wire.padToCacheAlign();\n}\n"
|
"public void testMostSimilarPages() throws WikapidiaException, DaoException, ConfigurationException, ClassNotFoundException, IOException {\n Configurator c = new Configurator(new Configuration());\n LocalPageDao localPageDao = c.get(LocalPageDao.class);\n Language lang = Language.getByLangCode(\"String_Node_Str\");\n LuceneSearcher searcher = new LuceneSearcher(new LanguageSet(Arrays.asList(lang)), LuceneOptions.getDefaultOptions());\n ESAMetric esaMetric = new ESAMetric(lang, searcher, localPageDao);\n String string1 = \"String_Node_Str\";\n String string2 = \"String_Node_Str\";\n String string3 = \"String_Node_Str\";\n String string4 = \"String_Node_Str\";\n LocalPage page1 = localPageDao.getByTitle(lang, new Title(string1, lang), NameSpace.ARTICLE);\n LocalPage page2 = localPageDao.getByTitle(lang, new Title(string2, lang), NameSpace.ARTICLE);\n LocalPage page3 = localPageDao.getByTitle(lang, new Title(string3, lang), NameSpace.ARTICLE);\n LocalPage page4 = localPageDao.getByTitle(lang, new Title(string4, lang), NameSpace.ARTICLE);\n System.out.println(page3);\n SRResultList srResults = esaMetric.mostSimilar(page3, 10);\n for (SRResult srResult : srResults) {\n printResult(srResult);\n }\n System.out.println(Arrays.toString(srResults.getScoresAsFloat()));\n System.out.println(page4);\n SRResultList srResults2 = esaMetric.mostSimilar(page4, 10, true);\n for (SRResult srResult : srResults2) {\n printResult(srResult);\n }\n System.out.println(Arrays.toString(srResults2.getScoresAsFloat()));\n String[] testPhrases = { string3, string4 };\n for (int i = 0; i < testPhrases.length; i++) {\n for (int j = i + 1; j < testPhrases.length; j++) {\n SRResult srResult = esaMetric.similarity(testPhrases[i], testPhrases[j], lang, true);\n System.out.println(testPhrases[i] + \"String_Node_Str\" + testPhrases[j] + \"String_Node_Str\");\n printResult(srResult);\n }\n }\n LocalPage[] testPages = { page3, page4 };\n for (int i = 0; i < testPages.length; i++) {\n for (int j = i + 1; j < testPages.length; j++) {\n SRResult srResult = esaMetric.similarity(testPages[i], testPages[j], true);\n System.out.println(testPages[i].getTitle().getCanonicalTitle() + \"String_Node_Str\" + testPages[j].getTitle().getCanonicalTitle() + \"String_Node_Str\");\n printResult(srResult);\n }\n }\n}\n"
|
"private GraphNode<InstallArtifact> createPlanGraph(ArtifactIdentity artifactIdentity, ArtifactStorage artifactStorage, PlanDescriptor planDescriptor, String repositoryName) throws DeploymentException {\n StandardPlanInstallArtifact planInstallArtifact;\n planInstallArtifact = new StandardPlanInstallArtifact(artifactIdentity, planDescriptor.getAtomic(), planDescriptor.getScoped(), artifactStorage, new StandardArtifactStateMonitor(this.bundleContext), this.scopeServiceRepository, this.scopeFactory, this.eventLogger, this.refreshHandler, repositoryName, planDescriptor.getArtifactSpecifications());\n return constructAssociatedGraphNode(planInstallArtifact);\n}\n"
|
"public boolean shouldHandle(ItemStack stack) {\n if (items.contains(stack.getItem())) {\n return true;\n }\n Class<?> c = stack.getItem().getClass();\n while (c != Item.class) {\n if (items.contains(c)) {\n return true;\n }\n c = c.getSuperclass();\n }\n return false;\n}\n"
|
"public void map(Text key, Text value, Context context) throws IOException, InterruptedException {\n long cuboidID = rowKeySplitter.split(key.getBytes(), key.getBytes().length);\n Cuboid cuboid = Cuboid.findById(cubeDesc, cuboidID);\n SplittedBytes[] splittedByteses = rowKeySplitter.getSplitBuffers();\n int bufOffset = 0;\n BytesUtil.writeLong(cuboidID, newKeyBuf, bufOffset, RowConstants.ROWKEY_CUBOIDID_LEN);\n bufOffset += RowConstants.ROWKEY_CUBOIDID_LEN;\n for (int i = 0; i < cuboid.getColumns().size(); ++i) {\n TblColRef col = cuboid.getColumns().get(i);\n if (this.checkNeedMerging(col)) {\n DictionaryManager dictMgr = DictionaryManager.getInstance(config);\n Dictionary<?> sourceDict = dictMgr.getDictionary(sourceCubeSegment.getDictResPath(col));\n Dictionary<?> mergedDict = dictMgr.getDictionary(mergedCubeSegment.getDictResPath(col));\n while (sourceDict.getSizeOfValue() > newKeyBuf.length - bufOffset || mergedDict.getSizeOfValue() > newKeyBuf.length - bufOffset) {\n byte[] oldBuf = newKeyBuf;\n newKeyBuf = new byte[2 * newKeyBuf.length];\n System.arraycopy(oldBuf, 0, newKeyBuf, 0, oldBuf.length);\n }\n int idInSourceDict = BytesUtil.readUnsigned(splittedByteses[i + 1].value, 0, splittedByteses[i + 1].length);\n int size = sourceDict.getValueBytesFromId(idInSourceDict, newKeyBuf, bufOffset);\n if (size < 0) {\n idInMergedDict = mergedDict.nullId();\n } else {\n idInMergedDict = mergedDict.getIdFromValueBytes(newKeyBuf, bufOffset, size);\n }\n BytesUtil.writeUnsigned(idInMergedDict, newKeyBuf, bufOffset, mergedDict.getSizeOfId());\n bufOffset += mergedDict.getSizeOfId();\n } else {\n while (splittedByteses[i + 1].length > newKeyBuf.length - bufOffset) {\n byte[] oldBuf = newKeyBuf;\n newKeyBuf = new byte[2 * newKeyBuf.length];\n System.arraycopy(oldBuf, 0, newKeyBuf, 0, oldBuf.length);\n }\n System.arraycopy(splittedByteses[i + 1].value, 0, newKeyBuf, bufOffset, splittedByteses[i + 1].length);\n bufOffset += splittedByteses[i + 1].length;\n }\n }\n byte[] newKey = Arrays.copyOf(newKeyBuf, bufOffset);\n outputKey.set(newKey, 0, newKey.length);\n context.write(outputKey, value);\n}\n"
|
"public void shouldCreatePillRegimenRequest() {\n TreatmentAdvice treatmentAdvice = new TreatmentAdvice();\n treatmentAdvice.setPatientId(\"String_Node_Str\");\n controller.create(treatmentAdvice, uiModel);\n verify(requestMapper).map(treatmentAdvice);\n verify(pillReminderService).createNew(any(DailyPillRegimenRequest.class));\n}\n"
|
"public Object start(IApplicationContext context) throws Exception {\n Display display = PlatformUI.createDisplay();\n boolean inuse = false;\n try {\n Shell shell = new Shell(display, SWT.ON_TOP);\n if (checkUnSupportJavaVersion(shell)) {\n shell.dispose();\n return EXIT_OK;\n }\n inuse = !acquireWorkspaceLock(shell);\n if (inuse) {\n MessageDialog.openError(shell, Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n shell.dispose();\n return EXIT_OK;\n }\n CoreRepositoryPlugin.getDefault().setRCPMode();\n checkBrowserSupport();\n if (!ArrayUtils.contains(Platform.getApplicationArgs(), EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND) && !Boolean.parseBoolean(System.getProperty(\"String_Node_Str\"))) {\n openLicenseAndRegister(shell);\n }\n IMigrationToolService service = (IMigrationToolService) GlobalServiceRegister.getDefault().getService(IMigrationToolService.class);\n service.executeWorspaceTasks();\n boolean logUserOnProject = logUserOnProject(display.getActiveShell(), inuse);\n try {\n if (!logUserOnProject) {\n context.applicationRunning();\n return EXIT_OK;\n }\n } finally {\n shell.dispose();\n }\n if (System.getProperty(org.eclipse.equinox.app.IApplicationContext.EXIT_DATA_PROPERTY) != null) {\n return IApplication.EXIT_RELAUNCH;\n }\n boolean afterUpdate = false;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreTisService.class)) {\n ICoreTisService tisService = (ICoreTisService) GlobalServiceRegister.getDefault().getService(ICoreTisService.class);\n afterUpdate = tisService.needRestartAfterUpdate();\n }\n if (LoginComposite.isRestart) {\n if (afterUpdate) {\n EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand(EclipseCommandLine.TALEND_RELOAD_COMMAND, Boolean.TRUE.toString(), false);\n EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand(EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND, null, true);\n return IApplication.EXIT_RELAUNCH;\n }\n return IApplication.EXIT_RESTART;\n }\n IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);\n if (brandingService.isPoweredbyTalend()) {\n IPreferenceStore store = PlatformUI.getPreferenceStore();\n store.putValue(IWorkbenchPreferenceConstants.PRESENTATION_FACTORY_ID, \"String_Node_Str\");\n }\n int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());\n if (returnCode == PlatformUI.RETURN_RESTART) {\n EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand(EclipseCommandLine.TALEND_RELOAD_COMMAND, Boolean.FALSE.toString(), false);\n EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand(EclipseCommandLine.TALEND_PROJECT_TYPE_COMMAND, null, true);\n EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand(EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND, null, true, true);\n if (Platform.inDevelopmentMode()) {\n return IApplication.EXIT_RESTART;\n }\n return IApplication.EXIT_RELAUNCH;\n } else {\n return IApplication.EXIT_OK;\n }\n } finally {\n display.dispose();\n if (!inuse) {\n releaseWorkspaceLock();\n }\n }\n}\n"
|
"public V get(int index) {\n return pairs.get(index).getValue();\n}\n"
|
"protected Model getModelTemplate() {\n return storage.read(0);\n}\n"
|
"public void zoom(double s) {\n if (myFrustum.orthographic) {\n myFrustum.fieldHeight *= s;\n myFrustum.top *= s;\n myFrustum.bottom *= s;\n myFrustum.left *= s;\n myFrustum.right *= s;\n computeProjectionMatrix();\n } else {\n Vector3d reye = new Vector3d();\n Point3d eye = getEye();\n synchronized (viewMatrix) {\n reye.sub(eye, myViewState.myCenter);\n reye.transform(viewMatrix);\n reye.x = reye.y = 0;\n reye.inverseTransform(viewMatrix);\n }\n eye.scaledAdd(s - 1, reye);\n setEyeToWorld(eye, myViewState.myCenter, getActualUpVector());\n }\n repaint();\n}\n"
|
"private void performGenetic(ProjectEGFile file, MLDataSet trainingData) {\n InputGenetic dialog = new InputGenetic();\n if (dialog.process()) {\n final int populationSize = dialog.getPopulationSize().getValue();\n final double mutationPercent = dialog.getMutationPercent().getValue();\n final double percentToMate = dialog.getPercentToMate().getValue();\n CalculateScore score = new TrainingSetScore(trainingData);\n final MLTrain train = new NeuralGeneticAlgorithm((BasicNetwork) file.getObject(), new RangeRandomizer(-1, 1), score, populationSize, mutationPercent, percentToMate);\n startup(file, train, dialog.getMaxError().getValue() / 100.0);\n }\n}\n"
|
"public AbstractScope<?, ?> getClosestHoistScope() {\n for (int i = scopeRoots.size(); i > 0; i--) {\n if (isHoistScopeRootNode(scopeRoots.get(i - 1))) {\n return instantiateScopes(i);\n }\n }\n return scopes.peek().getClosestHoistScope();\n}\n"
|
"public void onTrackException(AudioPlayer player, AudioTrack track, FriendlyException exception) {\n if (track.getUserData() != null) {\n try {\n track.getUserData(ExtraTrackInfo.class).textChannel.sendMessage(\"String_Node_Str\" + exception.getMessage()).queue();\n } catch (PermissionException ignored) {\n }\n }\n}\n"
|
"public final void refresh() {\n if (dataManager != null) {\n try {\n geofencesLock.writeLock().lock();\n groupGeofencesLock.writeLock().lock();\n deviceGeofencesLock.writeLock().lock();\n try {\n geofences.clear();\n for (Geofence geofence : dataManager.getGeofences()) {\n geofences.put(geofence.getId(), geofence);\n }\n userGeofences.clear();\n for (GeofencePermission geofencePermission : dataManager.getGeofencePermissions()) {\n getUserGeofencesIds(geofencePermission.getUserId()).add(geofencePermission.getGeofenceId());\n }\n groupGeofences.clear();\n for (GroupGeofence groupGeofence : dataManager.getGroupGeofences()) {\n getGroupGeofences(groupGeofence.getGroupId()).add(groupGeofence.getGeofenceId());\n }\n deviceGeofences.clear();\n deviceGeofencesWithGroups.clear();\n for (DeviceGeofence deviceGeofence : dataManager.getDeviceGeofences()) {\n getDeviceGeofences(deviceGeofences, deviceGeofence.getDeviceId()).add(deviceGeofence.getGeofenceId());\n getDeviceGeofences(deviceGeofencesWithGroups, deviceGeofence.getDeviceId()).add(deviceGeofence.getGeofenceId());\n }\n for (Device device : dataManager.getAllDevicesCached()) {\n Group group = dataManager.getGroupById(device.getGroupId());\n while (group != null) {\n getDeviceGeofences(deviceGeofencesWithGroups, device.getId()).addAll(getGroupGeofences(group.getGroupId()));\n group = dataManager.getGroupById(group.getGroupId());\n }\n List<Long> deviceGeofenceIds = device.getGeofenceIds();\n if (deviceGeofenceIds == null) {\n deviceGeofenceIds = new ArrayList<Long>();\n } else {\n deviceGeofenceIds.clear();\n }\n Position lastPosition = Context.getConnectionManager().getLastPosition(device.getId());\n if (lastPosition != null && deviceGeofencesWithGroups.containsKey(device.getId())) {\n for (Long geofenceId : deviceGeofencesWithGroups.get(device.getId())) {\n if (getGeofence(geofenceId).getGeometry().containsPoint(lastPosition.getLatitude(), lastPosition.getLongitude())) {\n deviceGeofenceIds.add(geofenceId);\n }\n }\n }\n device.setGeofenceIds(deviceGeofenceIds);\n }\n } finally {\n geofencesLock.writeLock().unlock();\n groupGeofencesLock.writeLock().unlock();\n deviceGeofencesLock.writeLock().unlock();\n }\n } catch (SQLException error) {\n Log.warning(error);\n }\n }\n}\n"
|
"private void setWalkStartPoints(Repository db, AnyObjectId headId) {\n try {\n if (store.getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ALL_BRANCHES)) {\n markStartAllRefs(Constants.R_HEADS);\n markStartAllRefs(Constants.R_REMOTES);\n markStartAllRefs(Constants.R_TAGS);\n } else\n currentWalk.markStart(currentWalk.parseCommit(headId));\n } catch (IOException e) {\n throw new IllegalStateException(NLS.bind(UIText.GitHistoryPage_errorSettingStartPoints, Activator.getDefault().getRepositoryUtil().getRepositoryName(db)), e);\n }\n}\n"
|
"public void testDelegatesToValue2() {\n String contents = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n String toFind = \"String_Node_Str\";\n int offset = contents.lastIndexOf(toFind);\n assertType(contents, offset, offset + toFind.length(), \"String_Node_Str\");\n}\n"
|
"public String embedOTObject(OTObject obj, OTViewEntry viewEntry) {\n OTView view = viewFactory.getView(obj, OTPrintDimension.class);\n if (view == null) {\n view = viewFactory.getView(obj, OTJComponentView.class);\n }\n if (view instanceof OTXHTMLView) {\n String objectText = ((OTXHTMLView) view).getXHTMLText(obj);\n return objectText;\n }\n view = getOTJComponentView(obj, null, viewEntry);\n JComponent comp = ((OTJComponentView) view).getComponent(obj);\n Dimension printDim = null;\n if (view instanceof OTPrintDimension) {\n OTPrintDimension dimView = (OTPrintDimension) view;\n printDim = dimView.getPrintDimension(obj, containerDisplayWidth, containerDisplayHeight);\n }\n if (printDim != null) {\n comp.setSize(printDim);\n } else {\n Dimension dim2 = comp.getPreferredSize();\n if (dim2.width == 0)\n dim2.width = 1;\n if (dim2.height == 0)\n dim2.height = 1;\n comp.setSize(dim2);\n }\n String url = embedComponent(comp, 1, 1, obj);\n url = \"String_Node_Str\" + url + \"String_Node_Str\";\n return url;\n}\n"
|
"private boolean addEdgeAttributes(EdgeDraft edge, String prefix, ArrayList list) {\n boolean ret = true;\n for (int i = 0; i < list.size(); i += 2) {\n String key = (String) list.get(i);\n Object value = list.get(i + 1);\n if (\"String_Node_Str\".equals(key) || \"String_Node_Str\".equals(key) || \"String_Node_Str\".equals(key) || \"String_Node_Str\".equals(key) || \"String_Node_Str\".equals(key)) {\n continue;\n }\n if (value instanceof ArrayList) {\n ret = addEdgeAttributes(edge, prefix + \"String_Node_Str\" + key, (ArrayList) value);\n if (!ret) {\n break;\n }\n } else if (\"String_Node_Str\".equals(key)) {\n if (value instanceof Double) {\n EdgeDraft.EdgeType type = ((Double) value) == 1 ? EdgeDraft.EdgeType.DIRECTED : EdgeDraft.EdgeType.UNDIRECTED;\n edge.setType(type);\n } else {\n report.logIssue(new Issue(NbBundle.getMessage(ImporterGML.class, \"String_Node_Str\", edge.toString()), Issue.Level.WARNING));\n }\n } else {\n AttributeTable edgeClass = container.getAttributeModel().getEdgeTable();\n AttributeColumn column = null;\n if ((column = edgeClass.getColumn(key)) == null) {\n column = edgeClass.addColumn(key, AttributeType.STRING);\n report.log(\"String_Node_Str\" + column.getTitle() + \"String_Node_Str\" + column.getType() + \"String_Node_Str\");\n }\n edge.addAttributeValue(column, value.toString());\n }\n }\n return ret;\n}\n"
|
"public void update(int newTargetIdx, int newOptimalIdx) {\n this.optimalIdx = newOptimalIdx;\n int oldTargetIdx = this.targetIdx;\n if (oldTargetIdx == newTargetIdx) {\n return;\n }\n if (logger.isInfoEnabled()) {\n MediaStreamTrackDesc sourceTrack = weakSource.get();\n if (sourceTrack != null) {\n RTPEncodingDesc[] sourceEncodings = sourceTrack.getRTPEncodings();\n if (!ArrayUtils.isNullOrEmpty(sourceEncodings)) {\n long ssrc = sourceEncodings[0].getPrimarySSRC();\n logger.info(\"String_Node_Str\" + ssrc + \"String_Node_Str\" + newTargetIdx + \"String_Node_Str\" + oldTargetIdx);\n }\n }\n }\n this.targetIdx = newTargetIdx;\n if (newTargetIdx < 0) {\n context = dropState;\n } else {\n MediaStreamTrackDesc sourceTrack = weakSource.get();\n if (sourceTrack == null) {\n return;\n }\n int currentTL0Idx = transformState.currentIdx;\n if (currentTL0Idx > -1) {\n currentTL0Idx = sourceTrack.getRTPEncodings()[currentTL0Idx].getBaseLayer().getIndex();\n }\n RTPEncodingDesc targetTL0 = sourceTrack.getRTPEncodings()[newTargetIdx].getBaseLayer();\n if (currentTL0Idx != targetTL0.getIndex()) {\n ((RTPTranslatorImpl) sourceTrack.getMediaStreamTrackReceiver().getStream().getRTPTranslator()).getRtcpFeedbackMessageSender().sendFIR((int) targetTL0.getPrimarySSRC());\n }\n }\n}\n"
|
"private boolean runFilterOnPost(JDFeedMeFeed feed, JDFeedMePost post, String post_description) {\n if (!feed.getDoFilters())\n return true;\n if (feed.getFiltersearchtitle() || feed.getFiltersearchdesc()) {\n FilterChecker filter = new FilterChecker(feed.getFilters());\n if (feed.getFiltersearchtitle()) {\n if (filter.match(post.getTitle())) {\n if (JDFeedMe.VERBOSE)\n logger.info(\"String_Node_Str\" + post.getTitle() + \"String_Node_Str\");\n return true;\n }\n }\n if (feed.getFiltersearchdesc()) {\n if (filter.match(post_description)) {\n logger.info(\"String_Node_Str\" + post_description + \"String_Node_Str\");\n return true;\n }\n }\n }\n return false;\n}\n"
|
"private String updateFieldsString(HashMap<String, Object> data) {\n String query = \"String_Node_Str\", suffix = \"String_Node_Str\";\n int i = 1;\n Iterator<Entry<String, Object>> it = data.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<String, Object> pairs = it.next();\n if (i == data.size()) {\n suffix = \"String_Node_Str\";\n }\n Object val = pairs.getValue();\n String valstr = null;\n if (val instanceof Date) {\n val = new Timestamp(((Date) val).getTime());\n }\n if (val == null) {\n valstr = \"String_Node_Str\";\n } else {\n valstr = \"String_Node_Str\" + val.toString().replaceAll(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\";\n }\n query += \"String_Node_Str\" + pairs.getKey() + \"String_Node_Str\" + valstr + suffix;\n i++;\n }\n return query;\n}\n"
|
"public void run() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n try {\n Animator animator = ViewAnimationUtils.createCircularReveal(mLoadingBack, mLoadingBack.getWidth() / 2, mLoadingBack.getHeight() / 2, mLoadingBack.getWidth(), 0);\n animator.setDuration(500);\n animator.setInterpolator(new AccelerateDecelerateInterpolator());\n animator.addListener(new Animator.AnimatorListener() {\n\n public void onAnimationStart(Animator animation) {\n }\n public void onAnimationEnd(Animator animation) {\n mLoadingBack.setVisibility(View.GONE);\n }\n public void onAnimationCancel(Animator animation) {\n }\n public void onAnimationRepeat(Animator animation) {\n }\n });\n } else\n YoYo.with(Techniques.SlideOutUp).playOn(mLoadingBack);\n loading = false;\n}\n"
|
"public void downloadTemplateToStorage(DataObject template, AsyncCompletionCallback<DownloadAnswer> callback) {\n if (template != null) {\n long templateId = template.getId();\n DataStore store = template.getDataStore();\n if (isTemplateUpdateable(templateId, store.getId())) {\n if (template.getUri() != null) {\n initiateTemplateDownload(template, callback);\n } else {\n s_logger.info(\"String_Node_Str\");\n DownloadAnswer ans = new DownloadAnswer(\"String_Node_Str\", Status.UNKNOWN);\n callback.complete(ans);\n }\n } else {\n s_logger.info(\"String_Node_Str\");\n DownloadAnswer ans = new DownloadAnswer(\"String_Node_Str\", Status.UNKNOWN);\n callback.complete(ans);\n }\n } else {\n s_logger.info(\"String_Node_Str\");\n DownloadAnswer ans = new DownloadAnswer(\"String_Node_Str\", Status.UNKNOWN);\n callback.complete(ans);\n }\n}\n"
|
"private void putGridIntoCanonical_horizontal(int numRows, int numCols) {\n DetectAsymmetricCircleGrid<?> alg = new DetectAsymmetricCircleGrid(numRows, numCols, null, null, null);\n Grid g = createGrid(numRows, numCols);\n List<EllipseRotated_F64> original = new ArrayList<>();\n original.addAll(g.ellipses);\n alg.putGridIntoCanonical(g);\n assertEquals(numRows, g.rows);\n assertEquals(numCols, g.columns);\n assertTrue(original.get(0) == g.get(0, 0));\n checkCounterClockWise(g);\n g = flipHorizontal(g);\n alg.putGridIntoCanonical(g);\n assertEquals(numRows, g.rows);\n assertEquals(numCols, g.columns);\n assertTrue(original.get(0) == g.get(0, 0));\n checkCounterClockWise(g);\n}\n"
|
"private synchronized AttributeColumnImpl addColumn(String id, String title, AttributeType type, AttributeOrigin origin, Object defaultValue, AttributeValueDelegateProvider attributeValueDelegateProvider) {\n if (title == null || title.isEmpty() || hasColumn(title)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (defaultValue != null) {\n if (defaultValue.getClass() != type.getType()) {\n if (defaultValue.getClass() == String.class) {\n defaultValue = type.parse((String) defaultValue);\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n defaultValue = model.getManagedValue(defaultValue, type);\n }\n AttributeColumnImpl column = new AttributeColumnImpl(this, columns.size(), id, title, type, origin, defaultValue, attributeValueDelegateProvider);\n columns.add(column);\n columnsMap.put(id, column);\n if (title != null && !title.equals(id)) {\n columnsMap.put(title, column);\n }\n columnsSet.put(column, column);\n version++;\n model.fireAttributeEvent(new ColumnEvent(AttributeEvent.EventType.ADD_COLUMN, column));\n return column;\n}\n"
|
"public Warp addWarp(String warpName, Player owner, WarpType warpType, Location location, IPersistenceProvider persistenceProvider) {\n Warp retVal = getWarp(warpName, owner, persistenceProvider);\n if ((retVal != null) && (retVal.getOwner().equalsIgnoreCase(owner.getDisplayName())))\n persistenceProvider.delete(retVal);\n retVal = new Warp();\n retVal.setName(warpName);\n retVal.setOwner(owner.getDisplayName());\n retVal.setWarpType(warpType);\n retVal.setLocation(location);\n persistenceProvider.save(retVal);\n return retVal;\n}\n"
|
"public void computeTile(Band targetBand, Tile targetTile, ProgressMonitor pm) throws OperatorException {\n final Rectangle targetTileRectangle = targetTile.getRectangle();\n final int x0 = targetTileRectangle.x;\n final int y0 = targetTileRectangle.y;\n final int w = targetTileRectangle.width;\n final int h = targetTileRectangle.height;\n Tile sourceRaster1 = null;\n ProductData srcData1 = null;\n ProductData srcData2 = null;\n Band sourceBand1 = null;\n final String[] srcBandNames = targetBandNameToSourceBandName.get(targetBand.getName());\n if (srcBandNames.length == 1) {\n sourceBand1 = sourceProduct.getBand(srcBandNames[0]);\n sourceRaster1 = calibrationOp.getSourceTile(sourceBand1, targetTileRectangle);\n srcData1 = sourceRaster1.getDataBuffer();\n } else {\n sourceBand1 = sourceProduct.getBand(srcBandNames[0]);\n final Band sourceBand2 = sourceProduct.getBand(srcBandNames[1]);\n sourceRaster1 = calibrationOp.getSourceTile(sourceBand1, targetTileRectangle);\n final Tile sourceRaster2 = calibrationOp.getSourceTile(sourceBand2, targetTileRectangle);\n srcData1 = sourceRaster1.getDataBuffer();\n srcData2 = sourceRaster2.getDataBuffer();\n }\n final Unit.UnitType tgtBandUnit = Unit.getUnitType(targetBand);\n final Unit.UnitType srcBandUnit = Unit.getUnitType(sourceBand1);\n final ProductData trgData = targetTile.getDataBuffer();\n final TileIndex srcIndex = new TileIndex(sourceRaster1);\n final TileIndex tgtIndex = new TileIndex(targetTile);\n final int maxY = y0 + h;\n final int maxX = x0 + w;\n double sigma = 0.0, dn, dn2, i, q, phaseTerm = 0.0;\n int srcIdx, tgtIdx;\n for (int y = y0; y < maxY; ++y) {\n srcIndex.calculateStride(y);\n tgtIndex.calculateStride(y);\n for (int x = x0; x < maxX; ++x) {\n srcIdx = srcIndex.getIndex(x);\n tgtIdx = tgtIndex.getIndex(x);\n if (bandUnit == Unit.UnitType.AMPLITUDE) {\n dn = srcData1.getElemDoubleAt(srcIdx);\n dn2 = dn * dn;\n } else if (bandUnit == Unit.UnitType.INTENSITY) {\n dn2 = srcData1.getElemDoubleAt(srcIdx);\n } else if (bandUnit == Unit.UnitType.REAL) {\n i = srcData1.getElemDoubleAt(srcIdx);\n q = srcData2.getElemDoubleAt(srcIdx);\n dn2 = i * i + q * q;\n if (outputImageInComplex) {\n phaseTerm = i / Math.sqrt(dn2);\n }\n } else if (bandUnit == Unit.UnitType.IMAGINARY) {\n i = srcData1.getElemDoubleAt(srcIdx);\n q = srcData2.getElemDoubleAt(srcIdx);\n dn2 = i * i + q * q;\n if (outputImageInComplex) {\n phaseTerm = q / Math.sqrt(dn2);\n }\n } else {\n throw new OperatorException(\"String_Node_Str\");\n }\n if (isComplex) {\n if (gains != null) {\n sigma = dn2 / (gains[x + subsetOffsetX] * gains[x + subsetOffsetX]);\n if (outputImageInComplex) {\n sigma = Math.sqrt(sigma) * phaseTerm;\n }\n }\n } else {\n sigma = dn2 + offset;\n if (gains != null) {\n sigma /= gains[x + subsetOffsetX];\n }\n }\n if (outputImageScaleInDb) {\n if (sigma < underFlowFloat) {\n sigma = -underFlowFloat;\n } else {\n sigma = 10.0 * Math.log10(sigma);\n }\n }\n trgData.setElemDoubleAt(tgtIdx, sigma);\n }\n }\n}\n"
|
"public void setDead() {\n if (overrideDeath) {\n DragonSavefile file = WorldDataHandler.get(DragonSavefile.class);\n if (file.isDragonDead()) {\n ChunkCoordinates coords = file.getPortalEggLocation();\n DimensionManager.getWorld(1).setBlock(coords.posX, coords.posY, coords.posZ, Blocks.dragon_egg);\n }\n }\n super.setDead();\n}\n"
|
"public HashMap<Long, List<VmDiskStatsEntry>> getVmDiskStatistics(long hostId, String hostName, List<Long> vmIds) throws CloudRuntimeException {\n HashMap<Long, List<VmDiskStatsEntry>> vmDiskStatsById = new HashMap<Long, List<VmDiskStatsEntry>>();\n if (vmIds.isEmpty()) {\n return vmDiskStatsById;\n }\n List<String> vmNames = new ArrayList<String>();\n for (Long vmId : vmIds) {\n UserVmVO vm = _vmDao.findById(vmId);\n vmNames.add(vm.getInstanceName());\n }\n Answer answer = _agentMgr.easySend(hostId, new GetVmDiskStatsCommand(vmNames, _hostDao.findById(hostId).getGuid(), hostName));\n if (answer == null || !answer.getResult()) {\n s_logger.warn(\"String_Node_Str\");\n return null;\n } else {\n HashMap<String, List<VmDiskStatsEntry>> vmDiskStatsByName = ((GetVmDiskStatsAnswer) answer).getVmDiskStatsMap();\n if (vmDiskStatsByName == null) {\n s_logger.warn(\"String_Node_Str\");\n return null;\n }\n for (Map.Entry<String, List<VmDiskStatsEntry>> entry : vmDiskStatsByName.entrySet()) {\n vmDiskStatsById.put(vmIds.get(vmNames.indexOf(entry.getKey())), entry.getValue());\n }\n }\n return vmDiskStatsById;\n}\n"
|
"protected Collection<Integer> getRequiredOpenPorts() {\n Set<Integer> ports = MutableSet.copyOf(getConfig(REQUIRED_OPEN_LOGIN_PORTS));\n Map<ConfigKey<?>, ?> allConfig = config().getBag().getAllConfigAsConfigKeyMap();\n Set<ConfigKey<?>> configKeys = Sets.newHashSet(allConfig.keySet());\n configKeys.addAll(getEntityType().getConfigKeys());\n for (ConfigKey<?> k : configKeys) {\n Object value;\n if (PortRange.class.isAssignableFrom(k.getType()) || k.getName().matches(\"String_Node_Str\")) {\n value = config().get(k);\n } else {\n Maybe<Object> maybeValue = config().getRaw(k);\n value = maybeValue.isPresent() ? maybeValue.get() : null;\n }\n Maybe<PortRange> maybePortRange = TypeCoercions.tryCoerce(value, new TypeToken<PortRange>() {\n });\n if (maybePortRange.isPresentAndNonNull()) {\n PortRange p = maybePortRange.get();\n if (p != null && !p.isEmpty())\n ports.add(p.iterator().next());\n } else if (k.getName().matches(\"String_Node_Str\")) {\n Object value = getConfig(k);\n if (value instanceof Integer) {\n ports.add((Integer) value);\n }\n }\n }\n log.debug(\"String_Node_Str\", ports, this);\n return ports;\n}\n"
|
"public void updateCachedCollaborators(List<User> ghCollaborators) {\n for (User ghCollaborator : ghCollaborators) {\n newCollaborators.add(new TurboUser(ghCollaborator));\n }\n}\n"
|
"public DecodeQualification getDecodeQualification(Object input) {\n DecodeQualification qualification = DecodeQualification.UNABLE;\n File file = new File(input.toString());\n String fileName = file.getName().toLowerCase();\n if (fileName.endsWith(\"String_Node_Str\")) {\n try {\n files = RapidEyeReader.getInput(input).list(\"String_Node_Str\");\n } catch (IOException e) {\n }\n } else if (fileName.endsWith(RapidEyeConstants.METADATA_FILE_SUFFIX)) {\n File folder = file.getParentFile();\n File[] files = folder.listFiles();\n if (files != null) {\n boolean consistentProduct = true;\n for (String namePattern : RapidEyeConstants.L1_FILENAME_PATTERNS) {\n if (!namePattern.endsWith(\"String_Node_Str\")) {\n boolean patternMatched = false;\n for (File f : files) {\n patternMatched |= f.getName().matches(namePattern);\n }\n consistentProduct &= patternMatched;\n }\n }\n if (consistentProduct)\n qualification = DecodeQualification.INTENDED;\n }\n }\n return qualification;\n}\n"
|
"public void onLoadFinished(Loader<Cursor> loader, Cursor data) {\n switch(loader.getId()) {\n case ID_LOADER_ACCOUNT:\n ((SimpleCursorAdapter) getListAdapter()).swapCursor(data);\n if (isResumed()) {\n setListShown(true);\n } else {\n setListShownNoAnimation(true);\n }\n }\n}\n"
|
"public IMessage onMessage(MessageJetpackSync msg, MessageContext ctx) {\n Entity entity = FMLClientHandler.instance().getClient().theWorld.getEntityByID(msg.entityId);\n if (entity != null && entity instanceof EntityLivingBase && entity != FMLClientHandler.instance().getClient().thePlayer) {\n if (msg.particleId >= 0) {\n JetpackParticleType particle = JetpackParticleType.values()[msg.particleId];\n SyncTracker.processJetpackUpdate(msg.entityId, particle);\n } else {\n SyncTracker.processJetpackUpdate(msg.entityId, null);\n }\n }\n return null;\n}\n"
|
"public String getColumnName(int columnIndex) {\n return (String) this.getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnIndex).getVisibleName();\n}\n"
|
"public void setStatus(CellStatus status, boolean increasing) {\n super.setStatus(status, increasing);\n logger.info(\"String_Node_Str\" + status + \"String_Node_Str\" + increasing);\n if (status == CellStatus.ACTIVE && increasing == true) {\n if (cellMoveListener != null) {\n cell.getComponent(MovableComponent.class).removeServerCellMoveListener(cellMoveListener);\n cellMoveListener = null;\n }\n if (avatarCharacter == null) {\n AvatarConfigComponent configComp = cell.getComponent(AvatarConfigComponent.class);\n AvatarConfigInfo avatarConfigInfo = null;\n if (configComp != null) {\n avatarConfigInfo = configComp.getAvatarConfigInfo();\n }\n logger.warning(\"String_Node_Str\" + avatarConfigInfo);\n pendingAvatar = loadAvatar(avatarConfigInfo);\n } else {\n ClientContextJME.getWorldManager().removeEntity(avatarCharacter);\n pendingAvatar = null;\n }\n logger.warning(\"String_Node_Str\");\n changeAvatar(pendingAvatar);\n if (cellMoveListener == null) {\n cellMoveListener = new CellMoveListener() {\n public void cellMoved(CellTransform transform, CellMoveSource source) {\n if (source == CellMoveSource.REMOTE) {\n if (avatarCharacter != null) {\n if (avatarCharacter.getModelInst() == null) {\n logger.severe(\"String_Node_Str\");\n Thread.dumpStack();\n return;\n }\n avatarCharacter.getModelInst().setTransform(new PTransform(transform.getRotation(null), transform.getTranslation(null), new Vector3f(1, 1, 1)));\n }\n }\n }\n };\n }\n cell.getComponent(MovableComponent.class).addServerCellMoveListener(cellMoveListener);\n } else if (status == CellStatus.RENDERING) {\n if (((AvatarCell) cell).isSelectedForInput())\n selectForInput(true);\n }\n}\n"
|
"public static void main(String[] args) throws ConfigurationException, FileNotFoundException {\n Configuration config = GraphConfig.config();\n DBpediaGraphLoader.loadFromFiles(FileUtils.extractFilesFromArgs(args), config);\n if (EdgeWeightsType.fromConfig(config) != EdgeWeightsType.DUMMY)\n PredObjOccsCounter.countAndPersistDBpediaGraphOccs(GraphFactory.getDBpediaGraph());\n}\n"
|
"public void setSelection(T object) {\n this.selection = object;\n ItemWrapper<T> w = items.get(object);\n if (w == null)\n return;\n comboBox.removeActionListener(this);\n comboBox.setSelectedItem(w);\n comboBox.addActionListener(this);\n}\n"
|
"public void updateTick(World world, int x, int y, int z, Random random) {\n this.checkAndDropBlock(world, x, y, z);\n int light = world.getBlockLightValue(x, y, z);\n if (light >= 8) {\n int meta = world.getBlockMetadata(x, y, z);\n if (meta != 3 && meta != 8) {\n float grow = this.getGrowthRate(world, x, y, z, meta, light);\n if (random.nextInt((int) (60.0F / grow) + 1) == 0) {\n meta++;\n world.setBlockMetadataWithNotify(x, y, z, meta, 2);\n }\n }\n }\n}\n"
|
"public String getBlockKind() {\n return \"String_Node_Str\";\n}\n"
|
"public static <T, N extends java.lang.Number & java.lang.Comparable<?>> BooleanExpression createNumberExpression(PathBuilder<T> entityPath, String fieldName, Class<N> fieldType, TypeDescriptor descriptor, String searchStr, ConversionService conversionService) {\n if (StringUtils.isEmpty(searchStr)) {\n return null;\n }\n NumberPath<N> numberExpression = entityPath.getNumber(fieldName, fieldType);\n BooleanExpression expression = null;\n try {\n Object number = conversionService.convert(searchStr, STRING_TYPE_DESCRIPTOR, descriptor);\n String toSearch = number.toString();\n if (number instanceof BigDecimal && ((BigDecimal) number).scale() > 1) {\n toSearch = StringUtils.stripEnd(toSearch, \"String_Node_Str\");\n if (StringUtils.endsWith(toSearch, \"String_Node_Str\")) {\n toSearch = toSearch.concat(\"String_Node_Str\");\n }\n }\n expression = numberExpression.stringValue().like(\"String_Node_Str\".concat(toSearch).concat(\"String_Node_Str\"));\n } catch (ConversionException e) {\n expression = numberExpression.stringValue().like(\"String_Node_Str\".concat(searchStr).concat(\"String_Node_Str\"));\n }\n return expression;\n}\n"
|
"public static void isRMSecurityChecked(boolean newValue) {\n if (LOGGER.isDebugEnabled()) {\n RMMethodSecurityInterceptor.IS_RM_SECURITY_CHECK.set(newValue);\n }\n}\n"
|
"public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {\n super.onBlockPlacedBy(world, x, y, z, player, stack);\n int heading = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;\n TileEntityPresent te = (TileEntityPresent) world.getTileEntity(x, y, z);\n world.setBlockMetadataWithNotify(x, y, z, stack.getItemDamage(), 3);\n te.setRotation(heading);\n te.findConnections();\n if (te.isConnected()) {\n TileEntityPresent other = te.getConnection();\n other.setRotation(heading);\n }\n}\n"
|
"public String executeCommand(String cmd) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\");\n }\n try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {\n device.executeShellCommand(cmd, new OutputStreamShellOutputReceiver(bos));\n String returnString = new String(bos.toByteArray(), \"String_Node_Str\");\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\");\n }\n return returnString;\n } catch (Exception ex) {\n logger.error(\"String_Node_Str\", ex);\n throw new ExecuteCommandException(cmd);\n }\n}\n"
|
"public void testGracefulShutdown3() throws Exception {\n Config config = new Config();\n config.getMapConfig(MAP_NAME).setBackupCount(1);\n config.setProperty(GroupProperties.PROP_PARTITION_COUNT, \"String_Node_Str\");\n TestHazelcastInstanceFactory f = createHazelcastInstanceFactory(6);\n final HazelcastInstance hz = f.newHazelcastInstance(config);\n final IMap<Object, Object> map = hz.getMap(MAP_NAME);\n final int size = 50000;\n for (int i = 0; i < size; i++) {\n map.put(i, i);\n }\n final HazelcastInstance hz2 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map2 = hz2.getMap(MAP_NAME);\n final HazelcastInstance hz3 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map3 = hz3.getMap(MAP_NAME);\n final HazelcastInstance hz4 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map4 = hz4.getMap(MAP_NAME);\n final HazelcastInstance hz5 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map5 = hz5.getMap(MAP_NAME);\n final HazelcastInstance hz6 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map6 = hz6.getMap(MAP_NAME);\n assertEquals(size, map2.size());\n assertEquals(size, map3.size());\n assertEquals(size, map4.size());\n assertEquals(size, map5.size());\n assertEquals(size, map6.size());\n hz6.shutdown();\n assertEquals(size, map.size());\n assertEquals(size, map2.size());\n assertEquals(size, map3.size());\n assertEquals(size, map4.size());\n assertEquals(size, map5.size());\n hz2.shutdown();\n assertEquals(size, map.size());\n assertEquals(size, map3.size());\n assertEquals(size, map4.size());\n assertEquals(size, map5.size());\n hz5.shutdown();\n assertEquals(size, map.size());\n assertEquals(size, map3.size());\n assertEquals(size, map4.size());\n hz3.shutdown();\n assertEquals(size, map.size());\n assertEquals(size, map4.size());\n hz4.shutdown();\n assertEquals(size, map.size());\n}\n"
|
"private static SubscribableInfo convertStubSubscribableInfoContextToSubscribableInfo(SubscribableInfoContext subscribableInfoContext) {\n SubscribableInfo subscribableInfo = new SubscribableInfo();\n subscribableInfo.setAlias(subscribableInfoContext.getAlias());\n subscribableInfo.setAutoscalingPolicy(subscribableInfoContext.getAutoscalingPolicy());\n if (!CommonUtil.isEmptyArray(subscribableInfoContext.getDependencyAliases())) {\n subscribableInfo.setDependencyAliases(subscribableInfoContext.getDependencyAliases());\n }\n subscribableInfo.setDeploymentPolicy(subscribableInfoContext.getDeploymentPolicy());\n subscribableInfo.setMinMembers(subscribableInfoContext.getMinMembers());\n subscribableInfo.setMaxMembers(subscribableInfoContext.getMaxMembers());\n subscribableInfo.setProperty(convertStubPropertiesToPropertyBeanList(subscribableInfoContext.getProperties()));\n if (subscribableInfoContext.getArtifactRepositoryContext() != null) {\n ArtifactRepositoryContext artifactRepositoryContext = subscribableInfoContext.getArtifactRepositoryContext();\n ArtifactRepositoryBean artifactRepository = new ArtifactRepositoryBean();\n artifactRepository.setAlias(artifactRepositoryContext.getAlias());\n artifactRepository.setRepoUrl(artifactRepositoryContext.getRepoUrl());\n artifactRepository.setPrivateRepo(artifactRepositoryContext.getPrivateRepo());\n artifactRepository.setRepoUsername(artifactRepositoryContext.getRepoUsername());\n artifactRepository.setRepoPassword(artifactRepositoryContext.getRepoPassword());\n subscribableInfo.setArtifactRepository(artifactRepository);\n }\n if (subscribableInfoContext.getPersistenceContext() != null) {\n PersistenceContext persistenceContext = subscribableInfoContext.getPersistenceContext();\n PersistenceBean persistenceBean = new PersistenceBean();\n persistenceBean.setRequired(persistenceContext.getPersistenceRequired());\n persistenceBean.setVolume(convertStubVolumeToVolume(persistenceContext.getVolumes()));\n subscribableInfo.setPersistence(persistenceBean);\n }\n return subscribableInfo;\n}\n"
|
"public Object doWork() throws Exception {\n HashSet<String> toDelete = new HashSet<String>();\n for (IndexEntry entry : toMerge.values()) {\n if (entry.getStatus() == TransactionStatus.MERGE) {\n if (wasMerged) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + entry.getName());\n }\n toDelete.add(entry.getName());\n } else {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + entry.getName());\n }\n entry.setStatus(TransactionStatus.COMMITTED);\n }\n } else if (entry.getStatus() == TransactionStatus.MERGE_TARGET) {\n if (wasMerged) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + entry.getName());\n }\n entry.setStatus(TransactionStatus.COMMITTED);\n } else {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + entry.getName());\n }\n toDelete.add(entry.getName());\n }\n }\n }\n for (String id : toDelete) {\n indexEntries.remove(id);\n if (!referenceCountingReadOnlyIndexReaders.containsKey(id)) {\n s_logger.debug(\"String_Node_Str\" + id);\n deleteQueue.add(id);\n }\n }\n dumpInfo();\n writeStatus();\n clearOldReaders();\n synchronized (cleaner) {\n cleaner.notify();\n }\n return null;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.