idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
651,011 | private List<String> listDocIdsWithCondition(EntityManagerContainer emc) throws Exception {<NEW_LINE>EntityManager em = <MASK><NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LINE>Root<Document> root = cq.from(Document.class);<NEW_LINE>Predica... | emc.get(Document.class); |
1,637,435 | public Line[] treatmentValuesLine() {<NEW_LINE>Line[] lines = new Line[2];<NEW_LINE>try {<NEW_LINE>lines[<MASK><NEW_LINE>// getCol(X.color_treatment_dot_background) 0xFFFFFF<NEW_LINE>lines[0].setColor(highColor);<NEW_LINE>lines[0].setHasLines(false);<NEW_LINE>// pointSize * 5 / 2<NEW_LINE>lines[0].setPointRadius(pointS... | 0] = new Line(treatmentValues); |
860,835 | public FulfillmentStartResponseSpecification unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FulfillmentStartResponseSpecification fulfillmentStartResponseSpecification = new FulfillmentStartResponseSpecification();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentE... | int originalDepth = context.getCurrentDepth(); |
1,255,594 | public void run() {<NEW_LINE>Preferences pref = <MASK><NEW_LINE>if (theme == null) {<NEW_LINE>pref.put("previewTheme", "");<NEW_LINE>} else {<NEW_LINE>pref.put("previewTheme", theme);<NEW_LINE>}<NEW_LINE>pref.put("previewResource", resource.getAbsolutePath());<NEW_LINE>pref.put("previewSelection", selection);<NEW_LINE>... | Preferences.userNodeForPackage(PreviewInSimulator.class); |
1,417,664 | public boolean isArrayOfClassWithBounds() {<NEW_LINE>if (getTypeMirror().getKind() != TypeKind.ARRAY) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TypeMirror componentType = MoreTypes.asArray(getTypeMirror()).getComponentType();<NEW_LINE>if (componentType.getKind() != TypeKind.DECLARED) {<NEW_LINE>return false;<NEW_LIN... | || wildcard.getExtendsBound() != null; |
1,487,708 | private ParseResult mergeAggWithSelect(ParseResult top, ParseResult nested) throws SQLException {<NEW_LINE>if (nested.getRequestScore())<NEW_LINE>throw new SQLException("Unable to request a _score on an aggregation");<NEW_LINE>int limit = top.getLimit();<NEW_LINE>List<OrderBy> sorts = top.getSorts();<NEW_LINE>boolean u... | () || nested.getUseCache(); |
108,903 | public void testExternalRefConflict() throws Exception {<NEW_LINE>mtf.initialize("WallaceSrc", new OriginalProgramModifierListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void modifyOriginal(ProgramDB program) throws Exception {<NEW_LINE>int txId = program.startTransaction("Modify Original Program");<NEW_LINE>... | SourceType.USER_DEFINED, RefType.DATA); |
1,061,519 | public static Map<String, Object> importTags(byte[] uploadFile) {<NEW_LINE>Map<String, Object> callbackData = new HashMap<String, Object>();<NEW_LINE>int counterFailedTags = 0;<NEW_LINE>try {<NEW_LINE>UserWebAPI uWebAPI = WebAPILocator.getUserWebAPI();<NEW_LINE>WebContext ctx = WebContextFactory.get();<NEW_LINE>HttpSer... | e.getMessage() + ", trying with the next Tag"); |
49,050 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.agent.BaseCommandProcessor#handleRegistrationAck(com.sitewhere<NEW_LINE>* .device.communication.protobuf.proto.Sitewhere.Device.Header,<NEW_LINE>* com.sitewhere<NEW_LINE>* .device.communication.protobuf.proto.Sitewhere.Device.RegistrationAc... | "SiteWhere was unable to register openHAB device. " + ack.getErrorMessage()); |
1,269,641 | // General classes<NEW_LINE>@Override<NEW_LINE>public void visitJavaClass(JavaClass obj) {<NEW_LINE>setupVisitorForClass(obj);<NEW_LINE>if (shouldVisit(obj)) {<NEW_LINE>constantPool.accept(this);<NEW_LINE>Field[] fields = obj.getFields();<NEW_LINE>Attribute[] attributes = obj.getAttributes();<NEW_LINE>for (Field field ... | getClassAnalysis(ClassContext.class, c); |
1,592,713 | private void loadNode297() {<NEW_LINE>TwoStateVariableTypeNode node = new TwoStateVariableTypeNode(this.context, Identifiers.AlarmConditionType_ActiveState, new QualifiedName(0, "ActiveState"), new LocalizedText("en", "ActiveState"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Vari... | .expanded(), true)); |
1,081,496 | protected void findObjectsByMask(@NotNull GenericExecutionContext executionContext, @NotNull JDBCSession session, @NotNull DBSObjectType objectType, @NotNull ObjectsSearchParams params, @NotNull List<DBSObjectReference> references) throws DBException, SQLException {<NEW_LINE>DBSObject parentObject = params.getParentObj... | null : executionContext.getDefaultSchema()); |
998,293 | public boolean onOptionsItemSelected(final MenuItem item) {<NEW_LINE>if (item.getItemId() == android.R.id.home) {<NEW_LINE>onBackPressed();<NEW_LINE>return true;<NEW_LINE>} else if (item.getItemId() == R.id.remove_person) {<NEW_LINE>confirmRemovePerson();<NEW_LINE>return true;<NEW_LINE>} else if (item.getItemId() == R.... | InvitationSender) peopleInviteFragment).send(); |
162,346 | private static void heapDump(SparkPlatform platform, CommandSender sender, CommandResponseHandler resp, Arguments arguments) {<NEW_LINE>Path file = platform.resolveSaveFile("heap", HeapDump.isOpenJ9() ? "phd" : "hprof");<NEW_LINE>boolean liveOnly = !arguments.boolFlag("include-non-live");<NEW_LINE>if (arguments.boolFla... | .broadcastPrefixed(text("Running garbage collector...")); |
416,050 | protected void resizeAndStreamLayer(SlingHttpServletResponse response, Layer layer, String imageType, int resizeWidth, double quality) throws IOException {<NEW_LINE>int width = layer.getWidth();<NEW_LINE><MASK><NEW_LINE>int resizeHeight = calculateResizeHeight(width, height, resizeWidth);<NEW_LINE>if (resizeHeight > 0)... | int height = layer.getHeight(); |
1,292,092 | public void check(Database database, DatabaseChangeLog changeLog, ChangeSet changeSet, ChangeExecListener changeExecListener) throws PreconditionFailedException, PreconditionErrorException {<NEW_LINE>try {<NEW_LINE>ForeignKey example = new ForeignKey();<NEW_LINE>example.setName(getForeignKeyName());<NEW_LINE>example.se... | (), getSchemaName())); |
1,732,078 | public DescribeEntitiesDetectionJobResult describeEntitiesDetectionJob(DescribeEntitiesDetectionJobRequest describeEntitiesDetectionJobRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEntitiesDetectionJobRequest);<NEW_LINE>AWSReq... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,802,381 | void applyToItem(NbtCompound tag) {<NEW_LINE>super.applyToItem(tag);<NEW_LINE>tag.putString(DEFAULT_POTION.NBT, CardboardPotionUtil.fromBukkit(type));<NEW_LINE>if (hasColor())<NEW_LINE>tag.putInt(POTION_COLOR.NBT, color.asRGB());<NEW_LINE>if (customEffects != null) {<NEW_LINE>NbtList effectList = new NbtList();<NEW_LIN... | NBT, effect.isAmbient()); |
607,161 | public Map<Sha256Hash, Long> lookupStreamIdsByHash(Transaction t, final Set<Sha256Hash> hashes) {<NEW_LINE>if (hashes.isEmpty()) {<NEW_LINE>return ImmutableMap.of();<NEW_LINE>}<NEW_LINE>SnapshotsStreamHashAidxTable idx = tables.getSnapshotsStreamHashAidxTable(t);<NEW_LINE>Set<SnapshotsStreamHashAidxTable.SnapshotsStrea... | hashForStreams = new HashMap<>(); |
1,224,208 | public static HudsonURLCheckResult checkHudsonURL(String url) {<NEW_LINE>try {<NEW_LINE>URL u = new URL(url);<NEW_LINE>HttpURLConnection connection = // NOI18N<NEW_LINE>new ConnectionBuilder().homeURL(u).url(new URL(u, "?checking=redirects")).httpConnection();<NEW_LINE>// NOI18N<NEW_LINE>String <MASK><NEW_LINE>connecti... | sVersion = connection.getHeaderField("X-Hudson"); |
1,850,959 | public com.amazonaws.services.quicksight.model.LimitExceededException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.quicksight.model.LimitExceededException limitExceededException = new com.amazonaws.services.quicksight.model.LimitExceededException(null);<NEW_L... | JsonToken token = context.getCurrentToken(); |
389,674 | public static void init() {<NEW_LINE>if (INIT.compareAndSet(false, true)) {<NEW_LINE>PROPERTY_BEAN_MAP.put(SERVER_PREFIX, ServerProperties.class);<NEW_LINE>PROPERTY_BEAN_MAP.put(SERVER_UNDO_PREFIX, ServerUndoProperties.class);<NEW_LINE>PROPERTY_BEAN_MAP.put(SERVER_RECOVERY_PREFIX, ServerRecoveryProperties.class);<NEW_L... | put(STORE_FILE_PREFIX, StoreFileProperties.class); |
1,241,735 | public Set<FileObject> instantiate() throws IOException {<NEW_LINE>// NOI18N<NEW_LINE>ProjectInfo vi = new ProjectInfo((String) wiz.getProperty("groupId"), (String) wiz.getProperty("artifactId"), (String) wiz.getProperty("version"), (String<MASK><NEW_LINE>Profile profile = (Profile) wiz.getProperty(PROP_EE_LEVEL);<NEW_... | ) wiz.getProperty("package")); |
1,785,692 | // Create new load expression, free ptr expression<NEW_LINE>public ExprTree createLoad(Location location, StarQuality qual, ExprTree ptr) {<NEW_LINE>entry("createLoad", location, qual, ptr);<NEW_LINE>VarnodeTpl outvn = buildTemporary(location);<NEW_LINE>OpTpl op = new OpTpl(location, OpCode.CPUI_LOAD);<NEW_LINE>Varnode... | ptr.ops.push_back(op); |
1,539,104 | protected FileSKVWriter openWriter(FileOptions options) throws IOException {<NEW_LINE>AccumuloConfiguration acuconf = options.getTableConfiguration();<NEW_LINE>long blockSize = acuconf.getAsBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE);<NEW_LINE>Preconditions.checkArgument((blockSize < Integer.MAX_VALUE && blockSize... | samplerConfig = SamplerConfigurationImpl.newSamplerConfig(acuconf); |
1,037,015 | public void document(int docID, StoredFieldVisitor visitor) throws IOException {<NEW_LINE>if (docID != 0) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (visitor.needsField(FAKE_SOURCE_FIELD) == StoredFieldVisitor.Status.YES) {<NEW_LINE>assert operation.source().toBytesRef().offset == 0;<NEW_LINE>assert operation.source().to... | throw new IllegalArgumentException("no such doc ID " + docID); |
923,527 | @JSONP<NEW_LINE>@NoCache<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON, "application/javascript" })<NEW_LINE>public final Response listAvailableApps(@Context final HttpServletRequest request, @Context final HttpServletResponse response, @QueryParam("filter") final String filter) {<NEW_LINE>try {<NEW_LINE>final InitDa... | helper.getAvailableDescriptorViews(user, filter); |
1,197,867 | private static SuggestedFix generateFix(MethodInvocationTree tree, VisitorState state) {<NEW_LINE>NewClassTree receiver = (NewClassTree) getReceiver(tree);<NEW_LINE>List<? extends ExpressionTree> arguments = receiver.getArguments();<NEW_LINE>MethodSymbol methodSymbol = getSymbol(receiver);<NEW_LINE>String unit = ((Memb... | , unit)).build(); |
4,976 | private Object parseValue(GridField field, Object in) {<NEW_LINE>if (in == null)<NEW_LINE>return null;<NEW_LINE>int dt = field.getDisplayType();<NEW_LINE>try {<NEW_LINE>// Return Integer<NEW_LINE>if (dt == DisplayType.Integer || (DisplayType.isID(dt) && field.getColumnName().endsWith("_ID"))) {<NEW_LINE>if (in instance... | String error = ex.getLocalizedMessage(); |
868,288 | public void execute(Realm realm) {<NEW_LINE>MessageItem messageItem = realm.where(MessageItem.class).equalTo(MessageItem.Fields.UNIQUE_ID, messageId).findFirst();<NEW_LINE>if (messageItem != null) {<NEW_LINE>RealmList<Attachment> attachments = messageItem.getAttachments();<NEW_LINE>// remove temporary attachments creat... | setImageWidth(imageSize.getWidth()); |
47,925 | private static void onGoAway(Channel channel, String sentOrReceived, int lastStreamId, long errorCode, ByteBuf debugData) {<NEW_LINE>if (errorCode == CODE_NO_ERROR) {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("{} {} a GOAWAY frame: lastStreamId={}, errorCode=NO_ERROR(0)", channel, sentOrReceived, la... | .toString(StandardCharsets.UTF_8)); |
306,223 | public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException {<NEW_LINE>try {<NEW_LINE>SAXParserFactory spf = SAXParserFactory.newInstance();<NEW_LINE>spf.setXIncludeAware(isXIncludeAw... | , new InputSource(entityStream))); |
913,305 | private static void visitGetPropertySwitch(PersistentEntity<?, ?> entity, List<PersistentProperty<?>> persistentProperties, String internalClassName, MethodVisitor mv) {<NEW_LINE>Map<String, <MASK><NEW_LINE>int[] hashes = new int[propertyStackMap.size()];<NEW_LINE>Label[] switchJumpLabels = new Label[propertyStackMap.s... | PropertyStackAddress> propertyStackMap = createPropertyStackMap(persistentProperties); |
621,486 | private K putInverse(@ParametricNullness V value, @ParametricNullness K key, boolean force) {<NEW_LINE>int valueHash = smearedHash(value);<NEW_LINE>int keyHash = smearedHash(key);<NEW_LINE>BiEntry<K, V> <MASK><NEW_LINE>BiEntry<K, V> oldEntryForKey = seekByKey(key, keyHash);<NEW_LINE>if (oldEntryForValue != null && keyH... | oldEntryForValue = seekByValue(value, valueHash); |
1,155,927 | public static void toJSON(OutputWriter jsonWriter, PipelineConfig pipelineConfig) {<NEW_LINE>jsonWriter.addLinks(linksWriter -> linksWriter.addLink("self", Routes.PipelineConfig.name(pipelineConfig.getName().toString())).addAbsoluteLink("doc", Routes.PipelineConfig.DOC).addLink("find", Routes.PipelineConfig.find()));<N... | jsonWriter, pipelineConfig.getTimer()); |
812,024 | public Predicate<ServerWebExchange> apply(Config config) {<NEW_LINE>List<IpSubnetFilterRule> sources = convert(config.sources);<NEW_LINE>return new GatewayPredicate() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean test(ServerWebExchange exchange) {<NEW_LINE>InetSocketAddress remoteAddress = config.remoteAddress... | "Remote addresses didn't match " + hostAddress + " != " + host); |
588,954 | public static void onFail(final ServerMemberManager manager, final Member member, Throwable ex) {<NEW_LINE>manager.getMemberAddressInfos().remove(member.getAddress());<NEW_LINE>final <MASK><NEW_LINE>member.setState(NodeState.SUSPICIOUS);<NEW_LINE>member.setFailAccessCnt(member.getFailAccessCnt() + 1);<NEW_LINE>int maxF... | NodeState old = member.getState(); |
485,462 | private void mapRequestBodyMatchers(YamlContract.Request yamlContractRequest, Request dslContractRequest) {<NEW_LINE>dslContractRequest.bodyMatchers((bodyMatchers) -> Optional.ofNullable(yamlContractRequest.matchers).map(stubMatchers -> stubMatchers.body).ifPresent(stubMatchers -> stubMatchers.forEach(stubMatcher -> {<... | matchingTypeValueHolder.maxOccurrence(stubMatcher.maxOccurrence); |
464,992 | public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {<NEW_LINE>ConfigurableEnvironment environment = event.getEnvironment();<NEW_LINE>if (isSpringCloudBootstrapEnvironment(environment)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// check spring.application.name<NEW_LINE>String applicationName = enviro... | binder = Binder.get(environment); |
464,068 | public static void installMyGnuPlot() {<NEW_LINE>if (!FOUND_GP) {<NEW_LINE>LOG.warn("Skipping Gnuplot Shell Script Install since Gnuplot executable was not found");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!GP_FILE.exists()) {<NEW_LINE>if (!GP_FILE.getParentFile().exists()) {<NEW_LINE>GP_FILE.getParentFile().mkdirs();<... | DynamicChannelBuffer(is.available()); |
1,628,652 | public void process(ProcessContext context) throws FrameworkException {<NEW_LINE>StateInstruction instruction = context.getInstruction(StateInstruction.class);<NEW_LINE>State state = instruction.getState(context);<NEW_LINE>String stateType = state.getType();<NEW_LINE>StateHandler stateHandler = stateHandlers.get(stateT... | interceptor = executedInterceptors.get(i); |
167,353 | ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>WrapProc... | emc.beginTransaction(Agent.class); |
1,723,233 | private static ReferenceResolver<NestableInput<?>> createPartitionColumnResolver(Index index, Schemas schemas) {<NEW_LINE>PartitionName partitionName;<NEW_LINE>try {<NEW_LINE>partitionName = PartitionName.fromIndexOrTemplate(index.getName());<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new UnhandledS... | .size() == numPartitionedColumns : "invalid number of partitioned columns"; |
293,754 | final UpdateDatasetResult executeUpdateDataset(UpdateDatasetRequest updateDatasetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDatasetRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateDatasetRequest> request = null;<NE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,843,819 | private SaveResult doBackup(FileSettings file, String prefix) {<NEW_LINE>SaveResult.Builder fileResult = new SaveResult.Builder(file.id);<NEW_LINE>if (!file.backupEnabled) {<NEW_LINE>fileResult.setCancelled(CancelReason.INVALID);<NEW_LINE>return fileResult.make();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String content = loa... | info("[Backup] Didn't perform backup (invalid content): " + file.path); |
1,595,399 | /* (non-Javadoc)<NEW_LINE>* @see org.lamport.tla.toolbox.jcloud.CloudTLCInstanceParameters#mungeProperties(java.util.Properties)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void mungeProperties(final Properties properties) {<NEW_LINE>properties.setProperty("azurecompute-arm.tenantId", System.getenv(AZURE_COMPUTE_TEN... | properties.setProperty("jclouds.azurecompute.arm.publishers", "Canonical"); |
1,717,912 | public GlueDataCatalogConfigurationDescription unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GlueDataCatalogConfigurationDescription glueDataCatalogConfigurationDescription = new GlueDataCatalogConfigurationDescription();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String ... | JsonToken token = context.getCurrentToken(); |
1,316,136 | public List<PurchaseItem> placeRemotePurchaseOrder(@NonNull final Collection<PurchaseCandidate> purchaseCandidates) {<NEW_LINE>final ImmutableMap<PurchaseOrderRequestItem, PurchaseCandidate> //<NEW_LINE>//<NEW_LINE>requestItem2Candidate = Maps.uniqueIndex(purchaseCandidates, RealVendorGatewayInvoker::createPurchaseOrde... | > result = ImmutableList.builder(); |
690,359 | public void LAPACK_ssyevr_2stage(String arg0, String arg1, String arg2, int[] arg3, float[] arg4, int[] arg5, float[] arg6, float[] arg7, int[] arg8, int[] arg9, float[] arg10, int[] arg11, float[] arg12, float[] arg13, int[] arg14, int[] arg15, float[] arg16, int[] arg17, int[] arg18, int[] arg19, int[] arg20) {<NEW_L... | arg17, arg18, arg19, arg20); |
314,152 | private static URL[] layersFor(List<Bundle> bundles) {<NEW_LINE>List<URL> layers = new ArrayList<URL>(2);<NEW_LINE>for (Bundle b : bundles) {<NEW_LINE>if (b.getSymbolicName().equals("org.netbeans.modules.autoupdate.ui")) {<NEW_LINE>// NOI18N<NEW_LINE>// Won't work anyway, so don't even try.<NEW_LINE>continue;<NEW_LINE>... | getResource(base + suffix + ext); |
737,173 | void disassembleCallback(ListingActionContext context) {<NEW_LINE>ProgramSelection currentSelection = context.getSelection();<NEW_LINE>ProgramLocation currentLocation = context.getLocation();<NEW_LINE>Program currentProgram = context.getProgram();<NEW_LINE>DisassembleCommand cmd = null;<NEW_LINE>boolean isDynamicListin... | Address addr = currentLocation.getAddress(); |
1,366,150 | private static SqlIntervalQualifier convertIntervalDatepartToSqlIntervalQualifier(String datePart) {<NEW_LINE>switch(datePart) {<NEW_LINE>case "YEAR":<NEW_LINE>return new SqlIntervalQualifier(TimeUnit.YEAR, null, SqlParserPos.ZERO);<NEW_LINE>case "MONTH":<NEW_LINE>return new SqlIntervalQualifier(TimeUnit.MONTH, null, S... | MILLISECOND, null, SqlParserPos.ZERO); |
1,779,192 | final GetSavingsPlansCoverageResult executeGetSavingsPlansCoverage(GetSavingsPlansCoverageRequest getSavingsPlansCoverageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSavingsPlansCoverageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,198,569 | private static UndoableEdit massRenameField(Collection<BibEntry> entries, Field field, Field newField, boolean overwriteValues) {<NEW_LINE>NamedCompound compoundEdit = new NamedCompound(Localization.lang("Rename field"));<NEW_LINE>for (BibEntry entry : entries) {<NEW_LINE>Optional<String> valToMove = entry.getField(fie... | , valToMove.get())); |
909,668 | private boolean runWithIndex() {<NEW_LINE>// here we try to query the partitioned-index<NEW_LINE>Predicate predicate = getPredicate();<NEW_LINE>if (predicate == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// we use the partitioned-index to operate on the selected keys only<NEW_LINE>Indexes indexes = mapContainer... | add(entry.getKeyData()); |
1,312,534 | protected Object buildLazyResolutionProxy(final DependencyDescriptor descriptor, @Nullable final String beanName) {<NEW_LINE>BeanFactory beanFactory = getBeanFactory();<NEW_LINE>Assert.<MASK><NEW_LINE>final DefaultListableBeanFactory dlbf = (DefaultListableBeanFactory) beanFactory;<NEW_LINE>TargetSource ts = new Target... | state(beanFactory instanceof DefaultListableBeanFactory, "BeanFactory needs to be a DefaultListableBeanFactory"); |
1,720,460 | static void pick_intra4x4mby_modes(Macroblock mb, QualityMetrics best) {<NEW_LINE>final MacroblockD xd = mb.e_mbd;<NEW_LINE>int i;<NEW_LINE>int cost = mb.mbmode_cost.get(xd.frame_type).get(MBPredictionMode.B_PRED);<NEW_LINE>long distortion = 0;<NEW_LINE>EnumMap<BPredictionMode, Integer> bmode_costs;<NEW_LINE>ReconIntra... | (best_mode[0] != null); |
889,698 | private void moveUnusedtoUsedImport(LineRange lineRange, ImportDeclarationNode importDeclarationNode) {<NEW_LINE>Optional<Symbol> symbol = semanticModel.symbol(importDeclarationNode);<NEW_LINE>if (symbol.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Location> locations = this.semanticModel.references(symbol.ge... | getDeleteRange(location.lineRange()); |
1,831,456 | public List<ExternalLoadBalancerDeviceVO> listNetscalerLoadBalancers(ListNetscalerLoadBalancersCmd cmd) {<NEW_LINE>Long physcialNetworkId = cmd.getPhysicalNetworkId();<NEW_LINE>Long lbDeviceId = cmd.getLoadBalancerDeviceId();<NEW_LINE>PhysicalNetworkVO pNetwork = null;<NEW_LINE>List<ExternalLoadBalancerDeviceVO> lbDevi... | Provider.Netscaler.getName()); |
1,129,518 | public CompletableFuture<PushEntryResponse> handlePush(PushEntryRequest request) throws Exception {<NEW_LINE>// The timeout should smaller than the remoting layer's request timeout<NEW_LINE>CompletableFuture<PushEntryResponse> future = new TimeoutFuture<>(1000);<NEW_LINE>switch(request.getType()) {<NEW_LINE>case APPEND... | <>(request, future)); |
1,345,347 | public static void dexoatAndDisableInline(String dexFilePath, String oatFilePath) throws IOException {<NEW_LINE>final File oatFile = new File(oatFilePath);<NEW_LINE>if (!oatFile.exists()) {<NEW_LINE>oatFile<MASK><NEW_LINE>}<NEW_LINE>final List<String> commandAndParams = new ArrayList<>();<NEW_LINE>commandAndParams.add(... | .getParentFile().mkdirs(); |
565,473 | public void doRun() {<NEW_LINE>Channel channel = context.getChannel();<NEW_LINE>Transaction tx = channel.getTransaction();<NEW_LINE>tx.begin();<NEW_LINE>try {<NEW_LINE>Event event = channel.take();<NEW_LINE>if (event == null) {<NEW_LINE>tx.commit();<NEW_LINE>Thread.sleep(context.getProcessInterval());<NEW_LINE>return;<... | "Channel take transaction rollback exception:" + getName(), e); |
739,295 | private static void initialize(Instrumentation instrumentation, ClassLoader classLoader, boolean testUnsafePresent) {<NEW_LINE>Class<?> unsafeClass;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (ClassNotFoundException exception) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, Set<Module>> exports = new HashMap<>(... | unsafeClass = Class.forName("jdk.internal.misc.Unsafe"); |
1,470,033 | public void onMessage(Message msg) {<NEW_LINE>String text = null;<NEW_LINE>String messageID = null;<NEW_LINE>// Performing test points<NEW_LINE>testAssocTxContext("onMessage()");<NEW_LINE>ctx_getCallerPrincipal("onMessage()");<NEW_LINE>ctx_isCallerInRole("onMessage()");<NEW_LINE>ctx_getEJBHome("onMessage()");<NEW_LINE>... | TextMessage) msg).getText(); |
1,309,431 | // TODO : Not working at the moment.<NEW_LINE>private BLangConstantValue calculateMod(BLangConstantValue lhs, BLangConstantValue rhs) {<NEW_LINE>Object result = null;<NEW_LINE>switch(this.currentConstSymbol.type.tag) {<NEW_LINE>case TypeTags.INT:<NEW_LINE>case // Byte will be a compiler error.<NEW_LINE>TypeTags.BYTE:<N... | .value), MathContext.DECIMAL128); |
1,351,736 | private void loadNode92() {<NEW_LINE>DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.ServerDiagnosticsSummaryDataType_Encoding_DefaultBinary, new QualifiedName(0, "Default Binary"), new LocalizedText("en", "Default Binary"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.... | this.nodeManager.addNode(node); |
1,827,818 | public void run() {<NEW_LINE>boolean isDebug = java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments().toString().indexOf("-agentlib:jdwp") > 0;<NEW_LINE>StandaloneSoapUICore standaloneSoapUICore = new StandaloneSoapUICore(true);<NEW_LINE>SoapUIUpdateProvider updateProvider = SoapUIAutoUpdaterUtil... | Analytics.trackAction(SoapUIActions.PRODUCT_STARTED_FROM_CMD); |
300,579 | public void prepareWrite(final int recordCount, final int inputSize, final int idealSize) {<NEW_LINE>this.inputCount = inputSize;<NEW_LINE>this.idealCount = idealSize;<NEW_LINE>ZipInputStream zis = null;<NEW_LINE>try {<NEW_LINE>this.fos = new FileOutputStream(this.file);<NEW_LINE>this.zos = new ZipOutputStream(this.fos... | xmlOut.addAttribute("defaultRowHeight", "15"); |
1,692,908 | public AlleleFractionState.MinorFractions sample(final RandomGenerator rng, final AlleleFractionState state, final AlleleFractionSegmentedData data) {<NEW_LINE>final List<Double> minorFractions = new ArrayList<>(data.getNumSegments());<NEW_LINE>final BiFunction<AlleleFractionSegmentedData.IndexedAllelicCount, Double, D... | allelicCountsInSegment = data.getIndexedAllelicCountsInSegment(segmentIndex); |
352,584 | public // e.g. "Azureus"<NEW_LINE>void // e.g. "Azureus"<NEW_LINE>unregisterAdditionalFileType(// e.g. ".torrent"<NEW_LINE>String name, String type) throws PlatformManagerException {<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>access.deleteKey(AEWin32Access.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\E... | AEWin32Access.HKEY_CURRENT_USER, "Software\\Classes\\" + type); |
1,592,551 | public void removeScannerUser(IScannerClient scannerClient, boolean isReset) {<NEW_LINE>Common.logger.add(new LogEntry(LogEntry.PB_LOG_INFO, "removeScannerUser client: " + scannerClient.toString()));<NEW_LINE>Common.logger.add(new LogEntry(LogEntry.PB_LOG_DEBUG, "Getting scanner user"));<NEW_LINE>synchronized (userStac... | get(j).getClient(); |
1,402,781 | public static float[] RGBtoYCC(int red, int green, int blue) {<NEW_LINE>float[<MASK><NEW_LINE>float r = red / 255f;<NEW_LINE>float g = green / 255f;<NEW_LINE>float b = blue / 255f;<NEW_LINE>float y = 0.213f * r + 0.419f * g + 0.081f * b;<NEW_LINE>float c1 = -0.131f * r - 0.256f * g + 0.387f * b + 0.612f;<NEW_LINE>float... | ] ycc = new float[3]; |
271,525 | protected void encodeOptions(FacesContext context, Chart chart) throws IOException {<NEW_LINE>super.encodeOptions(context, chart);<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>PieChartModel model = (PieChartModel) chart.getModel();<NEW_LINE><MASK><NEW_LINE>int sliceMargin = model.getSliceMargi... | int diameter = model.getDiameter(); |
1,010,286 | private boolean bkQuery(BookKeeperAdmin bkAdmin, Set<BookieId> bookieAddrs) throws InterruptedException, BKException {<NEW_LINE>SortedMap<Long, LedgerMetadata> ledgersContainBookies = bkAdmin.getLedgersContainBookies(bookieAddrs);<NEW_LINE>LOG.error("NOTE: Bookies in inspection list are marked with '*'.");<NEW_LINE>for... | getValue().getState()); |
968,703 | public void render() {<NEW_LINE>float delta = Gdx.graphics.getDeltaTime();<NEW_LINE>float remaining = delta;<NEW_LINE>while (remaining > 0) {<NEW_LINE>float d = Math.min(0.016f, remaining);<NEW_LINE>world.step(d, 8, 3);<NEW_LINE>time += d;<NEW_LINE>remaining -= d;<NEW_LINE>}<NEW_LINE>camera.update();<NEW_LINE>ScreenUti... | (Box2dAttachment) slot.getAttachment(); |
542,688 | public com.squareup.okhttp.Call userConfirmCall(String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String ... | HashMap<String, Object>(); |
431,279 | final GetSchemaResult executeGetSchema(GetSchemaRequest getSchemaRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSchemaRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,768,346 | public void visitForLoop(final ForStatement node) {<NEW_LINE>completeExpressionStack.add(node);<NEW_LINE>try {<NEW_LINE>node.getCollectionExpression().visit(this);<NEW_LINE>} finally {<NEW_LINE>completeExpressionStack.removeLast();<NEW_LINE>}<NEW_LINE>ClassNode collectionType = primaryTypeStack.removeLast();<NEW_LINE>/... | Parameter param = node.getVariable(); |
40,147 | protected void encodeItem(FacesContext context, Steps steps, MenuItem item, int activeIndex, int index) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String itemClass;<NEW_LINE>if (steps.isReadonly()) {<NEW_LINE>itemClass = (index == activeIndex) ? Steps.ACTIVE_ITEM_CLASS :... | steps, item, activeIndex, index); |
119,258 | private static void tryAssertionHaving(RegressionEnvironment env, AtomicInteger milestone) {<NEW_LINE>String[] fields = "symbol,mysum".split(",");<NEW_LINE>sendEvent(env, "IBM", 3);<NEW_LINE>sendEvent(env, "IBM", 4);<NEW_LINE>sendEvent(env, "CMU", 1);<NEW_LINE>sendEvent(env, "CMU", 2);<NEW_LINE>sendEvent(env, "CAT", 5)... | sendEvent(env, "CAT", 6); |
425,251 | private static void initProxy() {<NEW_LINE>synchronized (SearchResultsTabArea.class) {<NEW_LINE>if (search_proxy_init_done) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>search_proxy_init_done = true;<NEW_LINE>}<NEW_LINE>new AEThread2("ST_test") {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LI... | URL_WEBSEARCH.replaceAll("%s", "derp"); |
143,275 | private void loadAddresses(MatchInfo matchInfo) {<NEW_LINE>VTMatch match = matchInfo.getMatch();<NEW_LINE>VTAssociation association = match.getAssociation();<NEW_LINE>Address sourceAddress = association.getSourceAddress();<NEW_LINE><MASK><NEW_LINE>int sourceLength = match.getSourceLength();<NEW_LINE>int destinationLeng... | Address destinationAddress = association.getDestinationAddress(); |
1,822,303 | public okhttp3.Call connectPutNodeProxyCall(String name, String path, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api/v1/nodes/{name}/proxy".replaceAll("\\{" + "name" + "\\}", localVarApiClient.esc... | HashMap<String, String>(); |
345,599 | public void onClick(View v) {<NEW_LINE>if (TextUtils.isEmpty(holder.firstNameEt.getText().toString().trim()) || TextUtils.isEmpty(holder.lastNameEt.getText().toString().trim()) || TextUtils.isEmpty(holder.emailIdEt.getText().toString().trim()) || TextUtils.isEmpty(holder.firstNameEt.getText().toString().trim()) || "Tit... | toString().trim()); |
785,128 | private void extractClass(NodeTraversal t, Node classNode) {<NEW_LINE>if (expressionDecomposer.canExposeExpression(classNode) == DecompositionType.DECOMPOSABLE) {<NEW_LINE>expressionDecomposer.maybeExposeExpression(classNode);<NEW_LINE>}<NEW_LINE>Node parent = classNode.getParent();<NEW_LINE>String name = ModuleNames.f... | statement = NodeUtil.getEnclosingStatement(parent); |
820,364 | private boolean handleNonReadyStatus() {<NEW_LINE>synchronized (this.syncObject) {<NEW_LINE>Status nodeStatus = this.node.getStatus();<NEW_LINE>boolean quickFinish = false;<NEW_LINE>final long time = System.currentTimeMillis();<NEW_LINE>if (Status.isStatusFinished(nodeStatus)) {<NEW_LINE>quickFinish = true;<NEW_LINE>} ... | node.getNestedId()))); |
1,050,842 | public Map<String, Object> populate(Map<String, Object> json, Map<String, Object> context) {<NEW_LINE>if (!Beans.get(AppProductionService.class).isApp("production")) {<NEW_LINE>return super.populate(json, context);<NEW_LINE>}<NEW_LINE>Object productFromView = json.get("product");<NEW_LINE>Object <MASK><NEW_LINE>Object ... | qtyFromView = json.get("qty"); |
1,428,675 | public static String[] loadFileList(final String directory, final boolean databasesOnly) {<NEW_LINE>File path = new File(directory);<NEW_LINE>String[] fileList;<NEW_LINE>try {<NEW_LINE>path.mkdirs();<NEW_LINE>} catch (SecurityException e) {<NEW_LINE>Log.e(RTABMapActivity.TAG, "unable to write on the sd card " + e.toStr... | File(directory + "/" + filename2); |
1,715,694 | public void process(SourceEvent event) throws SourceException {<NEW_LINE>switch(event.getEvent()) {<NEW_LINE>case REQUEST_START_SAMPLE_STREAM:<NEW_LINE>if (event.hasSource() && event.getSource() instanceof PassThroughChannelSource) {<NEW_LINE>mTunerController.addBufferListener((PassThroughChannelSource) event.getSource... | (mTunerChannels.size())); |
255,198 | public Container createContainer(MediaFile item) {<NEW_LINE>MusicAlbum container = new MusicAlbum();<NEW_LINE>if (item.isAlbum()) {<NEW_LINE>container.setAlbumArtURIs(new URI[] { getDispatcher().getAlbumProcessor().getAlbumArtURI(<MASK><NEW_LINE>if (item.getArtist() != null) {<NEW_LINE>container.setArtists(getDispatche... | item.getId()) }); |
243,377 | public static void main(String[] args) throws Exception {<NEW_LINE>// get service<NEW_LINE>var userService = new UserService();<NEW_LINE>// use create service to add users<NEW_LINE>for (var user : generateSampleUsers()) {<NEW_LINE>var id = userService.createUser(user);<NEW_LINE>LOGGER.info("Add user" + user + "at" + id... | (String.valueOf(users)); |
1,091,343 | public VAdminProto.RollbackStoreResponse handleRollbackStore(VAdminProto.RollbackStoreRequest request) {<NEW_LINE>final <MASK><NEW_LINE>final long pushVersion = request.getPushVersion();<NEW_LINE>VAdminProto.RollbackStoreResponse.Builder response = VAdminProto.RollbackStoreResponse.newBuilder();<NEW_LINE>try {<NEW_LINE... | String storeName = request.getStoreName(); |
48,678 | public static Map<String, JobContainerRequest> parseContainerRequests(Configuration conf) {<NEW_LINE>Set<String> jobNames = getAllJobTypes(conf);<NEW_LINE>Set<String> untrackedJobTypes = Arrays.stream(getUntrackedJobTypes(conf)).collect(Collectors.toSet());<NEW_LINE>Map<String, JobContainerRequest> containerRequests = ... | .getTrimmedStringCollection(TonyConfigurationKeys.APPLICATION_PREPARE_STAGE)); |
1,804,868 | private void userListToMap(List<Object> userList, Map<String, WallProvider> blackListMap, ProblemReporter problemReporter) {<NEW_LINE>for (Object userObj : userList) {<NEW_LINE>User user = (User) userObj;<NEW_LINE>String name = user.getName();<NEW_LINE>String password = user.getPassword();<NEW_LINE>String usingDecryptS... | String whiteIPsStr = user.getWhiteIPs(); |
1,258,048 | public WriteFilesResult<DestinationT> expand(PCollection<UserT> input) {<NEW_LINE>Write.Builder<DestinationT, UserT> resolvedSpec = new AutoValue_FileIO_Write.Builder<>();<NEW_LINE>resolvedSpec.setDynamic(getDynamic());<NEW_LINE>checkArgument(getSinkFn() != null, ".via() is required");<NEW_LINE>resolvedSpec.setSinkFn(g... | (resolved.getAllSideInputs())); |
1,650,698 | private LinkedList<PartialVACandidate> filter1(int k, int reducedDims, List<DAFile> daFiles, VectorApproximation queryApprox, int subspaceDims, VALPNormDistance dist) {<NEW_LINE>LinkedList<PartialVACandidate> candidates1 = new LinkedList<>();<NEW_LINE>DoubleMaxHeap minmaxdist = new DoubleMaxHeap(k + 1);<NEW_LINE>for (V... | PartialVACandidate pva = it.next(); |
785,364 | final AddFlowOutputsResult executeAddFlowOutputs(AddFlowOutputsRequest addFlowOutputsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(addFlowOutputsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
818,457 | void handleEndPacket(MySQLPacket packet, AutoTxOperation txOperation, boolean isSuccess) {<NEW_LINE>ShardingService service = session.getShardingService();<NEW_LINE>if (rrs.isLoadData()) {<NEW_LINE>service.getLoadDataInfileHandler().clear();<NEW_LINE>}<NEW_LINE>if (errorConnsCnt == rrs.getNodes().length) {<NEW_LINE>if ... | releaseConnection(servicex.getConnection()); |
1,242,065 | public void patchServer() {<NEW_LINE>String message = _serverDescriptor.applicationDistrib ? "You are about to install or refresh your" + " server distribution and your application distribution onto this node.\n" + "Do you want shut down all servers affected by this update?" : "You are about to install or refresh the d... | String prefix = "Patching server '" + _id + "'..."; |
1,280,874 | private void writeHeaderInfo(OutputStream stream) throws IOException {<NEW_LINE>writeStreamInt(stream, this.numberOfChunks);<NEW_LINE>stream.write((byte) this.sizeOfLastChunk);<NEW_LINE>stream.write((byte) this.documentReferenceSize);<NEW_LINE>stream.write((byte) this.separator);<NEW_LINE>this.streamEnd += 3;<NEW_LINE>... | writeStreamInt(stream, this.startOfCategoryTables); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.