idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,143,991
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>FunFact fact = (FunFact) Objects.requireNonNull(getArguments<MASK><NEW_LINE>View view = inflater.inflate(R.layout.fragment_funfact, container, false);<NEW_LINE>ViewHolder holder = new ViewHolder(view);<NEW_LINE>if (fact != null) {<NEW_LINE>(holder.desc).setText(fact.getText());<NEW_LINE>(holder.title).setText(fact.getTitle());<NEW_LINE>if (fact.getSource() != null && !fact.getSource().equals("null")) {<NEW_LINE>(holder.text_source).setVisibility(View.VISIBLE);<NEW_LINE>(holder.text_source).setOnClickListener(view1 -> openURL(fact.getSourceURL()));<NEW_LINE>(holder.source).setText(fact.getSource());<NEW_LINE>(holder.source).setOnClickListener(view1 -> openURL(fact.getSourceURL()));<NEW_LINE>(holder.share).setOnClickListener(view1 -> shareClicked());<NEW_LINE>}<NEW_LINE>Picasso.with(getContext()).load(fact.getImage()).error(R.drawable.placeholder_image).placeholder(R.drawable.placeholder_image).into(holder.image);<NEW_LINE>}<NEW_LINE>return view;<NEW_LINE>}
()).getSerializable(EXTRA_MESSAGE_FUNFACT_OBJECT);
1,113,962
final DeleteSizeConstraintSetResult executeDeleteSizeConstraintSet(DeleteSizeConstraintSetRequest deleteSizeConstraintSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteSizeConstraintSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteSizeConstraintSetRequest> request = null;<NEW_LINE>Response<DeleteSizeConstraintSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteSizeConstraintSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSizeConstraintSetRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WAF Regional");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteSizeConstraintSetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteSizeConstraintSetResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSizeConstraintSet");
1,047,150
protected static Memory _array_diff_impl(Environment env, TraceInfo trace, Memory array1, Memory array, Memory[] arrays, ArrayDiffCallback callback) throws Throwable {<NEW_LINE>if (expecting(env, trace, 1, array1, ARRAY) && expecting(env, trace, 2, array, ARRAY)) {<NEW_LINE>ForeachIterator iterator = array1.getNewIterator(env);<NEW_LINE>ArrayMemory result = new ArrayMemory();<NEW_LINE>while (iterator.next()) {<NEW_LINE>Memory value = iterator.getValue();<NEW_LINE>boolean exists = false;<NEW_LINE>for (int i = 0; i < (arrays == null ? 0 : arrays.length) + 1; i++) {<NEW_LINE>if (i > 0) {<NEW_LINE>array = arrays[i - 1];<NEW_LINE>if (!expecting(env, trace, i + 2, array, ARRAY)) {<NEW_LINE>return Memory.NULL;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ForeachIterator newIterator = array.getNewIterator(env);<NEW_LINE>while (newIterator.next()) {<NEW_LINE>if (callback.apply(iterator.getMemoryKey(), value, newIterator.getMemoryKey(), newIterator.getValue())) {<NEW_LINE>exists = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (exists)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (!exists) {<NEW_LINE>result.put(iterator.getKey(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result.toConstant();<NEW_LINE>}<NEW_LINE>return Memory.NULL;<NEW_LINE>}
), value.toImmutable());
1,439,209
public static ClientMessage encodeRequest(java.lang.String name, com.hazelcast.internal.serialization.Data key, com.hazelcast.internal.serialization.Data value, long threadId, long ttl, long maxIdle) {<NEW_LINE>ClientMessage clientMessage = ClientMessage.createForEncode();<NEW_LINE>clientMessage.setRetryable(false);<NEW_LINE>clientMessage.setOperationName("Map.PutTransientWithMaxIdle");<NEW_LINE>ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[REQUEST_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);<NEW_LINE>encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, REQUEST_MESSAGE_TYPE);<NEW_LINE>encodeInt(initialFrame.content, PARTITION_ID_FIELD_OFFSET, -1);<NEW_LINE>encodeLong(initialFrame.content, REQUEST_THREAD_ID_FIELD_OFFSET, threadId);<NEW_LINE>encodeLong(initialFrame.content, REQUEST_TTL_FIELD_OFFSET, ttl);<NEW_LINE>encodeLong(initialFrame.content, REQUEST_MAX_IDLE_FIELD_OFFSET, maxIdle);<NEW_LINE>clientMessage.add(initialFrame);<NEW_LINE><MASK><NEW_LINE>DataCodec.encode(clientMessage, key);<NEW_LINE>DataCodec.encode(clientMessage, value);<NEW_LINE>return clientMessage;<NEW_LINE>}
StringCodec.encode(clientMessage, name);
381,527
public void fromElement(FbxElement element) {<NEW_LINE>super.fromElement(element);<NEW_LINE>for (FbxElement child : element.children) {<NEW_LINE>if (!child.id.equals("PoseNode")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>FbxId node = null;<NEW_LINE>float[] matData = null;<NEW_LINE>for (FbxElement e : child.children) {<NEW_LINE>if (e.id.equals("Node")) {<NEW_LINE>node = FbxId.create(e.properties.get(0));<NEW_LINE>} else if (e.id.equals("Matrix")) {<NEW_LINE>double[] matDataDoubles = (double[]) <MASK><NEW_LINE>if (matDataDoubles.length != 16) {<NEW_LINE>// corrupt<NEW_LINE>throw new UnsupportedOperationException("Bind pose matrix " + "must have 16 doubles, but it has " + matDataDoubles.length + ". Data is corrupt");<NEW_LINE>}<NEW_LINE>matData = new float[16];<NEW_LINE>for (int i = 0; i < matDataDoubles.length; i++) {<NEW_LINE>matData[i] = (float) matDataDoubles[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (node != null && matData != null) {<NEW_LINE>Matrix4f matrix = new Matrix4f(matData);<NEW_LINE>bindPose.put(node, matrix);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
e.properties.get(0);
1,646,651
ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String applicationFlag) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>File file = emc.flag(flag, File.class);<NEW_LINE>if (null == file) {<NEW_LINE>throw new ExceptionEntityNotExist(flag, File.class);<NEW_LINE>}<NEW_LINE>Application application = emc.find(file.getApplication(), Application.class);<NEW_LINE>if (null == application) {<NEW_LINE>throw new ExceptionEntityNotExist(file.getApplication(), Application.class);<NEW_LINE>}<NEW_LINE>if (!business.editable(effectivePerson, application)) {<NEW_LINE>throw new ExceptionAccessDenied(effectivePerson.getDistinguishedName());<NEW_LINE>}<NEW_LINE>Application toApplication = emc.flag(applicationFlag, Application.class);<NEW_LINE>if (null == toApplication) {<NEW_LINE>throw new ExceptionEntityNotExist(applicationFlag, Application.class);<NEW_LINE>}<NEW_LINE>if (!business.editable(effectivePerson, toApplication)) {<NEW_LINE>throw new ExceptionAccessDenied(effectivePerson.getDistinguishedName());<NEW_LINE>}<NEW_LINE>File toFile = new File();<NEW_LINE>toFile.setName(this.getName(business, file.getName(), toFile.getId(), toApplication.getId()));<NEW_LINE>toFile.setApplication(toApplication.getId());<NEW_LINE>toFile.setDescription(file.getDescription());<NEW_LINE>toFile.setData(file.getData());<NEW_LINE>toFile.setFileName(file.getFileName());<NEW_LINE>toFile.setLastUpdatePerson(file.getLastUpdatePerson());<NEW_LINE>toFile.setLastUpdateTime(new Date());<NEW_LINE>toFile.setLength(file.getLength());<NEW_LINE><MASK><NEW_LINE>emc.persist(toFile, CheckPersistType.all);<NEW_LINE>emc.commit();<NEW_LINE>CacheManager.notify(File.class);<NEW_LINE>Wo wo = new Wo();<NEW_LINE>wo.setId(toFile.getId());<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
emc.beginTransaction(File.class);
1,338,510
// method has sufficient tracing<NEW_LINE>@Trivial<NEW_LINE>public boolean isUpToDateWith(CacheEntry current) {<NEW_LINE>if (model == null || configProperties == null) {<NEW_LINE>throw new IllegalStateException("isUpToDateWith called on CacheEntry not read from disk");<NEW_LINE>}<NEW_LINE>Objects.requireNonNull(current, "cache entry for current state must be given");<NEW_LINE>// sanity check the app name<NEW_LINE>if (!Objects.equals(appName, current.appName)) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, "Cache out of date because app name is not the same?!", appName, current.appName);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// compare config<NEW_LINE>// Note: old cached model is used here to provide a list of paths and operations<NEW_LINE>// which is needed to get the full list of config properties for the current environment<NEW_LINE>Properties currentConfigProperties = current.getConfigProperties(model);<NEW_LINE>if (!Objects.equals(configProperties, currentConfigProperties)) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, "Cache out of date because config is not the same", configProperties, currentConfigProperties);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// compare scanned files<NEW_LINE>if (!Objects.equals(fileEntries, current.fileEntries)) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, <MASK><NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, "Cache is up to date");<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
"Cache out of date because files have changed", fileEntries, current.fileEntries);
278,141
public int updatePageMaxFreeSpace(final int pageIndex, final int freeSpace) {<NEW_LINE>assert freeSpace < (1 << (CELL_SIZE * 8));<NEW_LINE>assert pageIndex >= 0;<NEW_LINE>if (pageIndex >= CELLS_PER_PAGE) {<NEW_LINE>throw new IllegalArgumentException("Page index " + pageIndex + " exceeds tree capacity");<NEW_LINE>}<NEW_LINE>int nodeOffset = LEAVES_START_OFFSET + pageIndex * CELL_SIZE;<NEW_LINE>int nodeIndex = pageIndex;<NEW_LINE>int nodeValue = freeSpace;<NEW_LINE>final int oldFreeSpace = 0xFF & getByteValue(nodeOffset);<NEW_LINE>for (int level = LEVELS; level > 0; level--) {<NEW_LINE>final int prevValue = 0xFF & getByteValue(nodeOffset);<NEW_LINE>if (prevValue == nodeValue) {<NEW_LINE>addPageOperation(new UpdateMaxFreeSpacePO(pageIndex, oldFreeSpace, freeSpace));<NEW_LINE>return 0xFF & getByteValue(nodeOffset(1, 0));<NEW_LINE>}<NEW_LINE>setByteValue(nodeOffset, (byte) nodeValue);<NEW_LINE>if (level == 1) {<NEW_LINE>addPageOperation(new UpdateMaxFreeSpacePO<MASK><NEW_LINE>return nodeValue;<NEW_LINE>}<NEW_LINE>final int siblingIndex;<NEW_LINE>if ((nodeIndex & 1) == 0) {<NEW_LINE>siblingIndex = nodeIndex + 1;<NEW_LINE>} else {<NEW_LINE>siblingIndex = nodeIndex - 1;<NEW_LINE>}<NEW_LINE>final int siblingOffset = nodeOffset(level, siblingIndex);<NEW_LINE>final int siblingValue;<NEW_LINE>if (siblingOffset + 2 <= MAX_PAGE_SIZE_BYTES) {<NEW_LINE>siblingValue = 0xFF & getByteValue(siblingOffset);<NEW_LINE>} else {<NEW_LINE>siblingValue = nodeValue;<NEW_LINE>}<NEW_LINE>nodeValue = Math.max(nodeValue, siblingValue);<NEW_LINE>nodeIndex = nodeIndex >> 1;<NEW_LINE>nodeOffset = nodeOffset(level - 1, nodeIndex);<NEW_LINE>}<NEW_LINE>// unreachable<NEW_LINE>assert false;<NEW_LINE>return 0;<NEW_LINE>}
(pageIndex, oldFreeSpace, freeSpace));
1,262,711
private URL buildURL(final TickerSymbol ticker, final Date from, final Date to) throws IOException {<NEW_LINE>// process the dates<NEW_LINE>final Calendar calendarFrom = Calendar.getInstance();<NEW_LINE>calendarFrom.setTime(from);<NEW_LINE>final Calendar calendarTo = Calendar.getInstance();<NEW_LINE>calendarTo.setTime(to);<NEW_LINE>// construct the URL<NEW_LINE>final OutputStream os = new ByteArrayOutputStream();<NEW_LINE>final FormUtility form = new FormUtility(os, null);<NEW_LINE>form.add("s", ticker.getSymbol().toUpperCase());<NEW_LINE>form.add("a", "" + calendarFrom.get(Calendar.MONTH));<NEW_LINE>form.add("b", "" + calendarFrom.get(Calendar.DAY_OF_MONTH));<NEW_LINE>form.add("c", "" + calendarFrom.get(Calendar.YEAR));<NEW_LINE>form.add("d", "" + calendarTo.get(Calendar.MONTH));<NEW_LINE>form.add("e", "" + calendarTo.get(Calendar.DAY_OF_MONTH));<NEW_LINE>form.add("f", "" + calendarTo<MASK><NEW_LINE>form.add("g", "d");<NEW_LINE>form.add("ignore", ".csv");<NEW_LINE>os.close();<NEW_LINE>final String str = "http://ichart.finance.yahoo.com/table.csv?" + os.toString();<NEW_LINE>return new URL(str);<NEW_LINE>}
.get(Calendar.YEAR));
948,675
public final void handleCancel() {<NEW_LINE>final Subscription currentSubscription = this.s;<NEW_LINE>if (currentSubscription == Operators.cancelledSubscription()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (currentSubscription == null) {<NEW_LINE>// if subscription is null, it means that streams has not yet reassembled all the fragments<NEW_LINE>// and fragmentation of the first frame was cancelled before<NEW_LINE>S.lazySet(this, Operators.cancelledSubscription());<NEW_LINE>final int streamId = this.streamId;<NEW_LINE>this.requesterResponderSupport.remove(streamId, this);<NEW_LINE>final CompositeByteBuf frames = this.frames;<NEW_LINE>if (frames != null) {<NEW_LINE>this.frames = null;<NEW_LINE>frames.release();<NEW_LINE>}<NEW_LINE>final RequestInterceptor requestInterceptor = this.requestInterceptor;<NEW_LINE>if (requestInterceptor != null) {<NEW_LINE>requestInterceptor.onCancel(streamId, FrameType.REQUEST_STREAM);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!S.compareAndSet(this, currentSubscription, Operators.cancelledSubscription())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int streamId = this.streamId;<NEW_LINE>this.<MASK><NEW_LINE>currentSubscription.cancel();<NEW_LINE>final RequestInterceptor requestInterceptor = this.requestInterceptor;<NEW_LINE>if (requestInterceptor != null) {<NEW_LINE>requestInterceptor.onCancel(streamId, FrameType.REQUEST_STREAM);<NEW_LINE>}<NEW_LINE>}
requesterResponderSupport.remove(streamId, this);
972,892
public void testCriteriaQuery_Integer(TestExecutionContext testExecCtx, TestExecutionResources testExecResources, Object managedComponentObject) throws Throwable {<NEW_LINE>final String testName = getTestName();<NEW_LINE>// Verify parameters<NEW_LINE>if (testExecCtx == null || testExecResources == null) {<NEW_LINE>Assert.fail(testName + ": Missing context and/or resources. Cannot execute the test.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final JPAResource jpaResource = testExecResources.getJpaResourceMap().get("test-jpa-resource");<NEW_LINE>if (jpaResource == null) {<NEW_LINE>Assert.fail("Missing JPAResource 'test-jpa-resource'). Cannot execute the test.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Process Test Properties<NEW_LINE>final Map<String, Serializable> testProps = testExecCtx.getProperties();<NEW_LINE>if (testProps != null) {<NEW_LINE>for (String key : testProps.keySet()) {<NEW_LINE>System.out.println("Test Property: " + key + " = " + testProps.get(key));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>EntityManager em = jpaResource.getEm();<NEW_LINE>TransactionJacket tx = jpaResource.getTj();<NEW_LINE>// Execute Test Case<NEW_LINE>try {<NEW_LINE>tx.beginTransaction();<NEW_LINE>if (jpaResource.getPcCtxInfo().getPcType() == PersistenceContextType.APPLICATION_MANAGED_JTA)<NEW_LINE>em.joinTransaction();<NEW_LINE><MASK><NEW_LINE>CriteriaQuery<Entity0011> cq = cb.createQuery(Entity0011.class);<NEW_LINE>Root<Entity0011> root = cq.from(Entity0011.class);<NEW_LINE>cq.select(root);<NEW_LINE>TypedQuery<Entity0011> tq = em.createQuery(cq);<NEW_LINE>Entity0011 findEntity = tq.getSingleResult();<NEW_LINE>System.out.println("Object returned by query: " + findEntity);<NEW_LINE>assertNotNull("Did not find entity in criteria query", findEntity);<NEW_LINE>assertTrue("Entity returned by find was not contained in the persistence context.", em.contains(findEntity));<NEW_LINE>assertEquals(new Integer(11), findEntity.getEntity0011_id());<NEW_LINE>assertEquals("Entity0011_STRING01", findEntity.getEntity0011_string01());<NEW_LINE>assertEquals("Entity0011_STRING02", findEntity.getEntity0011_string02());<NEW_LINE>assertEquals("Entity0011_STRING03", findEntity.getEntity0011_string03());<NEW_LINE>tx.commitTransaction();<NEW_LINE>} finally {<NEW_LINE>System.out.println(testName + ": End");<NEW_LINE>}<NEW_LINE>}
CriteriaBuilder cb = em.getCriteriaBuilder();
1,569,649
public static void reloadConfig(EnumRestartRequirement restarted) {<NEW_LINE>if (EnumRestartRequirement.WORLD.hasBeenRestarted(restarted)) {<NEW_LINE>addBiomeNames(propExcludedBiomes, excludedBiomes);<NEW_LINE>addBiomeNames(propExcessiveBiomes, excessiveBiomes);<NEW_LINE>addBiomeNames(propSurfaceDepositBiomes, surfaceDepositBiomes);<NEW_LINE>excludedDimensions.clear();<NEW_LINE>excludedDimensions.<MASK><NEW_LINE>excludedBiomesIsBlackList = propExcludedBiomesIsBlacklist.getBoolean();<NEW_LINE>excludedDimensionsIsBlackList = propExcludedDimensionsIsBlacklist.getBoolean();<NEW_LINE>if (EnumRestartRequirement.GAME.hasBeenRestarted(restarted)) {<NEW_LINE>enableOilOceanBiome = propEnableOilOceanBiome.getBoolean();<NEW_LINE>enableOilDesertBiome = propEnableOilDesertBiome.getBoolean();<NEW_LINE>enableOilGeneration = propEnableOilGeneration.getBoolean();<NEW_LINE>oilWellGenerationRate = propOilWellGenerationRate.getDouble();<NEW_LINE>enableOilSpouts = propEnableOilSpouts.getBoolean();<NEW_LINE>enableOilBurn = propEnableOilBurn.getBoolean();<NEW_LINE>oilIsSticky = propOilIsSticky.getBoolean();<NEW_LINE>smallSpoutMinHeight = propSmallSpoutMinHeight.getInt();<NEW_LINE>smallSpoutMaxHeight = propSmallSpoutMaxHeight.getInt();<NEW_LINE>largeSpoutMinHeight = propLargeSpoutMinHeight.getInt();<NEW_LINE>largeSpoutMaxHeight = propLargeSpoutMaxHeight.getInt();<NEW_LINE>smallOilGenProb = propSmallOilGenProb.getDouble() / 100;<NEW_LINE>mediumOilGenProb = propMediumOilGenProb.getDouble() / 100;<NEW_LINE>largeOilGenProb = propLargeOilGenProb.getDouble() / 100;<NEW_LINE>christmasEventStatus = ConfigUtil.parseEnumForConfig(propChristmasEventType, SpecialEventType.DAY_ONLY);<NEW_LINE>} else {<NEW_LINE>validateBiomeNames();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addAll(propExcludedDimensions.getIntList());
1,255,825
private void removeBindings() {<NEW_LINE>priceCurrencyLabel.textProperty().unbind();<NEW_LINE>triggerPriceCurrencyLabel.textProperty().unbind();<NEW_LINE>triggerPriceDescriptionLabel.textProperty().unbind();<NEW_LINE>percentagePriceDescriptionLabel.textProperty().unbind();<NEW_LINE>volumeCurrencyLabel.textProperty().unbind();<NEW_LINE>priceDescriptionLabel.textProperty().unbind();<NEW_LINE>volumeDescriptionLabel.textProperty().unbind();<NEW_LINE>amountTextField.textProperty().unbindBidirectional(model.amount);<NEW_LINE>minAmountTextField.textProperty().unbindBidirectional(model.minAmount);<NEW_LINE>fixedPriceTextField.textProperty().unbindBidirectional(model.price);<NEW_LINE>triggerPriceInputTextField.textProperty().unbindBidirectional(model.triggerPrice);<NEW_LINE>marketBasedPriceTextField.textProperty().unbindBidirectional(model.marketPriceMargin);<NEW_LINE>marketBasedPriceLabel.prefWidthProperty().unbind();<NEW_LINE>volumeTextField.textProperty().unbindBidirectional(model.volume);<NEW_LINE>volumeTextField.promptTextProperty().unbindBidirectional(model.volume);<NEW_LINE>totalToPayTextField.textProperty().unbind();<NEW_LINE>addressTextField.amountAsCoinProperty().unbind();<NEW_LINE>buyerSecurityDepositInputTextField.textProperty().unbindBidirectional(model.buyerSecurityDeposit);<NEW_LINE>buyerSecurityDepositLabel.textProperty().unbind();<NEW_LINE>tradeFeeInBtcLabel.textProperty().unbind();<NEW_LINE>tradeFeeInBsqLabel.textProperty().unbind();<NEW_LINE>tradeFeeDescriptionLabel.textProperty().unbind();<NEW_LINE>tradeFeeInBtcLabel.visibleProperty().unbind();<NEW_LINE>tradeFeeInBsqLabel.visibleProperty().unbind();<NEW_LINE>tradeFeeDescriptionLabel.visibleProperty().unbind();<NEW_LINE>// Validation<NEW_LINE>amountTextField.validationResultProperty().unbind();<NEW_LINE>minAmountTextField.validationResultProperty().unbind();<NEW_LINE>fixedPriceTextField.validationResultProperty().unbind();<NEW_LINE>triggerPriceInputTextField.validationResultProperty().unbind();<NEW_LINE>volumeTextField.validationResultProperty().unbind();<NEW_LINE>buyerSecurityDepositInputTextField.validationResultProperty().unbind();<NEW_LINE>// funding<NEW_LINE>fundingHBox.visibleProperty().unbind();<NEW_LINE>fundingHBox.managedProperty().unbind();<NEW_LINE>waitingForFundsLabel.textProperty().unbind();<NEW_LINE>placeOfferBox.visibleProperty().unbind();<NEW_LINE>placeOfferBox.managedProperty().unbind();<NEW_LINE>placeOfferButton<MASK><NEW_LINE>cancelButton2.disableProperty().unbind();<NEW_LINE>// trading account<NEW_LINE>paymentTitledGroupBg.managedProperty().unbind();<NEW_LINE>paymentAccountsComboBox.managedProperty().unbind();<NEW_LINE>currencyComboBox.managedProperty().unbind();<NEW_LINE>currencyComboBox.prefWidthProperty().unbind();<NEW_LINE>currencyTextFieldBox.managedProperty().unbind();<NEW_LINE>}
.disableProperty().unbind();
1,401,192
private void prepareColors(final StylingPolicy sp) {<NEW_LINE>if (colors == null) {<NEW_LINE>final ColorLibrary cols = shared.stylelib.getColorSet(StyleLibrary.PLOT);<NEW_LINE>if (sp instanceof ClassStylingPolicy) {<NEW_LINE>ClassStylingPolicy csp = (ClassStylingPolicy) sp;<NEW_LINE>final int maxStyle = csp.getMaxStyle();<NEW_LINE>colors = new float[maxStyle * 3];<NEW_LINE>for (int c = 0, s = csp.getMinStyle(); s < maxStyle; c += 3, s++) {<NEW_LINE>Color col = SVGUtil.stringToColor(cols.getColor(s));<NEW_LINE>colors[c + 0] = col.getRed() / 255.f;<NEW_LINE>colors[c + 1] = col.getGreen() / 255.f;<NEW_LINE>colors[c + 2] <MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Render in black.<NEW_LINE>colors = new float[] { 0f, 0f, 0f };<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= col.getBlue() / 255.f;
143,275
private void loadAddresses(MatchInfo matchInfo) {<NEW_LINE>VTMatch match = matchInfo.getMatch();<NEW_LINE>VTAssociation association = match.getAssociation();<NEW_LINE>Address sourceAddress = association.getSourceAddress();<NEW_LINE>Address destinationAddress = association.getDestinationAddress();<NEW_LINE><MASK><NEW_LINE>int destinationLength = match.getDestinationLength();<NEW_LINE>// We need to possibly adjust the source and destination start addresses to the beginning<NEW_LINE>// of the code units containing them or we won't display anything in the comparison panel.<NEW_LINE>VTSession session = association.getSession();<NEW_LINE>Program sourceProgram = session.getSourceProgram();<NEW_LINE>Program destinationProgram = session.getDestinationProgram();<NEW_LINE>Listing sourceListing = sourceProgram.getListing();<NEW_LINE>Listing destinationListing = destinationProgram.getListing();<NEW_LINE>CodeUnit sourceCodeUnit = sourceListing.getCodeUnitContaining(sourceAddress);<NEW_LINE>CodeUnit destinationCodeUnit = destinationListing.getCodeUnitContaining(destinationAddress);<NEW_LINE>Address sourceStart = (sourceCodeUnit != null) ? sourceCodeUnit.getMinAddress() : sourceAddress;<NEW_LINE>Address destinationStart = (destinationCodeUnit != null) ? destinationCodeUnit.getMinAddress() : destinationAddress;<NEW_LINE>Address sourceEnd = (sourceLength > 1) ? sourceAddress.add(sourceLength - 1) : sourceStart;<NEW_LINE>Address destinationEnd = (destinationLength > 1) ? destinationAddress.add(destinationLength - 1) : destinationStart;<NEW_LINE>AddressSetView sourceAddressSet = new AddressSet(sourceStart, sourceEnd);<NEW_LINE>AddressSetView destinationAddressSet = new AddressSet(destinationStart, destinationEnd);<NEW_LINE>functionComparisonPanel.loadAddresses(sourceProgram, destinationProgram, sourceAddressSet, destinationAddressSet);<NEW_LINE>}
int sourceLength = match.getSourceLength();
548,959
public void updateMetaParams(List<String> recordIDs, Map<String, String> metaParams) {<NEW_LINE>// Define the directories used to lookup the recording<NEW_LINE>List<String> states = new ArrayList<>();<NEW_LINE>states.add(Recording.STATE_PUBLISHED);<NEW_LINE>states.add(Recording.STATE_UNPUBLISHED);<NEW_LINE>states.add(Recording.STATE_DELETED);<NEW_LINE>// Gather all the existent directories based on the states defined for the lookup<NEW_LINE>Map<String, List<File>> allDirectories = getAllDirectories(states);<NEW_LINE>// Retrieve the actual recording from the directories gathered for the lookup<NEW_LINE>for (String recordID : recordIDs) {<NEW_LINE>for (Map.Entry<String, List<File>> entry : allDirectories.entrySet()) {<NEW_LINE>List<File> recs = getRecordingsForPath(<MASK><NEW_LINE>// Go through all recordings of all formats<NEW_LINE>for (File rec : recs) {<NEW_LINE>File metadataXml = recordingServiceHelper.getMetadataXmlLocation(rec.getPath());<NEW_LINE>updateRecordingMetadata(metadataXml, metaParams, metadataXml);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
recordID, entry.getValue());
1,104,119
protected static void newRouter(Engine engine, NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem) {<NEW_LINE>// "/" or "/myroot/"<NEW_LINE>String httpRootPath = nonApplicationRootPathBuildItem.getNormalizedHttpRootPath();<NEW_LINE>// "/" or "/myroot/" or "/q/" or "/myroot/q/"<NEW_LINE>String frameworkRootPath = nonApplicationRootPathBuildItem.getNonApplicationRootPath();<NEW_LINE>Handler<RoutingContext> errorHandler = new Handler<RoutingContext>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handle(RoutingContext event) {<NEW_LINE>String message = "Dev console request failed";<NEW_LINE>log.error(<MASK><NEW_LINE>event.response().headers().set(HttpHeaderNames.CONTENT_TYPE, "text/html; charset=utf-8");<NEW_LINE>event.response().end(new TemplateHtmlBuilder("Internal Server Error", message, message).stack(event.failure()).toString());<NEW_LINE>}<NEW_LINE>};<NEW_LINE>router = Router.router(devConsoleVertx);<NEW_LINE>router.errorHandler(500, errorHandler);<NEW_LINE>router.route().order(Integer.MIN_VALUE).handler(new FlashScopeHandler());<NEW_LINE>router.route().method(HttpMethod.GET).order(Integer.MIN_VALUE + 1).handler(new DevConsole(engine, httpRootPath, frameworkRootPath));<NEW_LINE>mainRouter = Router.router(devConsoleVertx);<NEW_LINE>mainRouter.errorHandler(500, errorHandler);<NEW_LINE>mainRouter.route(nonApplicationRootPathBuildItem.resolvePath("dev*")).subRouter(router);<NEW_LINE>}
message, event.failure());
463,840
public DynamoDBTarget unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DynamoDBTarget dynamoDBTarget = new DynamoDBTarget();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Path", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dynamoDBTarget.setPath(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("scanAll", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dynamoDBTarget.setScanAll(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("scanRate", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>dynamoDBTarget.setScanRate(context.getUnmarshaller(Double.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return dynamoDBTarget;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,479,427
public com.amazonaws.services.elasticfilesystem.model.InsufficientThroughputCapacityException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.elasticfilesystem.model.InsufficientThroughputCapacityException insufficientThroughputCapacityException = new com.amazonaws.services.elasticfilesystem.model.InsufficientThroughputCapacityException(null);<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("ErrorCode", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>insufficientThroughputCapacityException.setErrorCode(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return insufficientThroughputCapacityException;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
576,863
public void updateCorrelationType(CorrelationAttributeInstance.Type aType) throws CentralRepoException {<NEW_LINE>Connection conn = connect();<NEW_LINE>PreparedStatement preparedStatement = null;<NEW_LINE>String sql = "UPDATE correlation_types SET display_name=?, db_table_name=?, supported=?, enabled=? WHERE id=?";<NEW_LINE>try {<NEW_LINE>preparedStatement = conn.prepareStatement(sql);<NEW_LINE>preparedStatement.setString(1, aType.getDisplayName());<NEW_LINE>preparedStatement.setString(2, aType.getDbTableName());<NEW_LINE>preparedStatement.setInt(3, aType.<MASK><NEW_LINE>preparedStatement.setInt(4, aType.isEnabled() ? 1 : 0);<NEW_LINE>preparedStatement.setInt(5, aType.getId());<NEW_LINE>preparedStatement.executeUpdate();<NEW_LINE>synchronized (typeCache) {<NEW_LINE>typeCache.put(aType.getId(), aType);<NEW_LINE>}<NEW_LINE>} catch (SQLException ex) {<NEW_LINE>// NON-NLS<NEW_LINE>throw new CentralRepoException("Error updating correlation type.", ex);<NEW_LINE>} finally {<NEW_LINE>CentralRepoDbUtil.closeStatement(preparedStatement);<NEW_LINE>CentralRepoDbUtil.closeConnection(conn);<NEW_LINE>}<NEW_LINE>}
isSupported() ? 1 : 0);
1,327,564
protected void run(URL url, Map<String, String> headers) {<NEW_LINE>this.listener = new WatcherWebSocketListener<>(this);<NEW_LINE>Builder builder = client.newWebSocketBuilder();<NEW_LINE><MASK><NEW_LINE>builder.uri(URI.create(url.toString()));<NEW_LINE>this.websocketFuture = builder.buildAsync(this.listener).handle((w, t) -> {<NEW_LINE>if (t != null) {<NEW_LINE>if (t instanceof WebSocketHandshakeException) {<NEW_LINE>WebSocketHandshakeException wshe = (WebSocketHandshakeException) t;<NEW_LINE>HttpResponse<?> response = wshe.getResponse();<NEW_LINE>final int code = response.code();<NEW_LINE>// We do not expect a 200 in response to the websocket connection. If it occurs, we throw<NEW_LINE>// an exception and try the watch via a persistent HTTP Get.<NEW_LINE>// Newer Kubernetes might also return 503 Service Unavailable in case WebSockets are not supported<NEW_LINE>Status status = OperationSupport.createStatus(response);<NEW_LINE>if (HTTP_OK == code || HTTP_UNAVAILABLE == code) {<NEW_LINE>throw OperationSupport.requestFailure(client.newHttpRequestBuilder().url(url).build(), status, "Received " + code + " on websocket");<NEW_LINE>}<NEW_LINE>logger.warn("Exec Failure: HTTP {}, Status: {} - {}", code, status.getCode(), status.getMessage());<NEW_LINE>t = OperationSupport.requestFailure(client.newHttpRequestBuilder().url(url).build(), status);<NEW_LINE>}<NEW_LINE>if (ready) {<NEW_LINE>// if we're not ready yet, that means we're waiting on the future and there's<NEW_LINE>// no need to invoke the reconnect logic<NEW_LINE>listener.onError(w, t);<NEW_LINE>}<NEW_LINE>throw KubernetesClientException.launderThrowable(t);<NEW_LINE>}<NEW_LINE>if (w != null) {<NEW_LINE>this.ready = true;<NEW_LINE>this.websocket = w;<NEW_LINE>}<NEW_LINE>return w;<NEW_LINE>});<NEW_LINE>}
headers.forEach(builder::header);
1,070,204
public long nextFragment(final int length, final int streamId) {<NEW_LINE>currentOffset = nextOffset;<NEW_LINE>final int framedLength = framedLength(length);<NEW_LINE>nextOffset += alignedLength(framedLength);<NEW_LINE>// ensure that there is enough capacity for padding message, or less than frame alignment which<NEW_LINE>// omits the padding message<NEW_LINE>final int remainingCapacity <MASK><NEW_LINE>if (remainingCapacity < 0 || (FRAME_ALIGNMENT <= remainingCapacity && remainingCapacity < HEADER_LENGTH)) {<NEW_LINE>throw new IllegalArgumentException(String.format(ERROR_MESSAGE, currentOffset, length, buffer.capacity()));<NEW_LINE>}<NEW_LINE>// set negative length => uncommitted fragment<NEW_LINE>buffer.putIntOrdered(lengthOffset(currentOffset), -framedLength);<NEW_LINE>UNSAFE.storeFence();<NEW_LINE>buffer.putShort(typeOffset(currentOffset), TYPE_MESSAGE);<NEW_LINE>buffer.putInt(streamIdOffset(currentOffset), streamId);<NEW_LINE>return position(partitionId, partitionOffset + nextOffset);<NEW_LINE>}
= buffer.capacity() - nextOffset;
695,597
public void createBindings() {<NEW_LINE>LengthConverter lengthConverter = new LengthConverter();<NEW_LINE>IntegerConverter intConverter = new IntegerConverter();<NEW_LINE>DoubleConverter doubleConverter = new DoubleConverter(Configuration.get().getLengthDisplayFormat());<NEW_LINE>MutableLocationProxy location = new MutableLocationProxy();<NEW_LINE>bind(UpdateStrategy.READ_WRITE, feeder, "location", location, "location");<NEW_LINE>addWrappedBinding(location, "rotation", textFieldLocationRotation, "text", doubleConverter);<NEW_LINE>addWrappedBinding(feeder, "part", comboBoxPart, "selectedItem");<NEW_LINE>addWrappedBinding(feeder, "feedRetryCount", retryCountTf, "text", intConverter);<NEW_LINE>addWrappedBinding(feeder, "pickRetryCount", pickRetryCount, "text", intConverter);<NEW_LINE>addWrappedBinding(feeder, "tapeType", comboBoxTapeType, "selectedItem");<NEW_LINE>addWrappedBinding(feeder, "tapeWidth", textFieldTapeWidth, "text", lengthConverter);<NEW_LINE>addWrappedBinding(feeder, "partPitch", textFieldPartPitch, "text", lengthConverter);<NEW_LINE>addWrappedBinding(feeder, "feedCount", textFieldFeedCount, "text", intConverter);<NEW_LINE>addWrappedBinding(feeder, "maxFeedCount", textFieldMaxFeedCount, "text", intConverter);<NEW_LINE>MutableLocationProxy feedStartLocation = new MutableLocationProxy();<NEW_LINE>bind(UpdateStrategy.READ_WRITE, feeder, "referenceHoleLocation", feedStartLocation, "location");<NEW_LINE>addWrappedBinding(feedStartLocation, "lengthX", textFieldFeedStartX, "text", lengthConverter);<NEW_LINE>addWrappedBinding(feedStartLocation, "lengthY", textFieldFeedStartY, "text", lengthConverter);<NEW_LINE>addWrappedBinding(feedStartLocation, "lengthZ", textFieldFeedStartZ, "text", lengthConverter);<NEW_LINE>MutableLocationProxy feedEndLocation = new MutableLocationProxy();<NEW_LINE>bind(UpdateStrategy.READ_WRITE, feeder, "lastHoleLocation", feedEndLocation, "location");<NEW_LINE>addWrappedBinding(feedEndLocation, "lengthX", textFieldFeedEndX, "text", lengthConverter);<NEW_LINE>addWrappedBinding(feedEndLocation, "lengthY", textFieldFeedEndY, "text", lengthConverter);<NEW_LINE>// addWrappedBinding(feedEndLocation, "lengthZ", textFieldFeedEndZ, "text", lengthConverter);<NEW_LINE>addWrappedBinding(<MASK><NEW_LINE>ComponentDecorators.decorateWithAutoSelect(textFieldLocationRotation);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldTapeWidth);<NEW_LINE>ComponentDecorators.decorateWithAutoSelect(retryCountTf);<NEW_LINE>ComponentDecorators.decorateWithAutoSelect(pickRetryCount);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldPartPitch);<NEW_LINE>ComponentDecorators.decorateWithAutoSelect(textFieldFeedCount);<NEW_LINE>ComponentDecorators.decorateWithAutoSelect(textFieldMaxFeedCount);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldFeedStartX);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldFeedStartY);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldFeedStartZ);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldFeedEndX);<NEW_LINE>ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldFeedEndY);<NEW_LINE>// ComponentDecorators.decorateWithAutoSelectAndLengthConversion(textFieldFeedEndZ);<NEW_LINE>}
feeder, "visionEnabled", chckbxUseVision, "selected");
395,074
public static BytesMessage msgConvert(org.apache.rocketmq.common.message.MessageExt rmqMsg) {<NEW_LINE>BytesMessage omsMsg = new BytesMessageImpl();<NEW_LINE>omsMsg.setBody(rmqMsg.getBody());<NEW_LINE>KeyValue headers = omsMsg.sysHeaders();<NEW_LINE>KeyValue properties = omsMsg.userHeaders();<NEW_LINE>final Set<Map.Entry<String, String>> entries = rmqMsg.getProperties().entrySet();<NEW_LINE>for (final Map.Entry<String, String> entry : entries) {<NEW_LINE>if (isOMSHeader(entry.getKey())) {<NEW_LINE>headers.put(entry.getKey(), entry.getValue());<NEW_LINE>} else {<NEW_LINE>properties.put(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>omsMsg.putSysHeaders(BuiltinKeys.MESSAGE_ID, rmqMsg.getMsgId());<NEW_LINE>omsMsg.putSysHeaders(BuiltinKeys.<MASK><NEW_LINE>omsMsg.putSysHeaders(BuiltinKeys.SEARCH_KEYS, rmqMsg.getKeys());<NEW_LINE>omsMsg.putSysHeaders(BuiltinKeys.BORN_HOST, String.valueOf(rmqMsg.getBornHost()));<NEW_LINE>omsMsg.putSysHeaders(BuiltinKeys.BORN_TIMESTAMP, rmqMsg.getBornTimestamp());<NEW_LINE>omsMsg.putSysHeaders(BuiltinKeys.STORE_HOST, String.valueOf(rmqMsg.getStoreHost()));<NEW_LINE>omsMsg.putSysHeaders(BuiltinKeys.STORE_TIMESTAMP, rmqMsg.getStoreTimestamp());<NEW_LINE>return omsMsg;<NEW_LINE>}
DESTINATION, rmqMsg.getTopic());
1,730,792
public static void viewImageInStandardApp(final Activity activity, final Uri imageUri) {<NEW_LINE>try {<NEW_LINE>final Intent intent = new Intent().setAction(Intent.ACTION_VIEW);<NEW_LINE>File file = UriUtils.isFileUri(imageUri) ? UriUtils.toFile(imageUri) : null;<NEW_LINE>final String mimeType;<NEW_LINE>if (file == null || !file.exists()) {<NEW_LINE>file = compressImageToFile(imageUri);<NEW_LINE>file.deleteOnExit();<NEW_LINE>mimeType = "image/jpeg";<NEW_LINE>} else {<NEW_LINE>mimeType = mimeTypeForUrl(imageUri.toString());<NEW_LINE>}<NEW_LINE>final String authority = activity.getString(R.string.file_provider_authority);<NEW_LINE>intent.setDataAndType(FileProvider.getUriForFile(activity, authority, file), mimeType);<NEW_LINE>intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_ACTIVITY_NEW_TASK);<NEW_LINE>activity.startActivity(intent);<NEW_LINE>} catch (final Exception e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
Log.e("ImageUtils.viewImageInStandardApp", e);
1,499,258
public void existsTest() throws IOException {<NEW_LINE>String testFile = PathUtils.concatPath(mTopLevelTestDirectory, "testFile");<NEW_LINE>if (mUfs.isFile(testFile)) {<NEW_LINE>throw new IOException(IS_FAIL_CHECK_SHOULD_FAILED);<NEW_LINE>}<NEW_LINE>createEmptyFile(testFile);<NEW_LINE>if (!mUfs.isFile(testFile)) {<NEW_LINE>throw new IOException(IS_FAIL_CHECK_SHOULD_SUCCEED);<NEW_LINE>}<NEW_LINE>String testDir = PathUtils.concatPath(mTopLevelTestDirectory, "testDir");<NEW_LINE>if (mUfs.isDirectory(testDir)) {<NEW_LINE>throw new IOException(IS_DIRECTORY_CHECK_SHOULD_FAILED);<NEW_LINE>}<NEW_LINE>mUfs.mkdirs(testDir, MkdirsOptions.defaults(<MASK><NEW_LINE>if (!mUfs.isDirectory(testDir)) {<NEW_LINE>throw new IOException(IS_DIRECTORY_CHECK_SHOULD_SUCCEED);<NEW_LINE>}<NEW_LINE>}
mConfiguration).setCreateParent(false));
770,058
public static DescribeAiotPersonTablesResponse unmarshall(DescribeAiotPersonTablesResponse describeAiotPersonTablesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAiotPersonTablesResponse.setRequestId(_ctx.stringValue("DescribeAiotPersonTablesResponse.RequestId"));<NEW_LINE>describeAiotPersonTablesResponse.setMessage(_ctx.stringValue("DescribeAiotPersonTablesResponse.Message"));<NEW_LINE>describeAiotPersonTablesResponse.setCode(_ctx.stringValue("DescribeAiotPersonTablesResponse.Code"));<NEW_LINE>List<PersonTableType> personTableList <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeAiotPersonTablesResponse.PersonTableList.Length"); i++) {<NEW_LINE>PersonTableType personTableType = new PersonTableType();<NEW_LINE>personTableType.setPersonTableId(_ctx.stringValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].PersonTableId"));<NEW_LINE>personTableType.setName(_ctx.stringValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].Name"));<NEW_LINE>personTableType.setType(_ctx.longValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].Type"));<NEW_LINE>personTableType.setTotalPersonNum(_ctx.longValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].TotalPersonNum"));<NEW_LINE>personTableType.setPersonNum(_ctx.longValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].PersonNum"));<NEW_LINE>personTableType.setFaceNum(_ctx.longValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].FaceNum"));<NEW_LINE>personTableType.setLastChange(_ctx.stringValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].LastChange"));<NEW_LINE>personTableType.setDeviceId(_ctx.stringValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].DeviceId"));<NEW_LINE>List<Long> verificationModelList = new ArrayList<Long>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].VerificationModelList.Length"); j++) {<NEW_LINE>verificationModelList.add(_ctx.longValue("DescribeAiotPersonTablesResponse.PersonTableList[" + i + "].VerificationModelList[" + j + "]"));<NEW_LINE>}<NEW_LINE>personTableType.setVerificationModelList(verificationModelList);<NEW_LINE>personTableList.add(personTableType);<NEW_LINE>}<NEW_LINE>describeAiotPersonTablesResponse.setPersonTableList(personTableList);<NEW_LINE>return describeAiotPersonTablesResponse;<NEW_LINE>}
= new ArrayList<PersonTableType>();
1,689,732
public static void main(String[] args) throws IOException {<NEW_LINE><MASK><NEW_LINE>final int start_city = cityMap.start_city;<NEW_LINE>final int end_city = cityMap.end_city;<NEW_LINE>int[] rescues = cityMap.rescues;<NEW_LINE>boolean[] visited = new boolean[cityMap.cityNumbers];<NEW_LINE>TreeSet<Node> nodes = new TreeSet<>();<NEW_LINE>nodes.add(new Node(start_city, rescues[start_city]));<NEW_LINE>int max_counts = 0;<NEW_LINE>int max_rescue_teams = 0;<NEW_LINE>int min_load_length = Integer.MAX_VALUE;<NEW_LINE>while (!nodes.isEmpty()) {<NEW_LINE>Node node = nodes.pollFirst();<NEW_LINE>visited[node.id] = true;<NEW_LINE>if (node.roadLength > min_load_length)<NEW_LINE>break;<NEW_LINE>if (node.id == end_city) {<NEW_LINE>min_load_length = node.roadLength;<NEW_LINE>max_counts++;<NEW_LINE>max_rescue_teams = Math.max(max_rescue_teams, node.rescueTeams);<NEW_LINE>}<NEW_LINE>for (Road road : cityMap.roads[node.id]) {<NEW_LINE>if (!visited[road.toCity]) {<NEW_LINE>Node newNode = new Node(road.toCity, node.rescueTeams + rescues[road.toCity]);<NEW_LINE>newNode.roadLength = node.roadLength + road.distance;<NEW_LINE>nodes.add(newNode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println(max_counts + " " + max_rescue_teams);<NEW_LINE>}
final CityMap cityMap = new CityMap();
40,951
public void addNotify() {<NEW_LINE>super.addNotify();<NEW_LINE>int ptSize = getFont().getSize();<NEW_LINE>if (useMonospacedFont) {<NEW_LINE>// NOI18N<NEW_LINE>Font font = new Font("Monospaced", Font.PLAIN, ptSize);<NEW_LINE>setFont(font);<NEW_LINE>}<NEW_LINE>fontMetrics = getFontMetrics(getFont());<NEW_LINE>int width = 0;<NEW_LINE>if (stringsToDisplay == null) {<NEW_LINE>lineSpacing = 0;<NEW_LINE>if (ptSize > 12) {<NEW_LINE>lineSpacing = LINE_SPACING + ((ptSize - 4) / 4);<NEW_LINE>} else {<NEW_LINE>lineSpacing = LINE_SPACING;<NEW_LINE>}<NEW_LINE>totalWidth = insets.left + insets.right + width;<NEW_LINE>lineHeight = charHeight + lineSpacing;<NEW_LINE>if (formatText) {<NEW_LINE>reformat();<NEW_LINE>}<NEW_LINE>int totalHeight = insets.top + insets.bottom + (charHeight * numberLines) + (lineSpacing * (numberLines - 1));<NEW_LINE>preferredSize <MASK><NEW_LINE>}
= new Dimension(totalWidth, totalHeight);
1,363,829
private void handleHtml(TagElement node) {<NEW_LINE>if (!this.options.comment_format_html && !this.options.comment_format_source)<NEW_LINE>return;<NEW_LINE>String text = this.tm.toString(node);<NEW_LINE>Matcher matcher = HTML_TAG_PATTERN.matcher(text);<NEW_LINE>while (matcher.find()) {<NEW_LINE>int startPos = matcher.start() + node.getStartPosition();<NEW_LINE>int endPos = matcher.end() - 1 + node.getStartPosition();<NEW_LINE>boolean isOpeningTag = (matcher.start(1) <MASK><NEW_LINE>if (this.options.comment_format_html) {<NEW_LINE>// make sure tokens inside the tag are wrapped only as a substitute<NEW_LINE>int firstTokenIndex = tokenStartingAt(startPos), lastTokenIndex = tokenEndingAt(endPos);<NEW_LINE>for (int i = firstTokenIndex + 1; i <= lastTokenIndex; i++) {<NEW_LINE>Token token = this.ctm.get(i);<NEW_LINE>if (token.getWrapPolicy() == null)<NEW_LINE>token.setWrapPolicy(WrapPolicy.SUBSTITUTE_ONLY);<NEW_LINE>}<NEW_LINE>// allow wraps around equals sign in attributes<NEW_LINE>String attributesText = matcher.group(8);<NEW_LINE>Matcher attrMatcher = HTML_ATTRIBUTE_PATTERN.matcher(attributesText);<NEW_LINE>final int commentStart = this.ctm.get(0).originalStart;<NEW_LINE>while (attrMatcher.find()) {<NEW_LINE>int equalPos = node.getStartPosition() + matcher.start(8) + attrMatcher.start(1);<NEW_LINE>assert this.tm.charAt(equalPos) == '=';<NEW_LINE>this.allowSubstituteWrapping[equalPos - commentStart] = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int matchedGroups = 0;<NEW_LINE>for (int i = 2; i <= 7; i++) if (matcher.start(i) < matcher.end(i))<NEW_LINE>matchedGroups++;<NEW_LINE>if (matchedGroups != 1)<NEW_LINE>continue;<NEW_LINE>if (matcher.start(2) < matcher.end(2)) {<NEW_LINE>handleFormatCodeTag(startPos, endPos, isOpeningTag);<NEW_LINE>}<NEW_LINE>if (this.options.comment_format_html) {<NEW_LINE>if (TagElement.TAG_PARAM.equals(node.getTagName()) && this.ctm.findIndex(startPos, -1, false) == 1 + this.ctm.firstIndexIn(node, -1)) {<NEW_LINE>// it's a generic class parameter name, not an HTML tag<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (matcher.start(3) < matcher.end(3)) {<NEW_LINE>handleSeparateLineTag(startPos, endPos);<NEW_LINE>} else if (matcher.start(4) < matcher.end(4)) {<NEW_LINE>handleBreakBeforeTag(startPos, endPos, isOpeningTag);<NEW_LINE>} else if (matcher.start(5) < matcher.end(5)) {<NEW_LINE>handleBreakAfterTag(startPos, endPos);<NEW_LINE>} else if (matcher.start(6) < matcher.end(6)) {<NEW_LINE>handleNoFormatTag(startPos, endPos, isOpeningTag);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
== matcher.end(1));
322,031
private void prepeareQueuePopupButton() {<NEW_LINE>final JPopupMenu popQ = new JPopupMenu();<NEW_LINE>ArrayList<DownloadQueue> qlist = QueueManager.getInstance().getQueueList();<NEW_LINE>JMenuItem[] qItems = new JMenuItem[qlist.size() + 1];<NEW_LINE>qItems[0] = new JMenuItem(StringResource.get("LBL_ALL_QUEUE"));<NEW_LINE>qItems[0].setName("Q_VIEW:ALL");<NEW_LINE>popQ.add(qItems[0]);<NEW_LINE>qItems[0].addActionListener(this);<NEW_LINE>int index = -1;<NEW_LINE>for (int i = 0; i < qlist.size(); i++) {<NEW_LINE>String qId = qlist.get(i).getQueueId();<NEW_LINE>DownloadQueue q = qlist.get(i);<NEW_LINE>qItems[i + 1] = new JMenuItem(q.getName() + (q.isRunning() ? "*" : ""));<NEW_LINE>qItems[i + 1].setName("Q_VIEW:" + qId);<NEW_LINE>qItems[i + 1].addActionListener(this);<NEW_LINE>popQ.add(qItems[i + 1]);<NEW_LINE>String selectedQ = Config.getInstance().getQueueIdFilter();<NEW_LINE>if (index == -1) {<NEW_LINE>if (selectedQ != null && selectedQ.equals(qId)) {<NEW_LINE>index = i + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (index == -1) {<NEW_LINE>index = 0;<NEW_LINE>}<NEW_LINE>qItems[index].setFont(FontResource.getBoldFont());<NEW_LINE>qItems[index].setForeground(ColorResource.getLightFontColor());<NEW_LINE>popQ.setInvoker(btnQueue);<NEW_LINE>popQ.show(btnQueue, <MASK><NEW_LINE>}
0, btnQueue.getHeight());
1,554,645
public <T> T monitorValue(T obj, ToDoubleFunction<T> f) {<NEW_LINE>final Id id = baseId.withTags(extraTags);<NEW_LINE>if (obj == null) {<NEW_LINE>registry.propagate(new IllegalArgumentException("obj is null for PolledMeter (id = " + id + "), no data will be reported. " + "See the API docs for monitorValue for guidance on how to fix the code."));<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Gauge gauge = registry.gauge(id);<NEW_LINE>final ValueState<T> tuple = new ValueState<>(gauge);<NEW_LINE>ConcurrentMap<Id, Object> state = registry.state();<NEW_LINE>Object c = Utils.computeIfAbsent(state, id, i -> tuple);<NEW_LINE>if (!(c instanceof ValueState)) {<NEW_LINE>Utils.propagateTypeError(registry, id, PolledMeter.<MASK><NEW_LINE>} else {<NEW_LINE>ValueState<T> t = (ValueState<T>) c;<NEW_LINE>t.add(obj, f);<NEW_LINE>t.schedule(registry, executor, delay);<NEW_LINE>}<NEW_LINE>return obj;<NEW_LINE>}
class, c.getClass());
272,225
public void init() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException {<NEW_LINE>// Create the initial context using the default context given to<NEW_LINE>// us by the J2EE Client Container<NEW_LINE>System.out.print("--Creating InitialContext... ");<NEW_LINE>InitialContext initCtx = new InitialContext();<NEW_LINE>System.out.println("Done.");<NEW_LINE>// Lookup the Home using the corbaname namespace.<NEW_LINE>String iiopPortString = System.getProperty("ServerIIOPPort");<NEW_LINE>System.out.print("--IIOP port is... " + iiopPortString);<NEW_LINE>System.out.print("--Looking-up Home... ");<NEW_LINE>// Object homeObject = initCtx.lookup("corbaname::localhost:" + iiopPortString + "/NameService#ejb/global/"<NEW_LINE>// + "BasicCalculator/BasicCalculatorEJB/BasicCalculator!com%5c.ibm%5c.websphere%5c.samples"<NEW_LINE>// + "%5c.technologysamples%5c.ejb%5c.stateless%5c.basiccalculatorejb%5c.BasicCalculatorHome");<NEW_LINE>Object homeObject = initCtx.lookup("corbaname::localhost:" + iiopPortString + "/NameService#ejb/global/" + "BasicCalculator/BasicCalculatorEJB/BasicCalculator!com.ibm.websphere.samples" + ".technologysamples.ejb.stateless.basiccalculatorejb.BasicCalculatorHome");<NEW_LINE>System.out.println("Done.");<NEW_LINE>// Narrow to a real object<NEW_LINE>System.out.print("--Narrowing... ");<NEW_LINE>bcHome = (BasicCalculatorHome) javax.rmi.PortableRemoteObject.<MASK><NEW_LINE>System.out.println("Done.");<NEW_LINE>// Create the home<NEW_LINE>System.out.print("--Creating Home... ");<NEW_LINE>bc = bcHome.create();<NEW_LINE>System.out.println("Done.");<NEW_LINE>}
narrow(homeObject, BasicCalculatorHome.class);
860,606
public ActionReport process(final ActionReport report, final String filter) {<NEW_LINE>if (monitoringService != null) {<NEW_LINE>String level = monitoringService.getMonitoringLevel("jvm");<NEW_LINE>if ((level != null) && (level.equals(ContainerMonitoring.LEVEL_OFF))) {<NEW_LINE>report.setActionExitCode(ActionReport.ExitCode.FAILURE);<NEW_LINE>report.setMessage(localStrings<MASK><NEW_LINE>return report;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (mrdr == null) {<NEW_LINE>report.setActionExitCode(ActionReport.ExitCode.FAILURE);<NEW_LINE>report.setMessage(localStrings.getLocalString("mrdr.null", "MonitoringRuntimeDataRegistry is null"));<NEW_LINE>return report;<NEW_LINE>}<NEW_LINE>TreeNode serverNode = mrdr.get("server");<NEW_LINE>if (serverNode == null) {<NEW_LINE>report.setActionExitCode(ActionReport.ExitCode.FAILURE);<NEW_LINE>report.setMessage(localStrings.getLocalString("mrdr.null", "MonitoringRuntimeDataRegistry server node is null"));<NEW_LINE>return report;<NEW_LINE>}<NEW_LINE>if ((filter != null) && (filter.length() > 0)) {<NEW_LINE>if ("heapmemory".equals(filter)) {<NEW_LINE>return (heapMemory(report, serverNode));<NEW_LINE>} else if ("nonheapmemory".equals(filter)) {<NEW_LINE>return (nonHeapMemory(report, serverNode));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return (v2JVM(report, serverNode));<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
.getLocalString("level.off", "Monitoring level for jvm is off"));
197,730
public void AppendValue(final String tag, final Object valueToAdd) {<NEW_LINE><MASK><NEW_LINE>Firebase firebaseChild = myFirebase.child(tag);<NEW_LINE>Transactional toRun = new Transactional(null, null, result) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>Transaction.Result run(MutableData currentData) {<NEW_LINE>Object value = currentData.getValue();<NEW_LINE>if (value == null) {<NEW_LINE>result.err = "Previous value was empty.";<NEW_LINE>return Transaction.abort();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (value instanceof String) {<NEW_LINE>value = JsonUtil.getObjectFromJson((String) value, true);<NEW_LINE>} else {<NEW_LINE>result.err = "Invalid JSON object in database (shouldn't happen!)";<NEW_LINE>return Transaction.abort();<NEW_LINE>}<NEW_LINE>} catch (JSONException e) {<NEW_LINE>result.err = "Invalid JSON object in database (shouldn't happen!)";<NEW_LINE>return Transaction.abort();<NEW_LINE>}<NEW_LINE>if (value instanceof List) {<NEW_LINE>((List) value).add(valueToAdd);<NEW_LINE>try {<NEW_LINE>value = JsonUtil.getJsonRepresentation((List) value);<NEW_LINE>} catch (JSONException e) {<NEW_LINE>result.err = "Could not convert value to JSON.";<NEW_LINE>return Transaction.abort();<NEW_LINE>}<NEW_LINE>currentData.setValue(value);<NEW_LINE>return Transaction.success(currentData);<NEW_LINE>} else {<NEW_LINE>result.err = "You can only append to a list.";<NEW_LINE>return Transaction.abort();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>firebaseTransaction(toRun, firebaseChild, null);<NEW_LINE>}
final ReturnVal result = new ReturnVal();
100,515
// ***********************************************************************************<NEW_LINE>// METHODS<NEW_LINE>// ***********************************************************************************<NEW_LINE>@Override<NEW_LINE>public void filter(IntVar[] s, IntVar[] d, IntVar[] e, IntVar[] h, IntVar capa, ISet tasks, Propagator<IntVar> aCause) throws ContradictionException {<NEW_LINE>int idx = 0;<NEW_LINE>ISetIterator tIter = tasks.iterator();<NEW_LINE>while (tIter.hasNext()) {<NEW_LINE>int i = tIter.nextInt();<NEW_LINE>if (d[i].getLB() > 0) {<NEW_LINE>slb[i] = s[i].getLB();<NEW_LINE>dlb[i] = d[i].getLB();<NEW_LINE>eub[i] = e[i].getUB();<NEW_LINE>hlb[i] = h[i].getLB();<NEW_LINE>assert eub[i] > slb[i];<NEW_LINE>sor_array[idx++] = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sorter.sort(sor_array, idx, comparator);<NEW_LINE>double xMin = Integer.MAX_VALUE / 2d;<NEW_LINE>double xMax = Integer.MIN_VALUE / 2d;<NEW_LINE>double surface = 0;<NEW_LINE><MASK><NEW_LINE>for (int k = 0; k < idx; k++) {<NEW_LINE>int i = sor_array[k];<NEW_LINE>xMax = Math.max(xMax, eub[i]);<NEW_LINE>xMin = Math.min(xMin, slb[i]);<NEW_LINE>if (xMax >= xMin) {<NEW_LINE>double availSurf = ((xMax - xMin) * camax - surface);<NEW_LINE>if (dlb[i] > 0)<NEW_LINE>h[i].updateUpperBound((int) Math.floor((availSurf / (double) dlb[i]) + 0.01), aCause);<NEW_LINE>if (hlb[i] > 0)<NEW_LINE>d[i].updateUpperBound((int) Math.floor((availSurf / (double) hlb[i]) + 0.01), aCause);<NEW_LINE>// potential overflow<NEW_LINE>surface += (long) dlb[i] * hlb[i];<NEW_LINE>if (xMax > xMin) {<NEW_LINE>capa.updateLowerBound((int) Math.ceil(surface / (xMax - xMin) - 0.01), aCause);<NEW_LINE>}<NEW_LINE>if (surface > (xMax - xMin) * camax) {<NEW_LINE>// TODO: could be more precise, for explanation purpose<NEW_LINE>aCause.fails();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
double camax = capa.getUB();
386,790
private synchronized void startPeriodicals(Set<Periodical> periodicalsToStart) {<NEW_LINE>final Sets.SetView<Periodical> notYetStartedPeriodicals = Sets.difference(periodicalsToStart, ImmutableSet.copyOf(periodicals.getAll()));<NEW_LINE>int numOfPeriodicalsToSkip = periodicalsToStart.size() - notYetStartedPeriodicals.size();<NEW_LINE>if (numOfPeriodicalsToSkip > 0) {<NEW_LINE>LOG.warn("Skipping start of {} periodicals which have already been started.", numOfPeriodicalsToSkip);<NEW_LINE>}<NEW_LINE>for (Periodical periodical : notYetStartedPeriodicals) {<NEW_LINE>try {<NEW_LINE>periodical.initialize();<NEW_LINE>if (!periodical.startOnThisNode()) {<NEW_LINE>LOG.info("Not starting [{}] periodical. Not configured to run on this node.", periodical.<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Register and start.<NEW_LINE>periodicals.registerAndStart(periodical);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Could not initialize periodical.", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getClass().getCanonicalName());
1,708,195
private boolean toggleS3Settings(final boolean stop) {<NEW_LINE>this.window().endEditingFor(null);<NEW_LINE>final Credentials credentials = session.getHost().getCredentials();<NEW_LINE>boolean enable = session.getHost().getProtocol().getType() == Protocol.Type.s3 || session.getHost().getProtocol().getType() == Protocol.Type.b2 || session.getHost().getProtocol().getType() == Protocol.Type.azure || session.getHost().getProtocol().getType() == Protocol.Type.googlestorage;<NEW_LINE>if (enable) {<NEW_LINE>enable = !credentials.isAnonymousLogin();<NEW_LINE>}<NEW_LINE>boolean logging = false;<NEW_LINE>boolean versioning = false;<NEW_LINE>boolean storageclass = false;<NEW_LINE>boolean encryption = false;<NEW_LINE>boolean lifecycle = false;<NEW_LINE>boolean acceleration = false;<NEW_LINE>if (enable) {<NEW_LINE>logging = session.getFeature(Logging.class) != null;<NEW_LINE>versioning = session.getFeature(Versioning.class) != null;<NEW_LINE>lifecycle = session.getFeature(Lifecycle.class) != null;<NEW_LINE>encryption = session.getFeature(Encryption.class) != null;<NEW_LINE>storageclass = session.<MASK><NEW_LINE>acceleration = session.getFeature(TransferAcceleration.class) != null;<NEW_LINE>}<NEW_LINE>storageClassPopup.setEnabled(stop && enable && storageclass);<NEW_LINE>encryptionPopup.setEnabled(stop && enable && encryption);<NEW_LINE>bucketVersioningButton.setEnabled(stop && enable && versioning);<NEW_LINE>bucketMfaButton.setEnabled(stop && enable && versioning && bucketVersioningButton.state() == NSCell.NSOnState);<NEW_LINE>bucketTransferAccelerationButton.setEnabled(stop && enable && acceleration);<NEW_LINE>bucketLoggingButton.setEnabled(stop && enable && logging);<NEW_LINE>bucketLoggingPopup.setEnabled(stop && enable && logging);<NEW_LINE>lifecycleDeletePopup.setEnabled(stop && enable && lifecycle);<NEW_LINE>lifecycleDeleteCheckbox.setEnabled(stop && enable && lifecycle);<NEW_LINE>lifecycleTransitionPopup.setEnabled(stop && enable && lifecycle);<NEW_LINE>lifecycleTransitionCheckbox.setEnabled(stop && enable && lifecycle);<NEW_LINE>if (stop) {<NEW_LINE>s3Progress.stopAnimation(null);<NEW_LINE>} else if (enable) {<NEW_LINE>s3Progress.startAnimation(null);<NEW_LINE>}<NEW_LINE>return enable;<NEW_LINE>}
getFeature(Redundancy.class) != null;
1,853,631
private <T extends ArchiveEntry> Path createArchive(ProjectGenerationResult result, String fileExtension, Function<OutputStream, ? extends ArchiveOutputStream> archiveOutputStream, BiFunction<File, String, T> archiveEntry, BiConsumer<T, Integer> setMode) throws IOException {<NEW_LINE>Path archive = this.projectGenerationInvoker.createDistributionFile(result.getRootDirectory(), "." + fileExtension);<NEW_LINE>String wrapperScript = getWrapperScript(result.getProjectDescription());<NEW_LINE>try (ArchiveOutputStream output = archiveOutputStream.apply(Files.newOutputStream(archive))) {<NEW_LINE>Files.walk(result.getRootDirectory()).filter((path) -> !result.getRootDirectory().equals(path)).forEach((path) -> {<NEW_LINE>try {<NEW_LINE>String entryName = getEntryName(result.getRootDirectory(), path);<NEW_LINE>T entry = archiveEntry.apply(path.toFile(), entryName);<NEW_LINE>setMode.accept(entry, getUnixMode<MASK><NEW_LINE>output.putArchiveEntry(entry);<NEW_LINE>if (!Files.isDirectory(path)) {<NEW_LINE>Files.copy(path, output);<NEW_LINE>}<NEW_LINE>output.closeArchiveEntry();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>throw new IllegalStateException(ex);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return archive;<NEW_LINE>}
(wrapperScript, entryName, path));
1,356,668
private void sendLogicalClose(boolean request) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "sendLogicalClose", "" + request);<NEW_LINE>eventRecorder.logEntry("sendLogicalClose");<NEW_LINE>// Create a new implementation of the JFapByteBuffer with a single byte in it<NEW_LINE>InternalJFapByteBuffer buffer = new InternalJFapByteBuffer();<NEW_LINE>if (request)<NEW_LINE>buffer.put((byte) 0);<NEW_LINE>else<NEW_LINE>buffer.put((byte) 1);<NEW_LINE>// begin D273932<NEW_LINE>LogicalCloseSendListener listener = null;<NEW_LINE>if (request) {<NEW_LINE>// Only use the send listener if this is a request to close. We do not need notification<NEW_LINE>// for sending close responses.<NEW_LINE>listener = new LogicalCloseSendListener();<NEW_LINE>eventRecorder.logDebug("LogicalCloseSendListener hashcode: " + Integer.toHexString(System.identityHashCode(listener)));<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>connection.send(buffer, JFapChannelConstants.SEGMENT_LOGICAL_CLOSE, id, 0, Conversation.PRIORITY_LOWEST, true, false, ThrottlingPolicy.DO_NOT_THROTTLE, listener, this, false);<NEW_LINE>} catch (SIException e) {<NEW_LINE>FFDCFilter.processException(e, "com.ibm.ws.sib.jfapchannel.impl.ConversationImpl", JFapChannelConstants.CONVIMPL_CLOSE_01, eventRecorder.toString());<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())<NEW_LINE>SibTr.exception(this, tc, e);<NEW_LINE>// D224570<NEW_LINE>connection.<MASK><NEW_LINE>waitForCloseToCompleteSemaphore.post();<NEW_LINE>}<NEW_LINE>eventRecorder.logExit("sendLogicalClose");<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "sendLogicalClose");<NEW_LINE>}
invalidate(false, e, "SIException thrown from system send");
1,618,805
private void outputAnswer(Answer answer, boolean writeLog) {<NEW_LINE>try {<NEW_LINE>// Write answer to work json log if caller requested.<NEW_LINE>// Summarize that answer if all of the following are true:<NEW_LINE>// - answering a question<NEW_LINE>// - question successful<NEW_LINE>// - client did not request full successful answers<NEW_LINE>String answerString = BatfishObjectMapper.writeString(answer);<NEW_LINE>boolean summarizeWorkJsonLogAnswer = writeLog && _settings.getQuestionName() != null && !_settings.getAlwaysIncludeAnswerInWorkJsonLog() && answer.getStatus() == AnswerStatus.SUCCESS;<NEW_LINE>String workJsonLogAnswerString;<NEW_LINE>if (summarizeWorkJsonLogAnswer) {<NEW_LINE>Answer summaryAnswer = new Answer();<NEW_LINE>summaryAnswer.setQuestion(answer.getQuestion());<NEW_LINE>summaryAnswer.setStatus(answer.getStatus());<NEW_LINE>summaryAnswer.setSummary(answer.getSummary());<NEW_LINE>// do not include answer elements<NEW_LINE>workJsonLogAnswerString = BatfishObjectMapper.writeString(summaryAnswer);<NEW_LINE>} else {<NEW_LINE>workJsonLogAnswerString = answerString;<NEW_LINE>}<NEW_LINE>_logger.debug(answerString);<NEW_LINE>writeJsonAnswerWithLog(answerString, workJsonLogAnswerString, writeLog);<NEW_LINE>} catch (Exception e) {<NEW_LINE>BatfishException be = new BatfishException("Error in sending answer", e);<NEW_LINE>try {<NEW_LINE>Answer failureAnswer = Answer.failureAnswer(e.toString(), answer.getQuestion());<NEW_LINE>failureAnswer.<MASK><NEW_LINE>String answerString = BatfishObjectMapper.writeString(failureAnswer);<NEW_LINE>_logger.error(answerString);<NEW_LINE>// write "answer" to work json log if caller requested<NEW_LINE>writeJsonAnswerWithLog(answerString, answerString, writeLog);<NEW_LINE>} catch (Exception e1) {<NEW_LINE>_logger.errorf("Could not serialize failure answer. %s", Throwables.getStackTraceAsString(e1));<NEW_LINE>}<NEW_LINE>throw be;<NEW_LINE>}<NEW_LINE>}
addAnswerElement(be.getBatfishStackTrace());
453,474
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TargetCardInLibrary target = new TargetCardInLibrary();<NEW_LINE>if (controller.searchLibrary(target, source, game)) {<NEW_LINE>Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);<NEW_LINE>if (card != null) {<NEW_LINE>controller.moveCards(card, Zone.EXILED, source, game);<NEW_LINE>controller.shuffleLibrary(source, game);<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("Have ").append(controller.getLogName()).append(" put ").append(card.getName());<NEW_LINE>sb.append(" in their hand? If none of their opponents says yes, they will draw three cards.");<NEW_LINE>boolean putInHand = false;<NEW_LINE>Set<UUID> opponents = game.getOpponents(source.getControllerId());<NEW_LINE>for (UUID opponentUuid : opponents) {<NEW_LINE>Player opponent = game.getPlayer(opponentUuid);<NEW_LINE>if (opponent != null) {<NEW_LINE>if (opponent.chooseUse(Outcome.Detriment, sb.toString(), source, game)) {<NEW_LINE>putInHand = true;<NEW_LINE>game.informPlayers(opponent.getLogName() + " decides to put the selected card into the player's hand.");<NEW_LINE>} else {<NEW_LINE>game.informPlayers(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (putInHand) {<NEW_LINE>controller.moveCards(card, Zone.HAND, source, game);<NEW_LINE>} else {<NEW_LINE>controller.drawCards(3, source, game);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>controller.shuffleLibrary(source, game);<NEW_LINE>return false;<NEW_LINE>}
opponent.getLogName() + " decides to leave the card in exile.");
764,785
void writeBlob(String blobName, BytesReference bytes, boolean failIfAlreadyExists) throws IOException {<NEW_LINE>if (bytes.length() > getLargeBlobThresholdInBytes()) {<NEW_LINE>// Compute md5 here so #writeBlobResumable forces the integrity check on the resumable upload.<NEW_LINE>// This is needed since we rely on atomic write behavior when writing BytesReferences in BlobStoreRepository which is not<NEW_LINE>// guaranteed for resumable uploads.<NEW_LINE>final String md5 = Base64.getEncoder().encodeToString(MessageDigests.digest(bytes, MessageDigests.md5()));<NEW_LINE>writeBlobResumable(BlobInfo.newBuilder(bucketName, blobName).setMd5(md5).build(), bytes.streamInput(), bytes.length(), failIfAlreadyExists);<NEW_LINE>} else {<NEW_LINE>final BlobInfo blobInfo = BlobInfo.newBuilder(<MASK><NEW_LINE>if (bytes.hasArray()) {<NEW_LINE>writeBlobMultipart(blobInfo, bytes.array(), bytes.arrayOffset(), bytes.length(), failIfAlreadyExists);<NEW_LINE>} else {<NEW_LINE>writeBlob(bytes.streamInput(), bytes.length(), failIfAlreadyExists, blobInfo);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
bucketName, blobName).build();
185,263
public static void processBorderVertical(GrayF32 orig, GrayF32 deriv, Kernel1D_F32 kernel, ImageBorder_F32 borderType) {<NEW_LINE>borderType.setImage(orig);<NEW_LINE>ConvolveJustBorder_General_SB.vertical(kernel, borderType, deriv);<NEW_LINE>GrayF32 origSub;<NEW_LINE>GrayF32 derivSub;<NEW_LINE>origSub = orig.subimage(0, 0, 2, orig.height, null);<NEW_LINE>derivSub = deriv.subimage(0, 0, 2, orig.height, null);<NEW_LINE>ConvolveImageNoBorder.<MASK><NEW_LINE>origSub = orig.subimage(orig.width - 2, 0, orig.width, orig.height, null);<NEW_LINE>derivSub = deriv.subimage(orig.width - 2, 0, orig.width, orig.height, null);<NEW_LINE>ConvolveImageNoBorder.vertical(kernel, origSub, derivSub);<NEW_LINE>}
vertical(kernel, origSub, derivSub);
164,381
public void handleMessage(GlobalHandlerMessageContext msgctxt) throws Exception {<NEW_LINE>// get HttpServletRequest<NEW_LINE>HttpServletRequest httpRequest = msgctxt.getHttpServletRequest();<NEW_LINE>if (httpRequest != null) {<NEW_LINE>System.out.println(httpRequest.getCharacterEncoding());<NEW_LINE>System.out.<MASK><NEW_LINE>System.out.println(httpRequest.getPathInfo());<NEW_LINE>}<NEW_LINE>SOAPMessageContext soapmsgctxt = msgctxt.adapt(SOAPMessageContext.class);<NEW_LINE>if (msgctxt.getFlowType() == HandlerConstants.FLOW_TYPE_OUT) {<NEW_LINE>// get WSDL_OPERATION and WSDL_SERVICE<NEW_LINE>System.out.println("OperationName: " + soapmsgctxt.get(SOAPMessageContext.WSDL_OPERATION));<NEW_LINE>System.out.println("ServiceName: " + soapmsgctxt.get(SOAPMessageContext.WSDL_SERVICE));<NEW_LINE>}<NEW_LINE>// add a new soap header<NEW_LINE>SOAPMessage oldMsg = soapmsgctxt.getMessage();<NEW_LINE>try {<NEW_LINE>SOAPHeader header = oldMsg.getSOAPHeader();<NEW_LINE>QName qname = new QName("http://www.webservice.com", "licenseInfo", "ns");<NEW_LINE>header.addHeaderElement(qname).setValue("12345");<NEW_LINE>} catch (Exception e1) {<NEW_LINE>e1.printStackTrace();<NEW_LINE>}<NEW_LINE>// add one property<NEW_LINE>msgctxt.setProperty("age", 12);<NEW_LINE>}
println(httpRequest.getLocalAddr());
1,721,338
public void onClick(View v) {<NEW_LINE>AlertDialog.Builder builder = new <MASK><NEW_LINE>builder.setTitle(getString(R.string.profile_contact));<NEW_LINE>final EditText input = new EditText(getContext());<NEW_LINE>input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_CLASS_PHONE);<NEW_LINE>builder.setView(input);<NEW_LINE>builder.setPositiveButton(getString(R.string.ok_alert), new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>contactNumber = input.getText().toString();<NEW_LINE>if (!contactNumber.trim().isEmpty() && !TextUtils.isEmpty(contactNumber)) {<NEW_LINE>Contact contact = new Contact();<NEW_LINE>contact.setContactNumber(contactNumber);<NEW_LINE>AlTask.execute(new ProfilePictureUpload(contact, getActivity(), null, null, contactNumberText));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>dialog.cancel();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.show();<NEW_LINE>}
AlertDialog.Builder(getContext());
1,816,721
public void startElement(final String uri, final String name, final String tag, final Attributes atts) throws SAXException {<NEW_LINE>if (scrapeMetaData) {<NEW_LINE>// not implemented yet TODO: interprete RDF content<NEW_LINE>// may contain RDF + DC, DC, CC ...<NEW_LINE>} else {<NEW_LINE>if (tag != null) {<NEW_LINE>switch(tag) {<NEW_LINE>case "svg":<NEW_LINE>svgStartTagFound = true;<NEW_LINE>imgHeight = atts.getValue("height");<NEW_LINE>imgWidth = atts.getValue("width");<NEW_LINE>break;<NEW_LINE>case "metadata":<NEW_LINE>scrapeMetaData = true;<NEW_LINE>break;<NEW_LINE>// some common graph elements as stop condition (skip reading remainder of input), metadata is expected before graphic content<NEW_LINE>case "g":<NEW_LINE>case "line":<NEW_LINE>case "path":<NEW_LINE>case "rect":<NEW_LINE>throw new SAXException("EOF svg Metadata", new EOFException());<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>// K.O. criteria, start tag is not svg, fail parser on none svg<NEW_LINE>if (!svgStartTagFound) {<NEW_LINE>throw new SAXException("not a svg file, start tag " + tag, new Failure());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>buffer.delete(<MASK><NEW_LINE>}
0, buffer.length());
923,388
public void exitRo_redistribute_bgp_cisco(Ro_redistribute_bgp_ciscoContext ctx) {<NEW_LINE>OspfProcess proc = _currentOspfProcess;<NEW_LINE>RoutingProtocol sourceProtocol = RoutingProtocol.BGP;<NEW_LINE>OspfRedistributionPolicy r = new OspfRedistributionPolicy(sourceProtocol);<NEW_LINE>proc.getRedistributionPolicies().put(sourceProtocol, r);<NEW_LINE>long as = <MASK><NEW_LINE>r.getSpecialAttributes().put(OspfRedistributionPolicy.BGP_AS, as);<NEW_LINE>if (ctx.metric != null) {<NEW_LINE>int metric = toInteger(ctx.metric);<NEW_LINE>r.setMetric(metric);<NEW_LINE>}<NEW_LINE>if (ctx.map != null) {<NEW_LINE>String map = ctx.map.getText();<NEW_LINE>r.setRouteMap(map);<NEW_LINE>_configuration.referenceStructure(ROUTE_MAP, map, OSPF_REDISTRIBUTE_BGP_MAP, ctx.map.getLine());<NEW_LINE>}<NEW_LINE>if (ctx.type != null) {<NEW_LINE>int typeInt = toInteger(ctx.type);<NEW_LINE>OspfMetricType type = OspfMetricType.fromInteger(typeInt);<NEW_LINE>r.setOspfMetricType(type);<NEW_LINE>} else {<NEW_LINE>r.setOspfMetricType(OspfRedistributionPolicy.DEFAULT_METRIC_TYPE);<NEW_LINE>}<NEW_LINE>if (ctx.tag != null) {<NEW_LINE>long tag = toLong(ctx.tag);<NEW_LINE>r.setTag(tag);<NEW_LINE>}<NEW_LINE>r.setOnlyClassfulRoutes(ctx.subnets == null && !ospfRedistributeSubnetsByDefault(_format));<NEW_LINE>}
toAsNum(ctx.bgp_asn());
788,412
protected void recordAttributes(SpanEventRecorder recorder, LoggingMessage loggingMessage) {<NEW_LINE>StringBuilder address = loggingMessage.getAddress();<NEW_LINE>if (address.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_ADDRESS, address.toString());<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (responseCode.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_RESPONSE_CODE, responseCode.toString());<NEW_LINE>}<NEW_LINE>StringBuilder encoding = loggingMessage.getEncoding();<NEW_LINE>if (encoding.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_ENCODING, encoding.toString());<NEW_LINE>}<NEW_LINE>StringBuilder httpMethod = loggingMessage.getHttpMethod();<NEW_LINE>if (httpMethod.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_HTTP_METHOD, httpMethod.toString());<NEW_LINE>}<NEW_LINE>StringBuilder contentType = loggingMessage.getContentType();<NEW_LINE>if (contentType.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_CONTENT_TYPE, contentType.toString());<NEW_LINE>}<NEW_LINE>StringBuilder header = loggingMessage.getHeader();<NEW_LINE>if (header.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_HEADERS, header.toString());<NEW_LINE>}<NEW_LINE>StringBuilder message = loggingMessage.getMessage();<NEW_LINE>if (message.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_MESSAGES, message.toString());<NEW_LINE>}<NEW_LINE>StringBuilder payload = loggingMessage.getPayload();<NEW_LINE>if (payload.length() > 0) {<NEW_LINE>recorder.recordAttribute(CxfPluginConstants.CXF_PAYLOAD, payload.toString());<NEW_LINE>}<NEW_LINE>}
StringBuilder responseCode = loggingMessage.getResponseCode();
1,808,648
private void initMetrics(UUID serverId) {<NEW_LINE>Metrics metrics = new Metrics("DragonProxy", serverId.toString(), 2094);<NEW_LINE>metrics.addCustomChart(new Metrics.SingleLineChart("servers", () -> 1));<NEW_LINE>metrics.addCustomChart(new Metrics.SimplePie("bedrock_versions", DragonProxy.BEDROCK_CODEC::getMinecraftVersion));<NEW_LINE>metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> proxy.getSessionManager().getSessions().size()));<NEW_LINE>metrics.addCustomChart(new Metrics.SimplePie("auth_type", () -> {<NEW_LINE>String authType = proxy.getConfiguration().getRemoteServer().getAuthType().name().toLowerCase();<NEW_LINE>return Character.toUpperCase(authType.charAt(0)) + authType.substring(1);<NEW_LINE>}));<NEW_LINE>metrics.addCustomChart(new Metrics.SimplePie("proxy_version", () <MASK><NEW_LINE>}
-> proxy.getVersion()));
187,294
public void renderTileEntityAt(TileLaser laser, double x, double y, double z, float f, int i) {<NEW_LINE>Minecraft.getMinecraft().mcProfiler.startSection("bc");<NEW_LINE>Minecraft.getMinecraft().mcProfiler.startSection("laser_tile");<NEW_LINE>if (laser != null) {<NEW_LINE>GL11.glPushMatrix();<NEW_LINE>GL11.glTranslated(x, y, z);<NEW_LINE>GL11.glTranslated(-laser.getPos().getX(), -laser.getPos().getY(), -laser.getPos().getZ());<NEW_LINE>GL11.glPushMatrix();<NEW_LINE>GlStateManager.disableLighting();<NEW_LINE>OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 0xF0, 0xF0);<NEW_LINE>RenderLaser.doRenderLaser(TileEntityRendererDispatcher.instance.worldObj, TileEntityRendererDispatcher.instance.renderEngine, laser.<MASK><NEW_LINE>GlStateManager.enableLighting();<NEW_LINE>GL11.glPopMatrix();<NEW_LINE>GL11.glPopMatrix();<NEW_LINE>}<NEW_LINE>Minecraft.getMinecraft().mcProfiler.endSection();<NEW_LINE>Minecraft.getMinecraft().mcProfiler.endSection();<NEW_LINE>}
laser, laser.getTexture());
1,659,004
private void initRestOfGroupDependencies(Class<? extends ITestOrConfiguration> annotationClass) {<NEW_LINE>//<NEW_LINE>// Init groups depended upon<NEW_LINE>//<NEW_LINE>ITestOrConfiguration annotation = getAnnotationFinder().<MASK><NEW_LINE>ITestOrConfiguration classAnnotation = getAnnotationFinder().findAnnotation(getConstructorOrMethod().getDeclaringClass(), annotationClass);<NEW_LINE>Map<String, Set<String>> xgd = calculateXmlGroupDependencies(m_xmlTest);<NEW_LINE>List<String> xmlGroupDependencies = Lists.newArrayList();<NEW_LINE>for (String g : getGroups()) {<NEW_LINE>Set<String> gdu = xgd.get(g);<NEW_LINE>if (gdu != null) {<NEW_LINE>xmlGroupDependencies.addAll(gdu);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setGroupsDependedUpon(getStringArray(null != annotation ? annotation.getDependsOnGroups() : null, null != classAnnotation ? classAnnotation.getDependsOnGroups() : null), xmlGroupDependencies);<NEW_LINE>String[] methodsDependedUpon = getStringArray(null != annotation ? annotation.getDependsOnMethods() : null, null != classAnnotation ? classAnnotation.getDependsOnMethods() : null);<NEW_LINE>// Qualify these methods if they don't have a package<NEW_LINE>for (int i = 0; i < methodsDependedUpon.length; i++) {<NEW_LINE>String m = methodsDependedUpon[i];<NEW_LINE>if (!m.contains(".")) {<NEW_LINE>m = MethodHelper.calculateMethodCanonicalName(m_methodClass, methodsDependedUpon[i]);<NEW_LINE>methodsDependedUpon[i] = m != null ? m : methodsDependedUpon[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setMethodsDependedUpon(methodsDependedUpon);<NEW_LINE>}
findAnnotation(getConstructorOrMethod(), annotationClass);
325,808
public void unlockRead(long stamp) {<NEW_LINE>offHeapLock = chm.get("Stamp ");<NEW_LINE>readLockHolderCount = chmR.get("ReaderCount ");<NEW_LINE>Jvm.debug().on(getClass(), " ,@t=" + System.currentTimeMillis() + " ChronicleStampedLock unlockRead(" + stamp + ") unlocking.." + "ReaderCount=[" + (readLockHolderCount = chmR.get("ReaderCount ")).getVolatileValue() + "]" + " BEFORE addAtomic(-1) " + ",");<NEW_LINE>// DECREMENT the cardinality of the Reader set<NEW_LINE>readLockHolderCount.addAtomicValue(-1);<NEW_LINE>// make it IPC visible<NEW_LINE>chmR.put("ReaderCount ", readLockHolderCount);<NEW_LINE>Jvm.debug().on(getClass(), " ,@t=" + System.currentTimeMillis() + " ChronicleStampedLock unlockRead(" + stamp + ") unlocking.." + "ReaderCount=[" + (readLockHolderCount = chmR.get("ReaderCount ")).getVolatileValue() + "]" + " AFTER addAtomic(-1) " + ",");<NEW_LINE>offHeapLock.setEntryLockState((readLockHolderCount = chmR.get("ReaderCount ")).getVolatileValue());<NEW_LINE>Jvm.debug().on(getClass(), " ,@t=" + System.currentTimeMillis() + "offHeapLock=[" + offHeapLock.getEntryLockState() + "]" + ",");<NEW_LINE>chm.put("Stamp ", offHeapLock);<NEW_LINE><MASK><NEW_LINE>}
chmR.put("ReaderCount ", readLockHolderCount);
861,735
private ImmutableListMultimap<TableRecordReference, LocationId> extractLocationIds(@NonNull final List<RecordRefWithLogEntry> entriesWithLocationId) {<NEW_LINE>final ImmutableList<RecordRefWithLogEntry> entriesWithLocationIdToUse = entriesWithLocationId.stream().collect(ImmutableList.toImmutableList());<NEW_LINE>final ImmutableListMultimap.Builder<TableRecordReference, LocationId<MASK><NEW_LINE>if (entriesWithLocationIdToUse.isEmpty()) {<NEW_LINE>return recordRef2LocationIds.build();<NEW_LINE>}<NEW_LINE>// We need have the first changelog's *old* value for each C_Location-referencing column of every TableRecordRef!<NEW_LINE>final HashSet<LocationId> alreadySeen = new HashSet<>();<NEW_LINE>final ImmutableListMultimap<ArrayKey, RecordRefWithLogEntry> index = Multimaps.index(entriesWithLocationIdToUse, entry -> ArrayKey.of(entry.getRecordRef(), entry.getRecordChangeLogEntry().getColumnName()));<NEW_LINE>for (final Collection<RecordRefWithLogEntry> recordRefWithLogEntrys : index.asMap().values()) {<NEW_LINE>final Comparator<RecordRefWithLogEntry> comparator = Comparator.comparing(e -> e.getRecordChangeLogEntry().getChangedTimestamp());<NEW_LINE>final Optional<RecordRefWithLogEntry> firstRecordRefWithLogEntry = recordRefWithLogEntrys.stream().filter(LOCATION_ID_OLD_VALUE_NOT_NULL).min(comparator);<NEW_LINE>if (!firstRecordRefWithLogEntry.isPresent()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final LocationId locationId = extractValueOldAsLocationId(firstRecordRefWithLogEntry.get()).orElseThrow(() -> new AdempiereException("Can't happend because we filtered it out"));<NEW_LINE>alreadySeen.add(locationId);<NEW_LINE>recordRef2LocationIds.put(firstRecordRefWithLogEntry.get().getRecordRef(), locationId);<NEW_LINE>}<NEW_LINE>// for all change logs including the first ones, we extract their new values<NEW_LINE>// note that the order doesn't really matter; we will make sure the correct order later, after we got the actual C_Location records<NEW_LINE>boolean useValueOldOfNextEntry = false;<NEW_LINE>for (final RecordRefWithLogEntry recordRefWithLogEntry : entriesWithLocationIdToUse) {<NEW_LINE>try (final MDCCloseable mdc = TableRecordMDC.putTableRecordReference(recordRefWithLogEntry.getRecordRef())) {<NEW_LINE>final Optional<LocationId> newValueLocationId = extractValueNewAsLocationId(recordRefWithLogEntry);<NEW_LINE>if (!newValueLocationId.isPresent()) {<NEW_LINE>useValueOldOfNextEntry = true;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (useValueOldOfNextEntry) {<NEW_LINE>Optional<LocationId> oldValueLocationId = extractValueOldAsLocationId(recordRefWithLogEntry);<NEW_LINE>if (!oldValueLocationId.isPresent()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (alreadySeen.add(oldValueLocationId.get())) {<NEW_LINE>recordRef2LocationIds.put(recordRefWithLogEntry.getRecordRef(), oldValueLocationId.get());<NEW_LINE>}<NEW_LINE>useValueOldOfNextEntry = false;<NEW_LINE>}<NEW_LINE>if (alreadySeen.add(newValueLocationId.get())) {<NEW_LINE>recordRef2LocationIds.put(recordRefWithLogEntry.getRecordRef(), newValueLocationId.get());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return recordRef2LocationIds.build();<NEW_LINE>}
> recordRef2LocationIds = ImmutableListMultimap.builder();
1,561,546
public void initScene() {<NEW_LINE>DirectionalLight light = new DirectionalLight(.1f, .1f, -1);<NEW_LINE>light.setPower(2);<NEW_LINE><MASK><NEW_LINE>Material timeSphereMaterial = new Material();<NEW_LINE>timeSphereMaterial.enableLighting(true);<NEW_LINE>timeSphereMaterial.setDiffuseMethod(new DiffuseMethod.Lambert());<NEW_LINE>mTimeBitmap = Bitmap.createBitmap(256, 256, Config.ARGB_8888);<NEW_LINE>mTimeTexture = new AlphaMapTexture("timeTexture", mTimeBitmap);<NEW_LINE>try {<NEW_LINE>timeSphereMaterial.addTexture(mTimeTexture);<NEW_LINE>} catch (ATexture.TextureException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>timeSphereMaterial.setColorInfluence(1);<NEW_LINE>Sphere parentSphere = null;<NEW_LINE>for (int i = 0; i < 20; i++) {<NEW_LINE>Sphere timeSphere = new Sphere(.6f, 12, 12);<NEW_LINE>timeSphere.setMaterial(timeSphereMaterial);<NEW_LINE>timeSphere.setDoubleSided(true);<NEW_LINE>timeSphere.setColor((int) (Math.random() * 0xffffff));<NEW_LINE>if (parentSphere == null) {<NEW_LINE>timeSphere.setPosition(0, 0, -3);<NEW_LINE>timeSphere.setRenderChildrenAsBatch(true);<NEW_LINE>getCurrentScene().addChild(timeSphere);<NEW_LINE>parentSphere = timeSphere;<NEW_LINE>} else {<NEW_LINE>timeSphere.setX(-3 + (float) (Math.random() * 6));<NEW_LINE>timeSphere.setY(-3 + (float) (Math.random() * 6));<NEW_LINE>timeSphere.setZ(-3 + (float) (Math.random() * 6));<NEW_LINE>parentSphere.addChild(timeSphere);<NEW_LINE>}<NEW_LINE>int direction = Math.random() < .5 ? 1 : -1;<NEW_LINE>RotateOnAxisAnimation anim = new RotateOnAxisAnimation(Vector3.Axis.Y, 0, 360 * direction);<NEW_LINE>anim.setRepeatMode(Animation.RepeatMode.INFINITE);<NEW_LINE>anim.setDurationMilliseconds(i == 0 ? 12000 : 4000 + (int) (Math.random() * 4000));<NEW_LINE>anim.setTransformable3D(timeSphere);<NEW_LINE>getCurrentScene().registerAnimation(anim);<NEW_LINE>anim.play();<NEW_LINE>}<NEW_LINE>}
getCurrentScene().addLight(light);
536,803
static byte[] create(ZipFileData file, boolean allowZip64) throws ZipException {<NEW_LINE>byte[] comment = file.getBytes(file.getComment());<NEW_LINE>byte[] buf = new byte[FIXED_DATA_SIZE + comment.length];<NEW_LINE>// Allow writing of Zip file without Zip64 extensions for large archives as a special case<NEW_LINE>// since many reading implementations can handle this.<NEW_LINE>short numEntries = (short) (file.getNumEntries() > 0xffff && allowZip64 ? -<MASK><NEW_LINE>int cdSize = (int) (file.getCentralDirectorySize() > 0xffffffffL && allowZip64 ? -1 : file.getCentralDirectorySize());<NEW_LINE>int cdOffset = (int) (file.getCentralDirectoryOffset() > 0xffffffffL && allowZip64 ? -1 : file.getCentralDirectoryOffset());<NEW_LINE>ZipUtil.intToLittleEndian(buf, SIGNATURE_OFFSET, SIGNATURE);<NEW_LINE>ZipUtil.shortToLittleEndian(buf, DISK_NUMBER_OFFSET, (short) 0);<NEW_LINE>ZipUtil.shortToLittleEndian(buf, CD_DISK_OFFSET, (short) 0);<NEW_LINE>ZipUtil.shortToLittleEndian(buf, DISK_ENTRIES_OFFSET, numEntries);<NEW_LINE>ZipUtil.shortToLittleEndian(buf, TOTAL_ENTRIES_OFFSET, numEntries);<NEW_LINE>ZipUtil.intToLittleEndian(buf, CD_SIZE_OFFSET, cdSize);<NEW_LINE>ZipUtil.intToLittleEndian(buf, CD_OFFSET_OFFSET, cdOffset);<NEW_LINE>ZipUtil.shortToLittleEndian(buf, COMMENT_LENGTH_OFFSET, (short) comment.length);<NEW_LINE>System.arraycopy(comment, 0, buf, FIXED_DATA_SIZE, comment.length);<NEW_LINE>return buf;<NEW_LINE>}
1 : file.getNumEntries());
1,393,200
static void appendImplEncoderTrait(final Appendable out, final String typeName) throws IOException {<NEW_LINE>indent(out, 1, "impl<%s> %s for %s {\n", BUF_LIFETIME, withLifetime("Writer"), withLifetime(typeName));<NEW_LINE>indent(out, 2, "#[inline]\n");<NEW_LINE>indent(out, 2, "fn get_buf_mut(&mut self) -> &mut WriteBuf<'a> {\n");<NEW_LINE>indent(out, 3, "&mut self.buf\n");<NEW_LINE><MASK><NEW_LINE>indent(out, 1, "}\n\n");<NEW_LINE>indent(out, 1, "impl<%s> %s for %s {\n", BUF_LIFETIME, withLifetime("Encoder"), withLifetime(typeName));<NEW_LINE>indent(out, 2, "#[inline]\n");<NEW_LINE>indent(out, 2, "fn get_limit(&self) -> usize {\n");<NEW_LINE>indent(out, 3, "self.limit\n");<NEW_LINE>indent(out, 2, "}\n\n");<NEW_LINE>indent(out, 2, "#[inline]\n");<NEW_LINE>indent(out, 2, "fn set_limit(&mut self, limit: usize) {\n");<NEW_LINE>indent(out, 3, "self.limit = limit;\n");<NEW_LINE>indent(out, 2, "}\n");<NEW_LINE>indent(out, 1, "}\n\n");<NEW_LINE>}
indent(out, 2, "}\n");
1,235,599
public QuoteFillRatio userGetQuoteFillRatio() throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/user/quoteFillRatio";<NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams <MASK><NEW_LINE>// header params<NEW_LINE>Map<String, String> headerParams = new HashMap<String, String>();<NEW_LINE>// form params<NEW_LINE>Map<String, String> formParams = new HashMap<String, String>();<NEW_LINE>String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" };<NEW_LINE>String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";<NEW_LINE>if (contentType.startsWith("multipart/form-data")) {<NEW_LINE>// file uploading<NEW_LINE>MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();<NEW_LINE>HttpEntity httpEntity = localVarBuilder.build();<NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" };<NEW_LINE>try {<NEW_LINE>String localVarResponse = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);<NEW_LINE>if (localVarResponse != null) {<NEW_LINE>return (QuoteFillRatio) ApiInvoker.deserialize(localVarResponse, "", QuoteFillRatio.class);<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (ExecutionException ex) {<NEW_LINE>if (ex.getCause() instanceof VolleyError) {<NEW_LINE>VolleyError volleyError = (VolleyError) ex.getCause();<NEW_LINE>if (volleyError.networkResponse != null) {<NEW_LINE>throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw ex;<NEW_LINE>} catch (TimeoutException ex) {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}
= new ArrayList<Pair>();
1,264,472
public static List<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new EPLSubselectHavingNoAggNoFilterNoWhere());<NEW_LINE>execs.add(new EPLSubselectHavingNoAggWWhere());<NEW_LINE>execs.add(new EPLSubselectHavingNoAggWFilterWWhere());<NEW_LINE>execs.add(new EPLSubselectSameEventCompile());<NEW_LINE>execs.add(new EPLSubselectSameEventOM());<NEW_LINE>execs.add(new EPLSubselectSameEvent());<NEW_LINE>execs.add(new EPLSubselectSelectSceneOne());<NEW_LINE>execs.add(new EPLSubselectSelectWildcard());<NEW_LINE>execs.add(new EPLSubselectSelectWildcardNoName());<NEW_LINE>execs.add(new EPLSubselectWhereConstant());<NEW_LINE>execs.add(new EPLSubselectWherePrevious());<NEW_LINE>execs.add(new EPLSubselectWherePreviousOM());<NEW_LINE>execs.add(new EPLSubselectWherePreviousCompile());<NEW_LINE>execs.add(new EPLSubselectSelectWithWhereJoined());<NEW_LINE>execs.add(new EPLSubselectSelectWhereJoined2Streams());<NEW_LINE>execs.add(new EPLSubselectSelectWhereJoined3Streams());<NEW_LINE>execs.add(new EPLSubselectSelectWhereJoined3SceneTwo());<NEW_LINE>execs.add(new EPLSubselectSelectWhereJoined4Coercion());<NEW_LINE>execs.add(new EPLSubselectSelectWhereJoined4BackCoercion());<NEW_LINE>execs.add(new EPLSubselectSelectWithWhere2Subqery());<NEW_LINE>execs<MASK><NEW_LINE>execs.add(new EPLSubselectJoinFilteredTwo());<NEW_LINE>execs.add(new EPLSubselectSubselectMixMax());<NEW_LINE>execs.add(new EPLSubselectSubselectPrior());<NEW_LINE>execs.add(new EPLSubselectWhereClauseMultikeyWArrayPrimitive());<NEW_LINE>execs.add(new EPLSubselectWhereClauseMultikeyWArray2Field());<NEW_LINE>execs.add(new EPLSubselectWhereClauseMultikeyWArrayComposite());<NEW_LINE>return execs;<NEW_LINE>}
.add(new EPLSubselectJoinFilteredOne());
1,501,703
protected void compile(InputChanges inputs) {<NEW_LINE>BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());<NEW_LINE>NativeCompileSpec spec = createCompileSpec();<NEW_LINE>spec.setTargetPlatform(targetPlatform.get());<NEW_LINE>spec.setTempDir(getTemporaryDir());<NEW_LINE>spec.setObjectFileDir(objectFileDir.get().getAsFile());<NEW_LINE>spec.include(includes);<NEW_LINE>spec.systemInclude(systemIncludes);<NEW_LINE>spec.source(getSource());<NEW_LINE>spec.setMacros(getMacros());<NEW_LINE>spec.args(getCompilerArgs().get());<NEW_LINE>spec.setPositionIndependentCode(isPositionIndependentCode());<NEW_LINE>spec.setDebuggable(isDebuggable());<NEW_LINE>spec.setOptimized(isOptimized());<NEW_LINE>spec.setIncrementalCompile(inputs.isIncremental());<NEW_LINE>spec.setOperationLogger(operationLogger);<NEW_LINE>configureSpec(spec);<NEW_LINE>NativeToolChainInternal nativeToolChain = <MASK><NEW_LINE>NativePlatformInternal nativePlatform = (NativePlatformInternal) targetPlatform.get();<NEW_LINE>PlatformToolProvider platformToolProvider = nativeToolChain.select(nativePlatform);<NEW_LINE>setDidWork(doCompile(spec, platformToolProvider).getDidWork());<NEW_LINE>}
(NativeToolChainInternal) toolChain.get();
180,377
protected void buildLayer(int begin, int end, int layer) {<NEW_LINE>for (int num = begin; num < end; num++) {<NEW_LINE>if (!node.containsKey(num))<NEW_LINE>continue;<NEW_LINE>if (node.get(num).get(1).size() >= 2) {<NEW_LINE>for (Object innerid : node.get(num).get(1).toArray()) {<NEW_LINE>String rawid = null;<NEW_LINE>if (hierarchy_side.equals("user"))<NEW_LINE>rawid = userIdxToUserId.get(innerid);<NEW_LINE>if (hierarchy_side.equals("item"))<NEW_LINE>rawid = itemIdxToItemId.get(innerid);<NEW_LINE>String feature_rawid = hierarchy.get(rawid<MASK><NEW_LINE>int feature_innerid = 0;<NEW_LINE>if (layer == 2) {<NEW_LINE>feature_innerid = CountryMap.get(feature_rawid);<NEW_LINE>}<NEW_LINE>if (layer == 3) {<NEW_LINE>feature_innerid = CityMap.get(feature_rawid);<NEW_LINE>}<NEW_LINE>divideUI(feature_innerid, num, (int) innerid);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).get(layer - 1);
1,370,275
public // mixing up your enum types<NEW_LINE>void enumExampleUntyped(Context ctx) throws TestFailedException {<NEW_LINE>System.out.println("EnumExample");<NEW_LINE>Log.append("EnumExample");<NEW_LINE>Symbol name = ctx.mkSymbol("fruit");<NEW_LINE>EnumSort<Object> fruit = ctx.mkEnumSort(name, ctx.mkSymbol("apple"), ctx.mkSymbol("banana"), ctx.mkSymbol("orange"));<NEW_LINE>System.out.println((fruit.getConsts()[0]));<NEW_LINE>System.out.println((fruit.getConsts()[1]));<NEW_LINE>System.out.println((fruit.getConsts()[2]));<NEW_LINE>System.out.println((fruit.getTesterDecls()[0]));<NEW_LINE>System.out.println((fruit.getTesterDecls()[1]));<NEW_LINE>System.out.println((fruit.getTesterDecls()[2]));<NEW_LINE>Expr<EnumSort<Object>> apple = fruit.getConsts()[0];<NEW_LINE>Expr<EnumSort<Object>> banana = fruit.getConsts()[1];<NEW_LINE>Expr<EnumSort<Object>> orange = <MASK><NEW_LINE>prove(ctx, ctx.mkApp(fruit.getTesterDecls()[0], apple), false);<NEW_LINE>prove(ctx, ctx.mkOr(ctx.mkEq(fruity, apple), ctx.mkEq(fruity, banana), ctx.mkEq(fruity, orange)), false);<NEW_LINE>}
fruit.getConsts()[2];
929,941
public CompletableFuture<Void> start(String[] args) {<NEW_LINE>state.set(DbgState.STARTING, Causes.UNCLAIMED);<NEW_LINE>boolean create = true;<NEW_LINE>if (args.length == 0) {<NEW_LINE>engThread = new DbgModelClientThreadExecutor(() -> DbgModel.debugCreate());<NEW_LINE>} else {<NEW_LINE>String remoteOptions = String.join(" ", args);<NEW_LINE>engThread = new DbgModelClientThreadExecutor(() -> DbgModel.debugConnect(remoteOptions));<NEW_LINE>create = false;<NEW_LINE>}<NEW_LINE>engThread.setManager(this);<NEW_LINE>AtomicReference<Boolean> creat = new AtomicReference<>(create);<NEW_LINE>return sequence(TypeSpec.VOID).then(engThread, (seq) -> {<NEW_LINE>doExecute(creat.get());<NEW_LINE>seq.exit();<NEW_LINE>}).finish().exceptionally((exc) -> {<NEW_LINE><MASK><NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>}
Msg.error(this, "start failed");
488,568
public static void modifyLocalElement(final AXIComponent source, final SchemaUpdate.UpdateUnit u, final SchemaModel sm, SchemaGenerator.PrimitiveCart pc) {<NEW_LINE>checkPopulate(source);<NEW_LINE>LocalElement le = (LocalElement) ((Element) source).getPeer();<NEW_LINE>String propertyName = u.getPropertyName();<NEW_LINE>Object newValue = u.getNewValue();<NEW_LINE>// check, if any modify fixed, default, nillable properties<NEW_LINE>modifyElementProperties(le, propertyName, newValue);<NEW_LINE>// check, if any modify minoccurs and maxoccurs<NEW_LINE>modifyCardinality(le, propertyName, newValue);<NEW_LINE>if (propertyName.equals(Element.PROP_NAME)) {<NEW_LINE>// change local element name<NEW_LINE>le.setName((String) newValue);<NEW_LINE>} else if (propertyName.equals(Element.PROP_FORM)) {<NEW_LINE>le.setForm((Form) newValue);<NEW_LINE>} else if (propertyName.equals(Element.PROP_TYPE)) {<NEW_LINE>if (newValue instanceof ContentModel) {<NEW_LINE>// remove any inline type<NEW_LINE>LocalComplexType lct = <MASK><NEW_LINE>if (lct != null)<NEW_LINE>le.setInlineType(null);<NEW_LINE>// now set type<NEW_LINE>le.setType(le.createReferenceTo((GlobalComplexType) ((ContentModel) newValue).getPeer(), GlobalComplexType.class));<NEW_LINE>} else if (newValue instanceof Datatype) {<NEW_LINE>modifyDatatype(sm, le, (Datatype) newValue, pc);<NEW_LINE>} else {<NEW_LINE>le.setInlineType(null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(LocalComplexType) le.getInlineType();
774,496
public DescribeSafetyRuleResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeSafetyRuleResult describeSafetyRuleResult = new DescribeSafetyRuleResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return describeSafetyRuleResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("AssertionRule", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeSafetyRuleResult.setAssertionRule(AssertionRuleJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("GatingRule", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeSafetyRuleResult.setGatingRule(GatingRuleJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return describeSafetyRuleResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,345,505
private static void loadRows(ImpFormat format, int ID) {<NEW_LINE>// 1..6<NEW_LINE>String // 1..6<NEW_LINE>sql = // 7..12<NEW_LINE>"SELECT f.SeqNo,c.ColumnName,f.StartNo,f.EndNo,f.DataType,c.FieldLength," <MASK><NEW_LINE>try {<NEW_LINE>PreparedStatement pstmt = DB.prepareStatement(sql, null);<NEW_LINE>pstmt.setInt(1, ID);<NEW_LINE>ResultSet rs = pstmt.executeQuery();<NEW_LINE>while (rs.next()) {<NEW_LINE>ImpFormatRow row = new ImpFormatRow(rs.getInt(1), rs.getString(2), rs.getInt(3), rs.getInt(4), rs.getString(5), rs.getInt(6));<NEW_LINE>//<NEW_LINE>row.setFormatInfo(rs.getString(7), rs.getString(8), rs.getString(9).equals("Y"), rs.getString(10), rs.getString(11), rs.getString(12));<NEW_LINE>//<NEW_LINE>format.addRow(row);<NEW_LINE>}<NEW_LINE>rs.close();<NEW_LINE>pstmt.close();<NEW_LINE>} catch (SQLException e) {<NEW_LINE>log.log(Level.SEVERE, sql, e);<NEW_LINE>}<NEW_LINE>}
+ "f.DataFormat,f.DecimalPoint,f.DivideBy100,f.ConstantValue,f.Callout, f.DefaultValue " + "FROM AD_ImpFormat_Row f,AD_Column c " + "WHERE f.AD_ImpFormat_ID=? AND f.AD_Column_ID=c.AD_Column_ID AND f.IsActive='Y'" + "ORDER BY f.SeqNo";
1,507,087
final ListManagedEndpointsResult executeListManagedEndpoints(ListManagedEndpointsRequest listManagedEndpointsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listManagedEndpointsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListManagedEndpointsRequest> request = null;<NEW_LINE>Response<ListManagedEndpointsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListManagedEndpointsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listManagedEndpointsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EMR containers");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListManagedEndpoints");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListManagedEndpointsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListManagedEndpointsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,068,249
public static String formatDateTime(Date time, TimeZone tz) {<NEW_LINE>Calendar cal = Calendar.getInstance(tz, Locale.ENGLISH);<NEW_LINE>cal.setTime(time);<NEW_LINE>int offset = <MASK><NEW_LINE>offset += cal.get(Calendar.DST_OFFSET);<NEW_LINE>// DateFormat is operating on GMT so adjust for time zone offset<NEW_LINE>Date dt1 = new Date(time.getTime() + offset);<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>sb.append(DATE_FORMAT.format(dt1));<NEW_LINE>// Convert to minutes<NEW_LINE>offset /= (1000 * 60);<NEW_LINE>if (offset == 0) {<NEW_LINE>sb.append('Z');<NEW_LINE>} else {<NEW_LINE>if (offset > 0) {<NEW_LINE>sb.append('+');<NEW_LINE>} else {<NEW_LINE>sb.append('-');<NEW_LINE>}<NEW_LINE>int offsetHour = Math.abs(offset / 60);<NEW_LINE>int offsetMinutes = Math.abs(offset % 60);<NEW_LINE>if (offsetHour < 10) {<NEW_LINE>sb.append('0');<NEW_LINE>}<NEW_LINE>sb.append(Integer.toString(offsetHour));<NEW_LINE>sb.append('\'');<NEW_LINE>if (offsetMinutes < 10) {<NEW_LINE>sb.append('0');<NEW_LINE>}<NEW_LINE>sb.append(Integer.toString(offsetMinutes));<NEW_LINE>sb.append('\'');<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
cal.get(Calendar.ZONE_OFFSET);
593,490
private static IntegrationResult runIntegrationEmbedded(IntegrationInput input, URLClassLoader integrationCl) throws Exception {<NEW_LINE>Util.infoMsg("Post build with " + input.integrationClassName);<NEW_LINE>if (input.source != null) {<NEW_LINE>// TODO: should we add new properties to the integration method?<NEW_LINE>System.setProperty("jbang.source", input.source.toString());<NEW_LINE>}<NEW_LINE>Class<?> clazz = Class.forName(input.integrationClassName, true, integrationCl);<NEW_LINE>Method method = clazz.getDeclaredMethod("postBuild", Path.class, Path.class, List.class, List.class, List.class, boolean.class);<NEW_LINE>if (Util.isVerbose()) {<NEW_LINE>System.setOut(new PrintStream(new <MASK><NEW_LINE>} else {<NEW_LINE>System.setOut(new PrintStream(new OutputStream() {<NEW_LINE><NEW_LINE>public void write(int b) {<NEW_LINE>// DO NOTHING<NEW_LINE>// TODO: capture it for later print if error<NEW_LINE>}<NEW_LINE>}));<NEW_LINE>}<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<String, Object> result = (Map<String, Object>) method.invoke(null, input.classes, input.pom, mapToList(input.repositories), mapToList(input.dependencies), input.comments, input.nativeRequested);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<String, byte[]> files = (Map<String, byte[]>) result.get(FILES);<NEW_LINE>if (files != null) {<NEW_LINE>for (Map.Entry<String, byte[]> entry : files.entrySet()) {<NEW_LINE>Path target = input.classes.resolve(entry.getKey());<NEW_LINE>Files.createDirectories(target.getParent());<NEW_LINE>try (OutputStream out = Files.newOutputStream(target)) {<NEW_LINE>out.write(entry.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Path nativeImage = null;<NEW_LINE>String mainClass = null;<NEW_LINE>List<String> javaArgs = null;<NEW_LINE>Path image = (Path) result.get(NATIVE_IMAGE);<NEW_LINE>if (image != null) {<NEW_LINE>nativeImage = image;<NEW_LINE>}<NEW_LINE>String mc = (String) result.get(MAIN_CLASS);<NEW_LINE>if (mc != null) {<NEW_LINE>mainClass = mc;<NEW_LINE>}<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<String> ja = (List<String>) result.get(JAVA_ARGS);<NEW_LINE>if (ja != null) {<NEW_LINE>javaArgs = ja;<NEW_LINE>}<NEW_LINE>return new IntegrationResult(nativeImage, mainClass, javaArgs);<NEW_LINE>}
FileOutputStream(FileDescriptor.err)));
463,807
public CreateLicenseVersionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateLicenseVersionResult createLicenseVersionResult = new CreateLicenseVersionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return createLicenseVersionResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("LicenseArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createLicenseVersionResult.setLicenseArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Version", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createLicenseVersionResult.setVersion(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("Status", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createLicenseVersionResult.setStatus(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return createLicenseVersionResult;<NEW_LINE>}
class).unmarshall(context));
1,597,891
protected void createButtonsForButtonBar(Composite parent) {<NEW_LINE>createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true);<NEW_LINE>Button button = createButton(parent, 9999, Messages.LabelCopyToClipboard, false);<NEW_LINE>button.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {<NEW_LINE>if (widget.isDisposed())<NEW_LINE>return;<NEW_LINE>Clipboard cb = new Clipboard(Display.getCurrent());<NEW_LINE>TextTransfer textTransfer = TextTransfer.getInstance();<NEW_LINE>cb.setContents(new Object[] { widget.getText() }, new Transfer[] { textTransfer });<NEW_LINE>}));<NEW_LINE>button = createButton(parent, 9998, Messages.LabelSaveInFile, false);<NEW_LINE>button.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {<NEW_LINE>if (widget.isDisposed())<NEW_LINE>return;<NEW_LINE>FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);<NEW_LINE>if (source != null) {<NEW_LINE>dialog.setFilterPath(source.getAbsolutePath());<NEW_LINE>// $NON-NLS-1$<NEW_LINE>dialog.setFileName(source.getName() + ".txt");<NEW_LINE>} else {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>dialog.setFileName(Messages.LabelUnnamedFile + ".txt");<NEW_LINE>}<NEW_LINE>dialog.setOverwrite(true);<NEW_LINE><MASK><NEW_LINE>if (path == null)<NEW_LINE>return;<NEW_LINE>try (BufferedWriter writer = Files.newBufferedWriter(Paths.get(path), StandardCharsets.UTF_8)) {<NEW_LINE>writer.write(widget.getText());<NEW_LINE>writer.flush();<NEW_LINE>} catch (IOException x) {<NEW_LINE>throw new IllegalArgumentException(x);<NEW_LINE>}<NEW_LINE>}));<NEW_LINE>}
String path = dialog.open();
630,310
public void marshall(CommentsForComparedCommit commentsForComparedCommit, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (commentsForComparedCommit == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(commentsForComparedCommit.getRepositoryName(), REPOSITORYNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(commentsForComparedCommit.getBeforeCommitId(), BEFORECOMMITID_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(commentsForComparedCommit.getBeforeBlobId(), BEFOREBLOBID_BINDING);<NEW_LINE>protocolMarshaller.marshall(commentsForComparedCommit.getAfterBlobId(), AFTERBLOBID_BINDING);<NEW_LINE>protocolMarshaller.marshall(commentsForComparedCommit.getLocation(), LOCATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(commentsForComparedCommit.getComments(), COMMENTS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
commentsForComparedCommit.getAfterCommitId(), AFTERCOMMITID_BINDING);
1,090,590
private Boolean handleImageMissing(Image img, boolean recap) {<NEW_LINE>log(logLevel, "handleImageMissing: %s", img.getName());<NEW_LINE>ObserveEvent evt = null;<NEW_LINE>FindFailedResponse response = findFailedResponse;<NEW_LINE>if (!recap && imageMissingHandler != null) {<NEW_LINE>log(logLevel, "handleImageMissing: calling handler");<NEW_LINE>evt = new ObserveEvent("", ObserveEvent.Type.MISSING, null, img, this, 0);<NEW_LINE>((ObserverCallBack) imageMissingHandler).missing(evt);<NEW_LINE>response = evt.getResponse();<NEW_LINE>}<NEW_LINE>if (recap || FindFailedResponse.PROMPT.equals(response)) {<NEW_LINE>if (!recap) {<NEW_LINE>log(logLevel, "handleImageMissing: Response.PROMPT");<NEW_LINE>}<NEW_LINE>response = handleFindFailedShowDialog(img, true);<NEW_LINE>}<NEW_LINE>if (FindFailedResponse.RETRY.equals(response)) {<NEW_LINE>log(logLevel, "handleImageMissing: Response.RETRY: %s", (recap ? "recapture " : "capture missing "));<NEW_LINE>getRobotForRegion().delay(500);<NEW_LINE>ScreenImage simg = getScreen().userCapture((recap ? "recapture " : "capture missing "<MASK><NEW_LINE>if (simg != null) {<NEW_LINE>String path = ImagePath.getBundlePath();<NEW_LINE>if (path == null) {<NEW_LINE>log(-1, "handleImageMissing: no bundle path - aborting");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>simg.getFile(path, img.getName());<NEW_LINE>Image.reinit(img);<NEW_LINE>if (img.isValid()) {<NEW_LINE>log(logLevel, "handleImageMissing: %scaptured: %s", (recap ? "re" : ""), img);<NEW_LINE>Image.setIDEshouldReload(img);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>} else if (findFailedResponse.ABORT.equals(response)) {<NEW_LINE>log(-1, "handleImageMissing: Response.ABORT: aborting");<NEW_LINE>log(-1, "Did you want to find text? If yes, use text methods (see docs).");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>log(logLevel, "handleImageMissing: skip requested on %s", (recap ? "recapture " : "capture missing "));<NEW_LINE>return false;<NEW_LINE>}
) + img.getName());
146,551
public static List<URL> collectLayers(ClassLoader loader) throws IOException {<NEW_LINE>List<URL> layerUrls = new ArrayList<URL>();<NEW_LINE>for (URL manifest : NbCollections.iterable(loader.getResources("META-INF/MANIFEST.MF"))) {<NEW_LINE>// NOI18N<NEW_LINE>InputStream is = manifest.openStream();<NEW_LINE>try {<NEW_LINE>Manifest mani = new Manifest(is);<NEW_LINE>// NOI18N<NEW_LINE>String layerLoc = mani.<MASK><NEW_LINE>if (layerLoc != null) {<NEW_LINE>URL layer = loader.getResource(layerLoc);<NEW_LINE>if (layer != null) {<NEW_LINE>layerUrls.add(layer);<NEW_LINE>} else {<NEW_LINE>err.log(Level.WARNING, "No such layer: {0}", layerLoc);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>is.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (URL generatedLayer : NbCollections.iterable(loader.getResources("META-INF/generated-layer.xml"))) {<NEW_LINE>// NOI18N<NEW_LINE>layerUrls.add(generatedLayer);<NEW_LINE>}<NEW_LINE>return layerUrls;<NEW_LINE>}
getMainAttributes().getValue("OpenIDE-Module-Layer");
1,465,198
private YoutubeSignatureCipher extractTokensFromScript(String script, String sourceUrl) {<NEW_LINE>Matcher <MASK><NEW_LINE>if (!actions.find()) {<NEW_LINE>dumpProblematicScript(script, sourceUrl, "no actions match");<NEW_LINE>throw new IllegalStateException("Must find action functions from script: " + sourceUrl);<NEW_LINE>}<NEW_LINE>String actionBody = actions.group(2);<NEW_LINE>String reverseKey = extractDollarEscapedFirstGroup(reversePattern, actionBody);<NEW_LINE>String slicePart = extractDollarEscapedFirstGroup(slicePattern, actionBody);<NEW_LINE>String splicePart = extractDollarEscapedFirstGroup(splicePattern, actionBody);<NEW_LINE>String swapKey = extractDollarEscapedFirstGroup(swapPattern, actionBody);<NEW_LINE>Pattern extractor = Pattern.compile("(?:a=)?" + Pattern.quote(actions.group(1)) + BEFORE_ACCESS + "(" + String.join("|", getQuotedFunctions(reverseKey, slicePart, splicePart, swapKey)) + ")" + AFTER_ACCESS + "\\(a,(\\d+)\\)");<NEW_LINE>Matcher functions = functionPattern.matcher(script);<NEW_LINE>if (!functions.find()) {<NEW_LINE>dumpProblematicScript(script, sourceUrl, "no decipher function match");<NEW_LINE>throw new IllegalStateException("Must find decipher function from script.");<NEW_LINE>}<NEW_LINE>Matcher matcher = extractor.matcher(functions.group(1));<NEW_LINE>YoutubeSignatureCipher cipherKey = new YoutubeSignatureCipher();<NEW_LINE>while (matcher.find()) {<NEW_LINE>String type = matcher.group(1);<NEW_LINE>if (type.equals(swapKey)) {<NEW_LINE>cipherKey.addOperation(new YoutubeCipherOperation(YoutubeCipherOperationType.SWAP, Integer.parseInt(matcher.group(2))));<NEW_LINE>} else if (type.equals(reverseKey)) {<NEW_LINE>cipherKey.addOperation(new YoutubeCipherOperation(YoutubeCipherOperationType.REVERSE, 0));<NEW_LINE>} else if (type.equals(slicePart)) {<NEW_LINE>cipherKey.addOperation(new YoutubeCipherOperation(YoutubeCipherOperationType.SLICE, Integer.parseInt(matcher.group(2))));<NEW_LINE>} else if (type.equals(splicePart)) {<NEW_LINE>cipherKey.addOperation(new YoutubeCipherOperation(YoutubeCipherOperationType.SPLICE, Integer.parseInt(matcher.group(2))));<NEW_LINE>} else {<NEW_LINE>dumpProblematicScript(script, sourceUrl, "unknown cipher operation found");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (cipherKey.isEmpty()) {<NEW_LINE>log.error("No operations detected from cipher extracted from {}.", sourceUrl);<NEW_LINE>dumpProblematicScript(script, sourceUrl, "no cipher operations");<NEW_LINE>}<NEW_LINE>return cipherKey;<NEW_LINE>}
actions = actionsPattern.matcher(script);
573,373
public void prepare(TreeLogger logger, ResourceContext context, ClientBundleRequirements requirements, JMethod method) throws UnableToCompleteException {<NEW_LINE>// if Gss is enabled, defer the call to the Gss generator.<NEW_LINE>if (gssEnabled) {<NEW_LINE>gssResourceGenerator.prepare(logger, context, requirements, method);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (method.getReturnType().isInterface() == null) {<NEW_LINE>logger.log(TreeLogger.ERROR, "Return type must be an interface");<NEW_LINE>throw new UnableToCompleteException();<NEW_LINE>}<NEW_LINE>URL[] resources = getResources(logger, context, method);<NEW_LINE>if (resources.length == 0) {<NEW_LINE>logger.<MASK><NEW_LINE>throw new UnableToCompleteException();<NEW_LINE>}<NEW_LINE>// At this point, gss is not enabled so we shouldn't try to compile a gss file.<NEW_LINE>ensureNoGssFile(resources, logger);<NEW_LINE>// Create the AST and do a quick scan for requirements<NEW_LINE>CssStylesheet sheet = GenerateCssAst.exec(logger, resources);<NEW_LINE>checkSheet(logger, sheet);<NEW_LINE>stylesheetMap.put(method, sheet);<NEW_LINE>(new RequirementsCollector(logger, context.getRequirements())).accept(sheet);<NEW_LINE>}
log(TreeLogger.ERROR, "At least one source must be specified");
1,355,485
private void tradeAtFortStadaconaQuebec() {<NEW_LINE>savings -= 140.0;<NEW_LINE>System.out.println();<NEW_LINE>minkPrice = ((.2 * Math.random() + .85) * (Math.pow(10, 2) + .5)) / Math.pow(10, 2);<NEW_LINE>erminePrice = ((.2 * Math.random() + .8) * (Math.pow(10, 2) + .5)) / Math.pow(10, 2);<NEW_LINE>beaverPrice = ((.2 * Math.random() + .9) * (Math.pow(10, 2) + .5)) / Math.pow(10, 2);<NEW_LINE>// What happened during the trip to the fort?<NEW_LINE>int tripResult = (int) (Math.random() * 10) + 1;<NEW_LINE>if (tripResult <= 2) {<NEW_LINE>// Find the Beaver pelt in our Arraylist<NEW_LINE>Pelt beaverPelt = pelts.get(BEAVER_ENTRY);<NEW_LINE>// Pelts got stolen, so update to a count of zero<NEW_LINE>beaverPelt.lostPelts();<NEW_LINE>// Update it back in the ArrayList<NEW_LINE>pelts.set(BEAVER_ENTRY, beaverPelt);<NEW_LINE>System.out.println("YOUR BEAVER WERE TOO HEAVY TO CARRY ACROSS");<NEW_LINE>System.out.println("THE PORTAGE. YOU HAD TO LEAVE THE PELTS, BUT FOUND");<NEW_LINE>System.out.println("THEM STOLEN WHEN YOU RETURNED.");<NEW_LINE>} else if (tripResult <= 6) {<NEW_LINE>System.out.println("YOU ARRIVED SAFELY AT FORT STADACONA.");<NEW_LINE>} else if (tripResult <= 8) {<NEW_LINE>System.out.println("YOUR CANOE UPSET IN THE LACHINE RAPIDS. YOU");<NEW_LINE>System.out.println("LOST ALL YOUR FURS.");<NEW_LINE>// Clear out all pelts.<NEW_LINE>resetPelts();<NEW_LINE>} else if (tripResult <= 10) {<NEW_LINE>// Fox pelts not cured<NEW_LINE>System.out.println("YOUR FOX PELTS WERE NOT CURED PROPERLY.");<NEW_LINE>System.out.println("NO ONE WILL BUY THEM.");<NEW_LINE>// Bug because Fox furs were not calculated above in original basic program<NEW_LINE>// Find the Beaver pelt in our Arraylist<NEW_LINE>Pelt foxPelt = pelts.get(FOX_ENTRY);<NEW_LINE>// Pelts got stolen, so update to a count of zero<NEW_LINE>foxPelt.lostPelts();<NEW_LINE>// Update it back in the ArrayList<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>System.out.println("SUPPLIES AT FORT STADACONA COST $125.00.");<NEW_LINE>System.out.println("YOUR TRAVEL EXPENSES TO STADACONA WERE $15.00.");<NEW_LINE>}
pelts.set(FOX_ENTRY, foxPelt);
1,700,080
private JSONObject changePermissions(JSONObject params) throws ServletException {<NEW_LINE>try {<NEW_LINE>JSONArray paths = ((JSONArray) params.get("items"));<NEW_LINE>// "rw-r-x-wx"<NEW_LINE>String perms = params.getAsString("perms");<NEW_LINE>// "653"<NEW_LINE>String permsCode = params.getAsString("permsCode");<NEW_LINE>boolean recursive = "true".equalsIgnoreCase(params.getAsString("recursive"));<NEW_LINE>for (Object path : paths) {<NEW_LINE>LOG.debug("changepermissions path: {} perms: {} permsCode: {} recursive: {}", path, perms, permsCode, recursive);<NEW_LINE>File f = Paths.get(REPOSITORY_BASE_PATH, path.toString()).toFile();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return success(params);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error("changepermissions:" + e.getMessage(), e);<NEW_LINE>return error(e.getMessage());<NEW_LINE>}<NEW_LINE>}
setPermissions(f, perms, recursive);
1,692,182
private void loadNode1269() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.NamingRuleType_EnumValues, new QualifiedName(0, "EnumValues"), new LocalizedText("en", "EnumValues"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.EnumValueType, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.NamingRuleType_EnumValues, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.NamingRuleType_EnumValues, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.NamingRuleType_EnumValues, Identifiers.HasProperty, Identifiers.NamingRuleType.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=7616</Identifier> </TypeId><Body><EnumValueType><Value>1</Value><DisplayName><Locale> </Locale><Text>Mandatory</Text> </DisplayName><Description><Locale> </Locale><Text>The BrowseName must appear in all instances of the type.</Text> </Description> </EnumValueType> </Body> </ExtensionObject><ExtensionObject><TypeId><Identifier>i=7616</Identifier> </TypeId><Body><EnumValueType><Value>2</Value><DisplayName><Locale> </Locale><Text>Optional</Text> </DisplayName><Description><Locale> </Locale><Text>The BrowseName may appear in an instance of the type.</Text> </Description> </EnumValueType> </Body> </ExtensionObject><ExtensionObject><TypeId><Identifier>i=7616</Identifier> </TypeId><Body><EnumValueType><Value>3</Value><DisplayName><Locale> </Locale><Text>Constraint</Text> </DisplayName><Description><Locale> </Locale><Text>The modelling rule defines a constraint and the BrowseName is not used in an instance of the type.</Text> </Description> </EnumValueType> </Body> </ExtensionObject> </ListOfExtensionObject>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));<NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new DataValue(new Variant(o));<NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
1,462,069
private Object lookupLambdaFunction(MagicScriptContext context, String name) {<NEW_LINE>int index = name.indexOf(":");<NEW_LINE>if (index > -1) {<NEW_LINE>String method = name.substring(0, index);<NEW_LINE>String path = name.substring(index + 1);<NEW_LINE>ApiInfo info = getMapping(method.toUpperCase() + ":" + PathUtils.replaceSlash(this.prefix + path));<NEW_LINE>if (info != null) {<NEW_LINE>String scriptName = MagicConfiguration.getMagicResourceService().getScriptName(info);<NEW_LINE>return (MagicScriptLambdaFunction) (variables, args) -> {<NEW_LINE>MagicScriptContext newContext = new MagicScriptContext();<NEW_LINE>Map<String, Object> varMap = new LinkedHashMap<<MASK><NEW_LINE>varMap.putAll(variables.getVariables(context));<NEW_LINE>newContext.setScriptName(scriptName);<NEW_LINE>newContext.putMapIntoContext(varMap);<NEW_LINE>Object value = ScriptManager.executeScript(info.getScript(), newContext);<NEW_LINE>if (value instanceof ExitValue) {<NEW_LINE>throw new MagicExitException((ExitValue) value);<NEW_LINE>}<NEW_LINE>return value;<NEW_LINE>};<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
>(context.getRootVariables());
766,937
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {<NEW_LINE>if (qName.equals(Constants.XML_TAG_CLIENT)) {<NEW_LINE>String id = <MASK><NEW_LINE>String component = attributes.getValue(Constants.XML_ATTR_CLIENT_COMPONENT);<NEW_LINE>String secret = attributes.getValue(Constants.XML_ATTR_CLIENT_SECRET);<NEW_LINE>String displayName = attributes.getValue(Constants.XML_ATTR_CLIENT_DISPLAYNAME);<NEW_LINE>String redirect = attributes.getValue(Constants.XML_ATTR_CLIENT_REDIRECT);<NEW_LINE>boolean enabled = "true".equalsIgnoreCase(attributes.getValue(Constants.XML_ATTR_CLIENT_ENABLED));<NEW_LINE>// decode client secret<NEW_LINE>secret = PasswordUtil.passwordDecode(secret);<NEW_LINE>BaseClient newClient = new BaseClient(component, id, secret, displayName, OidcOAuth20Util.initJsonArray(redirect), enabled);<NEW_LINE>clients.add(newClient);<NEW_LINE>}<NEW_LINE>}
attributes.getValue(Constants.XML_ATTR_CLIENT_ID);
1,577,837
private void handleNewAssignment() {<NEW_LINE>LOG.log(Level.INFO, "Incarnating ourselves as {0} with task id {1}", new Object[] { helper.getMyComponent(), helper.getMyTaskId() });<NEW_LINE>// Initialize serializer once we got the new physical plan<NEW_LINE>this.serializer = SerializeDeSerializeHelper.getSerializer(helper.getTopologyContext().getTopologyConfig());<NEW_LINE>// During the initiation of instance,<NEW_LINE>// we would add a bunch of tasks to executorLooper's tasksOnWakeup<NEW_LINE>if (helper.getMySpout() != null) {<NEW_LINE>instance = new SpoutInstance(helper, streamInCommunicator, streamOutCommunicator, executorLooper);<NEW_LINE>streamInCommunicator.init(systemConfig.getInstanceInternalSpoutReadQueueCapacity(), systemConfig.getInstanceTuningExpectedSpoutReadQueueSize(), systemConfig.getInstanceTuningCurrentSampleWeight());<NEW_LINE>streamOutCommunicator.init(systemConfig.getInstanceInternalSpoutWriteQueueCapacity(), systemConfig.getInstanceTuningExpectedSpoutWriteQueueSize(), systemConfig.getInstanceTuningCurrentSampleWeight());<NEW_LINE>} else {<NEW_LINE>instance = new BoltInstance(helper, streamInCommunicator, streamOutCommunicator, executorLooper);<NEW_LINE>streamInCommunicator.init(systemConfig.getInstanceInternalBoltReadQueueCapacity(), systemConfig.getInstanceTuningExpectedBoltReadQueueSize(), systemConfig.getInstanceTuningCurrentSampleWeight());<NEW_LINE>streamOutCommunicator.init(systemConfig.getInstanceInternalBoltWriteQueueCapacity(), systemConfig.getInstanceTuningExpectedBoltWriteQueueSize(<MASK><NEW_LINE>}<NEW_LINE>if (!helper.isTopologyRunning()) {<NEW_LINE>LOG.info("Instance is deployed in deactivated state");<NEW_LINE>}<NEW_LINE>startInstanceIfNeeded();<NEW_LINE>}
), systemConfig.getInstanceTuningCurrentSampleWeight());
905,457
public ContentTag addContentTag(Content content, TagName tagName, String comment, long beginByteOffset, long endByteOffset) throws TskCoreException {<NEW_LINE>CaseDbConnection connection = connections.getConnection();<NEW_LINE>acquireSingleUserCaseWriteLock();<NEW_LINE>ResultSet resultSet = null;<NEW_LINE>try {<NEW_LINE>// INSERT INTO content_tags (obj_id, tag_name_id, comment, begin_byte_offset, end_byte_offset) VALUES (?, ?, ?, ?, ?)<NEW_LINE>PreparedStatement statement = connection.getPreparedStatement(<MASK><NEW_LINE>statement.clearParameters();<NEW_LINE>statement.setLong(1, content.getId());<NEW_LINE>statement.setLong(2, tagName.getId());<NEW_LINE>statement.setString(3, comment);<NEW_LINE>statement.setLong(4, beginByteOffset);<NEW_LINE>statement.setLong(5, endByteOffset);<NEW_LINE>connection.executeUpdate(statement);<NEW_LINE>resultSet = statement.getGeneratedKeys();<NEW_LINE>resultSet.next();<NEW_LINE>return new // last_insert_rowid()<NEW_LINE>// last_insert_rowid()<NEW_LINE>ContentTag(resultSet.getLong(1), content, tagName, comment, beginByteOffset, endByteOffset);<NEW_LINE>} catch (SQLException ex) {<NEW_LINE>throw new TskCoreException("Error adding row to content_tags table (obj_id = " + content.getId() + ", tag_name_id = " + tagName.getId() + ")", ex);<NEW_LINE>} finally {<NEW_LINE>closeResultSet(resultSet);<NEW_LINE>connection.close();<NEW_LINE>releaseSingleUserCaseWriteLock();<NEW_LINE>}<NEW_LINE>}
PREPARED_STATEMENT.INSERT_CONTENT_TAG, Statement.RETURN_GENERATED_KEYS);
1,004,933
private void createDistinctAggInfo(ArrayList<Expr> origGroupingExprs, ArrayList<FunctionCallExpr> distinctAggExprs, Analyzer analyzer) throws AnalysisException {<NEW_LINE>Preconditions.checkState(!distinctAggExprs.isEmpty());<NEW_LINE>// make sure that all DISTINCT params are the same;<NEW_LINE>// ignore top-level implicit casts in the comparison, we might have inserted<NEW_LINE>// those during analysis<NEW_LINE>ArrayList<Expr> expr0Children = Lists.newArrayList();<NEW_LINE>if (distinctAggExprs.get(0).getFnName().getFunction().equalsIgnoreCase("group_concat")) {<NEW_LINE>// Ignore separator parameter, otherwise the same would have to be present for all<NEW_LINE>// other distinct aggregates as well.<NEW_LINE>// TODO: Deal with constant exprs more generally, instead of special-casing<NEW_LINE>// group_concat().<NEW_LINE>expr0Children.add(distinctAggExprs.get(0).getChild(0).ignoreImplicitCast());<NEW_LINE>} else {<NEW_LINE>for (Expr expr : distinctAggExprs.get(0).getChildren()) {<NEW_LINE>expr0Children.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.isMultiDistinct_ = estimateIfContainsMultiDistinct(analyzer, origGroupingExprs, distinctAggExprs);<NEW_LINE>isDistinctAgg = true;<NEW_LINE>// add DISTINCT parameters to grouping exprs<NEW_LINE>if (!isMultiDistinct_) {<NEW_LINE>groupingExprs_.addAll(expr0Children);<NEW_LINE>}<NEW_LINE>// remove DISTINCT aggregate functions from aggExprs<NEW_LINE>aggregateExprs_.removeAll(distinctAggExprs);<NEW_LINE>createTupleDescs(analyzer);<NEW_LINE>createSmaps(analyzer);<NEW_LINE>createMergeAggInfo(analyzer);<NEW_LINE>createSecondPhaseAggInfo(origGroupingExprs, distinctAggExprs, analyzer);<NEW_LINE>}
add(expr.ignoreImplicitCast());
814,752
public static void main(String... args) throws Exception {<NEW_LINE>// Your Google Cloud Platform project ID<NEW_LINE>String projectId = System.getProperty("projectId");<NEW_LINE>if (projectId == null) {<NEW_LINE>System.err.println("Usage: QuickstartSample -DprojectId=YOUR_PROJECT_ID");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Instantiates a client<NEW_LINE>MetricServiceClient metricServiceClient = MetricServiceClient.create();<NEW_LINE>// Prepares an individual data point<NEW_LINE>TimeInterval interval = TimeInterval.newBuilder().setEndTime(Timestamps.fromMillis(System.currentTimeMillis())).build();<NEW_LINE>TypedValue value = TypedValue.newBuilder().setDoubleValue(3.14).build();<NEW_LINE>Point point = Point.newBuilder().setInterval(interval).setValue(value).build();<NEW_LINE>List<Point> pointList = new ArrayList<>();<NEW_LINE>pointList.add(point);<NEW_LINE>ProjectName name = ProjectName.of(projectId);<NEW_LINE>// Prepares the metric descriptor<NEW_LINE>Map<String, String> metricLabels = new HashMap<String, String>();<NEW_LINE>metricLabels.put("store_id", "Pittsburg");<NEW_LINE>Metric metric = Metric.newBuilder().setType("custom.googleapis.com/my_metric").putAllLabels(metricLabels).build();<NEW_LINE>// Prepares the monitored resource descriptor<NEW_LINE>Map<String, String> resourceLabels = new HashMap<String, String>();<NEW_LINE><MASK><NEW_LINE>resourceLabels.put("zone", "us-central1-f");<NEW_LINE>MonitoredResource resource = MonitoredResource.newBuilder().setType("gce_instance").putAllLabels(resourceLabels).build();<NEW_LINE>// Prepares the time series request<NEW_LINE>TimeSeries timeSeries = TimeSeries.newBuilder().setMetric(metric).setResource(resource).addAllPoints(pointList).build();<NEW_LINE>List<TimeSeries> timeSeriesList = new ArrayList<>();<NEW_LINE>timeSeriesList.add(timeSeries);<NEW_LINE>CreateTimeSeriesRequest request = CreateTimeSeriesRequest.newBuilder().setName(name.toString()).addAllTimeSeries(timeSeriesList).build();<NEW_LINE>// Writes time series data<NEW_LINE>metricServiceClient.createTimeSeries(request);<NEW_LINE>System.out.printf("Done writing time series data.%n");<NEW_LINE>metricServiceClient.close();<NEW_LINE>}
resourceLabels.put("instance_id", "1234567890123456789");
1,012,267
private static ToolchainTypeInfo findToolchainTypeInfo(ConfiguredTargetKey key, SkyframeIterableResult values) throws InvalidToolchainTypeException {<NEW_LINE>try {<NEW_LINE>ConfiguredTargetValue ctv = (ConfiguredTargetValue) values.nextOrThrow(ConfiguredValueCreationException.class, NoSuchThingException.class, ActionConflictException.class);<NEW_LINE>if (ctv == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ConfiguredTarget configuredTarget = ctv.getConfiguredTarget();<NEW_LINE>ToolchainTypeInfo toolchainTypeInfo = PlatformProviderUtils.toolchainType(configuredTarget);<NEW_LINE>if (toolchainTypeInfo == null) {<NEW_LINE>if (PlatformProviderUtils.declaredToolchainInfo(configuredTarget) != null) {<NEW_LINE>throw new InvalidToolchainTypeException(configuredTarget.getLabel(<MASK><NEW_LINE>}<NEW_LINE>throw new InvalidToolchainTypeException(configuredTarget.getLabel());<NEW_LINE>}<NEW_LINE>return toolchainTypeInfo;<NEW_LINE>} catch (ConfiguredValueCreationException e) {<NEW_LINE>throw new InvalidToolchainTypeException(e);<NEW_LINE>} catch (NoSuchThingException e) {<NEW_LINE>throw new InvalidToolchainTypeException(e);<NEW_LINE>} catch (ActionConflictException e) {<NEW_LINE>throw new InvalidToolchainTypeException(key.getLabel(), e);<NEW_LINE>}<NEW_LINE>}
), "is a toolchain instance. Is the rule definition for the target you're building " + "setting \"toolchains =\" to a toolchain() instead of the expected " + "toolchain_type()?");
1,636,404
private static WXModule findModule(String instanceId, String moduleStr, ModuleFactory factory) {<NEW_LINE>// find WXModule<NEW_LINE>WXModule wxModule = sGlobalModuleMap.get(moduleStr);<NEW_LINE>// not global module<NEW_LINE>if (wxModule == null) {<NEW_LINE>Map<String, WXModule> moduleMap = sInstanceModuleMap.get(instanceId);<NEW_LINE>if (moduleMap == null) {<NEW_LINE>moduleMap = new ConcurrentHashMap<>();<NEW_LINE>sInstanceModuleMap.put(instanceId, moduleMap);<NEW_LINE>}<NEW_LINE>// if cannot find the Module, create a new Module and save it<NEW_LINE>wxModule = moduleMap.get(moduleStr);<NEW_LINE>if (wxModule == null) {<NEW_LINE>try {<NEW_LINE>if (factory instanceof ConfigModuleFactory) {<NEW_LINE>WXSDKInstance instance = WXSDKManager.<MASK><NEW_LINE>wxModule = ((ConfigModuleFactory) factory).buildInstance(instance);<NEW_LINE>} else {<NEW_LINE>wxModule = factory.buildInstance();<NEW_LINE>}<NEW_LINE>wxModule.setModuleName(moduleStr);<NEW_LINE>} catch (Exception e) {<NEW_LINE>WXLogUtils.e(moduleStr + " module build instace failed.", e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>moduleMap.put(moduleStr, wxModule);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return wxModule;<NEW_LINE>}
getInstance().getSDKInstance(instanceId);
1,510,171
final GetDashboardEmbedUrlResult executeGetDashboardEmbedUrl(GetDashboardEmbedUrlRequest getDashboardEmbedUrlRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDashboardEmbedUrlRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetDashboardEmbedUrlRequest> request = null;<NEW_LINE>Response<GetDashboardEmbedUrlResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetDashboardEmbedUrlRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDashboardEmbedUrlRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDashboardEmbedUrl");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetDashboardEmbedUrlResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDashboardEmbedUrlResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight");
1,517,648
public java.util.Map.Entry<String, ServerInstanceLogRecordList> next() {<NEW_LINE>final <MASK><NEW_LINE>return new java.util.Map.Entry<String, ServerInstanceLogRecordList>() {<NEW_LINE><NEW_LINE>public String getKey() {<NEW_LINE>return key;<NEW_LINE>}<NEW_LINE><NEW_LINE>public ServerInstanceLogRecordList getValue() {<NEW_LINE>String[] subKeys = Arrays.copyOf(indicator.getProcPath(), indicator.getProcPath().length + 1);<NEW_LINE>subKeys[subKeys.length - 1] = (String) key;<NEW_LINE>RemoteInstanceDetails kidIndicator = new RemoteInstanceDetails(indicator.query, indicator.startTime, subKeys);<NEW_LINE>try {<NEW_LINE>return getLogListForServerInstance(kidIndicator, null);<NEW_LINE>} catch (LogRepositoryException e) {<NEW_LINE>throw new LogRepositoryRuntimeException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>public ServerInstanceLogRecordList setValue(ServerInstanceLogRecordList object) {<NEW_LINE>throw new UnsupportedOperationException("This class is a read-only implementation");<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
String key = it.next();
781,257
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player player = game.getPlayer(source.getFirstTarget());<NEW_LINE>if (controller == null || player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Permanent sacrificedCreature = null;<NEW_LINE>for (Cost cost : source.getCosts()) {<NEW_LINE>if (!(cost instanceof SacrificeTargetCost)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>SacrificeTargetCost sacCost = (SacrificeTargetCost) cost;<NEW_LINE>for (Permanent permanent : sacCost.getPermanents()) {<NEW_LINE>sacrificedCreature = permanent;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (sacrificedCreature == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>ObjectColor color = sacrificedCreature.getColor(game);<NEW_LINE>Cards cards = new CardsImpl(player.getHand());<NEW_LINE>if (cards.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>player.<MASK><NEW_LINE>if (color.isColorless()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Cards toDiscard = new CardsImpl();<NEW_LINE>cards.getCards(game).stream().filter(card -> card.getColor(game).shares(color)).forEach(toDiscard::add);<NEW_LINE>player.discard(toDiscard, false, source, game);<NEW_LINE>return true;<NEW_LINE>}
revealCards(source, cards, game);
1,712,871
public BackupPlan unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BackupPlan backupPlan = new BackupPlan();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("BackupPlanName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>backupPlan.setBackupPlanName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Rules", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>backupPlan.setRules(new ListUnmarshaller<BackupRule>(BackupRuleJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("AdvancedBackupSettings", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>backupPlan.setAdvancedBackupSettings(new ListUnmarshaller<AdvancedBackupSetting>(AdvancedBackupSettingJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return backupPlan;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
326,422
public static ListFlowClusterAllResponse unmarshall(ListFlowClusterAllResponse listFlowClusterAllResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFlowClusterAllResponse.setRequestId(_ctx.stringValue("ListFlowClusterAllResponse.RequestId"));<NEW_LINE>listFlowClusterAllResponse.setTotalCount(_ctx.integerValue("ListFlowClusterAllResponse.TotalCount"));<NEW_LINE>listFlowClusterAllResponse.setPageNumber(_ctx.integerValue("ListFlowClusterAllResponse.PageNumber"));<NEW_LINE>listFlowClusterAllResponse.setPageSize(_ctx.integerValue("ListFlowClusterAllResponse.PageSize"));<NEW_LINE>List<ClusterInfo> clusters = new ArrayList<ClusterInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListFlowClusterAllResponse.Clusters.Length"); i++) {<NEW_LINE>ClusterInfo clusterInfo = new ClusterInfo();<NEW_LINE>clusterInfo.setId(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].Id"));<NEW_LINE>clusterInfo.setName(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].Name"));<NEW_LINE>clusterInfo.setType(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].Type"));<NEW_LINE>clusterInfo.setCreateTime(_ctx.longValue("ListFlowClusterAllResponse.Clusters[" + i + "].CreateTime"));<NEW_LINE>clusterInfo.setRunningTime(_ctx.integerValue("ListFlowClusterAllResponse.Clusters[" + i + "].RunningTime"));<NEW_LINE>clusterInfo.setStatus(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].Status"));<NEW_LINE>clusterInfo.setChargeType(_ctx.stringValue<MASK><NEW_LINE>clusterInfo.setExpiredTime(_ctx.longValue("ListFlowClusterAllResponse.Clusters[" + i + "].ExpiredTime"));<NEW_LINE>clusterInfo.setPeriod(_ctx.integerValue("ListFlowClusterAllResponse.Clusters[" + i + "].Period"));<NEW_LINE>clusterInfo.setHasUncompletedOrder(_ctx.booleanValue("ListFlowClusterAllResponse.Clusters[" + i + "].HasUncompletedOrder"));<NEW_LINE>clusterInfo.setOrderList(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].OrderList"));<NEW_LINE>clusterInfo.setCreateResource(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].CreateResource"));<NEW_LINE>clusterInfo.setK8sClusterId(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].K8sClusterId"));<NEW_LINE>OrderTaskInfo orderTaskInfo = new OrderTaskInfo();<NEW_LINE>orderTaskInfo.setTargetCount(_ctx.integerValue("ListFlowClusterAllResponse.Clusters[" + i + "].OrderTaskInfo.TargetCount"));<NEW_LINE>orderTaskInfo.setCurrentCount(_ctx.integerValue("ListFlowClusterAllResponse.Clusters[" + i + "].OrderTaskInfo.CurrentCount"));<NEW_LINE>orderTaskInfo.setOrderIdList(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].OrderTaskInfo.OrderIdList"));<NEW_LINE>clusterInfo.setOrderTaskInfo(orderTaskInfo);<NEW_LINE>FailReason failReason = new FailReason();<NEW_LINE>failReason.setErrorCode(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].FailReason.ErrorCode"));<NEW_LINE>failReason.setErrorMsg(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].FailReason.ErrorMsg"));<NEW_LINE>failReason.setRequestId(_ctx.stringValue("ListFlowClusterAllResponse.Clusters[" + i + "].FailReason.RequestId"));<NEW_LINE>clusterInfo.setFailReason(failReason);<NEW_LINE>clusters.add(clusterInfo);<NEW_LINE>}<NEW_LINE>listFlowClusterAllResponse.setClusters(clusters);<NEW_LINE>return listFlowClusterAllResponse;<NEW_LINE>}
("ListFlowClusterAllResponse.Clusters[" + i + "].ChargeType"));
1,768,515
public static boolean copyModuleMetaDataSlot(MetaDataEvent<ModuleMetaData> event, MetaDataSlot slot) {<NEW_LINE>Container container = event.getContainer();<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>// For now, we just need to copy from WebModuleInfo, and ClientModuleInfo<NEW_LINE>// Supports EJB in WAR and ManagedBean in Client<NEW_LINE>ExtendedModuleInfo moduleInfo = (ExtendedModuleInfo) container.adapt(NonPersistentCache.class).getFromCache(WebModuleInfo.class);<NEW_LINE>if (moduleInfo == null) {<NEW_LINE>moduleInfo = (ExtendedModuleInfo) container.adapt(NonPersistentCache.class).getFromCache(ClientModuleInfo.class);<NEW_LINE>}<NEW_LINE>if (moduleInfo != null) {<NEW_LINE>ModuleMetaData primaryMetaData = moduleInfo.getMetaData();<NEW_LINE>if (metaData != primaryMetaData) {<NEW_LINE>Object slotData = primaryMetaData.getMetaData(slot);<NEW_LINE>if (slotData == null) {<NEW_LINE>// The caller is required to populate slot data.<NEW_LINE>throw new IllegalStateException();<NEW_LINE>}<NEW_LINE>metaData.setMetaData(slot, slotData);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (UnableToAdaptException e) {<NEW_LINE>throw new UnsupportedOperationException(e);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
MetaData metaData = event.getMetaData();
647,689
private void throwIfIllegalConsumerId(Metrics metrics, String consumerId) {<NEW_LINE>if (consumerId.equalsIgnoreCase(MetricsConsumer.vespa.id()) && applicationType != ApplicationType.HOSTED_INFRASTRUCTURE)<NEW_LINE>throw new IllegalArgumentException("'Vespa' is not allowed as metrics consumer id (case is ignored.)");<NEW_LINE>if (consumerId.equalsIgnoreCase(MetricsConsumer.defaultConsumer.id()))<NEW_LINE>throw new IllegalArgumentException("'" + MetricsConsumer.defaultConsumer.id() + "' is not allowed as metrics consumer id (case is ignored.)");<NEW_LINE>if (consumerId.equalsIgnoreCase(MetricsConsumer.autoscaling.id()))<NEW_LINE>throw new IllegalArgumentException("'" + MetricsConsumer.<MASK><NEW_LINE>if (consumerId.equalsIgnoreCase(MetricsConsumer.vespaCloud.id()))<NEW_LINE>throw new IllegalArgumentException("'" + MetricsConsumer.vespaCloud.id() + " is not allowed as metrics consumer id (case is ignored.)");<NEW_LINE>if (metrics.hasConsumerIgnoreCase(consumerId))<NEW_LINE>throw new IllegalArgumentException("'" + consumerId + "' is used as id for two metrics consumers (case is ignored.)");<NEW_LINE>}
autoscaling.id() + " is not allowed as metrics consumer id (case is ignored.)");
715,018
protected static final Number coerceToNumber(final Number number, final Class<?> type) throws ELException {<NEW_LINE>if (Long.TYPE == type || Long.class.equals(type)) {<NEW_LINE>return Long.valueOf(number.longValue());<NEW_LINE>}<NEW_LINE>if (Double.TYPE == type || Double.class.equals(type)) {<NEW_LINE>return new Double(number.doubleValue());<NEW_LINE>}<NEW_LINE>if (Integer.TYPE == type || Integer.class.equals(type)) {<NEW_LINE>return Integer.valueOf(number.intValue());<NEW_LINE>}<NEW_LINE>if (BigInteger.class.equals(type)) {<NEW_LINE>if (number instanceof BigDecimal) {<NEW_LINE>return ((BigDecimal) number).toBigInteger();<NEW_LINE>}<NEW_LINE>if (number instanceof BigInteger) {<NEW_LINE>return number;<NEW_LINE>}<NEW_LINE>return BigInteger.valueOf(number.longValue());<NEW_LINE>}<NEW_LINE>if (BigDecimal.class.equals(type)) {<NEW_LINE>if (number instanceof BigDecimal) {<NEW_LINE>return number;<NEW_LINE>}<NEW_LINE>if (number instanceof BigInteger) {<NEW_LINE>return new BigDecimal((BigInteger) number);<NEW_LINE>}<NEW_LINE>return new BigDecimal(number.doubleValue());<NEW_LINE>}<NEW_LINE>if (Byte.TYPE == type || Byte.class.equals(type)) {<NEW_LINE>return Byte.valueOf(number.byteValue());<NEW_LINE>}<NEW_LINE>if (Short.TYPE == type || Short.class.equals(type)) {<NEW_LINE>return Short.<MASK><NEW_LINE>}<NEW_LINE>if (Float.TYPE == type || Float.class.equals(type)) {<NEW_LINE>return new Float(number.floatValue());<NEW_LINE>}<NEW_LINE>if (Number.class.equals(type)) {<NEW_LINE>return number;<NEW_LINE>}<NEW_LINE>throw new ELException(MessageFactory.get("error.convert", number, number.getClass(), type));<NEW_LINE>}
valueOf(number.shortValue());
301,133
private static void retrieveScreenshots(JPDAThreadImpl t, final ThreadReference tr, VirtualMachine vm, DebuggerEngine engine, JPDADebuggerImpl d, final List<RemoteScreenshot> screenshots) throws RetrievalException {<NEW_LINE>try {<NEW_LINE>final ClassType windowClass = getClass(vm, tr, "javafx.stage.Window");<NEW_LINE>Method getWindows = windowClass.concreteMethodByName("impl_getWindows", "()Ljava/util/Iterator;");<NEW_LINE>Method windowName = <MASK><NEW_LINE>ObjectReference iterator = (ObjectReference) windowClass.invokeMethod(tr, getWindows, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED);<NEW_LINE>ClassType iteratorClass = (ClassType) iterator.referenceType();<NEW_LINE>Method hasNext = iteratorClass.concreteMethodByName("hasNext", "()Z");<NEW_LINE>Method next = iteratorClass.concreteMethodByName("next", "()Ljava/lang/Object;");<NEW_LINE>boolean nextFlag = false;<NEW_LINE>do {<NEW_LINE>BooleanValue bv = (BooleanValue) iterator.invokeMethod(tr, hasNext, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED);<NEW_LINE>nextFlag = bv.booleanValue();<NEW_LINE>if (nextFlag) {<NEW_LINE>ObjectReference window = (ObjectReference) iterator.invokeMethod(tr, next, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED);<NEW_LINE>StringReference name = (StringReference) window.invokeMethod(tr, windowName, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED);<NEW_LINE>SGComponentInfo windowInfo = new SGComponentInfo(t, window);<NEW_LINE>screenshots.add(createRemoteFXScreenshot(engine, vm, tr, name.value(), window, windowInfo));<NEW_LINE>}<NEW_LINE>} while (nextFlag);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RetrievalException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
windowClass.concreteMethodByName("impl_getMXWindowType", "()Ljava/lang/String;");
1,785,408
public void performOperationStep(DeploymentOperation operationContext) {<NEW_LINE>final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);<NEW_LINE>final String paName = processApplication.getName();<NEW_LINE>Class<? extends AbstractProcessApplication> paClass = processApplication.getClass();<NEW_LINE>Method postDeployMethod = InjectionUtil.detectAnnotatedMethod(paClass, PostDeploy.class);<NEW_LINE>if (postDeployMethod == null) {<NEW_LINE>LOG.debugPaLifecycleMethodNotFound(CALLBACK_NAME, paName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LOG.debugFoundPaLifecycleCallbackMethod(CALLBACK_NAME, paName);<NEW_LINE>// resolve injections<NEW_LINE>Object[] injections = InjectionUtil.resolveInjections(operationContext, postDeployMethod);<NEW_LINE>try {<NEW_LINE>// perform the actual invocation<NEW_LINE>postDeployMethod.invoke(processApplication, injections);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw LOG.exceptionWhileInvokingPaLifecycleCallback(CALLBACK_NAME, paName, e);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>throw LOG.exceptionWhileInvokingPaLifecycleCallback(CALLBACK_NAME, paName, e);<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE><MASK><NEW_LINE>if (cause instanceof RuntimeException) {<NEW_LINE>throw (RuntimeException) cause;<NEW_LINE>} else {<NEW_LINE>throw LOG.exceptionWhileInvokingPaLifecycleCallback(CALLBACK_NAME, paName, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Throwable cause = e.getCause();
1,088,059
private void _removeAllFromLearning(int schedVer) {<NEW_LINE>// remove review cards from relearning<NEW_LINE>if (schedVer == 1) {<NEW_LINE>mCol.getDb().execute("update cards set due = odue, queue = " + Consts.QUEUE_TYPE_REV + ", type = " + Consts.CARD_TYPE_REV + ", mod = ?, usn = ?, odue = 0 where queue in (" + Consts.QUEUE_TYPE_LRN + "," + Consts.QUEUE_TYPE_DAY_LEARN_RELEARN + ") and type in (" + Consts.CARD_TYPE_REV + "," + Consts.CARD_TYPE_RELEARNING + ")", getTime().intTime(), mCol.usn());<NEW_LINE>} else {<NEW_LINE>mCol.getDb().execute("update cards set due = ?+ivl, queue = " + Consts.QUEUE_TYPE_REV + ", type = " + Consts.CARD_TYPE_REV + ", mod = ?, usn = ?, odue = 0 where queue in (" + Consts.QUEUE_TYPE_LRN + "," + Consts.QUEUE_TYPE_DAY_LEARN_RELEARN + ") and type in (" + Consts.CARD_TYPE_REV + "," + Consts.CARD_TYPE_RELEARNING + ")", mToday, getTime().intTime(<MASK><NEW_LINE>}<NEW_LINE>// remove new cards from learning<NEW_LINE>forgetCards(mCol.getDb().queryLongList("select id from cards where queue in (" + Consts.QUEUE_TYPE_LRN + "," + Consts.QUEUE_TYPE_DAY_LEARN_RELEARN + ")"));<NEW_LINE>}
), mCol.usn());
1,026,883
public ArrayList<Fact> createFacts(MAcctSchema acctSchema) {<NEW_LINE>ArrayList<Fact> facts = new ArrayList<Fact>();<NEW_LINE>// Other Acct Schema<NEW_LINE>if (acctSchema.getC_AcctSchema_ID() != acctSchemaId)<NEW_LINE>return facts;<NEW_LINE>// create Fact Header<NEW_LINE>Fact fact = new Fact(this, acctSchema, postingType);<NEW_LINE>MDepreciationEntry entry = (MDepreciationEntry) getPO();<NEW_LINE>Iterator<MDepreciationExp> it = entry.getLinesIterator(false);<NEW_LINE>while (it.hasNext()) {<NEW_LINE>MDepreciationExp depreciationExp = it.next();<NEW_LINE>I_A_Asset asset = depreciationExp.getA_Asset();<NEW_LINE>DocLine docLine = createLine(depreciationExp);<NEW_LINE>BigDecimal expenseAmt = depreciationExp.getExpense();<NEW_LINE>//<NEW_LINE>MAccount drAccounting = MAccount.getValidCombination(getCtx(), depreciationExp.getDR_Account_ID(), getTrxName());<NEW_LINE>MAccount crAccounting = MAccount.getValidCombination(getCtx(), depreciationExp.<MASK><NEW_LINE>FactLine[] factLines = FactUtil.createSimpleOperation(fact, docLine, drAccounting, crAccounting, acctSchema.getC_Currency_ID(), expenseAmt, false);<NEW_LINE>for (FactLine factLine : factLines) {<NEW_LINE>StringBuilder description = new StringBuilder(factLine.getDescription() != null ? factLine.getDescription() : "");<NEW_LINE>description.append(" ").append(asset.getValue()).append(" ").append(asset.getName());<NEW_LINE>factLine.setDescription(description.toString());<NEW_LINE>factLine.setC_Project_ID(asset.getC_Project_ID());<NEW_LINE>factLine.setC_Activity_ID(asset.getC_Activity_ID());<NEW_LINE>factLine.setC_BPartner_ID(asset.getC_BPartner_ID());<NEW_LINE>factLine.setLocationFromBPartner(asset.getC_BPartner_Location_ID(), true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>facts.add(fact);<NEW_LINE>return facts;<NEW_LINE>}
getCR_Account_ID(), getTrxName());
48,207
public void zoomEvent(EventType<ZoomEvent> eventType, double zoomFactor, double totalZoomFactor, double x, double y, double screenX, double screenY, boolean _shiftDown, boolean _controlDown, boolean _altDown, boolean _metaDown, boolean _direct, boolean _inertia) {<NEW_LINE>if (eventType == ZoomEvent.ZOOM_FINISHED) {<NEW_LINE>x <MASK><NEW_LINE>y = zoomGesture.sceneCoords.getY();<NEW_LINE>screenX = zoomGesture.screenCoords.getX();<NEW_LINE>screenY = zoomGesture.screenCoords.getY();<NEW_LINE>} else if (Double.isNaN(x) || Double.isNaN(y) || Double.isNaN(screenX) || Double.isNaN(screenY)) {<NEW_LINE>if (cursorScenePos == null || cursorScreenPos == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>x = cursorScenePos.getX();<NEW_LINE>y = cursorScenePos.getY();<NEW_LINE>screenX = cursorScreenPos.getX();<NEW_LINE>screenY = cursorScreenPos.getY();<NEW_LINE>}<NEW_LINE>inMousePick = true;<NEW_LINE>Scene.this.processGestureEvent(new ZoomEvent(eventType, x, y, screenX, screenY, _shiftDown, _controlDown, _altDown, _metaDown, _direct, _inertia, zoomFactor, totalZoomFactor, pick(x, y)), zoomGesture);<NEW_LINE>inMousePick = false;<NEW_LINE>}
= zoomGesture.sceneCoords.getX();