idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,774,555
/* (non-Javadoc)<NEW_LINE>* @see com.ibm.wsspi.channelfw.InterChannelCallback#error(com.ibm.wsspi.channelfw.VirtualConnection, java.lang.Throwable)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void error(VirtualConnection vc, Throwable t) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Calling user's ReadListener onError : " + <MASK><NEW_LINE>}<NEW_LINE>Exception e = null;<NEW_LINE>SRTServletRequestThreadData.getInstance().init(_requestDataAsyncReadCallbackThread);<NEW_LINE>// Push the original thread's context onto the current thread, also save off the current thread's context<NEW_LINE>this.threadContextManager.pushContextData();<NEW_LINE>if (this.in.getReadListener() != null) {<NEW_LINE>synchronized (this.in.getCompleteLockObj()) {<NEW_LINE>try {<NEW_LINE>// An error occurred. Issue the onError call on the user's ReadListener<NEW_LINE>this.in.getReadListener().onError(t);<NEW_LINE>} catch (Exception onErrorException) {<NEW_LINE>e = onErrorException;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (e != null && TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Exception occurred during ReadListener.onError : " + e + ", " + this.in.getReadListener());<NEW_LINE>} else {<NEW_LINE>if (t != null && TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Exception occurred during ReadListener and error cannot handle : " + t.getMessage() + ", " + this.in.getReadListener());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Revert back to the thread's current context<NEW_LINE>this.threadContextManager.popContextData();<NEW_LINE>}
this.in.getReadListener());
534,542
public final PropertyExpressionAtomicContext propertyExpressionAtomic() throws RecognitionException {<NEW_LINE>PropertyExpressionAtomicContext _localctx = new PropertyExpressionAtomicContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 394, RULE_propertyExpressionAtomic);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(2750);<NEW_LINE>match(LBRACK);<NEW_LINE>setState(2752);<NEW_LINE>_errHandler.sync(this);<NEW_LINE><MASK><NEW_LINE>if (_la == SELECT) {<NEW_LINE>{<NEW_LINE>setState(2751);<NEW_LINE>propertyExpressionSelect();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(2754);<NEW_LINE>expression();<NEW_LINE>setState(2756);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == ATCHAR) {<NEW_LINE>{<NEW_LINE>setState(2755);<NEW_LINE>typeExpressionAnnotation();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(2760);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == AS) {<NEW_LINE>{<NEW_LINE>setState(2758);<NEW_LINE>match(AS);<NEW_LINE>setState(2759);<NEW_LINE>((PropertyExpressionAtomicContext) _localctx).n = match(IDENT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(2764);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == WHERE) {<NEW_LINE>{<NEW_LINE>setState(2762);<NEW_LINE>match(WHERE);<NEW_LINE>setState(2763);<NEW_LINE>((PropertyExpressionAtomicContext) _localctx).where = expression();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(2766);<NEW_LINE>match(RBRACK);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
_la = _input.LA(1);
455,212
public void loadGroupMembers(GroupInfo groupInfo, int filter, long nextSeq, final IUIKitCallback<GroupInfo> callBack) {<NEW_LINE>if (filter != V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_FILTER_ALL && filter != V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_FILTER_OWNER && filter != V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_FILTER_ADMIN && filter != V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_FILTER_COMMON) {<NEW_LINE>filter = V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_FILTER_ALL;<NEW_LINE>}<NEW_LINE>V2TIMManager.getGroupManager().getGroupMemberList(groupInfo.getId(), filter, nextSeq, new V2TIMValueCallback<V2TIMGroupMemberInfoResult>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(int code, String desc) {<NEW_LINE>TUIGroupLog.e(TAG, "loadGroupMembers failed, code: " + code + "|desc: " + ErrorMessageConverter.convertIMError(code, desc));<NEW_LINE>TUIGroupUtils.callbackOnError(callBack, TAG, code, desc);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(V2TIMGroupMemberInfoResult v2TIMGroupMemberInfoResult) {<NEW_LINE>List<GroupMemberInfo> members = new ArrayList<>();<NEW_LINE>for (int i = 0; i < v2TIMGroupMemberInfoResult.getMemberInfoList().size(); i++) {<NEW_LINE>GroupMemberInfo member = new GroupMemberInfo();<NEW_LINE>members.add(member.covertTIMGroupMemberInfo(v2TIMGroupMemberInfoResult.getMemberInfoList().get(i)));<NEW_LINE>}<NEW_LINE>List<GroupMemberInfo> memberInfoList = groupInfo.getMemberDetails();<NEW_LINE>Iterator<GroupMemberInfo<MASK><NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>GroupMemberInfo memberInfo = iterator.next();<NEW_LINE>for (GroupMemberInfo existsMemberInfo : memberInfoList) {<NEW_LINE>if (TextUtils.equals(memberInfo.getAccount(), existsMemberInfo.getAccount())) {<NEW_LINE>iterator.remove();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>memberInfoList.addAll(members);<NEW_LINE>groupInfo.setNextSeq(v2TIMGroupMemberInfoResult.getNextSeq());<NEW_LINE>TUIGroupUtils.callbackOnSuccess(callBack, groupInfo);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
> iterator = members.iterator();
927,611
private // | '{' dict_entry comprehension_suffix '}'<NEW_LINE>Expression parseDictExpression() {<NEW_LINE>int <MASK><NEW_LINE>if (token.kind == TokenKind.RBRACE) {<NEW_LINE>// empty Dict<NEW_LINE>int rbraceOffset = nextToken();<NEW_LINE>return new DictExpression(locs, lbraceOffset, ImmutableList.of(), rbraceOffset);<NEW_LINE>}<NEW_LINE>DictExpression.Entry entry = parseDictEntry();<NEW_LINE>if (token.kind == TokenKind.FOR) {<NEW_LINE>// Dict comprehension<NEW_LINE>return parseComprehensionSuffix(lbraceOffset, entry, TokenKind.RBRACE);<NEW_LINE>}<NEW_LINE>List<DictExpression.Entry> entries = new ArrayList<>();<NEW_LINE>entries.add(entry);<NEW_LINE>if (token.kind == TokenKind.COMMA) {<NEW_LINE>expect(TokenKind.COMMA);<NEW_LINE>entries.addAll(parseDictEntryList());<NEW_LINE>}<NEW_LINE>if (token.kind == TokenKind.RBRACE) {<NEW_LINE>int rbraceOffset = nextToken();<NEW_LINE>return new DictExpression(locs, lbraceOffset, entries, rbraceOffset);<NEW_LINE>}<NEW_LINE>expect(TokenKind.RBRACE);<NEW_LINE>int end = syncPast(DICT_TERMINATOR_SET);<NEW_LINE>return makeErrorExpression(lbraceOffset, end);<NEW_LINE>}
lbraceOffset = expect(TokenKind.LBRACE);
839,129
private List<OSProcess> processMapToList(Collection<Integer> pids) {<NEW_LINE>// Get data from the registry if possible<NEW_LINE>Map<Integer, ProcessPerformanceData.PerfCounterBlock> processMap = processMapFromRegistry.get();<NEW_LINE>// otherwise performance counters with WMI backup<NEW_LINE>if (processMap == null || processMap.isEmpty()) {<NEW_LINE>processMap = (pids == null) ? processMapFromPerfCounters.get() : ProcessPerformanceData.buildProcessMapFromPerfCounters(pids);<NEW_LINE>}<NEW_LINE>Map<Integer<MASK><NEW_LINE>if (USE_PROCSTATE_SUSPENDED) {<NEW_LINE>// Get data from the registry if possible<NEW_LINE>threadMap = threadMapFromRegistry.get();<NEW_LINE>// otherwise performance counters with WMI backup<NEW_LINE>if (threadMap == null || threadMap.isEmpty()) {<NEW_LINE>threadMap = (pids == null) ? threadMapFromPerfCounters.get() : ThreadPerformanceData.buildThreadMapFromPerfCounters(pids);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Map<Integer, WtsInfo> processWtsMap = ProcessWtsData.queryProcessWtsMap(pids);<NEW_LINE>Set<Integer> mapKeys = new HashSet<>(processWtsMap.keySet());<NEW_LINE>mapKeys.retainAll(processMap.keySet());<NEW_LINE>List<OSProcess> processList = new ArrayList<>();<NEW_LINE>for (Integer pid : mapKeys) {<NEW_LINE>processList.add(new WindowsOSProcess(pid, this, processMap, processWtsMap, threadMap));<NEW_LINE>}<NEW_LINE>return processList;<NEW_LINE>}
, ThreadPerformanceData.PerfCounterBlock> threadMap = null;
1,491,707
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListTagsForResourceRequest> request = null;<NEW_LINE>Response<ListTagsForResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));<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, "CloudHSM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListTagsForResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller());<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.ClientExecuteTime);
1,366,684
public HiresTileModel rotateByQuaternion(int start, int count, double qx, double qy, double qz, double qw) {<NEW_LINE>double x, y, z, px, py, pz, pw;<NEW_LINE>int end = start + count, index;<NEW_LINE>for (int face = start; face < end; face++) {<NEW_LINE>for (int i = 0; i < 3; i++) {<NEW_LINE>index = face * FI_POSITION + i * 3;<NEW_LINE>x = position[index];<NEW_LINE>y = position[index + 1];<NEW_LINE>z = position[index + 2];<NEW_LINE>px = qw * x + qy * z - qz * y;<NEW_LINE>py = qw * y + qz * x - qx * z;<NEW_LINE>pz = qw * z <MASK><NEW_LINE>pw = -qx * x - qy * y - qz * z;<NEW_LINE>position[index] = pw * -qx + px * qw - py * qz + pz * qy;<NEW_LINE>position[index + 1] = pw * -qy + py * qw - pz * qx + px * qz;<NEW_LINE>position[index + 2] = pw * -qz + pz * qw - px * qy + py * qx;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
+ qx * y - qy * x;
1,203,278
private void switchTimelines(final Timeline activeTimeline, final Timeline nextTimeline) throws InconsistentStateException, RepositoryProblemException, TimelineException, ConflictException {<NEW_LINE>LOG.<MASK><NEW_LINE>try {<NEW_LINE>timelineSync.startTimelineUpdate(activeTimeline.getEventType(), nakadiSettings.getTimelineWaitTimeoutMs());<NEW_LINE>} catch (final InterruptedException ie) {<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>throw new TimelineException("Failed to switch timeline for: " + activeTimeline.getEventType());<NEW_LINE>} catch (final IllegalStateException ie) {<NEW_LINE>throw new ConflictException("Timeline is already being created for: " + activeTimeline.getEventType(), ie);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>transactionTemplate.execute(status -> {<NEW_LINE>timelineDbRepository.createTimeline(nextTimeline);<NEW_LINE>nextTimeline.setSwitchedAt(new Date());<NEW_LINE>final Timeline.StoragePosition sp = topicRepositoryHolder.createStoragePosition(activeTimeline);<NEW_LINE>activeTimeline.setLatestPosition(sp);<NEW_LINE>scheduleTimelineCleanup(activeTimeline);<NEW_LINE>timelineDbRepository.updateTimelime(activeTimeline);<NEW_LINE>timelineDbRepository.updateTimelime(nextTimeline);<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>} catch (final TransactionException tx) {<NEW_LINE>LOG.error(tx.getMessage(), tx);<NEW_LINE>throw new TimelineException("Failed to create timeline in DB for: " + activeTimeline.getEventType(), tx);<NEW_LINE>} finally {<NEW_LINE>finishTimelineUpdate(activeTimeline.getEventType());<NEW_LINE>}<NEW_LINE>}
info("Switching timelines from {} to {}", activeTimeline, nextTimeline);
825,298
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) != 0)) {<NEW_LINE>output.writeInt32(1, batchSize_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) != 0)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.<MASK><NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000004) != 0)) {<NEW_LINE>output.writeBool(3, dumpEmbeddingShape_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000008) != 0)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 4, bestExporterMetric_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000010) != 0)) {<NEW_LINE>output.writeBool(5, metricBigger_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000020) != 0)) {<NEW_LINE>output.writeBool(6, multiPlaceholder_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000040) != 0)) {<NEW_LINE>output.writeInt32(7, exportsToKeep_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000080) != 0)) {<NEW_LINE>output.writeMessage(8, getMultiValueFields());<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000100) != 0)) {<NEW_LINE>output.writeBool(9, placeholderNamedByInput_);<NEW_LINE>}<NEW_LINE>unknownFields.writeTo(output);<NEW_LINE>}
writeString(output, 2, exporterType_);
257,694
private static void parseNodeList(SqlNode sqlNode, NodeStream stream) {<NEW_LINE>while (stream.hasMore()) {<NEW_LINE>SqlNode childNode;<NEW_LINE>if (stream.match(Node.TEXT_NODE)) {<NEW_LINE>childNode = new TextSqlNode(stream.consume().<MASK><NEW_LINE>} else {<NEW_LINE>if (stream.match("foreach")) {<NEW_LINE>childNode = parseForeachSqlNode(stream);<NEW_LINE>} else if (stream.match("if")) {<NEW_LINE>childNode = parseIfSqlNode(stream);<NEW_LINE>} else if (stream.match("trim")) {<NEW_LINE>childNode = parseTrimSqlNode(stream);<NEW_LINE>} else if (stream.match("set")) {<NEW_LINE>childNode = parseSetSqlNode(stream);<NEW_LINE>} else if (stream.match("where")) {<NEW_LINE>childNode = parseWhereSqlNode(stream);<NEW_LINE>} else {<NEW_LINE>throw new UnsupportedOperationException("Unsupported tags :" + stream.consume().getNodeName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sqlNode.addChildNode(childNode);<NEW_LINE>}<NEW_LINE>}
getNodeValue().trim());
13,188
// https://stackoverflow.com/questions/21270892/generate-affinetransform-from-3-points<NEW_LINE>public static AffineTransform deriveAffineTransform(double sourceX1, double sourceY1, double sourceX2, double sourceY2, double sourceX3, double sourceY3, double destX1, double destY1, double destX2, double destY2, double destX3, double destY3) {<NEW_LINE>RealMatrix source = MatrixUtils.createRealMatrix(new double[][] { { sourceX1, sourceX2, sourceX3 }, { sourceY1, sourceY2, sourceY3 }, { 1, 1, 1 } });<NEW_LINE>RealMatrix dest = MatrixUtils.createRealMatrix(new double[][] { { destX1, destX2, destX3 }, { destY1, destY2, destY3 } });<NEW_LINE>RealMatrix inverse = new LUDecomposition(source).getSolver().getInverse();<NEW_LINE>RealMatrix transform = dest.multiply(inverse);<NEW_LINE>double m00 = <MASK><NEW_LINE>double m01 = transform.getEntry(0, 1);<NEW_LINE>double m02 = transform.getEntry(0, 2);<NEW_LINE>double m10 = transform.getEntry(1, 0);<NEW_LINE>double m11 = transform.getEntry(1, 1);<NEW_LINE>double m12 = transform.getEntry(1, 2);<NEW_LINE>return new AffineTransform(m00, m10, m01, m11, m02, m12);<NEW_LINE>}
transform.getEntry(0, 0);
817,950
final GetBlueprintsResult executeGetBlueprints(GetBlueprintsRequest getBlueprintsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getBlueprintsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetBlueprintsRequest> request = null;<NEW_LINE>Response<GetBlueprintsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetBlueprintsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBlueprintsRequest));<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, "Lightsail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBlueprints");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetBlueprintsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBlueprintsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,270
protected static void loadConfigParameters(Configuration parameters) {<NEW_LINE>int maxSamples = parameters.getInteger(OptimizerOptions.DELIMITED_FORMAT_MAX_LINE_SAMPLES);<NEW_LINE>int minSamples = parameters.getInteger(OptimizerOptions.DELIMITED_FORMAT_MIN_LINE_SAMPLES);<NEW_LINE>if (maxSamples < 0) {<NEW_LINE>LOG.error("Invalid default maximum number of line samples: " + maxSamples + ". Using default value of " + OptimizerOptions.DELIMITED_FORMAT_MAX_LINE_SAMPLES.key());<NEW_LINE>maxSamples = OptimizerOptions.DELIMITED_FORMAT_MAX_LINE_SAMPLES.defaultValue();<NEW_LINE>}<NEW_LINE>if (minSamples < 0) {<NEW_LINE>LOG.error("Invalid default minimum number of line samples: " + minSamples + ". Using default value of " + OptimizerOptions.DELIMITED_FORMAT_MIN_LINE_SAMPLES.key());<NEW_LINE>minSamples = OptimizerOptions.DELIMITED_FORMAT_MIN_LINE_SAMPLES.defaultValue();<NEW_LINE>}<NEW_LINE>DEFAULT_MAX_NUM_SAMPLES = maxSamples;<NEW_LINE>if (minSamples > maxSamples) {<NEW_LINE>LOG.error("Default minimum number of line samples cannot be greater the default maximum number " + "of line samples: min=" + minSamples + ", max=" + maxSamples + ". Defaulting minimum to maximum.");<NEW_LINE>DEFAULT_MIN_NUM_SAMPLES = maxSamples;<NEW_LINE>} else {<NEW_LINE>DEFAULT_MIN_NUM_SAMPLES = minSamples;<NEW_LINE>}<NEW_LINE>int maxLen = parameters.getInteger(OptimizerOptions.DELIMITED_FORMAT_MAX_SAMPLE_LEN);<NEW_LINE>if (maxLen <= 0) {<NEW_LINE>maxLen = OptimizerOptions.DELIMITED_FORMAT_MAX_SAMPLE_LEN.defaultValue();<NEW_LINE>LOG.<MASK><NEW_LINE>} else if (maxLen < DEFAULT_READ_BUFFER_SIZE) {<NEW_LINE>maxLen = DEFAULT_READ_BUFFER_SIZE;<NEW_LINE>LOG.warn("Increasing maximum sample record length to size of the read buffer (" + maxLen + ").");<NEW_LINE>}<NEW_LINE>MAX_SAMPLE_LEN = maxLen;<NEW_LINE>}
error("Invalid value for the maximum sample record length. Using default value of " + maxLen + '.');
1,209,676
private final static RpcResponse parse(String json, boolean strict) {<NEW_LINE>try {<NEW_LINE>// we first call parseStrict so we can use the browser<NEW_LINE>// json parser (for performance) whenever possible)<NEW_LINE>JSONValue val = JSONParser.parseStrict(json);<NEW_LINE>return val.isObject().getJavaScriptObject().cast();<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (strict) {<NEW_LINE>// in strict mode, don't try eval<NEW_LINE>return null;<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>// there are some cases where json emitted by our server isn't parsable by<NEW_LINE>// parseStrict. for these situations we call parseLenient<NEW_LINE>// (which in turn calls eval)<NEW_LINE>@SuppressWarnings("deprecation")<NEW_LINE>JSONValue <MASK><NEW_LINE>return val.isObject().getJavaScriptObject().cast();<NEW_LINE>} catch (Exception e2) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
val = JSONParser.parseLenient(json);
1,535,237
public // the subscription, then a JMSRuntimeException will be thrown.<NEW_LINE>void testCreateSharedNonDurableConsumerWithMsgSelector_JRException(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE><MASK><NEW_LINE>JMSConsumer jmsConsumer1 = jmsContext.createSharedConsumer(jmsTopic1, "SUBID08", "Company = 'IBM'");<NEW_LINE>JMSProducer jmsProducer = jmsContext.createProducer();<NEW_LINE>TextMessage msgOut = jmsContext.createTextMessage("testCreateSharedNonDurableConsumerWithMsgSelector_JRException");<NEW_LINE>msgOut.setStringProperty("Comapny", "IBM");<NEW_LINE>jmsProducer.send(jmsTopic1, msgOut);<NEW_LINE>TextMessage msgIn = (TextMessage) jmsConsumer1.receive(30000);<NEW_LINE>boolean testFailed = false;<NEW_LINE>try {<NEW_LINE>JMSConsumer jmsConsumer2 = jmsContext.createSharedConsumer(jmsTopic3, "SUBID08", "Company = 'IBM'");<NEW_LINE>testFailed = true;<NEW_LINE>} catch (JMSRuntimeException ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>jmsConsumer1.close();<NEW_LINE>jmsContext.close();<NEW_LINE>if (testFailed) {<NEW_LINE>throw new Exception("testCreateSharedNonDurableConsumerWithMsgSelector_JRException failed");<NEW_LINE>}<NEW_LINE>}
JMSContext jmsContext = jmsTCFBindings.createContext();
1,559,716
public void exitOgs_service_object(Ogs_service_objectContext ctx) {<NEW_LINE>if (ctx.predef != null) {<NEW_LINE>String name = ctx.predef.getText();<NEW_LINE>_currentServiceObjectGroup.getLines().add(new ServiceObjectReferenceServiceObjectGroupLine(name));<NEW_LINE>_configuration.getServiceObjects().computeIfAbsent(name, AsaPredefinedServiceObject::forName);<NEW_LINE>} else if (ctx.name != null) {<NEW_LINE>String name = ctx.name.getText();<NEW_LINE>_currentServiceObjectGroup.getLines().add(new ServiceObjectReferenceServiceObjectGroupLine(name));<NEW_LINE>_configuration.referenceStructure(SERVICE_OBJECT, name, SERVICE_OBJECT_GROUP_SERVICE_OBJECT, ctx.name.getStart().getLine());<NEW_LINE>} else if (ctx.service_specifier() != null) {<NEW_LINE>_currentServiceObjectGroup.<MASK><NEW_LINE>_currentServiceObject = null;<NEW_LINE>}<NEW_LINE>}
getLines().add(_currentServiceObject);
1,151,182
public static void writeNodes(final AbstractSQLProvider provider, final int newViewId, final List<INaviViewNode> nodes) throws SQLException {<NEW_LINE>Preconditions.checkNotNull(provider, "IE01992: Provider argument can not be null");<NEW_LINE>Preconditions.checkArgument(newViewId > 0, "IE01993: New View ID argument must be greater then zero");<NEW_LINE>Preconditions.checkNotNull(nodes, "IE01994: Nodes argument can not be null");<NEW_LINE>if (nodes.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ArrayList<Integer> functionNodeIndices = new ArrayList<Integer>();<NEW_LINE>final ArrayList<Integer> codeNodeIndices = new ArrayList<Integer>();<NEW_LINE>final ArrayList<Integer> textNodeIndices = new ArrayList<Integer>();<NEW_LINE>final ArrayList<Integer> groupNodeIndices = new ArrayList<Integer>();<NEW_LINE>final BiMap<Integer, INaviGroupNode> groupNodeMap = HashBiMap.create();<NEW_LINE>final int firstNode = saveNodes(provider, newViewId, nodes, functionNodeIndices, codeNodeIndices, textNodeIndices, groupNodeIndices, groupNodeMap);<NEW_LINE>// After this point, the nodes table has been filled<NEW_LINE>// After each saving, the node IDs have to be updated<NEW_LINE>PostgreSQLNodeSaver.updateNodeIds(nodes, firstNode);<NEW_LINE>// Now, the individual node type tables can be saved<NEW_LINE>PostgreSQLNodeSaver.saveGroupNodes(provider, nodes, firstNode, PostgreSQLNodeSaver.sortGroupNodes(groupNodeIndices, groupNodeMap));<NEW_LINE>PostgreSQLNodeSaver.saveFunctionNodes(<MASK><NEW_LINE>PostgreSQLNodeSaver.saveCodeNodes(provider, nodes, firstNode, codeNodeIndices);<NEW_LINE>PostgreSQLNodeSaver.saveTextNodes(provider, nodes, firstNode, textNodeIndices);<NEW_LINE>// Once all nodes are saved, the parent nodes can be saved too<NEW_LINE>final CConnection connection = provider.getConnection();<NEW_LINE>PostgreSQLNodeSaver.saveParentGroups(connection, nodes, firstNode, groupNodeMap);<NEW_LINE>// And finally, we can save the tags associated with the nodes<NEW_LINE>PostgreSQLNodeSaver.saveTags(connection, nodes, firstNode);<NEW_LINE>}
provider, nodes, firstNode, functionNodeIndices);
488,328
public void denoise(GrayF32 transform, int numLevels) {<NEW_LINE>int scale = UtilWavelet.computeScale(numLevels);<NEW_LINE>final int h = transform.height;<NEW_LINE>final int w = transform.width;<NEW_LINE>// width and height of scaling image<NEW_LINE>final int innerWidth = w / scale;<NEW_LINE>final int innerHeight = h / scale;<NEW_LINE>GrayF32 subbandHH = transform.subimage(w / 2, h / 2, w, h, null);<NEW_LINE>float sigma = UtilDenoiseWavelet.estimateNoiseStdDev(subbandHH, null);<NEW_LINE>float threshold = (float) <MASK><NEW_LINE>// apply same threshold to all wavelet coefficients<NEW_LINE>rule.process(transform.subimage(innerWidth, 0, w, h, null), threshold);<NEW_LINE>rule.process(transform.subimage(0, innerHeight, innerWidth, h, null), threshold);<NEW_LINE>}
UtilDenoiseWavelet.universalThreshold(subbandHH, sigma);
590,853
public static List<MDElement> parseMDString(final String mdString) {<NEW_LINE>final List<MDElement> results = new ArrayList<>();<NEW_LINE>final Matcher match = mdPat.matcher(mdString);<NEW_LINE>while (match.find()) {<NEW_LINE>String mg;<NEW_LINE>if (((mg = match.group(1)) != null) && (!mg.isEmpty())) {<NEW_LINE>// It's a number , meaning a series of matches<NEW_LINE>final int num = Integer.parseInt(mg);<NEW_LINE>results.add(new MatchMDElement(num));<NEW_LINE>} else if (((mg = match.group(2)) != null) && (!mg.isEmpty())) {<NEW_LINE>results.add(new MismatchMDElement());<NEW_LINE>} else if (((mg = match.group(3)) != null) && (!mg.isEmpty())) {<NEW_LINE>// remove the carat and the deletion length it what's left<NEW_LINE>results.add(new DeletionMDElement(mg<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
.length() - 1));
725,327
final DeleteOTAUpdateResult executeDeleteOTAUpdate(DeleteOTAUpdateRequest deleteOTAUpdateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteOTAUpdateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteOTAUpdateRequest> request = null;<NEW_LINE>Response<DeleteOTAUpdateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteOTAUpdateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteOTAUpdateRequest));<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, "IoT");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteOTAUpdate");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteOTAUpdateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteOTAUpdateResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
516,753
final CreateScriptResult executeCreateScript(CreateScriptRequest createScriptRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createScriptRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateScriptRequest> request = null;<NEW_LINE>Response<CreateScriptResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateScriptRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createScriptRequest));<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, "Glue");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateScript");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateScriptResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateScriptResultJsonUnmarshaller());<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 awsRequestMetrics = executionContext.getAwsRequestMetrics();
159,302
final UpdateLoadBalancerAttributeResult executeUpdateLoadBalancerAttribute(UpdateLoadBalancerAttributeRequest updateLoadBalancerAttributeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateLoadBalancerAttributeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateLoadBalancerAttributeRequest> request = null;<NEW_LINE>Response<UpdateLoadBalancerAttributeResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateLoadBalancerAttributeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateLoadBalancerAttributeRequest));<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, "Lightsail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLoadBalancerAttribute");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateLoadBalancerAttributeResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateLoadBalancerAttributeResultJsonUnmarshaller());<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.ClientExecuteTime);
405,053
public static void main(String[] arg) {<NEW_LINE>if (arg.length != 1) {<NEW_LINE>System.err.println("Usage: java Alt15K <basename>");<NEW_LINE>System.err.println("Files will be saved <basename>-old.log, -med and -new");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String device = null;<NEW_LINE>String[<MASK><NEW_LINE>for (int i = 0; i < devices.length; i++) {<NEW_LINE>if (devices[i].matches(".*USB.*")) {<NEW_LINE>device = devices[i];<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (device == null) {<NEW_LINE>System.out.println("Device not found.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>System.out.println("Selected device " + device);<NEW_LINE>AltData alt = null;<NEW_LINE>String file;<NEW_LINE>try {<NEW_LINE>Alt15K p = new Alt15K(device);<NEW_LINE>System.out.println("Retrieving newest data...");<NEW_LINE>alt = p.getData(0);<NEW_LINE>System.out.println("Apogee at " + alt.getApogee() + " feet");<NEW_LINE>file = arg[0] + "-new.log";<NEW_LINE>System.out.println("Saving data to " + file + "...");<NEW_LINE>savefile(file, alt);<NEW_LINE>System.out.println("Retrieving medium data...");<NEW_LINE>alt = p.getData(1);<NEW_LINE>System.out.println("Apogee at " + alt.getApogee() + " feet");<NEW_LINE>file = arg[0] + "-med.log";<NEW_LINE>System.out.println("Saving data to " + file + "...");<NEW_LINE>savefile(file, alt);<NEW_LINE>System.out.println("Retrieving oldest data...");<NEW_LINE>alt = p.getData(2);<NEW_LINE>System.out.println("Apogee at " + alt.getApogee() + " feet");<NEW_LINE>file = arg[0] + "-old.log";<NEW_LINE>System.out.println("Saving data to " + file + "...");<NEW_LINE>savefile(file, alt);<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (PortInUseException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>// System.out.println(alt);<NEW_LINE>// alt.printData();<NEW_LINE>}
] devices = Alt15K.getNames();
1,788,301
private RunnerApi.Components resolveArtifacts(RunnerApi.Components components) {<NEW_LINE>if (components.getEnvironmentsMap().values().stream().allMatch(env -> env.getDependenciesCount() == 0)) {<NEW_LINE>return components;<NEW_LINE>}<NEW_LINE>ManagedChannel channel = ManagedChannelBuilder.forTarget(endpoint.getUrl()).usePlaintext().maxInboundMessageSize(Integer.MAX_VALUE).build();<NEW_LINE>try {<NEW_LINE>RunnerApi.Components.Builder componentsBuilder = components.toBuilder();<NEW_LINE>ArtifactRetrievalServiceGrpc.ArtifactRetrievalServiceBlockingStub <MASK><NEW_LINE>for (Map.Entry<String, RunnerApi.Environment> env : componentsBuilder.getEnvironmentsMap().entrySet()) {<NEW_LINE>componentsBuilder.putEnvironments(env.getKey(), resolveArtifacts(retrievalStub, env.getValue()));<NEW_LINE>}<NEW_LINE>return componentsBuilder.build();<NEW_LINE>} catch (IOException exn) {<NEW_LINE>throw new RuntimeException(exn);<NEW_LINE>} finally {<NEW_LINE>channel.shutdown();<NEW_LINE>}<NEW_LINE>}
retrievalStub = ArtifactRetrievalServiceGrpc.newBlockingStub(channel);
1,286,687
public synchronized void updateJobAfterRetry(@NonNull String id, boolean isRunning, int runAttempt, long nextRunAttemptTime, @NonNull String serializedData) {<NEW_LINE>JobSpec job = getJobById(id);<NEW_LINE>if (job == null || !job.isMemoryOnly()) {<NEW_LINE>jobDatabase.updateJobAfterRetry(id, <MASK><NEW_LINE>}<NEW_LINE>ListIterator<JobSpec> iter = jobs.listIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>JobSpec existing = iter.next();<NEW_LINE>if (existing.getId().equals(id)) {<NEW_LINE>JobSpec updated = new JobSpec(existing.getId(), existing.getFactoryKey(), existing.getQueueKey(), existing.getCreateTime(), nextRunAttemptTime, runAttempt, existing.getMaxAttempts(), existing.getLifespan(), serializedData, existing.getSerializedInputData(), isRunning, existing.isMemoryOnly());<NEW_LINE>iter.set(updated);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
isRunning, runAttempt, nextRunAttemptTime, serializedData);
1,001,416
private static BooleanBinding notEqualIgnoreCase(final ObservableStringValue op1, final ObservableStringValue op2, final Observable... dependencies) {<NEW_LINE>if ((op1 == null) || (op2 == null)) {<NEW_LINE>throw new NullPointerException("Operands cannot be null.");<NEW_LINE>}<NEW_LINE>assert (dependencies != null) && (dependencies.length > 0);<NEW_LINE>return new BooleanBinding() {<NEW_LINE><NEW_LINE>{<NEW_LINE>super.bind(dependencies);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void dispose() {<NEW_LINE>super.unbind(dependencies);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected boolean computeValue() {<NEW_LINE>final String s1 = getStringSafe(op1.get());<NEW_LINE>final String s2 = getStringSafe(op2.get());<NEW_LINE>return !s1.equalsIgnoreCase(s2);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ObservableList<?> getDependencies() {<NEW_LINE>return (dependencies.length == 1) ? FXCollections.singletonObservableList(dependencies[0]) : <MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
new ImmutableObservableList<Observable>(dependencies);
760,213
protected double dnrm2(long N, INDArray X, int incX) {<NEW_LINE>Preconditions.checkArgument(X.dataType() == DataType.DOUBLE, "Double dtype expected");<NEW_LINE>Nd4j.getExecutioner().push();<NEW_LINE>double ret;<NEW_LINE>CudaContext ctx = allocator.getFlowController().prepareAction(null, X);<NEW_LINE>CublasPointer cAPointer = new CublasPointer(X, ctx);<NEW_LINE>cublasHandle_t handle = ctx.getCublasHandle();<NEW_LINE>synchronized (handle) {<NEW_LINE>cublasSetStream_v2(new cublasContext(handle), new CUstream_st(ctx.getCublasStream()));<NEW_LINE><MASK><NEW_LINE>cublasDnrm2_v2(new cublasContext(handle), (int) N, (DoublePointer) cAPointer.getDevicePointer(), incX, resultPointer);<NEW_LINE>ret = resultPointer.get();<NEW_LINE>}<NEW_LINE>allocator.registerAction(ctx, null, X);<NEW_LINE>return ret;<NEW_LINE>}
DoublePointer resultPointer = new DoublePointer(0.0f);
1,714,407
public double distance(SparseVector a, SparseVector b) {<NEW_LINE>double dist = 0;<NEW_LINE>double diff;<NEW_LINE>if (a == null || b == null) {<NEW_LINE>throw new IllegalArgumentException("Distance from a null vector is undefined.");<NEW_LINE>}<NEW_LINE>int leftLength = a.numLocations();<NEW_LINE>int rightLength = b.numLocations();<NEW_LINE>int leftIndex = 0;<NEW_LINE>int rightIndex = 0;<NEW_LINE>int leftFeature, rightFeature;<NEW_LINE>// We assume that features are sorted in ascending order.<NEW_LINE>// We'll walk through the two feature lists in order, checking<NEW_LINE>// whether the two features are the same.<NEW_LINE>while (leftIndex < leftLength && rightIndex < rightLength) {<NEW_LINE>leftFeature = a.indexAtLocation(leftIndex);<NEW_LINE>rightFeature = b.indexAtLocation(rightIndex);<NEW_LINE>if (leftFeature < rightFeature) {<NEW_LINE>diff = Math.abs(a.valueAtLocation(leftIndex));<NEW_LINE>leftIndex++;<NEW_LINE>} else if (leftFeature == rightFeature) {<NEW_LINE>diff = Math.abs(a.valueAtLocation(leftIndex) - b.valueAtLocation(rightIndex));<NEW_LINE>leftIndex++;<NEW_LINE>rightIndex++;<NEW_LINE>} else {<NEW_LINE>diff = Math.abs(b.valueAtLocation(rightIndex));<NEW_LINE>rightIndex++;<NEW_LINE>}<NEW_LINE>dist += Math.pow(diff, q);<NEW_LINE>}<NEW_LINE>// Pick up any additional features at the end of the two lists.<NEW_LINE>while (leftIndex < leftLength) {<NEW_LINE>diff = Math.abs(a.valueAtLocation(leftIndex));<NEW_LINE>dist += Math.pow(diff, q);<NEW_LINE>leftIndex++;<NEW_LINE>}<NEW_LINE>while (rightIndex < rightLength) {<NEW_LINE>diff = Math.abs<MASK><NEW_LINE>dist += Math.pow(diff, q);<NEW_LINE>rightIndex++;<NEW_LINE>}<NEW_LINE>return Math.pow(dist, oneOverQ);<NEW_LINE>}
(b.valueAtLocation(rightIndex));
917,835
protected TSQueryDataSet packBuffer(TSQueryDataSet tsQueryDataSet, PublicBAOS timeBAOS, PublicBAOS[] valueBAOSList, PublicBAOS[] bitmapBAOSList) {<NEW_LINE>int columnsNum = transformers.length;<NEW_LINE>ByteBuffer timeBuffer = ByteBuffer.allocate(timeBAOS.size());<NEW_LINE>timeBuffer.put(timeBAOS.getBuf(), 0, timeBAOS.size());<NEW_LINE>timeBuffer.flip();<NEW_LINE>tsQueryDataSet.setTime(timeBuffer);<NEW_LINE>List<ByteBuffer> <MASK><NEW_LINE>List<ByteBuffer> bitmapBufferList = new ArrayList<>();<NEW_LINE>for (int i = 0; i < columnsNum; ++i) {<NEW_LINE>putPBOSToBuffer(valueBAOSList, valueBufferList, i);<NEW_LINE>putPBOSToBuffer(bitmapBAOSList, bitmapBufferList, i);<NEW_LINE>}<NEW_LINE>tsQueryDataSet.setValueList(valueBufferList);<NEW_LINE>tsQueryDataSet.setBitmapList(bitmapBufferList);<NEW_LINE>return tsQueryDataSet;<NEW_LINE>}
valueBufferList = new ArrayList<>();
1,143,734
private Map<String, String> retrieveProperties(Vertex vertex) {<NEW_LINE>boolean isClassificationVertex = vertex.edges(Direction.IN, EDGE_LABEL_CLASSIFICATION).hasNext();<NEW_LINE>Map<String, String> <MASK><NEW_LINE>Iterator<VertexProperty<Object>> originalProperties = vertex.properties();<NEW_LINE>while (originalProperties.hasNext()) {<NEW_LINE>Property<Object> originalProperty = originalProperties.next();<NEW_LINE>if (immutableReturnedPropertiesWhiteList.contains(originalProperty.key()) || isClassificationVertex) {<NEW_LINE>String newPropertyKey = originalProperty.key().replace(PROPERTY_KEY_PREFIX_VERTEX_INSTANCE_PROPERTY, EMPTY_STRING).replace(PROPERTY_KEY_PREFIX_ELEMENT, EMPTY_STRING);<NEW_LINE>String newPropertyValue = originalProperty.value().toString();<NEW_LINE>newNodeProperties.put(newPropertyKey, newPropertyValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return newNodeProperties;<NEW_LINE>}
newNodeProperties = new HashMap<>();
424,021
public void read(org.apache.thrift.protocol.TProtocol iprot, LocalStateData struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>switch(schemeField.id) {<NEW_LINE>case // SERIALIZED_PARTS<NEW_LINE>1:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {<NEW_LINE>{<NEW_LINE>org.apache.thrift.protocol.TMap _map204 = iprot.readMapBegin();<NEW_LINE>struct.serialized_parts = new HashMap<String, ThriftSerializedObject>(2 * _map204.size);<NEW_LINE>String _key205;<NEW_LINE>ThriftSerializedObject _val206;<NEW_LINE>for (int _i207 = 0; _i207 < _map204.size; ++_i207) {<NEW_LINE>_key205 = iprot.readString();<NEW_LINE>_val206 = new ThriftSerializedObject();<NEW_LINE>_val206.read(iprot);<NEW_LINE>struct.<MASK><NEW_LINE>}<NEW_LINE>iprot.readMapEnd();<NEW_LINE>}<NEW_LINE>struct.set_serialized_parts_isSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>iprot.readFieldEnd();<NEW_LINE>}<NEW_LINE>iprot.readStructEnd();<NEW_LINE>struct.validate();<NEW_LINE>}
serialized_parts.put(_key205, _val206);
419,741
public static GetMonitorListResponse unmarshall(GetMonitorListResponse getMonitorListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMonitorListResponse.setRequestId(_ctx.stringValue("GetMonitorListResponse.RequestId"));<NEW_LINE>getMonitorListResponse.setCode(_ctx.stringValue("GetMonitorListResponse.Code"));<NEW_LINE>getMonitorListResponse.setMessage(_ctx.stringValue("GetMonitorListResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setPageNumber(_ctx.integerValue("GetMonitorListResponse.Data.PageNumber"));<NEW_LINE>data.setPageSize(_ctx.integerValue("GetMonitorListResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.integerValue("GetMonitorListResponse.Data.TotalCount"));<NEW_LINE>data.setTotalPage(_ctx.integerValue("GetMonitorListResponse.Data.TotalPage"));<NEW_LINE>List<Record> records = new ArrayList<Record>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetMonitorListResponse.Data.Records.Length"); i++) {<NEW_LINE>Record record = new Record();<NEW_LINE>record.setTaskId(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].TaskId"));<NEW_LINE>record.setStatus(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].Status"));<NEW_LINE>record.setMonitorType(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].MonitorType"));<NEW_LINE>record.setRuleName(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].RuleName"));<NEW_LINE>record.setAlgorithmVendor(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].AlgorithmVendor"));<NEW_LINE>record.setCreateDate(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].CreateDate"));<NEW_LINE>record.setModifiedDate(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].ModifiedDate"));<NEW_LINE>record.setDeviceList(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].DeviceList"));<NEW_LINE>record.setAttributes(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].Attributes"));<NEW_LINE>record.setRuleExpression(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].RuleExpression"));<NEW_LINE>record.setNotifierType(_ctx.stringValue<MASK><NEW_LINE>record.setNotifierExtra(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].NotifierExtra"));<NEW_LINE>record.setDescription(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].Description"));<NEW_LINE>record.setExpression(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].Expression"));<NEW_LINE>record.setImageMatch(_ctx.stringValue("GetMonitorListResponse.Data.Records[" + i + "].ImageMatch"));<NEW_LINE>records.add(record);<NEW_LINE>}<NEW_LINE>data.setRecords(records);<NEW_LINE>getMonitorListResponse.setData(data);<NEW_LINE>return getMonitorListResponse;<NEW_LINE>}
("GetMonitorListResponse.Data.Records[" + i + "].NotifierType"));
1,686,348
private void addBreakingQuads(@Nonnull IConduitBundle bundle, @Nonnull List<BakedQuad> quads) {<NEW_LINE>Class<? extends IConduit> conduitType = null;<NEW_LINE>RayTraceResult hit = Minecraft.getMinecraft().objectMouseOver;<NEW_LINE>if (NullHelper.untrust(hit) != null && (hit.hitInfo instanceof CollidableComponent)) {<NEW_LINE>conduitType = ((CollidableComponent) hit.hitInfo).conduitType;<NEW_LINE>}<NEW_LINE>if (breakingAnimOnWholeConduit) {<NEW_LINE>for (IClientConduit c : bundle.getClientConduits()) {<NEW_LINE>if (conduitType == c.getClass() || conduitType == c.getBaseConduitType()) {<NEW_LINE>IConduitRenderer renderer = getRendererForConduit(c);<NEW_LINE>renderer.addBakedQuads(this, bundle, (IClientConduit.WithDefaultRendering) c, 1, BlockRenderLayer.CUTOUT, quads);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<CollidableComponent> connectors = bundle.getConnectors();<NEW_LINE>for (CollidableComponent component : connectors) {<NEW_LINE>if (component != null) {<NEW_LINE>if (component.conduitType == conduitType || conduitType == null) {<NEW_LINE>IClientConduit.WithDefaultRendering conduit = (IClientConduit.WithDefaultRendering) bundle.getConduit(component.conduitType);<NEW_LINE>if (conduit != null) {<NEW_LINE>IConduitTexture tex = conduit.getTextureForState(component);<NEW_LINE>BakedQuadBuilder.addBakedQuads(quads, component.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
bound, tex.getSprite());
427,714
private void createButtonPanel(Composite parent) {<NEW_LINE>Composite client = new Composite(parent, SWT.NULL);<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.marginHeight = 0;<NEW_LINE>layout.marginWidth = 0;<NEW_LINE>client.setLayout(layout);<NEW_LINE>GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);<NEW_LINE>client.setLayoutData(gd);<NEW_LINE>fButtonDelete = new Button(client, SWT.PUSH);<NEW_LINE>fButtonDelete.setText(Messages.UserPropertiesManagerDialog_9);<NEW_LINE>gd <MASK><NEW_LINE>fButtonDelete.setLayoutData(gd);<NEW_LINE>fButtonDelete.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>deleteSelectedPropertyKeys();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>fButtonDelete.setEnabled(false);<NEW_LINE>fButtonRename = new Button(client, SWT.PUSH);<NEW_LINE>fButtonRename.setText(Messages.UserPropertiesManagerDialog_10);<NEW_LINE>gd = new GridData(GridData.FILL_HORIZONTAL);<NEW_LINE>fButtonRename.setLayoutData(gd);<NEW_LINE>fButtonRename.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>renameSelectedPropertyKey();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>fButtonRename.setEnabled(false);<NEW_LINE>}
= new GridData(GridData.FILL_HORIZONTAL);
1,595,257
@NoCache<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>public SynchronizationResult syncMapperData(@PathParam("parentId") String parentId, @PathParam("id") String mapperId, @QueryParam("direction") String direction) {<NEW_LINE>auth<MASK><NEW_LINE>ComponentModel parentModel = realm.getComponent(parentId);<NEW_LINE>if (parentModel == null)<NEW_LINE>throw new NotFoundException("Parent model not found");<NEW_LINE>ComponentModel mapperModel = realm.getComponent(mapperId);<NEW_LINE>if (mapperModel == null)<NEW_LINE>throw new NotFoundException("Mapper model not found");<NEW_LINE>LDAPStorageProvider ldapProvider = (LDAPStorageProvider) session.getProvider(UserStorageProvider.class, parentModel);<NEW_LINE>LDAPStorageMapper mapper = session.getProvider(LDAPStorageMapper.class, mapperModel);<NEW_LINE>ServicesLogger.LOGGER.syncingDataForMapper(mapperModel.getName(), mapperModel.getProviderId(), direction);<NEW_LINE>SynchronizationResult syncResult;<NEW_LINE>if ("fedToKeycloak".equals(direction)) {<NEW_LINE>syncResult = mapper.syncDataFromFederationProviderToKeycloak(realm);<NEW_LINE>} else if ("keycloakToFed".equals(direction)) {<NEW_LINE>syncResult = mapper.syncDataFromKeycloakToFederationProvider(realm);<NEW_LINE>} else {<NEW_LINE>throw new BadRequestException("Unknown direction: " + direction);<NEW_LINE>}<NEW_LINE>Map<String, Object> eventRep = new HashMap<>();<NEW_LINE>eventRep.put("action", direction);<NEW_LINE>eventRep.put("result", syncResult);<NEW_LINE>adminEvent.operation(OperationType.ACTION).resourcePath(session.getContext().getUri()).representation(eventRep).success();<NEW_LINE>return syncResult;<NEW_LINE>}
.users().requireManage();
197,025
public static void horizontal(GrayF64 input, GrayF64 output, int radius) {<NEW_LINE>final int kernelWidth = radius * 2 + 1;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, input.height, y -> {<NEW_LINE>for (int y = 0; y < input.height; y++) {<NEW_LINE>int indexIn = input.startIndex + input.stride * y;<NEW_LINE>int indexOut = output.startIndex + output.stride * y + radius;<NEW_LINE>double total = 0;<NEW_LINE>int indexEnd = indexIn + kernelWidth;<NEW_LINE>for (; indexIn < indexEnd; indexIn++) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>output.data[indexOut++] = total;<NEW_LINE>indexEnd = indexIn + input.width - kernelWidth;<NEW_LINE>for (; indexIn < indexEnd; indexIn++) {<NEW_LINE>total -= input.data[indexIn - kernelWidth];<NEW_LINE>total += input.data[indexIn];<NEW_LINE>output.data[indexOut++] = total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
total += input.data[indexIn];
114,717
private void loadHeaderAndData(DataInputStream dis) {<NEW_LINE>try {<NEW_LINE>if (!General.readWord(dis).equals("EST_File") || !General.readWord(dis).equals("Track")) {<NEW_LINE>throw new Error("The given data input stream is not an EST Track file.");<NEW_LINE>}<NEW_LINE>// Read Header<NEW_LINE>String token = General.readWord(dis);<NEW_LINE>while (!token.equals("EST_Header_End")) {<NEW_LINE>if (token.equals("DataType")) {<NEW_LINE>if (General.readWord(dis).equals("binary")) {<NEW_LINE>isBinary = true;<NEW_LINE>} else {<NEW_LINE>isBinary = false;<NEW_LINE>}<NEW_LINE>} else if (token.equals("ByteOrder")) {<NEW_LINE>if (General.readWord(dis).equals("10")) {<NEW_LINE>isBigEndian = true;<NEW_LINE>} else {<NEW_LINE>isBigEndian = false;<NEW_LINE>}<NEW_LINE>} else if (token.equals("NumFrames")) {<NEW_LINE>numFrames = Integer.parseInt<MASK><NEW_LINE>} else if (token.equals("NumChannels")) {<NEW_LINE>numChannels = Integer.parseInt(General.readWord(dis));<NEW_LINE>}<NEW_LINE>// Ignore all other content in header<NEW_LINE>token = General.readWord(dis);<NEW_LINE>}<NEW_LINE>if (isBinary) {<NEW_LINE>loadBinaryData(dis);<NEW_LINE>} else {<NEW_LINE>loadTextData(dis);<NEW_LINE>}<NEW_LINE>}/* Verify if everything went OK during the reading of the DataInputStream */<NEW_LINE>catch (IOException ioe) {<NEW_LINE>throw new Error("IO Exception while parsing EST Track file: " + ioe.getMessage());<NEW_LINE>}<NEW_LINE>}
(General.readWord(dis));
1,517,660
protected void onHandleWork(@Nullable Intent intent) {<NEW_LINE>SharedPreferences preferences = getApplicationContext().getSharedPreferences("Settings", 0);<NEW_LINE>Date nowTime = new Date();<NEW_LINE>Date lastTime = new Date(preferences.getLong("lastSync", nowTime.getTime()));<NEW_LINE>int lastVersion = preferences.getInt("lastTagsVersion", -1), newVersion = -1;<NEW_LINE>if (!enoughDayPassed(nowTime, lastTime))<NEW_LINE>return;<NEW_LINE>LogUtility.d("Scraping tags");<NEW_LINE>try {<NEW_LINE>newVersion = getNewVersionCode();<NEW_LINE>if (lastVersion > -1 && lastVersion >= newVersion)<NEW_LINE>return;<NEW_LINE>List<Tag> tags = Queries.TagTable.getAllFiltered();<NEW_LINE>fetchTags();<NEW_LINE>for (Tag t : tags) Queries.TagTable.updateStatus(t.getId(), t.getStatus());<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>LogUtility.d("End scraping");<NEW_LINE>preferences.edit().putLong("lastSync", nowTime.getTime()).putInt(<MASK><NEW_LINE>}
"lastTagsVersion", newVersion).apply();
869,937
private void init(Context context) {<NEW_LINE>binding.getRoot().setBackgroundColor(ThemeStore.primaryColor(context));<NEW_LINE>binding.vwBg.setOnClickListener(null);<NEW_LINE>primaryTextColor = MaterialValueHelper.getPrimaryTextColor(context, ColorUtils.isColorLight(ThemeStore.primaryColor(context)));<NEW_LINE>setColor(binding.ivSkipPrevious.getDrawable());<NEW_LINE>setColor(binding.ivSkipNext.getDrawable());<NEW_LINE>setColor(binding.ivChapter.getDrawable());<NEW_LINE>setColor(<MASK><NEW_LINE>binding.seekBar.setEnabled(false);<NEW_LINE>binding.seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStartTrackingTouch(SeekBar seekBar) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStopTrackingTouch(SeekBar seekBar) {<NEW_LINE>if (callback != null) {<NEW_LINE>callback.onStopTrackingTouch(seekBar.getProgress());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
binding.ivTimer.getDrawable());
45,118
public HashMap<String, double[]> captureTwo(int samples, double timeGap, String traceOneRemap, boolean trigger) {<NEW_LINE>if (traceOneRemap == null)<NEW_LINE>traceOneRemap = "CH1";<NEW_LINE>this.captureTraces(2, samples, timeGap, traceOneRemap, trigger, null);<NEW_LINE>try {<NEW_LINE>Thread.sleep((long) (1e-6 * this.samples * this.timebase + 0.1) * 1000);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>while (this.oscilloscopeProgress()[0] == 0) ;<NEW_LINE>this.fetchChannel(1);<NEW_LINE>this.fetchChannel(2);<NEW_LINE>HashMap<String, double[]> <MASK><NEW_LINE>retData.put("x", this.aChannels.get(0).getXAxis());<NEW_LINE>retData.put("y1", this.aChannels.get(0).getYAxis());<NEW_LINE>retData.put("y2", this.aChannels.get(1).getYAxis());<NEW_LINE>return retData;<NEW_LINE>}
retData = new HashMap<>();
1,783,767
public void marshall(BatchPrediction batchPrediction, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (batchPrediction == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getJobId(), JOBID_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getFailureReason(), FAILUREREASON_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getStartTime(), STARTTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getCompletionTime(), COMPLETIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getLastHeartbeatTime(), LASTHEARTBEATTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getInputPath(), INPUTPATH_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getOutputPath(), OUTPUTPATH_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getEventTypeName(), EVENTTYPENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getDetectorName(), DETECTORNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getDetectorVersion(), DETECTORVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getIamRoleArn(), IAMROLEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(batchPrediction.getProcessedRecordsCount(), PROCESSEDRECORDSCOUNT_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchPrediction.getTotalRecordsCount(), TOTALRECORDSCOUNT_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
batchPrediction.getArn(), ARN_BINDING);
45,198
private int handleScrollingSubOrientation(int delta) {<NEW_LINE>if (getChildCount() == 0 || delta == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>ensureOrientationHelper();<NEW_LINE>boolean isMainAxisHorizontal = isMainAxisDirectionHorizontal();<NEW_LINE>int parentLength = isMainAxisHorizontal ? mParent.getWidth() : mParent.getHeight();<NEW_LINE>int mainAxisLength = isMainAxisHorizontal <MASK><NEW_LINE>boolean layoutRtl = getLayoutDirection() == ViewCompat.LAYOUT_DIRECTION_RTL;<NEW_LINE>if (layoutRtl) {<NEW_LINE>int absDelta = Math.abs(delta);<NEW_LINE>if (delta < 0) {<NEW_LINE>delta = Math.min(mainAxisLength + mAnchorInfo.mPerpendicularCoordinate - parentLength, absDelta);<NEW_LINE>delta = -delta;<NEW_LINE>} else {<NEW_LINE>delta = mAnchorInfo.mPerpendicularCoordinate + delta > 0 ? -mAnchorInfo.mPerpendicularCoordinate : delta;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (delta > 0) {<NEW_LINE>delta = Math.min(mainAxisLength - mAnchorInfo.mPerpendicularCoordinate - parentLength, delta);<NEW_LINE>} else {<NEW_LINE>delta = mAnchorInfo.mPerpendicularCoordinate + delta >= 0 ? delta : -mAnchorInfo.mPerpendicularCoordinate;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return delta;<NEW_LINE>}
? getWidth() : getHeight();
1,069,357
public Sequence execute(StaticContext sctx, QueryContext ctx, Sequence[] args) {<NEW_LINE>final XmlDBNode doc = ((XmlDBNode) args[0]);<NEW_LINE>final <MASK><NEW_LINE>final XmlIndexController controller = (XmlIndexController) rtx.getResourceManager().getRtxIndexController(rtx.getRevisionNumber());<NEW_LINE>if (controller == null) {<NEW_LINE>throw new QueryException(new QNm("Document not found: " + ((Str) args[1]).stringValue()));<NEW_LINE>}<NEW_LINE>final int idx = FunUtil.getInt(args, 1, "$idx-no", -1, null, true);<NEW_LINE>final IndexDef indexDef = controller.getIndexes().getIndexDef(idx, IndexType.PATH);<NEW_LINE>if (indexDef == null) {<NEW_LINE>throw new QueryException(SDBFun.ERR_INDEX_NOT_FOUND, "Index no %s for collection %s and document %s not found.", idx, doc.getCollection().getName(), doc.getTrx().getResourceManager().getResourceConfig().getResource().getFileName().toString());<NEW_LINE>}<NEW_LINE>if (indexDef.getType() != IndexType.PATH) {<NEW_LINE>throw new QueryException(SDBFun.ERR_INVALID_INDEX_TYPE, "Index no %s for collection %s and document %s is not a path index.", idx, doc.getCollection().getName(), doc.getTrx().getResourceManager().getResourceConfig().getResource().getFileName().toString());<NEW_LINE>}<NEW_LINE>final String paths = FunUtil.getString(args, 2, "$paths", null, null, false);<NEW_LINE>final PathFilter filter = (paths != null) ? controller.createPathFilter(Set.of(paths.split(";")), doc.getTrx()) : null;<NEW_LINE>return getSequence(doc, controller.openPathIndex(doc.getTrx().getPageTrx(), indexDef, filter));<NEW_LINE>}
NodeReadOnlyTrx rtx = doc.getTrx();
1,456,802
private static double lengthReductionToStayWithinBounds(Point2D centerPoint, double width, double height, Rectangle2D bounds) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE><MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>Objects.requireNonNull(bounds, "The specified bounds for the new rectangle must not be null.");<NEW_LINE>boolean centerPointInBounds = bounds.contains(centerPoint);<NEW_LINE>if (!centerPointInBounds) {<NEW_LINE>throw new // $NON-NLS-1$<NEW_LINE>IllegalArgumentException(// $NON-NLS-1$<NEW_LINE>"The center point " + centerPoint + " of the original rectangle is out of the specified bounds.");<NEW_LINE>}<NEW_LINE>if (width < 0) {<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>throw new IllegalArgumentException("The specified width " + width + " must be larger than zero.");<NEW_LINE>}<NEW_LINE>if (height < 0) {<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>throw new IllegalArgumentException("The specified height " + height + " must be larger than zero.");<NEW_LINE>}<NEW_LINE>double distanceToEast = Math.abs(centerPoint.getX() - bounds.getMinX());<NEW_LINE>double distanceToWest = Math.abs(centerPoint.getX() - bounds.getMaxX());<NEW_LINE>double distanceToNorth = Math.abs(centerPoint.getY() - bounds.getMinY());<NEW_LINE>double distanceToSouth = Math.abs(centerPoint.getY() - bounds.getMaxY());<NEW_LINE>// the returned factor must not be greater than one; otherwise the size would increase<NEW_LINE>return MathTools.min(1, distanceToEast / width * 2, distanceToWest / width * 2, distanceToNorth / height * 2, distanceToSouth / height * 2);<NEW_LINE>}
Objects.requireNonNull(centerPoint, "The specified center point of the new rectangle must not be null.");
1,396,639
public void mergeTree(final String formatName, final Node root) throws IIOInvalidTreeException {<NEW_LINE>Validate.isTrue(nativeMetadataFormatName.equals(formatName), formatName, "Unsupported metadata format: %s");<NEW_LINE>notNull(root, "root");<NEW_LINE>if (!nativeMetadataFormatName.equals(root.getNodeName())) {<NEW_LINE>throw new IIOInvalidTreeException("Root must be " + nativeMetadataFormatName, root);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (node == null || !node.getNodeName().equals("ByteOrder")) {<NEW_LINE>throw new IIOInvalidTreeException("Missing \"ByteOrder\" node", node);<NEW_LINE>}<NEW_LINE>NamedNodeMap attributes = node.getAttributes();<NEW_LINE>String value = attributes.getNamedItem("value").getNodeValue();<NEW_LINE>if (value == null) {<NEW_LINE>throw new IIOInvalidTreeException("Missing \"value\" attribute in \"ByteOrder\" node", node);<NEW_LINE>}<NEW_LINE>ByteOrder order = getByteOrder(value.toUpperCase());<NEW_LINE>if (order == null) {<NEW_LINE>throw new IIOInvalidTreeException("Unknown ByteOrder \"value\" attribute: " + value, node);<NEW_LINE>} else {<NEW_LINE>byteOrder = order;<NEW_LINE>}<NEW_LINE>}
Node node = root.getFirstChild();
1,060,250
protected PlanItemCreationType evaluateReactivationRule(ReactivationRule reactivationRule, CaseInstanceEntity caseInstanceEntity, VariableContainer parentPlanItemInstance) {<NEW_LINE>// first evaluate for an activate condition<NEW_LINE>Boolean condition = evaluateReactivationCondition(reactivationRule.<MASK><NEW_LINE>if (condition != null && condition) {<NEW_LINE>// only return for an activation, if explicitly evaluated to true<NEW_LINE>return PlanItemCreationType.typeActivate();<NEW_LINE>}<NEW_LINE>// next evaluate for an ignore condition<NEW_LINE>condition = evaluateReactivationCondition(reactivationRule.getIgnoreCondition(), caseInstanceEntity, parentPlanItemInstance);<NEW_LINE>if (condition != null && condition) {<NEW_LINE>// only return ignore, if explicitly evaluated to true<NEW_LINE>return PlanItemCreationType.typeIgnore();<NEW_LINE>}<NEW_LINE>// next evaluate for a default condition<NEW_LINE>condition = evaluateReactivationCondition(reactivationRule.getDefaultCondition(), caseInstanceEntity, parentPlanItemInstance);<NEW_LINE>if (condition != null) {<NEW_LINE>// return on an explicit result, even if false<NEW_LINE>if (condition) {<NEW_LINE>return PlanItemCreationType.typeDefault();<NEW_LINE>}<NEW_LINE>return PlanItemCreationType.typeIgnore();<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
getActivateCondition(), caseInstanceEntity, parentPlanItemInstance);
1,088,752
private void addActionInOnReceive(EReceiverHolder holder, ExecutableElement executableElement, String methodName, JFieldVar actionsField, JFieldVar dataSchemesField) {<NEW_LINE>String actionsInvoke = getInvocationName(actionsField);<NEW_LINE>IJExpression filterCondition = actionsField.invoke(actionsInvoke).arg(holder.getOnReceiveIntentAction());<NEW_LINE>if (dataSchemesField != null) {<NEW_LINE>String dataSchemesInvoke = getInvocationName(dataSchemesField);<NEW_LINE>filterCondition = filterCondition.cand(dataSchemesField.invoke(dataSchemesInvoke).arg(holder.getOnReceiveIntentDataScheme()));<NEW_LINE>}<NEW_LINE>JBlock callActionBlock = holder.getOnReceiveBody()._if(filterCondition)._then();<NEW_LINE>IJExpression receiverRef = holder.getGeneratedClass().staticRef("this");<NEW_LINE>JInvocation callActionInvocation = receiverRef.invoke(methodName);<NEW_LINE>JVar intent = holder.getOnReceiveIntent();<NEW_LINE>JVar extras = null;<NEW_LINE>List<? extends VariableElement> methodParameters = executableElement.getParameters();<NEW_LINE>for (VariableElement param : methodParameters) {<NEW_LINE>AbstractJClass extraParamClass = codeModelHelper.typeMirrorToJClass(param.asType());<NEW_LINE>if (extraParamClass.equals(getClasses().CONTEXT)) {<NEW_LINE>callActionInvocation.<MASK><NEW_LINE>} else if (extraParamClass.equals(getClasses().INTENT) && param.getAnnotation(ReceiverAction.Extra.class) == null) {<NEW_LINE>callActionInvocation.arg(intent);<NEW_LINE>} else if (param.getAnnotation(ReceiverAction.Extra.class) != null) {<NEW_LINE>if (extras == null) {<NEW_LINE>extras = callActionBlock.decl(getClasses().BUNDLE, "extras_", //<NEW_LINE>JOp.//<NEW_LINE>cond(intent.invoke("getExtras").ne(_null()), intent.invoke("getExtras"), _new(getClasses().BUNDLE)));<NEW_LINE>}<NEW_LINE>callActionInvocation.arg(extraHandler.getExtraValue(param, extras, callActionBlock, holder));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>callActionBlock.add(callActionInvocation);<NEW_LINE>callActionBlock._return();<NEW_LINE>}
arg(holder.getOnReceiveContext());
1,243,209
private int save(Collection<HugeServerInfo> serverInfos) {<NEW_LINE>return this.call(() -> {<NEW_LINE>if (serverInfos.isEmpty()) {<NEW_LINE>return serverInfos.size();<NEW_LINE>}<NEW_LINE>HugeServerInfo.Schema schema = HugeServerInfo.schema(this.graph);<NEW_LINE>if (!schema.existVertexLabel(HugeServerInfo.P.SERVER)) {<NEW_LINE>throw new HugeException(<MASK><NEW_LINE>}<NEW_LINE>// Save server info in batch<NEW_LINE>GraphTransaction tx = this.tx();<NEW_LINE>int updated = 0;<NEW_LINE>for (HugeServerInfo server : serverInfos) {<NEW_LINE>if (!server.updated()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>HugeVertex vertex = tx.constructVertex(false, server.asArray());<NEW_LINE>tx.addVertex(vertex);<NEW_LINE>updated++;<NEW_LINE>}<NEW_LINE>// NOTE: actually it is auto-commit, to be improved<NEW_LINE>tx.commitOrRollback();<NEW_LINE>return updated;<NEW_LINE>});<NEW_LINE>}
"Schema is missing for %s", HugeServerInfo.P.SERVER);
496,698
public static String translateStringJapaneseToEnglish(String japaneseKanjiString) {<NEW_LINE>StringBuilder englishStringBuilder = new StringBuilder();<NEW_LINE>try {<NEW_LINE>Map<String, String> data = new HashMap<>();<NEW_LINE>data.put("text", japaneseKanjiString);<NEW_LINE>data.put("lang_from", "ja");<NEW_LINE>data.put("resulsts", "");<NEW_LINE><MASK><NEW_LINE>Document doc = Jsoup.connect("https://grammarchecker.net/translate/ajax.php").referrer("https://grammarchecker.net/translate/").userAgent("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0").timeout(SiteParsingProfile.CONNECTION_TIMEOUT_VALUE).data(data).post();<NEW_LINE>englishStringBuilder.append(doc.select("#results").first().text());<NEW_LINE>} catch (IOException e) {<NEW_LINE>// TODO Auto-generated catch block<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>// return a blank translation in case of error for now<NEW_LINE>return englishStringBuilder.toString();<NEW_LINE>}
data.put("lang", "en");
184,194
final UpdateDomainEndpointOptionsResult executeUpdateDomainEndpointOptions(UpdateDomainEndpointOptionsRequest updateDomainEndpointOptionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDomainEndpointOptionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateDomainEndpointOptionsRequest> request = null;<NEW_LINE>Response<UpdateDomainEndpointOptionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateDomainEndpointOptionsRequestMarshaller().marshall(super.beforeMarshalling(updateDomainEndpointOptionsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudSearch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDomainEndpointOptions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<UpdateDomainEndpointOptionsResult> responseHandler = new StaxResponseHandler<UpdateDomainEndpointOptionsResult>(new UpdateDomainEndpointOptionsResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,814,685
// invalidateIt<NEW_LINE>@Override<NEW_LINE>public String prepareIt() {<NEW_LINE>ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE);<NEW_LINE>MPeriod.testPeriodOpen(getCtx(), getDateAcct(), getC_DocTypeTarget_ID(), getAD_Org_ID());<NEW_LINE>// Lines<NEW_LINE>final MInvoiceLine[] lines = getLines(true);<NEW_LINE>if (lines.length == 0) {<NEW_LINE>throw new AdempiereException("@NoLines@");<NEW_LINE>}<NEW_LINE>// No Cash Book<NEW_LINE>final PaymentRule paymentRule = PaymentRule.ofCode(getPaymentRule());<NEW_LINE>if (paymentRule.isCash() && MCashBook.get(getCtx(), getAD_Org_ID(), getC_Currency_ID()) == null) {<NEW_LINE>throw new AdempiereException("@NoCashBook@");<NEW_LINE>}<NEW_LINE>// Convert/Check DocType<NEW_LINE>if (getC_DocType_ID() != getC_DocTypeTarget_ID()) {<NEW_LINE>setC_DocType_ID(getC_DocTypeTarget_ID());<NEW_LINE>}<NEW_LINE>if (getC_DocType_ID() <= 0) {<NEW_LINE>throw new AdempiereException("No Document Type");<NEW_LINE>}<NEW_LINE>// explodeBOM(); // task 09030: we don't really want to explode the BOM, least of all this uncontrolled way after invoice-candidates-way.<NEW_LINE>if (// setTotals<NEW_LINE>!calculateTaxTotal()) {<NEW_LINE>throw new AdempiereException("Error calculating Tax");<NEW_LINE>}<NEW_LINE>createPaySchedule();<NEW_LINE>// Credit Status<NEW_LINE>if (isSOTrx() && !isReversal()) {<NEW_LINE>// task FRESH-152<NEW_LINE>final IBPartnerStatsDAO bpartnerStatsDAO = Services.get(IBPartnerStatsDAO.class);<NEW_LINE>final BPartnerStats stats = <MASK><NEW_LINE>if (!X_C_BPartner_Stats.SOCREDITSTATUS_NoCreditCheck.equals(stats.getSOCreditStatus())) {<NEW_LINE>final BPartnerCreditLimitRepository creditLimitRepo = Adempiere.getBean(BPartnerCreditLimitRepository.class);<NEW_LINE>final BigDecimal creditLimit = creditLimitRepo.retrieveCreditLimitByBPartnerId(getC_BPartner_ID(), getDateInvoiced());<NEW_LINE>if (Services.get(IBPartnerStatsBL.class).isCreditStopSales(stats, getGrandTotal(true), getDateInvoiced())) {<NEW_LINE>throw new AdempiereException("@BPartnerCreditStop@ - @SO_CreditUsed@=" + stats.getSOCreditUsed() + ", @SO_CreditLimit@=" + creditLimit);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Landed Costs<NEW_LINE>if (!isSOTrx()) {<NEW_LINE>for (final MInvoiceLine line : lines) {<NEW_LINE>final String error = line.allocateLandedCosts();<NEW_LINE>if (error != null && error.length() > 0) {<NEW_LINE>throw new AdempiereException(error);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);<NEW_LINE>// Add up Amounts<NEW_LINE>m_justPrepared = true;<NEW_LINE>if (!DOCACTION_Complete.equals(getDocAction())) {<NEW_LINE>setDocAction(DOCACTION_Complete);<NEW_LINE>}<NEW_LINE>return IDocument.STATUS_InProgress;<NEW_LINE>}
bpartnerStatsDAO.getCreateBPartnerStats(getC_BPartner_ID());
651,779
public Map<String, String> tableOptions() {<NEW_LINE>Map<String, String> options = super.tableOptions();<NEW_LINE>options.<MASK><NEW_LINE>options.put(KafkaConstant.PROPERTIES_BOOTSTRAP_SERVERS, bootstrapServers);<NEW_LINE>if (format instanceof JsonFormat || format instanceof AvroFormat || format instanceof CsvFormat) {<NEW_LINE>if (StringUtils.isEmpty(this.primaryKey)) {<NEW_LINE>options.put(KafkaConstant.CONNECTOR, KafkaConstant.KAFKA);<NEW_LINE>options.put(KafkaConstant.SCAN_STARTUP_MODE, kafkaScanStartupMode.getValue());<NEW_LINE>if (StringUtils.isNotEmpty(scanSpecificOffsets)) {<NEW_LINE>options.put(KafkaConstant.SCAN_STARTUP_SPECIFIC_OFFSETS, scanSpecificOffsets);<NEW_LINE>}<NEW_LINE>options.putAll(format.generateOptions(false));<NEW_LINE>} else {<NEW_LINE>options.put(KafkaConstant.CONNECTOR, KafkaConstant.UPSERT_KAFKA);<NEW_LINE>options.putAll(format.generateOptions(true));<NEW_LINE>}<NEW_LINE>} else if (format instanceof CanalJsonFormat || format instanceof DebeziumJsonFormat) {<NEW_LINE>options.put(KafkaConstant.CONNECTOR, KafkaConstant.KAFKA);<NEW_LINE>options.put(KafkaConstant.SCAN_STARTUP_MODE, kafkaScanStartupMode.getValue());<NEW_LINE>options.put(KafkaConstant.SCAN_STARTUP_SPECIFIC_OFFSETS, scanSpecificOffsets);<NEW_LINE>options.putAll(format.generateOptions(false));<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("kafka extract node format is IllegalArgument");<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(groupId)) {<NEW_LINE>options.put(KafkaConstant.PROPERTIES_GROUP_ID, groupId);<NEW_LINE>}<NEW_LINE>return options;<NEW_LINE>}
put(KafkaConstant.TOPIC, topic);
1,096,294
protected void createHUDocumentsFromTypedModel(final HUDocumentsCollector documentsCollector, final I_DD_Order ddOrder) {<NEW_LINE>final IWarehouseDAO warehouseDAO = Services.get(IWarehouseDAO.class);<NEW_LINE>final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class);<NEW_LINE>final IHUDocumentFactory huFactory = getHandlingUnitsHUDocumentFactory();<NEW_LINE>final Set<Integer> seenHuIds = new HashSet<>();<NEW_LINE>final DDOrderLowLevelDAO ddOrderLowLevelDAO = SpringContextHolder.instance.getBean(DDOrderLowLevelDAO.class);<NEW_LINE>for (final I_DD_OrderLine line : ddOrderLowLevelDAO.retrieveLines(ddOrder)) {<NEW_LINE>//<NEW_LINE>// Create HUDocuments<NEW_LINE>final LocatorId locatorId = warehouseDAO.getLocatorIdByRepoId(line.getM_Locator_ID());<NEW_LINE>final Iterator<I_M_HU> hus = handlingUnitsDAO.retrieveTopLevelHUsForLocator(locatorId);<NEW_LINE>while (hus.hasNext()) {<NEW_LINE>final <MASK><NEW_LINE>final int huId = hu.getM_HU_ID();<NEW_LINE>if (!seenHuIds.add(huId)) {<NEW_LINE>// already added<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final List<IHUDocument> lineDocuments = huFactory.createHUDocumentsFromModel(hu);<NEW_LINE>documentsCollector.getHUDocuments().addAll(lineDocuments);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Create target Capacities<NEW_LINE>final Quantity qtyToDeliver = Quantitys.create(line.getQtyOrdered().subtract(line.getQtyDelivered()), UomId.ofRepoId(line.getC_UOM_ID()));<NEW_LINE>final Capacity targetCapacity = // qty<NEW_LINE>Capacity.// qty<NEW_LINE>createCapacity(// allowNegativeCapacity<NEW_LINE>qtyToDeliver.toBigDecimal(), // allowNegativeCapacity<NEW_LINE>ProductId.ofRepoId(line.getM_Product_ID()), // allowNegativeCapacity<NEW_LINE>qtyToDeliver.getUOM(), false);<NEW_LINE>documentsCollector.getTargetCapacities().add(targetCapacity);<NEW_LINE>}<NEW_LINE>}
I_M_HU hu = hus.next();
654,149
public NewsBlurResponse markFeedsAsRead(FeedSet fs, Long includeOlder, Long includeNewer) {<NEW_LINE>ValueMultimap values = new ValueMultimap();<NEW_LINE>if (fs.getSingleFeed() != null) {<NEW_LINE>values.put(APIConstants.PARAMETER_FEEDID, fs.getSingleFeed());<NEW_LINE>} else if (fs.getMultipleFeeds() != null) {<NEW_LINE>for (String feedId : fs.getMultipleFeeds()) {<NEW_LINE>// the API isn't supposed to care if the zero-id pseudo feed gets mentioned, but it seems to<NEW_LINE>// error out for some users<NEW_LINE>if (!feedId.equals("0")) {<NEW_LINE>values.put(APIConstants.PARAMETER_FEEDID, feedId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (fs.getSingleSocialFeed() != null) {<NEW_LINE>values.put(APIConstants.PARAMETER_FEEDID, APIConstants.VALUE_PREFIX_SOCIAL + fs.getSingleSocialFeed().getKey());<NEW_LINE>} else if (fs.getMultipleSocialFeeds() != null) {<NEW_LINE>for (Map.Entry<String, String> entry : fs.getMultipleSocialFeeds().entrySet()) {<NEW_LINE>values.put(APIConstants.PARAMETER_FEEDID, APIConstants.VALUE_PREFIX_SOCIAL + entry.getKey());<NEW_LINE>}<NEW_LINE>} else if (fs.isAllNormal()) {<NEW_LINE>// all stories uses a special API call<NEW_LINE>return markAllAsRead();<NEW_LINE>} else if (fs.isAllSocial()) {<NEW_LINE>values.put(APIConstants.PARAMETER_FEEDID, APIConstants.VALUE_ALLSOCIAL);<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException("Asked to get stories for FeedSet of unknown type.");<NEW_LINE>}<NEW_LINE>if (includeOlder != null) {<NEW_LINE>// the app uses milliseconds but the API wants seconds<NEW_LINE>long cut = includeOlder.longValue();<NEW_LINE>values.put(APIConstants.PARAMETER_CUTOFF_TIME, Long<MASK><NEW_LINE>values.put(APIConstants.PARAMETER_DIRECTION, APIConstants.VALUE_OLDER);<NEW_LINE>}<NEW_LINE>if (includeNewer != null) {<NEW_LINE>// the app uses milliseconds but the API wants seconds<NEW_LINE>long cut = includeNewer.longValue();<NEW_LINE>values.put(APIConstants.PARAMETER_CUTOFF_TIME, Long.toString(cut / 1000L));<NEW_LINE>values.put(APIConstants.PARAMETER_DIRECTION, APIConstants.VALUE_NEWER);<NEW_LINE>}<NEW_LINE>APIResponse response = post(buildUrl(APIConstants.PATH_MARK_FEED_AS_READ), values);<NEW_LINE>return response.getResponse(gson, NewsBlurResponse.class);<NEW_LINE>}
.toString(cut / 1000L));
542,050
private void createDesignDocForAggregations() throws URISyntaxException, UnsupportedEncodingException, IOException, ClientProtocolException {<NEW_LINE>HttpResponse response = null;<NEW_LINE>URI uri = new URI(CouchDBConstants.PROTOCOL, null, httpHost.getHostName(), httpHost.getPort(), CouchDBConstants.URL_SEPARATOR + databaseName.toLowerCase() + CouchDBConstants.URL_SEPARATOR + "_design/" + CouchDBConstants.AGGREGATIONS, null, null);<NEW_LINE><MASK><NEW_LINE>CouchDBDesignDocument designDocument = new CouchDBDesignDocument();<NEW_LINE>Map<String, MapReduce> views = new HashMap<String, CouchDBDesignDocument.MapReduce>();<NEW_LINE>designDocument.setLanguage(CouchDBConstants.LANGUAGE);<NEW_LINE>createViewForCount(views);<NEW_LINE>createViewForSum(views);<NEW_LINE>createViewForMax(views);<NEW_LINE>createViewForMin(views);<NEW_LINE>createViewForAvg(views);<NEW_LINE>designDocument.setViews(views);<NEW_LINE>String jsonObject = gson.toJson(designDocument);<NEW_LINE>StringEntity entity = new StringEntity(jsonObject);<NEW_LINE>put.setEntity(entity);<NEW_LINE>try {<NEW_LINE>response = httpClient.execute(httpHost, put, CouchDBUtils.getContext(httpHost));<NEW_LINE>} finally {<NEW_LINE>CouchDBUtils.closeContent(response);<NEW_LINE>}<NEW_LINE>}
HttpPut put = new HttpPut(uri);
334,688
final DetachLoadBalancersResult executeDetachLoadBalancers(DetachLoadBalancersRequest detachLoadBalancersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(detachLoadBalancersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DetachLoadBalancersRequest> request = null;<NEW_LINE>Response<DetachLoadBalancersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DetachLoadBalancersRequestMarshaller().marshall(super.beforeMarshalling(detachLoadBalancersRequest));<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, "Auto Scaling");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DetachLoadBalancers");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DetachLoadBalancersResult> responseHandler = new StaxResponseHandler<DetachLoadBalancersResult>(new DetachLoadBalancersResultStaxUnmarshaller());<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());
889,117
public INDArray computeScoreForExamples(double fullNetRegTerm, LayerWorkspaceMgr workspaceMgr) {<NEW_LINE>// For RNN: need to sum up the score over each time step before returning.<NEW_LINE>INDArray input = this.input;<NEW_LINE>INDArray labels = this.labels;<NEW_LINE>if (input == null || labels == null)<NEW_LINE>throw new IllegalStateException("Cannot calculate score without input and labels " + layerId());<NEW_LINE>if (layerConf().getRnnDataFormat() == RNNFormat.NWC) {<NEW_LINE>input = input.permute(0, 2, 1);<NEW_LINE>labels = input.permute(0, 2, 1);<NEW_LINE>}<NEW_LINE>INDArray input2d = TimeSeriesUtils.reshape3dTo2d(input, workspaceMgr, ArrayType.FF_WORKING_MEM);<NEW_LINE>INDArray labels2d = TimeSeriesUtils.reshape3dTo2d(<MASK><NEW_LINE>INDArray maskReshaped;<NEW_LINE>if (this.maskArray != null) {<NEW_LINE>if (this.maskArray.rank() == 3) {<NEW_LINE>maskReshaped = TimeSeriesUtils.reshapePerOutputTimeSeriesMaskTo2d(this.maskArray, workspaceMgr, ArrayType.FF_WORKING_MEM);<NEW_LINE>} else {<NEW_LINE>maskReshaped = TimeSeriesUtils.reshapeTimeSeriesMaskToVector(this.maskArray, workspaceMgr, ArrayType.FF_WORKING_MEM);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>maskReshaped = null;<NEW_LINE>}<NEW_LINE>ILossFunction lossFunction = layerConf().getLossFn();<NEW_LINE>INDArray scoreArray = lossFunction.computeScoreArray(labels2d, input2d, layerConf().getActivationFn(), maskReshaped);<NEW_LINE>// scoreArray: shape [minibatch*timeSeriesLength, 1]<NEW_LINE>// Reshape it to [minibatch, timeSeriesLength] then sum over time step<NEW_LINE>INDArray scoreArrayTs = TimeSeriesUtils.reshapeVectorToTimeSeriesMask(scoreArray, (int) input.size(0));<NEW_LINE>INDArray summedScores = scoreArrayTs.sum(1);<NEW_LINE>if (fullNetRegTerm != 0.0) {<NEW_LINE>summedScores.addi(fullNetRegTerm);<NEW_LINE>}<NEW_LINE>return summedScores;<NEW_LINE>}
labels, workspaceMgr, ArrayType.FF_WORKING_MEM);
394,703
public static DescribeUissResponse unmarshall(DescribeUissResponse describeUissResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeUissResponse.setRequestId(_ctx.stringValue("DescribeUissResponse.RequestId"));<NEW_LINE>describeUissResponse.setPageSize(_ctx.longValue("DescribeUissResponse.PageSize"));<NEW_LINE>describeUissResponse.setPage(_ctx.longValue("DescribeUissResponse.Page"));<NEW_LINE>List<UissItem> uiss = new ArrayList<UissItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeUissResponse.Uiss.Length"); i++) {<NEW_LINE>UissItem uissItem = new UissItem();<NEW_LINE>uissItem.setUisId(_ctx.stringValue("DescribeUissResponse.Uiss[" + i + "].UisId"));<NEW_LINE>uissItem.setNetworkMode(_ctx.stringValue("DescribeUissResponse.Uiss[" + i + "].NetworkMode"));<NEW_LINE>uissItem.setWildcardDomainState(_ctx.stringValue("DescribeUissResponse.Uiss[" + i + "].WildcardDomainState"));<NEW_LINE>uissItem.setDescription(_ctx.stringValue<MASK><NEW_LINE>uissItem.setSpec(_ctx.stringValue("DescribeUissResponse.Uiss[" + i + "].Spec"));<NEW_LINE>uissItem.setState(_ctx.stringValue("DescribeUissResponse.Uiss[" + i + "].State"));<NEW_LINE>uissItem.setCreateTime(_ctx.longValue("DescribeUissResponse.Uiss[" + i + "].CreateTime"));<NEW_LINE>uissItem.setResourceGroupId(_ctx.stringValue("DescribeUissResponse.Uiss[" + i + "].ResourceGroupId"));<NEW_LINE>uissItem.setUisName(_ctx.stringValue("DescribeUissResponse.Uiss[" + i + "].UisName"));<NEW_LINE>uissItem.setRegionId(_ctx.stringValue("DescribeUissResponse.Uiss[" + i + "].RegionId"));<NEW_LINE>uissItem.setMbpsQuota(_ctx.longValue("DescribeUissResponse.Uiss[" + i + "].MbpsQuota"));<NEW_LINE>uissItem.setKppsQuota(_ctx.longValue("DescribeUissResponse.Uiss[" + i + "].KppsQuota"));<NEW_LINE>uissItem.setFlowQuota(_ctx.longValue("DescribeUissResponse.Uiss[" + i + "].FlowQuota"));<NEW_LINE>uissItem.setUsedMBpsQuota(_ctx.longValue("DescribeUissResponse.Uiss[" + i + "].UsedMBpsQuota"));<NEW_LINE>uissItem.setUsedKPpsQuota(_ctx.longValue("DescribeUissResponse.Uiss[" + i + "].UsedKPpsQuota"));<NEW_LINE>uissItem.setUsedFlowQuota(_ctx.longValue("DescribeUissResponse.Uiss[" + i + "].UsedFlowQuota"));<NEW_LINE>uiss.add(uissItem);<NEW_LINE>}<NEW_LINE>describeUissResponse.setUiss(uiss);<NEW_LINE>return describeUissResponse;<NEW_LINE>}
("DescribeUissResponse.Uiss[" + i + "].Description"));
1,154,528
public boolean onGroupClick(ExpandableListView list, View group, int groupPosition, long id) {<NEW_LINE>Intent i = null;<NEW_LINE>if (adapter.isRowAllStories(groupPosition)) {<NEW_LINE>if (currentState == StateFilter.SAVED) {<NEW_LINE>// the existence of this row in saved mode is something of a framework artifact and may<NEW_LINE>// confuse users. redirect them to the activity corresponding to what they will actually see<NEW_LINE>i = new Intent(getActivity(), SavedStoriesItemsList.class);<NEW_LINE>} else {<NEW_LINE>i = new Intent(getActivity(), AllStoriesItemsList.class);<NEW_LINE>}<NEW_LINE>} else if (adapter.isRowGlobalSharedStories(groupPosition)) {<NEW_LINE>i = new Intent(getActivity(), GlobalSharedStoriesItemsList.class);<NEW_LINE>} else if (adapter.isRowAllSharedStories(groupPosition)) {<NEW_LINE>i = new Intent(getActivity(), AllSharedStoriesItemsList.class);<NEW_LINE>} else if (adapter.isRowInfrequentStories(groupPosition)) {<NEW_LINE>i = new Intent(getActivity(), InfrequentItemsList.class);<NEW_LINE>} else if (adapter.isRowReadStories(groupPosition)) {<NEW_LINE>i = new Intent(getActivity(), ReadStoriesItemsList.class);<NEW_LINE>} else if (adapter.isRowSavedStories(groupPosition)) {<NEW_LINE>i = new Intent(getActivity(), SavedStoriesItemsList.class);<NEW_LINE>} else if (adapter.isRowSavedSearches(groupPosition)) {<NEW_LINE>// group not clickable<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>i = new Intent(getActivity(), FolderItemsList.class);<NEW_LINE>String <MASK><NEW_LINE>i.putExtra(FolderItemsList.EXTRA_FOLDER_NAME, canonicalFolderName);<NEW_LINE>adapter.lastFeedViewedId = null;<NEW_LINE>adapter.lastFolderViewed = canonicalFolderName;<NEW_LINE>}<NEW_LINE>FeedSet fs = adapter.getGroup(groupPosition);<NEW_LINE>i.putExtra(ItemsList.EXTRA_FEED_SET, fs);<NEW_LINE>startActivity(i);<NEW_LINE>// by default, ExpandableListViews open/close groups when they are clicked. we want to<NEW_LINE>// only do this when the expando is clicked, so we eat all onGroupClick events and<NEW_LINE>// set an onClick listeneron the expandos when creating each group view that will<NEW_LINE>// perform the expand/collapse functionality<NEW_LINE>return true;<NEW_LINE>}
canonicalFolderName = adapter.getGroupFolderName(groupPosition);
1,070,360
void updateName() {<NEW_LINE>// "Ruby-0-Thread-16: (irb):21"<NEW_LINE>// "Ruby-0-Thread-17@worker#1: (irb):21"<NEW_LINE>String newName;<NEW_LINE>String setName = rubyName;<NEW_LINE>final String currentName = thread.getName();<NEW_LINE>if (currentName != null && currentName.startsWith(RUBY_THREAD_PREFIX)) {<NEW_LINE>// Thread#name separator<NEW_LINE>final int i = currentName.indexOf('@');<NEW_LINE>if (i == -1) {<NEW_LINE>// name not set yet: "Ruby-0-Thread-42: FILE:LINE"<NEW_LINE>int end = currentName.indexOf(':');<NEW_LINE>if (end == -1)<NEW_LINE>end = currentName.length();<NEW_LINE>final String prefix = currentName.substring(0, end);<NEW_LINE>newName = currentName.replace(prefix, prefix + '@' + setName);<NEW_LINE>} else {<NEW_LINE>// name previously set: "Ruby-0-Thread-42@foo: FILE:LINE"<NEW_LINE>// Ruby-0-Thread-42<NEW_LINE>final String prefix = currentName.substring(0, i);<NEW_LINE>int end = currentName.indexOf(':', i);<NEW_LINE>if (end == -1)<NEW_LINE>end = currentName.length();<NEW_LINE>// Ruby-0-Thread-42@foo:<NEW_LINE>final String prefixWithName = <MASK><NEW_LINE>newName = currentName.replace(prefixWithName, setName == null ? prefix : (prefix + '@' + setName));<NEW_LINE>}<NEW_LINE>} else<NEW_LINE>// not a new-thread that and does not match out Ruby- prefix<NEW_LINE>return;<NEW_LINE>// ... very likely user-code set the java thread name - thus do not mess!<NEW_LINE>// current thread can not modify<NEW_LINE>try {<NEW_LINE>thread.setName(newName);<NEW_LINE>} catch (SecurityException ignore) {<NEW_LINE>}<NEW_LINE>}
currentName.substring(0, end);
1,515,065
public Credentials unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Credentials credentials = new Credentials();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("AccessKeyId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>credentials.setAccessKeyId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("SecretAccessKey", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>credentials.setSecretAccessKey(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("SessionToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>credentials.setSessionToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return credentials;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
777,621
private void predictVector(Vector vector, Node node, LabelCounter result, double weight) {<NEW_LINE>if (node.isLeaf()) {<NEW_LINE>result.add(<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>double val = vector.get(node.getFeatureIndex());<NEW_LINE>if (Preprocessing.isMissing(val, zeroAsMissing)) {<NEW_LINE>if (node.getMissingSplit() == null || node.getMissingSplit().length != 1) {<NEW_LINE>throw new IllegalArgumentException("When the value is missing, there must be missing split.");<NEW_LINE>}<NEW_LINE>predictVector(vector, node.getNextNodes()[node.getMissingSplit()[0]], result, weight);<NEW_LINE>} else {<NEW_LINE>if (node.getCategoricalSplit() == null) {<NEW_LINE>if (val <= node.getContinuousSplit()) {<NEW_LINE>// left<NEW_LINE>predictVector(vector, node.getNextNodes()[0], result, weight);<NEW_LINE>} else {<NEW_LINE>// right<NEW_LINE>predictVector(vector, node.getNextNodes()[1], result, weight);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException("Unsupported categorical feature now.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
node.getCounter(), weight);
949,943
protected int assignToNearestCluster() {<NEW_LINE>int changed = 0;<NEW_LINE>for (DBIDIter it = relation.iterDBIDs(); it.valid(); it.advance()) {<NEW_LINE>final int orig = assignment.intValue(it);<NEW_LINE>// Compute the current bound:<NEW_LINE>final double l = lower.doubleValue(it);<NEW_LINE>double u = upper.doubleValue(it);<NEW_LINE>if (u <= l) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Update the upper bound<NEW_LINE>NumberVector fv = relation.get(it);<NEW_LINE>final double curSim = similarity(fv, means[orig]);<NEW_LINE>upper.putDouble(it, u = Math.sqrt(2 - 2 * curSim));<NEW_LINE>if (u <= l) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Find closest center, and distance to the second closest center<NEW_LINE>double max1 = curSim, max2 = Double.NEGATIVE_INFINITY;<NEW_LINE>int cur = orig;<NEW_LINE>for (int i = 0; i < k; i++) {<NEW_LINE>if (i == orig) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>double sim = similarity(fv, means[i]);<NEW_LINE>if (sim > max1) {<NEW_LINE>cur = i;<NEW_LINE>max2 = max1;<NEW_LINE>max1 = sim;<NEW_LINE>} else if (sim > max2) {<NEW_LINE>max2 = sim;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Object has to be reassigned.<NEW_LINE>if (cur != orig) {<NEW_LINE>clusters.get(cur).add(it);<NEW_LINE>clusters.get<MASK><NEW_LINE>assignment.putInt(it, cur);<NEW_LINE>plusMinusEquals(sums[cur], sums[orig], fv);<NEW_LINE>++changed;<NEW_LINE>upper.putDouble(it, max1 == curSim ? u : Math.sqrt(2 - 2 * max1));<NEW_LINE>}<NEW_LINE>lower.putDouble(it, max2 == curSim ? u : Math.sqrt(2 - 2 * max2));<NEW_LINE>}<NEW_LINE>return changed;<NEW_LINE>}
(orig).remove(it);
413,734
public static DynamicConfigAddRingbufferConfigCodec.RequestParameters decodeRequest(ClientMessage clientMessage) {<NEW_LINE>ClientMessage.ForwardFrameIterator iterator = clientMessage.frameIterator();<NEW_LINE>RequestParameters request = new RequestParameters();<NEW_LINE>ClientMessage.Frame initialFrame = iterator.next();<NEW_LINE>request.capacity = decodeInt(initialFrame.content, REQUEST_CAPACITY_FIELD_OFFSET);<NEW_LINE>request.backupCount = decodeInt(initialFrame.content, REQUEST_BACKUP_COUNT_FIELD_OFFSET);<NEW_LINE>request.asyncBackupCount = <MASK><NEW_LINE>request.timeToLiveSeconds = decodeInt(initialFrame.content, REQUEST_TIME_TO_LIVE_SECONDS_FIELD_OFFSET);<NEW_LINE>request.mergeBatchSize = decodeInt(initialFrame.content, REQUEST_MERGE_BATCH_SIZE_FIELD_OFFSET);<NEW_LINE>request.name = StringCodec.decode(iterator);<NEW_LINE>request.inMemoryFormat = StringCodec.decode(iterator);<NEW_LINE>request.ringbufferStoreConfig = CodecUtil.decodeNullable(iterator, RingbufferStoreConfigHolderCodec::decode);<NEW_LINE>request.splitBrainProtectionName = CodecUtil.decodeNullable(iterator, StringCodec::decode);<NEW_LINE>request.mergePolicy = StringCodec.decode(iterator);<NEW_LINE>return request;<NEW_LINE>}
decodeInt(initialFrame.content, REQUEST_ASYNC_BACKUP_COUNT_FIELD_OFFSET);
1,652,699
private void onSearchValueChange() {<NEW_LINE>lastSearchValue_ = searchWidget_.getValue();<NEW_LINE>// fast path -- no query to use<NEW_LINE>String query = StringUtil.notNull(lastSearchValue_).trim();<NEW_LINE>if (query.isEmpty()) {<NEW_LINE>onBeforePopulateMenu(menu_);<NEW_LINE>populateMenu(menu_, initialBranchMap_);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// iterate through initial branch map and copy branches<NEW_LINE>// matching the current query. TODO: should we re-order<NEW_LINE>// based on how 'close' a match we have?<NEW_LINE>Map<String, List<String>> branchMap = new HashMap<>();<NEW_LINE>for (String key : initialBranchMap_.keySet()) {<NEW_LINE>List<String> <MASK><NEW_LINE>List<String> branches = initialBranchMap_.get(key);<NEW_LINE>for (String branch : branches) if (branch.indexOf(query) != -1)<NEW_LINE>filteredBranches.add(branch);<NEW_LINE>if (!filteredBranches.isEmpty())<NEW_LINE>branchMap.put(key, filteredBranches);<NEW_LINE>}<NEW_LINE>// re-populate<NEW_LINE>menu_.clearItems();<NEW_LINE>onBeforePopulateMenu(menu_);<NEW_LINE>populateMenu(menu_, branchMap);<NEW_LINE>}
filteredBranches = new ArrayList<>();
541,670
public static Revision fetchToTemp(GitClient client, ProgressMonitor pm, GitBranch branch) throws GitException {<NEW_LINE>if (!branch.isRemote()) {<NEW_LINE>GitBranch trackedBranch = branch.getTrackedBranch();<NEW_LINE>if (trackedBranch == null || !trackedBranch.isRemote()) {<NEW_LINE>throw new GitException(Bundle.MSG_FetchUtils_noTrackingBranch(branch.getName()));<NEW_LINE>}<NEW_LINE>branch = trackedBranch;<NEW_LINE>}<NEW_LINE>GitRemoteConfig cfg = FetchUtils.getRemoteConfigForActiveBranch(branch, RepositoryInfo.getInstance(client.getRepositoryRoot()), null);<NEW_LINE>if (cfg == null) {<NEW_LINE>throw new GitException(Bundle.MSG_FetchUtils_noRemoteConfig());<NEW_LINE>}<NEW_LINE>if (cfg.getUris().isEmpty()) {<NEW_LINE>throw new GitException(Bundle.MSG_FetchUtils_noRemoteUrl(cfg.getRemoteName()));<NEW_LINE>}<NEW_LINE>String remotePeer = findRemotePeer(cfg.getFetchRefSpecs(), branch);<NEW_LINE>if (remotePeer == null) {<NEW_LINE>// try backup, the same name<NEW_LINE>remotePeer = branch.getName().split("/", 0)[1];<NEW_LINE>}<NEW_LINE>client.deleteBranch(TMP_REFS_PREFIX + "/" + remotePeer, true, GitUtils.NULL_PROGRESS_MONITOR);<NEW_LINE>Map<String, GitTransportUpdate> updates = client.fetch(cfg.getUris().get(0), Collections.singletonList("+refs/heads/" + remotePeer + ":refs/" + TMP_REFS_PREFIX + "/" + remotePeer), pm);<NEW_LINE>GitTransportUpdate upd = updates.get(TMP_REFS_PREFIX + "/" + remotePeer);<NEW_LINE>if (upd != null) {<NEW_LINE>client.deleteBranch(upd.getLocalName(<MASK><NEW_LINE>new File(GitUtils.getGitFolderForRoot(client.getRepositoryRoot()), "refs/" + TMP_REFS_PREFIX).delete();<NEW_LINE>return new Revision(upd.getNewObjectId(), upd.getLocalName().split("/", 0)[1]);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
), true, GitUtils.NULL_PROGRESS_MONITOR);
840,872
private boolean annotationHandlerSourceTargetMatch(String[] msources, String[] mtargets, Annotation methodAnnotation, State<S, E> sourceState, State<S, E> targetState) {<NEW_LINE>Map<String, Object> annotationAttributes = AnnotationUtils.getAnnotationAttributes(methodAnnotation);<NEW_LINE>Object source = annotationAttributes.get("source");<NEW_LINE>Object target = annotationAttributes.get("target");<NEW_LINE>Collection<String> scoll = StateMachineUtils.toStringCollection(source);<NEW_LINE>if (scoll.isEmpty() && msources != null) {<NEW_LINE>scoll = Arrays.asList(msources);<NEW_LINE>}<NEW_LINE>Collection<String> tcoll = StateMachineUtils.toStringCollection(target);<NEW_LINE>if (tcoll.isEmpty() && mtargets != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>boolean handle = false;<NEW_LINE>if (!scoll.isEmpty() && !tcoll.isEmpty()) {<NEW_LINE>if (sourceState != null && targetState != null && StateMachineUtils.containsAtleastOne(scoll, StateMachineUtils.toStringCollection(sourceState.getIds())) && StateMachineUtils.containsAtleastOne(tcoll, StateMachineUtils.toStringCollection(targetState.getIds()))) {<NEW_LINE>handle = true;<NEW_LINE>}<NEW_LINE>} else if (!scoll.isEmpty()) {<NEW_LINE>if (sourceState != null && StateMachineUtils.containsAtleastOne(scoll, StateMachineUtils.toStringCollection(sourceState.getIds()))) {<NEW_LINE>handle = true;<NEW_LINE>}<NEW_LINE>} else if (!tcoll.isEmpty()) {<NEW_LINE>if (targetState != null && StateMachineUtils.containsAtleastOne(tcoll, StateMachineUtils.toStringCollection(targetState.getIds()))) {<NEW_LINE>handle = true;<NEW_LINE>}<NEW_LINE>} else if (scoll.isEmpty() && tcoll.isEmpty()) {<NEW_LINE>handle = true;<NEW_LINE>}<NEW_LINE>return handle;<NEW_LINE>}
tcoll = Arrays.asList(mtargets);
989,876
private boolean resolveGenericsType(GenericsType genericsType) {<NEW_LINE>if (genericsType.isResolved())<NEW_LINE>return true;<NEW_LINE>currentClass.setUsingGenerics(true);<NEW_LINE>ClassNode type = genericsType.getType();<NEW_LINE>// save name before redirect<NEW_LINE>GenericsTypeName name = new GenericsTypeName(type.getName());<NEW_LINE>ClassNode[] bounds = genericsType.getUpperBounds();<NEW_LINE>if (!genericParameterNames.containsKey(name)) {<NEW_LINE>if (bounds != null) {<NEW_LINE>for (ClassNode upperBound : bounds) {<NEW_LINE>resolveOrFail(upperBound, genericsType);<NEW_LINE>type.setRedirect(upperBound);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else if (genericsType.isWildcard()) {<NEW_LINE>type.setRedirect(ClassHelper.OBJECT_TYPE);<NEW_LINE>} else {<NEW_LINE>resolveOrFail(type, genericsType);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>GenericsType gt = genericParameterNames.get(name);<NEW_LINE>type.setRedirect(gt.getType());<NEW_LINE>genericsType.setPlaceholder(true);<NEW_LINE>}<NEW_LINE>if (genericsType.getLowerBound() != null) {<NEW_LINE>resolveOrFail(genericsType.getLowerBound(), genericsType);<NEW_LINE>}<NEW_LINE>if (resolveGenericsTypes(type.getGenericsTypes())) {<NEW_LINE>genericsType.setResolved(genericsType.getType().isResolved());<NEW_LINE>}<NEW_LINE>return genericsType.isResolved();<NEW_LINE>}
resolveGenericsTypes(upperBound.getGenericsTypes());
689,649
private void showInfoAboutRoot() {<NEW_LINE>boolean rootIsAvailable = preferenceRepository.get().getBoolPreference(ROOT_IS_AVAILABLE);<NEW_LINE>boolean busyBoxIsAvailable = preferenceRepository.get().getBoolPreference("bbOK");<NEW_LINE>boolean mitmDetected = ArpScanner.getArpAttackDetected() || ArpScanner.getDhcpGatewayAttackDetected();<NEW_LINE>if (mitmDetected) {<NEW_LINE>DialogFragment commandResult = NotificationDialogFragment.newInstance(getString(R.string.notification_mitm));<NEW_LINE>commandResult.show(getSupportFragmentManager(), "NotificationDialogFragment");<NEW_LINE>} else if (rootIsAvailable) {<NEW_LINE>DialogFragment commandResult;<NEW_LINE>if (busyBoxIsAvailable) {<NEW_LINE>commandResult = NotificationDialogFragment.newInstance(TopFragment.verSU + "\n\t\n" + TopFragment.verBB);<NEW_LINE>} else {<NEW_LINE>commandResult = NotificationDialogFragment.newInstance(TopFragment.verSU);<NEW_LINE>}<NEW_LINE>commandResult.show(getSupportFragmentManager(), "NotificationDialogFragment");<NEW_LINE>} else {<NEW_LINE>DialogFragment commandResult;<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {<NEW_LINE>commandResult = NotificationDialogFragment.newInstance(R.string.message_no_root_used);<NEW_LINE>} else {<NEW_LINE>commandResult = NotificationDialogFragment.newInstance(R.string.message_no_root_used_kitkat);<NEW_LINE>}<NEW_LINE>commandResult.<MASK><NEW_LINE>}<NEW_LINE>}
show(getSupportFragmentManager(), "NotificationDialogFragment");
1,723,530
public HttpCmdResponse execute(HttpCmdRequest request) throws Exception {<NEW_LINE>HttpCmdResponse response = new HttpCmdResponse();<NEW_LINE>response.setSuccess(false);<NEW_LINE>String <MASK><NEW_LINE>if (StringUtils.isEmpty(jobJSON)) {<NEW_LINE>response.setMsg("job can not be null");<NEW_LINE>return response;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Job job = JSON.parse(jobJSON, Job.class);<NEW_LINE>if (job == null) {<NEW_LINE>response.setMsg("job can not be null");<NEW_LINE>return response;<NEW_LINE>}<NEW_LINE>if (job.isNeedFeedback() && StringUtils.isEmpty(job.getSubmitNodeGroup())) {<NEW_LINE>response.setMsg("if needFeedback, job.SubmitNodeGroup can not be null");<NEW_LINE>return response;<NEW_LINE>}<NEW_LINE>job.checkField();<NEW_LINE>JobSubmitRequest jobSubmitRequest = new JobSubmitRequest();<NEW_LINE>jobSubmitRequest.setJobs(Collections.singletonList(job));<NEW_LINE>appContext.getJobReceiver().receive(jobSubmitRequest);<NEW_LINE>LOGGER.info("add job succeed, {}", job);<NEW_LINE>response.setSuccess(true);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.error("add job error, message:", e);<NEW_LINE>response.setMsg("add job error, message:" + e.getMessage());<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
jobJSON = request.getParam("job");
1,360,340
public EventInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EventInfo eventInfo = new EventInfo();<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("Name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>eventInfo.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("State", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>eventInfo.setState(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return eventInfo;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,492,969
void decode(ByteBuf payload) {<NEW_LINE>while (payload.isReadable()) {<NEW_LINE>short tokenType = payload.readUnsignedByte();<NEW_LINE>switch(tokenType) {<NEW_LINE>case LOGINACK:<NEW_LINE>payload.skipBytes(payload.readUnsignedShortLE());<NEW_LINE>handleLoginAck();<NEW_LINE>break;<NEW_LINE>case COLMETADATA:<NEW_LINE>handleColumnMetadata(payload);<NEW_LINE>break;<NEW_LINE>case ROW:<NEW_LINE>handleRow(payload);<NEW_LINE>break;<NEW_LINE>case NBCROW:<NEW_LINE>handleNbcRow(payload);<NEW_LINE>break;<NEW_LINE>case DONEINPROC:<NEW_LINE>case DONEPROC:<NEW_LINE>case DONE:<NEW_LINE>handleDone(tokenType, payload);<NEW_LINE>break;<NEW_LINE>case INFO:<NEW_LINE>case ORDER:<NEW_LINE>case TABNAME:<NEW_LINE>case COLINFO:<NEW_LINE>payload.<MASK><NEW_LINE>break;<NEW_LINE>case RETURNSTATUS:<NEW_LINE>payload.skipBytes(4);<NEW_LINE>break;<NEW_LINE>case RETURNVALUE:<NEW_LINE>handleReturnValue(payload);<NEW_LINE>break;<NEW_LINE>case ERROR:<NEW_LINE>handleError(payload);<NEW_LINE>break;<NEW_LINE>case ENVCHANGE:<NEW_LINE>handleEnvChange(payload);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException("Unsupported token: 0x" + Integer.toHexString(tokenType));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>handleDecodingComplete();<NEW_LINE>}
skipBytes(payload.readUnsignedShortLE());
1,390,270
private static void loadFile() throws IOException {<NEW_LINE>kits.clear();<NEW_LINE>NbtCompound rootTag = NbtIo.read(new File(configPath.toFile(), "kits.dat"));<NEW_LINE>if (rootTag == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int currentVersion = SharedConstants.getGameVersion().getWorldVersion();<NEW_LINE>final int fileVersion = rootTag.getInt("DataVersion");<NEW_LINE>NbtCompound compoundTag = rootTag.getCompound("Kits");<NEW_LINE>if (fileVersion >= currentVersion) {<NEW_LINE>compoundTag.getKeys().forEach(key -> kits.put(key, compoundTag.getList(key, NbtElement.COMPOUND_TYPE)));<NEW_LINE>} else {<NEW_LINE>compoundTag.getKeys().forEach(key -> {<NEW_LINE>NbtList updatedListTag = new NbtList();<NEW_LINE>compoundTag.getList(key, NbtElement.COMPOUND_TYPE).forEach(tag -> {<NEW_LINE>Dynamic<NbtElement> oldTagDynamic = new Dynamic<>(NbtOps.INSTANCE, tag);<NEW_LINE>Dynamic<NbtElement> newTagDynamic = client.getDataFixer().update(TypeReferences.ITEM_STACK, oldTagDynamic, fileVersion, currentVersion);<NEW_LINE>updatedListTag.add(newTagDynamic.getValue());<NEW_LINE>});<NEW_LINE><MASK><NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
kits.put(key, updatedListTag);
1,379,738
public String loginUser(String username, String password) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'password' is set<NEW_LINE>if (password == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/user/login".replaceAll("\\{format\\}", "json");<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));<NEW_LINE>final String[] localVarAccepts = { "application/xml", "application/json" };<NEW_LINE>final String <MASK><NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>GenericType<String> localVarReturnType = new GenericType<String>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
268,192
private static CertificateMessage readX509CertificateMessage(final DatagramReader reader) throws HandshakeException {<NEW_LINE>LOGGER.debug("Parsing X.509 CERTIFICATE message");<NEW_LINE>int certificateChainLength = reader.read(CERTIFICATE_LIST_LENGTH_BITS);<NEW_LINE>DatagramReader rangeReader = reader.createRangeReader(certificateChainLength);<NEW_LINE>try {<NEW_LINE>CertificateFactory factory = CERTIFICATE_FACTORY.currentWithCause();<NEW_LINE>List<Certificate> certs = new ArrayList<>();<NEW_LINE>while (rangeReader.bytesAvailable()) {<NEW_LINE>int <MASK><NEW_LINE>certs.add(factory.generateCertificate(rangeReader.createRangeInputStream(certificateLength)));<NEW_LINE>}<NEW_LINE>return new CertificateMessage(factory.generateCertPath(certs));<NEW_LINE>} catch (GeneralSecurityException e) {<NEW_LINE>throw new HandshakeException("Cannot parse X.509 certificate chain provided by peer", new AlertMessage(AlertLevel.FATAL, AlertDescription.BAD_CERTIFICATE), e);<NEW_LINE>}<NEW_LINE>}
certificateLength = rangeReader.read(CERTIFICATE_LENGTH_BITS);
221,723
public Object doIt(VirtualFrame frame, Object[] args, PKeyword[] kwargs, @CachedLibrary("getContext().getSysModules().getDictStorage()") HashingStorageLibrary hlib) {<NEW_LINE>if (getDebuggerSessionCount() > 0) {<NEW_LINE>// we already have a Truffle debugger attached, it'll stop here<NEW_LINE>return PNone.NONE;<NEW_LINE>} else if (getContext().isInitialized()) {<NEW_LINE>if (callNode == null) {<NEW_LINE>CompilerDirectives.transferToInterpreterAndInvalidate();<NEW_LINE>getBreakpointhookNode = insert(ReadAttributeFromObjectNode.create());<NEW_LINE>callNode = insert(CallNode.create());<NEW_LINE>}<NEW_LINE>PDict sysModules = getContext().getSysModules();<NEW_LINE>Object sysModule = hlib.getItem(sysModules.getDictStorage(), "sys");<NEW_LINE>Object breakpointhook = getBreakpointhookNode.execute(sysModule, BREAKPOINTHOOK);<NEW_LINE>if (breakpointhook == PNone.NO_VALUE) {<NEW_LINE>throw raise(PythonBuiltinClassType.RuntimeError, ErrorMessages.LOST_SYSBREAKPOINTHOOK);<NEW_LINE>}<NEW_LINE>return callNode.execute(<MASK><NEW_LINE>} else {<NEW_LINE>return PNone.NONE;<NEW_LINE>}<NEW_LINE>}
frame, breakpointhook, args, kwargs);
995,223
private static int[] buildLookupArray(Iterable<LocalDate> holidays, Iterable<DayOfWeek> weekendDays, int startYear, int endYearExclusive, Iterable<LocalDate> workingDays) {<NEW_LINE>// array that has one entry for each month<NEW_LINE>int[] array = new int[<MASK><NEW_LINE>// loop through all months to handle end-of-month and weekends<NEW_LINE>LocalDate firstOfMonth = LocalDate.of(startYear, 1, 1);<NEW_LINE>for (int i = 0; i < array.length; i++) {<NEW_LINE>int monthLen = firstOfMonth.lengthOfMonth();<NEW_LINE>// set each valid day-of-month to be a business day<NEW_LINE>// the bits for days beyond the end-of-month will be unset and thus treated as non-business days<NEW_LINE>// the minus one part converts a single set bit into each lower bit being set<NEW_LINE>array[i] = (1 << monthLen) - 1;<NEW_LINE>// unset the bits associated with a weekend<NEW_LINE>// can unset across whole month using repeating pattern of 7 bits<NEW_LINE>// just need to find the offset between the weekend and the day-of-week of the 1st of the month<NEW_LINE>for (DayOfWeek weekendDow : weekendDays) {<NEW_LINE>int daysDiff = weekendDow.getValue() - firstOfMonth.getDayOfWeek().getValue();<NEW_LINE>int offset = (daysDiff < 0 ? daysDiff + 7 : daysDiff);<NEW_LINE>// CSIGNORE<NEW_LINE>array[i] &= ~(0b10000001000000100000010000001 << offset);<NEW_LINE>}<NEW_LINE>firstOfMonth = firstOfMonth.plusMonths(1);<NEW_LINE>}<NEW_LINE>// unset the bit associated with each holiday date<NEW_LINE>for (LocalDate date : holidays) {<NEW_LINE>int index = (date.getYear() - startYear) * 12 + date.getMonthValue() - 1;<NEW_LINE>array[index] &= ~(1 << (date.getDayOfMonth() - 1));<NEW_LINE>}<NEW_LINE>// set the bit associated with each overriding working day<NEW_LINE>for (LocalDate date : workingDays) {<NEW_LINE>if (date.getYear() < startYear || date.getYear() >= endYearExclusive) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int index = (date.getYear() - startYear) * 12 + date.getMonthValue() - 1;<NEW_LINE>array[index] |= (1 << (date.getDayOfMonth() - 1));<NEW_LINE>}<NEW_LINE>return array;<NEW_LINE>}
(endYearExclusive - startYear) * 12];
736,545
ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>// logger.debug(effectivePerson, "receive:{}.", jsonElement);<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>ActionResult<Wo> <MASK><NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>Application exist = this.getApplication(business, wi.getId(), wi.getName(), wi.getAlias());<NEW_LINE>Wo wo = new Wo();<NEW_LINE>wo.setId(wi.getId());<NEW_LINE>wo.setName(wi.getName());<NEW_LINE>wo.setAlias(wi.getAlias());<NEW_LINE>wo.setExist(false);<NEW_LINE>if (null != exist) {<NEW_LINE>wo.setExist(true);<NEW_LINE>wo.setExistName(exist.getName());<NEW_LINE>wo.setExistAlias(exist.getAlias());<NEW_LINE>wo.setExistId(exist.getId());<NEW_LINE>}<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
result = new ActionResult<>();
1,822,953
final DescribeWorkteamResult executeDescribeWorkteam(DescribeWorkteamRequest describeWorkteamRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeWorkteamRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeWorkteamRequest> request = null;<NEW_LINE>Response<DescribeWorkteamResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeWorkteamRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeWorkteamRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeWorkteam");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeWorkteamResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeWorkteamResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
145,251
private void addJAXWSServiceMapBinding(ProfileServiceMapMgr smgr, String appid, String className, Map<String, Object> classInfo) {<NEW_LINE>Collection<String> classPaths = new ArrayList<String>();<NEW_LINE>String classPath = null;<NEW_LINE>if (classInfo.containsKey("dyn")) {<NEW_LINE>Map<String, Object> classDynInfo = (Map<String, Object>) classInfo.get("dyn");<NEW_LINE>classPath = (String) classDynInfo.get("url");<NEW_LINE>if (StringHelper.isEmpty(classPath)) {<NEW_LINE>String[] serviceImplClsInfo = className.split("\\.");<NEW_LINE>classPath = serviceImplClsInfo[serviceImplClsInfo.length - 1] + "Service";<NEW_LINE>}<NEW_LINE>} else if (classInfo.containsKey("des")) {<NEW_LINE>Map<String, Object> classDesInfo = (Map<String, Object>) classInfo.get("des");<NEW_LINE>classPath = (String) classDesInfo.get("address");<NEW_LINE>if (classPath == null) {<NEW_LINE>classPath = (String) classDesInfo.get("url-pattern");<NEW_LINE>}<NEW_LINE>} else if (classInfo.containsKey("anno")) {<NEW_LINE>Map<String, Object> classAnnoInfo = (Map<String, Object>) classInfo.get("anno");<NEW_LINE>Map<String, Object> annoWebService = (Map<String, Object>) classAnnoInfo.get("javax.jws.WebService");<NEW_LINE>if (null != annoWebService) {<NEW_LINE>classPath = (String) annoWebService.get("serviceName");<NEW_LINE>}<NEW_LINE>if (StringHelper.isEmpty(classPath)) {<NEW_LINE>String[] serviceImplClsInfo = className.split("\\.");<NEW_LINE>classPath = serviceImplClsInfo[serviceImplClsInfo.length - 1] + "Service";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>classPaths.add<MASK><NEW_LINE>smgr.addServiceMapBinding(appid, className, null, classPaths, 0);<NEW_LINE>}
(formatRelativePath(classPath, false));
1,373,453
public static Link parse(String origin, String link, boolean allowModuleName) {<NEW_LINE>String originMod = origin;<NEW_LINE>int index = link.indexOf('#');<NEW_LINE>if (index == -1) {<NEW_LINE>if (allowModuleName) {<NEW_LINE>index = link.lastIndexOf('/');<NEW_LINE>if (index == -1) {<NEW_LINE>return new Link(null, null, link);<NEW_LINE>}<NEW_LINE>return new Link(null, link.substring(0, index), link.substring(index + 1));<NEW_LINE>}<NEW_LINE>return new Link(null, null, link);<NEW_LINE>}<NEW_LINE>String name = link.substring(index + 1);<NEW_LINE>String uri = link.substring(0, index);<NEW_LINE>if (originMod == null) {<NEW_LINE>originMod = "";<NEW_LINE>} else {<NEW_LINE>index = originMod.lastIndexOf('/');<NEW_LINE>originMod = index == -1 ? "" : <MASK><NEW_LINE>}<NEW_LINE>if (uri.startsWith("../")) {<NEW_LINE>uri = uri.substring(3);<NEW_LINE>}<NEW_LINE>while (uri.startsWith("../")) {<NEW_LINE>index = originMod.lastIndexOf('/');<NEW_LINE>if (index == -1) {<NEW_LINE>originMod = "";<NEW_LINE>} else {<NEW_LINE>originMod = originMod.substring(0, index);<NEW_LINE>}<NEW_LINE>uri = uri.substring(3);<NEW_LINE>}<NEW_LINE>return new Link(originMod.isEmpty() ? uri : originMod + '/' + uri, null, name);<NEW_LINE>}
originMod.substring(0, index);
570,252
public boolean isValid() {<NEW_LINE>if (!isListenerSelected()) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>wizard.// NOI18N<NEW_LINE>putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, org.openide.util.NbBundle.getMessage(ListenerPanel.class, "MSG_noListenerSelected"));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Project project = Templates.getProject(wizard);<NEW_LINE>Sources sources = ProjectUtils.getSources(project);<NEW_LINE>SourceGroup[] groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);<NEW_LINE>ClassPath cp = null;<NEW_LINE>String resource = null;<NEW_LINE>if (groups != null && groups.length != 0) {<NEW_LINE>cp = ClassPath.getClassPath(groups[0].getRootFolder(), ClassPath.COMPILE);<NEW_LINE>if (isContextListener()) {<NEW_LINE>resource = SERVLET_CONTEXT_LISTENER;<NEW_LINE>} else if (isContextAttrListener()) {<NEW_LINE>resource = SERVLET_CONTEXT_ATTRIBUTE_LISTENER;<NEW_LINE>} else if (isSessionListener()) {<NEW_LINE>resource = HTTP_SESSION_LISTENER;<NEW_LINE>} else if (isSessionAttrListener()) {<NEW_LINE>resource = HTTP_SESSION_ATTRIBUTE_LISTENER;<NEW_LINE>} else if (isRequestListener()) {<NEW_LINE>resource = SERVLET_REQUEST_LISTENER;<NEW_LINE>} else if (isRequestAttrListener()) {<NEW_LINE>resource = SERVLET_REQUEST_ATTRIBUTE_LISTENER;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (cp != null && resource != null && cp.findResource(resource.replace('.', '/') + ".class") == null) {<NEW_LINE>// NOI18N<NEW_LINE>wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, org.openide.util.NbBundle.getMessage(ListenerPanel.class, "MSG_noResourceInClassPath", resource));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>WebModule module = WebModule.getWebModule(project.getProjectDirectory());<NEW_LINE>if (createElementInDD() && (module == null || module.getWebInf() == null)) {<NEW_LINE>// NOI18N<NEW_LINE>wizard.putProperty(WizardDescriptor.PROP_WARNING_MESSAGE, org.openide.util.NbBundle.getMessage(ListenerPanel<MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, "");<NEW_LINE>// NOI18N<NEW_LINE>wizard.putProperty(WizardDescriptor.PROP_WARNING_MESSAGE, "");<NEW_LINE>return true;<NEW_LINE>}
.class, "MSG_noWebInfDirectory", resource));
1,017,151
public static Shape createLineRegion(Line2D line, float width) {<NEW_LINE>Args.nullNotPermitted(line, "line");<NEW_LINE>final GeneralPath result = new GeneralPath();<NEW_LINE>final float x1 = (float) line.getX1();<NEW_LINE>final float x2 = (float) line.getX2();<NEW_LINE>final float y1 = (float) line.getY1();<NEW_LINE>final float y2 = (float) line.getY2();<NEW_LINE>if ((x2 - x1) != 0.0) {<NEW_LINE>final double theta = Math.atan((y2 - y1) / (x2 - x1));<NEW_LINE>final float dx = (float) Math.sin(theta) * width;<NEW_LINE>final float dy = (float) Math.cos(theta) * width;<NEW_LINE>result.moveTo(x1 - dx, y1 + dy);<NEW_LINE>result.lineTo(<MASK><NEW_LINE>result.lineTo(x2 + dx, y2 - dy);<NEW_LINE>result.lineTo(x2 - dx, y2 + dy);<NEW_LINE>result.closePath();<NEW_LINE>} else {<NEW_LINE>// special case, vertical line<NEW_LINE>result.moveTo(x1 - width / 2.0f, y1);<NEW_LINE>result.lineTo(x1 + width / 2.0f, y1);<NEW_LINE>result.lineTo(x2 + width / 2.0f, y2);<NEW_LINE>result.lineTo(x2 - width / 2.0f, y2);<NEW_LINE>result.closePath();<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
x1 + dx, y1 - dy);
1,069,605
protected XContentBuilder internalXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>builder.field(SearchSourceBuilder.<MASK><NEW_LINE>builder.field(SearchSourceBuilder.SIZE_FIELD.getPreferredName(), size);<NEW_LINE>builder.field(SearchSourceBuilder.VERSION_FIELD.getPreferredName(), version);<NEW_LINE>builder.field(SearchSourceBuilder.SEQ_NO_PRIMARY_TERM_FIELD.getPreferredName(), seqNoAndPrimaryTerm);<NEW_LINE>builder.field(SearchSourceBuilder.EXPLAIN_FIELD.getPreferredName(), explain);<NEW_LINE>if (fetchSourceContext != null) {<NEW_LINE>builder.field(SearchSourceBuilder._SOURCE_FIELD.getPreferredName(), fetchSourceContext);<NEW_LINE>}<NEW_LINE>if (storedFieldsContext != null) {<NEW_LINE>storedFieldsContext.toXContent(SearchSourceBuilder.STORED_FIELDS_FIELD.getPreferredName(), builder);<NEW_LINE>}<NEW_LINE>if (docValueFields != null) {<NEW_LINE>builder.startArray(SearchSourceBuilder.DOCVALUE_FIELDS_FIELD.getPreferredName());<NEW_LINE>for (FieldAndFormat docValueField : docValueFields) {<NEW_LINE>docValueField.toXContent(builder, params);<NEW_LINE>}<NEW_LINE>builder.endArray();<NEW_LINE>}<NEW_LINE>if (fetchFields != null) {<NEW_LINE>builder.startArray(SearchSourceBuilder.FETCH_FIELDS_FIELD.getPreferredName());<NEW_LINE>for (FieldAndFormat docValueField : fetchFields) {<NEW_LINE>docValueField.toXContent(builder, params);<NEW_LINE>}<NEW_LINE>builder.endArray();<NEW_LINE>}<NEW_LINE>if (scriptFields != null) {<NEW_LINE>builder.startObject(SearchSourceBuilder.SCRIPT_FIELDS_FIELD.getPreferredName());<NEW_LINE>for (ScriptField scriptField : scriptFields) {<NEW_LINE>scriptField.toXContent(builder, params);<NEW_LINE>}<NEW_LINE>builder.endObject();<NEW_LINE>}<NEW_LINE>if (sorts != null) {<NEW_LINE>builder.startArray(SearchSourceBuilder.SORT_FIELD.getPreferredName());<NEW_LINE>for (SortBuilder<?> sort : sorts) {<NEW_LINE>sort.toXContent(builder, params);<NEW_LINE>}<NEW_LINE>builder.endArray();<NEW_LINE>}<NEW_LINE>if (trackScores) {<NEW_LINE>builder.field(SearchSourceBuilder.TRACK_SCORES_FIELD.getPreferredName(), true);<NEW_LINE>}<NEW_LINE>if (highlightBuilder != null) {<NEW_LINE>builder.field(SearchSourceBuilder.HIGHLIGHT_FIELD.getPreferredName(), highlightBuilder);<NEW_LINE>}<NEW_LINE>builder.endObject();<NEW_LINE>return builder;<NEW_LINE>}
FROM_FIELD.getPreferredName(), from);
426,874
public void readPayload(int id, PacketBufferBC buffer, Side side, MessageContext ctx) throws IOException {<NEW_LINE>super.readPayload(id, buffer, side, ctx);<NEW_LINE>if (id == NET_GUI_DATA) {<NEW_LINE>recipesStates.clear();<NEW_LINE>int count = buffer.readInt();<NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE>AssemblyInstruction instruction = lookupRecipe(buffer.readString(), buffer.readItemStack());<NEW_LINE>recipesStates.put(instruction, EnumAssemblyRecipeState.values()<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (id == NET_RECIPE_STATE) {<NEW_LINE>AssemblyInstruction recipe = lookupRecipe(buffer.readString(), buffer.readItemStack());<NEW_LINE>EnumAssemblyRecipeState state = EnumAssemblyRecipeState.values()[buffer.readInt()];<NEW_LINE>if (recipesStates.containsKey(recipe)) {<NEW_LINE>recipesStates.put(recipe, state);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
[buffer.readInt()]);
564,351
protected void execGetGSP(HttpAction action) {<NEW_LINE>ActionLib.setCommonHeaders(action);<NEW_LINE>MediaType mediaType = ActionLib.contentNegotationRDF(action);<NEW_LINE>OutputStream output;<NEW_LINE>try {<NEW_LINE>output = action.getResponseOutputStream();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>ServletOps.errorOccurred(ex);<NEW_LINE>output = null;<NEW_LINE>}<NEW_LINE>Lang lang = RDFLanguages.contentTypeToLang(mediaType.getContentTypeStr());<NEW_LINE>if (lang == null)<NEW_LINE>lang = RDFLanguages.TURTLE;<NEW_LINE>action.beginRead();<NEW_LINE>if (action.verbose)<NEW_LINE>action.log.info(format("[%d] Get: Content-Type=%s, Charset=%s => %s", action.id, mediaType.getContentTypeStr(), mediaType.getCharset(), lang.getName()));<NEW_LINE>try {<NEW_LINE>DatasetGraph dsg = decideDataset(action);<NEW_LINE>GraphTarget target = determineTargetGSP(dsg, action);<NEW_LINE>if (action.log.isDebugEnabled())<NEW_LINE>action.log.debug("GET->" + target);<NEW_LINE>boolean exists = target.exists();<NEW_LINE>if (!exists)<NEW_LINE>ServletOps.errorNotFound("No such graph: " + target.label());<NEW_LINE><MASK><NEW_LINE>// Special case RDF/XML to be the plain (faster, less readable) form<NEW_LINE>try {<NEW_LINE>// Use the preferred MIME type.<NEW_LINE>ActionLib.graphResponse(action, graph, lang);<NEW_LINE>ServletOps.success(action);<NEW_LINE>} catch (OperationDeniedException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (JenaException ex) {<NEW_LINE>// ActionLib.graphResponse has special handling for RDF/XML but for<NEW_LINE>// other syntax forms unexpected errors mean we may or may not have<NEW_LINE>// written some output because of output buffering.<NEW_LINE>// Attempt to send an error - which may not work.<NEW_LINE>// "406 Not Acceptable" - Accept header issue; target is fine.<NEW_LINE>ServletOps.error(HttpSC.NOT_ACCEPTABLE_406, "Failed to write output: " + ex.getMessage());<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>action.endRead();<NEW_LINE>}<NEW_LINE>}
Graph graph = target.graph();
738,057
private void classHeaderExtendsOrImplements(boolean isInterface, boolean isRecord) {<NEW_LINE>if (this.currentElement != null && this.currentToken == TokenNameIdentifier && this.cursorLocation + 1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition) {<NEW_LINE>this.pushIdentifier();<NEW_LINE>int index = -1;<NEW_LINE>if (!recoveredType.foundOpeningBrace) {<NEW_LINE>TypeDeclaration type = recoveredType.typeDeclaration;<NEW_LINE>if (!isInterface) {<NEW_LINE>char[][] keywords = new char[Keywords.COUNT][];<NEW_LINE>int count = 0;<NEW_LINE>if (type.superInterfaces == null) {<NEW_LINE>if (!isRecord) {<NEW_LINE>if (type.superclass == null) {<NEW_LINE>keywords[count++] = Keywords.EXTENDS;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>keywords[count++] = Keywords.IMPLEMENTS;<NEW_LINE>}<NEW_LINE>if (this.options.enablePreviewFeatures) {<NEW_LINE>boolean sealed = (type.modifiers & ExtraCompilerModifiers.AccSealed) != 0;<NEW_LINE>if (sealed)<NEW_LINE>keywords[count++] = RestrictedIdentifiers.PERMITS;<NEW_LINE>}<NEW_LINE>System.arraycopy(keywords, 0, keywords = new char[count][], 0, count);<NEW_LINE>if (count > 0) {<NEW_LINE>CompletionOnKeyword1 completionOnKeyword = new CompletionOnKeyword1(this.identifierStack[ptr], this.identifierPositionStack[ptr], keywords);<NEW_LINE>type.superclass = completionOnKeyword;<NEW_LINE>type.superclass.bits |= ASTNode.IsSuperType;<NEW_LINE>this.assistNode = completionOnKeyword;<NEW_LINE>this.lastCheckPoint = completionOnKeyword.sourceEnd + 1;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (type.superInterfaces == null) {<NEW_LINE>CompletionOnKeyword1 completionOnKeyword = new CompletionOnKeyword1(this.identifierStack[ptr], this.identifierPositionStack<MASK><NEW_LINE>type.superInterfaces = new TypeReference[] { completionOnKeyword };<NEW_LINE>type.superInterfaces[0].bits |= ASTNode.IsSuperType;<NEW_LINE>this.assistNode = completionOnKeyword;<NEW_LINE>this.lastCheckPoint = completionOnKeyword.sourceEnd + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
[ptr], Keywords.EXTENDS);
837,747
private void initializeRecyclerView(Bundle savedInstanceState) {<NEW_LINE>// Initialize Adapter and RecyclerView<NEW_LINE>// ExampleAdapter makes use of stableIds, I strongly suggest to implement 'item.hashCode()'<NEW_LINE>FlexibleAdapter.useTag("StaggeredLayoutAdapter");<NEW_LINE>mAdapter = new FlexibleAdapter<>(DatabaseService.getInstance().getDatabaseList(), getActivity());<NEW_LINE>mRecyclerView = getView().findViewById(R.id.recycler_view);<NEW_LINE>// Customize the speed of the smooth scroll.<NEW_LINE>// NOTE: Every time you change this value you MUST recreate the LayoutManager instance<NEW_LINE>// and to assign it again to the RecyclerView!<NEW_LINE>// Make faster the smooth scroll<NEW_LINE>TopSnappedSmoothScroller.MILLISECONDS_PER_INCH = 33f;<NEW_LINE>mRecyclerView.setLayoutManager(createNewStaggeredGridLayoutManager());<NEW_LINE>// This value is restored to 100f (default) right here, because it is used in the<NEW_LINE>// constructor by Android. If we don't change it now, others LayoutManager will be<NEW_LINE>// impacted too by the above modification!<NEW_LINE>TopSnappedSmoothScroller.MILLISECONDS_PER_INCH = 100f;<NEW_LINE>mRecyclerView.setAdapter(mAdapter);<NEW_LINE>// Size of RV will not change<NEW_LINE>mRecyclerView.setHasFixedSize(true);<NEW_LINE>// NOTE: Use default item animator 'canReuseUpdatedViewHolder()' will return true if<NEW_LINE>// a Payload is provided. FlexibleAdapter is actually sending Payloads onItemChange.<NEW_LINE>mRecyclerView.setItemAnimator(new DefaultItemAnimator());<NEW_LINE>mRecyclerView.addItemDecoration(new FlexibleItemDecoration(getActivity()).addItemViewType(R.layout.recycler_staggered_item, 8).withEdge(true));<NEW_LINE>// Show Headers at startUp!<NEW_LINE>// Default=true<NEW_LINE>mAdapter.setDisplayHeadersAtStartUp(true).setNotifyMoveOfFilteredItems(true).// Default=true<NEW_LINE>setPermanentDelete(true).setOnlyEntryAnimation(true);<NEW_LINE>SwipeRefreshLayout swipeRefreshLayout = getView().findViewById(R.id.swipeRefreshLayout);<NEW_LINE>swipeRefreshLayout.setEnabled(true);<NEW_LINE>mListener.onFragmentChange(<MASK><NEW_LINE>// Add 1 Scrollable Header<NEW_LINE>mAdapter.addScrollableHeader(new ScrollableUseCaseItem(getString(R.string.staggered_use_case_title), getString(R.string.staggered_use_case_description)));<NEW_LINE>}
swipeRefreshLayout, mRecyclerView, Mode.IDLE);
660,153
private void lowMemoryInternalBatchSizes() {<NEW_LINE>// The "expected" size is with power-of-two rounding in some vectors.<NEW_LINE>// We later work backwards to the row count assuming average internal<NEW_LINE>// fragmentation.<NEW_LINE>// Must hold two input batches. Use half of the rest for the spill batch.<NEW_LINE>// In a really bad case, the number here may be negative. We'll fix<NEW_LINE>// it below.<NEW_LINE>int spillBufferSize = (int) (memoryLimit - 2 * inputBatchSize.maxBufferSize) / 2;<NEW_LINE>// But, in the merge phase, we need two spill batches and one output batch.<NEW_LINE>// (Assume that the spill and merge are equal sizes.)<NEW_LINE>spillBufferSize = (int) Math.min(spillBufferSize, memoryLimit / 4);<NEW_LINE>// Compute the size from the buffer. Assume worst-case<NEW_LINE>// fragmentation (as is typical when reading from the spill file.)<NEW_LINE>spillBatchSize.setFromWorstCaseBuffer(spillBufferSize);<NEW_LINE>// Must hold at least one row to spill. That is, we can make progress if we<NEW_LINE>// create spill files that consist of single-record batches.<NEW_LINE>int spillDataSize = Math.min(spillBatchSize.dataSize, config.spillBatchSize());<NEW_LINE>spillDataSize = Math.max(spillDataSize, estimatedRowWidth);<NEW_LINE>if (spillDataSize != spillBatchSize.dataSize) {<NEW_LINE>spillBatchSize.setFromData(spillDataSize);<NEW_LINE>}<NEW_LINE>// Work out the spill batch count needed by the spill code. Allow room for<NEW_LINE>// power-of-two rounding.<NEW_LINE>spillBatchRowCount = rowsPerBatch(spillBatchSize.dataSize);<NEW_LINE>// Finally, figure out when we must spill.<NEW_LINE>bufferMemoryLimit = memoryLimit - 2 * spillBatchSize.maxBufferSize;<NEW_LINE>bufferMemoryLimit = Math.max(bufferMemoryLimit, 0);<NEW_LINE>// Assume two spill batches must be merged (plus safety margin.)<NEW_LINE>// The rest can be give to the merge batch.<NEW_LINE>long mergeBufferSize <MASK><NEW_LINE>// The above calcs assume that the merge batch size is the same as<NEW_LINE>// the spill batch size (the division by three.)<NEW_LINE>// For merge batch, we must hold at least two spill batches and<NEW_LINE>// one output batch, which is why we assumed 3 spill batches.<NEW_LINE>mergeBatchSize.setFromBuffer((int) mergeBufferSize);<NEW_LINE>int mergeDataSize = Math.min(mergeBatchSize.dataSize, config.mergeBatchSize());<NEW_LINE>mergeDataSize = Math.max(mergeDataSize, estimatedRowWidth);<NEW_LINE>if (mergeDataSize != mergeBatchSize.dataSize) {<NEW_LINE>mergeBatchSize.setFromData(spillDataSize);<NEW_LINE>}<NEW_LINE>mergeBatchRowCount = rowsPerBatch(mergeBatchSize.dataSize);<NEW_LINE>mergeMemoryLimit = Math.max(2 * spillBatchSize.expectedBufferSize, memoryLimit - mergeBatchSize.maxBufferSize);<NEW_LINE>}
= memoryLimit - 2 * spillBatchSize.maxBufferSize;
133,694
protected UniformTimeSnapshot snapshot(final Collection<AggregatedValueObject> values, final long timeInterval, final TimeUnit timeIntervalUnit, final long time, final TimeUnit timeUnit) {<NEW_LINE>final UniformTimeSnapshot notTrimmedMeasurementsSnapshot = notifier.getTimeReservoirNotifier().getSnapshot(time, timeUnit);<NEW_LINE>AggregatedValueObject[] arrayValues = new AggregatedValueObject[values.size()];<NEW_LINE>arrayValues = values.toArray(arrayValues);<NEW_LINE>long min = Long.MAX_VALUE;<NEW_LINE>long max = Long.MIN_VALUE;<NEW_LINE>long count = 0;<NEW_LINE>double meanNumerator = 0;<NEW_LINE>for (AggregatedValueObject value : arrayValues) {<NEW_LINE>min = Math.min(min, value.getMin());<NEW_LINE>max = Math.max(max, value.getMax());<NEW_LINE>count += value.getCount();<NEW_LINE>meanNumerator += value.getCount() * value.getMean();<NEW_LINE>}<NEW_LINE>if (notTrimmedMeasurementsSnapshot.size() > 0) {<NEW_LINE>min = Math.min(min, notTrimmedMeasurementsSnapshot.getMin());<NEW_LINE>max = Math.max(max, notTrimmedMeasurementsSnapshot.getMax());<NEW_LINE>count += notTrimmedMeasurementsSnapshot.size();<NEW_LINE>meanNumerator += notTrimmedMeasurementsSnapshot.size() * notTrimmedMeasurementsSnapshot.getMean();<NEW_LINE>}<NEW_LINE>if (count == 0) {<NEW_LINE>return new UniformTimeSimpleSnapshot(0, 0, 0, 0, timeInterval, timeIntervalUnit);<NEW_LINE>} else {<NEW_LINE>return new UniformTimeSimpleSnapshot(max, min, meanNumerator / <MASK><NEW_LINE>}<NEW_LINE>}
count, count, timeInterval, timeIntervalUnit);
1,161,216
public void init(IExportDialogAdapter adapter, Composite container, IFigure figure) {<NEW_LINE>setFigure(figure);<NEW_LINE>container.setLayout(new GridLayout(8, false));<NEW_LINE>container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));<NEW_LINE>fSetViewboxButton = new Button(container, SWT.CHECK);<NEW_LINE>fSetViewboxButton.setText(Messages.SVGExportProvider_0);<NEW_LINE>GridData gd = new GridData();<NEW_LINE>gd.horizontalSpan = 8;<NEW_LINE>fSetViewboxButton.setLayoutData(gd);<NEW_LINE>fSetViewboxButton.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>updateControls();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>int min = -10000;<NEW_LINE>int max = 10000;<NEW_LINE>Label label = new Label(container, SWT.NONE);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>label.<MASK><NEW_LINE>fSpinner1 = new Spinner(container, SWT.BORDER);<NEW_LINE>fSpinner1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));<NEW_LINE>fSpinner1.setMinimum(min);<NEW_LINE>fSpinner1.setMaximum(max);<NEW_LINE>label = new Label(container, SWT.NONE);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>label.setText(" " + Messages.SVGExportProvider_3);<NEW_LINE>fSpinner2 = new Spinner(container, SWT.BORDER);<NEW_LINE>fSpinner2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));<NEW_LINE>fSpinner2.setMinimum(min);<NEW_LINE>fSpinner2.setMaximum(max);<NEW_LINE>label = new Label(container, SWT.NONE);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>label.setText(" " + Messages.SVGExportProvider_4);<NEW_LINE>fSpinner3 = new Spinner(container, SWT.BORDER);<NEW_LINE>fSpinner3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));<NEW_LINE>fSpinner3.setMaximum(max);<NEW_LINE>label = new Label(container, SWT.NONE);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>label.setText(" " + Messages.SVGExportProvider_5);<NEW_LINE>fSpinner4 = new Spinner(container, SWT.BORDER);<NEW_LINE>fSpinner4.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));<NEW_LINE>fSpinner4.setMaximum(max);<NEW_LINE>loadPreferences();<NEW_LINE>// Set viewBox width and height to the image size<NEW_LINE>fSpinner3.setSelection(viewPortBounds.width);<NEW_LINE>fSpinner4.setSelection(viewPortBounds.height);<NEW_LINE>}
setText(" " + Messages.SVGExportProvider_2);
479,112
private void writeDependencies(OptionalAttributeXmlWriter xmlWriter) throws IOException {<NEW_LINE>xmlWriter.startElement("dependencies");<NEW_LINE>for (IvyDependencyInternal dependency : dependencies) {<NEW_LINE>String org = dependency.getOrganisation();<NEW_LINE><MASK><NEW_LINE>String projectPath = dependency.getProjectPath();<NEW_LINE>ModuleVersionIdentifier resolvedVersion = versionMappingStrategy.findStrategyForVariant(dependency.getAttributes()).maybeResolveVersion(org, module, projectPath);<NEW_LINE>if (resolvedVersion != null) {<NEW_LINE>org = resolvedVersion.getGroup();<NEW_LINE>module = resolvedVersion.getName();<NEW_LINE>}<NEW_LINE>xmlWriter.startElement("dependency").attribute("org", org).attribute("name", module).attribute("rev", resolvedVersion != null ? resolvedVersion.getVersion() : dependency.getRevision()).attribute("conf", dependency.getConfMapping());<NEW_LINE>if (resolvedVersion != null && isDynamicVersion(dependency.getRevision())) {<NEW_LINE>xmlWriter.attribute("revConstraint", dependency.getRevision());<NEW_LINE>}<NEW_LINE>if (!dependency.isTransitive()) {<NEW_LINE>xmlWriter.attribute("transitive", "false");<NEW_LINE>}<NEW_LINE>for (DependencyArtifact dependencyArtifact : dependency.getArtifacts()) {<NEW_LINE>printDependencyArtifact(dependencyArtifact, xmlWriter);<NEW_LINE>}<NEW_LINE>for (ExcludeRule excludeRule : dependency.getExcludeRules()) {<NEW_LINE>writeDependencyExclude(excludeRule, xmlWriter);<NEW_LINE>}<NEW_LINE>xmlWriter.endElement();<NEW_LINE>}<NEW_LINE>for (IvyExcludeRule excludeRule : globalExcludes) {<NEW_LINE>writeGlobalExclude(excludeRule, xmlWriter);<NEW_LINE>}<NEW_LINE>xmlWriter.endElement();<NEW_LINE>}
String module = dependency.getModule();
378,183
public static void assertEqualsToScale(Se3_F64 expected, Se3_F64 found, double tolAngle, double tolT) {<NEW_LINE>var R = new DMatrixRMaj(3, 3);<NEW_LINE>CommonOps_DDRM.multTransA(expected.R, found.R, R);<NEW_LINE>Rodrigues_F64 rod = ConvertRotation3D_F64.matrixToRodrigues(R, null);<NEW_LINE>assertEquals(0.0, rod.theta, tolAngle);<NEW_LINE>double normFound = found.T.norm();<NEW_LINE>double normExpected = expected.T.norm();<NEW_LINE>if (normFound == 0.0 || normExpected == 0.0) {<NEW_LINE>assertEquals(0.0, normFound, tolT);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int largestIdx = -1;<NEW_LINE>double largestMag = 0;<NEW_LINE>for (int i = 0; i < 3; i++) {<NEW_LINE>double mag = Math.abs(expected.T.getIdx(i));<NEW_LINE>if (mag > largestMag) {<NEW_LINE>largestMag = mag;<NEW_LINE>largestIdx = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (Math.signum(expected.T.getIdx(largestIdx)) != Math.signum(found.T.getIdx(largestIdx)))<NEW_LINE>normFound *= -1;<NEW_LINE>// they will have the same scale and a norm of 1<NEW_LINE>double dx = expected.T.x / normExpected - found.T.x / normFound;<NEW_LINE>double dy = expected.T.y / normExpected <MASK><NEW_LINE>double dz = expected.T.z / normExpected - found.T.z / normFound;<NEW_LINE>double r = Math.sqrt(dx * dx + dy * dy + dz * dz);<NEW_LINE>assertEquals(0.0, r, tolT, "E=" + expected.T + " F=" + found.T);<NEW_LINE>}
- found.T.y / normFound;
891,684
void addModRMRegister(Instruction instruction, int operand, int regLo, int regHi) {<NEW_LINE>if (!verifyOpKind(operand, OpKind.REGISTER, instruction.getOpKind(operand)))<NEW_LINE>return;<NEW_LINE>int reg = instruction.getOpRegister(operand);<NEW_LINE>if (!verify(operand, reg, regLo, regHi))<NEW_LINE>return;<NEW_LINE>int regNum = reg - regLo;<NEW_LINE>if (regLo == Register.AL) {<NEW_LINE>if (reg >= Register.SPL) {<NEW_LINE>regNum -= 4;<NEW_LINE>encoderFlags |= EncoderFlags.REX;<NEW_LINE>} else if (reg >= Register.AH)<NEW_LINE>encoderFlags |= EncoderFlags.HIGH_LEGACY_8_BIT_REGS;<NEW_LINE>}<NEW_LINE>assert Integer.compareUnsigned(<MASK><NEW_LINE>modRM |= (byte) ((regNum & 7) << 3);<NEW_LINE>encoderFlags |= EncoderFlags.MOD_RM;<NEW_LINE>encoderFlags |= (regNum & 8) >>> 1;<NEW_LINE>encoderFlags |= (regNum & 0x10) << (9 - 4);<NEW_LINE>}
regNum, 31) <= 0 : regNum;
1,631,071
public boolean visit(Javadoc node) {<NEW_LINE>this.noFormatTagOpenStart = -1;<NEW_LINE>this.formatCodeTagOpenEnd = -1;<NEW_LINE>this.lastFormatCodeClosingTagIndex = -1;<NEW_LINE>this.firstTagToken = null;<NEW_LINE>this.ctm = null;<NEW_LINE>int commentIndex = this.tm.firstIndexIn(node, TokenNameCOMMENT_JAVADOC);<NEW_LINE>Token commentToken = <MASK><NEW_LINE>if (node.getParent() == null) {<NEW_LINE>// not a proper javadoc, treat as block comment<NEW_LINE>handleWhitespaceAround(commentIndex);<NEW_LINE>}<NEW_LINE>if (commentIndex < this.tm.size() - 1)<NEW_LINE>commentToken.breakAfter();<NEW_LINE>if (handleFormatOnOffTags(commentToken))<NEW_LINE>return false;<NEW_LINE>boolean isHeader = this.tm.isInHeader(commentIndex);<NEW_LINE>boolean formattingEnabled = (this.options.comment_format_javadoc_comment && !isHeader) || (this.options.comment_format_header && isHeader);<NEW_LINE>if (!formattingEnabled || !tokenizeMultilineComment(commentToken)) {<NEW_LINE>commentToken.setInternalStructure(commentToLines(commentToken, -1));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>this.commentStructure = commentToken.getInternalStructure();<NEW_LINE>this.commentIndent = this.tm.toIndent(commentToken.getIndent(), true);<NEW_LINE>this.ctm = new TokenManager(commentToken.getInternalStructure(), this.tm);<NEW_LINE>handleJavadocTagAlignment(node);<NEW_LINE>return true;<NEW_LINE>}
this.tm.get(commentIndex);
199,441
public void process(I input) {<NEW_LINE>if (frameID == -1)<NEW_LINE>associate.initializeAssociator(input.width, input.height);<NEW_LINE>frameID++;<NEW_LINE>tracksActive.clear();<NEW_LINE>tracksInactive.clear();<NEW_LINE>tracksDropped.clear();<NEW_LINE>tracksNew.clear();<NEW_LINE>detector.detect(input);<NEW_LINE>final int N = detector.getNumberOfFeatures();<NEW_LINE>// initialize data structures<NEW_LINE>dstDesc.resize(N);<NEW_LINE>dstSet.resize(N);<NEW_LINE>dstPixels.resize(N);<NEW_LINE>// create a list of detected feature descriptions<NEW_LINE>for (int i = 0; i < N; i++) {<NEW_LINE>dstDesc.data[i<MASK><NEW_LINE>dstSet.data[i] = detector.getSet(i);<NEW_LINE>dstPixels.data[i] = detector.getLocation(i);<NEW_LINE>}<NEW_LINE>if (tracksAll.size == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>performTracking();<NEW_LINE>// add unassociated to the list<NEW_LINE>DogArray_I32 unassociatedIdx = associate.getUnassociatedSource();<NEW_LINE>for (int j = 0; j < unassociatedIdx.size(); j++) {<NEW_LINE>tracksInactive.add(tracksAll.get(unassociatedIdx.get(j)));<NEW_LINE>}<NEW_LINE>dropExcessiveInactiveTracks(unassociatedIdx);<NEW_LINE>}
] = detector.getDescription(i);
1,249,960
public Response execute(Request request) {<NEW_LINE>HttpContext context = new BasicHttpContext();<NEW_LINE>HttpUriRequestBase httpUriRequest = new HttpUriRequestBase(request.method(), URI.create(pathPrefix + request.path()));<NEW_LINE>httpUriRequest.setScheme(host.getSchemeName());<NEW_LINE>httpUriRequest.setAuthority(new URIAuthority(host.getHostName()<MASK><NEW_LINE>request.headers().forEach(httpUriRequest::addHeader);<NEW_LINE>byte[] bodyBytes = request.bodyBytes();<NEW_LINE>if (bodyBytes != null) {<NEW_LINE>httpUriRequest.setEntity(new ByteArrayEntity(bodyBytes, null));<NEW_LINE>} else {<NEW_LINE>InputStream body = request.body();<NEW_LINE>if (body != null) {<NEW_LINE>httpUriRequest.setEntity(new InputStreamEntity(body, null));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (request.hijackedInput() != null) {<NEW_LINE>context.setAttribute(HijackingHttpRequestExecutor.HIJACKED_INPUT_ATTRIBUTE, request.hijackedInput());<NEW_LINE>httpUriRequest.setHeader("Upgrade", "tcp");<NEW_LINE>httpUriRequest.setHeader("Connection", "Upgrade");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>CloseableHttpResponse response = httpClient.execute(host, httpUriRequest, context);<NEW_LINE>return new ApacheResponse(httpUriRequest, response);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
, host.getPort()));
1,054,350
public void touchUp(final InputEvent event, final float x, final float y, final int pointer, final int button) {<NEW_LINE>if (isDragged()) {<NEW_LINE>removeBlocker();<NEW_LINE>getStageCoordinates(event);<NEW_LINE>mimic.setPosition(MIMIC_COORDINATES.x, MIMIC_COORDINATES.y);<NEW_LINE>if (listener == null || mimic.getActor().getStage() != null && listener.onEnd(this, mimic.getActor(), STAGE_COORDINATES.x, STAGE_COORDINATES.y)) {<NEW_LINE>// Drag end approved - fading out.<NEW_LINE>addMimicHidingAction(Actions.fadeOut<MASK><NEW_LINE>} else {<NEW_LINE>// Drag end cancelled - returning to the original position.<NEW_LINE>addMimicHidingAction(Actions.moveTo(dragStartX, dragStartY, movingTime, movingInterpolation), movingTime);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(fadingTime, fadingInterpolation), fadingTime);
1,045,394
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {<NEW_LINE>String username = request.getParameter("username");<NEW_LINE>if (!validation.isValidUsername(username)) {<NEW_LINE>response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Invalid username");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>File folder = new File(savegameDirectory + "/" + username);<NEW_LINE>if (!folder.exists()) {<NEW_LINE>response.getOutputStream().print(";");<NEW_LINE>} else {<NEW_LINE>File[] files = folder.listFiles();<NEW_LINE>StringBuilder buffer = new StringBuilder();<NEW_LINE>if (files != null) {<NEW_LINE>Arrays.sort(files, new Comparator<File>() {<NEW_LINE><NEW_LINE>public int compare(File f1, File f2) {<NEW_LINE>return Long.compare(f2.lastModified(), f1.lastModified());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>for (File file : files) {<NEW_LINE>if (file.isFile()) {<NEW_LINE>buffer.append(file.getName().replaceAll(".sav.xz", ""));<NEW_LINE>buffer.append(';');<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>response.getOutputStream().print(buffer.toString());<NEW_LINE>}<NEW_LINE>} catch (Exception err) {<NEW_LINE>response.setHeader("result", "error");<NEW_LINE>err.printStackTrace();<NEW_LINE>response.<MASK><NEW_LINE>}<NEW_LINE>}
sendError(HttpServletResponse.SC_BAD_REQUEST, "ERROR");
332,101
protected void exec() {<NEW_LINE>ShexSchema shapes;<NEW_LINE>try {<NEW_LINE>shapes = Shex.readSchema(shapesfile);<NEW_LINE>} catch (ShexException ex) {<NEW_LINE>System.err.println("Failed to read shapes: " + ex.getMessage());<NEW_LINE>throw new CmdException();<NEW_LINE>}<NEW_LINE>Graph dataGraph;<NEW_LINE>try {<NEW_LINE>dataGraph = load(datafile, "data file");<NEW_LINE>} catch (RiotException ex) {<NEW_LINE>throw new CmdException("Failed to data: " + ex.getMessage());<NEW_LINE>}<NEW_LINE>// if ( targetNode != null ) {<NEW_LINE>// String x = dataGraph.getPrefixMapping().expandPrefix(targetNode);<NEW_LINE>// Node node = NodeFactory.createURI(x);<NEW_LINE>// ShexValidation.validate(graphData, shapes, shapeRef, focus)<NEW_LINE>// }<NEW_LINE>if (mapfile != null) {<NEW_LINE>ShexMap map;<NEW_LINE>try {<NEW_LINE>map = Shex.readShapeMap(mapfile);<NEW_LINE>} catch (ShexException ex) {<NEW_LINE>throw new CmdException("Failed to read shapes map: " + ex.getMessage());<NEW_LINE>}<NEW_LINE>ShexReport report = ShexValidator.get().validate(dataGraph, shapes, map);<NEW_LINE>ShexLib.printReport(output, report);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Or --shapeURI<NEW_LINE>ShexShape startShape = shapes.getStart();<NEW_LINE>if (startShape == null)<NEW_LINE>throw new CmdException("Start node required for URI-validation");<NEW_LINE>String targetURIstr = dataGraph.getPrefixMapping().expandPrefix(targetNode);<NEW_LINE>Node focus = NodeFactory.createURI(targetURIstr);<NEW_LINE>// if ( isVerbose() )<NEW_LINE>// ValidationContext.VERBOSE = true;<NEW_LINE>// ValidationReport report = ( node != null )<NEW_LINE>// ? ShaclValidator.get().validate(shapesGraph, dataGraph, node)<NEW_LINE>// : ShaclValidator.get().validate(shapesGraph, dataGraph);<NEW_LINE>ShexReport report = ShexValidator.get().validate(<MASK><NEW_LINE>ShexLib.printReport(output, report);<NEW_LINE>}
dataGraph, shapes, startShape, focus);