idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,693,050 | public static Config readConfig(DatasourceConfig datasourceConfig) {<NEW_LINE>Config config = new Config();<NEW_LINE>try (Ds ds = Ds.create(datasourceConfig);<NEW_LINE>Connection rawConnection = ds.getConnection()) {<NEW_LINE>rawConnection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);<NEW_LINE>rawConnec... | (map.get("key")); |
1,242,118 | private static void remountHostToRootIfNeeded(ExtensionState<TransitionsExtensionState> extensionState, int index, MountItem mountItem) {<NEW_LINE>final Host rootHost = getMountTarget(extensionState).getRootItem().getHost();<NEW_LINE>final Host originalHost = mountItem.getHost();<NEW_LINE>if (originalHost == null) {<NE... | bottom, null, content, false); |
1,336,979 | public Configuration readConfiguration(final DirectBuffer buffer, final int offset) {<NEW_LINE>headerDecoder.wrap(buffer, offset);<NEW_LINE>if (headerDecoder.version() != configurationEncoder.sbeSchemaVersion() || headerDecoder.templateId() != configurationEncoder.sbeTemplateId()) {<NEW_LINE>return null;<NEW_LINE>}<NEW... | long index = configurationDecoder.index(); |
668,897 | private List<NameValueCountPair> listActivityNamePair(Business business, Predicate p) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(ReadCompleted.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LI... | cq.from(ReadCompleted.class); |
786,314 | private void saveState() {<NEW_LINE>if (chunks.size() < 1)<NEW_LINE>return;<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>sb.append(this.length + "\n");<NEW_LINE>sb.append(downloaded + "\n");<NEW_LINE>sb.append(((long) this.totalDuration) + "\n");<NEW_LINE>sb.append(items.size() + "\n");<NEW_LINE>System.out.p... | sb.append(keyMap != null); |
1,821,089 | private static boolean addLinks(Context context, AppSettings settings, Spannable s, Pattern p, MatchFilter matchFilter, TransformFilter transformFilter, TextView tv, View holder, String allUrls, boolean extBrowser) {<NEW_LINE>boolean hasMatches = false;<NEW_LINE>Matcher m = p.matcher(s);<NEW_LINE>while (m.find()) {<NEW... | start, end, s, extBrowser); |
917,968 | public void execute() throws IOException {<NEW_LINE>System.out.println(this);<NEW_LINE>ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);<NEW_LINE>cw.visit(V9, ACC_MODULE, "module-info", null, null, null);<NEW_LINE>ModuleVisitor mv = cw.visitModule(name, (open ? ACC_OPEN : 0), vers... | mv.visitMainClass(getMainClassBinary()); |
1,661,611 | protected void initBootstrap(NettyClientHandler nettyClientHandler) {<NEW_LINE>// .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, getTimeout())<NEW_LINE>bootstrap.group(EVENT_LOOP_GROUP.get()).option(ChannelOption.SO_KEEPALIVE, true).option(ChannelOption.TCP_NODELAY, true).option(ChannelOption.ALLOCATOR, PooledByteBufAll... | UrlUtils.getHeartbeat(getUrl()); |
1,236,366 | public static void unzipFile(File zipFile, File targetDirectory) throws IOException {<NEW_LINE>checkNotNull(zipFile);<NEW_LINE>checkNotNull(targetDirectory);<NEW_LINE>checkArgument(targetDirectory.isDirectory(), "%s is not a valid directory", targetDirectory.getAbsolutePath());<NEW_LINE>final ZipFile zipFileObj = new Z... | (Files.asByteSink(targetFile)); |
314,260 | /*package*/<NEW_LINE>void notifyChildItemMoved(int fromGroupPosition, int fromChildPosition, int toGroupPosition, int toChildPosition) {<NEW_LINE>long packedFrom = RecyclerViewExpandableItemManager.getPackedPositionForChild(fromGroupPosition, fromChildPosition);<NEW_LINE>long packedTo = RecyclerViewExpandableItemManage... | fromGroupPosition, fromChildPosition, toGroupPosition, toChildPosition); |
568,880 | public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {<NEW_LINE>// Translate overlay and image<NEW_LINE>float flexibleRange = mFlexibleSpaceImageHeight - mActionBarSize;<NEW_LINE>int minOverlayTransitionY = mActionBarSize - mOverlayView.getHeight();<NEW_LINE>ViewHelper.setTranslationY(mOverla... | mFabMargin - mFab.getWidth()); |
1,214,864 | static ImmutableMap<String, Module> loadBzlModules(Environment env, PackageIdentifier packageId, List<Pair<String, Location>> programLoads, List<BzlLoadValue.Key> keys, @Nullable BzlLoadFunction bzlLoadFunctionForInlining) throws NoSuchPackageException, InterruptedException {<NEW_LINE>List<BzlLoadValue> bzlLoads;<NEW_L... | computeBzlLoadsWithInlining(env, keys, bzlLoadFunctionForInlining); |
1,687,036 | public static JSTemporalPlainDateTimeObject create(JSContext context, int y, int m, int d, int hour, int minute, int second, int millisecond, int microsecond, int nanosecond, JSDynamicObject calendar) {<NEW_LINE>if (!TemporalUtil.isValidISODate(y, m, d)) {<NEW_LINE>throw TemporalErrors.createRangeErrorDateTimeOutsideRa... | millisecond, microsecond, nanosecond, calendar); |
585,494 | private Node tryFoldStringIndexOf(Node n, String functionName, Node lstringNode, Node firstArg) {<NEW_LINE>checkArgument(n.isCall());<NEW_LINE>checkArgument(lstringNode.isStringLit());<NEW_LINE>String lstring = lstringNode.getString();<NEW_LINE>boolean isIndexOf = functionName.equals("indexOf");<NEW_LINE>Node secondArg... | (int) secondArg.getDouble(); |
1,314,407 | public void onPurchasesUpdated(boolean isFailed, int resultCode, List<MegaPurchase> purchases) {<NEW_LINE>if (isFailed) {<NEW_LINE>logWarning("Update purchase failed, with result code: " + resultCode);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PurchaseType purchaseResult;<NEW_LINE>if (purchases != null && !purchases.isEmpty... | updateSubscriptionLevel(myAccountInfo, dbH, megaApi); |
819,598 | public UpdateAcceleratorResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateAcceleratorResult updateAcceleratorResult = new UpdateAcceleratorResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken... | String currentParentElement = context.getCurrentParentElement(); |
503,400 | public static Set<HivePrivilegeInfo> parsePrivilege(PrivilegeGrantInfo userGrant, Optional<PrestoPrincipal> grantee) {<NEW_LINE>boolean withGrantOption = userGrant.isGrantOption();<NEW_LINE>String name = userGrant.<MASK><NEW_LINE>PrestoPrincipal grantor = new PrestoPrincipal(fromMetastoreApiPrincipalType(userGrant.getG... | getPrivilege().toUpperCase(ENGLISH); |
1,579,126 | protected void initColumnAndType() {<NEW_LINE>columns.put(COLUMN_ID, new ColumnMeta(COLUMN_ID, "varchar(64)", false, true));<NEW_LINE>columnsType.put(COLUMN_ID, Fields.FIELD_TYPE_VAR_STRING);<NEW_LINE>columns.put(COLUMN_CHECK, new ColumnMeta<MASK><NEW_LINE>columnsType.put(COLUMN_CHECK, Fields.FIELD_TYPE_VAR_STRING);<NE... | (COLUMN_CHECK, "varchar(5)", false)); |
303,223 | private void addJavaCompatible(StringBuilder sb) throws IOException {<NEW_LINE>// add java compatibility properties number<NEW_LINE>nextLine(sb);<NEW_LINE>// NOI18N<NEW_LINE>LogManager.log("Total compatible java properties : " + compatibleJava.size());<NEW_LINE>addNumberVariable(sb, "JAVA_COMPATIBLE_PROPERTIES_NUMBER",... | "JAVA_COMP_VENDOR", prop.getVendor()); |
1,613,308 | public Maybe<Symbol> parseSymbol(Parser parser, Scanner scanner) {<NEW_LINE>while (true) {<NEW_LINE>Scanner backup = new Scanner(scanner);<NEW_LINE>scanner.moveNextIgnoreFirst(this);<NEW_LINE>if (scanner.isEnd())<NEW_LINE>return Maybe.nothingBecause("scanner is at end of buffer");<NEW_LINE>Symbol currentToken = scanner... | .getType().getWikiRule(); |
10,384 | public void startPublish(String streamId, long absoluteStartTimeMs, String publishType) {<NEW_LINE>vertx.executeBlocking(handler -> {<NEW_LINE>try {<NEW_LINE>Broadcast broadcast = updateBroadcastStatus(streamId, absoluteStartTimeMs, publishType, getDataStore().get(streamId));<NEW_LINE>final String listenerHookURL = bro... | logger.info("start publish leaved for stream:{}", streamId); |
1,078,115 | public static void shortenTooTooLongFile(String filePath) {<NEW_LINE>File file = new File(filePath);<NEW_LINE>if (!file.exists())<NEW_LINE>return;<NEW_LINE>long fileLength = file.length();<NEW_LINE>if (fileLength > TOO_TOO_LONG_FILE_LENGTH) {<NEW_LINE>try (RandomAccessFile randomAccessFile = new RandomAccessFile(file, ... | setLength(baos.size()); |
225,368 | public void loadEquation(String channel, String function) {<NEW_LINE>double[] span = new double[2];<NEW_LINE>if (function.equals("sine")) {<NEW_LINE>span[0] = 0;<NEW_LINE>span[1] = 2 * Math.PI;<NEW_LINE>waveType.put(channel, "sine");<NEW_LINE>} else if (function.equals("tria")) {<NEW_LINE>span[0] = -1;<NEW_LINE>span[1]... | [0] + i * factor); |
1,215,148 | final GetBlockPublicAccessConfigurationResult executeGetBlockPublicAccessConfiguration(GetBlockPublicAccessConfigurationRequest getBlockPublicAccessConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getBlockPublicAccessConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,037,895 | protected MultiValueMap<String, String> createParameters(OAuth2PasswordGrantRequest passwordGrantRequest) {<NEW_LINE>ClientRegistration clientRegistration = passwordGrantRequest.getClientRegistration();<NEW_LINE>MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();<NEW_LINE>parameters.add(OAuth2Parame... | .getScopes(), " ")); |
406,516 | private void predict(ChannelHandlerContext ctx, FullHttpRequest req, QueryStringDecoder decoder, String modelName) throws ModelNotFoundException, BadRequestException {<NEW_LINE>RequestInput input = parseRequest(ctx, req, decoder);<NEW_LINE>if (modelName == null) {<NEW_LINE>throw new BadRequestException("Parameter model... | modelName, WorkerCommands.PREDICT, input); |
1,362,322 | public boolean isMandatory(boolean checkContext) {<NEW_LINE>// Do we have a mandatory rule<NEW_LINE>// metas: 03093<NEW_LINE>if (checkContext) {<NEW_LINE>// boolean retValue = Evaluator.evaluateLogic(this, m_vo.MandatoryLogic);<NEW_LINE>final Evaluatee evaluationCtx = createEvaluationContext(null);<NEW_LINE>final ILogi... | " Mandatory(" + mandatoryLogic + ") => Mandatory-" + mandatory); |
1,459,560 | private boolean doRunState() {<NEW_LINE>StringBuilder sb = new StringBuilder(String.format("/usr/bin/salt --out=json '%s' state.sls %s queue=True", minionId, stateName));<NEW_LINE>boolean alwaysFullDeploy = Boolean.valueOf(System.getProperty("SaltFacade.alwaysFullDeploy"));<NEW_LINE>if (alwaysFullDeploy ? alwaysFullDep... | SaltException(sb.toString()); |
1,271,238 | public void createFileMixin(String type) throws RepositoryException {<NEW_LINE>NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();<NEW_LINE>NodeTypeTemplate ntt = manager.createNodeTypeTemplate();<NEW_LINE>ntt.setName(type);<NEW_LINE>String[] str = new String[] { "nt:file" };<NEW_LINE>ntt.setDeclared... | getPropertyDefinitionTemplates().add(pdt3); |
1,532,685 | public ProcessStatus processReset(final PwmRequest pwmRequest) throws IOException, PwmUnrecoverableException {<NEW_LINE>final ResetAction resetType = pwmRequest.readParameterAsEnum(PwmConstants.PARAM_RESET_TYPE, ResetAction.class).orElse(ResetAction.exitProfileUpdate);<NEW_LINE>switch(resetType) {<NEW_LINE>case unConfi... | .getCompletedTokenFields().clear(); |
316,670 | protected Set<Path> jars(MavenProject project) throws DependencyResolutionException {<NEW_LINE>Set<org.apache.maven.artifact.Artifact> artifacts = project.getArtifacts();<NEW_LINE>if (artifacts.isEmpty()) {<NEW_LINE>DependencyResolutionRequest request = new DefaultDependencyResolutionRequest();<NEW_LINE>request.setMave... | .toCollection(LinkedHashSet::new)); |
1,679,735 | final GetEnvironmentAccountConnectionResult executeGetEnvironmentAccountConnection(GetEnvironmentAccountConnectionRequest getEnvironmentAccountConnectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getEnvironmentAccountConnectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,155,624 | public void createDisposeCandidatesInTrx(@NonNull final HuId huId, @NonNull final QtyRejectedReasonCode reasonCode) {<NEW_LINE>final I_M_HU hu = handlingUnitsBL.getById(huId);<NEW_LINE>if (!huStatusBL.isQtyOnHand(hu.getHUStatus())) {<NEW_LINE>throw new AdempiereException("Invalid HU status: " + hu.getHUStatus());<NEW_L... | createOrUpdateDisposeCandidate(huProductStorage, reasonCode, existingRecord); |
327,230 | public void prepareExpressions() {<NEW_LINE>if (orderList != null) {<NEW_LINE>prepareOrder(orderList, expressions.size());<NEW_LINE>}<NEW_LINE>ExpressionNames expressionNames = session.getMode().expressionNames;<NEW_LINE>if (expressionNames == ExpressionNames.ORIGINAL_SQL || expressionNames == ExpressionNames.POSTGRESQ... | toArray(new Expression[0]); |
55,500 | private HeadInter.NoteStep noteStepOf(int pitch) {<NEW_LINE>switch(shape) {<NEW_LINE>case G_CLEF:<NEW_LINE>case G_CLEF_SMALL:<NEW_LINE>case G_CLEF_8VA:<NEW_LINE>case G_CLEF_8VB:<NEW_LINE>case PERCUSSION_CLEF:<NEW_LINE>return HeadInter.NoteStep.values()[(71 - pitch) % 7];<NEW_LINE>case C_CLEF:<NEW_LINE>// Depending on p... | logger.error("No note step defined for {}", this); |
1,000,013 | public void stat(int loop, int start, int end, int bufStart, int bufEnd) {<NEW_LINE>int f0, f1, h, p;<NEW_LINE>Arrays.fill(hist, bufStart, bufEnd, 0.);<NEW_LINE>if (baggingFeatureCount() != nFeatureCol) {<NEW_LINE>int[] baggingFeature = loopBuffer[loop].baggingFeatures;<NEW_LINE>for (int i = 0; i < baggingFeatureCount(... | features[f0 + p] * nLabels; |
878,006 | protected void dynamicUpdate() {<NEW_LINE>Transform worldToParent;<NEW_LINE>Node parent = getControl().getSpatial().getParent();<NEW_LINE>if (parent == null) {<NEW_LINE>worldToParent = new Transform();<NEW_LINE>} else {<NEW_LINE>Transform parentToWorld = parent.getWorldTransform();<NEW_LINE>worldToParent = parentToWorl... | getSpatial().setLocalTransform(transform); |
493,137 | final GetQueryLoggingConfigResult executeGetQueryLoggingConfig(GetQueryLoggingConfigRequest getQueryLoggingConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getQueryLoggingConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
603,865 | public static void main(String[] args) throws Exception {<NEW_LINE>File out_dir = new File("target/compiled");<NEW_LINE>out_dir.mkdirs();<NEW_LINE>BeamLoader beamParser = new ErjangBeamDisLoader();<NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>if (args[i].endsWith(".beam")) {<NEW_LINE>File in = new File(arg... | shortName, crcFile(in))); |
1,698,683 | private JPanel createFolderPanel() {<NEW_LINE>JPanel panel = new JPanel(new GridBagLayout());<NEW_LINE>panel.setBorder(BorderFactory.createTitledBorder("Image Source"));<NEW_LINE>GridBagConstraints gbc;<NEW_LINE>gbc = GuiUtil.makeGbc(0, 0, 3, 1, GridBagConstraints.WEST);<NEW_LINE>panel.add(new JLabel("Chatty looks for ... | 2, 2, 1, 1); |
1,475,636 | final PutEventsResult executePutEvents(PutEventsRequest putEventsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putEventsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,054,373 | // ===================================================================================<NEW_LINE>// Basic Override<NEW_LINE>// ==============<NEW_LINE>@Override<NEW_LINE>protected String doBuildColumnString(String dm) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(dm).append(businessCategory);<NEW... | (dm).append(registeredAddress); |
295,432 | final DeletePresetResult executeDeletePreset(DeletePresetRequest deletePresetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePresetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | invoke(request, responseHandler, executionContext); |
1,480,327 | public EppResponse run() throws EppException {<NEW_LINE>validateRegistrarIsLoggedIn(registrarId);<NEW_LINE>// There are no legal extensions for this flow.<NEW_LINE>extensionManager.validate();<NEW_LINE>if (!messageId.isEmpty()) {<NEW_LINE>throw new UnexpectedMessageIdException();<NEW_LINE>}<NEW_LINE>// Return the oldes... | setResultFromCode(SUCCESS_WITH_NO_MESSAGES).build(); |
14,954 | public Request<DescribeManagedJobTemplateRequest> marshall(DescribeManagedJobTemplateRequest describeManagedJobTemplateRequest) {<NEW_LINE>if (describeManagedJobTemplateRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DescribeManagedJobTemplateRequest)");<NEW_LINE>}<NEW_L... | <DescribeManagedJobTemplateRequest>(describeManagedJobTemplateRequest, "AWSIot"); |
1,293,572 | private String _buildPramatiXMLRefs(Element entity) {<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>Iterator itr = entity.elements("ejb-local-ref").iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>Element ejbRef = (Element) itr.next();<NEW_LINE>sb.append("\t\t\t<ejb-local-ref>\n");<NEW_LINE>sb.append("\t... | "ejb-ref-name")).append("</ejb-ref-name>\n"); |
1,654,993 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@public create window MyWindow#keepall as (key string, anint int);\n" + "insert into MyWindow(key, anint) select id, value from SupportIdAndValueEvent;\n" + "@name('s0') select exists (select sum(ani... | [] { false, true }); |
601,558 | private void recordFragments(JProgram jprogram) throws IOException, JSONException {<NEW_LINE>JSONObject jsonPoints = new JSONObject();<NEW_LINE>// adding runAsyncs, if any<NEW_LINE>FragmentPartitioningResult partitionResult = jprogram.getFragmentPartitioningResult();<NEW_LINE>// a FragmentPartitioningResult' instance e... | put(FRAGMENTS, this.sizeMetrics); |
336,136 | public void marshall(AuthorizerDescription authorizerDescription, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (authorizerDescription == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(authorizerDescription... | authorizerDescription.getSigningDisabled(), SIGNINGDISABLED_BINDING); |
816,159 | public ExasolTableForeignKey configureObject(DBRProgressMonitor monitor, Object container, ExasolTableForeignKey foreignKey, Map<String, Object> options) {<NEW_LINE>ExasolTable table = (ExasolTable) container;<NEW_LINE>return new UITask<ExasolTableForeignKey>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected ExasolTa... | ExasolMessages.dialog_create_foreign_key_title, foreignKey, options); |
1,143,182 | // CHECKSTYLE:OFF<NEW_LINE>private void reportOnTomcatInformations() {<NEW_LINE>// NOPMD<NEW_LINE>// CHECKSTYLE:ON<NEW_LINE>final Map<String, TomcatInformations> tcInfos = new LinkedHashMap<>();<NEW_LINE>for (final TomcatInformations tcInfo : javaInformations.getTomcatInformationsList()) {<NEW_LINE>if (tcInfo.getReques... | tcInfo.getName()) + "\"}"; |
721,293 | public RetryStrategy unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RetryStrategy retryStrategy = new RetryStrategy();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<... | class).unmarshall(context)); |
682,753 | public void loadlist(final String providedPath, final boolean back, final OpenMode providedOpenMode) {<NEW_LINE>if (mainFragmentViewModel == null) {<NEW_LINE>Log.w(getClass().getSimpleName(), "Viewmodel not available to load the data");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (getMainActivity() != null && getMainActivi... | data.first, false, isPathLayoutGrid); |
215,942 | private void printconsolehelp(PrintStream os) {<NEW_LINE>os.println("> -----");<NEW_LINE>os.println("Available console commands (use help <command> for more details):");<NEW_LINE>os.println();<NEW_LINE>ArrayList cmd_lines = new ArrayList();<NEW_LINE>Iterator itr = helpItems.iterator();<NEW_LINE>while (itr.hasNext()) {<... | add(line_so_far.toString()); |
1,386,118 | protected List<Resource> findJars(WebAppContext context) throws Exception {<NEW_LINE>List<Resource> mergedResources = new ArrayList<Resource>();<NEW_LINE>// get jars from WEB-INF/lib if there are any<NEW_LINE>List<Resource> webInfJars = super.findJars(context);<NEW_LINE>if (webInfJars != null)<NEW_LINE>mergedResources.... | context.setAttribute(FRAGMENT_AND_REQUIRED_BUNDLES, fragsAndReqsBundles); |
1,318,387 | final BatchGetQueryExecutionResult executeBatchGetQueryExecution(BatchGetQueryExecutionRequest batchGetQueryExecutionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetQueryExecutionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetQueryExecution"); |
1,088,287 | public boolean innerNext() {<NEW_LINE>IterOutcome out;<NEW_LINE>if (!done) {<NEW_LINE>out = next(incoming);<NEW_LINE>} else {<NEW_LINE>incoming.cancel();<NEW_LINE>out = IterOutcome.NONE;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (first && out == IterOutcome.OK) {<NEW_LINE>out = IterOutcome.OK_NEW_SCHEMA;<NEW_LINE>}<NEW_LI... | logger.debug("Partitioner.next(): got next record batch with status {}", out); |
1,696,651 | public void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index) {<NEW_LINE>super.createEncodedValues(registerNewEncodedValue, prefix, index);<NEW_LINE>speedEncoder = new UnsignedDecimalEncodedValue(getKey(prefix, "average_speed"), speedBits, speedFactor, speedTwoDirections);<NEW_LI... | (prefix, "paved"), false); |
917,050 | private FindFreePageResult findFreePage(final int contentSize, final OAtomicOperation atomicOperation) throws IOException {<NEW_LINE>while (true) {<NEW_LINE>int freePageIndex = contentSize / ONE_KB;<NEW_LINE>freePageIndex -= PAGINATED_STORAGE_LOWEST_FREELIST_BOUNDARY.getValueAsInteger();<NEW_LINE>if (freePageIndex < 0)... | fileId, pageIndex, false, true); |
1,046,811 | public OBooleanExpression rewriteIndexChainsAsSubqueries(OCommandContext ctx, OClass clazz) {<NEW_LINE>if (operator instanceof OEqualsCompareOperator && right.isEarlyCalculated(ctx) && left.isIndexChain(ctx, clazz)) {<NEW_LINE>OInCondition result = new OInCondition(-1);<NEW_LINE>result.left = new OExpression(-1);<NEW_L... | modifier, nextClazz, right, ctx); |
148,005 | private static void addStylesToDocument(StyledDocument doc) {<NEW_LINE>// Initialize some styles.<NEW_LINE>Style def = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);<NEW_LINE>Style regular = doc.addStyle(DOCUMENT_STYLE_REGULAR, def);<NEW_LINE>StyleConstants.setFontFamily(def, "SansSerif");<... | setForeground(s, Color.blue); |
1,064,118 | public static void write(ModuleDetails moduleDetails) throws TransformerException, ParserConfigurationException {<NEW_LINE>final DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();<NEW_LINE>dbFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");<NEW_LINE>dbFactory.setAttribute(XMLConstants.AC... | Document doc = dBuilder.newDocument(); |
226,739 | private JType createInterface(JsonNode node, JPackage _package) {<NEW_LINE>String fqn = node.path(INTERFACE_TYPE_PROPERTY).asText();<NEW_LINE>int index = fqn.lastIndexOf(".") + 1;<NEW_LINE>JDefinedClass newType;<NEW_LINE>try {<NEW_LINE>newType = _package._interface(fqn.substring(index));<NEW_LINE>} catch (JClassAlready... | param(VALUE_PROPERTY, UnwrappedTypeResolverBuilder.class); |
273,209 | public static Closeable main(Path appRoot) throws Exception {<NEW_LINE>try (ObjectInputStream in = new ObjectInputStream(Files.newInputStream(appRoot.resolve(LIB).resolve(DEPLOYMENT_LIB).resolve(JarResultBuildStep.APPMODEL_DAT)))) {<NEW_LINE>Properties buildSystemProperties = new Properties();<NEW_LINE>try (InputStream... | context = createDevModeContext(appRoot, existingModel); |
496,212 | public static FloatProcessor convertToOpticalDensitySum(ColorProcessor cp, double maxRed, double maxGreen, double maxBlue) {<NEW_LINE>FloatProcessor fp = cp.toFloat(0, null);<NEW_LINE>ColorDeconvolutionHelper.convertPixelsToOpticalDensities((float[]) fp.getPixels(), maxRed, true);<NEW_LINE>FloatProcessor fpTemp = <MASK... | cp.toFloat(1, null); |
1,453,079 | public void initClient(final Properties props) {<NEW_LINE>if (MapUtils.isEmpty(props)) {<NEW_LINE>LOG.error("aliyun sls props is empty. failed init aliyun sls producer");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (isStarted.get()) {<NEW_LINE>close();<NEW_LINE>}<NEW_LINE>String accessId = props.getProperty(GenericLoggingC... | props.getProperty(GenericLoggingConstant.PROJECT_NAME); |
1,264,250 | private void selectedCompactionCompleted(CompactionJob job, Set<StoredTabletFile> jobFiles, StoredTabletFile newFile) {<NEW_LINE>Preconditions.checkArgument(job.getKind() == CompactionKind.USER || job.getKind() == CompactionKind.SELECTOR);<NEW_LINE>Preconditions.checkState(selectedFiles.containsAll(jobFiles));<NEW_LINE... | debug("Canceled selected compaction completed {} but others still running ", getExtent()); |
261,749 | protected IGenericClient newClientWithBaseUrl(CommandLine theCommandLine, String theBaseUrl, String theBasicAuthOptionName, String theBearerTokenOptionName) throws ParseException {<NEW_LINE>myFhirCtx.getRestfulClientFactory().setSocketTimeout((int) DateUtils.MILLIS_PER_HOUR);<NEW_LINE>IGenericClient <MASK><NEW_LINE>Str... | retVal = myFhirCtx.newRestfulGenericClient(theBaseUrl); |
662,354 | private void handleReceiveResponse() {<NEW_LINE>HttpClientResponse resp = clientResponse;<NEW_LINE>Context context = Vertx.currentContext();<NEW_LINE>Promise<HttpResponse<T>> promise = Promise.promise();<NEW_LINE>promise.future().onComplete(r -> {<NEW_LINE>// We are running on a context (the HTTP client mandates it)<NE... | dispatchResponse(r.result()); |
836,552 | private void check(ClassDescriptor c) {<NEW_LINE>OpcodeStack.Item item = stack.getStackItem(0);<NEW_LINE>if (item.isInitialParameter() && item.getRegisterNumber() == 1) {<NEW_LINE>ClassDescriptor thisClassDescriptor = getClassDescriptor();<NEW_LINE>if (c.equals(thisClassDescriptor)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LI... | getType(c.getSignature()); |
1,113,948 | // Visible for testing<NEW_LINE>// Visible for testing<NEW_LINE>void loadDependentInfo() {<NEW_LINE>if (m_vo.TableName.equals("C_Order")) {<NEW_LINE>int C_DocTyp_ID = 0;<NEW_LINE>Integer target = (Integer) getValue("C_DocTypeTarget_ID");<NEW_LINE>if (target != null)<NEW_LINE>C_DocTyp_ID = target.intValue();<NEW_LINE>if... | fPhone2 = getField(X_C_BPartner_Location.COLUMNNAME_Phone2); |
1,756,935 | protected RestChannelConsumer prepareRequest(RestRequest restRequest, NodeClient client) {<NEW_LINE>String id = restRequest.param(TransformField.ID.getPreferredName());<NEW_LINE>TimeValue timeout = restRequest.paramAsTime(TransformField.TIMEOUT.<MASK><NEW_LINE>boolean waitForCompletion = restRequest.paramAsBoolean(Tran... | getPreferredName(), StopTransformAction.DEFAULT_TIMEOUT); |
1,321,010 | private MenuItem addConnectionAction(Menu menu, final EClass relationshipType, final boolean reverseDirection) {<NEW_LINE>final MenuItem item = new MenuItem(menu, SWT.CASCADE);<NEW_LINE>item.setText(ArchiLabelProvider.INSTANCE.getRelationshipPhrase(relationshipType, reverseDirection));<NEW_LINE>item.setImage(ArchiLabel... | INSTANCE.fireSelectionEvent(item, relationshipType); |
1,252,675 | private ProcessStatus dispatchMethod(final PwmRequest pwmRequest) throws PwmUnrecoverableException {<NEW_LINE>final Optional<? extends ProcessAction> action = readProcessAction(pwmRequest);<NEW_LINE>if (action.isEmpty()) {<NEW_LINE>return ProcessStatus.Continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final Method intereste... | get(action.get()); |
1,528,441 | public void add(int sqlType, String sql, long executeTime, long netIn, long netOut, long startTime, long endTime) {<NEW_LINE>switch(sqlType) {<NEW_LINE>case ServerParse.SELECT:<NEW_LINE>case ServerParse.SHOW:<NEW_LINE>this.rCount.incrementAndGet();<NEW_LINE>break;<NEW_LINE>case ServerParse.UPDATE:<NEW_LINE>case ServerP... | 13L * (long) oneHour - 1L; |
594,222 | public static DescribeDomainISPDataResponse unmarshall(DescribeDomainISPDataResponse describeDomainISPDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDomainISPDataResponse.setRequestId(_ctx.stringValue("DescribeDomainISPDataResponse.RequestId"));<NEW_LINE>describeDomainISPDataResponse.setDomainName<MASK><NEW... | (_ctx.stringValue("DescribeDomainISPDataResponse.DomainName")); |
182,712 | public long measure(FlexNodeAPI node, float width, FlexMeasureMode widthMode, float height, FlexMeasureMode heightMode) {<NEW_LINE>TextNode reactCSSNode = (TextNode) node;<NEW_LINE>Layout layout = null;<NEW_LINE>boolean exception = false;<NEW_LINE>try {<NEW_LINE>layout = reactCSSNode.createLayout(width, widthMode);<NEW... | " h: " + layout.getHeight()); |
1,069,506 | private void arclight$handleServerPing(Connection networkManager, Packet<?> packetIn) {<NEW_LINE>Object[] players = this.server.getPlayerList().players.toArray();<NEW_LINE>ArclightPingEvent event = new ArclightPingEvent(networkManager, server);<NEW_LINE>Bukkit.getPluginManager().callEvent(event);<NEW_LINE>List<GameProf... | ), profiles.size()); |
210,439 | public void sendRequestToServiceUsingEureka(EurekaClient eurekaClient) {<NEW_LINE>// initialize the client<NEW_LINE>// this is the vip address for the example service to talk to as defined in conf/sample-eureka-service.properties<NEW_LINE>String vipAddress = "sampleservice.mydomain.net";<NEW_LINE>InstanceInfo nextServe... | System.out.println("Exiting the client. Demo over.."); |
1,271,256 | public int onStartCommand(Intent intent, int flags, final int startId) {<NEW_LINE>Bundle b = new Bundle();<NEW_LINE>isRootExplorer = intent.getBooleanExtra(TAG_IS_ROOT_EXPLORER, false);<NEW_LINE>ArrayList<HybridFileParcelable> files = intent.getParcelableArrayListExtra(TAG_COPY_SOURCES);<NEW_LINE>String targetPath = in... | (true).setColor(accentColor); |
1,747,946 | private boolean recoverTheLastLogIndexFile(File file) {<NEW_LINE>logger.debug("start to recover the last log index file={}", file.getAbsoluteFile());<NEW_LINE>String[] splits = file.getName().split(FILE_NAME_SEPARATOR);<NEW_LINE>long startIndex = Long.parseLong(splits[0]);<NEW_LINE>int longLength = 8;<NEW_LINE>byte[] b... | offset = BytesUtils.bytesToLong(bytes); |
1,639,583 | private static void clearOldSearchIndices() {<NEW_LINE>Path currentIndexPath = BibDatabaseContext.getFulltextIndexBasePath();<NEW_LINE>Path appData = currentIndexPath.getParent();<NEW_LINE>try {<NEW_LINE>Files.createDirectories(currentIndexPath);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOGGER.error("Could not creat... | error("Could not access app-directory at {}", appData, e); |
846,519 | private void rememberLibraryLocation() {<NEW_LINE>libraryWithinProject = false;<NEW_LINE>absolutesRelPath = null;<NEW_LINE>libraryPath = helper.getAntProjectHelper().getLibrariesLocation();<NEW_LINE>if (libraryPath != null) {<NEW_LINE>File prjRoot = FileUtil.toFile(project.getProjectDirectory());<NEW_LINE>libraryFile =... | PropertyUtils.resolveFile(prjRoot, libraryPath); |
324,624 | public static <T> T deserialize(String json, Class<T> cls, JsonPathConfig jsonPathConfig) {<NEW_LINE>Validate.notNull(jsonPathConfig, "JsonPath configuration wasn't specified, cannot deserialize.");<NEW_LINE>JsonParserType mapperType = jsonPathConfig.defaultParserType();<NEW_LINE>DataToDeserialize dataToDeserialize = n... | defaultDeserializer().deserialize(deserializationCtx); |
1,424,766 | public void paintComponent(Graphics g) {<NEW_LINE>super.paintComponent(g);<NEW_LINE>if (drawOverlay) {<NEW_LINE>g = g.create();<NEW_LINE>AntialiasingManager.activateAntialiasing(g);<NEW_LINE>try {<NEW_LINE>// Paint a roll over fade out.<NEW_LINE>FadeTracker fadeTracker = FadeTracker.getInstance();<NEW_LINE>float visibi... | g.setColor(Color.WHITE); |
1,108,780 | public static MessageItem createMessageItem(Cursor cursor) throws XmppStringprepException, UserJid.UserJidCreateException {<NEW_LINE>MessageItem messageItem = new MessageItem();<NEW_LINE>messageItem.setAccount(AccountJid.from(getAccount(cursor)));<NEW_LINE>messageItem.setUser(UserJid.from(getUser(cursor)));<NEW_LINE>me... | .setSent(isSent(cursor)); |
414,733 | final private static DirContext syntaxDescs2SyntaxDefs(Attribute syntaxDescAttr, LdapSchemaCtx schemaRoot) throws NamingException {<NEW_LINE>NamingEnumeration<?> syntaxDescs;<NEW_LINE>Attributes syntaxDef;<NEW_LINE>LdapSchemaCtx syntaxDefTree;<NEW_LINE>// create the SyntaxDef subtree<NEW_LINE>Attributes attrs = new Bas... | LdapSchemaCtx.SYNTAX_ROOT, SYNTAX_DEFINITION_NAME, attrs); |
1,485,250 | protected Node createUndecoratedEditor() {<NEW_LINE>final boolean usesDefaultValue = value.getValue() == null || value.getValue().equals(defaultValue.getValue());<NEW_LINE>final HBox container = new HBox();<NEW_LINE>final CheckBox auto = new CheckBox("Auto");<NEW_LINE>final Spinner<Integer> spinner = new Spinner<>();<N... | ) : value.get()); |
308,350 | DevTemplateVariantsBuildItem collectTemplateVariants(List<DevTemplatePathBuildItem> templatePaths) throws IOException {<NEW_LINE>Set<String> allPaths = templatePaths.stream().map(DevTemplatePathBuildItem::getPath).<MASK><NEW_LINE>// item -> [item.html, item.txt]<NEW_LINE>// ItemResource/item -> -> [ItemResource/item.ht... | collect(Collectors.toSet()); |
1,740,413 | public DispatchFrame mapRow(ResultSet rs, int rowNum) throws SQLException {<NEW_LINE>DispatchFrame frame = new DispatchFrame();<NEW_LINE>frame.id = rs.getString("pk_frame");<NEW_LINE>frame.name = rs.getString("frame_name");<NEW_LINE>frame.layerId = rs.getString("pk_layer");<NEW_LINE>frame.jobId = rs.getString("pk_job")... | threadable = rs.getBoolean("b_threadable"); |
1,159,136 | public void loadFromPropertyFile() throws IOException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "loadFromPropertyFile()");<NEW_LINE>String key = null;<NEW_LINE>Properties config = new Properties();<NEW_LINE>InputStream is = this.getClass().getResourceAsStream(P... | datasourceClassname = config.getProperty(key); |
197,991 | static PublicKey readPubKeyFromBuffer(Buffer<?> buf, String variation) throws GeneralSecurityException {<NEW_LINE>String algorithm = BASE_ALGORITHM_NAME + variation;<NEW_LINE>if (!SecurityUtils.isBouncyCastleRegistered()) {<NEW_LINE>throw new GeneralSecurityException("BouncyCastle is required to read a key of type " + ... | (keyLen - 1) / 2]; |
420,296 | protected void exportRectangle(JRPrintElement rectangle, JRPen pen, int radius) {<NEW_LINE>slideHelper.write("<p:sp>\n");<NEW_LINE>slideHelper.write(" <p:nvSpPr>\n");<NEW_LINE>slideHelper.write(" <p:cNvPr id=\"" + toOOXMLId(rectangle) + "\" name=\"Rectangle\"/>\n");<NEW_LINE>slideHelper.write(" <p:cNvSpPr>\n");<... | , rectangle.getWidth())); |
1,607,382 | public void generateCode() {<NEW_LINE>printPreamble();<NEW_LINE>printAllOps(AutoTypeImage.F32, AutoTypeImage.F32, false, false);<NEW_LINE>printAllOps(AutoTypeImage.F64, AutoTypeImage.F64, false, false);<NEW_LINE>printAllOps(AutoTypeImage.U8, <MASK><NEW_LINE>printAllOps(AutoTypeImage.U8, AutoTypeImage.S32, false, false)... | AutoTypeImage.I16, false, false); |
966,197 | public void sendError(int code, String message) {<NEW_LINE>// This method is called by Response.sendError to organise for an error page to be generated when it is possible:<NEW_LINE>// + The response is reset and temporarily closed.<NEW_LINE>// + The details of the error are saved as request attributes<NEW_LINE>// + Th... | ERROR_SERVLET_NAME, request.getServletName()); |
793,304 | public RubyNode visitIfNode(IfParseNode node) {<NEW_LINE>final SourceIndexLength sourceSection = node.getPosition();<NEW_LINE>final RubyNode condition = translateNodeOrNil(sourceSection, node.getCondition());<NEW_LINE>ParseNode thenBody = node.getThenBody();<NEW_LINE><MASK><NEW_LINE>final RubyNode ret;<NEW_LINE>if (the... | ParseNode elseBody = node.getElseBody(); |
407,971 | private void renderSlices(RenderContext ctx, ProcessSummaryTrack.Data data, double h) {<NEW_LINE>// TODO: dedupe with CpuRenderer<NEW_LINE>TimeSpan visible = state.getVisibleTime();<NEW_LINE>Selection<Long> selected = state.getSelection(Selection.Kind.Cpu);<NEW_LINE>List<Highlight> visibleSelected = Lists.newArrayList(... | utid = data.utids[i]; |
1,766,481 | public org.python.Object __mul__(org.python.Object other) {<NEW_LINE>if (other instanceof org.python.types.Int) {<NEW_LINE>long count = ((org.python.types.Int) other).value;<NEW_LINE>org.python.types.List result = new org.python.types.List();<NEW_LINE>for (long i = 0; i < count; i++) {<NEW_LINE>result.value.addAll(this... | other.typeName() + "'"); |
1,485,732 | public void onCreate() {<NEW_LINE>super.onCreate();<NEW_LINE>mPrefs = new PreferenceManager(this);<NEW_LINE>ImagePipelineConfig.Builder b = ImagePipelineConfig.newBuilder(this);<NEW_LINE>ImagePipelineConfig config = b.setProgressiveJpegConfig(new SimpleProgressiveJpegConfig()).setResizeAndRotateEnabledForNetwork(true).... | Fresco.initialize(this, config); |
1,692,588 | protected Box[] createFragment(StreamingTrack streamingTrack, List<StreamingSample> samples) {<NEW_LINE>nextFragmentCreateStartTime.get(streamingTrack);<NEW_LINE>tfraOffsets.put(streamingTrack, Mp4Arrays.copyOfAndAppend(tfraOffsets.get(streamingTrack), bytesWritten));<NEW_LINE>tfraTimes.put(streamingTrack, Mp4Arrays.co... | .getTimescale()) + " seconds"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.