idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
181,270 | public List<Long> listClustersInZoneOrPodByHostCapacities(long id, long vmId, int requiredCpu, long requiredRam, short capacityTypeForOrdering, boolean isZone) {<NEW_LINE>TransactionLegacy txn = TransactionLegacy.currentTxn();<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>List<Long> result = new ArrayList<Long>();<... | pstmt.setLong(5, id); |
1,226,966 | public ImageUploadResult modifyImage(String mediaId, ImageUrlPayload imageUrlPayload) throws APIConnectionException, APIRequestException {<NEW_LINE>Preconditions.checkArgument(StringUtils.isNotEmpty(mediaId), "mediaId should not be empty");<NEW_LINE>checkImageUrlPayload(imageUrlPayload);<NEW_LINE>NativeHttpClient clien... | LOG.info("upload image result:{}", imageUploadResult); |
710,650 | public void propagate(int v, int mask) throws ContradictionException {<NEW_LINE>if (vars[v].getUB().size() == 0) {<NEW_LINE>if (emptySetIndex.get() != -1) {<NEW_LINE>// TODO: could be more precise, for explanation purpose<NEW_LINE>fails();<NEW_LINE>} else {<NEW_LINE>emptySetIndex.set(v);<NEW_LINE>for (int i = 0; i < va... | ).next(), this); |
1,785,392 | public void marshall(CreateNodegroupRequest createNodegroupRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createNodegroupRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createNodegroupReq... | createNodegroupRequest.getNodegroupName(), NODEGROUPNAME_BINDING); |
1,760,624 | public static // }<NEW_LINE>void generateJLRF_GetLong(ClassWriter cw, String classname) {<NEW_LINE>FieldVisitor fv = cw.visitField(ACC_PUBLIC + ACC_STATIC, jlrfGetLongMember, "Ljava/lang/reflect/Method;", null, null);<NEW_LINE>fv.visitEnd();<NEW_LINE>MethodVisitor mv = cw.visitMethod(ACC_PRIVATE + ACC_STATIC, jlrfGetLo... | mv.visitTypeInsn(CHECKCAST, "java/lang/Long"); |
673,014 | public void onLoadChildren(final String parentMediaId, final MediaBrowserServiceCompat.Result<List<MediaBrowserCompat.MediaItem>> result, Bundle options) {<NEW_LINE>if (audioHandlerInterface != null) {<NEW_LINE>Map<String, Object> args = new HashMap<>();<NEW_LINE>args.put("parentMediaId", parentMediaId);<NEW_LINE>args.... | Map<?, ?>) obj; |
1,769,563 | /* Enumerator */<NEW_LINE>public synchronized Enumerator elements() throws IOException {<NEW_LINE>final Worker.Enumerator[] enums = new Worker.Enumerator[workers.length];<NEW_LINE>for (int j = 0; j < workers.length; j++) {<NEW_LINE>enums[j] = workers[j].elements();<NEW_LINE>}<NEW_LINE>return new Enumerator() {<NEW_LINE... | hasMoreFP() ? 42L : -1L; |
1,176,849 | public WebResourceResponse onShouldInterceptRequest(Object request) {<NEW_LINE>String url = request instanceof String ? (String) request : null;<NEW_LINE>String method = "GET";<NEW_LINE>Map<String, String> headers = null;<NEW_LINE>boolean hasGesture = false;<NEW_LINE>boolean isForMainFrame = true;<NEW_LINE>boolean isRe... | invokeMethodAndWait(channel, "shouldInterceptRequest", obj); |
903,278 | public void updateToCountryId(@NonNull final I_C_Tax tax) {<NEW_LINE>final TypeOfDestCountry typeOfDestCountry = TypeOfDestCountry.ofNullableCode(tax.getTypeOfDestCountry());<NEW_LINE>final <MASK><NEW_LINE>final int toCountryIdRepoId = tax.getTo_Country_ID();<NEW_LINE>if ((DOMESTIC.equals(typeOfDestCountry) && countryI... | int countryId = tax.getC_Country_ID(); |
1,274,802 | private void testJMSProducerSendMessage_Topic_SecOff(TopicConnectionFactory topicConnectionFactory) throws JMSException, TestException {<NEW_LINE>// Use the default context so that the message is produced and consumed using the<NEW_LINE>// servlet transaction which is committed after the servlet returns.<NEW_LINE>try (... | sentMessage = jmsContext.createTextMessage(sentMessageBody); |
1,497,584 | public void operationComplete(CommandFuture<MetaServerConsoleService.PreviousPrimaryDcMessage> commandFuture) throws Exception {<NEW_LINE>if (commandFuture.isSuccess()) {<NEW_LINE>MetaServerConsoleService.<MASK><NEW_LINE>logger.info("[doPrevPrimaryDcMigrate][result]{},{},{},{}", cluster, shard, dc, previousPrimaryDcMes... | PreviousPrimaryDcMessage previousPrimaryDcMessage = commandFuture.get(); |
342,570 | public boolean bookLocal(LayerInterface layer, String hostname, String user, LocalHostAssignment lha) {<NEW_LINE>logger.info("Setting up local booking for " + user + " on " + layer);<NEW_LINE>DispatchHost host = hostManager.findDispatchHost(hostname);<NEW_LINE>if (host.lockState.equals(LockState.OPEN)) {<NEW_LINE>throw... | SpcueRuntimeException("The host " + host + " is not NIMBY locked"); |
974,821 | public static void main(String[] args) {<NEW_LINE>double ok = Math.sqrt(4);<NEW_LINE>double nan = Math.sqrt(-2);<NEW_LINE>double ok2 = Math.atan2(1, 2);<NEW_LINE>double ok3 = Math.log(nan);<NEW_LINE>double nan2 = Math.log(-3);<NEW_LINE>Pattern okpat = Pattern.compile("[a-z][^0-3]+");<NEW_LINE>Pattern badpat = Pattern.c... | a.replaceAll("[aeio]", "[x"); |
382,182 | public static DescribeEpnMeasurementDataResponse unmarshall(DescribeEpnMeasurementDataResponse describeEpnMeasurementDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeEpnMeasurementDataResponse.setRequestId(_ctx.stringValue("DescribeEpnMeasurementDataResponse.RequestId"));<NEW_LINE>List<MeasurementData> measur... | + "].BandWidthFeeDatas[" + j + "].CostVal")); |
556,425 | @Blocking<NEW_LINE>@ApiOperation(value = "World postgres db endpoint", httpMethod = "GET", response = World.class)<NEW_LINE>public void dbPostgres(HttpServerExchange exchange) {<NEW_LINE>final World world;<NEW_LINE>try (final Connection connection = postgresService.getConnection()) {<NEW_LINE>try (PreparedStatement sta... | (JsonStream.serializeToBytes(world)); |
1,340,112 | final UnlinkIdentityResult executeUnlinkIdentity(UnlinkIdentityRequest unlinkIdentityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(unlinkIdentityRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,217,652 | public void testDefaultSnapshot() {<NEW_LINE>// fees on purchase = 5 EUR<NEW_LINE>// fees on dividend transaction = 10 EUR<NEW_LINE>AccountTransaction tx = client.getAccounts().stream().flatMap(accounts -> accounts.getTransactions().stream()).filter(t -> t.getType() == AccountTransaction.Type.DIVIDENDS).findFirst().orE... | ClientPerformanceSnapshotTest.assertThatCalculationWorksOut(snapshot, converter); |
1,126,485 | public void createBindings() {<NEW_LINE>LengthConverter lengthConverter = new LengthConverter();<NEW_LINE>nozzleMarkLocation.setLocation(new Location(nozzle.getHeadOffsets().getUnits()));<NEW_LINE>addWrappedBinding(nozzleMarkLocation, "lengthX", nozzleMarkLocationX, "text", lengthConverter);<NEW_LINE>addWrappedBinding(... | "lengthZ", nozzleMarkLocationZ, "text", lengthConverter); |
916,649 | private GenericRecord generateAvroRecord(HashMap<String, ColumnState.EventField> eventFields, ReplicationBitSetterStaticConfig replicationBitConfig, Pattern replicationValuePattern) throws Exception {<NEW_LINE>GenericRecord record = new GenericData.Record(getCurrentSchema());<NEW_LINE>List<Schema.Field> fields <MASK><N... | = getCurrentSchema().getFields(); |
1,032,201 | public static InflationNodalCurve of(NodalCurve curveWithoutFixing, LocalDate valuationDate, YearMonth lastMonth, double lastFixingValue, SeasonalityDefinition seasonalityDefinition) {<NEW_LINE>YearMonth valuationMonth = YearMonth.from(valuationDate);<NEW_LINE>ArgChecker.isTrue(lastMonth.isBefore(valuationMonth), "Last... | ().getValue() - 1; |
1,143,682 | public boolean downloadResource(String user, String resourceId, String version, OutputStream outputStream, Map<String, Object> properties) throws IOException {<NEW_LINE>// 1.Get the path of the resource corresponding to resourceId and version<NEW_LINE>// 2.Get startByte and EndByte<NEW_LINE>// 3.Use storage to get inpu... | long endByte = resourceVersion.getEndByte(); |
243,991 | private Comment updateJavadoc(Element method, Element targetElement, boolean addDeprecated) {<NEW_LINE>DocCommentTree javadoc = workingCopy.getDocTrees().getDocCommentTree(method);<NEW_LINE>List<DocTree> otherTags = new LinkedList<>();<NEW_LINE>List<DocTree> returnTags = new LinkedList<>();<NEW_LINE>List<DocTree> throw... | .append(tagsToString(paramTags)); |
1,460,755 | public final TextEdit rewriteImports(IProgressMonitor monitor) throws CoreException {<NEW_LINE>SubMonitor subMonitor = SubMonitor.convert(monitor, Messages.bind(Messages.importRewrite_processDescription), 2);<NEW_LINE>if (!hasRecordedChanges()) {<NEW_LINE>this.createdImports = CharOperation.NO_STRINGS;<NEW_LINE>this.cr... | computer.requireExplicitImport(true, staticExplicitSimpleName); |
100,007 | public static ListPlaylistResponse unmarshall(ListPlaylistResponse listPlaylistResponse, UnmarshallerContext _ctx) {<NEW_LINE>listPlaylistResponse.setRequestId(_ctx.stringValue("ListPlaylistResponse.RequestId"));<NEW_LINE>listPlaylistResponse.setTotal(_ctx.integerValue("ListPlaylistResponse.Total"));<NEW_LINE>List<Prog... | ("ListPlaylistResponse.ProgramList[" + i + "].DomainName")); |
716,417 | private void addFilterMappings() {<NEW_LINE>if (webApp == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// filterMappings cannot be null, or of size zero<NEW_LINE>int numFilterMappings = filterMappings.size();<NEW_LINE>Iterator<FilterMappingData> iterator = filterMappings.iterator();<NEW_LINE>FilterMapping[] fm = new Fi... | FilterMapping) webApp.createBean("FilterMapping"); |
1,469,487 | public static <T extends ImageBase<T>> void down(T input, T output) {<NEW_LINE>if (ImageGray.class.isAssignableFrom(input.getClass())) {<NEW_LINE>if (BoofConcurrency.USE_CONCURRENT) {<NEW_LINE>if (input instanceof GrayU8) {<NEW_LINE>GrayF32 middle = new GrayF32(output.width, input.height);<NEW_LINE>ImplAverageDownSampl... | (middle, (GrayI8) output); |
78,849 | public ListTargetResourceTypesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListTargetResourceTypesResult listTargetResourceTypesResult = new ListTargetResourceTypesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth... | String currentParentElement = context.getCurrentParentElement(); |
736,631 | protected boolean isCookieCacheDirty(HeaderKeys key) {<NEW_LINE>// @338148 - add Cache-Control header<NEW_LINE>if (HttpHeaderKeys.HDR_SET_COOKIE.equals(key)) {<NEW_LINE>return (null != this.setCookieCache) ? this.setCookieCache.isDirty() : false;<NEW_LINE>}<NEW_LINE>if (HttpHeaderKeys.HDR_SET_COOKIE2.equals(key)) {<NEW... | .cookieCache.isDirty() : false; |
1,340,625 | private void resetFlowProperties() {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "resetFlowProperties");<NEW_LINE>// Tidy up what we had before<NEW_LINE>int numFilters = consumerKeyFilter.length;<NEW_LINE>for (int i = 0; i < numFilters; i++) {<NEW_LINE>// Discard t... | consumerKeyFilter[i].discard(); |
944,836 | private static String recreateLogTag(String tag) {<NEW_LINE>tag = tag != null ? (tag + ":") : "";<NEW_LINE>String date = enableDate ? "" + new Date() : "";<NEW_LINE>Thread currentThread = Thread.currentThread();<NEW_LINE>String threadInfo = StringUtils.toNonnullString(currentThread.getName()) + ":" + StringUtils.toNonn... | + "[QiNiu:" + threadInfo + tag + "]"; |
1,058,602 | public List<ValidateError> validate() {<NEW_LINE>List<ValidateError> <MASK><NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.knowledgeId, convLabelName("Knowledge Id"));<NEW_LINE>if (error != null)... | errors = new ArrayList<>(); |
1,392,672 | public void writeResponse(HttpServletRequest request, HttpServletResponse httpResponse, Response jaxbResponse) {<NEW_LINE>String format = getStringParameter(request, "f", "xml");<NEW_LINE>String jsonpCallback = request.getParameter("callback");<NEW_LINE>boolean json = "json".equals(format);<NEW_LINE>boolean jsonp = "js... | .createSubsonicResponse(jaxbResponse), writer); |
1,118,428 | private byte[] applyTransformers(String name, String transformedName, byte[] basicClass, Profiler profiler) {<NEW_LINE>if (this.classLoaderUtil.isClassExcluded(name, transformedName)) {<NEW_LINE>return basicClass;<NEW_LINE>}<NEW_LINE>for (ILegacyClassTransformer transformer : this.getDelegatedLegacyTransformers()) {<NE... | "A re-entrant transformer '{}' was detected and will no longer process meta class data", transformer.getName()); |
1,375,435 | private void exportTemplateAccounts(XmlSerializer xmlSerializer, Collection<Account> accountList) throws IOException {<NEW_LINE>for (Account account : accountList) {<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_ACCOUNT);<NEW_LINE>xmlSerializer.attribute(null, GncXmlHelper.ATTR_KEY_VERSION, GncXmlHelper.BOOK_V... | endTag(null, GncXmlHelper.TAG_ACCT_COMMODITY); |
9,671 | private void adjustSegmentStarts(Program prog) {<NEW_LINE>Memory mem = prog.getMemory();<NEW_LINE>if (!prog.hasExclusiveAccess()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MemoryBlock[] blocks = mem.getBlocks();<NEW_LINE>for (int i = 1; i < blocks.length; i++) {<NEW_LINE>MemoryBlock block = blocks[i];<NEW_LINE>if (!block.... | mem.split(block, splitAddr); |
706,166 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>getToolbarController().<MASK><NEW_LINE>mSave = getToolbarController().getToolbar().findViewById(R.id.save);<NEW_LINE>mSave.setOnClickListener(this);<NEW_LINE>mSimpleProbl... | setTitle(R.string.editor_report_problem_title); |
1,152,196 | private List<Process> buildProcesses(ResultSet resultSet) throws SQLException {<NEW_LINE>List<Process> processes = new ArrayList<>();<NEW_LINE>while (resultSet.next()) {<NEW_LINE>final Process process = new Process();<NEW_LINE>process.setId(resultSet.getString(H2TableInstaller.ID_COLUMN));<NEW_LINE>process.setName(resu... | resultSet.getString(ProcessTraffic.SERVICE_ID); |
836,328 | private static boolean doExecute(PsiElement sourceElement, final Processor<? super PsiElement> consumer) {<NEW_LINE>if (sourceElement instanceof GraphQLIdentifier && sourceElement.getParent() instanceof GraphQLTypeNameDefinition) {<NEW_LINE>final GraphQLInterfaceTypeDefinition interfaceTypeDefinition = PsiTreeUtil.getP... | process(typeName.getNameIdentifier()); |
1,021,101 | protected RunnerAndConfigurationSettings createRunnerAndConfigurationSettings(@NotNull Project project, @NotNull Module module, @NotNull Client client, @Nullable AndroidDebuggerState inputState) {<NEW_LINE>String runConfigurationName = String.format("%s %s Debugger (%d)", Blaze.getBuildSystemName(project).getName(), ge... | , new BlazeAndroidNativeAttachConfigurationType.Factory()); |
1,297,767 | public void marshall(UpdateStackRequest updateStackRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateStackRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(updateStackRequest.getDisplayN... | updateStackRequest.getFeedbackURL(), FEEDBACKURL_BINDING); |
1,775,007 | final GetJobsResult executeGetJobs(GetJobsRequest getJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getJobsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetJobsRequest> request = null;<NEW_LINE>Response<GetJobsResult> respo... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,757,320 | private V putInternal(K key, int hash, V value, Function<? super K, ? extends V> function, boolean onlyIfAbsent) {<NEW_LINE>removeStale();<NEW_LINE>int c = count;<NEW_LINE>// ensure capacity<NEW_LINE>if (c++ > threshold) {<NEW_LINE>int reduced = rehash();<NEW_LINE>// adjust from possible weak cleanups<NEW_LINE>if (redu... | getValue(key, value, function); |
461,476 | private String histItemFilterQueryProvider(FilterCriteria filter, int numberDecimalcount, String table, String simpleName) {<NEW_LINE>logger.debug("JDBC::getHistItemFilterQueryProvider filter = {}, numberDecimalcount = {}, table = {}, simpleName = {}", filter.toString(), numberDecimalcount, table, simpleName);<NEW_LINE... | .isEmpty() ? " WHERE" : " AND"; |
292,936 | private ItemStack generateFirework(int color) {<NEW_LINE>ItemStack stack = new ItemStack(Items.FIREWORK_ROCKET);<NEW_LINE>CompoundTag explosion = new CompoundTag();<NEW_LINE>explosion.putIntArray("Colors", new int[] { color });<NEW_LINE>int type = 1;<NEW_LINE>double rand = Math.random();<NEW_LINE>if (rand > 0.25) {<NEW... | fireworks.put("Explosions", explosions); |
466,245 | public static ServerIdentity deserialize(byte[] input) throws IllegalArgumentException, IOException {<NEW_LINE>DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(input));<NEW_LINE>byte header = inputStream.readByte();<NEW_LINE>if (header != SERVER_IDENTITY_HEADER) {<NEW_LINE>throw new IllegalArg... | readFixedSizeArray(inputStream, REPLAY_PROTECTION_ARRAY_LENGTH, "random value"); |
98,380 | private static URI resolveEndpoint(S3EndpointResolverContext context) {<NEW_LINE>SdkHttpRequest request = context.request();<NEW_LINE>String protocol = request.protocol();<NEW_LINE>RegionMetadata regionMetadata = RegionMetadata.of(context.region());<NEW_LINE>String dnsSuffixWithoutTagConsideration = regionMetadata != n... | isAccelerateSupported(context.originalRequest()); |
645,176 | protected void paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) {<NEW_LINE>int tabCount = tabPane.getTabCount();<NEW_LINE>int currentRun = getRunForTab(tabCount, tabIndex);<NEW_LINE>int lastIndex = lastTabInRun(tabCount, currentRun);<NEW_LINE>int firstIndex... | right, 0, right, bottom); |
1,525,833 | public void onValueChange(ValueChangeEvent<String> valueChangeEvent) {<NEW_LINE>Date time = timePicker1PreviousDate;<NEW_LINE>Date time1;<NEW_LINE>Date time2;<NEW_LINE>try {<NEW_LINE>time1 = getDateFromTextBox(timePicker1);<NEW_LINE>time2 = getDateFromTextBox(timePicker2);<NEW_LINE>} catch (GeneratorException e) {<NEW_... | , addMilliseconds(time1, ONE_HOUR)); |
544,130 | /* hack TODO do not know how to get int status back from Windows<NEW_LINE>* Stick in code that handles particular commands that we can figure out<NEW_LINE>* the status.<NEW_LINE>*/<NEW_LINE>private int determineStatus(List<String> args) {<NEW_LINE>if (args == null)<NEW_LINE>throw new NullPointerException();<NEW_LINE>if... | dcomInfo.getCredentials(), dir); |
1,120,989 | private void injectField(Object target, Field field, boolean failOnNotInjected) throws ReflectionException {<NEW_LINE>Class<?> fieldType;<NEW_LINE>try {<NEW_LINE>fieldType = field.getType();<NEW_LINE>} catch (RuntimeException ignore) {<NEW_LINE>// Swallow exception caused by missing typedata on gwt platfString.format("... | fieldType.getSimpleName(), field); |
1,257,398 | public boolean record(File outputFile) {<NEW_LINE>if (videoFormat == null && audioFormat == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>mRecFile = outputFile;<NEW_LINE>createMovie(mRecFile);<NEW_LINE>mHandler.notifyRecordStarted(mRecFile.getPath());<NEW_LINE>if (!spsList.isEmpty() && !ppsList.isEmpty()) {<NEW_LI... | SrsEsFrame frame = frameCache.poll(); |
1,124,037 | private String buildSubsList(List<DatabusSubscription> subs, Map<String, IdNamePair> sourceNameMap) {<NEW_LINE>StringBuilder sb = new StringBuilder(128);<NEW_LINE>sb.append("[");<NEW_LINE>boolean first = true;<NEW_LINE>for (DatabusSubscription sub : subs) {<NEW_LINE>if (!first)<NEW_LINE>sb.append(',');<NEW_LINE>Databus... | LogicalSource ls = sub.getLogicalSource(); |
249,682 | public static GeometryPackage init() {<NEW_LINE>if (isInited)<NEW_LINE>return (GeometryPackage) EPackage.Registry.INSTANCE.getEPackage(GeometryPackage.eNS_URI);<NEW_LINE>// Obtain or create and register package<NEW_LINE>Object registeredGeometryPackage = EPackage.Registry.INSTANCE.get(eNS_URI);<NEW_LINE>GeometryPackage... | LogPackageImpl ? registeredPackage : LogPackage.eINSTANCE); |
164,463 | MButton createKillThreadButton(final CounterRequestContextPanel contextPanel) {<NEW_LINE>final MButton killThreadButton = new MButton(getString("Tuer"), ImageIconCache.getImageIcon("stop.png"));<NEW_LINE>getSelectionModel().addListSelectionListener(new ListSelectionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>pub... | setEnabled(getSelectedThreadInformations() != null); |
1,096,594 | public MethodAndImports generateMethodAndImports() {<NEW_LINE>Set<FullyQualifiedJavaType> <MASK><NEW_LINE>FullyQualifiedJavaType parameterType = new // $NON-NLS-1$<NEW_LINE>FullyQualifiedJavaType("org.mybatis.dynamic.sql.select.SelectDSLCompleter");<NEW_LINE>imports.add(parameterType);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>... | imports = new HashSet<>(); |
1,098,402 | public void execute(EditorAdaptor editorAdaptor) throws CommandExecutionException {<NEW_LINE>Position cursor = editorAdaptor.getPosition();<NEW_LINE>LineInformation line = editorAdaptor.getModelContent().getLineInformationOfOffset(cursor.getModelOffset());<NEW_LINE>// 1-based, not 0-based<NEW_LINE>int row <MASK><NEW_LI... | = line.getNumber() + 1; |
301,824 | private void buildIndex() throws IOException {<NEW_LINE>int len = zipDir.length;<NEW_LINE>// Add each of the files<NEW_LINE>if (len > 0) {<NEW_LINE>directories = new <MASK><NEW_LINE>ArrayList<Entry> entryList = new ArrayList<Entry>();<NEW_LINE>for (int pos = 0; pos < len; ) {<NEW_LINE>pos = readEntry(pos, entryList, di... | LinkedHashMap<RelativeDirectory, DirectoryEntry>(); |
1,234,383 | final CreatePolicyResult executeCreatePolicy(CreatePolicyRequest createPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | false), new CreatePolicyResultJsonUnmarshaller()); |
1,023,611 | public Result isConditionMet(Index index, ClusterState clusterState) {<NEW_LINE>IndexMetadata idxMeta = clusterState.metadata().index(index);<NEW_LINE>if (idxMeta == null) {<NEW_LINE>// Index must have been since deleted, ignore it<NEW_LINE>logger.debug("[{}] lifecycle action for index [{}] executed but index no longer... | ).getAction(), allocationPendingAllShards); |
479,123 | public void save(@Nonnull Map<ByteArrayWrapper, byte[]> cache) {<NEW_LINE>File tempFile = null;<NEW_LINE>try {<NEW_LINE>File cacheSnapshotFile = cacheSnapshotPath.toFile();<NEW_LINE>String relativePath = Optional.ofNullable(cacheSnapshotFile.getParentFile()).map(File::getName).orElse("") + "/" + cacheSnapshotFile.getNa... | IOException("Cannot move temp file to '" + relativePath + "'"); |
753,532 | File findManifestInKnownPathsStartingFromGenFolder(String sourcesGenerationFolder) {<NEW_LINE>Iterable<AndroidManifestFinderStrategy> strategies = Arrays.asList(new GradleAndroidManifestFinderStrategy(environment, sourcesGenerationFolder), new LegacyGradleAndroidManifestFinderStrategy(environment, sourcesGenerationFold... | sourcesGenerationFolder, androidManifestFile.toString()); |
1,396,329 | public void create(ThreadLayoutCallback callback) {<NEW_LINE>this.callback = callback;<NEW_LINE>// View binding<NEW_LINE>loadView = findViewById(R.id.loadview);<NEW_LINE>replyButton = findViewById(R.id.reply_button);<NEW_LINE>LayoutInflater layoutInflater = LayoutInflater.from(getContext());<NEW_LINE>// Inflate ThreadL... | findViewById(R.id.text); |
1,304,528 | protected void moveAbsoluteImmediate(Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) {<NEW_LINE>boundingBox.setMiddleX(position.getX());<NEW_LINE>boundingBox.setMiddleY(position.getY() + boundingBox.getSizeY() / 2);<NEW_LINE>boundingBox.<MASK><NEW_LINE>boolean touchingW... | setMiddleZ(position.getZ()); |
1,725,262 | private void populateAnnotationCache(Property property) {<NEW_LINE>Optionals.toStream(property.getGetter(), property.getSetter()).forEach(it -> {<NEW_LINE>for (Annotation annotation : it.getAnnotations()) {<NEW_LINE>Class<? extends Annotation> annotationType = annotation.annotationType();<NEW_LINE>Annotation mergedAnno... | , Optional.of(mergedAnnotation)); |
894,109 | public void createPartControl(Composite parent) {<NEW_LINE>Server server = ServerManager.getInstance().getServer(serverId);<NEW_LINE>this.setPartName("Connections[" + server.getName() + "]");<NEW_LINE>GridLayout layout = new GridLayout(1, true);<NEW_LINE>layout.marginHeight = 5;<NEW_LINE>layout.marginWidth = 5;<NEW_LIN... | add(new OpenDbDailyConnView(serverId)); |
418,007 | public void changeKeyStorePassword(File keyStore, String storeType, char[] oldPw, char[] newPw, boolean changeKeyPasswords) throws KeyStoreException {<NEW_LINE>enforcePasswordComplexity(newPw, "invalidPassword");<NEW_LINE>KeyStore ks = <MASK><NEW_LINE>if (changeKeyPasswords) {<NEW_LINE>Enumeration<String> aliases = ks.... | openKeyStore(keyStore, storeType, oldPw); |
1,174,919 | protected void initScene() {<NEW_LINE>getCurrentCamera().setPosition(0, 0, 7);<NEW_LINE>try {<NEW_LINE>Texture texture1 = new Texture("texture1", new Etc1Texture("etc1Tex1", R.raw.rajawali_tex_mip_0, null));<NEW_LINE>Material material1 = new Material();<NEW_LINE>material1.addTexture(texture1);<NEW_LINE>material1.setCol... | new Etc1Texture("etc1Tex2", resourceIds)); |
1,100,278 | private HyperlinkInfo buildFileHyperlinkInfo(@Nonnull String url) {<NEW_LINE>if (myProject != null && !url.endsWith(".html") && url.startsWith(LocalFileSystem.PROTOCOL_PREFIX)) {<NEW_LINE>int documentLine = 0, documentColumn = 0;<NEW_LINE>int filePathEndIndex = url.length();<NEW_LINE>final int <MASK><NEW_LINE>if (lastC... | lastColonInd = url.lastIndexOf(':'); |
1,217,882 | public void onMessage(WebSocket webSocket, ByteBuffer bytes) {<NEW_LINE>byte <MASK><NEW_LINE>if (bytes.remaining() > 1) {<NEW_LINE>bytes.position(1);<NEW_LINE>KubernetesClientException exception = null;<NEW_LINE>String stringValue = StandardCharsets.UTF_8.decode(bytes).toString();<NEW_LINE>if (streamID == 3) {<NEW_LINE... | streamID = bytes.get(0); |
1,845,514 | public void refreshRecentConn(String dsName) throws Throwable {<NEW_LINE>if (!StringUtils.isValidString(dsName)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String tempConnName;<NEW_LINE>int point = GC.RECENT_MENU_COUNT - 1;<NEW_LINE>for (int i = 0; i < GC.RECENT_MENU_COUNT; i++) {<NEW_LINE>if (connItem[i] == null)<NEW_LINE... | [i].setText(tempConnName); |
1,418,569 | public void updateInitDeviceParams(final String width, final String height, final String density, final String statusHeight) {<NEW_LINE>if (!isJSFrameworkInit()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>mWXBridge.updateInitFrameworkP... | scale, density, WXConfig.scale); |
180,412 | public static DeleteAggregateRemediationsResponse unmarshall(DeleteAggregateRemediationsResponse deleteAggregateRemediationsResponse, UnmarshallerContext _ctx) {<NEW_LINE>deleteAggregateRemediationsResponse.setRequestId(_ctx.stringValue("DeleteAggregateRemediationsResponse.RequestId"));<NEW_LINE>List<RemediationDeleteR... | ("DeleteAggregateRemediationsResponse.RemediationDeleteResults[" + i + "].ErrorMessage")); |
1,197,139 | public void onShinyApplicationStatus(ShinyApplicationStatusEvent event) {<NEW_LINE>// discard non-tutorial events<NEW_LINE>String type = event.getParams().getViewerType();<NEW_LINE>if (!type.startsWith(VIEWER_TYPE_TUTORIAL))<NEW_LINE>return;<NEW_LINE>String state = event.getParams().getState();<NEW_LINE>if (StringUtil.... | , tutorialUrl, new VoidServerRequestCallback()); |
1,023,792 | private void logState(PartitionState oldState, PartitionState newState, int partitionId) {<NEW_LINE>Map<TrackerClient, TrackerClientState<MASK><NEW_LINE>Map<TrackerClient, TrackerClientState> oldTrackerClientStateMap = oldState.getTrackerClientStateMap();<NEW_LINE>Set<TrackerClient> newUnhealthyClients = newTrackerClie... | > newTrackerClientStateMap = newState.getTrackerClientStateMap(); |
243,389 | public boolean apply(Game game, Ability source) {<NEW_LINE>Map<UUID, Integer> playerMap = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_LAND, source.getControllerId(), source, game).stream().map(Controllable::getControllerId).collect(Collectors.toMap(Function.identity(), x -> 1, Integer::sum));<NEW_LIN... | max().orElse(0); |
737,485 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>output.wri... | output.writeBool(4, ready_); |
77,850 | public void run(RegressionEnvironment env) {<NEW_LINE>String frenchForSin = "p\u00E9ch\u00E9";<NEW_LINE>String frenchForFruit = "p\u00EAche";<NEW_LINE>String[] sortedFrench = (frenchForFruit + "," + frenchForSin).split(",");<NEW_LINE>assertEquals(1, frenchForFruit.compareTo(frenchForSin));<NEW_LINE>assertEquals(-1, fre... | new SupportBean(frenchForSin, 1)); |
1,643,304 | private static EmailFromOutlookMessage buildEmailFromOutlookMessage(@NotNull final EmailPopulatingBuilder builder, @NotNull final OutlookMessage outlookMessage, @NotNull final EmailPopulatingBuilderFactory builderFactory, @NotNull final InternalEmailConverter internalEmailConverter) {<NEW_LINE>checkNonEmptyArgument(bui... | (outlookMessage.getDate())); |
69,950 | private Root keepCheckPointForReposOnly(Root searchDO, String reposId) {<NEW_LINE>Root retDO = new Root();<NEW_LINE>Map<String, Control> ctrlsMap = ControlsHelper.getControlMap(searchDO);<NEW_LINE>ChangeControl changeCtrl = (ChangeControl) ctrlsMap.get(DO_CHANGE_CONTROL);<NEW_LINE>ChangeControl returnChangeControl = ne... | getControls().add(returnChangeControl); |
1,494,556 | private static StreamRDFCounting executeData(LoaderPlan loaderPlan, DatasetGraphTDB dsgtdb, Map<String, TupleIndex> indexMap, List<BulkStartFinish> dataProcess, MonitorOutput output) {<NEW_LINE>StoragePrefixesTDB dps = (StoragePrefixesTDB) dsgtdb.getStoragePrefixes();<NEW_LINE>PrefixHandlerBulk prefixHandler = new Pref... | > functionIndexer4 = indexer4.index(); |
964,288 | public void marshall(AmazonopensearchserviceDestinationDescription amazonopensearchserviceDestinationDescription, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (amazonopensearchserviceDestinationDescription == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<N... | amazonopensearchserviceDestinationDescription.getRoleARN(), ROLEARN_BINDING); |
501,235 | protected int computeStartSpace(LayoutManagerHelper helper, boolean layoutInVertical, boolean isLayoutEnd, boolean isOverLapMargin) {<NEW_LINE>int startSpace = 0;<NEW_LINE>LayoutHelper lastLayoutHelper = null;<NEW_LINE>if (helper instanceof VirtualLayoutManager) {<NEW_LINE>lastLayoutHelper = ((VirtualLayoutManager) hel... | ).findNeighbourNonfixLayoutHelper(this, isLayoutEnd); |
367,027 | private ContentValues createContentValueForShare(OCShare share) {<NEW_LINE>ContentValues contentValues = new ContentValues();<NEW_LINE>contentValues.put(ProviderTableMeta.OCSHARES_FILE_SOURCE, share.getFileSource());<NEW_LINE>contentValues.put(ProviderTableMeta.<MASK><NEW_LINE>contentValues.put(ProviderTableMeta.OCSHAR... | OCSHARES_ITEM_SOURCE, share.getItemSource()); |
923,744 | public void onHealthCheckAdded(final String name, final HealthCheck healthCheck) {<NEW_LINE>final HealthCheckConfiguration config = configs.get(name);<NEW_LINE>if (config == null) {<NEW_LINE>LOGGER.debug("ignoring registered health check that isn't configured: name={}", name);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final... | HealthCheckType type = config.getType(); |
841,512 | private Optional<SearchVersion> probeSingleHost(URI host) {<NEW_LINE>final Retrofit retrofit;<NEW_LINE>try {<NEW_LINE>retrofit = new Retrofit.Builder().baseUrl(host.toURL()).addConverterFactory(JacksonConverterFactory.create(objectMapper)).client(addAuthenticationIfPresent(host, okHttpClient)).build();<NEW_LINE>} catch... | errorResponse = errorResponseConverter.convert(responseBody); |
398,633 | private void insideArrayAccess(Env env) throws IOException {<NEW_LINE>int offset = env.getOffset();<NEW_LINE>ArrayAccessTree aat = (ArrayAccessTree) env.getPath().getLeaf();<NEW_LINE><MASK><NEW_LINE>CompilationUnitTree root = env.getRoot();<NEW_LINE>int aaTextStart = (int) sourcePositions.getEndPosition(root, aat.getEx... | SourcePositions sourcePositions = env.getSourcePositions(); |
1,648,621 | protected Action loadInvokeAction(ActionsHolder actionsHolder, Element element, String id, boolean shouldTrackSelection, String invokeMethod) {<NEW_LINE>BaseAction action;<NEW_LINE>String shortcut = loadShortcut(trimToNull(element.attributeValue("shortcut")));<NEW_LINE>if (shouldTrackSelection) {<NEW_LINE>action = new ... | ), invokeMethod, shortcut, actionsHolder); |
887,298 | protected boolean startContainers(Collection<EngineInfo> containersInfo, Logger logger, DeploymentContext context) {<NEW_LINE>ActionReport report = context.getActionReport();<NEW_LINE>for (EngineInfo engineInfo : containersInfo) {<NEW_LINE>Container container;<NEW_LINE>try {<NEW_LINE>container = engineInfo.getContainer... | deployer = habitat.getService(deployerClass); |
1,657,203 | private void displayCopyrightInformation() {<NEW_LINE>AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);<NEW_LINE>LayoutInflater inflater = this.getLayoutInflater();<NEW_LINE>View dialogView = inflater.inflate(R.layout.copyright_dialog, null);<NEW_LINE>dialogBuilder.setView(dialogView).setPositiveBut... | Snackbar.LENGTH_SHORT).show(); |
169,613 | public static void flushIntrospectClassInfoCache(ClassLoader classLoader, CtClass ctClass) {<NEW_LINE>// com.sun.beans.introspect.ClassInfo was intruduced in j9<NEW_LINE>if (ClassFile.MAJOR_VERSION < ClassFile.JAVA_9) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>LOGGER.debug("Flushing {} from com.sun.beans.int... | get(null, classInfo, "CACHE"); |
1,457,284 | public TaskStatus runTask(TaskToolbox toolbox) throws Exception {<NEW_LINE>// Group partitionLocations by interval and partitionId<NEW_LINE>final Map<Interval, Int2ObjectMap<List<PartitionLocation>>> intervalToBuckets = new HashMap<>();<NEW_LINE>for (PartitionLocation location : ioConfig.getPartitionLocations()) {<NEW_... | fetchStopwatch.elapsed(TimeUnit.SECONDS); |
50,670 | public boolean handleCrafting(int x, AEKey what, long amount, Level level, ICraftingService cg, IActionSource mySrc) {<NEW_LINE>var craftingJob = this.getJob(x);<NEW_LINE>if (this.getLink(x) != null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// We're already running a crafting job<NEW_LINE>if (craftingJob != null) {... | this.setLink(x, link); |
116,224 | public TimecodeConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TimecodeConfig timecodeConfig = new TimecodeConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | class).unmarshall(context)); |
937,291 | private TemplateGroup readTemplateFile(Document document, @NonNls String path, boolean isDefault, boolean registerTemplate, ClassLoader classLoader) throws InvalidDataException {<NEW_LINE>if (document == null) {<NEW_LINE>throw new InvalidDataException();<NEW_LINE>}<NEW_LINE>Element root = document.getRootElement();<NEW... | LinkedHashMap<String, TemplateImpl>(); |
1,614,473 | public int compare(Diagnostic d1, Diagnostic d2) {<NEW_LINE>Location l1 = d1.location();<NEW_LINE>Location l2 = d2.location();<NEW_LINE>LineRange lineRange1 = l1.lineRange();<NEW_LINE><MASK><NEW_LINE>// Compare file name<NEW_LINE>// TODO: handle if one is null and other is not<NEW_LINE>String file1 = lineRange1.filePat... | LineRange lineRange2 = l2.lineRange(); |
829,998 | public Request<ModifyNetworkInterfaceAttributeRequest> marshall(ModifyNetworkInterfaceAttributeRequest modifyNetworkInterfaceAttributeRequest) {<NEW_LINE>if (modifyNetworkInterfaceAttributeRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<M... | String>) modifyNetworkInterfaceAttributeRequest.getGroups(); |
38,899 | public DescribeApplicationsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeApplicationsResult describeApplicationsResult = new DescribeApplicationsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | int originalDepth = context.getCurrentDepth(); |
599,474 | public void didClose(DidCloseTextDocumentParams params) {<NEW_LINE>String fileUri = params.getTextDocument().getUri();<NEW_LINE>try {<NEW_LINE>DocumentServiceContext context = ContextBuilder.buildDocumentServiceContext(CommonUtil.convertUriSchemeFromBala(fileUri), this.workspaceManagerProxy.get(fileUri), LSContextOpera... | this.workspaceManagerProxy.didClose(params); |
1,157,820 | public int checkSlotOwnableSynchronizerList(J9ObjectPointer object, MM_OwnableSynchronizerObjectListPointer currentList) {<NEW_LINE>if (needVerifyOwnableSynchronizerConsistency()) {<NEW_LINE>_ownableSynchronizerObjectCountOnList += 1;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>int result = checkObjectIndirect(object);<NEW_LINE... | instanceClass = J9ObjectHelper.clazz(object); |
1,519,788 | // ///////////////////<NEW_LINE>protected int[][] readDOM(String filename) {<NEW_LINE>FileReader f;<NEW_LINE>String line;<NEW_LINE>TIntHashSet values = new TIntHashSet();<NEW_LINE>try {<NEW_LINE>f = new FileReader(filename);<NEW_LINE>BufferedReader r = new BufferedReader(f);<NEW_LINE>List<int[]> domains = new ArrayList... | add(sc.nextInt()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.