idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,462,606
public XContentBuilder toXContent(final XContentBuilder builder, final ToXContent.Params params) throws IOException {<NEW_LINE>assert Metadata.CONTEXT_MODE_SNAPSHOT.equals(params.param(Metadata.CONTEXT_MODE_PARAM)) : "use toXContentExternal() in external context";<NEW_LINE>builder.startObject(SNAPSHOT);<NEW_LINE>final SnapshotId snapshotId = snapshot.getSnapshotId();<NEW_LINE>builder.field(NAME, snapshotId.getName());<NEW_LINE>builder.field(UUID, snapshotId.getUUID());<NEW_LINE>assert version != null : "version must always be known when writing a snapshot metadata blob";<NEW_LINE>builder.field(VERSION_ID, version.id);<NEW_LINE>builder.startArray(INDICES);<NEW_LINE>for (String index : indices) {<NEW_LINE>builder.value(index);<NEW_LINE>}<NEW_LINE>builder.endArray();<NEW_LINE>builder.startArray(DATA_STREAMS);<NEW_LINE>for (String dataStream : dataStreams) {<NEW_LINE>builder.value(dataStream);<NEW_LINE>}<NEW_LINE>builder.endArray();<NEW_LINE>builder.field(STATE, state);<NEW_LINE>if (reason != null) {<NEW_LINE>builder.field(REASON, reason);<NEW_LINE>}<NEW_LINE>if (includeGlobalState != null) {<NEW_LINE>builder.field(INCLUDE_GLOBAL_STATE, includeGlobalState);<NEW_LINE>}<NEW_LINE>if (userMetadata != null) {<NEW_LINE>builder.field(USER_METADATA, userMetadata);<NEW_LINE>}<NEW_LINE>builder.field(START_TIME, startTime);<NEW_LINE>builder.field(END_TIME, endTime);<NEW_LINE>builder.field(TOTAL_SHARDS, totalShards);<NEW_LINE>builder.field(SUCCESSFUL_SHARDS, successfulShards);<NEW_LINE>builder.startArray(FAILURES);<NEW_LINE>for (SnapshotShardFailure shardFailure : shardFailures) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>builder.endArray();<NEW_LINE>builder.startArray(FEATURE_STATES);<NEW_LINE>for (SnapshotFeatureInfo snapshotFeatureInfo : featureStates) {<NEW_LINE>builder.value(snapshotFeatureInfo);<NEW_LINE>}<NEW_LINE>builder.endArray();<NEW_LINE>builder.startObject(INDEX_DETAILS);<NEW_LINE>for (Map.Entry<String, IndexSnapshotDetails> entry : indexSnapshotDetails.entrySet()) {<NEW_LINE>builder.field(entry.getKey());<NEW_LINE>entry.getValue().toXContent(builder, params);<NEW_LINE>}<NEW_LINE>builder.endObject();<NEW_LINE>builder.endObject();<NEW_LINE>return builder;<NEW_LINE>}
shardFailure.toXContent(builder, params);
638,601
public void start() {<NEW_LINE>if (current != null) {<NEW_LINE>current.show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Form hi = new Form("Hi World", new GridLayout(1, 2));<NEW_LINE>hi.setScrollable(false);<NEW_LINE>Container draggable = new Container(new FlowLayout()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void paint(Graphics g) {<NEW_LINE>super.paint(g);<NEW_LINE>g.setColor(0x0);<NEW_LINE>g.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL));<NEW_LINE>g.drawString("Draggable", 0, 0);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>draggable.getStyle().setBorder(Border.createLineBorder(1, 0xff0000));<NEW_LINE>draggable.setDraggable(true);<NEW_LINE>draggable.addDropListener(evt -> {<NEW_LINE>System.out.println("Dropped");<NEW_LINE>});<NEW_LINE>Container dropTarget = new Container(new FlowLayout()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void paint(Graphics g) {<NEW_LINE>super.paint(g);<NEW_LINE>g.setColor(0x0);<NEW_LINE>g.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL));<NEW_LINE>g.drawString("Drop Target", 0, 0);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>dropTarget.getStyle().setBorder(Border<MASK><NEW_LINE>dropTarget.setDropTarget(true);<NEW_LINE>dropTarget.add(new Label("DropTarget"));<NEW_LINE>hi.addAll(draggable, dropTarget);<NEW_LINE>hi.show();<NEW_LINE>}
.createLineBorder(1, 0x00ff00));
1,087,116
public List<Placement> resolve() {<NEW_LINE>if (entryViews == null || entryViews.isEmpty()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>columns = new ArrayList<>();<NEW_LINE>columns.add(new TimeBoundsColumn());<NEW_LINE>for (EntryViewBase<?> view : entryViews) {<NEW_LINE>boolean added = false;<NEW_LINE>// Try to add the activity to an existing column.<NEW_LINE>for (TimeBoundsColumn column : columns) {<NEW_LINE>if (column.hasRoomFor(view)) {<NEW_LINE>column.add(view);<NEW_LINE>added = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// No column found, create a new column.<NEW_LINE>if (!added) {<NEW_LINE>TimeBoundsColumn column = new TimeBoundsColumn();<NEW_LINE>columns.add(column);<NEW_LINE>column.add(view);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final List<Placement> <MASK><NEW_LINE>final int colCount = columns.size();<NEW_LINE>for (int col = 0; col < columns.size(); col++) {<NEW_LINE>TimeBoundsColumn column = columns.get(col);<NEW_LINE>for (EntryViewBase<?> view : column.getEntryViews()) {<NEW_LINE>placements.add(new Placement(view, col, colCount));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return placements;<NEW_LINE>}
placements = new ArrayList<>();
707,522
private void renderSection(Section section) {<NEW_LINE>contents.append("<div class=\"uk-accordion-content\">").append("<table class=\"uk-table uk-table-hover uk-table-divider uk-table-middle uk-table-small\">\n").append(" <thead>\n").append(" <tr>\n").append(" <th class=\"uk-table-shrink uk-width-auto uk-text-nowrap\">Module</th>\n").append(" <th class=\"uk-table-shrink uk-width-auto uk-text-nowrap\">Artifact</th>\n").append(" <th class=\"uk-table-shrink uk-width-expand\">Problem(s)</th>\n").append(" </tr>\n").append(" </thead>\n").append(" <tbody>\n");<NEW_LINE>section.errors.forEach(this::formatErrors);<NEW_LINE>contents.append(" </tbody>\n" <MASK><NEW_LINE>}
+ "</table>").append("</div>");
899,511
public Optional<A> act(PerceptStateReward<S> percept) {<NEW_LINE>S sPrime = percept.state();<NEW_LINE><MASK><NEW_LINE>// if TERMAINAL?(s') then Q[s',None] <- r'<NEW_LINE>if (isTerminal(sPrime)) {<NEW_LINE>Q.put(new Pair<>(sPrime, null), rPrime);<NEW_LINE>}<NEW_LINE>// if s is not null then<NEW_LINE>if (null != s) {<NEW_LINE>// increment N<sub>sa</sub>[s,a]<NEW_LINE>Pair<S, A> sa = new Pair<>(s, a);<NEW_LINE>Nsa.incrementFor(sa);<NEW_LINE>// Q[s,a] <- Q[s,a] + &alpha;(N<sub>sa</sub>[s,a])(r +<NEW_LINE>// &gamma;max<sub>a'</sub>Q[s',a'] - Q[s,a])<NEW_LINE>Double Q_sa = Q.get(sa);<NEW_LINE>if (null == Q_sa) {<NEW_LINE>Q_sa = 0.0;<NEW_LINE>}<NEW_LINE>Q.put(sa, Q_sa + alpha(Nsa, s, a) * (r + gamma * maxAPrime(sPrime) - Q_sa));<NEW_LINE>}<NEW_LINE>// if s'.TERMINAL? then s,a,r <- null else<NEW_LINE>// s,a,r <- s',argmax<sub>a'</sub>f(Q[s',a'],N<sub>sa</sub>[s',a']),r'<NEW_LINE>if (isTerminal(sPrime)) {<NEW_LINE>s = null;<NEW_LINE>a = null;<NEW_LINE>r = null;<NEW_LINE>} else {<NEW_LINE>s = sPrime;<NEW_LINE>a = argmaxAPrime(sPrime);<NEW_LINE>r = rPrime;<NEW_LINE>}<NEW_LINE>// return a<NEW_LINE>return Optional.ofNullable(a);<NEW_LINE>}
double rPrime = percept.reward();
1,058,270
void constructA678() {<NEW_LINE>final int N = X1.numRows;<NEW_LINE>// Pseudo-inverse of hat(p)<NEW_LINE>computePseudo(X1, P_plus);<NEW_LINE>DMatrixRMaj PPpXP = new DMatrixRMaj(1, 1);<NEW_LINE>DMatrixRMaj PPpYP = new DMatrixRMaj(1, 1);<NEW_LINE>computePPXP(X1, P_plus, X2, 0, PPpXP);<NEW_LINE>computePPXP(X1, P_plus, X2, 1, PPpYP);<NEW_LINE>DMatrixRMaj PPpX = new DMatrixRMaj(1, 1);<NEW_LINE>DMatrixRMaj PPpY <MASK><NEW_LINE>computePPpX(X1, P_plus, X2, 0, PPpX);<NEW_LINE>computePPpX(X1, P_plus, X2, 1, PPpY);<NEW_LINE>// ============ Equations 20<NEW_LINE>computeEq20(X2, X1, XP_bar);<NEW_LINE>// ============ Equation 21<NEW_LINE>A.reshape(N * 2, 3);<NEW_LINE>double XP_bar_x = XP_bar[0];<NEW_LINE>double XP_bar_y = XP_bar[1];<NEW_LINE>double YP_bar_x = XP_bar[2];<NEW_LINE>double YP_bar_y = XP_bar[3];<NEW_LINE>// Compute the top half of A<NEW_LINE>for (int i = 0, index = 0, indexA = 0; i < N; i++, index += 2) {<NEW_LINE>// X'<NEW_LINE>double x = -X2.data[i * 2];<NEW_LINE>// hat{P}[0]<NEW_LINE>double P_hat_x = X1.data[index];<NEW_LINE>// hat{P}[1]<NEW_LINE>double P_hat_y = X1.data[index + 1];<NEW_LINE>// x'*hat{p} - bar{X*P} - PPpXP<NEW_LINE>A.data[indexA++] = x * P_hat_x - XP_bar_x - PPpXP.data[index];<NEW_LINE>A.data[indexA++] = x * P_hat_y - XP_bar_y - PPpXP.data[index + 1];<NEW_LINE>// X'*1 - PPx1<NEW_LINE>A.data[indexA++] = x - PPpX.data[i];<NEW_LINE>}<NEW_LINE>// Compute the bottom half of A<NEW_LINE>for (int i = 0, index = 0, indexA = N * 3; i < N; i++, index += 2) {<NEW_LINE>double x = -X2.data[i * 2 + 1];<NEW_LINE>double P_hat_x = X1.data[index];<NEW_LINE>double P_hat_y = X1.data[index + 1];<NEW_LINE>// x'*hat{p} - bar{X*P} - PPpXP<NEW_LINE>A.data[indexA++] = x * P_hat_x - YP_bar_x - PPpYP.data[index];<NEW_LINE>A.data[indexA++] = x * P_hat_y - YP_bar_y - PPpYP.data[index + 1];<NEW_LINE>// X'*1 - PPx1<NEW_LINE>A.data[indexA++] = x - PPpY.data[i];<NEW_LINE>}<NEW_LINE>}
= new DMatrixRMaj(1, 1);
454,605
protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand2 = instruction.getOperands().get(1).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode shifter = instruction.getOperands().get(2).getRootNode();<NEW_LINE>final String targetRegister = (registerOperand1.getValue());<NEW_LINE>final String sourceRegister = (registerOperand2.getValue());<NEW_LINE>final OperandSize dw = OperandSize.DWORD;<NEW_LINE>long baseOffset = (instruction.getAddress().toLong() * 0x100) + instructions.size();<NEW_LINE>final String operand2 = environment.getNextVariableString();<NEW_LINE>final Pair<String, String> shifterPair = AddressingModeOneGenerator.generate(baseOffset, environment, instruction, instructions, shifter);<NEW_LINE>baseOffset = (instruction.getAddress().toLong() * 0x100) + instructions.size();<NEW_LINE>final String shifterOperand = shifterPair.first();<NEW_LINE>instructions.add(ReilHelpers.createAnd(baseOffset++, dw, shifterOperand, dw, String.valueOf(0x000000FFL), dw, operand2));<NEW_LINE>instructions.add(ReilHelpers.createAdd(baseOffset++, dw, sourceRegister, dw<MASK><NEW_LINE>}
, operand2, dw, targetRegister));
884,655
private static void putMacroblock(Picture tgt, Picture decoded, final int mbX, final int mbY) {<NEW_LINE>byte[] luma = tgt.getPlaneData(0);<NEW_LINE>int stride = tgt.getPlaneWidth(0);<NEW_LINE>byte[] cb = tgt.getPlaneData(1);<NEW_LINE>byte[] cr = tgt.getPlaneData(2);<NEW_LINE>int strideChroma = tgt.getPlaneWidth(1);<NEW_LINE>int dOff = 0;<NEW_LINE>final int mbx16 = mbX * 16;<NEW_LINE>final int mby16 = mbY * 16;<NEW_LINE>final byte[] decodedY = decoded.getPlaneData(0);<NEW_LINE>for (int i = 0; i < 16; i++) {<NEW_LINE>arraycopy(decodedY, dOff, luma, (mby16 + i<MASK><NEW_LINE>dOff += 16;<NEW_LINE>}<NEW_LINE>final int mbx8 = mbX * 8;<NEW_LINE>final int mby8 = mbY * 8;<NEW_LINE>final byte[] decodedCb = decoded.getPlaneData(1);<NEW_LINE>final byte[] decodedCr = decoded.getPlaneData(2);<NEW_LINE>for (int i = 0; i < 8; i++) {<NEW_LINE>int decodePos = i << 3;<NEW_LINE>int chromaPos = (mby8 + i) * strideChroma + mbx8;<NEW_LINE>arraycopy(decodedCb, decodePos, cb, chromaPos, 8);<NEW_LINE>arraycopy(decodedCr, decodePos, cr, chromaPos, 8);<NEW_LINE>}<NEW_LINE>}
) * stride + mbx16, 16);
587,534
final GetGeoMatchSetResult executeGetGeoMatchSet(GetGeoMatchSetRequest getGeoMatchSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getGeoMatchSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetGeoMatchSetRequest> request = null;<NEW_LINE>Response<GetGeoMatchSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetGeoMatchSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getGeoMatchSetRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WAF");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetGeoMatchSet");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetGeoMatchSetResult>> 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 GetGeoMatchSetResultJsonUnmarshaller());
1,284,810
public void run() throws IOException {<NEW_LINE>if (messages == null || messages.size() == 0) {<NEW_LINE>throw new RuntimeException("Need to specify a message");<NEW_LINE>}<NEW_LINE>getFileTypeFromFileName();<NEW_LINE>System.out.println(" File Name : " + fileName);<NEW_LINE>if (fileType.equals("pdf")) {<NEW_LINE>Objects.requireNonNull(unit);<NEW_LINE>System.out.println(" Document : PDF");<NEW_LINE>System.out.println(" paper : " + paperSize);<NEW_LINE>System.out.println(" info : " + !hideInfo);<NEW_LINE>System.out.println(" units : " + unit);<NEW_LINE>System.out.println(" marker width : " + markerWidth + " (" + unit.abbreviation + ")");<NEW_LINE>} else {<NEW_LINE>System.out.println(" Document : Image");<NEW_LINE>// System.out.println(" marker width : " + markerWidth + " (pixels)");<NEW_LINE>// System.out.println(" white border : " + spaceBetween + " (pixels)");<NEW_LINE>}<NEW_LINE>System.out.println();<NEW_LINE>List<QrCode> markers = new ArrayList<>();<NEW_LINE>for (String message : messages) {<NEW_LINE>QrCodeEncoder encoder = new QrCodeEncoder();<NEW_LINE>if (mask != null)<NEW_LINE>encoder.setMask(mask);<NEW_LINE>encoder.setError(error);<NEW_LINE>if (version > 0)<NEW_LINE>encoder.setVersion(version);<NEW_LINE>if (encoding != null) {<NEW_LINE>switch(encoding) {<NEW_LINE>case NUMERIC -><NEW_LINE>encoder.addNumeric(message);<NEW_LINE>case ALPHANUMERIC -><NEW_LINE>encoder.addAlphanumeric(message);<NEW_LINE>case BYTE -><NEW_LINE>encoder.addBytes(message);<NEW_LINE>case KANJI -><NEW_LINE>encoder.addKanji(message);<NEW_LINE>default -><NEW_LINE>throw new RuntimeException("Unknown mode");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>encoder.addAutomatic(message);<NEW_LINE>}<NEW_LINE>QrCode qr = encoder.fixate();<NEW_LINE>markers.add(qr);<NEW_LINE>System.out.println(" Message");<NEW_LINE>System.out.println(" length : " + qr.message.length());<NEW_LINE>System.out.println(" version : " + qr.version);<NEW_LINE>System.out.println(" encoding : " + qr.mode);<NEW_LINE>System.out.<MASK><NEW_LINE>}<NEW_LINE>switch(fileType) {<NEW_LINE>case "pdf" -><NEW_LINE>{<NEW_LINE>Objects.requireNonNull(unit);<NEW_LINE>CreateQrCodeDocumentPDF renderer = new CreateQrCodeDocumentPDF(fileName, paperSize, unit);<NEW_LINE>renderer.markerWidth = markerWidth;<NEW_LINE>renderer.spaceBetween = gridFill || markers.size() > 1 ? spaceBetween : 0.0f;<NEW_LINE>renderer.gridFill = gridFill;<NEW_LINE>renderer.drawGrid = drawGrid;<NEW_LINE>renderer.showInfo = !hideInfo;<NEW_LINE>renderer.render(markers);<NEW_LINE>if (sendToPrinter) {<NEW_LINE>renderer.sendToPrinter();<NEW_LINE>} else<NEW_LINE>renderer.saveToDisk();<NEW_LINE>}<NEW_LINE>default -><NEW_LINE>{<NEW_LINE>// TODO support the ability to specify how large the QR code is in pixels<NEW_LINE>CreateQrCodeDocumentImage renderer = new CreateQrCodeDocumentImage(fileName, 20);<NEW_LINE>// renderer.setWhiteBorder((int)spaceBetween);<NEW_LINE>// renderer.setMarkerWidth((int)markerWidth);<NEW_LINE>renderer.render(markers);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
println(" error : " + qr.error);
619,694
final GetRegexPatternSetResult executeGetRegexPatternSet(GetRegexPatternSetRequest getRegexPatternSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRegexPatternSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetRegexPatternSetRequest> request = null;<NEW_LINE>Response<GetRegexPatternSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetRegexPatternSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRegexPatternSetRequest));<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, "WAF Regional");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRegexPatternSet");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetRegexPatternSetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRegexPatternSetResultJsonUnmarshaller());<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());
844,030
public static ExploreTraceResponse unmarshall(ExploreTraceResponse exploreTraceResponse, UnmarshallerContext _ctx) {<NEW_LINE>exploreTraceResponse.setRequestId(_ctx.stringValue("ExploreTraceResponse.RequestId"));<NEW_LINE>List<SpanVO> spanVOs = new ArrayList<SpanVO>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ExploreTraceResponse.SpanVOs.Length"); i++) {<NEW_LINE>SpanVO spanVO = new SpanVO();<NEW_LINE>spanVO.setTraceId(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].TraceId"));<NEW_LINE>spanVO.setSpanId(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].SpanId"));<NEW_LINE>spanVO.setParentSpanId(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].ParentSpanId"));<NEW_LINE>spanVO.setStartTime(_ctx.longValue("ExploreTraceResponse.SpanVOs[" + i + "].StartTime"));<NEW_LINE>spanVO.setDuration(_ctx.longValue("ExploreTraceResponse.SpanVOs[" + i + "].Duration"));<NEW_LINE>spanVO.setKind(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].Kind"));<NEW_LINE>spanVO.setPid(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].Pid"));<NEW_LINE>spanVO.setServiceName(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].ServiceName"));<NEW_LINE>spanVO.setSpanName(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].SpanName"));<NEW_LINE>spanVO.setIp(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].Ip"));<NEW_LINE>spanVO.setHostname(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].Hostname"));<NEW_LINE>spanVO.setSampleIds(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].SampleIds"));<NEW_LINE>spanVO.setStatusCode(_ctx.integerValue("ExploreTraceResponse.SpanVOs[" + i + "].StatusCode"));<NEW_LINE>spanVO.setStatusMessage(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].StatusMessage"));<NEW_LINE>spanVO.setAttributes(_ctx.mapValue("ExploreTraceResponse.SpanVOs[" + i + "].Attributes"));<NEW_LINE>spanVO.setResource(_ctx.mapValue("ExploreTraceResponse.SpanVOs[" + i + "].Resource"));<NEW_LINE>spanVO.setEvents(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].Events"));<NEW_LINE>spanVO.setLinks(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].Links"));<NEW_LINE>spanVO.setHiddenAttributes(_ctx.mapValue("ExploreTraceResponse.SpanVOs[" + i + "].HiddenAttributes"));<NEW_LINE>spanVO.setMeta(_ctx.mapValue<MASK><NEW_LINE>List<String> children = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ExploreTraceResponse.SpanVOs[" + i + "].Children.Length"); j++) {<NEW_LINE>children.add(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].Children[" + j + "]"));<NEW_LINE>}<NEW_LINE>spanVO.setChildren(children);<NEW_LINE>List<String> labels = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ExploreTraceResponse.SpanVOs[" + i + "].Labels.Length"); j++) {<NEW_LINE>labels.add(_ctx.stringValue("ExploreTraceResponse.SpanVOs[" + i + "].Labels[" + j + "]"));<NEW_LINE>}<NEW_LINE>spanVO.setLabels(labels);<NEW_LINE>spanVOs.add(spanVO);<NEW_LINE>}<NEW_LINE>exploreTraceResponse.setSpanVOs(spanVOs);<NEW_LINE>return exploreTraceResponse;<NEW_LINE>}
("ExploreTraceResponse.SpanVOs[" + i + "].Meta"));
1,117,298
public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context) throws IOException {<NEW_LINE>LambdaLogger logger = context.getLogger();<NEW_LINE>BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("US-ASCII")));<NEW_LINE>PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream, Charset.forName("US-ASCII"))));<NEW_LINE>try {<NEW_LINE>HashMap event = gson.fromJson(reader, HashMap.class);<NEW_LINE>logger.log("STREAM TYPE: " + inputStream.<MASK><NEW_LINE>logger.log("EVENT TYPE: " + event.getClass().toString());<NEW_LINE>writer.write(gson.toJson(event));<NEW_LINE>if (writer.checkError()) {<NEW_LINE>logger.log("WARNING: Writer encountered an error.");<NEW_LINE>}<NEW_LINE>} catch (IllegalStateException | JsonSyntaxException exception) {<NEW_LINE>logger.log(exception.toString());<NEW_LINE>} finally {<NEW_LINE>reader.close();<NEW_LINE>writer.close();<NEW_LINE>}<NEW_LINE>}
getClass().toString());
978,625
public synchronized List<SingleAnalysis> analyze(Token token) {<NEW_LINE>SecondaryPos sPos = guessSecondaryPosType(token);<NEW_LINE>String word = token.getText();<NEW_LINE>// TODO: for now, for regular words and numbers etc, use the analyze method.<NEW_LINE>if (sPos == SecondaryPos.None) {<NEW_LINE>if (word.contains("?")) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>if (alphabet.containsDigit(word)) {<NEW_LINE>return tryNumeral(token);<NEW_LINE>} else {<NEW_LINE>return analyzeWord(word, word.contains(".") ? SecondaryPos.Abbreviation : SecondaryPos.ProperNoun);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (sPos == SecondaryPos.RomanNumeral) {<NEW_LINE>return getForRomanNumeral(token);<NEW_LINE>}<NEW_LINE>if (sPos == SecondaryPos.Date || sPos == SecondaryPos.Clock) {<NEW_LINE>return tryNumeral(token);<NEW_LINE>}<NEW_LINE>// TODO: consider returning analysis results without interfering with analyzer.<NEW_LINE>String normalized = nonLettersPattern.matcher(word).replaceAll("");<NEW_LINE>DictionaryItem item = new DictionaryItem(word, word, normalized, PrimaryPos.Noun, sPos);<NEW_LINE>if (sPos == SecondaryPos.HashTag || sPos == SecondaryPos.Email || sPos == SecondaryPos.Url || sPos == SecondaryPos.Mention) {<NEW_LINE>return analyzeWord(word, sPos);<NEW_LINE>}<NEW_LINE>boolean itemDoesNotExist = !lexicon.containsItem(item);<NEW_LINE>if (itemDoesNotExist) {<NEW_LINE>item.attributes.add(RootAttribute.Runtime);<NEW_LINE>analyzer.<MASK><NEW_LINE>}<NEW_LINE>List<SingleAnalysis> results = analyzer.analyze(word);<NEW_LINE>if (itemDoesNotExist) {<NEW_LINE>analyzer.getStemTransitions().removeDictionaryItem(item);<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
getStemTransitions().addDictionaryItem(item);
831,131
public static DescribeDomainQpsDataResponse unmarshall(DescribeDomainQpsDataResponse describeDomainQpsDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDomainQpsDataResponse.setRequestId(_ctx.stringValue("DescribeDomainQpsDataResponse.RequestId"));<NEW_LINE>describeDomainQpsDataResponse.setDomainName(_ctx.stringValue("DescribeDomainQpsDataResponse.DomainName"));<NEW_LINE>describeDomainQpsDataResponse.setStartTime(_ctx.stringValue("DescribeDomainQpsDataResponse.StartTime"));<NEW_LINE>describeDomainQpsDataResponse.setEndTime(_ctx.stringValue("DescribeDomainQpsDataResponse.EndTime"));<NEW_LINE>describeDomainQpsDataResponse.setDataInterval<MASK><NEW_LINE>List<DataModule> qpsDataInterval = new ArrayList<DataModule>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDomainQpsDataResponse.QpsDataInterval.Length"); i++) {<NEW_LINE>DataModule dataModule = new DataModule();<NEW_LINE>dataModule.setTimeStamp(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].TimeStamp"));<NEW_LINE>dataModule.setValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].Value"));<NEW_LINE>dataModule.setDomesticValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].DomesticValue"));<NEW_LINE>dataModule.setOverseasValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].OverseasValue"));<NEW_LINE>dataModule.setAccValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].AccValue"));<NEW_LINE>dataModule.setAccDomesticValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].AccDomesticValue"));<NEW_LINE>dataModule.setAccOverseasValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].AccOverseasValue"));<NEW_LINE>dataModule.setDynamicValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].DynamicValue"));<NEW_LINE>dataModule.setDynamicDomesticValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].DynamicDomesticValue"));<NEW_LINE>dataModule.setDynamicOverseasValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].DynamicOverseasValue"));<NEW_LINE>dataModule.setStaticValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].StaticValue"));<NEW_LINE>dataModule.setStaticDomesticValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].StaticDomesticValue"));<NEW_LINE>dataModule.setStaticOverseasValue(_ctx.stringValue("DescribeDomainQpsDataResponse.QpsDataInterval[" + i + "].StaticOverseasValue"));<NEW_LINE>qpsDataInterval.add(dataModule);<NEW_LINE>}<NEW_LINE>describeDomainQpsDataResponse.setQpsDataInterval(qpsDataInterval);<NEW_LINE>return describeDomainQpsDataResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeDomainQpsDataResponse.DataInterval"));
364,474
public void writeToParcel(Parcel parcel, int i) {<NEW_LINE>parcel.writeString(id);<NEW_LINE>parcel.writeString(fullName);<NEW_LINE>parcel.writeString(subredditName);<NEW_LINE>parcel.writeString(subredditNamePrefixed);<NEW_LINE>parcel.writeString(subredditIconUrl);<NEW_LINE>parcel.writeString(author);<NEW_LINE>parcel.writeString(authorNamePrefixed);<NEW_LINE>parcel.writeString(authorFlair);<NEW_LINE>parcel.writeString(authorFlairHTML);<NEW_LINE>parcel.writeString(authorIconUrl);<NEW_LINE>parcel.writeLong(postTimeMillis);<NEW_LINE>parcel.writeString(title);<NEW_LINE>parcel.writeString(selfText);<NEW_LINE>parcel.writeString(selfTextPlain);<NEW_LINE>parcel.writeString(selfTextPlainTrimmed);<NEW_LINE>parcel.writeString(url);<NEW_LINE>parcel.writeString(videoUrl);<NEW_LINE>parcel.writeString(videoDownloadUrl);<NEW_LINE>parcel.writeString(gfycatId);<NEW_LINE>parcel.writeString(streamableShortCode);<NEW_LINE>parcel.writeByte((byte) (isImgur ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) <MASK><NEW_LINE>parcel.writeByte((byte) (isRedgifs ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (isStreamable ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (loadGfyOrStreamableVideoSuccess ? 1 : 0));<NEW_LINE>parcel.writeString(permalink);<NEW_LINE>parcel.writeString(flair);<NEW_LINE>parcel.writeString(awards);<NEW_LINE>parcel.writeInt(nAwards);<NEW_LINE>parcel.writeInt(score);<NEW_LINE>parcel.writeInt(postType);<NEW_LINE>parcel.writeInt(voteType);<NEW_LINE>parcel.writeInt(nComments);<NEW_LINE>parcel.writeInt(upvoteRatio);<NEW_LINE>parcel.writeByte((byte) (hidden ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (spoiler ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (nsfw ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (stickied ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (archived ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (locked ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (saved ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (isCrosspost ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (isRead ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (isHiddenInRecyclerView ? 1 : 0));<NEW_LINE>parcel.writeByte((byte) (isHiddenManuallyByUser ? 1 : 0));<NEW_LINE>parcel.writeString(crosspostParentId);<NEW_LINE>parcel.writeTypedList(previews);<NEW_LINE>parcel.writeTypedList(gallery);<NEW_LINE>}
(isGfycat ? 1 : 0));
1,676,026
public Map<String, Object> changeAssetMenuOrder(final String inode, final int newValue) throws ActionException, DotDataException {<NEW_LINE>HttpServletRequest req = WebContextFactory.get().getHttpServletRequest();<NEW_LINE>User user = null;<NEW_LINE>try {<NEW_LINE>user = com.liferay.portal.util.PortalUtil.getUser(req);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.error(this, "Error trying to obtain the current liferay user from the request.", e);<NEW_LINE>throw new DotRuntimeException("Error trying to obtain the current liferay user from the request.");<NEW_LINE>}<NEW_LINE>final Map<String, Object> <MASK><NEW_LINE>Folder folder = null;<NEW_LINE>try {<NEW_LINE>folder = APILocator.getFolderAPI().find(inode, user, false);<NEW_LINE>} catch (DotSecurityException e) {<NEW_LINE>Logger.error(this, "Error trying to get info for folder with inode: " + inode, e);<NEW_LINE>throw new DotRuntimeException("Error changing asset menu order.");<NEW_LINE>}<NEW_LINE>if (null != folder) {<NEW_LINE>result.put("lastValue", folder.getSortOrder());<NEW_LINE>WebAssetFactory.changeAssetMenuOrder(folder, newValue, user);<NEW_LINE>} else {<NEW_LINE>Inode asset = InodeFactory.getInode(inode, Inode.class);<NEW_LINE>result.put("lastValue", ((WebAsset) asset).getSortOrder());<NEW_LINE>WebAssetFactory.changeAssetMenuOrder(asset, newValue, user);<NEW_LINE>}<NEW_LINE>result.put("result", 0);<NEW_LINE>return result;<NEW_LINE>}
result = new HashMap<>();
332,502
public Applications toApplications() {<NEW_LINE>Map<String, Application> appsByName = new HashMap<>();<NEW_LINE>Iterator<InstanceInfo> it = serviceIterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE><MASK><NEW_LINE>Application instanceApp = appsByName.get(instanceInfo.getAppName());<NEW_LINE>if (instanceApp == null) {<NEW_LINE>instanceApp = new Application(instanceInfo.getAppName());<NEW_LINE>appsByName.put(instanceInfo.getAppName(), instanceApp);<NEW_LINE>}<NEW_LINE>instanceApp.addInstance(instanceInfo);<NEW_LINE>}<NEW_LINE>// Do not pass application list to the constructor, as it does not initialize properly Applications<NEW_LINE>// data structure.<NEW_LINE>Applications applications = new Applications();<NEW_LINE>for (Application app : appsByName.values()) {<NEW_LINE>applications.addApplication(app);<NEW_LINE>}<NEW_LINE>applications.shuffleInstances(false);<NEW_LINE>applications.setAppsHashCode(applications.getReconcileHashCode());<NEW_LINE>applications.setVersion(1L);<NEW_LINE>return applications;<NEW_LINE>}
InstanceInfo instanceInfo = it.next();
1,078,006
public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>multi_remove_result result = new multi_remove_result();<NEW_LINE>if (e instanceof org.apache.thrift.transport.TTransportException) {<NEW_LINE>_LOGGER.error("TTransportException inside handler", e);<NEW_LINE>fb.close();<NEW_LINE>return;<NEW_LINE>} else if (e instanceof org.apache.thrift.TApplicationException) {<NEW_LINE>_LOGGER.error("TApplicationException inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = (org<MASK><NEW_LINE>} else {<NEW_LINE>_LOGGER.error("Exception inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>fcall.sendResponse(fb, msg, msgType, seqid);<NEW_LINE>} catch (java.lang.Exception ex) {<NEW_LINE>_LOGGER.error("Exception writing to internal frame buffer", ex);<NEW_LINE>fb.close();<NEW_LINE>}<NEW_LINE>}
.apache.thrift.TApplicationException) e;
394,803
public ModelAndView hotp() {<NEW_LINE>ModelAndView modelAndView = new ModelAndView("safe/hotp");<NEW_LINE><MASK><NEW_LINE>String sharedSecret = passwordReciprocal.decoder(userInfo.getSharedSecret());<NEW_LINE>otpKeyUriFormat.setSecret(sharedSecret);<NEW_LINE>otpKeyUriFormat.setCounter(Long.parseLong(userInfo.getSharedCounter()));<NEW_LINE>String otpauth = otpKeyUriFormat.format(userInfo.getUsername());<NEW_LINE>byte[] byteSharedSecret = Base32Utils.decode(sharedSecret);<NEW_LINE>String hexSharedSecret = Hex.encodeHexString(byteSharedSecret);<NEW_LINE>modelAndView.addObject("id", genRqCode(otpauth));<NEW_LINE>modelAndView.addObject("userInfo", userInfo);<NEW_LINE>modelAndView.addObject("format", otpKeyUriFormat);<NEW_LINE>modelAndView.addObject("sharedSecret", sharedSecret);<NEW_LINE>modelAndView.addObject("hexSharedSecret", hexSharedSecret);<NEW_LINE>return modelAndView;<NEW_LINE>}
UserInfo userInfo = WebContext.getUserInfo();
1,851,815
public Cursor handle(RelNode logicalPlan, ExecutionContext executionContext) {<NEW_LINE>BaseDdlOperation logicalDdlPlan = (BaseDdlOperation) logicalPlan;<NEW_LINE>initDdlContext(logicalDdlPlan, executionContext);<NEW_LINE>// Validate the plan first and then return immediately if needed.<NEW_LINE>boolean <MASK><NEW_LINE>boolean isNewPartDb = DbInfoManager.getInstance().isNewPartitionDb(logicalDdlPlan.getSchemaName());<NEW_LINE>if (isNewPartDb) {<NEW_LINE>setPartitionDbIndexAndPhyTable(logicalDdlPlan);<NEW_LINE>} else {<NEW_LINE>setDbIndexAndPhyTable(logicalDdlPlan);<NEW_LINE>}<NEW_LINE>// Build a specific DDL job by subclass.<NEW_LINE>DdlJob ddlJob = returnImmediately ? new TransientDdlJob() : buildDdlJob(logicalDdlPlan, executionContext);<NEW_LINE>// Validate the DDL job before request.<NEW_LINE>validateJob(logicalDdlPlan, ddlJob, executionContext);<NEW_LINE>// Handle the client DDL request on the worker side.<NEW_LINE>handleDdlRequest(ddlJob, executionContext);<NEW_LINE>if (executionContext.getDdlContext().isSubJob()) {<NEW_LINE>return buildSubJobResultCursor(ddlJob, executionContext);<NEW_LINE>}<NEW_LINE>return buildResultCursor(logicalDdlPlan, executionContext);<NEW_LINE>}
returnImmediately = validatePlan(logicalDdlPlan, executionContext);
406,530
public Object deliverMessage(Object[] params) throws Throwable {<NEW_LINE>if (stuckThreadsStore != null) {<NEW_LINE>stuckThreadsStore.registerThread(Thread.currentThread().getId());<NEW_LINE>}<NEW_LINE>RequestTraceSpan span = null;<NEW_LINE>if (requestTracing != null && requestTracing.isRequestTracingEnabled()) {<NEW_LINE>span = new RequestTraceSpan(EventType.TRACE_START, "deliverMdb");<NEW_LINE>span.addSpanTag("MDB Class", container_.getEjbDescriptor().getEjbClassName());<NEW_LINE>span.addSpanTag("Message Count", Long.toString(container_.getMessageCount()));<NEW_LINE>span.addSpanTag("JNDI", container_.getEjbDescriptor().getJndiName());<NEW_LINE>try {<NEW_LINE>javax.jms.Message msg = (javax.jms.Message) params[0];<NEW_LINE>span.addSpanTag("JMS Type", msg.getJMSType());<NEW_LINE>span.addSpanTag("JMS CorrelationID", msg.getJMSCorrelationID());<NEW_LINE>span.addSpanTag("JMS MessageID", msg.getJMSMessageID());<NEW_LINE>span.addSpanTag("JMS Destination", getDestinationName(msg.getJMSDestination()));<NEW_LINE>span.addSpanTag("JMS ReplyTo", getDestinationName(msg.getJMSReplyTo()));<NEW_LINE>// check RT conversation ID<NEW_LINE>UUID conversationID = (<MASK><NEW_LINE>if (conversationID != null) {<NEW_LINE>// reset the conversation ID to match the received ID to<NEW_LINE>// propagate the conversation across the message send<NEW_LINE>requestTracing.setTraceId(conversationID);<NEW_LINE>}<NEW_LINE>} catch (ClassCastException cce) {<NEW_LINE>}<NEW_LINE>requestTracing.startTrace(span);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return container_.deliverMessage(params);<NEW_LINE>} finally {<NEW_LINE>if (requestTracing != null && requestTracing.isRequestTracingEnabled()) {<NEW_LINE>requestTracing.endTrace();<NEW_LINE>}<NEW_LINE>if (stuckThreadsStore != null) {<NEW_LINE>stuckThreadsStore.deregisterThread(Thread.currentThread().getId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
UUID) msg.getObjectProperty("#BAF-CID");
1,507,438
private void assign_types_1_2() throws TypeException {<NEW_LINE>for (Iterator<Local> localIt = stmtBody.getLocals().iterator(); localIt.hasNext(); ) {<NEW_LINE>final Local local = localIt.next();<NEW_LINE>TypeVariable var = typeVariable(local);<NEW_LINE>if (var == null) {<NEW_LINE>local.setType(RefType.v("java.lang.Object"));<NEW_LINE>} else if (var.depth() == 0) {<NEW_LINE>if (var.type() == null) {<NEW_LINE>TypeVariable.error("Type Error(5): Variable without type");<NEW_LINE>} else {<NEW_LINE>local.setType(var.type().type());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>TypeVariable element = var.element();<NEW_LINE>for (int j = 1; j < var.depth(); j++) {<NEW_LINE>element = element.element();<NEW_LINE>}<NEW_LINE>if (element.type() == null) {<NEW_LINE>TypeVariable.error("Type Error(6): Array variable without base type");<NEW_LINE>} else if (element.type().type() instanceof NullType) {<NEW_LINE>local.setType(NullType.v());<NEW_LINE>} else {<NEW_LINE>Type t = element.type().type();<NEW_LINE>if (t instanceof IntType) {<NEW_LINE>local.setType(var.approx().type());<NEW_LINE>} else {<NEW_LINE>local.setType(ArrayType.v(t<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (DEBUG) {<NEW_LINE>if ((var != null) && (var.approx() != null) && (var.approx().type() != null) && (local != null) && (local.getType() != null) && !local.getType().equals(var.approx().type())) {<NEW_LINE>logger.debug("local: " + local + ", type: " + local.getType() + ", approx: " + var.approx().type());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, var.depth()));
464,188
private double[] computeScores(int[] feature, Map<Integer, Integer> preMap) {<NEW_LINE>final double[] hidden = new double[config.hiddenSize];<NEW_LINE>final int numTokens = config.numTokens;<NEW_LINE>final int embeddingSize = config.embeddingSize;<NEW_LINE>int offset = 0;<NEW_LINE>for (int j = 0; j < feature.length; j++) {<NEW_LINE>int tok = feature[j];<NEW_LINE>int index = tok * numTokens + j;<NEW_LINE>Integer <MASK><NEW_LINE>if (idInteger != null) {<NEW_LINE>ArrayMath.pairwiseAddInPlace(hidden, saved[idInteger]);<NEW_LINE>} else {<NEW_LINE>if (isTraining || config.numCached == 0) {<NEW_LINE>// TODO: can the cache be used when training, actually?<NEW_LINE>matrixMultiplySliceSum(hidden, W1, E[tok], offset);<NEW_LINE>} else {<NEW_LINE>float[] cached;<NEW_LINE>synchronized (cache) {<NEW_LINE>cached = cache.getOrDefault(index, null);<NEW_LINE>}<NEW_LINE>if (cached == null) {<NEW_LINE>cached = matrixMultiplySlice(W1, E[tok], offset);<NEW_LINE>synchronized (cache) {<NEW_LINE>cache.add(index, cached);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ArrayMath.pairwiseAddInPlace(hidden, cached);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>offset += embeddingSize;<NEW_LINE>}<NEW_LINE>addCubeInPlace(hidden, b1);<NEW_LINE>return matrixMultiply(W2, hidden);<NEW_LINE>}
idInteger = preMap.get(index);
1,124,855
public boolean sendHtmlMail(MailSenderInfo mailInfo) {<NEW_LINE>MyAuthenticator authenticator = null;<NEW_LINE>Properties pro = mailInfo.getProperties();<NEW_LINE>if (mailInfo.isValidate()) {<NEW_LINE>authenticator = new MyAuthenticator(mailInfo.getUserName(), mailInfo.getPassword());<NEW_LINE>}<NEW_LINE>Session sendMailSession = Session.getDefaultInstance(pro, authenticator);<NEW_LINE>try {<NEW_LINE>Message mailMessage = new MimeMessage(sendMailSession);<NEW_LINE>Address from = new <MASK><NEW_LINE>mailMessage.setFrom(from);<NEW_LINE>Address[] to = new Address[mailInfo.getToAddress().split(";").length];<NEW_LINE>int i = 0;<NEW_LINE>for (String e : mailInfo.getToAddress().split(";")) to[i++] = new InternetAddress(e);<NEW_LINE>mailMessage.setRecipients(Message.RecipientType.TO, to);<NEW_LINE>mailMessage.setSubject(mailInfo.getSubject());<NEW_LINE>mailMessage.setSentDate(new Date());<NEW_LINE>Multipart mainPart = new MimeMultipart();<NEW_LINE>BodyPart html = new MimeBodyPart();<NEW_LINE>html.setContent(mailInfo.getContent(), "text/html; charset=UTF-8");<NEW_LINE>mainPart.addBodyPart(html);<NEW_LINE>List<File> list = mailInfo.getFileList();<NEW_LINE>if (list != null && list.size() > 0) {<NEW_LINE>for (File f : list) {<NEW_LINE>MimeBodyPart mbp = new MimeBodyPart();<NEW_LINE>FileDataSource fds = new FileDataSource(f.getAbsolutePath());<NEW_LINE>mbp.setDataHandler(new DataHandler(fds));<NEW_LINE>mbp.setFileName(f.getName());<NEW_LINE>mainPart.addBodyPart(mbp);<NEW_LINE>}<NEW_LINE>list.clear();<NEW_LINE>}<NEW_LINE>mailMessage.setContent(mainPart);<NEW_LINE>Transport.send(mailMessage);<NEW_LINE>return true;<NEW_LINE>} catch (MessagingException ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
InternetAddress(mailInfo.getFromAddress());
1,797,016
public static void handle(String stmt, ManagerConnection c, int offset) {<NEW_LINE>int rs = ManagerParseReload.parse(stmt, offset);<NEW_LINE>switch(rs) {<NEW_LINE>case ManagerParseReload.CONFIG:<NEW_LINE>ReloadConfig.execute(c, false);<NEW_LINE>break;<NEW_LINE>case ManagerParseReload.CONFIG_ALL:<NEW_LINE>ReloadConfig.execute(c, true);<NEW_LINE>break;<NEW_LINE>case ManagerParseReload.ROUTE:<NEW_LINE>c.<MASK><NEW_LINE>break;<NEW_LINE>case ManagerParseReload.USER:<NEW_LINE>ReloadUser.execute(c);<NEW_LINE>break;<NEW_LINE>case ManagerParseReload.USER_STAT:<NEW_LINE>ReloadUserStat.execute(c);<NEW_LINE>break;<NEW_LINE>case ManagerParseReload.SQL_SLOW:<NEW_LINE>ReloadSqlSlowTime.execute(c, ParseUtil.getSQLId(stmt));<NEW_LINE>break;<NEW_LINE>case ManagerParseReload.QUERY_CF:<NEW_LINE>String filted = ParseUtil.parseString(stmt);<NEW_LINE>ReloadQueryCf.execute(c, filted);<NEW_LINE>break;<NEW_LINE>case ManagerParseReload.SQL_STAT:<NEW_LINE>String openCloseFlag = ParseUtil.parseString(stmt);<NEW_LINE>ReloadSqlStat.execute(c, openCloseFlag);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>c.writeErrMessage(ErrorCode.ER_YES, "Unsupported statement");<NEW_LINE>}<NEW_LINE>}
writeErrMessage(ErrorCode.ER_YES, "Unsupported statement");
447,443
private void flattenConfigElement(ConfigElement nestedElement, String flatPrefix, AtomicInteger i, String attributeName, String elementName, EvaluationContext context, RegistryEntry nestedRegistryEntry, boolean ignoreWarnings) throws ConfigEvaluatorException {<NEW_LINE>String subPrefix = flatPrefix + attributeName + "." + i.get() + ".";<NEW_LINE>context.addProcessed(elementName);<NEW_LINE>EvaluationResult result = context.getEvaluationResult();<NEW_LINE>EvaluationResult nestedResult = evaluate(nestedElement, nestedRegistryEntry, subPrefix, ignoreWarnings);<NEW_LINE>if (nestedResult.isValid()) {<NEW_LINE>i.incrementAndGet();<NEW_LINE>Dictionary<String, Object> nestedProperties = nestedResult.getProperties();<NEW_LINE>context.setProperty(subPrefix + "config.referenceType", nestedRegistryEntry.getPid());<NEW_LINE>for (Enumeration<String> keys = nestedProperties.keys(); keys.hasMoreElements(); ) {<NEW_LINE>String key = keys.nextElement();<NEW_LINE>Object value = nestedProperties.get(key);<NEW_LINE>context.setProperty(key, value);<NEW_LINE>}<NEW_LINE>for (Map.Entry<ConfigID, EvaluationResult> entry : nestedResult.getNested().entrySet()) {<NEW_LINE>result.addNested(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (UnresolvedPidType child : nestedResult.getUnresolvedReferences()) {<NEW_LINE>if (child instanceof UnresolvedReference) {<NEW_LINE>UnresolvedReference childRef = (UnresolvedReference) child;<NEW_LINE>result.addUnresolvedReference(new UnresolvedReference(childRef.getPid(), childRef.getAttributeDefinition(), childRef.value, context.getConfigElement().getConfigID()));<NEW_LINE>} else if (child instanceof UnresolvedService) {<NEW_LINE>UnresolvedService filter = (UnresolvedService) child;<NEW_LINE>result.addUnresolvedReference(new UnresolvedService(filter.getService(), filter.getAttributeDefinition(), filter.value, context.getConfigElement().getConfigID()<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}
, filter.getCount()));
702,720
private void dropConstraints() throws DotDataException {<NEW_LINE>Connection conn = null;<NEW_LINE>try {<NEW_LINE>conn = DbConnectionFactory.getDataSource().getConnection();<NEW_LINE>conn.setAutoCommit(true);<NEW_LINE>List<MASK><NEW_LINE>if (tables != null) {<NEW_LINE>boolean executeDrop = true;<NEW_LINE>logTaskProgress("==> Retrieving foreign keys [Drop objects? " + executeDrop + "]");<NEW_LINE>getForeingKeys(conn, tables, executeDrop);<NEW_LINE>logTaskProgress("==> Retrieving primary keys [Drop objects? " + executeDrop + "]");<NEW_LINE>getPrimaryKey(conn, tables, executeDrop);<NEW_LINE>logTaskProgress("==> Retrieving indexes [Drop objects? " + executeDrop + "]");<NEW_LINE>getIndexes(conn, tables, executeDrop);<NEW_LINE>logTaskProgress("==> Retrieving default constraints [Drop objects? " + executeDrop + "]");<NEW_LINE>getDefaultConstraints(conn, tables, executeDrop);<NEW_LINE>logTaskProgress("==> Retrieving check constraints [Drop objects? " + executeDrop + "]");<NEW_LINE>getCheckConstraints(conn, tables, executeDrop);<NEW_LINE>if (DbConnectionFactory.isMsSql()) {<NEW_LINE>// for mssql we pass again as we might have index dependencies<NEW_LINE>getPrimaryKey(conn, tables, executeDrop);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new DotDataException(e.getMessage(), e);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>if (conn != null) {<NEW_LINE>conn.close();<NEW_LINE>}<NEW_LINE>} catch (SQLException ex) {<NEW_LINE>Logger.error(this, String.format(ERROR_MESSAGE, ex.getMessage()), ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
<String> tables = getTablesToDropConstraints();
37,979
public DcClusterTbl addDcCluster(String dcName, String clusterName, String redisRule) {<NEW_LINE>DcTbl dcInfo = dcService.find(dcName);<NEW_LINE>ClusterTbl clusterInfo = clusterService.find(clusterName);<NEW_LINE>if (null == dcInfo || null == clusterInfo)<NEW_LINE>throw new BadRequestException("Cannot add dc-cluster to an unknown dc or cluster");<NEW_LINE>DcClusterTbl <MASK><NEW_LINE>if (dcClusterTbl != null)<NEW_LINE>throw new BadRequestException(String.format("DcCluster dc:%s cluster:%s exist", dcName, clusterName));<NEW_LINE>DcClusterTbl proto = new DcClusterTbl();<NEW_LINE>proto.setDcId(dcInfo.getId());<NEW_LINE>proto.setClusterId(clusterInfo.getId());<NEW_LINE>proto.setDcClusterPhase(1);<NEW_LINE>proto.setActiveRedisCheckRules(redisRule);<NEW_LINE>try {<NEW_LINE>dao.insert(proto);<NEW_LINE>} catch (DalException e) {<NEW_LINE>throw new ServerException("Cannot create dc-cluster.");<NEW_LINE>}<NEW_LINE>return find(dcName, clusterName);<NEW_LINE>}
dcClusterTbl = find(dcName, clusterName);
502,238
public boolean put(int key, double value) {<NEW_LINE>int i = indexOfInsertion(key);<NEW_LINE>if (i < 0) {<NEW_LINE>// already contained<NEW_LINE>i = -i - 1;<NEW_LINE>// if (debug) if (this.state[i] != FULL) throw new InternalError();<NEW_LINE>// if (debug) if (this.table[i] != key) throw new InternalError();<NEW_LINE>this.values[i] = value;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (this.distinct > this.highWaterMark) {<NEW_LINE>int newCapacity = chooseGrowCapacity(this.distinct + 1, this.minLoadFactor, this.maxLoadFactor);<NEW_LINE>rehash(newCapacity);<NEW_LINE>return put(key, value);<NEW_LINE>}<NEW_LINE>this.table[i] = key;<NEW_LINE><MASK><NEW_LINE>if (this.state[i] == FREE)<NEW_LINE>this.freeEntries--;<NEW_LINE>this.state[i] = FULL;<NEW_LINE>this.distinct++;<NEW_LINE>if (this.freeEntries < 1) {<NEW_LINE>// delta<NEW_LINE>int newCapacity = chooseGrowCapacity(this.distinct + 1, this.minLoadFactor, this.maxLoadFactor);<NEW_LINE>rehash(newCapacity);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
this.values[i] = value;
374,882
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TargetPermanent target = new TargetPermanent(filter);<NEW_LINE>target.setNotTarget(true);<NEW_LINE>if (!target.canChoose(source.getControllerId(), source, game)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>target.choose(outcome, source.getControllerId(), source.getSourceId(), source, game);<NEW_LINE>Permanent permanent = game.getPermanent(target.getFirstTarget());<NEW_LINE>if (permanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// must check all card parts (example: mdf commander)<NEW_LINE>Player permanentController = game.getPlayer(permanent.getControllerId());<NEW_LINE>boolean isCommander = permanentController != null && game.getCommandersIds(permanentController, CommanderCardType.COMMANDER_OR_OATHBREAKER, true).contains(permanent.getId());<NEW_LINE>if (!permanent.sacrifice(source, game)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>controller.drawCards(2, source, game);<NEW_LINE>if (isCommander) {<NEW_LINE>controller.<MASK><NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
drawCards(1, source, game);
718,868
public void activate(Map<String, Object> config) {<NEW_LINE>betaFenceCheck();<NEW_LINE>id = (String) config.get(KEY_ID);<NEW_LINE>String uriValue = (String) config.get(KEY_URI);<NEW_LINE>if (uriValue != null)<NEW_LINE>try {<NEW_LINE>this.configuredUri = new URI(uriValue);<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>throw new IllegalArgumentException(Tr.formatMessage(tc, "CWLJC0007_URI_INVALID_SYNTAX", e), e);<NEW_LINE>}<NEW_LINE>else {<NEW_LINE>this.configuredUri = null;<NEW_LINE>}<NEW_LINE>this.properties = new Properties();<NEW_LINE>for (Map.Entry<String, Object> entry : config.entrySet()) {<NEW_LINE><MASK><NEW_LINE>Object value = entry.getValue();<NEW_LINE>if (key.length() > TOTAL_PREFIX_LENGTH && key.charAt(BASE_PREFIX_LENGTH) == '.' && key.startsWith(BASE_PREFIX)) {<NEW_LINE>key = key.substring(TOTAL_PREFIX_LENGTH);<NEW_LINE>if (!key.equals("config.referenceType"))<NEW_LINE>this.properties.setProperty(key, (String) value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>scheduledExecutorService.execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>getCacheManager();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
String key = entry.getKey();
1,522,269
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>output.writeInt64(1, tag_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>output.writeEnum(2, type_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000004) == 0x00000004)) {<NEW_LINE>output.writeMessage(10, getPosition());<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000008) == 0x00000008)) {<NEW_LINE>output.writeFloat(11, angle_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000010) == 0x00000010)) {<NEW_LINE>output.writeMessage(12, getLinearVelocity());<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000020) == 0x00000020)) {<NEW_LINE>output.writeFloat(13, angularVelocity_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000040) == 0x00000040)) {<NEW_LINE>output.writeFloat(50, linearDamping_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000080) == 0x00000080)) {<NEW_LINE>output.writeFloat(51, angularDamping_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000100) == 0x00000100)) {<NEW_LINE>output.writeFloat(52, gravityScale_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000200) == 0x00000200)) {<NEW_LINE>output.writeBool(53, bullet_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000400) == 0x00000400)) {<NEW_LINE>output.writeBool(54, allowSleep_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000800) == 0x00000800)) {<NEW_LINE>output.writeBool(55, awake_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00001000) == 0x00001000)) {<NEW_LINE>output.writeBool(56, active_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00002000) == 0x00002000)) {<NEW_LINE>output.writeBool(57, fixedRotation_);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < fixtures_.size(); i++) {<NEW_LINE>output.writeMessage(100<MASK><NEW_LINE>}<NEW_LINE>unknownFields.writeTo(output);<NEW_LINE>}
, fixtures_.get(i));
1,001,989
public int compareTo(archive_args other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetMid()).<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetMid()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetOffset()).compareTo(other.isSetOffset());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetOffset()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
compareTo(other.isSetMid());
1,575,762
public void initParam(Object obj) {<NEW_LINE>long size = Runtime.getRuntime().totalMemory();<NEW_LINE>// initParam happens before display of the panel so the values are appropriately set when<NEW_LINE>// viewed<NEW_LINE>updateMemoryLabel(getSizeMemoryLabel(), "jvm.options.memory.size", size);<NEW_LINE>updateMemoryLabel(getUsedMemoryLabel(), "jvm.options.memory.used", size - Runtime.getRuntime().freeMemory());<NEW_LINE>updateMemoryLabel(getMaxMemoryLabel(), "jvm.options.memory.max", Runtime.<MASK><NEW_LINE>try {<NEW_LINE>if (Files.exists(JVM_PROPERTIES_FILE)) {<NEW_LINE>List<String> lines = Files.readAllLines(JVM_PROPERTIES_FILE, StandardCharsets.UTF_8);<NEW_LINE>if (lines.size() > 0) {<NEW_LINE>getJvmOptionsField().setText(lines.get(0));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>// Ignore<NEW_LINE>}<NEW_LINE>}
getRuntime().maxMemory());
323,734
public static DescribeBackupTasksResponse unmarshall(DescribeBackupTasksResponse describeBackupTasksResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBackupTasksResponse.setRequestId<MASK><NEW_LINE>List<BackupJob> items = new ArrayList<BackupJob>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeBackupTasksResponse.Items.Length"); i++) {<NEW_LINE>BackupJob backupJob = new BackupJob();<NEW_LINE>backupJob.setBackupProgressStatus(_ctx.stringValue("DescribeBackupTasksResponse.Items[" + i + "].BackupProgressStatus"));<NEW_LINE>backupJob.setBackupStatus(_ctx.stringValue("DescribeBackupTasksResponse.Items[" + i + "].BackupStatus"));<NEW_LINE>backupJob.setJobMode(_ctx.stringValue("DescribeBackupTasksResponse.Items[" + i + "].JobMode"));<NEW_LINE>backupJob.setProcess(_ctx.stringValue("DescribeBackupTasksResponse.Items[" + i + "].Process"));<NEW_LINE>backupJob.setTaskAction(_ctx.stringValue("DescribeBackupTasksResponse.Items[" + i + "].TaskAction"));<NEW_LINE>backupJob.setBackupJobId(_ctx.stringValue("DescribeBackupTasksResponse.Items[" + i + "].BackupJobId"));<NEW_LINE>backupJob.setBackupId(_ctx.stringValue("DescribeBackupTasksResponse.Items[" + i + "].BackupId"));<NEW_LINE>items.add(backupJob);<NEW_LINE>}<NEW_LINE>describeBackupTasksResponse.setItems(items);<NEW_LINE>return describeBackupTasksResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeBackupTasksResponse.RequestId"));
567,503
private String formatOutput(CommandLine cl, JobInfo info) {<NEW_LINE>StringBuilder output = new StringBuilder();<NEW_LINE>output.append("ID: ").append(info.getId()).append("\n");<NEW_LINE>output.append("Name: ").append(info.getName()).append("\n");<NEW_LINE>output.append("Description: ");<NEW_LINE>if (cl.hasOption("v")) {<NEW_LINE>output.append(info.getDescription());<NEW_LINE>} else {<NEW_LINE>output.append(StringUtils.abbreviate(info.getDescription(), 200));<NEW_LINE>}<NEW_LINE>output.append("\n");<NEW_LINE>output.append("Status: ").append(info.getStatus()).append("\n");<NEW_LINE>if (info.getErrorMessage() != null && !info.getErrorMessage().isEmpty()) {<NEW_LINE>output.append("Error: ").append(info.getErrorMessage<MASK><NEW_LINE>}<NEW_LINE>if (info.getResult() != null && !info.getResult().toString().isEmpty()) {<NEW_LINE>output.append("Result: ").append(info.getResult().toString()).append("\n");<NEW_LINE>}<NEW_LINE>if (cl.hasOption("v")) {<NEW_LINE>for (JobInfo childInfo : info.getChildren()) {<NEW_LINE>output.append("Task ").append(childInfo.getId()).append("\n");<NEW_LINE>if (childInfo instanceof TaskInfo) {<NEW_LINE>TaskInfo taskInfo = (TaskInfo) childInfo;<NEW_LINE>if (taskInfo.getWorkerHost() != null) {<NEW_LINE>output.append("\t").append("Worker: ").append(taskInfo.getWorkerHost()).append("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!childInfo.getDescription().isEmpty()) {<NEW_LINE>output.append("\t").append("Description: ").append(StringUtils.abbreviate(childInfo.getDescription(), 200)).append("\n");<NEW_LINE>}<NEW_LINE>output.append("\t").append("Status: ").append(childInfo.getStatus()).append("\n");<NEW_LINE>if (childInfo.getErrorMessage() != null && !childInfo.getErrorMessage().isEmpty()) {<NEW_LINE>output.append("\t").append("Error: ").append(childInfo.getErrorMessage()).append("\n");<NEW_LINE>}<NEW_LINE>if (childInfo.getResult() != null) {<NEW_LINE>output.append("\t").append("Result: ").append(childInfo.getResult()).append("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return output.toString();<NEW_LINE>}
()).append("\n");
786,078
public void run() {<NEW_LINE>try {<NEW_LINE>String folderServerId = message.getFolder().getServerId();<NEW_LINE>LocalStore localStore = localStoreProvider.getInstance(account);<NEW_LINE>LocalFolder localFolder = localStore.getFolder(folderServerId);<NEW_LINE>ProgressBodyFactory bodyFactory = new ProgressBodyFactory(new ProgressListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void updateProgress(int progress) {<NEW_LINE>for (MessagingListener listener : getListeners()) {<NEW_LINE>listener.updateProgress(progress);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Backend backend = getBackend(account);<NEW_LINE>backend.fetchPart(folderServerId, message.getUid(), part, bodyFactory);<NEW_LINE>localFolder.addPartToMessage(message, part);<NEW_LINE>for (MessagingListener l : getListeners(listener)) {<NEW_LINE>l.<MASK><NEW_LINE>}<NEW_LINE>} catch (MessagingException me) {<NEW_LINE>Timber.v(me, "Exception loading attachment");<NEW_LINE>for (MessagingListener l : getListeners(listener)) {<NEW_LINE>l.loadAttachmentFailed(account, message, part, me.getMessage());<NEW_LINE>}<NEW_LINE>notifyUserIfCertificateProblem(account, me, true);<NEW_LINE>}<NEW_LINE>}
loadAttachmentFinished(account, message, part);
596,843
public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, ProtoConstants.RequestSourceType requestSourceType, WFCMessage.DismissGroupRequest request, Qos1PublishHandler.IMCallback callback) {<NEW_LINE>WFCMessage.GroupInfo groupInfo = m_messagesStore.getGroupInfo(request.getGroupId());<NEW_LINE>boolean isAdmin = requestSourceType == ProtoConstants.RequestSourceType.Request_From_Admin;<NEW_LINE>ErrorCode errorCode;<NEW_LINE>if (groupInfo == null) {<NEW_LINE>errorCode = m_messagesStore.dismissGroup(fromUser, <MASK><NEW_LINE>} else if (isAdmin || (groupInfo.getType() == ProtoConstants.GroupType.GroupType_Normal || groupInfo.getType() == ProtoConstants.GroupType.GroupType_Restricted) && groupInfo.getOwner() != null && groupInfo.getOwner().equals(fromUser)) {<NEW_LINE>if (request.hasNotifyContent() && request.getNotifyContent().getType() > 0 && requestSourceType == ProtoConstants.RequestSourceType.Request_From_User && !m_messagesStore.isAllowClientCustomGroupNotification()) {<NEW_LINE>return ErrorCode.ERROR_CODE_NOT_RIGHT;<NEW_LINE>}<NEW_LINE>if (request.hasNotifyContent() && request.getNotifyContent().getType() > 0 && requestSourceType == ProtoConstants.RequestSourceType.Request_From_Robot && !m_messagesStore.isAllowRobotCustomGroupNotification()) {<NEW_LINE>return ErrorCode.ERROR_CODE_NOT_RIGHT;<NEW_LINE>}<NEW_LINE>// send notify message first, then dismiss group<NEW_LINE>if (request.hasNotifyContent() && request.getNotifyContent().getType() > 0) {<NEW_LINE>sendGroupNotification(fromUser, groupInfo.getTargetId(), request.getToLineList(), request.getNotifyContent());<NEW_LINE>} else {<NEW_LINE>WFCMessage.MessageContent content = new GroupNotificationBinaryContent(groupInfo.getTargetId(), fromUser, null, "").getDismissGroupNotifyContent();<NEW_LINE>sendGroupNotification(fromUser, request.getGroupId(), request.getToLineList(), content);<NEW_LINE>}<NEW_LINE>errorCode = m_messagesStore.dismissGroup(fromUser, request.getGroupId(), isAdmin);<NEW_LINE>} else {<NEW_LINE>errorCode = ErrorCode.ERROR_CODE_NOT_RIGHT;<NEW_LINE>}<NEW_LINE>return errorCode;<NEW_LINE>}
request.getGroupId(), isAdmin);
1,112,027
public List<Object> apply(Object o) {<NEW_LINE>if (o instanceof org.docx4j.wml.SdtBlock || o instanceof org.docx4j.wml.SdtRun || o instanceof org.docx4j.wml.CTSdtRow || o instanceof org.docx4j.wml.CTSdtCell) {<NEW_LINE>SdtPr sdtPr = OpenDoPEHandler.getSdtPr(o);<NEW_LINE>if (sdtPr != null) {<NEW_LINE>log.debug("Processing " + OpenDoPEHandler.getSdtPr(o).getId().getVal());<NEW_LINE><MASK><NEW_LINE>log.debug(tag.getVal());<NEW_LINE>HashMap<String, String> map = QueryString.parseQueryString(tag.getVal(), true);<NEW_LINE>String conditionId = map.get(OpenDoPEHandler.BINDING_ROLE_CONDITIONAL);<NEW_LINE>String repeatId = map.get(OpenDoPEHandler.BINDING_ROLE_REPEAT);<NEW_LINE>if (conditionId != null) {<NEW_LINE>conditionSdtsByID.put(sdtPr.getId().getVal(), o);<NEW_LINE>} else if (repeatId != null) {<NEW_LINE>repeatSdtsByID.put(sdtPr.getId().getVal(), o);<NEW_LINE>} else if (instanceCountOnly) {<NEW_LINE>String resultConditionId = map.get(OpenDoPEHandler.BINDING_RESULT_CONDITION_FALSE);<NEW_LINE>String resultRepeatId = map.get(OpenDoPEHandler.BINDING_RESULT_RPTD);<NEW_LINE>String resultRptdZeroId = map.get(OpenDoPEHandler.BINDING_RESULT_RPTD_ZERO);<NEW_LINE>if (resultConditionId != null) {<NEW_LINE>conditionSdtsByID.put(sdtPr.getId().getVal(), o);<NEW_LINE>} else if (resultRptdZeroId != null) {<NEW_LINE>repeatSdtsByID.put(sdtPr.getId().getVal(), o);<NEW_LINE>} else if (resultRepeatId != null) {<NEW_LINE>repeatSdtsByID.put(sdtPr.getId().getVal(), o);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// not bothering to count plain binds<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
Tag tag = sdtPr.getTag();
1,078,391
final CreateReadinessCheckResult executeCreateReadinessCheck(CreateReadinessCheckRequest createReadinessCheckRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createReadinessCheckRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateReadinessCheckRequest> request = null;<NEW_LINE>Response<CreateReadinessCheckResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new CreateReadinessCheckRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createReadinessCheckRequest));<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, "Route53 Recovery Readiness");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateReadinessCheck");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateReadinessCheckResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateReadinessCheckResultJsonUnmarshaller());<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>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
986,546
public static ListDeploymentsResponse unmarshall(ListDeploymentsResponse listDeploymentsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDeploymentsResponse.setRequestId(_ctx.stringValue("ListDeploymentsResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setPageNumber(_ctx.longValue("ListDeploymentsResponse.Data.PageNumber"));<NEW_LINE>data.setPageSize(_ctx.longValue("ListDeploymentsResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.longValue("ListDeploymentsResponse.Data.TotalCount"));<NEW_LINE>List<Deployment> deployments <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListDeploymentsResponse.Data.Deployments.Length"); i++) {<NEW_LINE>Deployment deployment = new Deployment();<NEW_LINE>deployment.setStatus(_ctx.integerValue("ListDeploymentsResponse.Data.Deployments[" + i + "].Status"));<NEW_LINE>deployment.setErrorMessage(_ctx.stringValue("ListDeploymentsResponse.Data.Deployments[" + i + "].ErrorMessage"));<NEW_LINE>deployment.setCreateTime(_ctx.longValue("ListDeploymentsResponse.Data.Deployments[" + i + "].CreateTime"));<NEW_LINE>deployment.setExecutor(_ctx.stringValue("ListDeploymentsResponse.Data.Deployments[" + i + "].Executor"));<NEW_LINE>deployment.setCreator(_ctx.stringValue("ListDeploymentsResponse.Data.Deployments[" + i + "].Creator"));<NEW_LINE>deployment.setExecuteTime(_ctx.longValue("ListDeploymentsResponse.Data.Deployments[" + i + "].ExecuteTime"));<NEW_LINE>deployment.setName(_ctx.stringValue("ListDeploymentsResponse.Data.Deployments[" + i + "].Name"));<NEW_LINE>deployment.setId(_ctx.longValue("ListDeploymentsResponse.Data.Deployments[" + i + "].Id"));<NEW_LINE>deployments.add(deployment);<NEW_LINE>}<NEW_LINE>data.setDeployments(deployments);<NEW_LINE>listDeploymentsResponse.setData(data);<NEW_LINE>return listDeploymentsResponse;<NEW_LINE>}
= new ArrayList<Deployment>();
1,820,851
ViewType update(RNSharedElementContent content, RNSharedElementStyle style, float position) {<NEW_LINE>boolean invalidated = false;<NEW_LINE>// Update content<NEW_LINE>if (mContent != content) {<NEW_LINE>mContent = content;<NEW_LINE>invalidated = true;<NEW_LINE>}<NEW_LINE>// Update view-type<NEW_LINE>ViewType viewType = (mContent != null) ? RNSharedElementDrawable.getViewType(mContent.view, style) : ViewType.NONE;<NEW_LINE>if (mViewType != viewType) {<NEW_LINE>mViewType = viewType;<NEW_LINE>invalidated = true;<NEW_LINE>}<NEW_LINE>// Update & check style changes<NEW_LINE>if ((mStyle != null) && (style != null) && !invalidated) {<NEW_LINE>switch(viewType) {<NEW_LINE>case REACTIMAGEVIEW:<NEW_LINE>case IMAGEVIEW:<NEW_LINE>// Log.d(LOG_TAG, "drawableChanged, viewType: " + viewType + ", changes: " + mStyle.compare(style));<NEW_LINE>invalidated = (mStyle.compare(style) & (RNSharedElementStyle.PROP_BORDER | RNSharedElementStyle.PROP_BACKGROUND_COLOR | RNSharedElementStyle.PROP_SCALETYPE)) != 0;<NEW_LINE>break;<NEW_LINE>case PLAIN:<NEW_LINE>// Log.d(LOG_TAG, "drawableChanged, viewType: " + viewType + ", changes: " + mStyle.compare(style));<NEW_LINE>invalidated = (mStyle.compare(style) & (RNSharedElementStyle.PROP_BORDER <MASK><NEW_LINE>break;<NEW_LINE>case GENERIC:<NEW_LINE>// nop<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mStyle = style;<NEW_LINE>// Update position<NEW_LINE>mPosition = position;<NEW_LINE>// Invalidate if necessary<NEW_LINE>if (invalidated) {<NEW_LINE>invalidateSelf();<NEW_LINE>}<NEW_LINE>return viewType;<NEW_LINE>}
| RNSharedElementStyle.PROP_BACKGROUND_COLOR)) != 0;
1,816,472
private void bindColumns(RowSetLoader writer) {<NEW_LINE>rawColWriter = writer.scalar(RAW_LINE_COL_NAME);<NEW_LINE>unmatchedColWriter = writer.scalar(UNMATCHED_LINE_COL_NAME);<NEW_LINE>saveMatchedRows = rawColWriter.isProjected();<NEW_LINE>// If no match-case columns are projected, and the unmatched<NEW_LINE>// columns is unprojected, then we want to count (matched)<NEW_LINE>// rows.<NEW_LINE>saveMatchedRows |= !unmatchedColWriter.isProjected();<NEW_LINE>// This reader is unusual: it can save only unmatched rows,<NEW_LINE>// save only matched rows, or both. We check if we want to<NEW_LINE>// save matched rows to by checking if any of the "normal"<NEW_LINE>// reader columns are projected (ignoring the two special<NEW_LINE>// columns.) If so, create a vector writer to save values.<NEW_LINE>if (config.asArray) {<NEW_LINE>saveMatchedRows |= writer.column(0).isProjected();<NEW_LINE>if (saveMatchedRows) {<NEW_LINE>// Save columns as an array<NEW_LINE>vectorWriter = new ColumnsArrayWriter(writer);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < config.readerSchema.size(); i++) {<NEW_LINE>saveMatchedRows |= writer.column(i).isProjected();<NEW_LINE>}<NEW_LINE>if (saveMatchedRows) {<NEW_LINE>// Save using the defined columns<NEW_LINE>TupleMetadata providedSchema = config.providedSchema;<NEW_LINE>StandardConversions conversions = StandardConversions.builder().<MASK><NEW_LINE>vectorWriter = new ScalarGroupWriter(writer, config.readerSchema, conversions);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
withSchema(providedSchema).build();
238,704
public void generateStart(OptimizedTagContext context) {<NEW_LINE>// PK65013 - start<NEW_LINE>String pageContextVar = Constants.JSP_PAGE_CONTEXT_ORIG;<NEW_LINE>JspOptions jspOptions = context.getJspOptions();<NEW_LINE>if (jspOptions != null) {<NEW_LINE>if (context.isTagFile() && jspOptions.isModifyPageContextVariable()) {<NEW_LINE>pageContextVar = Constants.JSP_PAGE_CONTEXT_NEW;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// PK65013 - end<NEW_LINE>context.writeSource("createIndexMgr(" + pageContextVar + ");");<NEW_LINE>context.<MASK><NEW_LINE>context.writeSource("createRepeatLookup(" + pageContextVar + ");");<NEW_LINE>if (indexProvided == false) {<NEW_LINE>index = context.createTemporaryVariable();<NEW_LINE>} else {<NEW_LINE>index = index.substring(1, index.length() - 1);<NEW_LINE>}<NEW_LINE>if (start == null) {<NEW_LINE>start = "0";<NEW_LINE>} else if (start.charAt(0) == '\"') {<NEW_LINE>start = start.substring(1, start.length() - 1);<NEW_LINE>}<NEW_LINE>if (end == null) {<NEW_LINE>end = Integer.toString(Integer.MAX_VALUE);<NEW_LINE>} else if (end.charAt(0) == '\"') {<NEW_LINE>end = end.substring(1, end.length() - 1);<NEW_LINE>}<NEW_LINE>// PK65013 change pageContext variable to customizable one.<NEW_LINE>context.writeSource("((com.ibm.ws.jsp.tsx.tag.DefinedIndexManager) " + pageContextVar + ".getAttribute(\"TSXDefinedIndexManager\", PageContext.PAGE_SCOPE)).addIndex(\"" + index + "\");");<NEW_LINE>context.writeSource("((java.util.Stack)" + pageContextVar + ".getAttribute(\"TSXRepeatStack\", PageContext.PAGE_SCOPE)).push(\"" + index + "\");");<NEW_LINE>context.writeSource("for (int " + index + " = " + start + "; " + index + " <= " + end + "; " + index + "++) {");<NEW_LINE>context.writeSource(" ((java.util.Hashtable)" + pageContextVar + ".getAttribute(\"TSXRepeatLookup\", PageContext.PAGE_SCOPE)).put(\"" + index + "\", new Integer(" + index + "));");<NEW_LINE>context.writeSource(" out = " + pageContextVar + ".pushBody();");<NEW_LINE>context.writeSource(" try {");<NEW_LINE>}
writeSource("createRepeatStack(" + pageContextVar + ");");
851,920
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String stmtOrigText = "@name('split') @public on SupportBean " + "insert into AStream2S select theString where intPrimitive=1 " + "insert into BStream2S select theString where intPrimitive=1 or intPrimitive=2 " + "output all";<NEW_LINE>env.compileDeploy(stmtOrigText, path).addListener("split");<NEW_LINE>env.compileDeploy("@name('s0') select * from AStream2S", path).addListener("s0");<NEW_LINE>env.compileDeploy("@name('s1') select * from BStream2S", path).addListener("s1");<NEW_LINE>env.assertThat(() -> {<NEW_LINE>assertNotSame(env.statement("s0").getEventType(), env.statement("s1").getEventType());<NEW_LINE>assertSame(env.statement("s0").getEventType().getUnderlyingType(), env.statement("s1").getEventType().getUnderlyingType());<NEW_LINE>});<NEW_LINE>sendSupportBean(env, "E1", 1);<NEW_LINE>env.assertEqualsNew("s0", "theString", "E1");<NEW_LINE>env.<MASK><NEW_LINE>env.assertListenerNotInvoked("split");<NEW_LINE>sendSupportBean(env, "E2", 2);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.assertEqualsNew("s1", "theString", "E2");<NEW_LINE>env.assertListenerNotInvoked("split");<NEW_LINE>sendSupportBean(env, "E3", 1);<NEW_LINE>env.assertEqualsNew("s0", "theString", "E3");<NEW_LINE>env.assertEqualsNew("s1", "theString", "E3");<NEW_LINE>env.assertListenerNotInvoked("split");<NEW_LINE>sendSupportBean(env, "E4", -999);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.assertListenerNotInvoked("s1");<NEW_LINE>env.assertEqualsNew("split", "theString", "E4");<NEW_LINE>env.undeployAll();<NEW_LINE>}
assertEqualsNew("s1", "theString", "E1");
1,535,776
protected HttpMessage newFullBodyMessage(ByteBuf body) {<NEW_LINE>HttpResponse res = new DefaultFullHttpResponse(version(), status(), body);<NEW_LINE>if (!HttpMethod.HEAD.equals(method())) {<NEW_LINE>responseHeaders.remove(HttpHeaderNames.TRANSFER_ENCODING);<NEW_LINE>if (!HttpResponseStatus.NOT_MODIFIED.equals(status())) {<NEW_LINE>if (HttpUtil.getContentLength(nettyResponse, -1) == -1) {<NEW_LINE>responseHeaders.setInt(HttpHeaderNames.CONTENT_LENGTH, body.readableBytes());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else // For HEAD requests:<NEW_LINE>// - if there is Transfer-Encoding and Content-Length, Transfer-Encoding will be removed<NEW_LINE>// - if there is only Transfer-Encoding, it will be kept and not replaced by<NEW_LINE>// Content-Length: body.readableBytes()<NEW_LINE>// For HEAD requests, the I/O handler may decide to provide only the headers and complete<NEW_LINE>// the response. In that case body will be EMPTY_BUFFER and if we set Content-Length: 0,<NEW_LINE>// this will not be correct<NEW_LINE>// https://github.com/reactor/reactor-netty/issues/1333<NEW_LINE>if (HttpUtil.getContentLength(nettyResponse, -1) != -1) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>res.headers().set(responseHeaders);<NEW_LINE>return res;<NEW_LINE>}
responseHeaders.remove(HttpHeaderNames.TRANSFER_ENCODING);
181,479
public boolean add(int bitIndex) {<NEW_LINE>boolean set = contains(bitIndex);<NEW_LINE>if (!set) {<NEW_LINE>if (myBase < 0) {<NEW_LINE>myBase = roundToNearest(bitIndex);<NEW_LINE>} else if (bitIndex < myBase) {<NEW_LINE>int newBase = roundToNearest(bitIndex);<NEW_LINE>int wordDiff = (myBase - newBase) >> SHIFT;<NEW_LINE>long[] n = new long[wordDiff + myBitMask.length];<NEW_LINE>System.arraycopy(myBitMask, 0, n, wordDiff, myBitMask.length);<NEW_LINE>myBitMask = n;<NEW_LINE>myBase = newBase;<NEW_LINE>myLastUsedSlot += wordDiff;<NEW_LINE>}<NEW_LINE>++myBitsSet;<NEW_LINE>bitIndex -= myBase;<NEW_LINE>int wordIndex = bitIndex >> SHIFT;<NEW_LINE>if (wordIndex >= myBitMask.length) {<NEW_LINE>long[] n = new long[Math.max(calcCapacity(myBitMask.<MASK><NEW_LINE>System.arraycopy(myBitMask, 0, n, 0, myBitMask.length);<NEW_LINE>myBitMask = n;<NEW_LINE>}<NEW_LINE>myBitMask[wordIndex] |= 1L << (bitIndex & MASK);<NEW_LINE>myLastUsedSlot = Math.max(myLastUsedSlot, wordIndex);<NEW_LINE>}<NEW_LINE>return !set;<NEW_LINE>}
length), wordIndex + 1)];
1,640,918
final DeletePolicyResult executeDeletePolicy(DeletePolicyRequest deletePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeletePolicyRequest> request = null;<NEW_LINE>Response<DeletePolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeletePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePolicyRequest));<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, "Organizations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePolicy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeletePolicyResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePolicyResultJsonUnmarshaller());<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());
985,246
List<BQModuleMetadata> topSort() {<NEW_LINE>Map<BQModuleMetadata, Integer> degree = inDegree();<NEW_LINE>Deque<BQModuleMetadata> zeroDegree = new ArrayDeque<>(neighbors.size());<NEW_LINE>List<BQModuleMetadata> result = new ArrayList<>(neighbors.size());<NEW_LINE>degree.forEach((k, v) -> {<NEW_LINE>if (v == 0) {<NEW_LINE>zeroDegree.push(k);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>while (!zeroDegree.isEmpty()) {<NEW_LINE>BQModuleMetadata v = zeroDegree.pop();<NEW_LINE>result.add(v);<NEW_LINE>neighbors.get(v).forEach(neighbor -> degree.computeIfPresent(neighbor, (k, oldValue) -> {<NEW_LINE>int newValue = --oldValue;<NEW_LINE>if (newValue == 0) {<NEW_LINE>zeroDegree.push(k);<NEW_LINE>}<NEW_LINE>return newValue;<NEW_LINE>}));<NEW_LINE>}<NEW_LINE>// Check that we have used the entire graph (if not, there was a cycle)<NEW_LINE>if (result.size() != neighbors.size()) {<NEW_LINE>Set<BQModuleMetadata> remainingKeys = new HashSet<>(neighbors.keySet());<NEW_LINE>String cycleString = remainingKeys.stream().filter(o -> !result.contains(o)).map(BQModuleMetadata::getName).collect<MASK><NEW_LINE>throw new BootiqueException(1, "Circular override dependency between DI modules: " + cycleString);<NEW_LINE>}<NEW_LINE>Collections.reverse(result);<NEW_LINE>return result;<NEW_LINE>}
(Collectors.joining(" -> "));
1,329,011
public static void addSessionWorldTimesToBatch(PreparedStatement statement, FinishedSession session, String[] gms) throws SQLException {<NEW_LINE>UUID uuid = session.getPlayerUUID();<NEW_LINE>ServerUUID serverUUID = session.getServerUUID();<NEW_LINE>Optional<WorldTimes> worldTimes = session.getExtraData().get(WorldTimes.class);<NEW_LINE>if (!worldTimes.isPresent())<NEW_LINE>return;<NEW_LINE>for (Map.Entry<String, GMTimes> worldTimesEntry : worldTimes.get().getWorldTimes().entrySet()) {<NEW_LINE>String worldName = worldTimesEntry.getKey();<NEW_LINE>GMTimes gmTimes = worldTimesEntry.getValue();<NEW_LINE>// Session ID select statement<NEW_LINE>statement.setString(1, uuid.toString());<NEW_LINE>statement.setString(2, serverUUID.toString());<NEW_LINE>statement.setLong(3, session.getStart());<NEW_LINE>statement.setLong(4, session.getEnd());<NEW_LINE>// World ID select statement<NEW_LINE>statement.setString(5, worldName);<NEW_LINE>statement.setString(6, serverUUID.toString());<NEW_LINE>statement.setString(7, uuid.toString());<NEW_LINE>statement.setString(8, serverUUID.toString());<NEW_LINE>statement.setLong(9, gmTimes.<MASK><NEW_LINE>statement.setLong(10, gmTimes.getTime(gms[1]));<NEW_LINE>statement.setLong(11, gmTimes.getTime(gms[2]));<NEW_LINE>statement.setLong(12, gmTimes.getTime(gms[3]));<NEW_LINE>statement.addBatch();<NEW_LINE>}<NEW_LINE>}
getTime(gms[0]));
1,081,941
public int distance() {<NEW_LINE>final int INFINITY = searchTerm.length() + searchText.length();<NEW_LINE>int[][] H = new int[searchTerm.length() + 2][searchText.length() + 2];<NEW_LINE>H[0][0] = INFINITY;<NEW_LINE>for (int i = 0; i <= searchTerm.length(); i++) {<NEW_LINE>H[i + 1][1] = i;<NEW_LINE>H[i + 1][0] = INFINITY;<NEW_LINE>}<NEW_LINE>for (int j = 0; j <= searchText.length(); j++) {<NEW_LINE>H[1][j + 1] = (type == Type.Global) ? j : 0;<NEW_LINE>H[0][j + 1] = INFINITY;<NEW_LINE>}<NEW_LINE>int[] DA = new int[alphabetLength];<NEW_LINE>Arrays.fill(DA, 0);<NEW_LINE>for (int i = 1; i <= searchTerm.length(); i++) {<NEW_LINE>int DB = 0;<NEW_LINE>for (int j = 1; j <= searchText.length(); j++) {<NEW_LINE>int i1 = DA[searchText.charAt(j - 1)];<NEW_LINE>int j1 = DB;<NEW_LINE>int d = ((searchTerm.charAt(i - 1) == searchText.charAt(j - 1)) ? 0 : 1);<NEW_LINE>if (d == 0)<NEW_LINE>DB = j;<NEW_LINE>H[i + 1][j + 1] = min(H[i][j] + d, H[i + 1][j] + 1, H[i][j + 1] + 1, H[i1][j1] + (i - i1 - 1) + 1 + (j - j1 - 1));<NEW_LINE>}<NEW_LINE>DA[searchTerm.charAt<MASK><NEW_LINE>}<NEW_LINE>// writeMatrix(H);<NEW_LINE>if (type == Type.Global) {<NEW_LINE>return H[searchTerm.length() + 1][searchText.length() + 1];<NEW_LINE>} else {<NEW_LINE>int min = Integer.MAX_VALUE;<NEW_LINE>for (int j = 1; j <= searchText.length() + 1; j++) {<NEW_LINE>min = Math.min(min, H[searchTerm.length() + 1][j]);<NEW_LINE>}<NEW_LINE>return min;<NEW_LINE>}<NEW_LINE>}
(i - 1)] = i;
958,040
private Mono<Response<OnPremiseIotSensorInner>> createOrUpdateWithResponseAsync(String onPremiseIotSensorName, Context context) {<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 (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (onPremiseIotSensorName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>final String apiVersion = "2020-08-06-preview";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), onPremiseIotSensorName, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter onPremiseIotSensorName is required and cannot be null."));
1,171,315
public com.amazonaws.services.eventbridge.model.ResourceAlreadyExistsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.eventbridge.model.ResourceAlreadyExistsException resourceAlreadyExistsException = new com.amazonaws.services.<MASK><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>} 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 resourceAlreadyExistsException;<NEW_LINE>}
eventbridge.model.ResourceAlreadyExistsException(null);
1,399,263
public void updateAsciiStream(int i, InputStream x, long length) throws SQLException {<NEW_LINE>try {<NEW_LINE>rsetImpl.updateAsciiStream(i, x, length);<NEW_LINE>} catch (SQLException sqlX) {<NEW_LINE>FFDCFilter.processException(sqlX, getClass().getName() + ".updateAsciiStream", "2981", this);<NEW_LINE>throw WSJdbcUtil.mapException(this, sqlX);<NEW_LINE>} catch (NullPointerException nullX) {<NEW_LINE>// No FFDC code needed; we might be closed.<NEW_LINE>throw runtimeXIfNotClosed(nullX);<NEW_LINE>} catch (AbstractMethodError methError) {<NEW_LINE>// No FFDC code needed; wrong JDBC level.<NEW_LINE>throw AdapterUtil.notSupportedX("ResultSet.updateAsciiStream", methError);<NEW_LINE>} catch (RuntimeException runX) {<NEW_LINE>FFDCFilter.processException(runX, getClass().getName() + ".updateAsciiStream", "3355", this);<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(this, tc, "updateAsciiStream", runX);<NEW_LINE>throw runX;<NEW_LINE>} catch (Error err) {<NEW_LINE>FFDCFilter.processException(err, getClass().getName() + ".updateAsciiStream", "3362", this);<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(<MASK><NEW_LINE>throw err;<NEW_LINE>}<NEW_LINE>}
this, tc, "updateAsciiStream", err);
814,533
private void genJCallTerm(JavaMethodCall callIns, BType attachedType, int localVarOffset) {<NEW_LINE>// Load function parameters of the target Java method to the stack..<NEW_LINE>Label blockedOnExternLabel = new Label();<NEW_LINE>Label notBlockedOnExternLabel = new Label();<NEW_LINE>genHandlingBlockedOnExternal(localVarOffset, blockedOnExternLabel);<NEW_LINE>if (callIns.lhsOp != null && callIns.lhsOp.variableDcl != null) {<NEW_LINE>this.mv.visitVarInsn(ALOAD, localVarOffset);<NEW_LINE>this.mv.visitFieldInsn(GETFIELD, STRAND_CLASS, "returnValue", "Ljava/lang/Object;");<NEW_LINE>// store return<NEW_LINE>jvmCastGen.addUnboxInsn(this.mv, callIns.lhsOp.variableDcl.type);<NEW_LINE>this.storeToVar(callIns.lhsOp.variableDcl);<NEW_LINE>}<NEW_LINE>this.mv.visitJumpInsn(GOTO, notBlockedOnExternLabel);<NEW_LINE>this.mv.visitLabel(blockedOnExternLabel);<NEW_LINE>int argIndex = 0;<NEW_LINE>if (attachedType == null) {<NEW_LINE>this.mv.visitVarInsn(ALOAD, localVarOffset);<NEW_LINE>} else {<NEW_LINE>// Below codes are not needed (as normal external funcs doesn't support attached invocations)<NEW_LINE>// check whether function params already include the self<NEW_LINE>this.mv.visitVarInsn(ALOAD, localVarOffset);<NEW_LINE>BIRNode.BIRVariableDcl selfArg = callIns.<MASK><NEW_LINE>this.loadVar(selfArg);<NEW_LINE>this.mv.visitTypeInsn(CHECKCAST, B_OBJECT);<NEW_LINE>argIndex += 1;<NEW_LINE>}<NEW_LINE>int argsCount = callIns.args.size();<NEW_LINE>while (argIndex < argsCount) {<NEW_LINE>BIROperand arg = callIns.args.get(argIndex);<NEW_LINE>this.loadVar(arg.variableDcl);<NEW_LINE>argIndex += 1;<NEW_LINE>}<NEW_LINE>String jClassName = callIns.jClassName;<NEW_LINE>this.mv.visitMethodInsn(INVOKESTATIC, jClassName, callIns.name, callIns.jMethodVMSig, false);<NEW_LINE>if (callIns.lhsOp != null && callIns.lhsOp.variableDcl != null) {<NEW_LINE>this.storeToVar(callIns.lhsOp.variableDcl);<NEW_LINE>}<NEW_LINE>this.mv.visitLabel(notBlockedOnExternLabel);<NEW_LINE>}
args.get(0).variableDcl;
994,413
MethodTree generateConstructorAuthBasic(TreeMaker maker) {<NEW_LINE>ModifiersTree methodModifier = maker.Modifiers(Collections.<Modifier>singleton(Modifier.PUBLIC));<NEW_LINE>List<VariableTree> paramList <MASK><NEW_LINE>// NOI18N<NEW_LINE>Tree argTypeTree = maker.Identifier("String");<NEW_LINE>ModifiersTree fieldModifier = maker.Modifiers(Collections.<Modifier>emptySet());<NEW_LINE>VariableTree argFieldTree = // NOI18N<NEW_LINE>maker.// NOI18N<NEW_LINE>Variable(// NOI18N<NEW_LINE>fieldModifier, // NOI18N<NEW_LINE>"username", // NOI18N<NEW_LINE>argTypeTree, null);<NEW_LINE>paramList.add(argFieldTree);<NEW_LINE>argFieldTree = // NOI18N<NEW_LINE>maker.// NOI18N<NEW_LINE>Variable(// NOI18N<NEW_LINE>fieldModifier, // NOI18N<NEW_LINE>"password", // NOI18N<NEW_LINE>argTypeTree, null);<NEW_LINE>paramList.add(argFieldTree);<NEW_LINE>String body = // NOI18N<NEW_LINE>"{" + "this();" + "setUsernamePassword(username, password);" + "}";<NEW_LINE>return maker.Constructor(methodModifier, Collections.<TypeParameterTree>emptyList(), paramList, Collections.<ExpressionTree>emptyList(), body);<NEW_LINE>}
= new ArrayList<VariableTree>();
1,590,880
public void randomDisplayTick(@Nonnull IBlockState bs, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull Random rand) {<NEW_LINE>T te = getTileEntity(world, pos);<NEW_LINE>if (PersonalConfig.machineParticlesEnabled.get() && te != null && te.isActive()) {<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < 2; i++) {<NEW_LINE>double px = pos.getX() + 0.5 + front.getFrontOffsetX() * 0.6;<NEW_LINE>double pz = pos.getZ() + 0.5 + front.getFrontOffsetZ() * 0.6;<NEW_LINE>double v = 0.05;<NEW_LINE>double vx = 0;<NEW_LINE>double vz = 0;<NEW_LINE>if (front == EnumFacing.NORTH || front == EnumFacing.SOUTH) {<NEW_LINE>px += world.rand.nextFloat() * 0.9 - 0.45;<NEW_LINE>vz += front == EnumFacing.NORTH ? -v : v;<NEW_LINE>} else {<NEW_LINE>pz += world.rand.nextFloat() * 0.9 - 0.45;<NEW_LINE>vx += front == EnumFacing.WEST ? -v : v;<NEW_LINE>}<NEW_LINE>if (rand.nextInt(20) == 0) {<NEW_LINE>world.spawnParticle(EnumParticleTypes.LAVA, px, pos.getY() + 0.1, pz, 0, 0, 0);<NEW_LINE>}<NEW_LINE>world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, px, pos.getY() + 0.1, pz, vx, 0, vz);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
EnumFacing front = te.getFacing();
926,236
protected ResultSet<O> retrieveEqual(final Equal<O, A> equal, final QueryOptions queryOptions, final SuffixTree<StoredResultSet<O>> tree) {<NEW_LINE>return new ResultSet<O>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Iterator<O> iterator() {<NEW_LINE>ResultSet<O> rs = tree.getValueForExactKey(equal.getValue());<NEW_LINE>return rs == null ? Collections.<O>emptySet().iterator() : rs.iterator();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean contains(O object) {<NEW_LINE>ResultSet<O> rs = tree.getValueForExactKey(equal.getValue());<NEW_LINE>return rs != null && rs.contains(object);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean matches(O object) {<NEW_LINE>return equal.matches(object, queryOptions);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int size() {<NEW_LINE>ResultSet<O> rs = tree.getValueForExactKey(equal.getValue());<NEW_LINE>return rs == null ? 0 : rs.size();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int getRetrievalCost() {<NEW_LINE>return INDEX_RETRIEVAL_COST;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int getMergeCost() {<NEW_LINE>// Return size of entire stored set as merge cost...<NEW_LINE>ResultSet<O> rs = tree.<MASK><NEW_LINE>return rs == null ? 0 : rs.size();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void close() {<NEW_LINE>// No op.<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Query<O> getQuery() {<NEW_LINE>return equal;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public QueryOptions getQueryOptions() {<NEW_LINE>return queryOptions;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
getValueForExactKey(equal.getValue());
1,201,822
public Result process(CvPipeline pipeline) throws Exception {<NEW_LINE>Mat mat = pipeline.getWorkingImage();<NEW_LINE>List<Point> points = new ArrayList<>();<NEW_LINE>byte[] rowData = new byte[mat.cols()];<NEW_LINE>for (int row = 0, rows = mat.rows(); row < rows; row++) {<NEW_LINE>mat.get(row, 0, rowData);<NEW_LINE>for (int col = 0, cols = mat.cols(); col < cols; col++) {<NEW_LINE>int pixel = ((int) rowData[col]) & 0xff;<NEW_LINE>if (pixel >= thresholdMin && pixel <= thresholdMax) {<NEW_LINE>points.add(new Point(col, row));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (points.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>MatOfPoint2f pointsMat = new MatOfPoint2f(points.toArray(<MASK><NEW_LINE>RotatedRect r = Imgproc.minAreaRect(pointsMat);<NEW_LINE>pointsMat.release();<NEW_LINE>return new Result(null, r);<NEW_LINE>}
new Point[] {}));
89,287
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String serverName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (serverName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2018-06-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
903,961
public void keyPressed(final KeyEvent event) {<NEW_LINE>if (event.getKeyCode() == KeyEvent.VK_RIGHT) {<NEW_LINE>if (m_caretPosition != (2 * m_registerModel.getRegisterInformation(m_editedRegister).getRegisterSize())) {<NEW_LINE>m_caretPosition++;<NEW_LINE>}<NEW_LINE>// Consume the event to avoid scrolling<NEW_LINE>event.consume();<NEW_LINE>m_caret.setVisible(true);<NEW_LINE>repaint();<NEW_LINE>} else if (event.getKeyCode() == KeyEvent.VK_LEFT) {<NEW_LINE>if (m_caretPosition != 0) {<NEW_LINE>m_caretPosition--;<NEW_LINE>}<NEW_LINE>// Consume the event to avoid scrolling<NEW_LINE>event.consume();<NEW_LINE>m_caret.setVisible(true);<NEW_LINE>repaint();<NEW_LINE>} else if (event.getKeyCode() == KeyEvent.VK_ENTER) {<NEW_LINE>if (m_editedRegister == -1) {<NEW_LINE>if (m_highlightedRegister != -1) {<NEW_LINE>enterEditMode(m_highlightedRegister);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>leaveEditMode(true);<NEW_LINE>}<NEW_LINE>repaint();<NEW_LINE>} else if (isHexChar(event.getKeyChar())) {<NEW_LINE>final int regSize = m_registerModel.<MASK><NEW_LINE>if (m_caretPosition == (2 * regSize)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Get the input value<NEW_LINE>final long val = hexToValue(event.getKeyChar());<NEW_LINE>// Four bits are relevant for each input character.<NEW_LINE>final long relevantBits = (regSize * 8) - 4 - (m_caretPosition * 4);<NEW_LINE>// Find a mask for the relevant bits<NEW_LINE>final long mask = 0xFL << relevantBits;<NEW_LINE>// Shift the input value into the correct bits.<NEW_LINE>final long shiftedNew = val << relevantBits;<NEW_LINE>// Calculate the new value.<NEW_LINE>m_editValue = m_editValue.and(BigInteger.valueOf(~mask)).or(BigInteger.valueOf(shiftedNew));<NEW_LINE>m_caretPosition++;<NEW_LINE>m_caret.setVisible(true);<NEW_LINE>repaint();<NEW_LINE>}<NEW_LINE>}
getRegisterInformation(m_editedRegister).getRegisterSize();
1,238,841
private JsonRequestBPartnerUpsertItem mapCareGiver(@NonNull final CareGiver careGiver) {<NEW_LINE>final String careGiverId = Optional.ofNullable(careGiver.getId()).map(UUID::toString).orElseThrow(() -> new RuntimeException("Missing careGiver._id!"));<NEW_LINE>final String careGiverExternalIdentifier = formatExternalId(careGiverId);<NEW_LINE>final var bPartner = new JsonRequestBPartner();<NEW_LINE>bPartner.setName(careGiver.getFirstName() + " " + careGiver.getLastName());<NEW_LINE>bPartner.setPhone(careGiver.getPhone());<NEW_LINE>bPartner.setCustomer(true);<NEW_LINE>bPartner.setCode(careGiverExternalIdentifier);<NEW_LINE>final JsonRequestLocationUpsert locationUpsertRequest;<NEW_LINE>{<NEW_LINE>// location<NEW_LINE>final JsonRequestLocation location = new JsonRequestLocation();<NEW_LINE>location.setAddress1(careGiver.getAddress());<NEW_LINE>location.setCity(careGiver.getCity());<NEW_LINE>location.setCountryCode(GetPatientsRouteConstants.COUNTRY_CODE_DE);<NEW_LINE>location.setPostal(careGiver.getPostalCode());<NEW_LINE>locationUpsertRequest = toJsonRequestLocationUpsert(careGiverId, location);<NEW_LINE>}<NEW_LINE>final JsonRequestContactUpsert requestContactUpsert;<NEW_LINE>{<NEW_LINE>// contact<NEW_LINE>final JsonRequestContact contact = new JsonRequestContact();<NEW_LINE>contact.setName(new StringJoiner(" ").add(careGiver.getFirstName()).add(careGiver.getLastName()).toString());<NEW_LINE>contact.setFirstName(careGiver.getFirstName());<NEW_LINE>contact.setLastName(careGiver.getLastName());<NEW_LINE>contact.<MASK><NEW_LINE>contact.setEmail(careGiver.getEmail());<NEW_LINE>contact.setFax(careGiver.getFax());<NEW_LINE>contact.setMobilePhone(careGiver.getMobilePhone());<NEW_LINE>// contact.setLocationIdentifier(careGiverExternalIdentifier); // todo<NEW_LINE>final JsonAlbertaContact albertaContact = new JsonAlbertaContact();<NEW_LINE>albertaContact.setGender(careGiver.getGender());<NEW_LINE>albertaContact.setTitle(careGiver.getTitle() != null ? careGiver.getTitle().toString() : null);<NEW_LINE>albertaContact.setTimestamp(asInstant(careGiver.getTimestamp()));<NEW_LINE>final JsonRequestContactUpsertItem contactUpsertItem = JsonRequestContactUpsertItem.builder().contactIdentifier(careGiverExternalIdentifier).contact(contact).jsonAlbertaContact(albertaContact).build();<NEW_LINE>requestContactUpsert = JsonRequestContactUpsert.builder().requestItem(contactUpsertItem).build();<NEW_LINE>}<NEW_LINE>final JsonCompositeAlbertaBPartner compositeAlbertaBPartner;<NEW_LINE>{<NEW_LINE>// alberta composite<NEW_LINE>final JsonAlbertaBPartner albertaBPartner = new JsonAlbertaBPartner();<NEW_LINE>albertaBPartner.setTimestamp(asInstant(careGiver.getTimestamp()));<NEW_LINE>albertaBPartner.setIsArchived(careGiver.isArchived());<NEW_LINE>compositeAlbertaBPartner = JsonCompositeAlbertaBPartner.builder().jsonAlbertaBPartner(albertaBPartner).role(JsonBPartnerRole.Caregiver).build();<NEW_LINE>}<NEW_LINE>bPartnerIdentifier2RelationRole.put(careGiverExternalIdentifier, JsonBPRelationRole.Caregiver);<NEW_LINE>return JsonRequestBPartnerUpsertItem.builder().bpartnerIdentifier(careGiverExternalIdentifier).bpartnerComposite(JsonRequestComposite.builder().orgCode(orgCode).bpartner(bPartner).compositeAlbertaBPartner(compositeAlbertaBPartner).locations(locationUpsertRequest).contacts(requestContactUpsert).build()).build();<NEW_LINE>}
setPhone(careGiver.getPhone());
572,504
private void loadNode392() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks_OutputArguments, new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks_OutputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks_OutputArguments, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks_OutputArguments, Identifiers.HasProperty, Identifiers.CertificateGroupFolderType_DefaultApplicationGroup_TrustList_OpenWithMasks.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier> </TypeId><Body><Argument><Name>FileHandle</Name><DataType><Identifier>i=7</Identifier> </DataType><ValueRank>-1</ValueRank><ArrayDimensions/> </Argument> </Body> </ExtensionObject> </ListOfExtensionObject>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).<MASK><NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new DataValue(new Variant(o));<NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
setInput(new StringReader(xml));
1,378,488
private HeapHisto collectYoung() throws InterruptedException {<NEW_LINE>// Force full GC<NEW_LINE>long ygc = 0;<NEW_LINE>LongCounter youngGcCnt = null;<NEW_LINE>try {<NEW_LINE>JStatData jsd = JStatData.connect(pid);<NEW_LINE>youngGcCnt = (LongCounter) jsd.getAllCounters().get("sun.gc.collector.0.invocations");<NEW_LINE>ygc = youngGcCnt == null ? 0 : youngGcCnt.getLong();<NEW_LINE>} catch (Exception e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>HeapHisto retained = HeapHisto.getHistoLive(pid, 3000000);<NEW_LINE>System.out.println("Gathering young population ...");<NEW_LINE>long deadline = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(youngSampleDepth);<NEW_LINE>while (System.nanoTime() < deadline) {<NEW_LINE>long sleepTime = TimeUnit.NANOSECONDS.toMillis(deadline - System.nanoTime());<NEW_LINE>if (sleepTime > 0) {<NEW_LINE>Thread.sleep(sleepTime);<NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>HeapHisto histo = HeapHisto.getHistoAll(pid, 300000);<NEW_LINE>if (youngGcCnt != null) {<NEW_LINE>if (ygc != youngGcCnt.getLong()) {<NEW_LINE>System.out.println("Warning: one or more young collections have occured during sampling.");<NEW_LINE>System.out.println("Use --sample-depth option to reduce time to sample if needed.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (youngSampleDepth % 1000 == 0) {<NEW_LINE>System.out.println("Garbage histogram for last " + <MASK><NEW_LINE>} else {<NEW_LINE>System.out.println("Garbage histogram for last " + youngSampleDepth + "ms");<NEW_LINE>}<NEW_LINE>return HeapHisto.subtract(histo, retained);<NEW_LINE>}
(youngSampleDepth / 1000) + "s");
1,290,873
protected JFreeChart createGanttChart() throws JRException {<NEW_LINE>JFreeChart jfreeChart = super.createGanttChart();<NEW_LINE>CategoryPlot categoryPlot = (CategoryPlot) jfreeChart.getPlot();<NEW_LINE>categoryPlot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.STANDARD);<NEW_LINE>categoryPlot.setDomainGridlinesVisible(true);<NEW_LINE>categoryPlot.setDomainGridlinePosition(CategoryAnchor.END);<NEW_LINE>categoryPlot.setDomainGridlineStroke(new BasicStroke(0.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 50, new float[] { 1 }, 0));<NEW_LINE>categoryPlot.setDomainGridlinePaint(ChartThemesConstants.GRAY_PAINT_134);<NEW_LINE>categoryPlot.setRangeGridlinesVisible(true);<NEW_LINE>categoryPlot.setRangeGridlineStroke(new BasicStroke(0.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 50, new float[<MASK><NEW_LINE>categoryPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_134);<NEW_LINE>// barPlot.isShowTickLabels()<NEW_LINE>categoryPlot.getDomainAxis().// barPlot.isShowTickLabels()<NEW_LINE>setTickLabelsVisible(true);<NEW_LINE>CategoryItemRenderer categoryRenderer = categoryPlot.getRenderer();<NEW_LINE>categoryRenderer.setBaseItemLabelsVisible(true);<NEW_LINE>BarRenderer barRenderer = (BarRenderer) categoryRenderer;<NEW_LINE>barRenderer.setSeriesPaint(0, ChartThemesConstants.EYE_CANDY_SIXTIES_COLORS.get(3));<NEW_LINE>barRenderer.setSeriesPaint(1, ChartThemesConstants.EYE_CANDY_SIXTIES_COLORS.get(0));<NEW_LINE>CategoryDataset categoryDataset = categoryPlot.getDataset();<NEW_LINE>if (categoryDataset != null) {<NEW_LINE>for (int i = 0; i < categoryDataset.getRowCount(); i++) {<NEW_LINE>barRenderer.setSeriesItemLabelFont(i, categoryPlot.getDomainAxis().getTickLabelFont());<NEW_LINE>barRenderer.setSeriesItemLabelsVisible(i, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>categoryPlot.setOutlinePaint(Color.DARK_GRAY);<NEW_LINE>categoryPlot.setOutlineStroke(new BasicStroke(1.5f));<NEW_LINE>categoryPlot.setOutlineVisible(true);<NEW_LINE>return jfreeChart;<NEW_LINE>}
] { 1 }, 0));
1,297,864
public static void registerType(ModelBuilder modelBuilder) {<NEW_LINE>ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Association.class, CMMN_ELEMENT_ASSOCIATION).namespaceUri(CMMN11_NS).extendsType(Artifact.class).instanceProvider(new ModelTypeInstanceProvider<Association>() {<NEW_LINE><NEW_LINE>public Association newInstance(ModelTypeInstanceContext instanceContext) {<NEW_LINE>return new AssociationImpl(instanceContext);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF).idAttributeReference(CmmnElement.class).build();<NEW_LINE>targetRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_TARGET_REF).idAttributeReference(CmmnElement.class).build();<NEW_LINE>associationDirectionAttribute = typeBuilder.enumAttribute(CMMN_ATTRIBUTE_ASSOCIATION_DIRECTION, <MASK><NEW_LINE>typeBuilder.build();<NEW_LINE>}
AssociationDirection.class).build();
501,606
public ElasticsearchSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ElasticsearchSettings elasticsearchSettings = new ElasticsearchSettings();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("ServiceAccessRoleArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>elasticsearchSettings.setServiceAccessRoleArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("EndpointUri", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>elasticsearchSettings.setEndpointUri(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("FullLoadErrorPercentage", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>elasticsearchSettings.setFullLoadErrorPercentage(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("ErrorRetryDuration", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>elasticsearchSettings.setErrorRetryDuration(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return elasticsearchSettings;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
184,656
public Integer save(ConsumptionInfo info, String operator) {<NEW_LINE>log.debug("begin to save consumption info={}", info);<NEW_LINE>Preconditions.checkNotNull(info, "consumption info cannot be null");<NEW_LINE>Preconditions.checkNotNull(info.getTopic(), "consumption topic cannot be empty");<NEW_LINE>if (isConsumerGroupExists(info.getConsumerGroup(), info.getId())) {<NEW_LINE>throw new BusinessException(String.format("consumer group %s already exist", info.getConsumerGroup()));<NEW_LINE>}<NEW_LINE>if (info.getId() != null) {<NEW_LINE>ConsumptionEntity consumptionEntity = consumptionMapper.selectByPrimaryKey(info.getId());<NEW_LINE>Preconditions.checkNotNull(consumptionEntity, "consumption not exist with id: " + info.getId());<NEW_LINE>ConsumptionStatus consumptionStatus = ConsumptionStatus.fromStatus(consumptionEntity.getStatus());<NEW_LINE>Preconditions.checkTrue(ConsumptionStatus.ALLOW_SAVE_UPDATE_STATUS.contains(consumptionStatus), "consumption not allow update when status is " + consumptionStatus.name());<NEW_LINE>}<NEW_LINE>setTopicInfo(info);<NEW_LINE>ConsumptionEntity entity = this.saveConsumption(info, operator);<NEW_LINE>String mqType = entity.getMqType();<NEW_LINE>if (MQType.PULSAR.equals(mqType) || MQType.TDMQ_PULSAR.equals(mqType)) {<NEW_LINE>savePulsarInfo(<MASK><NEW_LINE>}<NEW_LINE>log.info("success to save consumption info by user={}", operator);<NEW_LINE>return entity.getId();<NEW_LINE>}
info.getMqExtInfo(), entity);
357,675
public ByteBuffer read(long offset, long length) throws IOException {<NEW_LINE>Preconditions.checkState(!mClosed);<NEW_LINE>updateUnderFileSystemInputStream(offset);<NEW_LINE>updateBlockWriter(offset);<NEW_LINE>long bytesToRead = Math.min(length, mBlockMeta.getBlockSize() - offset);<NEW_LINE>if (bytesToRead <= 0) {<NEW_LINE>return ByteBuffer.allocate(0);<NEW_LINE>}<NEW_LINE>byte[] data = <MASK><NEW_LINE>int bytesRead = 0;<NEW_LINE>Preconditions.checkNotNull(mUnderFileSystemInputStream, "mUnderFileSystemInputStream");<NEW_LINE>while (bytesRead < bytesToRead) {<NEW_LINE>int read;<NEW_LINE>try {<NEW_LINE>read = mUnderFileSystemInputStream.read(data, bytesRead, (int) (bytesToRead - bytesRead));<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw AlluxioStatusException.fromIOException(e);<NEW_LINE>}<NEW_LINE>if (read == -1) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>bytesRead += read;<NEW_LINE>}<NEW_LINE>mInStreamPos += bytesRead;<NEW_LINE>// We should always read the number of bytes as expected since the UFS file length (hence block<NEW_LINE>// size) should be always accurate.<NEW_LINE>Preconditions.checkState(bytesRead == bytesToRead, PreconditionMessage.NOT_ENOUGH_BYTES_READ.toString(), bytesRead, bytesToRead, mBlockMeta.getUnderFileSystemPath());<NEW_LINE>if (mBlockWriter != null && mBlockWriter.getPosition() < mInStreamPos) {<NEW_LINE>try {<NEW_LINE>Preconditions.checkState(mBlockWriter.getPosition() >= offset);<NEW_LINE>mLocalBlockStore.requestSpace(mBlockMeta.getSessionId(), mBlockMeta.getBlockId(), mInStreamPos - mBlockWriter.getPosition());<NEW_LINE>ByteBuffer buffer = ByteBuffer.wrap(data, (int) (mBlockWriter.getPosition() - offset), (int) (mInStreamPos - mBlockWriter.getPosition()));<NEW_LINE>mBlockWriter.append(buffer.duplicate());<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.warn("Failed to cache data read from UFS (on read()): {}", e.toString());<NEW_LINE>try {<NEW_LINE>cancelBlockWriter();<NEW_LINE>} catch (IOException ee) {<NEW_LINE>LOG.error("Failed to cancel block writer:", ee);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mCounter.inc(bytesRead);<NEW_LINE>mMeter.mark(bytesRead);<NEW_LINE>return ByteBuffer.wrap(data, 0, bytesRead);<NEW_LINE>}
new byte[(int) bytesToRead];
1,709,129
protected void processKeyEvent(KeyEvent event) {<NEW_LINE>if (event.getID() == KeyEvent.KEY_RELEASED) {<NEW_LINE>int row = getSelectedRow();<NEW_LINE>if (row != -1) {<NEW_LINE>if (event.getKeyCode() == KeyEvent.VK_LEFT) {<NEW_LINE>if (treeRenderer.isExpanded(row)) {<NEW_LINE>treeRenderer.collapseRow(row);<NEW_LINE>} else {<NEW_LINE>int parentRow = treeRenderer.getRowForPath(treeRenderer.getPathForRow<MASK><NEW_LINE>treeRenderer.collapseRow(parentRow);<NEW_LINE>getSelectionModel().setSelectionInterval(parentRow, parentRow);<NEW_LINE>}<NEW_LINE>event.consume();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (event.getKeyCode() == KeyEvent.VK_RIGHT) {<NEW_LINE>if (treeRenderer.isCollapsed(row)) {<NEW_LINE>treeRenderer.expandRow(row);<NEW_LINE>}<NEW_LINE>event.consume();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>super.processKeyEvent(event);<NEW_LINE>}
(row).getParentPath());
361,998
public void shutdownAndAwait() {<NEW_LINE>Map<RaftGroupId, InternalCompletableFuture<Object>> futures = super.shutdown();<NEW_LINE>ILogger logger = client.getLoggingService().getLogger(getClass());<NEW_LINE>long remainingTimeNanos = <MASK><NEW_LINE>while (remainingTimeNanos > 0) {<NEW_LINE>int closed = 0;<NEW_LINE>for (Entry<RaftGroupId, InternalCompletableFuture<Object>> entry : futures.entrySet()) {<NEW_LINE>CPGroupId groupId = entry.getKey();<NEW_LINE>InternalCompletableFuture<Object> f = entry.getValue();<NEW_LINE>if (f.isDone()) {<NEW_LINE>closed++;<NEW_LINE>try {<NEW_LINE>f.get();<NEW_LINE>logger.fine("Session closed for " + groupId);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.warning("Close session failed for " + groupId, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (closed == futures.size()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Thread.sleep(SHUTDOWN_WAIT_SLEEP_MILLIS);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>remainingTimeNanos -= MILLISECONDS.toNanos(SHUTDOWN_WAIT_SLEEP_MILLIS);<NEW_LINE>}<NEW_LINE>}
TimeUnit.SECONDS.toNanos(SHUTDOWN_TIMEOUT_SECONDS);
53,650
private void loadNode284() {<NEW_LINE>TwoStateVariableTypeNode node = new TwoStateVariableTypeNode(this.context, Identifiers.AcknowledgeableConditionType_EnabledState, new QualifiedName(0, "EnabledState"), new LocalizedText("en", "EnabledState"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.LocalizedText, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.AcknowledgeableConditionType_EnabledState, Identifiers.HasProperty, Identifiers.AcknowledgeableConditionType_EnabledState_Id.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AcknowledgeableConditionType_EnabledState, Identifiers.HasTrueSubState, Identifiers.AcknowledgeableConditionType_AckedState.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AcknowledgeableConditionType_EnabledState, Identifiers.HasTrueSubState, Identifiers.AcknowledgeableConditionType_ConfirmedState.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AcknowledgeableConditionType_EnabledState, Identifiers.HasTypeDefinition, Identifiers.TwoStateVariableType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AcknowledgeableConditionType_EnabledState, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.AcknowledgeableConditionType_EnabledState, Identifiers.HasComponent, Identifiers.AcknowledgeableConditionType.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
1,606,953
public void addProjectTags(AddProjectTags request, StreamObserver<AddProjectTags.Response> responseObserver) {<NEW_LINE>try {<NEW_LINE>final var response = futureProjectDAO.addTags(request).thenCompose(unused -> futureProjectDAO.getProjectById(request.getId()), executor).thenCompose(updatedProject -> addEvent(updatedProject.getId(), updatedProject.getWorkspaceServiceId(), UPDATE_PROJECT_EVENT_TYPE, Optional.of("tags"), Collections.singletonMap("tags", new Gson().toJsonTree(request.getTagsList(), new TypeToken<ArrayList<String>>() {<NEW_LINE>}.getType())), "project tags updated successfully").thenApply(eventLoggedStatus -> updatedProject, executor), executor).thenApply(updatedProject -> AddProjectTags.Response.newBuilder().setProject(updatedProject).build(), executor);<NEW_LINE>FutureGrpc.ServerResponse(responseObserver, response, executor);<NEW_LINE>} catch (Exception e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
CommonUtils.observeError(responseObserver, e);
122,540
private int copySetRecord(HollowSetSchema engineSchema, int currentRecordPointer, int currentRecordOrdinal) {<NEW_LINE>HollowSetWriteRecord rec = engineSchema != null ? (<MASK><NEW_LINE>int numElements = VarInt.readVInt(record.data, currentRecordPointer);<NEW_LINE>currentRecordPointer += VarInt.sizeOfVInt(numElements);<NEW_LINE>int unmappedOrdinal = 0;<NEW_LINE>for (int i = 0; i < numElements; i++) {<NEW_LINE>int unmappedOrdinalDelta = VarInt.readVInt(record.data, currentRecordPointer);<NEW_LINE>currentRecordPointer += VarInt.sizeOfVInt(unmappedOrdinalDelta);<NEW_LINE>unmappedOrdinal += unmappedOrdinalDelta;<NEW_LINE>if (rec != null) {<NEW_LINE>int mappedOrdinal = ordinalMapping.get(unmappedOrdinal);<NEW_LINE>rec.addElement(mappedOrdinal);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (engineSchema != null) {<NEW_LINE>int stateEngineOrdinal = stateEngine.add(engineSchema.getName(), rec);<NEW_LINE>ordinalMapping.put(currentRecordOrdinal, stateEngineOrdinal);<NEW_LINE>}<NEW_LINE>return currentRecordPointer;<NEW_LINE>}
HollowSetWriteRecord) getWriteRecord(engineSchema) : null;
1,293,543
private void loadCustomPrefixes(ArrayList<String> sourcePrefixes) {<NEW_LINE>s_logger.log(Level.FINE, "loadCustomPrefixes", getDirection());<NEW_LINE>ArrayList<String> entityTypes = new ArrayList<String>();<NEW_LINE>StringBuffer result = new StringBuffer();<NEW_LINE>String sql = s_dbEngine.sqlAD_getCustomEntityPrefixes(getVendor(), getCatalog(), getSchema());<NEW_LINE>ResultSet rs = null;<NEW_LINE>java.sql.Statement stmt = null;<NEW_LINE>if (isObjectExists("ad_entitytype", m_tables)) {<NEW_LINE>stmt = setStatement();<NEW_LINE>rs = executeQuery(stmt, sql);<NEW_LINE>while (getResultSetNext(rs)) {<NEW_LINE>String s = getResultSetString(<MASK><NEW_LINE>if (!entityTypes.contains(s)) {<NEW_LINE>if (isTarget()) {<NEW_LINE>if (sourcePrefixes != null) {<NEW_LINE>// exclude prefixes which are already defined in source<NEW_LINE>// (the source is the system reference database, so if the source<NEW_LINE>// includes customizations, they should be regarded as system<NEW_LINE>// entities and replace those in the target database)<NEW_LINE>if (!sourcePrefixes.contains(s)) {<NEW_LINE>entityTypes.add(s);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>entityTypes.add(s);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>entityTypes.add(s);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>releaseResultSet(rs);<NEW_LINE>releaseStatement(stmt);<NEW_LINE>}<NEW_LINE>// make sure the default types are included<NEW_LINE>if (!entityTypes.contains("CUST"))<NEW_LINE>entityTypes.add("CUST");<NEW_LINE>if (!entityTypes.contains("EXT"))<NEW_LINE>entityTypes.add("EXT");<NEW_LINE>if (!entityTypes.contains("XX"))<NEW_LINE>entityTypes.add("XX");<NEW_LINE>// sort and save list<NEW_LINE>java.util.Collections.sort(entityTypes);<NEW_LINE>m_customPrefixes = new ArrayList<String>(entityTypes);<NEW_LINE>// build formatted output string<NEW_LINE>for (Iterator<String> it = entityTypes.iterator(); it.hasNext(); ) {<NEW_LINE>String s = it.next();<NEW_LINE>if (result.length() > 0)<NEW_LINE>result.append(", ");<NEW_LINE>result.append(s).append("_");<NEW_LINE>}<NEW_LINE>s_logger.log(Level.FINE, "customPrefixesLoaded", new Object[] { getDirection(), result });<NEW_LINE>s_logger.flush();<NEW_LINE>}
rs, "EntityType").toUpperCase();
62,986
public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {<NEW_LINE>LeafReader reader = context.reader();<NEW_LINE>PointValues values = reader.getPointValues(field);<NEW_LINE>if (values == null) {<NEW_LINE>// No docs in this segment had any points fields<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>FieldInfo fieldInfo = reader.getFieldInfos().fieldInfo(field);<NEW_LINE>if (fieldInfo == null) {<NEW_LINE>// No docs in this segment indexed this field at all<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>XYPointField.checkCompatible(fieldInfo);<NEW_LINE>final Weight weight = this;<NEW_LINE>return new ScorerSupplier() {<NEW_LINE><NEW_LINE>long cost = -1;<NEW_LINE><NEW_LINE>DocIdSetBuilder result = new DocIdSetBuilder(reader.maxDoc(), values, field);<NEW_LINE><NEW_LINE>final IntersectVisitor <MASK><NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Scorer get(long leadCost) throws IOException {<NEW_LINE>values.intersect(visitor);<NEW_LINE>return new ConstantScoreScorer(weight, score(), scoreMode, result.build().iterator());<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public long cost() {<NEW_LINE>if (cost == -1) {<NEW_LINE>// Computing the cost may be expensive, so only do it if necessary<NEW_LINE>cost = values.estimateDocCount(visitor);<NEW_LINE>assert cost >= 0;<NEW_LINE>}<NEW_LINE>return cost;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
visitor = getIntersectVisitor(result, tree);
818,380
public double regress(DataPoint data) {<NEW_LINE>if (regressor == null || vc == null)<NEW_LINE>throw new UntrainedModelException("Model has not been trained");<NEW_LINE>List<? extends VecPaired<VecPaired<Vec, Double>, Double>> knn = vc.search(data.getNumericalValues(), k);<NEW_LINE>RegressionDataSet localSet = new RegressionDataSet(knn.get(0).length(<MASK><NEW_LINE>double maxD = knn.get(knn.size() - 1).getPair();<NEW_LINE>for (int i = 0; i < knn.size(); i++) {<NEW_LINE>VecPaired<VecPaired<Vec, Double>, Double> v = knn.get(i);<NEW_LINE>localSet.addDataPoint(v, v.getVector().getPair());<NEW_LINE>localSet.setWeight(i, kf.k(v.getPair() / maxD));<NEW_LINE>}<NEW_LINE>Regressor localRegressor = regressor.clone();<NEW_LINE>localRegressor.train(localSet);<NEW_LINE>return localRegressor.regress(data);<NEW_LINE>}
), new CategoricalData[0]);
1,265,388
public KMTTransitInfo parseInfo(@NonNull FelicaCard card) {<NEW_LINE>FelicaService serviceID = card.getSystem(SYSTEMCODE_KMT).getService(FELICA_SERVICE_KMT_ID);<NEW_LINE>ByteArray serialNumber;<NEW_LINE>if (serviceID != null) {<NEW_LINE>serialNumber = new ByteArray(serviceID.getBlocks().get(0).<MASK><NEW_LINE>} else {<NEW_LINE>serialNumber = new ByteArray("000000000000000".getBytes());<NEW_LINE>}<NEW_LINE>FelicaService serviceBalance = card.getSystem(SYSTEMCODE_KMT).getService(FELICA_SERVICE_KMT_BALANCE);<NEW_LINE>int currentBalance = 0;<NEW_LINE>if (serviceBalance != null) {<NEW_LINE>List<FelicaBlock> blocksBalance = serviceBalance.getBlocks();<NEW_LINE>FelicaBlock blockBalance = blocksBalance.get(0);<NEW_LINE>byte[] dataBalance = blockBalance.getData().bytes();<NEW_LINE>currentBalance = Util.toInt(dataBalance[3], dataBalance[2], dataBalance[1], dataBalance[0]);<NEW_LINE>}<NEW_LINE>FelicaService serviceHistory = card.getSystem(SYSTEMCODE_KMT).getService(FELICA_SERVICE_KMT_HISTORY);<NEW_LINE>List<Trip> trips = new ArrayList<>();<NEW_LINE>List<FelicaBlock> blocks = serviceHistory.getBlocks();<NEW_LINE>for (int i = 0; i < blocks.size(); i++) {<NEW_LINE>FelicaBlock block = blocks.get(i);<NEW_LINE>if (block.getData().bytes()[0] != 0) {<NEW_LINE>KMTTrip trip = KMTTrip.create(block);<NEW_LINE>trips.add(trip);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return KMTTransitInfo.create(trips, serialNumber, currentBalance);<NEW_LINE>}
getData().bytes());
1,226,870
private Comment buildComment() {<NEW_LINE>Comment comment = new Comment();<NEW_LINE>comment.comment = args.getString(InitBundle.MESSAGE);<NEW_LINE>comment.spoiler = args.getBoolean(InitBundle.ISSPOILER);<NEW_LINE>// episode?<NEW_LINE>long episodeId = args.getLong(InitBundle.EPISODE_ID);<NEW_LINE>if (episodeId != 0) {<NEW_LINE>// Check in using episode TMDB ID<NEW_LINE>// Note: using show Trakt ID and episode numbers does not work (comments on show).<NEW_LINE>int episodeTmdbIdOrZero = SgRoomDatabase.getInstance(context).sgEpisode2Helper().getEpisodeTmdbId(episodeId);<NEW_LINE>if (episodeTmdbIdOrZero == 0) {<NEW_LINE>Timber.e("Failed to get episode %d", episodeId);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>comment.episode = new Episode();<NEW_LINE>comment.episode.ids = EpisodeIds.tmdb(episodeTmdbIdOrZero);<NEW_LINE>return comment;<NEW_LINE>}<NEW_LINE>// show?<NEW_LINE>long showId = args.getLong(InitBundle.SHOW_ID);<NEW_LINE>if (showId != 0) {<NEW_LINE>Integer showTraktId = <MASK><NEW_LINE>if (showTraktId == null) {<NEW_LINE>Timber.e("Failed to get show %d", showId);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>comment.show = new Show();<NEW_LINE>comment.show.ids = ShowIds.trakt(showTraktId);<NEW_LINE>return comment;<NEW_LINE>}<NEW_LINE>// movie!<NEW_LINE>int movieTmdbId = args.getInt(InitBundle.MOVIE_TMDB_ID);<NEW_LINE>comment.movie = new Movie();<NEW_LINE>comment.movie.ids = MovieIds.tmdb(movieTmdbId);<NEW_LINE>return comment;<NEW_LINE>}
ShowTools.getShowTraktId(context, showId);
1,769,299
public String template(Cursor cursor, String template, Space.Location location) {<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>return Timer.builder("rewrite.template.generate.statement").register(Metrics.globalRegistry).record(() -> {<NEW_LINE>StringBuilder before = new StringBuilder();<NEW_LINE>StringBuilder after = new StringBuilder();<NEW_LINE>// for replaceBody()<NEW_LINE>if (cursor.getValue() instanceof J.MethodDeclaration && location.equals(Space.Location.BLOCK_PREFIX)) {<NEW_LINE>J.<MASK><NEW_LINE>J.MethodDeclaration m = method.withBody(null).withLeadingAnnotations(emptyList()).withPrefix(Space.EMPTY);<NEW_LINE>before.insert(0, m.printTrimmed(cursor).trim() + '{');<NEW_LINE>after.append('}');<NEW_LINE>}<NEW_LINE>template(next(cursor), cursor.getValue(), before, after, newSetFromMap(new IdentityHashMap<>()));<NEW_LINE>return before.toString().trim() + "\n/*" + TEMPLATE_COMMENT + "*/" + template + "\n" + after;<NEW_LINE>});<NEW_LINE>}
MethodDeclaration method = cursor.getValue();
1,843,177
public Column createColumn() {<NEW_LINE>Column c = new Column();<NEW_LINE>c.setName(name);<NEW_LINE>c.setType(type);<NEW_LINE>if (notnull)<NEW_LINE>c.setNotnull(true);<NEW_LINE>if (primaryKey)<NEW_LINE>c.setPrimaryKey(true);<NEW_LINE>if (identity)<NEW_LINE>c.setIdentity(true);<NEW_LINE>if (historyExclude)<NEW_LINE>c.setHistoryExclude(true);<NEW_LINE>c.setCheckConstraint(checkConstraint);<NEW_LINE>c.setCheckConstraintName(checkConstraintName);<NEW_LINE>c.setReferences(references);<NEW_LINE>c.setForeignKeyName(foreignKeyName);<NEW_LINE>c.setForeignKeyIndex(foreignKeyIndex);<NEW_LINE>c.setForeignKeyOnDelete(fkeyModeOf(fkeyOnDelete));<NEW_LINE>c<MASK><NEW_LINE>c.setDefaultValue(defaultValue);<NEW_LINE>c.setComment(comment);<NEW_LINE>c.setUnique(unique);<NEW_LINE>c.setUniqueOneToOne(uniqueOneToOne);<NEW_LINE>if (dbMigrationInfos != null) {<NEW_LINE>for (DbMigrationInfo info : dbMigrationInfos) {<NEW_LINE>if (!info.getPreAdd().isEmpty()) {<NEW_LINE>DdlScript script = new DdlScript();<NEW_LINE>script.getDdl().addAll(info.getPreAdd());<NEW_LINE>script.setPlatforms(info.joinPlatforms());<NEW_LINE>c.getBefore().add(script);<NEW_LINE>}<NEW_LINE>if (!info.getPostAdd().isEmpty()) {<NEW_LINE>DdlScript script = new DdlScript();<NEW_LINE>script.getDdl().addAll(info.getPostAdd());<NEW_LINE>script.setPlatforms(info.joinPlatforms());<NEW_LINE>c.getAfter().add(script);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return c;<NEW_LINE>}
.setForeignKeyOnUpdate(fkeyModeOf(fkeyOnUpdate));
359,851
public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>getActiveTservers_result result = new getActiveTservers_result();<NEW_LINE>if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) {<NEW_LINE>result.sec = (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e;<NEW_LINE>result.setSecIsSet(true);<NEW_LINE>msg = result;<NEW_LINE>} else if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException) {<NEW_LINE>result.tnase = (org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException) e;<NEW_LINE>result.setTnaseIsSet(true);<NEW_LINE>msg = result;<NEW_LINE>} else if (e instanceof org.apache.thrift.transport.TTransportException) {<NEW_LINE>_LOGGER.error("TTransportException inside handler", e);<NEW_LINE>fb.close();<NEW_LINE>return;<NEW_LINE>} else if (e instanceof org.apache.thrift.TApplicationException) {<NEW_LINE>_LOGGER.error("TApplicationException inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = (org.apache.thrift.TApplicationException) e;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>fcall.sendResponse(fb, msg, msgType, seqid);<NEW_LINE>} catch (java.lang.Exception ex) {<NEW_LINE>_LOGGER.error("Exception writing to internal frame buffer", ex);<NEW_LINE>fb.close();<NEW_LINE>}<NEW_LINE>}
_LOGGER.error("Exception inside handler", e);
1,686,346
private void startRootServer(@NonNull Context context, @NonNull Intent intent) throws IOException, InterruptedException, RemoteException {<NEW_LINE>// Register BinderReceiver to receive binder from root process<NEW_LINE>IntentFilter filter = new IntentFilter(getBroadcastAction(name));<NEW_LINE>context.registerReceiver(new BinderReceiver(), filter);<NEW_LINE>// Strip extra and add our own data<NEW_LINE>intent = intent.cloneFilter();<NEW_LINE>String debugParams;<NEW_LINE>if (Debug.isDebuggerConnected()) {<NEW_LINE>// Also debug the remote root server<NEW_LINE>// Reference of the params to start jdwp:<NEW_LINE>// https://developer.android.com/ndk/guides/wrap-script#debugging_when_using_wrapsh<NEW_LINE>intent.putExtra(INTENT_DEBUG_KEY, true);<NEW_LINE>if (Build.VERSION.SDK_INT < 28) {<NEW_LINE>debugParams = "-Xrunjdwp:transport=dt_android_adb,suspend=n,server=y -Xcompiler-option --debuggable";<NEW_LINE>} else if (Build.VERSION.SDK_INT == 28) {<NEW_LINE>debugParams = "-XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y -Xcompiler-option --debuggable";<NEW_LINE>} else {<NEW_LINE>debugParams = "-XjdwpProvider:adbconnection";<NEW_LINE>}<NEW_LINE>} else<NEW_LINE>debugParams = "";<NEW_LINE>Bundle bundle = new Bundle();<NEW_LINE>bundle.putBinder(BUNDLE_BINDER_KEY, new Binder());<NEW_LINE>intent.putExtra(INTENT_EXTRA_KEY, bundle);<NEW_LINE>Log.e(TAG, "Running service starter script...");<NEW_LINE>broadcastWatcher = new CountDownLatch(1);<NEW_LINE>String cmd = getRunnerScript(context, name, IPCServer.class.getName(), debugParams);<NEW_LINE>if (Ops.isRoot()) {<NEW_LINE>if (!Runner.runCommand(Runner.getRootInstance(), cmd).isSuccessful()) {<NEW_LINE>Log.e(TAG, "Couldn't start service.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else if (Ops.isAdb()) {<NEW_LINE>if (LocalServer.getInstance().runCommand(cmd).getStatusCode() != 0) {<NEW_LINE>Log.e(TAG, "Couldn't start service.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Wait for broadcast receiver<NEW_LINE>broadcastWatcher.await();<NEW_LINE>// Broadcast is received<NEW_LINE>server.asBinder(<MASK><NEW_LINE>binder = server.bind(intent);<NEW_LINE>}
).linkToDeath(this, 0);
1,176,571
// ===================================================================================<NEW_LINE>// Basic Override<NEW_LINE>// ==============<NEW_LINE>@Override<NEW_LINE>protected String doBuildColumnString(String dm) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(dm).append(createdBy);<NEW_LINE>sb.append(dm).append(createdTime);<NEW_LINE>sb.append(dm).append(excludedPaths);<NEW_LINE>sb.append(dm).append(includedPaths);<NEW_LINE>sb.append<MASK><NEW_LINE>sb.append(dm).append(permissions);<NEW_LINE>sb.append(dm).append(sortOrder);<NEW_LINE>sb.append(dm).append(updatedBy);<NEW_LINE>sb.append(dm).append(updatedTime);<NEW_LINE>sb.append(dm).append(value);<NEW_LINE>sb.append(dm).append(virtualHost);<NEW_LINE>if (sb.length() > dm.length()) {<NEW_LINE>sb.delete(0, dm.length());<NEW_LINE>}<NEW_LINE>sb.insert(0, "{").append("}");<NEW_LINE>return sb.toString();<NEW_LINE>}
(dm).append(name);
1,046,451
private static void consistencyCheckSchemaIndexes(IndexAccessors indexes, InconsistencyReport report, ProgressListener listener, CursorContext cursorContext) {<NEW_LINE>if (hasNodeLabelIndex(indexes)) {<NEW_LINE>consistencyCheckSingleCheckable(report, listener, indexes.nodeLabelIndex(), RecordType.LABEL_SCAN_DOCUMENT, cursorContext);<NEW_LINE>}<NEW_LINE>if (hasRelationshipTypeIndex(indexes)) {<NEW_LINE>consistencyCheckSingleCheckable(report, listener, indexes.relationshipTypeIndex(), RecordType.RELATIONSHIP_TYPE_SCAN_DOCUMENT, cursorContext);<NEW_LINE>}<NEW_LINE>List<IndexDescriptor> rulesToRemove = new ArrayList<>();<NEW_LINE>for (IndexDescriptor onlineRule : indexes.onlineRules()) {<NEW_LINE>ConsistencyReporter.FormattingDocumentedHandler handler = ConsistencyReporter.formattingHandler(report, RecordType.INDEX);<NEW_LINE>ReporterFactory reporterFactory = new ReporterFactory(handler);<NEW_LINE>IndexAccessor <MASK><NEW_LINE>if (!accessor.consistencyCheck(reporterFactory, cursorContext)) {<NEW_LINE>rulesToRemove.add(onlineRule);<NEW_LINE>}<NEW_LINE>handler.updateSummary();<NEW_LINE>listener.add(1);<NEW_LINE>}<NEW_LINE>for (IndexDescriptor toRemove : rulesToRemove) {<NEW_LINE>indexes.remove(toRemove);<NEW_LINE>}<NEW_LINE>}
accessor = indexes.accessorFor(onlineRule);
563,213
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {<NEW_LINE>SimpleMetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory(applicationContext);<NEW_LINE>DefaultListableBeanFactory defaultListableBeanFactory = (DefaultListableBeanFactory) beanFactory;<NEW_LINE>String resolvedPath = resolvePackageToScan();<NEW_LINE>logger.debug("Scanning '{}' for JSON-RPC service interfaces.", resolvedPath);<NEW_LINE>try {<NEW_LINE>for (Resource resource : applicationContext.getResources(resolvedPath)) {<NEW_LINE>if (resource.isReadable()) {<NEW_LINE>MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(resource);<NEW_LINE>ClassMetadata classMetadata = metadataReader.getClassMetadata();<NEW_LINE>AnnotationMetadata annotationMetadata = metadataReader.getAnnotationMetadata();<NEW_LINE>String jsonRpcPathAnnotation <MASK><NEW_LINE>if (annotationMetadata.isAnnotated(jsonRpcPathAnnotation)) {<NEW_LINE>String className = classMetadata.getClassName();<NEW_LINE>String path = (String) annotationMetadata.getAnnotationAttributes(jsonRpcPathAnnotation).get("value");<NEW_LINE>path = this.environment.resolvePlaceholders(path);<NEW_LINE>logger.debug("Found JSON-RPC service to proxy [{}] on path '{}'.", className, path);<NEW_LINE>registerJsonProxyBean(defaultListableBeanFactory, className, path);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IllegalStateException(format("Cannot scan package '%s' for classes.", resolvedPath), e);<NEW_LINE>}<NEW_LINE>}
= JsonRpcService.class.getName();
1,494,833
public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent sacrificed = source.getCosts().stream().filter(SacrificeTargetCost.class::isInstance).map(SacrificeTargetCost.class::cast).map(SacrificeTargetCost::getPermanents).flatMap(Collection::stream).findFirst().orElse(null);<NEW_LINE>if (player == null || sacrificed == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>FilterCard filterCard = new FilterArtifactCard("artifact card with mana value " + (sacrificed<MASK><NEW_LINE>filterCard.add(new ManaValuePredicate(ComparisonType.EQUAL_TO, sacrificed.getManaValue() + 1));<NEW_LINE>TargetCardInLibrary target = new TargetCardInLibrary(filterCard);<NEW_LINE>player.searchLibrary(target, source, game);<NEW_LINE>Card card = player.getLibrary().getCard(target.getFirstTarget(), game);<NEW_LINE>player.moveCards(card, Zone.BATTLEFIELD, source, game);<NEW_LINE>player.shuffleLibrary(source, game);<NEW_LINE>return true;<NEW_LINE>}
.getManaValue() + 1));
861,107
public NaiveBayesTextTrainBatchOp linkFrom(BatchOperator<?>... inputs) {<NEW_LINE>BatchOperator<?> in = checkAndGetFirst(inputs);<NEW_LINE>TypeInformation<?> labelType;<NEW_LINE>String labelColName = getLabelCol();<NEW_LINE>ModelType modelType = getModelType();<NEW_LINE>String weightColName = getWeightCol();<NEW_LINE>double smoothing = getSmoothing();<NEW_LINE>String vectorColName = getVectorCol();<NEW_LINE>labelType = TableUtil.findColTypeWithAssertAndHint(in.getSchema(), labelColName);<NEW_LINE>String[] keepColNames = (weightColName == null) ? new String[] { labelColName } : new String[] { weightColName, labelColName };<NEW_LINE>Tuple2<DataSet<Tuple2<Vector, Row>>, DataSet<BaseVectorSummary>> dataSrt = StatisticsHelper.summaryHelper(<MASK><NEW_LINE>DataSet<Tuple2<Vector, Row>> data = dataSrt.f0;<NEW_LINE>DataSet<BaseVectorSummary> srt = dataSrt.f1;<NEW_LINE>DataSet<Integer> vectorSize = srt.map(new MapFunction<BaseVectorSummary, Integer>() {<NEW_LINE><NEW_LINE>private static final long serialVersionUID = -4626037497952553113L;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Integer map(BaseVectorSummary value) {<NEW_LINE>return value.vectorSize();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// Transform data in the form of label, weight, feature.<NEW_LINE>DataSet<Tuple3<Object, Double, Vector>> trainData = data.mapPartition(new Transform());<NEW_LINE>DataSet<Tuple3<Object, Double, Vector>> labelFeatureInfo = trainData.groupBy(new SelectLabel()).reduceGroup(new ReduceItem()).withBroadcastSet(vectorSize, "vectorSize");<NEW_LINE>String[] featureCols = null;<NEW_LINE>if (getParams().contains(HasFeatureCols.FEATURE_COLS)) {<NEW_LINE>featureCols = getParams().get(HasFeatureCols.FEATURE_COLS);<NEW_LINE>}<NEW_LINE>DataSet<Row> probs = labelFeatureInfo.mapPartition(new GenerateModel(smoothing, modelType, vectorColName, featureCols, labelType)).withBroadcastSet(vectorSize, "vectorSize").setParallelism(1);<NEW_LINE>// save the model matrix.<NEW_LINE>this.setOutput(probs, new NaiveBayesTextModelDataConverter(labelType).getModelSchema());<NEW_LINE>return this;<NEW_LINE>}
in, null, vectorColName, keepColNames);
1,185,720
private static Map<URL, Set<URL>> findDependent(final URL root, final Collection<ElementHandle<TypeElement>> classes, boolean includeFilesInError) throws IOException {<NEW_LINE>// get dependencies<NEW_LINE>Map<URL, List<URL>> deps = IndexingController.getDefault().getRootDependencies();<NEW_LINE>Map<URL, List<URL>> peers = IndexingController.getDefault().getRootPeers();<NEW_LINE>// create inverse dependencies<NEW_LINE>final Map<URL, List<URL>> inverseDeps = new HashMap<URL, List<URL>>();<NEW_LINE>for (Map.Entry<URL, List<URL>> entry : deps.entrySet()) {<NEW_LINE>final <MASK><NEW_LINE>final List<URL> l1 = entry.getValue();<NEW_LINE>for (URL u2 : l1) {<NEW_LINE>List<URL> l2 = inverseDeps.get(u2);<NEW_LINE>if (l2 == null) {<NEW_LINE>l2 = new ArrayList<URL>();<NEW_LINE>inverseDeps.put(u2, l2);<NEW_LINE>}<NEW_LINE>l2.add(u1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return findDependent(root, deps, inverseDeps, peers, classes, includeFilesInError, true);<NEW_LINE>}
URL u1 = entry.getKey();
1,636,890
public static SusiThought readRSS(String url) {<NEW_LINE>SyndFeedInput input = new SyndFeedInput();<NEW_LINE>SyndFeed feed = null;<NEW_LINE>try {<NEW_LINE>ClientConnection connection = new ClientConnection(url, "");<NEW_LINE>XmlReader xmlreader = new XmlReader(connection.getInputStream());<NEW_LINE>feed = input.build(xmlreader);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>// fail<NEW_LINE>return new SusiThought();<NEW_LINE>}<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>int totalEntries = 0;<NEW_LINE>int i = 0;<NEW_LINE>JSONArray jsonArray = new JSONArray();<NEW_LINE>// Reading RSS Feed from the URL<NEW_LINE>for (SyndEntry entry : (List<SyndEntry>) feed.getEntries()) {<NEW_LINE>JSONObject jsonObject = new JSONObject();<NEW_LINE>jsonObject.put("title", entry.getTitle().toString());<NEW_LINE>jsonObject.put("link", entry.getLink().toString());<NEW_LINE>jsonObject.put("uri", entry.getUri().toString());<NEW_LINE>jsonObject.put("guid", Integer.toString(entry.hashCode()));<NEW_LINE>if (entry.getPublishedDate() != null)<NEW_LINE>jsonObject.put("pubDate", entry.getPublishedDate().toString());<NEW_LINE>if (entry.getUpdatedDate() != null)<NEW_LINE>jsonObject.put("updateDate", entry.getUpdatedDate().toString());<NEW_LINE>if (entry.getDescription() != null)<NEW_LINE>jsonObject.put("description", entry.getDescription().<MASK><NEW_LINE>jsonArray.put(i, jsonObject);<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>totalEntries = i;<NEW_LINE>SusiThought json = new SusiThought();<NEW_LINE>json.setData(jsonArray);<NEW_LINE>return json;<NEW_LINE>}
getValue().toString());
1,079,309
public void addFile(DocumentsStorageProvider.Document document) {<NEW_LINE>if (document == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>OCFile file = document.getFile();<NEW_LINE>final int iconRes = MimeTypeUtil.getFileTypeIconId(file.getMimeType(<MASK><NEW_LINE>final String mimeType = file.isFolder() ? Document.MIME_TYPE_DIR : file.getMimeType();<NEW_LINE>int flags = Document.FLAG_SUPPORTS_DELETE | Document.FLAG_SUPPORTS_WRITE | (MimeTypeUtil.isImage(file) ? Document.FLAG_SUPPORTS_THUMBNAIL : 0);<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {<NEW_LINE>flags = Document.FLAG_SUPPORTS_COPY | Document.FLAG_SUPPORTS_MOVE | Document.FLAG_SUPPORTS_REMOVE | flags;<NEW_LINE>}<NEW_LINE>if (file.isFolder()) {<NEW_LINE>flags = flags | Document.FLAG_DIR_SUPPORTS_CREATE;<NEW_LINE>}<NEW_LINE>flags = Document.FLAG_SUPPORTS_RENAME | flags;<NEW_LINE>newRow().add(Document.COLUMN_DOCUMENT_ID, document.getDocumentId()).add(Document.COLUMN_DISPLAY_NAME, file.getFileName()).add(Document.COLUMN_LAST_MODIFIED, file.getModificationTimestamp()).add(Document.COLUMN_SIZE, file.getFileLength()).add(Document.COLUMN_FLAGS, flags).add(Document.COLUMN_ICON, iconRes).add(Document.COLUMN_MIME_TYPE, mimeType);<NEW_LINE>}
), file.getFileName());
686,380
public Object evaluateEnumMethod(EventBean[] eventsLambda, Collection enumcoll, boolean isNewData, ExprEvaluatorContext context) {<NEW_LINE>TreeMap<Comparable, Object> sort = new TreeMap<>();<NEW_LINE>boolean hasColl = false;<NEW_LINE>Collection<EventBean> beans = (Collection<EventBean>) enumcoll;<NEW_LINE>for (EventBean next : beans) {<NEW_LINE>eventsLambda[getStreamNumLambda()] = next;<NEW_LINE>Comparable comparable = (Comparable) inner.evaluate(eventsLambda, isNewData, context);<NEW_LINE>Object entry = sort.get(comparable);<NEW_LINE>if (entry == null) {<NEW_LINE>sort.put(comparable, next);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (entry instanceof Collection) {<NEW_LINE>((Collection<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Deque<Object> coll = new ArrayDeque<Object>(2);<NEW_LINE>coll.add(entry);<NEW_LINE>coll.add(next);<NEW_LINE>sort.put(comparable, coll);<NEW_LINE>hasColl = true;<NEW_LINE>}<NEW_LINE>return EnumOrderByHelper.enumOrderBySortEval(sort, hasColl, descending);<NEW_LINE>}
) entry).add(next);
1,238,034
private final void addVertex(final float[] values, final int offset) {<NEW_LINE>final int o = vertices.size;<NEW_LINE>vertices.addAll(values, offset, stride);<NEW_LINE>lastIndex = vindex++;<NEW_LINE>if (vertexTransformationEnabled) {<NEW_LINE>transformPosition(vertices.items, o + posOffset, posSize, positionTransform);<NEW_LINE>if (norOffset >= 0)<NEW_LINE>transformNormal(vertices.items, o + norOffset, 3, normalTransform);<NEW_LINE>if (biNorOffset >= 0)<NEW_LINE>transformNormal(vertices.items, o + biNorOffset, 3, normalTransform);<NEW_LINE>if (tangentOffset >= 0)<NEW_LINE>transformNormal(vertices.items, <MASK><NEW_LINE>}<NEW_LINE>final float x = vertices.items[o + posOffset];<NEW_LINE>final float y = (posSize > 1) ? vertices.items[o + posOffset + 1] : 0f;<NEW_LINE>final float z = (posSize > 2) ? vertices.items[o + posOffset + 2] : 0f;<NEW_LINE>bounds.ext(x, y, z);<NEW_LINE>if (hasColor) {<NEW_LINE>if (colOffset >= 0) {<NEW_LINE>vertices.items[o + colOffset] *= color.r;<NEW_LINE>vertices.items[o + colOffset + 1] *= color.g;<NEW_LINE>vertices.items[o + colOffset + 2] *= color.b;<NEW_LINE>if (colSize > 3)<NEW_LINE>vertices.items[o + colOffset + 3] *= color.a;<NEW_LINE>} else if (cpOffset >= 0) {<NEW_LINE>Color.abgr8888ToColor(tempC1, vertices.items[o + cpOffset]);<NEW_LINE>vertices.items[o + cpOffset] = tempC1.mul(color).toFloatBits();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (hasUVTransform && uvOffset >= 0) {<NEW_LINE>vertices.items[o + uvOffset] = uOffset + uScale * vertices.items[o + uvOffset];<NEW_LINE>vertices.items[o + uvOffset + 1] = vOffset + vScale * vertices.items[o + uvOffset + 1];<NEW_LINE>}<NEW_LINE>}
o + tangentOffset, 3, normalTransform);
1,762,569
public void bind() {<NEW_LINE>GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, mFrameBufferHandle);<NEW_LINE>GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0, GLES20.GL_TEXTURE_2D, mTexture.getTextureId(), 0);<NEW_LINE>int status = GLES20.glCheckFramebufferStatus(GLES20.GL_FRAMEBUFFER);<NEW_LINE>if (status != GLES20.GL_FRAMEBUFFER_COMPLETE) {<NEW_LINE>GLES20.<MASK><NEW_LINE>String errorString = "";<NEW_LINE>switch(status) {<NEW_LINE>case GLES20.GL_FRAMEBUFFER_UNSUPPORTED:<NEW_LINE>errorString = "GL_FRAMEBUFFER_UNSUPPORTED: returned if the combination of internal formats of the attached images violates an implementation-dependent set of restrictions.";<NEW_LINE>break;<NEW_LINE>case GLES20.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:<NEW_LINE>errorString = "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: returned if any of the framebuffer attachment points are framebuffer incomplete.";<NEW_LINE>break;<NEW_LINE>case GLES20.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:<NEW_LINE>errorString = "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: returned if the framebuffer does not have at least one image attached to it.";<NEW_LINE>break;<NEW_LINE>case GLES20.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:<NEW_LINE>errorString = "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS: not all attached images have the same width and height.";<NEW_LINE>RajLog.i(mWidth + ", " + mHeight + " || " + mTexture.getWidth() + ", " + mTexture.getHeight());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>throw new RuntimeException(errorString);<NEW_LINE>}<NEW_LINE>}
glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0);
1,105,507
public void run(RegressionEnvironment env) {<NEW_LINE>env.compileDeploy("@name('flow') create dataflow MyGraph " + "DefaultSupportSourceOp -> outstream<SupportBean> {} " + "DefaultSupportCaptureOp(outstream) {}");<NEW_LINE>assertEquals(StatementType.CREATE_DATAFLOW, env.statement("flow").getProperty(StatementProperty.STATEMENTTYPE));<NEW_LINE>assertEquals("MyGraph", env.statement("flow").getProperty(StatementProperty.CREATEOBJECTNAME));<NEW_LINE>DefaultSupportSourceOp source = new DefaultSupportSourceOp(new Object[] { new SupportBean("E1", 1), new SupportBean("E2", 2) });<NEW_LINE>DefaultSupportCaptureOp capture = new DefaultSupportCaptureOp();<NEW_LINE>EPDataFlowInstantiationOptions options = new EPDataFlowInstantiationOptions().operatorProvider(new DefaultSupportGraphOpProvider(source, capture)).operatorStatistics(true).cpuStatistics(true);<NEW_LINE>EPDataFlowInstance instance = env.runtime().getDataFlowService().instantiate(env.deploymentId("flow"), "MyGraph", options);<NEW_LINE>instance.run();<NEW_LINE>List<EPDataFlowInstanceOperatorStat> stats = instance.getStatistics().getOperatorStatistics();<NEW_LINE>assertEquals(2, stats.size());<NEW_LINE>EPDataFlowInstanceOperatorStat sourceStat = stats.get(0);<NEW_LINE>assertEquals("DefaultSupportSourceOp", sourceStat.getOperatorName());<NEW_LINE>assertEquals(0, sourceStat.getOperatorNumber());<NEW_LINE>assertEquals("DefaultSupportSourceOp#0() -> outstream<SupportBean>", sourceStat.getOperatorPrettyPrint());<NEW_LINE>assertEquals(2, sourceStat.getSubmittedOverallCount());<NEW_LINE>EPAssertionUtil.assertEqualsExactOrder(new long[] { 2L }, sourceStat.getSubmittedPerPortCount());<NEW_LINE>assertTrue(<MASK><NEW_LINE>assertEquals(sourceStat.getTimeOverall(), sourceStat.getTimePerPort()[0]);<NEW_LINE>EPDataFlowInstanceOperatorStat destStat = stats.get(1);<NEW_LINE>assertEquals("DefaultSupportCaptureOp", destStat.getOperatorName());<NEW_LINE>assertEquals(1, destStat.getOperatorNumber());<NEW_LINE>assertEquals("DefaultSupportCaptureOp#1(outstream)", destStat.getOperatorPrettyPrint());<NEW_LINE>assertEquals(0, destStat.getSubmittedOverallCount());<NEW_LINE>assertEquals(0, destStat.getSubmittedPerPortCount().length);<NEW_LINE>assertEquals(0, destStat.getTimeOverall());<NEW_LINE>assertEquals(0, destStat.getTimePerPort().length);<NEW_LINE>env.undeployAll();<NEW_LINE>}
sourceStat.getTimeOverall() > 0);
882,383
public boolean performOk() {<NEW_LINE>DBPPreferenceStore preferenceStore = DBWorkbench.getPlatform().getPreferenceStore();<NEW_LINE>preferenceStore.setValue(PostgreConstants.PROP_SHOW_NON_DEFAULT_DB, String.valueOf<MASK><NEW_LINE>preferenceStore.setValue(PostgreConstants.PROP_SHOW_TEMPLATES_DB, String.valueOf(showTemplates.getSelection()));<NEW_LINE>preferenceStore.setValue(PostgreConstants.PROP_SHOW_UNAVAILABLE_DB, String.valueOf(showUnavailable.getSelection()));<NEW_LINE>preferenceStore.setValue(PostgreConstants.PROP_SHOW_DATABASE_STATISTICS, String.valueOf(showDatabaseStatistics.getSelection()));<NEW_LINE>preferenceStore.setValue(PostgreConstants.PROP_READ_ALL_DATA_TYPES, String.valueOf(readAllDataTypes.getSelection()));<NEW_LINE>preferenceStore.setValue(PostgreConstants.PROP_DD_PLAIN_STRING, ddPlainBehaviorCombo.getSelectionIndex() == 0);<NEW_LINE>preferenceStore.setValue(PostgreConstants.PROP_DD_TAG_STRING, ddTagBehaviorCombo.getSelectionIndex() == 0);<NEW_LINE>return super.performOk();<NEW_LINE>}
(showNonDefault.getSelection()));
1,665,159
private List<ModelScore> scoreFull(String input, int maxSampleCount) {<NEW_LINE>int[] samplingPoints;<NEW_LINE>if (maxSampleCount <= 0) {<NEW_LINE>samplingPoints = getStepping(<MASK><NEW_LINE>} else {<NEW_LINE>samplingPoints = getStepping(input, maxSampleCount);<NEW_LINE>}<NEW_LINE>List<ModelScore> modelScores = Lists.newArrayListWithCapacity(modelIdArray.length);<NEW_LINE>for (CharNgramLanguageModel model : models.values()) {<NEW_LINE>modelScores.add(new ModelScore(model, 0));<NEW_LINE>}<NEW_LINE>String[] grams = getGrams(input, samplingPoints);<NEW_LINE>int gramCounter = 0;<NEW_LINE>while (gramCounter < grams.length) {<NEW_LINE>for (ModelScore modelScore : modelScores) {<NEW_LINE>modelScore.score += modelScore.model.gramProbability(grams[gramCounter]);<NEW_LINE>}<NEW_LINE>gramCounter++;<NEW_LINE>}<NEW_LINE>Collections.sort(modelScores);<NEW_LINE>return modelScores;<NEW_LINE>}
input, input.length());
872,964
private void handleMappingExceptions() {<NEW_LINE>if (singleValueIsAllowed) {<NEW_LINE>org.python.Object arg = peekNextArg();<NEW_LINE>if (arg instanceof org.python.types.Range) {<NEW_LINE>throw new org.python.exceptions.TypeError("range indices must be integers or slices, not str");<NEW_LINE>} else if (arg instanceof org.python.types.Bytes) {<NEW_LINE>throw new org.python.exceptions.TypeError("byte indices must be integers, not str");<NEW_LINE>} else if (arg instanceof org.python.types.ByteArray) {<NEW_LINE>throw new org.python.exceptions.TypeError(arg.typeName() + " indices must be integers");<NEW_LINE>} else {<NEW_LINE>throw new org.python.exceptions.TypeError(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (dict == null) {<NEW_LINE>throw new org.python.exceptions.TypeError("format requires a mapping");<NEW_LINE>}<NEW_LINE>}
arg.typeName() + " indices must be integers, not str");
1,142,442
private static void createEJBRoleRefPermissions(EjbDescriptor ejbDescriptor, PolicyConfiguration policyConfiguration) throws PolicyContextException {<NEW_LINE>List<Role> ejbScopedRoleNames = new ArrayList<Role>();<NEW_LINE>Collection<Role> allRoles = ejbDescriptor.getEjbBundleDescriptor().getRoles();<NEW_LINE>Role anyAuthUserRole = new Role("**");<NEW_LINE>boolean rolesetContainsAnyAuthUserRole = allRoles.contains(anyAuthUserRole);<NEW_LINE>// Name of EJB being processed in this call<NEW_LINE>String ejbName = ejbDescriptor.getName();<NEW_LINE>writeOutPermissionsForRoleRefRoles(ejbDescriptor.getRoleReferences(), ejbScopedRoleNames, ejbName, policyConfiguration);<NEW_LINE>if (_logger.isLoggable(Level.FINE)) {<NEW_LINE>_logger.log(Level.FINE, "JACC: Converting role-ref: Going through the list of roles not present in RoleRef elements and creating EJBRoleRefPermissions ");<NEW_LINE>}<NEW_LINE>// For every role in the application for which there is no mapping (role reference) defined for this EJB<NEW_LINE>// we insert a 1:1 role mapping. E.g global role "foo" maps to an identical named role "foo" in the scope of EJB<NEW_LINE>// "MyEJB"<NEW_LINE>//<NEW_LINE>// Note this is the most common situation as mapping roles per EJB is quite rare in practice<NEW_LINE>writeOutPermissionsForNonRoleRefRoles(<MASK><NEW_LINE>if ((!ejbScopedRoleNames.contains(anyAuthUserRole)) && !rolesetContainsAnyAuthUserRole) {<NEW_LINE>addAnyAuthenticatedUserRoleRef(policyConfiguration, ejbName);<NEW_LINE>}<NEW_LINE>}
allRoles, ejbScopedRoleNames, ejbName, policyConfiguration);