idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
354,022 | private void updateNodeInfoFromReportedState(final NodeInfo node, final NodeState currentState, final NodeState reportedState, final NodeStateOrHostInfoChangeHandler nodeListener) {<NEW_LINE>final long timeNow = timer.getCurrentTimeInMillis();<NEW_LINE>log.log(Level.FINE, () -> String.format("Finding new cluster state ... | " to " + node.getInitProgressTime()); |
1,752,892 | private static void printManagamentStatistic() {<NEW_LINE>OperatingSystemMXBean osMxBean = ManagementFactory.getOperatingSystemMXBean();<NEW_LINE>int processors = osMxBean.getAvailableProcessors();<NEW_LINE>RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();<NEW_LINE>Logger logger = STATISTIC_LOGGER;<NE... | ] ids = threadMxBean.getAllThreadIds(); |
1,677,239 | public static final <V> V executeDirect(Callable<V> exe, Duration totalWaitTime) throws BackendException {<NEW_LINE>Preconditions.checkArgument(!totalWaitTime.isZero(), "Need to specify a positive waitTime: %s", totalWaitTime);<NEW_LINE>long maxTime = System.currentTimeMillis() + totalWaitTime.toMillis();<NEW_LINE>Dura... | exe.toString(), e); |
1,119,333 | private Maybe<String> evaluateAndFormat() {<NEW_LINE>Maybe<Double> evaluation = (new Expression(expression)).evaluate();<NEW_LINE>if (evaluation.isNothing()) {<NEW_LINE>return Maybe.nothingBecause("invalid expression: " + expression);<NEW_LINE>}<NEW_LINE>Double result = evaluation.getValue();<NEW_LINE>Long iResult = Ma... | format, result.toString()); |
1,496,818 | void initiateClose(boolean saveState) {<NEW_LINE>log.trace("initiateClose(saveState={}) {}", saveState, getExtent());<NEW_LINE>MinorCompactionTask mct = null;<NEW_LINE>synchronized (this) {<NEW_LINE>if (isClosed() || isClosing()) {<NEW_LINE>String msg = "Tablet " + getExtent() + " already " + closeState;<NEW_LINE>throw... | checkState(closeState == CloseState.CLOSING); |
804,671 | public static List<RBAC> translate(String authorizationPolicy) throws IllegalArgumentException, IOException {<NEW_LINE>Object jsonObject = JsonParser.parse(authorizationPolicy);<NEW_LINE>if (!(jsonObject instanceof Map)) {<NEW_LINE>throw new IllegalArgumentException("Authorization policy should be a JSON object. Found:... | JsonUtil.getListOfObjects(json, "allow_rules"); |
1,592,226 | public void resize(DataObject dataObject, AsyncCompletionCallback<CreateCmdResult> callback) {<NEW_LINE>String scaleIOVolumePath = null;<NEW_LINE>String errMsg = null;<NEW_LINE>try {<NEW_LINE>if (dataObject.getType() == DataObjectType.VOLUME) {<NEW_LINE>scaleIOVolumePath = ((VolumeInfo) dataObject).getPath();<NEW_LINE>... | + dataObject.getType() + ") passed to resize"; |
861,495 | private <T> IQueryBuilder<T> toQueryBuilder(final Class<T> clazz, final String trxName) {<NEW_LINE>final String tableName = InterfaceWrapperHelper.getTableName(clazz);<NEW_LINE>final POInfo poInfo = POInfo.getPOInfo(tableName);<NEW_LINE>final IQueryBuilder<T> queryBuilder = Services.get(IQueryBL.class).createQueryBuild... | queryBuilder.addEqualsFilter(COLUMNNAME_M_CostElement_ID, costElementId); |
1,795,211 | public void check() {<NEW_LINE>boolean isTrue = this.type == 1 || this.type == 2 || this.type == 3 || this.type == 4;<NEW_LINE>ValidatorUtils.checkArgument(isTrue, "click type should be one of 1: customize action, 2: open url, 3: open app, 4: open rich media");<NEW_LINE>switch(this.type) {<NEW_LINE>case 1:<NEW_LINE>Val... | .matches(PATTERN), "url must start with https"); |
1,551,916 | public UsageAllocation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UsageAllocation usageAllocation = new UsageAllocation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken... | String currentParentElement = context.getCurrentParentElement(); |
103,830 | public void visitSerializableProperties(final Object object, final JavaBeanProvider.Visitor visitor) {<NEW_LINE>final PropertyDescriptor[] propertyDescriptors = getSerializableProperties(object);<NEW_LINE>for (final PropertyDescriptor property : propertyDescriptors) {<NEW_LINE>ErrorWritingException ex = null;<NEW_LINE>... | String name = property.getName(); |
1,500,468 | private static void failIfCorrupted(Directory directory) throws IOException {<NEW_LINE>final String[] files = directory.listAll();<NEW_LINE>List<CorruptIndexException> ex = new ArrayList<>();<NEW_LINE>for (String file : files) {<NEW_LINE>if (file.startsWith(CORRUPTED_MARKER_NAME_PREFIX)) {<NEW_LINE>try (ChecksumIndexIn... | in = StreamInput.wrap(buffer); |
230,594 | public <A, R> EntryStream<K, R> collapseKeys(Collector<? super V, A, R> collector) {<NEW_LINE>Supplier<A> supplier = collector.supplier();<NEW_LINE>BiConsumer<A, ? super V> accumulator = collector.accumulator();<NEW_LINE>BinaryOperator<A<MASK><NEW_LINE>Function<A, R> finisher = collector.finisher();<NEW_LINE>return new... | > combiner = collector.combiner(); |
1,377,179 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String stmtTextOne = "@public insert into MyStream select 1 as dummy, transpose(custom('O' || theString, 10)) from SupportBean(theString like 'I%')";<NEW_LINE>env.compileDeploy(stmtTextOne, path);<NEW_LINE>String ... | (Pair) result.getUnderlying(); |
1,811,456 | public void process(T image) {<NEW_LINE>Objects.requireNonNull(norm_to_pixel, "You must set norm_to_pixel first");<NEW_LINE>BoofMiscOps.checkTrue(width != 0 && height != 0, "You must specify width and height");<NEW_LINE>frameID++;<NEW_LINE>observedID.clear();<NEW_LINE>dropped.clear();<NEW_LINE>spawned.clear();<NEW_LINE... | X = cloud.get(cloudIdx); |
1,810,832 | private static Descriptors.FileDescriptor descriptorFromProto(DescriptorProtos.FileDescriptorProto descriptorProto, Map<String, DescriptorProtos.FileDescriptorProto> descriptorProtoIndex, Map<String, Descriptors.FileDescriptor> descriptorCache) throws Descriptors.DescriptorValidationException {<NEW_LINE>// First, check... | String descriptorName = descriptorProto.getName(); |
1,729,118 | // Manufacturing order AND manufacturing order need<NEW_LINE>protected void createManufOrderMrpLines() throws AxelorException {<NEW_LINE>MrpLineType manufOrderMrpLineType = this.getMrpLineType(MrpLineTypeRepository.ELEMENT_MANUFACTURING_ORDER);<NEW_LINE>if (manufOrderMrpLineType == null) {<NEW_LINE>return;<NEW_LINE>}<N... | statusList = StringTool.getIntegerList(statusSelect); |
261,216 | public boolean validateDataTypes(OpContext oc, boolean experimentalMode) {<NEW_LINE>INDArray x = oc != null ? oc.getInputArray(0) : x();<NEW_LINE>INDArray y = oc != null ? oc.getInputArray(1) : y();<NEW_LINE>INDArray z = oc != null ? oc.getOutputArray(0) : z();<NEW_LINE>Preconditions.checkArgument(x.isR(), "Op.X must b... | dataType(), getClass()); |
1,567,082 | private void sendSPSandPPS(MediaFormat mediaFormat) {<NEW_LINE>// H265<NEW_LINE>if (type.equals(CodecUtil.H265_MIME)) {<NEW_LINE>List<ByteBuffer> byteBufferList = extractVpsSpsPpsFromH265(mediaFormat.getByteBuffer("csd-0"));<NEW_LINE>oldSps = byteBufferList.get(1);<NEW_LINE><MASK><NEW_LINE>oldVps = byteBufferList.get(0... | oldPps = byteBufferList.get(2); |
540,824 | private void peerRemoved(PEPeerTransport pc) {<NEW_LINE>if (is_running) {<NEW_LINE>updateConnectHealth(pc);<NEW_LINE>}<NEW_LINE>if (is_running && !seeding_mode && (prefer_udp || prefer_udp_default)) {<NEW_LINE>int udp = pc.getUDPListenPort();<NEW_LINE>if (udp != 0 && udp == pc.getTCPListenPort()) {<NEW_LINE>BloomFilter... | getIp().getBytes()); |
889,161 | public ByteBuffer previousFill(PreviousFillRequest request) throws QueryProcessException, StorageEngineException, IOException, IllegalPathException {<NEW_LINE>TSDataType dataType = TSDataType.values()[request.getDataTypeOrdinal()];<NEW_LINE>PartialPath path = new MeasurementPath(request.getPath(), dataType);<NEW_LINE>l... | queryManager.getQueryContext(requester, queryId); |
1,620,307 | public void createBuilderInjectMethod(EFragmentHolder holder, Element element, List<ArgHelper> argHelpers) {<NEW_LINE><MASK><NEW_LINE>JFieldRef builderArgsField = holder.getBuilderArgsField();<NEW_LINE>JMethod builderMethod = builderClass.method(PUBLIC, holder.narrow(builderClass), element.getSimpleName().toString());<... | JDefinedClass builderClass = holder.getBuilderClass(); |
174,610 | // Generates a report that analyzes photos in a given bucket.<NEW_LINE>@RequestMapping(value = "/report", method = RequestMethod.POST)<NEW_LINE>@ResponseBody<NEW_LINE>String report(HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>String email = request.getParameter("email");<NEW_LINE>// Get a list o... | myKeys = s3Client.ListBucketObjects(bucketName); |
1,335,912 | public void visitUnary(JCTree.JCUnary tree) {<NEW_LINE>super.visitUnary(tree);<NEW_LINE>if (_tp.isGenerate() && !shouldProcessForGeneration()) {<NEW_LINE>// Don't process tree during GENERATE, unless the tree was generated e.g., a bridge method<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Symbol op = IDynamicJdk.instance().get... | operatorMethod = (Symbol.MethodSymbol) op; |
1,569,112 | public String createRule() throws UnsupportedEncodingException {<NEW_LINE>String callback = getCallback();<NEW_LINE>boolean isJSON = false;<NEW_LINE>updateProjectListMockNum(SystemVisitorLog.mock(__id__, "createRule", pattern, getCurAccount()));<NEW_LINE>Map<String, Object> options = new HashMap<String, Object>();<NEW_... | String) options.get("callback"); |
1,159,468 | private void newTimeout(final RntbdServiceEndpoint endpoint, final long idleEndpointTimeoutInNanos, final long requestTimerResolutionInNanos) {<NEW_LINE>this.acquisitionAndIdleEndpointDetectionTimeout.set(acquisitionAndIdleEndpointDetectionTimer.newTimeout((Timeout timeout) -> {<NEW_LINE>if (idleEndpointTimeoutInNanos ... | () - endpoint.lastRequestNanoTime(); |
692,445 | public Document[] parse(final DigestURL location, final String mimeType, final String charset, final VocabularyScraper scraper, final int timezoneOffset, final InputStream source) throws Parser.Failure, InterruptedException {<NEW_LINE>Document[] docs = null;<NEW_LINE>File tempFile = null;<NEW_LINE>FileOutputStream out ... | ] data = new byte[1024]; |
998,805 | public void processEvent(ComponentSystemEvent event) throws AbortProcessingException {<NEW_LINE>super.processEvent(event);<NEW_LINE>// restore "value" from "filteredValue" - we must work on filtered data when filtering is active<NEW_LINE>// in future we might remember filtered rowKeys and skip them while rendering inst... | PropertyKeys.filteredValue.name()); |
459,754 | public void finish() throws IOException {<NEW_LINE>if (entries == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (curEntry != null) {<NEW_LINE>closeEntry();<NEW_LINE>}<NEW_LINE>int numEntries = 0;<NEW_LINE>int sizeEntries = 0;<NEW_LINE>final Enumeration elements = entries.elements();<NEW_LINE>while (elements.hasMoreEl... | .getName().getBytes(); |
1,545,140 | static void runColumnRebuild(RebuildColumnCommandArgs params, RebuildColumnBase ri) throws IOException, ServerConfigurationException, JsonException {<NEW_LINE>String rootDirectory = params.tablePath + Files.SEPARATOR + ".." + Files.SEPARATOR + "..";<NEW_LINE>final Properties properties = new Properties();<NEW_LINE>fina... | getFlyweightMessage()).$(); |
489,839 | public static GetCatalogListResponse unmarshall(GetCatalogListResponse getCatalogListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCatalogListResponse.setRequestId(_ctx.stringValue("GetCatalogListResponse.RequestId"));<NEW_LINE>getCatalogListResponse.setMessage(_ctx.stringValue("GetCatalogListResponse.Message"));<N... | ("GetCatalogListResponse.Data[" + i + "].ParentCatalogId")); |
954,884 | public static boolean hasManagerRole(TomcatVersion version, File tomcatUsersFile, String username) throws IOException {<NEW_LINE>Document doc = getDocument(tomcatUsersFile);<NEW_LINE>Element root = doc.getDocumentElement();<NEW_LINE>// NOI18N<NEW_LINE>NodeList <MASK><NEW_LINE>int length = users.getLength();<NEW_LINE>fo... | users = root.getElementsByTagName("user"); |
33,182 | List<HollowDiffViewRow> traverseEffigyToCreateViewRows(HollowDiffViewRow parent) {<NEW_LINE>if (parent.getFieldPair().isLeafNode())<NEW_LINE>return Collections.emptyList();<NEW_LINE>Field fromField = parent.getFieldPair().getFrom();<NEW_LINE>Field toField = parent.getFieldPair().getTo();<NEW_LINE>HollowEffigy from = fr... | to, diffUI.getMatchHints()); |
1,041,012 | private void testHashSTint() {<NEW_LINE>StdOut.println("HashSTint test");<NEW_LINE>HashSTint hashSTint = new HashSTint(5);<NEW_LINE>hashSTint.put(5, 5);<NEW_LINE>hashSTint.put(1, 1);<NEW_LINE>hashSTint.put(9, 9);<NEW_LINE>hashSTint.put(2, 2);<NEW_LINE>hashSTint.put(0, 0);<NEW_LINE>hashSTint.put(99, 99);<NEW_LINE>hashST... | put(-2, -2); |
1,580,427 | public void bootstrapMonitoringService() {<NEW_LINE>if (configuration != null && configuration.getEnabled().equalsIgnoreCase("true")) {<NEW_LINE>// To make sure that there aren't multiple monitoring services running<NEW_LINE>shutdownMonitoringService();<NEW_LINE>final MBeanServer server = getPlatformMBeanServer();<NEW_... | (configuration.getAmx())); |
223,172 | public void onSuccess(V2TIMFriendApplicationResult v2TIMFriendApplicationResult) {<NEW_LINE>List<V2TIMFriendApplication> list = v2TIMFriendApplicationResult.getFriendApplicationList();<NEW_LINE>V2TIMFriendApplication app = new V2TIMFriendApplication();<NEW_LINE>for (int i = 0; i < list.size(); i++) {<NEW_LINE>if (list.... | returnError(result, i, s); |
1,068,974 | private static void applyClusterFlowRule(List<FlowRule> list, /*@Valid*/<NEW_LINE>String namespace) {<NEW_LINE>if (list == null || list.isEmpty()) {<NEW_LINE>clearAndResetRulesFor(namespace);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ConcurrentHashMap<Long, FlowRule> ruleMap = new ConcurrentHashMap<>();<NEW_LINE>Set<L... | RecordLog.warn("[ClusterFlowRuleManager] Ignoring invalid flow rule when loading new flow rules: " + rule); |
1,728,354 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>getSupportActionBar().setDisplayHomeAsUpEnabled(true);<NEW_LINE>// Load the raw preferences to show in this screen<NEW_LINE>init(R.xml.pref_seedbox_xirviksemi, SeedboxProvider.XirvikSemi.getSettings().getMaxSeedboxOr... | PreferenceManager.getDefaultSharedPreferences(this))); |
800,465 | public void execute(DelegateExecution execution) throws Exception {<NEW_LINE>Date now = new Date();<NEW_LINE>List<String> serializable = new ArrayList<String>();<NEW_LINE>serializable.add("seven");<NEW_LINE>serializable.add("eight");<NEW_LINE>serializable.add("nine");<NEW_LINE>List<Date> dateList = new ArrayList<Date>(... | variables.put("floatVar", 55.55); |
509,759 | final DescribeVpcClassicLinkResult executeDescribeVpcClassicLink(DescribeVpcClassicLinkRequest describeVpcClassicLinkRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeVpcClassicLinkRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2"); |
817,344 | void trackService(String servId) {<NEW_LINE>if (trackerClose) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String[] pairs = servId.split("\\.");<NEW_LINE>if (pairs.length < 2) {<NEW_LINE>// don't track services not using management node id in service id<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>pairs[<MASK><NEW_LINE>String bindin... | pairs.length - 1] = "*"; |
916,033 | public void fullRedraw() {<NEW_LINE>setupCanvas();<NEW_LINE>final StyleLibrary style = context.getStyleLibrary();<NEW_LINE>final StylingPolicy spol = context.getStylingPolicy();<NEW_LINE>final double size = <MASK><NEW_LINE>final double ssize = size / Math.sqrt(samples);<NEW_LINE>final MarkerLibrary ml = style.markers()... | style.getSize(StyleLibrary.MARKERPLOT); |
124,695 | public BatchGetRecordIdentifier unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchGetRecordIdentifier batchGetRecordIdentifier = new BatchGetRecordIdentifier();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonT... | String currentParentElement = context.getCurrentParentElement(); |
1,243,792 | protected static void deleteNode(final StructrWebSocket ws, final NodeInterface obj, final Boolean recursive) {<NEW_LINE>final SecurityContext securityContext = ws.getSecurityContext();<NEW_LINE>final App app = StructrApp.getInstance(securityContext);<NEW_LINE>try (final Tx tx = app.tx()) {<NEW_LINE>if (!(obj.isGranted... | logger.warn("Exception occured", fex); |
340,638 | protected RubyValue run(RubyValue receiver, RubyValue arg1, RubyValue arg2, RubyBlock block) {<NEW_LINE>try {<NEW_LINE>int x = 0;<NEW_LINE>int y = 0;<NEW_LINE>if (arg1 instanceof RubyFixnum) {<NEW_LINE>RubyFixnum rv = (RubyFixnum) arg1;<NEW_LINE>x = rv.toInt();<NEW_LINE>} else {<NEW_LINE>if (arg1 instanceof RubyInteger... | (e.getMessage())); |
471,747 | public static void execKey(KeyEvent keyEvent, int valueIndex) {<NEW_LINE>// valueIndex points to where the value is stored in the array.<NEW_LINE>CallbackBridge.holdingAlt = keyEvent.isAltPressed();<NEW_LINE>CallbackBridge.holdingCapslock = keyEvent.isCapsLockOn();<NEW_LINE>CallbackBridge.holdingCtrl = keyEvent.isCtrlP... | " " + keyEvent.getDisplayLabel()); |
763,655 | public static InsteonHubBindingConfig parse(String itemName, String configStr) {<NEW_LINE>Map<String, String> configMap = stringToMap(configStr);<NEW_LINE>// parse hubId (default used if not present)<NEW_LINE>String hubId = configMap.get(KEY_HUB_ID);<NEW_LINE>if (hubId == null) {<NEW_LINE>// no hubid defined => use def... | onValue, offValue, openValue, closedValue); |
1,116,306 | private DeploymentRoutingStatus deploymentStatus(String upstreamName) {<NEW_LINE><MASK><NEW_LINE>Path path = deploymentStatusPath(upstreamName);<NEW_LINE>Optional<byte[]> data = curator.getData(path);<NEW_LINE>if (data.isEmpty()) {<NEW_LINE>return new DeploymentRoutingStatus(RoutingStatus.in, "", "", changedAt);<NEW_LI... | Instant changedAt = clock.instant(); |
1,243,164 | final GetReservationCoverageResult executeGetReservationCoverage(GetReservationCoverageRequest getReservationCoverageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getReservationCoverageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
481,741 | public Instance pipe(Instance carrier) {<NEW_LINE>Object inputData = carrier.getData();<NEW_LINE>LabelAlphabet labels;<NEW_LINE>LabelSequence target = null;<NEW_LINE>String[][] tokens;<NEW_LINE>StringBuffer source = new StringBuffer();<NEW_LINE>StringTokenization ts = new StringTokenization(source);<NEW_LINE>if (inputD... | source.append(word + " "); |
480,176 | private List<SchemaDisplayField> createDisplayFields() {<NEW_LINE>List<SchemaDisplayField> displayFields = new ArrayList<SchemaDisplayField>();<NEW_LINE>switch(schema.getSchemaType()) {<NEW_LINE>case OBJECT:<NEW_LINE>HollowObjectSchema objSchema = (HollowObjectSchema) schema;<NEW_LINE>for (int i = 0; i < objSchema.numF... | + ".value", mapSchema, 1)); |
1,018,301 | private Coordinate findNonGabrielPoint(Segment seg) {<NEW_LINE>Coordinate p = seg.getStart();<NEW_LINE><MASK><NEW_LINE>// Find the mid point on the line and compute the radius of enclosing circle<NEW_LINE>Coordinate midPt = new Coordinate((p.x + q.x) / 2.0, (p.y + q.y) / 2.0);<NEW_LINE>double segRadius = p.distance(mid... | Coordinate q = seg.getEnd(); |
108,403 | protected static void implMulw(long[] u, long x, long y, long[] z, int zOff) {<NEW_LINE>// assert x >>> 57 == 0;<NEW_LINE>// assert y >>> 57 == 0;<NEW_LINE>// u[0] = 0;<NEW_LINE>u[1] = y;<NEW_LINE>u[2] = u[1] << 1;<NEW_LINE>u[3] = u[2] ^ y;<NEW_LINE>u[4] = u[2] << 1;<NEW_LINE>u[5] = u[4] ^ y;<NEW_LINE>u[6] = u[3] << 1;... | ] = u[6] ^ y; |
980,225 | public VolumeInfo createVolumeOnPrimaryStorage(VirtualMachine vm, VolumeInfo volume, HypervisorType rootDiskHyperType, StoragePool storagePool) throws NoTransitionException {<NEW_LINE>VirtualMachineTemplate rootDiskTmplt = _entityMgr.findById(VirtualMachineTemplate.class, vm.getTemplateId());<NEW_LINE>DataCenter dcVO =... | pod, diskVO, svo, rootDiskHyperType); |
1,388,051 | public boolean prepare(VirtualMachineProfile profile, NicProfile pxeNic, Network network, DeployDestination dest, ReservationContext context) {<NEW_LINE>QueryBuilder<BaremetalPxeVO> sc = <MASK><NEW_LINE>sc.and(sc.entity().getDeviceType(), Op.EQ, BaremetalPxeType.PING.toString());<NEW_LINE>sc.and(sc.entity().getPodId(),... | QueryBuilder.create(BaremetalPxeVO.class); |
1,556,350 | public void destroy() {<NEW_LINE>Set<ProviderResourceInfo> singletonProviderAndPathInfos = endpointInfo.getSingletonProviderAndPathInfos();<NEW_LINE>for (ProviderResourceInfo o : singletonProviderAndPathInfos) {<NEW_LINE>if (o.getRuntimeType() == RuntimeType.POJO) {<NEW_LINE>Method preDestoryMethod = ResourceUtils.find... | o.getObject(), preDestoryMethod); |
316,315 | protected String embedEngines(String json_in) {<NEW_LINE>// see if we need to embed private search templates<NEW_LINE>Map <MASK><NEW_LINE>long engine_id = ((Long) map.get("engine_id")).longValue();<NEW_LINE>String json_out = json_in;<NEW_LINE>if (engine_id >= Integer.MAX_VALUE || engine_id < 0) {<NEW_LINE>Engine engine... | map = JSONUtils.decodeJSON(json_in); |
1,324,268 | public void onViewCreated(View view, Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>progressView = finder.find(R.id.pb_loading);<NEW_LINE>listView = finder.find(android.R.id.list);<NEW_LINE>listView.setOnItemClickListener(this);<NEW_LINE>Activity activity = getActivity();<... | folderIcon.setText(TypefaceUtils.ICON_FILE_SUBMODULE); |
1,530,101 | public static void drawAcceptIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {<NEW_LINE>// General Declarations<NEW_LINE>Paint paint = CacheForAcceptIcon.paint;<NEW_LINE>// Local Colors<NEW_LINE>int fillColor103 = Color.argb(255, 32, 183, 128);<NEW_LINE>// Resize to Target Frame<NEW_LINE>canvas.save()... | setStyle(Paint.Style.FILL); |
613,096 | protected void masterOperation(final CreateTableRequest request, final ClusterState state, final ActionListener<CreateTableResponse> listener) {<NEW_LINE>final RelationName relationName = request.getTableName();<NEW_LINE>if (viewsExists(relationName, state)) {<NEW_LINE>listener.onFailure(new RelationAlreadyExists(relat... | masterOperation(putIndexTemplateRequest, state, wrappedListener); |
1,589,248 | public INDArray apply(List<Writable> c) {<NEW_LINE>int length = 0;<NEW_LINE>for (Writable w : c) {<NEW_LINE>if (w instanceof NDArrayWritable) {<NEW_LINE>INDArray a = ((NDArrayWritable) w).get();<NEW_LINE>if (a.isRowVector()) {<NEW_LINE>length += a.columns();<NEW_LINE>} else {<NEW_LINE>throw new UnsupportedOperationExce... | ++, w.toDouble()); |
1,751,099 | public Builder mergeFrom(name.abuchen.portfolio.model.proto.v1.PSecurityEvent other) {<NEW_LINE>if (other == name.abuchen.portfolio.model.proto.v1.PSecurityEvent.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.type_ != 0) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (other.getDate() != 0L) {<NEW_LINE>setDate... | setTypeValue(other.getTypeValue()); |
1,423,877 | public static boolean extract(ZipFile zipFile, ZipEntry entryFile, File extractTo, String targetMd5, boolean isDex) throws IOException {<NEW_LINE>int numAttempts = 0;<NEW_LINE>boolean isExtractionSuccessful = false;<NEW_LINE>while (numAttempts < MAX_EXTRACT_ATTEMPTS && !isExtractionSuccessful) {<NEW_LINE>numAttempts++;... | "try Extracting " + extractTo.getPath()); |
743,109 | public void simulate(ProgramStatement statement) throws ExitingException {<NEW_LINE>// TODO: maybe refactor this, other null strings are handled in a central place now<NEW_LINE>// = "";<NEW_LINE>String message = new String();<NEW_LINE>int <MASK><NEW_LINE>// Need an array to convert to String<NEW_LINE>char[] ch = { ' ' ... | byteAddress = RegisterFile.getValue("a0"); |
1,718,708 | public ProjectRequestDocument createDocument(ProjectRequestEvent event) {<NEW_LINE><MASK><NEW_LINE>ProjectRequest request = event.getProjectRequest();<NEW_LINE>ProjectRequestDocument document = new ProjectRequestDocument();<NEW_LINE>document.setGenerationTimestamp(event.getTimestamp());<NEW_LINE>document.setGroupId(req... | InitializrMetadata metadata = event.getMetadata(); |
776,116 | private void writeAttributes(final ITreeWriter writer, final NodeModel node, final NodeStyleModel style, final boolean forceFormatting) {<NEW_LINE>final Color color = forceFormatting ? nsc.getColor(node, StyleOption.FOR_UNSELECTED_NODE) : style.getColor();<NEW_LINE>if (color != null) {<NEW_LINE>ColorUtils.addColorAttri... | FOR_UNSELECTED_NODE) : style.getHorizontalTextAlignment(); |
644,138 | private void openTransport4Sender(FileTransportChannelEntity fileTransport) throws GovernanceException {<NEW_LINE>IWeEventFileClient fileClient;<NEW_LINE>try {<NEW_LINE>fileClient = this.buildIWeEventFileClient(fileTransport.getBrokerId(), fileTransport.getGroupId(), fileTransport.getNodeAddress());<NEW_LINE>if (String... | openTransport4Sender(fileTransport.getTopicName()); |
1,182,596 | private void verifyDeoptEntries(CodeInfo codeInfo) {<NEW_LINE>boolean hasError = false;<NEW_LINE>List<Entry<AnalysisMethod, Map<Long, DeoptSourceFrameInfo>>> deoptEntries = new ArrayList<>(CompilationInfoSupport.singleton().getDeoptEntries().entrySet());<NEW_LINE>deoptEntries.sort((e1, e2) -> e1.getKey().format("%H.%n(... | verifyDeoptEntry(codeInfo, method, sourceFrameInfo); |
449,834 | protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand2 = i... | String tmpVar2 = environment.getNextVariableString(); |
590,891 | private void parseCommand(String command) {<NEW_LINE>if (command == null || command.isEmpty() || command.trim().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>command = command.trim();<NEW_LINE>if (command.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String lowerCommand = command.toLowerCase();<NEW_LINE>// TODO... | 1 ? args[1] : "0"; |
1,583,362 | public long considerStrings(Extractor ext, CrawlURI curi, CharSequence cs, boolean handlingJSFile) {<NEW_LINE>CrawlURI baseUri = curi;<NEW_LINE>Matcher m = TextUtils.getMatcher("jQuery\\.extend\\(Drupal\\.settings,[^'\"]*['\"]basePath['\"]:[^'\"]*['\"]([^'\"]+)['\"]", cs);<NEW_LINE>if (m.find()) {<NEW_LINE>String baseP... | LinkContext.INFERRED_MISC, Hop.INFERRED); |
528,572 | public static void searchSymbols(GhidraScript script, AbstractPdb pdb, String searchString) throws CancelledException {<NEW_LINE>PdbDebugInfo debugInfo = pdb.getDebugInfo();<NEW_LINE>if (debugInfo == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>StringBuilder results = new StringBuilder();<NEW_LINE>results.append('\n');... | script, results.toString()); |
398,350 | public static DescribeSQLLogFilesResponse unmarshall(DescribeSQLLogFilesResponse describeSQLLogFilesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSQLLogFilesResponse.setRequestId(_ctx.stringValue("DescribeSQLLogFilesResponse.RequestId"));<NEW_LINE>describeSQLLogFilesResponse.setTotalRecordCount(_ctx.integerVal... | ("DescribeSQLLogFilesResponse.Items[" + i + "].LogStatus")); |
1,744,242 | final DeleteMetricStreamResult executeDeleteMetricStream(DeleteMetricStreamRequest deleteMetricStreamRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteMetricStreamRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,350,891 | public JobConfiguration toJobConfiguration() {<NEW_LINE>JobConfiguration result = JobConfiguration.newBuilder(jobName, shardingTotalCount).cron(cron).timeZone(timeZone).shardingItemParameters(shardingItemParameters).jobParameter(jobParameter).monitorExecution(monitorExecution).failover(failover).misfire(misfire).maxTim... | ()).toString()); |
1,547,340 | final ListIPSetsResult executeListIPSets(ListIPSetsRequest listIPSetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listIPSetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | (super.beforeMarshalling(listIPSetsRequest)); |
1,006,774 | public CharSequence extractReturnType(ExecutableElement executableElement) {<NEW_LINE>if (executableElement instanceof ExecutableElementImpl) {<NEW_LINE>Binding binding = ((ExecutableElementImpl) executableElement)._binding;<NEW_LINE>if (binding instanceof MethodBinding) {<NEW_LINE>MethodBinding methodBinding = (Method... | , extracted.getValue())); |
569,699 | public OperatorStr visitPhysicalHashAggregate(OptExpression optExpression, OperatorPrinter.ExplainContext context) {<NEW_LINE>OperatorStr child = visit(optExpression.getInputs().get(0), new ExplainContext(context.step + 1));<NEW_LINE>PhysicalHashAggregateOperator aggregate = (PhysicalHashAggregateOperator) optExpressio... | print(entry.getValue()); |
724,663 | private void saveTrackInfo() {<NEW_LINE>GPXFile gpxFile = selectedGpxFile.getGpxFile();<NEW_LINE>if (gpxFile.showCurrentTrack) {<NEW_LINE>settings.CURRENT_TRACK_COLOR.set(trackDrawInfo.getColor());<NEW_LINE>settings.CURRENT_TRACK_COLORING_TYPE.set(trackDrawInfo.getColoringType());<NEW_LINE>settings.CURRENT_TRACK_ROUTE_... | splitType, trackDrawInfo.getSplitInterval()); |
972,845 | private CachedValueProvider.Result<Location> computeLocation() {<NEW_LINE>Objects.requireNonNull(myElement);<NEW_LINE>Location defaultLocation = new Location(-1, -1, null, -1);<NEW_LINE>PsiFile containingFile = myElement.getContainingFile();<NEW_LINE>InjectedLanguageManager injectedLanguageManager = InjectedLanguageMan... | offset - document.getLineStartOffset(lineNumber); |
749,486 | public OpenSearchAction unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>OpenSearchAction openSearchAction = new OpenSearchAction();<NEW_LINE>reader.beginObject();<NEW_LINE>while (r... | AwsJsonReader reader = context.getReader(); |
209,580 | /* (non-Javadoc)<NEW_LINE>* @see com.kkalice.adempiere.migrate.DBObjectInterface#createObject(com.kkalice.adempiere.migrate.MigrateLogger, com.kkalice.adempiere.migrate.MigrateDBEngine, com.kkalice.adempiere.migrate.DBConnection, java.lang.String, java.util.HashMap, java.util.HashMap)<NEW_LINE>*/<NEW_LINE>@SuppressWarn... | sqlContent.toString(), false); |
332,290 | public CoverageNormalizedUnits unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CoverageNormalizedUnits coverageNormalizedUnits = new CoverageNormalizedUnits();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | class).unmarshall(context)); |
1,650,755 | // getDays<NEW_LINE>public static MHRProcess copyFrom(MHRProcess from, Timestamp dateAcct, int docTypeTargetId, boolean counter, String trxName, boolean setOrder) {<NEW_LINE>MHRProcess to = new MHRProcess(from.getCtx(), 0, trxName);<NEW_LINE>PO.copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org_ID());<NEW_LINE... | to.set_ValueNoCheck("DocumentNo", null); |
697,816 | private void zipFilesToStage(Twister2PipelineOptions options) {<NEW_LINE>File zipFile = null;<NEW_LINE>Set<String> jarSet = new HashSet<>();<NEW_LINE>// TODO figure out if we can remove all the dependencies that come with<NEW_LINE>// the twister2 jars as well since they will be anyway provided from the<NEW_LINE>// syst... | add(fileToZip.getName()); |
1,079,369 | private // -------------------//<NEW_LINE>List<LinkedSection> buildSectionGraph(List<Section> sections) {<NEW_LINE>StopWatch watch = new StopWatch("buildSectionGraph S#" + system.getId() + " size:" + sections.size());<NEW_LINE>watch.start("create list");<NEW_LINE>List<LinkedSection> list = new ArrayList<>();<NEW_LINE>f... | int predStop = predRun.getStop(); |
1,557,903 | public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {<NEW_LINE>String dimensionIdentifier = null;<NEW_LINE>String levelName = null;<NEW_LINE>if (version.compareTo(ProtocolVersion.MINECRAFT_1_16) >= 0) {<NEW_LINE>if (version.compareTo(ProtocolVersion.MINECRAFT_1_16_2) >= 0) {<NEW_... | ProtocolUtils.readString(buf, 16); |
1,843,550 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE><MASK><NEW_LINE>setBackBtn();<NEW_LINE>setTitle("HeaderAndFooter Use");<NEW_LINE>mRecyclerView = findViewById(R.id.rv);<NEW_LINE>mRecyclerView.setLayoutManager(new LinearLayoutManager(this));<NEW_LINE>initAdapter(... | setContentView(R.layout.activity_universal_recycler); |
980,715 | private boolean overlaps(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2, double overlapTolerance) {<NEW_LINE>double minq = Math.min(q1.x, q2.x);<NEW_LINE>double maxq = Math.max(q1.x, q2.x);<NEW_LINE>double minp = Math.min(p1.x, p2.x);<NEW_LINE>double maxp = Math.max(p1.x, p2.x);<NEW_LINE>if (minp > maxq + o... | p1.y, p2.y); |
110,008 | private UserDashboardItem createUserDashboardItem(final I_WEBUI_DashboardItem itemPO) {<NEW_LINE>final IModelTranslationMap trlsMap = InterfaceWrapperHelper.getModelTranslationMap(itemPO);<NEW_LINE>final KPIId kpiId = KPIId.ofRepoIdOrNull(itemPO.getWEBUI_KPI_ID());<NEW_LINE>final KPISupplier kpiSupplier = kpiId != null... | kpisRepo.getKPISupplier(kpiId) : null; |
1,459,240 | private void readDep(IndexedWord gov, String reln) {<NEW_LINE>readWhiteSpace();<NEW_LINE>if (!isLeftBracket(peek())) {<NEW_LINE>// it's a leaf<NEW_LINE>String label = readName();<NEW_LINE>IndexedWord dep = makeVertex(label);<NEW_LINE>sg.addVertex(dep);<NEW_LINE>if (gov == null)<NEW_LINE>sg.roots.add(dep);<NEW_LINE>sg.a... | sg.roots.add(dep); |
1,189,383 | // Task: parser string with text and show all indexes of all words<NEW_LINE>public static void main(String[] args) {<NEW_LINE>String INPUT_TEXT = "Hello World! Hello All! Hi World!";<NEW_LINE>// Parse text to words and index<NEW_LINE>List<String> words = Arrays.asList(INPUT_TEXT.split(" "));<NEW_LINE>// Create Multimap... | System.out.println(multiMap); |
1,814,468 | // endregion DirectBuffers<NEW_LINE>// region Register/Unregister natives<NEW_LINE>@JniImpl<NEW_LINE>@TruffleBoundary<NEW_LINE>public int RegisterNative(@JavaType(Class.class) StaticObject clazz, @Pointer TruffleObject methodNamePtr, @Pointer TruffleObject methodSignaturePtr, @Pointer TruffleObject closure) {<NEW_LINE>... | ).lookupDeclaredMethod(name, signature); |
928,468 | protected void doStart() {<NEW_LINE>synchronized (mutex) {<NEW_LINE>CoordinationState.PersistedState persistedState = persistedStateSupplier.get();<NEW_LINE>coordinationState.set(new CoordinationState(getLocalNode(), persistedState, electionStrategy));<NEW_LINE>peerFinder.setCurrentTerm(getCurrentTerm());<NEW_LINE>conf... | ())).build(); |
890,910 | public Pair<INDArray, MaskState> feedForwardMaskArray(INDArray maskArray, MaskState currentMaskState, int minibatchSize) {<NEW_LINE>// Assume mask array is 2d for time series (1 value per time step)<NEW_LINE>if (maskArray == null) {<NEW_LINE>return new Pair<>(maskArray, currentMaskState);<NEW_LINE>} else if (maskArray.... | (maskArray.shape())); |
433,883 | protected void initScene() {<NEW_LINE>PointLight light1 = new PointLight();<NEW_LINE>light1.setPower(1.5f);<NEW_LINE>PointLight light2 = new PointLight();<NEW_LINE>light2.setPower(1.5f);<NEW_LINE>getCurrentScene().addLight(light1);<NEW_LINE>getCurrentScene().addLight(light2);<NEW_LINE>getCurrentCamera().<MASK><NEW_LINE... | setPosition(0, 2, 4); |
1,403,732 | public static FileSystemManager generateVfs() throws FileSystemException {<NEW_LINE>DefaultFileSystemManager vfs = new DefaultFileSystemManager();<NEW_LINE>vfs.addProvider("res", new org.apache.commons.vfs2.provider.res.ResourceFileProvider());<NEW_LINE>vfs.addProvider("zip", new org.apache.commons.vfs2.provider.zip.Zi... | provider.ftp.FtpFileProvider()); |
376,924 | public void visitPhpTernaryExpression(@NotNull TernaryExpression expression) {<NEW_LINE>final <MASK><NEW_LINE>if (rawCondition != null) {<NEW_LINE>final PsiElement condition = ExpressionSemanticUtil.getExpressionTroughParenthesis(rawCondition);<NEW_LINE>if (condition instanceof BinaryExpression) {<NEW_LINE>final PsiEle... | PsiElement rawCondition = expression.getCondition(); |
613,834 | final UpdateAnalysisResult executeUpdateAnalysis(UpdateAnalysisRequest updateAnalysisRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAnalysisRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
558,645 | static NettyServerHandler newHandler(ChannelPromise channelUnused, Http2FrameReader frameReader, Http2FrameWriter frameWriter, ServerTransportListener transportListener, List<? extends ServerStreamTracer.Factory> streamTracerFactories, TransportTracer transportTracer, int maxStreams, boolean autoFlowControl, int flowCo... | Http2Connection connection = new DefaultHttp2Connection(true); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.