idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
445,391 | @ResponseBody<NEW_LINE>public PersistableProductReview createProductReview(@PathVariable final String store, @Valid @RequestBody PersistableProductReview review, HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>try {<NEW_LINE>MerchantStore merchantStore = (MerchantStore) request.get... | sendError(500, "Merchant store is null for code " + store); |
225,337 | final GetRateBasedRuleResult executeGetRateBasedRule(GetRateBasedRuleRequest getRateBasedRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRateBasedRuleRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetRateBasedRuleRequest> ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,488,438 | public void testReadWrite500Contacts() throws Exception {<NEW_LINE>final List<Person> contacts = TestDataGenerator.genPersonList(500);<NEW_LINE>Paper.init(getTargetContext());<NEW_LINE>Paper<MASK><NEW_LINE>long paperTime = runTest(new PaperReadWriteContactsTest(), contacts, REPEAT_COUNT);<NEW_LINE>Hawk.init(getTargetCo... | .book().destroy(); |
1,002,650 | private static void processSingleIndexUpdate(final OIndex index, final Set<String> dirtyFields, final ODocument iRecord, List<IndexChange> changes) {<NEW_LINE>final OIndexDefinition indexDefinition = index.getDefinition();<NEW_LINE>final List<String> indexFields = indexDefinition.getFields();<NEW_LINE>if (indexFields.i... | final OIndexDefinitionMultiValue indexDefinitionMultiValue = (OIndexDefinitionMultiValue) indexDefinition; |
1,183,603 | public void onClick(View view) {<NEW_LINE>Context context = getContext();<NEW_LINE>int id = view.getId();<NEW_LINE>if (id == R.id.btn_by_email) {<NEW_LINE>Intent sendIntent = new Intent(Intent.ACTION_SEND);<NEW_LINE>sendIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { context.getString(R.string.my_email) });<NEW_LINE... | (R.string.send_email_title)); |
1,266,907 | private DomainSecurity processDomainSecurity(File configDir) throws IOException, RepositoryException {<NEW_LINE>String user = (String) domainConfig.get(DomainConfig.K_USER);<NEW_LINE>String password = (String) domainConfig.get(DomainConfig.K_PASSWORD);<NEW_LINE>String[] adminUserGroups = ((String) domainConfig.get(Doma... | K_INITIAL_ADMIN_USER_GROUPS)).split(","); |
1,037,248 | private PipelineFactory createConsumeSideExchangeFactory(ExecutorFactory parentFactory, PipelineFragment pipelineFragment, LocalExchange localExchange, ExecutorFactory childFactory, PipelineFragment childFragment, List<DataType> columnMetaList, boolean isBuffer) {<NEW_LINE>OutputBufferMemoryManager localBufferManager =... | LocalBufferConsumerFactory localConsumerFactory = new LocalBufferConsumerFactory(parentFactory); |
1,452,035 | void init(IClientConfig config, boolean registerMonitor) {<NEW_LINE>HttpParams params = getParams();<NEW_LINE>HttpProtocolParams.setContentCharset(params, "UTF-8");<NEW_LINE>params.setParameter(ClientPNames.CONNECTION_MANAGER_FACTORY_CLASS_NAME, ThreadSafeClientConnManager.class.getName());<NEW_LINE>HttpClientParams.se... | setParameter(ClientPNames.DEFAULT_HEADERS, defaultHeaders); |
503,472 | private void drawBaconHistogram(double[] histogram, int INFINITY_ID, double maxFrequency) {<NEW_LINE>StdDraw.setCanvasSize(1024, 512);<NEW_LINE>double minX = -3;<NEW_LINE>double maxX = histogram.length + 2;<NEW_LINE>double middleX = minX + (maxX - minX) / 2;<NEW_LINE>double minY = -7000;<NEW_LINE>double maxY = maxFrequ... | StdDraw.setXscale(minX, maxX); |
382,032 | public void marshall(CreateSessionRequest createSessionRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createSessionRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createSessionRequest.get... | createSessionRequest.getNumberOfWorkers(), NUMBEROFWORKERS_BINDING); |
705,081 | ActionResult<WrapOutId> execute(String appDictFlag, String appInfoFlag, String path0, String path1) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<WrapOutId> result = new ActionResult<>();<NEW_LINE>Business business = new Business... | getAppInfoFactory().pick(appInfoFlag); |
269,835 | private static void expandAllNodes(BeanTreeView btv, Node node, ExplorerManager mgr, ServerInstance servInst) {<NEW_LINE>Children ch = node.getChildren();<NEW_LINE>// preselect node for the specified server instance<NEW_LINE>if (servInst != null && ch == Children.LEAF && node instanceof ServerNode) {<NEW_LINE>try {<NEW... | Level.FINE, null, e); |
646,760 | private List<AccessLogItemLocation> matchAccessLogItem(String rawPattern) {<NEW_LINE>List<AccessLogItemLocation> locationList = new ArrayList<>();<NEW_LINE>int cursor = 0;<NEW_LINE>while (cursor < rawPattern.length()) {<NEW_LINE>AccessLogItemLocation candidate = null;<NEW_LINE>for (VertxRestAccessLogItemMeta meta : met... | AccessLogItemLocation(cursor, rear, meta); |
114,484 | private void measureVertical(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>int hSize = MeasureSpec.getSize(heightMeasureSpec) - (<MASK><NEW_LINE>int count = getChildCount();<NEW_LINE>int columnHeight = 0;<NEW_LINE>int totalWidth = 0, maxColumnHeight = 0;<NEW_LINE>int columnMaxWidth = 0;<NEW_LINE>int childWidt... | getPaddingTop() + getPaddingBottom()); |
1,129,934 | public void serveUDP(InetAddress addr, int port) {<NEW_LINE>try (DatagramSocket sock = new DatagramSocket(port, addr)) {<NEW_LINE>final short udpLength = 512;<NEW_LINE>byte[] in = new byte[udpLength];<NEW_LINE>DatagramPacket indp = new DatagramPacket(in, in.length);<NEW_LINE>DatagramPacket outdp = null;<NEW_LINE>while ... | setAddress(indp.getAddress()); |
1,031,586 | @Consumes(MediaType.APPLICATION_FORM_URLENCODED)<NEW_LINE>@Produces(MediaType.TEXT_PLAIN)<NEW_LINE>@ApiOperation(value = "Login with OpenID Connect", notes = "Upon a successful login, a JSON Web Token will be returned in the response body. This functionality requires authentication to be enabled.", response = String.cl... | ok(token).build(); |
1,720,620 | public DesiredWeightAndCapacity unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DesiredWeightAndCapacity desiredWeightAndCapacity = new DesiredWeightAndCapacity();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | class).unmarshall(context)); |
252,149 | public void loadFromInternalMap(Map<?, ?> map) {<NEW_LINE>timestamp = MapUtils.getMapLong(map, "timestamp", 0);<NEW_LINE>if (timestamp == 0) {<NEW_LINE>timestamp = SystemTime.getCurrentTime();<NEW_LINE>}<NEW_LINE>setAssetHash(MapUtils.getMapString(map, "assetHash", null));<NEW_LINE>setIconIDRaw(MapUtils.getMapString(ma... | (map, "assetImageURL", null)); |
346,485 | public FirewallMetadata unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FirewallMetadata firewallMetadata = new FirewallMetadata();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | class).unmarshall(context)); |
1,209,048 | private boolean processUnrecoverableException(final HttpServletRequest req, final HttpServletResponse resp, final PwmDomain pwmDomain, final PwmRequest pwmRequest, final PwmUnrecoverableException e) throws IOException {<NEW_LINE>switch(e.getError()) {<NEW_LINE>case ERROR_DIRECTORY_UNAVAILABLE:<NEW_LINE>LOGGER.fatal(pwm... | incrementStat(pwmRequest, Statistic.PWM_UNKNOWN_ERRORS); |
424,628 | protected Object readProperty(String path, RedisData source, RedisPersistentProperty persistentProperty) {<NEW_LINE>String currentPath = !path.isEmpty() ? path + "." + persistentProperty.getName() : persistentProperty.getName();<NEW_LINE>TypeInformation<?> typeInformation = persistentProperty.getTypeInformation();<NEW_... | RedisData newBucket = new RedisData(bucket); |
1,124,732 | static Scalar baz(ParameterExpression context_, ParameterExpression outputValues_, BlockStatement block) {<NEW_LINE>final List<MemberDeclaration> declarations = new ArrayList<>();<NEW_LINE>// public void execute(Context, Object[] outputValues)<NEW_LINE>declarations.add(Expressions.methodDecl(Modifier.PUBLIC, void.class... | .constant(0)))); |
727,990 | // must called after tupleDescriptor is computed<NEW_LINE>public void complete() throws UserException {<NEW_LINE><MASK><NEW_LINE>tSink.setTableId(dstTable.getId());<NEW_LINE>tSink.setTupleId(tupleDescriptor.getId().asInt());<NEW_LINE>int numReplicas = 1;<NEW_LINE>for (Partition partition : dstTable.getPartitions()) {<N... | TOlapTableSink tSink = tDataSink.getOlapTableSink(); |
391,685 | public LoadedCredentials loadCredentials(ResourcesEndpointProvider endpoint) {<NEW_LINE>try {<NEW_LINE>String credentialsResponse = HttpResourcesUtils.instance().readResource(endpoint);<NEW_LINE>Map<String, JsonNode> node = SENSITIVE_PARSER.parse(credentialsResponse).asObject();<NEW_LINE>JsonNode accessKey = node.get("... | expiration = node.get("Expiration"); |
1,609,137 | public void downloadPodcastEpisode(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>request = wrapRequest(request);<NEW_LINE>org.airsonic.player.domain.User user = securityService.getCurrentUser(request);<NEW_LINE>if (!user.isPodcastRole()) {<NEW_LINE>error(request, response, ErrorC... | id = getRequiredIntParameter(request, "id"); |
183,898 | private static GeneralDataset<String, String> generateFeatureVectors(Properties props) throws Exception {<NEW_LINE>GeneralDataset<String, String> dataset = new Dataset<>();<NEW_LINE>Dictionaries dict = new Dictionaries(props);<NEW_LINE>MentionExtractor mentionExtractor = new CoNLLMentionExtractor(dict, props, new Seman... | , CorefCluster> entities = document.goldCorefClusters; |
336,498 | private void loadColumnsStrategies() {<NEW_LINE>JPanel strategiesPanel = new JPanel();<NEW_LINE>strategiesPanel.<MASK><NEW_LINE>if (duplicateGroups != null && duplicateGroups.size() > 0) {<NEW_LINE>strategiesPanel.add(new JLabel(NbBundle.getMessage(MergeNodeDuplicatesUI.class, "MergeNodeDuplicatesUI.duplicateGroupsNumb... | setLayout(new MigLayout("fillx")); |
231,047 | public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String networkProfileName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
1,612,726 | public Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler handler, @Nullable String subProtocol, Supplier<HandshakeInfo> handshakeInfoFactory) {<NEW_LINE>HttpServerExchange httpExchange = ServerHttpRequestDecorator.getNativeRequest(exchange.getRequest());<NEW_LINE>Set<String> protocols = (subProtocol != nu... | .getResponse().bufferFactory(); |
702,148 | public void fromBuiltInKeywords(String accessKey, String modelPath, ReadableArray keywords, ReadableArray sensitivities, Promise promise) {<NEW_LINE>// convert from ReadableArrays to Java types<NEW_LINE>Porcupine.BuiltInKeyword[] keywordsJava = new Porcupine.BuiltInKeyword[keywords.size()];<NEW_LINE>for (int i = 0; i <... | ), e.getMessage()); |
990,110 | ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String id, Integer count, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Wi wi = this.<MASK><NEW_LINE>Business business = new Business(emc);<NEW_LINE>Enti... | convertToWrapIn(jsonElement, Wi.class); |
1,284,901 | public long longBitsAt(long bitPos, int bitLength) {<NEW_LINE>if (bitPos + bitLength > this.bitSize()) {<NEW_LINE>throw new IllegalArgumentException("reading beyond end of BitString");<NEW_LINE>}<NEW_LINE>if (bitLength < 0 || bitLength > 64)<NEW_LINE>throw new IllegalArgumentException("this method can only get 64 bits"... | ) (bitPos >> 3)]; |
1,801,227 | public WebIntentBuilder build() {<NEW_LINE>if (webpage == null) {<NEW_LINE>throw new RuntimeException("URL cannot be null.");<NEW_LINE>}<NEW_LINE>if (forceExternal || shouldAlwaysForceExternal(webpage) || settings.browserSelection.equals("external")) {<NEW_LINE>// request the external browser<NEW_LINE>intent = new Inte... | = new Intent(Intent.ACTION_SEND); |
1,704,538 | public BackendEntry writeEdgeLabel(EdgeLabel edgeLabel) {<NEW_LINE>TextBackendEntry entry = newBackendEntry(edgeLabel);<NEW_LINE>entry.column(HugeKeys.NAME, JsonUtil.toJson(edgeLabel.name()));<NEW_LINE>entry.column(HugeKeys.SOURCE_LABEL, writeId(edgeLabel.sourceLabel()));<NEW_LINE>entry.column(HugeKeys.TARGET_LABEL, wr... | (edgeLabel.properties())); |
994,322 | public void draw(Graphics g1, Component c) {<NEW_LINE>int w = c.getWidth();<NEW_LINE>int h = c.getHeight();<NEW_LINE>float scale = w / mPortWidth;<NEW_LINE>scale = Math.min(h / mPortHeight, scale);<NEW_LINE>if (mChildren == null) {<NEW_LINE>logger.log(Level.FINE, "no pathes");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Graph... | = mPortWidth - bounds.getMaxX(); |
1,367,003 | final BatchCreateAttendeeResult executeBatchCreateAttendee(BatchCreateAttendeeRequest batchCreateAttendeeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchCreateAttendeeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | invoke(request, responseHandler, executionContext); |
1,162,787 | private static void registerLanguage(String name, String iso639_1, String iso639_2, String altIso639_2) {<NEW_LINE>String[] names = name.split("\\s*;\\s*");<NEW_LINE>if (names.length == 0) {<NEW_LINE>throw new IllegalArgumentException("name cannot be blank");<NEW_LINE>}<NEW_LINE>String[] keys = new String[names.length]... | ).toLowerCase(Locale.ROOT); |
1,205,173 | public MutableHttpResponse<JsonError> processResponse(@NonNull ErrorContext errorContext, @NonNull MutableHttpResponse<?> response) {<NEW_LINE>if (errorContext.getRequest().getMethod() == HttpMethod.HEAD) {<NEW_LINE>return (MutableHttpResponse<JsonError>) response;<NEW_LINE>}<NEW_LINE>JsonError error;<NEW_LINE>if (!err... | getErrors().get(0); |
1,463,399 | public void activateDeferred() {<NEW_LINE>if (cannotLaunch())<NEW_LINE>return;<NEW_LINE>Direction facing = getFacing();<NEW_LINE>List<Entity> entities = level.getEntitiesOfClass(Entity.class, new AABB(worldPosition).inflate(-1 / 16f, 0, -1 / 16f));<NEW_LINE>// Launch Items<NEW_LINE>boolean doLogic = !level.isClientSide... | SoundSource.BLOCKS, .1f, 1.4f); |
718,641 | public void testJsonb() throws Exception {<NEW_LINE>// Convert Java Object --> JSON<NEW_LINE>Team zombies = new Team();<NEW_LINE>zombies.name = "Zombies";<NEW_LINE>zombies.size = 9;<NEW_LINE>zombies.winLossRatio = 0.85f;<NEW_LINE>Jsonb jsonb = JsonbProvider.provider().create().build();<NEW_LINE>String teamJson = jsonb.... | (teamJson.contains("\"size\":9")); |
586,376 | public void appendServerInfo(final Range range, final NodeList source, final LinkDataDuplexMap linkDataDuplexMap, final long timeoutMillis) {<NEW_LINE>if (source == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Collection<Node> nodes = source.getNodeList();<NEW_LINE>if (CollectionUtils.isEmpty(nodes)) {<NEW_LINE>return;... | throw new RuntimeException(cause, e); |
1,585,982 | final CreateRepositoryResult executeCreateRepository(CreateRepositoryRequest createRepositoryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRepositoryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | false), new CreateRepositoryResultJsonUnmarshaller()); |
104,542 | public void paintIcon(final Component c, final Graphics g, final int x, int y) {<NEW_LINE>final Color color = c == null ? Color.GRAY : c.getBackground();<NEW_LINE>// In a compound sort, make each succesive triangle 20%<NEW_LINE>// smaller than the previous one.<NEW_LINE>final int dx = (int) ((size / 2) * Math.pow(0.8, ... | darker().darker()); |
361,176 | /* (non-Javadoc)<NEW_LINE>* @see org.mitre.oauth2.assertion.AssertionOAuth2RequestFactory#createOAuth2Request(org.springframework.security.oauth2.provider.ClientDetails, org.springframework.security.oauth2.provider.TokenRequest, com.nimbusds.jwt.JWT)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public OAuth2Request createOA... | resources, null, null, null); |
488,343 | private static void runAssertionUpdateIStreamSetMapProps(RegressionEnvironment env, EventRepresentationChoice eventRepresentationEnum) {<NEW_LINE>// test update-istream with map<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplType = eventRepresentationEnum.getAnnotationTextWJsonProvided(MyLocalJ... | (0).add(0); |
863,563 | public void resolve(Type t, Type declaredType, Type sigType, SootMethodRef callee, SootMethod container, ChunkedQueue<SootMethod> targets, boolean appOnly) {<NEW_LINE>if (declaredType instanceof ArrayType) {<NEW_LINE>declaredType = RefType.v("java.lang.Object");<NEW_LINE>}<NEW_LINE>if (sigType instanceof ArrayType) {<N... | container, targets, appOnly, base); |
228,490 | public static ListPrintTemplatesResponse unmarshall(ListPrintTemplatesResponse listPrintTemplatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listPrintTemplatesResponse.setRequestId(_ctx.stringValue("ListPrintTemplatesResponse.RequestId"));<NEW_LINE>listPrintTemplatesResponse.setSuccess<MASK><NEW_LINE>List<PrintTempl... | (_ctx.booleanValue("ListPrintTemplatesResponse.Success")); |
527,939 | protected GenotypesContext calculateGLsForThisEvent(final AlleleLikelihoods<GATKRead, Allele> readLikelihoods, final VariantContext mergedVC, final List<Allele> noCallAlleles, final byte[] paddedReference, final int offsetForRefIntoEvent, final DragstrReferenceAnalyzer dragstrs) {<NEW_LINE>Utils.nonNull(readLikelihoods... | Utils.nonNull(mergedVC, "mergedVC"); |
1,080,703 | final void executeRequestCancelWorkflowExecution(RequestCancelWorkflowExecutionRequest requestCancelWorkflowExecutionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(requestCancelWorkflowExecutionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,493,533 | final GetNetworkInsightsAccessScopeContentResult executeGetNetworkInsightsAccessScopeContent(GetNetworkInsightsAccessScopeContentRequest getNetworkInsightsAccessScopeContentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getNetworkInsightsAccessScopeContentRequest);<NEW_LINE>AWSRequestMet... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
503,374 | protected ObjectArrayBackedEventBean createRowIntoTable(Object groupKeys) {<NEW_LINE>EventType eventType = table<MASK><NEW_LINE>AggregationRow aggregationRow = table.getAggregationRowFactory().make();<NEW_LINE>Object[] data = new Object[eventType.getPropertyDescriptors().length];<NEW_LINE>data[0] = aggregationRow;<NEW_... | .getMetaData().getInternalEventType(); |
797,977 | private static void printFocusInformation() {<NEW_LINE>DockingWindowManager winMgr = DockingWindowManager.getActiveInstance();<NEW_LINE>ComponentPlaceholder info = winMgr.getFocusedComponent();<NEW_LINE>DockableComponent dockableComp = null;<NEW_LINE>if (info != null) {<NEW_LINE>dockableComp = info.getComponent();<NEW_... | printComp((Component) mouseOverObject)); |
687,328 | private HttpPipeline createHttpPipeline() {<NEW_LINE>Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;<NEW_LINE>if (httpLogOptions == null) {<NEW_LINE>httpLogOptions = new HttpLogOptions();<NEW_LINE>}<NEW_LINE>if (clientOptions == null) {<NEW_LINE>clien... | CoreUtils.getApplicationId(clientOptions, httpLogOptions); |
932,684 | public static String genSortTextByAssignability(BallerinaCompletionContext context, LSCompletionItem completionItem, TypeSymbol typeSymbol) {<NEW_LINE>if (isCompletionItemAssignable(completionItem, typeSymbol)) {<NEW_LINE>return genSortText(1) + genSortText(toRank(context, completionItem));<NEW_LINE>} else if (typeSymb... | (toRank(context, completionItem)); |
1,794,219 | public void handle(Element element) {<NEW_LINE>handleCommonBeanAttributes(element, builder, parserContext);<NEW_LINE>NamedNodeMap attributes = element.getAttributes();<NEW_LINE>String uri = null;<NEW_LINE>String instanceRef = null;<NEW_LINE>if (attributes != null) {<NEW_LINE>Node instanceRefNode = attributes.getNamedIt... | ("name")).trim(); |
1,172,529 | private void moveProperty(JsObject newParent, JsObject property) {<NEW_LINE>JsObject newProperty = newParent.getProperty(property.getName());<NEW_LINE>if (property.getParent() != null) {<NEW_LINE>property.getParent().getProperties().remove(property.getName());<NEW_LINE>}<NEW_LINE>if (newProperty == null) {<NEW_LINE>((J... | , JsDocumentationSupport.getDocumentationHolder(parserResult)); |
1,256,181 | public WapitiCRFModel loadModel(InputStream is) throws Exception {<NEW_LINE>BufferedReader br = IOUtil.getReader(is, IOUtil.UTF8);<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>logger.info("load wapiti model begin!");<NEW_LINE>String temp = br.readLine();<NEW_LINE>// #mdl#2#123<NEW_LINE>logger.info(temp);<... | .currentTimeMillis() - start)); |
1,220,831 | protected boolean readResponse(InputStream in, HttpURLConnection hconn) {<NEW_LINE>boolean readResult;<NEW_LINE>manifest = new Manifest();<NEW_LINE>try {<NEW_LINE>Logger.log(Level.FINEST, "Reading response from {0}:{1}", new Object[] { server.getHost(), Integer.toString(server.getAdminPort()) });<NEW_LINE>manifest.read... | CommandException(CommandException.HTTP_RESP_IO_EXCEPTION, ioe); |
701,131 | private void refreshDashboardLeaderTreeCache() {<NEW_LINE>closeDeprecatedDashboardLeaderTreeCache();<NEW_LINE>Iterator<Entry<String, ZkCluster>> iterator = zkClusterMap.entrySet().iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>Entry<String, ZkCluster> next = iterator.next();<NEW_LINE>String zkClusterKey = n... | e.getMessage(), e); |
1,059,698 | public void marshall(UpdateImagePipelineRequest updateImagePipelineRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateImagePipelineRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(update... | updateImagePipelineRequest.getImageTestsConfiguration(), IMAGETESTSCONFIGURATION_BINDING); |
305,959 | private void computeGCRootsFor(TagBounds tagBounds, Collection<GCRoot> roots) {<NEW_LINE>if (tagBounds != null) {<NEW_LINE>int rootTag = tagBounds.tag;<NEW_LINE>long[] offset = new <MASK><NEW_LINE>while (offset[0] < tagBounds.endOffset) {<NEW_LINE>long start = offset[0];<NEW_LINE>if (heap.readDumpTag(offset) == rootTag... | long[] { tagBounds.startOffset }; |
1,300,799 | private void doProfileClient(CaptureContext context, String clientRequestURL, String appid) {<NEW_LINE>Profile p = ProfileFactory.instance().getProfile(appid);<NEW_LINE>if (p != null) {<NEW_LINE>ProfileContext pc = new StandardProfileContext();<NEW_LINE>String action = (String) context.get(CaptureConstants.INFO_CLIENT_... | put(ProfileConstants.PC_ARG_CLIENT_TARGETSERVER, server); |
816,227 | public boolean match(Object value) {<NEW_LINE>if (longValue != 0) {<NEW_LINE>long result = ((Number) value).longValue() & longValue;<NEW_LINE>switch(operator) {<NEW_LINE>case EQUAL:<NEW_LINE>return result == longValue;<NEW_LINE>case NOT_EQUAL:<NEW_LINE>return result != longValue;<NEW_LINE>case GREATER:<NEW_LINE>return ... | val, rightValue, true) < 0; |
859,967 | public void doValidation(Object input) throws LinkisClientRuntimeException {<NEW_LINE>if (!(input instanceof LinkisManageJob)) {<NEW_LINE>throw new ValidateException("VLD0007", ErrorLevel.ERROR, CommonErrMsg.ValidationErr, "Input of LinkisSubmitValidator is not instance of LinkisManageJob. Type: " + input.getClass().ge... | "LinkisJobMan validation failed. Reason: " + reasonSb.toString()); |
1,343,581 | public void write(org.apache.thrift.protocol.TProtocol oprot, partition_configuration struct) throws org.apache.thrift.TException {<NEW_LINE>struct.validate();<NEW_LINE>oprot.writeStructBegin(STRUCT_DESC);<NEW_LINE>if (struct.pid != null) {<NEW_LINE>oprot.writeFieldBegin(PID_FIELD_DESC);<NEW_LINE>struct.pid.write(oprot... | struct.primary.write(oprot); |
785,079 | private void updateProviderInfo() {<NEW_LINE>provider = getContext(this).getProviderFromEmail(emailInput.getText().toString());<NEW_LINE>if (provider != null) {<NEW_LINE>Resources res = getResources();<NEW_LINE>providerHint.setText(provider.getBeforeLoginHint());<NEW_LINE>switch(provider.getStatus()) {<NEW_LINE>case Dc... | (R.color.provider_prep_fg)); |
1,158,475 | private void addQuarkusDevModeDeps(GradleDevModeLauncher.Builder builder) {<NEW_LINE>final String pomPropsPath = "META-INF/maven/io.quarkus/quarkus-core-deployment/pom.properties";<NEW_LINE>final InputStream devModePomPropsIs = DevModeMain.class.getClassLoader().getResourceAsStream(pomPropsPath);<NEW_LINE>if (devModePo... | devModeGroupId = devModeProps.getProperty("groupId"); |
760,022 | final DeleteWebACLResult executeDeleteWebACL(DeleteWebACLRequest deleteWebACLRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteWebACLRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,490,260 | protected void processDeviceStateEvent(ProcessedEventPayload payload) throws SiteWhereException {<NEW_LINE>// Only process events that affect state.<NEW_LINE>IDeviceEvent event = payload.getEvent();<NEW_LINE>IDeviceEventContext context = payload.getEventContext();<NEW_LINE>// IDeviceState original = getDeviceStateManag... | original.getId(), request); |
139,323 | public static ListSnapshotResponse unmarshall(ListSnapshotResponse listSnapshotResponse, UnmarshallerContext _ctx) {<NEW_LINE>listSnapshotResponse.setRequestId(_ctx.stringValue("ListSnapshotResponse.RequestId"));<NEW_LINE>listSnapshotResponse.setTotalCount(_ctx.integerValue("ListSnapshotResponse.TotalCount"));<NEW_LINE... | ("ListSnapshotResponse.Snapshots[" + i + "].RemainTime")); |
376,220 | public static void zoom(int AD_Table_ID, int Record_ID) {<NEW_LINE>String TableName = null;<NEW_LINE>int AD_Window_ID = 0;<NEW_LINE>int PO_Window_ID = 0;<NEW_LINE>String sql = "SELECT TableName, AD_Window_ID, PO_Window_ID FROM AD_Table WHERE AD_Table_ID=?";<NEW_LINE>try {<NEW_LINE>PreparedStatement pstmt = DB.prepareSt... | (TableName + "_ID", Record_ID)); |
1,817,128 | private boolean completeWithFuture(ListenableFuture<? extends V> future, Object expected) {<NEW_LINE>Object valueToSet;<NEW_LINE>if (future instanceof TrustedFuture) {<NEW_LINE>// Break encapsulation for TrustedFuture instances since we know that subclasses cannot<NEW_LINE>// override .get() (since it is final) and the... | = new Cancellation(false, cancellation); |
601,030 | public com.amazonaws.services.ssmincidents.model.ConflictException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.ssmincidents.model.ConflictException conflictException = new com.amazonaws.services.ssmincidents.model.ConflictException(null);<NEW_LINE>int origin... | JsonToken token = context.getCurrentToken(); |
860,706 | public void initAutomaticRecordingStopThread(final Session session) {<NEW_LINE>final String recordingId = this.sessionsRecordings.get(session.getSessionId()).getId();<NEW_LINE>this.automaticRecordingStopThreads.computeIfAbsent(session.getSessionId(), f -> {<NEW_LINE>ScheduledFuture<?> future = this.automaticRecordingSt... | session, EndReason.automaticStop, true); |
1,580,999 | private Dimensions generateDimensions(NodeAgentContext context) {<NEW_LINE><MASK><NEW_LINE>Dimensions.Builder dimensionsBuilder = new Dimensions.Builder().add("host", node.hostname()).add("flavor", node.flavor()).add("state", node.state().toString()).add("zone", context.zone().getId().value());<NEW_LINE>node.owner().if... | NodeSpec node = context.node(); |
1,550,641 | private static ModelType<?> determineManagedPropertyType(StructBindingExtractionContext<?> extractionContext, String propertyName, Multimap<PropertyAccessorType, StructMethodBinding> accessorBindings) {<NEW_LINE>Set<ModelType<?>> potentialPropertyTypes = Sets.newLinkedHashSet();<NEW_LINE>for (StructMethodBinding bindin... | .iterator().next(); |
1,802,163 | public boolean apply(Game game, Ability source, Ability abilityToModify) {<NEW_LINE>Player controller = game.getPlayer(abilityToModify.getControllerId());<NEW_LINE>if (controller != null) {<NEW_LINE>Mana mana = abilityToModify.getManaCostsToPay().getMana();<NEW_LINE>int reduceMax = mana.getGeneric();<NEW_LINE>if (reduc... | parseInt(choice.getChoice()); |
1,698,073 | private EncryptConfigEntry requestPubKey(String pubKeyUrl, String userName, boolean needGet) {<NEW_LINE>if (Utils.isBlank(userName)) {<NEW_LINE>LOGGER.error("Queried userName is null!");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();<NEW_LINE>params.add(... | ("message").getAsString()); |
1,511,886 | protected RelDataType deriveRowType() {<NEW_LINE>final RelDataTypeFactory typeFactory = getCluster().getTypeFactory();<NEW_LINE>List<RelDataTypeFieldImpl> columns = new LinkedList<>();<NEW_LINE>columns.add(new RelDataTypeFieldImpl("NO.", 0, typeFactory.createSqlType(SqlTypeName.BIGINT)));<NEW_LINE>columns.add(new RelDa... | createSqlType(SqlTypeName.VARCHAR))); |
1,555,553 | // execution ////////////////////////////////////////////////////////////////////<NEW_LINE>@Override<NEW_LINE>public void execute() throws BuildException {<NEW_LINE>try {<NEW_LINE>final FileInputStream in = new FileInputStream(file);<NEW_LINE>String contents = Utils.read(in).toString();<NEW_LINE>in.close();<NEW_LINE>co... | contents.replace("\r", ""); |
681,139 | public static AnswerCallResponse unmarshall(AnswerCallResponse answerCallResponse, UnmarshallerContext _ctx) {<NEW_LINE>answerCallResponse.setRequestId(_ctx.stringValue("AnswerCallResponse.RequestId"));<NEW_LINE>answerCallResponse.setCode(_ctx.stringValue("AnswerCallResponse.Code"));<NEW_LINE>answerCallResponse.setHttp... | ("AnswerCallResponse.Data.CallContext.ChannelContexts[" + i + "].Timestamp")); |
153,784 | @ApiOperation(httpMethod = "GET", value = "Get permissions by group", notes = "", produces = MediaType.APPLICATION_JSON_VALUE, response = List.class)<NEW_LINE>public List<ReadablePermission> listPermissions(@PathVariable String group) {<NEW_LINE>Group g = null;<NEW_LINE>try {<NEW_LINE>g = groupService.findByName(group)... | "An error occured while getting group [" + group + "]", e); |
1,249,213 | public boolean order(Buffer b) {<NEW_LINE>if (b instanceof java.nio.ByteBuffer)<NEW_LINE>return ((java.nio.ByteBuffer) b).order() == ByteOrder.LITTLE_ENDIAN;<NEW_LINE>if (b instanceof java.nio.ShortBuffer)<NEW_LINE>return ((java.nio.ShortBuffer) b).order() == ByteOrder.LITTLE_ENDIAN;<NEW_LINE>if (b instanceof java.nio.... | .order() == ByteOrder.LITTLE_ENDIAN; |
1,423,464 | private void writeTo(Device device, AuditLogger auditLogger, JsonWriter writer) {<NEW_LINE>writer.writeStartObject();<NEW_LINE>writer.writeNotNullOrDef("cn", auditLogger.getCommonName(), null);<NEW_LINE>writer.writeNotNullOrDef("dcmAuditRecordRepositoryDeviceName", auditLogger.getAuditRecordRepositoryDeviceNameNotNull(... | ), auditLogger.getConnections()); |
1,190,732 | protected void addComputedTypeAnnotations(Tree tree, AnnotatedTypeMirror type, boolean iUseFlow) {<NEW_LINE>if (root == null && ajavaTypes.isParsing()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>assert root != null : "GenericAnnotatedTypeFactory.addComputedTypeAnnotations: " + " root needs to be set when used on trees; fac... | defaults.annotate(tree, type); |
667,852 | public static void addChangeSenderTypeProposals(IInvocationContext context, Expression nodeToCast, ITypeBinding castTypeBinding, boolean isAssignedNode, int relevance, Collection<ChangeCorrectionProposal> proposals) throws JavaModelException {<NEW_LINE>IBinding callerBinding = Bindings.resolveExpressionBinding(nodeToCa... | findCompilationUnitForBinding(cu, astRoot, declaringType); |
148,061 | protected ShapeImpl applyTransition(ShapeImpl shape, Transition transition, boolean append) {<NEW_LINE>if (transition instanceof AddPropertyTransition) {<NEW_LINE>Property property = ((AddPropertyTransition) transition).getProperty();<NEW_LINE>ShapeImpl newShape;<NEW_LINE>if (append) {<NEW_LINE>Property newProperty = p... | ) transition).getObjectType()); |
1,150,669 | public void buildStyleSheet(StyleSheet styleSheet) {<NEW_LINE>int baseSize = editorPane.getFont().getSize();<NEW_LINE>String rule = String.format("body { font-size: %dpt; padding: %dpx; }", Math.round((double) baseSize * 7 / 6), Math.round((double<MASK><NEW_LINE>styleSheet.addRule(rule);<NEW_LINE>rule = String.format("... | ) baseSize * 5 / 6)); |
1,619,114 | private static Map<ThreadObjectGCRoot, Map<Integer, List<GCRoot>>> computeJavaFrameMap(Collection<GCRoot> roots) {<NEW_LINE>Map<ThreadObjectGCRoot, Map<Integer, List<GCRoot>>> javaFrameMap = new HashMap();<NEW_LINE>for (GCRoot root : roots) {<NEW_LINE>ThreadObjectGCRoot threadObj;<NEW_LINE>Integer frameNo;<NEW_LINE>if ... | stackMap = javaFrameMap.get(threadObj); |
407,379 | public Map<Integer, Long> queryGroupOffsetInfo(String group, String topic, Set<Integer> partitionIds) {<NEW_LINE>StringBuilder strBuff = new StringBuilder(512);<NEW_LINE>String basePath = strBuff.append(this.consumerZkDir).append("/").append(group).append("/offsets/").append(topic).append("/").append(brokerId).append(T... | readDataMaybeNull(this.zkw, offsetNode); |
1,066,850 | public static void configClientLtpaHandler(ClientRequestContext crc) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "configClientLtpaHandler - About to get a LTPA authentication token");<NEW_LINE>}<NEW_LINE>// retrieve a ltpa cookie from the Subject in current thread... | Tr.debug(tc, "Cannot find a ltpa authentication token off of the thread, you may need enable feature appSecurity-2.0 or ssl-1.0"); |
622,464 | public Authentication authenticate(Authentication authentication) throws AuthenticationException {<NEW_LINE>OAuth2ClientAuthenticationToken clientAuthentication = (OAuth2ClientAuthenticationToken) authentication;<NEW_LINE>if (!ClientAuthenticationMethod.CLIENT_SECRET_BASIC.equals(clientAuthentication.getClientAuthentic... | this.registeredClientRepository.findByClientId(clientId); |
183,327 | public Request<GetParametersForImportRequest> marshall(GetParametersForImportRequest getParametersForImportRequest) {<NEW_LINE>if (getParametersForImportRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetParametersForImportRequest)");<NEW_LINE>}<NEW_LINE>Request<GetParam... | t.getMessage(), t); |
869,246 | final ApplySecurityGroupsToClientVpnTargetNetworkResult executeApplySecurityGroupsToClientVpnTargetNetwork(ApplySecurityGroupsToClientVpnTargetNetworkRequest applySecurityGroupsToClientVpnTargetNetworkRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(applySecurityGroupsToClientVpnTargetNetw... | ApplySecurityGroupsToClientVpnTargetNetworkResult>(new ApplySecurityGroupsToClientVpnTargetNetworkResultStaxUnmarshaller()); |
1,625,418 | public void process(JCas jcas) throws AnalysisEngineProcessException {<NEW_LINE>FocusPair fp = null;<NEW_LINE>if (LATByQuantity.answerIsNumber(jcas.getDocumentText())) {<NEW_LINE>logger.debug(".. No focus generated in all-number answer: " + jcas.getDocumentText());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (fp == null)<N... | getFocus().getBegin()); |
617,048 | private // loaded container (don't call repeatedly)<NEW_LINE>void loadLayout(String containerId, NodeList layoutNodeList) throws java.io.IOException {<NEW_LINE>layoutContainer = layoutModel.getLayoutComponent(containerId);<NEW_LINE>if (layoutContainer == null) {<NEW_LINE>layoutContainer = new LayoutComponent(containerI... | getAttributes().getNamedItem(ATTR_DIMENSION_DIM); |
276,811 | public boolean isSegmentBalanced(String segmentType) {<NEW_LINE>if (segmentType.equals(MAcctSchemaElement.ELEMENTTYPE_Organization)) {<NEW_LINE>HashMap<Integer, BigDecimal> map = new HashMap<Integer, BigDecimal>();<NEW_LINE>// Add up values by key<NEW_LINE>for (int i = 0; i < m_lines.size(); i++) {<NEW_LINE>FactLine li... | BigDecimal) map.get(key); |
692,131 | public synchronized SubstrateMethod createMethod(ResolvedJavaMethod original) {<NEW_LINE>assert !(original instanceof SubstrateMethod) : original;<NEW_LINE>AnalysisMethod aMethod;<NEW_LINE>if (original instanceof AnalysisMethod) {<NEW_LINE>aMethod = (AnalysisMethod) original;<NEW_LINE>} else if (original instanceof Hos... | !(original instanceof HostedMethod) : "too late to create new method"; |
929,302 | private void addTable(DatabaseMetaData md, String catalog, String schema) throws Exception {<NEW_LINE>// globalqss 2005-10-25<NEW_LINE>// ResultSet rs = md.getTables(catalog, schema, null, null);<NEW_LINE>ResultSet rs;<NEW_LINE>if (DB.isPostgreSQL()) {<NEW_LINE>rs = md.getTables(catalog, schema, null, new String[] { "T... | get(getCtx(), tableName); |
111,770 | public boolean is_used(Padstack p_padstack, app.freerouting.board.BasicBoard p_board) {<NEW_LINE>java.util.Iterator<app.freerouting.datastructures.UndoableObjects.UndoableObjectNode> it <MASK><NEW_LINE>for (; ; ) {<NEW_LINE>app.freerouting.datastructures.UndoableObjects.Storable curr_item = p_board.item_list.read_objec... | = p_board.item_list.start_read_object(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.