idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
963,457 | public static int run(String[] args) {<NEW_LINE>Args parameters = new Args();<NEW_LINE>JCommander jc = JCommander.newBuilder().addObject(parameters).build();<NEW_LINE>jc.parse(args);<NEW_LINE>if (parameters.help) {<NEW_LINE>jc.usage();<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>File dbDirectory = new File(parameters.databa... | , parameters.maxBatchSize)))); |
38,325 | public Void execute(CommandContext commandContext) {<NEW_LINE>JobEntity jobToDelete = null;<NEW_LINE>for (String jobId : jobIds) {<NEW_LINE>jobToDelete = commandContext.<MASK><NEW_LINE>if (jobToDelete != null) {<NEW_LINE>if (commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {<NEW_LINE>com... | getJobEntityManager().findJobById(jobId); |
1,764,224 | private void save_atHome(final String title, final String url) {<NEW_LINE><MASK><NEW_LINE>faviconHelper.addFavicon(context, ninjaWebView.getUrl(), ninjaWebView.getFavicon());<NEW_LINE>RecordAction action = new RecordAction(context);<NEW_LINE>action.open(true);<NEW_LINE>if (action.checkUrl(url, RecordUnit.TABLE_START))<... | FaviconHelper faviconHelper = new FaviconHelper(context); |
552,073 | final UpdateProvisionedProductPropertiesResult executeUpdateProvisionedProductProperties(UpdateProvisionedProductPropertiesRequest updateProvisionedProductPropertiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateProvisionedProductPropertiesRequest);<NEW_LINE>AWSRequestMetrics awsRe... | invoke(request, responseHandler, executionContext); |
1,074,509 | public List<Pair<Pair<BinaryName, String>, Object[]>> analyseUnit(@NonNull final CompilationUnitTree cu, @NonNull final JavacTaskImpl jt) throws IOException {<NEW_LINE>if (used) {<NEW_LINE>// NOI18N<NEW_LINE>throw new IllegalStateException("Trying to reuse SimpleAnalyzer");<NEW_LINE>}<NEW_LINE>used = true;<NEW_LINE>try... | > data = oe.getValue(); |
1,721,565 | public Long[] asLongArray() {<NEW_LINE>if (arrayType.getElementType().is(ExprType.LONG)) {<NEW_LINE>return Arrays.stream(value).map(v -> (Long) v).toArray(Long[]::new);<NEW_LINE>} else if (arrayType.getElementType().is(ExprType.DOUBLE)) {<NEW_LINE>return value == null ? null : Arrays.stream(value).map(v -> ((Double) v)... | .tryParse((String) v); |
1,821,365 | public Repo<Manager> call(long tid, Manager environment) {<NEW_LINE>// directories are intentionally not created.... this is done because directories should be<NEW_LINE>// unique<NEW_LINE>// because they occupy a different namespace than normal tablet directories... also some clones<NEW_LINE>// may never create files..... | cloneInfo.tableId, tid, true); |
948,218 | protected void onHandleIntent(@Nullable Intent intent) {<NEW_LINE>if (intent == null) {<NEW_LINE>sendResults(Activity.RESULT_CANCELED, null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>op = intent.getIntExtra(EXTRA_OP, BatchOpsManager.OP_NONE);<NEW_LINE>packages = intent.getStringArrayListExtra(EXTRA_OP_PKG);<NEW_LINE>if (pa... | args = intent.getBundleExtra(EXTRA_OP_EXTRA_ARGS); |
68,826 | public static void zoom(MQuery query) {<NEW_LINE>if (query == null || query.getTableName() == null || query.getTableName().length() == 0)<NEW_LINE>return;<NEW_LINE>String TableName = query.getTableName();<NEW_LINE>int AD_Window_ID = 0;<NEW_LINE>int PO_Window_ID = 0;<NEW_LINE>String sql = "SELECT AD_Window_ID, PO_Window... | Level.SEVERE, sql, e); |
1,199,209 | public Builder mergeFrom(cn.wildfirechat.proto.WFCMessage.PullGroupInfoResult other) {<NEW_LINE>if (other == cn.wildfirechat.proto.WFCMessage.PullGroupInfoResult.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (infoBuilder_ == null) {<NEW_LINE>if (!other.info_.isEmpty()) {<NEW_LINE>if (info_.isEmpty()) {<NEW_LI... | mergeUnknownFields(other.getUnknownFields()); |
750,717 | private static ImmutableMap<String, String> loadUserConfig(CaliperOptions caliperOptions, String suffix) {<NEW_LINE>File mainConfigFile = caliperOptions.caliperConfigFile().getAbsoluteFile();<NEW_LINE>String mainConfigFileBaseName = Files.getNameWithoutExtension(mainConfigFile.getName());<NEW_LINE>String configFileName... | = new File(parentDir, configFileName); |
505,210 | private void doPrintUsage(boolean force) {<NEW_LINE>if (config.getShouldPrintUsage() || force) {<NEW_LINE>String rubyPager = getRubyPagerEnv();<NEW_LINE>if (rubyPager == null) {<NEW_LINE>config.getOutput().print(OutputStrings.getBasicUsageHelp());<NEW_LINE>config.getOutput().<MASK><NEW_LINE>} else {<NEW_LINE>try {<NEW_... | print(OutputStrings.getFeaturesHelp()); |
1,666,515 | public static void main(String[] args) {<NEW_LINE>Map mapBefore = new HashMap();<NEW_LINE>byte[] b = { 0, 1, 2 };<NEW_LINE>mapBefore.put("Hi", b);<NEW_LINE>String jsonByteArray = JSONUtils.encodeToJSON(mapBefore);<NEW_LINE>System.out.println(jsonByteArray);<NEW_LINE>Map mapAfter = JSONUtils.decodeJSON(jsonByteArray);<N... | map3.put("Test3", "test3value"); |
165,896 | public static void loadSchedulerInfo(AppResult result, HadoopApplicationData data, Scheduler scheduler) {<NEW_LINE>String appId = data.getAppId();<NEW_LINE>result.scheduler = Utils.truncateField(scheduler.getSchedulerName(), AppResult.SCHEDULER_LIMIT, appId);<NEW_LINE>result.workflowDepth = scheduler.getWorkflowDepth()... | AppResult.JOB_NAME_LIMIT, appId) : ""; |
302,933 | public void expandPlainPath(int row, int maxChildren) {<NEW_LINE>if (tree != null)<NEW_LINE>try {<NEW_LINE>markExpansionTransaction();<NEW_LINE>TreePath tpath = tree.getPathForRow(row);<NEW_LINE>if (tpath == null)<NEW_LINE>return;<NEW_LINE>TreeModel tmodel = tree.getModel();<NEW_LINE>int childCount = tmodel.getChildCou... | getChildCount(tpath.getLastPathComponent()); |
1,564,678 | private I_M_HU createHUInstance(final I_M_HU_PI_Version huPIVersion, @Nullable final I_M_HU_Item parentItem) {<NEW_LINE>final IHUContext huContext = getHUContext();<NEW_LINE>final I_M_HU hu = InterfaceWrapperHelper.newInstance(I_M_HU.class, huContext);<NEW_LINE>hu.setM_HU_PI_Version(huPIVersion);<NEW_LINE>//<NEW_LINE>/... | setC_BPartner_Location_ID(parentHU.getC_BPartner_Location_ID()); |
158,558 | private Mono<Response<Void>> deleteInSubscriptionWithResponseAsync(String assessmentMetadataName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (assessmentMetadat... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
714,958 | private static void xmpSample(InputStream imageStream) throws XMPException, ImageProcessingException, IOException {<NEW_LINE>// Extract metadata from the image<NEW_LINE>Metadata metadata = ImageMetadataReader.readMetadata(imageStream);<NEW_LINE>// Iterate through any XMP directories we may have received<NEW_LINE>for (X... | XMPMeta xmpMeta = xmpDirectory.getXMPMeta(); |
459,351 | private Result searchMultipleDocumentTypes(Searcher searcher, Query query, Execution execution) {<NEW_LINE>Set<String> docTypes = resolveDocumentTypes(query, execution.context().getIndexFacts());<NEW_LINE>Result invalidRankProfile = checkValidRankProfiles(query, docTypes);<NEW_LINE>if (invalidRankProfile != null)<NEW_L... | ), query.getHits()); |
531,296 | public void mapPartition(Iterable<T> values, Collector<Tuple3<Integer, Integer, double[]>> out) throws Exception {<NEW_LINE>ComContext context = new ComContext(sessionId, getIterationRuntimeContext());<NEW_LINE>int taskId = getRuntimeContext().getIndexOfThisSubtask();<NEW_LINE>int numOfSubTasks <MASK><NEW_LINE>int iter... | = getRuntimeContext().getNumberOfParallelSubtasks(); |
1,776,369 | public void marshall(BatchWriteOperationResponse batchWriteOperationResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (batchWriteOperationResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(bat... | batchWriteOperationResponse.getAttachPolicy(), ATTACHPOLICY_BINDING); |
824,833 | private void renameOsgiCache() throws GFLauncherException {<NEW_LINE>if (info.isUpgrade()) {<NEW_LINE>File osgiCacheDir = new File(info.getDomainRootDir(), "osgi-cache");<NEW_LINE>File backupOsgiCacheDir = new File(info.getDomainRootDir(), <MASK><NEW_LINE>if (osgiCacheDir.exists() && !backupOsgiCacheDir.exists()) {<NEW... | "osgi-cache-" + System.currentTimeMillis()); |
441,723 | public static void nailMain(NGContext context) {<NEW_LINE>context.out.println();<NEW_LINE>context.out.println(" context.getCommand(): " + context.getCommand());<NEW_LINE>context.out.println(" context.getInetAddress(): " + context.getInetAddress());<NEW_LINE>context.out.println(" context.getPort()... | getEnv().keySet()); |
1,512,266 | // We can reuse the cachedGroupsFactory even if the new groups factory is different, as long<NEW_LINE>// as the compiledRegex is the same. This can happen if a new RegExp instance is repeatedly<NEW_LINE>// created for the same regular expression.<NEW_LINE>@Specialization(guards = "getGroupsFactory(regExp) == cachedGrou... | cachedGroupsFactory, regexResult, input, isIndices); |
185,718 | public Builder mergeFrom(org.apache.jena.riot.protobuf.wire.PB_RDF.RDF_Graph other) {<NEW_LINE>if (other == org.apache.jena.riot.protobuf.wire.PB_RDF.RDF_Graph.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (tripleBuilder_ == null) {<NEW_LINE>if (!other.triple_.isEmpty()) {<NEW_LINE>if (triple_.isEmpty()) {<NE... | bitField0_ = (bitField0_ & ~0x00000001); |
754,642 | public void cleanUser(String user) throws AccumuloSecurityException {<NEW_LINE>try {<NEW_LINE>synchronized (zooCache) {<NEW_LINE>zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserSysPerms, NodeMissingPolicy.SKIP);<NEW_LINE>zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms, NodeMissingPolicy.SKIP);<NEW_LI... | e.getMessage(), e); |
247,256 | private String computeServiceName() {<NEW_LINE>final Class<?> httpClientClass = Classes.childClassOf(AmazonWebServiceClient.class, this);<NEW_LINE>final String httpClientName = httpClientClass.getSimpleName();<NEW_LINE>final String <MASK><NEW_LINE>if (service != null) {<NEW_LINE>// only if it is so explicitly configure... | service = ServiceNameFactory.getServiceName(httpClientName); |
1,818,347 | public <T> T doPreventingRecursion(@Nonnull Key key, boolean memoize, @Nonnull Computable<T> computation) {<NEW_LINE>MyKey realKey = new MyKey(id, key, true);<NEW_LINE>final CalculationStack stack = ourStack.get();<NEW_LINE>if (stack.checkReentrancy(realKey)) {<NEW_LINE>if (ourAssertOnPrevention) {<NEW_LINE>throw new S... | = stack.progressMap.size(); |
1,298,898 | Map<String, String> determineProviderConfig(ProviderInfo info) {<NEW_LINE>HashMap<String, String> map = new HashMap<String, String>();<NEW_LINE>map.put("name", info.getName());<NEW_LINE>boolean apppw = false;<NEW_LINE>boolean apptok = false;<NEW_LINE>boolean clientadmin = false;<NEW_LINE>OidcBaseClient client = null;<N... | info.getName() + "/usersTokenManagement"); |
1,066,132 | public static void main(String[] args) {<NEW_LINE>Scanner scan = new Scanner(System.in);<NEW_LINE>System.out.println("\n-----------------HILL CIPHER-----------------\n");<NEW_LINE>System.out.println("The length of plaintext must be same as size\n");<NEW_LINE>System.out.println("Current value of size is " + size + "\n")... | String ciphertext = new String(""); |
1,153,759 | public void verify(Component component, JRVerifier verifier) {<NEW_LINE>MapComponent map = (MapComponent) component;<NEW_LINE>EvaluationTimeEnum evaluationTime = map.getEvaluationTime();<NEW_LINE>if (evaluationTime == EvaluationTimeEnum.AUTO) {<NEW_LINE>verifier.addBrokenRule("Auto evaluation time is not supported for ... | { MapComponent.ITEM_PROPERTY_name }, null); |
1,759,217 | public static ListMediasWithPublicResponse unmarshall(ListMediasWithPublicResponse listMediasWithPublicResponse, UnmarshallerContext context) {<NEW_LINE>listMediasWithPublicResponse.setRequestId(context.stringValue("ListMediasWithPublicResponse.RequestId"));<NEW_LINE>listMediasWithPublicResponse.setSuccess(context.bool... | ("ListMediasWithPublicResponse.Medias.List[" + i + "].Scope")); |
1,518,210 | private Mono<HandlerResult> handleException(Throwable exception, HandlerMethod handlerMethod, BindingContext bindingContext, ServerWebExchange exchange) {<NEW_LINE>Assert.state(this.methodResolver != null, "Not initialized");<NEW_LINE>// Success and error responses may use different content types<NEW_LINE>exchange.getA... | .asMap().clear(); |
1,646,153 | final DescribeMultiplexProgramResult executeDescribeMultiplexProgram(DescribeMultiplexProgramRequest describeMultiplexProgramRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeMultiplexProgramRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,547,666 | final StopEventsDetectionJobResult executeStopEventsDetectionJob(StopEventsDetectionJobRequest stopEventsDetectionJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopEventsDetectionJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | (super.beforeMarshalling(stopEventsDetectionJobRequest)); |
24,983 | public AudioInputStream synthesize(int backchannelNumber, AudioFileFormat aft) throws SynthesisException {<NEW_LINE>int numberOfBackChannels = unitFileReader.getNumberOfUnits();<NEW_LINE>if (backchannelNumber >= numberOfBackChannels) {<NEW_LINE>throw new IllegalArgumentException("This voice has " + numberOfBackChannels... | , aft.getFormat())); |
914,076 | public final ConstantContext constant() throws RecognitionException {<NEW_LINE>ConstantContext _localctx = new ConstantContext(_ctx, getState());<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>setState(3337);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(_input.LA(1)) {<NEW_LINE>case PLUS:<NEW_LINE>case MINUS:<NEW_LINE>cas... | enterRule(_localctx, 508, RULE_constant); |
794,854 | protected void doExecute(Task task, MultiSearchRequest request, ActionListener<MultiSearchResponse> listener) {<NEW_LINE>final long relativeStartTime = relativeTimeProvider.getAsLong();<NEW_LINE>ClusterState clusterState = clusterService.state();<NEW_LINE>clusterState.blocks().globalBlockedRaiseException(ClusterBlockLe... | .requests().size(); |
370,883 | protected void after(XParam param) throws Throwable {<NEW_LINE>String key = (param.args.length > 0 ? (String) param<MASK><NEW_LINE>if (key != null)<NEW_LINE>if (mPropertyName.startsWith("%") ? key.contains(mPropertyName.substring(1)) : key.equals(mPropertyName))<NEW_LINE>if (mMethod == Methods.get) {<NEW_LINE>if (param... | .args[0] : null); |
543,516 | void resolve(String path) {<NEW_LINE>if (path == null)<NEW_LINE>return;<NEW_LINE>path = path.trim();<NEW_LINE>// NOI18N<NEW_LINE>if (path.equals(""))<NEW_LINE>return;<NEW_LINE>if (path.startsWith("[") && path.endsWith("]")) {<NEW_LINE>// NOI18N<NEW_LINE>this.resolveGraph(path.substring(1, path.length() - 1));<NEW_LINE>... | = new DDParser(root, path); |
1,143,170 | public static void vertical(Kernel1D_S32 kernel, GrayS16 src, GrayI16 dst) {<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dst.data;<NEW_LINE>final int[] dataKer = kernel.data;<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE>fina... | .startIndex + y * dst.stride; |
1,114,152 | public CopyOnWriteSet remove(final ExecutorPlugin plugin) {<NEW_LINE>int i = indexOf(plugin, plugins);<NEW_LINE>if (i < 0) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (plugins.length == 3) {<NEW_LINE>switch(i) {<NEW_LINE>case 0:<NEW_LINE>return new TwoExecutorPluginSet(plugins[<MASK><NEW_LINE>case 1:<NEW_LINE>return... | 1], plugins[2]); |
203,686 | static Map<String, Object> subsetAnnotationsIfNecessary(final VariantAnnotatorEngine annotationEngine, final boolean doQualApprox, final String posteriorsKey, final VariantContext originalVC, final VariantContext regenotyped) {<NEW_LINE>final Map<String, Object> newAnnotations;<NEW_LINE>if (regenotyped.getNAlleles() !=... | (regenotyped.getAlleles())); |
971,100 | private void drawCompassCircle(Canvas canvas, RotatedTileBox tileBox, int circleNumber, QuadPoint center, RenderingLineAttributes attrs) {<NEW_LINE>if (!tileBox.isZoomAnimated()) {<NEW_LINE>float radiusLength = radius * circleNumber;<NEW_LINE>float innerRadiusLength = radiusLength - attrs.paint.getStrokeWidth() / 2;<NE... | , 16), center, attrs); |
769,882 | protected final void writeChunk(ObjectDataOutput out, MapChunkContext context) throws IOException {<NEW_LINE><MASK><NEW_LINE>long recordCount = 0;<NEW_LINE>out.writeString(context.getMapName());<NEW_LINE>Iterator<Map.Entry<Data, Record>> entries = context.getIterator();<NEW_LINE>while (entries.hasNext()) {<NEW_LINE>Map... | SerializationService ss = context.getSerializationService(); |
1,610,266 | private static void defaultMobData(final EntityType type, final Entity spawned) {<NEW_LINE>if (type == EntityType.SKELETON) {<NEW_LINE>final EntityEquipment invent = ((LivingEntity) spawned).getEquipment();<NEW_LINE>InventoryWorkaround.setItemInMainHand(invent, new ItemStack(Material.BOW, 1));<NEW_LINE>InventoryWorkaro... | InventoryWorkaround.setItemInMainHandDropChance(invent, 0.1f); |
1,104,445 | public FieldContainedStatus isCacheFor(EntityField<?> field, Object parameter) {<NEW_LINE>if (!isCacheForAnything) {<NEW_LINE>return FieldContainedStatus.NOT_CONTAINED;<NEW_LINE>}<NEW_LINE>// If there is CACHE_FOR_EXCLUDED then this node is a cache for all fields, and should be treated as such even if there is no CACHE... | NodeProperties.CACHE_FOR_EXCLUDED, Map.class); |
385,150 | public void resolveCurrentRawDeps() {<NEW_LINE>if (!externalDependenciesExtension.resoleOnlyThirdParty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, List<ExternalDependency>> rawDepsMap = rawDependencies.stream().collect(Collectors.groupingBy(i -> i.getGroup() + "--" + i.getVersion()));<NEW_LINE>List<Project> a... | >(project.getAllprojects()); |
1,795,805 | protected void map(StaticBuffer key, Iterable<Entry> values, Context context) throws IOException, InterruptedException {<NEW_LINE>EntryArrayList al = EntryArrayList.of(values);<NEW_LINE>// KeyFilter check<NEW_LINE>if (!keyFilter.test(key)) {<NEW_LINE>log.debug("Skipping key {} based on KeyFilter", key);<NEW_LINE>return... | matches.put(initialQuery, initialQueryMatches); |
1,251,211 | public void init(InitParameters params) {<NEW_LINE>services = new EnumMap<>(CompactionKind.class);<NEW_LINE>var defaultService = CompactionDispatch.builder().toService("default").build();<NEW_LINE>if (params.getOptions().containsKey("service")) {<NEW_LINE>defaultService = CompactionDispatch.builder().toService(params.g... | services.put(ctype, defaultService); |
807,766 | protected Record rebalance(int id1, Record r1, int id2, Record r2) {<NEW_LINE>RecordBufferPageMgr mgr = bpt.getRecordsMgr().getRecordBufferPageMgr();<NEW_LINE>RecordBufferPage page1 = mgr.getWrite(id1);<NEW_LINE>RecordBufferPage page2 = mgr.getWrite(id2);<NEW_LINE>// Wrong calculation??<NEW_LINE>int x1 = page2.getCount... | .getRecordBuffer().getHigh(); |
1,228,767 | public void marshall(CreateClusterRequest createClusterRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createClusterRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.get... | createClusterRequest.getLoggingInfo(), LOGGINGINFO_BINDING); |
1,511,392 | public String asi(final ICalloutField calloutField) {<NEW_LINE>if (isCalloutActive()) {<NEW_LINE>return NO_ERROR;<NEW_LINE>}<NEW_LINE>final I_M_InOutLine inoutLine = calloutField.getModel(I_M_InOutLine.class);<NEW_LINE>final int asiId = inoutLine.getM_AttributeSetInstance_ID();<NEW_LINE>if (asiId <= 0) {<NEW_LINE>retur... | I_M_AttributeSetInstance attributeSetInstance = inoutLine.getM_AttributeSetInstance(); |
1,395,029 | final SendSSHPublicKeyResult executeSendSSHPublicKey(SendSSHPublicKeyRequest sendSSHPublicKeyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(sendSSHPublicKeyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<S... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,635,433 | protected boolean isExists(Model model) {<NEW_LINE>ElasticSearchClient esClient = (ElasticSearchClient) client;<NEW_LINE>String tableName = IndexController.INSTANCE.getTableName(model);<NEW_LINE>IndexController.LogicIndicesRegister.registerRelation(model.getName(), tableName);<NEW_LINE>if (!model.isTimeSeries()) {<NEW_... | template = esClient.getTemplate(tableName); |
1,784,287 | protected Object toJson(RelDataType node) {<NEW_LINE>if (node.isStruct()) {<NEW_LINE>final List<Object> list = jsonBuilder.list();<NEW_LINE>for (RelDataTypeField field : node.getFieldList()) {<NEW_LINE>list.add(toJson(field));<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>} else {<NEW_LINE>final Map<String, Object> map = j... | getCollation().getCollationName()); |
1,187,263 | public static SortingParams toSortingParams(@Nullable SortParameters params) {<NEW_LINE>SortingParams jedisParams = null;<NEW_LINE>if (params != null) {<NEW_LINE>jedisParams = new SortingParams();<NEW_LINE>byte[<MASK><NEW_LINE>if (byPattern != null) {<NEW_LINE>jedisParams.by(params.getByPattern());<NEW_LINE>}<NEW_LINE>... | ] byPattern = params.getByPattern(); |
1,175,408 | protected T valueOf(String value) {<NEW_LINE>Number multiplier = 1;<NEW_LINE>if (multiplier() != null) {<NEW_LINE>multiplier = (Number) multiplier();<NEW_LINE>}<NEW_LINE>Class<T> type = type();<NEW_LINE>if (type.isAssignableFrom(Boolean.class)) {<NEW_LINE>return (T) Boolean.valueOf(value);<NEW_LINE>} else if (type.isAs... | ) * multiplier.longValue()); |
1,750,964 | public void writeToJSON(MMKV kvv) {<NEW_LINE>Gson gson = new Gson();<NEW_LINE>Set<String> mapIndex = new HashSet<>();<NEW_LINE>mapIndex = kvv.decodeStringSet("mapIndex", mapIndex);<NEW_LINE>if (mapIndex != null) {<NEW_LINE>for (String string : mapIndex) {<NEW_LINE>Bundle bundle = kvv.decodeParcelable(string, Bundle.cla... | kvv.encode("numberIndex", intIndex); |
1,607,302 | public void actionPerformed(AnActionEvent e) {<NEW_LINE>final SingleConfigurationConfigurable<RunConfiguration> configuration = getSelectedConfiguration();<NEW_LINE>LOG.assertTrue(configuration != null);<NEW_LINE>try {<NEW_LINE>final DefaultMutableTreeNode typeNode = getSelectedConfigurationTypeNode();<NEW_LINE>final R... | configurable.getNameTextField(), true); |
576,871 | final DescribeWorkspacesResult executeDescribeWorkspaces(DescribeWorkspacesRequest describeWorkspacesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeWorkspacesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
241,226 | public boolean checkConnectionInCommandThread() {<NEW_LINE>ZebraPrinter savedPrinter = mPrinter;<NEW_LINE>try {<NEW_LINE>boolean wasConnected = false;<NEW_LINE>if (mPrinter == null) {<NEW_LINE>mPrinterConnection.open();<NEW_LINE>mPrinter = ZebraPrinterFactory.getInstance(mPrinterConnection);<NEW_LINE>} else {<NEW_LINE>... | "WARNINGEN2: can not check connection of [" + getZebraAddress() + "]"); |
1,091,734 | public static void writeBlockState(PacketBuffer buf, IBlockState state) {<NEW_LINE>Block block = state.getBlock();<NEW_LINE>buf.writeVarInt(Block.REGISTRY.getIDForObject(block));<NEW_LINE>int meta = block.getMetaFromState(state);<NEW_LINE>buf.writeByte(meta);<NEW_LINE>IBlockState readState = block.getStateFromMeta(meta... | writeByte(differingProperties.size()); |
405,981 | private void buildFolder(final Composite form, final String props_prefix) {<NEW_LINE>PluginInterface pi = PluginInitializer.getDefaultInterface();<NEW_LINE>UIManager uim = pi.getUIManager();<NEW_LINE>MenuManager menuManager = uim.getMenuManager();<NEW_LINE>menuItemShowTabs = menuManager.addMenuItem(props_prefix + "._en... | (COConfigurationManager.getBooleanParameter("Library.ShowTabsInTorrentView")); |
326,107 | public ContentChannel handleRequest(Request request, ResponseHandler originalResponseHandler) {<NEW_LINE>Preconditions.checkArgument(request instanceof HttpRequest, "Expected HttpRequest, got " + request);<NEW_LINE>Objects.requireNonNull(originalResponseHandler, "responseHandler");<NEW_LINE>RequestFilter requestFilter ... | (RequestHandlerSpec.ATTRIBUTE_NAME, requestHandlerSpec)); |
905,405 | public static <T extends JApiModifierBase> JApiModifier<T> extractModifierFromBehavior(Optional<? extends CtBehavior> oldClassOptional, Optional<? extends CtBehavior> newClassOptional, ExtractModifierFromBehaviorCallback<T> callback) {<NEW_LINE>if (oldClassOptional.isPresent() && newClassOptional.isPresent()) {<NEW_LIN... | CtBehavior newClass = newClassOptional.get(); |
1,167,668 | public static GLKMatrix4 subtract(GLKMatrix4 matrixLeft, GLKMatrix4 matrixRight) {<NEW_LINE>float[] m = new float[16];<NEW_LINE>float[] matrixLeft_m = new float[16];<NEW_LINE>float[] matrixRight_m = new float[16];<NEW_LINE>matrixLeft.getM().get(matrixLeft_m);<NEW_LINE>matrixRight.<MASK><NEW_LINE>m[0] = matrixLeft_m[0] ... | getM().get(matrixRight_m); |
1,102,405 | public static DescribeDataMaskingRunHistoryResponse unmarshall(DescribeDataMaskingRunHistoryResponse describeDataMaskingRunHistoryResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDataMaskingRunHistoryResponse.setRequestId(_ctx.stringValue("DescribeDataMaskingRunHistoryResponse.RequestId"));<NEW_LINE>describeDataM... | = new ArrayList<Task>(); |
813,130 | protected void afterHookedMethod(MethodHookParam param) throws Throwable {<NEW_LINE>Hookers.logD("LoadedApk#<init> starts");<NEW_LINE>try {<NEW_LINE>LoadedApk loadedApk = (LoadedApk) param.thisObject;<NEW_LINE><MASK><NEW_LINE>Object mAppDir = XposedHelpers.getObjectField(loadedApk, "mAppDir");<NEW_LINE>Hookers.logD("Lo... | String packageName = loadedApk.getPackageName(); |
41,733 | // -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public Function<Double, Double> differentiate(Function<Double, Double> function, Function<Double, Boolean> domain) {<NEW_LINE>ArgChecker.notNull(function, "function");<NEW_LINE>ArgChecker.notNull(domain, "domain");<... | 4. / twoEps, 3. / twoEps }; |
1,627,338 | public static DescribeScheduledTasksResponse unmarshall(DescribeScheduledTasksResponse describeScheduledTasksResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeScheduledTasksResponse.setRequestId<MASK><NEW_LINE>describeScheduledTasksResponse.setTotalCount(_ctx.integerValue("DescribeScheduledTasksResponse.TotalCount... | (_ctx.stringValue("DescribeScheduledTasksResponse.RequestId")); |
493,616 | public void run() {<NEW_LINE>Map<Long, UserSummary> summaryMap = new HashMap<Long, UserSummary>();<NEW_LINE><MASK><NEW_LINE>while (longEnumer.hasMoreElements()) {<NEW_LINE>XLogData d = dataMap.get(longEnumer.nextLong());<NEW_LINE>long time = d.p.endTime;<NEW_LINE>if (d.filter_ok && time >= stime && time <= etime && !Ob... | LongEnumer longEnumer = dataMap.keys(); |
298,831 | public static boolean contains(final boolean caseSensitive, final CharSequence text, final CharSequence fragment) {<NEW_LINE>if (text == null) {<NEW_LINE>throw new IllegalArgumentException("Text cannot be null");<NEW_LINE>}<NEW_LINE>if (fragment == null) {<NEW_LINE>throw new IllegalArgumentException("Fragment cannot be... | , fragment.length())); |
260,682 | List<CallableUserAggregationFunction> compileAggregationFunction(Class<?> fcnDefinition) throws KernelException {<NEW_LINE>try {<NEW_LINE>List<Method> methods = Arrays.stream(fcnDefinition.getDeclaredMethods()).filter(m -> m.isAnnotationPresent(UserAggregationFunction.class)).collect(Collectors.toList());<NEW_LINE>if (... | (fcnDefinition, method, funcName)); |
404,330 | public T onCompleted(com.ning.http.client.Response ningResponse) {<NEW_LINE>try {<NEW_LINE>final Map<String, String> headersMap = new HashMap<>();<NEW_LINE>for (Map.Entry<String, List<String>> header : ningResponse.getHeaders().entrySet()) {<NEW_LINE>final StringBuilder value = new StringBuilder();<NEW_LINE>for (String... | ), value.toString()); |
1,340,885 | public void computeChildren(@NotNull final XCompositeNode node) {<NEW_LINE>final AtomicInteger counter = new AtomicInteger(myFieldRefs.size());<NEW_LINE>final XValueChildrenList list = new <MASK><NEW_LINE>for (final FieldRef fieldRef : myFieldRefs) {<NEW_LINE>myDebugProcess.getVmServiceWrapper().getObject(myIsolateId, ... | XValueChildrenList(myFieldRefs.size()); |
1,398,718 | static File createTempFile(String prefix, String suffix, File directory) throws IOException {<NEW_LINE>if (directory == null) {<NEW_LINE>throw new NullPointerException();<NEW_LINE>}<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>prefix = new File(prefix).getName();<NEW_LINE>IOException suppressed = null;<NEW... | throw new IOException("Unable to create temporary file: " + tempFile); |
1,424,542 | protected SnippetTemplate.Arguments makeArguments(InstanceOfUsageReplacer replacer, LoweringTool tool) {<NEW_LINE>InstanceOfNode node = (InstanceOfNode) replacer.instanceOf;<NEW_LINE>TypeReference typeReference = node.type();<NEW_LINE>SharedType type = (SharedType) typeReference.getType();<NEW_LINE>DynamicHub hub = typ... | args.add("exactType", hub); |
1,555,694 | // from CloneableEditor.Pane<NEW_LINE>public void updateName() {<NEW_LINE>// is called before setMultiViewDescriptions() need to check for null.<NEW_LINE>if (model != null) {<NEW_LINE>for (MultiViewDescription mvd : model.getDescriptions()) {<NEW_LINE>if (mvd instanceof ContextAwareDescription && ((ContextAwareDescript... | CloneableTopComponent tc = pane.getComponent(); |
21,584 | private void createAvoidRoadsFilesItems() {<NEW_LINE>List<File> avoidRoadsFiles = avoidRoadsHelper.collectAvoidRoadsFiles();<NEW_LINE>if (!Algorithms.isEmpty(avoidRoadsFiles)) {<NEW_LINE>items.add(new SubtitleDividerItem(app));<NEW_LINE>items.add(new TitleItem(getString(R.string.files_with_route_restrictions)));<NEW_LI... | .id.divider), false); |
335,650 | // generateNotification.<NEW_LINE>@WrapInTransaction<NEW_LINE>private void saveNotification(final NotificationDTO dto, final NotificationData data, final Visibility visibility, final String visibilityId, final NotificationLevel level, final String userId, final Locale locale) throws DotSecurityException, DotDataExcepti... | setGroupId(dto.getGroupId()); |
266,259 | /* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_isDirOffset_", declaredType="uint32_t:1")<NEW_LINE>* public UDATA isDir() throws CorruptDataException {<NEW_LINE>* return getU32Bitfield(<MASK><NEW_LINE>* }<NEW_LINE>*/<NEW_LINE>private void doBitfieldMethod(Fiel... | J9FileStat._isDir_s_, J9FileStat._isDir_b_); |
1,419,102 | public void marshall(ListCodeReviewsRequest listCodeReviewsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listCodeReviewsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listCodeReviewsReq... | e.getMessage(), e); |
505,991 | public Attributes toAttributes(Attributes attrs) {<NEW_LINE>int offsetSOF = offsetSOF();<NEW_LINE>if (offsetSOF == -1)<NEW_LINE>return null;<NEW_LINE>if (attrs == null)<NEW_LINE>attrs = new Attributes(10);<NEW_LINE>int sof = data[offsetSOF] & 255;<NEW_LINE>int p = data[offsetSOF + 3] & 0xff;<NEW_LINE>int y = ((data[off... | PhotometricInterpretation, VR.CS, "MONOCHROME2"); |
1,273,066 | private boolean processResults(final Results results, final Component component) {<NEW_LINE>try (final QueryManager qm = new QueryManager()) {<NEW_LINE>for (us.springett.vulndbdatamirror.parser.model.Vulnerability vulnDbVuln : (List<us.springett.vulndbdatamirror.parser.model.Vulnerability>) results.getResults()) {<NEW_... | (qm, vulnDbVuln), false); |
1,683,991 | public void fillSector(float cx, float cy, float radiusX, float radiusY, float sweepAngle, int color) {<NEW_LINE>float conjugateAngle = Math.abs(360 - MathUtils<MASK><NEW_LINE>int conjugateCount = Math.round(COUNT_CIRCLE_VERTEX * conjugateAngle / 360);<NEW_LINE>if (conjugateCount == 0) {<NEW_LINE>// It is a circle<NEW_... | .positiveModulo(sweepAngle, 360)); |
1,641,730 | public void send(Email email) {<NEW_LINE>if (!portalConfig.isEmailEnabled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SMTPTransport t = null;<NEW_LINE>try {<NEW_LINE>Properties prop = System.getProperties();<NEW_LINE>Session session = Session.getInstance(prop, null);<NEW_LINE>Message msg = new MimeMessage(session);<NEW_L... | .getRecipientsString(), false)); |
705,611 | public void attachLoadIconObserver(@NotNull final WebAsyncTree tree) {<NEW_LINE>// Event Dispatch Thread check<NEW_LINE>WebLookAndFeel.checkEventDispatchThread();<NEW_LINE>// Proceed only if icon actually exists<NEW_LINE>final Icon icon = getLoadIcon(new TreeNodeParameters<N, WebAsyncTree<N>>(tree, (N) this));<NEW_LINE... | = new NodeImageObserver(tree, this); |
1,826,694 | public void deleteCategory() {<NEW_LINE>new MaterialDialog.Builder(this).title(R.string.delete_unused_category_confirmation).content(R.string.delete_category_confirmation).positiveText(R.string.confirm).positiveColorRes(R.color.colorAccent).onPositive((dialog, which) -> {<NEW_LINE>// Changes navigation if actually are ... | .post(new CategoriesUpdatedEvent()); |
958,744 | private final /* The common code shared by asSpreader() with the last argument and with the argument at the specified position */<NEW_LINE>MethodHandle asSpreaderCommon(int spreadPosition, Class<?> arrayClass, int spreadCount) throws IllegalArgumentException, WrongMethodTypeException {<NEW_LINE>final int length = type.... | > componentType = arrayClass.getComponentType(); |
559,864 | public ProcessStatus processCheck(final PwmRequest pwmRequest) throws PwmUnrecoverableException {<NEW_LINE>final String ssoOverrideParameterName = pwmRequest.getDomainConfig().readAppProperty(AppProperty.HTTP_PARAM_NAME_SSO_OVERRIDE);<NEW_LINE>if (pwmRequest.hasParameter(ssoOverrideParameterName)) {<NEW_LINE>final Stri... | "disabling sso authentication due to parameter " + ssoOverrideParameterName + "=" + ssoParamValue); |
725,544 | private static PGPSignature generateRevocationSignature(PGPSignatureGenerator sGen, Date creationTime, PGPPublicKey masterPublicKey, PGPPrivateKey masterPrivateKey, PGPPublicKey pKey) throws IOException, PGPException, SignatureException {<NEW_LINE>PGPSignatureSubpacketGenerator subHashedPacketsGen = new PGPSignatureSub... | setHashedSubpackets(subHashedPacketsGen.generate()); |
1,374,698 | protected V filterSingleObject(V featureVector) {<NEW_LINE>// generic casts here are not safe, but will do:<NEW_LINE>Norm<? super V> norm = this.norm;<NEW_LINE>if (featureVector instanceof SparseNumberVector) {<NEW_LINE>// Special override, as it will be easily used inefficiently otherwise<NEW_LINE>if (EuclideanDistanc... | .iterDoubleValue(j) * factor); |
1,754,261 | private static Map<TypeAlias, NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, NativeType> m = new EnumMap<TypeAlias<MASK><NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.SSHORT);<NEW_LINE>m.put(TypeAlias.u_int16_... | , NativeType>(TypeAlias.class); |
659,621 | protected void writeArchiveInfoPart(String boundary, CrawlURI curi, ReplayInputStream ris, OutputStream out) throws IOException {<NEW_LINE>// Get things we need to write in this part<NEW_LINE>String uri = curi.toString();<NEW_LINE>String ip = getHostAddress(curi);<NEW_LINE>long headerLength = ris.getHeaderSize();<NEW_L... | = System.currentTimeMillis() / 1000; |
1,071,384 | public static void main(String[] args) {<NEW_LINE>Exercise48_DisjointPaths disjointPaths = new Exercise48_DisjointPaths();<NEW_LINE>Graph graph1 = new Graph(5);<NEW_LINE>graph1.addEdge(0, 1);<NEW_LINE>graph1.addEdge(0, 2);<NEW_LINE>graph1.addEdge(0, 3);<NEW_LINE>graph1.addEdge(1, 4);<NEW_LINE>graph1.addEdge(2, 4);<NEW_... | geNumberOfDisjointPaths(graph1, 0, 4); |
1,409,160 | public InstanceSnapshotInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>InstanceSnapshotInfo instanceSnapshotInfo = new InstanceSnapshotInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | class).unmarshall(context)); |
378,356 | public void recordProceed(String target, String method) throws CompileError {<NEW_LINE>Parser p = new Parser(new Lex(target));<NEW_LINE>final ASTree texpr = p.parseExpression(stable);<NEW_LINE>final String m = method;<NEW_LINE>ProceedHandler h = new ProceedHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void d... | CallExpr.makeCall(expr, args); |
845,224 | public // optional, can get from cookie instead<NEW_LINE>// optional, can get from cookie instead<NEW_LINE>Response // optional, can get from cookie instead<NEW_LINE>resetCredentialsGET(@QueryParam(AUTH_SESSION_ID) String authSessionId, @QueryParam(SESSION_CODE) String code, @QueryParam(Constants.EXECUTION) String exec... | code, execution, clientId, tabId); |
1,662,648 | public InetAddress[] lookupAllHostAddr(String host) throws UnknownHostException {<NEW_LINE>Name name;<NEW_LINE>try {<NEW_LINE>name = new Name(host);<NEW_LINE>} catch (TextParseException e) {<NEW_LINE>throw new UnknownHostException(host);<NEW_LINE>}<NEW_LINE>// avoid asking a dns server (causing a probable timeout) when... | = new InetAddress[records.length]; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.