idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,048,360 | public byte[] toBytes() {<NEW_LINE>ByteBuffer buf = ByteBuffer.allocate(13);<NEW_LINE>buf.putShort(MAGIC);<NEW_LINE>byte msgType = (byte) 0x00;<NEW_LINE>if (heartbeat) {<NEW_LINE>msgType = (byte) (msgType | 0x10);<NEW_LINE>}<NEW_LINE>if (gzip) {<NEW_LINE>msgType = (byte) (msgType | 0x08);<NEW_LINE>}<NEW_LINE>if (oneway... | (serialize << 3) & 0xf8); |
297,913 | private static void fillVariantsByReference(@Nullable PsiReference reference, @NotNull PsiFile file, @NotNull CompletionResultSet result) {<NEW_LINE>if (reference == null)<NEW_LINE>return;<NEW_LINE>if (reference instanceof PsiMultiReference) {<NEW_LINE>PsiReference[] references = ((<MASK><NEW_LINE>ContainerUtil.sort(re... | PsiMultiReference) reference).getReferences(); |
1,498,162 | protected synchronized void xmlWriteAttributesOn(FormattedWriter writer) throws IOException {<NEW_LINE>writer.write(' ');<NEW_LINE>writer.write(XML_ID);<NEW_LINE>writer.write("=\"");<NEW_LINE>writer.write(Long.toString(getTuple().getUniqueId()));<NEW_LINE>writer.write("\" ");<NEW_LINE>writer.write(XML_STATE);<NEW_LINE>... | write(_itemLinkState.toString()); |
907,865 | private void parseHeadersToRemove(Map<Object, Object> props) {<NEW_LINE>Object value = props.get(HttpConfigConstants.PROPNAME_RESPONSE_HEADERS_REMOVE);<NEW_LINE>if (null != value && this.isHeadersConfigEnabled) {<NEW_LINE>if (value instanceof String[]) {<NEW_LINE>String[] headers = (String[]) value;<NEW_LINE>// Parse a... | configuredHeadersToRemove.put(hashcode, headerName); |
1,351,979 | public void handleCheckIn() {<NEW_LINE>if (healthServiceAsync == null) {<NEW_LINE>if (Timer.clockTime() - lastCheckIn.get() > checkInEveryMiliDuration) {<NEW_LINE>lastCheckIn.set(Timer.clockTime());<NEW_LINE>serviceDiscovery.checkInOk(endpointDefinition.getId());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (Timer.clockTim... | set(Timer.clockTime()); |
1,310,874 | public int trapRainWater(int[][] heightMap) {<NEW_LINE>int m = heightMap.length, n = heightMap[0].length;<NEW_LINE>boolean[][] vis = <MASK><NEW_LINE>PriorityQueue<int[]> pq = new PriorityQueue<>((o1, o2) -> o1[0] - o2[0]);<NEW_LINE>for (int i = 0; i < m; ++i) {<NEW_LINE>for (int j = 0; j < n; ++j) {<NEW_LINE>if (i == 0... | new boolean[m][n]; |
769,434 | public boolean restoreToLocation(LevelAccessor world, BlockPos pos, boolean force, boolean notifyNeighbors) {<NEW_LINE>BlockState current = getCurrentBlock();<NEW_LINE>BlockState replaced = getReplacedBlock();<NEW_LINE>int flags = notifyNeighbors ? Block.UPDATE_ALL : Block.UPDATE_CLIENTS;<NEW_LINE>if (current != replac... | setBlock(pos, replaced, flags); |
1,012,357 | public final AndExprContext andExpr() throws RecognitionException {<NEW_LINE>AndExprContext _localctx = new AndExprContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 24, RULE_andExpr);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(234);<NEW_LINE>_lo... | p, _localctx.eqExpr.p); |
1,662,704 | public void build() {<NEW_LINE>int complexity = targetMethodComplexity(classScope);<NEW_LINE>if (values.size() < complexity) {<NEW_LINE>int index = 0;<NEW_LINE>for (V value : values) {<NEW_LINE>consumer.accept(value, index++, methodNode);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int count = 0;<NEW_LINE>Iterator<... | accept(value, count, child); |
63,771 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>messageLabel = new javax.swing.JLabel();<NEW_LINE>toolBarButtonGroup = new javax.swing.ButtonGroup();<NEW_LINE>mainPanel = new javax.swing.JPanel();<NEW_LINE>toolBar = new javax.sw... | java.awt.BorderLayout()); |
312,573 | public void containerAllocated(EventContext context, Container container) {<NEW_LINE>Task task = context.task;<NEW_LINE>LOG.info(task.getLabel() + " - Received container: " + DoYUtil.describeContainer(container));<NEW_LINE>context.group.dequeueAllocatingTask(task);<NEW_LINE>// No matter what happens below, we don't wan... | getTaskManager().allocated(context); |
1,195,483 | public void memberAccess() {<NEW_LINE>NativeTopLevel<String> topLevel = new NativeTopLevel<>("foo");<NEW_LINE>String fooInstanceMethod = topLevel.instanceMethod("foo");<NEW_LINE>String fooStaticMethod = topLevel.staticMethod("foo");<NEW_LINE>String fooInstanceField = topLevel.instanceField;<NEW_LINE>topLevel.instanceFi... | nestedStaticMethod = nested.staticMethod("foo"); |
1,687,654 | public static GetEditingProjectMaterialsResponse unmarshall(GetEditingProjectMaterialsResponse getEditingProjectMaterialsResponse, UnmarshallerContext _ctx) {<NEW_LINE>getEditingProjectMaterialsResponse.setRequestId(_ctx.stringValue("GetEditingProjectMaterialsResponse.RequestId"));<NEW_LINE>List<Material> materialList ... | ("GetEditingProjectMaterialsResponse.MaterialList[" + i + "].Tags")); |
248,584 | private IRubyObject arrayRange(final ThreadContext context, final RubyRange range) {<NEW_LINE>final Object array = getObject();<NEW_LINE>final int arrayLength = Array.getLength(array);<NEW_LINE>final IRubyObject rFirst = range.first(context);<NEW_LINE>final IRubyObject rLast = range.last(context);<NEW_LINE>if (rFirst i... | getClass().getComponentType()); |
1,256,159 | static JavaExpression atPath(String expression, TreePath localVarPath, SourceChecker checker) throws JavaExpressionParseException {<NEW_LINE>TypeMirror enclosingType = TreeUtils.typeOf(TreePathUtil.enclosingClass(localVarPath));<NEW_LINE>ThisReference thisReference = TreePathUtil.isTreeInStaticScope(localVarPath) ? nul... | paramsAsLocals = JavaExpression.getParametersAsLocalVariables(methodEle); |
653,016 | public void run() {<NEW_LINE>// set current threads classloader to the webapp classloader<NEW_LINE>Thread.currentThread().setContextClassLoader(webClassLoader);<NEW_LINE>// create a spring web application context<NEW_LINE>XmlWebApplicationContext appctx = new XmlWebApplicationContext();<NEW_LINE>appctx.setClassLoader(w... | setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, appctx); |
1,364,012 | public com.amazonaws.services.lookoutforvision.model.AccessDeniedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.lookoutforvision.model.AccessDeniedException accessDeniedException = new com.amazonaws.services.lookoutforvision.model.AccessDeniedExceptio... | int originalDepth = context.getCurrentDepth(); |
736,382 | void updateRoutingProfile(String profileKey) {<NEW_LINE>ProfileDataObject selectedRoutingProfileDataObject = routingProfileDataObjects.get(profileKey);<NEW_LINE>if (profileKey == null || selectedRoutingProfileDataObject == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, ProfileDataObject> rp : routi... | equals(rp.getKey()); |
1,247,341 | static Single<WebServer> startServer() {<NEW_LINE>// load logging configuration<NEW_LINE>LogConfig.configureRuntime();<NEW_LINE>// By default this will pick up application.yaml from the classpath<NEW_LINE>Config config = Config.create();<NEW_LINE>WebServer server = WebServer.builder().routing(createRouting(config)).con... | "Startup failed: " + t.getMessage()); |
65,588 | public static void dumpLocks(Connection conn) {<NEW_LINE>Statement stmt = null;<NEW_LINE>try {<NEW_LINE>String sql = "select pg_class.relname,pg_locks.* from pg_class,pg_locks where pg_class.relfilenode=pg_locks.relation order by 1";<NEW_LINE>stmt = conn.createStatement();<NEW_LINE>ResultSet rs = stmt.executeQuery(sql)... | rs.getObject(i + 1); |
159,812 | private void configureXcodeForXCTest(final Project project) {<NEW_LINE>project.afterEvaluate(new Action<Project>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void execute(Project project) {<NEW_LINE>SwiftXCTestSuite component = project.getExtensions().getByType(SwiftXCTestSuite.class);<NEW_LINE>FileCollection sourc... | getArchitecture().getName()); |
1,350,463 | // We explicitly want commit() so that the dumper blocks while the write occurs.<NEW_LINE>@SuppressLint("CommitPrefEdits")<NEW_LINE>private void doWrite(List<String> args) throws DumpUsageException {<NEW_LINE>String usagePrefix = "Usage: prefs write <path> <key> <type> <value>, where type is one of: ";<NEW_LINE>Iterato... | putStringSet(editor, key, argsIter); |
620,193 | private void recreateNetwork(Model model, Device device, int numThreads) {<NEW_LINE>if (model == null)<NEW_LINE>return;<NEW_LINE>tracker.clearTrackedObjects();<NEW_LINE>if (detector != null) {<NEW_LINE>LOGGER.d("Closing detector.");<NEW_LINE>detector.close();<NEW_LINE>detector = null;<NEW_LINE>}<NEW_LINE>if (autopilot ... | this, model, device, numThreads); |
220,527 | private static // and uploads it to the blurred bucket.<NEW_LINE>void blur(BlobInfo blobInfo) throws IOException {<NEW_LINE>String bucketName = blobInfo.getBucket();<NEW_LINE>String fileName = blobInfo.getName();<NEW_LINE>// Download image<NEW_LINE>Blob blob = storage.get(BlobId.of(bucketName, fileName));<NEW_LINE>Path... | Paths.get("/tmp/", fileName); |
1,156,312 | public ASTNode visitSimpleSelect(final SimpleSelectContext ctx) {<NEW_LINE>PostgreSQLSelectStatement result = new PostgreSQLSelectStatement();<NEW_LINE>if (null != ctx.targetList()) {<NEW_LINE>ProjectionsSegment projects = (ProjectionsSegment) visit(ctx.targetList());<NEW_LINE>if (null != ctx.distinctClause()) {<NEW_LI... | (ctx.windowClause())); |
383,218 | public void validate(ValidationHelper helper, Context context, String key, OpenAPI t) {<NEW_LINE>if (t != null) {<NEW_LINE>String openapiVersion = t.getOpenapi();<NEW_LINE>ValidatorUtils.validateRequiredField(openapiVersion, context, DefinitionConstant.PROP_OPENAPI).ifPresent(helper::addValidationEvent);<NEW_LINE>Valid... | OPENAPI_TAG_IS_NOT_UNIQUE, tag.getName()); |
1,265,232 | public EnvironmentRevision unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EnvironmentRevision environmentRevision = new EnvironmentRevision();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | ().unmarshall(context)); |
220,631 | private static void closeConnection(@NotNull final ClientConnection clientConnection, final boolean withReasonCode, final boolean withReasonString, @Nullable Mqtt5DisconnectReasonCode reasonCode, @Nullable String reasonString, @NotNull final Mqtt5UserProperties userProperties, final boolean forceClose) {<NEW_LINE>if (r... | ).addListener(ChannelFutureListener.CLOSE); |
421,089 | static ZTFilePermissions fromPosixFileMode(int mode) {<NEW_LINE>ZTFilePermissions permissions = new ZTFilePermissions();<NEW_LINE>permissions.setOwnerCanExecute((mode & OWNER_EXECUTE_FLAG) > 0);<NEW_LINE>permissions.setGroupCanExecute((mode & GROUP_EXECUTE_FLAG) > 0);<NEW_LINE>permissions.setOthersCanExecute((mode & OT... | (mode & OWNER_READ_FLAG) > 0); |
1,244,936 | final PutMetricFilterResult executePutMetricFilter(PutMetricFilterRequest putMetricFilterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putMetricFilterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | false), new PutMetricFilterResultJsonUnmarshaller()); |
1,713,189 | public CreateAnomalyDetectorResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateAnomalyDetectorResult createAnomalyDetectorResult = new CreateAnomalyDetectorResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | class).unmarshall(context)); |
1,096,881 | public void run() {<NEW_LINE>boolean isDebugEnabled = _log.isDebugEnabled();<NEW_LINE>Object nextState = null;<NEW_LINE>boolean running = true;<NEW_LINE>try {<NEW_LINE>while (running && !checkForShutdownRequest()) {<NEW_LINE>nextState = pollNextState();<NEW_LINE>if (null == nextState) {<NEW_LINE>running = false;<NEW_LI... | info("Message Queue History (earliest first) at shutdown:" + getMessageHistoryLog()); |
1,209,805 | public // concatenated with the label field. Case Insensitive<NEW_LINE>int compareTo(@NotNull MacroButtonProperties b2) throws ClassCastException {<NEW_LINE>if (b2 != this) {<NEW_LINE>String b1group = getGroup();<NEW_LINE>if (b1group == null)<NEW_LINE>b1group = "";<NEW_LINE>String b1sortby = getSortby();<NEW_LINE>if (b... | " " + b1sortby + " " + b1label); |
1,564,550 | private void genBitSet(BitSet p, int id) {<NEW_LINE>int _tabs_ = tabs;<NEW_LINE>// wanna have bitsets on module scope, so they are available<NEW_LINE>// when module gets loaded.<NEW_LINE>tabs = 0;<NEW_LINE>println("");<NEW_LINE>println("### generate bit set");<NEW_LINE>println("def mk" + getBitsetName(id) + "(): ");<NE... | + getBitsetName(id) + "())"); |
363,552 | private void perform(final BaseNode node) {<NEW_LINE>DatabaseConnection connection = node.getLookup().lookup(DatabaseConnection.class);<NEW_LINE>String schemaName = findSchemaWorkingName(node.getLookup());<NEW_LINE>try {<NEW_LINE>boolean viewsSupported = connection.getConnector().getDriverSpecification(schemaName).areV... | new Node[] { node }); |
45,355 | public Xml visitTag(Xml.Tag tag, ExecutionContext ctx) {<NEW_LINE>if (isDependencyTag(oldGroupId, oldArtifactId)) {<NEW_LINE>Optional<Xml.Tag> groupIdTag = tag.getChild("groupId");<NEW_LINE>boolean changed = false;<NEW_LINE>if (groupIdTag.isPresent() && !newGroupId.equals(groupIdTag.get().getValue().orElse(null))) {<NE... | .get(), newVersion)); |
721,319 | public static Instrumenter<ConsumerRecord<?, ?>, Void> createConsumerOperationInstrumenter(String instrumentationName, OpenTelemetry openTelemetry, MessageOperation operation, Iterable<AttributesExtractor<ConsumerRecord<?, ?>, Void>> extractors) {<NEW_LINE>KafkaConsumerAttributesGetter getter = KafkaConsumerAttributesG... | newInstrumenter(SpanKindExtractor.alwaysConsumer()); |
938,725 | public boolean deleteUserAccount(long accountId) {<NEW_LINE>CallContext ctx = CallContext.current();<NEW_LINE>long callerUserId = ctx.getCallingUserId();<NEW_LINE>Account caller = ctx.getCallingAccount();<NEW_LINE>// If the user is a System user, return an error. We do not allow this<NEW_LINE>AccountVO account = _accou... | account.getAccountName() + " is already removed"); |
1,664,199 | private void createSetMenuEntries(JMenu edit) {<NEW_LINE>edit.add(new ToolTipAction(Lang.get("menu_table_setXTo0")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>modifyTable(v -> v > 1 ? 0 : v);<NEW_LINE>}<NEW_LINE>}.setToolTip(Lang.get("menu_table_setXTo0_tt")).createJMe... | (v -> (byte) 0); |
1,158,374 | public void updateConfigs(Map<String, Object> updates) {<NEW_LINE>updates.entrySet().forEach(entry -> {<NEW_LINE>if (entry.getKey().equals(ProducerConfig.TRANSACTIONAL_ID_CONFIG)) {<NEW_LINE>Assert.isTrue(entry.getValue() instanceof String, () -> "'" + ProducerConfig.TRANSACTIONAL_ID_CONFIG + "' must be a String, not a... | getClass().getName()); |
1,747,730 | private boolean isPermitted(Project project, ProjectAccount projectUser, String apiCommandName) {<NEW_LINE>ProjectRole projectRole = null;<NEW_LINE>if (projectUser.getProjectRoleId() != null) {<NEW_LINE>projectRole = projectRoleService.findProjectRole(projectUser.getProjectRoleId(<MASK><NEW_LINE>}<NEW_LINE>if (projectR... | ), project.getId()); |
778,946 | public void fromBytes(PacketBufferBC buf) throws IOException {<NEW_LINE>id = buf.readUniqueId();<NEW_LINE>box = new Box();<NEW_LINE>box.readData(buf);<NEW_LINE>player = buf.readBoolean() <MASK><NEW_LINE>Map<EnumAddonSlot, Addon> newAddons = new EnumMap<>(EnumAddonSlot.class);<NEW_LINE>int count = buf.readInt();<NEW_LIN... | ? buf.readUniqueId() : null; |
1,653,461 | public void updateRendering() {<NEW_LINE>// If PDF always use a 600x600 image, otherwise show the actual rendered image which will be saved<NEW_LINE>int width = owner.fileType.equals("pdf") ? 600 : (int) owner.markerWidth;<NEW_LINE>// dot diameter rendered in the image<NEW_LINE>double dd = owner.dotDiameter * (width / ... | configure(width, height, 20); |
663,914 | private Mono<Response<String>> generateUriWithResponseAsync(String resourceGroupName, String automationAccountName, 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."));<NEW_LI... | ), apiVersion, accept, context); |
139,500 | private Set<String> processResourceAndReturnUrls(IBaseResource theResource, String theResourceName) {<NEW_LINE>Validate.notNull(theResource, "the" + theResourceName + " must not be null");<NEW_LINE>RuntimeResourceDefinition resourceDef = getFhirContext().getResourceDefinition(theResource);<NEW_LINE>String actualResourc... | pipeIdx = url.indexOf('|'); |
1,747,342 | private Map<String, Object> checkAndFetchVulnInfo(String type, String resouceId, Map<String, Object> processinfo, Map<String, Object> hostAsset) {<NEW_LINE>Map<String, Object> host = hostAsset;<NEW_LINE>if (host != null && host.get("vuln") == null) {<NEW_LINE>processinfo.put(VULN_MISSING, "true");<NEW_LINE>// Retry wit... | Util.fetchCurretQualysInfo(type, resouceId); |
399,165 | public static APIGetVmMigrationCandidateHostsReply __example__() {<NEW_LINE>APIGetVmMigrationCandidateHostsReply reply = new APIGetVmMigrationCandidateHostsReply();<NEW_LINE>HostInventory hi = new HostInventory();<NEW_LINE>hi.setAvailableCpuCapacity(2L);<NEW_LINE>hi.setAvailableMemoryCapacity(4L);<NEW_LINE>hi.setCluste... | hi.setClusterUuid(uuid()); |
1,628,594 | private void writeEventsToBuffer(final MutableDirectBuffer writeBuffer, final long firstPosition) {<NEW_LINE>eventBufferOffset = 0;<NEW_LINE>for (int i = 0; i < eventCount; i++) {<NEW_LINE>final long key = eventBuffer.<MASK><NEW_LINE>eventBufferOffset += SIZE_OF_LONG;<NEW_LINE>final int sourceIndex = eventBuffer.getInt... | getLong(eventBufferOffset, Protocol.ENDIANNESS); |
1,801,554 | public void marshall(ReplicationTaskStats replicationTaskStats, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (replicationTaskStats == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(replicationTaskStats.get... | replicationTaskStats.getTablesLoaded(), TABLESLOADED_BINDING); |
730,885 | public void internalProcess(double[] input, DMatrix leftPoint, DMatrix rightView) {<NEW_LINE>int numRows = getNumOfOutputsM();<NEW_LINE>// number of parameters on left. All points<NEW_LINE>int numPointParam = structure.points.size * lengthPoint + numRigidUnknown * lengthSE3;<NEW_LINE>// Number of parameters on right. v... | motions.data[view.parent_to_view]; |
462,389 | final DeleteFeatureResult executeDeleteFeature(DeleteFeatureRequest deleteFeatureRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteFeatureRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | false), new DeleteFeatureResultJsonUnmarshaller()); |
624,703 | public static ListVpcGatewayEndpointsResponse unmarshall(ListVpcGatewayEndpointsResponse listVpcGatewayEndpointsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVpcGatewayEndpointsResponse.setRequestId<MASK><NEW_LINE>listVpcGatewayEndpointsResponse.setNextToken(_ctx.stringValue("ListVpcGatewayEndpointsResponse.NextTo... | (_ctx.stringValue("ListVpcGatewayEndpointsResponse.RequestId")); |
470,854 | final SearchTablesResult executeSearchTables(SearchTablesRequest searchTablesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(searchTablesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | invoke(request, responseHandler, executionContext); |
1,044,551 | public Mono<Void> disposeLater(Duration quietPeriod, Duration timeout) {<NEW_LINE>return Mono.defer(() -> {<NEW_LINE>long quietPeriodMillis = quietPeriod.toMillis();<NEW_LINE>long timeoutMillis = timeout.toMillis();<NEW_LINE><MASK><NEW_LINE>EventLoopGroup clientLoopsGroup = clientLoops.get();<NEW_LINE>EventLoopGroup se... | EventLoopGroup serverLoopsGroup = serverLoops.get(); |
1,099,029 | private void initialize() {<NEW_LINE>if (freshnessUpdatorRef.get() != null)<NEW_LINE>return;<NEW_LINE>synchronized (FreshnessReader.class) {<NEW_LINE>if (freshnessUpdatorRef.get() != null)<NEW_LINE>return;<NEW_LINE>freshnessCache.clear();<NEW_LINE>DalConfigure configure = DalClientFactory.getDalConfigure();<NEW_LINE>fo... | freshnessCache.put(logicDbName, logicDbFreshnessMap); |
137,730 | private void updateSupportedRefreshRates(Display display) {<NEW_LINE>Display.Mode[<MASK><NEW_LINE>int totalModes = 0;<NEW_LINE>for (int i = 0; i < supportedModes.length; i++) {<NEW_LINE>if (!modeMatchesCurrentResolution(supportedModes[i])) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>totalModes++;<NEW_LINE>}<NEW_LINE>long[... | ] supportedModes = display.getSupportedModes(); |
564,215 | protected Node[] createNodes(Object key) {<NEW_LINE>if (key instanceof WebOperationInfo) {<NEW_LINE>final WebOperationInfo method = (WebOperationInfo) key;<NEW_LINE>Node n = new AbstractNode(Children.LEAF) {<NEW_LINE><NEW_LINE>@java.lang.Override<NEW_LINE>public java.awt.Image getIcon(int type) {<NEW_LINE>if (cachedIco... | SystemAction.get(PropertiesAction.class); |
745,339 | public void createVerticalChain(int topId, int topSide, int bottomId, int bottomSide, int[] chainIds, float[] weights, int style) {<NEW_LINE>if (chainIds.length < 2) {<NEW_LINE>throw new IllegalArgumentException("must have 2 or more widgets in a chain");<NEW_LINE>}<NEW_LINE>if (weights != null && weights.length != chai... | BOTTOM, bottomId, bottomSide, 0); |
1,451,959 | public DescribeEndpointsResult describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEndpointsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAws... | DescribeEndpointsRequestMarshaller().marshall(describeEndpointsRequest); |
81,906 | public void scrutinize(TermedStatementEntityEdit update) {<NEW_LINE>if (update.isNew()) {<NEW_LINE>info(newItemType);<NEW_LINE>if (update.getLabels().isEmpty() && update.getLabelsIfNew().isEmpty() && update.getAliases().isEmpty()) {<NEW_LINE>QAWarning issue = new QAWarning(noLabelType, null, QAWarning.Severity.CRITICAL... | QAWarning.Severity.WARNING, 1); |
609,853 | private void handleConnectionRetry(Node node, ClientConnectionStrategyConfig strategyConfig) {<NEW_LINE>ConnectionRetryConfig connectionRetryConfig = new ConnectionRetryConfig();<NEW_LINE>String initialBackoffMillis = "initial-backoff-millis";<NEW_LINE>String maxBackoffMillis = "max-backoff-millis";<NEW_LINE>String mul... | jitter, getTextContent(child))); |
1,682,348 | public Observable<ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders>> listNextSinglePageAsync(final String nextPageLink) {<NEW_LINE>if (nextPageLink == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");<NEW_LINE>}<NEW_LINE>final TaskListNextOptions t... | , result.response())); |
750,429 | // https://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/ScrollEvent.html<NEW_LINE>protected void fxScrollEvent(ScrollEvent fxEvent) {<NEW_LINE>// the number of steps/clicks on the wheel for a mouse wheel event.<NEW_LINE>int count = (int) -(fxEvent.getDeltaY() / fxEvent.getMultiplierY());<NEW_LINE>int action =... | (int) fxEvent.getX(); |
1,548,998 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {<NEW_LINE>JsonObject input = InputParser.parseJsonObjectOrThrowError(req);<NEW_LINE>String email = InputParser.parseStringOrThrowError(input, "email", false);<NEW_LINE>String password = InputParser.parseStringO... | result.addProperty("status", "EMAIL_ALREADY_EXISTS_ERROR"); |
838,577 | private static StopReport calculateStop(ArrayList<Position> positions, int startIndex, int endIndex, boolean ignoreOdometer) {<NEW_LINE>Position startStop = positions.get(startIndex);<NEW_LINE>Position endStop = positions.get(endIndex);<NEW_LINE>StopReport stop = new StopReport();<NEW_LINE>long deviceId = startStop.get... | setStartTime(startStop.getFixTime()); |
173,603 | public static Pair<IDebugger, Integer> findBreakpoint(final BackEndDebuggerProvider debuggerProvider, final int row) {<NEW_LINE>Preconditions.checkNotNull(debuggerProvider, "IE01336: Debugger provider argument can't be null");<NEW_LINE>Preconditions.checkArgument(row >= 0, "IE01337: Row arguments can not be negative");... | >(debugger, row - breakpoints); |
380,939 | private void downloadJobAlert() {<NEW_LINE>// prompt for input params<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());<NEW_LINE>View view = View.inflate(getActivity(), R.layout.sample_cachemgr_input, null);<NEW_LINE>BoundingBox boundingBox = mMapView.getBoundingBox();<NEW_LINE>zoom_max = v... | findViewById(R.id.cache_north); |
1,608,427 | private void internalDeleteNodeByNameFromStepModel(JsonNode stepsNode, String propertyName) {<NEW_LINE>if (stepsNode == null || !stepsNode.isArray()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (JsonNode jsonNode : stepsNode) {<NEW_LINE>ObjectNode stepNode = (ObjectNode) jsonNode;<NEW_LINE>if (stepNode.has(propertyName)... | ArrayNode) stepNode.get("choices"); |
755,181 | private // ;<NEW_LINE>PropertyValue function() throws IOException {<NEW_LINE>// System.out.println("function()");<NEW_LINE>PropertyValue result = null;<NEW_LINE>Token t = next();<NEW_LINE>if (t == Token.TK_FUNCTION) {<NEW_LINE>String f = getTokenValue(t);<NEW_LINE>skip_whitespace();<NEW_LINE>List<PropertyValue> params ... | CSSParseException("The current output device does not support CMYK colors", getCurrentLine()); |
438,772 | public static void createShowTrackItem(LinearLayout showTrackContainer, AppCompatImageView trackAppearanceIcon, Integer showTrackId, final Fragment target, final boolean nightMode, final Runnable hideOnClickButtonAppearance) {<NEW_LINE>FragmentActivity activity = target.getActivity();<NEW_LINE>if (activity == null) {<N... | getGpxFile(), checked, false); |
1,849,760 | private static void initMsTimezones() {<NEW_LINE>try (Scanner scanner = new Scanner(TzHelper.class.getResourceAsStream(MS_TIMEZONES_FILE))) {<NEW_LINE>while (scanner.hasNext()) {<NEW_LINE>String[] arr = scanner.nextLine().split("=");<NEW_LINE>String standardTzId = arr[1];<NEW_LINE>String[] displayNameAndMsTzId = arr<MA... | [0].split(";"); |
1,658,083 | protected void installApkFiles(ApkSource aApkSource) {<NEW_LINE>cleanOldSessions();<NEW_LINE>PackageInstaller.Session session = null;<NEW_LINE>try (ApkSource apkSource = aApkSource) {<NEW_LINE>PackageInstaller.SessionParams sessionParams = new PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INST... | getOngoingInstallation().getId()); |
790,652 | protected void onPostExecute(AccessToken accessToken) {<NEW_LINE>try {<NEW_LINE>// Shared Preferences<NEW_LINE>SharedPreferences.Editor e = sharedPrefs.edit();<NEW_LINE>Log.v("logging_in", "this is what the token should be: " + accessToken.getToken());<NEW_LINE>if (sharedPrefs.getInt("current_account", 1) == 1) {<NEW_L... | (R.string.initial_sync)); |
1,606,769 | public SingularityCreateResult saveDeploy(SingularityRequest request, SingularityDeployMarker deployMarker, SingularityDeploy deploy) {<NEW_LINE>createDeployIfNotExists(request, deployMarker, deploy);<NEW_LINE>LOG.info("Creating deploy {}", deployMarker);<NEW_LINE>singularityEventListener.deployHistoryEvent(new Singula... | .get().getActiveDeploy(); |
106,262 | final DescribeMetricCollectionTypesResult executeDescribeMetricCollectionTypes(DescribeMetricCollectionTypesRequest describeMetricCollectionTypesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeMetricCollectionTypesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,481,463 | public TagValues unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TagValues tagValues = new TagValues();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token =... | String currentParentElement = context.getCurrentParentElement(); |
706,483 | /*<NEW_LINE>* @see com.sitewhere.microservice.api.event.IDeviceEventManagement#<NEW_LINE>* listDeviceMeasurementsForIndex(com.sitewhere.spi.device.event.<NEW_LINE>* DeviceEventIndex, java.util.List,<NEW_LINE>* com.sitewhere.spi.search.IDateRangeSearchCriteria)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public ISearchResul... | Collectors.joining("|"))); |
1,172,653 | private boolean insertJobExecutionEventWhenSuccess(final JobExecutionEvent jobExecutionEvent) {<NEW_LINE>boolean result = false;<NEW_LINE>try (Connection connection = dataSource.getConnection();<NEW_LINE>PreparedStatement preparedStatement = connection.prepareStatement(sqlMapper.getInsertForJobExecutionLogForComplete()... | ().getTime())); |
957,896 | public Region loadRegionFromArchive(int i) throws IOException {<NEW_LINE>int x = i >> 8;<NEW_LINE>int y = i & 0xFF;<NEW_LINE>Storage storage = store.getStorage();<NEW_LINE>Archive map = index.findArchiveByName("m" + x + "_" + y);<NEW_LINE>Archive land = index.findArchiveByName("l" + x + "_" + y);<NEW_LINE>assert (map =... | debug("Can't decrypt region " + i, ex); |
609,241 | protected int chooseNext(List<PatternTriple> pTriples) {<NEW_LINE>if (DEBUG) {<NEW_LINE>int i = -1;<NEW_LINE>StringBuilder buff = new StringBuilder();<NEW_LINE>for (PatternTriple pt : pTriples) {<NEW_LINE>i++;<NEW_LINE>if (pt == null) {<NEW_LINE>buff.append(String.format(" %d : null\n", i));<NEW_LINE>contin... | (pTriples.get(idx)); |
777,827 | private // under the /lib directory.<NEW_LINE>boolean scanLibDir(ReadableArchive archive, String libLocation, DeploymentContext context) {<NEW_LINE>boolean entryPresent = false;<NEW_LINE>if (libLocation != null && !libLocation.isEmpty()) {<NEW_LINE>Enumeration<String> <MASK><NEW_LINE>while (entries.hasMoreElements() &&... | entries = archive.entries(libLocation); |
1,090,854 | public FacesRecognitionResponseDto processImage(ProcessImageParams processImageParams) {<NEW_LINE>Object predictionCountObj = processImageParams.<MASK><NEW_LINE>Integer predictionCount = (Integer) predictionCountObj;<NEW_LINE>if (predictionCount == 0 || predictionCount < -1) {<NEW_LINE>throw new IncorrectPredictionCoun... | getAdditionalParams().get(PREDICTION_COUNT); |
271,316 | protected void writeFiles(Encoder encoder, ImmutableList<? extends ComponentArtifactMetadata> artifacts) throws IOException {<NEW_LINE>int fileArtifactsCount = (int) artifacts.stream().filter(a -> a instanceof UrlBackedArtifactMetadata).count();<NEW_LINE>int ivyArtifactsCount = artifacts.size() - fileArtifactsCount;<NE... | writeString(uid.getVersion()); |
959,346 | public void render(TileMarkerVolume marker, double tileX, double tileY, double tileZ, float partialTicks, int destroyStage, float alpha) {<NEW_LINE>if (marker == null || !marker.isShowingSignals())<NEW_LINE>return;<NEW_LINE>Minecraft.getMinecraft(<MASK><NEW_LINE>Minecraft.getMinecraft().mcProfiler.startSection("marker"... | ).mcProfiler.startSection("bc"); |
359,138 | public void configure(Parameterization config) {<NEW_LINE>//<NEW_LINE>//<NEW_LINE>new IntParameter(KMeans.K_ID).//<NEW_LINE>addConstraint(CommonConstraints.GREATER_THAN_ONE_INT).grab(config, x -> k = x);<NEW_LINE>ObjectParameter<KMeans<V, M>> kMeansVariantP = new ObjectParameter<>(KMEANS_ID, <MASK><NEW_LINE>if (config.... | KMeans.class, BestOfMultipleKMeans.class); |
513,765 | private boolean init(ViewHolder viewHolder, Message message) {<NEW_LINE>if (viewHolder.darkBackground) {<NEW_LINE>viewHolder.runtime.setTextAppearance(this.messageAdapter.getContext(), R.style.TextAppearance_Conversations_Caption_OnDark);<NEW_LINE>} else {<NEW_LINE>viewHolder.runtime.setTextAppearance(this.messageAdapt... | = viewHolder.playPause.getContext(); |
1,420,284 | public static DescribeIndexTemplateResponse unmarshall(DescribeIndexTemplateResponse describeIndexTemplateResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeIndexTemplateResponse.setRequestId(_ctx.stringValue("DescribeIndexTemplateResponse.RequestId"));<NEW_LINE>Result result = new Result();<NEW_LINE>result.setInde... | = new ArrayList<String>(); |
683,429 | public static DMRBurst create(DMRSyncPattern syncPattern, CorrectedBinaryMessage binaryMessage, CACH cach, long timestamp, int timeslot) {<NEW_LINE>switch(syncPattern) {<NEW_LINE>case BASE_STATION_VOICE:<NEW_LINE>case MOBILE_STATION_VOICE:<NEW_LINE>case BS_VOICE_FRAME_B:<NEW_LINE>case BS_VOICE_FRAME_C:<NEW_LINE>case BS... | binaryMessage, cach, timestamp, timeslot); |
1,500,508 | public void updateStoragePool(StoragePool storagePool, Map<String, String> details) {<NEW_LINE>String strCapacityBytes = details.get(PrimaryDataStoreLifeCycle.CAPACITY_BYTES);<NEW_LINE>String strCapacityIops = details.get(PrimaryDataStoreLifeCycle.CAPACITY_IOPS);<NEW_LINE>Long capacityBytes = strCapacityBytes != null ?... | getId(), SolidFireUtil.BURST_IOPS); |
1,768,501 | public void editorCreated(@Nonnull EditorFactoryEvent event) {<NEW_LINE>if (!Application.get().isSwingApplication()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Editor editor = event.getEditor();<NEW_LINE><MASK><NEW_LINE>Project editorProject = editor.getProject();<NEW_LINE>// worthBothering() checks for getCachedPsiFile, s... | Document document = editor.getDocument(); |
961,935 | void finishConnect(ConnectionRequest request) {<NEW_LINE>try {<NEW_LINE>if (request.channel.finishConnect()) {<NEW_LINE>if (SHOW_CONNECT_STATS) {<NEW_LINE>long queue_wait_time = request.connect_start_time - request.request_start_time;<NEW_LINE>long connect_time = SystemTime.getMonotonousTime() - request.connect_start_t... | int num_queued = new_requests.size(); |
702,049 | protected void encodeSortableHeaderOnReflow(FacesContext context, DataTable table) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>Map<SortMeta, String> headers = getSortableColumnHeaders(context, table);<NEW_LINE>if (!headers.isEmpty()) {<NEW_LINE>String reflowId = table.get... | ) + " " + sortOrderLabel, null); |
814,643 | private static InetSocketAddress analyzeProxy(URI uri) {<NEW_LINE>// NOI18N<NEW_LINE><MASK><NEW_LINE>List<Proxy> proxies = ProxySelector.getDefault().select(uri);<NEW_LINE>// NOI18N<NEW_LINE>assert proxies != null : "ProxySelector cannot return null for " + uri;<NEW_LINE>// NOI18N<NEW_LINE>assert !proxies.isEmpty() : "... | Parameters.notNull("uri", uri); |
620,203 | public S3ReferenceDataSourceDescription unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>S3ReferenceDataSourceDescription s3ReferenceDataSourceDescription = new S3ReferenceDataSourceDescription();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = o... | String currentParentElement = context.getCurrentParentElement(); |
269,340 | public static void main(String[] args) {<NEW_LINE>// store 5 roll nos<NEW_LINE>int[] numbers = new int[5];<NEW_LINE>// store 5 names<NEW_LINE>String[] names = new String[5];<NEW_LINE>// data of 5 students: {roll no, name, marks}<NEW_LINE>int[] rno = new int[5];<NEW_LINE>String[] name = new String[5];<NEW_LINE>float[] m... | out.println(random2.name); |
521,645 | public void onCreate(final Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE><MASK><NEW_LINE>binding = LogtrackableActivityBinding.bind(findViewById(R.id.logtrackable_activity_viewroot));<NEW_LINE>date.init(findViewById(R.id.date), findViewById(R.id.time), null, getSupportFragmentManage... | setThemeAndContentView(R.layout.logtrackable_activity); |
71,370 | final InviteMembersResult executeInviteMembers(InviteMembersRequest inviteMembersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(inviteMembersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,534,581 | // @Override<NEW_LINE>public ValueAnimator transitionToFrame(final Rect of, final FreeFlowItem nf, final View v) {<NEW_LINE>ValueAnimator anim = <MASK><NEW_LINE>anim.setDuration(cellPositionTransitionAnimationDuration);<NEW_LINE>anim.addUpdateListener(new AnimatorUpdateListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE... | ValueAnimator.ofFloat(0f, 1f); |
402,426 | private void encryptBlock(byte[] src, int srcIndex, byte[] dst, int dstIndex) {<NEW_LINE>int x0 = Pack.littleEndianToInt(src, srcIndex) ^ gSubKeys[INPUT_WHITEN];<NEW_LINE>int x1 = Pack.littleEndianToInt(src, srcIndex + 4) ^ gSubKeys[INPUT_WHITEN + 1];<NEW_LINE>int x2 = Pack.littleEndianToInt(src, srcIndex + 8) ^ gSubKe... | ], dst, dstIndex + 12); |
1,167,555 | protected void initializePrivilege(String restAdminId, String privilegeName) {<NEW_LINE>boolean restApiPrivilegeMappingExists = false;<NEW_LINE>Privilege privilege = idmIdentityService.createPrivilegeQuery().privilegeName(privilegeName).singleResult();<NEW_LINE>if (privilege != null) {<NEW_LINE>restApiPrivilegeMappingE... | privilege = idmIdentityService.createPrivilege(privilegeName); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.