idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
194,487 | public DiskIopsConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DiskIopsConfiguration diskIopsConfiguration = new DiskIopsConfiguration();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | int originalDepth = context.getCurrentDepth(); |
1,281,094 | public static Range valueOf(String range) {<NEW_LINE>if (range.contains("${")) {<NEW_LINE>// unresolved<NEW_LINE>return new Range(0, 0, false, false, range);<NEW_LINE>}<NEW_LINE>range = range.trim();<NEW_LINE>// || range.endsWith("..");<NEW_LINE>boolean unspecified = range.length() == 0 || range.startsWith("..");<NEW_L... | "+") && max == Integer.MAX_VALUE; |
611,409 | public double rand() {<NEW_LINE>// faster calculation by inversion<NEW_LINE>boolean inv = p > 0.5;<NEW_LINE>double np = n * Math.min(p, 1.0 - p);<NEW_LINE>// Poisson approximation for extremely low np<NEW_LINE>int x;<NEW_LINE>if (np < 1E-6) {<NEW_LINE>x = PoissonDistribution.tinyLambdaRand(np);<NEW_LINE>} else {<NEW_LI... | = new ModeSearch(1.0 - p); |
1,303,122 | DownloadPerAgeStats downloadsPerAgeStats() {<NEW_LINE>Stopwatch stopwatch = Stopwatch.createStarted();<NEW_LINE>logger.debug("Calculating downloads per age percentages");<NEW_LINE>DownloadPerAgeStats result = new DownloadPerAgeStats();<NEW_LINE>String percentage = "SELECT CASE\n" + " WHEN (SELECT CAST(COUNT(*) AS... | + "( SELECT COUNT(*) AS COUNT\n" + "FROM INDEXERNZBDOWNLOAD\n" + "WHERE AGE > %d) AS x\n" + "ELSE 0 END"; |
1,695,862 | public void actionPerformed(ActionEvent e) {<NEW_LINE>JTextComponent textArea = <MASK><NEW_LINE>Caret caret = textArea.getCaret();<NEW_LINE>int dot = caret.getDot();<NEW_LINE>EditorPane currentCodePane = SikulixIDE.get().getCurrentCodePane();<NEW_LINE>int lineNumberAtCaret = currentCodePane.getLineNumberAtCaret(dot);<N... | (JTextComponent) e.getSource(); |
716,794 | public void createFieldEditors() {<NEW_LINE>Composite appearanceComposite = getFieldEditorParent();<NEW_LINE>// Typing<NEW_LINE>Composite group = AptanaPreferencePage.createGroup(appearanceComposite, Messages.EditorsPreferencePage_Typing);<NEW_LINE>addField(new BooleanFieldEditor(IPreferenceConstants.ENABLE_CHARACTER_P... | , Messages.EditorsPreferencePage_camelCaseSelection, group)); |
1,339,621 | // End of class Row<T><NEW_LINE>Row<T>[] sortItems(final long threshold, final ErrorType errorType) {<NEW_LINE>final ArrayList<Row<T>> rowList = new ArrayList<>();<NEW_LINE>final ReversePurgeItemHashMap.Iterator<T> iter = hashMap.iterator();<NEW_LINE>if (errorType == ErrorType.NO_FALSE_NEGATIVES) {<NEW_LINE>while (iter... | , rowList.size())); |
1,789,631 | private void parse(String[] args) {<NEW_LINE><MASK><NEW_LINE>parseFlags(parser);<NEW_LINE>fileNames = parser.getRemaining();<NEW_LINE>if (inputList != null && !inputList.isEmpty()) {<NEW_LINE>// append the file names to the end of the input list<NEW_LINE>inputList.addAll(Arrays.asList(fileNames));<NEW_LINE>fileNames = ... | ArgumentsParser parser = new ArgumentsParser(args); |
1,351,539 | public Shipment unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Shipment shipment = new Shipment();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_... | JsonToken token = context.getCurrentToken(); |
684,616 | public void addListener(@Nullable Activity activity, @Nullable Executor executor, @NonNull final ListenerTypeT listener) {<NEW_LINE>Preconditions.checkNotNull(listener);<NEW_LINE>boolean shouldFire = false;<NEW_LINE>SmartHandler handler;<NEW_LINE>synchronized (task.getSyncObject()) {<NEW_LINE>if ((task.getInternalState... | activity.isDestroyed(), "Activity is already destroyed!"); |
1,457,339 | public void start(Stage stage) {<NEW_LINE>stage.setTitle("TextBoxClipboard");<NEW_LINE>Scene scene = new Scene(new Group(), 600, 450);<NEW_LINE>scene.setFill(Color.GHOSTWHITE);<NEW_LINE>final Label copyFrom = new Label("Copy From: ");<NEW_LINE>final TextField copyFromText = new TextField("ABC 123");<NEW_LINE>final HBox... | .getSystemClipboard().getContentTypes(); |
985,685 | private static void showResults(final Project project, final List<VirtualFile> images, Map<Long, Set<VirtualFile>> duplicates, Map<Long, VirtualFile> all) {<NEW_LINE>final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();<NEW_LINE>if (indicator == null || indicator.isCanceled())<NEW_LI... | images, realDuplicates).show(); |
26,806 | ArrayList<Object> new99() /* reduce AIfStatement */<NEW_LINE>{<NEW_LINE>@SuppressWarnings("hiding")<NEW_LINE>ArrayList<Object> nodeList = new ArrayList<Object>();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<MASK><NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList2 = pop();<NEW_LIN... | <Object> nodeArrayList3 = pop(); |
1,745,496 | private StaticLayout createLayoutWithNumberOfLine(int lastLineStart, int width) {<NEW_LINE>if (mSpanned == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String text = mSpanned.toString();<NEW_LINE>SpannableStringBuilder temp = (SpannableStringBuilder) mSpanned.subSequence(0, text.length());<NEW_LINE>String ellipsiz... | length(), CharacterStyle.class); |
1,200,934 | public boolean put(int key, boolean value) {<NEW_LINE>if (start == -1) {<NEW_LINE>start = key;<NEW_LINE>this.value = new boolean[] { value };<NEW_LINE>} else {<NEW_LINE>int offset = key - start;<NEW_LINE>if (offset >= 0 && offset < this.value.length) {<NEW_LINE>boolean <MASK><NEW_LINE>this.value[offset] = value;<NEW_LI... | curr = this.value[offset]; |
1,809,716 | public GameButton recoverData(Context context, CallCustomizeKeyboard call, Controller controller, CkbManager manager) {<NEW_LINE>GameButton gb = new GameButton(context, call, controller, manager);<NEW_LINE>gb.setKeyMaps(this.keyMaps);<NEW_LINE>gb.setKeyTypes(this.keyTypes);<NEW_LINE>gb.setDesignIndex(this.designIndex);... | gb.setHide(this.isHide); |
713,275 | private void transferProtocolHeadersToURLConnection(URLConnection connection) {<NEW_LINE>boolean addHeaders = MessageUtils.isTrue<MASK><NEW_LINE>for (String header : headers.keySet()) {<NEW_LINE>List<String> headerList = headers.get(header);<NEW_LINE>if (HttpHeaderHelper.CONTENT_TYPE.equalsIgnoreCase(header)) {<NEW_LIN... | (message.getContextualProperty(ADD_HEADERS_PROPERTY)); |
1,543,771 | private Map<String, Object> writeMapInternal(Map<?, ?> source, Map<String, Object> sink, TypeInformation<?> propertyType) {<NEW_LINE>for (Map.Entry<?, ?> entry : source.entrySet()) {<NEW_LINE>Object key = entry.getKey();<NEW_LINE>Object value = entry.getValue();<NEW_LINE>if (isSimpleType(key.getClass())) {<NEW_LINE>Str... | new ArrayList<>())); |
1,047,221 | protected void syncManifest() throws Exception {<NEW_LINE>Map<String, String> namedParams = getParameters().getNamed();<NEW_LINE>String appStr = null;<NEW_LINE>if (namedParams.containsKey("app")) {<NEW_LINE>// get --app-param<NEW_LINE>// appStr = ensureEndingSlash(namedParams.get("app"));<NEW_LINE>// no need to add sla... | cacheDir = manifest.resolveCacheDir(namedParams); |
462,553 | public void update() {<NEW_LINE>int fontSize = 0;<NEW_LINE>try {<NEW_LINE>fontSize = Integer.parseInt(sizeSelector.getText().trim());<NEW_LINE>// System.out.println("'" + sizeSelector.getText() + "'");<NEW_LINE>} catch (NumberFormatException ignored) {<NEW_LINE>}<NEW_LINE>// if a deselect occurred, selection will be -1... | .get(fontNames[selection]); |
351,605 | private void updateData() {<NEW_LINE><MASK><NEW_LINE>contentView.setVisibility(View.GONE);<NEW_LINE>XTokenManager.getInstance().requestSessions(accountItem.getConnectionSettings().getXToken().getUid(), accountItem.getConnection(), new XTokenManager.SessionsListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void ... | progressBar.setVisibility(View.VISIBLE); |
881,594 | final DisassociateDomainResult executeDisassociateDomain(DisassociateDomainRequest disassociateDomainRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateDomainRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateDomain"); |
449,343 | public static void main(String[] args) {<NEW_LINE>Logo.print(true);<NEW_LINE>AgentBoot.boot();<NEW_LINE>System.out.println("Scouter Host Agent Version " + Version.getServerFullVersion());<NEW_LINE>Logger.println("A01", "Scouter Host Agent Version " + Version.getServerFullVersion());<NEW_LINE>File exit = new File(SysJMX... | SysJMX.getProcessPID() + ".scouter.run"); |
899,738 | protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand2 = i... | getChildren().get(0); |
1,587,985 | public Object outBinding(Object contract, RpcBinding binding, Object target, SofaRuntimeContext sofaRuntimeContext) {<NEW_LINE>ApplicationContext applicationContext = sofaRuntimeContext<MASK><NEW_LINE>ProviderConfigContainer providerConfigContainer = applicationContext.getBean(ProviderConfigContainer.class);<NEW_LINE>P... | .getSofaRuntimeManager().getRootApplicationContext(); |
1,659,587 | public ListStorageLensConfigurationsResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ListStorageLensConfigurationsResult listStorageLensConfigurationsResult = new ListStorageLensConfigurationsResult();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isSta... | int originalDepth = context.getCurrentDepth(); |
476,162 | private static void tryOptimizableBoolean(RegressionEnvironment env, RegressionPath path, String epl) {<NEW_LINE>// test function returns lookup value and "equals"<NEW_LINE>int count = 10;<NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE>EPCompiled compiled = env.compile("@name('s" + i + "')" + epl, path);<NEW_LINE>... | getNewDataList().size()); |
908,909 | public void process(String workID, byte[] data) {<NEW_LINE>ReplicationTarget target = DistributedWorkQueueWorkAssignerHelper.<MASK><NEW_LINE>String file = new String(data, UTF_8);<NEW_LINE>log.debug("Received replication work for {} to {}", file, target);<NEW_LINE>ReplicaSystem replica;<NEW_LINE>try {<NEW_LINE>replica ... | fromQueueKey(workID).getValue(); |
1,580,550 | final ListLensReviewsResult executeListLensReviews(ListLensReviewsRequest listLensReviewsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listLensReviewsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | false), new ListLensReviewsResultJsonUnmarshaller()); |
1,705,519 | private void generateColumnData() {<NEW_LINE>int[] numOfMonth = openScale.getCountsOfMonth(calYears.getYear());<NEW_LINE>LocalDate calMonths = LocalDate.of(calYears.getYear(), 1, 1);<NEW_LINE>List<IBarDataSet> dataSets = new ArrayList<>();<NEW_LINE>for (int i = 0; i < 12; i++) {<NEW_LINE>List<BarEntry> entries = new Ar... | BarDataSet(entries, "month " + i); |
559,698 | public Set<Map<String, List<String>>> searchForMultipleAttributeValues(String base, String filter, Object[] params, String[] attributeNames) {<NEW_LINE>// Escape the params acording to RFC2254<NEW_LINE>Object[] encodedParams = new String[params.length];<NEW_LINE>for (int i = 0; i < params.length; i++) {<NEW_LINE>encode... | > 0) ? attributeNames : null); |
731,231 | public AccountLimit unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>AccountLimit accountLimit = new AccountLimit();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>... | ().unmarshall(context)); |
924,245 | public void updateFactAcctEndingBalanceForTag(final String processingTag) {<NEW_LINE>final String sql = "SELECT " + DB_FUNC_Fact_Acct_EndingBalance_UpdateForTag + "(?)";<NEW_LINE>final Object[] sqlParams = new Object[] { processingTag };<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>tr... | prepareStatement(sql, ITrx.TRXNAME_ThreadInherited); |
16,429 | final ClusterSecurityGroup executeAuthorizeClusterSecurityGroupIngress(AuthorizeClusterSecurityGroupIngressRequest authorizeClusterSecurityGroupIngressRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(authorizeClusterSecurityGroupIngressRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
527,831 | private void initDeviceView() {<NEW_LINE>main = new Composite(parent, SWT.NONE);<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numColumns = 1;<NEW_LINE>layout.marginTop = 4;<NEW_LINE>layout.marginBottom = 4;<NEW_LINE>layout.marginHeight = 4;<NEW_LINE>layout.marginWidth = 4;<NEW_LINE>main.setLayout(layo... | setSelection(device.getFilterFilesView()); |
1,227,808 | void cscan(int[] arr, int head, int size, int disk_size) {<NEW_LINE>int seek_count = 0;<NEW_LINE>int distance, cur_track;<NEW_LINE>Vector<Integer> l3 = new Vector<Integer>();<NEW_LINE>Vector<Integer> r3 = new Vector<Integer>();<NEW_LINE>Vector<Integer> arr3 = new Vector<Integer>();<NEW_LINE>// appending end values whic... | Math.abs(cur_track - head); |
1,212,520 | final String PrintVersion(String str) {<NEW_LINE>try {<NEW_LINE>StringBuffer buf = new StringBuffer(str.length());<NEW_LINE>for (int i = 0; i < str.length(); i++) {<NEW_LINE>switch(str.charAt(i)) {<NEW_LINE>case '\"':<NEW_LINE>buf.append("\\\"");<NEW_LINE>break;<NEW_LINE>case '\\':<NEW_LINE>buf.append("\\\\");<NEW_LINE... | FingerprintException.getNewHead(this, e); |
502,143 | public Object clone() {<NEW_LINE>Object o = null;<NEW_LINE>try {<NEW_LINE>o = super.clone();<NEW_LINE>} catch (Exception e) {<NEW_LINE>com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.cache.CacheConfig", "314");<NEW_LINE>}<NEW_LINE>// --------------------------------------------------------------------<NEW_LI... | CacheConfig) o).cacheName = null; |
1,730,659 | public void onMediaClick(Album album, ArrayList<Media> media, int position) {<NEW_LINE>if (!pickMode) {<NEW_LINE>Intent intent = new Intent(<MASK><NEW_LINE>intent.putExtra(SingleMediaActivity.EXTRA_ARGS_ALBUM, album);<NEW_LINE>try {<NEW_LINE>intent.setAction(SingleMediaActivity.ACTION_OPEN_ALBUM);<NEW_LINE>intent.putEx... | getApplicationContext(), SingleMediaActivity.class); |
1,835,375 | private QualifierKind findLub(@UnderInitialization DefaultQualifierKindHierarchy this, QualifierKind qual1, QualifierKind qual2) {<NEW_LINE>if (qual1 == qual2) {<NEW_LINE>return qual1;<NEW_LINE>} else if (qual1.isSubtypeOf(qual2)) {<NEW_LINE>return qual2;<NEW_LINE>} else if (qual2.isSubtypeOf(qual1)) {<NEW_LINE>return ... | QualifierKind> lubs = findLowestQualifiers(allSuperTypes); |
911,573 | public Request<CreateSAMLProviderRequest> marshall(CreateSAMLProviderRequest createSAMLProviderRequest) {<NEW_LINE>if (createSAMLProviderRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<CreateSAMLProviderRequest> request = new DefaultReque... | (tagsListValue.getKey())); |
245,494 | public void processElement(ProcessContext context) throws Exception {<NEW_LINE>Query query = context.element();<NEW_LINE><MASK><NEW_LINE>int userLimit = query.hasLimit() ? query.getLimit().getValue() : Integer.MAX_VALUE;<NEW_LINE>boolean moreResults = true;<NEW_LINE>QueryResultBatch currentBatch = null;<NEW_LINE>while ... | String namespace = options.getNamespace(); |
870,885 | protected void createPasswordSection(Composite parent) {<NEW_LINE>passwordLabel = new Label(parent, SWT.NONE);<NEW_LINE>passwordLabel.setLayoutData(GridDataFactory.swtDefaults().hint(new PixelConverter(passwordLabel).convertHorizontalDLUsToPixels(IDialogConstants.LABEL_WIDTH), SWT.DEFAULT).create());<NEW_LINE>passwordL... | Button(parent, SWT.CHECK); |
1,401,389 | private void waitForFutureCompletion(GroupByQuery query, List<ListenableFuture<AggregateResult>> futures, boolean hasTimeout, long timeout) {<NEW_LINE>ListenableFuture<List<AggregateResult>> future = Futures.allAsList(futures);<NEW_LINE>try {<NEW_LINE>if (queryWatcher != null) {<NEW_LINE>queryWatcher.registerQueryFutur... | MILLISECONDS) : future.get(); |
1,568,139 | private static <T> T runExternalAttach(long pid, String methodName, InputStreamProcessor<T> processor, @Nullable File glowrootJarFile) throws Exception {<NEW_LINE>List<String> command = buildCommand(pid, methodName, glowrootJarFile);<NEW_LINE>ProcessBuilder processBuilder = new ProcessBuilder(command);<NEW_LINE>Process... | register(process.getErrorStream()); |
1,660,728 | protected void downloadArtifactTo(final URL artifactUrl, final File pluginFile, final IAsyncResultHandler<File> handler) {<NEW_LINE>URI artifactUri;<NEW_LINE>try {<NEW_LINE>artifactUri = artifactUrl.toURI();<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>throw new IllegalArgumentException(e.getMessage(), e);<NEW_LI... | LOG.error("Failed to downloaded plugin artifact", failure); |
772,788 | protected void actionPerformed(OWLEntity selectedEntity) {<NEW_LINE>OWLEntityRenamer owlEntityRenamer = new OWLEntityRenamer(getOWLModelManager().getOWLOntologyManager(), getOWLModelManager().getOntologies());<NEW_LINE>final IRI iri = RenameEntityPanel.showDialog(getOWLEditorKit(), selectedEntity);<NEW_LINE>if (iri == ... | ().getOWLClass(iri)); |
244,458 | public static void clear(int WindowNo, Container c, String ParseString) {<NEW_LINE>log.info("Dialog.clear: " + ParseString);<NEW_LINE>Properties ctx = Env.getCtx();<NEW_LINE>String parse = Env.parseContext(<MASK><NEW_LINE>if (parse.length() == 0)<NEW_LINE>parse = "ERROR parsing: " + ParseString;<NEW_LINE>//<NEW_LINE>Wi... | ctx, WindowNo, ParseString, false); |
1,501,837 | public void onStyleLoaded(@NonNull final Style style) {<NEW_LINE>initStyling();<NEW_LINE>// Create a new ScaleBarPlugin object<NEW_LINE>scaleBarPlugin = new ScaleBarPlugin(mapView, mapboxMap);<NEW_LINE>scaleBarPlugin.create(listOfScalebarStyleVariations[index]);<NEW_LINE>findViewById(R.id.switch_scalebar_style_fab).set... | Toast.LENGTH_LONG).show(); |
939,095 | public Block readBlock(SliceInput sliceInput) {<NEW_LINE>// read data type<NEW_LINE>int scale = sliceInput.readInt();<NEW_LINE>DataType dataType = new TimeType(scale);<NEW_LINE>// read zone id<NEW_LINE>int length = sliceInput.readInt();<NEW_LINE>byte[] zoneIdName = new byte[length];<NEW_LINE>sliceInput.read(zoneIdName)... | i] = sliceInput.readLong(); |
1,277,446 | public final TypeBoundContext typeBound() throws RecognitionException {<NEW_LINE>TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 34, RULE_typeBound);<NEW_LINE>try {<NEW_LINE>int _alt;<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(454);<NEW_LINE>typ... | adaptivePredict(_input, 20, _ctx); |
1,067,583 | public void start() {<NEW_LINE>this.syncPoolExecutor = Executors.newSingleThreadScheduledExecutor(target -> <MASK><NEW_LINE>updateLowerUsefulDifficulty();<NEW_LINE>syncPoolExecutor.scheduleWithFixedDelay(() -> {<NEW_LINE>try {<NEW_LINE>if (config.getIsHeartBeatEnabled()) {<NEW_LINE>heartBeat();<NEW_LINE>}<NEW_LINE>proc... | new Thread(target, "syncPool")); |
1,046,676 | String computeAuthorizationHeader(ConsumerKey consumerAuth, RequestToken userAuth, String signature, long oauthTimestamp, String percentEncodedNonce) {<NEW_LINE>StringBuilder sb = StringBuilderPool.DEFAULT.stringBuilder();<NEW_LINE>sb.append("OAuth ");<NEW_LINE>sb.append(KEY_OAUTH_CONSUMER_KEY).append("=\"").append(con... | ()).append("\", "); |
1,674,662 | public void update(Unit unit) {<NEW_LINE>float scl = Mathf.clamp((unit.vel().len() - minSpeed) / (maxSpeed - minSpeed));<NEW_LINE>if (Mathf.chance(Time.delta * chance * scl)) {<NEW_LINE>float x = unit.x + Angles.trnsx(unit.rotation, offset, width * side), y = unit.y + Angles.trnsy(unit.rotation, offset, width * side);<... | shootSound.at(x, y); |
1,067,690 | private void waitForLoadJobs(Map<String, ListenableFuture<?>> loadJobs) throws Exception {<NEW_LINE>final long startTime = System.currentTimeMillis();<NEW_LINE>System.err.println("Waiting for load jobs...");<NEW_LINE>// Add callbacks to each load job that print information on successful completion or failure.<NEW_LINE>... | currentTimeMillis() - startTime) / 1000.0; |
1,681,758 | public void copyConditionalStylesFrom(org.freeplane.api.MindMap source, String styleName) {<NEW_LINE>IStyle style = NodeStyleProxy.styleByName(source, styleName);<NEW_LINE>if (style == null)<NEW_LINE>throw new IllegalArgumentException("Style " + styleName + " not found");<NEW_LINE>IStyle ownStyle = NodeStyleProxy.style... | MapStyleModel.getExtension(getDelegate()); |
234,296 | private boolean alertOutputs(String commandDisplayName) {<NEW_LINE>JButton setOutputOption = new JButton(NbBundle.getMessage(JavaActions.class, "CTL_SetOutput"));<NEW_LINE>setOutputOption.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(JavaActions.class, "AD_SetOutput"));<NEW_LINE>setOutputOption.se... | class, "TITLE_set_outputs_dialog", commandDisplayName, projectDisplayName); |
1,443,624 | public RegisterSchemaVersionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RegisterSchemaVersionResult registerSchemaVersionResult = new RegisterSchemaVersionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NE... | String currentParentElement = context.getCurrentParentElement(); |
892,874 | public static <T> ExprVectorProcessor<T> makeComparisonProcessor(Expr.VectorInputBindingInspector inspector, Expr left, Expr right, Supplier<LongOutStringsInFunctionVectorProcessor> longOutStringsInFunctionVectorProcessor, Supplier<LongOutLongsInFunctionVectorValueProcessor> longOutLongsInProcessor, Supplier<DoubleOutL... | return (ExprVectorProcessor<T>) processor; |
911,155 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String gatewayName, String connectionName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot b... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
869,644 | void circuitBreakerOpenAndThenClose() {<NEW_LINE>CircuitBreakerConfig config = CircuitBreakerConfig.custom().slidingWindowType(SlidingWindowType.COUNT_BASED).slidingWindowSize(10).failureRateThreshold(25.0f).waitDurationInOpenState(Duration.ofSeconds(10)).permittedNumberOfCallsInHalfOpenState(4).build();<NEW_LINE>Circu... | (e.toString())); |
1,683,718 | public void updateGlobalAdditionalProps() {<NEW_LINE>additionalProperties.put(X_HAS_UNKNOWN_MIME_TYPES, !unknownMimeTypes.isEmpty());<NEW_LINE>Collections.sort(unknownMimeTypes, new Comparator<Map<String, String>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(Map<String, String> o1, Map<String, String> o... | ) o2.get(VENDOR_EXTENSION_X_PARAM_NAME_TYPE)); |
845,602 | protected TensorFunction<Reference> lazyGetFunction() {<NEW_LINE>if (!allInputFunctionsPresent(1))<NEW_LINE>return null;<NEW_LINE>IntermediateOperation input = inputs.get(0);<NEW_LINE>OrderedTensorType inputType = input.type().get();<NEW_LINE>String inputFunctionName = input.rankingExpressionFunctionName();<NEW_LINE>Li... | get(i).name(); |
163,310 | private MHRMovement createMovementForCostCollector(int partnerId, MPPCostCollector costCollector) {<NEW_LINE>// get the concept that should store the labor<NEW_LINE>MHRConcept concept = MHRConcept.getByValue(getCtx(), CONCEPT_PP_COST_COLLECTOR_LABOR, costCollector.get_TrxName());<NEW_LINE>// get the attribute for speci... | setHR_Attribute_ID(attribute.getHR_Attribute_ID()); |
1,164,983 | public Mono<? extends Connection> acquire(TransportConfig config, ConnectionObserver observer, @Nullable Supplier<? extends SocketAddress> remoteAddress, @Nullable AddressResolverGroup<?> resolverGroup) {<NEW_LINE>return Mono.create(sink -> {<NEW_LINE>SocketAddress remote = null;<NEW_LINE>if (remoteAddress != null) {<N... | .create().captureThreadLocalValues(); |
1,283,231 | final TestMetricFilterResult executeTestMetricFilter(TestMetricFilterRequest testMetricFilterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(testMetricFilterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudWatch Logs"); |
662,325 | public void execute(JobExecutionContext context) throws JobExecutionException {<NEW_LINE>logger.debug("Starting job to publish a scheduled event");<NEW_LINE>JobDetail jobDetail = context.getJobDetail();<NEW_LINE>JobDataMap jobData = jobDetail.getJobDataMap();<NEW_LINE>try {<NEW_LINE>SchedulerContext schedulerContext = ... | .getScheduler().getContext(); |
1,308,409 | public void marshall(Service service, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (service == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(service.getReferenceId(), REFERENCEID_BINDING);<NEW_LINE>protoc... | service.getStartTime(), STARTTIME_BINDING); |
86,819 | public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new InfraSelectIndexChoiceJoin(true));<NEW_LINE>execs.add(new InfraSelectIndexChoiceJoin(false));<NEW_LINE>execs.add(new InfraSelectIndexChoice(true));<NEW_LINE>execs.<MASK>... | add(new InfraSelectIndexChoice(false)); |
897,419 | final ListCollectorsResult executeListCollectors(ListCollectorsRequest listCollectorsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listCollectorsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
571,931 | private ProcessBuilder createServerCommand() {<NEW_LINE>final List<String> command = new ArrayList<>();<NEW_LINE>command.add(Platform.getJavaPath());<NEW_LINE>if (Preferences.getBoolean("run.options.memory")) {<NEW_LINE>command.add("-Xms" + Preferences.get("run.options.memory.initial") + "m");<NEW_LINE>command.add("-Xm... | ("mode").getAbsolutePath()); |
997,098 | private void migrateSettingsDialogSize(Element element) {<NEW_LINE>int width = 0, height = 0, x = 0, y = 0;<NEW_LINE>var node = element.getFirstChild();<NEW_LINE>if (node != null) {<NEW_LINE>config.lock(LockMode.WRITE);<NEW_LINE>try {<NEW_LINE>var result = node.getNodeValue().split(":");<NEW_LINE>if (result.length == 4... | .parseInt(result[0]); |
1,110,698 | public DetectedObjects processOutput(TranslatorContext ctx, NDList list) {<NEW_LINE>float[] classIds = list.get(0).toFloatArray();<NEW_LINE>float[] probabilities = list.get(1).toFloatArray();<NEW_LINE>NDArray boundingBoxes = list.get(2);<NEW_LINE>List<String> retNames = new ArrayList<>();<NEW_LINE>List<Double> retProbs... | x, y, w, h); |
1,142,103 | private void findNextUserEntry(Slice deletedKey) {<NEW_LINE>// if there are no more entries, we are done<NEW_LINE>if (!iterator.hasNext()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>do {<NEW_LINE>// Peek the next entry and parse the key<NEW_LINE>InternalKey internalKey = iterator.peek().getKey();<NEW_LINE>// skip entries c... | while (iterator.hasNext()); |
244,411 | private void searchRepository() {<NEW_LINE>SVNRevision revision = getRevision();<NEW_LINE>final SvnSearch svnSearch;<NEW_LINE>try {<NEW_LINE>RepositoryFile[] repositoryFiles = getRepositoryFiles();<NEW_LINE>if (repositoryFiles.length > 0) {<NEW_LINE>svnSearch = new SvnSearch(repositoryFiles);<NEW_LINE>} else {<NEW_LINE... | new RepositoryFile[] { repositoryFile }); |
872,761 | private static void deleteOrphanedRecords() {<NEW_LINE>Log.d("Database clean: removing non-existing lists");<NEW_LINE>database.delete(dbTableCachesLists, "list_id <> " + StoredList.STANDARD_LIST_ID + " AND list_id NOT IN (SELECT _id + " + customListIdOffset + " FROM " + dbTableLists + ")", null);<NEW_LINE>Log.d("Databa... | "geocode NOT IN (SELECT geocode FROM " + dbTableCaches + ")", null); |
77,439 | public static void stopSpan(@Advice.Argument(0) ServletRequest request, @Advice.Argument(1) ServletResponse response, @Advice.Thrown Throwable throwable, @Advice.Local("otelCallDepth") CallDepth callDepth, @Advice.Local("otelRequest") ServletRequestContext<HttpServletRequest> requestContext, @Advice.Local("otelContext"... | .class).get(response); |
1,353,792 | final UploadDocumentsResult executeUploadDocuments(UploadDocumentsRequest uploadDocumentsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(uploadDocumentsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | invoke(request, responseHandler, executionContext); |
1,809,111 | final DBClusterSnapshotAttributesResult executeModifyDBClusterSnapshotAttribute(ModifyDBClusterSnapshotAttributeRequest modifyDBClusterSnapshotAttributeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyDBClusterSnapshotAttributeRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.star... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
719,846 | public Object run() {<NEW_LINE>FontManagerNativeLibrary.load();<NEW_LINE>// JNI throws an exception if a class/method/field is not found,<NEW_LINE>// so there's no need to do anything explicit here.<NEW_LINE>initIDs();<NEW_LINE>switch(StrikeCache.nativeAddressSize) {<NEW_LINE>case 8:<NEW_LINE>longAddresses = true;<NEW_... | "") + File.separator + "lib"; |
1,658,323 | public void testEnvObjFldAnnInjection() throws Exception {<NEW_LINE>EnvAnnObjTestHelper.testEnvAnnObjInjection(CLASS_NAME, "ifString", E_STRING, ifString);<NEW_LINE>EnvAnnObjTestHelper.testEnvAnnObjInjection(CLASS_NAME, "ifCharacter", E_CHAR, ifCharacter);<NEW_LINE>EnvAnnObjTestHelper.testEnvAnnObjInjection(CLASS_NAME,... | CLASS_NAME, "ifFloat", E_FLOAT, ifFloat); |
1,569,124 | public void mouseMoved(MouseEvent m) {<NEW_LINE>lastPos = toRelativePoint(m);<NEW_LINE>boolean shiftPressed = (m.getModifiersEx(<MASK><NEW_LINE>boolean ctrlPressed = (m.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0;<NEW_LINE>boolean altPressed = (m.getModifiersEx() & InputEvent.ALT_DOWN_MASK) != 0;<NEW_LINE>List<C... | ) & InputEvent.SHIFT_DOWN_MASK) != 0; |
22,599 | protected Map<String, Object> create() throws TOTorrentException {<NEW_LINE>Map<String, Map> file_tree = new TreeMap<>();<NEW_LINE>if (root.isFile()) {<NEW_LINE>processFile(root, file_tree, "");<NEW_LINE>} else {<NEW_LINE>processDirectory(root, file_tree, "");<NEW_LINE>}<NEW_LINE>if (total_file_size == 0) {<NEW_LINE>th... | , piece_layers.get(key)); |
883,084 | private Mono<PagedResponse<ContainerServiceInner>> listSinglePageAsync() {<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 (this.client.getSubscriptionId() == null) {... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
531,451 | public void onClick(View v) {<NEW_LINE>FragmentActivity activity = getActivity();<NEW_LINE>if (activity != null) {<NEW_LINE>OsmandApplication app = (OsmandApplication) activity.getApplication();<NEW_LINE>RoutingHelper routingHelper = app.getRoutingHelper();<NEW_LINE>final String trackName = new SimpleDateFormat("yyyy-M... | new File(gpx.path)); |
763,712 | boolean checkIndex(final long index, final long position) {<NEW_LINE>try {<NEW_LINE>final long seq1 = queue.rollCycle().toSequenceNumber(index + 1) - 1;<NEW_LINE>final long seq2 = store.sequenceForPosition(this, position, true);<NEW_LINE>if (seq1 != seq2) {<NEW_LINE>final long seq3 = store.indexing.linearScanByPosition... | : "seq1=" + seq1 + ", seq3=" + seq3; |
725,609 | private static void addClickFunctions(final View base, final SlidingUpPanelLayout slidingPanel, final View clickingArea, final ContentType.Type type, final Activity contextActivity, final CommentUrlObject submission) {<NEW_LINE>base.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>p... | EXTRA_DISPLAY_URL, submission.getUrl()); |
1,085,098 | public static HashStreamRanges createActiveRanges(GetActiveRangesResponse response) {<NEW_LINE>TreeMap<Long, RangeProperties> ranges = Maps.newTreeMap();<NEW_LINE>long lastEndKey = Long.MIN_VALUE;<NEW_LINE>for (RelatedRanges rr : response.getRangesList()) {<NEW_LINE>RangeProperties range = rr.getProps();<NEW_LINE>long ... | size() > 0, "No active range found"); |
320,832 | public static FetchSourceContext parseFromRestRequest(RestRequest request) {<NEW_LINE>Boolean fetchSource = null;<NEW_LINE>String[] sourceExcludes = null;<NEW_LINE>String[] sourceIncludes = null;<NEW_LINE>String <MASK><NEW_LINE>if (source != null) {<NEW_LINE>if (Booleans.isTrue(source)) {<NEW_LINE>fetchSource = true;<N... | source = request.param("_source"); |
778,002 | public Pack downloadHeapDump(Pack param, DataInputX in, DataOutputX out) {<NEW_LINE>int buff = 2 * 1024 * 1024;<NEW_LINE>File downloadFile = new File(folderName + "/" + ((MapPack) param).getText("fileName"));<NEW_LINE>try {<NEW_LINE>RandomAccessFile raf = new RandomAccessFile(downloadFile, "r");<NEW_LINE>byte[] buffer ... | read(buffer, 0, unitsize); |
37,272 | protected KeycloakUriBuilder parseHierarchicalUri(String uriTemplate, Matcher match) {<NEW_LINE>boolean scheme = match.group(2) != null;<NEW_LINE>if (scheme)<NEW_LINE>this.scheme = match.group(2);<NEW_LINE>String authority = match.group(4);<NEW_LINE>if (authority != null) {<NEW_LINE>this.authority = null;<NEW_LINE>Stri... | host = hostPortMatch.group(1); |
596,364 | public void write(org.apache.thrift.protocol.TProtocol prot, chop_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = <MASK><NEW_LINE>if (struct.isSetTinfo()) {<NEW_LINE>opti... | new java.util.BitSet(); |
197,561 | private void loadNode1150() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.OpenFileMode_EnumValues, new QualifiedName(0, "EnumValues"), new LocalizedText("en", "EnumValues"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataV... | .expanded(), false)); |
45,125 | final PutMetricStreamResult executePutMetricStream(PutMetricStreamRequest putMetricStreamRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putMetricStreamRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutMetricStreamRequest> reques... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,150,398 | private <T> void validateClass(Class<T> entityClass) {<NEW_LINE>if (entityClass.isAnonymousClass() || entityClass.isLocalClass()) {<NEW_LINE>throw new IllegalArgumentException(<MASK><NEW_LINE>}<NEW_LINE>if (!ClassUtils.isAnnotationPresent(entityClass, REntity.class)) {<NEW_LINE>throw new IllegalArgumentException("REnti... | entityClass.getName() + " is not publically accessable."); |
779,010 | public static void renderOnTileEntity(SmartTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {<NEW_LINE>if (te == null || te.isRemoved())<NEW_LINE>return;<NEW_LINE>Entity cameraEntity = Minecraft.getInstance().cameraEntity;<NEW_LINE>float max = AllConfigs.CLIENT.filterIt... | te.getBehaviour(LinkBehaviour.TYPE); |
777,680 | protected void paint(@Nonnull Graphics2D g2, int x, int y, int shift) {<NEW_LINE>g2.setColor(BG_COLOR);<NEW_LINE>Path2D.Double path = new Path2D.Double();<NEW_LINE>int height = JBUI.scale(HEIGHT);<NEW_LINE>float incline = height / 2.0f;<NEW_LINE>float length = JBUI.scale(WIDTH) / 2.0f;<NEW_LINE>float start = length / 2... | start + incline + length, y); |
1,516,234 | private PriorityProperty<?> createPriorityProperty(Field field, String prefix, Map<String, Object> parameters) {<NEW_LINE>String[] keys = collectPropertyKeys(field, prefix, parameters);<NEW_LINE>Class<?> fieldCls = field.getType();<NEW_LINE>switch(fieldCls.getName()) {<NEW_LINE>case "int":<NEW_LINE>return createIntProp... | createLongProperty(field, keys, null); |
634,954 | public Pair<List<? extends Pod>, Integer> searchForPods(final ListPodsByCmd cmd) {<NEW_LINE>final String podName = cmd.getPodName();<NEW_LINE>final Long id = cmd.getId();<NEW_LINE>Long zoneId = cmd.getZoneId();<NEW_LINE>final Object keyword = cmd.getKeyword();<NEW_LINE>final Object allocationState = cmd.getAllocationSt... | ), SearchCriteria.Op.EQ); |
1,411,453 | final GetClusterCredentialsResult executeGetClusterCredentials(GetClusterCredentialsRequest getClusterCredentialsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getClusterCredentialsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | (super.beforeMarshalling(getClusterCredentialsRequest)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.