idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,210,370 | public static <T, V> Collection<V> collectIf(Iterable<T> iterable, Predicate<? super T> predicate, Function<? super T, ? extends V> function) {<NEW_LINE>if (iterable instanceof MutableCollection) {<NEW_LINE>return ((MutableCollection<T>) iterable).collectIf(predicate, function);<NEW_LINE>}<NEW_LINE>if (iterable instanc... | collectIf(iterable, predicate, function); |
461,095 | private long restartInternal(long oldExecutionId, Properties restartParameters) throws JobExecutionAlreadyCompleteException, NoSuchJobExecutionException, JobExecutionNotMostRecentException, JobRestartException, JobSecurityException {<NEW_LINE>if (authService != null) {<NEW_LINE>authService.authorizedJobRestartByExecuti... | BatchStatusValidator.validateStatusAtExecutionRestart(oldExecutionId, restartParameters); |
1,585,752 | final CreateContactListResult executeCreateContactList(CreateContactListRequest createContactListRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createContactListRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateContactListReq... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
812,342 | private void alterResourcesConfig(final String schemaName, final Map<String, YamlProxyDataSourceConfiguration> yamlDataSourceMap) throws DistSQLException {<NEW_LINE>Map<String, DataSourceProperties> toBeUpdatedResourcePropsMap = new LinkedHashMap<>(yamlDataSourceMap.size(), 1);<NEW_LINE>for (Entry<String, YamlProxyData... | (each.getValue())); |
1,078,202 | public static Map<String, Instant> readIndividualReplicaLastPasswordTimes(final PwmDomain pwmDomain, final SessionLabel sessionLabel, final UserIdentity userIdentity) throws PwmUnrecoverableException {<NEW_LINE>final Map<String, Instant> returnValue = new LinkedHashMap<>();<NEW_LINE>final ChaiProvider chaiProvider = pw... | getChaiProviderFactory().newProvider(loopConfiguration); |
1,020,351 | private void drawPathRelativeTicks(Canvas canvas, float x, float y) {<NEW_LINE>float x1 = mPoints[0];<NEW_LINE>float y1 = mPoints[1];<NEW_LINE>float x2 = mPoints[mPoints.length - 2];<NEW_LINE>float y2 = mPoints[mPoints.length - 1];<NEW_LINE>float dist = (float) Math.hypot(x1 - x2, y1 - y2);<NEW_LINE>float t = ((x - x1)... | path.moveTo(x, y); |
1,284,230 | public static Map<SubqueryLabel, RexPermuteInputsShuttle> mergePullUpSubqueryPredicates(Map<RexSubQuery, SubqueryLabel> subqueryLabelMap, List<RelDataTypeField> outFields, List<Pair<Label, ImmutableBitSet>> outInputBitSets, List<RexNode> outPredicates) {<NEW_LINE>// Put all columns and predicates together<NEW_LINE>fina... | leftCount, leftCount + rightCount))); |
356,300 | public void publishAdditionalModelData(JavaSparkContext sparkContext, PMML pmml, JavaRDD<String> newData, JavaRDD<String> pastData, Path modelParentPath, TopicProducer<String, String> modelUpdateTopic) {<NEW_LINE>// Send item updates first, before users. That way, user-based endpoints like /recommend<NEW_LINE>// may ta... | String topic = modelUpdateTopic.getTopic(); |
1,228,898 | public static void register(MetricsRegistry metricsRegistry) {<NEW_LINE>checkNotNull(metricsRegistry, "metricsRegistry");<NEW_LINE>OperatingSystemMXBean mxBean = ManagementFactory.getOperatingSystemMXBean();<NEW_LINE>registerMethod(<MASK><NEW_LINE>registerMethod(metricsRegistry, mxBean, "getFreePhysicalMemorySize", OS_... | metricsRegistry, mxBean, "getCommittedVirtualMemorySize", OS_FULL_METRIC_COMMITTED_VIRTUAL_MEMORY_SIZE); |
1,016,489 | public List<JPACompletionItem> doCompletion(CompletionContext context) {<NEW_LINE>List<JPACompletionItem> results <MASK><NEW_LINE>int caretOffset = context.getCaretOffset();<NEW_LINE>String typedChars = context.getTypedPrefix();<NEW_LINE>String providerClass = getProviderClass(context.getTag());<NEW_LINE>Project enclos... | = new ArrayList<JPACompletionItem>(); |
813,375 | CompletableFuture<Channel> initTls(Channel ch, InetSocketAddress sniHost) {<NEW_LINE>Objects.requireNonNull(ch, "A channel is required");<NEW_LINE>Objects.requireNonNull(sniHost, "A sniHost is required");<NEW_LINE>if (!tlsEnabled) {<NEW_LINE>throw new IllegalStateException("TLS is not enabled in client configuration");... | ), sniHost.getPort()); |
1,315,096 | protected void reset(@Nonnull LayoutImpl component) {<NEW_LINE>UISettings settings = UISettings.getInstance();<NEW_LINE>component.myFontCombo.setValue(settings.FONT_FACE);<NEW_LINE>component.myAntialiasingInIDE.setValue(settings.IDE_AA_TYPE);<NEW_LINE>component.myAntialiasingInEditor.setValue(settings.EDITOR_AA_TYPE);<... | .toString(settings.FONT_SIZE)); |
1,180,391 | public MappingStore match(Tree src, Tree dst, MappingStore mappings) {<NEW_LINE>List<Mapping> leavesMappings = new ArrayList<>();<NEW_LINE>List<Tree> dstLeaves = retainLeaves(TreeUtils.postOrder(dst));<NEW_LINE>for (Iterator<Tree> srcLeaves = TreeUtils.leafIterator(TreeUtils.postOrderIterator(src)); srcLeaves.hasNext()... | ignoredSrcTrees.add(bestMapping.first); |
1,608,876 | public static ListFlowJobResponse unmarshall(ListFlowJobResponse listFlowJobResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFlowJobResponse.setRequestId(_ctx.stringValue("ListFlowJobResponse.RequestId"));<NEW_LINE>listFlowJobResponse.setPageNumber(_ctx.integerValue("ListFlowJobResponse.PageNumber"));<NEW_LINE>listFl... | ("ListFlowJobResponse.JobList[" + i + "].GmtCreate")); |
1,841,694 | private void processA() {<NEW_LINE>reclaimDisposedBuffers();<NEW_LINE>decodingView.undecodedLimit = buffer.position();<NEW_LINE>decode();<NEW_LINE>decodingView.unconsumedOffset += consumeA();<NEW_LINE>// Resize region A<NEW_LINE>regionA.setOffsetAndLimit((undisposedDataOffset >= 0) ? undisposedDataOffset : decodingView... | regionA.setOffsetAndLimit(0, 0); |
820,858 | public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent permanent = game.getPermanent(source.getFirstTarget());<NEW_LINE>if (permanent != null) {<NEW_LINE>ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn);<NEW_LINE>effect.setTargetPointer(new FixedTarget(permanent, game));<NEW_LINE>... | getInstance(), Duration.EndOfTurn); |
1,846,320 | public static byte[] convertPrivateKey(byte[] keySpec) {<NEW_LINE>if (keySpec == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>byte[] bytes = new byte[keySpec.length];<NEW_LINE>System.arraycopy(keySpec, 0, bytes, 0, keySpec.length);<NEW_LINE>byte<MASK><NEW_LINE>byte[] oidBytes = encodeOID(RSA_ENCRYPTION);<NEW_LINE>... | [] octetBytes = encodeOctetString(bytes); |
1,850,121 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static com.sun.jdi.ThreadReference thread(com.sun.jdi.event.MonitorWaitEvent a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.mo... | logCallEnd("com.sun.jdi.event.MonitorWaitEvent", "thread", retValue); |
703,388 | private ExternallyReferencedCandidate forRecord(@NonNull final I_C_Invoice_Candidate icRecord) {<NEW_LINE>final ExternallyReferencedCandidateBuilder candidate = ExternallyReferencedCandidate.builder();<NEW_LINE>candidate.orgId(OrgId.ofRepoId(icRecord.getAD_Org_ID())).id(InvoiceCandidateId.ofRepoId(icRecord.getC_Invoice... | ())).build(); |
1,511,567 | public void actionPerformed(ActionEvent arg0) {<NEW_LINE>try {<NEW_LINE>FileDialog fileDialog = new FileDialog(MainFrame.get(), "Load Gcode Profile From...", FileDialog.LOAD);<NEW_LINE>fileDialog.setFilenameFilter(new FilenameFilter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean accept(File dir, String name) ... | get(), "Import Failed", e); |
914,209 | protected void closeSheet() {<NEW_LINE>if (sheetHelper != null) {<NEW_LINE>XlsReportConfiguration configuration = getCurrentItemConfiguration();<NEW_LINE>boolean isIgnorePageMargins = configuration.isIgnorePageMargins();<NEW_LINE>if (currentSheetFirstPageNumber != null && currentSheetFirstPageNumber > 0) {<NEW_LINE>she... | sheetInfo.sheetFirstPageIndex, sheetInfo.printSettings); |
568,856 | public final RolloutMigrationConfig init(final String[] args) {<NEW_LINE>final CommandLineParser parser = new DefaultParser();<NEW_LINE>final CommandLine cmd;<NEW_LINE>try {<NEW_LINE>cmd = parser.parse(options, args);<NEW_LINE>} catch (final Exception e) {<NEW_LINE>logger.error(e.getLocalizedMessage() + "\n\n" + printH... | configBuilder.scriptsApplierListener(ConsoleScriptsApplierListener.instance); |
954,437 | public void addMapperAnnotations(Interface interfaze, Method method) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Select"));<NEW_LINE>buildInitialSelectAnnotationStrings().forEach(method::addAnnotation);<NEW_LINE>StringBuilder sb = new StringBuil... | addAnnotation(sb.toString()); |
407,526 | private OHashTable.BucketPath nextNonEmptyNode(OHashTable.BucketPath bucketPath, final OAtomicOperation atomicOperation) throws IOException {<NEW_LINE>nextBucketLoop: while (bucketPath != null) {<NEW_LINE>final long[] node = directory.getNode(bucketPath.nodeIndex, atomicOperation);<NEW_LINE>final int startIndex <MASK><... | = bucketPath.itemIndex + bucketPath.hashMapOffset; |
1,328,427 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see javax.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType,<NEW_LINE>* javax.ws.rs.core.MultivaluedMap, java.io.InputStream)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public MyObje... | fields = line.split("\\|"); |
1,403,216 | public void createTable(Table table) throws IOException {<NEW_LINE><MASK><NEW_LINE>validateWholeTableReference(tableReference);<NEW_LINE>synchronized (tables) {<NEW_LINE>Map<String, TableContainer> dataset = tables.get(tableReference.getProjectId(), tableReference.getDatasetId());<NEW_LINE>if (dataset == null) {<NEW_LI... | TableReference tableReference = table.getTableReference(); |
1,631,412 | protected ScanIteration<Tuple> doScan(byte[] key, long cursorId, ScanOptions options) {<NEW_LINE>if (isQueueing() || isPipelined()) {<NEW_LINE>throw new UnsupportedOperationException("'ZSCAN' cannot be called in pipeline / transaction mode.");<NEW_LINE>}<NEW_LINE>List<Object> args = new ArrayList<Object>();<NEW_LINE>ar... | add(options.getPattern()); |
1,648,470 | void loadServicePrivateKey() {<NEW_LINE>final String pkeyFactoryClass = System.getProperty(ZTSConsts.ZTS_PROP_PRIVATE_KEY_STORE_FACTORY_CLASS, ZTSConsts.ZTS_PKEY_STORE_FACTORY_CLASS);<NEW_LINE>PrivateKeyStoreFactory pkeyFactory;<NEW_LINE>try {<NEW_LINE>pkeyFactory = (PrivateKeyStoreFactory) Class.forName(pkeyFactoryCla... | StringBuilder privKeyId = new StringBuilder(256); |
1,322,202 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String mobileNetworkName, String dataNetworkName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and c... | this.client.mergeContext(context); |
1,053,099 | private void addUnassigned(Client client) {<NEW_LINE>for (Security security : client.getSecurities()) {<NEW_LINE><MASK><NEW_LINE>assignment.setWeight(0);<NEW_LINE>investmentVehicle2weight.put(security, assignment);<NEW_LINE>}<NEW_LINE>for (Account account : client.getAccounts()) {<NEW_LINE>Assignment assignment = new A... | Assignment assignment = new Assignment(security); |
1,829,849 | public void removeRadiusConfig(String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/system/config/auth/radius";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE... | localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
1,212,913 | public JComponent build() {<NEW_LINE>ProjectStructureSettingsUtil util = (ProjectStructureSettingsUtil) ShowSettingsUtil.getInstance();<NEW_LINE>final SdkModel projectSdksModel = util.getSdksModel();<NEW_LINE>final SdkComboBox comboBox = new SdkComboBox(projectSdksModel, mySdkFilter, null, myNullItemName, myNullItemIco... | myPostConsumer.consume(oldValue, sdk); |
1,170,522 | protected IndexTreePath<E> choosePath(IndexTreePath<E> subtree, SpatialComparable mbr, int depth, int cur) {<NEW_LINE>if (getLogger().isDebuggingFiner()) {<NEW_LINE>getLogger().debugFiner("node " + subtree + ", depth " + depth);<NEW_LINE>}<NEW_LINE>N node = getNode(subtree.getEntry());<NEW_LINE>if (node == null) {<NEW_... | "childNode is leaf, but currentDepth != depth: " + cur + " != " + depth); |
404,321 | public void execute(AdminCommandContext context) {<NEW_LINE>Config config = targetUtil.getConfig(target);<NEW_LINE>if (config == null) {<NEW_LINE>context.getActionReport().setMessage("No such config named: " + target);<NEW_LINE>context.getActionReport().setActionExitCode(ActionReport.ExitCode.FAILURE);<NEW_LINE>return;... | , monitoringService.getDtraceEnabled() }); |
195,803 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>String msg = request.getParameter("arg0");<NEW_LINE>PrintWriter writer = response.getWriter();<NEW_LINE>port = request.getParameter("port");<NEW_LINE>hostname = request.getParameter("hostname")... | msg, warName, serviceName, writer); |
1,561,224 | private void parseLoggingConfig(Map<String, ?> loggingConfig) {<NEW_LINE>if (loggingConfig != null) {<NEW_LINE>Boolean value = JsonUtil.getBoolean(loggingConfig, "enable_cloud_logging");<NEW_LINE>if (value != null) {<NEW_LINE>enableCloudLogging = value;<NEW_LINE>}<NEW_LINE>destinationProjectId = <MASK><NEW_LINE>flushMe... | JsonUtil.getString(loggingConfig, "destination_project_id"); |
359,486 | private String constructImportStatement(Map.Entry<String, BImport> importEntry) {<NEW_LINE>String orgName = importEntry.getValue().getResolvedSymbol().id().orgName();<NEW_LINE>// If the import belongs to a module inside the current package, replace the original org name name with<NEW_LINE>// temporary evaluation projec... | moduleNameParts = moduleName.split(MODULE_NAME_SEPARATOR_REGEX); |
1,414,156 | private void ensureExpandedTexture() {<NEW_LINE>if (mExpandedTitleTexture != null || mExpandedBounds.isEmpty() || TextUtils.isEmpty(mTextToDraw)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>calculateOffsets(0f);<NEW_LINE>mTextureAscent = mTextPaint.ascent();<NEW_LINE>mTextureDescent = mTextPaint.descent();<NEW_LINE>final in... | mTextPaint.descent(), mTextPaint); |
20,976 | private void addStaticImport(ICompilationUnit movedUnit, IImportDeclaration importDecl, ImportRewrite rewrite) {<NEW_LINE><MASK><NEW_LINE>int oldPackLength = movedUnit.getParent().getElementName().length();<NEW_LINE>StringBuilder result = new StringBuilder(fDestination.getElementName());<NEW_LINE>if (oldPackLength == 0... | String old = importDecl.getElementName(); |
509,714 | protected void deleteLinks(List<Link> links, String reason, List<LDUpdate> updateList) {<NEW_LINE>NodePortTuple srcNpt, dstNpt;<NEW_LINE>List<LDUpdate> linkUpdateList = new ArrayList<LDUpdate>();<NEW_LINE>lock.writeLock().lock();<NEW_LINE>try {<NEW_LINE>for (Link lt : links) {<NEW_LINE>srcNpt = new NodePortTuple(lt.get... | log.trace("Deleted link {}", lt); |
1,838,479 | public boolean finalizeDeployment(Commands cmds, VirtualMachineProfile profile, DeployDestination dest, ReservationContext context) {<NEW_LINE>finalizeCommandsOnStart(cmds, profile);<NEW_LINE>SecondaryStorageVmVO secVm = _secStorageVmDao.findById(profile.getId());<NEW_LINE><MASK><NEW_LINE>List<NicProfile> nics = profil... | DataCenter dc = dest.getDataCenter(); |
295,255 | final ListFirewallRuleGroupAssociationsResult executeListFirewallRuleGroupAssociations(ListFirewallRuleGroupAssociationsRequest listFirewallRuleGroupAssociationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listFirewallRuleGroupAssociationsRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Route53Resolver"); |
608,089 | public void run() {<NEW_LINE>// Sandbox transactions have no order ID, so we'll make a dummy transaction ID<NEW_LINE>// in this case.<NEW_LINE>String transactionId = (purchase.getOrderId() == null || purchase.getOrderId().isEmpty()) ? "play-sandbox-" + UUID.randomUUID().toString() : purchase.getOrderId();<NEW_LINE>Stri... | "signature", purchase.getSignature()); |
1,154,618 | protected void addRequestMethods(StringBuilder sb, int indent, @SuppressWarnings("unused") String typeName) {<NEW_LINE>indent(sb, indent);<NEW_LINE>// noinspection unused<NEW_LINE>sb.append("static ").append("Requester<$typeName>").append(" request(String urlBase) {\n");<NEW_LINE>indent(sb, indent);<NEW_LINE>sb.append(... | ("Requester<$typeName>").append(" request(Endpoint endpoint) {\n"); |
675,741 | // Non-static class methods must be empty for `@record` and `@interface` as per the style guide.<NEW_LINE>private static void checkClassMethods(NodeTraversal t, Node classNode, @Nullable Node ctorDef) {<NEW_LINE>Node classMembers = classNode.getLastChild();<NEW_LINE>checkState(classMembers.isClassMembers(), classMember... | .getLastChild().getLastChild(); |
1,348,089 | // Used by DatumReader. Applications should not call.<NEW_LINE>@SuppressWarnings(value = "unchecked")<NEW_LINE>public void put(int field$, java.lang.Object value$) {<NEW_LINE>switch(field$) {<NEW_LINE>case 0:<NEW_LINE>ownerId = (java.lang.Integer) value$;<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>timestampLastResetMs ... | (java.lang.Long) value$; |
435,836 | final UpdateReplicationConfigurationResult executeUpdateReplicationConfiguration(UpdateReplicationConfigurationRequest updateReplicationConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateReplicationConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,109,384 | public void write(OutputStream out) throws IOException {<NEW_LINE>if (database != null) {<NEW_LINE>StreamUtil.writeUB3(out, calcPacketSize());<NEW_LINE>} else {<NEW_LINE>StreamUtil.writeUB3(out, calcPacketSize() - 1);<NEW_LINE>}<NEW_LINE>StreamUtil.write(out, packetId);<NEW_LINE>// capability flags<NEW_LINE><MASK><NEW_... | StreamUtil.writeUB4(out, clientFlags); |
400,993 | public void drawU(UGraphic ug, Area area, Context2D context) {<NEW_LINE>if (config.isHidden()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Dimension2D dimensionToUse = area.getDimensionToUse();<NEW_LINE>final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();<NEW_LINE>final int width = (int) dimensionToUse.getWi... | drawChar(' ', i, yarrow); |
1,229,421 | public long[] updateRTAs(PiecePicker picker) {<NEW_LINE>long overall_pos = current_position + file_offset_in_torrent;<NEW_LINE>int first_piece = (int) (overall_pos / piece_size);<NEW_LINE>long rate = byte_rate.getAverage();<NEW_LINE>int buffer_millis = (int) (<MASK><NEW_LINE>long buffer_bytes = (buffer_millis * rate) /... | buffer_millis_override == 0 ? DEFAULT_BUFFER_MILLIS : buffer_millis_override); |
1,451,860 | protected void processModulesAndArgs() {<NEW_LINE>super.processModulesAndArgs();<NEW_LINE>if (contains(argRepeat)) {<NEW_LINE>String[] x = getValue(argRepeat).split(",");<NEW_LINE>if (x.length == 1) {<NEW_LINE>try {<NEW_LINE>repeatCount = Integer.parseInt(x[0]);<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>th... | + getValue(argRepeat) + " as an integer"); |
1,231,978 | public void encryptDeterministically(DeterministicAeadEncryptRequest request, StreamObserver<DeterministicAeadEncryptResponse> responseObserver) {<NEW_LINE>DeterministicAeadEncryptResponse response;<NEW_LINE>try {<NEW_LINE>KeysetHandle keysetHandle = CleartextKeysetHandle.read(BinaryKeysetReader.withBytes(request.getKe... | ().toByteArray())); |
362,022 | public void mouseDown(MouseEvent event) {<NEW_LINE>if (event.button == 3) {<NEW_LINE>TableItem[] tebleItems = table.getSelection();<NEW_LINE>final String fileName = tebleItems[0].getText();<NEW_LINE>Menu menu = new Menu(table.getShell(), SWT.POP_UP);<NEW_LINE>MenuItem downloadItem = new MenuItem(menu, SWT.PUSH);<NEW_LI... | MenuItem(menu, SWT.PUSH); |
177,265 | public void run(WorkingCopy workingCopy) throws IOException {<NEW_LINE><MASK><NEW_LINE>TreeMaker make = workingCopy.getTreeMaker();<NEW_LINE>CompilationUnitTree compilationUnitTree = workingCopy.getCompilationUnit();<NEW_LINE>// change the package when file was move to different dir.<NEW_LINE>CompilationUnitTree cutCop... | workingCopy.toPhase(Phase.RESOLVED); |
481,423 | public PolicyInformation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PolicyInformation policyInformation = new PolicyInformation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = ori... | class).unmarshall(context)); |
1,044,093 | public LinkNode<K, V> remove(LinkNode<K, V> node) {<NEW_LINE>assert node != this.empty;<NEW_LINE>assert node != this<MASK><NEW_LINE>while (true) {<NEW_LINE>LinkNode<K, V> prev = node.prev;<NEW_LINE>if (prev == this.empty) {<NEW_LINE>assert node.next == this.empty;<NEW_LINE>// Ignore the node if it has been removed<NEW_... | .head && node != this.rear; |
889,880 | public void handleEvent(Event event) {<NEW_LINE>switch(event.type) {<NEW_LINE>case SWT.Selection:<NEW_LINE>try {<NEW_LINE>String counterTitle = counterCombo.getText();<NEW_LINE>CubridSingleItem <MASK><NEW_LINE>String fromTime = (calendar.getMonth() + 1) + "/" + calendar.getDay() + "/" + calendar.getYear() + " " + (star... | type = CubridSingleItem.fromCounterName(counterTitle); |
12,044 | private void init() {<NEW_LINE>String velocityRootPath = Config.getStringProperty("VELOCITY_ROOT", "/WEB-INF/velocity");<NEW_LINE>if (velocityRootPath.startsWith("/WEB-INF")) {<NEW_LINE>String startPath = velocityRootPath.substring(0, 8);<NEW_LINE>String endPath = velocityRootPath.substring(9, velocityRootPath.length()... | Config.getStringProperty("ASSET_PATH"))); |
46,299 | static List<Object> toArray(ReadableArray readableArray) {<NEW_LINE>List<Object> result = new ArrayList<>(readableArray.size());<NEW_LINE>for (int i = 0; i < readableArray.size(); i++) {<NEW_LINE>ReadableType <MASK><NEW_LINE>switch(indexType) {<NEW_LINE>case Null:<NEW_LINE>result.add(i, null);<NEW_LINE>break;<NEW_LINE>... | indexType = readableArray.getType(i); |
1,650,558 | private List<String> fetchHostsFromDns(final String primaryServer, OContextConfiguration contextConfiguration) {<NEW_LINE>OLogManager.instance().debug(this, "Retrieving URLs from DNS '%s' (timeout=%d)...", primaryServer, contextConfiguration.getValueAsInteger(OGlobalConfiguration.NETWORK_BINARY_DNS_LOADBALANCING_TIMEOU... | DirContext ictx = new InitialDirContext(env); |
64,133 | private ReuseSet generateReuseSet(ReuseKey key) {<NEW_LINE>long start = System.nanoTime();<NEW_LINE>ReuseSet reuseSet = new ReuseSet();<NEW_LINE>try (DatabaseSession databaseSession = bimServer.getDatabase().createSession(OperationType.READ_ONLY)) {<NEW_LINE>// Assuming all given roids are of projects that all have the... | map = new HashMap<>(); |
1,754,883 | private void submitPost(MenuItem item) {<NEW_LINE>if (!subredditSelected) {<NEW_LINE>Snackbar.make(coordinatorLayout, R.string.select_a_subreddit, Snackbar.LENGTH_SHORT).show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (titleEditText.getText() == null || titleEditText.getText().toString().equals("")) {<NEW_LINE>Snackbar... | SubmitPostService.EXTRA_POST_TYPE, SubmitPostService.EXTRA_POST_TEXT_OR_LINK); |
43,869 | public FormFieldValidator createValidator(Element constraint, BpmnParse bpmnParse, ExpressionManager expressionManager) {<NEW_LINE>String name = constraint.attribute("name");<NEW_LINE>String <MASK><NEW_LINE>if ("validator".equals(name)) {<NEW_LINE>// custom validators<NEW_LINE>if (config == null || config.isEmpty()) {<... | config = constraint.attribute("config"); |
1,182,726 | private void saveDataverse(String successMessage) {<NEW_LINE>if (successMessage.isEmpty()) {<NEW_LINE>// "Template data updated";<NEW_LINE>successMessage = BundleUtil.getStringFromBundle("template.update");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>engineService.submit(new UpdateDataverseCommand(getDataverse(), null, null, dv... | failMessage = BundleUtil.getStringFromBundle("template.delete.error"); |
1,369,021 | public EditorInspector<?> createRequestInspector(Editor<?> editor, ModelItem modelItem) {<NEW_LINE>try {<NEW_LINE>if (targetClass.isAssignableFrom(modelItem.getClass())) {<NEW_LINE>try {<NEW_LINE>Method appliesMethod = inspectorClass.getMethod("applies", targetClass);<NEW_LINE>if (appliesMethod != null) {<NEW_LINE>Obje... | constructor.newInstance(editor, modelItem); |
744,408 | public void paint(Graphics g) {<NEW_LINE>Dimension size = getSize();<NEW_LINE>int gridSize = (int) renderer.getScaledGridSize();<NEW_LINE>// Background<NEW_LINE>g.setColor(getBackground());<NEW_LINE>g.fillRect(x, y, <MASK><NEW_LINE>// Border<NEW_LINE>AppStyle.border.paintAround((Graphics2D) g, x, y, size.width - 1, siz... | size.width, size.height); |
526,917 | public RestRequest makeRequest(int method, String url, java.util.Map<String, String> params, RestRequest.Listener listener, RestRequest.ErrorListener errorListener) {<NEW_LINE>AppLog.v(T.TESTS, this.getClass() + ": makeRequest(" + url + ")");<NEW_LINE>RestRequest dummyReturnValue = new RestRequest(method, url, params, ... | replace("?", "-") + ".json"; |
13,187 | public com.amazonaws.services.personalize.model.InvalidNextTokenException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.personalize.model.InvalidNextTokenException invalidNextTokenException = new com.amazonaws.services.personalize.model.InvalidNextTokenExcepti... | int originalDepth = context.getCurrentDepth(); |
485,462 | private void mapRequestBodyMatchers(YamlContract.Request yamlContractRequest, Request dslContractRequest) {<NEW_LINE>dslContractRequest.bodyMatchers((bodyMatchers) -> Optional.ofNullable(yamlContractRequest.matchers).map(stubMatchers -> stubMatchers.body).ifPresent(stubMatchers -> stubMatchers.forEach(stubMatcher -> {<... | matchingTypeValueHolder.minOccurrence(stubMatcher.minOccurrence); |
1,534,118 | private void invokeBatchlet(Batchlet batchlet) throws BatchContainerServiceException {<NEW_LINE>String batchletId = batchlet.getRef();<NEW_LINE>List<Property> propList = (batchlet.getProperties() == null) ? null : (List<Property>) batchlet.getProperties().getPropertyList();<NEW_LINE>String sourceMethod = "invokeBatchle... | processRetVal == null ? "<null>" : processRetVal); |
521,688 | protected void init(DiscoveryContext context, DiscoveryTreeNode parent) {<NEW_LINE>MicroserviceInstance myself = RegistrationManager.INSTANCE.getMicroserviceInstance();<NEW_LINE>Map<String, MicroserviceInstance> instancesRegionAndAZMatch = new HashMap<>();<NEW_LINE>Map<String, MicroserviceInstance> instancesAZMatch = n... | instancesNoMatch = new HashMap<>(); |
488,328 | public void denoise(GrayF32 transform, int numLevels) {<NEW_LINE>int scale = UtilWavelet.computeScale(numLevels);<NEW_LINE>final int h = transform.height;<NEW_LINE>final int w = transform.width;<NEW_LINE>// width and height of scaling image<NEW_LINE>final int innerWidth = w / scale;<NEW_LINE>final int innerHeight = h /... | UtilDenoiseWavelet.estimateNoiseStdDev(subbandHH, null); |
1,004,203 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) {<NEW_LINE>setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME));<NEW_LINE>} else {<NEW_LINE>setPackageName("openapi");<NEW_LINE>}<NEW_LINE>if (additionalPro... | ("rebar.config.mustache", "", "rebar.config")); |
1,643,139 | public boolean clearRelation(String relationName) {<NEW_LINE>Set<PersistentResource> mine = filter(ReadPermission.class, Optional.empty(), ALL_FIELDS, getRelationUncheckedUnfiltered(relationName)).toList(LinkedHashSet::new).blockingGet();<NEW_LINE>checkFieldAwareDeferPermissions(UpdatePermission.class, relationName, Co... | (Collectors.toSet())); |
274,579 | void initMediaSessionMetadata() {<NEW_LINE>MediaMetadataCompat.Builder metadataBuilder = new MediaMetadataCompat.Builder();<NEW_LINE>// Notification icon in card<NEW_LINE>MediaMetaData md = RemoteControlCallback.getMetaData();<NEW_LINE>if (md == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (md.getDisplayIcon() != nu... | METADATA_KEY_DISPLAY_SUBTITLE, md.getSubtitle()); |
1,408,498 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>String key = DocValueFormat.<MASK><NEW_LINE>if (appendPrefixLength) {<NEW_LINE>key = key + "/" + prefixLength;<NEW_LINE>}<NEW_LINE>if (keyed) {<NEW_LINE>builder.startObject(key);<NEW_LINE>} else {<NEW_LINE>builder.st... | IP.format(this.key); |
263,144 | public void weave() {<NEW_LINE>getLogger().info("Artemis plugin started.");<NEW_LINE>if (!enableArtemisPlugin) {<NEW_LINE>getLogger().info("Plugin disabled via 'enableArtemisPlugin' set to false.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>// @todo provide gradle alternativ... | .replaceAll("\n", "")); |
273,181 | // NOI18N<NEW_LINE>@Hint(displayName = "#DN_org.netbeans.modules.java.hints.ClassStructure.noopMethodInAbstractClass", description = "#DESC_org.netbeans.modules.java.hints.ClassStructure.noopMethodInAbstractClass", category = "class_structure", enabled = false, suppressWarnings = { "NoopMethodInAbstractClass" }, option... | BlockTree body = mth.getBody(); |
1,141,458 | private List<Subspace> generateSubspaceCandidates(List<Subspace> subspaces) {<NEW_LINE>if (subspaces.isEmpty()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>StringBuilder msgFinest = LOG.isDebuggingFinest() ? new StringBuilder(1000) : null;<NEW_LINE>if (msgFinest != null) {<NEW_LINE>msgFinest.append("... | ()).append('\n'); |
1,678,209 | public void updateOrCreateWorkspace() throws IOException {<NEW_LINE>boolean workspaceUpdated = false;<NEW_LINE>Document workspaceDocument = null;<NEW_LINE>Path workspacePath = getWorkspacePath();<NEW_LINE>if (filesystem.exists(workspacePath)) {<NEW_LINE>try (InputStream workspaceFile = filesystem.newFileInputStream(wor... | .requireNonNull(workspaceDocument), workspaceFile); |
1,384,380 | final CreateConnectionResult executeCreateConnection(CreateConnectionRequest createConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
901,097 | private void packVector(AMD64MacroAssembler asm, AVXSize vecSize, Register src, Register dst, Register index, int displacement, boolean direct) {<NEW_LINE>int displacementSrc = displacement << scaleSrc.log2 - scaleDst.log2;<NEW_LINE>Register vec1 = asRegister(vectorTemp[0]);<NEW_LINE>Register vec2 = asRegister(vectorTe... | = asRegister(vectorTemp[2]); |
762,270 | private void removeFunctionsNotInProgram2(AddressSetView addrSet2, TaskMonitor monitor) throws CancelledException, UnsupportedOperationException {<NEW_LINE>if (!originToResultTranslator.isOneForOneTranslator()) {<NEW_LINE>String message = originToResultTranslator.getClass().getName() + " is not a one for one translator... | FunctionAddressIterator iter1 = new FunctionAddressIterator(funcIter1); |
423,153 | public void createMenuItems(Bundle savedInstanceState) {<NEW_LINE>final OsmandApplication app = getMyApplication();<NEW_LINE>Context context = getContext();<NEW_LINE>if (context == null || app == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>pluginId = savedInstanceState.getStr... | > addedAppModes = plugin.getAddedAppModes(); |
1,324,909 | public void splitStockMoveLinesUnit(ActionRequest request, ActionResponse response) {<NEW_LINE>try {<NEW_LINE>StockMove stockMove = request.getContext().asType(StockMove.class);<NEW_LINE>List<StockMoveLine> stockMoveLineContextList = (List<StockMoveLine>) request.getContext().get("stockMoveLineList");<NEW_LINE>stockMov... | find(stockMoveLineContext.getId()); |
1,589,507 | protected void prepare() {<NEW_LINE>ProcessInfoParameter[] para = getParameter();<NEW_LINE>for (int i = 0; i < para.length; i++) {<NEW_LINE>String name = para[i].getParameterName();<NEW_LINE>if (para[i].getParameter() == null)<NEW_LINE>;<NEW_LINE>else if (name.equals("AD_Client_ID"))<NEW_LINE>p_AD_Client_ID = para[i].g... | para[i].getParameterAsInt(); |
188,375 | public byte[] toBytes() {<NEW_LINE>ByteBuffer byteBuffer = ByteBuffer.allocate(chunkSize);<NEW_LINE>byteBuffer.order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>byteBuffer.clear();<NEW_LINE>byteBuffer.putShort(type);<NEW_LINE>byteBuffer.putShort(headSize);<NEW_LINE>byteBuffer.putInt(chunkSize);<NEW_LINE>byteBuffer.put(id);<NEW_... | put(new byte[chunkPadding]); |
91,084 | private void runActivities(@Nonnull UIAccess uiAccess, @Nonnull Deque<StartupActivity> activities, @Nonnull String phaseName) {<NEW_LINE>Activity activity = StartUpMeasurer.startMainActivity(phaseName);<NEW_LINE>while (true) {<NEW_LINE>StartupActivity startupActivity;<NEW_LINE>synchronized (myLock) {<NEW_LINE>startupAc... | toString(), StartUpMeasurer.MEASURE_THRESHOLD); |
1,253,930 | public int next(int targetRecordCount) {<NEW_LINE>try {<NEW_LINE>for (int outgoingIndex = 0; outgoingIndex < targetRecordCount; outgoingIndex++) {<NEW_LINE>if (queueSize == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int compoundIndex = vector4.get(0);<NEW_LINE>int batch = compoundIndex >>> 16;<NEW_LINE>assert batch < ... | get(batch).getNextIndex(); |
677,993 | protected void deactivate(ComponentContext context) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>Tr.entry(this, tc, "deactivate", context, _isChainActivated, _isChainDeactivated);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this,... | exit(this, tc, "deactivate"); |
1,221,719 | private static <T> T merge(T v1, T v2) {<NEW_LINE>if (v2 == null)<NEW_LINE>return v1;<NEW_LINE>if (v1 instanceof Collection) {<NEW_LINE>final Collection<Object> c1 = (Collection<Object>) v1;<NEW_LINE>final Collection<Object> c2 = (Collection<Object>) v2;<NEW_LINE>final Collection<Object> cm;<NEW_LINE>if (v1 instanceof ... | getClass().getName()); |
96,404 | private void updateOutline(@NotNull FlutterOutline outline) {<NEW_LINE>currentOutline = outline;<NEW_LINE>final DefaultMutableTreeNode rootNode = getRootNode();<NEW_LINE>rootNode.removeAllChildren();<NEW_LINE>outlinesWithWidgets.clear();<NEW_LINE>outlineToNodeMap.clear();<NEW_LINE>if (outline.getChildren() != null) {<N... | initalize(null, activeOutlines, currentFile); |
1,072,317 | protected void parseIntent(Context ctx, String action, Bundle bundle) {<NEW_LINE>if (ACTION_SPOTIFY_PLAYBACKSTATECHANGED.equals(action)) {<NEW_LINE>if (bundle.getBoolean("playing")) {<NEW_LINE>setState(MicroService.State.RESUME);<NEW_LINE>setIsSameAsCurrentTrack();<NEW_LINE>} else {<NEW_LINE>setState(MicroService.State... | ("track"), album, artist); |
545,537 | public static ModifySipAgentGroupResponse unmarshall(ModifySipAgentGroupResponse modifySipAgentGroupResponse, UnmarshallerContext context) {<NEW_LINE>modifySipAgentGroupResponse.setRequestId(context.stringValue("ModifySipAgentGroupResponse.RequestId"));<NEW_LINE>modifySipAgentGroupResponse.setSuccess(context.booleanVal... | (context.stringValue("ModifySipAgentGroupResponse.Message")); |
571,288 | public static String asString() {<NEW_LINE>final StringBuilder sb = new StringBuilder("Config{\n");<NEW_LINE>sb.append(" DEFAULT_BASE_DIR=").append(DEFAULT_BASE_DIR);<NEW_LINE>sb.append(",\n DEFAULT_BASE_CACHE_DIR=").append(DEFAULT_BASE_CACHE_DIR);<NEW_LINE>sb.append(",\n DEFAULT_BASE_LOG_FILE=").append(DEFAULT_BASE_LO... | (",\n debug=").append(debug); |
1,550,711 | public static void main(String[] args) {<NEW_LINE>Exercise24_PriorityQueueExplicitLinks<Integer>.PriorityQueueExplicitLinks priorityQueueExplicitLinks = new Exercise24_PriorityQueueExplicitLinks().new PriorityQueueExplicitLinks();<NEW_LINE>StdOut.println("isEmpty: " + priorityQueueExplicitLinks.isEmpty() + " Expected: ... | priorityQueueExplicitLinks.size() + " Expected: 4"); |
447,022 | public void viewDirection(ActionRequest request, ActionResponse response) {<NEW_LINE>AddressRepository addressRepository = Beans.get(AddressRepository.class);<NEW_LINE>try {<NEW_LINE>MapService mapService = Beans.get(MapService.class);<NEW_LINE>String key = null;<NEW_LINE>if (Beans.get(AppBaseService.class).getAppBase(... | mapView = new HashMap<>(); |
56,581 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>log.info("doGet from " + request.getRemoteHost() + " - " + request.getRemoteAddr());<NEW_LINE>String url = "/rfqs.jsp";<NEW_LINE>//<NEW_LINE>HttpSession <MASK><NEW_LINE>if (session == null || sess... | session = request.getSession(false); |
1,217,492 | /*<NEW_LINE>* @see com.sitewhere.microservice.security.SystemUserRunnable#runAsSystemUser()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void runAsSystemUser() throws SiteWhereException {<NEW_LINE>getLogger().info("Processing batch element: " + getUnprocessed().getBatchElement().getId().toString());<NEW_LINE>// Check... | request.setProcessingStatus(ElementProcessingStatus.Processing); |
460,103 | public static void safeDeleteFile(final String pathName) {<NEW_LINE>String <MASK><NEW_LINE>if (StringUtils.isNullOrWhitespaceOnly(userDir)) {<NEW_LINE>throw new RuntimeException("user.dir is empty");<NEW_LINE>}<NEW_LINE>File file = new File(pathName);<NEW_LINE>if (!file.getAbsolutePath().startsWith(userDir)) {<NEW_LINE... | userDir = System.getProperty("user.dir"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.