idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
790,205 | public PipelineResult run(Pipeline pipeline) {<NEW_LINE>// create a worker and pass in the pipeline and then do the translation<NEW_LINE>Twister2PipelineExecutionEnvironment env = new Twister2PipelineExecutionEnvironment(options);<NEW_LINE>LOG.info("Translating pipeline to Twister2 program.");<NEW_LINE><MASK><NEW_LINE>... | pipeline.replaceAll(getDefaultOverrides()); |
1,621,223 | public List<JobId> forceTrigger(ApplicationId applicationId, JobType jobType, String reason, boolean requireTests, boolean upgradeRevision, boolean upgradePlatform) {<NEW_LINE>Application application = applications().requireApplication<MASK><NEW_LINE>Instance instance = application.require(applicationId.instance());<NE... | (TenantAndApplicationId.from(applicationId)); |
1,362,344 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>response.setContentType("text/html");<NEW_LINE>ServletOutputStream out = response.getOutputStream();<NEW_LINE>out.println("<html>");<NEW_LINE>out.println("<br/>Before getUserPrincipal=" + request.... | "<br/>After getUserPrincipal=" + request.getUserPrincipal()); |
463,104 | public InstanceIdentity postInstanceRegisterInformation(InstanceRegisterInformation info, java.util.Map<String, java.util.List<String>> headers) {<NEW_LINE>WebTarget <MASK><NEW_LINE>Invocation.Builder invocationBuilder = target.request("application/json");<NEW_LINE>if (credsHeader != null) {<NEW_LINE>invocationBuilder ... | target = base.path("/instance"); |
531,563 | public com.satoshilabs.trezor.lib.protobuf.TrezorType.TxRequestSerializedType buildPartial() {<NEW_LINE>com.satoshilabs.trezor.lib.protobuf.TrezorType.TxRequestSerializedType result = new com.satoshilabs.trezor.lib.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bit... | protobuf.TrezorType.TxRequestSerializedType(this); |
679,400 | public void checkPass(PortalRegistryService service, String token) {<NEW_LINE>String key = service.getTag() == null ? service.getServiceId() : service.getServiceId() + "|" + service.getTag();<NEW_LINE>String checkId = String.format("%s:%s:%s", key, service.getAddress(), service.getPort());<NEW_LINE>if (logger.isTraceEn... | map = new HashMap<>(); |
84,693 | // snippet-start:[polly.java2.demo.main]<NEW_LINE>public static void talkPolly(PollyClient polly) {<NEW_LINE>try {<NEW_LINE>DescribeVoicesRequest describeVoiceRequest = DescribeVoicesRequest.builder().engine("standard").build();<NEW_LINE>DescribeVoicesResponse describeVoicesResult = polly.describeVoices(describeVoiceRe... | systemRegistry().createAudioDevice()); |
724,847 | public int compareTo(checkTableClass_args other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());<NEW_LINE>... | this.tableId, other.tableId); |
410,645 | public OView createView(ODatabaseDocumentInternal database, String viewName, String statement, Map<String, Object> metadata) {<NEW_LINE>OViewConfig cfg = new OViewConfig(viewName, statement);<NEW_LINE>if (metadata != null) {<NEW_LINE>cfg.setUpdatable(Boolean.TRUE.equals(<MASK><NEW_LINE>Object updateInterval = metadata.... | metadata.get("updatable"))); |
1,597,170 | public HashMap pageContent(String query, String sortBy, String perPage, String currentPageNumber) {<NEW_LINE>HashMap retMap = new HashMap();<NEW_LINE>int pageNumber = 1;<NEW_LINE>try {<NEW_LINE>pageNumber = Integer.parseInt(currentPageNumber);<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>int displayPerPage = Co... | ), "indexSearch: Error Searching Contentlets - lucene query: " + query, ex); |
1,453,543 | public Result track() throws Exception {<NEW_LINE>if (!_isEnabled) {<NEW_LINE>// If tracking is disabled, simply return a 200.<NEW_LINE>return status(200);<NEW_LINE>}<NEW_LINE>JsonNode event;<NEW_LINE>try {<NEW_LINE>event = request().body().asJson();<NEW_LINE>} catch (Exception e) {<NEW_LINE>return badRequest();<NEW_LI... | ("Failed to emit product analytics event. actor: %s, event: %s", actor, event)); |
403,670 | public static ParallelTransferOptions populateAndApplyDefaults(ParallelTransferOptions other) {<NEW_LINE>other = other == <MASK><NEW_LINE>Long blockSize = other.getBlockSizeLong();<NEW_LINE>if (blockSize == null) {<NEW_LINE>blockSize = (long) BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE;<NEW_LINE>}<NEW_LINE>Integer m... | null ? new ParallelTransferOptions() : other; |
500,695 | static String parseAttr(Pointer attr) {<NEW_LINE>int valueTag = Cups.INSTANCE.ippGetValueTag(attr);<NEW_LINE>int attrCount = Cups.INSTANCE.ippGetCount(attr);<NEW_LINE>String data = "";<NEW_LINE>String attrName = Cups.INSTANCE.ippGetName(attr);<NEW_LINE>for (int i = 0; i < attrCount; i++) {<NEW_LINE>if (valueTag == Cups... | INSTANCE.ippGetInteger(attr, i); |
387,715 | public static void main(String[] args) throws IOException {<NEW_LINE>final TravelingSalesman tsm = new TravelingSalesman(districtCapitals().subSeq(0, 10));<NEW_LINE>final Engine<EnumGene<WayPoint>, Double> engine = Engine.builder(tsm).optimize(Optimize.MINIMUM).alterers(new SwapMutator<>(0.15), new PartiallyMatchedCros... | ), (int) km)); |
831,312 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LI... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
478,490 | public static DescribeDrdsParamsResponse unmarshall(DescribeDrdsParamsResponse describeDrdsParamsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDrdsParamsResponse.setRequestId(_ctx.stringValue("DescribeDrdsParamsResponse.RequestId"));<NEW_LINE>describeDrdsParamsResponse.setSuccess(_ctx.booleanValue("DescribeDrd... | ("DescribeDrdsParamsResponse.List[" + i + "].UserVisible")); |
650,890 | public static DescribeActivationsResponse unmarshall(DescribeActivationsResponse describeActivationsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeActivationsResponse.setRequestId(_ctx.stringValue("DescribeActivationsResponse.RequestId"));<NEW_LINE>describeActivationsResponse.setPageSize(_ctx.longValue("Describ... | (_ctx.longValue("DescribeActivationsResponse.TotalCount")); |
1,780,120 | public double pNorm(double p) {<NEW_LINE>if (p <= 0)<NEW_LINE>throw new IllegalArgumentException("norm must be a positive value, not " + p);<NEW_LINE>double result = 0;<NEW_LINE>if (p == 1) {<NEW_LINE>for (int i = startIndex; i < endIndex; i++) result += abs(array[i]);<NEW_LINE>} else if (p == 2) {<NEW_LINE>for (int i ... | [i] * array[i]; |
486,352 | public static RemoveAlbumPhotosResponse unmarshall(RemoveAlbumPhotosResponse removeAlbumPhotosResponse, UnmarshallerContext context) {<NEW_LINE>removeAlbumPhotosResponse.setRequestId(context.stringValue("RemoveAlbumPhotosResponse.RequestId"));<NEW_LINE>removeAlbumPhotosResponse.setCode(context.stringValue("RemoveAlbumP... | ("RemoveAlbumPhotosResponse.Results[" + i + "].Id")); |
309,904 | final DeleteDocumentationVersionResult executeDeleteDocumentationVersion(DeleteDocumentationVersionRequest deleteDocumentationVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDocumentationVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
102,996 | public void execute(ObjectNode incomingMessage, HttpServletRequest httpRequest, Writer out) {<NEW_LINE>JsonFactory jsonFactory = new JsonFactory();<NEW_LINE>JsonGenerator writer = null;<NEW_LINE>try {<NEW_LINE>writer = jsonFactory.createGenerator(out);<NEW_LINE>writer.writeStartObject();<NEW_LINE>String token = incomin... | LOGGER.info("", throwable); |
656,370 | public void taskCompleted(UndoableDomainObject obj, BackgroundCommandTask task, TaskMonitor monitor) {<NEW_LINE>double taskTime = (System.currentTimeMillis() - startTaskTime) / 1000.00;<NEW_LINE>Msg.debug(this, time() + task.getTaskTitle() + " task finish (" + taskTime + " secs)");<NEW_LINE>obj.flushEvents();<NEW_LINE>... | currentTimeMillis() - startTaskTime) / 1000.00; |
1,193,500 | final GetRecordResult executeGetRecord(GetRecordRequest getRecordRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRecordRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,559,743 | public void onSaveInstanceState(@NonNull Bundle outState) {<NEW_LINE>super.onSaveInstanceState(outState);<NEW_LINE>outState.putInt(KEY_SELECTED_YEAR, mCalendar.get(Calendar.YEAR));<NEW_LINE>outState.putInt(KEY_SELECTED_MONTH, mCalendar.get(Calendar.MONTH));<NEW_LINE>outState.putInt(KEY_SELECTED_DAY, mCalendar.get(Calen... | outState.putInt(KEY_CURRENT_VIEW, mCurrentView); |
94,272 | public void performOperation(Random rnd, Genome[] parents, int parentIndex, Genome[] offspring, int offspringIndex) {<NEW_LINE>IntegerArrayGenome mother = (IntegerArrayGenome) parents[parentIndex];<NEW_LINE>IntegerArrayGenome father = (IntegerArrayGenome) parents[parentIndex + 1];<NEW_LINE>IntegerArrayGenome offspring1... | copy(father, i, i); |
820,199 | public IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId, Boolean displayIp, String ipaddress) throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException {<NEW_LINE>Account caller = CallContext.current().getCallingAccount();<NEW_LINE>long callerUserId = CallCo... | callerUserId, zone, displayIp, ipaddress); |
76,046 | public boolean renew(String appName, String id, boolean isReplication) {<NEW_LINE>RENEW.increment(isReplication);<NEW_LINE>Map<String, Lease<InstanceInfo>> gMap = registry.get(appName);<NEW_LINE>Lease<InstanceInfo> leaseToRenew = null;<NEW_LINE>if (gMap != null) {<NEW_LINE>leaseToRenew = gMap.get(id);<NEW_LINE>}<NEW_LI... | "; re-register required", instanceInfo.getId()); |
465,578 | private void shutdownDerbyEmbedded() {<NEW_LINE>final <MASK><NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.entry(this, tc, "shutdownDerbyEmbedded", classloader, embDerbyRefCount);<NEW_LINE>// Shut down Derby embedded if the reference count drops to 0<NEW_LINE>if (embDerbyRefCount.remove(classloader) && !embDer... | boolean trace = TraceComponent.isAnyTracingEnabled(); |
425,294 | public static JMethodCall transformToNullMethodCall(JMethodCall x, JProgram program) {<NEW_LINE>JExpression instance = x.getInstance();<NEW_LINE>List<JExpression> args = x.getArgs();<NEW_LINE>if (program.isStaticImpl(x.getTarget())) {<NEW_LINE><MASK><NEW_LINE>args = args.subList(1, args.size());<NEW_LINE>} else {<NEW_L... | instance = args.get(0); |
1,327,533 | public static void preInit() {<NEW_LINE>laser = HELPER.addBlockAndItem(new BlockLaser(Material.IRON, "block.laser"));<NEW_LINE>assemblyTable = <MASK><NEW_LINE>advancedCraftingTable = createLaserTable(EnumLaserTableType.ADVANCED_CRAFTING_TABLE, "block.advanced_crafting_table");<NEW_LINE>integrationTable = createLaserTab... | createLaserTable(EnumLaserTableType.ASSEMBLY_TABLE, "block.assembly_table"); |
3,378 | protected void startFile(File file) {<NEW_LINE>currentFile = file;<NEW_LINE>AudioFormat format;<NEW_LINE>try {<NEW_LINE>format = AudioSystem.getAudioFileFormat(file).getFormat();<NEW_LINE>float samplerate = format.getSampleRate();<NEW_LINE>int size = 1024;<NEW_LINE>int overlap = 0;<NEW_LINE>PitchResyntheziser prs = new... | Thread(sourceDispatcher).start(); |
1,580,804 | public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {<NEW_LINE>HttpRequest.Builder localVarRequestBuilder = testJsonFormDataRequestBuilder(param, param2);<NEW_LINE>try {<NEW_LINE>HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(localVarRequestBuild... | HttpResponse.BodyHandlers.ofInputStream()); |
804,597 | protected void drawText(Canvas canvas, ViewDetailsPreferences.Preferences preferences, int day) {<NEW_LINE>CharSequence baseText = getBaseText(preferences);<NEW_LINE>final int linesNo = mFormat.getEventLines();<NEW_LINE>final int span = mFormat.getDaySpan(day);<NEW_LINE>if (mFormat.isPartiallyHidden()) {<NEW_LINE>preFo... | .length()), span); |
268,898 | public static byte[] generate(byte[] P, byte[] S, int N, int r, int p, int dkLen) {<NEW_LINE>if (P == null) {<NEW_LINE>throw new IllegalArgumentException("Passphrase P must be provided.");<NEW_LINE>}<NEW_LINE>if (S == null) {<NEW_LINE>throw new IllegalArgumentException("Salt S must be provided.");<NEW_LINE>}<NEW_LINE>i... | maxParallel + " (based on block size r of " + r + ")"); |
388,808 | public DescribeConfigurationSettingsResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeConfigurationSettingsResult describeConfigurationSettingsResult = new DescribeConfigurationSettingsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = origi... | ().unmarshall(context)); |
10,632 | public IRubyObject rpartition(ThreadContext context, IRubyObject arg) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>final int pos;<NEW_LINE>final RubyString sep;<NEW_LINE>if (arg instanceof RubyRegexp) {<NEW_LINE>IRubyObject tmp = rindex(context, arg);<NEW_LINE>if (tmp.isNil())<NEW_LINE>return rpartitionMismatch(... | 0, context.getLocalMatchOrNil()); |
423,981 | public void event(TargetObject object, TargetThread eventThread, TargetEventType type, String description, List<Object> parameters) {<NEW_LINE>if (!valid) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TimedMsg.debug(this, "Event: " + type + " thread=" + eventThread + " description=" + description + " params=" + parameters);<N... | error(this, "Could not set module loaded snap", e); |
854,581 | final GetWirelessGatewayTaskResult executeGetWirelessGatewayTask(GetWirelessGatewayTaskRequest getWirelessGatewayTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getWirelessGatewayTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetWirelessGatewayTask"); |
1,174,891 | public static Ifc2x3tc1Package init() {<NEW_LINE>if (isInited)<NEW_LINE>return (Ifc2x3tc1Package) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI);<NEW_LINE>// Obtain or create and register package<NEW_LINE>Object registeredIfc2x3tc1Package = EPackage.Registry.INSTANCE.get(eNS_URI);<NEW_LINE>Ifc2x3tc1Pa... | INSTANCE.getEPackage(StorePackage.eNS_URI); |
36,248 | public void initUI(double latitude, double longitude) {<NEW_LINE>showCurrentFormat(new LatLon(latitude, longitude));<NEW_LINE>final Spinner format = ((Spinner) view.findViewById(R.id.Format));<NEW_LINE>ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, new Strin... | ).setVisibility(View.INVISIBLE); |
913,782 | public static byte[] scanBankToBytes(NTAG215 tag, int bank) throws IllegalStateException, NullPointerException {<NEW_LINE>final Context context = TagMo.getContext();<NEW_LINE>byte[] tagData = new byte[NfcByte.TAG_FILE_SIZE];<NEW_LINE>try {<NEW_LINE>byte[] data = tag.amiiboFastRead(0x00, 0x86, bank);<NEW_LINE>if (null =... | (R.string.fail_amiibo_null)); |
970,031 | public OAuth2Token authenticationCodeGrant(String authorizationEndpoint, String scopes, boolean useReqBodyAuthScheme) {<NEW_LINE>return getToken(() -> {<NEW_LINE>AuthorizationCodeCaptureServer server = new AuthorizationCodeCaptureServer();<NEW_LINE>OAuth20Service service = getOauthService(server.getReturnUrl(), authori... | var code = dialog.getValue(); |
938,283 | public Map<ReturnableData, Object> handle(final RequestWrapper request, final HttpSession session) {<NEW_LINE>final User user = (User) session.getAttribute(SessionAttribute.USER);<NEW_LINE>assert (user != null);<NEW_LINE>if (!user.isAdmin()) {<NEW_LINE>return error(ErrorCode.NOT_ADMIN);<NEW_LINE>}<NEW_LINE>if (null == ... | LongPollEvent.KICKED.toString()); |
1,378,831 | private static <K, V> CacheConfigurationBuilder<K, V> addDefaultCopiers(CacheConfigurationBuilder<K, V> builder, Class<K> keyType, Class<V> valueType) {<NEW_LINE>Set<Class<?>> immutableTypes = new HashSet<>();<NEW_LINE>immutableTypes.add(String.class);<NEW_LINE><MASK><NEW_LINE>immutableTypes.add(Float.class);<NEW_LINE>... | immutableTypes.add(Long.class); |
1,525,209 | private Class<? extends Annotation> readScope() {<NEW_LINE>// first check to see if the value is set<NEW_LINE>String property = String.format(REST_SCOPE_FORMAT, clientInterface.getName());<NEW_LINE>String configuredScope = ConfigFacade.getOptionalValue(property, String.class).orElse(null);<NEW_LINE>if (configuredScope ... | "The scope " + configuredScope + " is invalid", e); |
104,265 | private static void logWarnBoxedToPrimitiveType(Class declaringClass, String methodName, Method bestMatch, EPType[] paramTypes) {<NEW_LINE>Class[] parametersMethod = bestMatch.getParameterTypes();<NEW_LINE>for (int i = 0; i < parametersMethod.length; i++) {<NEW_LINE>Class paramMethod = parametersMethod[i];<NEW_LINE>if ... | EPTypeClass) paramType).toSimpleName(); |
1,532,124 | final GetSqlInjectionMatchSetResult executeGetSqlInjectionMatchSet(GetSqlInjectionMatchSetRequest getSqlInjectionMatchSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSqlInjectionMatchSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
309,908 | public boolean login(String mediaWikiApiEndpoint, String username, List<Cookie> cookies) {<NEW_LINE>cookies.forEach(cookie <MASK><NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put("baseUrl", mediaWikiApiEndpoint);<NEW_LINE>map.put("cookies", cookies);<NEW_LINE>map.put("username", username);<NEW_LINE>... | -> cookie.setPath("/")); |
1,776,036 | public List<Item> findItemsByColorAndGrade() {<NEW_LINE>CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Item> criteriaQuery = <MASK><NEW_LINE>Root<Item> itemRoot = criteriaQuery.from(Item.class);<NEW_LINE>Predicate predicateForBlueColor = criteriaBuilder.equal(itemRoot.get("... | criteriaBuilder.createQuery(Item.class); |
408,322 | public static void validateDockerSpec(JReleaserContext context, Distribution distribution, DockerSpec spec, Docker docker, Errors errors) {<NEW_LINE>if (!spec.isEnabled())<NEW_LINE>return;<NEW_LINE>String element = "distribution." + distribution.getName() + ".docker.spec." + spec.getName();<NEW_LINE>context.getLogger()... | imageName.orElse("{{repoOwner}}/{{distributionName}}-{{dockerSpecName}}:{{tagName}}"))); |
1,280,908 | private static void jar(File src, String prefix, JarInfo info) throws IOException {<NEW_LINE>JarOutputStream jout = info.out;<NEW_LINE>if (src.isDirectory()) {<NEW_LINE>// create / init the zip entry<NEW_LINE>prefix = prefix + src.getName() + "/";<NEW_LINE><MASK><NEW_LINE>entry.setTime(src.lastModified());<NEW_LINE>ent... | ZipEntry entry = new ZipEntry(prefix); |
1,416,140 | public void read(org.apache.thrift.protocol.TProtocol iprot, TExternalCompactionList 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 (schemeField.typ... | skip(iprot, schemeField.type); |
1,555,586 | public DimensionFilter unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DimensionFilter dimensionFilter = new DimensionFilter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += ... | ().unmarshall(context)); |
1,294,783 | protected static void removeOldModifiersFromNavUrl(final StringBuilder sb, final String newModifier) {<NEW_LINE>int nmpi = newModifier.indexOf(":");<NEW_LINE>if (nmpi > 0) {<NEW_LINE>final String newModifierKey = newModifier.substring(0, nmpi) + ":";<NEW_LINE>int sameModifierIndex = sb.indexOf(newModifierKey);<NEW_LINE... | sb.length() - 1); |
1,266,062 | public boolean find(final Path file, final ListProgressListener listener) throws BackgroundException {<NEW_LINE>try {<NEW_LINE>if (containerService.isContainer(file)) {<NEW_LINE>final List<B2BucketResponse> buckets = session<MASK><NEW_LINE>for (B2BucketResponse bucket : buckets) {<NEW_LINE>if (StringUtils.equals(contai... | .getClient().listBuckets(); |
1,583,876 | public static DescribeAsyncTasksResponse unmarshall(DescribeAsyncTasksResponse describeAsyncTasksResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAsyncTasksResponse.setRequestId(_ctx.stringValue("DescribeAsyncTasksResponse.RequestId"));<NEW_LINE>describeAsyncTasksResponse.setTotalCount(_ctx.integerValue("Describe... | = new ArrayList<AsyncTask>(); |
183,020 | public static void exec(File workingDir, String command) {<NEW_LINE>logger.info("start excute commond:" + command);<NEW_LINE>String[] commands = command.split(" ");<NEW_LINE>try {<NEW_LINE>ProcessBuilder processBuilder = new ProcessBuilder(commands);<NEW_LINE>processBuilder.directory(workingDir);<NEW_LINE>Process proce... | System.out.println(line); |
510,030 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>Card card = game.getCard(source.getFirstTarget());<NEW_LINE>if (player == null || card == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>CreateTokenCopyTargetEffect effect = new CreateTokenC... | game.addEffect(continuousEffect, source); |
1,303,845 | public boolean send(SmsMessage sms) {<NEW_LINE>String app_key = JPressOptions.get(JPressConsts.OPTION_CONNECTION_SMS_APPID);<NEW_LINE>String app_secret = JPressOptions.get(JPressConsts.OPTION_CONNECTION_SMS_APPSECRET);<NEW_LINE>String random = new Random().nextInt(1000000) + "";<NEW_LINE>String time = System.currentTim... | sig = HashKit.sha256(srcStr); |
704,680 | private void initBuffer() {<NEW_LINE>logger.info("Initializing display (if last line in log then likely the game crashed from an issue with your " + "video card)");<NEW_LINE>if (!config.isVSync()) {<NEW_LINE>GLFW.glfwSwapInterval(0);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String root = "org/terasology/icons/";<NEW_LINE>Cla... | .getResourceAsStream(root + "gooey_sweet_16.png")); |
1,760,341 | public static <T1, T2, T3> double conditionalMI(List<T1> first, List<T2> second, List<T3> condition, List<Double> weights) {<NEW_LINE>if ((first.size() == second.size()) && (first.size() == condition.size()) && (first.size() == weights.size())) {<NEW_LINE>WeightedTripleDistribution<T1, T2, T3> tripleRV = WeightedTriple... | first, second, condition, weights); |
26,011 | public void testGetDeliveryDelayClassicApi(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>String failureReason = null;<NEW_LINE>QueueConnection con = jmsQCFBindings.createQueueConnection();<NEW_LINE>con.start();<NEW_LINE>QueueSession sessionSender = con.createQueueSession(false, S... | throw new Exception("testGetDeliveryDelayClassicApi failed: " + failureReason); |
1,050,762 | private static boolean tryKubeConfig(Config config, String context) {<NEW_LINE>LOGGER.debug("Trying to configure client from Kubernetes config...");<NEW_LINE>if (!Utils.getSystemPropertyOrEnvVar(KUBERNETES_AUTH_TRYKUBECONFIG_SYSTEM_PROPERTY, true)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>File kubeConfigFile = new ... | "Found for Kubernetes config at: [{}].", kubeConfigFile.getPath()); |
812,957 | public static void applySettings(ProfileModel params) {<NEW_LINE>antiAlias = params.fontAA;<NEW_LINE>float small = params.fontSizeSmall;<NEW_LINE>float medium = params.fontSizeMedium;<NEW_LINE>float large = params.fontSizeLarge;<NEW_LINE>int screen = Math.max(params.screenWidth, params.screenHeight);<NEW_LINE>if (mediu... | Font.getFontSizeForResolution(0, screen); |
60,689 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player attachTo = game.getPlayer(targetPointer<MASK><NEW_LINE>if (controller == null || !(game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) || attachTo == null) {<NEW_LINE>ret... | .getFirst(game, source)); |
1,604,551 | public String toCircularString() {<NEW_LINE>Iterator<Segment<?>> i = descendingIterator();<NEW_LINE>StringBuilder path = new StringBuilder();<NEW_LINE>String <MASK><NEW_LINE>while (i.hasNext()) {<NEW_LINE>String segmentString = i.next().toString();<NEW_LINE>path.append(segmentString);<NEW_LINE>if (i.hasNext()) {<NEW_LI... | ls = CachedEnvironment.getProperty("line.separator"); |
402,977 | public static void show(final Context context, @NonNull final MuteSelectionListener listener, @Nullable Runnable cancelListener) {<NEW_LINE>AlertDialog.<MASK><NEW_LINE>builder.setTitle(R.string.MuteDialog_mute_notifications);<NEW_LINE>builder.setItems(R.array.mute_durations, (dialog, which) -> {<NEW_LINE>final long mut... | Builder builder = new MaterialAlertDialogBuilder(context); |
472,384 | final AcceptVpcEndpointConnectionsResult executeAcceptVpcEndpointConnections(AcceptVpcEndpointConnectionsRequest acceptVpcEndpointConnectionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(acceptVpcEndpointConnectionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | endClientExecution(awsRequestMetrics, request, response); |
510,945 | protected void startTracked() throws Exception {<NEW_LINE>final var endpoint = dynamodbDestinationConfig.getEndpoint();<NEW_LINE>final AWSCredentials awsCreds = new BasicAWSCredentials(dynamodbDestinationConfig.getAccessKeyId(), dynamodbDestinationConfig.getSecretAccessKey());<NEW_LINE>AmazonDynamoDB amazonDynamodb = n... | getRegion()).build(); |
395,341 | public static boolean isOracleMacRetinaDevice(GraphicsDevice device) {<NEW_LINE>Boolean isRetina = devicesToRetinaSupportCacheMap.get(device);<NEW_LINE>if (isRetina != null) {<NEW_LINE>return isRetina;<NEW_LINE>}<NEW_LINE>Method getScaleFactorMethod = null;<NEW_LINE>try {<NEW_LINE>getScaleFactorMethod = Class.forName("... | getLogger().debug("CGraphicsDevice.getScaleFactor(): probably it is Java 9"); |
899,703 | public boolean checkTargetVersion(TargetVersion targetVersion) {<NEW_LINE>Config tlsConfig = getTlsConfig();<NEW_LINE>tlsConfig.setFiltersKeepUserSettings(false);<NEW_LINE>WorkflowConfigurationFactory factory = new WorkflowConfigurationFactory(tlsConfig);<NEW_LINE>WorkflowTrace workflowTrace = factory.createTlsEntryWor... | add(new ServerHelloDoneMessage(tlsConfig)); |
1,038,150 | void appendWrapFn(final Appendable out) throws IOException {<NEW_LINE>if (this.codecType == Decoder) {<NEW_LINE>indent(out, 2, "pub fn wrap(\n");<NEW_LINE>indent(out, 3, "mut self,\n");<NEW_LINE>indent(out, 3, "buf: %s,\n", withLifetime(this.codecType.bufType()));<NEW_LINE>indent(out, 3, "offset: usize,\n");<NEW_LINE>i... | indent(out, 3, "self\n"); |
1,702,386 | public static InstructorAttributes valueOf(Instructor instructor) {<NEW_LINE>InstructorAttributes instructorAttributes = new InstructorAttributes(instructor.getCourseId(), instructor.getEmail());<NEW_LINE>instructorAttributes.name = instructor.getName();<NEW_LINE>instructorAttributes<MASK><NEW_LINE>instructorAttributes... | .googleId = instructor.getGoogleId(); |
886,569 | final DeleteIPSetResult executeDeleteIPSet(DeleteIPSetRequest deleteIPSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteIPSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
214,588 | private void genForAllFields() {<NEW_LINE>ThanosManager thanos = ThanosManager.from(getContext());<NEW_LINE>if (!thanos.isServiceInstalled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>new AndroidId(null, false).updateValue(RandomStringUtils.randomAlphanumeric(16).toLowerCase(Locale.ENGLISH));<NEW_LINE>new DeviceId(null, f... | w("genForAllFields nameIndex: %s, slotId: %s", nameIndex, slotId); |
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; |
733,459 | public double[] transformToDoubleValuesSV(ProjectionBlock projectionBlock) {<NEW_LINE>int numDocs = projectionBlock.getNumDocs();<NEW_LINE>if (_doubleValuesSV == null || _doubleValuesSV.length < numDocs) {<NEW_LINE>_doubleValuesSV = new double[numDocs];<NEW_LINE>}<NEW_LINE>double[] values = _arguments.get(0).transformT... | j], values[j]); |
215,859 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>Linklist list = new Linklist();<NEW_LINE>boolean flag = true;<NEW_LINE>int valu;<NEW_LINE>int posi = 0;<NEW_LINE>while (flag) {<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("1. Add item to the list at start");<... | System.out.println("Enter position"); |
1,783,186 | // For the transactional case, could read straight in, not via buffering graphs that catch syntax errors.<NEW_LINE>private static void addInGraphsWorker(DatasetGraph dsg, List<String> uriList, List<String> namedSourceList, String baseURI) {<NEW_LINE>String absBaseURI = null;<NEW_LINE>// Sort out base URI, if any.<NEW_L... | absURI = baseURI(sourceURI, absBaseURI); |
988,444 | private static Map<Integer, Integer> createBranchOpcodeInversion() {<NEW_LINE>Map<Integer, Integer> <MASK><NEW_LINE>m.put(Opcode.IF_ACMPEQ, Opcode.IF_ACMPNE);<NEW_LINE>m.put(Opcode.IF_ACMPNE, Opcode.IF_ACMPEQ);<NEW_LINE>m.put(Opcode.IF_ICMPEQ, Opcode.IF_ICMPNE);<NEW_LINE>m.put(Opcode.IF_ICMPNE, Opcode.IF_ICMPEQ);<NEW_L... | m = new HashMap<>(); |
1,092,788 | private static HttpUpload createHttpUploader(IParam param, Context ctx) {<NEW_LINE>if (param.isLeaf()) {<NEW_LINE>Object url = param.getLeafExpression().calculate(ctx);<NEW_LINE>if (!(url instanceof String)) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("httpupload" + mm.getMessage(... | + mm.getMessage("function.paramTypeError")); |
17,560 | private static void validateRetentionConfig(TableConfig tableConfig) {<NEW_LINE>SegmentsValidationAndRetentionConfig segmentsConfig = tableConfig.getValidationConfig();<NEW_LINE>String tableName = tableConfig.getTableName();<NEW_LINE>if (segmentsConfig == null) {<NEW_LINE>throw new IllegalStateException(String<MASK><NE... | .format("Table: %s, \"segmentsConfig\" field is missing in table config", tableName)); |
1,826,245 | private void computeLexicalScopes(AncestorChain<?> ac, LexicalScope parent, List<LexicalScope> scopes) {<NEW_LINE>// Compute the scope for the current node.<NEW_LINE>// Since we create a global scope in the original caller, avoid creating<NEW_LINE>// two scopes for the same object here.<NEW_LINE>LexicalScope scope = pa... | .cast(Declaration.class)); |
421,440 | public void processEvent(ComponentSystemEvent event) {<NEW_LINE>super.processEvent(event);<NEW_LINE>FacesContext facesContext = FacesContext.getCurrentInstance();<NEW_LINE>ResourceHandler resourceHanlder = facesContext.getApplication().getResourceHandler();<NEW_LINE>UIViewRoot view = facesContext.getViewRoot();<NEW_LIN... | facesContext).size())); |
1,652,793 | public void processMessage(final WebSocketMessage webSocketData) {<NEW_LINE>setDoTransactionNotifications(true);<NEW_LINE>String id = webSocketData.getId();<NEW_LINE>String newTemplateId = webSocketData.getNodeDataStringValue("newTemplateId");<NEW_LINE>// check node to append<NEW_LINE>if (id == null) {<NEW_LINE>getWebS... | = (Template) getNode(newTemplateId); |
1,020,488 | public static List<String> listChildrenAndWatchForNewChildren(ZooKeeperWatcher zkw, String zNode) throws KeeperException {<NEW_LINE>try {<NEW_LINE>List<String> children = zkw.getRecoverableZooKeeper().getChildren(zNode, zkw);<NEW_LINE>return children;<NEW_LINE>} catch (KeeperException.NoNodeException ke) {<NEW_LINE>if ... | + zNode + " "), e); |
1,774,568 | public InteractionResultHolder<ItemStack> use(Level world, Player player, @Nonnull InteractionHand hand) {<NEW_LINE>ItemStack stack = player.getItemInHand(hand);<NEW_LINE>if (!world.isClientSide && ManaItemHandler.instance().requestManaExactForTool(stack, player, MANA_COST, false)) {<NEW_LINE>BlockState bifrost = ModBl... | ).hasProficiency(player, stack); |
1,060,529 | public URL toServer(Project project, FileObject projectFile) {<NEW_LINE>String prefix = JsTestDriver.getServerURL();<NEW_LINE>if (!prefix.endsWith("/")) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>prefix += "/";<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>prefix += "test/";<NEW_LINE>String relativePath = FileUtil.getRe... | return new URL(prefix + absolutePath); |
147,232 | private Mono<Response<Flux<ByteBuffer>>> claimAnyVmWithResponseAsync(String resourceGroupName, String name, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
114,977 | private synchronized void addMutations(Map<String, TabletServerMutations<Mutation>> binnedMutations) {<NEW_LINE>int count = 0;<NEW_LINE>// merge mutations into existing mutations for a tablet server<NEW_LINE>for (Entry<String, TabletServerMutations<Mutation>> entry : binnedMutations.entrySet()) {<NEW_LINE>String server... | server, entry.getValue()); |
265,529 | final ListRevisionAssetsResult executeListRevisionAssets(ListRevisionAssetsRequest listRevisionAssetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRevisionAssetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,839,161 | private final PricingConditionsBreakQuery createPricingConditionsBreakQuery(final I_C_OrderLine salesOrderLine) {<NEW_LINE>final IProductDAO productsRepo = <MASK><NEW_LINE>final IAttributeDAO attributesRepo = Services.get(IAttributeDAO.class);<NEW_LINE>final ProductId productId = ProductId.ofRepoId(salesOrderLine.getM_... | Services.get(IProductDAO.class); |
313,749 | private String addFieldsBinding(String target, List<ActionBuilderLine> lines, int level) {<NEW_LINE>StringBuilder stb = new StringBuilder();<NEW_LINE>lines.sort((l1, l2) -> {<NEW_LINE>if (l1.getDummy() && !l2.getDummy()) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (!l1.getDummy() && l2.getDummy()) {<NEW_LINE>return 1;... | String condition = line.getConditionText(); |
447,744 | public final I_AD_Printer_Config retrievePrinterConfig(@Nullable final String hostKey, @Nullable final UserId userToPrintId) {<NEW_LINE>try (MDC.MDCCloseable ignore = MDC.putCloseable("hostKey", hostKey);<NEW_LINE>MDC.MDCCloseable ignore2 = MDC.putCloseable("userToPrintId", Integer.toString(UserId.toRepoId(userToPrintI... | logger.debug("retrievePrinterConfig - userToPrintId is null -> order by AD_User_PrinterMatchingConfig_ID to prefer records with user set", hostKey); |
426,041 | public void hideSearchView() {<NEW_LINE>final int END_RADIUS = 16;<NEW_LINE>int startRadius = Math.max(searchViewLayout.getWidth(), searchViewLayout.getHeight());<NEW_LINE>Animator animator;<NEW_LINE>if (SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {<NEW_LINE>int[] searchCoords = new int[2];<NEW_LINE>View search... | .setInterpolator(new AccelerateDecelerateInterpolator()); |
1,825,956 | static protected int isSimpleAsFeature(/* const */<NEW_LINE>Geometry geometry, /* const */<NEW_LINE>SpatialReference spatialReference, boolean bForce, NonSimpleResult result, ProgressTracker progressTracker) {<NEW_LINE>if (result != null) {<NEW_LINE>result.m_reason = NonSimpleResult.Reason.NotDetermined;<NEW_LINE>resul... | Polyline(seg.getDescription()); |
1,832,201 | public void run() {<NEW_LINE>if (followersAdapter == null) {<NEW_LINE>if (followingIds == null) {<NEW_LINE>// we will do a normal array adapter<NEW_LINE>followersAdapter = new PeopleArrayAdapter(context, followers);<NEW_LINE>} else {<NEW_LINE>followersAdapter = new FollowersArrayAdapter(context, followers, followingIds... | spinner.setVisibility(View.GONE); |
1,369,425 | boolean canClose() {<NEW_LINE>Collection<MultiViewElement> col = model.getCreatedElements();<NEW_LINE>Iterator<MultiViewElement> it = col.iterator();<NEW_LINE>Collection<CloseOperationState> <MASK><NEW_LINE>while (it.hasNext()) {<NEW_LINE>MultiViewElement el = it.next();<NEW_LINE>CloseOperationState state = el.canClose... | badOnes = new ArrayList<>(); |
461,091 | private List<Set<String>> partitionTopicSet(Set<String> topicSet) {<NEW_LINE>List<Set<String>> topicGroups = new ArrayList<>();<NEW_LINE>List<String> sortedList = new ArrayList<>(topicSet);<NEW_LINE>Collections.sort(sortedList);<NEW_LINE>int maxTopicsEachProducerHolder = tubeConfig.getMaxTopicsEachProducerHold();<NEW_L... | (sortedList.get(index)); |
447,800 | public Row doNext() {<NEW_LINE>if (currentChunk == null || currentChunk.getPositionCount() == nextPos) {<NEW_LINE>if (currentChunks == null || !currentChunks.hasNext()) {<NEW_LINE>// has next<NEW_LINE>while (client.isValid()) {<NEW_LINE><MASK><NEW_LINE>QueryError queryError = clientResults.getError();<NEW_LINE>if (quer... | QueryResults clientResults = client.current(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.