idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,412,001 | // Suppress high Cognitive Complexity warning<NEW_LINE>@SuppressWarnings("squid:S3776")<NEW_LINE>private SingleQuery constructSelectPlan(FilterOperator filterOperator, List<String> columnNames) throws QueryOperatorException {<NEW_LINE>FilterOperator timeFilter = null;<NEW_LINE>FilterOperator valueFilter = null;<NEW_LIN... | throw new QueryOperatorException("The same key filter has been specified more than once: " + singlePath); |
1,124,216 | protected Locale resolveLocale() {<NEW_LINE>Locale appLocale;<NEW_LINE>String lastLocale = this.loginProperties.loadLastLocale();<NEW_LINE>if (StringUtils.isNotEmpty(lastLocale)) {<NEW_LINE>appLocale = LocaleResolver.resolve(lastLocale);<NEW_LINE>} else {<NEW_LINE>appLocale = Locale.getDefault();<NEW_LINE>}<NEW_LINE>fo... | .iterator().next(); |
683,626 | // Pending https://github.com/SpongePowered/Mixin/issues/312<NEW_LINE>// @Group(name = "org.spongepowered.tracker:bonemeal", min = 1, max = 1)<NEW_LINE>@Redirect(method = "applyBonemeal(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/EntityPlayer;L... | doesEvent = state.doesBlockEventTracking(current); |
1,164,528 | public final void start(MatchedEventMap beginState) {<NEW_LINE>AgentInstanceContext agentInstanceContext = evalEveryNode.getContext().getAgentInstanceContext();<NEW_LINE>agentInstanceContext.getInstrumentationProvider().qPatternEveryStart(evalEveryNode.factoryNode, beginState);<NEW_LINE>agentInstanceContext.getAuditPro... | getContext().getStatementName()); |
592,891 | public void run(RegressionEnvironment env) {<NEW_LINE>Module module = makeModule("com.testit", "@Name('A') select SupportStaticMethodLib.plusOne(intPrimitive) as val from SupportBean");<NEW_LINE>module.getImports().add(SupportStaticMethodLib.class.getPackage().getName() + ".*");<NEW_LINE>EPCompiled compiled = compileMo... | new SupportBean("E1", 4)); |
584,391 | public void onServiceConnected(ComponentName name, IBinder service) {<NEW_LINE>if (isDisposed())<NEW_LINE>return;<NEW_LINE>logDebug("Billing service connected.");<NEW_LINE>mService = getInAppBillingService(service);<NEW_LINE>String packageName = mContext.getPackageName();<NEW_LINE>IabResult result = new IabResult(OK);<... | packageName, INAPP.toString()); |
473,122 | public PrincipalPermissions unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PrincipalPermissions principalPermissions = new PrincipalPermissions();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | )).unmarshall(context)); |
592,601 | public static void destroy(String userName, String password, String appId) throws SaturnJobConsoleException {<NEW_LINE>String urlStr = SaturnEnvProperties.VIP_SATURN_DCOS_REST_URI + API_VERSION_DES + appId;<NEW_LINE>CloseableHttpClient httpClient = HttpClients.createDefault();<NEW_LINE>try {<NEW_LINE>HttpDelete httpDel... | httpResponse = httpClient.execute(httpDelete); |
1,852,015 | private void o3SortFixColumn(int columnIndex, final int columnType, long mergedTimestampsAddr, long valueCount) {<NEW_LINE>final int columnOffset = getPrimaryColumnIndex(columnIndex);<NEW_LINE>final MemoryCARW mem = o3Columns.getQuick(columnOffset);<NEW_LINE>final MemoryCARW mem2 = o3Columns2.getQuick(columnOffset);<NE... | mem2.jumpTo(valueCount << shl); |
551,155 | public static List<MatchedEventMap> generateMatchEvents(MatchedEventMap matchEvent, Object[] eventsPerChild, int indexFrom) {<NEW_LINE>// Place event list for each child state node into an array, excluding the node where the event came from<NEW_LINE>ArrayList<List<MatchedEventMap>> listArray = new ArrayList<MASK><NEW_L... | <List<MatchedEventMap>>(); |
1,334,204 | public static DescribeHanaInstancesResponse unmarshall(DescribeHanaInstancesResponse describeHanaInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeHanaInstancesResponse.setRequestId(_ctx.stringValue("DescribeHanaInstancesResponse.RequestId"));<NEW_LINE>describeHanaInstancesResponse.setSuccess(_ctx.boolean... | ("DescribeHanaInstancesResponse.Hanas[" + i + "].UserName")); |
632,720 | private HttpResponse tenantInvoice(RestApi.RequestContext requestContext) {<NEW_LINE>var tenantName = TenantName.from(requestContext.pathParameters().getStringOrThrow("tenant"));<NEW_LINE>var tenant = tenants.require(tenantName, CloudTenant.class);<NEW_LINE>var invoiceId = requestContext.pathParameters().getStringOrThr... | RestApiException.BadRequest("Unknown format: " + format); |
1,534,950 | public static Observable<TwoDataBean<BookShelfBean, List<BookChapterBean>>> changeBookSource(SearchBookBean searchBook, BookShelfBean oldBook) {<NEW_LINE>BookShelfBean bookShelfBean = BookshelfHelp.getBookFromSearchBook(searchBook);<NEW_LINE>bookShelfBean.<MASK><NEW_LINE>bookShelfBean.setLastChapterName(oldBook.getLast... | setSerialNumber(oldBook.getSerialNumber()); |
1,389,605 | public FeedbackResponseAttributes updateFeedbackResponseCascade(FeedbackResponseAttributes.UpdateOptions updateOptions) throws InvalidParametersException, EntityDoesNotExistException, EntityAlreadyExistsException {<NEW_LINE>FeedbackResponseAttributes oldResponse = frDb.getFeedbackResponse(updateOptions.getFeedbackRespo... | updateOptionsBuilder(responseComment.getId()); |
1,653,779 | public BlobServiceSasQueryParameters generateSasQueryParameters(UserDelegationKey delegationKey, String accountName) {<NEW_LINE>StorageImplUtils.assertNotNull("delegationKey", delegationKey);<NEW_LINE>StorageImplUtils.assertNotNull("accountName", accountName);<NEW_LINE>ensureState();<NEW_LINE>// Signature is generated ... | contentLanguage, this.contentType, delegationKey); |
1,166,505 | public static void main(String[] args) {<NEW_LINE>StaticBinding obj = new StaticBinding();<NEW_LINE>// "Adding integers" due to auto-boxing from int to Integer<NEW_LINE>obj.sum(2, 3);<NEW_LINE>// "Adding integers" due to exact parameter types<NEW_LINE>obj.sum(Integer.valueOf(2), Integer.valueOf(3));<NEW_LINE>// "Adding... | ) 2, (Object) 3); |
1,780,350 | private static InputOutputFormatCatalog createCatalog(Params params, ClassLoader classLoader) {<NEW_LINE>String catalogName = params.get(OdpsCatalogParams.CATALOG_NAME);<NEW_LINE>CatalogFactory factory = createCatalogFactory(classLoader);<NEW_LINE>Map<String, String> properties = new HashMap<>();<NEW_LINE>properties.pu... | .get(OdpsCatalogParams.ACCESS_ID)); |
128,108 | private LightData createLightData() {<NEW_LINE>BitSet skyMask = new BitSet();<NEW_LINE>BitSet blockMask = new BitSet();<NEW_LINE>BitSet emptySkyMask = new BitSet();<NEW_LINE>BitSet emptyBlockMask = new BitSet();<NEW_LINE>List<byte[]> skyLights = new ArrayList<>();<NEW_LINE>List<byte[]> blockLights = new ArrayList<>();<... | ] blockLight = section.getBlockLight(); |
1,217,849 | public boolean addAll(Collection c) {<NEW_LINE>if (!allowNulls && c.contains(null)) {<NEW_LINE>throw new JDOUserException(// NOI18N<NEW_LINE>I18NHelper.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>messages, "sco.nulls_not_allowed"));<NEW_LINE>}<NEW_LINE>java.util.Vector errc = <MASK><NEW_LINE>if (elementType != nul... | new java.util.Vector(); |
510,292 | public void emit() {<NEW_LINE>if (!isAvailable()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (cueSet.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (mute && requestFocus()) {<NEW_LINE>for (Entry e : cueList) {<NEW_LINE>final String utId = getId(e.text);<NEW_LINE>outstanding.add(utId);<NEW_LINE>HashMap<String<MASK>... | , String> params = e.params; |
1,520,127 | protected void updatePartnerAddress(Partner partner) throws AxelorException {<NEW_LINE><MASK><NEW_LINE>if (!partner.getIsContact() && !partner.getIsEmployee()) {<NEW_LINE>if (partner.getPartnerAddressList() != null) {<NEW_LINE>partner.setMainAddress(checkDefaultAddress(partner));<NEW_LINE>}<NEW_LINE>} else if (address ... | Address address = partner.getMainAddress(); |
131,370 | public boolean evaluate(HttpServletRequest request, HttpServletResponse response, Instance instance) {<NEW_LINE>boolean result;<NEW_LINE>try {<NEW_LINE>Optional<Visitor> <MASK><NEW_LINE>if (opt.isPresent()) {<NEW_LINE>Visitor visitor = opt.get();<NEW_LINE>Persona currentPersona = (Persona) visitor.getPersona();<NEW_LIN... | opt = visitorAPI.getVisitor(request); |
219,574 | public void confirmClose(Command onConfirmed) {<NEW_LINE>List<Job> jobs = pJobManager_.get().getJobs();<NEW_LINE>// if there are no jobs, go ahead and let the tab close<NEW_LINE>if (jobs.isEmpty()) {<NEW_LINE>display_.setShowTabPref(false);<NEW_LINE>onConfirmed.execute();<NEW_LINE>}<NEW_LINE>// count the number of runn... | : constants_.localJobUnfinished())); |
1,285,988 | public void close() throws DocumentException, IOException {<NEW_LINE>if (!hasSignature) {<NEW_LINE>if (cleanMetadata && stamper.xmpMetadata == null) {<NEW_LINE>ByteArrayOutputStream baos = new ByteArrayOutputStream();<NEW_LINE>try {<NEW_LINE>XmpWriter writer = new XmpWriter(baos, moreInfo);<NEW_LINE>writer.close();<NEW... | PdfSigGenericPKCS sig = sigApp.getSigStandard(); |
715,266 | protected void paintIcon(Component c, Graphics2D g) {<NEW_LINE>boolean indeterminate = isIndeterminate(c);<NEW_LINE>boolean selected = indeterminate || isSelected(c);<NEW_LINE>boolean isFocused = FlatUIUtils.isPermanentFocusOwner(c);<NEW_LINE>float bw = selected ? (disabledSelectedBorderWidth != Float.MIN_VALUE && !c.i... | .setColor(getCheckmarkColor(c)); |
1,633,483 | public SortDefinition unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SortDefinition sortDefinition = new SortDefinition();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | class).unmarshall(context)); |
927,848 | public Identifier findFromInode(final String inodeOrIdentifier) throws DotDataException {<NEW_LINE>Identifier identifier = identifierFactory.loadFromCache(inodeOrIdentifier);<NEW_LINE>if (identifier == null || !InodeUtils.isSet(identifier.getInode())) {<NEW_LINE>identifier = identifierFactory.loadFromCacheFromInode(ino... | debug(this, "Unable to find inodeOrIdentifier as identifier : ", e); |
1,095,450 | public void paintTrack(Graphics g) {<NEW_LINE>boolean enabled = slider.isEnabled();<NEW_LINE>float tw = UIScale.scale((float) trackWidth);<NEW_LINE>float arc = tw;<NEW_LINE>// get rectangle of second thumb<NEW_LINE>Point p = adjustThumbForHighValue();<NEW_LINE>Rectangle thumbRect2 = new Rectangle(thumbRect);<NEW_LINE>r... | ) g).fill(track); |
608,057 | public boolean checkInclusion(String s1, String s2) {<NEW_LINE>if (s1.length() > s2.length()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int[] count = new int[26];<NEW_LINE>for (char c : s1.toCharArray()) {<NEW_LINE>count[c - 'a']++;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < s1.length(); i++) {<NEW_LINE>count[s2.charAt... | charAt(j) - 'a']++; |
882,434 | private static Map<String, List<String>> gatherActiveFeatures(ImmutableFeatureMap fMap, Map<String, Node<Regressor>> roots) {<NEW_LINE>HashMap<String, List<String>> outputMap = new HashMap<>();<NEW_LINE>for (Map.Entry<String, Node<Regressor>> e : roots.entrySet()) {<NEW_LINE>Set<String> activeFeatures = new LinkedHashS... | offer(splitNode.getGreaterThan()); |
993,386 | private // and put here a jar?<NEW_LINE>void putWebInfLibraries(FileObject webInf, Map<URL, URL> tomcatTable, Map<URL, URL> loadingTable) {<NEW_LINE>if (webInf == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>FileObject libDir = webInf.getFileObject("lib");<NEW_LINE>if (libDir == null) {<NEW_LINE>retu... | libDirKids = libDir.getChildren(false); |
1,286,902 | public static void applyMagnet(LivingEntity entity, int amplifier) {<NEW_LINE>// super magnetic - inspired by botanias code<NEW_LINE><MASK><NEW_LINE>double y = entity.getY();<NEW_LINE>double z = entity.getZ();<NEW_LINE>float range = 3f + 1f * amplifier;<NEW_LINE>List<ItemEntity> items = entity.level.getEntitiesOfClass(... | double x = entity.getX(); |
354,327 | private void configureVM(VirtualMachineTO vmTO, LibvirtVMDef vm, Map<String, String> customParams, boolean isUefiEnabled, boolean isSecureBoot, String bootMode, Map<String, String> extraConfig, String uuid) {<NEW_LINE>s_logger.debug(String.format("Configuring VM with UUID [%s].", uuid));<NEW_LINE>GuestDef guest = creat... | , guest, vcpus, isUefiEnabled)); |
805,857 | private org.batfish.datamodel.Interface toInterface(Bond bond) {<NEW_LINE>String name = bond.getName();<NEW_LINE>org.batfish.datamodel.Interface newIface = org.batfish.datamodel.Interface.builder().setName(name).setOwner(_c).setType(InterfaceType.AGGREGATED).build();<NEW_LINE>Set<String> validSlaves = bond.getSlaves().... | bond.getBridge(), newIface); |
1,155,865 | public static DescribeGlobalDistributeCacheResponse unmarshall(DescribeGlobalDistributeCacheResponse describeGlobalDistributeCacheResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGlobalDistributeCacheResponse.setRequestId(_ctx.stringValue("DescribeGlobalDistributeCacheResponse.RequestId"));<NEW_LINE>describeGloba... | + "].SubInstances[" + j + "].InstanceClass")); |
256,192 | public Set<DataObject> instantiate() throws IOException {<NEW_LINE>FileObject targetFolder = Templates.getTargetFolder(wiz);<NEW_LINE>TestNGSupport.findTestNGSupport(FileOwnerQuery.getOwner(targetFolder)).configureProject(targetFolder);<NEW_LINE>String targetName = Templates.getTargetName(wiz);<NEW_LINE>DataFolder df =... | dTemplate = DataObject.find(template); |
645,337 | public void configure() throws Exception {<NEW_LINE>errorHandler(noErrorHandler());<NEW_LINE>from(direct(MF_RETRIEVE_HU_V2_CAMEL_ROUTE_ID)).routeId(MF_RETRIEVE_HU_V2_CAMEL_ROUTE_ID).streamCaching().process(this::validateAndAttachHeaders).removeHeaders("CamelHttp*").setHeader(CoreConstants.AUTHORIZATION, simple(CoreCons... | .to(direct(UNPACK_V2_API_RESPONSE)); |
1,722,608 | private URLClassLoader buildClassLoader() throws PluginException {<NEW_LINE>ClassLoader parent = JarPluginProviderLoader.class.getClassLoader();<NEW_LINE>try {<NEW_LINE>final URL url = getCachedJar().toURI().toURL();<NEW_LINE>final URL[] urlarray;<NEW_LINE>if (null != getDepLibs() && getDepLibs().size() > 0) {<NEW_LINE... | [urls.size()]); |
358,642 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create context MyContext initiated by distinct(array) SupportEventWithIntArray as se", path);<NEW_LINE>env.compileDeploy("@name('s0') context MyContext select context.se.id as id, sum(in... | , { "SE3", 4 } }); |
615,806 | private static <T> T textDecodeArrayElement(DataType type, int index, int len, ByteBuf buff) {<NEW_LINE>if (len == 4 && Character.toUpperCase(buff.getByte(index)) == 'N' && Character.toUpperCase(buff.getByte(index + 1)) == 'U' && Character.toUpperCase(buff.getByte(index + 2)) == 'L' && Character.toUpperCase(buff.getByt... | copiedBuffer(sb, StandardCharsets.UTF_8); |
1,662,683 | public FileAsset fromContentlet(final Contentlet con) throws DotStateException {<NEW_LINE>if (con == null || con.getInode() == null) {<NEW_LINE>throw new DotStateException("Contentlet is null");<NEW_LINE>}<NEW_LINE>if (!con.isFileAsset()) {<NEW_LINE>throw new DotStateException("Contentlet : " + con.getInode() + " is no... | APILocator.systemUser(), false); |
577,135 | public void subdivide(CubicCurve2D left, CubicCurve2D right) {<NEW_LINE>double x1 = this.getX1();<NEW_LINE>double y1 = this.getY1();<NEW_LINE>double ctrlx1 = this.getCtrlX1();<NEW_LINE>double ctrly1 = this.getCtrlY1();<NEW_LINE>double ctrlx2 = this.getCtrlX2();<NEW_LINE>double ctrly2 = this.getCtrlY2();<NEW_LINE>double... | = (ctrly1 + ctrly2) / 2.0; |
1,222,972 | public void start() {<NEW_LINE>logger.info("Registering Mantis Worker with Mesos executor callbacks");<NEW_LINE>mesosDriver = new MesosExecutorDriver(new MesosExecutorCallbackHandler(executeStageRequestObserver));<NEW_LINE>// launch driver on background thread<NEW_LINE>executor.execute(new Runnable() {<NEW_LINE><NEW_LI... | logger.info("Sent RUNNING state to mesos, driver status=" + status); |
1,768,797 | private void createFileNameBrowseButtons(Composite parent) {<NEW_LINE>new Label(parent, SWT.NONE);<NEW_LINE>Composite buttonComposite = new Composite(parent, SWT.NONE);<NEW_LINE>GridLayout layout = new GridLayout(2, false);<NEW_LINE>layout.marginHeight = 0;<NEW_LINE>layout.marginWidth = 0;<NEW_LINE>buttonComposite.setL... | path.toString() + "}"); |
121,948 | private Map<String, List<OffsetRange>> foldsJson(ParserResult info) {<NEW_LINE>final Map<String, List<OffsetRange>> folds = new HashMap<String, List<OffsetRange>>();<NEW_LINE>TokenHierarchy th = info.getSnapshot().getTokenHierarchy();<NEW_LINE>TokenSequence <MASK><NEW_LINE>List<TokenSequence<?>> list = th.tokenSequence... | ts = th.tokenSequence(language); |
447,058 | public int compareTo(rpc_column other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.valueOf(isSetTypeId()).<MASK><NEW_LINE>if (lastComparison != 0... | compareTo(other.isSetTypeId()); |
1,253,405 | final CreateCommentResult executeCreateComment(CreateCommentRequest createCommentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createCommentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
590,108 | private List<String> generateDropStatementsForRoutines() throws SQLException {<NEW_LINE>// #2193: PostgreSQL 11 removed the 'proisagg' column and replaced it with 'prokind'.<NEW_LINE>String isAggregate = database.getVersion().<MASK><NEW_LINE>// PROCEDURE is only available from PostgreSQL 11<NEW_LINE>String isProcedure ... | isAtLeast("11") ? "pg_proc.prokind = 'a'" : "pg_proc.proisagg"; |
1,083,621 | // BenchMark IntQueue vs ArrayDeque.<NEW_LINE>private static void benchMarkTest() {<NEW_LINE>int n = 10000000;<NEW_LINE>IntQueue intQ = new IntQueue(n);<NEW_LINE>// IntQueue times at around 0.0324 seconds<NEW_LINE>long start = System.nanoTime();<NEW_LINE>for (int i = 0; i < n; i++) intQ.offer(i);<NEW_LINE>for (int i = ... | .util.ArrayDeque<>(); |
1,364,644 | final GetInAppMessagesResult executeGetInAppMessages(GetInAppMessagesRequest getInAppMessagesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getInAppMessagesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
91,525 | public Future<Boolean> deployModule(DeployedModuleInfo deployedMod, DeployedAppInfo deployedApp) {<NEW_LINE>this.firstFailure = null;<NEW_LINE>ExtendedModuleInfo moduleInfo = deployedMod.getModuleInfo();<NEW_LINE>ModuleMetaData mmd = moduleInfo.getMetaData();<NEW_LINE>if (mmd == null) {<NEW_LINE>deployedApp.uninstallAp... | nestedMMD, moduleInfo.getContainer()); |
67,976 | final CreateApplicationResult executeCreateApplication(CreateApplicationRequest createApplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createApplicationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
558,544 | public T readFrom(Class<T> type, Type type1, Annotation[] antns, MediaType mt, MultivaluedMap<String, String> mm, InputStream entityStream) throws WebApplicationException, IOException {<NEW_LINE>try (BufferedReader in = new BufferedReader(new InputStreamReader(entityStream));<NEW_LINE>JsonParser parser = Json.createPar... | , model)).build(); |
1,550,693 | public void filterByLatestVersion(Function<URL, String> getCurrentVersion) {<NEW_LINE>log.trace("Checking the latest version using URL list {}", candidateUrls);<NEW_LINE>List<URL> <MASK><NEW_LINE>List<URL> copyOfList = new ArrayList<>(candidateUrls);<NEW_LINE>String foundFriverVersion = null;<NEW_LINE>for (URL url : co... | out = new ArrayList<>(); |
749,574 | public boolean put(final Connection connection) {<NEW_LINE>if (connection != null) {<NEW_LINE>if (!connection.isExecuting()) {<NEW_LINE>throw new IllegalStateException("Connection is not executing!");<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (connectionId == null) {<NEW_LINE>if (connectionIdGenerator == null) {<NEW_LINE>... | ConnectionId connectionId = connection.getConnectionId(); |
234,050 | private <T> ConfigValue<List<T>> toNodeList() {<NEW_LINE>Type nodeType = type();<NEW_LINE>if (nodeType == Type.MISSING || nodeType == Type.VALUE) {<NEW_LINE>return ConfigValues.empty();<NEW_LINE>}<NEW_LINE>// this is an object or a list<NEW_LINE>List<T> result = new LinkedList<>();<NEW_LINE>Set<String> children = new H... | dot = noSuffix.indexOf('.'); |
1,054,616 | public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Row14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> row(SelectField<T1> field1, SelectField<T2> field2, SelectField<T3> field3, SelectField<T4> field4, SelectField<T5> field5, SelectField<T6> field6, SelectField<T7> field7, Selec... | field11, field12, field13, field14); |
1,068,646 | public void dropIndex(String... fieldNames) {<NEW_LINE>notNull(fieldNames, "fieldNames cannot be null");<NEW_LINE>Fields fields = Fields.withNames(fieldNames);<NEW_LINE>try {<NEW_LINE>writeLock.lock();<NEW_LINE>checkOpened();<NEW_LINE>collectionOperations.dropIndex(fields);<NEW_LINE>} finally {<NEW_LINE>writeLock.unloc... | indexEntry = new AtomicReference<>(); |
806,880 | public void marshall(Authorizer authorizer, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (authorizer == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(authorizer.getAuthorizerCredentialsArn(), AUTHORIZERCR... | authorizer.getAuthorizerUri(), AUTHORIZERURI_BINDING); |
1,194,879 | public static RelDataType createJoinOriginalType(RelDataTypeFactory typeFactory, RelDataType leftType, RelDataType rightType, List<String> fieldNameList, List<RelDataTypeField> systemFieldList) {<NEW_LINE>assert (fieldNameList == null) || (fieldNameList.size() == (systemFieldList.size() + leftType.getFieldCount() <MASK... | + rightType.getFieldCount())); |
799,408 | private Map<String, Set<String>> populateLimitedTagsToValuesMap(OptionalLimit groupLimit, int requestLimit, Stream<Series> seriesStream) {<NEW_LINE>// TODO find alternative as this is slow since it flushes processor core caches<NEW_LINE>// and synchronizes them<NEW_LINE>AtomicLong totalNumValues = new AtomicLong();<NEW... | int numValues = values.size(); |
1,553,429 | String decodeString(int offset, int length) {<NEW_LINE>try {<NEW_LINE>final ByteBuffer wrappedBuffer = ByteBuffer.wrap(m_strings, offset, length);<NEW_LINE>return (m_isUTF8 ? UTF8_DECODER : UTF16LE_DECODER).decode(wrappedBuffer).toString();<NEW_LINE>} catch (CharacterCodingException ex) {<NEW_LINE>if (!m_isUTF8) {<NEW_... | "Failed to decode a string at offset " + offset + " of length " + length); |
1,149,665 | public List<RecordId> xClaimJustId(byte[] key, String group, String newOwner, XClaimOptions options) {<NEW_LINE>Assert.notNull(key, "Key must not be null!");<NEW_LINE>Assert.notNull(group, "Group name must not be null!");<NEW_LINE>Assert.notNull(newOwner, "NewOwner must not be null!");<NEW_LINE>Assert.notEmpty(options.... | params = new ArrayList<>(); |
1,256,442 | public CharSequence toDisplay() {<NEW_LINE>List<String> segments = new ArrayList<>();<NEW_LINE>if (open) {<NEW_LINE>segments.add("Open issues");<NEW_LINE>} else {<NEW_LINE>segments.add("Closed issues");<NEW_LINE>}<NEW_LINE>if (assignee != null) {<NEW_LINE>segments.add("Assignee: " + assignee.login());<NEW_LINE>}<NEW_LI... | (',').append(' '); |
511,800 | public void paint(Graphics2D g, int x, int y, int w, int h) {<NEW_LINE>float scale = (float) h / (float) mMax;<NEW_LINE>g.setColor(Color.BLACK);<NEW_LINE>int by1 = h - (int) (y + minimum * scale);<NEW_LINE>int by2 = h - (int) (y + maximum * scale);<NEW_LINE>g.drawLine(x, by1, x + w, by1);<NEW_LINE>g.drawLine(x, by2, x ... | x + w / 2, q1); |
854,749 | private String makeMatch(String sql) {<NEW_LINE>Matcher matcher = escapePattern.matcher(sql);<NEW_LINE>if (matcher.find()) {<NEW_LINE>if (this == EscapeFunctions.ESC_DATE || this == EscapeFunctions.ESC_TIME || this == EscapeFunctions.ESC_TIMESTAMP) {<NEW_LINE>matcher = argPattern.matcher(sql);<NEW_LINE>if (matcher.find... | replacementKeyword + matcher.group(1); |
796,475 | private void handleSnapshotMigration(Long srcDataStoreId, Date start, Date end, MigrationPolicy policy, List<Future<AsyncCallFuture<DataObjectResult>>> futures, Map<Long, Pair<Long, Long>> storageCapacities, ThreadPoolExecutor executor) {<NEW_LINE>DataStore srcDatastore = dataStoreManager.getDataStore(srcDataStoreId, D... | findSnapshots(srcDataStoreId, start, end); |
1,428,038 | void read(WizardDescriptor settings) {<NEW_LINE>FileObject targetFolder = Templates.getTargetFolder(settings);<NEW_LINE>projectTextField.setText(ProjectUtils.getInformation(project).getDisplayName());<NEW_LINE>SourceGroup[] <MASK><NEW_LINE>if (sourceGroups.length > 0) {<NEW_LINE>SourceGroupUISupport.connect(locationCom... | sourceGroups = SourceGroups.getJavaSourceGroups(project); |
1,089,671 | public Object doTaskChat(@PathParam("id") String handlerId, @Context HttpHeaders headers) {<NEW_LINE>if (taskId != null) {<NEW_LINE>final List<String> requestTaskIds = headers.getRequestHeader(TASK_ID_HEADER);<NEW_LINE>final String requestTaskId = requestTaskIds != null && !requestTaskIds.isEmpty() ? Iterables.getOnlyE... | .format("Can't find chatHandler for handler[%s]", handlerId)); |
99,686 | synchronized boolean removeRef(Address deleteAddr, int opIndex) throws IOException {<NEW_LINE>LongField addrField = new LongField(addrMap.getKey(deleteAddr, false));<NEW_LINE>for (Field id : table.findRecords(addrField, ADDRESS_COL)) {<NEW_LINE>DBRecord rec = table.getRecord(id);<NEW_LINE>if (rec.getByteValue(OPINDEX_C... | rec.getByteValue(TYPE_COL))); |
265,182 | public boolean execute(final OHttpRequest iRequest, final OHttpResponse iResponse) throws Exception {<NEW_LINE>checkSyntax(iRequest.getUrl(), 1, "Syntax error: server");<NEW_LINE>iRequest.getData().commandInfo = "Server status";<NEW_LINE>final ODocument result = new ODocument();<NEW_LINE>// We copy the returned set so ... | result.field("databases", orderedStorages); |
328,523 | protected void encodeButton(FacesContext context, MenuButton button, String buttonId, boolean disabled) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>boolean isIconLeft = button.getIconPos().equals("left");<NEW_LINE><MASK><NEW_LINE>String buttonClass = getStyleClassBuilder(... | String value = button.getValue(); |
1,122,008 | public void addUncheckedStandardDefaults() {<NEW_LINE>QualifierHierarchy qualHierarchy <MASK><NEW_LINE>Set<? extends AnnotationMirror> tops = qualHierarchy.getTopAnnotations();<NEW_LINE>Set<? extends AnnotationMirror> bottoms = qualHierarchy.getBottomAnnotations();<NEW_LINE>for (TypeUseLocation loc : STANDARD_UNCHECKED... | = this.atypeFactory.getQualifierHierarchy(); |
264,078 | public static Object callScript(String scriptName) throws ScriptExecutionException {<NEW_LINE>ModelRepository repo = ScriptServiceUtil.getModelRepository();<NEW_LINE>if (repo != null) {<NEW_LINE>String scriptNameWithExt = scriptName;<NEW_LINE>if (!scriptName.endsWith(Script.SCRIPT_FILEEXT)) {<NEW_LINE>scriptNameWithExt... | ScriptExecutionException("Script '" + scriptName + "' cannot be found."); |
1,240,356 | public VirtualMachineTO implement(VirtualMachineProfile vm) {<NEW_LINE>BootloaderType bt = BootloaderType.PyGrub;<NEW_LINE>if (vm.getBootLoaderType() == BootloaderType.CD) {<NEW_LINE>bt = vm.getBootLoaderType();<NEW_LINE>}<NEW_LINE>VirtualMachineTO to = toVirtualMachineTO(vm);<NEW_LINE>UserVmVO userVmVO = userVmDao.fin... | valueIn(host.getClusterId()); |
74,965 | public InternalFuture<QueryFilterContext> processSort(String key, boolean ascending) {<NEW_LINE>if (key == null || key.isEmpty()) {<NEW_LINE>key = "date_updated";<NEW_LINE>}<NEW_LINE>switch(key) {<NEW_LINE>case "date_updated":<NEW_LINE>case "date_created":<NEW_LINE>case "name":<NEW_LINE>return InternalFuture.completedI... | 1], ascending, "metrics")); |
1,246,201 | private String uploadWork(Business business, EffectivePerson effectivePerson, Work work, String site, String fileName, byte[] bytes, FormDataContentDisposition disposition) throws Exception {<NEW_LINE>WoControl control = business.getControl(effectivePerson, work, WoControl.class);<NEW_LINE>if (BooleanUtils.isNotTrue(co... | throw new ExceptionAccessDenied(effectivePerson, work); |
1,089,661 | public TimeValuePair composeLastTimeValuePair(int measurementIndex) {<NEW_LINE>if (measurementIndex >= columns.length) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// get non-null value<NEW_LINE>int lastIdx = rowCount - 1;<NEW_LINE>if (bitMaps != null && bitMaps[measurementIndex] != null) {<NEW_LINE>BitMap bitMap = bitM... | boolean[]) columns[measurementIndex]; |
1,704,206 | private List<DalGroup> sortGroups(List<DalGroup> groups, String userNo) throws SQLException {<NEW_LINE>List<DalGroup> result = new ArrayList<DalGroup>(groups.size());<NEW_LINE>LoginUser user = BeanGetter.<MASK><NEW_LINE>List<UserGroup> joinedGroups = BeanGetter.getDalUserGroupDao().getUserGroupByUserId(user.getId());<N... | getDaoOfLoginUser().getUserByNo(userNo); |
281,052 | private void initLocator() {<NEW_LINE>log.fine("");<NEW_LINE>// Load Warehouse<NEW_LINE>String sql = "SELECT M_Warehouse_ID, Name FROM M_Warehouse";<NEW_LINE>if (m_only_Warehouse_ID != 0)<NEW_LINE>sql += " WHERE M_Warehouse_ID=" + m_only_Warehouse_ID;<NEW_LINE>String SQL = MRole.getDefault().addAccessSQL(sql, "M_Wareho... | addEventListener(Events.ON_SELECT, this); |
755,218 | public void resultChanged(org.openide.util.LookupEvent ev) {<NEW_LINE>Collection<? extends ActionMap> ams = result.allInstances();<NEW_LINE>if (err.isLoggable(Level.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>err.fine("changed maps : " + ams);<NEW_LINE>// NOI18N<NEW_LINE>err.fine("previous maps: " + actionMaps);<NEW_LINE>}<NE... | get(i).get(); |
566,883 | Component addComponent() throws IOException {<NEW_LINE>Component component;<NEW_LINE>long readable = readableBytes(data);<NEW_LINE>long offset = position.getAndUpdate(p -> readable);<NEW_LINE>int length = (int) (readable - offset);<NEW_LINE>if (length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>component = new Co... | error = new AtomicReference<>(); |
121,488 | public List<RoleAssignmentRow> initRoleAssignments() {<NEW_LINE>List<RoleAssignmentRow> raList = null;<NEW_LINE>if (dvObject != null && dvObject.getId() != null) {<NEW_LINE>Set<RoleAssignment> ras = roleService.rolesAssignments(dvObject);<NEW_LINE>List<DataverseRole> availableRoles = getAvailableRoles();<NEW_LINE>raLis... | getRoleAssignee(roleAssignment.getAssigneeIdentifier()); |
447,050 | public Geometry union() {<NEW_LINE>if (inputPolys.isEmpty())<NEW_LINE>return null;<NEW_LINE>geomFactory = ((Geometry) inputPolys.iterator().next()).getFactory();<NEW_LINE>loadIndex(inputPolys);<NEW_LINE>// --- cluster the geometries<NEW_LINE>for (PolygonNode queryNode : nodes) {<NEW_LINE>index.query(queryNode.getEnvelo... | .merge((PolygonNode) item); |
776,757 | public Long sumAbsenteeismUnitForDayWithMonth(String year, String month, String unit) throws Exception {<NEW_LINE>EntityManager em = this.entityManagerContainer().get(StatisticDingdingUnitForDay.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Long> query = cb.createQuery(Long.class... | query.from(StatisticDingdingUnitForDay.class); |
858,662 | public void analyze() {<NEW_LINE>AnalysisScope scope = myForwardScope;<NEW_LINE>final DependenciesBuilder builder = new ForwardDependenciesBuilder(getProject(), scope, getScopeOfInterest());<NEW_LINE>builder.setTotalFileCount(myTotalFileCount);<NEW_LINE>builder.analyze();<NEW_LINE>subtractScope(builder, getScope());<NE... | > dependencies = builder.getDependencies(); |
26,795 | public void commandStarted(CommandStartedEvent event) {<NEW_LINE>String databaseName = event.getDatabaseName();<NEW_LINE>// don't trace commands like "endSessions"<NEW_LINE>if ("admin".equals(databaseName))<NEW_LINE>return;<NEW_LINE>Span span = threadLocalSpan.next();<NEW_LINE>if (span == null || span.isNoop())<NEW_LIN... | ), socketAddress.getPort()); |
1,726,510 | private String fixQuery(boolean isSPARUL, String query, Dataset dataset, boolean includeInferred, BindingSet bindings, List<Value> pstmtParams, String baseURI) throws RepositoryException {<NEW_LINE>boolean added_def_graph = false;<NEW_LINE>Set<URI> list;<NEW_LINE>String removeGraph = null;<NEW_LINE>String insertGraph =... | v.toString() + "> \n"); |
1,307,340 | private void print(StringBuffer sb, List<Integer> maxColumnWidths, String prefix, boolean root, boolean last) {<NEW_LINE>StringBuffer column = new StringBuffer();<NEW_LINE>if (!root) {<NEW_LINE>column.append(prefix);<NEW_LINE>column.append(last ? BRANCH_LAST : BRANCH);<NEW_LINE>prefix += last ? INDENT_LAST : INDENT;<NE... | int childCount = children.size(); |
318,383 | private void removeSymbolsByProject(IJavaProject project) {<NEW_LINE>// If project name is null it cannot be in the cache<NEW_LINE>if (project.getElementName() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<EnhancedSymbolInformation> oldSymbols = symbolsByProject.remove(project.getElementName());<NEW_LINE>if (old... | docSymbols = symbolsByDoc.get(docURI); |
532,252 | private Mono<PagedResponse<PerfMonResponseInner>> listPerfMonCountersSlotNextSinglePageAsync(String nextLink) {<NEW_LINE>if (nextLink == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getEndpoint() == null) {<NE... | )).readOnly())); |
1,688,812 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, 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 nu... | this.client.mergeContext(context); |
1,771,277 | protected synchronized void createQuery(String queryString) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("EJBQL query: " + queryString);<NEW_LINE>}<NEW_LINE>query = em.createQuery(queryString);<NEW_LINE>// Set parameters.<NEW_LINE>List<String> parameterNames = getCollectedParameterNames();<NEW_LINE>if (!pa... | String parameterName = iter.next(); |
1,631,291 | static <// / @Generated("This method was generated using jOOQ-tools")<NEW_LINE>T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Seq<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>> crossApply(Stream<? extends T1> stream, Function<? super T1, ? extends Stream<? extends T2>> function2, Function<? super T2, ?... | function12.apply(t))); |
36,575 | private Object calculateLocal(OResult currentRecord, Object target, OCommandContext ctx) {<NEW_LINE>if (methodCall != null) {<NEW_LINE>return <MASK><NEW_LINE>} else if (suffix != null) {<NEW_LINE>return suffix.execute(target, ctx);<NEW_LINE>} else if (arrayRange != null) {<NEW_LINE>return arrayRange.execute(currentReco... | methodCall.execute(target, ctx); |
956,097 | public AppsListDataSummary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AppsListDataSummary appsListDataSummary = new AppsListDataSummary();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context... | String currentParentElement = context.getCurrentParentElement(); |
1,020,755 | final ListAccessesResult executeListAccesses(ListAccessesRequest listAccessesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAccessesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | false), new ListAccessesResultJsonUnmarshaller()); |
1,429,959 | private AppendRequest buildAppendEntriesRequest(final RaftMemberContext member, final long lastIndex) {<NEW_LINE>final IndexedRaftLogEntry prevEntry = member.getCurrentEntry();<NEW_LINE>final DefaultRaftMember leader = raft.getLeader();<NEW_LINE>final AppendRequest.Builder builder = builderWithPreviousEntry(prevEntry).... | IndexedRaftLogEntry entry = member.nextEntry(); |
55,856 | private void loadRatesCurves(ImmutableMarketDataBuilder builder, LocalDate marketDataDate) {<NEW_LINE>if (!subdirectoryExists(CURVES_DIR)) {<NEW_LINE>log.debug("No rates curves directory found");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ResourceLocator curveGroupsResource = getResource(CURVES_DIR, CURVES_GROUPS_FILE);<NEW_... | marketDataDate, curveGroupsResource, curveSettingsResource, curvesResources); |
1,834,627 | public Map<String, List<SystemActionWorkflowActionMapping>> findSystemActionsMapByContentType(final List<ContentType> contentTypes, final User user) throws DotDataException, DotSecurityException {<NEW_LINE>final Map<String, List<Map<String, Object>>> mappingsMap = this.workFlowFactory.findSystemActionsMapByContentType(... | new ImmutableList.Builder<>(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.