idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,305,765 | public void mainFunction(String[] args) throws Exception {<NEW_LINE>String[] leftOverArgs = processLocalArgs(args);<NEW_LINE>Properties startupProps = DatabusHttpClientImpl.processCommandLineArgs(leftOverArgs);<NEW_LINE>DatabusHttpClientImpl.Config clientConfigBuilder = new DatabusHttpClientImpl.Config();<NEW_LINE>clie... | .StaticConfig>("databus.client.", clientConfigBuilder); |
349,469 | public static DLMetadata deserialize(URI uri, byte[] data) throws IOException {<NEW_LINE>String metadata = new String(data, UTF_8);<NEW_LINE><MASK><NEW_LINE>BufferedReader br = new BufferedReader(new StringReader(metadata));<NEW_LINE>String versionLine = br.readLine();<NEW_LINE>if (null == versionLine) {<NEW_LINE>throw... | LOG.debug("Parsing dl metadata {}.", metadata); |
5,358 | protected void writeServiceTaskAdditionalAttributes(ServiceTask element, XMLStreamWriter xtw) throws Exception {<NEW_LINE>ServiceTask serviceTask = element;<NEW_LINE>if (ImplementationType.IMPLEMENTATION_TYPE_CLASS.equals(serviceTask.getImplementationType())) {<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_SERVICE_CL... | writeQualifiedAttribute(ATTRIBUTE_TASK_SERVICE_USE_LOCAL_SCOPE_FOR_RESULT_VARIABLE, "true", xtw); |
1,082,549 | public ArtifactLocation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ArtifactLocation artifactLocation = new ArtifactLocation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentT... | String currentParentElement = context.getCurrentParentElement(); |
1,307,922 | public Object beginNativeGraphicsAccess() {<NEW_LINE>if (nativeGraphicsState != null) {<NEW_LINE>throw new IllegalStateException("beginNativeGraphicsAccess invoked twice in a row");<NEW_LINE>}<NEW_LINE>Boolean a = Boolean.FALSE, b = Boolean.FALSE;<NEW_LINE>if (isAntiAliasedText()) {<NEW_LINE>b = Boolean.TRUE;<NEW_LINE>... | ()), a, b }; |
1,343,698 | public void onFailure(Throwable t) {<NEW_LINE>if (t instanceof RejectedExecutionException) {<NEW_LINE>// client has been shutdown<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// record failure<NEW_LINE>if (cleanupBackoff.failure()) {<NEW_LINE>logError(t, "Unable to %s task at %s", action, request.getUri());<NEW_LINE>// Update ... | long delayMills = cleanupBackoff.getBackoffDelayMills(); |
1,557,502 | public synchronized Restlet createInboundRoot() {<NEW_LINE>Router router = new Router(getContext());<NEW_LINE>getContext().getAttributes().put(ClientManager.class.getName(), OAuth2Sample.getClientManager());<NEW_LINE>getContext().getAttributes().put(TokenManager.class.getName(), OAuth2Sample.getTokenManager());<NEW_LIN... | router.attach("", resources); |
1,714,346 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>overrideSwipeFromAnywhere();<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>applyColorTheme();<NEW_LINE>setContentView(R.layout.activity_createmulti);<NEW_LINE>setupAppBar(R.id.toolbar, "", true, true);<NEW_LINE>findViewById(R.id.add).setOnClickListen... | getExtras().getString(EXTRA_MULTI); |
1,082,835 | public Object compute(Object[] args, ExecutionContext ec) {<NEW_LINE>if (args.length != 1 && args.length != 2) {<NEW_LINE>throw JsonParserException.wrongParamCount(getFunctionNames()[0]);<NEW_LINE>}<NEW_LINE>// Returns NULL if any argument is NULL<NEW_LINE>for (Object arg : args) {<NEW_LINE>if (arg == null) {<NEW_LINE>... | throw new JsonParserException(e, "Invalid JSON path expression."); |
863,355 | private void updateColorItem(TableItem tableItem) {<NEW_LINE>DBVColorOverride co = (DBVColorOverride) tableItem.getData();<NEW_LINE>String text;<NEW_LINE>Object[] values = co.getAttributeValues();<NEW_LINE>if (ArrayUtils.isEmpty(values)) {<NEW_LINE>text = co.getOperator().getExpression() + " ?";<NEW_LINE>} else if (val... | "In " + Arrays.toString(values); |
1,122,777 | private void updateRedisMaster() throws ResourceNotFoundException {<NEW_LINE>List<RedisTbl> toUpdate = new LinkedList<>();<NEW_LINE>MigrationCluster migrationCluster = getHolder();<NEW_LINE>RedisService redisService = migrationCluster.getRedisService();<NEW_LINE>String fromDc = migrationCluster.fromDc();<NEW_LINE><MASK... | String destDc = migrationCluster.destDc(); |
1,685,249 | final TagOpenIDConnectProviderResult executeTagOpenIDConnectProvider(TagOpenIDConnectProviderRequest tagOpenIDConnectProviderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagOpenIDConnectProviderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | (super.beforeMarshalling(tagOpenIDConnectProviderRequest)); |
146,484 | private MethodTree createHashCodeMethod(WorkingCopy wc, DeclaredType type) {<NEW_LINE>TreeMaker make = wc.getTreeMaker();<NEW_LINE>Set<Modifier> mods = EnumSet.of(Modifier.PUBLIC);<NEW_LINE>// Used in test code<NEW_LINE>Integer number = refactoring.getContext().lookup(Integer.class);<NEW_LINE>int startNumber;<NEW_LINE>... | make.Identifier("hash"))); |
1,066,344 | private void createYearColumn(TableViewer records, TableColumnLayout layout, LocalDate start, int index) {<NEW_LINE>ToLongFunction<PaymentsViewModel.Line> valueFunction = line -> {<NEW_LINE>long value = 0;<NEW_LINE>for (int ii = index; ii < index + 12 && ii < line.getNoOfMonths(); ii++) <MASK><NEW_LINE>return value;<NE... | value += line.getValue(ii); |
214,567 | public void login() throws LoginException {<NEW_LINE>// building the first one in the current thread ensures that LoginException and IllegalArgumentException can be thrown on login<NEW_LINE>JDAImpl jda = null;<NEW_LINE>try {<NEW_LINE>final int shardId = this.queue.isEmpty() ? 0 : this.queue.peek();<NEW_LINE><MASK><NEW_... | jda = this.buildInstance(shardId); |
169,102 | protected void scripts() {<NEW_LINE>for (Field field : encryptedFields) {<NEW_LINE>String className = field.getDeclaringClass().getSimpleName();<NEW_LINE>List<String> uuids = sql(String.format("select uuid from %s", className)).list();<NEW_LINE>for (String uuid : uuids) {<NEW_LINE>String encryptedString = sql(String.fo... | , uuid)).find(); |
1,158,831 | protected void execute() {<NEW_LINE>// the frequently executed code (polling) goes here ...<NEW_LINE>logger.trace("execute() method is called!");<NEW_LINE>// restart communicator (=rebuild RWE binding data), if there was no communication for a time (default: 5 min)<NEW_LINE>long timeSinceLastEvent = (System.currentTime... | ().get(key)); |
941,034 | public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception {<NEW_LINE>if (reader.getLocalName().equalsIgnoreCase(XmlElementNames.UserId)) {<NEW_LINE>this.userId = new UserId();<NEW_LINE>this.userId.loadFromXml(reader, reader.getLocalName());<NEW_LINE>return true;<NEW_LINE>} else if (reader.getLoc... | reader.readValue(Boolean.class); |
400,988 | public FindMatchesTaskRunProperties unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FindMatchesTaskRunProperties findMatchesTaskRunProperties = new FindMatchesTaskRunProperties();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentPar... | class).unmarshall(context)); |
1,229,279 | public void run() {<NEW_LINE>MulticastSocket socket;<NEW_LINE>InetAddress broadcastAddress;<NEW_LINE>try {<NEW_LINE>socket = new MulticastSocket(4445);<NEW_LINE>socket.setSoTimeout(5000);<NEW_LINE>socket.joinGroup(broadcastAddress = InetAddress.getByName("224.0.2.60"));<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.l... | Level.WARNING, "Failed to leave multicast listening group", e); |
1,543,572 | public void run() {<NEW_LINE>try {<NEW_LINE>begin.await();<NEW_LINE>for (int i = 0; i < requests; i++) {<NEW_LINE>metrics.completeRequestsIncrement();<NEW_LINE><MASK><NEW_LINE>final String globalTxId = id_prefix + "-" + i;<NEW_LINE>final String localTxId_1 = UUID.randomUUID().toString();<NEW_LINE>final String localTxId... | long s = System.currentTimeMillis(); |
981,662 | private List<IncidentInstance> doGetIncidents(String appId, String appInstanceId, String appComponentName, String appComponentInstanceId, Integer incidentTypeId, Long startTimestamp, Long endTimestamp, boolean selfHealing) {<NEW_LINE>List<CommonDefinition> definitions = getDefs(<MASK><NEW_LINE>if (CollectionUtils.isEmp... | appId, appComponentName, Constant.INCIDENT); |
370,306 | final UpdateRegexPatternSetResult executeUpdateRegexPatternSet(UpdateRegexPatternSetRequest updateRegexPatternSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateRegexPatternSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
195,770 | public void marshall(EmailTemplateResponse emailTemplateResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (emailTemplateResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>proto... | emailTemplateResponse.getArn(), ARN_BINDING); |
53,631 | private MultiPoint readMultiPointText(StreamTokenizer tokenizer, EnumSet<Ordinate> ordinateFlags) throws IOException, ParseException {<NEW_LINE>String nextToken = getNextEmptyOrOpener(tokenizer);<NEW_LINE>if (nextToken.equals(WKTConstants.EMPTY)) {<NEW_LINE>return geometryFactory.<MASK><NEW_LINE>}<NEW_LINE>// check for... | createMultiPoint(new Point[0]); |
1,821,341 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>if (resultCode == RESULT_OK) {<NEW_LINE>int id = data.getIntExtra(SelectActivity.INTENT_EXTRA_ID, 0);<NEW_LINE>String name = data.getStringExtra(SelectActivity.INTENT_EXTRA_NAME);<NEW_LINE>String value = <MASK><NEW_LINE>switch(id) ... | data.getStringExtra(SelectActivity.INTENT_EXTRA_VALUE); |
1,329,244 | private SubTaskGroup createRootVolumeCreationTasks(List<NodeDetails> nodes) {<NEW_LINE>Map<UUID, List<NodeDetails>> rootVolumesPerAZ = nodes.stream().collect(Collectors.groupingBy<MASK><NEW_LINE>SubTaskGroup subTaskGroup = getTaskExecutor().createSubTaskGroup("CreateRootVolumes", executor);<NEW_LINE>rootVolumesPerAZ.fo... | (n -> n.azUuid)); |
1,831,862 | private PagedFlux<PrivateDnsRecordSet> listRecordSetsInternAsync(String recordSetSuffix, Integer pageSize) {<NEW_LINE>final PrivateDnsZoneImpl self = this;<NEW_LINE>return PagedConverter.mapPage(manager().serviceClient().getRecordSets().listAsync(resourceGroupName(), name(), pageSize, recordSetSuffix), recordSetInner -... | name(), self, recordSetInner); |
349,208 | private void save(ServerIntFloatRow row, PSMatrixSaveContext saveContext, MatrixPartitionMeta meta, DataOutputStream out) throws IOException {<NEW_LINE>int startCol = (int) meta.getStartCol();<NEW_LINE>IntFloatVector vector = ServerRowUtils.getVector(row);<NEW_LINE>if (vector.isDense()) {<NEW_LINE>float[] data = vector... | .writeFloat(data[i]); |
1,706,653 | public String saveProduct(@ModelAttribute Product product, BindingResult binding, @RequestParam(name = "image", required = false) MultipartFile image, Model model, final RedirectAttributes redirectAttributes) {<NEW_LINE>String view = null;<NEW_LINE>if (product.getName() == null || product.getName().isEmpty()) {<NEW_LIN... | ("product", "name", "Product already exists")); |
302,941 | protected void jbInit() throws Exception {<NEW_LINE>// this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);<NEW_LINE>mainPanel.setLayout(new java.awt.BorderLayout());<NEW_LINE>setLayout(new java.awt.BorderLayout());<NEW_LINE>southPanel.setLayout(southLayout);<NEW_LINE>southPanel.add(confirmPanel, BorderLayout.CENTER... | class.getResource("images/Calculator16.gif"))); |
841,797 | public static String createproject(String category, String project, boolean wait) {<NEW_LINE>// select Projects tab<NEW_LINE>ProjectsTabOperator.invoke();<NEW_LINE>// create a project<NEW_LINE>NewProjectWizardOperator wizard = NewProjectWizardOperator.invoke();<NEW_LINE>wizard.selectCategory(category);<NEW_LINE>wizard.... | ).typeText(getTempDir()); |
1,121,792 | final ListExecutionsResult executeListExecutions(ListExecutionsRequest listExecutionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listExecutionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,334,604 | public static void reformat(DataObject dob) {<NEW_LINE>try {<NEW_LINE>EditorCookie ec = dob.getLookup().lookup(EditorCookie.class);<NEW_LINE>if (ec == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final StyledDocument doc = ec.openDocument();<NEW_LINE>final Reformat <MASK><NEW_LINE>reformat.lock();<NEW_LINE>try {<NEW_LI... | reformat = Reformat.get(doc); |
24,691 | public void showIssue(final Issue issue) {<NEW_LINE>setToolbarTitle(getString(R.string.issue).concat(" #").concat(String.valueOf(issue.getNumber())));<NEW_LINE>GlideApp.with(getActivity()).load(issue.getUser().getAvatarUrl()).onlyRetrieveFromCache(!PrefUtils.isLoadImageEnable()).into(userImageView);<NEW_LINE>issueTitle... | .getLoggedUser().getLogin(); |
793,032 | public void reloadForm() {<NEW_LINE>Form currentForm = Display.getInstance().getCurrent();<NEW_LINE>Command backCommand = currentForm.getBackCommand();<NEW_LINE>Form newForm = (Form) createContainer(fetchResourceFile(), currentForm.getName());<NEW_LINE>newForm.setSourceCommand(currentForm.getSourceCommand());<NEW_LINE>... | setTransitionInAnimator(CommonTransitions.createEmpty()); |
1,124,623 | public static final int writeJSONString(OutputStream os, Object object, SerializeFilter[] filters, SerializerFeature... features) throws IOException {<NEW_LINE>try (JSONWriter jsonWriter = JSONWriter.ofUTF8()) {<NEW_LINE>JSONWriter.Context context = jsonWriter.getContext();<NEW_LINE>jsonWriter.setRootObject(object);<NE... | object, null, null, 0); |
875,199 | protected <T extends RemoteFile> Map<String, T> addAndFilterFilesInTransaction(Class<T> remoteFileClass, Map<String, T> remoteFiles) throws StorageException {<NEW_LINE>Map<String, T> filteredFiles = new HashMap<String, T>();<NEW_LINE>Set<TransactionTO> transactions = new HashSet<TransactionTO>();<NEW_LINE>Set<RemoteFil... | concreteDeletedFile.getName(), concreteDeletedFile); |
1,547,022 | private static SparqlComponent possibleSparqlValidator(Graph shapesGraph, Node valNode, List<Parameter> params, /* for reporting */<NEW_LINE>Node constraintComponentNode) {<NEW_LINE>// Check for SHACL-JS<NEW_LINE>Node xJSFunctionName = G.getZeroOrOneSP(shapesGraph, valNode, SHACL.jsFunctionName);<NEW_LINE>if (xJSFuncti... | ("SparqlConstraintComponent: Multiple SPARQL queries: " + displayStr(constraintComponentNode)); |
35,653 | public void onCreate() {<NEW_LINE>this.startForegroundIfConfigured();<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {<NEW_LINE>bluetoothCrashResolver = new BluetoothCrashResolver(this);<NEW_LINE>bluetoothCrashResolver.start();<NEW_LINE>}<NEW_LINE>mScanHelper = new ScanHelper(this);<NEW_LINE>if (mSc... | LogManager.d(TAG, "No org.altbeacon.beacon.SimulatedScanData class exists."); |
1,441,738 | private static CodegenExpression makeCopyMethods(Map<EventTypeSPI, EventBeanCopyMethodForge> copyMethods, CodegenMethodScope parent, SAIFFInitializeSymbol symbols, CodegenClassScope classScope) {<NEW_LINE>if (copyMethods.isEmpty()) {<NEW_LINE>return staticMethod(Collections.class, "emptyMap");<NEW_LINE>}<NEW_LINE>Codeg... | ), "put", type, copyMethod); |
113,671 | private void sendData(Map.Entry<String, byte[]> entry, String session) throws IOException {<NEW_LINE>HttpURLConnection connection;<NEW_LINE>log.info("Sending " + entry.getKey());<NEW_LINE>connection = (HttpURLConnection) new URL(url + "/" + entry.getKey()).openConnection();<NEW_LINE>connection.setRequestMethod("PUT");<... | , Integer.toString(currentSessionCounter)); |
257,855 | public boolean processCommandLineArgs(String[] cliArgs) throws IOException, DatabusException {<NEW_LINE>CommandLineParser cliParser = new GnuParser();<NEW_LINE>_cmd = null;<NEW_LINE>try {<NEW_LINE>_cmd = <MASK><NEW_LINE>} catch (ParseException pe) {<NEW_LINE>System.err.println(NAME + ": failed to parse command-line opt... | cliParser.parse(_cliOptions, cliArgs); |
1,140,484 | /*<NEW_LINE>* Only retained for use by AlteredParts<NEW_LINE>*/<NEW_LINE>@Deprecated<NEW_LINE>private static org.w3c.dom.Document marshaltoW3CDomDocument(Object o, JAXBContext jc, String ignorables) {<NEW_LINE>try {<NEW_LINE>Marshaller marshaller = jc.createMarshaller();<NEW_LINE>NamespacePrefixMapperUtils.setProperty(... | parse(new ByteArrayInputStream(bytes)); |
450,180 | private CompletableFuture<Void> doCumulativeAck(MessageIdImpl messageId, Map<String, Long> properties, BitSetRecyclable bitSet) {<NEW_LINE>consumer.getStats().incrementNumAcksSent(consumer.getUnAckedMessageTracker().removeMessagesTill(messageId));<NEW_LINE>if (acknowledgementGroupTimeMicros == 0 || (properties != null ... | .readLock().unlock(); |
1,179,005 | public void onChanged(Spannable aUrl) {<NEW_LINE>String url = aUrl.toString();<NEW_LINE>if (isLibraryVisible.getValue().get()) {<NEW_LINE>url = getApplication().getString(R.string.url_library_title);<NEW_LINE>} else {<NEW_LINE>if (UrlUtils.isPrivateAboutPage(getApplication(), url) || (UrlUtils.isDataUri(url) && isPriva... | getString(R.string.web_extensions_title); |
1,723,422 | private void createSendLink(SenderLinkSettings linkSettings) {<NEW_LINE>TRACE_LOGGER.info("Creating send link to '{}'", this.sendPath);<NEW_LINE>Connection connection <MASK><NEW_LINE>if (connection == null) {<NEW_LINE>// Connection closed after sending CBS token. Happens only in the rare case of azure service bus closi... | = this.underlyingFactory.getActiveConnectionOrNothing(); |
185,372 | final AssociateSubnetsResult executeAssociateSubnets(AssociateSubnetsRequest associateSubnetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateSubnetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Network Firewall"); |
217,064 | public static UUID fromId(final int id) {<NEW_LINE>final byte[] data = ByteBuffer.allocate(16).putInt(id).array();<NEW_LINE>// System.out.println("data=" + toString(data));<NEW_LINE>data[6] &= 0x0f;<NEW_LINE>data[8] &= 0x3f;<NEW_LINE>// System.out.println("data=" + toString(data));<NEW_LINE>long msb = 0;<NEW_LINE>long ... | 8 | data[i] & 0xff; |
766,612 | public MediaCodec.BufferInfo readSampleData(ByteBuffer buffer) {<NEW_LINE>MediaCodec.BufferInfo <MASK><NEW_LINE>mAdvancer.readSampleData(bufferInfo, buffer, 0);<NEW_LINE>// Log.v(TAG, String.format(Locale.ENGLISH, "read[%d] size: %d, time: %d, flags: %d",<NEW_LINE>// mTrackIndex, bufferInfo.size, bufferInfo.presentatio... | bufferInfo = new MediaCodec.BufferInfo(); |
1,722,516 | final ListWorkspacesResult executeListWorkspaces(ListWorkspacesRequest listWorkspacesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listWorkspacesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListWorkspacesRequest> request = nu... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
369,859 | public static DescribeExposedStatisticsDetailResponse unmarshall(DescribeExposedStatisticsDetailResponse describeExposedStatisticsDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeExposedStatisticsDetailResponse.setRequestId(_ctx.stringValue("DescribeExposedStatisticsDetailResponse.RequestId"));<NEW_LINE>Pag... | (_ctx.integerValue("DescribeExposedStatisticsDetailResponse.PageInfo.CurrentPage")); |
1,557,184 | private ClassPath remapClasses(File genericClassesDir, RemappingScriptSource source) {<NEW_LINE>ScriptSource origin = source.getSource();<NEW_LINE>String className = origin.getClassName();<NEW_LINE>return classpathTransformer.transform(DefaultClassPath.of(genericClassesDir), BuildLogic, new CachedClasspathTransformer.T... | ] content = entry.getContent(); |
597,493 | public int compare(CssPropertySignature a, CssPropertySignature b) {<NEW_LINE>if (a == b) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>Class<?> aClass = a.getClass();<NEW_LINE>Class<?> bClass = b.getClass();<NEW_LINE>if (aClass != bClass) {<NEW_LINE>return aClass.getName().compareTo(bClass.getName());<NEW_LINE>}<NEW_LINE><... | Object aValue = a.getValue(); |
1,085,328 | private static FileObject createSeleniumTestFile(Selenium2SupportImpl selenium2Support, FileObject targetFolder, String targetName) {<NEW_LINE>try {<NEW_LINE>FileObject dir = targetFolder;<NEW_LINE>String name = targetName.replace('.', '/');<NEW_LINE>int index = name.lastIndexOf('/');<NEW_LINE>String pkg = index > -1 ?... | FileUtil.createFolder(targetFolder, pkg); |
566,070 | private JsonRequestBPartnerLocationAndContact addMunicipalityInvoiceRecipient(@NonNull final BodyType body, @NonNull final HighLevelContext context) {<NEW_LINE>// the guarantor is the municipality who gets the invoice<NEW_LINE>final GuarantorAddressType guarantor = getGuarantor(body);<NEW_LINE>final NameAndPostal guara... | final JsonRequestBPartner bPartner = new JsonRequestBPartner(); |
1,048,620 | public void exportElement(JRGraphics2DExporterContext exporterContext, JRGenericPrintElement element, Graphics2D grx, Offset offset) {<NEW_LINE>try {<NEW_LINE>JRPrintText labelPrintText = (JRPrintText) element.getParameterValue(IconLabelElement.PARAMETER_LABEL_TEXT_ELEMENT);<NEW_LINE>if (// FIXMEINPUT deal with xml ser... | .getDrawVisitor().getFrameDrawer(); |
602,650 | public void revert(final Path file) throws BackgroundException {<NEW_LINE>if (file.isFile()) {<NEW_LINE>try {<NEW_LINE>final S3Object destination = new S3Object(containerService.getKey(file));<NEW_LINE>// Keep same storage class<NEW_LINE>destination.setStorageClass(file.attributes().getStorageClass());<NEW_LINE>final E... | map("Cannot revert file", e, file); |
849,735 | public static void registerType(ModelBuilder modelBuilder) {<NEW_LINE>ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Relationship.class, CMMN_ELEMENT_RELATIONSHIP).namespaceUri(CMMN11_NS).extendsType(CmmnElement.class).instanceProvider(new ModelTypeInstanceProvider<Relationship>() {<NEW_LINE><NEW_LINE>pu... | minOccurs(1).build(); |
1,107,929 | public static SSLConnectionSocketFactory buildSSLSocketFactory(final WebClientOptions options) {<NEW_LINE>try {<NEW_LINE>final String[] sslClientProtocols = options.getSSLClientProtocols();<NEW_LINE>final String[] sslClientCipherSuites = options.getSSLClientCipherSuites();<NEW_LINE>final boolean useInsecureSSL = option... | KeyStore keyStore = options.getSSLClientCertificateStore(); |
378,863 | public List<UserTrade> trades(Integer limit, Long offset, Collection<CurrencyPair> currencyPairs) {<NEW_LINE>List<String> markets = new ArrayList<>();<NEW_LINE>for (CurrencyPair currencyPair : currencyPairs) {<NEW_LINE>markets.add(ExmoAdapters.format(currencyPair));<NEW_LINE>}<NEW_LINE>Map<String, List<Map<String, Stri... | , ","), offset, limit); |
849,333 | public Status transferLeader(final String groupId, final Configuration conf, final PeerId peer) {<NEW_LINE>Requires.requireTrue(!StringUtils.isBlank(groupId), "Blank group id");<NEW_LINE>Requires.requireNonNull(conf, "Null configuration");<NEW_LINE>Requires.requireNonNull(peer, "Null peer");<NEW_LINE>final PeerId leade... | ), null).get(); |
935,635 | public ParcelFileDescriptor openFile(Uri uri, String mode, CancellationSignal signal) throws FileNotFoundException {<NEW_LINE>Log.d(Config.LOGTAG, <MASK><NEW_LINE>String path = uri.getPath();<NEW_LINE>if (path != null && path.endsWith(".png") && path.length() >= 5) {<NEW_LINE>String jid = path.substring(1).substring(0,... | "opening file with uri (normal): " + uri.toString()); |
1,055,673 | protected Node createControl() {<NEW_LINE>Calendar meetings = new Calendar("Meetings");<NEW_LINE>Calendar training = new Calendar("Training");<NEW_LINE>Calendar customers = new Calendar("Customers");<NEW_LINE>Calendar holidays = new Calendar("Holidays");<NEW_LINE>meetings.setStyle(Style.STYLE2);<NEW_LINE><MASK><NEW_LIN... | training.setStyle(Style.STYLE3); |
1,571,910 | protected void executeShardAction(ActionListener<MultiGetResponse> listener, AtomicArray<MultiGetItemResponse> responses, Map<ShardId, MultiGetShardRequest> shardRequests) {<NEW_LINE>final AtomicInteger counter = new AtomicInteger(shardRequests.size());<NEW_LINE>for (final MultiGetShardRequest shardRequest : shardReque... | .get(i), itemResponse); |
1,622,303 | public void updateUserInfo(final String userId) {<NEW_LINE>if (!getUserVisibleHint()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (getActivity() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (getActivity() != null) {<NEW_LINE>this.getActivity().runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>pub... | index - linearLayoutManager.findFirstVisibleItemPosition()); |
791,103 | private void exportKeys(SignatureVerificationService signatureVerificationService, DependencyVerifier verifier) throws IOException {<NEW_LINE>BuildTreeDefinedKeys keys = isDryRun ? keyrings.dryRun() : keyrings;<NEW_LINE>Set<String> keysToExport = Sets.newHashSet();<NEW_LINE>verifier.getConfiguration().getTrustedKeys().... | ).forEach(keysToExport::add); |
1,361,678 | protected void processSimpleContent(SchemaRep.SimpleContent el) throws Schema2BeansException {<NEW_LINE>processContainsSubElements(el);<NEW_LINE>// System.out.println("lastDefinedType="+lastDefinedType);<NEW_LINE>if (lastDefinedType == null)<NEW_LINE>return;<NEW_LINE>SchemaRep.ElementExpr schemaTypeDef = schema.getSche... | parentTypes.peek(), schemaTypeDef); |
1,733,556 | protected void exportToJSONObject(JSONObject res) throws IOException {<NEW_LINE>super.exportToJSONObject(res);<NEW_LINE>MapUtils.exportJSONURL(res, "searchURL", searchURLFormat);<NEW_LINE>if (timeZone != null) {<NEW_LINE>res.put("timezone", timeZone);<NEW_LINE>}<NEW_LINE>if (downloadLinkCSS != null) {<NEW_LINE>MapUtils... | exportJSONURL(res, "download_link", downloadLinkCSS); |
368,561 | private static void generateVerbs() {<NEW_LINE>System.out.println("Generating Verbs.");<NEW_LINE>String[] positiveNegatives = { "", "Neg" };<NEW_LINE>String[] times = { "Imp", "Aor", "Past", "Prog1", "Prog2", "Narr", "Fut" };<NEW_LINE>String[] persons = { "A1sg", "A2sg", "A3sg", "A1pl", "A2pl", "A3pl" };<NEW_LINE>Turki... | collect(Collectors.toList()); |
984,980 | public void run() {<NEW_LINE>if (mPendingPKReq == true || mIsBeingPK) {<NEW_LINE>mActivityInterface.getLiveRoom().responseJoinAnchor(anchorInfo.userID, false, getString(R.string.mlvb_connection_wait_pk));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (mPendingLinkMicReq == true) {<NEW_LINE>mActivityInterface.getLiveRoom().re... | AlertDialog alertDialog = builder.create(); |
729,052 | public void replayAddBackend(Backend newBackend) {<NEW_LINE>// update idToBackend<NEW_LINE>if (Catalog.getCurrentCatalogJournalVersion() < FeMetaVersion.VERSION_30) {<NEW_LINE>newBackend.setOwnerClusterName(DEFAULT_CLUSTER);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Map<Long, Backend> copiedBackends = Maps.newHashMap(idToBac... | newBackend.setBackendState(BackendState.using); |
8,261 | public PhysicalResourceId unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PhysicalResourceId physicalResourceId = new PhysicalResourceId();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.get... | String currentParentElement = context.getCurrentParentElement(); |
713,944 | private Map<String, String> refreshProperties() {<NEW_LINE>Map<String, String> properties = new HashMap<>();<NEW_LINE>Bridge bridge = getBridge();<NEW_LINE>if (bridge != null) {<NEW_LINE>ElectroluxAirBridgeHandler bridgeHandler = (ElectroluxAirBridgeHandler) bridge.getHandler();<NEW_LINE>if (bridgeHandler != null) {<NE... | dto.getApplicancesInfo().device); |
868,042 | protected static // 'Open in Android Studio' is requested.<NEW_LINE>VirtualFile findProjectFile(@Nullable AnActionEvent e) {<NEW_LINE>if (e != null) {<NEW_LINE>final VirtualFile file = CommonDataKeys.VIRTUAL_FILE.getData(e.getDataContext());<NEW_LINE>if (file != null && file.exists()) {<NEW_LINE>// We have a selection.... | Project project = e.getProject(); |
1,420,032 | private void transferHandlingUnit(final IHUContext huContext, final I_M_ReceiptSchedule rs, final I_M_HU hu, final I_M_InOutLine receiptLine) {<NEW_LINE>//<NEW_LINE>// Assign it to Receipt Line<NEW_LINE>assignHU(receiptLine, hu);<NEW_LINE>//<NEW_LINE>// Transfer attributes from HU to receipt line's ASI<NEW_LINE>final I... | executor = huTrxBL.createHUContextProcessorExecutor(huContext); |
486,229 | final SendPipelineExecutionStepFailureResult executeSendPipelineExecutionStepFailure(SendPipelineExecutionStepFailureRequest sendPipelineExecutionStepFailureRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(sendPipelineExecutionStepFailureRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,303,322 | public void visit(DynamoDBStringItem dynamoStringItem) {<NEW_LINE>if (item instanceof ColorItem) {<NEW_LINE>state[0] = new HSBType(dynamoStringItem.getState());<NEW_LINE>} else if (item instanceof LocationItem) {<NEW_LINE>state[0] = new PointType(dynamoStringItem.getState());<NEW_LINE>} else if (item instanceof DateTim... | strings = parts.split("##"); |
1,308,831 | private static InetAddress findMyAddress() {<NEW_LINE>// add to list filtering out docker0<NEW_LINE>HashSet<NetworkInterface> <MASK><NEW_LINE>try {<NEW_LINE>logger.fine("No address in configuration so let's find one");<NEW_LINE>Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();<NEW_LINE... | possibleInterfaces = new HashSet<>(); |
1,003,411 | public void exitBoolean_as_path_in(Boolean_as_path_inContext ctx) {<NEW_LINE>AsPathSetExpr asPathSetExpr;<NEW_LINE>if (ctx.name != null) {<NEW_LINE>String <MASK><NEW_LINE>asPathSetExpr = new AsPathSetReference(name);<NEW_LINE>_configuration.referenceStructure(AS_PATH_SET, name, ROUTE_POLICY_AS_PATH_IN, ctx.name.getStar... | name = toString(ctx.name); |
1,552,441 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>Query post = RemoteAccess.evaluate(request);<NEW_LINE>// manage DoS<NEW_LINE>if (post.isDoS_blackout()) {<NEW_LINE>response.sendError(503, "your request frequency is too high");<NEW_LINE>return... | get("followers", "0") : "0"; |
520,256 | public JsonResult execute() throws InvalidHttpRequestBodyException {<NEW_LINE>String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID);<NEW_LINE>String feedbackSessionName = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);<NEW_LINE>FeedbackQuestionCreateRequest request = getAndVal... | > questionDetailsErrors = questionDetails.validateQuestionDetails(); |
450,514 | private I_M_Movement createMovementHeader() {<NEW_LINE>final I_M_Movement movement = InterfaceWrapperHelper.newInstance(I_M_Movement.class);<NEW_LINE>movement.setDocStatus(IDocument.STATUS_Drafted);<NEW_LINE>movement.setDocAction(IDocument.ACTION_Complete);<NEW_LINE>//<NEW_LINE>// Org and Document Type<NEW_LINE>final C... | getDimensionFields().getCampaignId()); |
1,771,781 | KTableHolder<GenericKey> buildTable(final RuntimeBuildContext buildContext, final SourceStep<KTableHolder<GenericKey>> source, final ConsumedFactory consumedFactory, final MaterializedFactory materializedFactory, final PlanInfo planInfo) {<NEW_LINE>final PhysicalSchema physicalSchema = getPhysicalSchema(source);<NEW_LI... | getKeySerde(source, physicalSchema, buildContext); |
770,863 | private CorpUserSnapshot extractUser(CorpuserUrn urn, CommonProfile profile) {<NEW_LINE>log.debug(String.format("Attempting to extract user from OIDC profile %s", profile.getAttributes().toString()));<NEW_LINE>// Extracts these based on the default set of OIDC claims, described here:<NEW_LINE>// https://developer.okta.... | final CorpUserAspectArray aspects = new CorpUserAspectArray(); |
1,298,466 | void assembleMessageParameters() {<NEW_LINE>mAid = SecureUtils.calculateK4(mAppKey.getKey());<NEW_LINE>final ByteBuffer paramsBuffer;<NEW_LINE>LOG.info("State: " + (mState ? "ON" : "OFF"));<NEW_LINE>if (mTransitionSteps == null || mTransitionResolution == null || mDelay == null) {<NEW_LINE>paramsBuffer = ByteBuffer.all... | LOG.info("Transition steps: " + mTransitionSteps); |
91,780 | public boolean range(PartitionField from, PartitionField to, boolean lowerBoundIncluded, boolean upperBoundIncluded) {<NEW_LINE>if (!checkBound(from, to)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>this.lowerBoundIncluded = lowerBoundIncluded;<NEW_LINE>this.upperBoundIncluded = upperBoundIncluded;<NEW_LINE>this.first... | packedLong = TimeStorage.writeTimestamp(maxDatetime); |
1,348,770 | private static int readTimeoutMillisConfiguration() {<NEW_LINE>String stringTimeout = System.getenv(SDKGlobalConfiguration.AWS_METADATA_SERVICE_TIMEOUT_ENV_VAR);<NEW_LINE>if (StringUtils.isNullOrEmpty(stringTimeout)) {<NEW_LINE>return DEFAULT_TIMEOUT_MILLIS;<NEW_LINE>}<NEW_LINE>// To match the CLI behavior, we need to ... | timeoutSeconds = Double.parseDouble(stringTimeout); |
713,735 | public void startup() {<NEW_LINE>for (int i = 0; i < _ports.size(); i++) {<NEW_LINE>Integer port = _ports.get(i);<NEW_LINE>File logDir = FileUtils.constructRandomDirectoryInTempDir("kafka-local-" + port);<NEW_LINE>Properties properties = new Properties();<NEW_LINE>properties.putAll(_baseProperties);<NEW_LINE>properties... | "log.dir", logDir.getAbsolutePath()); |
1,255,715 | public static KeyValuePart[] split(MatrixMeta matrixMeta, int rowId, long[] keys, IElement[] values) {<NEW_LINE>PartitionKey[] matrixParts = matrixMeta.getPartitionKeys();<NEW_LINE>int matrixPartNumMinus1 = matrixParts.length - 1;<NEW_LINE>KeyValuePart[] keyValueParts = new KeyValuePart[matrixParts.length];<NEW_LINE>in... | i], values[i]); |
1,296,709 | public static String readFile(InputStream is, String name, String encoding, long length) throws IOException {<NEW_LINE>if (length < 0) {<NEW_LINE>LineNumberReader reader = new LineNumberReader(new InputStreamReader(is));<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>while (true) {<NEW_LINE><MASK><NEW_L... | String line = reader.readLine(); |
1,175,741 | private Set<String> keysOfPropertyFiles(String names) {<NEW_LINE>String[] namesArr = names.split(":");<NEW_LINE>if (namesArr == null) {<NEW_LINE>checker.message(Kind.WARNING, "Couldn't parse the properties files: <" + names + ">");<NEW_LINE>return Collections.emptySet();<NEW_LINE>}<NEW_LINE>Set<String> result = new <MA... | HashSet<>(namesArr.length); |
65,420 | public boolean apply(Game game, Ability source) {<NEW_LINE>if (game.getPermanentEntering(source.getSourceId()) != null) {<NEW_LINE>OneShotEffect returnToHandEffect = new ReturnToHandTargetEffect();<NEW_LINE>ConditionalOneShotEffect mustBeOnBattlefieldToReturn = new ConditionalOneShotEffect(returnToHandEffect, DashAddDe... | game.addDelayedTriggeredAbility(delayedAbility, source); |
1,328,879 | private static void moveFiles(String sourceDir, String destinationDir, Pattern fileRegex) {<NEW_LINE>if (sourceDir == null || sourceDir.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Files.walk(Paths.get(sourceDir)).map(String::valueOf).map(fileRegex::matcher).filter(Matcher::matches).forEach(match ->... | throw new RuntimeException("Unable to look up release files in " + sourceDir); |
248,849 | private JTree rebuildTree() {<NEW_LINE>final JTree tree = new JTree(base.buildSketchbookTree());<NEW_LINE>tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);<NEW_LINE>tree.setShowsRootHandles(true);<NEW_LINE>tree.expandRow(0);<NEW_LINE>tree.setRootVisible(false);<NEW_LINE>tree.addMouseL... | (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); |
1,131,564 | public List<GenericTrigger> loadTriggers(DBRProgressMonitor monitor, @NotNull GenericStructContainer container, @Nullable GenericTableBase table) throws DBException {<NEW_LINE>try (JDBCSession session = DBUtils.openMetaSession(monitor, container, "Read triggers")) {<NEW_LINE>try (JDBCPreparedStatement dbStat = (JDBCPre... | result = new ArrayList<>(); |
895,360 | public boolean onOptionsItemSelected(MenuItem item) {<NEW_LINE><MASK><NEW_LINE>if (id == R.id.action_refresh) {<NEW_LINE>refreshWeather();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (id == R.id.action_map) {<NEW_LINE>Intent intent = new Intent(MainActivity.this, MapActivity.class);<NEW_LINE>startActivity(intent);<NEW... | int id = item.getItemId(); |
1,387,584 | public static void inverseN(WaveletDescription<WlCoef_I32> desc, GrayS32 input, GrayS32 output, GrayS32 storage, int numLevels, int minValue, int maxValue) {<NEW_LINE>if (numLevels == 1) {<NEW_LINE>inverse1(desc, input, output, storage, minValue, maxValue);<NEW_LINE>PixelMath.boundImage(output, minValue, maxValue);<NEW... | Integer.MIN_VALUE, Integer.MAX_VALUE); |
1,151,955 | public static ListInstanceResponse unmarshall(ListInstanceResponse listInstanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>listInstanceResponse.setRequestId(_ctx.stringValue("ListInstanceResponse.RequestId"));<NEW_LINE>listInstanceResponse.setPageIndex(_ctx.integerValue("ListInstanceResponse.PageIndex"));<NEW_LINE>l... | ("ListInstanceResponse.Instances[" + i + "].InputDelay")); |
269,140 | public static ArrayValue convertJSONToBArray(Object json, BArrayType targetArrayType) {<NEW_LINE>if (!(json instanceof ArrayValue)) {<NEW_LINE>throw BLangExceptionHelper.getRuntimeException(RuntimeErrors.INCOMPATIBLE_TYPE, getComplexObjectTypeName(ARRAY), getTypeName(json));<NEW_LINE>}<NEW_LINE>Type targetElementType =... | , jsonArray.getRefValue(i)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.