idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
852,812 | public static void main(String[] args) throws IOException {<NEW_LINE>Set<String> alreadyZipped = new HashSet<>();<NEW_LINE>try (WebfilesWriter writer = new WebfilesWriter(Files.newByteChannel(Paths.get(args[0]), StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING), Deflater.BEST_SP... | get(args[i])); |
1,538,499 | public void actionPerformed(ActionEvent e) {<NEW_LINE>SoapUI.getThreadPool().execute(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>SubmitContext context <MASK><NEW_LINE>statusBar.setIndeterminate(true);<NEW_LINE>amfRequestTestStep.initAmfRequest(context);<NEW_LINE>if (context.getProperty(AMFRequest.A... | = new WsdlTestRunContext(getModelItem()); |
791,129 | private synchronized void loadSubscriptions(Context context) {<NEW_LINE>if (enabledExtensions != null && subscriptions != null && tokens != null) {<NEW_LINE>// already loaded subscriptions<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Timber.i("Loading extension subscriptions");<NEW_LINE>enabledExtensions = new ArrayList<>();<N... | Timber.e("Failed to restore subscription: %s", subscription); |
557,318 | private void updateSelectionToolbar() {<NEW_LINE>TimelineSupport support = model.getTimelineSupport();<NEW_LINE>selectAllButton.setEnabled(!support.isSelectAll());<NEW_LINE>clearTimestampSelectionButton.setEnabled(support.isTimestampSelection(false));<NEW_LINE>int startIndex = support.getStartIndex();<NEW_LINE>int endI... | startTime = support.getTimestamp(startIndex); |
1,601,047 | public Document mongoSerialise() {<NEW_LINE><MASK><NEW_LINE>dbObject.put("direction", getDirection().ordinal());<NEW_LINE>dbObject.put("hp", hp);<NEW_LINE>dbObject.put("shield", shield);<NEW_LINE>dbObject.put("action", lastAction.ordinal());<NEW_LINE>if (parent != null) {<NEW_LINE>// Only used client-side for now<NEW_L... | Document dbObject = super.mongoSerialise(); |
1,704,597 | // implement SqlValidator<NEW_LINE>public void declareCursor(SqlSelect select, SqlValidatorScope parentScope) {<NEW_LINE>cursorSet.add(select);<NEW_LINE>// add the cursor to a map that maps the cursor to its select based on<NEW_LINE>// the position of the cursor relative to other cursors in that call<NEW_LINE>FunctionP... | int numCursors = cursorMap.size(); |
530,373 | public String modelChange(PO po, int type) throws Exception {<NEW_LINE>log.info(po.get_TableName() + " Type: " + type);<NEW_LINE>if (po.get_TableName().equals(MOrder.Table_Name) && (type == ModelValidator.TYPE_AFTER_NEW || type == ModelValidator.TYPE_AFTER_CHANGE)) {<NEW_LINE>if (po == null)<NEW_LINE>return null;<NEW_L... | (MOrder) line.getC_Order(); |
134,568 | private SourceViewer createSourcePanel(Composite parent, Source source) {<NEW_LINE>Group group = createGroup(parent, source.label);<NEW_LINE>SourceViewer viewer = new SourceViewer(group, null, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);<NEW_LINE>StyledText textWidget = viewer.getTextWidget();<NEW_LINE>viewer... | viewer.doOperation(ITextOperationTarget.REDO); |
790,172 | void storeLibraries(Project project, Library.Version[] libraries) throws IOException {<NEW_LINE>Arrays.sort(libraries, new LibraryVersionComparator());<NEW_LINE>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>try {<NEW_LINE>DocumentBuilder builder = factory.newDocumentBuilder();<NEW_LINE... | libraryElement.setAttribute(ATTR_VERSION_NAME, versionName); |
1,631,936 | private String doExecRequest(String anItem, String lightId) {<NEW_LINE>log.debug("Executing request: " + anItem);<NEW_LINE>String responseString = null;<NEW_LINE>if (anItem != null && !anItem.equalsIgnoreCase("")) {<NEW_LINE>try {<NEW_LINE>Process p = Runtime.getRuntime().exec(anItem);<NEW_LINE>log.debug("Process runni... | + lightId + "\",\"description\": \"Error on calling out to device\", \"parameter\": \"/lights/" + lightId + "/state\"}}]"; |
1,238,439 | private static Set<String> loadRevisionSet() {<NEW_LINE>ImmutableSet.Builder<String> revisions = ImmutableSet.builder();<NEW_LINE>InputStream input = <MASK><NEW_LINE>if (input != null) {<NEW_LINE>try (Reader reader = new InputStreamReader(input, Charsets.UTF_8);<NEW_LINE>BufferedReader lines = new BufferedReader(reader... | LenskitInfo.class.getResourceAsStream("/META-INF/lenskit/git-commits.lst"); |
849,364 | public void buildSearchJs(List<RpcApiDoc> apiDocList, ApiConfig config, JavaProjectBuilder javaProjectBuilder, String template, String outPutFileName) {<NEW_LINE>List<ApiErrorCode> errorCodeList = DocUtil.errorCodeDictToList(config);<NEW_LINE>Template tpl = BeetlTemplateUtil.getByName(template);<NEW_LINE>// directory t... | apiDocs.size() + 1); |
637,461 | public static ListVehicleTopResponse unmarshall(ListVehicleTopResponse listVehicleTopResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVehicleTopResponse.setRequestId(_ctx.stringValue("ListVehicleTopResponse.RequestId"));<NEW_LINE>listVehicleTopResponse.setCode(_ctx.stringValue("ListVehicleTopResponse.Code"));<NEW_LIN... | ("ListVehicleTopResponse.Data[" + i + "].Frequency")); |
1,824,892 | public void startPinot() throws Exception {<NEW_LINE>System.out.println("Using table name " + TABLE_NAME);<NEW_LINE>System.out.println("Using data directory " + DATA_DIRECTORY);<NEW_LINE>System.out.println("Starting pinot");<NEW_LINE>PerfBenchmarkDriverConf conf = new PerfBenchmarkDriverConf();<NEW_LINE>conf.setStartBr... | sleepUninterruptibly(10, TimeUnit.SECONDS); |
284,948 | public void run() throws IOException {<NEW_LINE>SignalHandler prevWinchHandler = terminal.handle(Signal.WINCH, this::resize);<NEW_LINE>SignalHandler prevIntHandler = terminal.handle(Signal.INT, this::interrupt);<NEW_LINE>SignalHandler prevSuspHandler = terminal.handle(Signal.TSTP, this::suspend);<NEW_LINE>Attributes at... | active().getConsole()); |
1,666,663 | public void closeElement(String element, HashMap<String, String> attributes, String content, WarningSet warnings) throws SAXException {<NEW_LINE>content = content.trim();<NEW_LINE>if (element.equals("type")) {<NEW_LINE>// Motor type<NEW_LINE>type = null;<NEW_LINE>for (Motor.Type t : Motor.Type.values()) {<NEW_LINE>if (... | element, attributes, content, warnings); |
270,745 | public void relocate(MachoRelocation relocation) throws MemoryAccessException, NotFoundException {<NEW_LINE>if (!relocation.requiresRelocation()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RelocationInfo relocationInfo = relocation.getRelocationInfo();<NEW_LINE>Address targetAddr = relocation.getTargetAddress();<NEW_LINE>l... | (value >> 12) & 0x3ff; |
1,477,848 | // -- Writer --------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public void write(ByteBuffer byteBuffer, CompletionHandler<ByteBuffer> handler) {<NEW_LINE>// No queueing if there is no subscriber<NEW_LINE>if (subscriber == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Nothing r... | new QueuedBuffer(byteBuffer, handler)); |
1,202,692 | public void run() {<NEW_LINE>ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();<NEW_LINE>OutputStream outputStream = byteArrayOutputStream;<NEW_LINE>// TODO: intelligent size<NEW_LINE>// a multiple of 4 and of 6, to support 16- and 24-bit stereo as well<NEW_LINE>byte[<MASK><NEW_LINE>AudioFormat ... | ] abBuffer = new byte[65532]; |
1,066,575 | public void marshall(StreamInfo streamInfo, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (streamInfo == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(streamInfo.getDeviceName(), DEVICENAME_BINDING);<NEW_L... | e.getMessage(), e); |
810,497 | // TODO(kstanger): Figure out if this can replace TypeUtil.getSignatureName().<NEW_LINE>private void genTypeSignature(TypeMirror type, StringBuilder sb) {<NEW_LINE>switch(type.getKind()) {<NEW_LINE>case BOOLEAN:<NEW_LINE>case BYTE:<NEW_LINE>case CHAR:<NEW_LINE>case DOUBLE:<NEW_LINE>case FLOAT:<NEW_LINE>case INT:<NEW_LI... | .replace('.', '/')); |
1,672,226 | private void resolveAdmin(MethodRabbitListenerEndpoint endpoint, RabbitListener rabbitListener, Object adminTarget) {<NEW_LINE>Object resolved = resolveExpression(rabbitListener.admin());<NEW_LINE>if (resolved instanceof AmqpAdmin) {<NEW_LINE>endpoint.setAdmin((AmqpAdmin) resolved);<NEW_LINE>} else {<NEW_LINE>String ra... | rabbitListener.admin(), "admin"); |
137,849 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.impetus.kundera.client.Client#findIdsByColumn(java.lang.String,<NEW_LINE>* java.lang.String, java.lang.String, java.lang.Object, java.lang.Class)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public Object[] findIdsByColumn(String schemaName, String tableName, String... | false, false).getOperator(); |
1,484,218 | final ExportConfigurationsResult executeExportConfigurations(ExportConfigurationsRequest exportConfigurationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(exportConfigurationsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<Expor... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
201,166 | private void syncCommonConfig() {<NEW_LINE>PowerUnits.TR.conversionRatio = COMMON.powerRatioTechReborn.get();<NEW_LINE>PowerMultiplier.CONFIG.multiplier = COMMON.powerUsageMultiplier.get();<NEW_LINE>CondenserOutput.MATTER_BALLS.requiredPower = COMMON.condenserMatterBallsPower.get();<NEW_LINE>CondenserOutput.SINGULARITY... | = COMMON.chargedStaffBattery.get(); |
1,366,846 | private void sendRaidLayoutMessage() {<NEW_LINE>final String layout = getRaid().getLayout().toCodeString();<NEW_LINE>final String rooms = getRaid().toRoomString();<NEW_LINE>final String raidData = "[" + layout + "]: " + rooms;<NEW_LINE>final String layoutMessage = new ChatMessageBuilder().append(ChatColorType.HIGHLIGHT... | (layoutMessage).build()); |
1,556,564 | private ProducerInfo buildProducerInfo(Method method) {<NEW_LINE>Class<?>[] parameterTypes = method.getParameterTypes();<NEW_LINE>if (parameterTypes.length == 0 || parameterTypes.length > 2) {<NEW_LINE>throw new IllegalStateException("Producer method must have at least one and at most two parameters: " + Consumer.class... | method.getName(), e); |
306,515 | public static void emit(org.xml.sax.ContentHandler contentHandler, nu.validator.servlet.VerifierServletTransaction t) throws org.xml.sax.SAXException {<NEW_LINE>org.xml.sax.helpers.AttributesImpl __attrs__ = new org.xml.sax.helpers.AttributesImpl();<NEW_LINE>contentHandler.startPrefixMapping("", "http://www.w3.org/1999... | "http://www.w3.org/1999/xhtml", "p", "p", __attrs__); |
1,075,282 | public Void visitAsPathMatchExprReference(AsPathMatchExprReference asPathMatchExprReference, AsPathStructuresVerifierContext arg) {<NEW_LINE><MASK><NEW_LINE>if (arg._verifiedAsPathMatchExprReferences.contains(name)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (arg._asPathMatchExprReferenceStack.contains(name)) {<NEW... | String name = asPathMatchExprReference.getName(); |
160,052 | public ColumnVector upperBound(Table valueTable, OrderByArg... args) {<NEW_LINE>boolean[] areNullsSmallest = new boolean[args.length];<NEW_LINE>boolean[] descFlags = new boolean[args.length];<NEW_LINE>ColumnVector[] inputColumns = new ColumnVector[args.length];<NEW_LINE>ColumnVector[] searchColumns = new ColumnVector[a... | ] = args[i].isDescending; |
1,775,159 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>group = new javax.swing.ButtonGroup();<NEW_LINE>sourceButton = new javax.swing.JRadioButton();<NEW_LINE>targetButton = new ... | new java.awt.GridBagConstraints(); |
993,443 | final RunTaskResult executeRunTask(RunTaskRequest runTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(runTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Reques... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
752,841 | public void marshall(MonitoringScheduleSummary monitoringScheduleSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (monitoringScheduleSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(monitorin... | monitoringScheduleSummary.getMonitoringType(), MONITORINGTYPE_BINDING); |
78,150 | public int compare(City lhs, City rhs) {<NEW_LINE>final String part = getFilter().toString();<NEW_LINE>int <MASK><NEW_LINE>if (compare != 0) {<NEW_LINE>return compare;<NEW_LINE>}<NEW_LINE>boolean st1 = CollatorStringMatcher.cmatches(cs, lhs.getName(lang, transliterate), part, startsWith);<NEW_LINE>boolean st2 = Collato... | compare = compareCityType(lhs, rhs); |
781,464 | public static GetChatappTemplateDetailResponse unmarshall(GetChatappTemplateDetailResponse getChatappTemplateDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>getChatappTemplateDetailResponse.setRequestId(_ctx.stringValue("GetChatappTemplateDetailResponse.RequestId"));<NEW_LINE>getChatappTemplateDetailResponse.setCo... | (_ctx.stringValue("GetChatappTemplateDetailResponse.Data.Name")); |
800,129 | private void reinitFonts() {<NEW_LINE>EditorColorsScheme delegate = getDelegate();<NEW_LINE>String editorFontName = getEditorFontName();<NEW_LINE>int editorFontSize = getEditorFontSize();<NEW_LINE>updatePreferences(myFontPreferences, editorFontName, editorFontSize, delegate == null ? null : delegate.getFontPreferences(... | , Font.BOLD, consoleFontSize)); |
1,216,430 | public static String toTimecode(long duration, TimeUnit units) {<NEW_LINE>// FIXME Negative durations are also supported.<NEW_LINE>// https://www.ffmpeg.org/ffmpeg-utils.html#Time-duration<NEW_LINE>checkArgument(duration >= 0, "duration must be positive");<NEW_LINE>// TODO This will clip at Long.MAX_VALUE<NEW_LINE>long... | nanoseconds - SECONDS.toNanos(seconds); |
1,298,732 | private synchronized static void initGlobalSecuritySettings() {<NEW_LINE>globalSensitiveInformationExposureTokens = new SettingsTestPropertyHolder(SoapUI.getSettings(<MASK><NEW_LINE>String propFile = System.getProperty("soapui.security.exposure.tokens");<NEW_LINE>if (StringUtils.hasContent(propFile)) {<NEW_LINE>globalS... | ), null, GlobalPropertySettings.SECURITY_CHECKS_PROPERTIES); |
804,448 | private Request.Builder prepareRequest() {<NEW_LINE>final Request.Builder builder = new Request.Builder();<NEW_LINE>// Uri<NEW_LINE>final String finalUri = uriBase == null ? uri : uriBase + uri;<NEW_LINE>final HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(finalUri)).newBuilder();<NEW_LINE>if (!uriPa... | encodedQuery(uriParams.toString()); |
541,075 | private void printWeighted() {<NEW_LINE><MASK><NEW_LINE>out.print("\t@Override\n" + "\tprotected double computeWeightedScore(int c_x, int c_y)\n" + "\t{\n" + "\t\tfloat sumX=0,sumY=0;\n" + "\t\t\n" + "\t\tfor( int y = rect.y0; y < rect.y1; y++ ) {\n" + "\t\t\tint indexX = derivX.startIndex + derivX.stride*y + rect.x0;\... | String bitWise = imageType.getBitWise(); |
933,830 | public void marshall(Mpeg2Settings mpeg2Settings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (mpeg2Settings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(mpeg2Settings.getAdaptiveQuantization(), ADAP... | mpeg2Settings.getScanType(), SCANTYPE_BINDING); |
1,207,758 | private void createTimer() {<NEW_LINE>final Icon[<MASK><NEW_LINE>// NOI18N<NEW_LINE>for (int i = 0; i < busyIcons.length; i++) busyIcons[i] = new ImageIcon(getClass().getResource("/org/graalvm/visualvm/core/ui/resources/busy-icon" + i + ".png"));<NEW_LINE>busyIconTimer = new Timer(ANIMATION_RATE, new ActionListener() {... | ] busyIcons = new Icon[15]; |
1,403,669 | protected void executeActivityBehavior(ActivityBehavior activityBehavior, FlowNode flowNode) {<NEW_LINE>LOGGER.debug("Executing activityBehavior {} on activity '{}' with execution {}", activityBehavior.getClass(), flowNode.getId(), execution.getId());<NEW_LINE>ProcessEngineConfigurationImpl processEngineConfiguration =... | activityWithMigrationContextBehavior.execute(execution, migrationContext); |
1,413,289 | public void mergeRange(Range old, Range range) {<NEW_LINE>long totalCountSum = old.getCount() + range.getCount();<NEW_LINE>if (totalCountSum > 0) {<NEW_LINE>double line50Values = old.getLine50Value() * old.getCount() + range.getLine50Value() * range.getCount();<NEW_LINE>double line90Values = old.getLine90Value() * old.... | old.setLine95Value(line95Values / totalCountSum); |
1,599,562 | public Optional<ForgottenPasswordStage> nextStage(final ForgottenPasswordStateMachine stateMachine) throws PwmUnrecoverableException {<NEW_LINE>final ForgottenPasswordBean forgottenPasswordBean = stateMachine.getForgottenPasswordBean();<NEW_LINE>final PwmRequestContext pwmRequestContext = stateMachine.getRequestContext... | SessionLabel sessionLabel = pwmRequestContext.getSessionLabel(); |
325,611 | public void marshall(CreateProjectRequest createProjectRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createProjectRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createProjectRequest.get... | createProjectRequest.getTags(), TAGS_BINDING); |
1,580,406 | final DescribeConfigRuleEvaluationStatusResult executeDescribeConfigRuleEvaluationStatus(DescribeConfigRuleEvaluationStatusRequest describeConfigRuleEvaluationStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeConfigRuleEvaluationStatusRequest);<NEW_LINE>AWSRequestMetrics awsRe... | false), new DescribeConfigRuleEvaluationStatusResultJsonUnmarshaller()); |
1,986 | public GetBlueprintRunsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetBlueprintRunsResult getBlueprintRunsResult = new GetBlueprintRunsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken tok... | String currentParentElement = context.getCurrentParentElement(); |
1,805,763 | protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException {<NEW_LINE>super.performLiquibaseTask(liquibase);<NEW_LINE>switch(type) {<NEW_LINE>case COUNT:<NEW_LINE>{<NEW_LINE>liquibase.rollback(rollbackCount, rollbackScript, new Contexts(contexts), new LabelExpression(labels));<NEW_LINE>break;<NE... | throw new IllegalStateException("Unexpected rollback type, " + type); |
1,292,012 | public boolean isSameRM(final XAResource other) throws XAException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && XA_RESOURCE_TRACE.isEntryEnabled()) {<NEW_LINE>SibTr.entry(this, XA_RESOURCE_TRACE, "isSameRM", other);<NEW_LINE>}<NEW_LINE>final boolean sameRm;<NEW_LINE>// Unwrap the other XAResource if is one of... | final SibRaXaResource otherSibRaXaResource = (SibRaXaResource) other; |
1,131,699 | final UpdateDataSourceResult executeUpdateDataSource(UpdateDataSourceRequest updateDataSourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDataSourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
782,817 | private Supplier<LogPosition> closePositionSupplier() throws IOException {<NEW_LINE>if (lastClosedPositionSupplier != null) {<NEW_LINE>return lastClosedPositionSupplier;<NEW_LINE>}<NEW_LINE>if (transactionIdStore != null) {<NEW_LINE>return () -> transactionIdStore.getLastClosedTransaction().getLogPosition();<NEW_LINE>}... | requireNonNull(pageCache, "Read only log files require page cache to be able to read committed " + "transaction info from store store."); |
306,050 | public StepExecutionResult execute(ExecutionContext context) throws IOException, InterruptedException {<NEW_LINE>if (dryRunResultsPath.isPresent()) {<NEW_LINE>NSDictionary dryRunResult = new NSDictionary();<NEW_LINE>dryRunResult.put("relative-path-to-sign", dryRunResultsPath.get().getParent().relativize(pathToSign).toS... | (codeSignIdentitySupplier.get())); |
467,629 | private void handleStart(Intent intent) {<NEW_LINE>NotificationManager notificationManager = (NotificationManager) this.getApplicationContext().getSystemService(NOTIFICATION_SERVICE);<NEW_LINE>int id = intent.getIntExtra(ConstantStrings.SESSION, 0);<NEW_LINE>String session_date;<NEW_LINE>Session session = realmRepo.get... | , session.getEndsAt())); |
1,592,955 | public void init(Configuration conf, ParameterServerId[] psIds) {<NEW_LINE>int serverNum = conf.getInt(AngelConf.ANGEL_PS_NUMBER, AngelConf.DEFAULT_ANGEL_PS_NUMBER);<NEW_LINE>maxInflightRPCNumPerServer.set(conf.getInt(AngelConf<MASK><NEW_LINE>for (int i = 0; i < psIds.length; i++) {<NEW_LINE>serverInflightRPCCounters.p... | .ANGEL_MATRIXTRANSFER_MAX_REQUESTNUM_PERSERVER, AngelConf.DEFAULT_ANGEL_MATRIXTRANSFER_MAX_REQUESTNUM_PERSERVER)); |
1,013,891 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,018,625 | public final void allGatherv(Object sendbuf, int sendcount, Datatype sendtype, Object recvbuf, int[] recvcount, int[] displs, Datatype recvtype) throws MPIException {<NEW_LINE>MPI.check();<NEW_LINE>int sendoff = 0, recvoff = 0;<NEW_LINE>boolean sdb = false, rdb = false;<NEW_LINE>if (sendbuf instanceof Buffer && !(sdb =... | sendoff = sendtype.getOffset(sendbuf); |
1,802,819 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.impetus.kundera.client.Client#findAll(java.lang.Class,<NEW_LINE>* java.lang.Object[])<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public <E> List<E> findAll(Class<E> entityClass, String[] columnsToSelect, Object... keys) {<NEW_LINE>Object connection = getConnection... | entityClass, key, connection, null); |
849,894 | public void textureStitchPost(TextureStitchEvent.Post event) {<NEW_LINE>flowingRenderCache.clear();<NEW_LINE>stillRenderCache.clear();<NEW_LINE>frozenRenderCache.clear();<NEW_LINE>TextureMap map = event.getMap();<NEW_LINE>missingIcon = map.getMissingSprite();<NEW_LINE>textureMap.clear();<NEW_LINE>for (FluidType type : ... | <Fluid, TextureAtlasSprite>()); |
503,406 | protected static void fromHistoricVariableUpdate(HistoricVariableUpdateDto dto, HistoricVariableUpdate historicVariableUpdate) {<NEW_LINE>dto.revision = historicVariableUpdate.getRevision();<NEW_LINE>dto.variableName = historicVariableUpdate.getVariableName();<NEW_LINE>dto.variableInstanceId = historicVariableUpdate.ge... | toRestApiTypeName(historicVariableUpdate.getTypeName()); |
460,535 | public static void updateHeadingsInMarkdownFile(File inputFile, File outputFile, String extensionRepositoryName, String latestDocumentationVersion, List<NamespaceMetaData> namespaceMetaDataList, String groupId, String siddhiVersion) throws MojoFailureException {<NEW_LINE>// Retrieving the content of the README.md file<... | ), outputFile.getName()); |
844,949 | public static void calcLinePointConfined(float x, float y, float x2, float y2, float left, float right, float top, float bottom, float[] out) {<NEW_LINE>float w <MASK><NEW_LINE>float h = y2 < y ? top : bottom;<NEW_LINE>float k = (float) Math.atan2(h, w);<NEW_LINE>float sigx = Math.signum(x2 - x);<NEW_LINE>float sigy = ... | = x2 > x ? right : left; |
1,490,707 | public InteractionResult useOn(UseOnContext context) {<NEW_LINE>Level world = context.getLevel();<NEW_LINE><MASK><NEW_LINE>BlockEntity tileEntity = world.getBlockEntity(pos);<NEW_LINE>TargetingInfo target = new TargetingInfo(context.getClickedFace(), (float) context.getClickLocation().x, (float) context.getClickLocatio... | BlockPos pos = context.getClickedPos(); |
912,634 | /*<NEW_LINE>* get all records for duplicate records<NEW_LINE>*/<NEW_LINE>private String concatFields(Class<?> modelClass, Set<String> fieldSet) throws AxelorException {<NEW_LINE>StringBuilder fields = new StringBuilder("LOWER(concat(");<NEW_LINE>Mapper <MASK><NEW_LINE>int count = 0;<NEW_LINE>for (String field : fieldSe... | mapper = Mapper.of(modelClass); |
540,958 | public void handle(final HttpRequest callbackRequest) {<NEW_LINE>if (MockServerLogger.isEnabled(TRACE)) {<NEW_LINE>mockServerLogger.logEvent(new LogEntry().setLogLevel(TRACE).setHttpRequest(request).setMessageFormat("received request over websocket{}from client " + clientId + " for correlationId " + webSocketCorrelatio... | responseWriter, callbackRequest, httpObjectCallback, synchronous); |
1,630,413 | private void updateDisplay(CleanupPreset preset) {<NEW_LINE>cleanUpDOI.setSelected(preset.isActive(CleanupPreset.CleanupStep.CLEAN_UP_DOI));<NEW_LINE>cleanUpEprint.setSelected(preset.isActive(CleanupPreset.CleanupStep.CLEANUP_EPRINT));<NEW_LINE>if (!cleanUpMovePDF.isDisabled()) {<NEW_LINE>cleanUpMovePDF.setSelected(pre... | setSelected(preset.isRenamePDFActive()); |
434,875 | private // end of commit().<NEW_LINE>void validateTree(Map<Object, ElementInfo> elementToInfoMap) {<NEW_LINE>// We need a tree, not a forest.<NEW_LINE>HashSet<Object> rootElements = new HashSet<>();<NEW_LINE>for (Map.Entry<Object, ElementInfo> entry : elementToInfoMap.entrySet()) {<NEW_LINE>final Object element = entry... | childElementInfo = elementToInfoMap.get(childElement); |
1,598,804 | private void createValidationEntry(Business business, Model model, WorkCompleted workCompleted, InBag inBag, OutBag outBag, TreeSet<String> inValues, TreeSet<String> outValues) throws Exception {<NEW_LINE>Entry entry = new Entry();<NEW_LINE>entry.setType(Entry.TYPE_VALIDATION);<NEW_LINE>entry.setInValueLabelList(new Ar... | setInValueCount(inValues.size()); |
1,307,829 | public static InstalledCode compileAndInstallMethod(StructuredGraph graph) {<NEW_LINE>ResolvedJavaMethod method = graph.method();<NEW_LINE>GraalJVMCICompiler graalCompiler = (GraalJVMCICompiler) JVMCI.getRuntime().getCompiler();<NEW_LINE>RuntimeProvider capability = graalCompiler.getGraalRuntime().getCapability(Runtime... | .getSuites().getDefaultGraphBuilderSuite(); |
481,976 | protected Element generateLinkElement(final Link link) {<NEW_LINE>final Namespace namespace = getFeedNamespace();<NEW_LINE>final Element linkElement = new Element("link", namespace);<NEW_LINE>final String rel = link.getRel();<NEW_LINE>if (rel != null) {<NEW_LINE>final Attribute relAttribute = new Attribute("rel", rel);... | = new Attribute("type", type); |
763,116 | public void marshall(BaiduChannelResponse baiduChannelResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (baiduChannelResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(baiduChannelResponse.get... | baiduChannelResponse.getHasCredential(), HASCREDENTIAL_BINDING); |
475,432 | DemangledObject build() {<NEW_LINE>//<NEW_LINE>// An example to follow along with:<NEW_LINE>//<NEW_LINE>// 'overloaded operator' syntax is:<NEW_LINE>// [return_type] operator<operator_chars>[templates](parameters)<NEW_LINE>//<NEW_LINE>// Namespace::Class::operator Namespace::Type()<NEW_LINE>//<NEW_LINE>// NS1::operator... | = (DemangledFunction) parseFunctionOrVariable(fixedFunction); |
1,488,377 | public BoundingBox extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel) {<NEW_LINE>final BoundingBox bb = BoundingBox.fromGeoPoints(geoPoints);<NEW_LINE>final int right = MapView.getTileSystem().getTileXFromLongitude(bb.getLonEast(), minZoomLevel);<NEW_LINE>final int bottom = MapView.getTileSyst... | bb.getLatNorth(), minZoomLevel); |
1,019,621 | public void onReceive(FlipperObject params, FlipperResponder responder) {<NEW_LINE>GetTableStructureRequest getTableStructureRequest = ObjectMapper.flipperObjectToGetTableStructureRequest(params);<NEW_LINE>if (getTableStructureRequest == null) {<NEW_LINE>responder.error(ObjectMapper.toErrorFlipperObject(DatabasesErrorC... | .ERROR_INVALID_REQUEST, DatabasesErrorCodes.ERROR_INVALID_REQUEST_MESSAGE)); |
294,037 | private int findOtherSubMessage(int partIndex) {<NEW_LINE>int count = msgPattern.countParts();<NEW_LINE>MessagePattern.Part part = msgPattern.getPart(partIndex);<NEW_LINE>if (part.getType().hasNumericValue()) {<NEW_LINE>++partIndex;<NEW_LINE>}<NEW_LINE>// Iterate over (ARG_SELECTOR [ARG_INT|ARG_DOUBLE] message) tuples<... | == MessagePattern.Part.Type.ARG_SELECTOR; |
1,300,476 | private void writeToMappingAndBodyFile(Request request, Response response, RequestPattern requestPattern) {<NEW_LINE>String fileId = idGenerator.generate();<NEW_LINE>byte[] body = bodyDecompressedIfRequired(response);<NEW_LINE>String mappingFileName = UniqueFilenameGenerator.generate(request.getUrl(), "mapping", fileId... | .getContentTypeHeader(), body)); |
521,472 | public ModelAndView process(ModelMap map, HttpServletRequest request, @Valid final String id) {<NEW_LINE>AgentServiceSummary summary = serviceSummaryRes.findByIdAndOrgi(id, super.getOrgi(request));<NEW_LINE><MASK><NEW_LINE>map.put("summaryTags", tagRes.findByOrgiAndTagtype(super.getOrgi(request), MainContext.ModelType.... | map.addAttribute("summary", summary); |
358,550 | // The ECMQV Primitive as described in SEC-1, 3.4<NEW_LINE>private ECPoint calculateMqvAgreement(ECDomainParameters parameters, ECPrivateKeyParameters d1U, ECPrivateKeyParameters d2U, ECPublicKeyParameters Q2U, ECPublicKeyParameters Q1V, ECPublicKeyParameters Q2V) {<NEW_LINE>BigInteger n = parameters.getN();<NEW_LINE>i... | ()).mod(n); |
1,621,927 | private final void debugCheckItemsValid() {<NEW_LINE>if (!DEBUG) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PT parentModel = getParentModel();<NEW_LINE>final IContextAware ctx = createPlainContextAware(parentModel);<NEW_LINE>final boolean instancesTrackerEnabled = POJOLookupMapInstancesTracker.ENABLED;<NEW_LINE>POJOL... | int itemsRetrievedNowCount = itemsRetrievedNow.size(); |
223,950 | private boolean estimateMotion() {<NEW_LINE>CameraModel leftCM = cameraModels.get(CAMERA_LEFT);<NEW_LINE>CameraModel rightCM = cameraModels.get(CAMERA_RIGHT);<NEW_LINE>// Perform motion estimation relative to the most recent key frame<NEW_LINE>previousLeft.frame_to_world.invert(world_to_prev);<NEW_LINE>// Put observati... | Stereo2D3D stereo = listStereo2D3D.grow(); |
776,839 | private ClassTemplateSpec processSchema(DataSchema schema, ClassTemplateSpec enclosingClass, String memberName) {<NEW_LINE>final CustomInfoSpec customInfo = getImmediateCustomInfo(schema);<NEW_LINE>ClassTemplateSpec result = null;<NEW_LINE>TyperefDataSchema originalTyperefSchema = null;<NEW_LINE>while (schema.getType()... | unrecognizedSchemaType(enclosingClass, memberName, schema); |
1,804,308 | private void pullRequest() throws Exception {<NEW_LINE>// Pull LauncherRequest<NEW_LINE>LOGGER.logDebug("Pulling LauncherRequest");<NEW_LINE><MASK><NEW_LINE>LOGGER.logDebug("Pulled LauncherRequest");<NEW_LINE>// newLauncherRequest is always not null<NEW_LINE>updateLauncherRequest(newLauncherRequest);<NEW_LINE>// Pull A... | LauncherRequest newLauncherRequest = zkStore.getLauncherRequest(); |
1,182,745 | private static Map<PsiClass, List<PsiElement>> collectAndAddToCache(PsiJavaFile psiFile, VirtualFile virtualFile, Document document, Project project, Map<String, String> eventMetadata) {<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>eventMetadata.put(EventLogger.KEY_FILE, psiFile.getPackageName() + "."... | collectRedSymbols(psiFile, document, project); |
767,766 | public ResourceHandle acquireResources(ActionExecutionMetadata owner, ResourceSet resources, ResourcePriority priority) throws InterruptedException {<NEW_LINE>Preconditions.checkNotNull(resources, "acquireResources called with resources == NULL during %s", owner);<NEW_LINE>Preconditions.checkState(!threadHasResources()... | describe(), ProfilerTask.ACTION_LOCK); |
341,849 | public void attachApplication(IShizukuApplication application, String requestPackageName) {<NEW_LINE>if (application == null || requestPackageName == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>int callingUid = Binder.getCallingUid();<NEW_LINE>boolean isManager;<NEW_LINE>ClientRecord clientRecord = nul... | int callingPid = Binder.getCallingPid(); |
1,447,572 | public static void decompressOverMemory(Program program, List<ArtBlock> blocks, TaskMonitor monitor) throws Exception {<NEW_LINE>for (ArtBlock block : blocks) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>Address sourceAddress = program.getMinAddress().add(block.getDataOffset());<NEW_LINE>byte[] compressedBytes = new by... | block.getImageSize(), monitor); |
721,747 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.layout_main);<NEW_LINE>expandableListView = findViewById(R.id.expandablelist);<NEW_LINE>stickyLayout = <MASK><NEW_LINE>slidingMenu = findViewById(R.id.slidingmenu);<NEW_LINE>caseSummaryFragmen... | findViewById(R.id.sticky_layout); |
587,239 | final DeleteAssessmentReportResult executeDeleteAssessmentReport(DeleteAssessmentReportRequest deleteAssessmentReportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAssessmentReportRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,410,842 | public HTTPHeader unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>HTTPHeader hTTPHeader = new HTTPHeader();<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(); |
1,490,113 | private void reconcileResults(Subscription subs) {<NEW_LINE>synchronized (this) {<NEW_LINE>if (subs != ds || ds == null || subs == null || tv_subs_results == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>tv_subs_results.processDataSourceQueueSync();<NEW_LINE>Collection<SubscriptionResultFilterable> existing_results = tv... | to_remove.size()])); |
887,140 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String automationAccountName, String hybridRunbookWorkerGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.err... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,189,941 | final GetLayerVersionByArnResult executeGetLayerVersionByArn(GetLayerVersionByArnRequest getLayerVersionByArnRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getLayerVersionByArnRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
421,206 | public void dump(StringPool strings, ResTablePackage resPackage, PrintStream out) {<NEW_LINE>out.format(" config (unknown):\n");<NEW_LINE>for (int entryIdx = 0; entryIdx < entryCount; entryIdx++) {<NEW_LINE>int offset = getEntryValueOffset(entryIdx);<NEW_LINE>if (offset != -1) {<NEW_LINE>int size = entryData.getSh... | entryData.get(entryOffset + 23); |
1,788,613 | private JoinContext moveClauses(QueryModel parent, JoinContext from, JoinContext to, IntList positions) {<NEW_LINE>int p = 0;<NEW_LINE>int m = positions.size();<NEW_LINE>JoinContext result = contextPool.next();<NEW_LINE>result.slaveIndex = from.slaveIndex;<NEW_LINE>for (int i = 0, n = from.aIndexes.size(); i < n; i++) ... | t.parents.add(ai); |
668,218 | protected void updateContent() {<NEW_LINE>TextView titleView = (TextView) view.findViewById(R.id.title);<NEW_LINE>String text = app.<MASK><NEW_LINE>String formattedDuration = OsmAndFormatter.getFormattedDuration(approxPedestrianTime, app);<NEW_LINE>int start = text.indexOf("%1$s");<NEW_LINE>int end = start + formattedD... | getString(R.string.public_transport_ped_route_title); |
344,154 | // Configure SaxpyBlock<NEW_LINE>protected JobConf configSaxpy(Path py, Path px, Path saxpy_output, double a) throws Exception {<NEW_LINE>final JobConf conf = new JobConf(getConf(), SaxpyBlock.class);<NEW_LINE>conf.set("y_path", py.getName());<NEW_LINE>conf.set("x_path", px.getName());<NEW_LINE>conf.set("a", "" + a);<N... | conf.setMapperClass(MapStage1.class); |
785,337 | protected Configuration createConfiguration(RoundEnvironment roundEnv) {<NEW_LINE>Class<? extends Annotation> entities = QueryEntities.class;<NEW_LINE>Class<? extends Annotation> entity = Entity.class;<NEW_LINE>Class<? extends Annotation> superType = QuerySupertype.class;<NEW_LINE>Class<? <MASK><NEW_LINE>Class<? extend... | extends Annotation> embedded = Embedded.class; |
1,544,256 | public int minDistance(String word1, String word2) {<NEW_LINE>int m = word1.length();<NEW_LINE>int n = word2.length();<NEW_LINE>if (m == 0) {<NEW_LINE>return n;<NEW_LINE>}<NEW_LINE>if (n == 0) {<NEW_LINE>return m;<NEW_LINE>}<NEW_LINE>char[] str1 = word1.toCharArray();<NEW_LINE>char[] str2 = word2.toCharArray();<NEW_LIN... | [j - 1] + cost); |
1,088,282 | public static LinkedList<Diff> reformat(CompilationInfo info, TreePath path, CodeStyle cs, int startOffset, int endOffset, boolean templateEdit, int firstLineIndent) {<NEW_LINE>Pretty pretty = new Pretty(info, path, cs, startOffset, endOffset, templateEdit);<NEW_LINE>if (pretty.indent >= 0) {<NEW_LINE>if (firstLineInde... | ? cs.getBlankLinesAfterClass() : 1; |
265,263 | public State state() {<NEW_LINE>long failingMillis = clock.getAsLong() - failingSinceMillis.get();<NEW_LINE>if (failingMillis > graceMillis && halfOpen.compareAndSet(false, true))<NEW_LINE>log.log(INFO, "Circuit breaker is now half-open, as no requests have succeeded for the " + "last " + failingMillis + "ms. The serve... | detail.get() + "'."); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.