idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
209,394 | public void delete(L2NetworkInventory l2Network, String hostUuid, Completion completion, final String cmdPath) {<NEW_LINE>L2VlanNetworkInventory l2vlan = (L2VlanNetworkInventory) l2Network;<NEW_LINE>DeleteVlanBridgeCmd cmd = new DeleteVlanBridgeCmd();<NEW_LINE>cmd.setPhysicalInterfaceName(l2Network.getPhysicalInterface... | setL2NetworkUuid(l2Network.getUuid()); |
881,010 | public void validateSigAlg(Page endpointOutput, String sigAlg) throws Exception {<NEW_LINE>String thisMethod = "validateSigAlg";<NEW_LINE>loggingUtils.printMethodName(thisMethod, "Start of");<NEW_LINE>String <MASK><NEW_LINE>Log.info(thisClass, thisMethod, "response value: " + jwtToken);<NEW_LINE>JsonObject val = Json.c... | jwtToken = WebResponseUtils.getResponseText(endpointOutput); |
1,459,497 | public float calculateRadiusSquared(final float centerX, final float centerY, final float centerZ, int offset, int count, final Matrix4 transform) {<NEW_LINE>int numIndices = getNumIndices();<NEW_LINE>if (offset < 0 || count < 1 || offset + count > numIndices)<NEW_LINE>throw new GdxRuntimeException("Not enough indices"... | centerY, centerZ).len2(); |
884,724 | private void checkPath() throws AnalysisException {<NEW_LINE>if (Strings.isNullOrEmpty(path)) {<NEW_LINE>throw new AnalysisException("No dest path specified.");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>String scheme = uri.getScheme();<NEW_LINE>if (scheme == null) {<NEW_LINE>throw new AnalysisException("Invali... | URI uri = new URI(path); |
1,831,399 | public Observable<ServiceResponse<List<String>>> listDomainsWithServiceResponseAsync() {<NEW_LINE>if (this.client.endpoint() == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");<NEW_LINE>}<NEW_LINE>String parameterizedHost = Joiner.on(", ").join("{E... | this.client.endpoint()); |
1,775,358 | protected Path loadServerConfiguration() {<NEW_LINE>String configPath = DEFAULT_CONFIG_FILE_PATH;<NEW_LINE>String[] args = Platform.getCommandLineArgs();<NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>if (args[i].equals(CLI_PARAM_WEB_CONFIG) && args.length > i + 1) {<NEW_LINE>configPath = args[i + 1];<NEW_LI... | "logback.configurationFile", logbackConfigPath.toString()); |
799,002 | private void addBollingerBandsMarkerLines(ChartInterval chartInterval, int bollingerBandsDays, double bollingerBandsFactor) {<NEW_LINE>BollingerBands bands = new BollingerBands(bollingerBandsDays, bollingerBandsFactor, this.security, chartInterval);<NEW_LINE>ChartLineSeriesAxes lowerBand = bands.getLowerBand();<NEW_LIN... | SeriesType.LINE, Messages.LabelChartDetailIndicatorBollingerBandsLower); |
1,063,917 | private List<PluginHandleVO> buildPluginHandleVO(final List<PluginHandleDO> pluginHandleDOList) {<NEW_LINE>Set<String> fieldSet = pluginHandleDOList.stream().filter(pluginHandleDO -> pluginHandleDO.getDataType() == SELECT_BOX_DATA_TYPE).map(PluginHandleDO::getField).<MASK><NEW_LINE>Map<String, List<ShenyuDictVO>> sheny... | collect(Collectors.toSet()); |
1,811,498 | public static boolean searchParamMatchesAtLeastOnePattern(Set<String> theSearchParamPatterns, String theResourceType, String theSearchParamName) {<NEW_LINE>for (String nextPattern : theSearchParamPatterns) {<NEW_LINE>if ("*".equals(nextPattern)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>int colonIdx = nextPattern.ind... | notBlank(searchParamName, "No param name specified in pattern: %s", nextPattern); |
1,315,181 | public static Map<String, String> buildDefaultValueMap(String endpoint) throws ParserConfigurationException, SAXException, IOException {<NEW_LINE>Map<String, String> defaultValues = new HashMap<>();<NEW_LINE>RestResponse response = options(endpoint, "application/json");<NEW_LINE>// System.out.println("=========== respo... | getResponse().get("data"); |
1,798,518 | public void removeRow(ArrayRow row) {<NEW_LINE>if (row.mIsSimpleDefinition && row.mVariable != null) {<NEW_LINE>if (row.mVariable.mDefinitionId != -1) {<NEW_LINE>for (int i = row.mVariable.mDefinitionId; i < mNumRows - 1; i++) {<NEW_LINE>SolverVariable rowVariable = mRows[i + 1].mVariable;<NEW_LINE>if (rowVariable.mDef... | ] = mRows[i + 1]; |
1,497,447 | static void stats(List<String> paragraphs) {<NEW_LINE>int paragraphCounter = 0;<NEW_LINE>int sentenceCounter = 0;<NEW_LINE>int tokenCounter = 0;<NEW_LINE>int tokenNoPunctCounter = 0;<NEW_LINE>int tokenWordCounter = 0;<NEW_LINE>for (String paragraph : paragraphs) {<NEW_LINE>List<String> sentences = TurkishSentenceExtrac... | out.println("tokenWordCounter = " + tokenWordCounter); |
302,543 | public void addSystemVMTemplatesToSecondary(DataStore store) {<NEW_LINE><MASK><NEW_LINE>List<VMTemplateVO> rtngTmplts = _templateDao.listAllSystemVMTemplates();<NEW_LINE>for (VMTemplateVO tmplt : rtngTmplts) {<NEW_LINE>TemplateDataStoreVO tmpltStore = _vmTemplateStoreDao.findByStoreTemplate(storeId, tmplt.getId());<NEW... | long storeId = store.getId(); |
10,742 | public io.kubernetes.client.proto.V1.StorageOSPersistentVolumeSource buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1.StorageOSPersistentVolumeSource result = new io.kubernetes.client.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) ==... | proto.V1.StorageOSPersistentVolumeSource(this); |
1,148,769 | final // in PartitionBackupReplicaAntiEntropyTask<NEW_LINE>Collection<ServiceNamespace> retainAndGetNamespaces() {<NEW_LINE>PartitionReplicationEvent event = new PartitionReplicationEvent(null, partitionId, 0);<NEW_LINE>Collection<FragmentedMigrationAwareService> services = nodeEngine.getServices(FragmentedMigrationAwa... | serviceNamespaces = service.getAllServiceNamespaces(event); |
481,750 | public void write(@NotNull final ChannelHandlerContext ctx, @NotNull final Object msg, @NotNull final ChannelPromise promise) throws Exception {<NEW_LINE>if (msg instanceof SUBACK || msg instanceof UNSUBACK) {<NEW_LINE>promise.addListener(new ChannelFutureListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void o... | ).remove(SubscribeMessageBarrier.this); |
1,489,657 | private String generateJMXConfig() {<NEW_LINE>List<JmxTransQueries> queries = jmxTransQueries();<NEW_LINE>List<JmxTransServer> servers <MASK><NEW_LINE>String headlessService = KafkaResources.brokersServiceName(cluster);<NEW_LINE>for (int brokerNumber = 0; brokerNumber < numberOfBrokers; brokerNumber++) {<NEW_LINE>Strin... | = new ArrayList<>(numberOfBrokers); |
1,503,547 | private void processInstructionFlows(PseudoInstruction inst, InstructionBlock block) {<NEW_LINE>// Process language specified flows only - following refs may result in context conflicts<NEW_LINE>Address[] flowAddrs = inst.getFlows();<NEW_LINE>FlowType flowType = inst.getFlowType();<NEW_LINE>Address instAddr = inst.getM... | , InstructionBlockFlow.Type.CALL)); |
816,045 | public void testJEEMetadataContext(String execSvcJNDIName, PrintWriter out) throws Exception {<NEW_LINE>final BlockingQueue<Object> results = new LinkedBlockingQueue<Object>();<NEW_LINE>final Runnable javaCompLookup = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>System.out.println... | new ExecutionException((Throwable) result); |
1,597,827 | private Stream<MapResult> readHtmlPage(String url, Map<String, String> query, Map<String, Object> config) {<NEW_LINE>String charset = config.getOrDefault("charset", "UTF-8").toString();<NEW_LINE>try {<NEW_LINE>// baseUri is used to resolve relative paths<NEW_LINE>String baseUri = config.getOrDefault("baseUri", "").toSt... | , null), charset, baseUri); |
1,309,667 | public Set<Long> createAppraisals(Appraisal appraisalTemplate, Set<Employee> employees, Boolean send) throws ClassNotFoundException, InstantiationException, IllegalAccessException, AxelorException, IOException, MessagingException {<NEW_LINE>Set<Long> appraisalIds = new HashSet<Long>();<NEW_LINE>if (appraisalTemplate ==... | setCompany(employmentContract.getPayCompany()); |
1,341,793 | public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) {<NEW_LINE>List<ViewManager> managers = new ArrayList<>();<NEW_LINE>// components<NEW_LINE>managers.add(new RCTMGLCameraManager(reactApplicationContext));<NEW_LINE>managers.add(new RCTMGLAndroidTextureMapViewManager(reactApplic... | add(new RCTMGLMapViewManager(reactApplicationContext)); |
1,364,597 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>user = (User) getIntent().getSerializableExtra(EXTRA_USER);<NEW_LINE>loadingBar = finder.find(R.id.pb_loading);<NEW_LINE>ActionBar actionBar = getSupportActionBar();<NEW_LINE>actionBar.setDisplayHomeAsUpEnabled(tr... | setTitle(user.getLogin()); |
987,134 | public Pair<Map<RandomVariable, Object>, Double> weightedSample(BayesianNetwork bn, AssignmentProposition[] e) {<NEW_LINE>// w <- 1;<NEW_LINE>double w = 1.0;<NEW_LINE>// <b>x</b> <- an event with n elements initialized from e<NEW_LINE>Map<RandomVariable, Object> x = new <MASK><NEW_LINE>for (AssignmentProposition ap : e... | LinkedHashMap<RandomVariable, Object>(); |
128,031 | public List<QueryOrderingProperty> fromOrderByString(String orderByString) {<NEW_LINE>List<QueryOrderingProperty> properties = new ArrayList<QueryOrderingProperty>();<NEW_LINE>String[] orderByClauses = orderByString.split(ORDER_BY_DELIMITER);<NEW_LINE>for (String orderByClause : orderByClauses) {<NEW_LINE>orderByClause... | propertyPart.substring(0, functionArgumentBegin); |
215,972 | private void checkOutputFile(final String name, final File value) {<NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (value.exists() && !value.isFile()) {<NEW_LINE>throw new CommandLineException.BadArgumentValue(name, "the output file location '" + value + "' exists as not a file");<NEW_LINE>}<NEW_... | name, "the output file parent directory '" + parent + "' is not a directory"); |
1,657,405 | @Override<NEW_LINE>protected Task<Void> onStartPreview() {<NEW_LINE>LOG.i("onStartPreview:", "Dispatching onCameraPreviewStreamSizeChanged.");<NEW_LINE>getCallback().onCameraPreviewStreamSizeChanged();<NEW_LINE>Size <MASK><NEW_LINE>if (previewSizeForView == null) {<NEW_LINE>throw new IllegalStateException("previewStrea... | previewSizeForView = getPreviewStreamSize(Reference.VIEW); |
1,588,685 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {<NEW_LINE>req.setCharacterEncoding("utf-8");<NEW_LINE>resp.setCharacterEncoding("utf-8");<NEW_LINE>SayHelloService portFromRes = serviceFromRes.getHelloServicePort();<NEW_LINE><MASK><NEW_LINE>reConfigPorts(req, ... | SayHelloService portFromRef = serviceFromRef.getHelloServicePort(); |
873,591 | private static DataArrays trimDataArrays(final DataArrays da, final long thetaLong, final int numValues) {<NEW_LINE>final long[] hashArrIn = da.hashArr;<NEW_LINE>final double[] valuesArrIn = da.valuesArr;<NEW_LINE>final int count = count(hashArrIn, thetaLong);<NEW_LINE>final long[<MASK><NEW_LINE>final double[] valuesAr... | ] hashArrOut = new long[count]; |
1,669,971 | public Object clone() throws CloneNotSupportedException {<NEW_LINE>DefaultIntervalXYDataset clone = (DefaultIntervalXYDataset) super.clone();<NEW_LINE>clone.seriesKeys = new ArrayList<>(this.seriesKeys);<NEW_LINE>clone.seriesList = new ArrayList<>(this.seriesList.size());<NEW_LINE>for (int i = 0; i < this.seriesList.si... | = new double[yEnd.length]; |
1,070,774 | /*<NEW_LINE>* Add a list of servers to the 'allServer' list; does not verify<NEW_LINE>* uniqueness, so you could give a server a greater share by adding it more<NEW_LINE>* than once USED by Test Cases only for legacy reason. DO NOT USE!!<NEW_LINE>*/<NEW_LINE>void addServers(Object[] newServers) {<NEW_LINE>if ((newServe... | error("LoadBalancer [{}]: Exception while adding Servers", name, e); |
70,381 | public NetworkOfferingResponse newNetworkOfferingResponse(NetworkOffering offering) {<NEW_LINE>NetworkOfferingResponse networkOfferingResponse = new NetworkOfferingResponse();<NEW_LINE>networkOfferingResponse.setId(offering.getUuid());<NEW_LINE>networkOfferingResponse.setName(offering.getName());<NEW_LINE>networkOfferi... | getTrafficType().toString()); |
1,367,325 | public S3AccessControlPolicy unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>S3AccessControlPolicy s3AccessControlPolicy = new S3AccessControlPolicy();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<... | ().unmarshall(context)); |
611,109 | final DisassociateTrackerConsumerResult executeDisassociateTrackerConsumer(DisassociateTrackerConsumerRequest disassociateTrackerConsumerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateTrackerConsumerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
110,155 | public void paint(GGlassPane glassPane, Graphics graphics) {<NEW_LINE>//<NEW_LINE>// Update the size of the component, based upon the percent of completion<NEW_LINE>//<NEW_LINE>Graphics2D g2d = (Graphics2D) graphics;<NEW_LINE>//<NEW_LINE>// Move the component to the update location, based upon the percent of completion... | ) (defaultBounds.width * percentComplete); |
1,493,979 | public static Frete calcularFrete(Encomenda encomenda, Servico tipoFrete) throws CorreiosException {<NEW_LINE>Properties parameters = new Properties();<NEW_LINE>parameters.setProperty("nCdEmpresa", encomenda.getCodigoEmpresa());<NEW_LINE>parameters.setProperty("sDsSenha", encomenda.getSenha());<NEW_LINE>parameters.setP... | "sCepOrigem", encomenda.getCepOrigem()); |
286,387 | public static void main(String[] args) {<NEW_LINE>Stack_Priority data = new Stack_Priority();<NEW_LINE>System.out.println("Data entering in the stack\n");<NEW_LINE>System.out.println("Pushing data 10 ");<NEW_LINE>data.push(10);<NEW_LINE>System.out.println("Pushing data 20 ");<NEW_LINE>data.push(20);<NEW_LINE>System.out... | "Data pop " + data.pop()); |
1,702,471 | protected void buildTaskEnv(TaskExecutor executor) throws Exception {<NEW_LINE>log.info("Setting TonY task executor basic env...");<NEW_LINE>Map<String, String> executorShellEnv = executor.getShellEnv();<NEW_LINE>executorShellEnv.put(Constants.JOB_NAME, String.valueOf(executor.getJobName()));<NEW_LINE>executorShellEnv.... | getDistributedMode().name()); |
564,722 | protected void masterOperation(Task task, final PutIndexTemplateRequest request, final ClusterState state, final ActionListener<AcknowledgedResponse> listener) throws IOException {<NEW_LINE>String cause = request.cause();<NEW_LINE>if (cause.length() == 0) {<NEW_LINE>cause = "api";<NEW_LINE>}<NEW_LINE>final Settings.Bui... | (response.acknowledged())); |
280,308 | public void lower(ArrayCopyWithDelayedLoweringNode arraycopy, LoweringTool tool) {<NEW_LINE>if (!arraycopy.reachedRequiredLoweringStage()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Arguments args = new Arguments(getSnippet(arraycopy.getSnippet()), arraycopy.graph().getGuardsStage(), tool.getLoweringStage());<NEW_LINE>args... | "src", arraycopy.getSource()); |
1,352,471 | private void calculateFutureDateFlags(final PwmRequest pwmRequest, final GuestRegistrationBean guestRegistrationBean) {<NEW_LINE>final PwmDateFormat dateFormat = MiscUtil.newPwmDateFormat("yyyy-MM-dd");<NEW_LINE>final long maxValidDays = pwmRequest.getDomainConfig().readSettingAsLong(PwmSetting.GUEST_MAX_VALID_DAYS);<N... | setAttribute(PwmRequestAttribute.GuestCurrentExpirationDate, currentExpirationDate); |
1,079,169 | /* Count Tags displayed on the menu items */<NEW_LINE>@Transactional<NEW_LINE>public void leaveReasonToJustify(ActionRequest request, ActionResponse response) {<NEW_LINE>try {<NEW_LINE>LeaveRequest leave = request.getContext().asType(LeaveRequest.class);<NEW_LINE>Boolean leaveToJustify = leave.getToJustifyLeaveReason()... | ).addLeaveReasonOrCreateIt(employee, leaveReason); |
1,675,864 | void prepareUidAllowed(List<String> listAllowed, List<Rule> listRule) {<NEW_LINE>lock.writeLock().lock();<NEW_LINE>mapUidAllowed.clear();<NEW_LINE>uidSpecialAllowed.clear();<NEW_LINE>for (String uid : listAllowed) {<NEW_LINE>if (uid != null && uid.matches("\\d+")) {<NEW_LINE>mapUidAllowed.put(Integer.valueOf(uid), true... | rule.uid, rule.uid); |
633,814 | private boolean handleWhitespaceAround(int commentIndex) {<NEW_LINE>Token commentToken = <MASK><NEW_LINE>char charBefore = commentToken.originalStart > 0 ? this.tm.charAt(commentToken.originalStart - 1) : 0;<NEW_LINE>if (charBefore == ' ' || charBefore == '\t')<NEW_LINE>commentToken.spaceBefore();<NEW_LINE>if (commentT... | this.tm.get(commentIndex); |
50,269 | public void renderPDF(PDFTarget target, String label, float x, float y, Color color, float outlineSize, Color outlineColor) {<NEW_LINE>PdfContentByte cb = target.getContentByte();<NEW_LINE>cb.setRGBColorFill(color.getRed(), color.getGreen(), color.getBlue());<NEW_LINE>BaseFont bf = target.getBaseFont(font);<NEW_LINE>fl... | (textHeight / 2f), 0f); |
928,585 | static Parameter[] concatParams(Parameter[] params, Parameter[] namedParams, Parameter[] optionalParams) {<NEW_LINE>if (params == null)<NEW_LINE>params = Parameter.EMPTY_ARRAY;<NEW_LINE>if (namedParams == null)<NEW_LINE>namedParams = Parameter.EMPTY_ARRAY;<NEW_LINE>if (optionalParams == null)<NEW_LINE>optionalParams = ... | optionalParams.length, params.length); |
1,167,432 | public Mono<Void> doExecute(final ServerWebExchange exchange, final ShenyuPluginChain chain, final SelectorData selector, final RuleData rule) {<NEW_LINE>String param = exchange.getAttribute(Constants.PARAM_TRANSFORM);<NEW_LINE>ShenyuContext shenyuContext = exchange.getAttribute(Constants.CONTEXT);<NEW_LINE>assert shen... | WebFluxResultUtils.result(exchange, error); |
318,589 | public Integer run() {<NEW_LINE>int returnCode = 200;<NEW_LINE>JSONAware json = null;<NEW_LINE>try {<NEW_LINE>switch(req.getMode()) {<NEW_LINE>case RequestAndResponse.GET_REQUEST:<NEW_LINE>json = handler.handleGetRequest(req.getUri(), req.getPath(), req.getParameters());<NEW_LINE>break;<NEW_LINE>case RequestAndResponse... | ("Internal error while handling an exception")).toJSONString(); |
759,981 | private void browseKeyStore() {<NEW_LINE>SipCommFileChooser dlg = GenericFileDialog.create(null, R.getI18NString("plugin.certconfig.BROWSE_KEYSTORE"), SipCommFileChooser.LOAD_FILE_OPERATION);<NEW_LINE>dlg.setSelectionMode(SipCommFileChooser.FILES_ONLY);<NEW_LINE>dlg.addFilter(new SipCommFileFilter() {<NEW_LINE><NEW_LIN... | File f = dlg.getFileFromDialog(); |
750,938 | public AclGrantee unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AclGrantee aclGrantee = new AclGrantee();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken()... | int originalDepth = context.getCurrentDepth(); |
673,477 | final AttachInternetGatewayResult executeAttachInternetGateway(AttachInternetGatewayRequest attachInternetGatewayRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(attachInternetGatewayRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | invoke(request, responseHandler, executionContext); |
1,197,687 | public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) {<NEW_LINE>MethodSymbol symbol = getSymbol(tree);<NEW_LINE>if (!hasDirectAnnotationWithSimpleName(symbol, INLINE_ME)) {<NEW_LINE>return Description.NO_MATCH;<NEW_LINE>}<NEW_LINE>ImmutableList<String> callingVars = tree.getArguments(... | callingVars, receiverString, receiver, state); |
411,364 | public static Map<ModuleAdapter<?>, Object> loadModules(Loader loader, Object[] seedModulesOrClasses) {<NEW_LINE>Map<ModuleAdapter<?>, Object> seedAdapters = new LinkedHashMap<ModuleAdapter<?>, Object>(seedModulesOrClasses.length);<NEW_LINE>for (int i = 0; i < seedModulesOrClasses.length; i++) {<NEW_LINE>if (seedModule... | , ModuleAdapter<?>>(); |
690,650 | private List<NameValueCountPair> listApplicationPair(Business business, Predicate p) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(TaskCompleted.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LIN... | application)).where(p); |
591,450 | public void validateQuery(String theQuery, String theFieldName) {<NEW_LINE>if (isBlank(theQuery)) {<NEW_LINE>throw new UnprocessableEntityException(Msg.code(11) + theFieldName + " must be populated");<NEW_LINE>}<NEW_LINE>SubscriptionCriteriaParser.SubscriptionCriteria parsedCriteria = SubscriptionCriteriaParser.parse(t... | (15) + theFieldName + " must be in the form \"{Resource Type}?[params]\""); |
1,579,660 | protected CompiledPropertyMetadata toPropertyMetadata(VariableElement element, AnnotationMirror propertyAnnotation) {<NEW_LINE>Map<? extends ExecutableElement, ? extends AnnotationValue> annotationValues = processingEnv.getElementUtils().getElementValuesWithDefaults(propertyAnnotation);<NEW_LINE>CompiledPropertyMetadat... | ()).toString()); |
668,615 | JSONObject writeItemsToJson(@NonNull JSONObject json) {<NEW_LINE>JSONArray jsonArray = new JSONArray();<NEW_LINE>if (!items.isEmpty()) {<NEW_LINE>try {<NEW_LINE>for (OpenstreetmapPoint point : items) {<NEW_LINE>JSONObject jsonPoint = new JSONObject();<NEW_LINE>JSONObject jsonEntity = new JSONObject();<NEW_LINE>jsonEnti... | ID_KEY, point.getId()); |
1,300,016 | public void onCreate(Bundle state) {<NEW_LINE>ThemeHelper.setTheme(this, R.style.BackActionBar);<NEW_LINE>super.onCreate(state);<NEW_LINE>HandlerThread thread = new HandlerThread(getClass().getName());<NEW_LINE>thread.start();<NEW_LINE>setContentView(R.layout.playlist_activity);<NEW_LINE>CoordClickListener ccl = new Co... | findViewById(R.id.edit); |
1,420,425 | public static void performLocalMigration(@NonNull Context context, @NonNull GroupId.V1 gv1Id) throws IOException {<NEW_LINE>Log.i(TAG, "Beginning local migration! V1 ID: " + gv1Id, new Throwable());<NEW_LINE>try (Closeable ignored = GroupsV2ProcessingLock.acquireGroupProcessingLock()) {<NEW_LINE>if (SignalDatabase.grou... | , "Group was already migrated! Could have been waiting for the lock.", new Throwable()); |
439,789 | void remove(WorkDisposable<T> wd) {<NEW_LINE>for (; ; ) {<NEW_LINE>WorkDisposable<T>[] a = observers.get();<NEW_LINE>int n = a.length;<NEW_LINE>if (n == 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>int j = -1;<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>if (a[i] == wd) {<NEW_LINE>j = i;<NEW_LINE>break;<NEW_LINE>}<NEW_L... | = new WorkDisposable[n - 1]; |
1,827,968 | protected void deserializeData(TypeSpec<K> keyType, Map<String, CompoundKey.TypeInfo> keyParts, ComplexKeySpec<?, ?> complexKeyType, ProtocolVersion version) {<NEW_LINE>DataMap dataMap = data();<NEW_LINE>final DataMap convertedData = new DataMap();<NEW_LINE>final DataMap mergedResults = new DataMap();<NEW_LINE>final Da... | putWithoutChecking(mergedResults, key, entityResponseData); |
1,383,668 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplStatement = "@public create context StartThenTwoSeconds start StartContextEvent end after 2 seconds";<NEW_LINE>env.compileDeploy(eplStatement, path);<NEW_LINE>String aggStatement = "@name('select') conte... | = new ArrayList<Thread>(); |
591,933 | private void initParserValues(COSStream stream) throws IOException {<NEW_LINE>COSArray wArray = stream.getCOSArray(COSName.W);<NEW_LINE>if (wArray == null) {<NEW_LINE>throw new IOException("/W array is missing in Xref stream");<NEW_LINE>}<NEW_LINE>if (wArray.size() != 3) {<NEW_LINE>throw new IOException("Wrong number o... | COSName.SIZE, 0))); |
1,057,161 | private void readBadges(String url, Map<String, Map<String, Badge>> badgeMap) {<NEW_LINE>try {<NEW_LINE>JSONObject globalBadgeSets = new JSONObject(Service.urlToJSONString(url)).getJSONObject("badge_sets");<NEW_LINE>for (Iterator<String> it = globalBadgeSets.keys(); it.hasNext(); ) {<NEW_LINE>String badgeSet = it.next(... | versionObject = versions.getJSONObject(version); |
1,113,361 | // We don't want to document these in swagger since they are internal APIs<NEW_LINE>@GET<NEW_LINE>@Path(SegmentCompletionProtocol.MSG_TYPE_EXTEND_BUILD_TIME)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>public String extendBuildTime(@QueryParam(SegmentCompletionProtocol.PARAM_INSTANCE_ID) String instanceId, ... | new SegmentCompletionProtocol.Request.Params(); |
1,510,192 | private void checkRgTagColumns(final Set<String> rgTagColumns) {<NEW_LINE>final Set<String> forbiddenHeaders = <MASK><NEW_LINE>forbiddenHeaders.retainAll(rgTagColumns);<NEW_LINE>if (!forbiddenHeaders.isEmpty()) {<NEW_LINE>throw new PicardException("Illegal ReadGroup tags in library params(barcode params) file(" + LIBRA... | buildSamHeaderParameters(null).keySet(); |
943,003 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
423,995 | private void reportStats() {<NEW_LINE>ConcurrentMap<OwnerId, ToUsageStatsServiceMsg.Builder> report = new ConcurrentHashMap<>();<NEW_LINE>for (ApiUsageRecordKey key : ApiUsageRecordKey.values()) {<NEW_LINE>ConcurrentMap<OwnerId, AtomicLong> statsForKey = stats.get(key);<NEW_LINE>statsForKey.forEach((ownerId, statsValue... | long value = statsValue.get(); |
1,821,223 | private List<Mark> createMarks() {<NEW_LINE>Document doc = component.getDocument();<NEW_LINE>if (!(doc instanceof StyledDocument)) {<NEW_LINE>return Collections.singletonList((Mark) new CaretMark(0));<NEW_LINE>}<NEW_LINE>List<Mark> lines = new LinkedList<>();<NEW_LINE>Caret caret = component.getCaret();<NEW_LINE>if (ca... | ((StyledDocument) doc, offset); |
565,004 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplNamedWindow = "@public create window MyWindow#lastevent (p0 string);\n";<NEW_LINE>env.compileDeploy(eplNamedWindow, path);<NEW_LINE>env.compileExecuteFAF("insert into MyWindow select 'x' as p0", path);<N... | eplFAF.toString(), path); |
1,005,072 | public double calculate(double p) {<NEW_LINE>switch(funcName) {<NEW_LINE>case StdNormal:<NEW_LINE>return stdNormal(p);<NEW_LINE>case Normal:<NEW_LINE>return normal(p, params[0], params[1]);<NEW_LINE>case Gamma:<NEW_LINE>return gamma(p, params[0], params[1]);<NEW_LINE>case Beta:<NEW_LINE>return beta(p, params[<MASK><NEW... | 0], params[1]); |
3,864 | private void renderFullClassFunctionDeclaration(PreparedClass cls, ScopedName jsName, List<FieldHolder> nonStaticFields) throws IOException {<NEW_LINE>boolean thisAliased = false;<NEW_LINE>renderFunctionDeclaration(jsName);<NEW_LINE>writer.append("()").ws().append("{").indent().softNewLine();<NEW_LINE>if (nonStaticFiel... | append("0;").softNewLine(); |
1,213,342 | private void showCallout(String parkName) {<NEW_LINE>// create a text view for the callout<NEW_LINE>View calloutLayout = LayoutInflater.from(this).inflate(R.layout.related_features_callout, null);<NEW_LINE>// create a text view and add park name<NEW_LINE>TextView parkText = calloutLayout.findViewById(R.id.park_name);<N... | .getSelectedItem().toString(); |
1,104,065 | protected void computeMatrix(final Projection pProjection) {<NEW_LINE>final long topLeftCornerX = pProjection.getLongPixelXFromLongitude(mTopLeft.getLongitude());<NEW_LINE>final long topLeftCornerY = pProjection.<MASK><NEW_LINE>final long topRightCornerX = pProjection.getLongPixelXFromLongitude(mTopRight.getLongitude()... | getLongPixelYFromLatitude(mTopLeft.getLatitude()); |
1,203,105 | private void checkFallThrough(ASTSwitchStatement node, Object data) {<NEW_LINE>// refer the rule MissingBreakInSwitch of PMD<NEW_LINE>final String xpath = "../SwitchStatement[(count(.//BreakStatement)" + " + count(BlockStatement//Statement/ReturnStatement)" + " + count(BlockStatement//Statement/ContinueStatement)" + " ... | data, node, MESSAGE_KEY_PREFIX + ".notermination"); |
315,647 | private void writeKeyConstracter(List<ColumnDefinition> columnDefinitions, PrintWriter pw, String genEntityClassName) {<NEW_LINE>Collection<ColumnDefinition> primaryKeys = getPrimaryKeys(columnDefinitions);<NEW_LINE>// setter<NEW_LINE>int count = 0;<NEW_LINE>pw.print(" public " + genEntityClassName + "(");<NEW_LINE>... | (columnDefinition.getColumn_name())); |
937,656 | private void updateActions(@NotNull Project project, Presentation presentation) {<NEW_LINE>actions.clear();<NEW_LINE>final DeviceService deviceService = DeviceService.getInstance(project);<NEW_LINE>final FlutterDevice selectedDevice = deviceService.getSelectedDevice();<NEW_LINE>final Collection<FlutterDevice> devices =... | = new SelectDeviceAction(device, devices); |
938,640 | private void showFileListDialog(final FileSender sender) {<NEW_LINE>if (!Systems.isNetworkAvailable(this)) {<NEW_LINE>Dialogs.alert(getString(R.string.sorry), getString(R.string.no_network_message), this);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final File gpxFolder = new File(preferenceHelper.getGpsLoggerFolder());<NEW_L... | compareTo(f2.lastModified()); |
4,578 | public GitSubmodulesConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GitSubmodulesConfig gitSubmodulesConfig = new GitSubmodulesConfig();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonTok... | int originalDepth = context.getCurrentDepth(); |
31,767 | private Status updateFileWithPartialContent(Request request, File file, Range range) {<NEW_LINE>File tmp = null;<NEW_LINE>// Replace the content of the file. First, create a temporary file<NEW_LINE>try {<NEW_LINE>// The temporary file used for partial PUT.<NEW_LINE>tmp = new File(file.getCanonicalPath(<MASK><NEW_LINE>c... | ) + "." + getTemporaryExtension()); |
1,319,079 | public static boolean canDoReplicatedJoin(OlapTable table, long selectedIndexId, Collection<Long> selectedPartitionId, Collection<Long> selectedTabletId) {<NEW_LINE>int backendSize = Catalog.getCurrentSystemInfo().backendSize();<NEW_LINE>int aliveBackendSize = Catalog.getCurrentSystemInfo().getBackendIds(true).size();<... | long visibleVersion = partition.getVisibleVersion(); |
1,816,135 | private List<GetExchangeRatesResponse> localValues(List<String> cryptocurrencies, List<String> selectedCurrencies, Map<String, String> savedExchangeRates) {<NEW_LINE>List<GetExchangeRatesResponse> responses = new ArrayList<>(selectedCurrencies.size());<NEW_LINE>for (String currency : selectedCurrencies) {<NEW_LINE>for ... | market = matcher.group(1); |
968,781 | public void transform(Row row, PointCollector collector) throws IOException, UDFInputSeriesDataTypeNotValidException {<NEW_LINE>boolean needAddNewRecord;<NEW_LINE>switch(dataType) {<NEW_LINE>case INT32:<NEW_LINE>needAddNewRecord = transformInt(row.getTime(), row.getInt(0));<NEW_LINE>break;<NEW_LINE>case INT64:<NEW_LINE... | , row.getBoolean(0)); |
1,651,383 | public DeleteInboundConnectionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteInboundConnectionResult deleteInboundConnectionResult = new DeleteInboundConnectionResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | int originalDepth = context.getCurrentDepth(); |
331,986 | public void run() throws Exception {<NEW_LINE>info("############### Distcp ###############");<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>try {<NEW_LINE>String cdnURL = pickCDN();<NEW_LINE>if (!cdnURL.isEmpty()) {<NEW_LINE>info("CDN: " + cdnURL);<NEW_LINE>String storeName = props.getString(Voldemor... | "############# End of Distcp ########### (duration: " + duration / 1000 + "s)"); |
27,776 | public boolean refund(Transaction transaction, PurchaseContext purchaseContext, Integer amount) {<NEW_LINE>var currencyCode = transaction.getCurrency();<NEW_LINE>var amountToRefund = Optional.ofNullable(amount).map(a -> MonetaryUtil.formatCents(a, currencyCode)<MASK><NEW_LINE>log.trace("Attempting to refund {} for rese... | ).orElseGet(transaction::getFormattedAmount); |
574,045 | PDict doString(Object cls, Object from, Object to, Object z, @Cached CastToJavaStringCheckedNode castFromNode, @Cached CastToJavaStringCheckedNode castToNode, @Cached CastToJavaStringCheckedNode castZNode, @Cached ConditionProfile hasZProfile, @CachedLibrary(limit = "2") HashingStorageLibrary lib) {<NEW_LINE>String toS... | factory().createDict(storage); |
1,378,613 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>inflater = UiUtilities.getInflater(app, nightMode);<NEW_LINE>View root = inflater.inflate(R.layout.fragment_import_duplicates, container, false);<NEW_LINE>Toolbar toolbar = root.find... | (v -> importItems(false)); |
837,759 | void doProcessPostponedActions() {<NEW_LINE>holdPostponedActions_ = false;<NEW_LINE>final WebClient webClient = getWebClient();<NEW_LINE>// shutdown was already called<NEW_LINE>if (webClient == null) {<NEW_LINE>postponedActions_.set(null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>webClient.loadDownloadedResp... | > actions = postponedActions_.get(); |
1,572,817 | public static KeyValuePart[] splitIntDoubleVector(MatrixMeta matrixMeta, IntDoubleVector vector) {<NEW_LINE>IntDoubleVectorStorage storage = vector.getStorage();<NEW_LINE>if (storage.isSparse()) {<NEW_LINE>// Get keys and values<NEW_LINE>IntDoubleSparseVectorStorage sparseStorage = (IntDoubleSparseVectorStorage) storag... | ] values = sortStorage.getValues(); |
1,077,043 | private I_MSV3_VerfuegbarkeitsantwortArtikel createRecord(@NonNull final StockAvailabilityResponseItem item, @NonNull ImmutableMap<StockAvailabilityResponseItem, MSV3ArtikelContextInfo> artikel2ContextInfo) {<NEW_LINE>final I_MSV3_VerfuegbarkeitsantwortArtikel verfuegbarkeitsantwortArtikelRecord = newInstance(I_MSV3_Ve... | getPzn().getValueAsString()); |
687,071 | public static SoapUIGroovyShell createGsroovyShell(Binding binding) {<NEW_LINE>// LoaderConfiguration config = new LoaderConfiguration();<NEW_LINE>//<NEW_LINE>// String libraries = SoapUI.getSettings().getString(<NEW_LINE>// ToolsSettings.SCRIPT_LIBRARIES, null );<NEW_LINE>// if( libraries != null )<NEW_LINE>// {<NEW_L... | SoapUI.class.getClassLoader()); |
430,545 | protected ExecutableDdlJob doCreate() {<NEW_LINE>final TableMeta primaryTableMeta = OptimizerContext.getContext(schemaName).getLatestSchemaManager().getTable(primaryTableName);<NEW_LINE>checkLocalPartitionColumnInUk(primaryTableMeta);<NEW_LINE>List<TableMeta> gsiList = GlobalIndexMeta.getIndex(primaryTableName, schemaN... | alterTableStatement.setDbType(DbType.mysql); |
804,712 | public DriftCheckBias unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DriftCheckBias driftCheckBias = new DriftCheckBias();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | ().unmarshall(context)); |
1,459,742 | private Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, MaintenanceConfigurationInner configuration, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.c... | error(new IllegalArgumentException("Parameter configuration is required and cannot be null.")); |
1,654,744 | public void open(int hour, String ip) throws IOException {<NEW_LINE>String path = m_bulider.getPath(null, new Date(hour * TimeHelper.ONE_HOUR), ip, FileType.TOKEN);<NEW_LINE>FileSystem fs = m_manager.getFileSystem();<NEW_LINE>m_file = fs.open(new Path(path));<NEW_LINE>m_data = Unpooled.buffer(BLOCK_SIZE);<NEW_LINE>m_bl... | read(m_data.array()); |
222,491 | private void writeHeader(JsonObject doc, PrintStream out, String outFileName) {<NEW_LINE>String title = doc.getString("title");<NEW_LINE>out.println(title);<NEW_LINE>out.println(UNDERLINE.substring(0, title.length()));<NEW_LINE>out.println(doc.getString("description"));<NEW_LINE>out.println();<NEW_LINE>out.print(".. ta... | outFileName.charAt(0))); |
210,874 | private JPanel initializePanel(JLabel renderer) {<NEW_LINE>if (panel == null) {<NEW_LINE>JScrollPane scrollPane = new JScrollPane();<NEW_LINE>panel = new JPanel() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public String getToolTipText(MouseEvent event) {<NEW_LINE>int x = event.getX();<NEW_LINE>int y = event.getY();<NEW_LI... | Dimension(0, 20))); |
501,374 | List<IScanIssue> doScan(IHttpRequestResponse baseRequestResponse, IScannerInsertionPoint insertionPoint) {<NEW_LINE>// don't scan POST<NEW_LINE>if (baseRequestResponse.getRequest()[0] == 'P') {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// set value to canary<NEW_LINE>String canary = Utilities.generateCanary();<NEW_LINE... | addOrReplaceHeader(poison, "X-HTTP-Method-Override", "POST"); |
1,624,794 | final DescribeExecutionResult executeDescribeExecution(DescribeExecutionRequest describeExecutionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeExecutionRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeExecutionReq... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.