content stringlengths 40 137k |
|---|
"public void draw() {\n Entity riding = mc.player.getRidingEntity();\n if (riding == null) {\n return;\n }\n if (!(riding instanceof LocomotiveDiesel)) {\n return;\n }\n LocomotiveDiesel loco = (LocomotiveDiesel) riding;\n drawGauge(0xAA79650c, ((float) loco.getLiquidAmount()) / Fluid.BUCKET_VOLUME, loco.getTankCapacity().Buckets(), \"String_Node_Str\");\n int heatColor = cold;\n if (loco.getEngineTemperature() > 75) {\n heatColor = warm;\n }\n if (loco.getEngineTemperature() > 100) {\n heatColor = hot;\n }\n if (loco.getEngineTemperature() > 140) {\n heatColor = danger;\n }\n drawGauge(heatColor, loco.getEngineTemperature(), 150, \"String_Node_Str\");\n drawScalar(GuiText.LABEL_BRAKE.toString(), loco.getAirBrake() * 10, 0, 10);\n drawScalar(GuiText.LABEL_THROTTLE.toString(), loco.getThrottle() * 10, -10, 10);\n double speed = Math.abs(loco.getCurrentSpeed().metric());\n if (ConfigGraphics.speedUnit == \"String_Node_Str\") {\n drawSpeedText(String.format(\"String_Node_Str\", speed));\n } else if (ConfigGraphics.speedUnit == \"String_Node_Str\") {\n speed = speed * 0.621371;\n drawSpeedText(String.format(\"String_Node_Str\", speed));\n } else if (ConfigGraphics.speedUnit == \"String_Node_Str\") {\n speed = speed / 3.6;\n drawSpeedText(String.format(\"String_Node_Str\", speed));\n }\n}\n"
|
"private void processMouseDrag(Editor editor) {\n if (CommandState.getInstance().getMode() == CommandState.MODE_VISUAL) {\n CommandState.getInstance().popState();\n }\n int offset = editor.getCaretModel().getOffset();\n int start = editor.getSelectionModel().getSelectionStart();\n if (offset > start) {\n BoundStringOption opt = (BoundStringOption) Options.getInstance().getOption(\"String_Node_Str\");\n if (!opt.getValue().equals(\"String_Node_Str\")) {\n editor.getCaretModel().moveToOffset(offset - 1);\n }\n }\n EditorData.setLastColumn(editor, EditorHelper.getCurrentVisualColumn(editor));\n}\n"
|
"protected Object check(HadoopServiceProperties serviceProperties, ClassLoader classLoader) throws Exception {\n Object configuration = Class.forName(\"String_Node_Str\", true, classLoader).newInstance();\n Object conf = ReflectionUtils.newInstance(\"String_Node_Str\", classLoader, new Object[] { configuration });\n ReflectionUtils.invokeMethod(conf, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n ReflectionUtils.invokeMethod(conf, \"String_Node_Str\", new Object[] { \"String_Node_Str\", serviceProperties.getResourceManager() });\n ReflectionUtils.invokeMethod(conf, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n ReflectionUtils.invokeMethod(conf, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n ReflectionUtils.invokeMethod(conf, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n ReflectionUtils.invokeMethod(conf, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n ReflectionUtils.invokeMethod(conf, \"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" });\n setHadoopProperties(conf, serviceProperties);\n boolean useKrb = serviceProperties.isUseKrb();\n boolean useMaprTicket = serviceProperties.isMaprT();\n if (useKrb) {\n String yarnPrincipal = serviceProperties.getJtOrRmPrincipal();\n ReflectionUtils.invokeMethod(conf, \"String_Node_Str\", new Object[] { \"String_Node_Str\", yarnPrincipal });\n boolean useKeytab = serviceProperties.isUseKeytab();\n if (useKeytab) {\n String keytabPrincipal = serviceProperties.getKeytabPrincipal();\n String keytab = serviceProperties.getKeytab();\n ReflectionUtils.invokeStaticMethod(\"String_Node_Str\", classLoader, \"String_Node_Str\", new String[] { keytabPrincipal, keytab });\n }\n if (useMaprTicket) {\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n String mapRTicketCluster = serviceProperties.getMaprTCluster();\n String mapRTicketDuration = serviceProperties.getMaprTDuration();\n Long desiredTicketDurInSecs = 86400L;\n if (mapRTicketDuration != null && StringUtils.isNotBlank(mapRTicketDuration)) {\n desiredTicketDurInSecs = Long.parseLong(mapRTicketDuration);\n }\n try {\n ReflectionUtils.invokeStaticMethod(\"String_Node_Str\", classLoader, \"String_Node_Str\", new Object[] { mapRTicketCluster, mapRTicketDuration });\n } catch (Exception e) {\n throw new SQLException(e);\n }\n }\n }\n if (useMaprTicket) {\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n String mapRTicketUsername = serviceProperties.getUserName();\n String mapRTicketPassword = serviceProperties.getMaprTPassword();\n String mapRTicketCluster = serviceProperties.getMaprTCluster();\n Object mapRTicketDuration = serviceProperties.getMaprTDuration();\n try {\n String decryptedPassword = PasswordEncryptUtil.encryptPassword(mapRTicketPassword);\n ReflectionUtils.invokeStaticMethod(\"String_Node_Str\", classLoader, \"String_Node_Str\", new Object[] { false }, Boolean.class);\n ReflectionUtils.invokeStaticMethod(\"String_Node_Str\", classLoader, \"String_Node_Str\", new Object[] { mapRTicketCluster, mapRTicketUsername, decryptedPassword, mapRTicketDuration });\n } catch (Exception e) {\n throw new SQLException(e);\n }\n }\n Object jc = ReflectionUtils.newInstance(\"String_Node_Str\", classLoader, new Object[] { conf });\n return ReflectionUtils.invokeMethod(jc, \"String_Node_Str\", new Object[0]);\n}\n"
|
"public void commit(Transaction tx) {\n String url = tx.url() + \"String_Node_Str\";\n logger.debug(\"String_Node_Str\", url);\n HttpPost request = new HttpPost(url);\n request.setHeader(new BasicHeader(HTTP.CONTENT_TYPE, \"String_Node_Str\"));\n try (CloseableHttpResponse response = executeRequest(request)) {\n ;\n response.close();\n } catch (ResultProcessingException rpe) {\n logger.warn(\"String_Node_Str\" + rpe.getCause().getLocalizedMessage());\n throw rpe;\n } catch (IOException ioe) {\n throw new RuntimeException(\"String_Node_Str\", ioe);\n }\n}\n"
|
"private ElementDefinitionBindingComponent generateBinding(String bn, Profile p) throws Exception {\n BindingSpecification src = definitions.getBindingByName(bn);\n if (src == null)\n return null;\n ElementDefinitionBindingComponent dst = new Profile.ElementDefinitionBindingComponent();\n dst.setName(Factory.newString_(src.getName()));\n if (src.getBindingStrength() != null) {\n dst.setConformanceSimple(convert(src.getBindingStrength()));\n dst.setIsExtensibleSimple(src.getExtensibility() == BindingExtensibility.Extensible);\n } else {\n if (src.getElementType() == ElementType.Simple) {\n dst.setConformanceSimple(convert(BindingStrength.Required));\n dst.setIsExtensibleSimple(false);\n } else if (src.getElementType() == ElementType.Complex) {\n dst.setIsExtensibleSimple(true);\n if (src.isExample()) {\n dst.setConformanceSimple(convert(BindingStrength.Example));\n } else {\n dst.setConformanceSimple(convert(BindingStrength.Preferred));\n }\n } else {\n dst.setConformanceSimple(convert(BindingStrength.Unstated));\n dst.setIsExtensibleSimple(true);\n }\n }\n dst.setDescription(Factory.newString_(src.getDefinition()));\n if (src.getBinding() != Binding.Unbound)\n dst.setReference(buildReference(src));\n return dst;\n}\n"
|
"public HilightedTextWriter toString(HilightedTextWriter writer, List<Object> localData) {\n GraphTargetItem expr = expression;\n List<GraphTargetItem> ifBranch = onTrue;\n List<GraphTargetItem> elseBranch = onFalse;\n if (onTrue.isEmpty()) {\n if (onFalse.isEmpty()) {\n if (expr instanceof NotItem) {\n expr = ((NotItem) expr).getOriginal();\n }\n } else {\n if (expr instanceof LogicalOpItem) {\n expr = ((LogicalOpItem) expr).invert();\n } else {\n expr = new NotItem(null, expr);\n }\n ifBranch = onFalse;\n elseBranch = onTrue;\n }\n }\n hilight(\"String_Node_Str\", writer);\n expr.toString(writer, localData);\n hilight(\"String_Node_Str\", writer).appendNewLine();\n hilight(\"String_Node_Str\", writer).appendNewLine();\n hilight(Graph.INDENTOPEN, writer).appendNewLine();\n for (GraphTargetItem ti : ifBranch) {\n if (!ti.isEmpty()) {\n ti.toStringSemicoloned(writer, localData).appendNewLine();\n }\n }\n hilight(Graph.INDENTCLOSE, writer).appendNewLine();\n hilight(\"String_Node_Str\", writer);\n if (elseBranch.size() > 0) {\n hilight(\"String_Node_Str\", writer);\n hilight(\"String_Node_Str\" + Graph.INDENTOPEN + \"String_Node_Str\", writer);\n for (GraphTargetItem ti : elseBranch) {\n if (!ti.isEmpty()) {\n ti.toStringSemicoloned(writer, localData);\n hilight(\"String_Node_Str\", writer);\n }\n }\n hilight(Graph.INDENTCLOSE + \"String_Node_Str\", writer);\n }\n return writer;\n}\n"
|
"public String getAssetsBaseUrl() {\n String rootPath = getAssetsRootPath();\n if (shouldUseAssetsOrSdCard()) {\n if (assetsOnExternalStorage()) {\n return \"String_Node_Str\" + rootPath;\n }\n return \"String_Node_Str\" + rootPath;\n } else\n return rootPath;\n}\n"
|
"public void checkPostTipOffReport() throws InterruptedException {\n AndroidElement e = mDriver.findElement(By.id(\"String_Node_Str\"));\n LogUtil.printCurrentMethodName();\n e.click();\n WaitUtil.forceWait(3);\n assertEquals(ContextUtil.getCurrentActivity(), \"String_Node_Str\");\n mDriver.findElement(By.id(\"String_Node_Str\")).click();\n String reportPostErrorToast = \"String_Node_Str\";\n Assert.assertEquals(ElementUtil.isTargetToast(reportPostErrorToast), true);\n mDriver.findElement(By.id(\"String_Node_Str\")).click();\n WaitUtil.implicitlyWait(App.WAIT_TIME_IMPLICITLY);\n mDriver.findElement(By.xpath(\"String_Node_Str\")).click();\n WaitUtil.implicitlyWait(2);\n AndroidElement reportContent = mDriver.findElement(By.id(\"String_Node_Str\"));\n reportContent.clear();\n reportContent.sendKeys(\"String_Node_Str\");\n AndroidElement reportPhone = mDriver.findElement(By.id(\"String_Node_Str\"));\n reportPhone.clear();\n reportPhone.sendKeys(\"String_Node_Str\");\n AndroidElement reportEmail = mDriver.findElement(By.id(\"String_Node_Str\"));\n reportEmail.clear();\n reportEmail.sendKeys(\"String_Node_Str\");\n mDriver.findElement(By.id(\"String_Node_Str\")).click();\n Assert.assertEquals(ElementUtil.isTargetToast(reportPostErrorToast), false);\n WaitUtil.forceWait(0.5);\n if (ContextUtil.getCurrentActivity().equals(\"String_Node_Str\")) {\n } else {\n mDriver.findElement(By.id(\"String_Node_Str\")).click();\n assertEquals(ContextUtil.getCurrentActivity(), \"String_Node_Str\");\n }\n}\n"
|
"public BigDecimal getAmountCurrencyConverted(Currency currencyStart, Currency currencyEnd, BigDecimal amountToPay, LocalDate localDate) throws AxelorException {\n if (!currencyStart.equals(currencyEnd)) {\n CurrencyConversionLine currencyConversionLine = this.getCurrencyConversionLine(currencyStart, currencyEnd, localDate);\n if (currencyConversionLine != null) {\n return amountToPay.multiply(currencyConversionLine.getExchangeRate()).setScale(2, RoundingMode.HALF_UP);\n } else {\n currencyConversionLine = this.getCurrencyConversionLine(currencyEnd, currencyStart, localDate);\n }\n if (currencyConversionLine == null) {\n throw new AxelorException(String.format(metaTranslations.get(IExceptionMessage.CURRENCY_1), currencyStart.getName(), currencyEnd.getName(), today), IException.CONFIGURATION_ERROR);\n }\n BigDecimal exchangeRate = currencyConversionLine.getExchangeRate();\n if (exchangeRate == null || exchangeRate.compareTo(BigDecimal.ZERO) == 0) {\n throw new AxelorException(String.format(metaTranslations.get(IExceptionMessage.CURRENCY_2), currencyStart.getName(), currencyEnd.getName(), today), IException.CONFIGURATION_ERROR);\n }\n return amountToPay.divide(exchangeRate, 2, RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);\n }\n return amountToPay;\n}\n"
|
"private Rectangle createDraggableRectangle(double x, double y, double width, double height) {\n final double handleRadius = 10;\n Rectangle rect = new Rectangle(x, y, width, height);\n rect.setVisible(true);\n rect.setFill(Color.BLACK);\n rect.setOpacity(0.2);\n resizeHandleNW = new Circle(handleRadius, Color.BLACK);\n resizeHandleNW.centerXProperty().bind(rect.xProperty());\n resizeHandleNW.centerYProperty().bind(rect.yProperty());\n Circle resizeHandleSE = new Circle(handleRadius, Color.BLACK);\n resizeHandleSE.centerXProperty().bind(rect.xProperty().add(rect.widthProperty()));\n resizeHandleSE.centerYProperty().bind(rect.yProperty().add(rect.heightProperty()));\n rect.parentProperty().addListener((obs, oldParent, newParent) -> {\n for (Circle c : Arrays.asList(resizeHandleNW, resizeHandleSE)) {\n Pane currentParent = (Pane) c.getParent();\n if (currentParent != null) {\n currentParent.getChildren().remove(c);\n }\n ((Pane) newParent).getChildren().add(c);\n }\n });\n Wrapper<Point2D> mouseLocation = new Wrapper<>();\n setUpDragging(resizeHandleNW, mouseLocation);\n setUpDragging(resizeHandleSE, mouseLocation);\n resizeHandleNW.setOnMouseDragged(event -> {\n if (mouseLocation.value != null) {\n double deltaX = event.getSceneX() - mouseLocation.value.getX();\n double deltaY = event.getSceneY() - mouseLocation.value.getY();\n double newX = rect.getX() + deltaX;\n if (newX >= handleRadius && newX <= rect.getX() + rect.getWidth() - handleRadius) {\n rect.setX(newX);\n rect.setWidth(rect.getWidth() - deltaX);\n }\n double newY = rect.getY() + deltaY;\n if (newY >= handleRadius && newY <= rect.getY() + rect.getHeight() - handleRadius) {\n rect.setY(newY);\n rect.setHeight(rect.getHeight() - deltaY);\n }\n mouseLocation.value = new Point2D(event.getSceneX(), event.getSceneY());\n }\n });\n resizeHandleSE.setOnMouseDragged(event -> {\n if (mouseLocation.value != null) {\n double deltaX = event.getSceneX() - mouseLocation.value.getX();\n double deltaY = event.getSceneY() - mouseLocation.value.getY();\n double newMaxX = rect.getX() + rect.getWidth() + deltaX;\n if (newMaxX >= rect.getX() && newMaxX <= rect.getParent().getBoundsInLocal().getWidth() - handleRadius) {\n rect.setWidth(rect.getWidth() + deltaX);\n }\n double newMaxY = rect.getY() + rect.getHeight() + deltaY;\n if (newMaxY >= rect.getY() && newMaxY <= rect.getParent().getBoundsInLocal().getHeight() - handleRadius) {\n rect.setHeight(rect.getHeight() + deltaY);\n }\n mouseLocation.value = new Point2D(event.getSceneX(), event.getSceneY());\n }\n });\n rect.setOnMouseDragged(event -> {\n if (mouseLocation.value != null) {\n double deltaX = event.getSceneX() - mouseLocation.value.getX();\n double deltaY = event.getSceneY() - mouseLocation.value.getY();\n double newX = rect.getX() + deltaX;\n double newMaxX = newX + rect.getWidth();\n if (newX >= handleRadius && newMaxX <= rect.getParent().getBoundsInLocal().getWidth() - handleRadius) {\n rect.setX(newX);\n }\n double newY = rect.getY() + deltaY;\n double newMaxY = newY + rect.getHeight();\n if (newY >= handleRadius && newMaxY <= rect.getParent().getBoundsInLocal().getHeight() - handleRadius) {\n rect.setY(newY);\n }\n mouseLocation.value = new Point2D(event.getSceneX(), event.getSceneY());\n }\n });\n return rect;\n}\n"
|
"public void populateItem(final Item<ICellPopulator<NotificationTO>> cellItem, final String componentId, final IModel<NotificationTO> model) {\n final NotificationTO notificationTO = model.getObject();\n final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);\n panel.add(new ActionLink() {\n\n private static final long serialVersionUID = -7978723352517770644L;\n public void onClick(final AjaxRequestTarget target) {\n editNotificationWin.setPageCreator(new ModalWindow.PageCreator() {\n private static final long serialVersionUID = -7834632442532690940L;\n public Page createPage() {\n return new NotificationModalPage(Configuration.this.getPageReference(), editNotificationWin, notificationTO, false);\n }\n });\n editNotificationWin.show(target);\n }\n };\n EditLinkPanel panel = new EditLinkPanel(componentId, model);\n panel.add(editLink);\n MetaDataRoleAuthorizationStrategy.authorize(panel, ENABLE, xmlRolesReader.getAllAllowedRoles(\"String_Node_Str\", \"String_Node_Str\"));\n cellItem.add(panel);\n}\n"
|
"RouteInfo makeGlobalRoute(MediaRouterClientState.RouteInfo globalRoute) {\n RouteInfo route = new RouteInfo(sStatic.mSystemCategory);\n route.mGlobalRouteId = globalRoute.id;\n route.mName = globalRoute.name;\n route.mDescription = globalRoute.description;\n route.mSupportedTypes = globalRoute.supportedTypes;\n route.mEnabled = globalRoute.enabled;\n route.setStatusCode(globalRoute.statusCode);\n route.mPlaybackType = globalRoute.playbackType;\n route.mPlaybackStream = globalRoute.playbackStream;\n route.mVolume = globalRoute.volume;\n route.mVolumeMax = globalRoute.volumeMax;\n route.mVolumeHandling = globalRoute.volumeHandling;\n route.mPresentationDisplayId = globalRoute.presentationDisplayId;\n route.updatePresentationDisplay();\n return route;\n}\n"
|
"public Data getData() throws DataProcessingException {\n Data data;\n if (curPoint == -1) {\n data = new DataStartSignal();\n curPoint++;\n } else if (curPoint == numPoints) {\n if (numPoints > 0) {\n firstSampleNumber = (firstSampleNumber - frameShift + frameSize - 1);\n }\n int numberFrames = curPoint / frameSize;\n int totalSamples = (numberFrames - 1) * frameShift + frameSize;\n long duration = (long) (((double) totalSamples / (double) sampleRate) * 1000.0);\n data = new DataEndSignal(duration);\n try {\n if (binary) {\n binaryStream.close();\n } else {\n est.close();\n }\n curPoint++;\n } catch (IOException ioe) {\n throw new DataProcessingException(\"String_Node_Str\");\n }\n } else if (curPoint > numPoints) {\n data = null;\n } else {\n double[] vectorData = new double[cepstrumLength];\n long collectTime = System.currentTimeMillis();\n for (int i = 0; i < cepstrumLength; i++) {\n try {\n if (binary) {\n if (bigEndian) {\n vectorData[i] = (double) binaryStream.readFloat();\n } else {\n vectorData[i] = (double) Utilities.readLittleEndianFloat(binaryStream);\n }\n } else {\n vectorData[i] = (double) est.getFloat(\"String_Node_Str\");\n }\n curPoint++;\n } catch (IOException ioe) {\n throw new DataProcessingException(\"String_Node_Str\");\n }\n }\n data = new DoubleData(vectorData, sampleRate, collectTime, firstSampleNumber);\n firstSampleNumber += frameShift;\n }\n return data;\n}\n"
|
"private void loadExternalScores(ScoreParseSpecification spec, Collection<ATableBasedDataDomain> dataDomains) {\n ATableBasedDataDomain target = null;\n for (ATableBasedDataDomain dataDomain : dataDomains) {\n if (dataDomain.getLabel().contains(\"String_Node_Str\")) {\n targetIDType = dataDomain.getDimensionIDType();\n break;\n }\n }\n if (targetIDType == null) {\n System.err.println(\"String_Node_Str\");\n return;\n }\n ExternalIDTypeScoreParser parser = new ExternalIDTypeScoreParser(spec, targetIDType);\n Collection<ISerializeableScore> scores = parser.call();\n final Scores s = Scores.get();\n for (ISerializeableScore score : scores) {\n s.addPersistentScoreIfAbsent(score);\n }\n}\n"
|
"public float[] generateTransformedValuesBarChart(List<? extends Entry> entries, int dataSet, BarData bd, float phaseY) {\n float[] valuePoints = new float[entries.size() * 2];\n int setCount = bd.getDataSetCount();\n float space = bd.getGroupSpace();\n for (int j = 0; j < valuePoints.length; j += 2) {\n Entry e = entries.get(j / 2);\n int i = e.getXIndex();\n float x = e.getXIndex() + i * (setCount - 1) + dataSet + space * i + space / 2f;\n float y = e.getVal();\n valuePoints[j] = x;\n valuePoints[j + 1] = y * phaseY;\n }\n getValueToPixelMatrix().mapPoints(valuePoints);\n return valuePoints;\n}\n"
|
"private ModelCoordinate createIndexCoordinateWithRemoteUrlHint(String remoteUrl) {\n ModelCoordinate mc = new ModelCoordinate(INDEX.getGroupId(), INDEX.getArtifactId(), INDEX.getClassifier(), INDEX.getExtension(), INDEX.getVersion());\n return createCopyWithRepositoryUrlHint(mc, remoteUrl);\n}\n"
|
"public void testAspectFailingExecution() throws Exception {\n scratch.file(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n scratch.file(\"String_Node_Str\", \"String_Node_Str\");\n reporter.removeHandler(failFastHandler);\n try {\n AnalysisResult result = update(ImmutableList.of(\"String_Node_Str\"), \"String_Node_Str\");\n assertThat(keepGoing()).isTrue();\n assertThat(result.hasError()).isTrue();\n } catch (ViewCreationFailedException e) {\n }\n assertContainsEvent(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
|
"public IValue resolve(MarkerList markers, IContext context) {\n if (this.instance != null) {\n if (this.instance.valueTag() == FIELD_ACCESS) {\n FieldAccess fa = (FieldAccess) this.instance;\n if (fa.instance != null) {\n fa.instance = fa.instance.resolve(markers, context);\n }\n IValue v1 = fa.resolveFieldAccess(markers, context);\n if (v1 != null) {\n this.instance = v1;\n this.arguments.resolve(markers, context);\n } else {\n this.arguments.resolve(markers, context);\n Array array = new Array(((ArgumentList) this.arguments).getValues(), this.arguments.size());\n array.position = this.arguments.getFirstValue().getPosition().to(this.arguments.getLastValue().getPosition());\n IArguments arguments = new SingleArgument(array);\n IMethod m = ICall.resolveMethod(context, fa.instance, fa.name, arguments);\n if (m != null) {\n MethodCall mc = new MethodCall(fa.position, fa.instance, fa.name);\n mc.method = m;\n mc.arguments = arguments;\n mc.dotless = fa.dotless;\n mc.checkArguments(markers, context);\n return mc;\n }\n ICall.addResolveMarker(markers, this.position, fa.instance, fa.name, arguments);\n return this;\n }\n } else {\n this.instance = this.instance.resolve(markers, context);\n this.arguments.resolve(markers, context);\n }\n } else {\n this.arguments.resolve(markers, context);\n }\n int count = this.arguments.size();\n ArgumentList argumentList = new ArgumentList(count);\n for (int i = 0; i < count; i++) {\n argumentList.addValue(this.arguments.getValue(i, null));\n }\n IMethod m = ICall.resolveMethod(context, this.instance, Name.subscript, argumentList);\n if (m != null) {\n this.arguments = argumentList;\n this.method = m;\n this.checkArguments(markers, context);\n return this;\n }\n ICall.addResolveMarker(markers, position, this.instance, Name.subscript, argumentList);\n return this;\n}\n"
|
"final void switchUserLocked(int userId) {\n if (mCurrentUser == userId) {\n return;\n }\n mCurrentUser = userId;\n int index = mTaskHistory.size();\n for (int i = 0; i < index; ) {\n final TaskRecord task = mTaskHistory.get(i);\n if (isCurrentProfileLocked(task.userId) || task.topRunningActivityLocked(null) != null) {\n if (DEBUG_TASKS)\n Slog.d(TAG_TASKS, \"String_Node_Str\" + getStackId() + \"String_Node_Str\" + task + \"String_Node_Str\");\n mTaskHistory.remove(i);\n mTaskHistory.add(task);\n --index;\n } else {\n ++i;\n }\n }\n if (VALIDATE_TOKENS) {\n validateAppTokensLocked();\n }\n}\n"
|
"public static void writeImage(BufferedImage img, File f) {\n try {\n if (f.getParentFile() != null && !f.getParentFile().exists()) {\n f.getParentFile().mkdirs();\n }\n if (!f.getName().toUpperCase().endsWith(\"String_Node_Str\")) {\n f = new File(f.getName() + \"String_Node_Str\");\n }\n if (!ImageIO.write(noAlpha, \"String_Node_Str\", f)) {\n throw new RuntimeException(\"String_Node_Str\" + f.getName());\n }\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
|
"private void buildRequestBody(VariableElement var, RestDocumentation.Resource.Method doc) {\n doc.setRequestBody(jsonTypeFromTypeMirror(var.asType(), new HashSet<DeclaredType>()));\n}\n"
|
"public ModuleNeeded clone() {\n ModuleNeeded cloned = new ModuleNeeded(context, moduleName, informationMsg, mrRequired, installURL, requiredIf, mavenUri);\n cloned.bundleName = bundleName;\n cloned.bundleVersion = bundleVersion;\n cloned.context = context;\n cloned.dynamic = dynamic;\n cloned.excludeDependencies = cloned.excludeDependencies;\n if (extraAttributes != null && !extraAttributes.isEmpty()) {\n cloned.extraAttributes = new HashMap<>(extraAttributes);\n }\n cloned.id = id;\n cloned.informationMsg = informationMsg;\n cloned.installStatus = installStatus;\n if (installURL != null && !installURL.isEmpty()) {\n cloned.installURL = new ArrayList<>(installURL);\n }\n cloned.isShow = isShow;\n cloned.libManagerService = libManagerService;\n cloned.mavenUri = mavenUri;\n cloned.mavenUriFromConfiguration = mavenUriFromConfiguration;\n cloned.moduleLocaion = moduleLocaion;\n cloned.moduleName = moduleName;\n cloned.mrRequired = mrRequired;\n cloned.required = required;\n cloned.requiredIf = requiredIf;\n cloned.status = status;\n return cloned;\n}\n"
|
"public static ForgeArchive getDeployment() {\n ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class).addBeansXML().addClasses(TestFooModel.class, TestFooSubModel.class).addAsAddonDependencies(AddonDependencyEntry.create(\"String_Node_Str\"), AddonDependencyEntry.create(\"String_Node_Str\"));\n return archive;\n}\n"
|
"public boolean hasWork() {\n if (this.getFuelStack() == null && fuelBurnTime <= 0)\n return false;\n else if (fuelBurnTime <= 0)\n if (RecipeManager.findMatchingRecipe(inventory.getStackInSlot(SLOT_RESOURCE), resourceTank.getFluid()) == null)\n return false;\n if (this.getFermentationStack() == null && fermentationTime <= 0)\n return false;\n else if (fermentationTime <= 0)\n if (RecipeManager.findMatchingRecipe(inventory.getStackInSlot(SLOT_RESOURCE), resourceTank.getFluid()) == null)\n return false;\n if (resourceTank.getFluidAmount() <= fuelCurrentFerment)\n return false;\n if (productTank.getFluidAmount() >= productTank.getCapacity())\n return false;\n return true;\n}\n"
|
"public Object getValue(Object element, String property) {\n if (element == dummyChoice) {\n ComputedColumn column = StructureFactory.newComputedColumn(inputElement, DEFAULT_COLUMN_NAME);\n column.setExpression(\"String_Node_Str\");\n addBinding(column);\n return \"String_Node_Str\";\n }\n ComputedColumnHandle handle = ((ComputedColumnHandle) element);\n String value = null;\n if (COLUMN_NAME.equals(property)) {\n value = handle.getName();\n } else if (COLUMN_DATATYPE.equals(property)) {\n IChoice type = dataTypeChoiceSet.findChoice(handle.getDataType());\n if (type != null) {\n for (int i = 0; i < dataTypeDisplayNames.length; i++) {\n if (dataTypeDisplayNames[i].equals(type.getDisplayName())) {\n return new Integer(i);\n }\n }\n }\n return new Integer(0);\n } else if (COLUMN_EXPRESSION.equals(property)) {\n value = handle.getExpression();\n } else if (COLUMN_AGGREGATEON.equals(property)) {\n value = handle.getAggregrateOn();\n ;\n if (value != null) {\n for (int i = 1; i < groups.length; i++) {\n if (value.equals(groups[i])) {\n return new Integer(i);\n }\n }\n }\n return new Integer(0);\n }\n if (value == null) {\n value = \"String_Node_Str\";\n }\n return value;\n}\n"
|
"public void writeInvJump(MethodWriter writer, int varIndex, Label elseLabel) throws BytecodeException {\n if (varIndex >= 0) {\n writer.writeVarInsn(Opcodes.ALOAD, varIndex);\n }\n this.boxingMethod.writeInvoke(writer, null, null);\n this.pattern.writeInvJump(writer, -1, elseLabel);\n}\n"
|
"public void testMerge() throws Exception {\n assertTrue(\"String_Node_Str\" + MERGE_XML.getAbsolutePath(), MERGE_XML.isFile());\n assertTrue(\"String_Node_Str\" + MERGE_SOURCE.getAbsolutePath(), MERGE_SOURCE.isFile());\n assertTrue(\"String_Node_Str\" + MERGE_TARGET.getAbsolutePath(), MERGE_TARGET.isFile());\n assertTrue(\"String_Node_Str\" + MERGE_EXPECTED.getAbsolutePath(), MERGE_TARGET.isFile());\n jMerger = new JMerger();\n JControlModel controlModel = new JControlModel(MERGE_XML.getAbsolutePath());\n jMerger.setControlModel(controlModel);\n jMerger.setSourceCompilationUnit(jMerger.createCompilationUnitForContents(TestUtil.readFile(MERGE_SOURCE, false)));\n jMerger.setTargetCompilationUnit(jMerger.createCompilationUnitForInputStream(new FileInputStream(MERGE_TARGET)));\n jMerger.merge();\n StringBuffer mergeResult = new StringBuffer(jMerger.getTargetCompilationUnitContents());\n for (int i = mergeResult.length() - 1; i >= 0; i--) {\n if ('\\r' == mergeResult.charAt(i)) {\n mergeResult.deleteCharAt(i);\n }\n }\n String expectedMerge = TestUtil.readFile(MERGE_EXPECTED);\n assertEquals(\"String_Node_Str\", expectedMerge, mergeResult.toString());\n}\n"
|
"public char getPieceAt(long square) {\n char p = ((pawns & square) != 0 ? 'p' : ((knights & square) != 0 ? 'n' : ((bishops & square) != 0 ? 'b' : ((rooks & square) != 0 ? 'r' : ((queens & square) != 0 ? 'q' : ((kings & square) != 0 ? 'k' : '.'))))));\n return ((whites & square) != 0 ? Character.toUpperCase(p) : p);\n}\n"
|
"private static void loadData() throws TException, InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException {\n KsDef ksDef = null;\n CfDef user_Def = new CfDef();\n user_Def.name = \"String_Node_Str\";\n user_Def.keyspace = _KEYSPACE;\n user_Def.setComparator_type(\"String_Node_Str\");\n user_Def.setDefault_validation_class(\"String_Node_Str\");\n CfDef person_Def = new CfDef();\n person_Def.name = \"String_Node_Str\";\n person_Def.keyspace = \"String_Node_Str\";\n person_Def.setComparator_type(\"String_Node_Str\");\n person_Def.setDefault_validation_class(\"String_Node_Str\");\n ColumnDef columnDef = new ColumnDef(ByteBuffer.wrap(\"String_Node_Str\".getBytes()), \"String_Node_Str\");\n person_Def.addToColumn_metadata(columnDef);\n CfDef address_Def = new CfDef();\n address_Def.name = \"String_Node_Str\";\n address_Def.keyspace = \"String_Node_Str\";\n ColumnDef street = new ColumnDef(ByteBuffer.wrap(\"String_Node_Str\".getBytes()), \"String_Node_Str\");\n street.index_type = IndexType.KEYS;\n address_Def.addToColumn_metadata(street);\n ColumnDef personId = new ColumnDef(ByteBuffer.wrap(\"String_Node_Str\".getBytes()), \"String_Node_Str\");\n personId.index_type = IndexType.KEYS;\n address_Def.addToColumn_metadata(personId);\n List<CfDef> cfDefs = new ArrayList<CfDef>();\n cfDefs.add(user_Def);\n cfDefs.add(person_Def);\n cfDefs.add(address_Def);\n try {\n ksDef = CassandraCli.client.describe_keyspace(\"String_Node_Str\");\n CassandraCli.client.set_keyspace(\"String_Node_Str\");\n List<CfDef> cfDefn = ksDef.getCf_defs();\n for (CfDef cfDef1 : cfDefn) {\n if (cfDef1.getName().equalsIgnoreCase(\"String_Node_Str\")) {\n CassandraCli.client.system_drop_column_family(\"String_Node_Str\");\n }\n if (cfDef1.getName().equalsIgnoreCase(\"String_Node_Str\")) {\n CassandraCli.client.system_drop_column_family(\"String_Node_Str\");\n }\n if (cfDef1.getName().equalsIgnoreCase(\"String_Node_Str\")) {\n CassandraCli.client.system_drop_column_family(\"String_Node_Str\");\n }\n }\n CassandraCli.client.system_add_column_family(user_Def);\n CassandraCli.client.system_add_column_family(person_Def);\n CassandraCli.client.system_add_column_family(address_Def);\n } catch (NotFoundException e) {\n ksDef = new KsDef(\"String_Node_Str\", \"String_Node_Str\", cfDefs);\n ksDef.setReplication_factor(1);\n CassandraCli.client.system_add_keyspace(ksDef);\n }\n CassandraCli.client.set_keyspace(\"String_Node_Str\");\n}\n"
|
"public RefiringData fire(ArrayToken arguments) throws IllegalActionException {\n RefiringData data = super.fire(arguments);\n Mode choice = (Mode) mode.getChosenValue();\n String text = message.stringValue();\n MessageHandler oldHandler;\n switch(choice) {\n case ERROR:\n oldHandler = MessageHandler.getMessageHandler();\n try {\n MessageHandler.setMessageHandler(_MESSAGE_HANDLER);\n MessageHandler.error(text);\n } finally {\n MessageHandler.setMessageHandler(oldHandler);\n }\n break;\n case MESSAGE:\n oldHandler = MessageHandler.getMessageHandler();\n try {\n MessageHandler.setMessageHandler(_MESSAGE_HANDLER);\n MessageHandler.message(text);\n } finally {\n MessageHandler.setMessageHandler(oldHandler);\n }\n break;\n case EXCEPTION:\n throw new RuntimeException(text);\n case TABLEAU:\n Effigy effigy = GTEntityUtils.findToplevelEffigy(this);\n if (effigy == null) {\n return data;\n }\n Tableau tableau = _getTableau();\n if (tableau != null && !(tableau.getFrame() instanceof TextEditor)) {\n _setTableau(null);\n _closeTableau(tableau);\n tableau = null;\n }\n boolean openNewWindow = true;\n String previousText = null;\n if (tableau != null) {\n JFrame frame = tableau.getFrame();\n if (frame instanceof TextEditor) {\n TextEditor editor = (TextEditor) frame;\n if (editor.getEffigy() == null) {\n previousText = editor.text.getText();\n } else {\n openNewWindow = false;\n }\n }\n }\n TextEditor frame;\n if (openNewWindow) {\n TextEffigy textEffigy;\n try {\n textEffigy = TextEffigy.newTextEffigy(effigy, \"String_Node_Str\");\n } catch (Exception e) {\n throw new IllegalActionException(this, e, \"String_Node_Str\" + \"String_Node_Str\");\n }\n try {\n tableau = new Tableau(textEffigy, \"String_Node_Str\");\n } catch (NameDuplicationException e) {\n throw new IllegalActionException(this, e, \"String_Node_Str\" + \"String_Node_Str\");\n }\n frame = new TextEditor(tableau.getTitle(), textEffigy.getDocument());\n frame.text.setColumns(((IntToken) columnsDisplayed.getToken()).intValue());\n frame.text.setRows(((IntToken) rowsDisplayed.getToken()).intValue());\n tableau.setFrame(frame);\n frame.setTableau(tableau);\n _setTableau(tableau);\n frame.pack();\n frame.setVisible(true);\n if (previousText != null) {\n frame.text.setText(previousText);\n }\n } else {\n frame = (TextEditor) tableau.getFrame();\n }\n frame.text.append(text + \"String_Node_Str\");\n try {\n int lineOffset = frame.text.getLineStartOffset(frame.text.getLineCount() - 1);\n frame.text.setCaretPosition(lineOffset);\n } catch (BadLocationException ex) {\n }\n break;\n case WARNING:\n try {\n oldHandler = MessageHandler.getMessageHandler();\n try {\n MessageHandler.setMessageHandler(_MESSAGE_HANDLER);\n MessageHandler.warning(text);\n } finally {\n MessageHandler.setMessageHandler(oldHandler);\n }\n response.setToken(BooleanToken.TRUE);\n } catch (CancelException e) {\n response.setToken(BooleanToken.FALSE);\n }\n break;\n case YES_OR_NO:\n oldHandler = MessageHandler.getMessageHandler();\n boolean success = false;\n boolean answer;\n try {\n MessageHandler.setMessageHandler(_MESSAGE_HANDLER);\n answer = MessageHandler.yesNoQuestion(text);\n success = true;\n } finally {\n MessageHandler.setMessageHandler(oldHandler);\n }\n if (success) {\n response.setToken(BooleanToken.getInstance(answer));\n }\n break;\n default:\n throw new IllegalActionException(\"String_Node_Str\" + mode.getExpression() + \"String_Node_Str\");\n }\n return data;\n}\n"
|
"public void maxARecordPanel() {\n Point b = this.findElementDefineDriver(this.driver, By.xpath(locator.getString(\"String_Node_Str\"))).getLocation();\n Point a = this.findElementDefineDriver(this.driver, By.xpath(locator.getString(\"String_Node_Str\"))).getLocation();\n logger.info(\"String_Node_Str\" + b.x + \"String_Node_Str\" + b.y);\n logger.info(\"String_Node_Str\" + a.x + \"String_Node_Str\" + a.y);\n logger.info(\"String_Node_Str\" + (a.x - b.x - 50));\n this.dragAndDropBy(this.findElementDefineDriver(this.driver, By.xpath(locator.getString(\"String_Node_Str\"))), -a.x + b.x + 50, 0);\n}\n"
|
"public void sort(Comparator<T> comparator) {\n getSortOrder().clear();\n allitems.sort(comparator);\n}\n"
|
"public Void visitClass(ClassTree ct, Void _) {\n TypeElement e = (TypeElement) TreeUtil.getElement(ct);\n if (e != null) {\n addDecl(gen.findTokenAfter(ct, false, ct.getSimpleName().toString()), e);\n List<ParsedType> descendants = getParsedType(e).descendants;\n if (!descendants.isEmpty()) {\n addBookmark(ct, new SubClassBookmark(descendants, linkResolver));\n }\n if (e.getNestingKind() == NestingKind.ANONYMOUS) {\n scan(ct.getMembers());\n return _;\n }\n }\n return super.visitClass(ct, _);\n}\n"
|
"public void messageArrived(Message<TaskDto> message) {\n if (!(contentPanel instanceof TaskContainer)) {\n return;\n }\n TaskDto taskDto = message.getPayload();\n if (!isThisPlace(taskDto)) {\n return;\n }\n if (((TaskContainer) contentPanel).containsTask(taskDto)) {\n return;\n }\n if (message instanceof TaskDeleteRequestedMessage) {\n ((TaskContainer) contentPanel).removeTask(message.getPayload());\n } else if (message instanceof TaskAddedMessage) {\n TaskGui task = new TaskGui(message.getPayload());\n dragController.makeDraggable(task, task.getHeader());\n ((TaskContainer) contentPanel).add(task);\n }\n}\n"
|
"public Number getValue(Object dataset, Comparable rowKey, Comparable columnKey) {\n if (isTOPChartInstalled()) {\n return chartService.getValue(dataset, rowKey, columnKey);\n }\n return Integer.MIN_VALUE;\n}\n"
|
"public static void main(String[] args) throws JMetalException, InterruptedException {\n DoubleProblem problem;\n Algorithm<List<DoubleSolution>> algorithm;\n CrossoverOperator<List<DoubleSolution>, List<DoubleSolution>> crossover;\n MutationOperator<DoubleSolution> mutation;\n SelectionOperator selection;\n String problemName;\n if (args.length == 1) {\n problemName = args[0];\n problem = (DoubleProblem) ProblemUtils.loadProblem(problemName);\n } else {\n problem = new Golinski();\n }\n double crossoverProbability = 0.9;\n double crossoverDistributionIndex = 20.0;\n crossover = new SBXCrossover(crossoverProbability, crossoverDistributionIndex);\n double mutationProbability = 1.0 / problem.getNumberOfVariables();\n double mutationDistributionIndex = 20.0;\n mutation = new PolynomialMutation(mutationProbability, mutationDistributionIndex);\n selection = new BinaryTournamentSelection(new RankingAndCrowdingDistanceComparator());\n int maxIterations = 250;\n int populationSize = 100;\n algorithm = new NSGAIIBuilder<DoubleSolution>(problem, crossover, mutation, NSGAIIBuilder.NSGAIIVariant.Measures).setSelectionOperator(selection).setMaxIterations(maxIterations).setPopulationSize(populationSize).build();\n MeasureManager measureManager = ((NSGAIIMeasures) algorithm).getMeasureManager();\n CountingMeasure iteration = (CountingMeasure) measureManager.<Long>getPullMeasure(\"String_Node_Str\");\n DurationMeasure currentComputingTime = (DurationMeasure) measureManager.<Long>getPullMeasure(\"String_Node_Str\");\n BasicMeasure<Integer> nonDominatedSolutions = (BasicMeasure<Integer>) measureManager.<Integer>getPullMeasure(\"String_Node_Str\");\n BasicMeasure<List<Solution>> solutionListMeasure = (BasicMeasure) measureManager.getPushMeasure(\"String_Node_Str\");\n CountingMeasure iteration2 = (CountingMeasure) measureManager.<Long>getPushMeasure(\"String_Node_Str\");\n BasicMeasure<Integer> numberOfFeasibleSolutions = (BasicMeasure) measureManager.getPushMeasure(\"String_Node_Str\");\n solutionListMeasure.register(new Listener());\n iteration2.register(new Listener2());\n numberOfFeasibleSolutions.register(new feasibleSolutionsListener());\n Thread algorithmThread = new Thread(algorithm);\n algorithmThread.start();\n int i = 0;\n while (iteration.get() < maxIterations) {\n TimeUnit.SECONDS.sleep(5);\n System.out.println(\"String_Node_Str\" + i + \"String_Node_Str\" + iteration.get());\n System.out.println(\"String_Node_Str\" + i + \"String_Node_Str\" + currentComputingTime.get());\n System.out.println(\"String_Node_Str\" + i + \"String_Node_Str\" + nonDominatedSolutions.get());\n i++;\n }\n algorithmThread.join();\n List<DoubleSolution> population = algorithm.getResult();\n long computingTime = currentComputingTime.get();\n new SolutionSetOutput.Printer(population).setSeparator(\"String_Node_Str\").setVarFileOutputContext(new DefaultFileOutputContext(\"String_Node_Str\")).setFunFileOutputContext(new DefaultFileOutputContext(\"String_Node_Str\")).print();\n JMetalLogger.logger.info(\"String_Node_Str\" + computingTime + \"String_Node_Str\");\n JMetalLogger.logger.info(\"String_Node_Str\");\n JMetalLogger.logger.info(\"String_Node_Str\");\n}\n"
|
"public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) throws IOException, ServletException {\n HttpServletRequest request = (HttpServletRequest) servletRequest;\n Map<String, Object> authzid = (Map<String, Object>) request.getAttribute(AuthNFilter.ATTRIBUTE_AUTH_CONTEXT);\n String authcid = request.getHeader(AuthNFilter.ATTRIBUTE_AUTH_PRINCIPAL);\n request.setAttribute(SecurityContextFactory.ATTRIBUTE_AUTHCID, authcid);\n request.setAttribute(SecurityContextFactory.ATTRIBUTE_AUTHZID, authzid);\n filterChain.doFilter(request, servletResponse);\n}\n"
|
"private void createLoopLinks(List<FOXTreeNode> treeData) {\n for (FOXTreeNode treeNode : treeData) {\n if (treeNode.getColumn() != null) {\n TableItem tableItem = null;\n for (TableItem curTableItem : getSource().getItems()) {\n if (curTableItem.getText().equals(treeNode.getColumnLabel())) {\n tableItem = curTableItem;\n break;\n }\n }\n if (tableItem == null) {\n continue;\n }\n String path = tableItem.getText();\n if (path != null) {\n TreeItem treeItem = getTreeItem(treeNode);\n if (treeItem != null) {\n addLoopLink(tableItem, tableItem.getData(), xmlViewer.getTree(), (FOXTreeNode) treeItem.getData());\n }\n }\n }\n createLoopLinks(treeNode.getChildren());\n }\n}\n"
|
"public void testCase1() {\n ExecutionTime et = ExecutionTime.forCron(parser.parse(\"String_Node_Str\"));\n Optional<ZonedDateTime> olast = et.lastExecution(currentDateTime);\n ZonedDateTime last = olast.orElse(null);\n ZonedDateTime expected = ZonedDateTime.of(LocalDateTime.of(2015, 12, 31, 12, 0), ZoneId.systemDefault());\n Assert.assertEquals(expected, actual);\n}\n"
|
"public String getRid(Object entity) {\n Class clazz = entity.getClass();\n while (clazz != Object.class) {\n for (Field field : clazz.getDeclaredFields()) {\n OId ridAnnotation = field.getAnnotation(OId.class);\n if (ridAnnotation != null) {\n field.setAccessible(true);\n try {\n Object rid = field.get(entity);\n return rid != null ? rid.toString() : null;\n } catch (IllegalAccessException | IllegalArgumentException | NoSuchMethodException | InvocationTargetException ex) {\n throw new RuntimeException(ex);\n }\n }\n }\n clazz = clazz.getSuperclass();\n }\n return null;\n}\n"
|
"public void testGrandTotal() throws Exception {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition dim1 = columnEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier1 = dim1.createHierarchy(\"String_Node_Str\");\n ILevelDefinition level11 = hier1.createLevel(\"String_Node_Str\");\n ILevelDefinition level12 = hier1.createLevel(\"String_Node_Str\");\n IDimensionDefinition dim2 = rowEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier2 = dim2.createHierarchy(\"String_Node_Str\");\n hier2.createLevel(\"String_Node_Str\");\n cqd.createMeasure(\"String_Node_Str\");\n IBinding binding1 = new Binding(\"String_Node_Str\");\n binding1.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding1);\n IBinding binding2 = new Binding(\"String_Node_Str\");\n binding2.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding2);\n IBinding binding4 = new Binding(\"String_Node_Str\");\n binding4.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding4);\n IBinding binding5 = new Binding(\"String_Node_Str\");\n binding5.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding5);\n IBinding binding6 = new Binding(\"String_Node_Str\");\n binding6.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding6.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n binding6.addAggregateOn(\"String_Node_Str\");\n cqd.addBinding(binding6);\n IBinding binding7 = new Binding(\"String_Node_Str\");\n binding7.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding7.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n binding7.addAggregateOn(\"String_Node_Str\");\n binding7.addAggregateOn(\"String_Node_Str\");\n cqd.addBinding(binding7);\n IBinding binding8 = new Binding(\"String_Node_Str\");\n binding8.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding8.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n cqd.addBinding(binding8);\n SortDefinition sorter1 = new SortDefinition();\n sorter1.setExpression(\"String_Node_Str\");\n sorter1.setSortDirection(ISortDefinition.SORT_DESC);\n SortDefinition sorter2 = new SortDefinition();\n sorter2.setExpression(\"String_Node_Str\");\n sorter2.setSortDirection(ISortDefinition.SORT_DESC);\n SortDefinition sorter3 = new SortDefinition();\n sorter3.setExpression(\"String_Node_Str\");\n sorter3.setSortDirection(ISortDefinition.SORT_DESC);\n cqd.addSort(sorter1);\n cqd.addSort(sorter2);\n cqd.addSort(sorter3);\n DataEngine engine = DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION, null, null, null));\n this.createCube(engine);\n IPreparedCubeQuery pcq = engine.prepare(cqd, null);\n ICubeQueryResults queryResults = pcq.execute(null);\n CubeCursor cursor = queryResults.getCubeCursor();\n List columnEdgeBindingNames = new ArrayList();\n columnEdgeBindingNames.add(\"String_Node_Str\");\n columnEdgeBindingNames.add(\"String_Node_Str\");\n this.printCube(cursor, columnEdgeBindingNames, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"private boolean generateExpansion(XhtmlNode x, ValueSet vs, ValueSet src, boolean header, List<UsedConceptMap> maps) throws FHIRFormatError, DefinitionException, IOException {\n boolean hasExtensions = false;\n List<String> langs = new ArrayList<String>();\n if (header) {\n XhtmlNode h = x.addTag(getHeader());\n h.tx(\"String_Node_Str\");\n if (IsNotFixedExpansion(vs))\n addMarkdown(x, vs.getDescription());\n if (vs.hasCopyright())\n generateCopyright(x, vs);\n }\n if (ToolingExtensions.hasExtension(vs.getExpansion(), \"String_Node_Str\"))\n x.para().setAttribute(\"String_Node_Str\", \"String_Node_Str\").addText(vs.getExpansion().getContains().isEmpty() ? tooCostlyNoteEmpty : tooCostlyNoteNotEmpty);\n else {\n Integer count = countMembership(vs);\n if (count == null)\n x.para().tx(\"String_Node_Str\");\n else\n x.para().tx(\"String_Node_Str\" + count.toString() + \"String_Node_Str\");\n }\n generateVersionNotice(x, vs.getExpansion());\n CodeSystem allCS = null;\n boolean doLevel = false;\n for (ValueSetExpansionContainsComponent cc : vs.getExpansion().getContains()) {\n if (cc.hasContains()) {\n doLevel = true;\n break;\n }\n }\n boolean doSystem = true;\n boolean doDefinition = checkDoDefinition(vs.getExpansion().getContains());\n if (doSystem && allFromOneSystem(vs)) {\n doSystem = false;\n XhtmlNode p = x.para();\n p.tx(\"String_Node_Str\");\n allCS = context.fetchCodeSystem(vs.getExpansion().getContains().get(0).getSystem());\n String ref = null;\n if (allCS != null)\n ref = getCsRef(allCS);\n if (ref == null)\n p.code(vs.getExpansion().getContains().get(0).getSystem());\n else\n p.ah(prefix + ref).code(vs.getExpansion().getContains().get(0).getSystem());\n }\n XhtmlNode t = x.table(\"String_Node_Str\");\n XhtmlNode tr = t.tr();\n if (doLevel)\n tr.td().b().tx(\"String_Node_Str\");\n tr.td().attribute(\"String_Node_Str\", \"String_Node_Str\").b().tx(\"String_Node_Str\");\n if (doSystem)\n tr.td().b().tx(\"String_Node_Str\");\n tr.td().b().tx(\"String_Node_Str\");\n if (doDefinition)\n tr.td().b().tx(\"String_Node_Str\");\n addMapHeaders(tr, maps);\n for (ValueSetExpansionContainsComponent c : vs.getExpansion().getContains()) {\n addExpansionRowToTable(t, c, 0, doLevel, doSystem, doDefinition, maps, allCS, langs);\n }\n if (langs.size() > 0) {\n Collections.sort(langs);\n x.para().b().tx(\"String_Node_Str\");\n t = x.table(\"String_Node_Str\");\n tr = t.tr();\n tr.td().b().tx(\"String_Node_Str\");\n for (String lang : langs) tr.td().b().addText(describeLang(lang));\n for (ValueSetExpansionContainsComponent c : vs.getExpansion().getContains()) {\n addLanguageRow(c, t, langs);\n }\n }\n return hasExtensions;\n}\n"
|
"public void info() {\n GUIInfo info = new GUIInfo(guiHome);\n info.setVisible(true);\n}\n"
|
"protected String[] getCompatibleDataTypes(String dataType) {\n String[] compatibleTypes = null;\n if (DesignChoiceConstants.COLUMN_DATA_TYPE_STRING.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL, DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, DesignChoiceConstants.COLUMN_DATA_TYPE_BOOLEAN, DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME, DesignChoiceConstants.COLUMN_DATA_TYPE_DATE, DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT, DesignChoiceConstants.COLUMN_DATA_TYPE_TIME, DesignChoiceConstants.COLUMN_DATA_TYPE_BLOB };\n } else if (DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT, DesignChoiceConstants.COLUMN_DATA_TYPE_STRING };\n } else if (DesignChoiceConstants.COLUMN_DATA_TYPE_TIME.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_STRING };\n } else if (DesignChoiceConstants.COLUMN_DATA_TYPE_DATE.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_STRING };\n } else if (DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_STRING, DesignChoiceConstants.COLUMN_DATA_TYPE_DATE, DesignChoiceConstants.COLUMN_DATA_TYPE_TIME };\n } else if (DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL, DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT, DesignChoiceConstants.COLUMN_DATA_TYPE_STRING };\n } else if (DesignChoiceConstants.COLUMN_DATA_TYPE_JAVA_OBJECT.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_STRING };\n } else if (DesignChoiceConstants.COLUMN_DATA_TYPE_BOOLEAN.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_STRING, DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL, DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT, DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER };\n } else if (DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT.equals(dataType)) {\n compatibleTypes = new String[] { DesignChoiceConstants.COLUMN_DATA_TYPE_STRING, DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER, DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL };\n }\n if (compatibleTypes == null)\n return new String[0];\n for (int i = 0; i < compatibleTypes.length; i++) {\n compatibleTypes[i] = dataTypes.findChoice(compatibleTypes[i]).getDisplayName();\n }\n return compatibleTypes;\n}\n"
|
"public void handleShiftCombo() {\n while (Keyboard.next()) {\n if (Keyboard.getEventKeyState()) {\n int keyCode = Keyboard.getEventKey();\n switch(keyCode) {\n case Keyboard.KEY_LEFT:\n break;\n case Keyboard.KEY_RIGHT:\n break;\n default:\n handleKeyCode(keyCode);\n break;\n case Keyboard.KEY_LSHIFT:\n case Keyboard.KEY_RSHIFT:\n case Keyboard.KEY_LCONTROL:\n case Keyboard.KEY_RCONTROL:\n break;\n }\n }\n }\n}\n"
|
"public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, final InstanceKey[] receiver) {\n Context baseContext = base.getCalleeTarget(caller, site, callee, receiver);\n String calleeFullName = callee.getDeclaringClass().getName().toString();\n String calleeShortName = calleeFullName.substring(calleeFullName.lastIndexOf('/') + 1);\n if (USE_NAME_TO_SELECT_CONTEXT) {\n if (calleeShortName.contains(HACK_METHOD_STR)) {\n return new ForInContext(baseContext, simulateToString(caller.getClassHierarchy(), receiver[2]));\n }\n ConcreteTypeKey stringKey = new ConcreteTypeKey(stringClass);\n return new ForInContext(baseContext, stringKey);\n } else if (USE_CPA_IN_BODIES && FORIN_MARKER.equals(caller.getContext().get(FORIN_KEY))) {\n return new SelectiveCPAContext(baseContext, receiver);\n } else if (USE_1LEVEL_IN_BODIES && FORIN_MARKER.equals(caller.getContext().get(FORIN_KEY))) {\n if (!identifyDependentParameters(caller, site).isEmpty()) {\n return oneLevel.getCalleeTarget(caller, site, callee, receiver);\n } else {\n return baseContext;\n }\n } else {\n return baseContext;\n }\n}\n"
|
"public boolean hasTheSameTagAs(DEEvent event) {\n Actor actor = event.actor();\n if (actor == null) {\n actor = (Actor) event.ioPort().getContainer();\n }\n boolean same = _timestamp.compareTo(event.timeStamp()) == 0 && _microstep == event.microstep();\n return same;\n}\n"
|
"private boolean findEmptyLocation(BlockCacheLocation location) {\n for (int j = 0; j < 10; j++) {\n OUTER: for (int bankId = 0; bankId < _banks.length; bankId++) {\n AtomicInteger bitSetCounter = _lockCounters[bankId];\n BlockLocks bitSet = _locks[bankId];\n if (bitSetCounter.get() == _numberOfBlocksPerBank) {\n continue OUTER;\n }\n if (!bitSet.set(bit)) {\n bit = bitSet.nextClearBit(0);\n continue INNER;\n } else {\n location.setBankId(bankId);\n location.setBlock(bit);\n bitSetCounter.incrementAndGet();\n return true;\n }\n }\n }\n return false;\n}\n"
|
"public boolean act() {\n if (target.isAlive()) {\n int maxDmg = 3 + Math.round(4 * target.HP / (float) target.HT);\n target.damage(Random.Int(1, maxDmg), this);\n Buff.detach(target, Chill.class);\n if (target instanceof Hero) {\n Hero hero = (Hero) target;\n Item item = hero.belongings.randomUnequipped();\n if (item instanceof Scroll) {\n item = item.detach(hero.belongings.backpack);\n GLog.w(Messages.get(this, \"String_Node_Str\", Messages.capitalize(item.toString())));\n Heap.burnFX(hero.pos);\n } else if (item instanceof MysteryMeat) {\n item = item.detach(hero.belongings.backpack);\n ChargrilledMeat steak = new ChargrilledMeat();\n if (!steak.collect(hero.belongings.backpack)) {\n Dungeon.level.drop(steak, hero.pos).sprite.drop();\n }\n GLog.w(Messages.get(this, \"String_Node_Str\", item.toString()));\n Heap.burnFX(hero.pos);\n }\n } else if (target instanceof Thief && ((Thief) target).item instanceof Scroll) {\n ((Thief) target).item = null;\n target.sprite.emitter().burst(ElmoParticle.FACTORY, 6);\n }\n } else {\n detach();\n }\n if (Level.flamable[target.pos]) {\n GameScene.add(Blob.seed(target.pos, 4, Fire.class));\n }\n spend(TICK);\n left -= TICK;\n if (left <= 0 || (Level.water[target.pos] && !target.flying)) {\n detach();\n }\n return true;\n}\n"
|
"private void runShadowProcess(final Property property, final Node inputNode, final IContext selectContext, final IElementParameter switchParam) {\n DatabaseConnection connt = TracesConnectionUtils.createConnection(connParameters);\n String dbmsId = connt.getDbmsId();\n if (dbmsId == null) {\n Shell shell = Display.getCurrent().getActiveShell();\n MessageDialog.openError(shell, \"String_Node_Str\", \"String_Node_Str\");\n MappingFileSelectDialog dialog = new MappingFileSelectDialog(shell);\n dialog.open();\n dbmsId = dialog.getSelectId();\n }\n GuessSchemaProcess gsp = new GuessSchemaProcess(property, inputNode, selectContext, memoSQL, info, part.getProcess());\n try {\n List<Integer> indexsForSameNamedColumn = new ArrayList<Integer>();\n CsvArray array = gsp.run();\n List<String[]> schemaContent = array.getRows();\n List<String> columnLabels = new ArrayList<String>();\n if (columns != null) {\n columns.clear();\n }\n if (!schemaContent.isEmpty()) {\n int numbOfColumn = schemaContent.get(0).length;\n for (int i = 1; i <= numbOfColumn; i++) {\n indexsForSameNamedColumn.clear();\n Boolean b = false;\n IMetadataColumn oneColum = new MetadataColumn();\n String labelName = (schemaContent.get(0))[i - 1];\n String name = labelName;\n String sub = \"String_Node_Str\";\n String sub2 = \"String_Node_Str\";\n if (labelName != null && labelName.length() > 0 && labelName.startsWith(\"String_Node_Str\")) {\n sub = labelName.substring(1);\n if (sub != null && sub.length() > 0) {\n sub2 = sub.substring(1);\n }\n }\n if (KeywordsValidator.isKeyword(labelName) || KeywordsValidator.isKeyword(sub) || KeywordsValidator.isKeyword(sub2)) {\n labelName = \"String_Node_Str\" + labelName;\n b = true;\n }\n oneColum.setLabel(MetadataToolHelper.validateColumnName(labelName, i, columnLabels));\n oneColum.setOriginalDbColumnName(name);\n if (schemaContent.size() > 5) {\n oneColum.setPrecision(Integer.parseInt(schemaContent.get(2)[i - 1]));\n oneColum.setLength(Integer.parseInt(schemaContent.get(3)[i - 1]));\n }\n try {\n String talendType = null;\n if (LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {\n if (schemaContent.size() >= 5) {\n talendType = MetadataTalendType.getMappingTypeRetriever(dbmsId).getDefaultSelectedTalendType(schemaContent.get(4)[i - 1]);\n } else {\n talendType = JavaTypesManager.STRING.getId();\n }\n } else {\n if (schemaContent.size() >= 5) {\n talendType = PerlDataTypeHelper.getNewTalendTypeOfValue(schemaContent.get(4)[i - 1]);\n } else {\n talendType = PerlTypesManager.STRING;\n }\n }\n oneColum.setTalendType(talendType);\n } catch (Exception e) {\n ExceptionHandler.process(e);\n }\n oneColum.setNullable((schemaContent.get(1))[i - 1].equals(Boolean.TRUE.toString()) ? true : false);\n columns.add(oneColum);\n columnLabels.add(oneColum.getLabel());\n }\n if (columns.size() > 0) {\n IElementParameter dqRule = elem.getElementParameter(\"String_Node_Str\");\n if (dqRule != null) {\n ITDQRuleService ruleService = null;\n try {\n ruleService = (ITDQRuleService) GlobalServiceRegister.getDefault().getService(ITDQRuleService.class);\n } catch (RuntimeException e) {\n }\n IElementParameter queryParam = elem.getElementParameter(\"String_Node_Str\");\n if (ruleService != null && queryParam != null) {\n ruleService.updateOriginalColumnNames(columns, queryParam);\n }\n }\n }\n IMetadataTable tempMetatable = new MetadataTable();\n if (tempMetatable.getTableName() == null) {\n tempMetatable.setTableName(inputNode.getUniqueName());\n }\n IMetadataTable outputMetaCopy, originaleOutputTable;\n String propertyName = (String) btn.getData(PARAMETER_NAME);\n IElementParameter param = inputNode.getElementParameter(propertyName);\n for (IElementParameter eParam : elem.getElementParameters()) {\n if (eParam.getContext() != null) {\n param = eParam;\n }\n }\n originaleOutputTable = inputNode.getMetadataFromConnector(param.getContext());\n if (originaleOutputTable != null) {\n outputMetaCopy = originaleOutputTable.clone();\n }\n tempMetatable.setListColumns(columns);\n MetadataDialog metaDialog = new MetadataDialog(composite.getShell(), tempMetatable, inputNode, getCommandStack());\n if (metaDialog != null) {\n metaDialog.setText(Messages.getString(\"String_Node_Str\") + inputNode.getLabel());\n }\n if (metaDialog.open() == MetadataDialog.OK) {\n outputMetaCopy = metaDialog.getOutputMetaData();\n boolean modified = false;\n if (!outputMetaCopy.sameMetadataAs(originaleOutputTable, IMetadataColumn.OPTIONS_NONE)) {\n modified = true;\n }\n if (modified) {\n if (switchParam != null) {\n switchParam.setValue(Boolean.FALSE);\n }\n changeMetadataCommand = new ChangeMetadataCommand(inputNode, param, originaleOutputTable, outputMetaCopy);\n }\n }\n }\n } catch (ProcessorException e) {\n ExtractMetaDataUtils.closeConnection();\n final String strExcepton = e.getMessage();\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n MessageDialog.openWarning(composite.getShell(), Messages.getString(\"String_Node_Str\"), strExcepton);\n }\n });\n ExceptionHandler.process(e);\n }\n}\n"
|
"public static YamlConfiguration loadYamlFile(String file) {\n File dataFolder = plugin.getDataFolder();\n File yamlFile = new File(dataFolder, file);\n YamlConfiguration config = null;\n if (yamlFile.exists()) {\n try {\n config = new YamlConfiguration();\n config.load(yamlFile);\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else {\n config = new YamlConfiguration();\n if (!file.startsWith(\"String_Node_Str\")) {\n plugin.getLogger().info(\"String_Node_Str\" + file + \"String_Node_Str\");\n }\n try {\n if (plugin.getResource(file) != null) {\n plugin.getLogger().info(\"String_Node_Str\");\n plugin.saveResource(file, false);\n config = new YamlConfiguration();\n config.load(yamlFile);\n } else {\n config.save(yamlFile);\n }\n } catch (Exception e) {\n plugin.getLogger().severe(\"String_Node_Str\" + file + \"String_Node_Str\");\n }\n }\n return config;\n}\n"
|
"public static void checkerMunger(IHierarchy model, Shadow shadow, Checker checker) {\n if (shadow.getSourceLocation() == null || checker.getSourceLocation() == null)\n return;\n String sourceHandle = ProgramElement.createHandleIdentifier(checker.getSourceLocation().getSourceFile(), checker.getSourceLocation().getLine(), checker.getSourceLocation().getColumn());\n String targetHandle = ProgramElement.createHandleIdentifier(shadow.getSourceLocation().getSourceFile(), shadow.getSourceLocation().getLine(), shadow.getSourceLocation().getColumn());\n IRelationshipMap mapper = AsmManager.getDefault().getRelationshipMap();\n if (sourceHandle != null && targetHandle != null) {\n IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.DECLARE, MATCHED_BY);\n foreward.getTargets().add(targetHandle);\n IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE, MATCHES_DECLARE);\n if (back != null && back.getTargets() != null) {\n back.getTargets().add(sourceHandle);\n }\n }\n}\n"
|
"public Long toNonNullValue(Instant value) {\n return Long.valueOf(value.getMillis());\n}\n"
|
"public void run() {\n if (evt instanceof IContainerDisconnectedEvent || evt instanceof IContainerEjectedEvent) {\n final ID departedContainerID = ((evt instanceof IContainerDisconnectedEvent) ? ((IContainerDisconnectedEvent) evt).getTargetID() : ((IContainerEjectedEvent) evt).getTargetID());\n ID connectedID = targetID;\n if (connectedID == null || connectedID.equals(departedContainerID)) {\n chatroomview.disconnected();\n isContainerConnected = false;\n }\n } else if (evt instanceof IContainerConnectedEvent) {\n isContainerConnected = true;\n chatroomview.setEnabled(true);\n String[] roomsForTarget = getRoomsForTarget();\n for (int i = 0; i < roomsForTarget.length; i++) {\n IChatRoomInfo info = manager.getChatRoomInfo(roomsForTarget[i]);\n chatroomview.joinRoom(info, getPasswordForChatRoomConnect(info));\n }\n }\n}\n"
|
"private Parameters getParameters() {\n final Drone drone = this.droneMgr.getDrone();\n final Map<String, com.o3dr.services.android.lib.drone.property.Parameter> proxyParams = new HashMap<String, com.o3dr.services.android.lib.drone.property.Parameter>();\n List<Parameter> droneParameters = drone.getParameters().getParametersList();\n if (!droneParameters.isEmpty()) {\n for (Parameter param : droneParameters) {\n if (param.name != null) {\n proxyParams.put(param.name, new com.o3dr.services.android.lib.drone.property.Parameter(param.name, param.value, param.type));\n }\n }\n try {\n final VehicleProfile profile = drone.getVehicleProfile();\n if (profile != null) {\n String metadataType = profile.getParameterMetadataType();\n if (metadataType != null) {\n ParameterMetadataLoader.load(this.context, metadataType, proxyParams);\n }\n }\n } catch (IOException e) {\n Log.e(TAG, e.getMessage(), e);\n } catch (XmlPullParserException e) {\n Log.e(TAG, e.getMessage(), e);\n }\n }\n return new Parameters(new ArrayList<com.o3dr.services.android.lib.drone.property.Parameter>(proxyParams.values()));\n}\n"
|
"public static CharGroup findWordInTree(Node node, final String string) {\n int index = 0;\n final StringBuilder checker = DBG ? new StringBuilder() : null;\n final int[] codePoints = getCodePoints(string);\n CharGroup currentGroup;\n do {\n int indexOfGroup = findIndexOfChar(node, codePoints[index]);\n if (CHARACTER_NOT_FOUND == indexOfGroup)\n return null;\n currentGroup = node.mData.get(indexOfGroup);\n if (codePoints.length - index < currentGroup.mChars.length)\n return null;\n int newIndex = index;\n while (newIndex < codePoints.length && newIndex - index < currentGroup.mChars.length) {\n if (currentGroup.mChars[newIndex - index] != codePoints[newIndex])\n return null;\n newIndex++;\n }\n index = newIndex;\n if (DBG)\n checker.append(new String(currentGroup.mChars, 0, currentGroup.mChars.length));\n if (index < codePoints.length) {\n node = currentGroup.mChildren;\n }\n } while (null != node && index < codePoints.length);\n if (index < codePoints.length)\n return null;\n if (!currentGroup.isTerminal())\n return null;\n if (DBG && !string.equals(checker.toString()))\n return null;\n return currentGroup;\n}\n"
|
"public void optimizeMethod(MethodInfo method) {\n ConstantPoolGen cpg = method.getConstantPoolGen();\n InstructionList il = method.getCode().getInstructionList();\n InvokeMap invokeMap = new InvokeMap();\n for (InvokeSite invoke : method.getCode().getInvokeSites()) {\n CallString cs = new CallString(invoke);\n while (invoke != null) {\n MethodInfo invokee = helper.devirtualize(cs);\n if (checkInvoke(invoke, cs, invokee, invokeMap)) {\n invoke = performSimpleInline(invoke, invokee, invokeMap);\n inlineCounter++;\n if (invokeMap.getInvokeSite() != null) {\n cs.push(invokeMap.getInvokeSite());\n } else {\n break;\n }\n } else {\n break;\n }\n }\n }\n}\n"
|
"private static void injectViews(Object classObj, ViewFinder viewFinder) throws IllegalAccessException, IllegalArgumentException {\n Class<?> clazz = classObj.getClass();\n Field[] fields = clazz.getDeclaredFields();\n for (Field field : fields) {\n if (field.isAnnotationPresent(ViewInject.class)) {\n ViewInject viewInject = field.getAnnotation(ViewInject.class);\n int id = viewInject.value();\n if (id > 0) {\n field.setAccessible(true);\n View v = viewFinder.findViewById(id);\n if (v != null) {\n field.set(classObj, v);\n }\n }\n }\n }\n}\n"
|
"public String regexNotLike(String element, String regex) {\n return surroundWithSpaces(element + surroundWithSpaces(this.not() + getRegularExpressionFunction()) + regex);\n}\n"
|
"protected String post(Request req) {\n try {\n DataStore<Entity> store = datastoreHolder.get();\n Entity data = store.createNew();\n InputStream in = req.getInputStream();\n if (log.isTraceEnabled()) {\n in = FileUtil.print(in);\n }\n Entity inData = jsonHolder.get().readFrom(null, new InputStreamReader(in));\n store.add(inData);\n store.flush();\n return req.getAddress().getPath() + data.getID();\n } catch (IOException e) {\n log.error(e);\n throw new RuntimeException(e);\n }\n}\n"
|
"public static void createIDTypesAndMapping() {\n IDCategory geneIDCategory = IDCategory.registerCategory(EGeneIDTypes.GENE.name());\n IDType david = IDType.registerType(EGeneIDTypes.DAVID.name(), geneIDCategory, EGeneIDTypes.DAVID.getColumnType());\n IDType.registerType(EGeneIDTypes.GENE_NAME.name(), geneIDCategory, EGeneIDTypes.GENE_NAME.getColumnType());\n IDType geneSymbol = IDType.registerType(EGeneIDTypes.GENE_SYMBOL.name(), geneIDCategory, EGeneIDTypes.GENE_SYMBOL.getColumnType());\n geneIDCategory.setHumanReadableIDType(geneSymbol);\n IDType.registerType(EGeneIDTypes.BIOCARTA_GENE_ID.name(), geneIDCategory, EGeneIDTypes.BIOCARTA_GENE_ID.getColumnType());\n IDType.registerType(EGeneIDTypes.REFSEQ_MRNA.name(), geneIDCategory, EGeneIDTypes.REFSEQ_MRNA.getColumnType());\n IDType.registerType(EGeneIDTypes.ENSEMBL_GENE_ID.name(), geneIDCategory, EGeneIDTypes.ENSEMBL_GENE_ID.getColumnType());\n IDType.registerType(EGeneIDTypes.ENTREZ_GENE_ID.name(), geneIDCategory, EGeneIDTypes.ENTREZ_GENE_ID.getColumnType());\n IDType.registerType(EGeneIDTypes.PATHWAY_VERTEX.name(), geneIDCategory, EGeneIDTypes.PATHWAY_VERTEX.getColumnType());\n IDType.registerType(EGeneIDTypes.PATHWAY.name(), geneIDCategory, EGeneIDTypes.PATHWAY.getColumnType());\n geneIDCategory.setPrimaryMappingType(david);\n geneIDCategory.setHumanReadableIDType(geneSymbol);\n geneIDCategory.setDenomination(\"String_Node_Str\");\n String fileName = \"String_Node_Str\" + GeneralManager.get().getBasicInfo().getOrganism();\n IDMappingParser.loadMapping(fileName + \"String_Node_Str\", 0, -1, IDType.getIDType(\"String_Node_Str\"), IDType.getIDType(\"String_Node_Str\"), \"String_Node_Str\", geneIDCategory, true, true, false, null, null);\n IDMappingParser.loadMapping(fileName + \"String_Node_Str\", 0, -1, IDType.getIDType(\"String_Node_Str\"), IDType.getIDType(\"String_Node_Str\"), \"String_Node_Str\", geneIDCategory, false, true, false, null, null);\n IDMappingParser.loadMapping(fileName + \"String_Node_Str\", 0, -1, IDType.getIDType(\"String_Node_Str\"), IDType.getIDType(\"String_Node_Str\"), \"String_Node_Str\", geneIDCategory, false, true, false, null, null);\n IDMappingParser.loadMapping(fileName + \"String_Node_Str\", 0, -1, IDType.getIDType(\"String_Node_Str\"), IDType.getIDType(\"String_Node_Str\"), \"String_Node_Str\", geneIDCategory, false, true, false, null, null);\n IDMappingParser.loadMapping(fileName + \"String_Node_Str\", 0, -1, IDType.getIDType(\"String_Node_Str\"), IDType.getIDType(\"String_Node_Str\"), \"String_Node_Str\", geneIDCategory, false, true, false, null, null);\n IDMappingParser.loadMapping(\"String_Node_Str\" + GeneralManager.get().getBasicInfo().getOrganism() + \"String_Node_Str\", 0, -1, IDType.getIDType(\"String_Node_Str\"), IDType.getIDType(\"String_Node_Str\"), \"String_Node_Str\", geneIDCategory, true, true, true, IDType.getIDType(\"String_Node_Str\"), IDType.getIDType(\"String_Node_Str\"));\n IDCategory sampleIDCategory = IDCategory.registerCategory(\"String_Node_Str\");\n IDType sampleID = IDType.registerType(\"String_Node_Str\", sampleIDCategory, EDataType.STRING);\n sampleIDCategory.setHumanReadableIDType(sampleID);\n IDCategory tcgaSampleIDCategory = IDCategory.registerCategory(\"String_Node_Str\");\n IDType tcgaSample = IDType.registerType(\"String_Node_Str\", tcgaSampleIDCategory, EDataType.STRING);\n IDTypeParsingRules tcgaIDTypeParsingRules = new IDTypeParsingRules();\n tcgaIDTypeParsingRules.setReplacementExpression(\"String_Node_Str\", \"String_Node_Str\");\n tcgaIDTypeParsingRules.setSubStringExpression(\"String_Node_Str\");\n tcgaSample.setIdTypeParsingRules(tcgaIDTypeParsingRules);\n tcgaSampleIDCategory.setHumanReadableIDType(tcgaSample);\n}\n"
|
"public long[] getRemoteSSRCs(MediaType mediaType) {\n ColibriConferenceIQ.Channel channel = getColibriChannel(mediaType);\n if (channel != null)\n return channel.getSSRCs();\n long ssrc = super.getRemoteSSRC(mediaType);\n return (ssrc == SSRC_UNKNOWN) ? ColibriConferenceIQ.NO_SSRCS : new int[] { (int) ssrc };\n}\n"
|
"public static OMNode getFirstMatchingNode(final String xpath, final OMElement elt) throws MalformedConfigurationFileException {\n AXIOMXPath axiomXpath;\n List<OMNode> nodeList = null;\n try {\n axiomXpath = new AXIOMXPath(xpath);\n nodeList = axiomXpath.selectNodes(elt);\n return nodeList.isEmpty() ? null : nodeList.get(0);\n } catch (JaxenException e) {\n String msg = \"String_Node_Str\" + xpath + \"String_Node_Str\";\n LOG.error(msg, e);\n throw new MalformedConfigurationFileException(msg, e);\n }\n}\n"
|
"public static void testGaussian0() throws IOException, ClassNotFoundException {\n BayesianNetwork oneNormalVarBN = BayesianNetworkLoader.loadFromFile(\"String_Node_Str\");\n for (int i = 0; i < 10; i++) {\n Variable varA = oneNormalVarBN.getStaticVariables().getVariableByName(\"String_Node_Str\");\n Normal dist = oneNormalVarBN.getDistribution(varA);\n dist.setMean(2000);\n dist.setVariance(30);\n oneNormalVarBN.randomInitialization(new Random(i));\n System.out.println(\"String_Node_Str\");\n BayesianNetworkSampler sampler = new BayesianNetworkSampler(oneNormalVarBN);\n sampler.setSeed(0);\n DataStream<DataInstance> data = sampler.sampleToDataBase(1000);\n System.out.println(LearningEngineForBN.learnParameters(oneNormalVarBN.getDAG(), data).toString());\n StreamingVariationalBayesVMP svb = new StreamingVariationalBayesVMP();\n svb.setWindowsSize(1000);\n svb.setSeed(i);\n VMP vmp = svb.getPlateuVMP().getVMP();\n vmp.setTestELBO(true);\n vmp.setMaxIter(100);\n vmp.setThreshold(0.0001);\n BayesianLearningEngineForBN.setBayesianLearningAlgorithmForBN(svb);\n BayesianLearningEngineForBN.setDAG(oneNormalVarBN.getDAG());\n BayesianLearningEngineForBN.setDataStream(data);\n BayesianLearningEngineForBN.runLearning();\n BayesianNetwork learntOneNormalVarBN = BayesianLearningEngineForBN.getLearntBayesianNetwork();\n System.out.println(oneNormalVarBN.toString());\n System.out.println(learntOneNormalVarBN.toString());\n assertTrue(oneNormalVarBN.equalBNs(learntOneNormalVarBN, 0.1));\n }\n}\n"
|
"public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {\n return new String[] { IDocument.DEFAULT_CONTENT_TYPE, CFPartitionScanner.HTM_END_TAG, CFPartitionScanner.HTM_TAG_ATTRIBS, CFPartitionScanner.HTM_START_TAG_BEGIN, CFPartitionScanner.HTM_START_TAG_END, CFPartitionScanner.CF_COMMENT, CFPartitionScanner.HTM_COMMENT, CFPartitionScanner.DOCTYPE, CFPartitionScanner.CF_START_TAG_BEGIN, CFPartitionScanner.CF_START_TAG_END, CFPartitionScanner.CF_TAG_ATTRIBS, CFPartitionScanner.CF_END_TAG, CFPartitionScanner.CF_SCRIPT, CFPartitionScanner.J_SCRIPT, CFPartitionScanner.CSS, CFPartitionScanner.SQL, CFPartitionScanner.UNK_TAG, CFPartitionScanner.FORM_END_TAG, CFPartitionScanner.FORM_START_TAG_BEGIN, CFPartitionScanner.FORM_TAG_ATTRIBS, CFPartitionScanner.FORM_START_TAG_END, CFPartitionScanner.TABLE_END_TAG, CFPartitionScanner.TABLE_START_TAG_BEGIN, CFPartitionScanner.TABLE_TAG_ATTRIBS, CFPartitionScanner.TABLE_START_TAG_END };\n}\n"
|
"public ImagePlus applyClassifier(final Instances data, int w, int h, int numThreads, boolean probabilityMaps) {\n if (numThreads == 0)\n numThreads = Runtime.getRuntime().availableProcessors();\n final int numClasses = data.numClasses();\n final int numInstances = data.numInstances();\n final int numChannels = (probabilityMaps ? numClasses : 1);\n final int numSlices = (numChannels * numInstances) / (w * h);\n IJ.showStatus(\"String_Node_Str\");\n final long start = System.currentTimeMillis();\n exe = Executors.newFixedThreadPool(numThreads);\n final double[][][] results = new double[numThreads][][];\n final Instances[] partialData = new Instances[numThreads];\n final int partialSize = numInstances / numThreads;\n Future<double[][]>[] fu = new Future[numThreads];\n final AtomicInteger counter = new AtomicInteger();\n for (int i = 0; i < numThreads; i++) {\n if (Thread.currentThread().isInterrupted())\n return null;\n if (i == numThreads - 1)\n partialData[i] = new Instances(data, i * partialSize, numInstances - i * partialSize);\n else\n partialData[i] = new Instances(data, i * partialSize, partialSize);\n AbstractClassifier classifierCopy = null;\n try {\n classifierCopy = (AbstractClassifier) (AbstractClassifier.makeCopy(classifier));\n } catch (Exception e) {\n IJ.log(\"String_Node_Str\");\n e.printStackTrace();\n }\n fu[i] = exe.submit(classifyInstances(partialData[i], classifierCopy, counter, probabilityMaps));\n }\n ScheduledExecutorService monitor = Executors.newScheduledThreadPool(1);\n ScheduledFuture task = monitor.scheduleWithFixedDelay(new Runnable() {\n public void run() {\n IJ.showProgress(counter.get(), numInstances);\n }\n }, 0, 1, TimeUnit.SECONDS);\n for (int i = 0; i < numThreads; i++) {\n try {\n results[i] = fu[i].get();\n } catch (InterruptedException e) {\n return null;\n } catch (ExecutionException e) {\n e.printStackTrace();\n return null;\n } finally {\n exe.shutdown();\n task.cancel(true);\n monitor.shutdownNow();\n IJ.showProgress(1);\n }\n }\n exe.shutdown();\n double[][] classificationResult;\n classificationResult = new double[numChannels][numInstances];\n for (int i = 0; i < numThreads; i++) for (int c = 0; c < numChannels; c++) System.arraycopy(results[i][c], 0, classificationResult[c], i * partialSize, results[i][c].length);\n IJ.showProgress(1.0);\n final long end = System.currentTimeMillis();\n IJ.log(\"String_Node_Str\" + (end - start) + \"String_Node_Str\");\n double[] classifiedSlice = new double[w * h];\n final ImageStack classStack = new ImageStack(w, h);\n for (int i = 0; i < numSlices / numChannels; i++) {\n for (int c = 0; c < numChannels; c++) {\n System.arraycopy(classificationResult[c], i * (w * h), classifiedSlice, 0, w * h);\n ImageProcessor classifiedSliceProcessor = new FloatProcessor(w, h, classifiedSlice);\n classStack.addSlice(probabilityMaps ? classLabels[c] : \"String_Node_Str\", classifiedSliceProcessor);\n }\n }\n ImagePlus classImg = new ImagePlus(probabilityMaps ? \"String_Node_Str\" : \"String_Node_Str\", classStack);\n return classImg;\n}\n"
|
"protected void writeSimpleMasterPage(DataOutputStream out, SimpleMasterPageDesign design) throws IOException {\n writeMasterPage(out, design);\n boolean showHeaderOnFirst = design.isShowHeaderOnFirst();\n if (!showHeaderOnFirst) {\n IOUtil.writeShort(out, FIELD_SHOW_HEADER_ON_FIRST);\n IOUtil.writeBool(out, showHeaderOnFirst);\n }\n boolean showFooterOnLast = design.isShowFooterOnLast();\n if (showFooterOnLast) {\n IOUtil.writeShort(out, FIELD_SHOW_FOOTER_ON_LAST);\n IOUtil.writeBool(out, showFooterOnLast);\n }\n boolean floatingFooter = design.isFloatingFooter();\n if (floatingFooter) {\n IOUtil.writeShort(out, FIELD_FLOATING_FOOTER);\n IOUtil.writeBool(out, floatingFooter);\n }\n DimensionType headerHeight = design.getHeaderHeight();\n if (headerHeight != null) {\n IOUtil.writeShort(out, FEILD_HEADER_HEIGHT);\n writeDimension(out, headerHeight);\n }\n DimensionType footerHeigh = design.getFooterHeight();\n if (footerHeigh != null) {\n IOUtil.writeShort(out, FEILD_FOOTER_HEIGHT);\n writeDimension(out, footerHeigh);\n }\n}\n"
|
"public void complete(ActionReport report, Payload.Outbound outbound) {\n if (commandProgress != null && report != null && report.getActionExitCode() == ExitCode.SUCCESS) {\n commandProgress.complete();\n }\n this.payload = outbound;\n complete(report);\n if (isManagedJob) {\n JobPersistence jobPersistenceService = Globals.getDefaultHabitat().getService(JobPersistenceService.class);\n List<String> userList = SubjectUtil.getUsernamesFromSubject(subject);\n jobPersistenceService.persist(new JobInfo(id, commandName, executionDate, state.name(), \"String_Node_Str\", report.getMessage()));\n }\n}\n"
|
"public void loadWorldInventory(Player player, String world) {\n boolean newMember = true;\n if (plugin.sharesMap.containsKey(world)) {\n world = plugin.sharesMap.get(world);\n }\n String worldCheckName = \"String_Node_Str\" + world;\n for (String inventory : plugin.inventories.keySet()) {\n String[] parts = inventory.split(\"String_Node_Str\");\n if (parts[0].equals(player.getName())) {\n newMember = false;\n if (parts[1].equals(worldCheckName)) {\n loadInventory(plugin.inventories.get(inventory), player);\n plugin.debugger.debugEvent(MultiInvEvent.INVENTORY_LOAD, new String[] { inventory });\n }\n }\n }\n if (!newMember) {\n loadNewInventory(player);\n }\n}\n"
|
"public boolean isAvailable() {\n return protectionGetOwnerMethod != null;\n}\n"
|
"private void startConnection(ManagedConnection conn) throws IOException {\n Thread.currentThread().setName(\"String_Node_Str\");\n if (conn.isGUESSUltrapeer()) {\n QueryUnicaster.instance().addUnicastEndpoint(conn.getInetAddress(), conn.getListeningPort());\n }\n}\n"
|
"public static void removeServiceGroup(String name) throws RestAPIException {\n try {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + name);\n }\n AutoscalerServiceClient asServiceClient = getAutoscalerServiceClient();\n StratosManagerServiceClient smServiceClient = getStratosManagerServiceClient();\n if (!smServiceClient.canCartirdgeGroupBeRemoved(name)) {\n String message = \"String_Node_Str\" + name + \"String_Node_Str\";\n log.error(message);\n throw new RestAPIException(message);\n }\n ServiceGroup serviceGroup = asServiceClient.getServiceGroup(name);\n asServiceClient.undeployServiceGroupDefinition(name);\n if (serviceGroup.getCartridges() != null) {\n String[] cartridgeNames = serviceGroup.getCartridges();\n smServiceClient.removeUsedCartridgesInCartridgeGroups(name, cartridgeNames);\n }\n if (serviceGroup.getGroups() != null) {\n ServiceGroup[] cartridgeGroups = serviceGroup.getGroups();\n String[] cartridgeGroupNames = new String[cartridgeGroups.length];\n int i = 0;\n for (ServiceGroup cartridgeGroup : cartridgeGroups) {\n cartridgeGroupNames.add(cartridgeGroup.getName());\n }\n smServiceClient.removeUsedCartridgeGroupsInCartridgeSubGroups(name, (String[]) cartridgeGroupNames.toArray());\n }\n } catch (Exception e) {\n throw new RestAPIException(e);\n }\n log.info(\"String_Node_Str\" + name);\n}\n"
|
"public static boolean isDefaultValue(Map.Entry<PropertyDescriptor<?>, Object> entry) {\n PropertyDescriptor<?> desc = entry.getKey();\n Object value = entry.getValue();\n return areEqual(desc.defaultValue(), value);\n}\n"
|
"public static UFgExample get2ndOrderGraOnlyFg(AnnoSentence sent, CorpusStatistics cs, FeatureNames alphabet, int numParams, boolean onlyFast) {\n FactorGraph fg = new FactorGraph();\n DepParseFeatureExtractorPrm fePrm = new DepParseFeatureExtractorPrm();\n fePrm.featureHashMod = numParams;\n fePrm.firstOrderTpls = TemplateSets.getFromResource(TemplateSets.mcdonaldDepFeatsResource);\n FeatureExtractor fe = onlyFast ? new BitshiftDepParseFeatureExtractor(sent, cs, numParams, alphabet) : new DepParseFeatureExtractor(fePrm, sent, cs, alphabet);\n DepParseFactorGraphBuilderPrm fgPrm = new DepParseFactorGraphBuilderPrm();\n fgPrm.grandparentFactors = false;\n fgPrm.siblingFactors = false;\n DepParseFactorGraphBuilder builder = new DepParseFactorGraphBuilder(fgPrm);\n builder.build(sent, fe, fg);\n UnlabeledFgExample ex = new UnlabeledFgExample(fg, new VarConfig());\n return ex;\n}\n"
|
"public static <Q extends Quantity<Q>> String format(Q quantity, int digitCount, boolean keepTraillingZero, boolean displayUnit, Unit<Q> ptargetUnit) {\n String result = StringUtils.EMPTY;\n Unit<Q> localTargetUnit = ptargetUnit;\n DecimalFormat df = new DecimalFormat(\"String_Node_Str\", DecimalFormatSymbols.getInstance(Locale.ENGLISH));\n if (keepTraillingZero) {\n df.setMinimumFractionDigits(digitCount);\n }\n df.setMaximumFractionDigits(digitCount);\n result = df.format(quantity.doubleValue(localTargetUnit));\n if (displayUnit) {\n result += ptargetUnit.getSymbol();\n }\n return result;\n}\n"
|
"public ASTExtractionBlock getASTExtractionBlock() {\n List<VariableDeclarationStatement> allVariableDeclarationStatements = new ArrayList<VariableDeclarationStatement>();\n List<VariableDeclarationExpression> allVariableDeclarationExpressions = new ArrayList<VariableDeclarationExpression>();\n List<LocalVariableInstructionObject> discreteLocalVariableInstructions = new ArrayList<LocalVariableInstructionObject>();\n for (AbstractStatement abstractStatement : extractionBlock.getStatementsForExtraction()) {\n List<LocalVariableInstructionObject> instructionList = abstractStatement.getLocalVariableInstructions();\n for (LocalVariableInstructionObject instruction : instructionList) {\n if (!discreteLocalVariableInstructions.contains(instruction)) {\n discreteLocalVariableInstructions.add(instruction);\n VariableDeclarationStatement variableDeclarationStatement = sourceMethod.getMethodObject().getVariableDeclarationStatement(instruction.generateLocalVariableDeclaration());\n if (variableDeclarationStatement != null) {\n allVariableDeclarationStatements.add(variableDeclarationStatement);\n } else {\n VariableDeclarationExpression variableDeclarationExpression = sourceMethod.getMethodObject().getVariableDeclarationExpression(instruction.generateLocalVariableDeclaration());\n if (variableDeclarationExpression != null)\n allVariableDeclarationExpressions.add(variableDeclarationExpression);\n }\n }\n }\n }\n ASTExtractionBlock astExtractionBlock = new ASTExtractionBlock(extractionBlock.getExtractedMethodName(), getReturnVariableDeclarationFragment(), getReturnVariableDeclarationStatement(), getStatementsForExtraction(), allVariableDeclarationStatements, allVariableDeclarationExpressions, extractionBlock.getAssignmentOperators());\n if (extractionBlock.getParentStatementForCopy() != null)\n astExtractionBlock.setParentStatementForCopy(extractionBlock.getParentStatementForCopy().getStatement());\n for (LocalVariableDeclarationObject lvdo : extractionBlock.getAdditionalRequiredVariableDeclarations()) {\n VariableDeclarationStatement variableDeclarationStatement = extractionBlock.getAdditionalRequiredVariableDeclarationStatement(lvdo);\n astExtractionBlock.addRequiredVariableDeclarationStatement(getVariableDeclarationFragment(lvdo, variableDeclarationStatement), variableDeclarationStatement);\n }\n return astExtractionBlock;\n}\n"
|
"public boolean performFinish() {\n boolean formIsPerformed = true;\n connectionItem.setConnection((SalesforceSchemaConnection) EcoreUtil.copy(temConnection));\n if (formIsPerformed) {\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n try {\n if (creation) {\n factory.create(connectionItem, new Path(\"String_Node_Str\"));\n } else {\n RepositoryUpdateManager.updateFileConnection(connectionItem);\n updateConnectionItem();\n }\n ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());\n ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());\n } catch (PersistenceException e) {\n String detailError = e.toString();\n new ErrorDialogWidthDetailArea(getShell(), PID, Messages.getString(\"String_Node_Str\"), detailError);\n log.error(Messages.getString(\"String_Node_Str\") + \"String_Node_Str\" + detailError);\n return false;\n }\n return true;\n } else {\n return false;\n }\n}\n"
|
"public void callParticipantRemoved(CallParticipantEvent evt) {\n if (evt.getSourceCall() == call) {\n CallParticipant participant = evt.getSourceCallParticipant();\n CallParticipantPanel participantPanel = (CallParticipantPanel) participantsPanels.get(participant);\n if (participantPanel != null) {\n CallParticipantState state = participant.getState();\n participantPanel.setState(state.getStateString());\n participantPanel.stopCallTimer();\n GuiCallParticipantRecord participantRecord = new GuiCallParticipantRecord(participantPanel.getParticipantName(), participantPanel.getCallType(), participantPanel.getStartTime(), participantPanel.getEndTime());\n callManager.getMainFrame().getCallListManager().addCallRecord(1, participantRecord);\n this.participantsPanels.remove(participant);\n if (participantsPanels.size() != 0) {\n Timer timer = new Timer(5000, new RemoveParticipantPanelListener(participantPanel));\n timer.setRepeats(false);\n timer.start();\n }\n this.revalidate();\n this.repaint();\n }\n }\n}\n"
|
"public static void loadSiliconRecipes() {\n GameRegistry.addShapelessRecipe(new ItemStack(BuildCraftTransport.gateCopier, 1), new ItemStack(BuildCraftCore.wrenchItem), EnumRedstoneChipset.RED.getStack(1));\n BuildcraftRecipeRegistry.assemblyTable.addRecipe(\"String_Node_Str\", 5000, PipeWire.RED.getStack(8), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n BuildcraftRecipeRegistry.assemblyTable.addRecipe(\"String_Node_Str\", 5000, PipeWire.BLUE.getStack(8), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n BuildcraftRecipeRegistry.assemblyTable.addRecipe(\"String_Node_Str\", 5000, PipeWire.GREEN.getStack(8), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n BuildcraftRecipeRegistry.assemblyTable.addRecipe(\"String_Node_Str\", 5000, PipeWire.YELLOW.getStack(8), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n for (int i = 0; i < 16; i++) {\n BuildcraftRecipeRegistry.assemblyTable.addRecipe(\"String_Node_Str\" + i, 10000, new ItemStack(BuildCraftTransport.lensItem, 2, i), ColorUtils.getOreDictionaryName(15 - i), \"String_Node_Str\", \"String_Node_Str\");\n BuildcraftRecipeRegistry.assemblyTable.addRecipe(\"String_Node_Str\" + i, 10000, new ItemStack(BuildCraftTransport.lensItem, 2, i + 16), ColorUtils.getOreDictionaryName(15 - i), \"String_Node_Str\", Blocks.iron_bars);\n }\n BuildcraftRecipeRegistry.assemblyTable.addRecipe(\"String_Node_Str\", (int) Math.round(100000 * BuildCraftTransport.gateCostMultiplier), ItemGate.makeGateItem(GateDefinition.GateMaterial.REDSTONE, GateDefinition.GateLogic.AND), ItemRedstoneChipset.Chipset.RED.getStack(), PipeWire.RED.getStack());\n addGateRecipe(\"String_Node_Str\", (int) Math.round(200000 * BuildCraftTransport.gateCostMultiplier), GateDefinition.GateMaterial.IRON, ItemRedstoneChipset.Chipset.IRON, PipeWire.RED, PipeWire.BLUE);\n addGateRecipe(\"String_Node_Str\", (int) Math.round(400000 * BuildCraftTransport.gateCostMultiplier), GateDefinition.GateMaterial.GOLD, ItemRedstoneChipset.Chipset.GOLD, PipeWire.RED, PipeWire.BLUE, PipeWire.GREEN);\n addGateRecipe(\"String_Node_Str\", (int) Math.round(600000 * BuildCraftTransport.gateCostMultiplier), GateDefinition.GateMaterial.QUARTZ, ItemRedstoneChipset.Chipset.QUARTZ, PipeWire.RED, PipeWire.BLUE, PipeWire.GREEN);\n addGateRecipe(\"String_Node_Str\", (int) Math.round(800000 * BuildCraftTransport.gateCostMultiplier), GateDefinition.GateMaterial.DIAMOND, ItemRedstoneChipset.Chipset.DIAMOND, PipeWire.RED, PipeWire.BLUE, PipeWire.GREEN, PipeWire.YELLOW);\n addGateRecipe(\"String_Node_Str\", (int) Math.round(1200000 * BuildCraftTransport.gateCostMultiplier), GateDefinition.GateMaterial.EMERALD, ItemRedstoneChipset.Chipset.EMERALD, PipeWire.RED, PipeWire.BLUE, PipeWire.GREEN, PipeWire.YELLOW);\n BuildcraftRecipeRegistry.integrationTable.addRecipe(new GateExpansionRecipe());\n BuildcraftRecipeRegistry.integrationTable.addRecipe(new AdvancedFacadeRecipe());\n GateExpansions.registerExpansion(GateExpansionPulsar.INSTANCE, ItemRedstoneChipset.Chipset.PULSATING.getStack());\n GateExpansions.registerExpansion(GateExpansionTimer.INSTANCE, ItemRedstoneChipset.Chipset.QUARTZ.getStack());\n GateExpansions.registerExpansion(GateExpansionRedstoneFader.INSTANCE, ItemRedstoneChipset.Chipset.COMP.getStack());\n}\n"
|
"public <L, R> void bulkAddEdges(SqlgGraph sqlgGraph, SchemaTable in, SchemaTable out, String edgeLabel, Pair<String, String> idFields, List<Pair<L, R>> uids) {\n if (!sqlgGraph.tx().isInStreamingBatchMode() && !sqlgGraph.tx().isInStreamingWithLockBatchMode()) {\n throw SqlgExceptions.invalidMode(\"String_Node_Str\" + BatchManager.BatchModeType.STREAMING + \"String_Node_Str\" + BatchManager.BatchModeType.STREAMING_WITH_LOCK + \"String_Node_Str\");\n }\n if (!uids.isEmpty()) {\n Map<String, PropertyType> columns = new HashMap<>();\n Map<String, PropertyType> inProperties = sqlgGraph.getSchemaManager().getTableFor(in.withPrefix(SchemaManager.VERTEX_PREFIX));\n Map<String, PropertyType> outProperties = sqlgGraph.getSchemaManager().getTableFor(out.withPrefix(SchemaManager.VERTEX_PREFIX));\n PropertyType inPropertyType;\n if (idFields.getLeft().equals(SchemaManager.ID)) {\n inPropertyType = PropertyType.INTEGER;\n } else {\n inPropertyType = inProperties.get(idFields.getLeft());\n }\n PropertyType outPropertyType;\n if (idFields.getRight().equals(SchemaManager.ID)) {\n outPropertyType = PropertyType.INTEGER;\n } else {\n outPropertyType = outProperties.get(idFields.getRight());\n }\n columns.put(\"String_Node_Str\", outPropertyType);\n columns.put(\"String_Node_Str\", inPropertyType);\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[6];\n random.nextBytes(bytes);\n String tmpTableIdentified = Base64.getEncoder().encodeToString(bytes);\n tmpTableIdentified = SchemaManager.BULK_TEMP_EDGE + tmpTableIdentified;\n sqlgGraph.getSchemaManager().createTempTable(tmpTableIdentified, columns);\n this.copyInBulkTempEdges(sqlgGraph, SchemaTable.of(in.getSchema(), tmpTableIdentified), uids, inPropertyType, outPropertyType);\n sqlgGraph.getSchemaManager().ensureEdgeTableExist(in.getSchema(), edgeLabel, out, in);\n StringBuilder sql = new StringBuilder(\"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(in.getSchema()));\n sql.append(\"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(SchemaManager.EDGE_PREFIX + edgeLabel));\n sql.append(\"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(in.getSchema() + \"String_Node_Str\" + in.getTable() + SchemaManager.OUT_VERTEX_COLUMN_END));\n sql.append(\"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(out.getSchema() + \"String_Node_Str\" + out.getTable() + SchemaManager.IN_VERTEX_COLUMN_END));\n sql.append(\"String_Node_Str\");\n sql.append(\"String_Node_Str\");\n sql.append(in.getSchema() + \"String_Node_Str\" + in.getTable() + SchemaManager.OUT_VERTEX_COLUMN_END);\n sql.append(\"String_Node_Str\");\n sql.append(out.getSchema() + \"String_Node_Str\" + out.getTable() + SchemaManager.IN_VERTEX_COLUMN_END);\n sql.append(\"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(in.getSchema()));\n sql.append(\"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(SchemaManager.VERTEX_PREFIX + in.getTable()));\n sql.append(\"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(tmpTableIdentified) + \"String_Node_Str\" + this.maybeWrapInQoutes(idFields.getLeft()) + \"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(out.getSchema()));\n sql.append(\"String_Node_Str\");\n sql.append(this.maybeWrapInQoutes(SchemaManager.VERTEX_PREFIX + out.getTable()));\n sql.append(\"String_Node_Str\" + this.maybeWrapInQoutes(idFields.getRight()));\n if (logger.isDebugEnabled()) {\n logger.debug(sql.toString());\n }\n Connection conn = sqlgGraph.tx().getConnection();\n try (PreparedStatement preparedStatement = conn.prepareStatement(sql.toString())) {\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n }\n}\n"
|
"public void onIQ(final IQ iq) {\n if (IQ.isSuccess(iq)) {\n handler.onStorageResponse(new PrivateStorageResponseEvent(iq));\n }\n}\n"
|
"public Object clone(Workspace workspace) throws CloneNotSupportedException {\n Clock newObject = (Clock) super.clone(workspace);\n try {\n newObject.attributeChanged(newObject.offsets);\n newObject.attributeChanged(values);\n ArrayType valuesArrayType = (ArrayType) newObject.values.getType();\n InequalityTerm elementTerm = valuesArrayType.getElementTypeTerm();\n newObject.output.setTypeAtLeast(elementTerm);\n } catch (IllegalActionException ex) {\n throw new InternalErrorException(ex.getMessage());\n }\n return newObject;\n}\n"
|
"public boolean registerApplianceStatusListener(ApplianceStatusListener applianceStatusListener) {\n if (applianceStatusListener == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n boolean result = applianceStatusListeners.add(applianceStatusListener);\n if (result && isInitialized()) {\n onUpdate();\n for (HomeDevice hd : getHomeDevices()) {\n applianceStatusListener.onApplianceAdded(hd);\n }\n }\n return result;\n}\n"
|
"public void onSuccess(String buckTargetResult) {\n try {\n String currentClassPath = currentClass.getPath();\n Map<String, List<String>> pathAndTargetData = mObjectMapper.readValue(buckTargetResult, Map.class);\n String importTargetName = \"String_Node_Str\";\n String importPath = \"String_Node_Str\";\n String currentTargetName = \"String_Node_Str\";\n String currentPath = \"String_Node_Str\";\n for (Map.Entry<String, List<String>> targetAndPathEntry : pathAndTargetData.entrySet()) {\n String[] pathAndTarget = targetAndPathEntry.getValue().get(0).replaceFirst(\"String_Node_Str\", \"String_Node_Str\").split(\"String_Node_Str\");\n if (currentClassPath.contains(targetAndPathEntry.getKey())) {\n currentTargetName = pathAndTarget[1];\n currentPath = pathAndTarget[0];\n } else {\n importTargetName = pathAndTarget[1];\n importPath = pathAndTarget[0];\n }\n }\n BuckDeps.addDeps(mProject, importPath, currentPath, importTargetName, currentTargetName);\n } catch (IOException e) {\n LOG.error(e.toString());\n }\n}\n"
|
"public long findCorrectResourceLimitForAccount(Account account, ResourceType type) {\n long max = Resource.RESOURCE_UNLIMITED;\n ResourceLimitVO limit = _resourceLimitDao.findByOwnerIdAndType(account.getId(), ResourceOwnerType.Account, type);\n if (limit != null) {\n max = limit.getMax().longValue();\n } else {\n Long value = null;\n if (account.getType() == Account.ACCOUNT_TYPE_PROJECT) {\n value = projectResourceLimitMap.get(type);\n } else {\n value = accountResourceLimitMap.get(type);\n }\n if (value != null) {\n return value;\n }\n }\n return max;\n}\n"
|
"public void run() {\n for (Player p : Bukkit.getOnlinePlayers()) {\n if (!sm.config.getCustomConfig().getStringList(\"String_Node_Str\").contains(p.getWorld().getName())) {\n for (Entity e : p.getNearbyEntities(15, 15, 15)) {\n if (!(e instanceof LivingEntity)) {\n continue;\n }\n if (e.hasMetadata(GlobalValues.METATAG)) {\n if (e.getMetadata(GlobalValues.METATAG).size() == 0) {\n e.setMetadata(GlobalValues.METATAG, new FixedMetadataValue(sm, 1));\n }\n String typeString = e.getType().toString();\n int removeAt = sm.config.getCustomConfig().getInt(\"String_Node_Str\");\n if (sm.config.getCustomConfig().isString(\"String_Node_Str\" + typeString + \"String_Node_Str\")) {\n removeAt = sm.config.getCustomConfig().getInt(\"String_Node_Str\" + typeString + \"String_Node_Str\");\n }\n if (e.getMetadata(GlobalValues.METATAG).get(0).asInt() > removeAt) {\n String format = sm.config.getCustomConfig().getString(\"String_Node_Str\");\n if (sm.config.getCustomConfig().isString(\"String_Node_Str\" + typeString + \"String_Node_Str\")) {\n format = sm.config.getCustomConfig().getString(\"String_Node_Str\" + typeString + \"String_Node_Str\");\n }\n if (sm.pluginSupport.getMythicSupport() != null && sm.pluginSupport.getMythicSupport().isMythicMob(e)) {\n typeString = sm.pluginSupport.getMythicSupport().getMythicMobs().getMythicMobInstance(e).getType().getInternalName();\n } else if (sm.translation.getCustomConfig().getBoolean(\"String_Node_Str\")) {\n typeString = \"String_Node_Str\" + sm.translation.getCustomConfig().getString(e.getType().toString());\n }\n String formattedType = toTitleCase(typeString.toLowerCase().replace(\"String_Node_Str\", \"String_Node_Str\"));\n String nearlyFinal = format.replace(\"String_Node_Str\", e.getMetadata(GlobalValues.METATAG).get(0).asString()).replace(\"String_Node_Str\", formattedType).replace(\"String_Node_Str\", e.getType().toString());\n String finalString = ChatColor.translateAlternateColorCodes('&', nearlyFinal);\n if (!finalString.equals(e.getCustomName())) {\n e.setCustomName(finalString);\n }\n if (!(sm.config.getCustomConfig().getBoolean(\"String_Node_Str\") && sm.pluginSupport.isProtocolSupportEnabled() && sm.getVersionId() > 1)) {\n boolean alwaysVisible = sm.config.getCustomConfig().getBoolean(\"String_Node_Str\");\n if (sm.config.getCustomConfig().isString(\"String_Node_Str\" + typeString + \"String_Node_Str\")) {\n alwaysVisible = sm.config.getCustomConfig().getBoolean(\"String_Node_Str\" + typeString + \"String_Node_Str\");\n }\n e.setCustomNameVisible(alwaysVisible);\n }\n }\n }\n }\n for (Entity e : p.getNearbyEntities(30, 30, 30)) {\n if (e.hasMetadata(GlobalValues.METATAG)) {\n if (sm.config.getCustomConfig().getBoolean(\"String_Node_Str\") && sm.pluginSupport.isProtocolSupportEnabled() && sm.getVersionId() > 1) {\n sm.pluginSupport.getProtocolSupport().sendUpdatePacket(p, e);\n }\n }\n }\n }\n }\n}\n"
|
"public void initializeJMS(Project project) {\n JMSSyncProjectMapping jmsSyncProjectMapping = getProjectMapping(project);\n boolean initialized = initDurable(project);\n jmsSyncProjectMapping.setDisabled(!initialized);\n}\n"
|
"public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TvShowViewModel tvShow = adapter.getItem(position);\n tvShowSelected = tvShow;\n Picasso.with(getBaseContext()).load(tvShow.getFanArt()).placeholder(R.drawable.tv_show_placeholder).into(fanArtImageView);\n renderEpisodesHeader(tvShow);\n renderEpisodes(tvShow);\n draggableView.setVisibility(View.VISIBLE);\n draggableView.maximize();\n}\n"
|
"private void loadExifData() {\n Cursor c = getCursor();\n String filePath;\n synchronized (c) {\n filePath = c.getString(mContainer.indexData());\n }\n mExif = new ExifInterface(filePath);\n if (mExifData == null) {\n mExifData = mExif.getAttributes();\n }\n}\n"
|
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n jButton1.setText(\"String_Node_Str\");\n jButton1.setEnabled(false);\n if (jCheckBox1.isSelected()) {\n Browser.enablePaxWebsiteChecking();\n } else {\n if (!jCheckBox2.isSelected()) {\n return;\n }\n }\n if (jCheckBox2.isSelected()) {\n Browser.enableShowclixWebsiteChecking();\n }\n Audio.setPlayAlarm(jCheckBox3.isSelected());\n Email.setUsername(jTextField1.getText());\n Email.setPassword(new String(jPasswordField1.getPassword()));\n Browser.setExpo(jComboBox2.getSelectedItem().toString());\n Browser.setWebsiteLink(Browser.getWebsiteLink(Browser.getExpo()));\n String text = jTextField2.getText();\n if (!text.contains(\"String_Node_Str\")) {\n text += Email.getCarrierExtension(jComboBox1.getSelectedItem().toString());\n }\n String tempText;\n java.util.Iterator<ExtraPhonePanel> myIt = extraPhonePanelList.iterator();\n while (myIt.hasNext()) {\n ExtraPhonePanel panel = myIt.next();\n tempText = panel.getNumber();\n if (tempText.length() < 4) {\n System.out.println(\"String_Node_Str\");\n continue;\n }\n String[] split = tempText.split(\"String_Node_Str\");\n tempText = \"String_Node_Str\";\n for (String split1 : split) {\n split1 = split1.trim();\n tempText += split1;\n if (!split1.contains(\"String_Node_Str\")) {\n tempText += Email.getCarrierExtension(panel.getProvider());\n }\n tempText += \"String_Node_Str\";\n }\n text += \"String_Node_Str\" + tempText;\n System.out.println(\"String_Node_Str\" + tempText);\n }\n System.out.println(\"String_Node_Str\" + text);\n Email.addEmailAddress(text);\n PAXChecker.setRefreshTime(jSlider1.getValue());\n SettingsHandler.setSavePrefs(JCBSavePreferences.isSelected());\n if (JCBSavePreferences.isSelected()) {\n SettingsHandler.setSaveCellnum(JCBSaveCellnum.isSelected());\n SettingsHandler.setSavePax(JCBSaveCheckPax.isSelected());\n SettingsHandler.setSaveShowclix(JCBSaveCheckShowclix.isSelected());\n SettingsHandler.setSaveEvent(JCBSaveEvent.isSelected());\n SettingsHandler.setSaveAlarm(JCBSavePlayAlarm.isSelected());\n SettingsHandler.setSaveProvider(JCBSaveProvider.isSelected());\n SettingsHandler.setSaveRefreshTime(JCBSaveRefreshTime.isSelected());\n SettingsHandler.setSaveEmail(JCBSaveEmail.isSelected());\n }\n this.dispose();\n PAXChecker.startCheckingWebsites();\n}\n"
|
"public String getViewDefinition(String viewName) throws JDBCException {\n String definition = (String) new JdbcTemplate(this).queryForObject(getViewDefinitionSql(viewName), String.class);\n return definition.replaceFirst(\"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"public ScreenModuleGuiBuilder block(String tagnamePos) {\n String monitoring;\n if (currentData.hasKey(tagnamePos + \"String_Node_Str\")) {\n int dim;\n if (currentData.hasKey(tagnamePos + \"String_Node_Str\")) {\n dim = currentData.getInteger(tagnamePos + \"String_Node_Str\");\n } else {\n dim = currentData.getInteger(\"String_Node_Str\");\n }\n World world = mc.thePlayer.worldObj;\n if (dim == world.provider.getDimension()) {\n int x = currentData.getInteger(tagnamePos + \"String_Node_Str\");\n int y = currentData.getInteger(tagnamePos + \"String_Node_Str\");\n int z = currentData.getInteger(tagnamePos + \"String_Node_Str\");\n monitoring = currentData.getString(tagnamePos + \"String_Node_Str\");\n Block block = world.getBlockState(new BlockPos(x, y, z)).getBlock();\n row.add(new BlockRender(mc, gui).setRenderItem(block).setDesiredWidth(20));\n row.add(new Label(mc, gui).setText(x + \"String_Node_Str\" + y + \"String_Node_Str\" + z).setHorizontalAlignment(HorizontalAlignment.ALIGH_LEFT).setDesiredWidth(150));\n } else {\n monitoring = \"String_Node_Str\";\n }\n } else {\n monitoring = \"String_Node_Str\";\n }\n row.add(new Label(mc, gui).setText(monitoring));\n return this;\n}\n"
|
"public void onChange(boolean selfChange) {\n updateBattery();\n}\n"
|
"public void initialise() {\n setAnimationSystem(MenuAnimationSystems.createDefaultSwipeAnimation());\n final UILabel saveGamePath = find(\"String_Node_Str\", UILabel.class);\n if (saveGamePath != null) {\n Path savePath = PathManager.getInstance().getSavesPath();\n saveGamePath.setText(translationSystem.translate(\"String_Node_Str\") + savePath.toAbsolutePath().toString());\n }\n gameList = find(\"String_Node_Str\", UIList.class);\n refreshGameList();\n gameList.subscribeSelection((widget, item) -> {\n find(\"String_Node_Str\", UIButton.class).setEnabled(item != null);\n updateDescription(item);\n });\n worldGenerator = find(\"String_Node_Str\", UILabel.class);\n moduleNames = find(\"String_Node_Str\", UILabel.class);\n gameList.select(0);\n gameList.subscribe((widget, item) -> loadGame(item));\n WidgetUtil.trySubscribe(this, \"String_Node_Str\", button -> {\n GameInfo gameInfo = gameList.getSelection();\n if (gameInfo != null) {\n loadGame(gameInfo);\n }\n });\n WidgetUtil.trySubscribe(this, \"String_Node_Str\", button -> {\n RecordAndReplayUtils.setRecordAndReplayStatus(RecordAndReplayStatus.NOT_ACTIVATED);\n triggerBackAnimation();\n });\n}\n"
|
"public Object resolveEnumConstant(Object type, String constant) {\n Class clazz = getJavaClass(type);\n Object[] constants = clazz.getEnumConstants();\n if (constants != null) {\n for (int i = 0; i < constants.length; i++) {\n Enum<?> enumConstant = (Enum<?>) constants[i];\n if (enumConstant.name().equals(constant)) {\n return enumConstant;\n }\n }\n }\n return null;\n}\n"
|
"private void initDisplayArea() {\n if (DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK.equals(selectedType)) {\n if (inputHandle.getURI() != null) {\n locationEditor.setText(inputHandle.getURI());\n }\n if (inputHandle.getTargetWindow() != null) {\n targetChooser.setText(ChoiceSetFactory.getDisplayNameFromChoiceSet(inputHandle.getTargetWindow(), CHOICESET_TARGET));\n } else {\n targetChooser.select(0);\n }\n } else if (DesignChoiceConstants.ACTION_LINK_TYPE_BOOKMARK_LINK.equals(selectedType)) {\n if (inputHandle.getTargetBookmark() != null) {\n bookmarkEditor.setText(inputHandle.getTargetBookmark());\n }\n initBookmarkList(SessionHandleAdapter.getInstance().getReportDesignHandle());\n } else if (DesignChoiceConstants.ACTION_LINK_TYPE_DRILL_THROUGH.equals(selectedType)) {\n if (DesignChoiceConstants.ACTION_TARGET_FILE_TYPE_REPORT_DOCUMENT.equals(inputHandle.getTargetFileType())) {\n reportDocumentButton.setSelection(true);\n if (inputHandle.getReportName() != null) {\n documentEditor.setText(inputHandle.getReportName());\n }\n selectRadio(targetGroup, reportDocumentButton);\n } else {\n reportDesignButton.setSelection(true);\n if (inputHandle.getReportName() != null) {\n locationEditor.setText(inputHandle.getReportName());\n }\n selectRadio(targetGroup, reportDesignButton);\n }\n if (inputHandle.getReportName() != null) {\n initTargetReport(inputHandle.getReportName());\n }\n if (DesignChoiceConstants.ACTION_BOOKMARK_TYPE_BOOKMARK.equals(inputHandle.getTargetBookmarkType())) {\n targetBookmarkButton.setSelection(true);\n initAnchorChooser(targetReportHandle, false);\n } else if (DesignChoiceConstants.ACTION_BOOKMARK_TYPE_TOC.equals(inputHandle.getTargetBookmarkType())) {\n tocButton.setSelection(true);\n initAnchorChooser(targetReportHandle, true);\n }\n if (inputHandle.getTargetBookmark() != null) {\n bookmarkEditor.setText(inputHandle.getTargetBookmark());\n }\n if (DesignChoiceConstants.TARGET_NAMES_TYPE_BLANK.equals(inputHandle.getTargetWindow())) {\n newWindowButton.setSelection(true);\n } else {\n sameWindowButton.setSelection(true);\n }\n if (inputHandle.getFormatType() != null) {\n ((Button) formatCheckBtns.get(inputHandle.getFormatType())).setSelection(true);\n } else {\n htmlButton.setSelection(true);\n }\n }\n updateButtons();\n}\n"
|
"public void testSeparateIds() {\n RecordImpl createRecord = (RecordImpl) requestFactory.create(SimpleFooRecord.class);\n assertTrue(createRecord.isFuture());\n Long futureId = createRecord.getId();\n RecordImpl mockRecord = new RecordImpl(RecordJsoImpl.create(futureId, 1, SimpleFooRecordImpl.SCHEMA), RequestFactoryJsonImpl.NOT_FUTURE);\n valueStore.setRecord(mockRecord.asJso(), requestFactory);\n DeltaValueStoreJsonImpl deltaValueStore = new DeltaValueStoreJsonImpl(valueStore, requestFactory);\n deltaValueStore.set(SimpleFooRecord.userName, createRecord, \"String_Node_Str\");\n deltaValueStore.set(SimpleFooRecord.userName, mockRecord, \"String_Node_Str\");\n assertTrue(deltaValueStore.isChanged());\n String jsonString = deltaValueStore.toJson();\n JSONObject jsonObject = (JSONObject) JSONParser.parse(jsonString);\n assertFalse(jsonObject.containsKey(WriteOperation.DELETE.name()));\n assertTrue(jsonObject.containsKey(WriteOperation.CREATE.name()));\n assertTrue(jsonObject.containsKey(WriteOperation.UPDATE.name()));\n JSONArray createOperationArray = jsonObject.get(WriteOperation.CREATE.name()).isArray();\n assertEquals(1, createOperationArray.size());\n assertEquals(\"String_Node_Str\", createOperationArray.get(0).isObject().get(SimpleFooRecord.class.getName()).isObject().get(SimpleFooRecord.userName.getName()).isString().stringValue());\n JSONArray updateOperationArray = jsonObject.get(WriteOperation.UPDATE.name()).isArray();\n assertEquals(1, updateOperationArray.size());\n assertEquals(\"String_Node_Str\", updateOperationArray.get(0).isObject().get(SimpleFooRecord.class.getName()).isObject().get(SimpleFooRecord.userName.getName()).isString().stringValue());\n}\n"
|
"private static InteractiveConsole newInterpreter(SocialiteCommandLineOptions opts) {\n if (opts.interactive) {\n return new JLineSociaLiteConsole(opts);\n } else {\n return new JLineSociaLiteConsole(opts);\n }\n}\n"
|
"public void destroy() {\n synchronized (inputs) {\n for (int i = 0; i < inputs.length; i++) {\n if (inputs[i] != null && inputs[i].item != null) {\n if (!inputs[i].item.collect()) {\n Dungeon.level.drop(inputs[i].item, Dungeon.hero.pos);\n }\n }\n inputs[i] = null;\n }\n }\n super.destroy();\n}\n"
|
"public boolean asThough(UUID objectId, AsThoughEffectType type, UUID controllerId, Game game) {\n List<AsThoughEffect> asThoughEffectsList = getApplicableAsThoughEffects(type, game);\n for (AsThoughEffect effect : asThoughEffectsList) {\n HashSet<Ability> abilities = asThoughEffectsMap.get(type).getAbility(effect.getId());\n for (Ability ability : abilities) {\n if (controllerId.equals(ability.getControllerId())) {\n if (affectedAbility == null) {\n if (effect.applies(objectId, ability, game)) {\n return true;\n }\n } else {\n if (effect.applies(objectId, affectedAbility, ability, game)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.