idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,586,438 | protected void onDraw(Canvas canvas) {<NEW_LINE>super.onDraw(canvas);<NEW_LINE>float padding = getHeight() * 0.07f;<NEW_LINE>paintBackground.setStrokeWidth(getHeight() * 0.02f);<NEW_LINE>paintProgress.setStrokeWidth(padding);<NEW_LINE>bounds.set(padding, padding, getWidth() - <MASK><NEW_LINE>canvas.drawArc(bounds, 0, 3... | padding, getHeight() - padding); |
158,719 | private List<ArgType> searchCastTypes(MethodNode parentMth, IMethodDetails mthDetails, List<IMethodDetails> overloadedMethods, List<ArgType> compilerVarTypes) {<NEW_LINE>// try compile types<NEW_LINE>if (isOverloadResolved(mthDetails, overloadedMethods, compilerVarTypes)) {<NEW_LINE>return compilerVarTypes;<NEW_LINE>}<... | = new ArrayList<>(compilerVarTypes); |
1,264,430 | final GetObjectResult executeGetObject(GetObjectRequest getObjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getObjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | HandlerContextKey.HAS_STREAMING_OUTPUT, Boolean.TRUE); |
1,407,598 | public void onStartup(Set<Class<?>> classes, ServletContext ctx) {<NEW_LINE>Instance<ExecutorService> instance = CDI.current().select(ExecutorService.class);<NEW_LINE><MASK><NEW_LINE>Future<Integer> future = executor.submit(new Callable<Integer>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Integer call() {<NEW_LINE... | ExecutorService executor = instance.get(); |
1,536,758 | final CreatePermissionGroupResult executeCreatePermissionGroup(CreatePermissionGroupRequest createPermissionGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPermissionGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,585,922 | public void open(NodeInputSplit split) throws IOException {<NEW_LINE>ResourcesUtils.parseGpuInfo(getRuntimeContext(), mlConfig);<NEW_LINE>mlContext = new MLContext(mode, mlConfig, role.name(), split.getSplitNumber(), mlConfig.getEnvPath(), ColumnInfos.dummy().getNameToTypeMap());<NEW_LINE>if (role.getClass().equals(AMR... | = new DataExchange<>(mlContext); |
202,576 | public int compareTo(TSummaryRequest other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTableId(), other.isSetTableId());<NEW_LINE>i... | this.tableId, other.tableId); |
1,645,089 | public IStatus download(String[] URLs, IProgressMonitor progressMonitor) {<NEW_LINE>if (URLs.length == 0) {<NEW_LINE>String err = Messages.InstallerConfigurationProcessor_missingDownloadTargets;<NEW_LINE>applyErrorAttributes(err);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>IdeLog.// $NON-NLS-1$<NEW_LINE>logError(// $NON-NLS-1$<N... | "We expected an array of URLs, but got an empty array.", new Exception(err)); |
1,375,121 | private boolean save(Path targetPath, SaveDatabaseMode mode) {<NEW_LINE>if (mode == SaveDatabaseMode.NORMAL) {<NEW_LINE>dialogService.notify(String.format("%s...", Localization.lang("Saving library")));<NEW_LINE>}<NEW_LINE>libraryTab.setSaving(true);<NEW_LINE>try {<NEW_LINE>Charset encoding = libraryTab.getBibDatabaseC... | encoding, SavePreferences.DatabaseSaveType.ALL); |
183,638 | private boolean completeJavadocTagInModuleInfo(CompilationUnitDeclaration parsedUnit) {<NEW_LINE>boolean contextAccepted = false;<NEW_LINE>if (this.parser.assistNodeParent instanceof CompletionJavadoc && parsedUnit.isModuleInfo()) {<NEW_LINE>try {<NEW_LINE>this.lookupEnvironment.buildTypeBindings(parsedUnit, null);<NEW... | ).filterPossibleTags(parsedUnit.scope); |
747,001 | public static XContentBuilder convert(PhotonDoc doc, String[] languages, String[] extraTags) throws IOException {<NEW_LINE>final AddressType atype = doc.getAddressType();<NEW_LINE>XContentBuilder builder = XContentFactory.jsonBuilder().startObject().field(Constants.OSM_ID, doc.getOsmId()).field(Constants.OSM_TYPE, doc.... | ), doc.getTagValue()); |
1,216,572 | protected void initNaming() {<NEW_LINE>// Setting additional variables<NEW_LINE>if (!useNaming) {<NEW_LINE>// START SJSAS 5031700<NEW_LINE>// log.info( "Catalina naming disabled");<NEW_LINE>if (log.isLoggable(Level.FINE)) {<NEW_LINE>log.log(Level.FINE, "Catalina naming disabled");<NEW_LINE>}<NEW_LINE>// END SJSAS 50317... | System.setProperty("catalina.useNaming", "true"); |
1,436,932 | protected boolean parseAttributes(Element element, ParserContext ctx, BeanDefinitionBuilder bean) {<NEW_LINE>NamedNodeMap atts = element.getAttributes();<NEW_LINE>boolean setBus = false;<NEW_LINE>for (int i = 0; i < atts.getLength(); i++) {<NEW_LINE>Attr node = (<MASK><NEW_LINE>String val = node.getValue();<NEW_LINE>St... | Attr) atts.item(i); |
1,326,133 | public void launchImageLibrary(final ReadableMap options, final Callback callback) {<NEW_LINE>final Activity currentActivity = getCurrentActivity();<NEW_LINE>if (currentActivity == null) {<NEW_LINE>callback.invoke(getErrorMap(errOthers, "Activity error"));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.callback = callback;<... | = this.options.selectionLimit == 1; |
266,728 | public ValidationError unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ValidationError validationError = new ValidationError();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken... | String currentParentElement = context.getCurrentParentElement(); |
1,223,688 | public Regressor transformToOutput(List<OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo) {<NEW_LINE>float[][] predictions = getBatchPredictions(tensor);<NEW_LINE>if (predictions.length != 1) {<NEW_LINE>throw new <MASK><NEW_LINE>} else if (predictions[0].length != outputIDInfo.size()) {<NEW_LINE>throw new... | IllegalArgumentException("Supplied tensor has too many results, predictions.length = " + predictions.length); |
412,007 | public void renderModel(ItemStack itemStack, Mode transformMode, boolean invert, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int lightmap, int overlay, FabricBakedModel model, VanillaQuadHandler vanillaHandler) {<NEW_LINE>this.lightmap = lightmap;<NEW_LINE>this.overlay = overlay;<NEW_LINE>th... | 0.5D, -0.5D, -0.5D); |
900,651 | public static String normalizeTagViewId(String tagViewId) {<NEW_LINE>if (tagViewId == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Split off the base/QS...<NEW_LINE>tagViewId = tagViewId.trim();<NEW_LINE>int <MASK><NEW_LINE>String baseName = (idx == -1) ? tagViewId : tagViewId.substring(0, idx);<NEW_LINE>String... | idx = tagViewId.indexOf('?'); |
816,468 | public static DescribeRegionsResponse unmarshall(DescribeRegionsResponse describeRegionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeRegionsResponse.setRequestId<MASK><NEW_LINE>List<KVStoreRegion> regionIds = new ArrayList<KVStoreRegion>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeRegionsRespons... | (_ctx.stringValue("DescribeRegionsResponse.RequestId")); |
231,482 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {<NEW_LINE>Query post = RemoteAccess.evaluate(request);<NEW_LINE>// Get the json data to visualize as a key value pair of data=<NEW_LINE>if (post.isDoS_blackout()) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// ... | response.sendError(503, "Your request frequency is too high"); |
1,227,752 | public Vector ifilter(double threshold) {<NEW_LINE>if (storage.isDense()) {<NEW_LINE>int[] values = ((<MASK><NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>if (Math.abs(values[i]) <= threshold) {<NEW_LINE>values[i] = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (storage.isSparse()) {<NEW_LINE>ObjectIterator... | LongIntVectorStorage) storage).getValues(); |
1,214,789 | public void process(Object[] args) throws HiveException {<NEW_LINE>String start = null;<NEW_LINE>String end = null;<NEW_LINE>int incr = 1;<NEW_LINE>DurationFieldType durationType = DurationFieldType.days();<NEW_LINE>DateTimeFormatter dateFormatter = org.joda.time.format.DateTimeFormat.forPattern("YYYYMMdd");<NEW_LINE>i... | this.forward(this.forwardListObj); |
788,656 | boolean asyn_predict() {<NEW_LINE>HashMap<String, String> feed_data = new HashMap<String, String>() {<NEW_LINE><NEW_LINE>{<NEW_LINE>put("words", "i am very sad | 0");<NEW_LINE>}<NEW_LINE>};<NEW_LINE>System.out.println(feed_data);<NEW_LINE>List<String> fetch = Arrays.asList("prediction");<NEW_LINE>System.out.println(fet... | System.out.println(result); |
1,151,321 | private byte[] sign(byte[] key, byte[] data) {<NEW_LINE>byte[] sign = null;<NEW_LINE>try {<NEW_LINE>// Because Mac.getInstance(String) calls a synchronized method,<NEW_LINE>// it could block on invoked concurrently.<NEW_LINE>// SO use prototype pattern to improve perf.<NEW_LINE>if (macInstance == null) {<NEW_LINE>synch... | (key, getAlgorithm())); |
703,971 | private UpdateOperations<JobPo> buildUpdateOperations(JobQueueReq request) {<NEW_LINE>UpdateOperations<JobPo> operations = template.createUpdateOperations(JobPo.class);<NEW_LINE>addUpdateField(operations, "cronExpression", request.getCronExpression());<NEW_LINE>addUpdateField(operations, "needFeedback", request.getNeed... | "submitNodeGroup", request.getSubmitNodeGroup()); |
710,660 | private Map<String, ShapeModel> addEmptyOutputShapes(Map<String, OperationModel> currentOperations) {<NEW_LINE>final Map<String, Operation> operations = serviceModel.getOperations();<NEW_LINE>final Map<String, ShapeModel> emptyOutputShapes = new HashMap<>();<NEW_LINE>for (Map.Entry<String, Operation> entry : operations... | .setUnmarshaller(new ShapeUnmarshaller()); |
1,334,761 | public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) {<NEW_LINE>if (allocation.shouldIgnoreShardForNode(shardRouting.shardId(), node.nodeId())) {<NEW_LINE>return Decision.NO;<NEW_LINE>}<NEW_LINE>Decision.Multi <MASK><NEW_LINE>for (AllocationDecider allocationDecider : a... | ret = new Decision.Multi(); |
152,940 | // convertAttrValue converts attribute value v of type to t an AttributeValue message.<NEW_LINE>private static AttributeValue convertAttrValue(Type<?> t, Object v) {<NEW_LINE>AttributeValue.Builder b = AttributeValue.newBuilder();<NEW_LINE>if (v instanceof Map) {<NEW_LINE>Type.DictType<?, ?> dictType = (Type.DictType<?... | , entry.getValue())); |
1,089,998 | private void visitSwitchNode(ASTNode node) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>this.buffer.append("switch (");<NEW_LINE>if (node instanceof SwitchExpression) {<NEW_LINE>((SwitchExpression) node).getExpression().accept(this);<NEW_LINE>} else if (node instanceof SwitchStatement) {<NEW_LINE>((SwitchStatement) node).getExpr... | this.buffer.append("}\n"); |
967,675 | private static void initThreadFields() {<NEW_LINE>if (threadNameField == null) {<NEW_LINE>SystemDictionary sysDict = VM.getVM().getSystemDictionary();<NEW_LINE>InstanceKlass k = sysDict.getThreadKlass();<NEW_LINE>threadNameField = (OopField) k.findField("name", "Ljava/lang/String;");<NEW_LINE>threadGroupField = (OopFie... | k.findField("threadStatus", "I"); |
1,174,963 | public List<CatchStatement> visitCatchClause(final CatchClauseContext ctx) {<NEW_LINE>List<ClassNode> catchTypes = this.visitCatchType(ctx.catchType());<NEW_LINE>if (catchTypes.size() > 1) {<NEW_LINE>return catchTypes.stream().map(e -> {<NEW_LINE>Parameter catchParameter = configureAST(new Parameter(e, this.visitIdenti... | (ctx.block())); |
1,463,428 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName, String poolName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null... | error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); |
649,143 | public void marshall(ScalingPolicy scalingPolicy, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (scalingPolicy == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(scalingPolicy.getPolicyARN(), POLICYARN_BINDI... | scalingPolicy.getPolicyName(), POLICYNAME_BINDING); |
196,985 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player damagedPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));<NEW_LINE>if (controller == null || damagedPlayer == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>... | new FixedTarget(card, game)); |
526,113 | private String whereClauseFromFilter(SCIMFilter filter, Map<String, Object> values, AttributeNameMapper mapper, String paramPrefix) {<NEW_LINE>switch(filter.getFilterType()) {<NEW_LINE>case AND:<NEW_LINE>return "(" + whereClauseFromFilter(filter.getFilterComponents().get(0), values, mapper, paramPrefix) + " AND " + whe... | values, "%", "%", paramPrefix); |
858,079 | protected void callSearchModules(SearchRequest searchRequest, List<IndexerSearchCacheEntry> indexersToSearch, SearchCacheEntry searchCacheEntry) {<NEW_LINE>Map<Indexer, List<IndexerSearchResult>> <MASK><NEW_LINE>for (IndexerSearchCacheEntry entry : indexersToSearch) {<NEW_LINE>indexerSearchResults.put(entry.getIndexer(... | indexerSearchResults = new HashMap<>(); |
241,739 | private void patchConfigmapTrait(JSONArray traits, AppInstance appInstance, AppComponentInstance appComponentInstance) {<NEW_LINE>JSONArray targets = new JSONArray();<NEW_LINE>JSONObject configmaps = new JSONObject();<NEW_LINE>traits.add(JsonUtil.map("name", "configmap.trait.abm.io", "runtime", "pre", "spec", JsonUtil.... | AppComponentInstanceDetail appComponentInstanceDetail = appComponentInstance.detail(); |
173,000 | public void update(@Nonnull AnActionEvent e) {<NEW_LINE>Presentation presentation = e.getPresentation();<NEW_LINE>PluginDescriptor[] selection = getPluginTable().getSelectedObjects();<NEW_LINE>boolean enabled = (selection != null);<NEW_LINE>if (enabled) {<NEW_LINE>for (PluginDescriptor descr : selection) {<NEW_LINE>pre... | hasNewerVersion(descr.getPluginId()); |
580,183 | public SqlCall createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands) {<NEW_LINE>switch(operands.length) {<NEW_LINE>case 1:<NEW_LINE>// This variant occurs when someone writes TRIM(string)<NEW_LINE>// as opposed to the sugared syntax TRIM(string FROM string).<NEW_LINE>operands = new SqlNode[] {... | pos), operands[0] }; |
1,006,354 | protected void configure() {<NEW_LINE>bind(ZookeeperCounterStorage.class).to(CounterStorage.class).in(Singleton.class);<NEW_LINE>bindFactory(ClockFactory.class).in(Singleton.class).to(Clock.class);<NEW_LINE>bind(InetAddressInstanceIdResolver.class).in(Singleton.class).to(InstanceIdResolver.class);<NEW_LINE>bindSingleto... | ).to(InternalNotificationsBus.class); |
1,699,207 | /*<NEW_LINE>* Starts a new process tracing span and attaches the returned context to the EventData object for users.<NEW_LINE>*/<NEW_LINE>private Context startProcessTracingSpan(EventData eventData, String eventHubName, String fullyQualifiedNamespace) {<NEW_LINE>Object diagnosticId = eventData.getProperties().get(DIAGN... | toString(), Context.NONE); |
1,436,600 | public void createMainThread(Meta meta) {<NEW_LINE>StaticObject systemThreadGroup = meta.java_lang_ThreadGroup.allocateInstance();<NEW_LINE>// private<NEW_LINE>// ThreadGroup()<NEW_LINE>meta.java_lang_ThreadGroup.lookupDeclaredMethod(Symbol.Name._init_, Symbol.Signature._void).invokeDirect(systemThreadGroup);<NEW_LINE>... | HIDDEN_HOST_THREAD.setHiddenObject(mainThread, hostThread); |
518,829 | protected static String parseDataBytes(byte[] data, String typeStr, int index) {<NEW_LINE>try {<NEW_LINE>byte[] startBytes = subBytes(data, index * DATAWORD_UNIT_SIZE, DATAWORD_UNIT_SIZE);<NEW_LINE>Type type = basicType(typeStr);<NEW_LINE>if (type == Type.INT_NUMBER) {<NEW_LINE>return new BigInteger(startBytes).toStrin... | !DataWord.isZero(startBytes)); |
222,165 | final DescribeCertificatesResult executeDescribeCertificates(DescribeCertificatesRequest describeCertificatesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCertificatesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,001,598 | protected void doOnMatch(RelOptRuleCall call, DrillLimitRel limitRel, DrillScanRel scanRel, DrillProjectRel projectRel) {<NEW_LINE>try {<NEW_LINE>final int rowCountRequested = (int) limitRel.estimateRowCount(limitRel.getCluster().getMetadataQuery());<NEW_LINE>final GroupScan newGroupScan = scanRel.<MASK><NEW_LINE>if (n... | getGroupScan().applyLimit(rowCountRequested); |
1,370,309 | private static Pair<String, @NullableType List<byte[]>> parseFourCcPrivate(ParsableByteArray buffer) throws ParserException {<NEW_LINE>try {<NEW_LINE>// size(4), width(4), height(4), planes(2), bitcount(2).<NEW_LINE>buffer.skipBytes(16);<NEW_LINE>long compression = buffer.readLittleEndianUnsignedInt();<NEW_LINE>if (com... | >(MimeTypes.VIDEO_UNKNOWN, null); |
229,544 | public INDArray[] exec(CustomOp op, OpContext context) {<NEW_LINE>Nd4j.getExecutioner().commit();<NEW_LINE>long st = profilingConfigurableHookIn(op, context);<NEW_LINE>val ctx = AtomicAllocator.getInstance().getDeviceContext();<NEW_LINE>val status = nativeOps.execCustomOp2(null, op.opHash(), context.contextPointer());<... | ().size()]); |
1,343,232 | // LongFloatVector<NEW_LINE>private static void serializeLongIntVector(DataOutputStream out, LongIntVector vector) throws IOException {<NEW_LINE>LongIntVectorStorage storage = vector.getStorage();<NEW_LINE>if (storage.isSparse()) {<NEW_LINE>serializeInt(out, SPARSE_STORAGE_TYPE);<NEW_LINE>serializeInt(<MASK><NEW_LINE>O... | out, storage.size()); |
873,714 | private void deleteVolume(final CascadeAction action, final Completion completion) {<NEW_LINE>final List<VolumeDeletionStruct> volumes = volumesFromAction(action);<NEW_LINE>if (volumes == null || volumes.isEmpty()) {<NEW_LINE>completion.success();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<VolumeDeletionMsg> msgs <MASK>... | = new ArrayList<VolumeDeletionMsg>(); |
209,175 | public void visit(OWLSubClassOfAxiom axiom) {<NEW_LINE>if (axiom.getSubClass().isAnonymous()) {<NEW_LINE>// Not in our results because we only want to return class names<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Example:<NEW_LINE>// If searching for subs of B, candidates are:<NEW_LINE>// SubClassOf(A B)<NEW_LINE>// SubCl... | .getSubClass().asOWLClass(); |
1,053,705 | private static EnumElement toEnum(EnumDescriptorProto ed) {<NEW_LINE>String name = ed.getName();<NEW_LINE>log.trace("*** enum name: {}", name);<NEW_LINE>ImmutableList.Builder<EnumConstantElement> constants = ImmutableList.builder();<NEW_LINE>for (EnumValueDescriptorProto ev : ed.getValueList()) {<NEW_LINE>ImmutableList... | > options = ImmutableList.builder(); |
1,658,535 | public Status update(String table, String key, Map<String, ByteIterator> values) {<NEW_LINE>try {<NEW_LINE>Set<String> fields = values.keySet();<NEW_LINE>PreparedStatement stmt = updateStmts.get(fields);<NEW_LINE>// Prepare statement on demand<NEW_LINE>if (stmt == null) {<NEW_LINE>Update updateStmt = QueryBuilder.updat... | ColumnDefinitions vars = stmt.getVariables(); |
1,549,134 | @Blocking<NEW_LINE>@Produces(MediaType.TEXT_HTML)<NEW_LINE>@ApiOperation(value = "Fortunes postgres endpoint", httpMethod = "GET")<NEW_LINE>public void fortunesPostgres(HttpServerExchange exchange) throws Exception {<NEW_LINE>List<Fortune> fortunes = new ArrayList<>();<NEW_LINE>try (final Connection connection = postgr... | msg = resultSet.getString("message"); |
557,372 | private void cmd_report() {<NEW_LINE>log.info("");<NEW_LINE>if (!MRole.getDefault().isCanReport(currentTab.getAD_Table_ID())) {<NEW_LINE>ADialog.error(m_curWindowNo, this, "AccessCannotReport");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>cmd_save(false);<NEW_LINE>// Query<NEW_LINE>MQuery query = new MQuery(currentTab.getTabl... | field = currentTab.getField(i); |
198,579 | public static void validateRelationship(Relationship relationship) throws SubjectAreaFVTCheckedException {<NEW_LINE>if (relationship == null) {<NEW_LINE>// error<NEW_LINE>throw new SubjectAreaFVTCheckedException("ERROR: Expected relationship to exist, ");<NEW_LINE>}<NEW_LINE>if (relationship.getName() == null) {<NEW_L... | relationship.getName() + " end2 qualified name to have a value"); |
1,317,348 | public void subtractTo(GradPair gp, int index) {<NEW_LINE>if (numClass == 2 || multiClassMultiTree) {<NEW_LINE>((BinaryGradPair) gp).subtractBy(gradients[index], hessians[index]);<NEW_LINE>} else if (!fullHessian) {<NEW_LINE>MultiGradPair multi = (MultiGradPair) gp;<NEW_LINE>double[] grad = multi.getGrad();<NEW_LINE>do... | ] -= gradients[offset + i]; |
331,744 | void startRetryTask() {<NEW_LINE>if (retryScheduledFuture == null) {<NEW_LINE>synchronized (retryCounter) {<NEW_LINE>if (retryScheduledFuture == null) {<NEW_LINE>retryScheduledFuture = retryExecutor.scheduleWithFixedDelay(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>// Check and c... | 500, retryPeriod, TimeUnit.MILLISECONDS); |
358,904 | public static void main(String[] args) {<NEW_LINE>FlowNetwork flowNetwork = new FlowNetwork(7);<NEW_LINE>// Path 1 from source to target<NEW_LINE>flowNetwork.addEdge(new FlowEdge(0, 1, 5));<NEW_LINE>flowNetwork.addEdge(new FlowEdge(1, 4, 4));<NEW_LINE>flowNetwork.addEdge(new FlowEdge(4, 6, 3));<NEW_LINE>// Path 2 from ... | StdOut.println("Max flow: " + maxflow); |
9,087 | public void execute(Arguments arguments, ClassLoader classLoader) {<NEW_LINE>List<String> oldModels = arguments.repeatedParameter("--old");<NEW_LINE>LOGGER.info(String.format("Setting 'old' Smithy models: %s", String.join(" ", oldModels)));<NEW_LINE>List<String> newModels = arguments.repeatedParameter("--new");<NEW_LIN... | (Collectors.joining("\n")); |
1,124,675 | public PercentPair unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PercentPair percentPair = new PercentPair();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if ... | String currentParentElement = context.getCurrentParentElement(); |
923,010 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.... | check(view, CheckPersistType.all); |
667,450 | static boolean isCodePointCJK(int codePoint) {<NEW_LINE>Character.UnicodeBlock unicodeBlock = <MASK><NEW_LINE>return // The magic number here is the separating index between full-width and half-width<NEW_LINE>(codePoint == 0x00b1 || unicodeBlock == Character.UnicodeBlock.HIRAGANA) || (unicodeBlock == Character.UnicodeB... | Character.UnicodeBlock.of(codePoint); |
1,479,476 | private static void tryAssertion18(RegressionEnvironment env, String stmtText, String outputLimit, AtomicInteger milestone) {<NEW_LINE>sendTimer(env, 0);<NEW_LINE>env.compileDeploy(stmtText).addListener("s0");<NEW_LINE>String[] fields = new String[] { "symbol", "volume", "sum(price)" };<NEW_LINE>ResultAssertTestResult ... | execution.execute(false, milestone); |
1,780,281 | public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listStreamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>aws... | awsRequestMetrics.endEvent(Field.ClientExecuteTime); |
1,287,115 | private void drawText(Canvas canvas) {<NEW_LINE>if (this.text.length() <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.mode == Mode.TEXT) {<NEW_LINE>this.textX = this.startX;<NEW_LINE>this.textY = this.startY;<NEW_LINE>this.textPaint = this.createPaint();<NEW_LINE>}<NEW_LINE>float textX = this.textX;<NEW_LINE>flo... | i, (i + modNumChars)); |
545,350 | protected void configure() {<NEW_LINE>bind(ExtensionBootstrap.class).to(ExtensionBootstrapImpl.class);<NEW_LINE>bind(ExtensionStaticInitializer.class).to(ExtensionStaticInitializerImpl.class);<NEW_LINE>bind(HiveMQExtensionFactory.class).to(HiveMQExtensionFactoryImpl.class);<NEW_LINE>bind(ExtensionLoader.class).to(Exten... | ).to(AuthorizersImpl.class); |
1,160,658 | public static DescribeSuspEventsResponse unmarshall(DescribeSuspEventsResponse describeSuspEventsResponse, UnmarshallerContext context) {<NEW_LINE>describeSuspEventsResponse.setRequestId(context.stringValue("DescribeSuspEventsResponse.RequestId"));<NEW_LINE>describeSuspEventsResponse.setCount(context.integerValue("Desc... | = new ArrayList<WarningSummary>(); |
1,131,784 | public ControlSet unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ControlSet controlSet = new ControlSet();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MA... | JsonToken token = context.getCurrentToken(); |
927,734 | public static QueryDomainByInstanceIdResponse unmarshall(QueryDomainByInstanceIdResponse queryDomainByInstanceIdResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryDomainByInstanceIdResponse.setRequestId(_ctx.stringValue("QueryDomainByInstanceIdResponse.RequestId"));<NEW_LINE>queryDomainByInstanceIdResponse.setUserId(_... | (_ctx.stringValue("QueryDomainByInstanceIdResponse.UpdateProhibitionLock")); |
874,858 | private Optional<AwsCredentialsProvider> credentialsProvider(Set<String> children) {<NEW_LINE>if (properties.containsKey(ProfileProperty.ROLE_ARN) && properties.containsKey(ProfileProperty.WEB_IDENTITY_TOKEN_FILE)) {<NEW_LINE>return Optional.ofNullable(roleAndWebIdentityTokenProfileCredentialsProvider());<NEW_LINE>}<NE... | Optional.ofNullable(roleAndCredentialSourceBasedProfileCredentialsProvider()); |
1,440,773 | public void jimplify2(Body b) {<NEW_LINE>b.setLine(this);<NEW_LINE>b.add(b.newEnterMonitorStmt(monitor(b), this));<NEW_LINE>b.addLabel(label_begin());<NEW_LINE>exceptionRanges().add(label_begin());<NEW_LINE>getBlock().jimplify2(b);<NEW_LINE>if (getBlock().canCompleteNormally()) {<NEW_LINE>emitFinallyCode(b);<NEW_LINE>b... | .Stmt) iter.next(); |
438,258 | public VAdminProto.GetROStorageFileListResponse handleGetROStorageFileList(VAdminProto.GetROStorageFileListRequest request) {<NEW_LINE>String storeName = request.getStoreName();<NEW_LINE>VAdminProto.GetROStorageFileListResponse.Builder response = VAdminProto.GetROStorageFileListResponse.newBuilder();<NEW_LINE>try {<NEW... | addAllIndexFileSize(chunkedFileSet.getIndexFileSizes()); |
995,146 | private synchronized void fireTreeChange(TreeModelEvent e, int type) {<NEW_LINE>// Event may be null for offscreen info, etc.<NEW_LINE>if (e == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>assert (e.getSource() == getModel());<NEW_LINE>TreeModelListener[] listeners;<NEW_LINE>synchronized (this) {<NEW_LINE>listeners = n... | TreeModelListener[treeListeners.size()]; |
64,424 | public IToken nextToken() {<NEW_LINE>try {<NEW_LINE>Symbol symbol;<NEW_LINE>if (fLastWasWhitespace) {<NEW_LINE>symbol = fLastSymbol;<NEW_LINE>fLastWasWhitespace = false;<NEW_LINE>} else {<NEW_LINE>symbol = fLookAheadQueue.poll();<NEW_LINE>if (symbol == null) {<NEW_LINE>symbol = fScanner.nextToken();<NEW_LINE>}<NEW_LINE... | - fLastSymbol.getEnd() - 1; |
465,977 | public static TypedRecordProcessor<ProcessInstanceRecord> addProcessProcessors(final MutableZeebeState zeebeState, final ExpressionProcessor expressionProcessor, final TypedRecordProcessors typedRecordProcessors, final SubscriptionCommandSender subscriptionCommandSender, final CatchEventBehavior catchEventBehavior, fin... | subscriptionCommandSender, eventTriggerBehavior, zeebeState, writers); |
4,976 | private Object parseValue(GridField field, Object in) {<NEW_LINE>if (in == null)<NEW_LINE>return null;<NEW_LINE>int dt = field.getDisplayType();<NEW_LINE>try {<NEW_LINE>// Return Integer<NEW_LINE>if (dt == DisplayType.Integer || (DisplayType.isID(dt) && field.getColumnName().endsWith("_ID"))) {<NEW_LINE>if (in instance... | "ValidationError", errMsg.toString()); |
1,753,251 | public synchronized boolean recordPacket(AVPacket pkt) throws Exception {<NEW_LINE>if (ifmt_ctx == null) {<NEW_LINE>throw new Exception("No input format context (Has start(AVFormatContext) been called?)");<NEW_LINE>}<NEW_LINE>if (!started) {<NEW_LINE>throw new Exception("start() was not called successfully!");<NEW_LINE... | , video_st.time_base())); |
1,476,864 | public void onItemClick(AdapterView<?> adapterView, View view, int item, long l) {<NEW_LINE>Log.d("KP2AK", "clicked item: " + items.get(item).key);<NEW_LINE>if (items.get(item).value.startsWith("KP2ASPECIAL")) {<NEW_LINE>// change entry<NEW_LINE>Log.d("KP2AK", "clicked item: " + items.get(item).value);<NEW_LINE>String ... | KP2AKeyboard.CurrentlyRunningService.commitStringForTyping(theItem); |
255,697 | public AuthenticatedUser execute(CommandContext ctxt) throws CommandException {<NEW_LINE>if (!(getUser() instanceof AuthenticatedUser) || !getUser().isSuperuser()) {<NEW_LINE>throw new PermissionException(<MASK><NEW_LINE>}<NEW_LINE>if (userToDeactivate == null) {<NEW_LINE>throw new CommandException("Cannot deactivate u... | "Deactivate user command can only be called by superusers.", this, null, null); |
213,132 | public void loadFrom(Preferences preferences) {<NEW_LINE>assert !EventQueue.isDispatchThread();<NEW_LINE>final OutputOptions diskData = new OutputOptions(false);<NEW_LINE>String fontFamily = preferences.get(PREFIX + PROP_FONT_FAMILY, getDefaultFont().getFamily());<NEW_LINE>int fontSize = preferences.getInt(PREFIX + PRO... | firePropertyChange(PROP_INITIALIZED, false, true); |
730,431 | private void createTranslationInfo(Composite composite) {<NEW_LINE>Composite translation = new Composite(composite, SWT.NONE);<NEW_LINE>GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).applyTo(translation);<NEW_LINE>GridLayoutFactory.fillDefaults().margins(5, 5).numColumns(1).applyTo(translation);<NEW_LINE... | text.setText(Messages.IntroLabelTranslationInfo); |
828,320 | final DisassociateCustomerGatewayResult executeDisassociateCustomerGateway(DisassociateCustomerGatewayRequest disassociateCustomerGatewayRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateCustomerGatewayRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
474,457 | public Long bitOp(BitOperation op, byte[] destination, byte[]... keys) {<NEW_LINE>Assert.notNull(op, "BitOperation must not be null!");<NEW_LINE><MASK><NEW_LINE>if (op == BitOperation.NOT && keys.length > 1) {<NEW_LINE>throw new UnsupportedOperationException("Bitop NOT should only be performed against one key");<NEW_LI... | Assert.notNull(destination, "Destination key must not be null!"); |
1,530,269 | public BytesRef next() throws IOException {<NEW_LINE>if (++ord >= entry.termsDictSize) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if ((ord & blockMask) == 0L) {<NEW_LINE>if (this.entry.compressed) {<NEW_LINE>decompressBlock();<NEW_LINE>} else {<NEW_LINE>term.length = bytes.readVInt();<NEW_LINE>bytes.readBytes(term.byt... | term.bytes, prefixLength, suffixLength); |
1,624,420 | private void add(Point point) throws IllegalStateException {<NEW_LINE>checkState(!_done, "Computation of spherical excess is complete");<NEW_LINE>double phi = toRadians(point.getY());<NEW_LINE>double tan = Math.tan(phi / 2);<NEW_LINE>double longitude = toRadians(point.getX());<NEW_LINE>// We need to check for that spec... | * sin - _previousSin * cos * cosOfDeltaLongitude; |
1,536,294 | public void check() throws SQLException {<NEW_LINE>super.check();<NEW_LINE>select.setWhereClause(null);<NEW_LINE>String originalQueryString = OceanBaseVisitor.asString(select);<NEW_LINE>List<String> resultSet = ComparatorHelper.getResultSetFirstColumnAsString(originalQueryString, errors, state);<NEW_LINE>if (Randomly.g... | firstQueryString = OceanBaseVisitor.asString(select); |
374,734 | public static DescibeImportsFromDatabaseResponse unmarshall(DescibeImportsFromDatabaseResponse descibeImportsFromDatabaseResponse, UnmarshallerContext _ctx) {<NEW_LINE>descibeImportsFromDatabaseResponse.setRequestId(_ctx.stringValue("DescibeImportsFromDatabaseResponse.RequestId"));<NEW_LINE>descibeImportsFromDatabaseRe... | (_ctx.integerValue("DescibeImportsFromDatabaseResponse.PageNumber")); |
1,091,147 | public void execute() throws BuildException {<NEW_LINE>if (classes == null) {<NEW_LINE>throw new BuildException("root of classes must be specified!");<NEW_LINE>}<NEW_LINE>File master = new File(new File(classes, "META-INF"), "net.java.html.js.classes");<NEW_LINE>if (!master.exists()) {<NEW_LINE>return;<NEW_LINE>}<NEW_L... | toURI().toURL()); |
758,431 | public Object decodeFrame(ByteBuf frame) {<NEW_LINE>byte b0 = frame.readByte();<NEW_LINE>byte b1 = frame.readByte();<NEW_LINE>if (ProtocolConstants.MAGIC_CODE_BYTES[0] != b0 || ProtocolConstants.MAGIC_CODE_BYTES[1] != b1) {<NEW_LINE>throw new IllegalArgumentException("Unknown magic code: " + b0 + ", " + b1);<NEW_LINE>}... | byte compressorType = frame.readByte(); |
1,600,975 | private static void drawStaticNewRevision(final AbstractSunburstGUI pGUI, final PGraphics pGraphic) {<NEW_LINE>assert pGraphic != null;<NEW_LINE>if (pGUI.mDepthMax > pGUI.mOldDepthMax + 1) {<NEW_LINE>pGraphic.pushMatrix();<NEW_LINE>pGraphic.textAlign(PConstants.LEFT, PConstants.CENTER);<NEW_LINE>float <MASK><NEW_LINE>i... | arcRadius = calculateNewRadius(pGUI, pGraphic); |
317,116 | public static void bookmarkRun(P p, R r, String name, int id) {<NEW_LINE>// Find the index<NEW_LINE>int index = p.getContent().indexOf(r);<NEW_LINE>if (index < 0) {<NEW_LINE>System.out.println("P does not contain R!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ObjectFactory factory = Context.getWmlObjectFactory();<NEW_LINE>... | CTMarkupRange mr = factory.createCTMarkupRange(); |
472,347 | private synchronized void disconnect(Channel channel, boolean awaitCompletion, boolean cancelPendingRequests, Throwable cause) {<NEW_LINE>if (LOG.isDebugEnabled()) {<NEW_LINE>LOG.debug("disconnecting channel: " + channel);<NEW_LINE>}<NEW_LINE>Channel channelToClose = null;<NEW_LINE>Map<Integer, Callback<List<MASK><NEW_... | <ByteBuffer>>> requestsToCancel = null; |
1,446,506 | public void marshall(FileSystem fileSystem, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (fileSystem == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(fileSystem.getOwnerId(), OWNERID_BINDING);<NEW_LINE>pr... | fileSystem.getWindowsConfiguration(), WINDOWSCONFIGURATION_BINDING); |
75,622 | private void checkKerberosEnv() {<NEW_LINE>String krb5File = PropertyUtils.getString(JAVA_SECURITY_KRB5_CONF_PATH);<NEW_LINE>Boolean kerberosStartupState = PropertyUtils.getBoolean(HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false);<NEW_LINE>if (kerberosStartupState && StringUtils.isNotBlank(krb5File)) {<NEW_LINE>Sys... | getInstance().getDefaultRealm()); |
676,948 | public static void dump(OutputStream w, ObjectFile objFile) {<NEW_LINE>// Better to hack the indexes?<NEW_LINE>Iterator<Pair<NodeId, Node>> iter = all(objFile);<NEW_LINE>long count = 0;<NEW_LINE>try (IndentedWriter iw = new IndentedWriter(w)) {<NEW_LINE>if (!iter.hasNext()) {<NEW_LINE>iw.println("No nodes in the .dat f... | car().toString()); |
251,095 | public DataxTaskExecutionContext generateExtendedContext(ResourceParametersHelper parametersHelper) {<NEW_LINE>DataxTaskExecutionContext dataxTaskExecutionContext = new DataxTaskExecutionContext();<NEW_LINE>if (customConfig == Flag.YES.ordinal()) {<NEW_LINE>return dataxTaskExecutionContext;<NEW_LINE>}<NEW_LINE>DataSour... | getResourceParameters(ResourceType.DATASOURCE, dataTarget); |
1,144,477 | protected void doApply(ApiRequest request, IPolicyContext context, IPListConfig config, IPolicyChain<ApiRequest> chain) {<NEW_LINE>String remoteAddr = getRemoteAddr(request, config);<NEW_LINE>if (isMatch(config, remoteAddr)) {<NEW_LINE>super.doApply(request, context, config, chain);<NEW_LINE>} else {<NEW_LINE>IPolicyFa... | failure.setType(PolicyFailureType.Authorization); |
1,352,659 | public void watch(final Path file) {<NEW_LINE>// Make a config for the dir above it and<NEW_LINE>// include a match only for the given path<NEW_LINE>// using all defaults for the configuration<NEW_LINE>Path abs = file;<NEW_LINE>if (!abs.isAbsolute()) {<NEW_LINE>abs = file.toAbsolutePath();<NEW_LINE>}<NEW_LINE>// Check ... | Path parent = abs.getParent(); |
1,221,438 | final DescribeContainerInstancesResult executeDescribeContainerInstances(DescribeContainerInstancesRequest describeContainerInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeContainerInstancesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | endClientExecution(awsRequestMetrics, request, response); |
976,143 | // implement RelOptRule<NEW_LINE>public void onMatch(RelOptRuleCall call) {<NEW_LINE>LogicalCalc calc = call.rel(0);<NEW_LINE>// Expand decimals in every expression in this program. If no<NEW_LINE>// expression changes, don't apply the rule.<NEW_LINE>final RexProgram program = calc.getProgram();<NEW_LINE>if (!RexUtil.r... | getOutputRowType(), shuttle, true); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.