idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
574,981 | private static Query handleItems(SearchExecutionContext context, MoreLikeThisQuery mltQuery, Item[] likeItems, Item[] unlikeItems, boolean include, List<String> moreLikeFields, boolean useDefaultField) throws IOException {<NEW_LINE>// set default index, type and fields if not specified<NEW_LINE>for (Item item : likeIte... | .setLikeFields(getFieldsFor(likeItemsResponse)); |
884,110 | private void showPrivateKey(byte[] data, CryptoFileType fileType) throws IOException, CryptoException {<NEW_LINE>PrivateKey privKey = null;<NEW_LINE>Password password = null;<NEW_LINE>switch(fileType) {<NEW_LINE>case ENC_PKCS8_PVK:<NEW_LINE>password = getPassword();<NEW_LINE>if (password == null || password.isNulled())... | Pkcs8Util.loadEncrypted(data, password); |
1,465,127 | public void handleLineComment(int commentIndex) {<NEW_LINE>Token commentToken = this.tm.get(commentIndex);<NEW_LINE>boolean isOnFirstColumn = handleWhitespaceAround(commentIndex);<NEW_LINE>if (handleFormatOnOffTags(commentToken))<NEW_LINE>return;<NEW_LINE>if (isOnFirstColumn) {<NEW_LINE>if (this.options.comment_format_... | commentToken.originalEnd, previous.tokenType); |
800,714 | private UnionDataSchema parseUnion(UnionDeclarationContext union, boolean withinTypref) throws ParseException {<NEW_LINE>UnionDataSchema schema = new UnionDataSchema();<NEW_LINE>List<UnionMemberDeclarationContext> members = union.typeParams.members;<NEW_LINE>List<UnionDataSchema.Member> unionMembers = new ArrayList<>(m... | setMembers(unionMembers, errorMessageBuilder()); |
1,341,135 | public void refreshScope(@Nullable NamedScope scope) {<NEW_LINE>FileTreeModelBuilder.clearCaches(myProject);<NEW_LINE>if (scope == null) {<NEW_LINE>// was deleted<NEW_LINE>scope = DefaultScopesProvider.getAllScope();<NEW_LINE>}<NEW_LINE>LOG.assertTrue(scope != null);<NEW_LINE>final NamedScopesHolder holder = NamedScope... | getRoot()).sortChildren(); |
1,589,561 | private File extractEntry(ZipEntry thisEntry, String moduleName, ZipFile file) throws FileNotFoundException {<NEW_LINE>try {<NEW_LINE>File libraryFile = File.createTempFile(moduleName, ".j9ddrlib");<NEW_LINE>InputStream in = file.getInputStream(thisEntry);<NEW_LINE>try {<NEW_LINE>OutputStream out = new FileOutputStream... | file.getName(), e); |
1,591,757 | public void initFactories() {<NEW_LINE>factories.put(JetSubmitJobCodec.REQUEST_MESSAGE_TYPE<MASK><NEW_LINE>factories.put(JetTerminateJobCodec.REQUEST_MESSAGE_TYPE, toFactory(JetTerminateJobMessageTask::new));<NEW_LINE>factories.put(JetGetJobStatusCodec.REQUEST_MESSAGE_TYPE, toFactory(JetGetJobStatusMessageTask::new));<... | , toFactory(JetSubmitJobMessageTask::new)); |
967,556 | public static YamlPath fromASTPath(List<NodeRef<?>> path) {<NEW_LINE>List<YamlPathSegment> segments = new ArrayList<YamlPathSegment>(path.size());<NEW_LINE>for (NodeRef<?> nodeRef : path) {<NEW_LINE>switch(nodeRef.getKind()) {<NEW_LINE>case ROOT:<NEW_LINE>RootRef rref = (RootRef) nodeRef;<NEW_LINE>segments.add(YamlPath... | sref = ((SeqRef) nodeRef); |
250,786 | public static BarSeries loadCsvSeries(String filename) {<NEW_LINE>InputStream stream = CsvBarsLoader.class.getClassLoader().getResourceAsStream(filename);<NEW_LINE>BarSeries series = new BaseBarSeries("apple_bars");<NEW_LINE>try (CSVReader csvReader = new CSVReader(new InputStreamReader(stream, Charset.forName("UTF-8")... | .parseDouble(line[5]); |
1,063,268 | final CreateTrustStoreResult executeCreateTrustStore(CreateTrustStoreRequest createTrustStoreRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTrustStoreRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,080,474 | protected void calcAsync() {<NEW_LINE>ExUtil.asyncRun(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>Map<Integer, UserAgentSummary> summaryMap = new HashMap<Integer, UserAgentSummary>();<NEW_LINE>Map<Integer, List<Integer>> loadTextMap = new HashMap<Integer<MASK><NEW_LINE>LongEnumer longEnumer = dataM... | , List<Integer>>(); |
1,501,986 | public void show() {<NEW_LINE>String title = MessageText.getString("SpeedTestWizard.finish.panel.title");<NEW_LINE>wizard.setTitle(title);<NEW_LINE>Composite rootPanel = wizard.getPanel();<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numColumns = 1;<NEW_LINE>rootPanel.setLayout(layout);<NEW_LINE>Compo... | SpeedManagerLimitEstimate upEst = speedManager.getEstimatedUploadCapacityBytesPerSec(); |
634,206 | protected void registerInternalNoteLinkHandler() {<NEW_LINE>binding.singleNoteContent.registerOnLinkClickCallback((link) -> {<NEW_LINE>try {<NEW_LINE>final long noteLocalId = repo.getLocalIdByRemoteId(this.note.getAccountId(), Long.parseLong(link));<NEW_LINE>Log.i(TAG, "Found note for remoteId \"" + link + "\" in accou... | getAccountId() + "\" .", e); |
1,697,648 | private Prediction<Label> generatePrediction(FloatNdArray predictions, ImmutableOutputInfo<Label> outputIDInfo, int numUsed, Example<Label> example) {<NEW_LINE>long[] shape = predictions.shape().asArray();<NEW_LINE>if (shape.length != 1) {<NEW_LINE>throw new IllegalArgumentException("Failed to get scalar predictions. F... | map = new HashMap<>(); |
1,244,690 | public DescribeUserPoolClientResult describeUserPoolClient(DescribeUserPoolClientRequest describeUserPoolClientRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeUserPoolClientRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics ... | invoke(request, responseHandler, executionContext); |
1,594,419 | public void applyParams() {<NEW_LINE>super.applyParams();<NEW_LINE>int lightCount = mLights.size();<NEW_LINE>int dirCount = 0, spotCount = 0, attCount = 0;<NEW_LINE>for (int i = 0; i < lightCount; i++) {<NEW_LINE>ALight light = mLights.get(i);<NEW_LINE>int t = light.getLightType();<NEW_LINE>GLES20.glUniform3fv(muLightC... | (), mTemp3Floats), 0); |
325,847 | private String createHtmlHeader(@NonNull final CompilationInfo info, @NonNull final ModuleElement.Directive directive, final boolean fqn) {<NEW_LINE>final StringBuilder sb = new StringBuilder();<NEW_LINE>switch(directive.getKind()) {<NEW_LINE>case REQUIRES:<NEW_LINE>sb.append(((ModuleElement.RequiresDirective) directiv... | IllegalArgumentException(directive.toString()); |
549,428 | public PyObject __call__(PyObject path) {<NEW_LINE>Path absolutePath = absolutePath(path);<NEW_LINE>try {<NEW_LINE>Map<String, Object> attributes = Files.readAttributes(absolutePath, "unix:*", LinkOption.NOFOLLOW_LINKS);<NEW_LINE>Boolean isSymbolicLink = (Boolean) attributes.get("isSymbolicLink");<NEW_LINE>if (isSymbol... | OSError(Errno.ENOENT, path); |
1,467,654 | public ApiScenarioReport editReport(String reportType, String reportId, String status, String runMode) {<NEW_LINE>ApiScenarioReport <MASK><NEW_LINE>if (report == null) {<NEW_LINE>report = new ApiScenarioReport();<NEW_LINE>report.setId(reportId);<NEW_LINE>}<NEW_LINE>if (StringUtils.equals(reportType, RunModeConstants.SE... | report = apiScenarioReportMapper.selectByPrimaryKey(reportId); |
155,159 | public void visit(BLangReturn astReturnStmt) {<NEW_LINE>astReturnStmt.expr.accept(this);<NEW_LINE>BIROperand retVarRef = new BIROperand(this.env.enclFunc.returnVariable);<NEW_LINE>setScopeAndEmit(new Move(astReturnStmt.pos, this.env.targetOperand, retVarRef));<NEW_LINE>// Check whether this function already has a retur... | BIRTerminator.Return(getFunctionLastLinePos()); |
1,187,017 | boolean validateResponse(HttpURLConnection connection) throws IOException {<NEW_LINE>Log.d(TAG, "validateResponse: " + item.title + ": local = " + new Date(connection.getIfModifiedSince()) + " remote = " + new Date(connection.getLastModified()));<NEW_LINE>if (connection.getResponseCode() != 200) {<NEW_LINE>Log.d(TAG, "... | ) + " for " + item.location); |
595,757 | private void updatePorts(Instance instance) {<NEW_LINE>Object dir = instance.getAttributeValue(StdAttr.FACING);<NEW_LINE>final var select = instance.getAttributeValue(PlexersLibrary.ATTR_SELECT);<NEW_LINE>var n = 1 << select.getWidth();<NEW_LINE>final var ps = new Port[n + 4];<NEW_LINE>if (dir == Direction.NORTH || dir... | 0, Port.OUTPUT, 1); |
1,211,358 | public AssociateFileSystemResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AssociateFileSystemResult associateFileSystemResult = new AssociateFileSystemResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>J... | String currentParentElement = context.getCurrentParentElement(); |
1,376,645 | /*<NEW_LINE>* Read in the serialized MethodType. This instance will never escape. It will<NEW_LINE>* be replaced by the MethodType created in readResolve() which does the proper<NEW_LINE>* validation.<NEW_LINE>*/<NEW_LINE>private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {<NEW_L... | []) in.readObject(); |
1,844,818 | public void exitFftf_dscp(Fftf_dscpContext ctx) {<NEW_LINE>String dscpSpec = toString(ctx.name);<NEW_LINE>FwFromDscp from = new FwFromDscp(dscpSpec);<NEW_LINE>Integer <MASK><NEW_LINE>if (value == null) {<NEW_LINE>// not a number, so must be an alias<NEW_LINE>// if it is not a builtin alias or it has been overridden, we... | value = Ints.tryParse(dscpSpec); |
780,675 | public boolean validate() throws ContractValidateException {<NEW_LINE>if (this.any == null) {<NEW_LINE>throw new ContractValidateException(ActuatorConstant.CONTRACT_NOT_EXIST);<NEW_LINE>}<NEW_LINE>if (chainBaseManager == null) {<NEW_LINE>throw new ContractValidateException("No account store or contract store!");<NEW_LI... | ContractValidateException(e.getMessage()); |
1,468,803 | public synchronized void createTable(String... tables) throws RocksDBException {<NEW_LINE>this.checkValid();<NEW_LINE>List<ColumnFamilyDescriptor> cfds = new ArrayList<>();<NEW_LINE>for (String table : tables) {<NEW_LINE>if (this.rocksdb.existCf(table)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ColumnFamilyDescriptor cf... | .rocksdb(), cfh)); |
212,739 | private boolean canExport(JFileChooser chooser) {<NEW_LINE>File file = chooser.getSelectedFile();<NEW_LINE>if (!file.getPath().endsWith(".gephi")) {<NEW_LINE>file = new File(file.getPath() + ".gephi");<NEW_LINE>chooser.setSelectedFile(file);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (!file.exists()) {<NEW_LINE>if (!file.cr... | getDefault().notifyLater(msg); |
139,498 | public static RubyClass createBigDecimal(Ruby runtime) {<NEW_LINE>RubyClass bigDecimal = runtime.defineClass("BigDecimal", runtime.getNumeric(), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);<NEW_LINE>bigDecimal.setConstant("VERSION", RubyString.newStringShared(runtime, VERSION));<NEW_LINE>runtime.getKernel().defineAnnota... | ("NAN", newNaN(runtime)); |
444,330 | final GetBotChannelAssociationResult executeGetBotChannelAssociation(GetBotChannelAssociationRequest getBotChannelAssociationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getBotChannelAssociationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
977,610 | public String post(@RequestParam(required = false) String location, @RequestParam(required = false) String latlng, @RequestParam(required = false) String address, String space, HttpServletRequest req, HttpServletResponse res, Model model) {<NEW_LINE>if (utils.isAuthenticated(req)) {<NEW_LINE>Profile authUser = utils.ge... | (false, false) + "\"}"); |
541,227 | private IDunnableDoc createDunnableDoc(@NonNull final IDunningContext context, @NonNull final I_C_Dunning_Candidate_Invoice_v1 candidate) {<NEW_LINE>final int invoiceId = candidate.getC_Invoice_ID();<NEW_LINE>final int invoicePayScheduleId = candidate.getC_InvoicePaySchedule_ID();<NEW_LINE>final int adClientId = candid... | I_C_Invoice.class, ITrx.TRXNAME_ThreadInherited); |
1,070,249 | public static ClientMessage encodeRequest(java.lang.String name, java.util.UUID txnId, long threadId, com.hazelcast.internal.serialization.Data key, com.hazelcast.internal.serialization.Data value) {<NEW_LINE>ClientMessage clientMessage = ClientMessage.createForEncode();<NEW_LINE>clientMessage.setRetryable(false);<NEW_... | StringCodec.encode(clientMessage, name); |
1,783,615 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static boolean isVolatile(com.sun.jdi.Field a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionR... | jpda.jdi.InternalExceptionWrapper(ex); |
243,372 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_viewpagertab);<NEW_LINE>setSupportActionBar((Toolbar) findViewById(R.id.toolbar));<NEW_LINE>mHeaderView = findViewById(R.id.header);<NEW_LINE>ViewCompat.setElevation(mHeaderView, g... | findViewById(R.id.sliding_tabs); |
963,506 | final DescribeBillingGroupResult executeDescribeBillingGroup(DescribeBillingGroupRequest describeBillingGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeBillingGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
603,010 | public static CodegenExpressionNewAnonymousClass codegenEvaluatorWCoerce(ExprForge forge, EPTypeClass optCoercionType, CodegenMethod method, Class generator, CodegenClassScope classScope) {<NEW_LINE>CodegenExpressionNewAnonymousClass evaluator = newAnonymousClass(method.getBlock(), ExprEvaluator.EPTYPE);<NEW_LINE>Codeg... | , JavaClassHelper.getBoxedType(optCoercionType)); |
1,755,049 | private static void addPwmResponseHeaders(final PwmRequest pwmRequest) throws PwmUnrecoverableException {<NEW_LINE>if (pwmRequest == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PwmApplication pwmApplication = pwmRequest.getPwmApplication();<NEW_LINE>final PwmSession pwmSession = pwmRequest.getPwmSession();<NEW_L... | ), resp.getHttpServletResponse()); |
953,086 | public int compareTo(Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> other) {<NEW_LINE>int result = 0;<NEW_LINE>result = Tuples.compare(v1, other.v1);<NEW_LINE>if (result != 0)<NEW_LINE>return result;<NEW_LINE>result = Tuples.compare(v2, other.v2);<NEW_LINE>if (result != 0)<NEW_LINE>return result;<NEW_LINE>r... | compare(v4, other.v4); |
1,773,901 | public JSDynamicObject execute(IteratorRecord iteratorRecord, JSDynamicObject constructor, PromiseCapabilityRecord resultCapability, Object promiseResolve) {<NEW_LINE>assert JSRuntime.isConstructor(constructor);<NEW_LINE>assert JSRuntime.isCallable(promiseResolve);<NEW_LINE>SimpleArrayList<Object> errors = new SimpleAr... | ), errors.toArray()); |
1,549,953 | public void renameFile(String new_name) throws FMFileManagerException {<NEW_LINE>try {<NEW_LINE>this_mon.enter();<NEW_LINE>length_cache = getLength();<NEW_LINE>String new_canonical_path;<NEW_LINE>File new_linked_file = FileUtil.newFile(linked_file.getParentFile(), new_name);<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>new_c... | String msg = ioe.getMessage(); |
1,696,157 | public boolean apply(ClassMap classMap, Configuration configuration) {<NEW_LINE>Class<?> srcClass = classMap.getSrcClassToMap();<NEW_LINE>Class<?> destClass = classMap.getDestClassToMap();<NEW_LINE>Set<String> destFieldNames = getAcceptsFieldsDetector(destClass).getWritableFieldNames(destClass);<NEW_LINE>Set<String> sr... | (srcClass).getReadableFieldNames(srcClass); |
1,461,297 | private MetadataResult applyMetadata(Indexed<MetadataEntry> entry) {<NEW_LINE>// If the session ID is non-zero, read the metadata for the associated state machine.<NEW_LINE>if (entry.entry().session() > 0) {<NEW_LINE>RaftSession session = raft.getSessions().getSession(entry.entry().session());<NEW_LINE>// If the sessio... | entry().session()); |
1,773,285 | public RepositoryAnalysis unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RepositoryAnalysis repositoryAnalysis = new RepositoryAnalysis();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken t... | int originalDepth = context.getCurrentDepth(); |
65,943 | private SqlStatement generateUpdateStatement(String resourceServerDetailTable) {<NEW_LINE>String resourceServerTableName = database.correctObjectName(getTableName("RESOURCE_SERVER"), Table.class);<NEW_LINE>String resourceServerDetailTableName = database.correctObjectName(getTableName(resourceServerDetailTable), Table.c... | " p SET RESOURCE_SERVER_CLIENT_ID = " + "(SELECT CLIENT_ID FROM " + resourceServerTableName + " s WHERE s.ID = p.RESOURCE_SERVER_ID)"); |
1,540,531 | public SetVoiceMessageSpendLimitOverrideResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SetVoiceMessageSpendLimitOverrideResult setVoiceMessageSpendLimitOverrideResult = new SetVoiceMessageSpendLimitOverrideResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurren... | int originalDepth = context.getCurrentDepth(); |
897,147 | public void findDevice_bootloader() {<NEW_LINE>Log.d(QtApplication.QtTAG, "findDevice_bootloader");<NEW_LINE>// ???<NEW_LINE>PendingIntent mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);<NEW_LINE>// Handle to system USB service?<NEW_LINE>UsbManager manager = (<MASK><NEW_LI... | UsbManager) getSystemService(Context.USB_SERVICE); |
1,125,536 | public ModuleProtos.Module writeModule(Group group, ModulePath modulePath, ReferableConverter referableConverter) {<NEW_LINE>ModuleProtos.Module.Builder out = ModuleProtos.Module.newBuilder();<NEW_LINE>// Serialize the group structure first in order to populate the call target tree<NEW_LINE>myComplete = true;<NEW_LINE>... | (TCReferable) entry.getKey(); |
580,712 | public Object doOperation(final AddNamedView operation, final Context context, final Store store) throws OperationException {<NEW_LINE>if (null == operation.getName() || operation.getName().isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("NamedView name must be set and not empty");<NEW_LINE>}<NEW_LINE>final Na... | getProperties().getAdminAuth()); |
1,243,401 | public static DistancePredicate createDistancePredicate(double lat, double lon, double radiusMeters) {<NEW_LINE>final Rectangle boundingBox = Rectangle.fromPointDistance(lat, lon, radiusMeters);<NEW_LINE>final double axisLat = Rectangle.axisLat(lat, radiusMeters);<NEW_LINE>final double distanceSortKey = GeoUtils.distan... | relations, lat, lon, distanceSortKey); |
981,546 | public void run() throws Exception {<NEW_LINE>if (currentProgram == null) {<NEW_LINE>println("There is no open program");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RecoveredClassHelper classHelper = new RecoveredClassHelper(currentProgram, currentLocation, state.getTool(), this, false, false, false, false, monitor);<NEW_LIN... | structuresOnList = classHelper.getStructuresOnList(changedItems); |
349,982 | protected void applyEvalLeaveFiltered(CodegenMethod method, ExprForgeCodegenSymbol symbols, ExprForge[] forges, CodegenClassScope classScope) {<NEW_LINE>int numFilters = factory.getParent().getOptionalFilter<MASK><NEW_LINE>EPTypeClass firstType = (EPTypeClass) forges[0].getEvaluationType();<NEW_LINE>CodegenExpression f... | () != null ? 1 : 0; |
1,570,328 | public static GetRepositoryCommitResponse unmarshall(GetRepositoryCommitResponse getRepositoryCommitResponse, UnmarshallerContext _ctx) {<NEW_LINE>getRepositoryCommitResponse.setRequestId(_ctx.stringValue("GetRepositoryCommitResponse.RequestId"));<NEW_LINE>getRepositoryCommitResponse.setErrorCode(_ctx.stringValue("GetR... | (_ctx.booleanValue("GetRepositoryCommitResponse.Success")); |
1,231,153 | public Flux<MultiValueResponse<HGetCommand, ByteBuffer>> hMGet(Publisher<HGetCommand> commands) {<NEW_LINE>return connection.execute(cmd -> Flux.from(commands).concatMap(command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Key must not be null!");<NEW_LINE>Assert.notNull(command.getFields(), "Fields must not be null... | ::new)).collectList(); |
1,369,581 | public CompletableFuture<Void> attach(Map<String, Object> args) {<NEW_LINE>try {<NEW_LINE>clearState();<NEW_LINE>context.<MASK><NEW_LINE>clientConfigHolder = new ClientAttachConfigHolder(args);<NEW_LINE>context.setSourceProject(loadProject(clientConfigHolder.getSourcePath()));<NEW_LINE>ClientAttachConfigHolder configHo... | setDebugMode(ExecutionContext.DebugMode.ATTACH); |
877,764 | public static void main(final String[] args) {<NEW_LINE>// Instantiate a client that will be used to call the service.<NEW_LINE>DocumentModelAdministrationClient client = new DocumentModelAdministrationClientBuilder().credential(new AzureKeyCredential("{key}")).endpoint("https://{endpoint}.cognitiveservices.azure.com/"... | beginBuildModel(model2TrainingFiles, DocumentBuildMode.TEMPLATE); |
1,792,216 | public void onActivityCreated(final Activity activity, Bundle savedInstanceState) {<NEW_LINE>if (useFrameMetrics) {<NEW_LINE>this.refreshRate = (int) activity.getWindowManager().getDefaultDisplay().getRefreshRate();<NEW_LINE>this.frameIntervalNs = Constants.TIME_SECOND_TO_NANO / (long) refreshRate;<NEW_LINE>Window.OnFr... | (onFrameMetricsAvailableListener, new Handler()); |
436,297 | void update(final T item, final double weight, final boolean mark) {<NEW_LINE>if (item == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (weight <= 0.0) {<NEW_LINE>throw new SketchesArgumentException("Item weights must be strictly positive: " + weight + ", for item " + item.toString());<NEW_LINE>}<NEW_LINE>++n_;<NEW_L... | (r_ + 1) - 1); |
257,082 | public static void convertMultiMap(Map<String, List<Object>> map, Consumer<StringProperty.Builder> stringInserter, Consumer<TensorProperty.Builder> tensorInserter) {<NEW_LINE>for (var entry : map.entrySet()) {<NEW_LINE>if (entry.getValue() != null) {<NEW_LINE>var key = entry.getKey();<NEW_LINE>var stringValues = new Li... | key).addAllValues(stringValues)); |
232,269 | private static MetadataIndexNode generateRootNode(Queue<MetadataIndexNode> metadataIndexNodeQueue, TsFileOutput out, MetadataIndexNodeType type) throws IOException {<NEW_LINE>int queueSize = metadataIndexNodeQueue.size();<NEW_LINE>MetadataIndexNode metadataIndexNode;<NEW_LINE><MASK><NEW_LINE>while (queueSize != 1) {<NE... | MetadataIndexNode currentIndexNode = new MetadataIndexNode(type); |
1,416,233 | public void addNodeSet(INodeSet nodeSet) {<NEW_LINE>NodeSetImpl iNodeEntries = new NodeSetImpl();<NEW_LINE>for (INodeEntry iNodeEntry : nodeSet) {<NEW_LINE>INodeEntry node = getNode(iNodeEntry.getNodename());<NEW_LINE>if (null != node) {<NEW_LINE>// merge attributes<NEW_LINE>HashMap<String, String> newAttributes = new ... | >(node.getAttributes()); |
528,827 | // Based on the explanation at https://algs4.cs.princeton.edu/61event/<NEW_LINE>public double timeToHit(Particle3D otherParticle) {<NEW_LINE>if (this == otherParticle) {<NEW_LINE>return Double.POSITIVE_INFINITY;<NEW_LINE>}<NEW_LINE>double deltaPositionX = otherParticle.positionX - positionX;<NEW_LINE>double deltaPositi... | double deltaPositionZ = otherParticle.positionZ - positionZ; |
977,306 | private void initializeView(AttributeSet attrs, int defStyleAttr) {<NEW_LINE>if (attrs != null && !isInEditMode()) {<NEW_LINE>final TypedArray attributes = mContext.getTheme().obtainStyledAttributes(attrs, R.styleable.KeyboardButtonView, defStyleAttr, 0);<NEW_LINE>String text = attributes.getString(R.styleable.Keyboard... | findViewById(R.id.keyboard_button_textview); |
284,037 | public static void removeServiceFromDD(Project prj, JaxWsService service) throws IOException {<NEW_LINE>WebApp webApp = getWebApp(prj);<NEW_LINE>if (webApp != null) {<NEW_LINE>boolean changed = removeServiceFromDD(webApp, service.getServiceName());<NEW_LINE>// determine if there are other web services in the project<NE... | ] listeners = webApp.getListener(); |
203,098 | private void deleteOldLogs() {<NEW_LINE><MASK><NEW_LINE>PriorityQueue<PathByTimestamp> queue = new PriorityQueue<>();<NEW_LINE>long totalSize = 0;<NEW_LINE>try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(baseFilePath.getParent())) {<NEW_LINE>for (Path path : dirStream) {<NEW_LINE>try {<NEW_LINE>Date tim... | checkState(baseFilePath.isAbsolute()); |
991,339 | protected Void execute(CommandContext commandContext, TaskEntity task) {<NEW_LINE>if (StringUtils.isNotEmpty(task.getScopeId()) && ScopeTypes.CMMN.equals(task.getScopeType())) {<NEW_LINE>throw new FlowableException("The task instance is created by the cmmn engine and should be completed via the cmmn engine API");<NEW_L... | variablesLocal, transientVariables, transientVariablesLocal, commandContext); |
1,344,012 | public void render(@Nullable TileBellows bellows, float f, PoseStack ms, MultiBufferSource buffers, int light, int overlay) {<NEW_LINE>ms.pushPose();<NEW_LINE>ms.translate(0.5F, 1.5F, 0.5F);<NEW_LINE>ms.scale(1F, -1F, -1F);<NEW_LINE>float angle = 0;<NEW_LINE>if (bellows != null) {<NEW_LINE>switch(bellows.getBlockState(... | .moving * f + 0.1F)); |
13,635 | public YearlySchedule parse(XContentParser parser) throws IOException {<NEW_LINE>if (parser.currentToken() == XContentParser.Token.START_OBJECT) {<NEW_LINE>try {<NEW_LINE>return new YearlySchedule(YearTimes.parse(parser, parser.currentToken()));<NEW_LINE>} catch (ElasticsearchParseException pe) {<NEW_LINE>throw new Ela... | times.size()])); |
1,177,224 | protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {<NEW_LINE>String identityZoneIdFromHeader = request.getHeader(HEADER);<NEW_LINE>String <MASK><NEW_LINE>if (StringUtils.isEmpty(identityZoneIdFromHeader) && StringUtils... | identityZoneSubDomainFromHeader = request.getHeader(SUBDOMAIN_HEADER); |
1,380,223 | static <K> Comparator<K> create0(DependencyGraph<K> dependencyGraph, Map<String, AtomicLong> historicalServiceTimes, Function<K, String> toKey) {<NEW_LINE>final long defaultServiceTime = average(historicalServiceTimes.values());<NEW_LINE>final Map<K, Long> serviceTimes = new HashMap<>();<NEW_LINE>final Set<K> rootProje... | calculateWeights(dependencyGraph, serviceTimes, rootProjects); |
1,712,095 | protected Object createNode(JSContext context, JSBuiltin builtin, boolean construct, boolean newTarget, TemporalNow builtinEnum) {<NEW_LINE>switch(builtinEnum) {<NEW_LINE>case timeZone:<NEW_LINE>return TemporalNowTimeZoneNodeGen.create(context, builtin, args().fixedArgs(0).createArgumentNodes(context));<NEW_LINE>case i... | 2).createArgumentNodes(context)); |
1,823,348 | private void updateInsertionData(TreeSet<VersionedInsertionData>[] priorityQueues, Collection<VehicleRoute> routes, List<Job> unassignedJobList, int updateRound, boolean firstRun, VehicleRoute lastModified, Map<VehicleRoute, Integer> updates) {<NEW_LINE>for (Job unassignedJob : unassignedJobList) {<NEW_LINE>if (priorit... | updates.put(lastModified, updateRound); |
82,815 | private void writeLastContent(final Throwable throwable, final ChannelFutureListener closeAction) {<NEW_LINE>boolean chunked = true;<NEW_LINE>if (lengthOptimization) {<NEW_LINE>if (throwable == null) {<NEW_LINE>int length = (firstChunk == null ? 0 : firstChunk.remaining());<NEW_LINE>HttpUtil.setTransferEncodingChunked(... | STREAM_STATUS + "," + Response.STREAM_RESULT); |
1,571,922 | public void init(IFilterConfig filterConfig) throws ServletException {<NEW_LINE>try {<NEW_LINE>// init the filter instance<NEW_LINE>_filterState = FILTER_STATE_INITIALIZING;<NEW_LINE>// LIDB-3598: begin<NEW_LINE>this._filterConfig = filterConfig;<NEW_LINE>if (_eventSource != null && _eventSource.hasFilterListeners()) {... | _eventSource.onFilterStartInit(getFilterEvent()); |
324,863 | public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);<NEW_LINE>if (permanent != null) {<NEW_LINE>Player player = game.getPlayer(permanent.getControllerId());<NEW_LINE>if (player != null) {<NEW_LINE>Library library = player.getLibr... | revealCards(source, cards, game); |
352,050 | public PersistentProjectileEntity bukkitize(ArrowItem itemarrow, World world, ItemStack itemstack, LivingEntity entityliving) {<NEW_LINE>PlayerEntity entityhuman = (PlayerEntity) entityliving;<NEW_LINE>ItemStack itemstack1 = entityhuman.getArrowType(itemstack);<NEW_LINE>PersistentProjectileEntity entityarrow = itemarro... | yaw, 0.0F, 3.0F, 1.0F); |
1,463,265 | protected ImmutableSet<Either<SymbolInformation, DocumentSymbol>> compute() {<NEW_LINE>status.setValue(HighlightedText.plain("Fetching symbols..."));<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>if (sp != null) {<NEW_LINE>String currentProviderName = sp.getName();<NEW_LINE>debug("Fetching " + currentProviderName);<NEW_LINE>... | SymbolsProvider sp = currentSymbolsProvider.getValue(); |
1,245,058 | private void applyData(int height) {<NEW_LINE>if (height > 0) {<NEW_LINE>phaseBarsItems.forEach(item -> {<NEW_LINE>int firstBlock = daoFacade.getFirstBlockOfPhaseForDisplay(height, item.getPhase());<NEW_LINE>int lastBlock = daoFacade.getLastBlockOfPhaseForDisplay(<MASK><NEW_LINE>int duration = daoFacade.getDurationForP... | height, item.getPhase()); |
1,126,561 | ImmutableMultimap<String, Path> groupFilesByLocale(ImmutableList<Path> files) {<NEW_LINE>ImmutableMultimap.Builder<String, Path> localeToFiles = ImmutableMultimap.builder();<NEW_LINE>for (Path filepath : files) {<NEW_LINE>String path = PathFormatter.pathWithUnixSeparators(filepath);<NEW_LINE>Matcher matcher = NON_ENGLI... | HumanReadableException("Invalid path passed to compile strings. Expected path to end with %s, got path %s.", ENGLISH_STRING_PATH_SUFFIX, path); |
1,134,002 | // private void loadFileList() {<NEW_LINE>private void createFileListAdapter() {<NEW_LINE>adapter = new ArrayAdapter<Item>(this, android.R.layout.select_dialog_item, android.R.id.text1, fileList) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public View getView(int position, View convertView, ViewGroup parent) {<NEW_LINE>// ... | fileList.get(position).icon; |
565,641 | public boolean enterCaseNode(CaseNode caseNode) {<NEW_LINE>List<Statement> nodes = caseNode.getStatements();<NEW_LINE>if (nodes.size() == 1) {<NEW_LINE>Statement node = nodes.get(0);<NEW_LINE>if (node instanceof BlockStatement) {<NEW_LINE>return super.enterCaseNode(caseNode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (nodes.si... | ), JsTokenId.OPERATOR_COLON, true); |
475,573 | public InternalAggregation buildAggregation(long owningBucketOrdinal) throws IOException {<NEW_LINE>consumeBucketsAndMaybeBreak(keys.length + (showOtherBucket ? 1 : 0));<NEW_LINE>List<InternalFilters.InternalBucket> buckets = new ArrayList<>(keys.length);<NEW_LINE>for (int i = 0; i < keys.length; i++) {<NEW_LINE>long b... | , bucketAggregations(bucketOrd), keyed); |
146,735 | private static void appendEscaped(StringBuffer buf, String text) {<NEW_LINE>int nextToCopy = 0;<NEW_LINE>int length = text.length();<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>char <MASK><NEW_LINE>String rep = null;<NEW_LINE>switch(ch) {<NEW_LINE>case '&':<NEW_LINE>// $NON-NLS-1$<NEW_LINE>rep = "&";<NEW_L... | ch = text.charAt(i); |
87,473 | public void onPreviewNativeEvent(NativePreviewEvent event) {<NEW_LINE>if (getEventHandleStrategy().isDragInterrupted(event, managerMediator)) {<NEW_LINE>// end drag if ESC is hit<NEW_LINE>interruptDrag();<NEW_LINE>event.cancel();<NEW_LINE>event.getNativeEvent().preventDefault();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int... | ).updateDragImage(event, managerMediator); |
1,314,285 | public boolean execute(Object object) throws ContractExeException {<NEW_LINE>TransactionResultCapsule ret = (TransactionResultCapsule) object;<NEW_LINE>if (Objects.isNull(ret)) {<NEW_LINE>throw new RuntimeException(ActuatorConstant.TX_RESULT_NULL);<NEW_LINE>}<NEW_LINE>long fee = calcFee();<NEW_LINE>AccountStore account... | AssetIssueV2Store assetIssueV2Store = chainBaseManager.getAssetIssueV2Store(); |
1,188,793 | final MergeShardsResult executeMergeShards(MergeShardsRequest mergeShardsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(mergeShardsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | endClientExecution(awsRequestMetrics, request, response); |
672,411 | public void reverseGeocodeAsync(final Map<String, Object> locationMap, final Promise promise) {<NEW_LINE>if (mGeocoderPaused) {<NEW_LINE>promise.reject("E_CANNOT_GEOCODE", "Geocoder is not running.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (isMissingForegroundPermissions()) {<NEW_LINE>promise.reject(new LocationUnauth... | .geocoding().stop(); |
565,649 | public Dependencies resolve(SootClass sc) {<NEW_LINE>InputStream d = null;<NEW_LINE>try {<NEW_LINE>d = foundFile.inputStream();<NEW_LINE>ClassReader clsr = new ClassReader(d);<NEW_LINE>SootClassBuilder scb = new SootClassBuilder(sc);<NEW_LINE>clsr.accept(scb, ClassReader.SKIP_FRAMES);<NEW_LINE>Dependencies deps = new D... | ().makeClassRef(outerClassName)); |
1,310,790 | public AwsWafRateBasedRuleMatchPredicate unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsWafRateBasedRuleMatchPredicate awsWafRateBasedRuleMatchPredicate = new AwsWafRateBasedRuleMatchPredicate();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = c... | class).unmarshall(context)); |
513,949 | public float[] demodulate(float[] i, float[] q) {<NEW_LINE>VectorUtilities.checkComplexArrayLength(i, q, VECTOR_SPECIES);<NEW_LINE>if (mIBuffer.length != (i.length + BUFFER_OVERLAP)) {<NEW_LINE>mIBuffer = new <MASK><NEW_LINE>mQBuffer = new float[q.length + BUFFER_OVERLAP];<NEW_LINE>}<NEW_LINE>// Copy last sample to beg... | float[i.length + BUFFER_OVERLAP]; |
1,217,133 | private void parseForConfig(ClientConfig parentObj, String parentTag, String qName, Attributes attributes) throws SAXException {<NEW_LINE>if (Constants.ENTITY_SERVERS.equals(qName) || Constants.ENTITY_PROPERTIES.equals(qName)) {<NEW_LINE>objects.push(parentObj);<NEW_LINE>} else if (Constants.ENTITY_SERVER.equals(qName)... | server = maker.buildServer(attributes); |
228,887 | public RebootBrokerResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RebootBrokerResult rebootBrokerResult = new RebootBrokerResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | JsonToken token = context.getCurrentToken(); |
1,706,888 | private void printDetectionForLog4j1(File jarFile, List<String> pathChain, String version, boolean mitigated) {<NEW_LINE>String path = getPath(jarFile, pathChain);<NEW_LINE>Version v = null;<NEW_LINE>if (!version.equals("N/A"))<NEW_LINE>v = Version.parse(version);<NEW_LINE>// JMSAppender<NEW_LINE>String cve = "CVE-2021... | + " (log4j 1.2) vulnerability in " + path + ", log4j " + version; |
887,120 | void resolveBoundaryOverlaps_() {<NEW_LINE>m_vertices_on_extent_index = -1;<NEW_LINE>splitSegments_(false, m_extent.xmin);<NEW_LINE>splitSegments_(false, m_extent.xmax);<NEW_LINE>splitSegments_(true, m_extent.ymin);<NEW_LINE>splitSegments_(true, m_extent.ymax);<NEW_LINE>m_vertices_on_extent.resize(0);<NEW_LINE>m_vertic... | resolveOverlaps_(false, m_extent.xmin); |
449,035 | final CreateLicenseConfigurationResult executeCreateLicenseConfiguration(CreateLicenseConfigurationRequest createLicenseConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createLicenseConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLicenseConfiguration"); |
636,992 | protected DataStreamShardStats shardOperation(Request request, ShardRouting shardRouting) throws IOException {<NEW_LINE>IndexService indexService = indicesService.indexServiceSafe(shardRouting.shardId().getIndex());<NEW_LINE>IndexShard indexShard = indexService.getShard(shardRouting.shardId().id());<NEW_LINE>// if we d... | StoreStats storeStats = indexShard.storeStats(); |
1,302,964 | private void parseStringTable() {<NEW_LINE>int chunk = getLEWord(mParserOffset + (1 * WORD_SIZE));<NEW_LINE>mStringsCount = getLEWord(mParserOffset + (2 * WORD_SIZE));<NEW_LINE>mStylesCount = getLEWord(mParserOffset + (3 * WORD_SIZE));<NEW_LINE>int strOffset = mParserOffset + getLEWord(mParserOffset + (5 * WORD_SIZE));... | i + 7) * WORD_SIZE)); |
10,372 | final void executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE... | endClientExecution(awsRequestMetrics, request, response); |
1,758,383 | private FlowScope tightenTypesAfterAssertions(FlowScope scope, Node callNode) {<NEW_LINE><MASK><NEW_LINE>Node firstParam = left.getNext();<NEW_LINE>if (firstParam == null) {<NEW_LINE>// this may be an assertion call but there are no arguments to assert<NEW_LINE>return scope;<NEW_LINE>}<NEW_LINE>AssertionFunctionSpec as... | Node left = callNode.getFirstChild(); |
628,575 | /*<NEW_LINE>{<NEW_LINE>"timestamp": "2016-06-06T13:00:02+02:00",<NEW_LINE>"attributes": {<NEW_LINE>"name": "value1"<NEW_LINE>}<NEW_LINE>}<NEW_LINE>*/<NEW_LINE>// VisibleForTesting<NEW_LINE>String writeEvent(Meter meter, Attribute... attributes) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>String name = g... | String key = tag.getKey(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.