idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,828,208 | public void storeFragment(ByteBuffer fragment, int length, boolean last) {<NEW_LINE>if (storage == null) {<NEW_LINE>int space = last ? length : length * 2;<NEW_LINE>storage = byteBufferPool.acquire(space, fragment.isDirect());<NEW_LINE>storage.clear();<NEW_LINE>}<NEW_LINE>// Grow the storage if necessary.<NEW_LINE>if (... | fragment.position() + length); |
168,340 | public static XContentParser createParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, BytesReference bytes) throws IOException {<NEW_LINE>Compressor compressor = CompressorFactory.compressor(bytes);<NEW_LINE>if (compressor != null) {<NEW_LINE>InputStream compressedInput = null;<NEW_LI... | createParser(xContentRegistry, deprecationHandler, compressedInput); |
1,249,118 | /*<NEW_LINE>* @see java.io.OutputStream#write(byte[], int, int)<NEW_LINE>*/<NEW_LINE>public void write(byte[] b, int start, int len) throws IOException {<NEW_LINE>if (b == null) {<NEW_LINE>Tr.error(tc, "read.write.bytearray.null");<NEW_LINE>throw new NullPointerException(Tr.formatMessage(tc, "read.write.bytearray.null"... | , len, b.length }); |
806,810 | protected void cleanField(String structureInode, Field field) throws DotDataException, DotStateException, DotSecurityException {<NEW_LINE>StringBuffer sql = new StringBuffer("update contentlet set ");<NEW_LINE>if (field.getFieldContentlet().indexOf("float") != -1) {<NEW_LINE>if (DbConnectionFactory.isMySql())<NEW_LINE>... | field.getFieldContentlet() + " = "); |
1,157,776 | protected String valueForURL(Tuple tuple) {<NEW_LINE>String url = tuple.getStringByField("url");<NEW_LINE>Metadata metadata = (Metadata) tuple.getValueByField("metadata");<NEW_LINE>// functionality deactivated<NEW_LINE>if (StringUtils.isBlank(canonicalMetadataParamName)) {<NEW_LINE>return url;<NEW_LINE>}<NEW_LINE>Strin... | getPLD(sURL.getHost()); |
1,248,246 | void tooltipAvailable(@Nullable String toolTip, @Nonnull MouseEvent e, @Nullable GutterMark renderer) {<NEW_LINE>myCalculatingInBackground = null;<NEW_LINE>TooltipController controller = TooltipController.getInstance();<NEW_LINE>if (toolTip == null || toolTip.isEmpty() || myEditor.isDisposed()) {<NEW_LINE>controller.ca... | getErrorStripTooltipRendererProvider().calcTooltipRenderer(toolTip); |
621,200 | public CompletableFuture<ExecutionResult> execute(ExecutionContext executionContext, ExecutionStrategyParameters parameters) throws NonNullableFieldWasNullException {<NEW_LINE>Instrumentation instrumentation = executionContext.getInstrumentation();<NEW_LINE>InstrumentationExecutionStrategyParameters instrumentationPara... | sourceEventStream = createSourceEventStream(executionContext, parameters); |
1,294,161 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player != null && player.isLifeTotalCanChange()) {<NEW_LINE>Permanent perm = game.getPermanent(source.getSourceId());<NEW_LINE>if (perm != null) {<NEW_LINE>int amount = perm.getToughness().g... | int life = player.getLife(); |
965,318 | private TreeItem createContainer(TreeItem parent, String name) {<NEW_LINE>TreeItem[] selection = tree.getSelection();<NEW_LINE>// boolean moveSelected = false;<NEW_LINE>if (parent == null) {<NEW_LINE>if (selection.length == 1 && selection[0].getData() == null) {<NEW_LINE>parent = selection[0];<NEW_LINE>} else if (selec... | TreeItem(parent, 0, 0); |
1,599,698 | protected View createEmbeddedView(MetaClass meta, String fqnPrefix) {<NEW_LINE>View view = new View(meta.getJavaClass(), false);<NEW_LINE>for (MetaProperty metaProperty : meta.getProperties()) {<NEW_LINE>String fqn = fqnPrefix + "." + metaProperty.getName();<NEW_LINE>if (!managedFields.containsKey(fqn)) {<NEW_LINE>cont... | asClass(), View.MINIMAL); |
878,361 | private // with all possible modifiers (Ctrl, Shift, Alt, etc.)<NEW_LINE>void registerSelectItemAction() {<NEW_LINE>int[] allowedModifiers = new int[] { 0, InputEvent.SHIFT_MASK, InputEvent.CTRL_MASK, InputEvent.META_MASK, InputEvent.ALT_MASK };<NEW_LINE>ShortcutSet selectShortcuts = ActionManager.getInstance().getActi... | () : shortcut.getFirstKeyStroke(); |
917,186 | public ModelMapper createNew(List<Row> modelRows) {<NEW_LINE>System.out.println("update model");<NEW_LINE>FmModelMapper fmModelMapper = new FmModelMapper(getModelSchema(), getDataSchema(), params.clone());<NEW_LINE>FmModelData modelData = new FmModelData();<NEW_LINE>modelData.vectorColName = this.model.vectorColName;<N... | fmModel.bias = factor[0]; |
607,515 | public static void dissectReplayNewLeadershipTerm(final ClusterEventCode eventCode, final MutableDirectBuffer buffer, final int offset, final StringBuilder builder) {<NEW_LINE>int absoluteOffset = offset;<NEW_LINE>absoluteOffset += dissectLogHeader(CONTEXT, eventCode, buffer, absoluteOffset, builder);<NEW_LINE>final in... | (" isInElection=").append(isInElection); |
1,680,232 | protected int countByC_C_C(String companyId, String className, String classPK) throws SystemException {<NEW_LINE>Session session = null;<NEW_LINE>try {<NEW_LINE>session = openSession();<NEW_LINE>StringBuffer query = new StringBuffer();<NEW_LINE>query.append("SELECT COUNT(*) ");<NEW_LINE>query.append("FROM Address IN CL... | .list().iterator(); |
918,219 | protected <T> T convert(Class<T> type, String value, T defaultValue) {<NEW_LINE>if (value == null) {<NEW_LINE>return defaultValue;<NEW_LINE>}<NEW_LINE>if (type == Boolean.class) {<NEW_LINE>return (T) Boolean.valueOf(value);<NEW_LINE>} else if (type == Integer.class) {<NEW_LINE>return (T) Integer.valueOf(value);<NEW_LIN... | T) Double.valueOf(value); |
134,341 | private PluginOperationResult executeUpdate() throws Exception {<NEW_LINE>List<String> updateablePlugins = findUpdateCandidates();<NEW_LINE>List<String> erroneousPlugins = Lists.newArrayList();<NEW_LINE>List<String> delayedPlugins = Lists.newArrayList();<NEW_LINE>// update only a specific plugin if it is updatable and ... | UserConfig.getUserConfigDir(), UPDATE_FILENAME); |
399,745 | public void execute() {<NEW_LINE>if (action == StandardActions.ABBREVIATE_DEFAULT || action == StandardActions.ABBREVIATE_MEDLINE || action == StandardActions.ABBREVIATE_SHORTEST_UNIQUE) {<NEW_LINE>dialogService.notify<MASK><NEW_LINE>stateManager.getActiveDatabase().ifPresent(databaseContext -> BackgroundTask.wrap(() -... | (Localization.lang("Abbreviating...")); |
780,675 | public boolean validate() throws ContractValidateException {<NEW_LINE>if (this.any == null) {<NEW_LINE>throw new ContractValidateException(ActuatorConstant.CONTRACT_NOT_EXIST);<NEW_LINE>}<NEW_LINE>if (chainBaseManager == null) {<NEW_LINE>throw new ContractValidateException("No account store or contract store!");<NEW_LI... | readableOwnerAddress = StringUtil.createReadableString(ownerAddress); |
671,713 | public void saveApplication() {<NEW_LINE>cmpgn = MapTool.getCampaign();<NEW_LINE>// Create the load/save dialog form.<NEW_LINE>// Populate it with maps, tables, macros, and so forth.<NEW_LINE>// Display it to the user with either a LOAD or SAVE button.<NEW_LINE>// When they're done, write the selected components out.<N... | "Campaign/GmMacros", cmpgn.getGmMacroButtonPropertiesArray()); |
706,493 | public Map<String, BlobMetaData> listBlobsByPrefix(String account, String container, String keyPath, String prefix) throws URISyntaxException, StorageException, IOException {<NEW_LINE>// NOTE: this should be here: if (prefix == null) prefix = "";<NEW_LINE>// however, this is really inefficient since deleteBlobsByPrefix... | , container, keyPath, prefix)); |
847,042 | static String buildUrl(ClickHouseNode server, ClickHouseRequest<?> request) {<NEW_LINE><MASK><NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append(config.isSsl() ? "https" : "http").append("://").append(server.getHost()).append(':').append(server.getPort()).append('/');<NEW_LINE>String context ... | ClickHouseConfig config = request.getConfig(); |
528,711 | protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final I... | environment, instruction, instructions, rootNode); |
917,214 | final ConfirmProductInstanceResult executeConfirmProductInstance(ConfirmProductInstanceRequest confirmProductInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(confirmProductInstanceRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Req... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
671,691 | private CompiledQuery alterTableSetParam(CharSequence paramName, CharSequence value, int paramNameNamePosition, String tableName, int tableId) throws SqlException {<NEW_LINE>if (isMaxUncommittedRowsParam(paramName)) {<NEW_LINE>int maxUncommittedRows;<NEW_LINE>try {<NEW_LINE>maxUncommittedRows = Numbers.parseInt(value);... | SqlException.$(paramNameNamePosition, "commitLag must be non negative"); |
433,538 | private void prepareEvaluationContext() {<NEW_LINE>StandardEvaluationContext context = getEvaluationContext();<NEW_LINE>Class<?> targetType = AopUtils.getTargetClass(this.targetObject);<NEW_LINE>if (this.method != null) {<NEW_LINE>context.registerMethodFilter(targetType, new FixedMethodFilter(ClassUtils.getMostSpecific... | context.registerMethodFilter(targetType, filter); |
1,153,881 | public DisplayNames display(String sorted, String type, String ip, TransactionReport report, String queryName) {<NEW_LINE>Map<String, TransactionType> types = report.findOrCreateMachine(ip).getTypes();<NEW_LINE>TransactionName all = new TransactionName("TOTAL");<NEW_LINE>all.setTotalPercent(1);<NEW_LINE>if (types != nu... | long total = all.getTotalCount(); |
726,564 | public static void main(String[] args) throws Exception {<NEW_LINE>// Create and configure HTTPS client<NEW_LINE>Client client = new Client(new Context(), Protocol.HTTPS);<NEW_LINE>Series<Parameter> parameters = client.getContext().getParameters();<NEW_LINE>parameters.add("truststorePath", "src/org/restlet/example/book... | store(mailClient.retrieve()); |
1,845,302 | public static void main(String[] args) {<NEW_LINE>EdgeWeightedDigraph edgeWeightedDigraph = new EdgeWeightedDigraph(8);<NEW_LINE>edgeWeightedDigraph.addEdge(new DirectedEdge(4, 5, 0.35));<NEW_LINE>edgeWeightedDigraph.addEdge(new DirectedEdge(5, 4, 0.35));<NEW_LINE>edgeWeightedDigraph.addEdge(new DirectedEdge(4, 7, 0.37... | (7, 5, 0.28)); |
552,964 | protected Long handleInternally(DataObject content) {<NEW_LINE>final long guildId = content.getLong("guild_id");<NEW_LINE>if (getJDA().getGuildSetupController().isLocked(guildId))<NEW_LINE>return guildId;<NEW_LINE>GuildImpl guild = (GuildImpl) getJDA().getGuildById(guildId);<NEW_LINE>if (guild == null) {<NEW_LINE>getJD... | (), responseNumber, removedRole)); |
609,073 | private ProposalPackage.Proposal createFabricProposal(String channelID, Chaincode.ChaincodeID chaincodeID, boolean isInit) {<NEW_LINE>if (null == transientMap) {<NEW_LINE>transientMap = Collections.emptyMap();<NEW_LINE>}<NEW_LINE>if (IS_DEBUG_LEVEL) {<NEW_LINE>for (Map.Entry<String, byte[]> tme : transientMap.entrySet(... | getFabricTimestamp(), chaincodeHeaderExtension, null); |
17,439 | public ListGameServerGroupsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListGameServerGroupsResult listGameServerGroupsResult = new ListGameServerGroupsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | int originalDepth = context.getCurrentDepth(); |
680,197 | public ProcessStatus handleRestValidateCode(final PwmRequest pwmRequest) throws PwmUnrecoverableException, IOException, ServletException, ChaiUnavailableException {<NEW_LINE>final PwmDomain pwmDomain = pwmRequest.getPwmDomain();<NEW_LINE>final PwmSession pwmSession = pwmRequest.getPwmSession();<NEW_LINE>final OTPUserRe... | get().deserializeStringMap(bodyString); |
1,319,849 | public final void zoom(int centerX, int centerY, double factor) {<NEW_LINE>// Cache current fitting<NEW_LINE>boolean fitsWidth = fitsWidth();<NEW_LINE>boolean fitsHeight = fitsHeight();<NEW_LINE>// Both fits, no zoom<NEW_LINE>if (fitsWidth && fitsHeight)<NEW_LINE>return;<NEW_LINE>// Resolve current scale<NEW_LINE>doubl... | double dataWidth = dataX - getDataOffsetX(); |
1,585,775 | public String dump(LayoutContext c, String indent, int which) {<NEW_LINE>if (which != Box.DUMP_RENDER) {<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>}<NEW_LINE>StringBuilder result = new StringBuilder(indent);<NEW_LINE>result.append(this);<NEW_LINE>result.append('\n');<NEW_LINE>for (Iterator<Object> i = get... | result.append(indent + " "); |
1,547,153 | final DBInstance executeStopDBInstance(StopDBInstanceRequest stopDBInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopDBInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopDBInstance"); |
1,634,096 | public void start() {<NEW_LINE>logger.info("RPC WebSocket enabled");<NEW_LINE>ServerBootstrap b = new ServerBootstrap();<NEW_LINE>b.group(bossGroup, workerGroup).channel(NioServerSocketChannel.class).childHandler(new ChannelInitializer<SocketChannel>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void initChannel(... | ChannelPipeline p = ch.pipeline(); |
1,827,830 | private DataStreamSink<?> consume(DataStream<RowData> dataStream, boolean isBounded, DataStructureConverter converter) {<NEW_LINE>checkAcidTable(catalogTable, identifier.toObjectPath());<NEW_LINE>try (HiveMetastoreClientWrapper client = HiveMetastoreClientFactory.create(HiveConfUtils.create(jobConf), hiveVersion)) {<NE... | HiveReflectionUtils.getTableMetadata(hiveShim, table); |
1,295,756 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UntagResourceReq... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,007,932 | // Converts an FpML 'StubValue' to a {@code IborRateStubCalculation}.<NEW_LINE>private IborRateStubCalculation parseStubCalculation(XmlElement baseEl, FpmlDocument document) {<NEW_LINE>Optional<XmlElement> rateOptEl = baseEl.findChild("stubRate");<NEW_LINE>if (rateOptEl.isPresent()) {<NEW_LINE>return IborRateStubCalcul... | document.validateNotPresent(index2El, "spreadSchedule"); |
438,413 | private void addPressed() {<NEW_LINE>Container container = getTopLevelAncestor();<NEW_LINE>try {<NEW_LINE>DPolicyQualifierInfoChooser dPolicyQualifierInfoChooser = null;<NEW_LINE>if (container instanceof JDialog) {<NEW_LINE>dPolicyQualifierInfoChooser = new DPolicyQualifierInfoChooser((JDialog) container, title, null);... | JFrame) container, title, null); |
1,747,622 | private void generateGroups(final StringBuilder sb, final List<Token> tokens, final String prefix) {<NEW_LINE>for (int i = 0, size = tokens.size(); i < size; i++) {<NEW_LINE>final Token groupToken = tokens.get(i);<NEW_LINE>if (groupToken.signal() != Signal.BEGIN_GROUP) {<NEW_LINE>throw new IllegalStateException("tokens... | varData = new ArrayList<>(); |
612,973 | @ApiOperation(value = "Delete an extractor")<NEW_LINE>@Path("/{extractorId}")<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request."), @ApiResponse(code = 404, message = "Input not found."), @ApiResponse(code = 404, message = "Extractor not found.") })<NEW_LINE>@Produces(MediaType.APPLIC... | checkPermission(RestPermissions.INPUTS_EDIT, inputId); |
493,730 | public static void validateSettings(Settings settings) {<NEW_LINE>// wan means all node restrictions are off the table<NEW_LINE>if (settings.getNodesWANOnly()) {<NEW_LINE>Assert.isTrue(!settings.getNodesDiscovery(), "Discovery cannot be enabled when running in WAN mode");<NEW_LINE>Assert.isTrue(!settings.getNodesClient... | settings.getInputAsJson(), "When using delete operation, providing data as JSON is not coherent because this operation does not need document as a payload. This is most likely not what the user intended. Bailing out..."); |
464,786 | private void generateCircleTemplate_() {<NEW_LINE>if (!m_circle_template.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int N = m_circle_template_size;<NEW_LINE>assert (N >= 4);<NEW_LINE>int real_size <MASK><NEW_LINE>double dA = (Math.PI * 0.5) / real_size;<NEW_LINE>m_dA = dA;<NEW_LINE>for (int i = 0; i < real_size ... | = (N + 3) / 4; |
1,266,406 | public void process(Heartbeat heartbeat, EventEmitter<Response> emitter) throws Exception {<NEW_LINE>RequestHeader header = heartbeat.getHeader();<NEW_LINE>if (!ServiceUtils.validateHeader(header)) {<NEW_LINE>ServiceUtils.sendRespAndDone(StatusCode.EVENTMESH_PROTOCOL_HEADER_ERR, emitter);<NEW_LINE>return;<NEW_LINE>}<NE... | e.getMessage(), emitter); |
1,789,633 | public static EPCompiled read(File file) throws IOException {<NEW_LINE>JarFile jarFile = new JarFile(file);<NEW_LINE>Attributes attributes = jarFile.getManifest().getMainAttributes();<NEW_LINE>String compilerVersion = getAttribute(attributes, MANIFEST_COMPILER_VERSION);<NEW_LINE>if (compilerVersion == null) {<NEW_LINE>... | entries.nextElement(), classes); |
206,008 | private static Map<String, ? super Object> toMap(final V8Object v8Object, final V8Map<Object> cache, final TypeAdapter adapter) {<NEW_LINE>if (v8Object == null) {<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>if (cache.containsKey(v8Object)) {<NEW_LINE>return (Map<String, ? super Object>) cache.get(v8Obje... | object, type, cache, adapter); |
1,697,075 | public io.kubernetes.client.proto.V1alpha1Admission.AdmissionReview buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1alpha1Admission.AdmissionReview result = new io.kubernetes.client.proto.V1alpha1Admission.AdmissionReview(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>... | .status_ = statusBuilder_.build(); |
972,283 | private void activatePanelElements(TournamentTypeView tournamentType) {<NEW_LINE>this.pnlDraftOptions.setVisible(tournamentType.isDraft());<NEW_LINE>this.lblNumRounds.setVisible<MASK><NEW_LINE>this.spnNumRounds.setVisible(!tournamentType.isElimination());<NEW_LINE>this.lblConstructionTime.setVisible(tournamentType.isLi... | (!tournamentType.isElimination()); |
258,553 | public DisableEnhancedMonitoringResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DisableEnhancedMonitoringResult disableEnhancedMonitoringResult = new DisableEnhancedMonitoringResult();<NEW_LINE><MASK><NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name ... | AwsJsonReader reader = context.getReader(); |
46,829 | static Map<Address, List<Shard>> assignShards(Collection<Shard> shards, Collection<Address> addresses) {<NEW_LINE>Map<String, List<Shard>> nodeCandidates = shards.stream().collect(groupingBy(Shard::getIp));<NEW_LINE>Map<Address, List<Shard>> nodeAssigned = new HashMap<>();<NEW_LINE>if (!addresses.stream().map(Address::... | int candidatesSize = nodeCandidates.size(); |
44,716 | private void fillLookupTable(Map<DSMRMeterType, Integer> mapping) {<NEW_LINE>for (OBISMsgType t : OBISMsgType.values()) {<NEW_LINE>OBISIdentifier obisId = t.obisId;<NEW_LINE>if (obisId.getGroupB() == null) {<NEW_LINE>DSMRMeterType meterType = t.meterType;<NEW_LINE>if (mapping.containsKey(meterType)) {<NEW_LINE>Integer ... | new LinkedList<OBISMsgType>()); |
1,664,535 | final ListKafkaVersionsResult executeListKafkaVersions(ListKafkaVersionsRequest listKafkaVersionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listKafkaVersionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | false), new ListKafkaVersionsResultJsonUnmarshaller()); |
755,053 | final ListFeaturesResult executeListFeatures(ListFeaturesRequest listFeaturesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listFeaturesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFeatures"); |
1,367,339 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); |
240,434 | public static void main(String[] args) {<NEW_LINE>Exercise31_MSTWeights mstWeights = new Exercise31_MSTWeights();<NEW_LINE>EdgeWeightedGraph edgeWeightedGraph = new EdgeWeightedGraph(5);<NEW_LINE>edgeWeightedGraph.addEdge(new Edge(0, 1, 0.42));<NEW_LINE>edgeWeightedGraph.addEdge(new Edge(0, 3, 0.5));<NEW_LINE>edgeWeigh... | "Eager Prim MST lazy weight: " + primMSTWeight.lazyWeight()); |
1,711,031 | public void marshall(AwsRedshiftClusterRestoreStatus awsRedshiftClusterRestoreStatus, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsRedshiftClusterRestoreStatus == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.... | awsRedshiftClusterRestoreStatus.getElapsedTimeInSeconds(), ELAPSEDTIMEINSECONDS_BINDING); |
1,847,089 | public CacheParameterGroup unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>CacheParameterGroup cacheParameterGroup = new CacheParameterGroup();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE... | ().unmarshall(context)); |
134,597 | private StainVector grabHandle(double x, double y) {<NEW_LINE>ColorDeconvolutionStains stains = stainsWrapper == null ? null : stainsWrapper.getStains();<NEW_LINE>if (stains == null)<NEW_LINE>return null;<NEW_LINE>StainVector <MASK><NEW_LINE>StainVector s2 = stains.getStain(2);<NEW_LINE>double d1 = Point2D.distanceSq(x... | s1 = stains.getStain(1); |
551,434 | final TerminateTargetInstancesResult executeTerminateTargetInstances(TerminateTargetInstancesRequest terminateTargetInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(terminateTargetInstancesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,714,215 | public void encode(Writer writer) throws IOException {<NEW_LINE>String renderer = this.getRenderer();<NEW_LINE>AxisType xaxis = this.getXaxis();<NEW_LINE><MASK><NEW_LINE>writer.write("{");<NEW_LINE>writer.write("label:\"" + EscapeUtils.forJavaScript(this.getLabel()) + "\"");<NEW_LINE>writer.write(",renderer: $.jqplot."... | AxisType yaxis = this.getYaxis(); |
1,447,978 | Object Z_set(@SuppressWarnings("unused") FieldSet setfunc, PtrValue ptr, Object v, @SuppressWarnings("unused") int size, @Cached CastToJavaStringNode toString, @Cached GetNameNode getNameNode, @Cached GetClassNode getClassNode, @Cached PyLongCheckNode longCheckNode) {<NEW_LINE>// CTYPES_UNICODE<NEW_LINE>Object value = ... | ensureCapacity(chars.length * 2); |
890,934 | private void addDerivedTypes() {<NEW_LINE>Iterator<DefinedType> typeIter = schema.getTypes().iterator();<NEW_LINE>while (typeIter.hasNext()) {<NEW_LINE>DefinedType type = typeIter.next();<NEW_LINE>// debug (type.getName()+":"+type.getDomain(true).toString());<NEW_LINE>// if ((type.getDomain() instanceof SimpleType)==fa... | .add((EClass) classifier); |
1,504,288 | private ConfigurationDocument createConfigFile(StringToStringMap values) {<NEW_LINE>ConfigurationDocument configDocument = ConfigurationDocument.Factory.newInstance();<NEW_LINE>ConfigurationType config = configDocument.addNewConfiguration();<NEW_LINE>JavaToWsdlType java2Wsdl = config.addNewJavaWsdl();<NEW_LINE>ServiceT... | NamespacesType namespaces = java2Wsdl.addNewNamespaces(); |
437,529 | public OResultSet syncPull(OCommandContext ctx, int nRecords) throws OTimeoutException {<NEW_LINE>getPrev().ifPresent(x -> x.syncPull(ctx, nRecords));<NEW_LINE>return new OResultSet() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LINE>return !executed;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NE... | ? System.nanoTime() : 0; |
1,092,531 | public static void YUV420pToRGBH2H(byte yh, byte yl, byte uh, byte ul, byte vh, byte vl, int nlbi, byte[] data, byte[] lowBits, int nlbo, int off) {<NEW_LINE>int clipMax = ((1 << nlbo) << 8) - 1;<NEW_LINE>int round = (1 << nlbo) >> 1;<NEW_LINE>int c = ((yh + 128) << nlbi) + yl - 64;<NEW_LINE>int d = ((uh + 128) << nlbi... | (byte) (valR - 128); |
1,001,663 | public ManifestIdentifier identify(Config config) {<NEW_LINE>final String manifestPath = config.manifest();<NEW_LINE>if (manifestPath.equals(Config.NONE)) {<NEW_LINE>return new ManifestIdentifier((String) null, null, null, null, null);<NEW_LINE>}<NEW_LINE>// Try to locate the manifest file as a classpath resource; fall... | (System.getProperty("user.dir")); |
241,439 | private String createStringForMultipleUse(List<UsePart> useParts, String indentString) {<NEW_LINE>StringBuilder insertString = new StringBuilder();<NEW_LINE>UsePart.Type lastUsePartType = null;<NEW_LINE>for (Iterator<UsePart> it = useParts.iterator(); it.hasNext(); ) {<NEW_LINE>UsePart usePart = it.next();<NEW_LINE>if ... | append(usePart.getTextPart()); |
450,828 | @Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Validate table config for a table", notes = "This API returns the table config that matches the one you get from 'GET /tables/{tableName}'." + " This allows us to validate table config before apply.")<NEW_LINE>public String checkTableConfig(String ta... | String.format("Invalid table config json string: %s", tableConfigStr); |
1,438,554 | public // getPersistentHashcode()<NEW_LINE>void testEquals(Object ddrObject, Object jextractObject, int members) {<NEW_LINE>JavaObject ddrJavaObject = (JavaObject) ddrObject;<NEW_LINE>JavaObject jextractJavaObject = (JavaObject) jextractObject;<NEW_LINE>// isArray()<NEW_LINE>if ((IS_ARRAY & members) != 0)<NEW_LINE>test... | testComparatorEquals(ddrJavaObject, jextractJavaObject, "getHeap"); |
1,337,304 | private Optional<String> findRemoteBranchHeadCommit(List<String> lines, String branch) {<NEW_LINE>// 42958134b46b814ac54a740b784dcd67afae282c not-for-merge branch 'master' of github.com:gradle/gradle<NEW_LINE>// ef7f1b475b1309a47e98acdf7183bf8e0c65b729 not-for-merge branch 'oehme/performance/config-ti... | matcher = pattern.matcher(line); |
1,169,964 | public void sendRequest(final Exchange exchange) {<NEW_LINE>// for observe request.<NEW_LINE>Request request = exchange.getCurrentRequest();<NEW_LINE>if (request.isObserve() && 0 == exchange.getFailedTransmissionCount()) {<NEW_LINE>if (exchangeStore.assignMessageId(request) != Message.NONE) {<NEW_LINE>registerObserve(r... | setSendError(new IllegalStateException("automatic message IDs exhausted")); |
1,842,050 | public boolean visit(final PrivateGatewayRules privateGW) throws ResourceUnavailableException {<NEW_LINE>final VirtualRouter router = privateGW.getRouter();<NEW_LINE>final NicProfile nicProfile = privateGW.getNicProfile();<NEW_LINE>final boolean isAddOperation = privateGW.isAddOperation();<NEW_LINE>if (router.getState(... | router.getState() + ", so not sending setup private network command to the backend"); |
704,461 | public Code clearCustomInstallationId(long projectNumber, @NonNull String apiKey, @NonNull String firebaseInstanceId, @NonNull String firebaseInstanceIdToken) {<NEW_LINE>String resourceName = String.format(CLEAR_REQUEST_RESOURCE_NAME_FORMAT, projectNumber, firebaseInstanceId);<NEW_LINE>try {<NEW_LINE>URL url = new URL(... | , FIREBASE_SEGMENTATION_API_VERSION, resourceName, apiKey)); |
1,644,895 | public IHarvestResult harvestBlock(@Nonnull IFarmer farm, @Nonnull final BlockPos pos, @Nonnull IBlockState state) {<NEW_LINE>if (!canHarvest(farm, pos, state) || !farm.checkAction(FarmingAction.HARVEST, FarmingTool.HOE)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!farm.hasTool(FarmingTool.HOE)) {<NEW_LINE>farm.se... | ItemStack removedPlantable = Prep.getEmpty(); |
50,344 | public DescribeIdentityPoolResult describeIdentityPool(DescribeIdentityPoolRequest describeIdentityPoolRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeIdentityPoolRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executio... | awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); |
275,919 | public void initialize() {<NEW_LINE>gridRow = bsqBalanceUtil.addGroup(root, gridRow);<NEW_LINE>tableView = new TableView<>();<NEW_LINE>tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);<NEW_LINE>addDateColumn();<NEW_LINE>addTxIdColumn();<NEW_LINE>addInformationColumn();<NEW_LINE>addAmountColumn();<NE... | ).addAll(tableView, hBox); |
824,049 | private void enqueue(Exclusion exclusion, ReferenceNode parent, Instance child, String referenceName, ReferenceTraceElement.Type referenceType) {<NEW_LINE>if (child == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (isPrimitiveOrWrapperArray(child) || isPrimitiveWrapper(child)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>/... | child, parent, referenceName, referenceType); |
114,586 | private boolean doOpenProject(@NonNull final Project p) {<NEW_LINE>LOGGER.log(<MASK><NEW_LINE>final AtomicBoolean alreadyOpen = new AtomicBoolean();<NEW_LINE>boolean recentProjectsChanged = MUTEX.writeAccess(new Mutex.Action<Boolean>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Boolean run() {<NEW_LINE>log(Level.FI... | Level.FINER, "doOpenProject: {0}", p); |
561,130 | public List<EStep> calculateArtifactProbabilities(final VariantContext vc, final Mutect2FilteringEngine filteringEngine) {<NEW_LINE>// for each allele, forward and reverse count<NEW_LINE>List<List<Integer>> sbs = StrandBiasUtils.getSBsForAlleles(vc);<NEW_LINE>if (sbs == null || sbs.isEmpty() || sbs.size() <= 1) {<NEW_L... | i -> i).sum(); |
200,515 | public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>UnidbgPointer object = context.getPointerArg(1);<NEW_LINE>Pointer isCopy = context.getPointerArg(2);<NEW_LINE>StringObject string = getObject(object.toIntPeer());<NEW_LINE>if (isCopy != null) {<NEW_LINE>isCopy.... | ", lr=" + context.getLRPointer()); |
39,590 | public Builder mergeFrom(com.didiglobal.booster.aapt2.Resources.Plural other) {<NEW_LINE>if (other == com.didiglobal.booster.aapt2.Resources.Plural.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (entryBuilder_ == null) {<NEW_LINE>if (!other.entry_.isEmpty()) {<NEW_LINE>if (entry_.isEmpty()) {<NEW_LINE>entry_ =... | entryBuilder_.addAllMessages(other.entry_); |
1,642,784 | public void emitInvoke(Invoke x) {<NEW_LINE>LoweredCallTargetNode callTargetNode = (LoweredCallTargetNode) x.callTarget();<NEW_LINE>final Stamp stamp = x.asNode().stamp(NodeView.DEFAULT);<NEW_LINE>LIRKind lirKind = resolveStamp(stamp);<NEW_LINE>AllocatableValue result = Value.ILLEGAL;<NEW_LINE>if (lirKind != LIRKind.Il... | callingConvention, callTargetNode.arguments()); |
1,006,196 | private void taskFinished(TaskInstance taskInstance) {<NEW_LINE>logger.info("work flow {} task id:{} code:{} state:{} ", processInstance.getId(), taskInstance.getId(), taskInstance.getTaskCode(), taskInstance.getState());<NEW_LINE>activeTaskProcessorMaps.remove(taskInstance.getTaskCode());<NEW_LINE>stateWheelExecuteThr... | stateWheelExecuteThread.removeTask4RetryCheck(processInstance, taskInstance); |
239,820 | public Optional<AggregationProjectionSegment> convertToSQLSegment(final SqlBasicCall sqlBasicCall) {<NEW_LINE>if (null == sqlBasicCall) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>if (isAsOperatorAggregationType(sqlBasicCall)) {<NEW_LINE>SqlBasicCall subSqlBasicCall = (SqlBasicCall) sqlBasicCall.getOperandL... | getOperator().getName()); |
946,544 | private final void logSecretKeyInitResult() {<NEW_LINE>ArrayList<Secret> secretSet = m_secretSet;<NEW_LINE>if (secretSet == null) {<NEW_LINE>if (s_logger.isErrorEnabled()) {<NEW_LINE>s_logger.error("error.sip.outbound.failure", null, null);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (s_logger.isInfoEnabled()) {<NEW_LINE>... | "logSecretKeyInitResult", b.toString()); |
613,608 | public Expression combine(Expression left, Expression right) {<NEW_LINE>if (!(left instanceof Call)) {<NEW_LINE>// regular and<NEW_LINE>return and(<MASK><NEW_LINE>}<NEW_LINE>Call root = (Call) left;<NEW_LINE>if (root.operator() == Operators.OR) {<NEW_LINE>// change right-most child<NEW_LINE>// a.is(1)<NEW_LINE>// .or()... | ).combine(left, right); |
946,573 | private static DownloadInfo add(Builder b) {<NEW_LINE>Context context = b.mContext;<NEW_LINE>removeAllForUrl(context, b.mUrl);<NEW_LINE>if (!b.mDialog) {<NEW_LINE>synchronized (mCallbacks) {<NEW_LINE>mCallbacks.put(b.mUrl, b.mCallback);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Request request = new Request(Uri.parse(b.mUrl));<NE... | request.setTitle(b.mTitle); |
752,564 | private void openSelectionInEditor() {<NEW_LINE>DBPDataSourceContainer dsContainer = null;<NEW_LINE>StringBuilder sql = new StringBuilder();<NEW_LINE>TableItem[] items = logTable.getSelection();<NEW_LINE>for (TableItem item : items) {<NEW_LINE>QMEvent event = <MASK><NEW_LINE>QMMObject object = event.getObject();<NEW_LI... | (QMEvent) item.getData(); |
1,252,315 | final DeleteAnomalyMonitorResult executeDeleteAnomalyMonitor(DeleteAnomalyMonitorRequest deleteAnomalyMonitorRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAnomalyMonitorRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | (super.beforeMarshalling(deleteAnomalyMonitorRequest)); |
627,558 | public void testXAOptionARequired() throws Exception {<NEW_LINE>String deliveryID = "MD_test1a";<NEW_LINE>prepareTRA();<NEW_LINE>// construct a FVTMessage<NEW_LINE>FVTMessage message = new FVTMessage();<NEW_LINE><MASK><NEW_LINE>// Add a FVTXAResourceImpl for this delivery.<NEW_LINE>message.addXAResource("CMTNonJMSRequi... | message.addTestResult("CMTNonJMSRequired", 11); |
1,730,779 | private File unpackFromJarURL(URL url, String fileName, ClassLoader cl) {<NEW_LINE>ZipFile zip = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>int idx1 = path.lastIndexOf(".jar!");<NEW_LINE>if (idx1 == -1) {<NEW_LINE>idx1 = path.lastIndexOf(".zip!");<NEW_LINE>}<NEW_LINE>int idx2 = path.lastIndexOf(".jar!", idx1 - 1);<N... | String path = url.getPath(); |
508,441 | public Num pow(Num n) {<NEW_LINE>// There is no BigDecimal.pow(BigDecimal). We could do:<NEW_LINE>// double Math.pow(double delegate.doubleValue(), double n)<NEW_LINE>// But that could overflow any of the three doubles.<NEW_LINE>// Instead perform:<NEW_LINE>// x^(a+b) = x^a * x^b<NEW_LINE>// Where:<NEW_LINE>// n = a+b<... | double bDouble = b.doubleValue(); |
1,631,059 | static void render(final Comment comment, final RenderContext renderContext, final int depth) throws FrameworkException {<NEW_LINE>String _content = comment.getContent();<NEW_LINE>// Avoid rendering existing @structr comments since those comments are<NEW_LINE>// created depending on the visiblity settings of individual... | AsyncBuffer buf = renderContext.getBuffer(); |
687,413 | protected void merge(double mindist, int x, int y) {<NEW_LINE><MASK><NEW_LINE>// more efficient<NEW_LINE>assert y < x;<NEW_LINE>final int xx = mat.clustermap[x], yy = mat.clustermap[y];<NEW_LINE>final int sizex = builder.getSize(xx), sizey = builder.getSize(yy);<NEW_LINE>int zz = builder.strictAdd(xx, linkage.restore(m... | assert x >= 0 && y >= 0; |
691,260 | private static DiffElement createDiffElement(@Nonnull DiffContent content) {<NEW_LINE>if (content instanceof EmptyContent) {<NEW_LINE>return new DiffElement() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getPath() {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE><NEW_LINE>@Nonnull<NEW_LINE>@Override<NEW_LINE>public S... | " " + content.getContentType()); |
345,400 | public final Response containerContents(@Context final HttpServletRequest req, @Context final HttpServletResponse res, @QueryParam("containerId") final String containerId, @QueryParam("contentInode") final String contentInode) throws DotDataException, IOException {<NEW_LINE>final InitDataObject initData = webResource.i... | response = new HashMap<>(); |
1,138,965 | private static String[] resolveHttpProxy(final String httpProxy) {<NEW_LINE>final URI proxyUri = URI.create(httpProxy);<NEW_LINE>int port = proxyUri.getPort();<NEW_LINE>if (port == -1) {<NEW_LINE>if (Objects.equals("http", proxyUri.getScheme())) {<NEW_LINE>port = 80;<NEW_LINE>}<NEW_LINE>if (Objects.equals("https", prox... | atColon = usernamePassword.indexOf(':'); |
960,884 | private static TscOutput parseTscOutput(String outputString) {<NEW_LINE>Matcher m = errorRE.matcher(outputString);<NEW_LINE>TscOutput error = new TscOutput();<NEW_LINE>if (m.matches()) {<NEW_LINE>String[] pos = m.group(2).split(",");<NEW_LINE>error.position = new SourcePosition(new File(m.group(1)), null, Integer.parse... | (m.group(3)); |
515,150 | private void loadFromAttributes(@Nullable AttributeSet attrs, @AttrRes int defStyleAttr, @StyleRes int defStyleRes) {<NEW_LINE>TypedArray a = ThemeEnforcement.obtainStyledAttributes(context, attrs, R.styleable.Tooltip, defStyleAttr, defStyleRes);<NEW_LINE>arrowSize = context.getResources().getDimensionPixelSize(R.dimen... | ()).build()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.