idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
99,819 | public Object evaluate(EditorAdaptor vim, Queue<String> command) throws CommandExecutionException {<NEW_LINE>LocalConfiguration configuration = vim.getConfiguration();<NEW_LINE>String hlScope = <MASK><NEW_LINE>if (hlScope.equals(SEARCH_HL_SCOPE_CLEAR)) {<NEW_LINE>// Every other editor must be cleared of highlighting.<N... | configuration.get(Options.SEARCH_HL_SCOPE); |
1,041,429 | private static void tryAssertionTimeWinUnique(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "theString" };<NEW_LINE>env.advanceTime(1000);<NEW_LINE>sendEvent(env, "E1", 1);<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, toArr("E1"));<NEW_LINE>env.assertPropsNew("s0", fields, <MASK... | new Object[] { "E1" }); |
1,157,622 | public V next() {<NEW_LINE>if (!iter.hasNext()) {<NEW_LINE>if (group != null) {<NEW_LINE>Group current = group;<NEW_LINE>group = null;<NEW_LINE>return transform(current);<NEW_LINE>} else {<NEW_LINE>throw new NoSuchElementException();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>// This type is manda... | = new GroupImpl(groupExpressions, maps); |
325,010 | final CreateUserProfileResult executeCreateUserProfile(CreateUserProfileRequest createUserProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createUserProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | invoke(request, responseHandler, executionContext); |
1,111,592 | public void translateTag(NbtMapBuilder builder, CompoundTag tag, int blockState) {<NEW_LINE>if (tag == null || tag.size() < 5) {<NEW_LINE>// These values aren't here<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Java infers from the block state, but Bedrock needs it in the tag<NEW_LINE>builder.put("conditionalMode", BlockSta... | "powered")).getValue()); |
689,948 | public boolean saveLogFile() {<NEW_LINE>File outputDir = null;<NEW_LINE>SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd-HHmmss");<NEW_LINE>Date now = new Date();<NEW_LINE>String logFileName = "deltachat-log-" + dateFormat.format(now) + ".txt";<NEW_LINE>try {<NEW_LINE>outputDir = <MASK><NEW_LINE>String logT... | Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); |
1,623,777 | public void createMenuItems(Bundle savedInstanceState) {<NEW_LINE>app = requiredMyApplication();<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>folderName = savedInstanceState.getString(FOLDER_NAME_KEY);<NEW_LINE>}<NEW_LINE>items.add(new TitleItem(getString(R.string.add_new_folder)));<NEW_LINE>View view = UiUtilit... | ColorUtilities.getColorWithAlpha(textBoxBgColor, 0.1f); |
345,790 | public org.apache.dubbo.remoting.RemotingServer bind(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException {<NEW_LINE>if (arg0 == null)<NEW_LINE>throw new IllegalArgumentException("url == null");<NEW_LINE>org.apache.dubbo.common.URL url = arg... | dubbo.remoting.Transporter.class); |
162,636 | private // <editor-fold desc="actions OK/APPLY/CANCEL, dirty "><NEW_LINE>void actionPerformedUpdates(Window _parent) {<NEW_LINE>boolean tempDirty = isDirty();<NEW_LINE>if (paneNaming.isDirty()) {<NEW_LINE>String filename = paneNaming.getAbsolutePath();<NEW_LINE>if (filename.contains("%")) {<NEW_LINE>Debug.error("%s\n%... | filename.replace("%", "_"); |
1,431,773 | public void sawOpcode(int seen) {<NEW_LINE>if (state == SEEN_NOTHING) {<NEW_LINE>if ((seen == Const.DCONST_0) || (seen == Const.DCONST_1)) {<NEW_LINE>constValue = seen - Const.DCONST_0;<NEW_LINE>state = SEEN_DCONST;<NEW_LINE>} else if ((seen == Const.LDC2_W) || (seen == Const.LDC_W)) {<NEW_LINE>state = SEEN_DCONST;<NEW... | ConstantFloat) c).getBytes(); |
497,941 | final CreateGroupMembershipResult executeCreateGroupMembership(CreateGroupMembershipRequest createGroupMembershipRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createGroupMembershipRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | invoke(request, responseHandler, executionContext); |
735,559 | private String receiveUpdateFromCentral() throws Exception {<NEW_LINE>ProcessInfo pi = getProcessInfo();<NEW_LINE>RemoteUpdateVO data = (RemoteUpdateVO) pi.getSerializableObject();<NEW_LINE>log.info(<MASK><NEW_LINE>//<NEW_LINE>RowSet sourceRS = data.CentralData;<NEW_LINE>if (sourceRS == null) {<NEW_LINE>log.log(Level.S... | "receiveUpdateFromCentral Start (" + pi + ") - " + data); |
1,007,560 | private Map<TransactionTO, TransactionRemoteFile> retrieveRemoteTransactions() throws StorageException {<NEW_LINE>Map<String, TransactionRemoteFile> <MASK><NEW_LINE>Map<TransactionTO, TransactionRemoteFile> transactions = new HashMap<TransactionTO, TransactionRemoteFile>();<NEW_LINE>for (TransactionRemoteFile transacti... | transactionFiles = list(TransactionRemoteFile.class); |
1,208,798 | private void initInternalLibraryPath() {<NEW_LINE>try {<NEW_LINE>final Bundle bundle = Platform.getBundle(BuiltInModuleHelper.BUNDLE_ID);<NEW_LINE>Enumeration<URL> installedInternalModules = bundle.findEntries(BuiltInModuleHelper.STANDARD_MODULES_PATH, BuiltInModuleHelper.STANDARD_MODULES, true);<NEW_LINE>if (installed... | resolve(library).getPath(); |
970,965 | public boolean containsValue(@CheckForNull Object value) {<NEW_LINE>// does not impact recency ordering<NEW_LINE>if (value == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// This implementation is patterned after ConcurrentHashMap, but without the locking. The only<NEW_LINE>// way for it to return a false negativ... | >[] segments = this.segments; |
1,179,362 | public static void main(String[] args) {<NEW_LINE>MediaManager media = DefaultMediaManager.INSTANCE;<NEW_LINE>// String fileName0 = UtilIO.pathExample("denseflow/dogdance07.png");<NEW_LINE>// String fileName1 = UtilIO.pathExample("denseflow/dogdance08.png");<NEW_LINE>String fileName0 = UtilIO.pathExample("denseflow/Urb... | convertTo(previous, converted0, true); |
683,821 | public final void executeCallout(final IAttributeValueContext attributeValueContext, final IAttributeSet attributeSet, final I_M_Attribute attribute, final Object valueOld, final Object valueNew) {<NEW_LINE>// Get the M_Attribute from storage (to make sure we are using the same instance of it)<NEW_LINE>final I_M_Attrib... | getAttributeByIdIfExists(attribute.getM_Attribute_ID()); |
1,126,426 | public static void addModule(final AbstractSQLProvider provider, final INaviAddressSpace addressSpace, final INaviModule module) throws CouldntSaveDataException {<NEW_LINE>checkArguments(provider, addressSpace);<NEW_LINE>Preconditions.checkNotNull(module, "IE01859: Module argument can not be null");<NEW_LINE>Preconditi... | ).getName(), moduleId); |
150,938 | private String _buildPramatiXMLWebModule(String path) throws DocumentException, IOException {<NEW_LINE>String contextRoot = path.substring(2, path.length() - 4);<NEW_LINE>String filePath = path + "/docroot/WEB-INF/web.xml";<NEW_LINE>if (path.endsWith("-complete")) {<NEW_LINE>contextRoot = "/";<NEW_LINE>filePath = path.... | (Element) itr.next(); |
881,023 | private static void write_package_keepout(app.freerouting.library.Package.Keepout p_keepout, WriteScopeParameter p_par, boolean p_is_via_keepout) throws java.io.IOException {<NEW_LINE>Layer keepout_layer;<NEW_LINE>if (p_keepout.layer >= 0) {<NEW_LINE>app.freerouting.board.Layer board_layer = p_par.board.layer_structure... | freerouting.geometry.planar.Shape boundary_shape; |
38,152 | @ResourceFilters(DatasourceResourceFilter.class)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>public Response killUnusedSegmentsInInterval(@PathParam("dataSourceName") final String dataSourceName, @PathParam("interval") final String interval) {<NEW_LINE>if (indexingServiceClient == null) {<NEW_LINE>return Re... | .replace('_', '/')); |
1,265,176 | private byte[] sendAndReceive(final String address, final byte[] key, final byte[] ivspec, final byte[] data) {<NEW_LINE>final int timeoutMilliseconds = Long.valueOf(TimeUnit.SECONDS.toMillis(Settings.LicenseValidationTimeout.getValue(10))).intValue();<NEW_LINE>final int retries = 3;<NEW_LINE>// try to connect to the l... | read(result, 0, 256); |
6,542 | protected static void recover(MultiScopeRecoveryLog recoveryLog, ReadableLogRecord record, LogHandle logHandle, int storageMode, Lock controlLock) throws LogCorruptedException, InternalLogException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "recover", recoveryLog, record, logHandle, storageMode, controlL... | logHandle, storageMode, controlLock, record); |
519,292 | public void marshall(ImportFileTaskInformation importFileTaskInformation, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (importFileTaskInformation == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(importFil... | importFileTaskInformation.getStartTime(), STARTTIME_BINDING); |
495,173 | public void onException(TcpChannel channel, Exception e) {<NEW_LINE>if (!lifecycle.started()) {<NEW_LINE>// just close and ignore - we are already stopped and just need to make sure we release all resources<NEW_LINE>CloseableChannel.closeChannel(channel);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (isCloseConnectionExcept... | ("exception caught on transport layer [{}], closing connection", channel), e); |
860,956 | public void showErrorOutput(UnhandledError err) {<NEW_LINE>hasErrors_ = true;<NEW_LINE>// if there's only one error frame, it's not worth showing dedicated<NEW_LINE>// error UX<NEW_LINE>if (err.getErrorFrames() != null && err.getErrorFrames().length() < 2) {<NEW_LINE>flushQueuedErrors();<NEW_LINE>return;<NEW_LINE>}<NEW... | autoExpandErrorTracebacks().getValue()); |
1,163,934 | private void loadParams(String tenantId) throws URISyntaxException {<NEW_LINE>long startTimeMillis = System.currentTimeMillis();<NEW_LINE>if (Utils.isBlank(API_GATEWAY_HOST)) {<NEW_LINE>throw new IllegalStateException("Missing required environment variable API_GATEWAY_HOST");<NEW_LINE>}<NEW_LINE>if (Utils.isBlank(API_G... | method("GET").build(); |
948,280 | public void marshall(FeatureSummary featureSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (featureSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(featureSummary.getArn(), ARN_BINDING);<NEW... | featureSummary.getLastUpdatedTime(), LASTUPDATEDTIME_BINDING); |
89,546 | private static FilterResult filterFiles(FileSystem fileSystem, List<ResourceId> srcResourceIds, List<ResourceId> destResourceIds, MoveOptions... moveOptions) throws IOException {<NEW_LINE>FilterResult result = new FilterResult();<NEW_LINE>if (moveOptions.length == 0 || srcResourceIds.isEmpty()) {<NEW_LINE>// Nothing wi... | (destResourceIds.get(i)); |
775,010 | public void handle(PrimaryStorageInventory inv, NfsRebaseVolumeBackingFileMsg msg, ReturnValueCompletion<NfsRebaseVolumeBackingFileReply> completion) {<NEW_LINE>NfsRebaseVolumeBackingFileCmd cmd = new NfsRebaseVolumeBackingFileCmd();<NEW_LINE>cmd.srcPsMountPath = Q.New(PrimaryStorageVO.class).select(PrimaryStorageVO_.m... | "failed to rebase backing file for qcow2 files in " + msg.getDstVolumeFolderPath()); |
1,157,030 | public CodegenExpression makeCodegen(CodegenClassScope classScope, CodegenMethodScope parent, SAIFFInitializeSymbolWEventType symbols) {<NEW_LINE>CodegenMethod method = parent.makeChild(FilterSpecParam.EPTYPE, FilterSpecParamConstantForge.class, classScope);<NEW_LINE>method.getBlock().declareVar(ExprFilterSpecLookupabl... | getBlock().methodReturn(inner); |
296,489 | public SinglePassSamProgram makeInstance(final String outbase, final String outext, final File input, final File reference, final Set<MetricAccumulationLevel> metricAccumulationLevel, final File dbSnp, final File intervals, final File refflat, final Set<String> ignoreSequence) {<NEW_LINE>final MeanQualityByCycle progra... | = new File(outbase + PDF_EXTENSION); |
1,231,278 | private static boolean registerServerInstanceFO(FileObject serverInstanceDir, String url, String displayName, File payaraRoot, File java7orLaterExecutable) {<NEW_LINE>String name = FileUtil.findFreeFileName(serverInstanceDir, PayaraInstanceProvider.PAYARA_AUTOREGISTERED_INSTANCE, null);<NEW_LINE>FileObject instanceFO;<... | instanceFO = serverInstanceDir.createData(name); |
389,113 | public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String virtualHubName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Par... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,417,176 | public void commit(Xid xid, boolean onePhase) throws XAException {<NEW_LINE>if (currentXid != null) {<NEW_LINE>throw new EhcacheXAException("Cannot commit a non-ended start on : " + xid, XAException.XAER_PROTO);<NEW_LINE>}<NEW_LINE>TransactionId transactionId = new TransactionId(xid);<NEW_LINE>XATransactionContext<K, V... | "Cannot commit unknown XID : " + xid, XAException.XAER_NOTA); |
760,373 | public UpdateIndexingConfigurationResult updateIndexingConfiguration(UpdateIndexingConfigurationRequest updateIndexingConfigurationRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateIndexingConfigurationRequest);<NEW_LINE>AWSRequestM... | new JsonResponseHandler<UpdateIndexingConfigurationResult>(unmarshaller); |
297,464 | public HeatMap readHeatMap(final MetricsCondition condition, final String valueColumnName, final Duration duration) throws IOException {<NEW_LINE>final List<PointOfTime> pointOfTimes = duration.assembleDurationPoints();<NEW_LINE>final List<String> ids = new ArrayList<>(pointOfTimes.size());<NEW_LINE>pointOfTimes.forEac... | series = client.queryForSingleSeries(query); |
1,188,910 | public void addMockResponseToTestCase(WsdlMockResponse mockResponse, WsdlTestCase testCase, int index) {<NEW_LINE>if (mockResponse.getMockOperation().getOperation() == null) {<NEW_LINE>UISupport.showErrorMessage("Missing operation for this mock response");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>WsdlMockService mockServic... | .insertTestStep(config, -1); |
1,194,345 | public ServiceCombServer chooseServer(Invocation invocation) {<NEW_LINE>List<ServiceCombServer> servers = invocation.getLocalContext(LoadbalanceHandler.CONTEXT_KEY_SERVER_LIST);<NEW_LINE>int serversCount = servers.size();<NEW_LINE>for (ServerListFilterExt filterExt : filters) {<NEW_LINE>if (!filterExt.enabled()) {<NEW_... | getInstance().getInstanceId()); |
413,695 | protected void addSignatureSpecConventions(SignatureSpec spec) {<NEW_LINE>if (!(spec instanceof IConventionAware)) {<NEW_LINE>throw new InvalidUserDataException("Cannot add conventions to signature spec \'" + String.valueOf(spec) + "\' as it is not convention aware");<NEW_LINE>}<NEW_LINE>ConventionMapping conventionMap... | IConventionAware) spec).getConventionMapping(); |
1,411,997 | public int compareTo(TDirectBuffer 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.valueOf(isSetDirectCount()).compareTo(other.isSetDirectCoun... | this.mappedCount, other.mappedCount); |
219,493 | private void displayServicesStatus() {<NEW_LINE>tbServicesStatusMessage.setText(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.tbServicesStatusMessage.Message", statusByService.get(ServicesMonitor.Service.REMOTE_CASE_DATABASE.toString()), statusByService.get(ServicesMonitor.Service.REMOTE_KEYWORD_S... | tbServicesStatusMessage.setForeground(Color.BLACK); |
547,420 | public static ListBarcodesResponse unmarshall(ListBarcodesResponse listBarcodesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listBarcodesResponse.setRequestId(_ctx.stringValue("ListBarcodesResponse.RequestId"));<NEW_LINE>listBarcodesResponse.setPageSize(_ctx.integerValue("ListBarcodesResponse.PageSize"));<NEW_LINE>lis... | ("ListBarcodesResponse.Barcodes[" + i + "].StyleId")); |
612,938 | public com.amazonaws.services.simpleemailv2.model.ConflictException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.simpleemailv2.model.ConflictException conflictException = new com.amazonaws.services.simpleemailv2.model.ConflictException(null);<NEW_LINE>int ori... | String currentParentElement = context.getCurrentParentElement(); |
30,272 | private void sumValues(List<MatchingDocs> matchingDocs, boolean keepScores, DoubleValuesSource valueSource) throws IOException {<NEW_LINE>for (MatchingDocs hits : matchingDocs) {<NEW_LINE>SortedNumericDocValues ordinalValues = DocValues.getSortedNumeric(hits.<MASK><NEW_LINE>DoubleValues scores = keepScores ? scores(hit... | context.reader(), indexFieldName); |
1,311,931 | private void handleNamedEvent(FacesConfigImpl facesConfig, Set<Class<?>> classes) {<NEW_LINE>for (Class<?> clazz : classes) {<NEW_LINE>NamedEvent namedEvent = (NamedEvent) clazz.getAnnotation(NamedEvent.class);<NEW_LINE>if (namedEvent != null) {<NEW_LINE>// Can only apply @NamedEvent to ComponentSystemEvent subclasses.... | .digester.elements.NamedEventImpl(); |
753,768 | public static boolean testAnswer(final String password, final String hashedPassword, final AppConfig appConfig) {<NEW_LINE>final char[] pwCharArray = password.toLowerCase().toCharArray();<NEW_LINE>final boolean bsdCryptPass = OpenBSDBCrypt.checkPassword(hashedPassword, pwCharArray);<NEW_LINE>if (!bsdCryptPass) {<NEW_LI... | JBCrypt.checkpw(password, hashedPassword); |
1,482,582 | public ProgramNode cloneBranch(final EncogProgram targetProgram, final ProgramNode sourceBranch) {<NEW_LINE>if (sourceBranch == null) {<NEW_LINE>throw new EncogError("Can't clone null branch.");<NEW_LINE>}<NEW_LINE>final String name = sourceBranch.getName();<NEW_LINE>// create any subnodes<NEW_LINE>final ProgramNode[] ... | getChildNodes().size()]; |
568,939 | private void init(Context context) {<NEW_LINE>Resources resources = context.getResources();<NEW_LINE>mInflater = LayoutInflater.from(context);<NEW_LINE>mLayoutManager = new LinearLayoutManager(context);<NEW_LINE>mAdapter = new SearchAdapter();<NEW_LINE>setLayoutManager(mLayoutManager);<NEW_LINE>setAdapter(mAdapter);<NE... | mEnableAdvanceSwitch.setOnCheckedChangeListener(SearchLayout.this); |
144,840 | public void start() {<NEW_LINE>logger.info("[{}] pulsar sink starting...", getName());<NEW_LINE>// register metrics<NEW_LINE>this.dimensions = new HashMap<>();<NEW_LINE>this.dimensions.put(DataProxyMetricItem.KEY_CLUSTER_ID, "DataProxy");<NEW_LINE>this.dimensions.put(DataProxyMetricItem.KEY_SINK_ID, this.getName());<NE... | badEventQueueSize / sinkThreadPoolSize, i, true); |
1,225,816 | private void fireChanged() {<NEW_LINE>List<String> savedCategories = loadCategories();<NEW_LINE>ListModel model = lUseIn.getModel();<NEW_LINE>List<String> currentCategories = new ArrayList<String>(model.getSize());<NEW_LINE>for (int i = 0; i < model.getSize(); i++) {<NEW_LINE>currentCategories.add((String) model.getEle... | |= !savedLocales.equals(currentLocales); |
1,161,092 | public void testMultipleMultiArgConstructors(HttpServletRequest req, HttpServletResponse resp) throws Exception {<NEW_LINE>Response response = target(req, "MultiMultiArgCtor").queryParam("a", "b").request().get();<NEW_LINE>assertEquals(200, response.getStatus());<NEW_LINE>assertEquals("MultiMultiArgCtor 3", response.re... | 200, response.getStatus()); |
97,140 | public void updateConnectedControllers() {<NEW_LINE>logger.config("Updating connected controllers.");<NEW_LINE>if (environment != null) {<NEW_LINE>controllerCount = 0;<NEW_LINE>for (int i = 0; i < VR.k_unMaxTrackedDeviceCount; i++) {<NEW_LINE>int <MASK><NEW_LINE>if (classCallback == VR.ETrackedDeviceClass_TrackedDevice... | classCallback = VRSystem.VRSystem_GetTrackedDeviceClass(i); |
1,200,739 | public void evaluateObservationNoise(double minPixelError, double maxPixelError, int N, boolean isPlanar) {<NEW_LINE>System.out.println("------------------------");<NEW_LINE>rand = new Random(234);<NEW_LINE>for (int i = 0; i <= N; i++) {<NEW_LINE>double mag = (maxPixelError - minPixelError) * i / N + minPixelError;<NEW... | Vector3D_F64 foundTran = found.getT(); |
1,462,812 | public static List<AlgorithmInstance> load(Path file, String name, ClassLoader classLoader) {<NEW_LINE>ConfigurationLoader loader = new ConfigurationLoader(classLoader);<NEW_LINE>AlgorithmInstanceBuilder aib = new AlgorithmInstanceBuilder(name);<NEW_LINE>if (name == null) {<NEW_LINE>aib.setName(file.getFileName().toStr... | loadScript(file.toFile()); |
275,627 | @Consumes(APPLICATION_JSON)<NEW_LINE>@Produces(APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Update a bucket state", notes = "Can only close a bucket which is not in DRAFT state", response = Bucket.class)<NEW_LINE>@Timed<NEW_LINE>public Response putBucketState(@PathParam("experimentID") @ApiParam(value = "Experimen... | userName = authorization.getUser(authorizationHeader); |
375,008 | final UpdateSipMediaApplicationCallResult executeUpdateSipMediaApplicationCall(UpdateSipMediaApplicationCallRequest updateSipMediaApplicationCallRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateSipMediaApplicationCallRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
814,708 | protected // e.g. 'a[1] = 2 #=> 2' or 'a[1] = 1,2,3 #=> [1,2,3]'<NEW_LINE>Operand buildAttrAssignCallArgs(List<Operand> argsList, Node args, boolean containsAssignment) {<NEW_LINE>if (args == null)<NEW_LINE>return manager.getNil();<NEW_LINE>switch(args.getNodeType()) {<NEW_LINE>case ARRAYNODE:<NEW_LINE>{<NEW_LINE>// a[... | Operand last = manager.getNil(); |
698,736 | private static MatchResult tryTreeMatches(TryTree tryTree, VisitorState state) {<NEW_LINE>BlockTree tryBlock = tryTree.getBlock();<NEW_LINE>List<? extends StatementTree> statements = tryBlock.getStatements();<NEW_LINE>if (statements.isEmpty()) {<NEW_LINE>return doesNotMatch();<NEW_LINE>}<NEW_LINE>// Check if any of the... | catchTree = catches.get(0); |
1,528,201 | public static byte[] readBytes(@This File thiz) {<NEW_LINE>try (FileInputStream input = new FileInputStream(thiz)) {<NEW_LINE>int offset = 0;<NEW_LINE>long remaining = thiz.length();<NEW_LINE>if (remaining > Integer.MAX_VALUE) {<NEW_LINE>throw new OutOfMemoryError("File " + thiz + " is too big (" + remaining + " bytes)... | 0, copy, 0, offset); |
1,304,009 | public Future<IHAReadResponse> readFromDisk(final IHAReadRequest msg) {<NEW_LINE>final long token = msg.getQuorumToken();<NEW_LINE>// final UUID storeId = msg.getStoreUUID();<NEW_LINE>final <MASK><NEW_LINE>if (haLog.isInfoEnabled())<NEW_LINE>haLog.info("token=" + token + ", addr=" + addr);<NEW_LINE>final FutureTask<IHA... | long addr = msg.getAddr(); |
723,689 | public Map<String, DocumentField> flattenDocumentField(final String[] fieldFilter, final String path, final Object node, Map<String, DocumentField> flatFields) {<NEW_LINE>if ((node instanceof List) || (node instanceof Set)) {<NEW_LINE>for (Object o : ((Collection) node)) {<NEW_LINE>flattenDocumentField(<MASK><NEW_LINE>... | fieldFilter, path, o, flatFields); |
1,544,287 | private void initMethodHandles() throws ClassNotFoundException, NoSuchMethodException, SecurityException {<NEW_LINE>Class<?> androidInputDeviceRegistry = getApplicationClassLoader().loadClass("com.sun.glass.ui.monocle.AndroidInputDeviceRegistry");<NEW_LINE>Method registerDevice = androidInputDeviceRegistry.getMethod("r... | Log.v(TAG, "We have JavaFX on our current (base) classpath, registered exit listener"); |
1,442,477 | public void refresh() {<NEW_LINE>if (hideCloudCliServices.getValue()) {<NEW_LINE>cloudCliServices.getValue().forEach(bde -> bde.dispose());<NEW_LINE>cloudCliServices.replaceAll(Collections.emptySet());<NEW_LINE>buttons.replaceAll(Collections.emptySet());<NEW_LINE>} else {<NEW_LINE>new Job("Loading local cloud services"... | bde -> bde.dispose()); |
392,805 | public short parseFile(File f) throws Exception {<NEW_LINE>String filename = f.getAbsolutePath();<NEW_LINE>String classname = filename.substring(this.basedir.length() + 1).replaceAll("/", ".");<NEW_LINE>classname = classname.substring(0, classname.length() - 5);<NEW_LINE>BufferedReader in = new BufferedReader(new FileR... | .points.get(number)); |
1,779,267 | public ListenerResult listen(WorkflowContext context) throws WorkflowListenerException {<NEW_LINE>ApplyGroupProcessForm form = (ApplyGroupProcessForm) context.getProcessForm();<NEW_LINE>String groupId = form.getInlongGroupId();<NEW_LINE><MASK><NEW_LINE>// only the [TO_BE_APPROVAL] status allowed the rejecting operation... | log.info("begin to execute RejectApplyProcessListener for groupId={}", groupId); |
335,905 | private static void processAnnotationInfoType(AnnotationInfoType ait, String indent, StringBuilder sb) {<NEW_LINE>final String type = ait.getType();<NEW_LINE>sb.append(indent).append("@").append(type);<NEW_LINE>final List<AnnotationValueType> avtList = ait.getAnnoKeyVal();<NEW_LINE>if (avtList.size() > 0) {<NEW_LINE>sb... | AnnotationInfoType ait2 = avt.getAnnotation(); |
1,071,237 | public Request<CreateReservedInstancesListingRequest> marshall(CreateReservedInstancesListingRequest createReservedInstancesListingRequest) {<NEW_LINE>if (createReservedInstancesListingRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<Cr... | (createReservedInstancesListingRequest.getClientToken())); |
1,194,569 | public int write(Tablet tablet) throws WriteProcessException {<NEW_LINE>int maxPointCount = 0, pointCount;<NEW_LINE>List<MeasurementSchema> timeseries = tablet.getSchemas();<NEW_LINE>for (int column = 0; column < timeseries.size(); column++) {<NEW_LINE>String measurementId = timeseries.get(column).getMeasurementId();<N... | get(column).getType(); |
217,743 | public void marshall(AutoScalingConfiguration autoScalingConfiguration, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (autoScalingConfiguration == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(autoScalingC... | autoScalingConfiguration.getMaxConcurrency(), MAXCONCURRENCY_BINDING); |
1,628,333 | private static void verifyVrrpGroups(Configuration c, Warnings w) {<NEW_LINE>for (Interface i : c.getAllInterfaces().values()) {<NEW_LINE>boolean modified = false;<NEW_LINE>ImmutableSortedMap.Builder<Integer, VrrpGroup> groupsBuilder = ImmutableSortedMap.naturalOrder();<NEW_LINE>for (Entry<Integer, VrrpGroup> vrrpGroup... | ()).build()); |
717,785 | public void processSelection(@NonNull final WindowId windowId, @NonNull final Document document, @NonNull final String bpartnerFieldName, @NonNull final String selectionIdStr) {<NEW_LINE>final SqlViewKeyColumnNamesMap keyColumnNamesMap = sqlViewFactory.getKeyColumnNamesMap(windowId);<NEW_LINE>final SqlComposedKey compo... | .class).orElse(null); |
1,069,092 | public com.amazonaws.services.workmail.model.MailDomainNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.workmail.model.MailDomainNotFoundException mailDomainNotFoundException = new com.amazonaws.services.workmail.model.MailDomainNotFoundExceptio... | String currentParentElement = context.getCurrentParentElement(); |
166,495 | // fill emitted num to nodes<NEW_LINE>private static void fillValue2Node(List<MetricInfo> componentMetrics, Map<String, TopologyNode> nodes) {<NEW_LINE>String NODE_DIM = MetricDef.EMMITTED_NUM;<NEW_LINE>List<String> FILTER = Arrays.asList(MetricDef.EMMITTED_NUM, MetricDef.SEND_TPS, MetricDef.RECV_TPS);<NEW_LINE>for (Me... | setValue(snapshot.get_longValue()); |
319,622 | public Pair<INDArray, MaskState> feedForwardMaskArray(INDArray maskArray, MaskState currentMaskState, int minibatchSize) {<NEW_LINE>if (maskArray == null || maskArray.rank() == 2)<NEW_LINE>return new <MASK><NEW_LINE>if (maskArray.rank() != 4 || maskArray.size(2) != 1 || maskArray.size(3) != 1) {<NEW_LINE>throw new Unsu... | Pair<>(maskArray, currentMaskState); |
132,876 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// authentication with an API key or named user is required to access basemaps and other<NEW_LINE>// location services<NEW_LINE>ArcGISRuntimeEnvironment.setApiKey(B... | getOperationalLayers().add(gironaMeshLayer); |
842,994 | /*<NEW_LINE>* Load the given resource bundle using the specified class loader.<NEW_LINE>*/<NEW_LINE>static void load(final String bundleName, Class<?> clazz) {<NEW_LINE>final Field[] fieldArray = clazz.getDeclaredFields();<NEW_LINE><MASK><NEW_LINE>boolean isAccessible = (clazz.getModifiers() & Modifier.PUBLIC) != 0;<NE... | ClassLoader loader = clazz.getClassLoader(); |
1,295,624 | private Object toJsonValue_PrettyValues(@Nullable final Object value, @NonNull final KPIJsonOptions jsonOpts) {<NEW_LINE>if (value == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (valueType == KPIFieldValueType.Date) {<NEW_LINE>if (value instanceof String) {<NEW_LINE>final Date date = TimeUtil.as... | (DateTimeConverters.fromObjectToZonedDateTime(value)); |
349,438 | final ListAppInstanceAdminsResult executeListAppInstanceAdmins(ListAppInstanceAdminsRequest listAppInstanceAdminsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAppInstanceAdminsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
408,634 | private Set<Class<?>> doGetClasses() {<NEW_LINE>String packages = servletContext.getInitParameter(OryxApplication.class.getName() + ".packages");<NEW_LINE><MASK><NEW_LINE>Objects.requireNonNull(packages);<NEW_LINE>Set<Class<?>> classes = new HashSet<>();<NEW_LINE>for (String thePackage : packages.split(",")) {<NEW_LINE... | log.info("Creating JAX-RS from endpoints in package(s) {}", packages); |
1,561,918 | public static void vertical3(Kernel1D_S32 kernel, GrayU8 input, GrayI16 output, int skip) {<NEW_LINE>final byte[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int <MASK><NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int radius = kern... | k2 = kernel.data[1]; |
484,981 | protected Answer execute(final CreateIpAliasCommand cmd) {<NEW_LINE>if (s_logger.isInfoEnabled()) {<NEW_LINE>s_logger.info("Executing createIpAlias command: " + s_gson.toJson(cmd));<NEW_LINE>}<NEW_LINE>cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);<NEW_LINE>final List<IpAliasTO> ipAliasTOs = cmd.getIpAliasList()... | append(ipaliasto.getAlias_count()); |
441,488 | void refresh(TruffleHeapHistogram histogram) {<NEW_LINE>if (histogram == null || isPaused())<NEW_LINE>return;<NEW_LINE>forceRefresh = false;<NEW_LINE>boolean diff = lrDeltasButton.isSelected();<NEW_LINE>if (diff) {<NEW_LINE>if (baseClasses == null) {<NEW_LINE>baseClasses = new ArrayList(classes);<NEW_LINE>baseTotalByte... | [3].setMaxValue(totalAllocInstances); |
1,342,294 | public static IRubyObject name_list(ThreadContext context, IRubyObject recv) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>EncodingService service = runtime.getEncodingService();<NEW_LINE>RubyArray result = runtime.newArray(service.getEncodings().size() + service.<MASK><NEW_LINE>HashEntryIterator i;<NEW_LINE>i = ... | getAliases().size()); |
472,463 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>com.google... | writeString(output, 5, apiVersion_); |
270,183 | protected String doIt() {<NEW_LINE>if (p_C_Print_Job_ID <= 0) {<NEW_LINE>throw new FillMandatoryException(I_C_Print_Job.COLUMNNAME_C_Print_Job_ID);<NEW_LINE>}<NEW_LINE>if (p_SeqNo_From <= 0) {<NEW_LINE>p_SeqNo_From = IPrintingDAO.SEQNO_First;<NEW_LINE>}<NEW_LINE>if (p_SeqNo_To <= 0) {<NEW_LINE>p_SeqNo_To = IPrintingDAO... | I_C_Print_Job.class, get_TrxName()); |
1,554,249 | private synchronized void writeInstanceToFile(String url, String username, String password, String serverName) throws IOException {<NEW_LINE>if (url == null) {<NEW_LINE>Logger.getLogger("global").log(Level.SEVERE, NbBundle.getMessage(ServerRegistry.class, "MSG_NullUrl"));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FileObject... | instanceFO = dir.createData(name); |
440,391 | public void run() {<NEW_LINE>if (G.isProfileMigrated()) {<NEW_LINE>ProfileData data = ProfileHelper.getProfileByName(profileName);<NEW_LINE>G.setProfile(true, data.getIdentifier());<NEW_LINE>} else {<NEW_LINE>G.setProfile(true, profileName);<NEW_LINE>}<NEW_LINE>Api.applySavedIptablesRules(context, true, new RootCommand... | ()), getApplicationContext()); |
1,786,392 | /*<NEW_LINE>* @see com.sitewhere.grpc.service.AssetManagementGrpc.AssetManagementImplBase#<NEW_LINE>* deleteAssetType(com.sitewhere.grpc.service.GDeleteAssetTypeRequest,<NEW_LINE>* io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void deleteAssetType(GDeleteAssetTypeRequest request, StreamObs... | onNext(response.build()); |
1,139,979 | public ListRoomMembershipsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListRoomMembershipsResult listRoomMembershipsResult = new ListRoomMembershipsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | class).unmarshall(context)); |
1,679,280 | public static Color decodeHtmlColorString(String colorString) {<NEW_LINE>colorString = colorString.replaceAll("[#;\\s]", "");<NEW_LINE>int red, green, blue;<NEW_LINE>switch(colorString.length()) {<NEW_LINE>case 6:<NEW_LINE>red = Integer.parseInt(colorString.substring(0, 2), 16);<NEW_LINE>green = Integer.parseInt(colorS... | (2, 4), 16); |
63,936 | protected void addMenuItems(Menu menu, Activity activity) {<NEW_LINE>boolean isTablet = AstridPreferences.useTabletLayout(activity);<NEW_LINE>TaskListActivity tla = null;<NEW_LINE>if (activity instanceof TaskListActivity) {<NEW_LINE>tla = (TaskListActivity) activity;<NEW_LINE>tla.getMainMenuPopover().clear();<NEW_LINE>... | = new Intent(AstridApiConstants.ACTION_TASK_LIST_MENU); |
957,922 | public void start(OperationOrder operationOrder) throws AxelorException {<NEW_LINE>if (operationOrder.getStatusSelect() != OperationOrderRepository.STATUS_IN_PROGRESS) {<NEW_LINE>operationOrder.setStatusSelect(OperationOrderRepository.STATUS_IN_PROGRESS);<NEW_LINE>operationOrder.setRealStartDateT(appProductionService.g... | (new ArrayList<>()); |
400,589 | public void fitCurrentRouteToMap(boolean portrait, int leftBottomPaddingPx) {<NEW_LINE>RoutingHelper rh = app.getRoutingHelper();<NEW_LINE>Location lt = rh.getLastProjection();<NEW_LINE>if (lt == null) {<NEW_LINE>lt = app.getTargetPointsHelper().getPointToStartLocation();<NEW_LINE>}<NEW_LINE>if (lt != null) {<NEW_LINE>... | , bottom = lt.getLatitude(); |
1,827,945 | public static List<URI> readDnsConf() {<NEW_LINE>final Logger logger = LoggerFactory.getLogger(DnsUtil.class);<NEW_LINE>final boolean debug = logger.isDebugEnabled();<NEW_LINE>final File file = new File(Sys.sysProp(QBIT_DNS_RESOLV_CONF, "/etc/resolv.conf"));<NEW_LINE>if (file.exists()) {<NEW_LINE>final List<String> lin... | IllegalStateException("" + file + " not found"); |
517,595 | public static String build(FacesContext context, UIComponent component, ValueExpression ve, Lazy<Object> value, boolean cache, boolean stream) {<NEW_LINE>Class<?> type = ELUtils.<MASK><NEW_LINE>// skip null type<NEW_LINE>if (type == null) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>if (String.class.isAssignableFrom(type)... | getType(context, ve, value); |
1,523,152 | private static boolean shouldSkipPartition(TypeManager typeManager, HiveTableLayoutHandle hiveLayout, DateTimeZone hiveStorageTimeZone, HiveSplit hiveSplit, SplitContext splitContext) {<NEW_LINE>List<HiveColumnHandle> partitionColumns = hiveLayout.getPartitionColumns();<NEW_LINE>List<Type> partitionTypes = partitionCol... | hivePartitionKey = partitionKeys.get(i); |
398,891 | static String downloadSavedModel(String modelPath) {<NEW_LINE>String localModelPath;<NEW_LINE>File workDir = PythonFileUtils.createTempDir("temp_").toFile();<NEW_LINE>if (PythonFileUtils.isCompressedFile(modelPath)) {<NEW_LINE>workDir.deleteOnExit();<NEW_LINE>ArchivesUtils.downloadDecompressToDirectory(modelPath, workD... | LOG.info("No .pb or .pbtxt files found in {}", workDir); |
1,160,253 | public void transmit(AMQChannel channel) throws IOException {<NEW_LINE>int channelNumber = channel.getChannelNumber();<NEW_LINE>AMQConnection connection = channel.getConnection();<NEW_LINE>synchronized (assembler) {<NEW_LINE>Method m = this.assembler.getMethod();<NEW_LINE>if (m.hasContent()) {<NEW_LINE>byte[] body = th... | toFrame(channelNumber, body.length); |
1,264,036 | private void initKeysAndActions() {<NEW_LINE>unregisterKeyboardAction(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0));<NEW_LINE>unregisterKeyboardAction(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0));<NEW_LINE>unregisterKeyboardAction(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));<NEW_LINE>unregisterKeyboardAction(KeyStrok... | am.put(ACTION_SHOW_POPUP, showPopupAction); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.