idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,730,430 | public void updateSystemMessagesLocale(Map<String, String> localeMap) {<NEW_LINE>ApplicationConfiguration conf = getConnection().getConfiguration();<NEW_LINE>ApplicationConfiguration.ErrorMessage communicationError = conf.getCommunicationError();<NEW_LINE>communicationError.setCaption(localeMap<MASK><NEW_LINE>communica... | .get(CubaUIClientRpc.COMMUNICATION_ERROR_CAPTION_KEY)); |
1,710,782 | public File updateAwbDexFile(JarInput jarInput, File output) {<NEW_LINE>boolean localJar = false;<NEW_LINE>if (jarInput.getName().startsWith("android.local.jars")) {<NEW_LINE>localJar = true;<NEW_LINE>}<NEW_LINE>if (localJar) {<NEW_LINE>// todo awb localJars<NEW_LINE>// subproject local<NEW_LINE>}<NEW_LINE>for (AwbTran... | getInputLibraries().remove(currentFile); |
412,595 | public void marshall(ImportComponentRequest importComponentRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (importComponentRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(importComponentReq... | importComponentRequest.getSemanticVersion(), SEMANTICVERSION_BINDING); |
1,303,601 | protected FieldValue doGet(String fieldName, EventWithContext eventWithContext) {<NEW_LINE>if (!lookupTableService.hasTable(config.tableName())) {<NEW_LINE>throw new IllegalArgumentException("Lookup-table doesn't exist: " + config.tableName());<NEW_LINE>}<NEW_LINE>final LookupTableService.Function function = lookupTabl... | tableName()).build(); |
1,420,404 | private ReliabilitySubset createPersistentSubset(Reliability reliability, TransactionCommon tran) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "createPersistentSubset", new Object[] { reliability });<NEW_LINE>ReliabilitySubset subs... | [getIndex(reliability)] = NO_ID; |
1,341,247 | protected IStatus loadAttributes(Object attributes) {<NEW_LINE>if (!(attributes instanceof Object[])) {<NEW_LINE>return createErrorStatus(Messages.AbstractConfigurationProcessor_expectedArrayError + attributes);<NEW_LINE>}<NEW_LINE>Object[] attrArray = (Object[]) attributes;<NEW_LINE>if (attrArray.length == 1 || attrAr... | Object[]) attrArray[0]; |
900,240 | private void updateChildren() {<NEW_LINE>Node newLeft = leftProperty().get();<NEW_LINE>// Remove leftPane in any case<NEW_LINE>getChildren().remove(leftPane);<NEW_LINE>if (newLeft != null) {<NEW_LINE>leftPane = new StackPane(newLeft);<NEW_LINE>leftPane.setManaged(false);<NEW_LINE>leftPane.setAlignment(Pos.CENTER_LEFT);... | getChildren().add(leftPane); |
687,806 | public void forEachMetric(Node node, BiConsumer<PhoneHomeMetrics, String> metricsConsumer) {<NEW_LINE>RestCallCollector collector = node.getTextCommandService().getRestCallCollector();<NEW_LINE>String enabled = node.getConfig().getNetworkConfig().getRestApiConfig().isEnabledAndNotEmpty() ? "1" : "0";<NEW_LINE>metricsCo... | REST_QUEUE_TOTAL_REQUEST_COUNT, collector.getTotalQueueRequestCount()); |
850,458 | private int chooseWorldId(String worldName) throws SQLException {<NEW_LINE>Closer closer = Closer.create();<NEW_LINE>try {<NEW_LINE>Connection conn = closer.register(getConnection());<NEW_LINE>PreparedStatement stmt = closer.register(conn.prepareStatement("SELECT id FROM " + config.getTablePrefix() + "world WHERE name ... | stmt2.setString(1, worldName); |
173,628 | public void recalculateCraftingRecipes() {<NEW_LINE>this.recipes.clear();<NEW_LINE>for (String category : BlueprintCraftingRecipe.recipeCategories) for (BlueprintCraftingRecipe recipe : BlueprintCraftingRecipe.findRecipes(category)) for (int iStack = 0; iStack < stacks.length; iStack++) {<NEW_LINE>ItemStack output = st... | recipe.inputs.length + 2]; |
455,530 | public static synchronized JSFVersion forWebModule(@NonNull final WebModule webModule) {<NEW_LINE>// NOI18N<NEW_LINE>Parameters.notNull("webModule", webModule);<NEW_LINE>JSFVersion version = projectVersionCache.get(webModule);<NEW_LINE>if (version == null) {<NEW_LINE>version = get(webModule, true);<NEW_LINE>ClassPath c... | , get(webModule, true)); |
1,340,208 | public CloseableReference<Bitmap> process(Bitmap sourceBitmap, PlatformBitmapFactory bitmapFactory) {<NEW_LINE>mWidth = sourceBitmap.getWidth();<NEW_LINE>mHeight = sourceBitmap.getHeight();<NEW_LINE>CloseableReference<Bitmap> reference = bitmapFactory.createBitmap(mWidth, mHeight, Bitmap.Config.RGB_565);<NEW_LINE>decod... | sourceBitmap, reference.get()); |
304,557 | public void syncVmIsoSystemTag(String vmUuid) {<NEW_LINE>if (!VmCdRomGlobalProperty.syncVmIsoSystemTag) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>VmSystemTags.ISO.delete(vmUuid);<NEW_LINE>List<VmCdRomVO> cdRomVOS = Q.New(VmCdRomVO.class).eq(VmCdRomVO_.vmInstanceUuid, vmUuid).notNull(VmCdRomVO_.isoUuid).list();<NEW_LINE>if... | cdRomVO.getDeviceId()))); |
837,922 | public Clustering<MeanModel> run(Relation<NumberVector> relation) {<NEW_LINE>final int dim = RelationUtil.dimensionality(relation);<NEW_LINE>CFTree tree = cffactory.newTree(relation.getDBIDs(), relation);<NEW_LINE>// The CFTree does not store points. We have to reassign them (and the<NEW_LINE>// quality is better than ... | HashMap<>(tree.leaves); |
862,759 | private Object convertToParameterValue(final Object value, final String[] parameterType) {<NEW_LINE>if (isSingleType(parameterType)) {<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>if (value instanceof JsonObject && parameterType[0].contains("Map")) {<NEW_LINE>final Map<String, Object> mapValue = GsonUtils.getInstance().c... | mapValue.get(k))); |
369,443 | private void pushLaunchPopup() {<NEW_LINE>Config config = <MASK><NEW_LINE>TelemetryConfig telemetryConfig = config.getTelemetryConfig();<NEW_LINE>TranslationSystem translationSystem = context.get(TranslationSystem.class);<NEW_LINE>TelemetryLogstashAppender appender = TelemetryUtils.fetchTelemetryLogstashAppender();<NEW... | context.get(Config.class); |
1,201,440 | public byte[] decodeMessage() {<NEW_LINE>byte[] data = new byte[12];<NEW_LINE>data[0] = 0x0B;<NEW_LINE>data[1] = LIGHTING2.toByte();<NEW_LINE>data[2] = subType.toByte();<NEW_LINE>data[3] = seqNbr;<NEW_LINE>data[4] = (byte) ((sensorId >> 24) & 0xFF);<NEW_LINE>data[5] = (byte) ((<MASK><NEW_LINE>data[6] = (byte) ((sensorI... | sensorId >> 16) & 0xFF); |
1,501,105 | public void testSLRemoteInterfaceMethod_PassByReference() throws Exception {<NEW_LINE>String inKeyStr = "inKeyStr";<NEW_LINE>String outKeyStr = "outKeyStr";<NEW_LINE>SLRaPassBy inPbr = new SLRaPassBy(inKeyStr, outKeyStr, 3);<NEW_LINE>SLRaPassBy outPbr = fejb1.changePassByParm(inPbr);<NEW_LINE>assertEquals("Test inPbr k... | outPbr.getValue(), 4); |
1,715,575 | private void registerActions(@Nonnull final KeyStroke firstKeyStroke, @Nonnull final List<Pair<AnAction, KeyStroke>> actions, final DataContext ctx) {<NEW_LINE>ContainerUtil.process(actions, pair -> {<NEW_LINE>final String actionText = pair.getFirst().getTemplatePresentation().getText();<NEW_LINE>final AbstractAction a... | registerAction(actionText, keyStroke, a); |
871,852 | public static void main(String[] args) throws Exception {<NEW_LINE>File clientConfig = <MASK><NEW_LINE>System.out.println("Created temporary file: " + clientConfig);<NEW_LINE>if (!clientConfig.exists()) {<NEW_LINE>throw new Exception("Failed to create tmp file");<NEW_LINE>}<NEW_LINE>ClientConfiguration client = new Cli... | File.createTempFile("client", ".xml"); |
790,276 | public void execute() throws CoreException, IOException, MalformedURLException {<NEW_LINE>Logger log = Logger.getLogger(this.getClass().getName());<NEW_LINE>if (log.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>log.// NOI18N<NEW_LINE>log(// NOI18N<NEW_LINE>Level.FINE, "executing GetRepositoryTasksCommand for ta... | taskData.getTaskId(), true); |
986,502 | public void validate() {<NEW_LINE>if (Oem.testmode) {<NEW_LINE>Common.elementsCore.initializeActivity();<NEW_LINE>Common.logger.add(new LogEntry(LogEntry.PB_LOG_WARNING, "Running in test mode, platform validation will be bypassed!"));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// else<NEW_LINE>int loops;<NEW_LINE>for (loops ... | (LogEntry.PB_LOG_INFO, "Device Validation Passed.")); |
71,672 | private int readVarint32() throws TException {<NEW_LINE>int result = 0;<NEW_LINE>int shift = 0;<NEW_LINE>if (trans_.getBytesRemainingInBuffer() >= 5) {<NEW_LINE>byte[] buf = trans_.getBuffer();<NEW_LINE>int pos = trans_.getBufferPosition();<NEW_LINE>int off = 0;<NEW_LINE>while (true) {<NEW_LINE>byte b = buf[pos + off];... | ) (b & 0x7f) << shift; |
109,189 | public AsyncCallFuture<VolumeApiResult> createVolumeFromSnapshot(VolumeInfo volume, DataStore store, SnapshotInfo snapshot) {<NEW_LINE>AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<VolumeApiResult>();<NEW_LINE>try {<NEW_LINE>DataObject <MASK><NEW_LINE>volumeOnStore.processEvent(Event.CreateOnlyRequested... | volumeOnStore = store.create(volume); |
1,608,508 | private // meaning there is no need to create it all<NEW_LINE>boolean finalizePreInitMethod() {<NEW_LINE>// set davaBody...totally redundant but have to do as this is checked by<NEW_LINE>// toString of ASTMethodNode<NEW_LINE>newASTPreInitMethod.setDavaBody(newPreInitDavaBody);<NEW_LINE>// newPreInitDavaBody is the acti... | Stmt s = as.get_Stmt(); |
246,117 | private Pair<Boolean, String> runInstallScriptOnVM(final UserVm vm, final int index) throws Exception {<NEW_LINE>int nodeSshPort = sshPort == 22 ? sshPort : sshPort + index;<NEW_LINE>String nodeAddress = (index > 0 && sshPort == 22) ? vm.getPrivateIpAddress() : publicIpAddress;<NEW_LINE>SshHelper.scpTo(nodeAddress, nod... | (vm.getHypervisorType())); |
1,358,081 | public void processElement(ProcessContext c) throws Exception {<NEW_LINE>ReadableFile file = c.element();<NEW_LINE>InputStream stream = Channels.newInputStream(file.open());<NEW_LINE>try (InputStream tikaStream = TikaInputStream.get(stream)) {<NEW_LINE>Parser parser = tikaConfig == null ? new AutoDetectParser() : new A... | tikaStream, tikaHandler, tikaMetadata, context); |
274,698 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent permanent = game.getPermanent(source.getFirstTarget());<NEW_LINE>if (controller == null || permanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Player opponent = game.ge... | opponent.shuffleLibrary(source, game); |
1,473,997 | protected Reply createReply(Values ret, String serviceName, Trace trace) {<NEW_LINE>Version version = new Version(ret.get(0).asUtf8Array());<NEW_LINE>double retryDelay = ret.get(1).asDouble();<NEW_LINE>int[] errorCodes = ret.get(2).asInt32Array();<NEW_LINE>String[] errorMessages = ret.get(3).asStringArray();<NEW_LINE>S... | get(6).asData(); |
1,633,688 | public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>assertArrayHasMinLengthAndAllElementsNotNull(sources, 2);<NEW_LINE>Date date = null;<NEW_LINE>if (sources[0] instanceof Date) {<NEW_LINE>date = (Date) sources[0];<NEW_LINE>} else... | 0]).longValue()); |
1,199,147 | private void updateVDisplay(boolean next) {<NEW_LINE>if (m_archives == null)<NEW_LINE>m_archives = new MArchive[0];<NEW_LINE>if (next)<NEW_LINE>m_index++;<NEW_LINE>else<NEW_LINE>m_index--;<NEW_LINE>if (m_index >= m_archives.length - 1)<NEW_LINE>m_index = m_archives.length - 1;<NEW_LINE>if (m_index < 0)<NEW_LINE>m_index... | ) + " " + m_archives.length); |
523,173 | public com.amazonaws.services.iotdata.model.MethodNotAllowedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.iotdata.model.MethodNotAllowedException methodNotAllowedException = new com.amazonaws.services.iotdata.model.MethodNotAllowedException(null);<NE... | String currentParentElement = context.getCurrentParentElement(); |
1,785,089 | JournalSegment<E> createSegment(JournalSegmentDescriptor descriptor) {<NEW_LINE>File segmentFile = JournalSegmentFile.createSegmentFile(name, directory, descriptor.id());<NEW_LINE>RandomAccessFile raf;<NEW_LINE>FileChannel channel;<NEW_LINE>try {<NEW_LINE>raf = new RandomAccessFile(segmentFile, "rw");<NEW_LINE>raf.setL... | new JournalSegmentFile(segmentFile), descriptor); |
1,221,324 | final DescribeModelExplainabilityJobDefinitionResult executeDescribeModelExplainabilityJobDefinition(DescribeModelExplainabilityJobDefinitionRequest describeModelExplainabilityJobDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeModelExplainabilityJobDefinitionRequest);<NE... | endClientExecution(awsRequestMetrics, request, response); |
862,435 | public com.squareup.okhttp.Call instrumentGetActiveAndIndicesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>Str... | proceed(chain.request()); |
859,300 | // Enable a disabled key version to be used again.<NEW_LINE>public void enableKeyVersion(String projectId, String locationId, String keyRingId, String keyId, String keyVersionId) throws IOException {<NEW_LINE>// Initialize client that will be used to send requests. This client only<NEW_LINE>// needs to be created once,... | locationId, keyRingId, keyId, keyVersionId); |
1,710,026 | private void importItemFile(@NonNull RemoteFile remoteFile, @NonNull SettingsItem item, boolean forceReadData) {<NEW_LINE>OsmandApplication app = backupHelper.getApp();<NEW_LINE>File tempDir = FileUtils.getTempDir(app);<NEW_LINE>FileInputStream is = null;<NEW_LINE>try {<NEW_LINE>SettingsItemReader<? extends SettingsIte... | "Error reading temp item file " + fileName + ": " + error); |
687,083 | private void startHeadingUpdate() {<NEW_LINE>if (mSensorManager == null || mContext == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SmartLocation.LocationControl locationControl = SmartLocation.with(mContext).location().oneFix().config(LocationParams.BEST_EFFORT);<NEW_LINE>Location currLoc = locationControl.getLastLoca... | , System.currentTimeMillis())); |
26,057 | protected boolean advanceQueue() {<NEW_LINE>if (pq.isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Poll from heap (optimized, hence key and value separate):<NEW_LINE>// Minimum distance to cover<NEW_LINE>mindist = pq.peekKey();<NEW_LINE>if (mindist > threshold) {<NEW_LINE>pq.clear();<NEW_LINE>return false;<N... | distance, entry.getPageID()); |
1,254,616 | public static boolean intersect(BoundingBox bbox, Vector3f center, float radius) {<NEW_LINE>assert Vector3f.isValidVector(center) && Vector3f.isValidVector(bbox.center);<NEW_LINE>// Arvo's algorithm<NEW_LINE>float distSqr = radius * radius;<NEW_LINE>float minX = bbox<MASK><NEW_LINE>float maxX = bbox.center.x + bbox.xEx... | .center.x - bbox.xExtent; |
329,448 | // oidc10<NEW_LINE>protected void processIDTokenTypeHandler() throws OAuthException {<NEW_LINE>String className = _oldconfig.getConfigPropertyValue(OAUTH20_ID_TOKENTYPEHANDLER_CLASSNAME);<NEW_LINE>if (_log.isLoggable(Level.FINEST)) {<NEW_LINE>_log.logp(Level.FINEST, CLASS, "processIDTokenTypeHandler", className);<NEW_L... | Throwable cause = e.getCause(); |
161,186 | public static List<ReassignTopicStatusVO> convert2ReassignTopicStatusVOList(List<ReassignStatus> dtoList) {<NEW_LINE>if (ValidateUtils.isNull(dtoList)) {<NEW_LINE>return new ArrayList<>();<NEW_LINE>}<NEW_LINE>List<ReassignTopicStatusVO> voList = new ArrayList<>();<NEW_LINE>for (ReassignStatus elem : dtoList) {<NEW_LINE... | setClusterId(elem.getClusterId()); |
1,727,615 | public final synchronized HBaseSource splitAtFraction(double fraction) {<NEW_LINE>ByteKey splitKey;<NEW_LINE>try {<NEW_LINE>splitKey = rangeTracker.getRange().interpolateKey(fraction);<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>LOG.info("{}: Failed to interpolate key for fraction {}.", rangeTracker.<MASK><NEW_LIN... | getRange(), fraction, e); |
682,815 | public void expireInvitecodes() {<NEW_LINE>final long now = System.currentTimeMillis();<NEW_LINE>final <MASK><NEW_LINE>final Query query = new Query().setPage(1, Integer.MAX_VALUE).setFilter(CompositeFilterOperator.and(new PropertyFilter(Invitecode.STATUS, FilterOperator.EQUAL, Invitecode.STATUS_C_UNUSED), new Property... | long expired = now - Symphonys.INVITECODE_EXPIRED; |
22,889 | public Info findSplit(Relation<? extends NumberVector> relation, int dims, ArrayModifiableDBIDs sorted, DBIDArrayMIter iter, int left, int right, SortDBIDsBySingleDimension comp) {<NEW_LINE>int bestdim = 0, bestpos = (right - left) >>> 1;<NEW_LINE>double bestscore = Double.NEGATIVE_INFINITY;<NEW_LINE>double[] sum = new... | , j = right - left - 1; |
1,572,959 | public void applyDefinitions(Configuration config) {<NEW_LINE>config.set(CoapConfig.MAX_RESOURCE_BODY_SIZE, DEFAULT_MAX_RESOURCE_SIZE);<NEW_LINE>config.set(CoapConfig.MAX_MESSAGE_SIZE, DEFAULT_BLOCK_SIZE);<NEW_LINE>config.set(CoapConfig.PREFERRED_BLOCK_SIZE, DEFAULT_BLOCK_SIZE);<NEW_LINE>config.set(CoapConfig.MAX_ACTIV... | TLS_HANDSHAKE_TIMEOUT, 30, TimeUnit.SECONDS); |
1,729,994 | public int jump(int[] nums) {<NEW_LINE>if (nums.length == 1) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int steps = 0;<NEW_LINE>List<Integer> stepsList = new ArrayList<>();<NEW_LINE>stepsList.add(0);<NEW_LINE>int maxIndex = 0;<NEW_LINE>while (steps < nums.length - 1 && stepsList.size() > 0) {<NEW_LINE>steps++;<NEW_LINE>L... | tempList = new ArrayList<>(); |
785,213 | private Object handleCustomAction(final ActionContext actionContext, final java.util.Map<String, java.lang.Object> parameters, final EventContext eventContext, final String action) throws FrameworkException {<NEW_LINE>final String dataTarget = (String) parameters.get("structrTarget");<NEW_LINE>if (dataTarget == null) {... | , false, new EvaluationHints()); |
248,325 | private void savePreferences() {<NEW_LINE>// validate port string<NEW_LINE>try {<NEW_LINE>new PortIterator(portsText.getText());<NEW_LINE>} catch (Exception e) {<NEW_LINE>tabFolder.setSelection(portsTabItem);<NEW_LINE>portsText.forceFocus();<NEW_LINE>throw new FetcherException("unparseablePortString", e);<NEW_LINE>}<NE... | .skipBroadcastAddresses = skipBroadcastsCheckbox.getSelection(); |
310,798 | private TbProtoQueueMsg<ToCoreNotificationMsg> toProto(TbSubscription subscription, List<TsKvEntry> updates, boolean ignoreEmptyUpdates) {<NEW_LINE>TbSubscriptionUpdateProto.Builder builder = TbSubscriptionUpdateProto.newBuilder();<NEW_LINE>builder.setSessionId(subscription.getSessionId());<NEW_LINE>builder.setSubscrip... | addData(dataBuilder.build()); |
290,886 | public void deployResource(Object resource, String applicationName, String moduleName) throws Exception {<NEW_LINE>ContextService contextServiceRes = (ContextService) resource;<NEW_LINE>if (contextServiceRes == null) {<NEW_LINE>_logger.log(Level.WARNING, LogFacade.DEPLOY_ERROR_NULL_CONFIG, "ContextService");<NEW_LINE>r... | "], " + " context-info [" + contextInfo + "]"); |
934,549 | private final void initLanguageResources() {<NEW_LINE>languageResources = new TreeMap<String, List<String>>();<NEW_LINE>for (String language : languages) {<NEW_LINE>// opening the corresponding language resource file<NEW_LINE>String path = GrobidProperties.getGrobidHomePath() + "/lexicon/patent/" + language + ".local";... | closeQuietly(ist, isr, dis); |
231,064 | public <T> void visitCtConditional(CtConditional<T> conditional) {<NEW_LINE>BoolExpr conditionExpr = visitCondition(conditional.getCondition(), false);<NEW_LINE>BranchData thenBranchData = visitBranch(conditionExpr, conditional.getThenExpression());<NEW_LINE>Expr thenExpr = currentResult;<NEW_LINE>solver.push();<NEW_LI... | mkITE(conditionExpr, thenExpr, elseExpr); |
786,095 | public boolean installBundleOnDevice(String udid, Path bundlePath) {<NEW_LINE>ProcessExecutorParams processExecutorParams = ProcessExecutorParams.builder().setCommand(ImmutableList.of(deviceHelperPath.toString(), "--json", udid, "install", bundlePath.toString())).build();<NEW_LINE>Set<ProcessExecutor.Option> options = ... | PRINT_STD_OUT, ProcessExecutor.Option.PRINT_STD_ERR); |
1,484,956 | protected double outsideDistance(final DistanceStyle distanceStyle, final double x, final double y, final double z) {<NEW_LINE>final double topDistance = distanceStyle.computeDistance(planetModel, topPlane, x, y, z, bottomPlane, leftPlane, rightPlane);<NEW_LINE>final double bottomDistance = distanceStyle.computeDistanc... | min(LRHCDistance, LLHCDistance))); |
765,573 | private List<MethodRouting> createResourceMethodRouters(final RuntimeResource runtimeResource, final boolean subResourceMode) {<NEW_LINE>final List<MethodRouting> methodRoutings = new ArrayList<>();<NEW_LINE>int i = 0;<NEW_LINE>for (final Resource resource : runtimeResource.getResources()) {<NEW_LINE>final Resource par... | ), createMethodRouter(resourceMethod))); |
745,021 | public void onApplicationEvent(Hippo4jCoreDynamicRefreshEvent threadPoolDynamicRefreshEvent) {<NEW_LINE>BootstrapCoreProperties bindableCoreProperties = threadPoolDynamicRefreshEvent.getBootstrapCoreProperties();<NEW_LINE>boolean isNullFlag = bindableCoreProperties.getJetty() == null && bindableCoreProperties.getUndert... | ThreadPoolParameter beforeParameter = webThreadPoolService.getWebThreadPoolParameter(); |
309,418 | public void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, data);<NEW_LINE>if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {<NEW_LINE>CropImage.ActivityResult result = CropImage.getActivityResult(data);<NEW_LINE>if (resultCode == ... | this, data.getData()); |
966,080 | public static void create(Project project, boolean withProductiveCode) {<NEW_LINE>project.getPluginManager().apply(CheckstylePrecommitPlugin.class);<NEW_LINE>project.getPluginManager().apply(ForbiddenApisPrecommitPlugin.class);<NEW_LINE>project.getPluginManager(<MASK><NEW_LINE>project.getPluginManager().apply(LicenseHe... | ).apply(ForbiddenPatternsPrecommitPlugin.class); |
1,057,700 | public SOAPMessage invoke(SOAPMessage request) {<NEW_LINE>SOAPMessage response = null;<NEW_LINE>try {<NEW_LINE>System.out.println("Incoming Client Request as a SOAPMessage:");<NEW_LINE><MASK><NEW_LINE>String hdrText = request.getSOAPHeader().getTextContent();<NEW_LINE>System.out.println("Incoming SOAP Header:" + hdrTex... | request.writeTo(System.out); |
945,737 | public int onStartCommand(Intent intent, int flags, int startId) {<NEW_LINE>Log.i("coap", "onStartCommand service");<NEW_LINE>executor.execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Configuration config = Configuration.createStandardWithoutFile();<NEW_LINE>CoapServer server ... | .add(new HelloWorldResource()); |
1,692,650 | final AbortDocumentVersionUploadResult executeAbortDocumentVersionUpload(AbortDocumentVersionUploadRequest abortDocumentVersionUploadRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(abortDocumentVersionUploadRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | false), new AbortDocumentVersionUploadResultJsonUnmarshaller()); |
1,182,492 | private WorkflowTrace createFalseStartWorkflow(AliasedConnection connection) {<NEW_LINE>if (config.getHighestProtocolVersion().isTLS13()) {<NEW_LINE>throw new ConfigurationException("The false start workflow is not implemented for TLS 1.3");<NEW_LINE>}<NEW_LINE>WorkflowTrace workflowTrace = this.createHandshakeWorkflow... | (TlsAction) workflowTrace.getLastReceivingAction(); |
46 | public static void main(String[] args) throws Exception {<NEW_LINE>HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();<NEW_LINE>JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();<NEW_LINE>Discovery discovery = new Discovery.Builder(httpTransport, jsonFactory, null).build();<NEW_LINE>... | , projectId, modelId, versionId)); |
1,211,954 | public static void main(String[] args) {<NEW_LINE>// Instantiate a client that will be used to call the service.<NEW_LINE>TextAnalyticsAsyncClient client = new TextAnalyticsClientBuilder().credential(new AzureKeyCredential("{key}")).endpoint("{endpoint}").buildAsyncClient();<NEW_LINE>// The document that needs be analy... | TimeUnit.SECONDS.sleep(5); |
1,676,942 | private void _buildOrionASP(WebSite webSite, boolean secure) throws Exception {<NEW_LINE>String xml = "<?xml version=\"1.0\"?>\n" + "<!DOCTYPE web-site PUBLIC \"Orion Web-site\" " + "\"http://www.orionserver.com/dtds/web-site.dtd\">\n" + "\n" + "<web-site " + (secure ? "secure=\"true\" " : "") + "virtual-hosts=\"" + we... | : "") + ".xml", xml); |
51,445 | public void updateState() {<NEW_LINE>ElroConnectsDeviceHandler handler = getHandler();<NEW_LINE>if (handler == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ElroDeviceStatus elroStatus = getStatus();<NEW_LINE>int batteryLevel = 0;<NEW_LINE>String deviceStatus = this.deviceStatus;<NEW_LINE>if (deviceStatus.length() >= 6)... | updateState(LOW_BATTERY, UnDefType.UNDEF); |
930,409 | private void pushAddServerPopupAndStartEmitter() {<NEW_LINE>AddServerPopup addServerPopup = nuiManager.pushScreen(AddServerPopup.ASSET_URI, AddServerPopup.class);<NEW_LINE>addServerPopup.removeTip();<NEW_LINE>ServerInfo serverInfo;<NEW_LINE>TelemetryConfig telemetryConfig = config.getTelemetryConfig();<NEW_LINE>String ... | setTelemetryServerOwner(item.getOwner()); |
197,733 | private static void runAssertionEventBeanAnnotation(RegressionEnvironment env, EventRepresentationChoice rep) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy(rep.getAnnotationTextWJsonProvided(MyLocalJsonProvidedMyEvent.class) + "@name('schema') @buseventtype @public create schema MyEv... | sendEvent(env, rep, "E1"); |
56,122 | private void saveSettings(Client client, PClient.Builder newClient) {<NEW_LINE>PSettings.Builder newSettings = PSettings.newBuilder();<NEW_LINE>ClientSettings settings = client.getSettings();<NEW_LINE>settings.getBookmarks().forEach(b -> {<NEW_LINE>PBookmark.Builder newBookmark = PBookmark.newBuilder();<NEW_LINE>newBoo... | setUuid(config.getUUID()); |
1,770,056 | public File putFilesIdUpdateSharedLink(String fields, String fileId, FilesFileIdupdateSharedLinkBody body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'fields' is set<NEW_LINE>if (fields == null) {<NEW_LINE>throw new ApiException(400, "Missing the required pa... | localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); |
774,461 | public AnalysisResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AnalysisResult analysisResult = new AnalysisResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | class).unmarshall(context)); |
960,610 | // reserveSpace().<NEW_LINE>long spaceRequired() throws ObjectManagerException {<NEW_LINE>final String methodName = "spaceRequired";<NEW_LINE>if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())<NEW_LINE>trace.entry(this, cclass, methodName);<NEW_LINE>// Assume a worst case of all nodes being full.<NEW_LINE>fin... | = nodesAtThisLevel * getMinimumNodeSize() * 2; |
468,368 | private RecordTemplate sendEventForUpdateAspectResult(@Nonnull final Urn urn, @Nonnull final String aspectName, @Nonnull UpdateAspectResult result) {<NEW_LINE>final <MASK><NEW_LINE>final RecordTemplate updatedValue = result.getNewValue();<NEW_LINE>final SystemMetadata oldSystemMetadata = result.getOldSystemMetadata();<... | RecordTemplate oldValue = result.getOldValue(); |
832,077 | public com.amazonaws.services.cloudcontrolapi.model.ServiceInternalErrorException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.cloudcontrolapi.model.ServiceInternalErrorException serviceInternalErrorException = new com.amazonaws.services.<MASK><NEW_LINE>int o... | cloudcontrolapi.model.ServiceInternalErrorException(null); |
525,065 | public static OpenChannelMessage parse(byte[] data) {<NEW_LINE>ByteBuffer buf = ByteBuffer.wrap(data);<NEW_LINE>int channelType = buf.get(1);<NEW_LINE>int priority = buf.getShort(2);<NEW_LINE>long reliability = buf.getInt(4);<NEW_LINE>int labelLength = buf.getShort(8);<NEW_LINE>int protocolLength = buf.getShort(10);<NE... | ] labelBytes = new byte[labelLength]; |
1,017,005 | public LegalEntitySurvivalProbabilities calibrate(IsdaCreditCurveDefinition curveDefinition, MarketData marketData, ImmutableCreditRatesProvider ratesProvider, ReferenceData refData) {<NEW_LINE>ArgChecker.isTrue(curveDefinition.getCurveValuationDate().equals(ratesProvider<MASK><NEW_LINE>ImmutableList<CdsIndexIsdaCredit... | .getValuationDate()), "ratesProvider and curveDefinition must be based on the same valuation date"); |
560,833 | public Object execute(final Map<Object, Object> iArgs) {<NEW_LINE>final ODatabaseDocumentInternal database = getDatabase();<NEW_LINE>database.checkSecurity(ORule.ResourceGeneric.CLUSTER, "sync", ORole.PERMISSION_UPDATE);<NEW_LINE>if (!(database instanceof ODatabaseDocumentDistributed)) {<NEW_LINE>throw new OCommandExec... | String databaseName = database.getName(); |
1,541,741 | private void buildPanels() {<NEW_LINE>panels = new WizardDescriptor.Panel[importers.length * 2];<NEW_LINE>for (int i = 0; i < importers.length; i++) {<NEW_LINE>ImporterSpreadsheetCSV importer = importers[i];<NEW_LINE>WizardPanel1CSV step1 = new WizardPanel1CSV(importer);<NEW_LINE>WizardPanel2 step2 = new WizardPanel2(i... | jc.putClientProperty("WizardPanel_contentSelectedIndex", i); |
1,661,590 | // ----- private methods -----<NEW_LINE>private static Object evaluateScript(final ActionContext actionContext, final GraphObject entity, final String engineName, final Snippet snippet) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>final Context context = ContextFactory.getContext(engineName, actionContext, entit... | engineName, wrappedScript.toString()); |
28,790 | /*<NEW_LINE>* typedef struct DECLSPEC_ALIGN(16) _CONTEXT { DWORD64 P1Home; DWORD64<NEW_LINE>* P2Home; DWORD64 P3Home; DWORD64 P4Home; DWORD64 P5Home; DWORD64 P6Home;<NEW_LINE>* DWORD ContextFlags; DWORD MxCsr; WORD SegCs; WORD SegDs; WORD SegEs; WORD<NEW_LINE>* SegFs; WORD SegGs; WORD SegSs; DWORD EFlags; DWORD64 Dr0; ... | , reader.readShort())); |
159,588 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// Mapbox access token is configured here. This needs to be called either in your application<NEW_LINE>// object or in the same activity which contains the mapview.<NEW_LINE>Mapbox.getInstance(this, getString(R.st... | setContentView(R.layout.activity_style_zoom_dependent_fill_color); |
1,335,907 | private void init(OutputStream out, String encoding) throws IOException {<NEW_LINE>internalOut = new OutputStreamWriter(out, encoding);<NEW_LINE>// Write the proper BOM if they specified a Unicode encoding.<NEW_LINE>// NOTE: Creating an OutputStreamWriter with encoding "UTF-16" DOES<NEW_LINE>// write out the BOM; "UTF-... | UTF32LE_BOM, 0, UTF32LE_BOM.length); |
1,775,264 | private void gwFieldValueInt64VA(MethodWriterContext mwc, FieldWriter fieldWriter, int OBJECT, int i, boolean jsonb) {<NEW_LINE>MethodWriter mw = mwc.mw;<NEW_LINE>Class<?> fieldClass = fieldWriter.getFieldClass();<NEW_LINE>int FIELD_VALUE = mwc.var(fieldClass);<NEW_LINE>Label endIfNull_ = new Label(), notNull_ = new La... | visitVarInsn(Opcodes.ASTORE, FIELD_VALUE); |
1,314,667 | public <T> QueryTaskFuture<Void> eval(QueryEnvironment<T> env, QueryExpressionContext<T> context, QueryExpression expression, List<Argument> args, Callback<T> callback) {<NEW_LINE>String filterPattern = args.get(0).getWord();<NEW_LINE>try {<NEW_LINE>Pattern.compile(filterPattern);<NEW_LINE>} catch (PatternSyntaxExcepti... | getExpression(), context, callback); |
955,047 | private static void addRemoveIncludingConditionProposal(IInvocationContext context, ASTNode toRemove, ASTNode replacement, Collection<ChangeCorrectionProposal> proposals) {<NEW_LINE>String label = CorrectionMessages.LocalCorrectionsSubProcessor_removeunreachablecode_including_condition_description;<NEW_LINE>AST ast = t... | replace(toRemove, moved, null); |
267,933 | protected void internalReceiveCommand(String itemName, Command command) {<NEW_LINE>if (itemName != null) {<NEW_LINE>SamsungTvBindingProvider provider = findFirstMatchingBindingProvider(<MASK><NEW_LINE>if (provider == null) {<NEW_LINE>logger.warn("Doesn't find matching binding provider [itemName={}, command={}]", itemNa... | itemName, command.toString()); |
559,020 | public void testHandleListClosesLeakedConnectionWhenEJBRemoveIsInvoked() throws Exception {<NEW_LINE>AtomicReference<Connection> conRef = new AtomicReference<Connection>();<NEW_LINE>AtomicReference<Statement> stmtRef = new AtomicReference<Statement>();<NEW_LINE>Executor bean = InitialContext.doLookup("java:global/derby... | Connection con = defaultDataSource.getConnection(); |
547,416 | public InstancePrivateIpAddress unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>InstancePrivateIpAddress instancePrivateIpAddress = new InstancePrivateIpAddress();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOf... | XMLEvent xmlEvent = context.nextEvent(); |
1,605,395 | private static void addImports(CompilationUnit root, ICompilationUnit unit, String[] favourites, ImportRewrite importRewrite, AST ast, ASTRewrite astRewrite, SimpleName node, boolean isMethod) throws JavaModelException {<NEW_LINE>IBinding binding = node.resolveBinding();<NEW_LINE>if (binding != null) {<NEW_LINE>importR... | usedTypeName = importRewrite.addImport(qualifiedTypeName); |
264,405 | public static <T> T create(String baseUrl, final Class<T> service) {<NEW_LINE>Gson gson = new GsonBuilder().setLenient().create();<NEW_LINE>Retrofit retrofit = new Retrofit.Builder().client(getLogClient().addInterceptor(chain -> {<NEW_LINE>Request localRequest = chain.request().newBuilder().addHeader("User-Agent", "Moz... | "Accept:", "text/html").build(); |
524,413 | public static DescribeBgpNetworksResponse unmarshall(DescribeBgpNetworksResponse describeBgpNetworksResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBgpNetworksResponse.setRequestId(_ctx.stringValue("DescribeBgpNetworksResponse.RequestId"));<NEW_LINE>describeBgpNetworksResponse.setPageSize(_ctx.integerValue("Desc... | ("DescribeBgpNetworksResponse.BgpNetworks[" + i + "].VpcId")); |
1,710,750 | public static void disparityToCloud(GrayF32 disparity, GrayU8 mask, DisparityParameters parameters, BoofLambdas.PixXyzConsumer_F64 consumer) {<NEW_LINE>InputSanityCheck.checkSameShape(disparity, mask);<NEW_LINE>final CameraPinhole intrinsic = parameters.pinhole;<NEW_LINE>final double baseline = parameters.baseline;<NEW... | .startIndex + pixY * mask.stride; |
558,794 | public synchronized ObjectName _loadAMXMBeans() {<NEW_LINE>// self-check important MBeans<NEW_LINE>final AMXGlassfish amxg = AMXGlassfish.DEFAULT;<NEW_LINE>final MBeanListener<MyListener> bootAMXListener = amxg.listenForBootAMX<MASK><NEW_LINE>final MBeanListener<MyListener> domainRootListener = amxg.listenForDomainRoot... | (mMBeanServer, new MyListener()); |
1,737,389 | static DependencyLink read(ReadBuffer buffer) {<NEW_LINE>DependencyLink.<MASK><NEW_LINE>ThriftField thriftField;<NEW_LINE>while (true) {<NEW_LINE>thriftField = ThriftField.read(buffer);<NEW_LINE>if (thriftField.type == TYPE_STOP)<NEW_LINE>break;<NEW_LINE>if (thriftField.isEqualTo(PARENT)) {<NEW_LINE>result.parent(buffe... | Builder result = DependencyLink.newBuilder(); |
1,687,075 | public DoubleColumnStatisticsData unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DoubleColumnStatisticsData doubleColumnStatisticsData = new DoubleColumnStatisticsData();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | JsonToken token = context.getCurrentToken(); |
893,698 | public static String dateTimeConvert(String timeValueStr, String inputFormatStr, String outputFormatStr, String outputGranularityStr) {<NEW_LINE>long timeValueMs = new DateTimeFormatSpec(inputFormatStr).fromFormatToMillis(timeValueStr);<NEW_LINE>DateTimeFormatSpec outputFormat = new DateTimeFormatSpec(outputFormatStr);... | long roundedTimeValueMs = timeValueMs / granularityMs * granularityMs; |
1,360,832 | public void testZeroOrNegativeIntervals(HttpServletRequest request, PrintWriter out) throws Exception {<NEW_LINE>try {<NEW_LINE>Future<?> status = scheduler.scheduleAtFixedRate(new SharedCounterTask(), 10, 0, TimeUnit.HOURS);<NEW_LINE>throw new Exception("scheduleAtFixedRate(negative interval) should fail. Instead: " +... | 11, 0, TimeUnit.DAYS); |
1,408,133 | public void run(RegressionEnvironment env) {<NEW_LINE>EPStatementObjectModel model = new EPStatementObjectModel();<NEW_LINE>model.<MASK><NEW_LINE>FromClause fromClause = FromClause.create(FilterStream.create("SupportBean_A", "streamA").addView(View.create("length", Expressions.constant(3))), FilterStream.create("Suppor... | setSelectClause(SelectClause.createWildcard()); |
1,780,751 | public void requestPermission(final String permission, final Promise promise) {<NEW_LINE>if (permission == null || !permissionExists(permission)) {<NEW_LINE>promise.resolve(UNAVAILABLE);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Context context = getReactApplicationContext().getBaseContext();<NEW_LINE>if (Build.VERSION.SDK_... | promise.reject(ERROR_INVALID_ACTIVITY, e); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.