idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
652,395 | private List<NameValueCountPair> listActivityNamePair(Business business, EffectivePerson effectivePerson, Wi wi) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Task.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(Str... | activityName)).where(p); |
1,491,676 | void configAndStart() throws Exception {<NEW_LINE>try (Config config = new Config()) {<NEW_LINE>boolean defaultConfig = true;<NEW_LINE>if (mLoadConfig) {<NEW_LINE>if (configStream(config) > 0)<NEW_LINE>defaultConfig = false;<NEW_LINE>}<NEW_LINE>if (mListener != null)<NEW_LINE>mListener.config(config);<NEW_LINE>// try s... | Log.d(TAG, msg); |
572,975 | final CreateTapesResult executeCreateTapes(CreateTapesRequest createTapesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTapesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Storage Gateway"); |
661,277 | private Map<String, String> buildRemapMultiVersions(Iterator<String> zipNameIterator) {<NEW_LINE>SimpleMultiMap<Integer, String> byVersions = SimpleMultiMap.newHashMap();<NEW_LINE>while (zipNameIterator.hasNext()) {<NEW_LINE>String name = zipNameIterator.next();<NEW_LINE>String prefix = "META-INF/versions/";<NEW_LINE>i... | '/', prefix.length()); |
124,992 | protected void processThermostatOperatingStateReport(SerialMessage serialMessage, int offset, int endpoint) {<NEW_LINE>int value = serialMessage.getMessagePayloadByte(offset + 1);<NEW_LINE>logger.debug("NODE {}: Thermostat Operating State report value = {}", this.getNode().getNodeId(), value);<NEW_LINE>OperatingStateTy... | ).getNodeId(), value); |
440,092 | private Block createRawBlock(String defaultName, SectionDefinitionData def) {<NEW_LINE>Block block = new Block();<NEW_LINE>block.setLiquid(def.isLiquid());<NEW_LINE>block.setWater(def.isWater());<NEW_LINE>block.setGrass(def.isGrass());<NEW_LINE>block.setIce(def.isIce());<NEW_LINE>block.setHardness(def.getHardness());<N... | setDoubleSided(def.isDoubleSided()); |
562,031 | private boolean visit(FunctionCall call) {<NEW_LINE>if (!(call.getTarget() instanceof PropertyGet)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>PropertyGet propertyGet = (PropertyGet) call.getTarget();<NEW_LINE>MethodReference methodRef = getJavaMethodSelector(propertyGet.getTarget());<NEW_LINE>if (methodRef == null ||... | method = classSource.resolve(methodRef); |
1,289,102 | public void lookupResource(ApplicationResource resource, boolean contextBound, boolean global) {<NEW_LINE>DataSourceInfo dataSourceInfo = null;<NEW_LINE>if (contextBound) {<NEW_LINE>try {<NEW_LINE>javax.naming.Context ctx = !global ? new InitialContext() : getGlobalNamingContext();<NEW_LINE>if (ctx == null) {<NEW_LINE>... | logger.debug("Looking up datasource adapter: {}", accessorString); |
1,600,922 | private void checkQueryParamStyleProperty(Class<?> aClass) {<NEW_LINE>// User's programmatic setting takes precedence over<NEW_LINE>// microprofile-config.properties.<NEW_LINE>if (queryParamStyle == null) {<NEW_LINE>if (config != null) {<NEW_LINE>// property using fully-qualified class name takes precedence<NEW_LINE>Op... | ) + "/mp-rest/queryParamStyle", String.class); |
865,051 | public Optional<HiveFileWriter> createFileWriter(Path path, List<String> inputColumnNames, StorageFormat storageFormat, Properties schema, JobConf conf, ConnectorSession session, Optional<EncryptionInformation> encryptionInformation) {<NEW_LINE>if (!isParquetOptimizedWriterEnabled(session)) {<NEW_LINE>return Optional.e... | (session)).build(); |
1,806,127 | public synchronized void resetObjInfo() {<NEW_LINE>String detected = ObjTypeDetector.drivedType != null ? ObjTypeDetector.drivedType : ObjTypeDetector.objType != null ? ObjTypeDetector.objType : CounterConstants.JAVA;<NEW_LINE>this.objDetectedType = detected;<NEW_LINE>this.monitoring_group_type = getValue("monitoring_g... | = objHostName + "/" + this.obj_name; |
121,081 | static Component onCreateLayout(ComponentContext c, @State int state) {<NEW_LINE>final boolean redLeft = state == 0 || state == 4 || state == 5;<NEW_LINE>final boolean blueLeft = state == 0 <MASK><NEW_LINE>final boolean greenLeft = state == 0 || state == 1 || state == 2;<NEW_LINE>return Column.create(c).child(Column.cr... | || state == 1 || state == 5; |
1,548,938 | private void sendViaSms(final String caller) {<NEW_LINE>Log.i(TAG, "Sending via built-in Sms");<NEW_LINE>// Need to make sure we have the SEND_SMS permission<NEW_LINE>if (!havePermission) {<NEW_LINE>final Form form = container.$form();<NEW_LINE>final Texting me = this;<NEW_LINE>form.runOnUiThread(new Runnable() {<NEW_L... | caller, Manifest.permission.SEND_SMS); |
1,492,739 | public static void putEncryptedData1() throws NoSuchAlgorithmException {<NEW_LINE>// snippet-start:[s3.java.s3_cse_v2.symmetric]<NEW_LINE>KeyGenerator <MASK><NEW_LINE>keyGenerator.init(256);<NEW_LINE>// generate a symmetric encryption key for testing<NEW_LINE>SecretKey secretKey = keyGenerator.generateKey();<NEW_LINE>/... | keyGenerator = KeyGenerator.getInstance("AES"); |
935,501 | protected boolean processSysEvent(DispatcherState curState, DbusEvent event) {<NEW_LINE>boolean success = true;<NEW_LINE>boolean debugEnabled = getLog().isDebugEnabled();<NEW_LINE>Checkpoint ckptInEvent = null;<NEW_LINE>int eventSrcId = event.getSourceId();<NEW_LINE>if (event.isCheckpointMessage()) {<NEW_LINE><MASK><NE... | ByteBuffer eventValue = event.value(); |
1,200,472 | public void readChunkColumn(DataTypeProvider dataProvider) {<NEW_LINE>// Loop through section Y values, starting from the lowest section that has blocks inside it.<NEW_LINE>for (int sectionY = getMinBlockSection(); sectionY <= getMaxSection() + 1 && dataProvider.hasNext(); sectionY++) {<NEW_LINE>ChunkSection_1_18 secti... | (dataProvider.readVarInt())); |
948,989 | // @Override<NEW_LINE>public void start(final Stage primaryStage) {<NEW_LINE><MASK><NEW_LINE>Rectangle2D bounds = screen.getVisualBounds();<NEW_LINE>primaryStage.setX(0);<NEW_LINE>primaryStage.setY(0);<NEW_LINE>final VBox mainBox = new VBox(30);<NEW_LINE>mainBox.setAlignment(Pos.CENTER);<NEW_LINE>final Scene globalScen... | Screen screen = Screen.getPrimary(); |
1,065,177 | public void processIntent(@NonNull Intent intent) {<NEW_LINE>checkNotNull(intent);<NEW_LINE>if (!intent.hasExtra("serviceUriString")) {<NEW_LINE>Log.e(TAG, "No service uri defined");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!intent.hasExtra("listenerId")) {<NEW_LINE>Log.e(TAG, "No listener id defined");<NEW_LINE>return... | matchingFetcher = fetcherManager.findFetcher(serviceUri); |
508,328 | public Task[] readAll(String instance) throws EntranceIllegalParamException, EntranceRPCException, QueryFailedException {<NEW_LINE>List<Task> <MASK><NEW_LINE>if (instance == null || "".equals(instance)) {<NEW_LINE>throw new EntranceIllegalParamException(20004, "instance can not be null");<NEW_LINE>}<NEW_LINE>RequestRea... | retList = new ArrayList<>(); |
1,169,849 | private void parseLine(CNode root, String line, NormalizedDefinition nd) throws IllegalArgumentException {<NEW_LINE>line = NormalizedDefinition.normalize(line);<NEW_LINE>line = line.trim();<NEW_LINE>if (line.length() == 0) {<NEW_LINE>// If having empty lines in between comments, that is logically a break in the comment... | DefLine defLine = new DefLine(line); |
644,638 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select symbol, sum(price) from " + "SupportMarketDataBean#length(10) as one, " + "SupportBeanString#length(100) as two " + "where one.symbol = two.theString " + "output every 6 events " + "order by volume*sum(price), symbol";<NEW_LINE>env.c... | sendEventBean(new SupportBeanString("KGB")); |
39,139 | public void updateItem(Type item, boolean empty) {<NEW_LINE>super.updateItem(item, empty);<NEW_LINE>setGraphic(null);<NEW_LINE>if (empty) {<NEW_LINE>setText(null);<NEW_LINE>} else {<NEW_LINE>List<String> <MASK><NEW_LINE>for (Type arg : item.getArgumentTypes()) {<NEW_LINE>Type used = arg;<NEW_LINE>int arrayLevel = arg.g... | args = new ArrayList<>(); |
144,895 | private static StringBuilder possibleArgumentTypesOf(InvocationOnMock invocation) {<NEW_LINE>Class<?>[] parameterTypes = invocation<MASK><NEW_LINE>if (parameterTypes.length == 0) {<NEW_LINE>return new StringBuilder("the method has no arguments.\n");<NEW_LINE>}<NEW_LINE>StringBuilder stringBuilder = new StringBuilder("t... | .getMethod().getParameterTypes(); |
1,594,239 | public boolean checkOperandTypes(HazelcastCallBinding binding, boolean throwOnFailure) {<NEW_LINE>HazelcastSqlValidator validator = binding.getValidator();<NEW_LINE>if (binding.getOperandType(0).getSqlTypeName() != VARCHAR) {<NEW_LINE>if (throwOnFailure) {<NEW_LINE>throw binding.newValidationSignatureError();<NEW_LINE>... | operand = binding.operand(i); |
1,038,446 | private void parseConfigFile() throws Exception {<NEW_LINE>String line = null;<NEW_LINE>String[] temp = null;<NEW_LINE>File file = new File(this.confPath);<NEW_LINE>BufferedReader reader = new BufferedReader(new FileReader(file));<NEW_LINE>while ((line = reader.readLine()) != null) {<NEW_LINE>if (line.isEmpty() || line... | this.buid = temp[1]; |
550,895 | public void onBackPressed() {<NEW_LINE>// Toast.makeText(this, "onBackPressed", Toast.LENGTH_SHORT).show();<NEW_LINE>if (isInterstialShown()) {<NEW_LINE>onFinishActivity();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (dc != null && dc.floatingBookmark != null) {<NEW_LINE>dc.floatingBookmark = null;<NEW_LINE>onRefresh.run()... | HorizontalViewActivity.this, null, dc); |
812,860 | public boolean offer(T e) {<NEW_LINE>Objects.requireNonNull(e);<NEW_LINE>long pi = producerIndex;<NEW_LINE>AtomicReferenceArray<Object> a = producerArray;<NEW_LINE>int m = mask;<NEW_LINE>int offset = (int) (pi + 1) & m;<NEW_LINE>if (a.get(offset) != null) {<NEW_LINE>offset = (int) pi & m;<NEW_LINE>AtomicReferenceArray<... | lazySet(this, pi + 1); |
955,811 | public void rollback(final FlowRollback chain, Map data) {<NEW_LINE>if (!data.containsKey(VmStartOnHypervisorFlow.class.getName())) {<NEW_LINE>chain.rollback();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final VmInstanceSpec spec = (VmInstanceSpec) data.get(VmInstanceConstant.Params.VmInstanceSpec.toString());<NEW_LINE>StopV... | setVmInventory(spec.getVmInventory()); |
1,549,614 | public void close() {<NEW_LINE>LOG.info("Close netty connection to {}", name());<NEW_LINE>if (!beingClosed.compareAndSet(false, true)) {<NEW_LINE>LOG.info("Netty client has been closed.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!connectMyself) {<NEW_LINE>unregisterMetrics();<NEW_LINE>}<NEW_LINE>Channel channel = chan... | = System.currentTimeMillis() - start; |
1,208,278 | private Sendung.Empfaenger createGODeliveryAddress(final Address deliveryAddress, final ContactPerson deliveryContact) {<NEW_LINE>// Consginee address<NEW_LINE>final Sendung.Empfaenger goDeliveryAddress = objectFactory.createSendungEmpfaenger();<NEW_LINE>// Name 1 (an60, mandatory)<NEW_LINE>goDeliveryAddress.setFirmenn... | PhoneNumber phone = deliveryContact.getPhone(); |
1,325,273 | public void sendSync(long userId, Event event, Position position) {<NEW_LINE>final User user = Context.getPermissionsManager().getUser(userId);<NEW_LINE>String device = "";<NEW_LINE>if (user.getAttributes().containsKey("notificator.pushover.device")) {<NEW_LINE>device = user.getString("notificator.pushover.device").rep... | LOGGER.warn("Pushover API error", throwable); |
195,318 | private void growHashTable() {<NEW_LINE>int[] newHashedOrdinals = new int[hashedOrdinals.length * 2];<NEW_LINE>int[] newOrdinalHashCodes = new int[ordinalHashCodes.length * 2];<NEW_LINE>int[] newOrdinalHashCodeCounts = new <MASK><NEW_LINE>Arrays.fill(newHashedOrdinals, -1);<NEW_LINE>long[] ordinalsAndHashCodes = ordina... | int[ordinalHashCounts.length * 2]; |
116,962 | protected void initListeners() {<NEW_LINE>super.initListeners();<NEW_LINE>binding.detailTitleRootLayout.setOnClickListener(this);<NEW_LINE>binding.detailTitleRootLayout.setOnLongClickListener(this);<NEW_LINE>binding.detailUploaderRootLayout.setOnClickListener(this);<NEW_LINE>binding.detailUploaderRootLayout.setOnLongCl... | binding.detailControlsShare.setOnClickListener(this); |
627,290 | public static float[] XYZtoLAB(float x, float y, float z, float[] tristimulus) {<NEW_LINE>float[] lab = new float[3];<NEW_LINE>x /= tristimulus[0];<NEW_LINE>y /= tristimulus[1];<NEW_LINE>z /= tristimulus[2];<NEW_LINE>if (x > 0.008856)<NEW_LINE>x = (float) Math.pow(x, 0.33f);<NEW_LINE>else<NEW_LINE>x = (7.787f * x) + (0... | Math.pow(z, 0.33f); |
1,058,675 | public void execute() {<NEW_LINE>BackgroundTask<Optional<BibEntry>> backgroundTask = searchAndImportEntryInBackground();<NEW_LINE>backgroundTask.titleProperty().set(Localization.lang("Import by ID"));<NEW_LINE>backgroundTask.showToUser(true);<NEW_LINE>backgroundTask.onRunning(() -> dialogService.notify("%s".formatted(b... | libraryTab.getBibDatabaseContext(), entry); |
1,147,930 | private void renameOutgoingPhis(int successor, boolean allVersions) {<NEW_LINE>int[] phiIndexes = phiIndexMap[successor];<NEW_LINE>List<Phi> phis = synthesizedPhisByBlock.get(successor);<NEW_LINE>for (int j = 0; j < phis.size(); ++j) {<NEW_LINE>Phi phi = phis.get(j);<NEW_LINE>Variable originalVar = program.variableAt(p... | = variableMap[phiIndexes[j]]; |
362,682 | public void read(org.apache.thrift.protocol.TProtocol iprot, add_filter_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == o... | struct.ex = new rpc_management_exception(); |
351,675 | public String generateClassData() {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>Constructor[] constructors;<NEW_LINE>Method[] methods;<NEW_LINE>Field[] fields;<NEW_LINE>Class currentClass;<NEW_LINE>String x, y;<NEW_LINE>Hashtable<String, String> classRef;<NEW_LINE>currentClass = clazz;<NEW_LINE>x = curre... | " methods\n" + fields.length + " fields\n"); |
963,902 | public static void main(String[] args) {<NEW_LINE>InputReader in = new InputReader(System.in);<NEW_LINE>PrintWriter pw = new PrintWriter(System.out);<NEW_LINE>// Code starts..<NEW_LINE>int n = in.nextInt();<NEW_LINE>int[] a = in.nextIntArray(n);<NEW_LINE>query[] qr1 = new query[n];<NEW_LINE>pair[] p = new pair[n];<NEW_... | (a[i]) + 1; |
161,988 | public void start() {<NEW_LINE>Duration[] defaultLatchIntervals = { Duration.apply(1, TimeUnit.MINUTES) };<NEW_LINE>Map<String, CustomHttpHandler> handlers = mPrometheusEnabled ? new Map.Map1<>("/prometheus", new PrometheusHandler()) : Map$.MODULE$.empty();<NEW_LINE>@SuppressWarnings("deprecation")<NEW_LINE>AdminServic... | StatsUtil.setLabel("secor.build_revision", buildRevision); |
1,428,507 | public ValueNode canonical(CanonicalizerTool tool, ValueNode forObject) {<NEW_LINE>NodeView view = NodeView.from(tool);<NEW_LINE>if (tool.allUsagesAvailable() && hasNoUsages() && !ordersMemoryAccesses()) {<NEW_LINE>if (isStatic() || StampTool.isPointerNonNull(forObject.stamp(view))) {<NEW_LINE>return null;<NEW_LINE>}<N... | ), tool.allUsagesAvailable()); |
450,907 | public ResponseEntity<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws RestClientException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the re... | localVarAccept, localVarContentType, localVarAuthNames, localReturnType); |
957,597 | public UpdateSecretResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateSecretResult updateSecretResult = new UpdateSecretResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | class).unmarshall(context)); |
321,008 | public boolean performOk() {<NEW_LINE>DBPPreferenceStore store = DBWorkbench.getPlatform().getPreferenceStore();<NEW_LINE>if (isStandalone) {<NEW_LINE>store.setValue(DBeaverPreferences.UI_AUTO_UPDATE_CHECK, automaticUpdateCheck.getSelection());<NEW_LINE>}<NEW_LINE>store.setValue(ModelPreferences.NOTIFICATIONS_ENABLED, ... | NOTIFICATIONS_CLOSE_DELAY_TIMEOUT, notificationsCloseDelay.getSelection()); |
425,611 | private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,493,502 | public static DescribeAppDetailResponse unmarshall(DescribeAppDetailResponse describeAppDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAppDetailResponse.setRequestId(_ctx.stringValue("DescribeAppDetailResponse.RequestId"));<NEW_LINE>describeAppDetailResponse.setCode(_ctx.longValue("DescribeAppDetailRespon... | (_ctx.longValue("DescribeAppDetailResponse.Result.AppId")); |
585,725 | public Object onCall(String method, Map<String, Object> param) {<NEW_LINE>Bundle result = new Bundle();<NEW_LINE>ConversationEventListener conversationEventListener = getInstance().getConversationEventListener();<NEW_LINE>if (conversationEventListener == null) {<NEW_LINE>TUIConversationLog.e(TAG, "execute " + method + ... | get(TUIConstants.TUIConversation.CHAT_ID); |
1,063,388 | final GetFileUploadURLResult executeGetFileUploadURL(GetFileUploadURLRequest getFileUploadURLRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFileUploadURLRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | invoke(request, responseHandler, executionContext); |
911,792 | private void publishBlindVote(Coin stake) {<NEW_LINE>// TODO Starting voteButtonBusyAnimation here does not make sense if we stop it immediately below.<NEW_LINE>// Check if voteButtonBusyAnimation should stay running until we hear back from publishing and only disable<NEW_LINE>// button so that the user cannot click tw... | ("dao.blindVote.success")).show(); |
622,103 | public Token produce() throws CompileException, IOException {<NEW_LINE>if (this.peek() == -1)<NEW_LINE>return this.token(TokenType.END_OF_INPUT, "end-of-input");<NEW_LINE>// Funny... the JLS calls it "white space", and the JRE calls it "whitespace"!?<NEW_LINE>if (this.ignoreWhiteSpace && Character.isWhitespace(this.pee... | = this.sb.toString(); |
46,451 | public void announcementGet(String columns, final Response.Listener<List<Announcement>> responseListener, final Response.ErrorListener errorListener) {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/announcement".replaceAll("\\{format\\}", "json");<NEW_LINE>// query ... | , "array", Announcement.class)); |
16,690 | public static void main(String[] args) throws Exception {<NEW_LINE>JetConfig jetConfig = getJetConfig();<NEW_LINE>JetInstance jet = Jet.newJetInstance(jetConfig);<NEW_LINE>Jet.newJetInstance(jetConfig);<NEW_LINE>try {<NEW_LINE>Pipeline p = Pipeline.create();<NEW_LINE>p.readFrom(Sources.<Integer, Integer>mapJournal(MAP_... | ).size() + " entries from map journal."); |
1,586,598 | private Map<ParameterServerId, PSMatricesLoadContext> split(int requestId, ModelLoadContext loadContext) throws IOException {<NEW_LINE>List<MatrixLoadContext> matricesContext = loadContext.getMatricesContext();<NEW_LINE>Map<ParameterServerId, List<PSMatrixLoadContext>> psIdToContextsMap = new HashMap<>();<NEW_LINE>int ... | add(matrixEntry.getValue()); |
44,048 | public void watch() {<NEW_LINE>boolean activated = false;<NEW_LINE>if (this.properties.isMonitoringConfigMaps()) {<NEW_LINE>try {<NEW_LINE>String name = "config-maps-watch-event";<NEW_LINE>this.watches.put(name, this.kubernetesClient.configMaps().watch(new Watcher<ConfigMap>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>pu... | this.log.info("Kubernetes event-based configMap change detector activated"); |
1,049,639 | UnmodifiableIterator<Entry<K, V>> entryIterator() {<NEW_LINE>return new UnmodifiableIterator<Entry<K, V>>() {<NEW_LINE><NEW_LINE>final Iterator<? extends Entry<K, ? extends ImmutableCollection<V>>> asMapItr = map.entrySet().iterator();<NEW_LINE><NEW_LINE>@CheckForNull<NEW_LINE>K currentKey = null;<NEW_LINE><NEW_LINE>It... | () || asMapItr.hasNext(); |
911,811 | public KeyManagerFactory initializeKeyManagerFactory() throws DrillException {<NEW_LINE>KeyManagerFactory kmf;<NEW_LINE>String keyStorePath = getKeyStorePath();<NEW_LINE>String keyStorePassword = getKeyStorePassword();<NEW_LINE>String keyStoreType = getKeyStoreType();<NEW_LINE>try {<NEW_LINE>if (keyStorePath.isEmpty())... | InputStream ksStream = new FileInputStream(keyStorePath); |
845,051 | public boolean process() {<NEW_LINE>if (configConverge.maxIterations == 0)<NEW_LINE>return true;<NEW_LINE>if (configScale)<NEW_LINE>scaler.applyScale(structure, observations);<NEW_LINE>sba.configure(configConverge.ftol, configConverge.gtol, configConverge.maxIterations);<NEW_LINE>sba.setParameters(structure, observatio... | (keepFraction, -1, 1); |
870,287 | private boolean decode(T gray, QrCode qr) {<NEW_LINE>if (!extractFormatInfo(qr)) {<NEW_LINE>qr.failureCause = QrCode.Failure.FORMAT;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!extractVersionInfo(qr)) {<NEW_LINE>qr.failureCause = QrCode.Failure.VERSION;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!alignmentLocat... | .getTransformGrid().removeFeatureWithLargestError(); |
1,247,524 | final CreateResourceResult executeCreateResource(CreateResourceRequest createResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.SERVICE_ID, "CloudControl"); |
544,961 | public String prepareIt() {<NEW_LINE>log.info(toString());<NEW_LINE>m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE);<NEW_LINE>if (m_processMsg != null)<NEW_LINE>return DocAction.STATUS_Invalid;<NEW_LINE>MRequisitionLine[] lines = getLines();<NEW_LINE>// Invalid<NEW... | MDocType.DOCBASETYPE_PurchaseRequisition, getAD_Org_ID()); |
1,455,765 | public void prepareChunkedQuery(PreparedStatement stmt, List<Object> values) throws SQLException {<NEW_LINE><MASK><NEW_LINE>// Bind all variables in the PreparedStatement i.e. the '?' to values supplied in the list.<NEW_LINE>// For the example query<NEW_LINE>//<NEW_LINE>// SELECT * FROM<NEW_LINE>// (<NEW_LINE>// SELECT... | int count = values.size(); |
1,052,455 | public static void displayUsage(final PrintStream ps, final String commandName, final String version, final String commandShortSummary, final String commandDescription, final List<List<Argument>> commandVariants, final List<String> tips, final char valuedArgumentsSeparator) {<NEW_LINE>ps.println();<NEW_LINE>ps.println(... | version) : "") + "\n\n"); |
1,603,010 | public static Optional<ApiListing> mergedApiListing(Collection<ApiListing> apiListings) {<NEW_LINE>if (nullToEmptyList(apiListings).size() > 1) {<NEW_LINE>ApiListing merged = new ApiListing();<NEW_LINE>merged.setSwaggerVersion("1.2");<NEW_LINE>merged.setPosition(0);<NEW_LINE>for (ApiListing each : apiListings) {<NEW_LI... | setApiVersion(each.getApiVersion()); |
1,123,274 | int allSlotsInAnnotationDo(U32Pointer annotation, String annotationSectionName) throws CorruptDataException {<NEW_LINE>int increment = 0;<NEW_LINE>int annotationLength = annotation.<MASK><NEW_LINE>int padding = U32.SIZEOF - (annotationLength % U32.SIZEOF);<NEW_LINE>increment = annotationLength / U32.SIZEOF;<NEW_LINE>if... | at(0).intValue(); |
1,834,993 | private void commitTrusts() {<NEW_LINE>for (final String fingerprint : ownKeysToTrust.keySet()) {<NEW_LINE>mAccount.getAxolotlService().setFingerprintTrust(fingerprint, FingerprintStatus.createActive(ownKeysToTrust.get(fingerprint)));<NEW_LINE>}<NEW_LINE>List<Jid> acceptedTargets = mConversation == null ? new ArrayList... | value.get(fingerprint))); |
830,278 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('create') create window MyWindowMU#unique(theString)#length(2) retain-union as select * from SupportBean;\n" + "insert into MyWindowMU select * from SupportBean;\n" + "on SupportBean_A update MyWindowMU mw set mw.intPrimitive=intPrimitive*100 whe... | , { "E2", 300 } }); |
1,456,802 | private static double lengthReductionToStayWithinBounds(Point2D centerPoint, double width, double height, Rectangle2D bounds) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Objects.requireNonNull(centerPoint, "The specified center point of the new rectangle must not be null.");<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Objects.requireNonNu... | ) - bounds.getMinY()); |
1,197,018 | public void paintBorder(final Component c, final Graphics g, int x, int y, int width, int height) {<NEW_LINE>// g.setColor(Color.MAGENTA);<NEW_LINE>// g.drawRect(x, y, width - 1, height - 1);<NEW_LINE>if (!(c instanceof JTextComponent)) {<NEW_LINE>painter.state.set(State.ACTIVE);<NEW_LINE>painter.state.set(Focused.NO);... | x, y, width, height); |
103,910 | public String generateRRULEString() {<NEW_LINE>StringBuilder finalRRule = new StringBuilder();<NEW_LINE>// Handle frequency.<NEW_LINE>if (this.frequency != null) {<NEW_LINE>String frequencyPart = "FREQ=" + frequency.toRfcStringId();<NEW_LINE>finalRRule.append(frequencyPart);<NEW_LINE>finalRRule.append(";");<NEW_LINE>//... | append(weeklyRecurrencesString.toString()); |
737,193 | public OutputStream visitClass(String classname, Element... originatingElements) throws IOException {<NEW_LINE>File classesDir = compilationUnit.getConfiguration().getTargetDirectory();<NEW_LINE>if (classesDir != null) {<NEW_LINE>DirectoryClassWriterOutputVisitor outputVisitor = new DirectoryClassWriterOutputVisitor(cl... | outputVisitor.visitClass(classname, originatingElements); |
1,576,799 | private View inflateRoutingParameter(final int position) {<NEW_LINE>View v = mapActivity.getLayoutInflater().inflate(R.layout.layers_list_activity_item, null);<NEW_LINE>AndroidUtils.setListItemBackground(mapActivity, v, nightMode);<NEW_LINE>final TextView tv = (TextView) v.findViewById(R.id.title);<NEW_LINE>final TextV... | (R.id.toggle_item)); |
1,070,673 | public static ListQuotaApplicationsResponse unmarshall(ListQuotaApplicationsResponse listQuotaApplicationsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listQuotaApplicationsResponse.setRequestId(_ctx.stringValue("ListQuotaApplicationsResponse.RequestId"));<NEW_LINE>listQuotaApplicationsResponse.setTotalCount(_ctx.inte... | ("ListQuotaApplicationsResponse.QuotaApplications[" + i + "].ApplicationId")); |
1,652,519 | public static OptionDescriptor create(String name, OptionType optionType, Class<?> optionValueType, String help, String[] extraHelp, Class<?> declaringClass, String fieldName, OptionKey<?> option, boolean deprecated, String deprecationMessage) {<NEW_LINE>assert option != null : declaringClass + "." + fieldName;<NEW_LIN... | fieldName) && result.optionKey == option; |
500,317 | public static void drawOutlinedBox(Box bb, BufferBuilder bufferBuilder) {<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.minY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.... | bb.minZ).next(); |
910,442 | protected AST visit(AST node) {<NEW_LINE>if (node.getType() != XQ.PathExpr) {<NEW_LINE>return node;<NEW_LINE>}<NEW_LINE>snapshot();<NEW_LINE>boolean checkInput = false;<NEW_LINE>boolean skipDDO = false;<NEW_LINE>int len = 0;<NEW_LINE>for (int i = 1; i < node.getChildCount(); i++) {<NEW_LINE>AST step = node.getChild(i);... | step) == XQ.CHILD)); |
902,942 | public static DescribeCpmcPunishListResponse unmarshall(DescribeCpmcPunishListResponse describeCpmcPunishListResponse, UnmarshallerContext context) {<NEW_LINE>describeCpmcPunishListResponse.setRequestId(context.stringValue("DescribeCpmcPunishListResponse.RequestId"));<NEW_LINE>describeCpmcPunishListResponse.setModule(c... | ("DescribeCpmcPunishListResponse.DataList[" + i + "].PunishType")); |
617,766 | void updateAccountsFromFile(String accountJsonPath, boolean ignoreSnapshotVersion) throws IOException, AccountServiceException {<NEW_LINE><MASK><NEW_LINE>Collection<Account> accountsToUpdate = getAccountsFromJson(accountJsonPath);<NEW_LINE>if (!hasDuplicateAccountIdOrName(accountsToUpdate)) {<NEW_LINE>if (ignoreSnapsho... | long startTime = System.currentTimeMillis(); |
670,204 | protected QueryDataSet processShowQuery(ShowPlan showPlan, QueryContext context) throws QueryProcessException, MetadataException {<NEW_LINE>switch(showPlan.getShowContentType()) {<NEW_LINE>case TTL:<NEW_LINE>return processShowTTLQuery((ShowTTLPlan) showPlan);<NEW_LINE>case FLUSH_TASK_INFO:<NEW_LINE>return processShowFl... | return processShowChildPaths((ShowChildPathsPlan) showPlan); |
1,185,073 | public static MProject copyFrom(final Properties ctx, final int C_Project_ID, final Timestamp dateDoc, final String trxName) {<NEW_LINE>final MProject from = new MProject(ctx, C_Project_ID, trxName);<NEW_LINE>if (from.getC_Project_ID() == 0)<NEW_LINE><MASK><NEW_LINE>//<NEW_LINE>final MProject to = new MProject(ctx, 0, ... | throw new IllegalArgumentException("From Project not found C_Project_ID=" + C_Project_ID); |
1,472,844 | private PredicateFinalStep generateDateOrdinalSearchTerms(String theSearchParamName, DateParam theDateParam) {<NEW_LINE>String lowerOrdinalField = SEARCH_PARAM_ROOT + "." + theSearchParamName + ".dt.lower-ord";<NEW_LINE>String upperOrdinalField = SEARCH_PARAM_ROOT + "." + theSearchParamName + ".dt.upper-ord";<NEW_LINE>... | getCompletedDate(theDateParam.getValueAsString()); |
1,215,303 | public static String repeat(String value, int count) {<NEW_LINE>if (count < 0) {<NEW_LINE>throw new IllegalArgumentException("count is negative: " + count);<NEW_LINE>}<NEW_LINE>if (value == null || value.length() == 0 || count == 1) {<NEW_LINE>return value;<NEW_LINE>}<NEW_LINE>if (count == 0) {<NEW_LINE>return "";<NEW_... | int len = value.length(); |
1,701,208 | public void initFreeVersionBanner() {<NEW_LINE>if (!shouldShowFreeVersionBanner(ctx.getMyApplication())) {<NEW_LINE>freeVersionBanner.setVisibility(View.GONE);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>freeVersionBanner.setVisibility(View.VISIBLE);<NEW_LINE>downloadsLeftProgressBar.setMax(DownloadValidationManager.MAXIMUM_A... | , DownloadValidationManager.MAXIMUM_AVAILABLE_FREE_DOWNLOADS + "")); |
206,610 | public Request<DeregisterTransitGatewayMulticastGroupSourcesRequest> marshall(DeregisterTransitGatewayMulticastGroupSourcesRequest deregisterTransitGatewayMulticastGroupSourcesRequest) {<NEW_LINE>if (deregisterTransitGatewayMulticastGroupSourcesRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument ... | request.setHttpMethod(HttpMethodName.POST); |
652,017 | public void filter() {<NEW_LINE>final String filter = getFilter();<NEW_LINE>if (filter != null && filter.length() > 0) {<NEW_LINE>if (!myExpansionMonitor.isFreeze()) {<NEW_LINE>myExpansionMonitor.freeze();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>IntentionSettingsTree.this.filter(filterModel(filter, true));<NEW_LINE>if (myTree !... | getGlobalInstance().doForceFocusWhenFocusSettlesDown(myTree); |
903,615 | private static String[] extractHostports(SrvRecord[] srvRecords) {<NEW_LINE>String[] hostports = null;<NEW_LINE>int head = 0;<NEW_LINE>int tail = 0;<NEW_LINE>int sublistLength = 0;<NEW_LINE>int k = 0;<NEW_LINE>for (int i = 0; i < srvRecords.length; i++) {<NEW_LINE>if (hostports == null) {<NEW_LINE>hostports = new Strin... | selectHostport(srvRecords, head, tail); |
1,335,126 | public S3DataRepositoryConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>S3DataRepositoryConfiguration s3DataRepositoryConfiguration = new S3DataRepositoryConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurren... | ().unmarshall(context)); |
1,578,507 | public void doMentionToSpeaker(Annotation doc) {<NEW_LINE>List<CoreMap> quotes = doc.get(CoreAnnotations.QuotationsAnnotation.class);<NEW_LINE>List<List<Pair<Integer, Integer>>> skipChains = new ArrayList<>();<NEW_LINE>// Pairs are (pred_idx, paragraph_idx)<NEW_LINE>List<Pair<Integer, Integer>> currChain = new ArrayLis... | (QuoteAttributionAnnotator.SpeakerAnnotation.class)); |
782,323 | public CodegenExpression makeCodegen(CodegenMethodScope parent, SAIFFInitializeSymbol symbols, CodegenClassScope classScope) {<NEW_LINE>CodegenMethod method = parent.makeChild(ContextControllerDetailHash.EPTYPE, this.getClass(), classScope);<NEW_LINE>method.getBlock().declareVar(ContextControllerDetailHashItem.EPTYPEAR... | items.size()))); |
409,129 | protected Control createDialogArea(Composite parent) {<NEW_LINE>Composite comp = (Composite) super.createDialogArea(parent);<NEW_LINE>FillLayout fillLayout = new FillLayout();<NEW_LINE>fillLayout.marginWidth = 5;<NEW_LINE>comp.setLayout(fillLayout);<NEW_LINE>Group container = new Group(comp, SWT.NONE);<NEW_LINE>GridLay... | ().getUpper())); |
182,074 | private void closeTab(TabView tab, boolean animateRemove, boolean removeFromList) {<NEW_LINE>int index = mViews.indexOf(tab);<NEW_LINE>if (index == -1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (removeFromList == true && tab.getUrl().toString().equals(Constant.WELCOME_MESSAGE_URL)) {<NEW_LINE>Settings.get().setWelcomeM... | int viewsCount = mViews.size(); |
222,180 | private void initializeThreadCount(CommandLine cmd) {<NEW_LINE>// Check if there are a fixed number of threads or variable.<NEW_LINE>String numThreadsStr = cmd.getOptionValue("num_threads");<NEW_LINE>if (readOnly) {<NEW_LINE>numReaderThreads = AppBase.appConfig.numReaderThreads;<NEW_LINE>numWriterThreads = 0;<NEW_LINE>... | numThreads = Integer.parseInt(numThreadsStr); |
1,597,394 | public TbQueueConsumer<TbProtoQueueMsg<ToCoreNotificationMsg>> createToCoreNotificationsMsgConsumer() {<NEW_LINE>TbKafkaConsumerTemplate.TbKafkaConsumerTemplateBuilder<TbProtoQueueMsg<ToCoreNotificationMsg>> consumerBuilder = TbKafkaConsumerTemplate.builder();<NEW_LINE>consumerBuilder.settings(kafkaSettings);<NEW_LINE>... | "tb-core-notifications-consumer-" + serviceInfoProvider.getServiceId()); |
603,180 | private void paintAxisYRight(final Graphics g2d) {<NEW_LINE>final Chart2D chart = this.getAccessor().getChart();<NEW_LINE>int tmp = 0;<NEW_LINE>final FontMetrics fontdim = g2d.getFontMetrics();<NEW_LINE>final int xAxisStart = chart.getXChartStart();<NEW_LINE>final int xAxisEnd = chart.getXChartEnd();<NEW_LINE>final int... | = tickPainter.getMajorTickLength() + 4; |
1,588,892 | public Object calculate(Context ctx) {<NEW_LINE>IParam param = this.param;<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("case" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>IParam defaultParam = null;<NEW_LINE>if (param.getType() == IPar... | param = param.getSub(0); |
1,846,438 | private IStatus publishDiagnostics(IProgressMonitor monitor) throws JavaModelException {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>if (monitor.isCanceled()) {<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>this.sharedASTProvider.disposeAST();<NEW_LINE>List<ICompilationUnit> toValidate = Arra... | (ICompilationUnit) astRoot.getTypeRoot(); |
1,259,982 | private void swt_updateSideBarHitAreasY(SideBarEntrySWT[] entries) {<NEW_LINE>for (int x = 0; x < entries.length; x++) {<NEW_LINE>SideBarEntrySWT entry = entries[x];<NEW_LINE>TreeItem treeItem = entry.getTreeItem();<NEW_LINE>if (treeItem == null || treeItem.isDisposed()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Rectang... | height - bounds.height) / 2; |
24,109 | protected StateMachineContext<S, E> buildStateMachineContext(StateMachine<S, E> stateMachine) {<NEW_LINE>ExtendedState extendedState = new DefaultExtendedState();<NEW_LINE>extendedState.getVariables().putAll(stateMachine.getExtendedState().getVariables());<NEW_LINE>ArrayList<StateMachineContext<S, E>> childs = new Arra... | >) submachine).getHistoryState(); |
1,812,801 | private static Map<String, Object> prepareMap(Index index, ParsedDocument doc, long tookInNanos, boolean reformat, int maxSourceCharsToLog) {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put("message", index);<NEW_LINE>map.put("took", TimeValue.timeValueNanos(tookInNanos));<NEW_LINE>map.put("took_mi... | "failed to convert source for slow log entry [%s]", map.toString()); |
1,727,776 | // GEN-LAST:event_MenuItemViewTermFontDecActionPerformed<NEW_LINE>private void MenuItemViewEditorFontIncActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_MenuItemViewEditorFontIncActionPerformed<NEW_LINE>int size = TextEditor1.get(iTab).getFont().getSize();<NEW_LINE>if (size < EDITOR_FONT_SI... | .getSize() + 1f)); |
1,649,060 | private void zoomEnd() {<NEW_LINE>Image img = center.getImage();<NEW_LINE>final double originalScale = Math.min((bg.getHeight() - 20) / img.getHeight(), (bg.getWidth() - 20) / img.getWidth());<NEW_LINE>final <MASK><NEW_LINE>final double ratio = newScale / originalScale;<NEW_LINE>if (ratio > 0.8 && ratio < 1.25) {<NEW_L... | double newScale = center.getScaleX(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.