idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
68,761 | public boolean applyConfigTemplateForPackage(java.lang.String packageName, github.tornaco.android.thanos.core.profile.ConfigTemplate template) throws android.os.RemoteException {<NEW_LINE>android.os.Parcel _data = android.os.Parcel.obtain();<NEW_LINE>android.os.Parcel _reply = android.os.Parcel.obtain();<NEW_LINE>boole... | TRANSACTION_applyConfigTemplateForPackage, _data, _reply, 0); |
1,700,921 | public void handlerSelector(final SelectorData selectorData) {<NEW_LINE>LOG.info("handler loggingRocketMQ selector data:{}", GsonUtils.getGson().toJson(selectorData));<NEW_LINE>String handleJson = selectorData.getHandle();<NEW_LINE>if (StringUtils.isEmpty(handleJson) || EMPTY_JSON.equals(handleJson.trim())) {<NEW_LINE>... | uriList = new ArrayList<>(); |
1,526,342 | public List<ActionEntity> listForFile(String path, DateTime startAt, DateTime endAt, String display, String cursor, Integer perPage, Object sortBy) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'path' is set<NEW_LINE>if (path == null) {<NEW_LINE>throw new ApiEx... | ("", "sort_by", sortBy)); |
1,613,404 | public synchronized void addMeshModel(int address, int modelId, int appKeyIndex) {<NEW_LINE>MeshNetwork network = getMeshNetwork();<NEW_LINE>MeshModel model = SigModelParser.getSigModel(modelId);<NEW_LINE>if (model == null) {<NEW_LINE>LOG.severe("Bluetooth Mesh model with ID='" + String.format("0x%04X", modelId) + "' i... | ), network.getSelectedProvisioner()); |
533,841 | private int resolveConstructorArguments(String beanName, RootBeanDefinition mbd, BeanWrapper bw, ConstructorArgumentValues cargs, ConstructorArgumentValues resolvedValues) {<NEW_LINE>TypeConverter customConverter = this.beanFactory.getCustomTypeConverter();<NEW_LINE>TypeConverter converter = (customConverter != null ? ... | beanFactory, beanName, mbd, converter); |
244,217 | final CreateEdgePackagingJobResult executeCreateEdgePackagingJob(CreateEdgePackagingJobRequest createEdgePackagingJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createEdgePackagingJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
841,227 | public void fetch() {<NEW_LINE>ScouterUtil.collectGroupObjcts(grpName, serverObjMap);<NEW_LINE>Iterator<Integer> itr = serverObjMap.keySet().iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>int serverId = itr.next();<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param = ne... | (m.get("act3")); |
1,053,413 | private void comboHandler(ActionEvent evt) {<NEW_LINE>String str = (String) ((JComboBox) evt.getSource()).getSelectedItem();<NEW_LINE>Locale oldLocale = locale;<NEW_LINE>Object source = evt.getSource();<NEW_LINE>if (source.equals(languageCombo)) {<NEW_LINE>// 99% trick to avoid unneccessary reset of the string (kind of... | ), locale.getVariant()); |
1,328,523 | private IProject createNewProject() {<NEW_LINE>if (newProject != null) {<NEW_LINE>return newProject;<NEW_LINE>}<NEW_LINE>// get a project handle<NEW_LINE>final IProject newProjectHandle = mainPage.getProjectHandle();<NEW_LINE>// get a project descriptor<NEW_LINE>URI location = null;<NEW_LINE>if (!mainPage.useDefaults()... | setName(newProjectHandle.getName()); |
682,888 | public void run(Object[] args, ZContext ctx, Socket pipe) {<NEW_LINE>// Subscribe to everything<NEW_LINE>Socket subscriber = ctx.createSocket(SocketType.SUB);<NEW_LINE><MASK><NEW_LINE>subscriber.connect("tcp://localhost:5556");<NEW_LINE>// Get and process messages<NEW_LINE>while (true) {<NEW_LINE>String string = subscr... | subscriber.subscribe(ZMQ.SUBSCRIPTION_ALL); |
888,499 | public IBaseResource binaryAccessWrite(@IdParam IIdType theResourceId, @OperationParam(name = "path", min = 1, max = 1) IPrimitiveType<String> thePath, ServletRequestDetails theRequestDetails, HttpServletRequest theServletRequest, HttpServletResponse theServletResponse) throws IOException {<NEW_LINE>String path = valid... | Validate.notBlank(blobId, "BinaryStorageSvc returned a null blob ID"); |
971,662 | public static GetJudicialFreezesResponse unmarshall(GetJudicialFreezesResponse getJudicialFreezesResponse, UnmarshallerContext _ctx) {<NEW_LINE>getJudicialFreezesResponse.setRequestId(_ctx.stringValue("GetJudicialFreezesResponse.RequestId"));<NEW_LINE>getJudicialFreezesResponse.setCode(_ctx.integerValue("GetJudicialFre... | = new ArrayList<String>(); |
1,521,617 | public Symbol createFunctionSymbol(Address addr, String name, Namespace namespace, SourceType source, String stringData) throws InvalidInputException {<NEW_LINE>namespace = validateNamespace(<MASK><NEW_LINE>source = validateSource(source, name, addr, SymbolType.FUNCTION);<NEW_LINE>name = validateName(name, source);<NEW... | namespace, addr, SymbolType.FUNCTION); |
615,448 | private void computeProjectName(ObjectNode extObject) {<NEW_LINE>if (!extObject.has("name")) {<NEW_LINE>if (getProject().getName() != null) {<NEW_LINE>extObject.put("name", getProject().getName());<NEW_LINE>} else {<NEW_LINE>JsonNode node = extObject.get(ARTIFACT_ID);<NEW_LINE>String defaultName = node.asText();<NEW_LI... | (Character.toUpperCase(c)); |
1,639,639 | protected static String performOSAScript(CharSequence[] cmds) throws IOException {<NEW_LINE>String[] cmdargs = new String[2 * cmds.length + 1];<NEW_LINE>cmdargs[0] = "osascript";<NEW_LINE>for (int i = 0; i < cmds.length; i++) {<NEW_LINE>cmdargs[<MASK><NEW_LINE>cmdargs[i * 2 + 2] = String.valueOf(cmds[i]);<NEW_LINE>}<NE... | i * 2 + 1] = "-e"; |
676,736 | public default double explainRate(IborIndexObservation observation, ExplainMapBuilder builder, Consumer<ExplainMapBuilder> consumer) {<NEW_LINE>LocalDate fixingDate = observation.getFixingDate();<NEW_LINE>double rate = rate(observation);<NEW_LINE>ExplainMapBuilder child = builder.openListEntry(ExplainKey.OBSERVATIONS);... | INDEX, observation.getIndex()); |
368,169 | public static ThreadFactory[] createThreadFactories(Supplier<ThreadLocalStreamBufferPool> bufferPoolSupplier) {<NEW_LINE>List<ThreadFactory> <MASK><NEW_LINE>if (IS_BENCHMARK_DEBUG) {<NEW_LINE>// Simple threading for debug<NEW_LINE>System.out.println("\n\nWARNING: using debug mode so performance will suffer\n\n");<NEW_L... | threadFactories = new LinkedList<>(); |
811,763 | public void padding() {<NEW_LINE>if (// infer model<NEW_LINE>labelArray == null) {<NEW_LINE>labelArray = new int[imageArray.length * numOfClass / (IMAGE_SIZE * Float.BYTES)];<NEW_LINE>Arrays.fill(labelArray, 0);<NEW_LINE>}<NEW_LINE>int curSize = labelArray.length / numOfClass;<NEW_LINE>int modSize = curSize - curSize /... | padLabelArray, 0, labelArray.length); |
956,472 | private void handleDescribeModel(ChannelHandlerContext ctx, FullHttpRequest req, String modelName, String modelVersion, QueryStringDecoder decoder) throws ModelNotFoundException, ModelVersionNotFoundException {<NEW_LINE>boolean customizedMetadata = Boolean.parseBoolean(NettyUtils.getParameter(decoder, "customized", "fa... | NettyUtils.sendJsonResponse(ctx, resp); |
1,209,958 | public static void addSessionKillsToBatch(PreparedStatement statement, FinishedSession session) throws SQLException {<NEW_LINE><MASK><NEW_LINE>ServerUUID serverUUID = session.getServerUUID();<NEW_LINE>Optional<PlayerKills> playerKills = session.getExtraData().get(PlayerKills.class);<NEW_LINE>if (!playerKills.isPresent(... | UUID playerUUID = session.getPlayerUUID(); |
709,894 | public J visitNewArray(J.NewArray newArray, P p) {<NEW_LINE>J.NewArray n = newArray;<NEW_LINE>n = n.withPrefix(visitSpace(n.getPrefix(), Space.Location.NEW_ARRAY_PREFIX, p));<NEW_LINE>n = n.withMarkers(visitMarkers(n<MASK><NEW_LINE>Expression temp = (Expression) visitExpression(n, p);<NEW_LINE>if (!(temp instanceof J.N... | .getMarkers(), p)); |
1,515,684 | private void updateBuildScript() throws IOException {<NEW_LINE>assert ProjectManager.mutex().isWriteAccess();<NEW_LINE>final AntBuildExtender extender = prj.getLookup().lookup(AntBuildExtender.class);<NEW_LINE>if (extender == null) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.// NOI18N<NEW_LINE>log(// NOI18N<NEW_LINE>Level.WARNIN... | prj.getProjectDirectory()) }); |
642,025 | private SpanEntry parseSpan(EnumConstantSource enumConstant, JavaEnumImpl myEnum) {<NEW_LINE>List<MemberSource<EnumConstantSource.Body, ?>> members = enumConstant.getBody().getMembers();<NEW_LINE>if (members.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String name = "";<NEW_LINE>String description = enumConst... | , methodDeclaration, TagKey.class)); |
18,885 | protected Object sendSearchRequest(Query query, Object unusedContext) throws IOException {<NEW_LINE>this.query = query;<NEW_LINE>invokers.forEach(invoker -> invoker.setMonitor(this));<NEW_LINE>deadline = currentTime<MASK><NEW_LINE>int originalHits = query.getHits();<NEW_LINE>int originalOffset = query.getOffset();<NEW_... | () + query.getTimeLeft(); |
1,475,318 | public void actionPerformed(ActionEvent e) {<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>final String newOne = ServerManager.showAddServerInstanceWizard();<NEW_LINE>final String serverType = newOne != null ? obtainServerID(newOne) : null;<NEW_L... | .getProject().getProperties(); |
1,427,651 | public void load() throws Exception {<NEW_LINE>LOGGER.info("Setting up config database and default workspace..");<NEW_LINE>try (final Database configDatabase = new ConfigsDatabaseInstance(configs.getConfigDatabaseUser(), configs.getConfigDatabasePassword(), configs.getConfigDatabaseUrl()).getAndInitialize();<NEW_LINE>f... | setVersion(currAirbyteVersion.serialize()); |
526,212 | public void initFreeStreamer(double tL, double tV, double tH) {<NEW_LINE>double tx = getFacing().getAxis() == Axis.X ? tL : tH;<NEW_LINE>double ty = getFacing().getAxis() == Axis.Y ? tL : tV;<NEW_LINE>double tz = getFacing().getAxis() == Axis.Y ? tV : getFacing().getAxis() == Axis.X ? tH : tL;<NEW_LINE>Direction f = nu... | f.getStepZ() * .375); |
1,217,884 | private static SummaryViewMaster createViewSummaryMaster(final SearchHistoryPanel master) {<NEW_LINE>final Map<String, String> colors = new HashMap<String, String>();<NEW_LINE>colors.put("A", SvnUtils.getColorString(AnnotationColorProvider.getInstance().ADDED_LOCALLY_FILE.getActualColor()));<NEW_LINE>colors.put("C", Sv... | .EXCLUDED_FILE.getActualColor())); |
775,972 | private BLangInvocation desugarStreamTypeInit(BLangTypeInit typeInitExpr) {<NEW_LINE>BInvokableSymbol symbol = (BInvokableSymbol) symTable.langInternalModuleSymbol.scope.<MASK><NEW_LINE>BType constraintType = ((BStreamType) typeInitExpr.getBType()).constraint;<NEW_LINE>BType constraintTdType = new BTypedescType(constra... | lookup(Names.CONSTRUCT_STREAM).symbol; |
46,442 | public void onCurrencyChange(final I_C_Payment payment) {<NEW_LINE>final int C_Invoice_ID = payment.getC_Invoice_ID();<NEW_LINE>final int C_Order_ID = payment.getC_Order_ID();<NEW_LINE>// Get Currency Info<NEW_LINE>final CurrencyId currencyId = CurrencyId.ofRepoIdOrNull(payment.getC_Currency_ID());<NEW_LINE>final Curre... | getStdPrecision(currencyId) : CurrencyPrecision.TWO; |
80,441 | public static BaseBean findBeanByName(BaseBean parent, String beanProperty, String nameProperty, String value) {<NEW_LINE>Class c = parent.getClass();<NEW_LINE>Method getter;<NEW_LINE>Object result;<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>getter = c.getMethod("get" + getNameForMethod((CommonDDBean) parent, beanPrope... | c1.getMethod("get" + nameProperty); |
1,646,131 | private DdlJob buildTruncateTableWithGsiJob(LogicalTruncateTable logicalTruncateTable, boolean isNewPartDb, ExecutionContext executionContext) {<NEW_LINE>String tmpTableSuffix = TruncateUtil.generateTmpTableRandomSuffix();<NEW_LINE>TruncateTableWithGsiPreparedData truncateTableWithGsiPreparedData = logicalTruncateTable... | tmpIndexTableMap = new HashMap<>(); |
652,416 | private static void testCollection(EntityManagerFactory entityManagerFactory) {<NEW_LINE>// Collections not stored on cache on inserts<NEW_LINE>Map<String, Counts> counts = new TreeMap<>();<NEW_LINE>counts.put(Trainer.class.getName(), new Counts(1, 0, 0, 1));<NEW_LINE>counts.put(Trainer.class.getName() + ".pokemons", n... | counts = new TreeMap<>(); |
530,110 | private void initialize() {<NEW_LINE>if (!configuration.dryrun() && configuration.randomStartupSleepMs() > 0) {<NEW_LINE>int delay = ThreadLocalRandom.current().nextInt(configuration.randomStartupSleepMs());<NEW_LINE>log.info("VespaStorage: Delaying startup by " + delay + " ms");<NEW_LINE>try {<NEW_LINE>Thread.sleep(de... | = new StringTokenizer(endpoints, ","); |
1,104,999 | public Request<CreateCacheSecurityGroupRequest> marshall(CreateCacheSecurityGroupRequest createCacheSecurityGroupRequest) {<NEW_LINE>if (createCacheSecurityGroupRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<CreateCacheSecurityGroupReque... | (createCacheSecurityGroupRequest.getDescription())); |
521,777 | static void backsubstitution0134(DMatrixRMaj P_plus, DMatrixRMaj P, DMatrixRMaj X, double[] H) {<NEW_LINE>final int N = P.numRows;<NEW_LINE>DMatrixRMaj tmp = new DMatrixRMaj(N * 2, 1);<NEW_LINE>double H6 = H[6];<NEW_LINE>double H7 = H[7];<NEW_LINE>double H8 = H[8];<NEW_LINE>for (int i = 0, index = 0; i < N; i++) {<NEW_... | , h3 = 0, h4 = 0; |
1,221,510 | // Configure stage4<NEW_LINE>protected JobConf configStage4() throws Exception {<NEW_LINE>final JobConf conf = new JobConf(getConf(), ConCmpt.class);<NEW_LINE>conf.set("number_nodes", "" + number_nodes);<NEW_LINE>conf.set("cur_iter", "" + cur_iter);<NEW_LINE>conf.set("make_symmetric", "" + make_symmetric);<NEW_LINE>con... | conf.setMapperClass(MapStage4.class); |
224,135 | protected void aggregateOneAlignedSeries(AlignedPath alignedPath, List<List<Integer>> subIndexes, Set<String> allMeasurementsInDevice, Filter timeFilter) throws IOException, QueryProcessException, StorageEngineException {<NEW_LINE>List<List<AggregateResult>> ascAggregateResultList = new ArrayList<>();<NEW_LINE>List<Lis... | (subIndex.get(0)); |
1,300,613 | public void addGetter(Class<?> getterClass, String fieldName) throws InstrumentException {<NEW_LINE>Objects.requireNonNull(getterClass, "getterClass");<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>final GetterAnalyzer.GetterDetails getterDetails = new GetterAnalyzer().analyze(getterClass);<NEW_LINE>final ASMFieldNodeAdapter... | Objects.requireNonNull(fieldName, "fieldName"); |
834,450 | public SubjectAreaOMASAPIResponse<Term> updateTerm(String serverName, String userId, String guid, Term suppliedTerm, boolean isReplace) {<NEW_LINE>final String methodName = "updateTerm";<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("==> Method: " + methodName + ",userId=" + userId + ",guid=" + guid);<NEW_LIN... | ",userId=" + userId + ", response =" + response); |
119,065 | public okhttp3.Call postPingCall(SomeObj someObj, final ApiCallback _callback) throws ApiException {<NEW_LINE>String basePath = null;<NEW_LINE>// Operation Servers<NEW_LINE>String[] <MASK><NEW_LINE>// Determine Base Path to Use<NEW_LINE>if (localCustomBaseUrl != null) {<NEW_LINE>basePath = localCustomBaseUrl;<NEW_LINE>... | localBasePaths = new String[] {}; |
666,821 | public void configure(Map conf) {<NEW_LINE>this.stormConf = conf;<NEW_LINE>topic = getConfig("kafka.topic", "jstorm");<NEW_LINE>zkRoot = getConfig("storm.zookeeper.root", "/jstorm");<NEW_LINE>String zkHosts = getConfig("kafka.zookeeper.hosts", "127.0.0.1:2181");<NEW_LINE><MASK><NEW_LINE>String brokerHosts = getConfig("... | zkServers = convertHosts(zkHosts, 2181); |
1,035,848 | private ArrayList<FaceEdge> computeShortestPathInDualGraph(FaceVertex sourceVertex, FaceVertex destVertex, Collection<FaceVertex> visitedVertices, int minPathLength, Collection<Face> faces) {<NEW_LINE>ArrayList<FaceEdge> shortestPath = null;<NEW_LINE>visitedVertices.add(sourceVertex);<NEW_LINE>for (FaceEdge e : sourceV... | = new ArrayList<FaceEdge>(); |
246,662 | /* (non-Javadoc)<NEW_LINE>* @see org.netbeans.modules.web.common.websocket.WebSocketChanelHandler#sendHandshake()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void sendHandshake() throws IOException {<NEW_LINE>String acceptKey = createAcceptKey(getKey());<NEW_LINE>if (acceptKey == null) {<NEW_LINE>close();<NEW_LINE>r... | builder.append(Utils.CRLF); |
1,504,888 | private boolean loadNextSkip(int level) throws IOException {<NEW_LINE>// we have to skip, the target document is greater than the current<NEW_LINE>// skip list entry<NEW_LINE>setLastSkipData(level);<NEW_LINE>numSkipped[level] += skipInterval[level];<NEW_LINE>// numSkipped may overflow a signed int, so compare as unsign... | ) + skipPointer[level - 1]; |
870,021 | public static boolean renameMasterDirInZK(ServerContext context) {<NEW_LINE>final ZooReaderWriter zoo = context.getZooReaderWriter();<NEW_LINE>final String mastersZooDir = context.getZooKeeperRoot() + "/masters";<NEW_LINE>final String managersZooDir = context.getZooKeeperRoot() + Constants.ZMANAGERS;<NEW_LINE>try {<NEW... | mastersDirExists = zoo.exists(mastersZooDir); |
1,001,435 | public static String sshPublicKey() {<NEW_LINE>if (sshPublicKey == null) {<NEW_LINE>try {<NEW_LINE>KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");<NEW_LINE>keyGen.initialize(1024);<NEW_LINE>KeyPair pair = keyGen.generateKeyPair();<NEW_LINE>PublicKey publicKey = pair.getPublic();<NEW_LINE>RSAPublicKey rsa... | getPublicExponent().toByteArray()); |
718,922 | // Note: Ported from DataverseUserPage<NEW_LINE>public void validateNewPassword(FacesContext context, UIComponent toValidate, Object value) {<NEW_LINE>String password = (String) value;<NEW_LINE>if (StringUtils.isBlank(password)) {<NEW_LINE>logger.log(Level.WARNING<MASK><NEW_LINE>((UIInput) toValidate).setValid(false);<... | , BundleUtil.getStringFromBundle("passwdVal.passwdReset.valBlankLog")); |
861,316 | // supposed to replace all E with 10^num2 not sure if i used it though<NEW_LINE>public static String EP(String input) {<NEW_LINE>double num1 = 0, num2 = 0, ans = 0;<NEW_LINE>int b = 0, t1 = 0, t2 = 0;<NEW_LINE>String anstring = "";<NEW_LINE>String temp = "";<NEW_LINE>int count = 0;<NEW_LINE>while (b < input.length()) {... | input, (b + 1)); |
1,531,120 | public boolean visit(MethodDeclaration node) {<NEW_LINE>if (!hasChildrenChanges(node)) {<NEW_LINE>return doVisitUnchangedChildren(node);<NEW_LINE>}<NEW_LINE>int pos = rewriteJavadoc(node, MethodDeclaration.JAVADOC_PROPERTY);<NEW_LINE>int apiLevel = node.getAST().apiLevel();<NEW_LINE>if (apiLevel == JLS2_INTERNAL) {<NEW... | pos, Util.EMPTY_STRING, ", "); |
1,705,538 | public boolean seekExact(BytesRef text) throws IOException {<NEW_LINE>// Check cache<NEW_LINE>long currentTermOrd = cachedTermOrds.add(text);<NEW_LINE>if (currentTermOrd < 0) {<NEW_LINE>// already seen, initialize instance data with the cached frequencies<NEW_LINE>currentTermOrd = -1 - currentTermOrd;<NEW_LINE>boolean ... | grow(termsTotalFreqs, currentTermOrd + 1); |
737,674 | private void fillGlobalTable(GlobalTable globalTable, int schemaSqlMaxLimit, Map<String, BaseTableConfig> tableConfigMap, Map<String, ShardingNodeConfig> shardingNodeConfigMap) {<NEW_LINE>String globalTableName = globalTable.getName();<NEW_LINE>String globalTableSqlMaxLimitStr = null == globalTable.getSqlMaxLimit() ? n... | globalTableShardingNode, ',', '$', '-'); |
618,277 | public void read(org.apache.thrift.protocol.TProtocol iprot, drainReplicationTable_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeFiel... | skip(iprot, schemeField.type); |
48,446 | public void write(org.restlet.ext.xml.XmlWriter writer) throws IOException {<NEW_LINE>try {<NEW_LINE>// Start document<NEW_LINE>writer.startDocument();<NEW_LINE>// Append the root node<NEW_LINE>writer.startElement("mail");<NEW_LINE>// Append the child nodes and set their text content<NEW_LINE>writer.startElement("statu... | getTargetRef().toString()); |
464,006 | private static <T extends Comparable<? super T>> void quickSelect(T[] arr, int left, int right, int k) {<NEW_LINE>if (left + CUTOFF <= right) {<NEW_LINE>// find the pivot<NEW_LINE>T pivot = median(arr, left, right);<NEW_LINE>int i = left, j = right - 1;<NEW_LINE>for (; ; ) {<NEW_LINE>while (arr[++i].compareTo(pivot) < ... | swapReferences(arr, i, j); |
1,659,551 | public List<OrganizationModel> retrieveOrganizationInfo() {<NEW_LINE>try {<NEW_LINE>String accessToken = config.getCmsAccessToken();<NEW_LINE>String url = config.getCmsOrganizationUrl();<NEW_LINE>AccessBody accessBody = new AccessBody();<NEW_LINE>accessBody.setAccess_token(accessToken);<NEW_LINE>OrgResponseBody respons... | setId(org.getOrganizationId()); |
1,587,682 | private void fetchSortingConfig() {<NEW_LINE>if (!_preprocessingOperations.contains(DataPreprocessingUtils.Operation.SORT)) {<NEW_LINE>LOGGER.info("Sorting is disabled.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Fetch sorting info from table config first.<NEW_LINE>List<String> sortingColumns = new ArrayList<>();<NEW_LI... | fieldSpec = _pinotTableSchema.getFieldSpecFor(_sortingColumn); |
1,774,925 | public PaginationContext createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters, final Collection<WhereSegment> whereSegments) {<NEW_LINE>Optional<LimitSegment> limitSegment = SelectStatementHandler.getLimitSegment(selectStatement);<NEW_... | get(), expressions, parameters); |
1,635,647 | public void performRecoverableFileDelete(String path) throws PlatformManagerException {<NEW_LINE>File file = new File(path);<NEW_LINE>if (!file.exists()) {<NEW_LINE>if (Logger.isEnabled())<NEW_LINE>Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Cannot find " + file.getName()));<NEW_LINE>return;<NEW_LINE>}<NEW_LIN... | sharedInstance().performRecoverableFileDelete(file); |
1,498,254 | private void onFrame(long frameTimeNanos) {<NEW_LINE><MASK><NEW_LINE>int drainingOffset;<NEW_LINE>if (nextPendingValue != null) {<NEW_LINE>mAnimationQueue.offer(nextPendingValue);<NEW_LINE>drainingOffset = 0;<NEW_LINE>} else {<NEW_LINE>drainingOffset = Math.max(mCallbacks.size() - mAnimationQueue.size(), 0);<NEW_LINE>}... | Double nextPendingValue = mPendingQueue.poll(); |
610,525 | private static String resolveDownloadUrlFromUploader(JReleaserContext context, ExtraProperties props, Artifact artifact) {<NEW_LINE>Upload upload = context.getModel().getUpload();<NEW_LINE>String <MASK><NEW_LINE>if (isBlank(coords)) {<NEW_LINE>// search for "<uploaderType><uploaderName>Path"<NEW_LINE>for (Uploader up :... | coords = props.getExtraProperty(DOWNLOAD_URL_FROM_KEY); |
161,554 | protected static SqlInsert buildLogicalPlanWithDistinctData(SqlInsert oldSqlInsert, List<Integer> selectedRowIndices, ExecutionContext executionContext) {<NEW_LINE>SqlCall values = (SqlCall) oldSqlInsert.getSource();<NEW_LINE>List<SqlNode> rows = values.getOperandList();<NEW_LINE>Parameters oldParameters = executionCon... | selectedRows, values.getParserPosition()); |
1,205,733 | public static final void writeStringArrayXml(String[] val, String name, XmlSerializer out) throws XmlPullParserException, java.io.IOException {<NEW_LINE>if (val == null) {<NEW_LINE>out.startTag(null, "null");<NEW_LINE>out.endTag(null, "null");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>out.startTag(null, "string-array");<NEW... | out.startTag(null, "item"); |
405,838 | protected static void shutdown(final String[] args) {<NEW_LINE>if (FileUtils.getConfigurationFilePath(args) == null) {<NEW_LINE>LOGGER.info("Shutting down RESTHeart instance run without configuration file");<NEW_LINE>} else if (FileUtils.getPropertiesFilePath(args) == null) {<NEW_LINE>LOGGER.info("Shutting down RESTHea... | FileUtils.getPropertiesFilePath(args))); |
479,644 | private Cursor handlePartitionedTable(PartitionInfo partitionInfo) {<NEW_LINE>ArrayResultCursor result = new ArrayResultCursor("TOPOLOGY");<NEW_LINE>result.addColumn("ID", DataTypes.IntegerType);<NEW_LINE>result.addColumn("GROUP_NAME", DataTypes.StringType);<NEW_LINE>result.addColumn("TABLE_NAME", DataTypes.StringType)... | (new ArrayList<>()); |
371,052 | final ListDatasetLabelsResult executeListDatasetLabels(ListDatasetLabelsRequest listDatasetLabelsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDatasetLabelsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
371,687 | private // } // opArgsToArray<NEW_LINE>Selector genIdToSelector(SyntaxTreeNode genId) throws AbortException {<NEW_LINE>Selector retval = new Selector(genId);<NEW_LINE>TreeNode prefix = genId.heirs()[0];<NEW_LINE>TreeNode[] prefixElts = prefix.heirs();<NEW_LINE>SyntaxTreeNode lastOp = (SyntaxTreeNode) genId.heirs()[1];... | genId.getLocation(), "Was expecting a GeneralId."); |
560,312 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>CommonLayoutParams.adjustChildrenLayoutParams(this, widthMeasureSpec, heightMeasureSpec);<NEW_LINE>int measureWidth = 0;<NEW_LINE>int measureHeight = 0;<NEW_LINE>int width = MeasureSpec.getSize(widthMeasureSpec);<NEW_LINE>int widthMode = M... | .UNSPECIFIED ? 0 : width - horizontalPadding; |
1,821,297 | private void initialize(final File file) {<NEW_LINE>bbIterator = MMapBackedIteratorFactory.getFloatIterator(HEADER_SIZE, file);<NEW_LINE>final ByteBuffer headerBuf = bbIterator.getHeaderBytes();<NEW_LINE>final int firstValue = headerBuf.getInt();<NEW_LINE>if (firstValue != BYTES_1_TO_4) {<NEW_LINE>throw new PicardExcep... | float versionNumber = headerBuf.getFloat(); |
1,156,902 | public static <T> void iterate(final Collection<T> collection, final ValueMapper valueMapper, final OnMapperCompleteListener onMapperCompleteListener) {<NEW_LINE>final Mutable<Boolean> didReturnError = new Mutable<Boolean>(false);<NEW_LINE>final Mutable<Integer> pendingJobCount = new Mutable<Integer>(1);<NEW_LINE>final... | valueMapper.mapValue(value, onMapValueCompleteListener); |
573,478 | private void save(ServerLongLongRow row, PSMatrixSaveContext saveContext, MatrixPartitionMeta meta, DataOutputStream out) throws IOException {<NEW_LINE>long startCol = meta.getStartCol();<NEW_LINE>if (ServerRowUtils.getVector(row) instanceof IntLongVector) {<NEW_LINE>IntLongVector vector = (IntLongVector) ServerRowUtil... | .writeLong(values[i]); |
670,006 | public void updateCodegen(CodegenMethod method, CodegenClassScope classScope) {<NEW_LINE>method.getBlock().apply(instblock(classScope, "qOutputProcessNonBuffered", REF_NEWDATA, REF_OLDDATA));<NEW_LINE>generateRSPCall("processViewResult", method, classScope);<NEW_LINE>CodegenExpression newOldIsNull = and(equalsNull(expr... | (instblock(classScope, "aOutputProcessNonBuffered")); |
878,082 | public boolean action(Request request, Response response) {<NEW_LINE>if (request.getNettyRequest() instanceof FullHttpRequest) {<NEW_LINE>InputGetGroup inputGetGroup = getRequestBody(request.getNettyRequest(), InputGetGroup.class);<NEW_LINE>if (inputGetGroup != null && (!StringUtil.isNullOrEmpty(inputGetGroup.getGroupI... | (ErrorCode.INVALID_PARAMETER), response); |
232,165 | public void publish(RevoltReading reading) {<NEW_LINE>if (reading != null && getThing().getStatus() == ThingStatus.ONLINE) {<NEW_LINE>BigDecimal power = new BigDecimal(reading.getPower()).setScale(1, RoundingMode.HALF_UP);<NEW_LINE>BigDecimal powerFactor = new BigDecimal(reading.getPowerFactor()).setScale(2, RoundingMo... | setScale(2, RoundingMode.HALF_UP); |
440,516 | public INDArray preOutput(boolean training, LayerWorkspaceMgr workspaceMgr) {<NEW_LINE>INDArray b = getParam(DefaultParamInitializer.BIAS_KEY);<NEW_LINE>INDArray <MASK><NEW_LINE>if (input.columns() != W.columns()) {<NEW_LINE>throw new DL4JInvalidInputException("Input size (" + input.columns() + " columns; shape = " + A... | W = getParam(DefaultParamInitializer.WEIGHT_KEY); |
365,433 | public void resolve(BlockScope skope) {<NEW_LINE>this.scope = isInsideTry() ? new BlockScope(skope) : skope;<NEW_LINE>super.resolve(this.scope);<NEW_LINE>if (this.expression == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.switchExpression != null || this.isImplicit) {<NEW_LINE>if (this.switchExpression == null... | problemReporter().switchExpressionsYieldOutsideSwitchExpression(this); |
1,282,050 | public ECPoint twicePlus(ECPoint b) {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return b;<NEW_LINE>}<NEW_LINE>if (b.isInfinity()) {<NEW_LINE>return twice();<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>ECFieldElement X1 = this.x;<NEW_LINE>if (X1.isZero()) {<NEW_LINE>// A point with X == 0 is its own a... | L1Z1 = L1.multiply(Z1); |
1,035,410 | protected List<? extends OperatorFactory> createOperatorFactories() {<NEW_LINE>Metadata metadata = localQueryRunner.getMetadata();<NEW_LINE>OperatorFactory tableScanOperator = createTableScanOperator(0, new PlanNodeId("test"), "orders", "totalprice");<NEW_LINE>RowExpression filter = call(GREATER_THAN_OR_EQUAL.name(), m... | field(0, DOUBLE))); |
127,779 | private void changeTemperatureUnits(boolean isImperial, @NonNull Style loadedMapStyle) {<NEW_LINE>if (mapboxMap != null && this.isImperial != isImperial) {<NEW_LINE>this.isImperial = isImperial;<NEW_LINE>// Apply new units to the data displayed in text fields of SymbolLayers<NEW_LINE>SymbolLayer maxTempLayer = (SymbolL... | setText(isImperial ? DEGREES_C : DEGREES_F); |
1,038,873 | public ConfiguredTarget create(RuleContext context) throws InterruptedException, RuleErrorException, ActionConflictException {<NEW_LINE>// This rule doesn't produce any output when listed as a build target.<NEW_LINE>// Only when used via the --experimental_action_listener flag,<NEW_LINE>// this rule instructs the build... | addHostToolDependencies("tools").build(); |
206,393 | public void run(final FlowTrigger trigger, Map data) {<NEW_LINE>FlatDhcpAcquireDhcpServerIpMsg msg = new FlatDhcpAcquireDhcpServerIpMsg();<NEW_LINE>msg.setL3NetworkUuid(struct.getL3NetworkUuid());<NEW_LINE>bus.makeTargetServiceIdByResourceUuid(msg, FlatNetworkServiceConstant.<MASK><NEW_LINE>bus.send(msg, new CloudBusCa... | SERVICE_ID, struct.getL3NetworkUuid()); |
1,382,050 | private void addRelation(InternalRelationship layoutRelationship) {<NEW_LINE>if (layoutRelationship == null) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>throw new IllegalArgumentException("The arguments can not be null!");<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>weight = (weight <= 0 ? 0.1 : weight);<NEW_LINE>String key1 = l... | double weight = layoutRelationship.getWeight(); |
1,355,757 | public Request<RemoveRoleFromDBInstanceRequest> marshall(RemoveRoleFromDBInstanceRequest removeRoleFromDBInstanceRequest) {<NEW_LINE>if (removeRoleFromDBInstanceRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<RemoveRoleFromDBInstanceReque... | request.addParameter("Action", "RemoveRoleFromDBInstance"); |
163,612 | public com.amazonaws.services.stepfunctions.model.InvalidLoggingConfigurationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.stepfunctions.model.InvalidLoggingConfigurationException invalidLoggingConfigurationException = new com.amazonaws.services.step... | JsonToken token = context.getCurrentToken(); |
596,155 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player opponent = game.<MASK><NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (opponent == null || controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>opponent.revealCards(source, opponent.getHand(), game);<NEW_LI... | getPlayer(source.getFirstTarget()); |
1,831,925 | public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException {<NEW_LINE>serializer.startTag(null, "style");<NEW_LINE>serializer.attribute(null, "name", res.getResSpec().getName());<NEW_LINE>if (!mParent.isNull() && !mParent.referentIsNull()) {<NEW_LINE>serializer.... | serializer.endTag(null, "style"); |
1,307,989 | protected void onPaymentAccountsComboBoxSelected() {<NEW_LINE>// Temporary deactivate handler as the payment account change can populate a new currency list and causes<NEW_LINE>// unwanted selection events (item 0)<NEW_LINE>currencyComboBox.setOnAction(null);<NEW_LINE>PaymentAccount paymentAccount = paymentAccountsComb... | onCurrencySelected(model.getTradeCurrency()); |
511,757 | public void seek(int offset) throws IOException {<NEW_LINE>boolean doReload;<NEW_LINE>if (offset > filePos) {<NEW_LINE>if (offset > fileLength) {<NEW_LINE>throw new IOException("Offset [ " + offset + " ]" + " past end [ " + fileLength + " ]" + " of [ " + path + " ]");<NEW_LINE>} else {<NEW_LINE>doReload = true;<NEW_LIN... | read(buffer, 0, bufferFill); |
618,401 | public void run() {<NEW_LINE>try {<NEW_LINE>System.out.println("Starting index read performance");<NEW_LINE>System.out.flush();<NEW_LINE>while (!isShutdown.get()) {<NEW_LINE>synchronized (hashes) {<NEW_LINE>// choose a random index<NEW_LINE>int indexToUse = new Random().nextInt(hashes.size());<NEW_LINE>IndexPayload ind... | out.println("Error id not found in index " + idToLookup); |
536,869 | private static ModuleDBAdapter upgrade(ModuleManager moduleMgr, ModuleDBAdapter oldAdapter, TaskMonitor monitor) throws IOException, CancelledException {<NEW_LINE>long treeID = moduleMgr.getTreeID();<NEW_LINE>DBHandle handle = moduleMgr.getDatabaseHandle();<NEW_LINE>DBHandle tmpHandle = new DBHandle();<NEW_LINE>long id... | ModuleDBAdapterV1(handle, true, treeID); |
197,395 | public static Map<String, Collection<String>> snippetsFromHighlighting(final NamedList<?> sorlHighlighting) {<NEW_LINE>final Map<String, Collection<String>> snippets = new HashMap<>();<NEW_LINE>if (sorlHighlighting == null) {<NEW_LINE>return snippets;<NEW_LINE>}<NEW_LINE>for (final Entry<String, ?> highlightingEntry : ... | Object texts = entry.getValue(); |
693,480 | public void paint(Graphics g) {<NEW_LINE>GraphicsUtils.configureDefaultRenderingHints(g);<NEW_LINE><MASK><NEW_LINE>Color color = g.getColor();<NEW_LINE>if (selected) {<NEW_LINE>// NOI18N<NEW_LINE>g.setColor(UIManager.getColor("List.selectionBackground"));<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>g.setColor(UIManag... | Dimension rectangle = this.getSize(); |
1,539,412 | private void generateSources(TreeMap<Key, String[]> properties, Map<GwtLocale, Set<GwtLocale>> parents) throws IOException {<NEW_LINE>Set<GwtLocale> locales = new HashSet<GwtLocale>();<NEW_LINE>// process sorted locales/keys, generating each locale on change<NEW_LINE>GwtLocale lastLocale = null;<NEW_LINE>Map<String, St... | = entry.getKey().locale; |
471,864 | public ModelAndView save(HttpServletRequest request, @Valid SysDic dic) {<NEW_LINE>List<SysDic> sysDicList = sysDicRes.findByCodeOrName(dic.getCode(), dic.getName());<NEW_LINE>String msg = null;<NEW_LINE>String orgi = super.getOrgi(request);<NEW_LINE>if (sysDicList.size() == 0) {<NEW_LINE>dic.setParentid("0");<NEW_LINE... | "?msg=" + msg : ""))); |
182,014 | public final TextEdit rewriteImports(IProgressMonitor monitor) throws CoreException {<NEW_LINE>SubMonitor subMonitor = SubMonitor.convert(monitor, Messages.bind(Messages.importRewrite_processDescription), 2);<NEW_LINE>if (!hasRecordedChanges()) {<NEW_LINE>this.createdImports = CharOperation.NO_STRINGS;<NEW_LINE>this.cr... | .createdImports = result.getCreatedImports(); |
413,287 | /*<NEW_LINE>* StringToSign = VERB + "\n" + Content-MD5 + "\n" + Content-Type + "\n" +<NEW_LINE>* Date + "\n" + CanonicalizedHeaders + CanonicalizedResource;<NEW_LINE>*/<NEW_LINE>public void sign(ClientRequest cr) {<NEW_LINE>// gather signed material<NEW_LINE>String requestMethod = cr.getMethod();<NEW_LINE>String conten... | .format(new Date()); |
1,732,681 | protected void initData() {<NEW_LINE>if (illust != null) {<NEW_LINE>loadImage();<NEW_LINE>}<NEW_LINE>IntentFilter intentFilter = new IntentFilter();<NEW_LINE>mReceiver = new CallBackReceiver(new BaseReceiver.CallBack() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReceive(Context context, Intent intent) {<NEW_L... | Bundle bundle = intent.getExtras(); |
501,428 | public void registerScriptPlugin(String type, String objectId) {<NEW_LINE>ScriptObject object = mObjects.get(objectId);<NEW_LINE>if (object == null) {<NEW_LINE>object = new ScriptObject(objectId, this);<NEW_LINE>mObjects.put(objectId, object);<NEW_LINE>}<NEW_LINE>switch(type) {<NEW_LINE>case ScriptObject.TYPE_RESOLVER:... | get().onPluginLoaded(this); |
1,719,498 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "s0,s1".split(",");<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public insert into ABCStreamUO select * from MyMapTypeUO", path);<NEW_LINE>env.compileDeploy("@Name('A') update istream ABCStreamUO set s0='A'", p... | , path).addListener("s0"); |
300,329 | public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env) {<NEW_LINE>return ConfigAwareRuleClassBuilder.of(builder).requiresHostConfigurationFragments(JavaConfiguration.class).originalBuilder().requiresConfigurationFragments(JavaConfiguration.class).advertiseProvider(TemplateVariableInfo.class).a... | , LICENSE)).build(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.