idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,759,212 | private static boolean createWorkLibrary(File tmpDir, String questaPath, StringBuilder result) throws IOException, InterruptedException {<NEW_LINE>BufferedReader reader = null;<NEW_LINE>if (new File(FileUtil.correctPath(tmpDir.getCanonicalPath()) + "work").exists()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>try {<NEW... | (System.getProperty("line.separator")); |
884,655 | private static void putMacroblock(Picture tgt, Picture decoded, final int mbX, final int mbY) {<NEW_LINE>byte[] luma = tgt.getPlaneData(0);<NEW_LINE>int stride = tgt.getPlaneWidth(0);<NEW_LINE>byte[] cb = tgt.getPlaneData(1);<NEW_LINE>byte[] cr = tgt.getPlaneData(2);<NEW_LINE>int <MASK><NEW_LINE>int dOff = 0;<NEW_LINE>... | strideChroma = tgt.getPlaneWidth(1); |
527,663 | public String insert(Boolean m_Client, Boolean m_User, Boolean m_Window, Boolean m_Org) {<NEW_LINE>log.info("");<NEW_LINE>String m_UpdateResult;<NEW_LINE>int no = 0;<NEW_LINE>// --- Delete first<NEW_LINE>m_UpdateResult = delete(m_Client, m_User, m_Window, m_Org);<NEW_LINE>// Handle NULL<NEW_LINE>if (m_Value == null || ... | (m_AD_Window_ID).append(","); |
862,181 | public static void onReceive(TermuxApiReceiver apiReceiver, final Context context, final Intent intent) {<NEW_LINE>Logger.logDebug(LOG_TAG, "onReceive");<NEW_LINE>ResultReturner.returnData(apiReceiver, intent, out -> {<NEW_LINE>final Uri downloadUri = intent.getData();<NEW_LINE>if (downloadUri == null) {<NEW_LINE>out.p... | title = intent.getStringExtra("title"); |
1,353,605 | protected void activate(Map<String, Object> config) {<NEW_LINE>modified(config);<NEW_LINE>systemHandler = new SystemHandler(imperiHomeConfig);<NEW_LINE>deviceRegistry = new DeviceRegistry();<NEW_LINE>actionRegistry <MASK><NEW_LINE>itemProcessor = new ItemProcessor(itemRegistry, deviceRegistry, actionRegistry, imperiHom... | = new ActionRegistry(eventPublisher, deviceRegistry); |
298,428 | private Message buildMapEntryMessage(Message.Builder mapBuilder, Field field, Object mapKey, Object mapValue) {<NEW_LINE>FieldDescriptor keyFieldDescriptor = mapBuilder.getDescriptorForType().findFieldByName(MAP_KEY_FIELD_NAME);<NEW_LINE>FieldDescriptor valueFieldDescriptor = mapBuilder.getDescriptorForType().findField... | mapKey, field.getMapKeyField()); |
1,593,750 | final ListTunnelsResult executeListTunnels(ListTunnelsRequest listTunnelsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTunnelsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListTunnelsRequest> reques... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
169,660 | protected String createTableSql(RemoteTableName remoteTableName, List<String> columns, ConnectorTableMetadata tableMetadata) {<NEW_LINE>ImmutableList.Builder<String> tableOptions = ImmutableList.builder();<NEW_LINE>Map<String, Object> tableProperties = tableMetadata.getProperties();<NEW_LINE>ClickHouseEngineType engine... | .add("SAMPLE BY " + value)); |
921,415 | private static InsnNode convertStringBuilderChain(MethodNode mth, InvokeNode toStrInsn, List<InsnNode> chain) {<NEW_LINE>try {<NEW_LINE>int chainSize = chain.size();<NEW_LINE>if (chainSize < 2) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<InsnArg> args = new ArrayList<>(chainSize);<NEW_LINE>InsnNode firstInsn = cha... | collectionMap(args, InsnArg::duplicate); |
277,749 | public void marshall(EmailChannelResponse emailChannelResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (emailChannelResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(emailChannelResponse.get... | emailChannelResponse.getId(), ID_BINDING); |
1,324,909 | public void splitStockMoveLinesUnit(ActionRequest request, ActionResponse response) {<NEW_LINE>try {<NEW_LINE>StockMove stockMove = request.getContext().asType(StockMove.class);<NEW_LINE>List<StockMoveLine> stockMoveLineContextList = (List<StockMoveLine>) request.getContext().get("stockMoveLineList");<NEW_LINE>stockMov... | .get(IExceptionMessage.STOCK_MOVE_15)); |
991,759 | @Description("use either apoc.cypher.runFirstColumnMany for a list return or apoc.cypher.runFirstColumnSingle for returning the first row of the first column")<NEW_LINE>public Object runFirstColumn(@Name("cypher") String statement, @Name("params") Map<String, Object> params, @Name(value = "expectMultipleValues", defaul... | columns().get(0); |
1,325,820 | public static byte[] encode(byte[] password, byte[] nonce) {<NEW_LINE>MessageDigest messageDigest;<NEW_LINE>try {<NEW_LINE>messageDigest = MessageDigest.getInstance("SHA-256");<NEW_LINE>} catch (NoSuchAlgorithmException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>// SHA256(password)<NEW_LINE>byte[]... | passwordHash2 = messageDigest.digest(passwordHash1); |
49,309 | public Request<StopTrainingEntityRecognizerRequest> marshall(StopTrainingEntityRecognizerRequest stopTrainingEntityRecognizerRequest) {<NEW_LINE>if (stopTrainingEntityRecognizerRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(StopTrainingEntityRecognizerRequest)");<NEW_LI... | setContent(new StringInputStream(snippet)); |
244,260 | private void writeStrings(BibDatabase database) throws IOException {<NEW_LINE>List<BibtexString> strings = database.getStringKeySet().stream().map(database::getString).sorted(new BibtexStringComparator(true)).collect(Collectors.toList());<NEW_LINE>// First, make a Map of all entries:<NEW_LINE>Map<String, BibtexString> ... | string.getName(), string); |
294,489 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(getLayoutResId());<NEW_LINE>setSupportActionBar((Toolbar) findViewById(R.id.toolbar));<NEW_LINE>mFlexibleSpaceImageHeight = getResources().getDimensionPixelSize(R.dimen.flexible_space_image_height);... | findViewById(R.id.title); |
1,195,271 | public static DescribeAppInstanceListResponse unmarshall(DescribeAppInstanceListResponse describeAppInstanceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAppInstanceListResponse.setRequestId(_ctx.stringValue("DescribeAppInstanceListResponse.RequestId"));<NEW_LINE>describeAppInstanceListResponse.setCode(_ct... | ("DescribeAppInstanceListResponse.InstanceList[" + i + "].GroupName")); |
622,436 | @Consumes("application/json")<NEW_LINE>@Path("/api/projects/{id}/secrets/{key}")<NEW_LINE>@ApiOperation("Set a secret to a project")<NEW_LINE>public RestSecret putProjectSecret(@ApiParam(value = "project id", required = true) @PathParam("id") int projectId, @ApiParam(value = "secret key", required = true) @PathParam("k... | ResourceNotFoundException.class, AccessControlException.class); |
1,494,282 | private synchronized List<Executor> createAllExecutors(ExecutionContext context) {<NEW_LINE>if (executors.isEmpty()) {<NEW_LINE>List<Executor> <MASK><NEW_LINE>for (int i = 0; i < childParallism; i++) {<NEW_LINE>inputs.add(getInputs().get(0).createExecutor(context, i));<NEW_LINE>}<NEW_LINE>List<RelFieldCollation> sortLi... | inputs = new ArrayList<>(); |
408,000 | void updateCallStack(InputOutput io) {<NEW_LINE>try {<NEW_LINE>io.getOut().reset();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>if (hasCallStack()) {<NEW_LINE>List<ConsoleMessage.StackFrame> callStack = request.getInitiatorCallStack();<NEW_LINE>for (ConsoleMessage.St... | ), sf.getColumn()); |
547,200 | public void apply(FaceletContext ctx, UIComponent parent) throws IOException {<NEW_LINE>if (((AbstractFaceletContext) ctx).isBuildingCompositeComponentMetadata()) {<NEW_LINE>String facetName = _name.getValue(ctx);<NEW_LINE>UIComponent compositeBaseParent = FaceletCompositionContext.getCurrentInstance(ctx).getCompositeC... | beanDescriptor.setValue(RENDER_FACET_USED, facetList); |
1,399,263 | public void updateAsciiStream(int i, InputStream x, long length) throws SQLException {<NEW_LINE>try {<NEW_LINE>rsetImpl.<MASK><NEW_LINE>} catch (SQLException sqlX) {<NEW_LINE>FFDCFilter.processException(sqlX, getClass().getName() + ".updateAsciiStream", "2981", this);<NEW_LINE>throw WSJdbcUtil.mapException(this, sqlX);... | updateAsciiStream(i, x, length); |
1,174,136 | public BreakInfo runToBreak(int timeout) {<NEW_LINE>if (brVal == null) {<NEW_LINE><MASK><NEW_LINE>for (Break b : breaks) brVal.add(new BreakDetector(b));<NEW_LINE>fireEvent(ModelEvent.RUN_TO_BREAK);<NEW_LINE>}<NEW_LINE>ObservableValue clkVal = clocks.get(0).getClockOutput();<NEW_LINE>try {<NEW_LINE>while (state != Stat... | brVal = new ArrayList<>(); |
28,456 | public static OpenSearchStatusException errorFromXContent(XContentParser parser) throws IOException {<NEW_LINE>XContentParser.Token token = parser.nextToken();<NEW_LINE>ensureExpectedToken(XContentParser.<MASK><NEW_LINE>OpenSearchException exception = null;<NEW_LINE>RestStatus status = null;<NEW_LINE>String currentFiel... | Token.START_OBJECT, token, parser); |
51,373 | private void handleProperty(TagProperty property, boolean start_of_day) {<NEW_LINE>String[] trackers = property.getStringList();<NEW_LINE>Set<String> tag_hosts = new HashSet<>();<NEW_LINE>for (String tracker : trackers) {<NEW_LINE>tag_hosts.add(tracker.toLowerCase(Locale.US));<NEW_LINE>}<NEW_LINE>Tag tag = property.get... | .getGlobalManager().getDownloadManagers(); |
248,336 | public UserType unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>UserType userType = new UserType();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>Stri... | AwsJsonReader reader = context.getReader(); |
490,106 | public CodegenExpression make(CodegenMethodScope parent, SAIFFInitializeSymbol symbols, CodegenClassScope classScope) {<NEW_LINE>CodegenMethod methodNode = parent.makeChild(SubordTableLookupStrategyFactory.EPTYPE, this.getClass(), classScope);<NEW_LINE>if (isStrictKeys) {<NEW_LINE>int[] keyStreamNums = IntArrayUtil.cop... | ), hashMultikeyClasses, methodNode, classScope); |
810,922 | public void doAsRunJar(ActionEvent ae) {<NEW_LINE>EditorPane codePane = getCurrentCodePane();<NEW_LINE>String orgName = codePane.getCurrentShortFilename();<NEW_LINE><MASK><NEW_LINE>if (codePane.isDirty()) {<NEW_LINE>Sikulix.popError("Please save script before!", "Export as runnable jar");<NEW_LINE>} else {<NEW_LINE>Fil... | log(lvl, "doAsRunJar requested: %s", orgName); |
747,469 | final GetDiskSnapshotResult executeGetDiskSnapshot(GetDiskSnapshotRequest getDiskSnapshotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDiskSnapshotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDiskSnapshot"); |
1,293,137 | public void run(RegressionEnvironment env) {<NEW_LINE>sendTimer(env, 0);<NEW_LINE>String epl = "@name('s0') select irstream volume, max(price) as maxVol" + " from SupportMarketDataBean#sort(1, volume desc) as s0," + "SupportBean#keepall as s1 " + "output every 1 seconds";<NEW_LINE>env.compileDeploy(epl).addListener("s0... | SupportBean("JOIN_KEY", -1)); |
1,252,844 | private static HandshakeData createDefaultSsl() {<NEW_LINE>try {<NEW_LINE>final KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");<NEW_LINE>keyPairGenerator.initialize(2048);<NEW_LINE>final KeyPair keyPair = keyPairGenerator.generateKeyPair();<NEW_LINE>// Generate self signed certificate<NEW_LINE>... | Calendar calendar = Calendar.getInstance(); |
1,713,934 | public boolean createFailedExecutorHealthCheckMessage(final List<ExecutableFlow> flows, final Executor executor, final ExecutorManagerException failureException, final EmailMessage message, final String azkabanName, final String scheme, final String clientHostname, final String clientPortNumber, final List<String> emai... | message.println("Following flows were reported as running on the executor and will be " + "finalized."); |
1,546,231 | public static ClientMessage encodeRequest(java.lang.String name, com.hazelcast.internal.serialization.Data key, com.hazelcast.internal.serialization.Data value, long threadId, long ttl) {<NEW_LINE>ClientMessage clientMessage = ClientMessage.createForEncode();<NEW_LINE>clientMessage.setRetryable(false);<NEW_LINE>clientM... | initialFrame.content, REQUEST_THREAD_ID_FIELD_OFFSET, threadId); |
1,212,676 | protected void initializeContainerNetworking(ByteOrder byteOrder) throws IOException, DatabusException {<NEW_LINE>// instruct netty not to rename our threads in the I/O and boss thread pools<NEW_LINE>ThreadRenamingRunnable.setThreadNameDeterminer(ThreadNameDeterminer.CURRENT);<NEW_LINE>_httpBootstrap = new ServerBootst... | , DirectChannelBufferFactory.getInstance(byteOrder)); |
1,757,136 | default CompletableFuture<KeyValue<K, V>> vDelete(K k, long expectedVersion) {<NEW_LINE>TxnOp<K, V> op = getOpFactory().newTxn().If(newCompareVersion(CompareResult.EQUAL, k, expectedVersion)).Then(getOpFactory().newDelete(k, Options.deleteAndGet())).build();<NEW_LINE>return txn(op).thenCompose(result -> {<NEW_LINE>try ... | >) subResults.get(0); |
1,510,292 | private void commonNodeConfig(OpenSearchNode node, String nodeNames, OpenSearchNode firstNode) {<NEW_LINE>if (node.getVersion().onOrAfter("7.0.0")) {<NEW_LINE>node.defaultConfig.keySet().stream().filter(name -> name.startsWith("discovery.zen.")).collect(Collectors.toList()).forEach(node.defaultConfig::remove);<NEW_LINE... | "cluster.initial_master_nodes", "[" + nodeNames + "]"); |
1,848,489 | public SplitEntry findBestFromServerSplit(IntDoubleVector histogram) throws Exception {<NEW_LINE>LOG.debug(String.format("------To find the best split of node[%d]------", this.nid));<NEW_LINE>SplitEntry splitEntry = new SplitEntry();<NEW_LINE>LOG.debug(String.format("The best split before looping the histogram: fid[%d]... | AngelConf.ANGEL_PS_NUMBER, AngelConf.DEFAULT_ANGEL_PS_NUMBER); |
237,822 | public com.alibaba.alink.operator.batch.dl.ctr.protos.Eval.GAUC buildPartial() {<NEW_LINE>com.alibaba.alink.operator.batch.dl.ctr.protos.Eval.GAUC result = new com.alibaba.alink.operator.batch.dl.ctr.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x000... | protos.Eval.GAUC(this); |
1,642,296 | public com.amazonaws.services.backupgateway.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.backupgateway.model.ValidationException validationException = new com.amazonaws.services.backupgateway.model.ValidationException(null);<NEW_LINE... | JsonToken token = context.getCurrentToken(); |
357,205 | public V put(final K key, @Nonnull final V value) {<NEW_LINE>final Entry<K, V>[] table = this.table;<NEW_LINE>final int hash = HashUtil.hash(key, hashingStrategy);<NEW_LINE>final int index = hash % table.length;<NEW_LINE>for (Entry<K, V> e = table[index]; e != null; e = e.hashNext) {<NEW_LINE>final K entryKey;<NEW_LINE... | >(key, value, hash); |
1,322,172 | public boolean insertBusinessConfigIfNotExist(String domain, String key, ConfigItem item) {<NEW_LINE>try {<NEW_LINE>if (!m_domains.containsKey(domain)) {<NEW_LINE>BusinessReportConfig config = new BusinessReportConfig();<NEW_LINE>config.setId(domain);<NEW_LINE>BusinessItemConfig businessItemConfig = buildBusinessItemCo... | itemIds = m_domains.get(domain); |
265,754 | protected void runAlgo() {<NEW_LINE>EdgeExplorer explorer = outEdgeExplorer;<NEW_LINE>while (true) {<NEW_LINE>visitedNodes++;<NEW_LINE>if (isMaxVisitedNodesExceeded() || finished())<NEW_LINE>break;<NEW_LINE>int baseNode = currEdge.adjNode;<NEW_LINE>EdgeIterator <MASK><NEW_LINE>while (iter.next()) {<NEW_LINE>if (!accept... | iter = explorer.setBaseNode(baseNode); |
143,834 | public byte[] serialise(final Double d) throws SerialisationException {<NEW_LINE>final byte[] out = new byte[8];<NEW_LINE>final long value = Double.doubleToRawLongBits(d);<NEW_LINE>out[0] = (byte) ((int) (value & 255));<NEW_LINE>out[1] = (byte) ((int) (value >> 8) & 255);<NEW_LINE>out[2] = (byte) ((int) (value >> 16) &... | value >> 48) & 255); |
200,480 | private static void addPathChain(PathChain pathChain) {<NEW_LINE>HttpString method = new HttpString(pathChain.getMethod());<NEW_LINE>// Use a random integer as the id for a given path.<NEW_LINE>Integer randInt = new Random().nextInt();<NEW_LINE>while (handlerListById.containsKey(randInt.toString())) {<NEW_LINE>randInt ... | new Random().nextInt(); |
1,577,805 | private void doSetMember(final IMetaMember member, boolean force, final boolean jumpToSource, final int highlightBCI) {<NEW_LINE>selectedProgrammatically = true;<NEW_LINE>if (member == null) {<NEW_LINE>clear();<NEW_LINE>selectedProgrammatically = false;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MetaClass previousClass = cur... | ? null : currentMember.getMetaClass(); |
1,172,659 | public void downloadChangesInfo(@NonNull CallbackWithObject<Map<String, Contribution>> callback) {<NEW_LINE>String userName = plugin.OSM_USER_DISPLAY_NAME.get();<NEW_LINE>Map<String, String> params = new HashMap<>();<NEW_LINE>params.put("name", userName);<NEW_LINE>AndroidNetworkUtils.sendRequestAsync(app, USER_CHANGES_... | String dateStr = it.next(); |
1,623,023 | private void findHosts(Reader reader) {<NEW_LINE>currentIndex = 0;<NEW_LINE>foundHosts = new LinkedHashMap<>();<NEW_LINE>try (BufferedReader fileReader = new BufferedReader(reader)) {<NEW_LINE>String fileLine;<NEW_LINE>while ((fileLine = fileReader.readLine()) != null) {<NEW_LINE>Matcher matcher = HOSTNAME_REGEX.matche... | WARNING, e.toString()); |
758,990 | public void readExternal(@Nonnull Element element, @Nullable SdkTable sdkTable) throws InvalidDataException {<NEW_LINE>Element elementName = assertNotMissing(element, ELEMENT_NAME);<NEW_LINE>myName = elementName.getAttributeValue(ATTRIBUTE_VALUE);<NEW_LINE>final Element typeChild = element.getChild(ELEMENT_TYPE);<NEW_L... | homePath = assertNotMissing(element, ELEMENT_HOMEPATH); |
709,091 | protected LibSVMModel<Regressor> createModel(ModelProvenance provenance, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<Regressor> outputIDInfo, List<svm_model> models) {<NEW_LINE>if (models.get(0) instanceof ModelWithMeanVar) {<NEW_LINE>// models have been standardized, unpick and use standardized constructor<N... | unpickedModels.add(curModel.innerModel); |
717,607 | private Binding findImport(char[][] compoundName, int length) {<NEW_LINE>recordQualifiedReference(compoundName);<NEW_LINE>ModuleBinding module = module();<NEW_LINE>Binding binding = this.environment.getTopLevelPackage(compoundName[0]);<NEW_LINE>int i = 1;<NEW_LINE>foundNothingOrType: if (binding != null) {<NEW_LINE>Pac... | defaultPackage, this.environment.defaultPackage); |
1,359,332 | private String queryServiceType(String application, String service) throws IOException {<NEW_LINE>TermQuery applicationQuery = new TermQuery(new Term(DubboKeeperMonitorService.APPLICATION, new BytesRef(application)));<NEW_LINE>TermQuery serviceQuery = new TermQuery(new Term(DubboKeeperMonitorService.INTERFACE, new Byte... | , BooleanClause.Occur.MUST)); |
1,386,374 | private double arcToParameter(double arc) {<NEW_LINE>if (cache.isEmpty()) {<NEW_LINE>throw new IllegalStateException("Must call setNodes first.");<NEW_LINE>}<NEW_LINE>if (arc > 1) {<NEW_LINE>arc = 1;<NEW_LINE>}<NEW_LINE>arc *= totalArcLength;<NEW_LINE>Entry<Double, Double> floorEntry = cache.floorEntry(arc);<NEW_LINE>f... | double rightParameter = ceilingEntry.getValue(); |
1,668,223 | public BufferedImage generateDistanceField(BufferedImage inImage) {<NEW_LINE>final int inWidth = inImage.getWidth();<NEW_LINE>final int inHeight = inImage.getHeight();<NEW_LINE>final int outWidth = inWidth / downscale;<NEW_LINE>final int outHeight = inHeight / downscale;<NEW_LINE>final BufferedImage outImage = new Buff... | downscale) + (downscale / 2); |
1,404,861 | protected Map<String, Object> extractUserDefinedHeaders(SoapMessage source) {<NEW_LINE>Map<String, Object> headers = new HashMap<String, Object>();<NEW_LINE><MASK><NEW_LINE>if (soapHeader != null) {<NEW_LINE>Iterator<?> attributeIter = soapHeader.getAllAttributes();<NEW_LINE>while (attributeIter.hasNext()) {<NEW_LINE>O... | SoapHeader soapHeader = source.getSoapHeader(); |
1,716,602 | public J.MethodDeclaration visitMethodDeclaration(J.MethodDeclaration method, P p) {<NEW_LINE>J.MethodDeclaration m = super.visitMethodDeclaration(method, p);<NEW_LINE>if (!m.getLeadingAnnotations().isEmpty()) {<NEW_LINE>m = concatenatePrefix(m, Space.firstPrefix(m.getLeadingAnnotations()));<NEW_LINE>m = m.withLeadingA... | (), Space.EMPTY)); |
779,145 | public XContentBuilder doXContentBody(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>if (keyed) {<NEW_LINE>builder.startObject(CommonFields.VALUES.getPreferredName());<NEW_LINE>for (int i = 0; i < keys.length; ++i) {<NEW_LINE>String key = String.valueOf(keys[i]);<NEW_LINE>double value = value(key... | (value).toString()); |
553,523 | protected Hover find(Group parent, int index, int mx, int my, boolean includeTrailing) {<NEW_LINE>int tabH = BAR_MARGIN + titleHeight + BAR_MARGIN;<NEW_LINE>if (mx < x || mx >= x + w || my < y || my >= y + h) {<NEW_LINE>return Hover.NONE;<NEW_LINE>} else if (my >= y + tabH) {<NEW_LINE>return Hover.<MASK><NEW_LINE>}<NEW... | folder(parent, index, this); |
1,238,963 | public BaseVectorSummarizer visit(Vector vec) {<NEW_LINE>SparseVector sv;<NEW_LINE>if (vec instanceof DenseVector) {<NEW_LINE>DenseVector dv = (DenseVector) vec;<NEW_LINE>int[] indices = new int[dv.size()];<NEW_LINE>for (int i = 0; i < dv.size(); i++) {<NEW_LINE>indices[i] = i;<NEW_LINE>}<NEW_LINE>sv = new SparseVector... | VectorIterator iter = sv.iterator(); |
1,503,831 | private void saveWorkflowTask(final WorkflowProcessor processor) throws DotDataException {<NEW_LINE>WorkflowTask task = processor.getTask();<NEW_LINE>if (null == task) {<NEW_LINE>task = new WorkflowTask();<NEW_LINE>}<NEW_LINE>final Role role = roleAPI.getUserRole(processor.getUser());<NEW_LINE>if (task.isNew()) {<NEW_L... | setWorkflowtaskId(task.getId()); |
930,168 | private Stream<T> materialize() {<NEW_LINE>assertNotConsumed();<NEW_LINE>consumed = true;<NEW_LINE>final boolean skipLimitInSql = sqlInfo.dbmsType().getSkipLimitSupport() == DbmsType.SkipLimitSupport.STANDARD;<NEW_LINE>if (skipLimitInSql) {<NEW_LINE>// Render SKIP and LIMIT to SQL<NEW_LINE>@SuppressWarnings("unchecked"... | result = result.limit(limit); |
801,815 | public void paintInstance(InstancePainter painter) {<NEW_LINE>final var data = (InstanceDataSingleton) painter.getData();<NEW_LINE>final var val = data == null ? Value.FALSE : (Value) data.getValue();<NEW_LINE>final var bds = painter.getBounds().expand(-1);<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>if (pai... | GraphicsUtil.switchToWidth(g, 1); |
83,130 | public void onSynchronizationFinished(@BookmarkManager.SynchronizationType int type, @BookmarkManager.SynchronizationResult int result, @NonNull String errorString) {<NEW_LINE>LOGGER.d(TAG, "onSynchronizationFinished, type: " + Statistics.getSynchronizationType(type) + ", result: " + result + ", errorString = " + error... | clickListener, R.string.cancel); |
215,452 | final DescribeScheduledInstancesResult executeDescribeScheduledInstances(DescribeScheduledInstancesRequest describeScheduledInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeScheduledInstancesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
852,392 | private static String convertInfoPlist(File plistFile, Map<String, String> uuidToName) {<NEW_LINE>Map<String, Object> properties = parse(plistFile);<NEW_LINE>StringBuilder buffer = new StringBuilder();<NEW_LINE>buffer.append("require 'ruble'\n\n");<NEW_LINE>String <MASK><NEW_LINE>buffer.append("bundle '").append(name).... | name = sanitize(properties, "name"); |
123,505 | protected void launchGroovy(final ICompilationUnit unit, final IJavaProject javaProject, final String mode) {<NEW_LINE>IType runType = null;<NEW_LINE>if (unit != null) {<NEW_LINE>try {<NEW_LINE>IType[] types = Arrays.stream(unit.getAllTypes()).filter(GroovyProjectFacade::hasGroovyMainMethod).toArray(IType[]::new);<NEW_... | LaunchShortcutHelper.SelectMainTypeDialog_title, LaunchShortcutHelper.SelectMainTypeDialog_message); |
1,175,178 | public synchronized static Counter registerOrRetrieveRESTUnmappedExceptionMetric(String fullyQualifiedClassName, String methodSignature) {<NEW_LINE>MetricRegistry baseMetricRegistry = sharedMetricRegistry.getOrCreate(MetricRegistry.Type.BASE.getName());<NEW_LINE>Metadata metadata = Metadata.builder().withType(MetricTyp... | withDisplayName("Total Unmapped Exception Requests").build(); |
1,120,097 | public void sendAttrNotification(String attrName, LstNotificationType type) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>StringBuffer buff = new StringBuffer(attrName);<NEW_LINE>buff.append(type);<NEW_LINE>c_logger.traceEntryExit(this, "sendAttributeAddedNotify", buff.toString());<NEW_LINE>}<NEW_LINE>i... | sendEvent(listeners, evt, type); |
468,880 | public static void main(String... args) {<NEW_LINE>Config config = Config.builder(file("conf/dev.yaml").optional(), file("conf/config.yaml").optional(), classpath("default.yaml")).addFilter((key, stringValue) -> key.name().equals("level") ? stringValue.toUpperCase() : stringValue).build();<NEW_LINE>// Environment type,... | .asString().get(); |
651,672 | private void testBackup() {<NEW_LINE>File f = new File(MMKV.getRootDir());<NEW_LINE>String backupRootDir = f.getParent() + "/mmkv_backup_3";<NEW_LINE>String mmapID = "test/AES";<NEW_LINE>String otherDir = getFilesDir().getAbsolutePath() + "/mmkv_3";<NEW_LINE>boolean ret = MMKV.backupOneToDirectory(mmapID, backupRootDir... | MMKV.SINGLE_PROCESS_MODE, null, backupRootDir); |
756,197 | public RegisterThingResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RegisterThingResult registerThingResult = new RegisterThingResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonTok... | int originalDepth = context.getCurrentDepth(); |
999,053 | private void truncateCache() {<NEW_LINE>int cacheSize = cache.size();<NEW_LINE>long[] accessTimes = new long[cacheSize];<NEW_LINE>Iterator<CacheValue> i = cache.values().iterator();<NEW_LINE>int j = 0;<NEW_LINE>// checking against accessTimes.length is needed in case cache is added to concurrently<NEW_LINE>while (i.has... | .entrySet().iterator(); |
722,712 | public static void main(String... args) {<NEW_LINE>Params params = new Params();<NEW_LINE>CmdLineParser parser = new CmdLineParser(params);<NEW_LINE>try {<NEW_LINE>parser.parseArgument(args);<NEW_LINE>} catch (CmdLineException t) {<NEW_LINE>System.err.println(t.getMessage());<NEW_LINE>parser.printUsage(System.out);<NEW... | , params.branch, repo)); |
1,177,614 | public boolean initializeLostBookieRecoveryDelay(int lostBookieRecoveryDelay) throws UnavailableException {<NEW_LINE>LOG.debug("initializeLostBookieRecoveryDelay()");<NEW_LINE>try {<NEW_LINE>zkc.create(lostBookieRecoveryDelayZnode, Integer.toString(lostBookieRecoveryDelay).getBytes(UTF_8), Ids.OPEN_ACL_UNSAFE, CreateMo... | .currentThread().interrupt(); |
455,306 | public MavenExecutionResult readMavenProject(File pomFile, ProjectBuildingRequest configuration) throws MavenException {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>log.debug("Reading Maven project: {}", pomFile.getAbsoluteFile());<NEW_LINE>MavenExecutionResult result = new Defaul... | setProject(projectBuildingResult.getProject()); |
1,752,838 | public APNSSandboxChannelRequest unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>APNSSandboxChannelRequest aPNSSandboxChannelRequest = new APNS... | ().unmarshall(context)); |
700,028 | protected Method rewriteMethod(final File classFile) throws InvocationTargetException {<NEW_LINE>Method m = null;<NEW_LINE>// now make a class out of the stream<NEW_LINE>try {<NEW_LINE>final SoftReference<Method> ref = templateMethodCache.get(classFile);<NEW_LINE>if (ref != null) {<NEW_LINE>m = ref.get();<NEW_LINE>if (... | params[1] = serverObjects.class; |
195,151 | final DescribeDBClustersResult executeDescribeDBClusters(DescribeDBClustersRequest describeDBClustersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDBClustersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,112,097 | public void execute(final Editor editor, DataContext dataContext) {<NEW_LINE>final Project project = DataManager.getInstance().getDataContext(editor.getComponent()).getData(CommonDataKeys.PROJECT);<NEW_LINE>if (!editor.isOneLineMode()) {<NEW_LINE>EditorSearchSession search = EditorSearchSession.get(editor);<NEW_LINE>if... | copyFrom(findManager.getFindInFileModel()); |
1,759,763 | private void changeMemberRefer(Element el, final MemberReferenceTree node, TreePath currentPath, final Element target) {<NEW_LINE>if (el.getModifiers().contains(Modifier.STATIC)) {<NEW_LINE><MASK><NEW_LINE>Tree newT = make.QualIdent(make.setLabel(make.QualIdent(target), target.getSimpleName()).toString());<NEW_LINE>rew... | Tree oldT = node.getQualifierExpression(); |
40,521 | public void onCreate(Bundle savedInstance) {<NEW_LINE>super.onCreate(savedInstance);<NEW_LINE>applyColorTheme("");<NEW_LINE>setContentView(R.layout.activity_login);<NEW_LINE>setupAppBar(R.id.toolbar, "Re-authenticate", true, true);<NEW_LINE>String[] scopes = { "identity", "modcontributors", "modconfig", "modothers", "m... | getTag(), "Auth URL: " + authorizationUrl); |
1,056,380 | final ModifyScheduledActionResult executeModifyScheduledAction(ModifyScheduledActionRequest modifyScheduledActionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyScheduledActionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
156,244 | public Set<Map.Entry<K, V>> entrySet() {<NEW_LINE>if (entrySet == null) {<NEW_LINE>entrySet = new AbstractSet<Map.Entry<K, V>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int size() {<NEW_LINE>return size;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void clear() {<NEW_LINE>TreeMap.this.clear();<NEW_LIN... | Entry<K, V>) object; |
93,843 | private static void readUserList(File file, Map<String, UserEntry> usersIndexByName, Map<X500Principal, UserEntry> x500LookupMap) throws IOException {<NEW_LINE>try (BufferedReader br = new BufferedReader(new FileReader(file))) {<NEW_LINE>String line;<NEW_LINE>while ((line = br.readLine()) != null) {<NEW_LINE>if (line.s... | .username = st.nextToken(); |
1,193,848 | final PeerVpcResult executePeerVpc(PeerVpcRequest peerVpcRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(peerVpcRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Reques... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,737,552 | private void addQueryEntries(Map<MethodSignature, CompletionItem> result, CompletionContext context, String prefix, String tail, int params, boolean prefixedMethod) {<NEW_LINE>// NOI18N<NEW_LINE>String returnType = "java.lang.Object";<NEW_LINE>if (FIND_ALL_BY_METHOD.equals(prefix)) {<NEW_LINE>// NOI18N<NEW_LINE>returnT... | , longParams, returnType, false)); |
812,603 | public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>OptionParser parser = new OptionParser();<NEW_LINE>ArgumentAcceptingOptionSpec<String> hardwareLayoutOpt = parser.accepts("hardwareLayout", "The path of the hardware layout file").withRequiredArg().describedAs("hardware_layout").ofType(String.class);<NEW_... | ).ofType(String.class); |
1,422,160 | public JsonObject toJson() {<NEW_LINE>if (src == null) {<NEW_LINE>JsonObject obj = new JsonObject();<NEW_LINE>obj.addProperty("sub", this.getSub());<NEW_LINE>obj.addProperty("name", this.getName());<NEW_LINE>obj.addProperty("preferred_username", this.getPreferredUsername());<NEW_LINE>obj.addProperty("given_name", this.... | getAddress().getPostalCode()); |
707,792 | protected AbstractBeanDefinition parseConsumer(Element element, ParserContext parserContext) {<NEW_LINE>Object source = parserContext.extractSource(element);<NEW_LINE>BeanComponentDefinition innerConsumerDefinition = IntegrationNamespaceUtils.parseInnerHandlerDefinition(element, parserContext);<NEW_LINE>String consumer... | isExpression = StringUtils.hasText(consumerExpressionString); |
1,800,039 | public boolean read_scope(ReadScopeParameter p_par) {<NEW_LINE>try {<NEW_LINE>// read the unit<NEW_LINE>Object next_token = p_par.scanner.next_token();<NEW_LINE>if (!(next_token instanceof String)) {<NEW_LINE>FRLogger.warn("Resolution.read_scope: string expected");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>p_par.unit ... | Integer) next_token).intValue(); |
607,079 | private void updatePartPruneSteps(Map<String, PartitionPruneStep> allPartPruneStepMap) {<NEW_LINE>List<String> logTbNameList = tableScan.getTableNames();<NEW_LINE>List<PartitionPruneStep> allPartPruneSteps = new ArrayList<>();<NEW_LINE>for (int i = 0; i < logTbNameList.size(); i++) {<NEW_LINE>String <MASK><NEW_LINE>Par... | tbName = logTbNameList.get(i); |
1,170,957 | public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new ViewExpressionBatchNewestEventOldestEvent());<NEW_LINE>execs.add(new ViewExpressionBatchLengthBatch());<NEW_LINE>execs.add(new ViewExpressionBatchTimeBatch());<NEW_LINE>... | .add(new ViewExpressionBatchNamedWindowDelete()); |
174,468 | private void checkRow(SessionLocal session, Row oldRow) {<NEW_LINE>SearchRow check = table.getRowFactory().createRow();<NEW_LINE>for (int i = 0, len = columns.length; i < len; i++) {<NEW_LINE>Column refCol = refColumns[i].column;<NEW_LINE>int refIdx = refCol.getColumnId();<NEW_LINE>Column col = columns[i].column;<NEW_L... | , getShortDescription(index, check)); |
1,312,694 | public Object makeUnderlying(Object[] propertyValues) {<NEW_LINE>Object outObject = beanInstantiator.instantiate();<NEW_LINE>if (!hasPrimitiveTypes) {<NEW_LINE>Object[] parameters = new Object[1];<NEW_LINE>for (int i = 0; i < writeMethodsReflection.length; i++) {<NEW_LINE>parameters<MASK><NEW_LINE>try {<NEW_LINE>writeM... | [0] = propertyValues[i]; |
689,177 | private I_C_Invoice_Candidate createCandidateForOrderLine(final I_C_OrderLine orderLine) {<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(orderLine);<NEW_LINE>final String trxName = InterfaceWrapperHelper.getTrxName(orderLine);<NEW_LINE>Check.assume(Env.getAD_Client_ID(ctx) == orderLine.getAD_Client_ID()... | ctx, I_C_Invoice_Candidate.class, trxName); |
597,768 | public void fetchSegmentToLocal(URI downloadURI, File dest) throws Exception {<NEW_LINE>// Create a RoundRobinURIProvider to round robin IP addresses when retry uploading. Otherwise may always try to<NEW_LINE>// download from a same broken host as: 1) DNS may not RR the IP addresses 2) OS cache the DNS resolution resul... | dest.length(), statusCode); |
1,614,824 | private static Library instantiateLibrary(@NonNull AtlasDependencyGraph.HashableResolvedArtifactResult artifact) {<NEW_LINE>Library library;<NEW_LINE>ComponentIdentifier id = artifact.getId().getComponentIdentifier();<NEW_LINE>String address = AtlasDependencyGraph.computeAddress(artifact);<NEW_LINE>if (!(id instanceof ... | (), getVariant(artifact)); |
1,087,194 | private void addReturnInsn(final InsnList il, final Type type) {<NEW_LINE>if (type.equals(Type.BOOLEAN_TYPE)) {<NEW_LINE>il.add(new InsnNode(Opcodes.IRETURN));<NEW_LINE>} else if (type.equals(Type.CHAR_TYPE)) {<NEW_LINE>il.add(new InsnNode(Opcodes.IRETURN));<NEW_LINE>} else if (type.equals(Type.BYTE_TYPE)) {<NEW_LINE>i... | new InsnNode(Opcodes.LRETURN)); |
1,502,980 | void newDNSServer(VpnService.Builder builder, String format, byte[] ipv6Template, InetAddress addr) throws UnknownHostException {<NEW_LINE>// Optimally we'd allow either one, but the forwarder checks if upstream size is empty, so<NEW_LINE>// we really need to acquire both an ipv6 and an ipv4 subnet.<NEW_LINE>if (addr i... | upstreamDnsServers.size() + 1); |
1,587,374 | public DefaultMutableTreeNode parent(MPPProductBOM bom) {<NEW_LINE>log.fine("Parent:" + bom.getName());<NEW_LINE>MProduct product = MProduct.get(Env.getCtx(), bom.getM_Product_ID());<NEW_LINE>// vparent.setValue(m_product_id);<NEW_LINE>String data = Msg.translate(Env.getCtx(), "PP_Product_BOM_ID") + " " + Msg.translate... | BigDecimal) bomline.getQtyBatch()); |
1,115,807 | public ICompilationUnit handleChanged(DidChangeTextDocumentParams params) {<NEW_LINE>String uri = params.getTextDocument().getUri();<NEW_LINE>ICompilationUnit unit = JDTUtils.resolveCompilationUnit(uri);<NEW_LINE>if (unit == null || !unit.isWorkingCopy() || params.getContentChanges().isEmpty() || unit.getResource().isD... | ), start.getCharacter()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.