idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
180,753 | protected void doStart() throws Exception {<NEW_LINE>getConnectionFactories().stream().filter(ConnectionFactory.Configuring.class::isInstance).map(ConnectionFactory.Configuring.class::cast).forEach(configuring -> configuring.configure(this));<NEW_LINE>_shutdown = new Graceful.Shutdown(this) {<NEW_LINE><NEW_LINE>@Overri... | LOG.info("Started {}", this); |
690,973 | static byte[] convert(String source, FileFormat fileFormat, StructurizrPlantUMLExporter structurizrPlantUMLExporter, JsonObject options) {<NEW_LINE>StructurizrDslParser parser = new StructurizrDslParser();<NEW_LINE>try {<NEW_LINE>parser.parse(source);<NEW_LINE>Collection<View> views = parser.getWorkspace().getViews().g... | viewKey = options.getString("view-key"); |
66,898 | private SwapTarget findSwapTargetItem(SwapTarget dest, FindSwapTargetContext fc, boolean alternative) {<NEW_LINE>RecyclerView.ViewHolder swapTargetHolder = null;<NEW_LINE>dest.clear();<NEW_LINE>if ((fc.draggingItem == null) || (getWrappedAdapterPosition(fc.draggingItem) != RecyclerView.NO_POSITION && fc.draggingItem.ge... | final int swapTargetWrappedItemPosition = getWrappedAdapterPosition(swapTargetHolder); |
1,339,542 | private FileType loadFileType(@Nonnull Element typeElement, boolean isDefault) {<NEW_LINE>String fileTypeName = typeElement.getAttributeValue(ATTRIBUTE_NAME);<NEW_LINE>String fileTypeDescr = typeElement.getAttributeValue(ATTRIBUTE_DESCRIPTION);<NEW_LINE>String iconPath = typeElement.getAttributeValue("icon");<NEW_LINE>... | , parse(extensionsStr), isDefault); |
1,620,302 | private TornadoInstalledCode compileTask(SchedulableTask task) {<NEW_LINE>final CompilableTask executable = (CompilableTask) task;<NEW_LINE>final ResolvedJavaMethod resolvedMethod = TornadoCoreRuntime.getTornadoRuntime().resolveMethod(executable.getMethod());<NEW_LINE>final Sketch sketch = TornadoSketcher.lookup(resolv... | executable, providers, getBackend()); |
1,170,734 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.list_fragment, container, false);<NEW_LINE>mListView = view.findViewById(android.R.id.list);<NEW_LINE>mBackgroundList = view.findViewById(R.id.background_list);<NEW... | setImageResource(R.drawable.ic_nav_modules); |
1,732,444 | public Node writeDescriptor(Node parent, String nodeName, MessageSecurityDescriptor messageSecurityDesc) {<NEW_LINE>Node messageSecurityNode = super.writeDescriptor(parent, nodeName, messageSecurityDesc);<NEW_LINE>List<MessageDescriptor<MASK><NEW_LINE>if (!messageDescriptors.isEmpty()) {<NEW_LINE>MessageNode messageNod... | > messageDescriptors = messageSecurityDesc.getMessageDescriptors(); |
1,258,545 | public void doExecute(@Nonnull final Editor editor, @Nullable Caret caret, final DataContext dataContext) {<NEW_LINE>assert caret != null;<NEW_LINE>if (editor.isViewer() || !EditorModificationUtil.requestWriting(editor))<NEW_LINE>return;<NEW_LINE>if (!(editor.getDocument() instanceof DocumentEx)) {<NEW_LINE>myOriginalH... | LogicalPosition caretPosition = caret.getLogicalPosition(); |
1,291,707 | public static AnnotatedIntervalCollection create(final Path input, final Path inputConfigFile, final Set<String> headersOfInterest) {<NEW_LINE>IOUtils.assertFileIsReadable(input);<NEW_LINE>IOUtils.assertFileIsReadable(inputConfigFile);<NEW_LINE>final AnnotatedIntervalCodec codec = new AnnotatedIntervalCodec(inputConfig... | -> regions.add(r)); |
1,844,094 | public void refreshState() {<NEW_LINE>detailView.setVisible(this.model.supportsTwoViews());<NEW_LINE>final Collection<Unit> units = model.getMarkedUnits();<NEW_LINE>if (oldUnits.equals(units)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>oldUnits = units;<NEW_LINE>popupActionsSupport.tableDataChanged();<NEW_LINE>buttonsActio... | null, units.size()); |
1,149,856 | protected void consumeTypeReferenceWithModifiersAndAnnotations() {<NEW_LINE>// RelationalExpression ::= RelationalExpression 'instanceof' ReferenceType<NEW_LINE>// optimize the push/pop<NEW_LINE>int length;<NEW_LINE>Annotation[] typeAnnotations = null;<NEW_LINE>if ((length = this.expressionLengthStack[this.expressionLe... | intStack[this.intPtr--]); |
1,364,218 | public void handle(final HttpExchange t) throws IOException {<NEW_LINE>final String date = new Date().toString();<NEW_LINE>_sensors.get(_name).incrementAndGet();<NEW_LINE><MASK><NEW_LINE>Long delay = _delay;<NEW_LINE>if (headers.containsKey("delay")) {<NEW_LINE>List<String> headerValues = headers.get("delay");<NEW_LINE... | Headers headers = t.getRequestHeaders(); |
209,593 | private Path addSingleInput(Path path) throws IOException {<NEW_LINE>if (map.containsKey(path)) {<NEW_LINE>return map.get(path);<NEW_LINE>}<NEW_LINE>Preconditions.checkArgument(path.normalize().equals(path));<NEW_LINE>if (!path.startsWith(cellPathPrefix)) {<NEW_LINE>map.put(path, path);<NEW_LINE>return path;<NEW_LINE>}... | Path parent = path.getParent(); |
590,378 | public static void explodeBlock(World world, BlockPos pos) {<NEW_LINE>if (FMLCommonHandler.instance().getEffectiveSide().isClient()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>double x = pos.getX() + 0.5;<NEW_LINE>double y = pos.getY() + 0.5;<NEW_LINE>double z = pos.getZ() + 0.5;<NEW_LINE>Explosion explosion = new Explosio... | getAffectedBlockPositions().add(pos); |
1,064,872 | private void sendEventToJS(String eventName, @Nullable WritableMap params) {<NEW_LINE>boolean isBoundToJS = this.reactContext.hasActiveCatalystInstance();<NEW_LINE>Log.v(TAG, "[RNCallKeepModule] sendEventToJS, eventName: " + eventName + ", bound: " + isBoundToJS + ", hasListeners: " + hasListeners + " args : " + (param... | data.putMap("data", params); |
1,339,526 | private void addLine(float x1, float y1, float x2, float y2) {<NEW_LINE>// orientation of the line. 1 if y increases, 0 otherwise.<NEW_LINE>float or = 1;<NEW_LINE>if (y2 < y1) {<NEW_LINE>// no need to declare a temp variable. We have or.<NEW_LINE>or = y2;<NEW_LINE>y2 = y1;<NEW_LINE>y1 = or;<NEW_LINE>or = x2;<NEW_LINE>x... | x1) / (y2 - y1); |
955,854 | public void testJSAD_Receive_Message_P2PTest(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>boolean testFailed = false;<NEW_LINE>QueueConnectionFactory cf1 = (QueueConnectionFactory) new InitialContext().lookup("java:comp/env/jndi_JMS_BASE_QCF");<NEW_LINE>QueueConnection con = cf1... | queue1 = sessionSender.createQueue("alias2Q1"); |
966,445 | public void invoke() {<NEW_LINE>super.start();<NEW_LINE>this.followOutput(new Slf4jLogConsumer(logger()));<NEW_LINE>// wait for the compose container to stop, which should only happen after it has spawned all the service containers<NEW_LINE>logger().info("Docker Compose container is running for command: {}", Joiner.on(... | logger().trace("Compose container is still running"); |
1,550,199 | private Map<String, Library> _findLibraries() {<NEW_LINE>// use this module classloader<NEW_LINE>ClassLoader originalLoader = this.getClass().getClassLoader();<NEW_LINE>// NOI18N<NEW_LINE>LOGGER.// NOI18N<NEW_LINE>log(// NOI18N<NEW_LINE>Level.FINE, // NOI18N<NEW_LINE>"Scanning facelets libraries, current classloader cl... | null : super.findResource(name); |
487,562 | public boolean isReady() {<NEW_LINE>// sort of suboptional to have the isReady method to duplicate the checks in updateNotifications();<NEW_LINE>String name = nameField.getText();<NEW_LINE>if (name != null) {<NEW_LINE>if (name.trim().length() <= 0 || name.trim().length() >= MAX_NAME) {<NEW_LINE>return false;<NEW_LINE>}... | String s = masterProjectField.getText(); |
293,296 | protected void initTree() {<NEW_LINE>myTree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void valueChanged(TreeSelectionEvent e) {<NEW_LINE>final TreePath path = e.getOldLeadSelectionPath();<NEW_LINE>if (path != null) {<NEW_LINE>final MyNode nod... | getLastPathComponent()).getDisplayName(); |
994,415 | void sendHeartbeatSync(Node node) {<NEW_LINE>HeartbeatHandler heartbeatHandler = new HeartbeatHandler(localMember, node);<NEW_LINE>HeartBeatRequest req = new HeartBeatRequest();<NEW_LINE>req.setCommitLogTerm(request.commitLogTerm);<NEW_LINE>req.setCommitLogIndex(request.commitLogIndex);<NEW_LINE>req.setRegenerateIdenti... | req.setRequireIdentifier(request.requireIdentifier); |
1,392,683 | public void animatePositionGeo(final Point3d targetGeoLoc, final Point2d offset, Double hdg, final double howLong) {<NEW_LINE>if (!isCompletelySetup()) {<NEW_LINE>if (!rendererAttached) {<NEW_LINE>addPostSurfaceRunnable(() -> animatePositionGeo(targetGeoLoc, offset, hdg, howLong));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>... | new Quaternion(destPt, offsetLoc)); |
715,316 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, W... | this.duplicate(business, mapping); |
1,365,511 | public static void main(String[] args) {<NEW_LINE>Exercise33_ShortestPathInAGrid shortestPathInAGrid = new Exercise33_ShortestPathInAGrid();<NEW_LINE>StdOut.println("Moving either up, down, left or right:");<NEW_LINE>double[][] matrix1 = { { 0, 1 }, { 3, 1 } };<NEW_LINE>StdOut.print("Path: ");<NEW_LINE>Iterable<Dir... | shortestPath3 = shortestPathInAGrid.shortestPathInGridAll4Directions(matrix3); |
1,465,835 | public JComponent createComponent(@Nonnull ExternalModuleImportContext<C> context, @Nonnull Disposable uiDisposable) {<NEW_LINE>if (myComponent != null) {<NEW_LINE>return myComponent;<NEW_LINE>}<NEW_LINE>myControl = context.getImportProvider().getControl();<NEW_LINE>myComponent = new PaintAwarePanel(new GridBagLayout()... | FileChooserDescriptor fileChooserDescriptor = manager.getExternalProjectDescriptor(); |
614,416 | protected TableViewSWT<PEPiece> initYourTableView(String table_id) {<NEW_LINE>if (table_id == TableManager.TABLE_TORRENT_PIECES) {<NEW_LINE>tv = TableViewFactory.createTableViewSWT(PLUGIN_DS_TYPE, TableManager.TABLE_TORRENT_PIECES, getPropertiesPrefix(), basicItems, basicItems[0].getName(), SWT.SINGLE | SWT.FULL_SELECT... | basicItems, 0, items.length); |
99,071 | public ListArchiveRulesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListArchiveRulesResult listArchiveRulesResult = new ListArchiveRulesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | JsonToken token = context.getCurrentToken(); |
1,816,969 | public void writeRecords(final List<? extends OIdentifiable> resultSet, final int limit, final OCallable<Object, OIdentifiable> iAfterDump) {<NEW_LINE>final Map<String, Integer> columns = parseColumns(resultSet, limit);<NEW_LINE>if (columnSorting != null) {<NEW_LINE>Collections.sort(resultSet, new Comparator<Object>() ... | OIdentifiable) o2).getRecord(); |
1,511,098 | public void writeToText(TextWriterStream out, String label) {<NEW_LINE>if (label != null) {<NEW_LINE>out.commentPrintLn(label);<NEW_LINE>}<NEW_LINE>out.commentPrintLn("Model class: " + <MASK><NEW_LINE>out.commentPrintLn("Centroid: " + FormatUtil.format(getPrototype()));<NEW_LINE>out.commentPrintLn("Strong Eigenvectors:... | getClass().getName()); |
1,644,317 | private OrderLineCandidate toOrderLineCandidate(final QuickInput quickInput) {<NEW_LINE>final IOrderLineQuickInput orderLineQuickInput = quickInput.getQuickInputDocumentAs(IOrderLineQuickInput.class);<NEW_LINE>// Validate quick input:<NEW_LINE>final BigDecimal quickInputQty = orderLineQuickInput.getQty();<NEW_LINE>if (... | warn("Invalid Qty={} for {}", quickInputQty, orderLineQuickInput); |
1,656,326 | public void marshall(StartChildWorkflowExecutionInitiatedEventAttributes startChildWorkflowExecutionInitiatedEventAttributes, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startChildWorkflowExecutionInitiatedEventAttributes == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(..... | startChildWorkflowExecutionInitiatedEventAttributes.getWorkflowType(), WORKFLOWTYPE_BINDING); |
649,320 | public File[] makeZipFile(String filename) {<NEW_LINE>File indexFile = null;<NEW_LINE>File stackFile = null;<NEW_LINE>ZipOutputStream zos = null;<NEW_LINE>File zipFile = new File(filename + ".zip");<NEW_LINE>try {<NEW_LINE>zos = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipFile)));<NEW_LINE>zos.... | = new File(filename + ".inx"); |
1,545,088 | public Object createGeospatialQuery(String geolocationColumnName, Object shape, Object query) {<NEW_LINE>Circle circle = (Circle) shape;<NEW_LINE>List circleList = new ArrayList();<NEW_LINE>// Centre<NEW_LINE>circleList.add(new double[] { circle.getCentre().x, circle<MASK><NEW_LINE>// of<NEW_LINE>// circle<NEW_LINE>// ... | .getCentre().y }); |
103,524 | private static void addFixedSplit(final List<Integer> splitPoints, final List<GenomeLoc> locs, final long locsSize, final int startIndex, final int stopIndex, final int numParts) {<NEW_LINE><MASK><NEW_LINE>if (numParts < 2) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int halfParts = (numParts + 1) / 2;<NEW_LINE>final ... | Utils.nonNull(splitPoints, "splitPoints is null"); |
171,086 | public void show(View anchor, float anchorOverlap) {<NEW_LINE>updateItems();<NEW_LINE>if (mSystemUiVisibilityHelper != null)<NEW_LINE><MASK><NEW_LINE>// don't steal the focus, this will prevent the keyboard from changing<NEW_LINE>setFocusable(false);<NEW_LINE>// draw over stuff if needed<NEW_LINE>setClippingEnabled(fal... | mSystemUiVisibilityHelper.copyVisibility(getContentView()); |
1,842,898 | final UpdateRulesOfIpGroupResult executeUpdateRulesOfIpGroup(UpdateRulesOfIpGroupRequest updateRulesOfIpGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateRulesOfIpGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
401,075 | public void bindViewHolder(FlexibleAdapter adapter, ViewHolder viewHolder, int position, List<Object> payloads) {<NEW_LINE>Context context = viewHolder.itemView.getContext();<NEW_LINE>viewHolder.accountColorIndicator.setBackgroundColor(getAccountColorIndicator());<NEW_LINE>viewHolder.accountColorIndicatorBack.setBackgr... | tvContactCount.setText(getContactCount()); |
40,832 | public Condition createPredicateReference(@Nullable DbColumn theSourceJoinColumn, String theResourceName, String theParamName, List<String> theQualifiers, List<? extends IQueryParameterType> theList, SearchFilterParser.CompareOperation theOperation, RequestDetails theRequest, RequestPartitionId theRequestPartitionId, S... | theQualifiers, theList, theOperation, theRequestPartitionId); |
616,249 | @Nonnull<NEW_LINE>public EnumActionResult onItemUse(@Nonnull EntityPlayer player, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumHand hand, @Nonnull EnumFacing side, float hitX, float hitY, float hitZ) {<NEW_LINE>if (world.isRemote) {<NEW_LINE>return EnumActionResult.SUCCESS;<NEW_LINE>}<NEW_LINE>Block condui... | placeAt = pos.offset(side); |
1,068,621 | final ListWorkteamsResult executeListWorkteams(ListWorkteamsRequest listWorkteamsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listWorkteamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,846,593 | protected MultiGetShardResponse shardOperation(MultiGetShardRequest request, ShardId shardId) {<NEW_LINE>IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());<NEW_LINE>IndexShard indexShard = indexService.getShard(shardId.id());<NEW_LINE>if (request.refresh() && request.realtime() == false) {... | .id()), e); |
1,688,597 | private ObjectVector filterLimitedModules(IPath jrtPath, ObjectVector imageRoots, List<String> rootModuleNames) {<NEW_LINE>Set<String> limitModulesSet = new HashSet<>(rootModuleNames);<NEW_LINE>ModuleLookup lookup = new ModuleLookup(jrtPath.toFile());<NEW_LINE>// collect all module roots:<NEW_LINE>for (int i = 0; i < i... | lookup.resultModuleSet.size()); |
1,609,324 | protected void registerParamAnnotations() {<NEW_LINE>{<NEW_LINE>registerParameterAnnotation(PathParam.class, (param, data, paramIndex) -> {<NEW_LINE>final String name = param.value();<NEW_LINE>checkState(emptyToNull(name<MASK><NEW_LINE>nameParam(data, name, paramIndex);<NEW_LINE>});<NEW_LINE>registerParameterAnnotation... | ) != null, "PathParam.value() was empty on parameter %s", paramIndex); |
1,369,439 | protected static // }<NEW_LINE>String calculateExtraClassPath(Class<?> cls, Path... paths) throws Exception {<NEW_LINE>List<String> jars = new ArrayList<>();<NEW_LINE>jars.addAll(calculateExtraClassPathDefault());<NEW_LINE>Module module = cls.getAnnotation(Module.class);<NEW_LINE>for (String str : module.storeJars()) {... | add(file.getAbsolutePath()); |
1,538,477 | final CreateSubscriberResult executeCreateSubscriber(CreateSubscriberRequest createSubscriberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createSubscriberRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateSubscriberRequest> ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
52,179 | public void start() {<NEW_LINE>UlimitCheck.printUlimits();<NEW_LINE>videobridgeExpireThread.start();<NEW_LINE>// <conference><NEW_LINE>ProviderManager.addIQProvider(ColibriConferenceIQ.ELEMENT, ColibriConferenceIQ.NAMESPACE, new ColibriConferenceIqProvider());<NEW_LINE>// <force-shutdown><NEW_LINE>ForcefulShutdownIqPro... | ELEMENT, UdpCandidatePacketExtension.NAMESPACE, udpCandidatePacketExtensionProvider); |
1,154,837 | public Object _01_louvainParallel() {<NEW_LINE>return runQuery(db, "CALL algo.louvain(null, null, {maxIterations:1, concurrency:" + threads + "}) " + "YIELD loadMillis, computeMillis, writeMillis, nodes, communityCount, iterations", r -> {<NEW_LINE>long load = r.getNumber("loadMillis").longValue();<NEW_LINE>long comput... | out.println("iter = " + iter); |
1,136,361 | public void assemble() {<NEW_LINE>BuildOperationLogger operationLogger = getOperationLoggerFactory().newOperationLogger(getName(), getTemporaryDir());<NEW_LINE>boolean cleanedOutputs = StaleOutputCleaner.cleanOutputs(getDeleter(), getOutputs().getPreviousOutputFiles(), getObjectFileDir());<NEW_LINE>DefaultAssembleSpec ... | (NativePlatformInternal) targetPlatform.get(); |
922,218 | public static HttpPutClientInvocation createUpdateInvocation(IBaseResource theResource, String theResourceBody, IIdType theId, FhirContext theContext) {<NEW_LINE>String resourceName = theContext.getResourceType(theResource);<NEW_LINE>StringBuilder urlBuilder = new StringBuilder();<NEW_LINE>urlBuilder.append(resourceNam... | theContext, theResourceBody, false, urlExtension); |
1,846,684 | public FileObject fromServer(Project project, URL serverUrl) {<NEW_LINE>String <MASK><NEW_LINE>String prefix = JsTestDriver.getServerURL();<NEW_LINE>if (!prefix.endsWith("/")) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>prefix += "/";<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>prefix += "test/";<NEW_LINE>if (!serverU.... | serverU = WebUtils.urlToString(serverUrl); |
1,588,647 | public static HttpService createDefaultConfig(Config c) {<NEW_LINE>final Config param = c;<NEW_LINE>try {<NEW_LINE>ConfigSupport.apply(new SingleConfigCode<Config>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object run(Config param) throws PropertyVetoException, TransactionFailure {<NEW_LINE>HttpService httpServic... | httpService.createChild(VirtualServer.class); |
1,393,017 | private Mono<Response<LoadTestResourceInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String loadTestName, LoadTestResourceInner loadTestResource, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() ==... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
327,221 | public Object parseContent(Object object, JSONObject exJson) throws Exception {<NEW_LINE>object = JSONObject.toJSON(object);<NEW_LINE>if (object instanceof JSONObject) {<NEW_LINE>JSONObject jsonObject = (JSONObject) object;<NEW_LINE>if ("innerFun".equals(jsonObject.getString("__innerType__"))) {<NEW_LINE>String name = ... | get(key), exJson)); |
1,531,676 | public static List<SupervisorSummary> mkSupervisorSummaries(Map<String, SupervisorInfo> supervisorInfos, Map<String, Assignment> assignments) {<NEW_LINE>Map<String, Integer> supervisorToLeftSlotNum = new HashMap<>();<NEW_LINE>for (Entry<String, Assignment> entry : assignments.entrySet()) {<NEW_LINE>Set<ResourceWorkerSl... | String supervisorId = worker.getNodeId(); |
249,265 | public void reduce(final IntWritable key, final Iterator<Text> values, OutputCollector<IntWritable, Text> output, final Reporter reporter) throws IOException {<NEW_LINE>String component_id_str = "";<NEW_LINE>Set<Integer> from_nodes_set <MASK><NEW_LINE>boolean self_contained = false;<NEW_LINE>String line = "";<NEW_LINE>... | = new HashSet<Integer>(); |
1,105,988 | public List<String> applyRuntimeToFile(File dataFile, Integer retries) throws IOException, NoSuchMethodException, InterruptedException {<NEW_LINE>// Vars Required in function<NEW_LINE>Process runtime;<NEW_LINE>String pythonVersion = runtimeVersion();<NEW_LINE>Integer retriesRemaining = retries - 1;<NEW_LINE>String stde... | ).forEachRemaining(results::add); |
79,245 | private I_M_ProductPrice buildNewProductPriceRecord(@NonNull final CreateProductPriceRequest request) {<NEW_LINE>final I_M_ProductPrice record = InterfaceWrapperHelper.newInstance(I_M_ProductPrice.class);<NEW_LINE>record.setAD_Org_ID(request.getOrgId().getRepoId());<NEW_LINE>record.setM_Product_ID(request.getProductId(... | getUomId().getRepoId()); |
536,498 | final GetQueueAttributesResult executeGetQueueAttributes(GetQueueAttributesRequest getQueueAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getQueueAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.SERVICE_ID, "SQS"); |
1,644,323 | public static Object intoFlipper(EditorValue editorValue) {<NEW_LINE>return editorValue.when(new EditorValue.EditorVisitor<Object>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object isShape(EditorShape object) {<NEW_LINE>FlipperObject.Builder bb = new FlipperObject.Builder();<NEW_LINE>for (Map.Entry<String, Editor... | .put((FlipperValue) flipper); |
504,939 | public static synchronized MetaPushConsumer mkInstance(MetaClientConfig config, MessageListenerConcurrently listener) throws Exception {<NEW_LINE>String topic = config.getTopic();<NEW_LINE>String groupId = config.getConsumerGroup();<NEW_LINE>String key = groupId;<NEW_LINE>MetaPushConsumer consumer = consumers.get(key);... | String nameServer = config.getNameServer(); |
1,240,281 | protected void startReceiver() {<NEW_LINE>int receiverThreadCount = config.getReceiverThreadCount();<NEW_LINE>for (int i = 0; i < receiverThreadCount; i++) {<NEW_LINE>Worker receiver = new Worker("DTLS-Cluster-" + getNodeID() + "-Receiver-" + i + "-" + clusterInternalSocketAddress) {<NEW_LINE><NEW_LINE>private final by... | = new byte[inboundDatagramBufferSize + MAX_DATAGRAM_OFFSET]; |
531,622 | boolean checkEquivalence(ZooKeeperClient zkc, String path) {<NEW_LINE>try {<NEW_LINE>LogSegmentMetadata other = FutureUtils.result(read(zkc, path));<NEW_LINE>if (LOG.isTraceEnabled()) {<NEW_LINE>LOG.trace("Verifying {} against {}", this, other);<NEW_LINE>}<NEW_LINE>boolean retVal;<NEW_LINE>// All fields may not be comp... | this + " and data in " + path, e); |
1,453,184 | private void initGeneralMessageClass() {<NEW_LINE>for (AccountType accountType : AccountType.values()) {<NEW_LINE>messageClassMap.put(new WeixinMessageKey(MessageType.text.name(), null, accountType), TextMessage.class);<NEW_LINE>messageClassMap.put(new WeixinMessageKey(MessageType.image.name(), null, accountType), Imag... | , accountType), LocationMessage.class); |
354,282 | private static void logState(PartitionDegraderLoadBalancerState oldState, PartitionDegraderLoadBalancerState newState, int partitionId, DegraderLoadBalancerStrategyConfig config, List<DegraderTrackerClient> unHealthyClients, boolean clientDegraded) {<NEW_LINE>Map<URI, Integer<MASK><NEW_LINE>final int LOG_UNHEALTHY_CLIE... | > pointsMap = newState.getPointsMap(); |
1,062,749 | private void split(MAsset asset) {<NEW_LINE>asset.changeStatus(MAsset.A_ASSET_STATUS_Preservation, getDateDoc());<NEW_LINE>// Update Product Balance<NEW_LINE>MAssetProduct assetProduct = MAssetProduct.getCreate(getCtx(), getA_Asset_ID(), asset.getM_Product_ID(), asset.getM_AttributeSetInstance_ID(), get_TrxName());<NEW... | assetBalance.setA_Asset_Remaining_F(BigDecimal.ZERO); |
1,484,878 | public RollingUpdateOp start(final DeploymentGroup deploymentGroup, final ZooKeeperClient client) throws KeeperException {<NEW_LINE>client.ensurePath(Paths.statusDeploymentGroupTasks());<NEW_LINE>final List<ZooKeeperOperation> ops = Lists.newArrayList();<NEW_LINE>final List<Map<String, Object>> events = Lists.newArrayL... | > rolloutTasks = tasks.getRolloutTasks(); |
531,443 | public static int interpolateColor(int[] colors, float proportion) {<NEW_LINE>int rTotal = 0<MASK><NEW_LINE>// We correct the ratio to colors.length - 1 so that<NEW_LINE>// for i == colors.length - 1 and p == 1, then the final ratio is 1 (see below)<NEW_LINE>float p = proportion * (colors.length - 1);<NEW_LINE>for (int... | , gTotal = 0, bTotal = 0; |
74,299 | public Object evaluate(EditorAdaptor vim, Queue<String> command) {<NEW_LINE>try {<NEW_LINE>if (command.size() != 2 || command.peek().length() != 1) {<NEW_LINE>throw new IllegalArgumentException(":surround expects a character key and a definition");<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>String[] surroundDef = command.poll... | String key = command.poll(); |
663,244 | private RouteSearchParameters processRouteRequestOptions(RouteSearchParameters params) throws StatusCodeException {<NEW_LINE>params = processRequestOptions(routeOptions, params);<NEW_LINE>if (routeOptions.hasProfileParams())<NEW_LINE>params.setProfileParams(convertParameters(routeOptions, params.getProfileType()));<NEW... | setRoundTripLength(roundTripOptions.getLength()); |
1,670,510 | private void addSetterInPathOccurrence(String propertyPath, String[] pathTokens, SpringBean bean, TypeMirror beanType, Collection<ExecutableElement> methods, List<Occurrence> result) throws BadLocationException {<NEW_LINE>Location loc = bean.getLocation();<NEW_LINE>if (loc == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LIN... | = new PropertyChildFinder(syntaxSupport, beanOffset); |
1,053,066 | static Object autofuzz(FuzzedDataProvider data, Method method, AutofuzzCodegenVisitor visitor) {<NEW_LINE>Object result;<NEW_LINE>if (Modifier.isStatic(method.getModifiers())) {<NEW_LINE>if (visitor != null) {<NEW_LINE>// This group will always have two elements: The class name and the method call.<NEW_LINE>visitor.pus... | data, method, thisObject, visitor); |
1,674,891 | public FileKey requestRoomRescueKey(Long fileId, String version, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'fileId' is set<NEW_LINE>if (fileId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'fileId' whe... | localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
865,216 | private void undefinePlays(ThingType thingType, Set<PlaysConstraint> playsConstraints) {<NEW_LINE>try (ThreadTrace ignored = traceOnThread(TRACE_PREFIX + "undefine_plays")) {<NEW_LINE>playsConstraints.forEach(plays -> {<NEW_LINE>Type roleType = getRoleType(plays.role().label().get());<NEW_LINE>if (roleType == null && !... | unsetPlays(roleType.asRoleType()); |
695,635 | public Stream<MapResult> parallel2(@Name("fragment") String fragment, @Name("params") Map<String, Object> params, @Name("parallelizeOn") String key) {<NEW_LINE>if (params == null)<NEW_LINE>return Cypher.runCypherQuery(tx, fragment, params);<NEW_LINE>if (key == null || !params.containsKey(key))<NEW_LINE>throw new Runtim... | int total = coll.size(); |
1,322,276 | public JsonStructure forward(MediaContent content) {<NEW_LINE>Media media = content.media;<NEW_LINE>JsonObjectBuilder mediaJson = json.createObjectBuilder();<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_BITRATE, media.bitrate);<NEW_LINE>if (media.copyright == null) {<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_COPYRIGHT, JsonValu... | add(FULL_FIELD_NAME_WIDTH, media.width); |
831,811 | private static EndpointRequest createEndpointRequestData() {<NEW_LINE>HashMap<String, List<String>> customAttributes = new HashMap<>();<NEW_LINE>List<String> favoriteTeams = new ArrayList<>();<NEW_LINE>favoriteTeams.add("Lakers");<NEW_LINE>favoriteTeams.add("Warriors");<NEW_LINE>customAttributes.put("team", favoriteTea... | .format(new Date()); |
1,603,577 | private void loadNode241() {<NEW_LINE>AddressSpaceFileTypeNode node = new AddressSpaceFileTypeNode(this.context, Identifiers.NamespaceMetadataType_NamespaceFile, new QualifiedName(0, "NamespaceFile"), new LocalizedText("en", "NamespaceFile"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.val... | .expanded(), true)); |
1,035,756 | final ListDeviceFleetsResult executeListDeviceFleets(ListDeviceFleetsRequest listDeviceFleetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDeviceFleetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,804,028 | protected void layoutChildren() {<NEW_LINE>super.layoutChildren();<NEW_LINE>double sw = sampleNode.getLayoutBounds().getWidth();<NEW_LINE>double sh = sampleNode.getLayoutBounds().getHeight();<NEW_LINE>double scale = Math.min(getWidth() / sw, getHeight() / sh);<NEW_LINE>if (resizable) {<NEW_LINE>sw *= scale;<NEW_LINE>sh... | HPos.CENTER, VPos.CENTER); |
1,004,694 | public com.amazonaws.services.dynamodbv2.model.ContinuousBackupsUnavailableException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.dynamodbv2.model.ContinuousBackupsUnavailableException continuousBackupsUnavailableException = new com.amazonaws.services.dynamod... | int originalDepth = context.getCurrentDepth(); |
399,543 | private static RecordChangeLogEntry retrieveLogEntry(@NonNull final ResultSet rs, @NonNull final AdTableId tableId) throws SQLException {<NEW_LINE>final POInfo poInfo = POInfo.getPOInfo(tableId);<NEW_LINE>final RecordChangeLogEntryValuesResolver valueResolver = adTabled2RecordChangeLogEntryValuesResolver.getOrLoad(tabl... | .getString("OldValue"), columnName); |
127,351 | public void process(List<List<Map<String, Object>>> resultList, boolean readonly) {<NEW_LINE>DatasourceStatus datasourceStatus = new DatasourceStatus();<NEW_LINE>datasourceStatus.setDbSynStatus(DbSynEnum.DB_SYN_NORMAL);<NEW_LINE>datasourceStatus.setSlaveBehindMaster(false);<NEW_LINE>Map<String, Object> result = resultL... | "BEHIND"))).doubleValue(); |
1,173,808 | private void showRenderXMLResponse(SampleResult res) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>results.setContentType("text/xml");<NEW_LINE>results.setCaretPosition(0);<NEW_LINE>byte[] source = res.getResponseData();<NEW_LINE>final ByteArrayInputStream baIS = new ByteArrayInputStream(source);<NEW_LINE>for (int i = 0; i < sour... | ExpandPopupMenu().add(domTreePanel); |
509,035 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String galleryName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
81,448 | public void detectAPILeaks(ASTNode typeNode, TypeBinding type) {<NEW_LINE>if (environment().useModuleSystem) {<NEW_LINE>// NB: using an ASTVisitor yields more precise locations than a TypeBindingVisitor would<NEW_LINE>ASTVisitor visitor = new ASTVisitor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean visit(Sin... | (NestedTypeBinding) referenceBinding).enclosingType); |
153,552 | public void init(final InstanceConfig config) {<NEW_LINE>Properties properties = config.getProps();<NEW_LINE>Properties nacosProperties = new Properties();<NEW_LINE>this.groupName = properties.getProperty("groupName", "DEFAULT_GROUP");<NEW_LINE>this.serviceName = properties.getProperty("serviceName", "shenyu-instances"... | (PropertyKeyConst.USERNAME, "")); |
1,292,512 | private String guessPackageName(FileObject f) {<NEW_LINE>java.io.Reader r = null;<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>r = new BufferedReader(new InputStreamReader(f<MASK><NEW_LINE>boolean noPackage = false;<NEW_LINE>for (; ; ) {<NEW_LINE>String line = ((BufferedReader) r).readLine();<NEW_LINE>if (line == null) {... | .getInputStream(), "utf-8")); |
854,581 | final GetWirelessGatewayTaskResult executeGetWirelessGatewayTask(GetWirelessGatewayTaskRequest getWirelessGatewayTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getWirelessGatewayTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | endClientExecution(awsRequestMetrics, request, response); |
933,371 | public static String actionURI(HttpServletRequest request) {<NEW_LINE>// Log.info(this, "URI = '"+request.getRequestURI());<NEW_LINE>// Log.info(this, "Context Path = '"+request.getContextPath()+"'");<NEW_LINE>// Log.info(this, "Servlet path = '"+request.getServletPath()+"'");<... | String contextPath = servletCxt.getContextPath(); |
1,335,014 | private File launchReport(MPrintFormat pf, HttpServletRequest request, GridTab m_curTab, MQuery m_query) {<NEW_LINE>int Record_ID = 0;<NEW_LINE>WebSessionCtx wsc = WebSessionCtx.get(request);<NEW_LINE>WWindowStatus <MASK><NEW_LINE>// Instance pInstance = new MPInstance (wsc.ctx, 0, 0);<NEW_LINE>File fileName = null;<NE... | ws = WWindowStatus.get(request); |
146,413 | private Future<ZooKeeperAdmin> connect(ZKClientConfig clientConfig) {<NEW_LINE>Promise<ZooKeeperAdmin> connected = Promise.promise();<NEW_LINE>try {<NEW_LINE>ZooKeeperAdmin zkAdmin = zooAdminProvider.createZookeeperAdmin(this.zookeeperConnectionString, zkAdminSessionTimeoutMs, watchedEvent -> LOGGER.debugCr(reconciliat... | LOGGER.warnCr(reconciliation, message); |
456,773 | protected void executeImpl(Connection metaDbConnection, ExecutionContext executionContext) {<NEW_LINE>LOGGER.info(String.format("start write meta during cutOver for primary table: %s.%s", schemaName, logicalTableName));<NEW_LINE>updateSupportedCommands(true, false, metaDbConnection);<NEW_LINE>// allowing use hint to sk... | logicalTableName, targetTableName, single, broadcast); |
1,657,171 | public static Tuple2<DenseMatrix, DenseMatrix> calculateLambdaAndAlpha(DenseMatrix lambda, DenseMatrix alpha, DenseMatrix wordTopicStat, DenseMatrix logPhat, long nonEmptyDocsN, int iterNum, double tau0, double kappa, double eta, double subSampleRatio, int numTopic, boolean optimizeDocConcentration) {<NEW_LINE>DenseMat... | Tuple2<>(lambda, alpha); |
1,137,151 | public void processEvent(SystemEvent event) {<NEW_LINE>Map<String, Object> scope = null;<NEW_LINE>if (event instanceof PreDestroyViewMapEvent) {<NEW_LINE>UIViewRoot viewRoot = (UIViewRoot) ((PreDestroyViewMapEvent) event).getComponent();<NEW_LINE>scope = viewRoot.getViewMap(false);<NEW_LINE>if (scope == null) {<NEW_LIN... | value = scope.get(key); |
176,124 | private SqlAndParamsExtractor<ImpDataLine> createInsertIntoImportTableSql() {<NEW_LINE>final String tableName = importTableDescriptor.getTableName();<NEW_LINE>final String keyColumnName = importTableDescriptor.getKeyColumnName();<NEW_LINE>final StringBuilder sqlColumns = new StringBuilder();<NEW_LINE>final StringBuilde... | dataLine.getErrorMessageAsStringOrNull(errorMaxLength))); |
265,496 | private MultiplexedRequest buildSequential() throws RestLiEncodingException {<NEW_LINE>Map<Integer, Callback<RestResponse>> callbacks = new HashMap<>(_requestsWithCallbacks.size());<NEW_LINE>// Dependent requests - requests which are dependent on the current request (executed after the current request)<NEW_LINE>Individ... | toMultiplexedRequest(dependentRequests, callbacks, _requestOptions); |
428,254 | public static void openURL(String url) {<NEW_LINE>try {<NEW_LINE>// Since Java6 this is a much easier method to open the browser<NEW_LINE>if (Desktop.isDesktopSupported()) {<NEW_LINE>Desktop desktop = Desktop.getDesktop();<NEW_LINE>desktop.browse(new URI(url));<NEW_LINE>} else // Only if desktop is not supported we try... | fileMgr = Class.forName("com.apple.eio.FileManager"); |
1,402,322 | private ChangeEventType doPoll() {<NEW_LINE>if (Files.exists(path)) {<NEW_LINE>ChangeEventType response;<NEW_LINE>if (exists) {<NEW_LINE>// existed and exists now, let's see if modified<NEW_LINE>Instant instant = Instant.now();<NEW_LINE>try {<NEW_LINE>instant = Files.getLastModifiedTime(path).toInstant();<NEW_LINE>} ca... | path.toAbsolutePath(), e); |
775,976 | public static void inspectMapData(String label, byte[] data, int mode) {<NEW_LINE>if (data == null)<NEW_LINE>return;<NEW_LINE>StringBuilder buffer = new StringBuilder();<NEW_LINE>buffer.append("\n>-----------------------------------------------------------------------------<\n");<NEW_LINE>buffer.append(new SimpleDateFo... | toChar(data[k])); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.