idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,283,290
public void read(org.apache.thrift.protocol.TProtocol prot, PutRequestMessage struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>struct.header = new AsyncMessageHeader();<NEW_LINE>struct.header.read(iprot);<NEW_LINE>struct.setHeaderIsSet(true);<NEW_LINE>struct.storeName = iprot.readString();<NEW_LINE>struct.setStoreNameIsSet(true);<NEW_LINE>struct.key = iprot.readBinary();<NEW_LINE>struct.setKeyIsSet(true);<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(2);<NEW_LINE>if (incoming.get(0)) {<NEW_LINE><MASK><NEW_LINE>struct.versionedValue.read(iprot);<NEW_LINE>struct.setVersionedValueIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(1)) {<NEW_LINE>struct.value = iprot.readBinary();<NEW_LINE>struct.setValueIsSet(true);<NEW_LINE>}<NEW_LINE>}
struct.versionedValue = new VersionedValue();
92,132
final GetTopicAttributesResult executeGetTopicAttributes(GetTopicAttributesRequest getTopicAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTopicAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetTopicAttributesRequest> request = null;<NEW_LINE>Response<GetTopicAttributesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetTopicAttributesRequestMarshaller().marshall(super.beforeMarshalling(getTopicAttributesRequest));<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, "SNS");<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>StaxResponseHandler<GetTopicAttributesResult> responseHandler = new StaxResponseHandler<GetTopicAttributesResult>(new GetTopicAttributesResultStaxUnmarshaller());<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, "GetTopicAttributes");
159,726
SimpleConfigObject withoutPath(Path path) {<NEW_LINE>String key = path.first();<NEW_LINE>Path next = path.remainder();<NEW_LINE>AbstractConfigValue v = this.value.get(key);<NEW_LINE>HashMap<String, AbstractConfigValue> smaller;<NEW_LINE>if (next != null && v instanceof AbstractConfigObject) {<NEW_LINE>v = ((AbstractConfigObject) v).withoutPath(next);<NEW_LINE>smaller = new HashMap<>(this.value);<NEW_LINE><MASK><NEW_LINE>return new SimpleConfigObject(this.origin(), smaller, ResolveStatus.fromValues(smaller.values()), this.ignoresFallbacks);<NEW_LINE>} else if (next == null && v != null) {<NEW_LINE>smaller = new HashMap<>(this.value.size() - 1);<NEW_LINE>for (Entry<String, AbstractConfigValue> stringAbstractConfigValueEntry : this.value.entrySet()) {<NEW_LINE>if (!stringAbstractConfigValueEntry.getKey().equals(key)) {<NEW_LINE>smaller.put(stringAbstractConfigValueEntry.getKey(), stringAbstractConfigValueEntry.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new SimpleConfigObject(this.origin(), smaller, ResolveStatus.fromValues(smaller.values()), this.ignoresFallbacks);<NEW_LINE>} else {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>}
smaller.put(key, v);
432,053
public void read(org.apache.thrift.protocol.TProtocol iprot, info_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>switch(schemeField.id) {<NEW_LINE>case // SUCCESS<NEW_LINE>0:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {<NEW_LINE>struct.success = iprot.readString();<NEW_LINE>struct.setSuccessIsSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.<MASK><NEW_LINE>}<NEW_LINE>iprot.readFieldEnd();<NEW_LINE>}<NEW_LINE>iprot.readStructEnd();<NEW_LINE>// check for required fields of primitive type, which can't be checked in the validate method<NEW_LINE>struct.validate();<NEW_LINE>}
skip(iprot, schemeField.type);
1,253,137
protected void preLoad(BuildCraftJsonGui json) {<NEW_LINE>TypedKeyMap<String, Object> properties = json.properties;<NEW_LINE>FunctionContext context = json.context;<NEW_LINE>properties.put("filler.inventory", new InventorySlotHolder(container, container.tile.invResources));<NEW_LINE>properties.put("statement.container", container.tile);<NEW_LINE>properties.<MASK><NEW_LINE>properties.put("controllable.sprite", SPRITE_CONTROL_MODE);<NEW_LINE>context.put_o("controllable.mode", Mode.class, container.tile::getControlMode);<NEW_LINE>context.put_b("filler.is_finished", container.tile::isFinished);<NEW_LINE>context.put_b("filler.is_locked", container.tile::isLocked);<NEW_LINE>context.put_l("filler.to_break", container.tile::getCountToBreak);<NEW_LINE>context.put_l("filler.to_place", container.tile::getCountToPlace);<NEW_LINE>properties.put("filler.possible", FillerStatementContext.CONTEXT_ALL);<NEW_LINE>properties.put("filler.pattern", container.getPatternStatementClient());<NEW_LINE>properties.put("filler.pattern.sprite", SPRITE_PATTERN);<NEW_LINE>context.put_b("filler.invert", container::isInverted);<NEW_LINE>properties.put("filler.invert", IButtonBehaviour.TOGGLE);<NEW_LINE>properties.put("filler.invert", container.isInverted());<NEW_LINE>properties.put("filler.invert", (IButtonClickEventListener) (b, k) -> container.sendInverted(b.isButtonActive()));<NEW_LINE>context.put_b("filler.excavate", container.tile::canExcavate);<NEW_LINE>properties.put("filler.excavate", IButtonBehaviour.TOGGLE);<NEW_LINE>properties.put("filler.excavate", container.tile.canExcavate());<NEW_LINE>properties.put("filler.excavate", (IButtonClickEventListener) (b, k) -> container.tile.sendCanExcavate(b.isButtonActive()));<NEW_LINE>}
put("controllable", container.tile);
920,426
private UaDataTypeNode newDataTypeNode(NodeId nodeId, List<DataValue> attributeValues) throws UaException {<NEW_LINE>DataValue nodeIdDataValue = attributeValues.get(0);<NEW_LINE>StatusCode nodeIdStatusCode = nodeIdDataValue.getStatusCode();<NEW_LINE>if (nodeIdStatusCode != null && nodeIdStatusCode.isBad()) {<NEW_LINE>throw new UaException(nodeIdStatusCode);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>NodeClass nodeClass = NodeClass.from((Integer) attributeValues.get(1).getValue().getValue());<NEW_LINE>Preconditions.checkArgument(nodeClass == NodeClass.DataType, "expected NodeClass.DataType, got NodeClass." + nodeClass);<NEW_LINE>QualifiedName browseName = (QualifiedName) attributeValues.get(2)<MASK><NEW_LINE>LocalizedText displayName = (LocalizedText) attributeValues.get(3).getValue().getValue();<NEW_LINE>LocalizedText description = getAttributeOrNull(attributeValues.get(4), LocalizedText.class);<NEW_LINE>UInteger writeMask = getAttributeOrNull(attributeValues.get(5), UInteger.class);<NEW_LINE>UInteger userWriteMask = getAttributeOrNull(attributeValues.get(6), UInteger.class);<NEW_LINE>Boolean isAbstract = (Boolean) attributeValues.get(7).getValue().getValue();<NEW_LINE>return new UaDataTypeNode(client, nodeId, nodeClass, browseName, displayName, description, writeMask, userWriteMask, isAbstract);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw UaException.extract(t).orElse(new UaException(StatusCodes.Bad_UnexpectedError, t));<NEW_LINE>}<NEW_LINE>}
.getValue().getValue();
258,403
// </editor-fold>//GEN-END:initComponents<NEW_LINE>private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_jButton1ActionPerformed<NEW_LINE>Document targetDoc = target.getDocument();<NEW_LINE>FileObject targetDocFO = NbEditorUtilities.getFileObject(targetDoc);<NEW_LINE>SourceGroup[] sg = HtmlPaletteUtilities.getSourceGroups(targetDocFO);<NEW_LINE>File file = null;<NEW_LINE>if (sg.length > 0) {<NEW_LINE>FileObject fo = BrowseFolders.showDialog(sg, BrowseFolders.imageFileFilter);<NEW_LINE>if (fo != null)<NEW_LINE>file = FileUtil.toFile(fo);<NEW_LINE>} else {<NEW_LINE>jFileChooser1.setCurrentDirectory(FileUtil.toFile<MASK><NEW_LINE>int returnVal = jFileChooser1.showOpenDialog(this);<NEW_LINE>if (returnVal == jFileChooser1.APPROVE_OPTION)<NEW_LINE>file = jFileChooser1.getSelectedFile();<NEW_LINE>}<NEW_LINE>if (file != null) {<NEW_LINE>String path = file.getAbsolutePath();<NEW_LINE>FileObject imgFO = FileUtil.toFileObject(file);<NEW_LINE>try {<NEW_LINE>String relPathToImg = HtmlPaletteUtilities.getRelativePath(targetDocFO, imgFO);<NEW_LINE>if (relPathToImg.length() > 0)<NEW_LINE>path = relPathToImg;<NEW_LINE>} catch (Exception e) {<NEW_LINE>// eventual exceptions imply the absolute path to be used<NEW_LINE>}<NEW_LINE>jTextField1.setText(path);<NEW_LINE>try {<NEW_LINE>Image img = new ImageIcon(file.getAbsolutePath()).getImage();<NEW_LINE>int width = img.getWidth(null);<NEW_LINE>jTextField2.setText(width != -1 ? Integer.valueOf(width).toString() : "");<NEW_LINE>int height = img.getHeight(null);<NEW_LINE>jTextField3.setText(height != -1 ? Integer.valueOf(height).toString() : "");<NEW_LINE>jTextField4.setText(imgFO.getName());<NEW_LINE>} catch (Exception ex) {<NEW_LINE>Logger.getLogger("global").log(Level.INFO, null, ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(targetDocFO.getParent()));
246,842
private byte[] compressImageToJpeg(InputStream image, int width, int height) {<NEW_LINE><MASK><NEW_LINE>int w = width;<NEW_LINE>int h = height;<NEW_LINE>boolean scale = false;<NEW_LINE>int divider = 1;<NEW_LINE>while (w > IMAGE_MAX_SIZE || h > IMAGE_MAX_SIZE) {<NEW_LINE>w /= 2;<NEW_LINE>h /= 2;<NEW_LINE>divider *= 2;<NEW_LINE>scale = true;<NEW_LINE>}<NEW_LINE>Bitmap bmp;<NEW_LINE>if (scale) {<NEW_LINE>BitmapFactory.Options opts = new BitmapFactory.Options();<NEW_LINE>opts.inSampleSize = divider;<NEW_LINE>bmp = BitmapFactory.decodeStream(bufferedInputStream, null, opts);<NEW_LINE>} else {<NEW_LINE>bmp = BitmapFactory.decodeStream(bufferedInputStream);<NEW_LINE>}<NEW_LINE>if (bmp != null) {<NEW_LINE>ByteArrayOutputStream os = new ByteArrayOutputStream();<NEW_LINE>bmp.compress(Bitmap.CompressFormat.JPEG, 90, os);<NEW_LINE>return os.toByteArray();<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
BufferedInputStream bufferedInputStream = new BufferedInputStream(image);
793,251
// Double the size of the hash-table<NEW_LINE>protected void resizeTable() {<NEW_LINE>increaseCapacity();<NEW_LINE>adjustCapacity();<NEW_LINE>threshold = (int) (capacity * loadFactor);<NEW_LINE>K[] oldKeyTable = (K[]) new Object[capacity];<NEW_LINE>V[] oldValueTable = (V[]) new Object[capacity];<NEW_LINE>// Perform key table pointer swap<NEW_LINE>K[] keyTableTmp = keys;<NEW_LINE>keys = oldKeyTable;<NEW_LINE>oldKeyTable = keyTableTmp;<NEW_LINE>// Perform value table pointer swap<NEW_LINE>V[] valueTableTmp = values;<NEW_LINE>values = oldValueTable;<NEW_LINE>oldValueTable = valueTableTmp;<NEW_LINE>// Reset the key count and buckets used since we are about to<NEW_LINE>// re-insert all the keys into the hash-table.<NEW_LINE>keyCount = usedBuckets = 0;<NEW_LINE>for (int i = 0; i < oldKeyTable.length; i++) {<NEW_LINE>if (oldKeyTable[i] != null && oldKeyTable[i] != TOMBSTONE)<NEW_LINE>insert(oldKeyTable[<MASK><NEW_LINE>oldValueTable[i] = null;<NEW_LINE>oldKeyTable[i] = null;<NEW_LINE>}<NEW_LINE>}
i], oldValueTable[i]);
363,052
public <Req, Resp> StreamingClientCall<Req, Resp> newStreamingCall(final MethodDescriptor<Req, Resp> methodDescriptor, final BufferDecoderGroup decompressors) {<NEW_LINE>GrpcStreamingSerializer<Req> serializerIdentity = streamingSerializer(methodDescriptor);<NEW_LINE>GrpcStreamingDeserializer<Resp> deserializerIdentity = streamingDeserializer(methodDescriptor);<NEW_LINE>List<GrpcStreamingDeserializer<Resp>> deserializers = streamingDeserializers(methodDescriptor, decompressors.decoders());<NEW_LINE>CharSequence acceptedEncoding = decompressors.advertisedMessageEncoding();<NEW_LINE>CharSequence requestContentType = grpcContentType(methodDescriptor.requestDescriptor().serializerDescriptor().contentType());<NEW_LINE>CharSequence responseContentType = grpcContentType(methodDescriptor.responseDescriptor().serializerDescriptor().contentType());<NEW_LINE>return (metadata, request) -> {<NEW_LINE>Duration timeout = timeoutForRequest(metadata.timeout());<NEW_LINE>GrpcStreamingSerializer<Req> serializer = streamingSerializer(methodDescriptor, serializerIdentity, metadata.requestCompressor());<NEW_LINE>String mdPath = methodDescriptor.httpPath();<NEW_LINE>StreamingHttpRequest httpRequest = streamingHttpClient.post(UNKNOWN_PATH.equals(mdPath) ? metadata.path() : mdPath);<NEW_LINE>initRequest(httpRequest, requestContentType, serializer.messageEncoding(), acceptedEncoding, timeout);<NEW_LINE>httpRequest.payloadBody(serializer.serialize(request, streamingHttpClient.executionContext<MASK><NEW_LINE>assignStrategy(httpRequest, metadata);<NEW_LINE>return streamingHttpClient.request(httpRequest).flatMapPublisher(response -> validateResponseAndGetPayload(response, responseContentType, streamingHttpClient.executionContext().bufferAllocator(), readGrpcMessageEncodingRaw(response.headers(), deserializerIdentity, deserializers, GrpcStreamingDeserializer::messageEncoding))).onErrorMap(GrpcUtils::toGrpcException);<NEW_LINE>};<NEW_LINE>}
().bufferAllocator()));
724,005
public RestMethodResult doPost(final Map<String, Object> propertySet) throws FrameworkException {<NEW_LINE>// virtual type?<NEW_LINE>if (virtualType != null) {<NEW_LINE>virtualType.transformInput(securityContext, entityClass, propertySet);<NEW_LINE>}<NEW_LINE>if (isNode) {<NEW_LINE>final RestMethodResult result = new RestMethodResult(HttpServletResponse.SC_CREATED);<NEW_LINE>final NodeInterface newNode = createNode(propertySet);<NEW_LINE>if (newNode != null) {<NEW_LINE>result.addHeader("Location", buildLocationHeader(newNode));<NEW_LINE>result.addContent(newNode.getUuid());<NEW_LINE>}<NEW_LINE>// finally: return 201 Created<NEW_LINE>return result;<NEW_LINE>} else {<NEW_LINE>final App app = StructrApp.getInstance(securityContext);<NEW_LINE>final Relation template = getRelationshipTemplate();<NEW_LINE>final ErrorBuffer errorBuffer = new ErrorBuffer();<NEW_LINE>if (template != null) {<NEW_LINE>final NodeInterface sourceNode = identifyStartNode(template, propertySet);<NEW_LINE>final NodeInterface targetNode = identifyEndNode(template, propertySet);<NEW_LINE>final PropertyMap properties = PropertyMap.inputTypeToJavaType(securityContext, entityClass, propertySet);<NEW_LINE>RelationshipInterface newRelationship = null;<NEW_LINE>if (sourceNode == null) {<NEW_LINE>errorBuffer.add(new EmptyPropertyToken(entityClass.getSimpleName(), template.getSourceIdProperty()));<NEW_LINE>}<NEW_LINE>if (targetNode == null) {<NEW_LINE>errorBuffer.add(new EmptyPropertyToken(entityClass.getSimpleName(), template.getTargetIdProperty()));<NEW_LINE>}<NEW_LINE>if (errorBuffer.hasError()) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>template.ensureCardinality(securityContext, sourceNode, targetNode);<NEW_LINE>newRelationship = app.create(sourceNode, targetNode, entityClass, properties);<NEW_LINE>RestMethodResult result = new RestMethodResult(HttpServletResponse.SC_CREATED);<NEW_LINE>if (newRelationship != null) {<NEW_LINE>result.addHeader("Location", buildLocationHeader(newRelationship));<NEW_LINE>result.addContent(newRelationship.getUuid());<NEW_LINE>}<NEW_LINE>// finally: return 201 Created<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>// shouldn't happen<NEW_LINE>throw new NotFoundException("Type" + rawType + " does not exist");<NEW_LINE>}<NEW_LINE>}
FrameworkException(422, "Source node ID and target node ID of relationship must be set", errorBuffer);
91,097
public void initialize(URL url, ResourceBundle resourceBundle) {<NEW_LINE>this.resourceBundle = resourceBundle;<NEW_LINE>final AppPreferences preferences = AppPreferences.getInstance();<NEW_LINE>autoCheckForUpdatesCB.setSelected(preferences.getAutoCheckUpdates());<NEW_LINE>direcroriesChooserForRomsCB.setSelected(preferences.getDirectoriesChooserForRoms());<NEW_LINE>direcroriesChooserForRomsCB.setOnAction(actionEvent -> MediatorControl.getInstance().getGamesController().updateFilesSelectorButtonBehaviour(direcroriesChooserForRomsCB.isSelected()));<NEW_LINE>Region btnSwitchImage = new Region();<NEW_LINE>btnSwitchImage.getStyleClass().add("regionUpdatesCheck");<NEW_LINE>checkForUpdBtn.setGraphic(btnSwitchImage);<NEW_LINE>setDriversInstallFeature();<NEW_LINE>SettingsLanguagesSetup settingsLanguagesSetup = new SettingsLanguagesSetup();<NEW_LINE>languagesChB.setItems(settingsLanguagesSetup.getLanguages());<NEW_LINE>languagesChB.getSelectionModel().select(settingsLanguagesSetup.getRecentLanguage());<NEW_LINE>newVersionHyperlink.setOnAction(e -> hostServices.showDocument(newVersionHyperlink.getText()));<NEW_LINE>checkForUpdBtn.<MASK><NEW_LINE>submitLanguageBtn.setOnAction(e -> languageButtonAction());<NEW_LINE>}
setOnAction(e -> checkForUpdatesAction());
39,735
public JRPrintImage createImageFromElement(JRGenericPrintElement element) throws JRException {<NEW_LINE>String htmlContent = (String) element.getParameterValue(HtmlPrintElement.PARAMETER_HTML_CONTENT);<NEW_LINE>String scaleType = (String) element.getParameterValue(HtmlPrintElement.PARAMETER_SCALE_TYPE);<NEW_LINE>String horizontalAlignment = (String) element.getParameterValue(HtmlPrintElement.PARAMETER_HORIZONTAL_ALIGN);<NEW_LINE>String verticalAlignment = (String) element.getParameterValue(HtmlPrintElement.PARAMETER_VERTICAL_ALIGN);<NEW_LINE>Boolean hasOverflowed = (Boolean) element.getParameterValue(HtmlPrintElement.BUILTIN_PARAMETER_HAS_OVERFLOWED);<NEW_LINE>Boolean clipOnOverflow = (Boolean) element.getParameterValue(HtmlPrintElement.PARAMETER_CLIP_ON_OVERFLOW);<NEW_LINE>JRBasePrintImage printImage = new JRBasePrintImage(element.getDefaultStyleProvider());<NEW_LINE>printImage.setStyle(element.getStyle());<NEW_LINE>printImage.setMode(element.getModeValue());<NEW_LINE>printImage.setBackcolor(element.getBackcolor());<NEW_LINE>printImage.setForecolor(element.getForecolor());<NEW_LINE>printImage.<MASK><NEW_LINE>printImage.setY(element.getY());<NEW_LINE>printImage.setWidth(element.getWidth());<NEW_LINE>printImage.setScaleImage(ScaleImageEnum.getByName(scaleType));<NEW_LINE>printImage.setHorizontalImageAlign(HorizontalImageAlignEnum.getByName(horizontalAlignment));<NEW_LINE>printImage.setVerticalImageAlign(VerticalImageAlignEnum.getByName(verticalAlignment));<NEW_LINE>FlyingSaucerXhtmlToImageRenderer renderer = new FlyingSaucerXhtmlToImageRenderer(getHtmlDocument(htmlContent), element.getWidth(), element.getHeight());<NEW_LINE>if (printImage.getScaleImageValue() == ScaleImageEnum.REAL_HEIGHT || printImage.getScaleImageValue() == ScaleImageEnum.REAL_SIZE) {<NEW_LINE>boolean canClip = hasOverflowed != null ? hasOverflowed : false;<NEW_LINE>if (canClip) {<NEW_LINE>printImage.setHeight(element.getHeight());<NEW_LINE>if (clipOnOverflow) {<NEW_LINE>printImage.setScaleImage(ScaleImageEnum.CLIP);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>printImage.setHeight(renderer.getComputedSize().height);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>printImage.setHeight(element.getHeight());<NEW_LINE>}<NEW_LINE>printImage.setRenderer(renderer);<NEW_LINE>return printImage;<NEW_LINE>}
setX(element.getX());
1,322,222
public Group createAdministrators(Context context, Community community) throws SQLException, AuthorizeException {<NEW_LINE>// Check authorisation - Must be an Admin to create more Admins<NEW_LINE>AuthorizeUtil.authorizeManageAdminGroup(context, community);<NEW_LINE>Group admins = community.getAdministrators();<NEW_LINE>if (admins == null) {<NEW_LINE>// turn off authorization so that Community Admins can create Sub-Community Admins<NEW_LINE>context.turnOffAuthorisationSystem();<NEW_LINE>admins = groupService.create(context);<NEW_LINE>context.restoreAuthSystemState();<NEW_LINE>groupService.setName(admins, "COMMUNITY_" + community.getID() + "_ADMIN");<NEW_LINE>groupService.update(context, admins);<NEW_LINE>}<NEW_LINE>authorizeService.addPolicy(context, community, Constants.ADMIN, admins);<NEW_LINE>// register this as the admin group<NEW_LINE>community.setAdmins(admins);<NEW_LINE>context.addEvent(new Event(Event.MODIFY, Constants.COMMUNITY, community.getID(), null, <MASK><NEW_LINE>return admins;<NEW_LINE>}
getIdentifiers(context, community)));
861,959
public void onPaletteChange(Palette palette) {<NEW_LINE>if (mThemeColor != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (palette == null) {<NEW_LINE>setProgressColor(Settings.get().getThemedDefaultProgressColor());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (palette.getDarkVibrantSwatch() != null) {<NEW_LINE>setProgressColor(palette.getDarkVibrantSwatch().getRgb());<NEW_LINE>} else {<NEW_LINE>if (palette.getDarkMutedSwatch() != null) {<NEW_LINE>setProgressColor(palette.getDarkMutedSwatch().getRgb());<NEW_LINE>} else {<NEW_LINE>if (palette.getMutedSwatch() != null) {<NEW_LINE>setProgressColor(palette.getMutedSwatch().getRgb());<NEW_LINE>} else {<NEW_LINE>if (palette.getVibrantSwatch() != null) {<NEW_LINE>setProgressColor(palette.<MASK><NEW_LINE>} else {<NEW_LINE>setProgressColor(Settings.get().getThemedDefaultProgressColor());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getVibrantSwatch().getRgb());
934,286
public static DeleteVideoResponse unmarshall(DeleteVideoResponse deleteVideoResponse, UnmarshallerContext _ctx) {<NEW_LINE>deleteVideoResponse.setRequestId(_ctx.stringValue("DeleteVideoResponse.RequestId"));<NEW_LINE>List<String> nonExistVideoIds = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DeleteVideoResponse.NonExistVideoIds.Length"); i++) {<NEW_LINE>nonExistVideoIds.add(_ctx.stringValue("DeleteVideoResponse.NonExistVideoIds[" + i + "]"));<NEW_LINE>}<NEW_LINE>deleteVideoResponse.setNonExistVideoIds(nonExistVideoIds);<NEW_LINE>List<String> forbiddenVideoIds <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DeleteVideoResponse.ForbiddenVideoIds.Length"); i++) {<NEW_LINE>forbiddenVideoIds.add(_ctx.stringValue("DeleteVideoResponse.ForbiddenVideoIds[" + i + "]"));<NEW_LINE>}<NEW_LINE>deleteVideoResponse.setForbiddenVideoIds(forbiddenVideoIds);<NEW_LINE>return deleteVideoResponse;<NEW_LINE>}
= new ArrayList<String>();
898,088
public void actionPerformed(ActionEvent e) {<NEW_LINE>if (e.getActionCommand().equals(ValuePreference.NAME)) {<NEW_LINE>if (MRole.getDefault().isShowPreference())<NEW_LINE>ValuePreference.start(m_mField, getValue());<NEW_LINE>return;<NEW_LINE>} else if (e.getActionCommand().equals(RecordInfo.CHANGE_LOG_COMMAND)) {<NEW_LINE>RecordInfo.start(m_mField);<NEW_LINE>return;<NEW_LINE>} else // Invoke Editor<NEW_LINE>if (e.getSource() == mEditor) {<NEW_LINE>String s = Editor.startEditor(this, Msg.translate(Env.getCtx(), m_columnName), getText(), <MASK><NEW_LINE>setText(s);<NEW_LINE>} else //<NEW_LINE>if (e.getSource() == m_button) {<NEW_LINE>action_button();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Data Binding<NEW_LINE>try {<NEW_LINE>fireVetoableChange(m_columnName, m_oldText, getText());<NEW_LINE>} catch (PropertyVetoException pve) {<NEW_LINE>}<NEW_LINE>}
m_text.isEditable(), m_fieldLength);
993,167
public boolean next() {<NEW_LINE>if (!m_started) {<NEW_LINE>pushLongestPathFrom(m_root);<NEW_LINE>m_started = true;<NEW_LINE>} else {<NEW_LINE>if (traversalStack.empty()) {<NEW_LINE>throw new RuntimeException("Internal Error: Traversal already finished");<NEW_LINE>}<NEW_LINE>final Pair<IZyTreeNode, Integer> justProcessed = traversalStack.pop();<NEW_LINE>final IZyTreeNode justProcessedNode = justProcessed.first();<NEW_LINE>final int justProcessedChildrenProcessed = justProcessed.second();<NEW_LINE>if (traversalStack.empty()) {<NEW_LINE>if (justProcessedChildrenProcessed == justProcessedNode.getChildren().size()) {<NEW_LINE>// At this point we're done<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>checkAndPush(justProcessed, justProcessedNode, justProcessedChildrenProcessed);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (justProcessedChildrenProcessed == justProcessedNode.getChildren().size()) {<NEW_LINE>// At this point we've handled all the children of the node. The node<NEW_LINE>// can be removed and we continue with the next node on the stack.<NEW_LINE>// We have to adjust the parent node though.<NEW_LINE>final Pair<IZyTreeNode, Integer> parentProcessed = traversalStack.pop();<NEW_LINE>traversalStack.push(new Pair<IZyTreeNode, Integer>(parentProcessed.first(), parentProcessed<MASK><NEW_LINE>} else {<NEW_LINE>checkAndPush(justProcessed, justProcessedNode, justProcessedChildrenProcessed);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return !traversalStack.empty();<NEW_LINE>}
.second() + 1));
194,206
final DescribeGlobalClustersResult executeDescribeGlobalClusters(DescribeGlobalClustersRequest describeGlobalClustersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeGlobalClustersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeGlobalClustersRequest> request = null;<NEW_LINE>Response<DescribeGlobalClustersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeGlobalClustersRequestMarshaller().marshall(super.beforeMarshalling(describeGlobalClustersRequest));<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, "DocDB");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeGlobalClusters");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeGlobalClustersResult> responseHandler = new StaxResponseHandler<<MASK><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>}
DescribeGlobalClustersResult>(new DescribeGlobalClustersResultStaxUnmarshaller());
200,632
public static byte[] serObjByte(Object pk) throws IOException {<NEW_LINE>final boolean trace = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "serObjByte", pk == null ? null : pk.getClass());<NEW_LINE>byte[] b;<NEW_LINE>try {<NEW_LINE>ByteArrayOutputStream bos = new ByteArrayOutputStream();<NEW_LINE><MASK><NEW_LINE>out.writeObject(pk);<NEW_LINE>out.flush();<NEW_LINE>out.close();<NEW_LINE>b = bos.toByteArray();<NEW_LINE>} catch (IOException e) {<NEW_LINE>FFDCFilter.processException(e, Utils.class.getName(), "336");<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, "serObjByte", new Object[] { "Unable to serialize: " + pk, e });<NEW_LINE>throw e;<NEW_LINE>} catch (Error e) {<NEW_LINE>FFDCFilter.processException(e, Utils.class.getName(), "342");<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, "serObjByte", new Object[] { "Unable to serialize: " + pk, e });<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.exit(tc, "serObjByte");<NEW_LINE>return b;<NEW_LINE>}
ObjectOutputStream out = new ObjectOutputStream(bos);
319,430
private void adjustFrameBufferMatrix(MapPosition mapPositionFrameBuffer, Dimension mapViewDimension, double scaleFactor, LatLong pivot) {<NEW_LINE>MapPosition mapViewPosition = this.model.mapViewPosition.getMapPosition();<NEW_LINE>long mapSize = MercatorProjection.getMapSize(mapPositionFrameBuffer.zoomLevel, model.displayModel.getTileSize());<NEW_LINE>Point pointFrameBuffer = MercatorProjection.<MASK><NEW_LINE>Point pointMapPosition = MercatorProjection.getPixel(mapViewPosition.latLong, mapSize);<NEW_LINE>double diffX = pointFrameBuffer.x - pointMapPosition.x;<NEW_LINE>double diffY = pointFrameBuffer.y - pointMapPosition.y;<NEW_LINE>// we need to compute the pivot distance from the map center<NEW_LINE>// as we will need to find the pivot point for the<NEW_LINE>// frame buffer (which generally has not the same size as the<NEW_LINE>// map view).<NEW_LINE>double pivotDistanceX = 0d;<NEW_LINE>double pivotDistanceY = 0d;<NEW_LINE>if (pivot != null) {<NEW_LINE>Point pivotXY = MercatorProjection.getPixel(pivot, mapSize);<NEW_LINE>pivotDistanceX = pivotXY.x - pointFrameBuffer.x;<NEW_LINE>pivotDistanceY = pivotXY.y - pointFrameBuffer.y;<NEW_LINE>}<NEW_LINE>float currentScaleFactor = (float) (scaleFactor / Math.pow(2, mapPositionFrameBuffer.zoomLevel));<NEW_LINE>this.frameBuffer.adjustMatrix((float) diffX, (float) diffY, currentScaleFactor, mapViewDimension, (float) pivotDistanceX, (float) pivotDistanceY);<NEW_LINE>}
getPixel(mapPositionFrameBuffer.latLong, mapSize);
1,715,297
public RelWriter explainTermsForDisplay(RelWriter pw) {<NEW_LINE>ExplainInfo explainInfo = buildExplainInfo(((RelDrdsWriter) pw).getParams(), (ExecutionContext) ((RelDrdsWriter) pw).getExecutionContext());<NEW_LINE>pw.item(RelDrdsWriter.REL_NAME, getExplainName());<NEW_LINE>String groupAndTableName = explainInfo.groupName;<NEW_LINE>if (explainInfo.tableNames != null && explainInfo.tableNames.size() > 0) {<NEW_LINE>groupAndTableName += (TStringUtil.isNotBlank(explainInfo.groupName) ? "." : "") + TStringUtil.join(explainInfo.tableNames, ",");<NEW_LINE>pw.itemIf("tables", groupAndTableName, groupAndTableName != null);<NEW_LINE>} else {<NEW_LINE>pw.itemIf("groups", groupAndTableName, groupAndTableName != null);<NEW_LINE>}<NEW_LINE>String sql = TStringUtil.replace(getNativeSql(), "\n", " ");<NEW_LINE>pw.item("sql", sql);<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>if (MapUtils.isNotEmpty(explainInfo.params)) {<NEW_LINE>String operator = "";<NEW_LINE>for (Object c : explainInfo.params.values()) {<NEW_LINE>Object v = ((<MASK><NEW_LINE>builder.append(operator);<NEW_LINE>if (v instanceof TableName) {<NEW_LINE>builder.append(((TableName) v).getTableName());<NEW_LINE>} else {<NEW_LINE>builder.append(v == null ? "NULL" : v.toString());<NEW_LINE>}<NEW_LINE>operator = ",";<NEW_LINE>}<NEW_LINE>pw.item("params", builder.toString());<NEW_LINE>}<NEW_LINE>// pw.done(this);<NEW_LINE>return pw;<NEW_LINE>}
ParameterContext) c).getValue();
389,933
final GetPendingJobExecutionsResult executeGetPendingJobExecutions(GetPendingJobExecutionsRequest getPendingJobExecutionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPendingJobExecutionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetPendingJobExecutionsRequest> request = null;<NEW_LINE>Response<GetPendingJobExecutionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetPendingJobExecutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getPendingJobExecutionsRequest));<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, "IoT Jobs Data Plane");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetPendingJobExecutions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetPendingJobExecutionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetPendingJobExecutionsResultJsonUnmarshaller());<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());
247,038
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>hasCameraPermission = Utils.hasOrRequestCameraAccess(this);<NEW_LINE>if (!hasCameraPermission) {<NEW_LINE>// finishError(R.string.no_camera_permission);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Intent intent = getIntent();<NEW_LINE>_stringHandleConfig = Preconditions.checkNotNull((StringHandleConfig<MASK><NEW_LINE>// Did we already launch the scanner?<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>_hasLaunchedScanner = savedInstanceState.getBoolean("hasLaunchedScanner", false);<NEW_LINE>}<NEW_LINE>// Make sure that we make the screen rotate right after scanning<NEW_LINE>if (_hasLaunchedScanner) {<NEW_LINE>// the scanner has been launched earlier. This means that we have<NEW_LINE>// stored our previous orientation and that we want to try and restore it<NEW_LINE>Preconditions.checkNotNull(savedInstanceState);<NEW_LINE>_preferredOrientation = savedInstanceState.getInt("lastOrientation", -1);<NEW_LINE>if (getScreenOrientation() != _preferredOrientation) {<NEW_LINE>// noinspection ResourceType<NEW_LINE>setRequestedOrientation(_preferredOrientation);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// The scanner has not been launched yet. Get our current orientation<NEW_LINE>// so we can restore it after scanning<NEW_LINE>_preferredOrientation = getScreenOrientation();<NEW_LINE>}<NEW_LINE>}
) intent.getSerializableExtra("request"));
957,782
public List<Map<String, Object>> read(String segmentId, String sqlTmpl, Object[] values) throws IOException {<NEW_LINE>String readUrl = readUrl(segmentId);<NEW_LINE>String[] sqlValues = new String[values.length];<NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>sqlValues[i] = sqlValue(values[i]);<NEW_LINE>}<NEW_LINE>String sql = String.format(sqlTmpl, (Object[]) sqlValues);<NEW_LINE>HttpURLConnection connection;<NEW_LINE>try {<NEW_LINE>connection = httpRequest("POST", readUrl, SQL_MIMETYPE, sql, TEN_MINUTES_MS);<NEW_LINE>if (connection.getResponseCode() != 200) {<NEW_LINE>throw new TroughException("unexpected response " + connection.getResponseCode() + " " + connection.getResponseMessage() + ": " + responsePayload(connection) + <MASK><NEW_LINE>}<NEW_LINE>Object result = new JSONParser().parse(new InputStreamReader(connection.getInputStream(), "UTF-8"));<NEW_LINE>return (List<Map<String, Object>>) result;<NEW_LINE>} catch (IOException e) {<NEW_LINE>synchronized (readUrlCache) {<NEW_LINE>readUrlCache.remove(segmentId);<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>} catch (ParseException e) {<NEW_LINE>synchronized (readUrlCache) {<NEW_LINE>readUrlCache.remove(segmentId);<NEW_LINE>}<NEW_LINE>throw new TroughException("problem parsing json response from " + readUrl, e);<NEW_LINE>}<NEW_LINE>}
" from " + readUrl + " to query: " + sql);
1,649,904
public StringBuilder processPage(String id, String sitemap, String label, EList<Widget> children, boolean async) throws RenderException {<NEW_LINE>String snippet = getSnippet(async ? "layer" : "main");<NEW_LINE>snippet = snippet.replaceAll("%id%", id);<NEW_LINE>// if the label contains a value span, we remove this span as<NEW_LINE>// the title of a page/layer cannot deal with this<NEW_LINE>// Note: we can have a span here, if the parent widget had a label<NEW_LINE>// with some value defined (e.g. "Windows [%d]"), which getLabel()<NEW_LINE>// will convert into a "Windows <span>5</span>".<NEW_LINE>String labelPlain = label;<NEW_LINE>if (labelPlain.contains("[") && labelPlain.endsWith("]")) {<NEW_LINE>labelPlain = labelPlain.replace("[", "").replace("]", "");<NEW_LINE>}<NEW_LINE>snippet = StringUtils.replace(snippet, "%labelstyle%", "");<NEW_LINE>snippet = StringUtils.replace(snippet, "%label%", StringEscapeUtils.escapeHtml(labelPlain));<NEW_LINE>snippet = StringUtils.replace(snippet, "%servletname%", WebAppServlet.SERVLET_NAME);<NEW_LINE>snippet = StringUtils.replace(snippet, "%sitemap%", sitemap);<NEW_LINE>String[] parts = snippet.split("%children%");<NEW_LINE>StringBuilder preChildren = new StringBuilder(parts[0]);<NEW_LINE>StringBuilder postChildren = new StringBuilder(parts[1]);<NEW_LINE>if (parts.length == 2) {<NEW_LINE><MASK><NEW_LINE>} else if (parts.length > 2) {<NEW_LINE>logger.error("Snippet '{}' contains multiple %children% sections, but only one is allowed!", async ? "layer" : "main");<NEW_LINE>}<NEW_LINE>return preChildren.append(postChildren);<NEW_LINE>}
processChildren(preChildren, postChildren, children);
211,721
// </editor-fold>//GEN-END:initComponents<NEW_LINE>private void javadocBrowseActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_javadocBrowseActionPerformed<NEW_LINE>JFileChooser chooser = new JFileChooser();<NEW_LINE><MASK><NEW_LINE>chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);<NEW_LINE>chooser.setMultiSelectionEnabled(false);<NEW_LINE>if (lastChosenFile != null) {<NEW_LINE>chooser.setSelectedFile(lastChosenFile);<NEW_LINE>} else if (javadoc.getText().length() > 0) {<NEW_LINE>chooser.setSelectedFile(new File(javadoc.getText()));<NEW_LINE>} else {<NEW_LINE>File[] files = model.getBaseFolder().listFiles();<NEW_LINE>if (files != null && files.length > 0) {<NEW_LINE>chooser.setSelectedFile(files[0]);<NEW_LINE>} else {<NEW_LINE>chooser.setSelectedFile(model.getBaseFolder());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>chooser.setDialogTitle(NbBundle.getMessage(OutputPanel.class, "LBL_Browse_Javadoc"));<NEW_LINE>if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(this)) {<NEW_LINE>File file = chooser.getSelectedFile();<NEW_LINE>file = FileUtil.normalizeFile(file);<NEW_LINE>javadoc.setText(file.getAbsolutePath());<NEW_LINE>lastChosenFile = file;<NEW_LINE>}<NEW_LINE>}
FileUtil.preventFileChooserSymlinkTraversal(chooser, null);
574,118
private void initIntenseColors() {<NEW_LINE>if (fInvertColors) {<NEW_LINE>setColor(fColorMapIntense, WHITE, 127, 127, 127);<NEW_LINE>// only used when colors are inverse<NEW_LINE>setColor(fColorMapIntense, WHITE_FOREGROUND, 0, 0, 0);<NEW_LINE>setColor(fColorMapIntense, BLACK, 255, 255, 255);<NEW_LINE>} else {<NEW_LINE>setColor(fColorMapIntense, WHITE, 255, 255, 255);<NEW_LINE>setColor(fColorMapIntense, WHITE_FOREGROUND, 255, 255, 255);<NEW_LINE>setColor(fColorMapIntense, BLACK, 0, 0, 0);<NEW_LINE>}<NEW_LINE>setColor(fColorMapIntense, RED, 255, 0, 0);<NEW_LINE>setColor(fColorMapIntense, GREEN, 0, 255, 0);<NEW_LINE>setColor(fColorMapIntense, BLUE, 92, 92, 255);<NEW_LINE>setColor(fColorMapIntense, YELLOW, 255, 255, 0);<NEW_LINE>setColor(fColorMapIntense, CYAN, 0, 255, 255);<NEW_LINE>setColor(fColorMapIntense, MAGENTA, 255, 0, 255);<NEW_LINE>setColor(fColorMapIntense, <MASK><NEW_LINE>}
GRAY, 255, 255, 255);
723,190
public void initializeComponent(RADComponent metaComp) {<NEW_LINE>metaComp.setAuxValue(RADComponent.AUX_VALUE_CLASS_DETAILS, initializerId);<NEW_LINE>if ("Box.Filler.Glue".equals(initializerId)) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "maximumSize", new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));<NEW_LINE>} else if ("Box.Filler.HorizontalGlue".equals(initializerId)) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "maximumSize", new Dimension(Short.MAX_VALUE, 0));<NEW_LINE>} else if ("Box.Filler.VerticalGlue".equals(initializerId)) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "maximumSize", new Dimension(0, Short.MAX_VALUE));<NEW_LINE>} else if ("Box.Filler.HorizontalStrut".equals(initializerId)) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "minimumSize", <MASK><NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "preferredSize", new Dimension(width, 0));<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "maximumSize", new Dimension(width, Short.MAX_VALUE));<NEW_LINE>} else if ("Box.Filler.VerticalStrut".equals(initializerId)) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "minimumSize", new Dimension(0, height));<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "preferredSize", new Dimension(0, height));<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "maximumSize", new Dimension(Short.MAX_VALUE, height));<NEW_LINE>} else if ("Box.Filler.RigidArea".equals(initializerId)) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "minimumSize", new Dimension(width, height));<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "preferredSize", new Dimension(width, height));<NEW_LINE>// NOI18N<NEW_LINE>setProperty(metaComp, "maximumSize", new Dimension(width, height));<NEW_LINE>}<NEW_LINE>}
new Dimension(width, 0));
871,335
private void renderTo(final N node, GraphRenderer graphRenderer, Collection<N> rendered, boolean lastChild) {<NEW_LINE>final boolean alreadySeen = !rendered.add(node);<NEW_LINE>graphRenderer.visit(new Action<StyledTextOutput>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void execute(StyledTextOutput output) {<NEW_LINE>nodeRenderer.renderTo(node, output);<NEW_LINE>if (alreadySeen) {<NEW_LINE>output.text(" (*)");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}, lastChild);<NEW_LINE>if (alreadySeen) {<NEW_LINE>omittedDetails = true;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<N> children = new ArrayList<N>();<NEW_LINE>graph.getNodeValues(node, new HashSet<Object>(), children);<NEW_LINE>if (children.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>graphRenderer.startChildren();<NEW_LINE>for (int i = 0; i < children.size(); i++) {<NEW_LINE>N <MASK><NEW_LINE>renderTo(child, graphRenderer, rendered, i == children.size() - 1);<NEW_LINE>}<NEW_LINE>graphRenderer.completeChildren();<NEW_LINE>}
child = children.get(i);
773,377
protected void initGoalState(ClusterModel clusterModel, OptimizationOptions optimizationOptions) throws OptimizationFailureException {<NEW_LINE>// While proposals exclude the excludedTopics, the existingUtilization still considers replicas of the excludedTopics.<NEW_LINE>for (Broker broker : clusterModel.aliveBrokers()) {<NEW_LINE>double existingUtilization = broker.load().expectedUtilizationFor(RESOURCE);<NEW_LINE>double allowedCapacity = broker.capacityFor(RESOURCE) * _balancingConstraint.capacityThreshold(RESOURCE);<NEW_LINE>if (allowedCapacity < existingUtilization) {<NEW_LINE>double requiredCapacity = existingUtilization / _balancingConstraint.capacityThreshold(RESOURCE);<NEW_LINE>ProvisionRecommendation recommendation = new ProvisionRecommendation.Builder(ProvisionStatus.UNDER_PROVISIONED).numBrokers(1).totalCapacity(requiredCapacity).build();<NEW_LINE>throw new OptimizationFailureException(String.format("[%s] Insufficient disk capacity at broker %d (Utilization %.2f, Allowed " + "Capacity %.2f).", name(), broker.id(), existingUtilization, allowedCapacity), recommendation);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<String> excludedTopics = optimizationOptions.excludedTopics();<NEW_LINE>// Sort all the replicas for each disk based on disk utilization.<NEW_LINE>new SortedReplicasHelper().addSelectionFunc(ReplicaSortFunctionFactory.selectOnlineReplicas()).maybeAddSelectionFunc(ReplicaSortFunctionFactory.selectReplicasBasedOnExcludedTopics(excludedTopics), !excludedTopics.isEmpty()).addPriorityFunc(ReplicaSortFunctionFactory.prioritizeDiskImmigrants()).setScoreFunc(ReplicaSortFunctionFactory.reverseSortByMetricGroupValue(RESOURCE.name())).trackSortedReplicasFor(replicaSortName(this<MASK><NEW_LINE>}
, true, false), clusterModel);
661,379
public void visit(OWLAnnotationPropertyRangeAxiom ax) {<NEW_LINE>OWLProperty prop = dup(ax.getProperty());<NEW_LINE>IRI range = dup(ax.getRange());<NEW_LINE>if (prop.isObjectPropertyExpression()) {<NEW_LINE>// turn to object property domain<NEW_LINE>OWLClassExpression d = df.getOWLClass(range);<NEW_LINE>LOGGER.warn("Annotation property range axiom turned to object property range after parsing. This could introduce errors if the original range was an anonymous expression: {} is the new domain.", range);<NEW_LINE>obj = df.getOWLObjectPropertyRangeAxiom(prop.asOWLObjectProperty(), d, asList<MASK><NEW_LINE>return;<NEW_LINE>} else if (prop.isDataPropertyExpression()) {<NEW_LINE>// turn to data property domain<NEW_LINE>OWLDataRange d = df.getOWLDatatype(range);<NEW_LINE>LOGGER.warn("Annotation property range axiom turned to data property range after parsing. This could introduce errors if the original range was an anonymous expression: {} is the new domain.", range);<NEW_LINE>obj = df.getOWLDataPropertyRangeAxiom(prop.asOWLDataProperty(), d, asList(ax.annotations()));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>obj = df.getOWLAnnotationPropertyRangeAxiom(prop.asOWLAnnotationProperty(), range, anns(ax));<NEW_LINE>}
(ax.annotations()));
1,288,385
public PageResult<Object> query(TermQuery term) {<NEW_LINE>List<Object> list = new ArrayList<>();<NEW_LINE>ModelVO model = modelDal.getModelById(term.getModelId());<NEW_LINE>String dateField = model.getReferenceDate();<NEW_LINE>Calendar beginTime = null;<NEW_LINE>Calendar endTime = null;<NEW_LINE>try {<NEW_LINE>beginTime = DateUtils.parse(term.getBeginTime(), "yyyy-MM-dd HH:mm:ss");<NEW_LINE>endTime = DateUtils.parse(term.getEndTime(), "yyyy-MM-dd HH:mm:ss");<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("error time format:{},{}", term.getBeginTime(), term.getEndTime());<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>QueryBuilder query = null;<NEW_LINE>String fieldName = term.getFieldName();<NEW_LINE>if (!StringUtils.isEmpty(fieldName)) {<NEW_LINE>query = QueryBuilders.termQuery(term.getFieldName(), term.getFieldValue());<NEW_LINE>}<NEW_LINE>RangeQueryBuilder filter = QueryBuilders.rangeQuery("fields." + dateField).from(beginTime.getTimeInMillis()).to(endTime.getTimeInMillis());<NEW_LINE>SearchHits hitsRet;<NEW_LINE>SearchHit[] hits;<NEW_LINE>PageResult<Object> pageResult = null;<NEW_LINE>try {<NEW_LINE>hitsRet = searchService.search(model.getGuid().toLowerCase(), query, filter, (term.getPageNo() - 1) * term.getPageSize(<MASK><NEW_LINE>hits = hitsRet.getHits();<NEW_LINE>for (SearchHit hit : hits) {<NEW_LINE>// String info = hit.sourceRef().toUtf8();<NEW_LINE>String info = hit.getSourceRef().utf8ToString();<NEW_LINE>list.add(JSONObject.parse(info));<NEW_LINE>}<NEW_LINE>pageResult = new PageResult<>(term.getPageNo(), term.getPageSize(), (int) hitsRet.getTotalHits().value, list);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("", e);<NEW_LINE>}<NEW_LINE>return pageResult;<NEW_LINE>}
), term.getPageSize());
456,533
final DescribeWorldTemplateResult executeDescribeWorldTemplate(DescribeWorldTemplateRequest describeWorldTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeWorldTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeWorldTemplateRequest> request = null;<NEW_LINE>Response<DescribeWorldTemplateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeWorldTemplateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeWorldTemplateRequest));<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, "RoboMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeWorldTemplate");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeWorldTemplateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><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>}
false), new DescribeWorldTemplateResultJsonUnmarshaller());
1,228,042
public void marshall(NetworkTelemetry networkTelemetry, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (networkTelemetry == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(networkTelemetry.getRegisteredGatewayArn(), REGISTEREDGATEWAYARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(networkTelemetry.getCoreNetworkId(), CORENETWORKID_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(networkTelemetry.getAccountId(), ACCOUNTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(networkTelemetry.getResourceType(), RESOURCETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(networkTelemetry.getResourceId(), RESOURCEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(networkTelemetry.getResourceArn(), RESOURCEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(networkTelemetry.getAddress(), ADDRESS_BINDING);<NEW_LINE>protocolMarshaller.marshall(networkTelemetry.getHealth(), HEALTH_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
networkTelemetry.getAwsRegion(), AWSREGION_BINDING);
1,156,428
protected void addPathStyles(byte evaluation) throws JRException {<NEW_LINE>styles = new HashMap<>();<NEW_LINE>if (pathStyleList != null) {<NEW_LINE>for (FillItemData styleData : pathStyleList) {<NEW_LINE>List<Map<String, Object>> currentStyleList = styleData.getEvaluateItems(evaluation);<NEW_LINE>if (currentStyleList != null && !currentStyleList.isEmpty()) {<NEW_LINE>for (Map<String, Object> currentStyle : currentStyleList) {<NEW_LINE>String styleName = (String) currentStyle.get(MapComponent.ITEM_PROPERTY_name);<NEW_LINE>if (styleName == null) {<NEW_LINE>throw new JRException(EXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUE_NOT_ALLOWED, new Object[] { MapComponent.ITEM_PROPERTY_name });<NEW_LINE>}<NEW_LINE>Map<String, Object> styleMap = null;<NEW_LINE>if (styles.containsKey(styleName)) {<NEW_LINE>styleMap = styles.get(styleName);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>styles.put(styleName, styleMap);<NEW_LINE>}<NEW_LINE>setStyle(currentStyle, styleMap);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
styleMap = new HashMap<>();
1,447,637
private void indentedXMLPrint(String indent, String pad, PrintWriter pw, boolean printScores) {<NEW_LINE>StringBuilder sb = new StringBuilder(indent);<NEW_LINE><MASK><NEW_LINE>Label label = label();<NEW_LINE>if (label != null) {<NEW_LINE>sb.append('<');<NEW_LINE>if (children.length > 0) {<NEW_LINE>sb.append("node value=\"");<NEW_LINE>} else {<NEW_LINE>sb.append("leaf value=\"");<NEW_LINE>}<NEW_LINE>sb.append(XMLUtils.escapeXML(SentenceUtils.wordToString(label, true)));<NEW_LINE>sb.append('"');<NEW_LINE>if (printScores) {<NEW_LINE>sb.append(" score=");<NEW_LINE>sb.append(score());<NEW_LINE>}<NEW_LINE>if (children.length > 0) {<NEW_LINE>sb.append('>');<NEW_LINE>} else {<NEW_LINE>sb.append("/>");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (children.length > 0) {<NEW_LINE>sb.append("<node>");<NEW_LINE>} else {<NEW_LINE>sb.append("<leaf/>");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>pw.println(sb);<NEW_LINE>if (children.length > 0) {<NEW_LINE>String newIndent = indent + pad;<NEW_LINE>for (Tree child : children) {<NEW_LINE>child.indentedXMLPrint(newIndent, pad, pw, printScores);<NEW_LINE>}<NEW_LINE>pw.println(indent + "</node>");<NEW_LINE>}<NEW_LINE>}
Tree[] children = children();
620,301
private void commitToOriginalInner() {<NEW_LINE>final <MASK><NEW_LINE>final Map<PsiLanguageInjectionHost, Set<Trinity<RangeMarker, RangeMarker, SmartPsiElementPointer>>> map = ContainerUtil.classify(myMarkers.iterator(), new Convertor<Trinity<RangeMarker, RangeMarker, SmartPsiElementPointer>, PsiLanguageInjectionHost>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public PsiLanguageInjectionHost convert(final Trinity<RangeMarker, RangeMarker, SmartPsiElementPointer> o) {<NEW_LINE>final PsiElement element = o.third.getElement();<NEW_LINE>return (PsiLanguageInjectionHost) element;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>PsiDocumentManager documentManager = PsiDocumentManager.getInstance(myProject);<NEW_LINE>// commit here and after each manipulator update<NEW_LINE>documentManager.commitDocument(myOrigDocument);<NEW_LINE>int localInsideFileCursor = 0;<NEW_LINE>for (PsiLanguageInjectionHost host : map.keySet()) {<NEW_LINE>if (host == null)<NEW_LINE>continue;<NEW_LINE>String hostText = host.getText();<NEW_LINE>ProperTextRange insideHost = null;<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (Trinity<RangeMarker, RangeMarker, SmartPsiElementPointer> entry : map.get(host)) {<NEW_LINE>// check for validity?<NEW_LINE>RangeMarker origMarker = entry.first;<NEW_LINE>int hostOffset = host.getTextRange().getStartOffset();<NEW_LINE>ProperTextRange localInsideHost = new ProperTextRange(origMarker.getStartOffset() - hostOffset, origMarker.getEndOffset() - hostOffset);<NEW_LINE>RangeMarker rangeMarker = entry.second;<NEW_LINE>ProperTextRange localInsideFile = new ProperTextRange(Math.max(localInsideFileCursor, rangeMarker.getStartOffset()), rangeMarker.getEndOffset());<NEW_LINE>if (insideHost != null) {<NEW_LINE>// append unchanged inter-markers fragment<NEW_LINE>sb.append(hostText.substring(insideHost.getEndOffset(), localInsideHost.getStartOffset()));<NEW_LINE>}<NEW_LINE>sb.append(localInsideFile.getEndOffset() <= text.length() && !localInsideFile.isEmpty() ? localInsideFile.substring(text) : "");<NEW_LINE>localInsideFileCursor = localInsideFile.getEndOffset();<NEW_LINE>insideHost = insideHost == null ? localInsideHost : insideHost.union(localInsideHost);<NEW_LINE>}<NEW_LINE>assert insideHost != null;<NEW_LINE>ElementManipulators.getManipulator(host).handleContentChange(host, insideHost, sb.toString());<NEW_LINE>documentManager.commitDocument(myOrigDocument);<NEW_LINE>}<NEW_LINE>}
String text = myNewDocument.getText();
1,594,123
private HttpResult handleClusterRequest(String clusterName, String fleetControllerPath) throws InterruptedException {<NEW_LINE>ContainerStatusPageServer statusServer = statusClusters.get(clusterName);<NEW_LINE>if (statusServer == null) {<NEW_LINE>return new HttpResult().setHttpCode(404, "No controller exists for cluster '" + clusterName + "'.");<NEW_LINE>}<NEW_LINE>if (fleetControllerPath == null || fleetControllerPath.isEmpty()) {<NEW_LINE>fleetControllerPath = "/";<NEW_LINE>}<NEW_LINE>StatusPageServer.HttpRequest req = new StatusPageServer.HttpRequest(fleetControllerPath);<NEW_LINE>req.setPathPrefix("/clustercontroller-status/v1");<NEW_LINE>StatusPageResponse <MASK><NEW_LINE>HttpResult result = new HttpResult();<NEW_LINE>if (response.getResponseCode() != null) {<NEW_LINE>result.setHttpCode(response.getResponseCode().getCode(), response.getResponseCode().getMessage());<NEW_LINE>}<NEW_LINE>if (response.getContentType() != null) {<NEW_LINE>result.addHeader("Content-Type", response.getContentType());<NEW_LINE>}<NEW_LINE>result.setContent(response.getOutputStream().toString(StandardCharsets.UTF_8));<NEW_LINE>return result;<NEW_LINE>}
response = statusServer.getStatus(req);
619,491
public Transaction refund(boolean partial, MerchantStore store, Transaction transaction, Order order, BigDecimal amount, IntegrationConfiguration configuration, IntegrationModule module) throws IntegrationException {<NEW_LINE>try {<NEW_LINE>Validate.notNull(transaction, "Transaction cannot be null");<NEW_LINE>Validate.notNull(transaction.getTransactionDetails().get("TRANSACTIONID"), "Transaction details must contain a TRANSACTIONID");<NEW_LINE>Validate.notNull(order, "Order must not be null");<NEW_LINE>Validate.notNull(order.getCurrency(), "Order nust contain Currency object");<NEW_LINE>String mode = "sandbox";<NEW_LINE>String env = configuration.getEnvironment();<NEW_LINE>if (Constants.PRODUCTION_ENVIRONMENT.equals(env)) {<NEW_LINE>mode = "production";<NEW_LINE>}<NEW_LINE>RefundTransactionRequestType refundTransactionRequest = new RefundTransactionRequestType();<NEW_LINE>refundTransactionRequest.setVersion("104.0");<NEW_LINE>RefundTransactionReq refundRequest = new RefundTransactionReq();<NEW_LINE>refundRequest.setRefundTransactionRequest(refundTransactionRequest);<NEW_LINE>Map<String, String> configurationMap = new HashMap<String, String>();<NEW_LINE>configurationMap.put("mode", mode);<NEW_LINE>configurationMap.put("acct1.UserName", configuration.getIntegrationKeys().get("username"));<NEW_LINE>configurationMap.put("acct1.Password", configuration.getIntegrationKeys().get("api"));<NEW_LINE>configurationMap.put("acct1.Signature", configuration.getIntegrationKeys().get("signature"));<NEW_LINE>PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(configurationMap);<NEW_LINE>RefundType refundType = RefundType.FULL;<NEW_LINE>if (partial) {<NEW_LINE>refundType = RefundType.PARTIAL;<NEW_LINE>}<NEW_LINE>refundTransactionRequest.setRefundType(refundType);<NEW_LINE>BasicAmountType refundAmount = new BasicAmountType();<NEW_LINE>refundAmount.setValue(pricingService<MASK><NEW_LINE>refundAmount.setCurrencyID(urn.ebay.apis.eBLBaseComponents.CurrencyCodeType.fromValue(order.getCurrency().getCode()));<NEW_LINE>refundTransactionRequest.setAmount(refundAmount);<NEW_LINE>refundTransactionRequest.setTransactionID(transaction.getTransactionDetails().get("TRANSACTIONID"));<NEW_LINE>RefundTransactionResponseType refundTransactionResponse = service.refundTransaction(refundRequest);<NEW_LINE>String refundAck = refundTransactionResponse.getAck().getValue();<NEW_LINE>if (!"Success".equals(refundAck)) {<NEW_LINE>LOGGER.error("Wrong value from transaction commit " + refundAck);<NEW_LINE>throw new IntegrationException(ServiceException.EXCEPTION_TRANSACTION_DECLINED, "Paypal refund transaction code [" + refundTransactionResponse.getErrors().get(0).getErrorCode() + "], message-> " + refundTransactionResponse.getErrors().get(0).getShortMessage());<NEW_LINE>}<NEW_LINE>Transaction newTransaction = new Transaction();<NEW_LINE>newTransaction.setAmount(amount);<NEW_LINE>newTransaction.setTransactionDate(new Date());<NEW_LINE>newTransaction.setTransactionType(TransactionType.REFUND);<NEW_LINE>newTransaction.setPaymentType(PaymentType.PAYPAL);<NEW_LINE>newTransaction.getTransactionDetails().put("TRANSACTIONID", refundTransactionResponse.getRefundTransactionID());<NEW_LINE>transaction.getTransactionDetails().put("CORRELATION", refundTransactionResponse.getCorrelationID());<NEW_LINE>return newTransaction;<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (e instanceof IntegrationException) {<NEW_LINE>throw (IntegrationException) e;<NEW_LINE>} else {<NEW_LINE>throw new IntegrationException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getStringAmount(amount, store));
1,228,026
protected void doSUICIDE() {<NEW_LINE>if (program.isStaticCall() && program.getActivations().isActive(RSKIP91)) {<NEW_LINE>throw <MASK><NEW_LINE>}<NEW_LINE>if (computeGas) {<NEW_LINE>gasCost = GasCost.SUICIDE;<NEW_LINE>DataWord suicideAddressWord = stack.get(stack.size() - 1);<NEW_LINE>if (!program.getStorage().isExist(new RskAddress(suicideAddressWord))) {<NEW_LINE>gasCost = GasCost.add(gasCost, GasCost.NEW_ACCT_SUICIDE);<NEW_LINE>}<NEW_LINE>spendOpCodeGas();<NEW_LINE>}<NEW_LINE>// EXECUTION PHASE<NEW_LINE>DataWord address = program.stackPop();<NEW_LINE>program.suicide(address);<NEW_LINE>if (isLogEnabled) {<NEW_LINE>hint = "address: " + ByteUtil.toHexString(program.getOwnerAddress().getLast20Bytes());<NEW_LINE>}<NEW_LINE>program.stop();<NEW_LINE>}
Program.ExceptionHelper.modificationException(program);
446,365
private static MPrintFormat copy(Properties ctx, int from_AD_PrintFormat_ID, int to_AD_PrintFormat_ID, int to_Client_ID) {<NEW_LINE>MClient company = MClient.get(ctx);<NEW_LINE>s_log.info("From AD_PrintFormat_ID=" + from_AD_PrintFormat_ID + <MASK><NEW_LINE>if (from_AD_PrintFormat_ID == 0)<NEW_LINE>throw new IllegalArgumentException("From_AD_PrintFormat_ID is 0");<NEW_LINE>//<NEW_LINE>MPrintFormat from = new MPrintFormat(ctx, from_AD_PrintFormat_ID, null);<NEW_LINE>// could be 0<NEW_LINE>MPrintFormat to = new MPrintFormat(ctx, to_AD_PrintFormat_ID, null);<NEW_LINE>MPrintFormat.copyValues(from, to);<NEW_LINE>// New<NEW_LINE>if (to_AD_PrintFormat_ID == 0) {<NEW_LINE>if (to_Client_ID < 0)<NEW_LINE>to_Client_ID = Env.getAD_Client_ID(ctx);<NEW_LINE>to.setClientOrg(to_Client_ID, 0);<NEW_LINE>}<NEW_LINE>// Set Name - Remove TEMPLATE<NEW_LINE>to.setName(company.getValue() + " -> " + Util.replace(to.getName(), "** TEMPLATE **", "").trim());<NEW_LINE>String sql = "SELECT count(*) from AD_PrintFormat WHERE AD_Client_ID = ? AND AD_Table_ID = ? AND Name = ?";<NEW_LINE>String suggestedName = to.getName();<NEW_LINE>int count = 0;<NEW_LINE>while (DB.getSQLValue(to.get_TrxName(), sql, to.getAD_Client_ID(), to.getAD_Table_ID(), suggestedName) > 0) {<NEW_LINE>count++;<NEW_LINE>suggestedName = to.getName() + " (" + count + ")";<NEW_LINE>}<NEW_LINE>to.setName(suggestedName);<NEW_LINE>//<NEW_LINE>to.saveEx();<NEW_LINE>// Copy Items<NEW_LINE>to.setItems(copyItems(from, to));<NEW_LINE>return to;<NEW_LINE>}
", To AD_PrintFormat_ID=" + to_AD_PrintFormat_ID + ", To Client_ID=" + to_Client_ID);
398,350
public static DescribeSQLLogFilesResponse unmarshall(DescribeSQLLogFilesResponse describeSQLLogFilesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSQLLogFilesResponse.setRequestId(_ctx.stringValue("DescribeSQLLogFilesResponse.RequestId"));<NEW_LINE>describeSQLLogFilesResponse.setTotalRecordCount(_ctx.integerValue("DescribeSQLLogFilesResponse.TotalRecordCount"));<NEW_LINE>describeSQLLogFilesResponse.setPageNumber(_ctx.integerValue("DescribeSQLLogFilesResponse.PageNumber"));<NEW_LINE>describeSQLLogFilesResponse.setPageRecordCount(_ctx.integerValue("DescribeSQLLogFilesResponse.PageRecordCount"));<NEW_LINE>List<LogFile> items <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSQLLogFilesResponse.Items.Length"); i++) {<NEW_LINE>LogFile logFile = new LogFile();<NEW_LINE>logFile.setFileID(_ctx.stringValue("DescribeSQLLogFilesResponse.Items[" + i + "].FileID"));<NEW_LINE>logFile.setLogStatus(_ctx.stringValue("DescribeSQLLogFilesResponse.Items[" + i + "].LogStatus"));<NEW_LINE>logFile.setLogDownloadURL(_ctx.stringValue("DescribeSQLLogFilesResponse.Items[" + i + "].LogDownloadURL"));<NEW_LINE>logFile.setLogSize(_ctx.stringValue("DescribeSQLLogFilesResponse.Items[" + i + "].LogSize"));<NEW_LINE>logFile.setLogStartTime(_ctx.stringValue("DescribeSQLLogFilesResponse.Items[" + i + "].LogStartTime"));<NEW_LINE>logFile.setLogEndTime(_ctx.stringValue("DescribeSQLLogFilesResponse.Items[" + i + "].LogEndTime"));<NEW_LINE>items.add(logFile);<NEW_LINE>}<NEW_LINE>describeSQLLogFilesResponse.setItems(items);<NEW_LINE>return describeSQLLogFilesResponse;<NEW_LINE>}
= new ArrayList<LogFile>();
1,666,515
public static void main(String[] args) {<NEW_LINE>Map mapBefore = new HashMap();<NEW_LINE>byte[] b = { 0, 1, 2 };<NEW_LINE>mapBefore.put("Hi", b);<NEW_LINE>String jsonByteArray = JSONUtils.encodeToJSON(mapBefore);<NEW_LINE>System.out.println(jsonByteArray);<NEW_LINE>Map mapAfter = JSONUtils.decodeJSON(jsonByteArray);<NEW_LINE>b = MapUtils.getMapByteArray(mapAfter, "Hi", null);<NEW_LINE>System.out.println(b.length);<NEW_LINE>for (int i = 0; i < b.length; i++) {<NEW_LINE>byte c = b[i];<NEW_LINE>System.out.println("--" + c);<NEW_LINE>}<NEW_LINE>Map map = new HashMap();<NEW_LINE>map.put("Test", "TestValue");<NEW_LINE>Map map2 = new HashMap();<NEW_LINE>map2.put("Test2", "test2value");<NEW_LINE>map.put("TestMap", map2);<NEW_LINE>List list = new ArrayList();<NEW_LINE>list.add(new Long(5));<NEW_LINE>list.add("five");<NEW_LINE><MASK><NEW_LINE>Map map3 = new HashMap();<NEW_LINE>map3.put("Test3", "test3value");<NEW_LINE>list.add(map3);<NEW_LINE>System.out.println(encodeToJSON(map));<NEW_LINE>System.out.println(encodeToJSON(list));<NEW_LINE>}
map2.put("ListTest", list);
620,462
private Settings readSettings() {<NEW_LINE>Path settingsFilePath = this.ballerinaUserHomeDirPath.resolve(ProjectConstants.SETTINGS_FILE_NAME);<NEW_LINE>if (Files.notExists(settingsFilePath)) {<NEW_LINE>try {<NEW_LINE>Files.createFile(settingsFilePath);<NEW_LINE>} catch (AccessDeniedException ae) {<NEW_LINE>throw new ProjectException("permission denied to create the file: " + ProjectConstants.SETTINGS_FILE_NAME + " in " + this.ballerinaUserHomeDirPath);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new ProjectException("failed to create file: " + ProjectConstants.SETTINGS_FILE_NAME + " in " + this.ballerinaUserHomeDirPath + " " + e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>TomlDocument settingsTomlDocument = TomlDocument.from(String.valueOf(settingsFilePath.getFileName()), Files.readString(settingsFilePath));<NEW_LINE>SettingsBuilder <MASK><NEW_LINE>return settingsBuilder.settings();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// Ignore 'Settings.toml' reading and parsing errors and return empty Settings object<NEW_LINE>return Settings.from();<NEW_LINE>}<NEW_LINE>}
settingsBuilder = SettingsBuilder.from(settingsTomlDocument);
1,172,329
private void writeTable(PrintWriter out, EObject eObject) {<NEW_LINE>out.println("<h1>" + eObject.eClass().getName() + "</h1>");<NEW_LINE>out.println("<table>");<NEW_LINE>for (EStructuralFeature eStructuralFeature : eObject.eClass().getEAllStructuralFeatures()) {<NEW_LINE>if (eStructuralFeature.getEAnnotation("hidden") == null) {<NEW_LINE>out.println("<tr>");<NEW_LINE>out.println("<td>" + eStructuralFeature.getName() + "</td>");<NEW_LINE>Object eGet = eObject.eGet(eStructuralFeature);<NEW_LINE>if (eStructuralFeature instanceof EAttribute) {<NEW_LINE>if (eStructuralFeature.getUpperBound() == 1) {<NEW_LINE>out.println("<td>" + eGet + "</td>");<NEW_LINE>} else {<NEW_LINE>List<Object> list = (List<Object>) eGet;<NEW_LINE>out.println("<td>");<NEW_LINE>for (Object object : list) {<NEW_LINE>out.println(object + " ");<NEW_LINE>}<NEW_LINE>out.println("</td>");<NEW_LINE>}<NEW_LINE>} else if (eStructuralFeature instanceof EReference) {<NEW_LINE>if (eStructuralFeature.getUpperBound() == 1) {<NEW_LINE>if (eStructuralFeature.getEType().getEAnnotation("wrapped") != null) {<NEW_LINE>EObject value = (EObject) eGet;<NEW_LINE>if (value != null) {<NEW_LINE>out.println("<td>" + value.eGet(value.eClass().getEStructuralFeature("wrappedValue")) + "</td>");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (eStructuralFeature.getEType().getEAnnotation("wrapped") != null) {<NEW_LINE>List<EObject> list <MASK><NEW_LINE>out.println("<td>");<NEW_LINE>for (EObject object : list) {<NEW_LINE>out.println("<td>" + object.eGet(object.eClass().getEStructuralFeature("wrappedValue")) + "</td>");<NEW_LINE>}<NEW_LINE>out.println("</td>");<NEW_LINE>} else {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>out.println("</tr>");<NEW_LINE>}<NEW_LINE>out.println("</table>");<NEW_LINE>}
= (List<EObject>) eGet;
1,151,375
private void createDefaultRule(String sgUuid, int ipVersion) {<NEW_LINE>List<SecurityGroupRuleVO> vos = new ArrayList<>();<NEW_LINE>SecurityGroupRuleVO ingressRuleVo = new SecurityGroupRuleVO();<NEW_LINE>ingressRuleVo.setUuid(Platform.getUuid());<NEW_LINE>ingressRuleVo.setIpVersion(ipVersion);<NEW_LINE>if (ipVersion == IPv6Constants.IPv4) {<NEW_LINE>ingressRuleVo.setAllowedCidr("0.0.0.0/0");<NEW_LINE>} else {<NEW_LINE>ingressRuleVo.setAllowedCidr("::/0");<NEW_LINE>}<NEW_LINE>ingressRuleVo.setEndPort(-1);<NEW_LINE>ingressRuleVo.setStartPort(-1);<NEW_LINE>ingressRuleVo.setProtocol(SecurityGroupRuleProtocolType.ALL);<NEW_LINE>ingressRuleVo.setType(SecurityGroupRuleType.Ingress);<NEW_LINE>ingressRuleVo.setSecurityGroupUuid(sgUuid);<NEW_LINE>ingressRuleVo.setRemoteSecurityGroupUuid(sgUuid);<NEW_LINE>vos.add(ingressRuleVo);<NEW_LINE>SecurityGroupRuleVO egressRuleVo = new SecurityGroupRuleVO();<NEW_LINE>egressRuleVo.<MASK><NEW_LINE>egressRuleVo.setIpVersion(ipVersion);<NEW_LINE>if (ipVersion == IPv6Constants.IPv4) {<NEW_LINE>egressRuleVo.setAllowedCidr("0.0.0.0/0");<NEW_LINE>} else {<NEW_LINE>egressRuleVo.setAllowedCidr("::/0");<NEW_LINE>}<NEW_LINE>egressRuleVo.setEndPort(-1);<NEW_LINE>egressRuleVo.setStartPort(-1);<NEW_LINE>egressRuleVo.setProtocol(SecurityGroupRuleProtocolType.ALL);<NEW_LINE>egressRuleVo.setType(SecurityGroupRuleType.Egress);<NEW_LINE>egressRuleVo.setSecurityGroupUuid(sgUuid);<NEW_LINE>egressRuleVo.setRemoteSecurityGroupUuid(sgUuid);<NEW_LINE>vos.add(egressRuleVo);<NEW_LINE>dbf.persistCollection(vos);<NEW_LINE>}
setUuid(Platform.getUuid());
1,571,119
private void paintDefaultButton(Graphics g, ActionButton c) {<NEW_LINE>int state = c.getPopState();<NEW_LINE>paintBackground(c, g, <MASK><NEW_LINE>if (!c.isWithoutBorder()) {<NEW_LINE>paintBorder(c, g, c.getSize(), state);<NEW_LINE>}<NEW_LINE>paintIcon(g, c, TargetAWT.to(c.getIcon()));<NEW_LINE>if (c.shallPaintDownArrow()) {<NEW_LINE>Container parent = c.getParent();<NEW_LINE>boolean horizontal = !(parent instanceof ActionToolbarImpl) || ((ActionToolbarImpl) parent).getOrientation() == ActionToolbar.HORIZONTAL_ORIENTATION;<NEW_LINE>int x = horizontal ? JBUIScale.scale(6) : JBUIScale.scale(5);<NEW_LINE>int y = horizontal ? JBUIScale.scale(5) : JBUIScale.scale(6);<NEW_LINE>Image image = c.isEnabled() ? AllIcons.General.Dropdown : ImageEffects.grayed(AllIcons.General.Dropdown);<NEW_LINE>TargetAWT.to(image).paintIcon(c, g, x, y);<NEW_LINE>}<NEW_LINE>}
c.getSize(), state);
923,439
private Mono<Response<ProductInner>> updateWithResponseAsync(String billingAccountName, String productName, ProductInner parameters) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (billingAccountName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (productName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter productName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (parameters == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>parameters.validate();<NEW_LINE>}<NEW_LINE>final String apiVersion = "2020-05-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), billingAccountName, productName, apiVersion, parameters, accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter billingAccountName is required and cannot be null."));
418,856
final DescribeSpotFleetRequestHistoryResult executeDescribeSpotFleetRequestHistory(DescribeSpotFleetRequestHistoryRequest describeSpotFleetRequestHistoryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeSpotFleetRequestHistoryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeSpotFleetRequestHistoryRequest> request = null;<NEW_LINE>Response<DescribeSpotFleetRequestHistoryResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeSpotFleetRequestHistoryRequestMarshaller().marshall(super.beforeMarshalling(describeSpotFleetRequestHistoryRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeSpotFleetRequestHistory");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeSpotFleetRequestHistoryResult> responseHandler = new StaxResponseHandler<DescribeSpotFleetRequestHistoryResult>(new DescribeSpotFleetRequestHistoryResultStaxUnmarshaller());<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.CLIENT_ENDPOINT, endpoint);
138,497
public static ByteBuffer fromByteArray(byte[] array, int offset, int length) {<NEW_LINE>ByteBuffer byteBuffer = new ByteBuffer();<NEW_LINE>if (isAllZeroes(array, offset, length)) {<NEW_LINE>// Special case: for all zeroes, it's definitely not an ObjectInputStream, because it has a<NEW_LINE>// non-zero mandatory magic. Zeroes have a portable, unambiguous interpretation.<NEW_LINE>byteBuffer.setDataSize(length);<NEW_LINE>byteBuffer.writeItem(new FakeEncodedItem(length, new byte[length]));<NEW_LINE>return byteBuffer;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>ByteArrayInputStream bis = new ByteArrayInputStream(array, offset, length);<NEW_LINE>ObjectInputStream ois = new ObjectInputStream(bis);<NEW_LINE>int numElements = ois.readInt();<NEW_LINE>for (int i = 0; i < numElements; i++) {<NEW_LINE><MASK><NEW_LINE>Object value = ois.readObject();<NEW_LINE>// NOTE: Bypassing writeValue so that this will support ShadowParcels that were<NEW_LINE>// marshalled before ShadowParcel simulated alignment.<NEW_LINE>byteBuffer.writeItem(new FakeEncodedItem(sizeOf, value));<NEW_LINE>}<NEW_LINE>// Android leaves the data position at the end in this case.<NEW_LINE>return byteBuffer;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new UnreliableBehaviorError("ShadowParcel unable to unmarshall its custom format", e);<NEW_LINE>}<NEW_LINE>}
int sizeOf = ois.readInt();
1,437,905
boolean mmapFile(final boolean create) {<NEW_LINE>if (this.buffer != null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>final File file = new File(this.path);<NEW_LINE>if (file.exists()) {<NEW_LINE>this.size = <MASK><NEW_LINE>} else {<NEW_LINE>if (!create) {<NEW_LINE>LOG.error("File {} is not exists.", this.path);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try (FileChannel fc = openFileChannel(create)) {<NEW_LINE>this.buffer = fc.map(MapMode.READ_WRITE, 0, this.size);<NEW_LINE>this.buffer.limit(this.size);<NEW_LINE>if (!loadHeader()) {<NEW_LINE>LOG.error("Fail to load segment header from file {}.", this.path);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} catch (final IOException e) {<NEW_LINE>LOG.error("Fail to mmap segment file {}.", this.path, e);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
(int) file.length();
518,365
public static void injectMethod(JavacNode typeNode, JCMethodDecl method) {<NEW_LINE>JCClassDecl type = (JCClassDecl) typeNode.get();<NEW_LINE>if (method.getName().contentEquals("<init>")) {<NEW_LINE>// Scan for default constructor, and remove it.<NEW_LINE>int idx = 0;<NEW_LINE>for (JCTree def : type.defs) {<NEW_LINE>if (def instanceof JCMethodDecl) {<NEW_LINE>if ((((JCMethodDecl) def).mods.flags & Flags.GENERATEDCONSTR) != 0) {<NEW_LINE>JavacNode tossMe = typeNode.getNodeFor(def);<NEW_LINE>if (tossMe != null)<NEW_LINE>tossMe.up().removeChild(tossMe);<NEW_LINE>type.defs = addAllButOne(type.defs, idx);<NEW_LINE>ClassSymbolMembersField.remove(type.sym, ((JCMethodDecl) def).sym);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>idx++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>addSuppressWarningsAll(method.mods, typeNode, typeNode.getNodeFor(getGeneratedBy(method)), typeNode.getContext());<NEW_LINE>addGenerated(method.mods, typeNode, typeNode.getNodeFor(getGeneratedBy(method)<MASK><NEW_LINE>type.defs = type.defs.append(method);<NEW_LINE>EnterReflect.memberEnter(method, typeNode);<NEW_LINE>typeNode.add(method, Kind.METHOD);<NEW_LINE>}
), typeNode.getContext());
762,049
private Cursor reorgLogicalColumnOrder(String schemaName, String tableName, Cursor cursor) {<NEW_LINE>ArrayResultCursor resultCursor = new ArrayResultCursor(tableName);<NEW_LINE>resultCursor.addColumn("Field", DataTypes.StringType);<NEW_LINE>resultCursor.addColumn("Type", DataTypes.StringType);<NEW_LINE>resultCursor.addColumn("Null", DataTypes.StringType);<NEW_LINE>resultCursor.addColumn("Key", DataTypes.StringType);<NEW_LINE>resultCursor.addColumn("Default", DataTypes.StringType);<NEW_LINE>resultCursor.addColumn("Extra", DataTypes.StringType);<NEW_LINE>resultCursor.initMeta();<NEW_LINE>List<Object[]> rows = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>Row row;<NEW_LINE>while ((row = cursor.next()) != null) {<NEW_LINE>rows.add(new Object[] { row.getString(0), row.getString(1), row.getString(2), row.getString(3), row.getString(4), row.getString(5) });<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (cursor != null) {<NEW_LINE>cursor.close(new ArrayList<>());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ResultSetHelper.reorgLogicalColumnOrder(<MASK><NEW_LINE>return resultCursor;<NEW_LINE>}
schemaName, tableName, rows, resultCursor);
1,090,546
public void run() {<NEW_LINE>boolean active = TimeHelper.sleepToNextMinute();<NEW_LINE>while (active) {<NEW_LINE>long current = System.currentTimeMillis();<NEW_LINE>Transaction t = Cat.newTransaction("AlertException", TimeHelper.getMinuteStr());<NEW_LINE>try {<NEW_LINE>TopMetric topMetric = buildTopMetric(new Date(current - TimeHelper.ONE_MINUTE - current % TimeHelper.ONE_MINUTE));<NEW_LINE>Collection<List<Item>> itemLists = topMetric.getError()<MASK><NEW_LINE>List<Item> itemList = new ArrayList<Item>();<NEW_LINE>if (!itemLists.isEmpty()) {<NEW_LINE>itemList = itemLists.iterator().next();<NEW_LINE>}<NEW_LINE>List<Item> items = new ArrayList<Item>();<NEW_LINE>for (Item item : itemList) {<NEW_LINE>if (!Constants.FRONT_END.equals(item.getDomain())) {<NEW_LINE>items.add(item);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>handleExceptions(items);<NEW_LINE>t.setStatus(Transaction.SUCCESS);<NEW_LINE>} catch (Exception e) {<NEW_LINE>t.setStatus(e);<NEW_LINE>} finally {<NEW_LINE>t.complete();<NEW_LINE>}<NEW_LINE>long duration = System.currentTimeMillis() - current;<NEW_LINE>try {<NEW_LINE>if (duration < DURATION) {<NEW_LINE>Thread.sleep(DURATION - duration);<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>active = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getResult().values();
337,905
private void processJarFile(String filename) {<NEW_LINE>File f = findJarFile(filename);<NEW_LINE>if (f == null) {<NEW_LINE>ErrorUtil.error("No such file: " + filename);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Warn if source debugging is specified for a jar file, since native debuggers<NEW_LINE>// don't support Java-like source paths.<NEW_LINE>if (options.emitLineDirectives() && options.isVerbose()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>GenerationUnit combinedUnit = null;<NEW_LINE>if (globalCombinedUnit != null) {<NEW_LINE>combinedUnit = globalCombinedUnit;<NEW_LINE>} else if (options.getHeaderMap().combineSourceJars()) {<NEW_LINE>combinedUnit = GenerationUnit.newCombinedJarUnit(filename, options);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>ZipFile zfile = new ZipFile(f);<NEW_LINE>try {<NEW_LINE>boolean containsJavaFile = false;<NEW_LINE>Enumeration<? extends ZipEntry> enumerator = zfile.entries();<NEW_LINE>File tempDir = FileUtil.createTempDir(J2OBJC_TEMP_DIR_PREFIX);<NEW_LINE>String tempDirPath = tempDir.getAbsolutePath();<NEW_LINE>options.fileUtil().addTempDir(tempDirPath);<NEW_LINE>options.fileUtil().appendSourcePath(tempDirPath);<NEW_LINE>while (enumerator.hasMoreElements()) {<NEW_LINE>ZipEntry entry = enumerator.nextElement();<NEW_LINE>String internalPath = entry.getName();<NEW_LINE>if (internalPath.endsWith(".java") || (options.translateClassfiles() && internalPath.endsWith(".class"))) {<NEW_LINE>// Extract JAR file to a temporary directory<NEW_LINE>File outputFile = options.fileUtil().extractZipEntry(tempDir, zfile, entry);<NEW_LINE>InputFile newFile = new RegularInputFile(outputFile.getAbsolutePath(), internalPath);<NEW_LINE>if (combinedUnit != null) {<NEW_LINE>inputs.add(new ProcessingContext(newFile, combinedUnit));<NEW_LINE>} else {<NEW_LINE>addExtractedJarSource(newFile, filename, internalPath);<NEW_LINE>}<NEW_LINE>containsJavaFile = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!options.translateClassfiles() && !containsJavaFile) {<NEW_LINE>ErrorUtil.warning(filename + " does not contain any Java source files.");<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>// Also closes input stream.<NEW_LINE>zfile.close();<NEW_LINE>}<NEW_LINE>} catch (ZipException e) {<NEW_LINE>// Also catches JarExceptions<NEW_LINE>logger.fine(e.getMessage());<NEW_LINE>ErrorUtil.error("Error reading file " + filename + " as a zip or jar file.");<NEW_LINE>} catch (IOException e) {<NEW_LINE>ErrorUtil.error(e.getMessage());<NEW_LINE>}<NEW_LINE>}
ErrorUtil.warning("source debugging of jar files is not supported: " + filename);
1,291,567
public Resource unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Resource resource = new Resource();<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 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("componentId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>resource.setComponentId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("dnsTargetResource", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>resource.setDnsTargetResource(DNSTargetResourceJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("readinessScopes", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>resource.setReadinessScopes(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("resourceArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>resource.setResourceArn(context.getUnmarshaller(String.<MASK><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 resource;<NEW_LINE>}
class).unmarshall(context));
448,660
private void addRadioOptionsToPopup(List<String> supported_options, final String title, final String preference_key, final String default_option, final String test_key, final RadioOptionsListener listener) {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "addOptionsToPopup: " + title);<NEW_LINE>if (supported_options != null) {<NEW_LINE>final CameraActivity main_activity = (CameraActivity) this.getContext();<NEW_LINE>addTitleToPopup(title);<NEW_LINE>RadioGroup rg = new RadioGroup(this.getContext());<NEW_LINE><MASK><NEW_LINE>this.popup_buttons.put(test_key, rg);<NEW_LINE>SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(main_activity);<NEW_LINE>String current_option = sharedPreferences.getString(preference_key, default_option);<NEW_LINE>for (final String supported_option : supported_options) {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "supported_option: " + supported_option);<NEW_LINE>// Button button = new Button(this);<NEW_LINE>RadioButton button = new RadioButton(this.getContext());<NEW_LINE>button.setText(supported_option);<NEW_LINE>button.setTextColor(Color.WHITE);<NEW_LINE>if (supported_option.equals(current_option)) {<NEW_LINE>button.setChecked(true);<NEW_LINE>} else {<NEW_LINE>button.setChecked(false);<NEW_LINE>}<NEW_LINE>// ll.addView(button);<NEW_LINE>rg.addView(button);<NEW_LINE>button.setContentDescription(supported_option);<NEW_LINE>button.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "clicked current_option: " + supported_option);<NEW_LINE>if (listener != null) {<NEW_LINE>listener.onClick(supported_option);<NEW_LINE>}<NEW_LINE>SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(main_activity);<NEW_LINE>SharedPreferences.Editor editor = sharedPreferences.edit();<NEW_LINE>editor.putString(preference_key, supported_option);<NEW_LINE>editor.apply();<NEW_LINE>main_activity.updateForSettings(title + ": " + supported_option);<NEW_LINE>main_activity.closePopup();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>this.popup_buttons.put(test_key + "_" + supported_option, button);<NEW_LINE>}<NEW_LINE>this.addView(rg);<NEW_LINE>}<NEW_LINE>}
rg.setOrientation(RadioGroup.VERTICAL);
1,056,115
private void writeWrappedOptions(boolean includeDefaultBindings, Element root) {<NEW_LINE>for (String optionName : valueMap.keySet()) {<NEW_LINE>Option option = valueMap.get(optionName);<NEW_LINE>if (includeDefaultBindings || !option.isDefault()) {<NEW_LINE>Object value = option.getCurrentValue();<NEW_LINE>if (isSupportedBySaveState(value)) {<NEW_LINE>// handled above<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>WrappedOption wrappedOption = wrapOption(option);<NEW_LINE>if (wrappedOption == null) {<NEW_LINE>// cannot write an option without a value to determine its type<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>Element elem = null;<NEW_LINE>if (value == null) {<NEW_LINE>// Handle the null case ourselves, not using the wrapped option (and when<NEW_LINE>// reading from xml) so the logic does not need to be in each wrapped option<NEW_LINE>elem = ss.saveToXml();<NEW_LINE>elem.addContent(new Element(CLEARED_VALUE_ELEMENT_NAME));<NEW_LINE>} else {<NEW_LINE>wrappedOption.writeState(ss);<NEW_LINE>elem = ss.saveToXml();<NEW_LINE>}<NEW_LINE>elem.setAttribute(NAME_ATTRIBUTE, optionName);<NEW_LINE>elem.setAttribute(CLASS_ATTRIBUTE, wrappedOption.getClass().getName());<NEW_LINE>root.addContent(elem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
SaveState ss = new SaveState(WRAPPED_OPTION_NAME);
1,234,601
private IBaseConformance createCapabilityStatement(RequestDetails theRequest, Object[] theMethodParams) {<NEW_LINE>IBaseConformance conf = (IBaseConformance) invokeServerMethod(theRequest, theMethodParams);<NEW_LINE>// Interceptor hook: SERVER_CAPABILITY_STATEMENT_GENERATED<NEW_LINE>if (theRequest.getInterceptorBroadcaster() != null) {<NEW_LINE>HookParams params = new HookParams();<NEW_LINE>params.<MASK><NEW_LINE>params.add(RequestDetails.class, theRequest);<NEW_LINE>params.addIfMatchesType(ServletRequestDetails.class, theRequest);<NEW_LINE>IBaseConformance outcome = (IBaseConformance) theRequest.getInterceptorBroadcaster().callHooksAndReturnObject(Pointcut.SERVER_CAPABILITY_STATEMENT_GENERATED, params);<NEW_LINE>if (outcome != null) {<NEW_LINE>conf = outcome;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (myCacheMillis > 0) {<NEW_LINE>myCachedResponse.set(conf);<NEW_LINE>myCachedResponseExpires.set(System.currentTimeMillis() + getCacheMillis());<NEW_LINE>}<NEW_LINE>return conf;<NEW_LINE>}
add(IBaseConformance.class, conf);
1,633,766
public Map<String, Object> populate(Map<String, Object> json, Map<String, Object> context) {<NEW_LINE>Long bankOrderLineId = (Long) json.get("id");<NEW_LINE>BankOrderLine bankOrderLine = find(bankOrderLineId);<NEW_LINE>String pieceReferenceList = "";<NEW_LINE>String pieceDateList = "";<NEW_LINE>String pieceDueDateList = "";<NEW_LINE>boolean bFirst = true;<NEW_LINE>for (BankOrderLineOrigin bankOrderLineOrigin : bankOrderLine.getBankOrderLineOriginList()) {<NEW_LINE>if (bFirst) {<NEW_LINE>pieceReferenceList += changeNullToEmptyString(bankOrderLineOrigin.getRelatedToSelectName());<NEW_LINE>pieceDateList += changeDateToString(bankOrderLineOrigin.getRelatedToSelectDate());<NEW_LINE>pieceDueDateList += <MASK><NEW_LINE>bFirst = false;<NEW_LINE>} else {<NEW_LINE>pieceReferenceList += "," + changeNullToEmptyString(bankOrderLineOrigin.getRelatedToSelectName());<NEW_LINE>pieceDateList += "," + changeDateToString(bankOrderLineOrigin.getRelatedToSelectDate());<NEW_LINE>pieceDueDateList += "," + changeDateToString(bankOrderLineOrigin.getRelatedToSelectDueDate());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>json.put("$pieceReferenceList", StringTool.cutTooLongString(pieceReferenceList));<NEW_LINE>json.put("$pieceDateList", StringTool.cutTooLongString(pieceDateList));<NEW_LINE>json.put("$pieceDueDateList", StringTool.cutTooLongString(pieceDueDateList));<NEW_LINE>return super.populate(json, context);<NEW_LINE>}
changeDateToString(bankOrderLineOrigin.getRelatedToSelectDueDate());
1,306,665
private List<File> filterChildren(File file) {<NEW_LINE>File[] fileArray = file.listFiles();<NEW_LINE>List<File> files = new ArrayList<>();<NEW_LINE>if (fileArray != null) {<NEW_LINE>for (int i = 0; i < fileArray.length; i++) {<NEW_LINE>File f = fileArray[i];<NEW_LINE>boolean filtered;<NEW_LINE>if (f.isDirectory()) {<NEW_LINE>filtered = false;<NEW_LINE>} else {<NEW_LINE>// If there is at least one filter, only accept the file if at least one filter accepts it<NEW_LINE>filtered <MASK><NEW_LINE>for (int j = 0; j < filters.size(); j++) {<NEW_LINE>if (filters.get(j).accept(f)) {<NEW_LINE>filtered = false;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!filtered)<NEW_LINE>files.add(f);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return files;<NEW_LINE>}
= filters.size() > 0;
604,357
public int compare(byte[] left, byte[] right) {<NEW_LINE>int stride = 8;<NEW_LINE>int minLength = Math.min(left.length, right.length);<NEW_LINE>int strideLimit = minLength & ~(stride - 1);<NEW_LINE>int i;<NEW_LINE>for (i = 0; i < strideLimit; i += stride) {<NEW_LINE>long lw = theUnsafe.getLong(left, BYTE_ARRAY_BASE_OFFSET + (long) i);<NEW_LINE>long rw = theUnsafe.getLong(right, BYTE_ARRAY_BASE_OFFSET + (long) i);<NEW_LINE>if (lw != rw) {<NEW_LINE>if (BIG_ENDIAN) {<NEW_LINE>return UnsignedLongs.compare(lw, rw);<NEW_LINE>}<NEW_LINE>int n = Long.numberOfTrailingZeros(lw ^ rw) & ~0x7;<NEW_LINE>return ((int) ((lw >>> n) & UNSIGNED_MASK)) - ((int) ((rw >>> n) & UNSIGNED_MASK));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// The epilogue to cover the last (minLength % stride) elements.<NEW_LINE>for (; i < minLength; i++) {<NEW_LINE>int result = UnsignedBytes.compare(left[<MASK><NEW_LINE>if (result != 0) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return left.length - right.length;<NEW_LINE>}
i], right[i]);
1,102,295
private void removeRemoteHardLink(RemoteTsFileResource resource) {<NEW_LINE><MASK><NEW_LINE>if (ClusterDescriptor.getInstance().getConfig().isUseAsyncServer()) {<NEW_LINE>AsyncDataClient client = (AsyncDataClient) dataGroupMember.getAsyncClient(sourceNode);<NEW_LINE>if (client != null) {<NEW_LINE>try {<NEW_LINE>client.removeHardLink(resource.getTsFile().getAbsolutePath(), new GenericHandler<>(sourceNode, null));<NEW_LINE>} catch (TException e) {<NEW_LINE>logger.error("Cannot remove hardlink {} from {}", resource.getTsFile().getAbsolutePath(), sourceNode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>SyncDataClient client = (SyncDataClient) dataGroupMember.getSyncClient(sourceNode);<NEW_LINE>if (client == null) {<NEW_LINE>logger.error("Cannot remove hardlink {} from {}, due to can not get client", resource.getTsFile().getAbsolutePath(), sourceNode);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>client.removeHardLink(resource.getTsFile().getAbsolutePath());<NEW_LINE>} catch (TException te) {<NEW_LINE>client.close();<NEW_LINE>logger.error("Cannot remove hardlink {} from {}", resource.getTsFile().getAbsolutePath(), sourceNode);<NEW_LINE>} finally {<NEW_LINE>client.returnSelf();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Node sourceNode = resource.getSource();
1,636,618
private void processInjectedAttributes(final int line, final int col) throws ParseException {<NEW_LINE>if (!this.parseSelection.isMatchingAny(INJECTION_LEVEL)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String[] selectors = <MASK><NEW_LINE>if (selectors == null || selectors.length == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (final String selector : selectors) {<NEW_LINE>final List<DecoupledInjectedAttribute> injectedAttributesForSelector = this.decoupledTemplateLogic.getInjectedAttributesForSelector(selector);<NEW_LINE>if (injectedAttributesForSelector == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>for (final DecoupledInjectedAttribute injectedAttribute : injectedAttributesForSelector) {<NEW_LINE>if (!this.lastWasInnerWhiteSpace) {<NEW_LINE>super.handleInnerWhiteSpace(INNER_WHITE_SPACE, 0, 1, line, col);<NEW_LINE>}<NEW_LINE>super.handleAttribute(injectedAttribute.buffer, injectedAttribute.nameOffset, injectedAttribute.nameLen, line, col, injectedAttribute.operatorOffset, injectedAttribute.operatorLen, line, col, injectedAttribute.valueContentOffset, injectedAttribute.valueContentLen, injectedAttribute.valueOuterOffset, injectedAttribute.valueOuterLen, line, col);<NEW_LINE>this.lastWasInnerWhiteSpace = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
this.parseSelection.getCurrentSelection(INJECTION_LEVEL);
1,834,556
public ApiResponse<List<InvoiceInfo>> billingGetInvoiceHeadersWithHttpInfo() throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/billing/invoices";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames <MASK><NEW_LINE>GenericType<List<InvoiceInfo>> localVarReturnType = new GenericType<List<InvoiceInfo>>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
= new String[] { "oauth2" };
1,353,469
public void gera(NoDeclaracaoMatriz matriz, PrintWriter saida, VisitanteASA visitor, int nivelEscopo, boolean podeInicializar) throws ExcecaoVisitaASA {<NEW_LINE>String nome = matriz.getNome();<NEW_LINE>String tipo = Utils.getNomeTipoJava(matriz.getTipoDado());<NEW_LINE>saida.format("%s %s[][]", tipo, nome);<NEW_LINE>if (podeInicializar || matriz.constante()) {<NEW_LINE>if (matriz.temInicializacao()) {<NEW_LINE>saida.append(" = ");<NEW_LINE>matriz.getInicializacao().aceitar(visitor);<NEW_LINE>} else {<NEW_LINE>NoExpressao numeroLinhas = matriz.getNumeroLinhas();<NEW_LINE><MASK><NEW_LINE>if (numeroLinhas != null && numeroColunas != null) {<NEW_LINE>saida.append(" = new ").append(tipo).append("[");<NEW_LINE>matriz.getNumeroLinhas().aceitar(visitor);<NEW_LINE>saida.append("][");<NEW_LINE>matriz.getNumeroColunas().aceitar(visitor);<NEW_LINE>saida.append("]");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
NoExpressao numeroColunas = matriz.getNumeroColunas();
623,893
public void init(Properties properties, String topic, String groupId) {<NEW_LINE>this.nameServer = <MASK><NEW_LINE>this.vhost = PropertiesUtils.getProperty(properties, "rabbitmq.virtual.host");<NEW_LINE>this.queueName = topic;<NEW_LINE>this.accessKey = PropertiesUtils.getProperty(properties, CanalConstants.CANAL_ALIYUN_ACCESS_KEY);<NEW_LINE>this.secretKey = PropertiesUtils.getProperty(properties, CanalConstants.CANAL_ALIYUN_SECRET_KEY);<NEW_LINE>this.username = PropertiesUtils.getProperty(properties, RabbitMQConstants.RABBITMQ_USERNAME);<NEW_LINE>this.password = PropertiesUtils.getProperty(properties, RabbitMQConstants.RABBITMQ_PASSWORD);<NEW_LINE>Long resourceOwnerIdPro = (Long) properties.get(RabbitMQConstants.RABBITMQ_RESOURCE_OWNERID);<NEW_LINE>if (resourceOwnerIdPro != null) {<NEW_LINE>this.resourceOwnerId = resourceOwnerIdPro;<NEW_LINE>}<NEW_LINE>this.flatMessage = (Boolean) properties.get(CanalConstants.CANAL_MQ_FLAT_MESSAGE);<NEW_LINE>this.messageBlockingQueue = new LinkedBlockingQueue<>(1024);<NEW_LINE>}
PropertiesUtils.getProperty(properties, "rabbitmq.host");
1,749,907
final StartPipelineExecutionResult executeStartPipelineExecution(StartPipelineExecutionRequest startPipelineExecutionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startPipelineExecutionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartPipelineExecutionRequest> request = null;<NEW_LINE>Response<StartPipelineExecutionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartPipelineExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startPipelineExecutionRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartPipelineExecution");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartPipelineExecutionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartPipelineExecutionResultJsonUnmarshaller());<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.SIGNING_REGION, getSigningRegion());
96,405
public synchronized void sendNotification(String title, String text) {<NEW_LINE>if (service == null || notificationManager == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>notificationManager.cancel(DEFAULT_NOTIFICATION_ID);<NEW_LINE>NotificationCompat.Builder builder = new NotificationCompat.Builder(service, ANDROID_CHANNEL_ID);<NEW_LINE>builder.setContentIntent(contentIntent).setOngoing(true).setSmallIcon(iconResource).setContentTitle(title).setContentText(text).setPriority(Notification.PRIORITY_MIN).setOnlyAlertOnce(true).setChannelId(ANDROID_CHANNEL_ID).setVisibility(NotificationCompat.VISIBILITY_PRIVATE);<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {<NEW_LINE>builder.setCategory(Notification.CATEGORY_SERVICE);<NEW_LINE>}<NEW_LINE>if (startTime != 0) {<NEW_LINE>builder.setWhen(startTime).setUsesChronometer(true);<NEW_LINE>}<NEW_LINE>Notification notification = builder.build();<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {<NEW_LINE>service.startForeground(DEFAULT_NOTIFICATION_ID, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
service.startForeground(DEFAULT_NOTIFICATION_ID, notification);
1,651,231
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE><MASK><NEW_LINE>getWindow().setFlags(LayoutParams.FLAG_KEEP_SCREEN_ON, LayoutParams.FLAG_KEEP_SCREEN_ON);<NEW_LINE>// The first seekbar controls the blink frequency.<NEW_LINE>final SeekBar freqSeekBar = findViewById(R.id.frequencySeekBar);<NEW_LINE>updateFrequency(freqSeekBar, freqSeekBar.getProgress());<NEW_LINE>freqSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStopTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStartTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {<NEW_LINE>updateFrequency(seekBar, progress);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// The second seekbar controls the fade time.<NEW_LINE>final SeekBar fadeSeekBar = findViewById(R.id.fadeSeekBar);<NEW_LINE>updateFade(fadeSeekBar, fadeSeekBar.getProgress());<NEW_LINE>fadeSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStopTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStartTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {<NEW_LINE>updateFade(seekBar, progress);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
setContentView(R.layout.main);
1,365,661
public Map<Integer, ParameterContext> buildParams() {<NEW_LINE>Map<Integer, ParameterContext> params = new HashMap<>(16);<NEW_LINE>int index = 0;<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setLong, this.planId);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.tableSchema);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.ddlStmt);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.state);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.ddlType);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setInt, this.progress);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setInt, this.retryCount);<NEW_LINE>MetaDbUtil.setParameter(++index, params, ParameterMethod.setString, this.result);<NEW_LINE>MetaDbUtil.setParameter(++index, params, <MASK><NEW_LINE>return params;<NEW_LINE>}
ParameterMethod.setString, this.extras);
1,582,203
public static <T> T asType(Mat mat, Class<T> cls) {<NEW_LINE>if (Mat.class.isAssignableFrom(cls))<NEW_LINE>return (T) mat;<NEW_LINE>if (BufferedImage.class.isAssignableFrom(cls))<NEW_LINE>return (T) OpenCVTools.matToBufferedImage(mat);<NEW_LINE>if (ImageProcessor.class.isAssignableFrom(cls)) {<NEW_LINE>if (mat.channels() == 3 && mat.depth() == opencv_core.CV_8U)<NEW_LINE>return (T) (new ColorProcessor(<MASK><NEW_LINE>return (T) OpenCVTools.matToImageProcessor(mat);<NEW_LINE>}<NEW_LINE>if (ImagePlus.class.isAssignableFrom(cls)) {<NEW_LINE>var imp = OpenCVTools.matToImagePlus(mat, null);<NEW_LINE>if (CompositeImage.class.isAssignableFrom(cls))<NEW_LINE>return (T) ensureComposite(imp);<NEW_LINE>return (T) imp;<NEW_LINE>}<NEW_LINE>if (double[].class.isAssignableFrom(cls))<NEW_LINE>return (T) OpenCVTools.extractDoubles(mat);<NEW_LINE>if (float[].class.isAssignableFrom(cls))<NEW_LINE>return (T) OpenCVTools.extractFloats(mat);<NEW_LINE>// mat.metaClass.asType(cls);<NEW_LINE>return null;<NEW_LINE>}
OpenCVTools.matToBufferedImage(mat)));
403,961
// -------//<NEW_LINE>// visit //<NEW_LINE>// -------//<NEW_LINE>@Override<NEW_LINE>public void visit(AbstractChordInter chord) {<NEW_LINE>// Draw chord ID & voice if any<NEW_LINE>if (!viewParams.isChordIdsPainting()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// For readability, we need a sufficient zoom ratio<NEW_LINE>final double zoom = g.getTransform().getScaleX();<NEW_LINE>if (zoom < constants.minZoomForChordId.getValue()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Font oldFont = g.getFont();<NEW_LINE>if (oldFont != chordFont) {<NEW_LINE>g.setFont(chordFont);<NEW_LINE>} else {<NEW_LINE>oldFont = null;<NEW_LINE>}<NEW_LINE>Color oldColor = g.getColor();<NEW_LINE>g.setColor(Colors.ANNOTATION_CHORD);<NEW_LINE>Rectangle box = chord.getBounds();<NEW_LINE>Point pt = new Point(box.x, box.y + (box.height / 2));<NEW_LINE>// Chord ID<NEW_LINE>String str = Integer.toString(chord.getId());<NEW_LINE>// Chord voice<NEW_LINE>if (constants.chordVoiceAppended.isSet()) {<NEW_LINE>Voice voice = chord.getVoice();<NEW_LINE>if (voice != null) {<NEW_LINE>str = str + (" v" + voice.getId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final double z = Math.max(0.5, zoom);<NEW_LINE>final AffineTransform at = AffineTransform.getScaleInstance(0.5 / z, 0.5 / z);<NEW_LINE>final TextLayout <MASK><NEW_LINE>paint(layout, pt, MIDDLE_LEFT);<NEW_LINE>g.setColor(oldColor);<NEW_LINE>if (oldFont != null) {<NEW_LINE>g.setFont(oldFont);<NEW_LINE>}<NEW_LINE>}
layout = basicLayout(str, at);
1,121,897
private void addMaps() {<NEW_LINE>addFactory(Map.class, map(HashMap::new));<NEW_LINE>addFactory(SortedMap.class, map(() -> new TreeMap<>(OBJECT_COMPARATOR)));<NEW_LINE>addFactory(NavigableMap.class, map(() -> new TreeMap<>(OBJECT_COMPARATOR)));<NEW_LINE>addFactory(ConcurrentNavigableMap.class, map(() -> new ConcurrentSkipListMap<>(OBJECT_COMPARATOR)));<NEW_LINE>addFactory(ConcurrentHashMap.class, map(ConcurrentHashMap::new));<NEW_LINE>addFactory(HashMap.class, map(HashMap::new));<NEW_LINE>addFactory(Hashtable.class, map(Hashtable::new));<NEW_LINE>addFactory(LinkedHashMap.class<MASK><NEW_LINE>addFactory(Properties.class, map(Properties::new));<NEW_LINE>addFactory(TreeMap.class, map(() -> new TreeMap<>(OBJECT_COMPARATOR)));<NEW_LINE>addFactory(WeakHashMap.class, map(WeakHashMap::new));<NEW_LINE>addFactory(EnumMap.class, new EnumMapFactory<>(EnumMap::new));<NEW_LINE>}
, map(LinkedHashMap::new));
1,164,283
public void execute(State state) throws WorkflowExecutionException {<NEW_LINE>TlsContext tlsContext = state.getTlsContext(getConnectionAlias());<NEW_LINE>LOGGER.info("Terminating Connection");<NEW_LINE>try {<NEW_LINE>tlsContext.getTransportHandler().closeClientConnection();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>LOGGER.debug("Could not close client connection", ex);<NEW_LINE>}<NEW_LINE>LOGGER.info("Resetting Cipher");<NEW_LINE>tlsContext.getRecordLayer().setRecordCipher(new RecordNullCipher(tlsContext));<NEW_LINE>tlsContext.getRecordLayer().updateDecryptionCipher();<NEW_LINE>tlsContext.getRecordLayer().updateEncryptionCipher();<NEW_LINE>LOGGER.info("Resetting SecureRenegotiation");<NEW_LINE>tlsContext.<MASK><NEW_LINE>tlsContext.setLastServerVerifyData(new byte[0]);<NEW_LINE>LOGGER.info("Resetting MessageDigest");<NEW_LINE>tlsContext.getDigest().reset();<NEW_LINE>LOGGER.info("Resetting ActiveKeySets");<NEW_LINE>tlsContext.setActiveClientKeySetType(Tls13KeySetType.NONE);<NEW_LINE>tlsContext.setActiveServerKeySetType(Tls13KeySetType.NONE);<NEW_LINE>tlsContext.setReadSequenceNumber(0);<NEW_LINE>tlsContext.setWriteSequenceNumber(0);<NEW_LINE>LOGGER.info("Resetting DTLS numbers and cookie");<NEW_LINE>tlsContext.setDtlsCookie(new byte[] {});<NEW_LINE>tlsContext.setDtlsReadHandshakeMessageSequence(0);<NEW_LINE>tlsContext.setDtlsWriteHandshakeMessageSequence(0);<NEW_LINE>tlsContext.setDtlsReceiveEpoch(0);<NEW_LINE>tlsContext.setDtlsWriteEpoch(0);<NEW_LINE>LOGGER.info("Reopening Connection");<NEW_LINE>try {<NEW_LINE>tlsContext.getTransportHandler().initialize();<NEW_LINE>asPlanned = true;<NEW_LINE>} catch (IOException ex) {<NEW_LINE>LOGGER.debug("Could not initialize TransportHandler", ex);<NEW_LINE>asPlanned = false;<NEW_LINE>}<NEW_LINE>setExecuted(true);<NEW_LINE>}
setLastClientVerifyData(new byte[0]);
119,980
public void renderForeground(PoseStack matrix, int mouseX, int mouseY) {<NEW_LINE>super.renderForeground(matrix, mouseX, mouseY);<NEW_LINE>FREQ frequency = frequencySelector.getFrequency();<NEW_LINE>if (frequency == null) {<NEW_LINE>MutableComponent noneComponent = MekanismLang.NONE.translateColored(EnumColor.DARK_RED);<NEW_LINE>drawString(matrix, MekanismLang.FREQUENCY.translate(noneComponent), 27, yStart + 67, titleTextColor());<NEW_LINE>drawString(matrix, MekanismLang.OWNER.translate(noneComponent), 27, yStart + 77, titleTextColor());<NEW_LINE>drawString(matrix, MekanismLang.SECURITY.translate(noneComponent), 27, yStart + 87, titleTextColor());<NEW_LINE>} else {<NEW_LINE>// Color the name the same as the subheading text color should be<NEW_LINE>MutableComponent name = TextComponentUtil.color(TextComponentUtil.getString(frequency.getName()), subheadingTextColor());<NEW_LINE>drawTextScaledBound(matrix, MekanismLang.FREQUENCY.translate(name), 27, yStart + 67, titleTextColor(<MASK><NEW_LINE>drawString(matrix, OwnerDisplay.of(Minecraft.getInstance().player, frequency.getOwner(), frequency.getClientOwner(), false).getTextComponent(), 27, yStart + 77, titleTextColor());<NEW_LINE>drawString(matrix, MekanismLang.SECURITY.translate(frequency.getSecurity()), 27, yStart + 87, titleTextColor());<NEW_LINE>}<NEW_LINE>drawTextScaledBound(matrix, MekanismLang.SET.translate(), 27, yStart + 100, titleTextColor(), 20);<NEW_LINE>}
), getGuiWidth() - 36);
604,932
private List<String> dynamicGroupSearch(DirContext ctx, String baseDN, String memberOfAttr, String filter, String target) {<NEW_LINE>List<String> groupList = new ArrayList<>();<NEW_LINE>String[] targets = new String[] { memberOfAttr };<NEW_LINE>try {<NEW_LINE>SearchControls searchControls = new SearchControls();<NEW_LINE>searchControls.setReturningAttributes(targets);<NEW_LINE>searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);<NEW_LINE>// Set this to false to avoid objects and hence exposing ldap object<NEW_LINE>// injection.<NEW_LINE>searchControls.setReturningObjFlag(false);<NEW_LINE>NamingEnumeration e = ctx.search(baseDN, filter, searchControls);<NEW_LINE>while (e.hasMore()) {<NEW_LINE>SearchResult res = (SearchResult) e.next();<NEW_LINE>Attribute isMemberOf = res.getAttributes().get(memberOfAttr);<NEW_LINE>if (isMemberOf != null) {<NEW_LINE>for (Enumeration values = isMemberOf.getAll(); values.hasMoreElements(); ) {<NEW_LINE>String groupDN = <MASK><NEW_LINE>LdapName dn = new LdapName(groupDN);<NEW_LINE>for (Rdn rdn : dn.getRdns()) {<NEW_LINE>if (rdn.getType().equalsIgnoreCase(target)) {<NEW_LINE>groupList.add(rdn.getValue().toString());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>_logger.log(WARNING, "ldaprealm.searcherror", filter);<NEW_LINE>_logger.log(WARNING, "security.exception", e);<NEW_LINE>}<NEW_LINE>return groupList;<NEW_LINE>}
(String) values.nextElement();
907,886
public byte[] decrypt(EncryptedData dataToDecrypt, KeyParameter key) {<NEW_LINE>checkNotNull(dataToDecrypt);<NEW_LINE>checkNotNull(key);<NEW_LINE>try {<NEW_LINE>ParametersWithIV keyWithIv = new ParametersWithIV(new KeyParameter(key.getKey()), dataToDecrypt.initialisationVector);<NEW_LINE>// Decrypt the message.<NEW_LINE>BufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESEngine()));<NEW_LINE>cipher.init(false, keyWithIv);<NEW_LINE>byte[] cipherBytes = dataToDecrypt.encryptedBytes;<NEW_LINE>byte[] decryptedBytes = new byte[cipher<MASK><NEW_LINE>final int length1 = cipher.processBytes(cipherBytes, 0, cipherBytes.length, decryptedBytes, 0);<NEW_LINE>final int length2 = cipher.doFinal(decryptedBytes, length1);<NEW_LINE>return Arrays.copyOf(decryptedBytes, length1 + length2);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new KeyCrypterException("Could not decrypt bytes", e);<NEW_LINE>}<NEW_LINE>}
.getOutputSize(cipherBytes.length)];
1,163,237
public void replaceDataTypes(long oldDataTypeID, long newDataTypeID) {<NEW_LINE>lock.acquire();<NEW_LINE>try {<NEW_LINE>RecordIterator it = adapter.iterateFunctionRecords();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>DBRecord rec = it.next();<NEW_LINE>if (thunkAdapter.getThunkRecord(rec.getKey()) != null) {<NEW_LINE>// skip thunks<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (rec.getLongValue(FunctionAdapter.RETURN_DATA_TYPE_ID_COL) == oldDataTypeID) {<NEW_LINE>rec.setLongValue(FunctionAdapter.RETURN_DATA_TYPE_ID_COL, newDataTypeID);<NEW_LINE>adapter.updateFunctionRecord(rec);<NEW_LINE>FunctionDB functionDB = cache.get(rec);<NEW_LINE>if (functionDB == null) {<NEW_LINE>functionDB = new FunctionDB(<MASK><NEW_LINE>}<NEW_LINE>functionChanged(functionDB, ChangeManager.FUNCTION_CHANGED_RETURN);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>dbError(e);<NEW_LINE>} finally {<NEW_LINE>cache.invalidate();<NEW_LINE>lock.release();<NEW_LINE>}<NEW_LINE>}
this, cache, addrMap, rec);
1,361,289
public void beginConstruction() {<NEW_LINE>this.createFixedTextLabel("MinimizedWindow.all_transfers", false, true);<NEW_LINE>this.createGap(40);<NEW_LINE>// Download speed.<NEW_LINE>Label dlab = this.createFixedTextLabel("ConfigView.download.abbreviated", false, false);<NEW_LINE>this.down_speed = this.createSpeedLabel();<NEW_LINE>final Menu downloadSpeedMenu = new Menu(getShell(), SWT.POP_UP);<NEW_LINE>downloadSpeedMenu.addListener(SWT.Show, new Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleEvent(Event event) {<NEW_LINE>if (CoreFactory.isCoreRunning()) {<NEW_LINE>SelectableSpeedMenu.generateMenuItems(downloadSpeedMenu, CoreFactory.getSingleton(), g_manager, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>dlab.setMenu(downloadSpeedMenu);<NEW_LINE>down_speed.setMenu(downloadSpeedMenu);<NEW_LINE>// Upload speed.<NEW_LINE>Label ulab = this.<MASK><NEW_LINE>this.up_speed = this.createSpeedLabel();<NEW_LINE>final Menu uploadSpeedMenu = new Menu(getShell(), SWT.POP_UP);<NEW_LINE>uploadSpeedMenu.addListener(SWT.Show, new Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleEvent(Event event) {<NEW_LINE>if (CoreFactory.isCoreRunning()) {<NEW_LINE>SelectableSpeedMenu.generateMenuItems(uploadSpeedMenu, CoreFactory.getSingleton(), g_manager, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>ulab.setMenu(uploadSpeedMenu);<NEW_LINE>up_speed.setMenu(uploadSpeedMenu);<NEW_LINE>// next eta<NEW_LINE>this.createFixedTextLabel("TableColumn.header.eta_next", true, false);<NEW_LINE>this.next_eta = this.createDataLabel(65);<NEW_LINE>// options icon area<NEW_LINE>if (COConfigurationManager.getBooleanParameter("Transfer Bar Show Icon Area")) {<NEW_LINE>icon_label = createFixedLabel(16);<NEW_LINE>}<NEW_LINE>}
createFixedTextLabel("ConfigView.upload.abbreviated", false, false);
1,618,702
private void notifyListeners(IJavaElementDelta deltaToNotify, int eventType, IElementChangedListener[] listeners, int[] listenerMask, int listenerCount) {<NEW_LINE>final ElementChangedEvent extraEvent = new ElementChangedEvent(deltaToNotify, eventType);<NEW_LINE>for (int i = 0; i < listenerCount; i++) {<NEW_LINE>if ((listenerMask[i] & eventType) != 0) {<NEW_LINE><MASK><NEW_LINE>long start = -1;<NEW_LINE>if (VERBOSE) {<NEW_LINE>// $NON-NLS-1$//$NON-NLS-2$<NEW_LINE>System.out.print("Listener #" + (i + 1) + "=" + listener.toString());<NEW_LINE>start = System.currentTimeMillis();<NEW_LINE>}<NEW_LINE>// wrap callbacks with Safe runnable for subsequent listeners to be called when some are causing grief<NEW_LINE>SafeRunner.run(new ISafeRunnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleException(Throwable exception) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Util.log(exception, "Exception occurred in listener of Java element change notification");<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() throws Exception {<NEW_LINE>PerformanceStats stats = null;<NEW_LINE>if (PERF) {<NEW_LINE>stats = PerformanceStats.getStats(JavaModelManager.DELTA_LISTENER_PERF, listener);<NEW_LINE>stats.startRun();<NEW_LINE>}<NEW_LINE>listener.elementChanged(extraEvent);<NEW_LINE>if (PERF) {<NEW_LINE>stats.endRun();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (VERBOSE) {<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>System.out.println(" -> " + (System.currentTimeMillis() - start) + "ms");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
final IElementChangedListener listener = listeners[i];
1,767,360
public static Map<String, Converter<Object, ?>> createDefaultClaimTypeConverters() {<NEW_LINE>Converter<Object, ?> booleanConverter = getConverter(TypeDescriptor.valueOf(Boolean.class));<NEW_LINE>Converter<Object, ?> instantConverter = getConverter(TypeDescriptor.valueOf(Instant.class));<NEW_LINE>Converter<Object, ?> urlConverter = getConverter(TypeDescriptor.valueOf(URL.class));<NEW_LINE>Converter<Object, ?> stringConverter = getConverter(TypeDescriptor.valueOf(String.class));<NEW_LINE>Converter<Object, ?> collectionStringConverter = getConverter(TypeDescriptor.collection(Collection.class, TypeDescriptor.valueOf(String.class)));<NEW_LINE>Map<String, Converter<Object, ?>> converters = new HashMap<>();<NEW_LINE>converters.put(IdTokenClaimNames.ISS, urlConverter);<NEW_LINE>converters.put(IdTokenClaimNames.AUD, collectionStringConverter);<NEW_LINE>converters.put(IdTokenClaimNames.NONCE, stringConverter);<NEW_LINE>converters.put(IdTokenClaimNames.EXP, instantConverter);<NEW_LINE>converters.put(IdTokenClaimNames.IAT, instantConverter);<NEW_LINE>converters.put(IdTokenClaimNames.AUTH_TIME, instantConverter);<NEW_LINE>converters.put(IdTokenClaimNames.AMR, collectionStringConverter);<NEW_LINE>converters.put(StandardClaimNames.EMAIL_VERIFIED, booleanConverter);<NEW_LINE>converters.<MASK><NEW_LINE>converters.put(StandardClaimNames.UPDATED_AT, instantConverter);<NEW_LINE>return converters;<NEW_LINE>}
put(StandardClaimNames.PHONE_NUMBER_VERIFIED, booleanConverter);
798,160
private void noteUnconditionallyDereferencedNullValue(Location thisLocation, Map<ValueNumber, SortedSet<Location>> bugLocations, Map<ValueNumber, NullValueUnconditionalDeref> nullValueGuaranteedDerefMap, UnconditionalValueDerefSet derefSet, IsNullValue isNullValue, ValueNumber valueNumber) {<NEW_LINE>if (DEBUG) {<NEW_LINE>System.out.println("%%% HIT for value number " + valueNumber + " @ " + thisLocation);<NEW_LINE>}<NEW_LINE>Set<Location> unconditionalDerefLocationSet = derefSet.getUnconditionalDerefLocationSet(valueNumber);<NEW_LINE>if (unconditionalDerefLocationSet.isEmpty()) {<NEW_LINE>AnalysisContext.logError("empty set of unconditionally dereferenced locations at " + thisLocation.getHandle().getPosition() + " in " + classContext.getClassDescriptor() + "." + method.getName() + method.getSignature());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// OK, we have a null value that is unconditionally<NEW_LINE>// derferenced. Make a note of the locations where it<NEW_LINE>// will be dereferenced.<NEW_LINE>NullValueUnconditionalDeref thisNullValueDeref = nullValueGuaranteedDerefMap.get(valueNumber);<NEW_LINE>if (thisNullValueDeref == null) {<NEW_LINE>thisNullValueDeref = new NullValueUnconditionalDeref();<NEW_LINE>nullValueGuaranteedDerefMap.put(valueNumber, thisNullValueDeref);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (thisLocation != null) {<NEW_LINE>SortedSet<Location> locationsForThisBug = bugLocations.computeIfAbsent(valueNumber, k -> new TreeSet<>());<NEW_LINE>locationsForThisBug.add(thisLocation);<NEW_LINE>}<NEW_LINE>}
thisNullValueDeref.add(isNullValue, unconditionalDerefLocationSet);
1,159,272
public static void main(String[] args) throws Exception {<NEW_LINE>CIFARClassifier cf = new CIFARClassifier();<NEW_LINE>Cifar10DataSetIterator cifar = new Cifar10DataSetIterator(batchSize, new int[] { height, width }, DataSetType.TRAIN, null, seed);<NEW_LINE>Cifar10DataSetIterator cifarEval = new Cifar10DataSetIterator(batchSize, new int[] { height, width }, DataSetType.TEST, null, seed);<NEW_LINE>// train model and eval model<NEW_LINE>MultiLayerNetwork model = cf.getModel();<NEW_LINE>UIServer uiServer = UIServer.getInstance();<NEW_LINE>StatsStorage statsStorage = new FileStatsStorage(new File(System.getProperty("java.io.tmpdir"), "ui-stats.dl4j"));<NEW_LINE>uiServer.attach(statsStorage);<NEW_LINE>model.setListeners(new StatsListener(statsStorage), new ScoreIterationListener(50), new EvaluativeListener(cifarEval<MASK><NEW_LINE>model.fit(cifar, epochs);<NEW_LINE>log.info("Saving model...");<NEW_LINE>model.save(new File(System.getProperty("java.io.tmpdir"), "cifarmodel.dl4j.zip"), true);<NEW_LINE>System.exit(0);<NEW_LINE>}
, 1, InvocationType.EPOCH_END));
1,480,604
public void visitDeclaration(SDeclaration userDeclarationNode, SemanticScope semanticScope) {<NEW_LINE><MASK><NEW_LINE>String symbol = userDeclarationNode.getSymbol();<NEW_LINE>if (scriptScope.getPainlessLookup().isValidCanonicalClassName(symbol)) {<NEW_LINE>throw userDeclarationNode.createError(new IllegalArgumentException("invalid declaration: type [" + symbol + "] cannot be a name"));<NEW_LINE>}<NEW_LINE>String canonicalTypeName = userDeclarationNode.getCanonicalTypeName();<NEW_LINE>Class<?> type = scriptScope.getPainlessLookup().canonicalTypeNameToType(canonicalTypeName);<NEW_LINE>if (type == null) {<NEW_LINE>throw userDeclarationNode.createError(new IllegalArgumentException("invalid declaration: cannot resolve type [" + canonicalTypeName + "]"));<NEW_LINE>}<NEW_LINE>AExpression userValueNode = userDeclarationNode.getValueNode();<NEW_LINE>if (userValueNode != null) {<NEW_LINE>semanticScope.setCondition(userValueNode, Read.class);<NEW_LINE>semanticScope.putDecoration(userValueNode, new TargetType(type));<NEW_LINE>checkedVisit(userValueNode, semanticScope);<NEW_LINE>decorateWithCast(userValueNode, semanticScope);<NEW_LINE>}<NEW_LINE>Location location = userDeclarationNode.getLocation();<NEW_LINE>Variable variable = semanticScope.defineVariable(location, type, symbol, false);<NEW_LINE>semanticScope.putDecoration(userDeclarationNode, new SemanticVariable(variable));<NEW_LINE>}
ScriptScope scriptScope = semanticScope.getScriptScope();
767,966
// hash code for a frozen node<NEW_LINE>private long hash(long node) throws IOException {<NEW_LINE>final int PRIME = 31;<NEW_LINE>// System.out.println("hash frozen node=" + node);<NEW_LINE>long h = 0;<NEW_LINE>fst.readFirstRealTargetArc(node, scratchArc, in);<NEW_LINE>while (true) {<NEW_LINE>// System.out.println(" label=" + scratchArc.label + " target=" + scratchArc.target + " h=" +<NEW_LINE>// h + " output=" + fst.outputs.outputToString(scratchArc.output) + " next?=" +<NEW_LINE>// scratchArc.flag(4) + " final?=" + scratchArc.isFinal() + " pos=" + in.getPosition());<NEW_LINE>h = PRIME <MASK><NEW_LINE>h = PRIME * h + (int) (scratchArc.target() ^ (scratchArc.target() >> 32));<NEW_LINE>h = PRIME * h + scratchArc.output().hashCode();<NEW_LINE>h = PRIME * h + scratchArc.nextFinalOutput().hashCode();<NEW_LINE>if (scratchArc.isFinal()) {<NEW_LINE>h += 17;<NEW_LINE>}<NEW_LINE>if (scratchArc.isLast()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>fst.readNextRealArc(scratchArc, in);<NEW_LINE>}<NEW_LINE>// System.out.println(" ret " + (h&Integer.MAX_VALUE));<NEW_LINE>return h & Long.MAX_VALUE;<NEW_LINE>}
* h + scratchArc.label();
739,659
protected void featuresCpCp2Cp3C(PaddedList<IN> cInfo, int loc, FeatureCollector out) {<NEW_LINE>out.setSuffix("CpCp2Cp3C");<NEW_LINE>CoreLabel p = cInfo.get(loc - 1);<NEW_LINE>if (flags.useTaggySequences) {<NEW_LINE>CoreLabel c = cInfo.get(loc);<NEW_LINE>CoreLabel p2 = cInfo.get(loc - 2);<NEW_LINE>CoreLabel p3 = cInfo.get(loc - 3);<NEW_LINE>if (flags.useTags) {<NEW_LINE>if (flags.maxLeft >= 3 && !flags.dontExtendTaggy) {<NEW_LINE>out.build().append(p3.getString(CoreAnnotations.PartOfSpeechAnnotation.class)).dash().append(p2.getString(CoreAnnotations.PartOfSpeechAnnotation.class)).dash().append(p.getString(CoreAnnotations.PartOfSpeechAnnotation.class)).dash().append(c.getString(CoreAnnotations.PartOfSpeechAnnotation.class)).append("-TTTS").add();<NEW_LINE>if (flags.useTaggySequencesShapeInteraction) {<NEW_LINE>out.build().append(p3.getString(CoreAnnotations.PartOfSpeechAnnotation.class)).dash().append(p2.getString(CoreAnnotations.PartOfSpeechAnnotation.class)).dash().append(p.getString(CoreAnnotations.PartOfSpeechAnnotation.class)).dash().append(c.getString(CoreAnnotations.PartOfSpeechAnnotation.class)).dash().append(c.get(CoreAnnotations.ShapeAnnotation.class)).append("-TTTS-CS").add();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (flags.useDistSim) {<NEW_LINE>if (flags.maxLeft >= 3 && !flags.dontExtendTaggy) {<NEW_LINE>out.build().append(p3.get(CoreAnnotations.DistSimAnnotation.class)).dash().append(p2.get(CoreAnnotations.DistSimAnnotation.class)).dash().append(p.get(CoreAnnotations.DistSimAnnotation.class)).dash().append(c.get(CoreAnnotations.DistSimAnnotation.class)).append("-DISTSIM_TTTS1").add();<NEW_LINE>if (flags.useTaggySequencesShapeInteraction) {<NEW_LINE>out.build().append(p3.get(CoreAnnotations.DistSimAnnotation.class)).dash().append(p2.get(CoreAnnotations.DistSimAnnotation.class)).dash().append(p.get(CoreAnnotations.DistSimAnnotation.class)).dash().append(c.get(CoreAnnotations.DistSimAnnotation.class)).dash().append(c.get(CoreAnnotations.ShapeAnnotation.class)).<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (flags.maxLeft >= 3) {<NEW_LINE>if (flags.useLongSequences) {<NEW_LINE>out.add("PPPSEQ");<NEW_LINE>}<NEW_LINE>if (flags.useBoundarySequences && getWord(p).equals(CoNLLDocumentReaderAndWriter.BOUNDARY)) {<NEW_LINE>out.add("BNDRY-SPAN-PPPSEQ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
append("-DISTSIM_TTTS1-CS").add();
1,750,371
public void headerFound(Concrete.Definition definition) {<NEW_LINE>myCurrentDefinitions = Collections.singletonList(definition.getData());<NEW_LINE><MASK><NEW_LINE>CountingErrorReporter countingErrorReporter = new CountingErrorReporter(myErrorReporter);<NEW_LINE>CheckTypeVisitor visitor = new CheckTypeVisitor(new LocalErrorReporter(definition.getData(), countingErrorReporter), null, myExtensionProvider.getArendExtension(definition.getData()));<NEW_LINE>visitor.setStatus(definition.getStatus().getTypecheckingStatus());<NEW_LINE>DesugarVisitor.desugar(definition, visitor.getErrorReporter());<NEW_LINE>Definition oldTypechecked = definition.getData().getTypechecked();<NEW_LINE>boolean isNew = oldTypechecked == null || oldTypechecked.status().needsTypeChecking();<NEW_LINE>Definition typechecked = new DefinitionTypechecker(visitor).typecheckHeader(oldTypechecked, new GlobalInstancePool(myInstanceProviderSet.get(definition.getData()), visitor), definition);<NEW_LINE>typechecked.setUniverseKind(UniverseKind.WITH_UNIVERSES);<NEW_LINE>if (typechecked.status() == Definition.TypeCheckingStatus.TYPE_CHECKING) {<NEW_LINE>mySuspensions.put(definition.getData(), new Pair<>(visitor, isNew));<NEW_LINE>}<NEW_LINE>typecheckingHeaderFinished(definition.getData(), typechecked);<NEW_LINE>myCurrentDefinitions = Collections.emptyList();<NEW_LINE>if (!typechecked.status().headerIsOK()) {<NEW_LINE>myHeadersAreOK = false;<NEW_LINE>}<NEW_LINE>}
typecheckingHeaderStarted(definition.getData());
845,811
protected void logConfig(EGLConfig config) {<NEW_LINE>EGL10 egl = (EGL10) EGLContext.getEGL();<NEW_LINE>EGLDisplay display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);<NEW_LINE>int r = getAttrib(egl, display, config, EGL10.EGL_RED_SIZE, 0);<NEW_LINE>int g = getAttrib(egl, display, config, EGL10.EGL_GREEN_SIZE, 0);<NEW_LINE>int b = getAttrib(egl, display, config, EGL10.EGL_BLUE_SIZE, 0);<NEW_LINE>int a = getAttrib(egl, display, config, EGL10.EGL_ALPHA_SIZE, 0);<NEW_LINE>int d = getAttrib(egl, display, config, EGL10.EGL_DEPTH_SIZE, 0);<NEW_LINE>int s = getAttrib(egl, display, config, EGL10.EGL_STENCIL_SIZE, 0);<NEW_LINE>int samples = Math.max(getAttrib(egl, display, config, EGL10.EGL_SAMPLES, 0), getAttrib(egl, display, config, GdxEglConfigChooser.EGL_COVERAGE_SAMPLES_NV, 0));<NEW_LINE>boolean coverageSample = getAttrib(egl, display, config, GdxEglConfigChooser.EGL_COVERAGE_SAMPLES_NV, 0) != 0;<NEW_LINE>Gdx.app.log(LOG_TAG, "framebuffer: (" + r + ", " + g + ", " + <MASK><NEW_LINE>Gdx.app.log(LOG_TAG, "depthbuffer: (" + d + ")");<NEW_LINE>Gdx.app.log(LOG_TAG, "stencilbuffer: (" + s + ")");<NEW_LINE>Gdx.app.log(LOG_TAG, "samples: (" + samples + ")");<NEW_LINE>Gdx.app.log(LOG_TAG, "coverage sampling: (" + coverageSample + ")");<NEW_LINE>bufferFormat = new BufferFormat(r, g, b, a, d, s, samples, coverageSample);<NEW_LINE>}
b + ", " + a + ")");
818,677
public void exitRoa_range(Roa_rangeContext ctx) {<NEW_LINE>Prefix prefix;<NEW_LINE>if (ctx.area_prefix != null) {<NEW_LINE>prefix = Prefix.parse(ctx.area_prefix.getText());<NEW_LINE>} else {<NEW_LINE>prefix = Prefix.create(toIp(ctx.area_ip), toIp(ctx.area_subnet));<NEW_LINE>}<NEW_LINE>boolean advertise = ctx.NOT_ADVERTISE() == null;<NEW_LINE>Long cost = ctx.cost == null ? <MASK><NEW_LINE>Map<Prefix, OspfAreaSummary> area = _currentOspfProcess.getSummaries().computeIfAbsent(_currentOspfArea, k -> new TreeMap<>());<NEW_LINE>area.put(prefix, new OspfAreaSummary(advertise ? SummaryRouteBehavior.ADVERTISE_AND_INSTALL_DISCARD : SummaryRouteBehavior.NOT_ADVERTISE_AND_NO_DISCARD, cost));<NEW_LINE>}
null : toLong(ctx.cost);
779,256
protected void callFileGen() {<NEW_LINE>String replace = "";<NEW_LINE>String imports = "";<NEW_LINE>for (Map<String, String> types : allFunctionTypes) {<NEW_LINE>// Base method<NEW_LINE>String method = "\n\tpublic {$TypeArgs} NodeFunc{$Args}To{$ReturnOnly}{$TypeArgs} put_{$a}_{$r}(" + "String name, {$ObjectClassArgs}IFunc{$Args}To{$ReturnOnly}{$TypeArgs} func) {";<NEW_LINE>method += "\n\t\treturn putFunction(name, new NodeFunc{$Args}To{$ReturnOnly}";<NEW_LINE>method.replace(" ", " ");<NEW_LINE>if (types.get("ObjectClassArgs").length() > 0) {<NEW_LINE>method += "<>";<NEW_LINE>}<NEW_LINE>method += "(name, {$ObjectClassArgsPass}func));";<NEW_LINE>method += "\n\t}\n";<NEW_LINE>// Variant with a string function<NEW_LINE>method += "\n\tpublic {$TypeArgs} NodeFunc{$Args}To{$ReturnOnly}{$TypeArgs} put_{$a}_{$r}(" + "String name, {$ObjectClassArgs}IFunc{$Args}To{$ReturnOnly}{$TypeArgs} func, {$StringFunction} stringFunction) {";<NEW_LINE>method += "\n\t\treturn putFunction(name, new NodeFunc{$Args}To{$ReturnOnly}";<NEW_LINE>method.replace(" ", " ");<NEW_LINE>if (types.get("ObjectClassArgs").length() > 0) {<NEW_LINE>method += "<>";<NEW_LINE>}<NEW_LINE>method += "({$ObjectClassArgsPass}func, stringFunction));";<NEW_LINE>method += "\n\t}\n";<NEW_LINE>// Imports<NEW_LINE><MASK><NEW_LINE>replace += method;<NEW_LINE>String importStart = "import buildcraft.lib.expression.node.func.NodeFunc";<NEW_LINE>imports += importStart + replaceAll("{$Args}To{$ReturnOnly};\n", types);<NEW_LINE>imports += importStart + replaceAll("{$Args}To{$ReturnOnly}.IFunc{$Args}To{$ReturnOnly};\n", types);<NEW_LINE>}<NEW_LINE>Map<String, String> map = new HashMap<>();<NEW_LINE>map.put("PutMethods", replace);<NEW_LINE>map.put("Imports", imports);<NEW_LINE>generateFile(PATH, map);<NEW_LINE>}
method = replaceAll(method, types);
719,015
public void execute() throws MojoExecutionException {<NEW_LINE>checkJibVersion();<NEW_LINE>if (MojoCommon.shouldSkipJibExecution(this)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO: move these shared checks with SyncMapTask into plugins-common<NEW_LINE>// add check that means this is only for jars<NEW_LINE>if (!"jar".equals(getProject().getPackaging())) {<NEW_LINE>throw new MojoExecutionException("Skaffold sync is currently only available for 'jar' style Jib projects, but the packaging of " + getProject().getArtifactId() + " is '" + getProject().getPackaging() + "'");<NEW_LINE>}<NEW_LINE>// add check for exploded containerization<NEW_LINE>try {<NEW_LINE>if (!ContainerizingMode.EXPLODED.equals(ContainerizingMode.from(getContainerizingMode()))) {<NEW_LINE>throw new MojoExecutionException("Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of " + getProject().getArtifactId() + " is '" + getContainerizingMode() + "'");<NEW_LINE>}<NEW_LINE>} catch (InvalidContainerizingModeException ex) {<NEW_LINE>throw new MojoExecutionException("Invalid containerizing mode", ex);<NEW_LINE>}<NEW_LINE>try (TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider()) {<NEW_LINE>MavenProjectProperties projectProperties = MavenProjectProperties.getForProject(Preconditions.checkNotNull(descriptor), getProject(), getSession(), getLog(), tempDirectoryProvider, getInjectedPluginExtensions());<NEW_LINE>MavenRawConfiguration configuration = new MavenRawConfiguration(this);<NEW_LINE>try {<NEW_LINE>String syncMapJson = PluginConfigurationProcessor.getSkaffoldSyncMap(configuration, projectProperties, skaffold.sync.excludes.stream().map(File::toPath).map(Path::toAbsolutePath).collect(Collectors.toSet()));<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("BEGIN JIB JSON: SYNCMAP/1");<NEW_LINE><MASK><NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new MojoExecutionException("Failed to generate a Jib file map for sync with Skaffold", ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
System.out.println(syncMapJson);
934,989
// field is an enum constant<NEW_LINE>public EnumConstantDeclaration convert(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration enumConstant) {<NEW_LINE>checkCanceled();<NEW_LINE>EnumConstantDeclaration enumConstantDeclaration = new EnumConstantDeclaration(this.ast);<NEW_LINE>final SimpleName typeName = new SimpleName(this.ast);<NEW_LINE>typeName.internalSetIdentifier(new String(enumConstant.name));<NEW_LINE>typeName.setSourceRange(enumConstant.sourceStart, enumConstant.sourceEnd - enumConstant.sourceStart + 1);<NEW_LINE>enumConstantDeclaration.setName(typeName);<NEW_LINE>int declarationSourceStart = enumConstant.declarationSourceStart;<NEW_LINE>int declarationSourceEnd = enumConstant.declarationSourceEnd;<NEW_LINE>final org.eclipse.jdt.internal.compiler.ast.Expression initialization = enumConstant.initialization;<NEW_LINE>if (initialization != null) {<NEW_LINE>if (initialization instanceof QualifiedAllocationExpression) {<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.TypeDeclaration anonymousType = ((QualifiedAllocationExpression) initialization).anonymousType;<NEW_LINE>if (anonymousType != null) {<NEW_LINE>AnonymousClassDeclaration anonymousClassDeclaration = new AnonymousClassDeclaration(this.ast);<NEW_LINE>int start = retrieveStartBlockPosition(anonymousType.sourceEnd, anonymousType.bodyEnd);<NEW_LINE>int end = retrieveRightBrace(anonymousType.bodyEnd + 1, declarationSourceEnd);<NEW_LINE>if (end == -1)<NEW_LINE>end = anonymousType.bodyEnd;<NEW_LINE>anonymousClassDeclaration.setSourceRange(start, end - start + 1);<NEW_LINE>enumConstantDeclaration.setAnonymousClassDeclaration(anonymousClassDeclaration);<NEW_LINE>buildBodyDeclarations(anonymousType, anonymousClassDeclaration);<NEW_LINE>if (this.resolveBindings) {<NEW_LINE>recordNodes(anonymousClassDeclaration, anonymousType);<NEW_LINE>anonymousClassDeclaration.resolveBinding();<NEW_LINE>}<NEW_LINE>enumConstantDeclaration.setSourceRange(<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>enumConstantDeclaration.setSourceRange(declarationSourceStart, declarationSourceEnd - declarationSourceStart + 1);<NEW_LINE>}<NEW_LINE>final org.eclipse.jdt.internal.compiler.ast.Expression[] arguments = ((org.eclipse.jdt.internal.compiler.ast.AllocationExpression) initialization).arguments;<NEW_LINE>if (arguments != null) {<NEW_LINE>for (int i = 0, max = arguments.length; i < max; i++) {<NEW_LINE>enumConstantDeclaration.arguments().add(convert(arguments[i]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>enumConstantDeclaration.setSourceRange(declarationSourceStart, declarationSourceEnd - declarationSourceStart + 1);<NEW_LINE>}<NEW_LINE>setModifiers(enumConstantDeclaration, enumConstant);<NEW_LINE>if (this.resolveBindings) {<NEW_LINE>recordNodes(enumConstantDeclaration, enumConstant);<NEW_LINE>recordNodes(typeName, enumConstant);<NEW_LINE>enumConstantDeclaration.resolveVariable();<NEW_LINE>}<NEW_LINE>convert(enumConstant.javadoc, enumConstantDeclaration);<NEW_LINE>return enumConstantDeclaration;<NEW_LINE>}
declarationSourceStart, end - declarationSourceStart + 1);
1,714,176
public static GetContactWhiteListResponse unmarshall(GetContactWhiteListResponse getContactWhiteListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getContactWhiteListResponse.setRequestId(_ctx.stringValue("GetContactWhiteListResponse.RequestId"));<NEW_LINE>getContactWhiteListResponse.setSuccess(_ctx.booleanValue("GetContactWhiteListResponse.Success"));<NEW_LINE>getContactWhiteListResponse.setCode(_ctx.stringValue("GetContactWhiteListResponse.Code"));<NEW_LINE>getContactWhiteListResponse.setMessage(_ctx.stringValue("GetContactWhiteListResponse.Message"));<NEW_LINE>getContactWhiteListResponse.setHttpStatusCode(_ctx.integerValue("GetContactWhiteListResponse.HttpStatusCode"));<NEW_LINE>ContactWhitelistList contactWhitelistList = new ContactWhitelistList();<NEW_LINE>contactWhitelistList.setPageSize(_ctx.integerValue("GetContactWhiteListResponse.ContactWhitelistList.PageSize"));<NEW_LINE>contactWhitelistList.setPageNumber(_ctx.integerValue("GetContactWhiteListResponse.ContactWhitelistList.PageNumber"));<NEW_LINE>contactWhitelistList.setTotalCount<MASK><NEW_LINE>List<ContactWhitelistList1> list = new ArrayList<ContactWhitelistList1>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetContactWhiteListResponse.ContactWhitelistList.List.Length"); i++) {<NEW_LINE>ContactWhitelistList1 contactWhitelistList1 = new ContactWhitelistList1();<NEW_LINE>contactWhitelistList1.setContactWhiteListId(_ctx.stringValue("GetContactWhiteListResponse.ContactWhitelistList.List[" + i + "].ContactWhiteListId"));<NEW_LINE>contactWhitelistList1.setInstanceId(_ctx.stringValue("GetContactWhiteListResponse.ContactWhitelistList.List[" + i + "].InstanceId"));<NEW_LINE>contactWhitelistList1.setCreationTime(_ctx.longValue("GetContactWhiteListResponse.ContactWhitelistList.List[" + i + "].CreationTime"));<NEW_LINE>contactWhitelistList1.setPhoneNumber(_ctx.stringValue("GetContactWhiteListResponse.ContactWhitelistList.List[" + i + "].PhoneNumber"));<NEW_LINE>contactWhitelistList1.setName(_ctx.stringValue("GetContactWhiteListResponse.ContactWhitelistList.List[" + i + "].Name"));<NEW_LINE>contactWhitelistList1.setCreator(_ctx.stringValue("GetContactWhiteListResponse.ContactWhitelistList.List[" + i + "].Creator"));<NEW_LINE>contactWhitelistList1.setOperator(_ctx.stringValue("GetContactWhiteListResponse.ContactWhitelistList.List[" + i + "].Operator"));<NEW_LINE>contactWhitelistList1.setRemark(_ctx.stringValue("GetContactWhiteListResponse.ContactWhitelistList.List[" + i + "].Remark"));<NEW_LINE>list.add(contactWhitelistList1);<NEW_LINE>}<NEW_LINE>contactWhitelistList.setList(list);<NEW_LINE>getContactWhiteListResponse.setContactWhitelistList(contactWhitelistList);<NEW_LINE>return getContactWhiteListResponse;<NEW_LINE>}
(_ctx.integerValue("GetContactWhiteListResponse.ContactWhitelistList.TotalCount"));
455,942
protected Bundle doInBackground(Bundle... params) {<NEW_LINE>Bundle result = new Bundle(params[0]);<NEW_LINE>ArrayList<String> friendIds = new ArrayList<String>();<NEW_LINE>String response;<NEW_LINE>try {<NEW_LINE>response = mOdnoklassniki.request("friends.get", null, "get");<NEW_LINE>Object json = new JSONTokener(response).nextValue();<NEW_LINE>if (json instanceof JSONObject) {<NEW_LINE>JSONObject jsonObject = new JSONObject(response);<NEW_LINE>if (jsonObject.has("error_code")) {<NEW_LINE>result.putString(RESULT_ERROR, jsonObject.toString());<NEW_LINE>result.putString(ERROR_CODE, jsonObject.getString("error_code"));<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>} else if (json instanceof JSONArray) {<NEW_LINE><MASK><NEW_LINE>int length = jsonArray.length();<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>friendIds.add(jsonArray.getString(i));<NEW_LINE>}<NEW_LINE>result.putStringArray(RESULT_GET_FRIENDS_ID, friendIds.toArray(new String[friendIds.size()]));<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>result.putString(RESULT_ERROR, e.getMessage());<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
JSONArray jsonArray = new JSONArray(response);
1,748,801
private void validate(APIRemoveHostRouteFromL3NetworkMsg msg) {<NEW_LINE>if (!NetworkUtils.isCidr(msg.getPrefix())) {<NEW_LINE>throw new ApiMessageInterceptionException(argerr("prefix [%s] is not a IPv4 network cidr", msg.getL3NetworkUuid()));<NEW_LINE>}<NEW_LINE>SimpleQuery<L3NetworkHostRouteVO> q = dbf.createQuery(L3NetworkHostRouteVO.class);<NEW_LINE>q.add(L3NetworkHostRouteVO_.l3NetworkUuid, Op.EQ, msg.getL3NetworkUuid());<NEW_LINE>q.add(L3NetworkHostRouteVO_.prefix, Op.<MASK><NEW_LINE>if (!q.isExists()) {<NEW_LINE>throw new ApiMessageInterceptionException(operr("there is no hostroute for prefix[%s] on L3 network[uuid:%s]", msg.getPrefix(), msg.getL3NetworkUuid()));<NEW_LINE>}<NEW_LINE>}
EQ, msg.getPrefix());
1,594,567
// TODO: only generate that are overrideable (javaproxyclass)<NEW_LINE>protected void defineInstanceMethods(Set<String> instanceMethods) {<NEW_LINE>Set<String> defined = new HashSet<>();<NEW_LINE>for (Map.Entry<String, DynamicMethod> methodEntry : getMethods().entrySet()) {<NEW_LINE>// TODO: explicitly included but not-yet defined methods?<NEW_LINE>final String id = methodEntry.getKey();<NEW_LINE>final String callid = jcc.renamedMethods.getOrDefault(id, id);<NEW_LINE>if (defined.contains(id) || jcc.getExcluded().contains(id))<NEW_LINE>continue;<NEW_LINE>// id we won't see again, and are only defining java methods named id<NEW_LINE>defined.add(callid);<NEW_LINE>DynamicMethod method = methodEntry.getValue();<NEW_LINE>// identity is fine as it's the default<NEW_LINE>if (id != callid)<NEW_LINE>method = searchMethod(callid);<NEW_LINE>final Signature arity = method.getSignature();<NEW_LINE>PositionAware position = getPositionOrDefault(methodEntry.getValue());<NEW_LINE>if (position.getLine() > 1)<NEW_LINE>cw.visitSource(position.getFile(), null);<NEW_LINE>// ruby side, use callid<NEW_LINE>Class<?>[] methodSignature = getMethodSignatures().get(callid);<NEW_LINE>// for concrete extension, see if the method is one we are overriding,<NEW_LINE>// even if we didn't specify it manually<NEW_LINE>if (methodSignature == null) {<NEW_LINE>// TODO: should inherited search for java mangledName?<NEW_LINE>for (Class<?>[] sig : searchInheritedSignatures(id, arity)) {<NEW_LINE>// id (vs callid) here as this is searching in java<NEW_LINE>String signature = defineInstanceMethod(id, <MASK><NEW_LINE>if (signature != null)<NEW_LINE>instanceMethods.add(signature);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String signature = defineInstanceMethod(id, callid, arity, position, methodSignature);<NEW_LINE>if (signature != null)<NEW_LINE>instanceMethods.add(signature);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
callid, arity, position, sig);
409,912
public void applyCredentialsFilter(OkHttpClient.Builder clientBuilder) {<NEW_LINE>clientBuilder.addInterceptor(new Interceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Response intercept(Chain chain) throws IOException {<NEW_LINE>Request originalRequest = chain.request();<NEW_LINE>HttpUrl url = chain.request().url();<NEW_LINE>Map<String, String> challengeMap = cache.getCachedChallenge(url);<NEW_LINE>Response response;<NEW_LINE>Pair<Request, HttpMessageSecurity> authenticatedRequestPair;<NEW_LINE>if (challengeMap != null) {<NEW_LINE>// challenge is cached, so there is no need to send an empty auth request.<NEW_LINE>authenticatedRequestPair = buildAuthenticatedRequest(originalRequest, challengeMap);<NEW_LINE>} else {<NEW_LINE>// challenge is new for the URL and is not cached,<NEW_LINE>// so the request is sent out to get the challenges in<NEW_LINE>// response<NEW_LINE>response = chain<MASK><NEW_LINE>if (response.code() != 401) {<NEW_LINE>return response;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>authenticatedRequestPair = buildAuthenticatedRequest(originalRequest, response);<NEW_LINE>} finally {<NEW_LINE>response.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>response = chain.proceed(authenticatedRequestPair.getLeft());<NEW_LINE>if (response.code() == 200) {<NEW_LINE>return authenticatedRequestPair.getRight().unprotectResponse(response);<NEW_LINE>} else {<NEW_LINE>return response;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.proceed(buildEmptyRequest(originalRequest));
400,706
public void marshall(InfrastructureConfigurationSummary infrastructureConfigurationSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (infrastructureConfigurationSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(infrastructureConfigurationSummary.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(infrastructureConfigurationSummary.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(infrastructureConfigurationSummary.getDateCreated(), DATECREATED_BINDING);<NEW_LINE>protocolMarshaller.marshall(infrastructureConfigurationSummary.getDateUpdated(), DATEUPDATED_BINDING);<NEW_LINE>protocolMarshaller.marshall(infrastructureConfigurationSummary.getResourceTags(), RESOURCETAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(infrastructureConfigurationSummary.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(infrastructureConfigurationSummary.getInstanceTypes(), INSTANCETYPES_BINDING);<NEW_LINE>protocolMarshaller.marshall(infrastructureConfigurationSummary.getInstanceProfileName(), INSTANCEPROFILENAME_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
infrastructureConfigurationSummary.getArn(), ARN_BINDING);