idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,787,001 | Job load() {<NEW_LINE>try {<NEW_LINE>Class<?> currClass = Class.forName(className);<NEW_LINE>Constructor<?> cons = currClass.getDeclaredConstructor(null);<NEW_LINE>cons.setAccessible(true);<NEW_LINE>Object obj = cons.newInstance();<NEW_LINE>do {<NEW_LINE>for (Field f : currClass.getDeclaredFields()) {<NEW_LINE>if (f.is... | ("Job %s must have a constructor with zero-argument", className), e); |
931,049 | public void propertyChanged(String key, Object oldValue, Object newValue, KrollProxy proxy) {<NEW_LINE>if (key.equals(TiC.PROPERTY_SWIPEABLE)) {<NEW_LINE>this.swipeable = TiConvert.toBoolean(newValue);<NEW_LINE>} else if (key.equals(TiC.PROPERTY_SMOOTH_SCROLL_ON_TAB_CLICK)) {<NEW_LINE>this.smoothScrollOnTabClick = TiCo... | autoTabTitle = TiConvert.toBoolean(newValue); |
481,824 | public static void main(String[] args) {<NEW_LINE>var //<NEW_LINE>printVersion = // Streams either one element (the args-array) or zero elements<NEW_LINE>Optional.ofNullable(args).//<NEW_LINE>stream().//<NEW_LINE>flatMap(Arrays::stream).anyMatch(arg -> "-v".equals(arg) || "--version".equals(arg));<NEW_LINE>if (printVer... | System.getProperty("cryptomator.buildNumber", "SNAPSHOT"); |
578,936 | static public MultiFileReadingProgress createMultiFileReadingProgress(final ImportingJob job, List<ObjectNode> fileRecords) {<NEW_LINE>long totalSize = 0;<NEW_LINE>for (ObjectNode fileRecord : fileRecords) {<NEW_LINE>File file = <MASK><NEW_LINE>totalSize += file.length();<NEW_LINE>}<NEW_LINE>final long totalSize2 = tot... | ImportingUtilities.getFile(job, fileRecord); |
348,640 | private String format(JSError error, boolean warning) {<NEW_LINE>SourceExcerptProvider source = getSource();<NEW_LINE>String sourceName = error.getSourceName();<NEW_LINE>int lineNumber = error.getLineNumber();<NEW_LINE>int charno = error.getCharno();<NEW_LINE>// Format the non-reverse-mapped position.<NEW_LINE>StringBu... | boldLine, sourceName, lineNumber, charno); |
1,635,329 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Mapping mapping = em... | send(mapping.getId()); |
95,003 | public static UUID createHashicorpCAConfig(UUID customerUUID, String label, String storagePath, HashicorpVaultConfigParams hcVaultParams) throws Exception {<NEW_LINE>if (Strings.isNullOrEmpty(hcVaultParams.vaultAddr) || Strings.isNullOrEmpty(hcVaultParams.vaultToken) || Strings.isNullOrEmpty(hcVaultParams.engine) || St... | .getLeft())))); |
464,160 | public static ImportNacosConfigResponse unmarshall(ImportNacosConfigResponse importNacosConfigResponse, UnmarshallerContext _ctx) {<NEW_LINE>importNacosConfigResponse.setRequestId(_ctx.stringValue("ImportNacosConfigResponse.RequestId"));<NEW_LINE>importNacosConfigResponse.setHttpStatusCode(_ctx.integerValue("ImportNaco... | ("ImportNacosConfigResponse.Data.SkipData[" + i + "].DataId")); |
88,691 | public static void main(String[] args) {<NEW_LINE><MASK><NEW_LINE>connector.forProjectDirectory(new File("../sample"));<NEW_LINE>ProjectConnection connection = null;<NEW_LINE>try {<NEW_LINE>connection = connector.connect();<NEW_LINE>ModelBuilder<StsToolingModel> customModelBuilder = connection.model(StsToolingModel.cla... | GradleConnector connector = GradleConnector.newConnector(); |
1,158,026 | public Object intercept(@Origin Method method, @AllArguments Object[] params) {<NEW_LINE>if (!methodMetadataMap.containsKey(method)) {<NEW_LINE>methodMetadataMap.put(method, new ReactiveGrpcMethodMetadata(method, group, service, version));<NEW_LINE>}<NEW_LINE>ReactiveGrpcMethodMetadata methodMetadata = methodMetadataMa... | ().retainedDuplicate())); |
415,752 | public static DescribeConfigOptionsResponse unmarshall(DescribeConfigOptionsResponse describeConfigOptionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeConfigOptionsResponse.setRequestId(_ctx.stringValue("DescribeConfigOptionsResponse.RequestId"));<NEW_LINE>describeConfigOptionsResponse.setCode(_ctx.stringValu... | ("DescribeConfigOptionsResponse.StackConfigOption.ConfigOptions[" + i + "].RegexPattern")); |
386,809 | public void run() {<NEW_LINE>for (; ; ) {<NEW_LINE>try {<NEW_LINE>if (isDetach()) {<NEW_LINE>LockSupport.parkNanos(TimeUnit.MILLISECONDS.toNanos(2000));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>UshardInterface.SubscribeKvPrefixInput input = UshardInterface.SubscribeKvPrefixInput.newBuilder().setIndex(0).setDuration(60).s... | .MILLISECONDS.toNanos(2000)); |
557,510 | public TupleList evaluateList(Evaluator evaluator) {<NEW_LINE>// Use a native evaluator, if more efficient.<NEW_LINE>// TODO: Figure this out at compile time.<NEW_LINE><MASK><NEW_LINE>NativeEvaluator nativeEvaluator = schemaReader.getNativeSetEvaluator(call.getFunDef(), call.getArgs(), evaluator, this);<NEW_LINE>if (na... | SchemaReader schemaReader = evaluator.getSchemaReader(); |
665 | public static void main(String[] args) {<NEW_LINE>Exercise36_Neighbors neighbors = new Exercise36_Neighbors();<NEW_LINE>EdgeWeightedDigraph edgeWeightedDigraph1 = new EdgeWeightedDigraph(4);<NEW_LINE>edgeWeightedDigraph1.addEdge(new DirectedEdge(0, 1, 20));<NEW_LINE>edgeWeightedDigraph1.addEdge(new DirectedEdge(0, 2, 5... | StdOut.print(vertex + " "); |
133,144 | public static MavenCoordinate fromM2Url(URI m2Url) throws IOException {<NEW_LINE>if (!"m2".equals(m2Url.getScheme())) {<NEW_LINE>throw new IOException("Only m2 URL is supported: " + m2Url);<NEW_LINE>}<NEW_LINE>if (!m2Url.getRawPath().startsWith("/")) {<NEW_LINE>throw new IOException("Invalid m2 URL. Expected format m2:... | (1).split(":"); |
1,263,757 | public static Stream<Object> loadJson(Object urlOrBinary, Map<String, Object> headers, String payload, String path, boolean failOnError, String compressionAlgo, List<String> options) {<NEW_LINE>try {<NEW_LINE>if (urlOrBinary instanceof String) {<NEW_LINE>String url = (String) urlOrBinary;<NEW_LINE>urlOrBinary = Util.ge... | getFactory().createParser(input); |
597,172 | protected ConditionEvaluationResult evaluate(EnabledIfSystemProperty annotation) {<NEW_LINE>String name = annotation.named().trim();<NEW_LINE>String regex = annotation.matches();<NEW_LINE>Preconditions.notBlank(name, () -> "The 'named' attribute must not be blank in " + annotation);<NEW_LINE>Preconditions.notBlank(rege... | ), annotation.disabledReason()); |
83,504 | private void addResponse(String responseCode, Response response, Operation operation, RestMethod method) {<NEW_LINE>List<String> produces = operation.getProduces();<NEW_LINE>if (produces == null || produces.isEmpty()) {<NEW_LINE>operation.setProduces(swagger.getProduces());<NEW_LINE>produces = operation.getProduces();<... | addNewRepresentation(RestRepresentation.Type.RESPONSE); |
497,571 | public boolean relocate(CompoundTag root, Point3i offset) {<NEW_LINE>CompoundTag level = Helper.tagFromCompound(root, "Level");<NEW_LINE>if (level == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// adjust or set chunk position<NEW_LINE>level.putInt("xPos", level.getInt("xPos") + offset.blockToChunk().getX());<NEW... | "PostProcessing", offset.blockToSection()); |
488,743 | protected void restoreState(IProject project) {<NEW_LINE>TreeViewer viewer = getCommonViewer();<NEW_LINE>Control control = viewer.getControl();<NEW_LINE>if (control == null || control.isDisposed()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>IContainer container = ResourcesPlugin<MASK><NEW_LINE>List<String> expansions = pro... | .getWorkspace().getRoot(); |
60,616 | private void extractFFmpeg() {<NEW_LINE>ZipInputStream zipIn = null;<NEW_LINE>OutputStream out = null;<NEW_LINE>wnd2 = new FFmpegExtractorWnd(this);<NEW_LINE>wnd2.setVisible(true);<NEW_LINE>try {<NEW_LINE>String versionFile = null;<NEW_LINE>File input = new File(Config.getInstance().getTemporaryFolder(), tmpFile);<NEW_... | ZipEntry ent = zipIn.getNextEntry(); |
341,559 | public static void registerType(final ModelBuilder modelBuilder) {<NEW_LINE>final ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(BpmnShape.class, BPMNDI_ELEMENT_BPMN_SHAPE).namespaceUri(BPMNDI_NS).extendsType(LabeledShape.class).instanceProvider(new ModelTypeInstanceProvider<BpmnShape>() {<NEW_LINE><NEW_... | SequenceBuilder sequenceBuilder = typeBuilder.sequence(); |
533,841 | private int resolveConstructorArguments(String beanName, RootBeanDefinition mbd, BeanWrapper bw, ConstructorArgumentValues cargs, ConstructorArgumentValues resolvedValues) {<NEW_LINE>TypeConverter customConverter = this.beanFactory.getCustomTypeConverter();<NEW_LINE>TypeConverter converter = (customConverter != null ? ... | "constructor argument", valueHolder.getValue()); |
951,179 | public boolean checkTrigger(GameEvent event, Game game) {<NEW_LINE>if (!event.getPlayerId().equals(this.getControllerId())) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// activated ability<NEW_LINE>if (event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) {<NEW_LINE>StackAbility stackAbility = (StackAbility) game.... | getTargetId(), game))); |
1,008,968 | private Map<String, Object> createContextAsMap(final ReportContext reportContext) {<NEW_LINE>final Collection<ProcessInfoParameter> processInfoParams = reportContext.getProcessInfoParameters();<NEW_LINE>if (processInfoParams.isEmpty()) {<NEW_LINE>return ImmutableMap.of();<NEW_LINE>}<NEW_LINE>final TreeMap<String, Objec... | "_To_Info", param.getInfo_To()); |
233,742 | public void writeAdditionalFiles(GoSettings settings, Model model, SymbolProvider symbolProvider, GoDelegator goDelegator) {<NEW_LINE>ServiceShape service = settings.getService(model);<NEW_LINE>// generate code specific to service client<NEW_LINE>goDelegator.useShapeWriter(service, writer -> {<NEW_LINE>generateEndpoint... | model, symbolProvider, writer, service); |
265,620 | private Loader createLoader(URL url, int index, File file, boolean processRecursively) throws IOException {<NEW_LINE>if (file.isDirectory()) {<NEW_LINE>return new FileLoader(url, index, this);<NEW_LINE>}<NEW_LINE>if (file.isFile()) {<NEW_LINE>JarLoader loader;<NEW_LINE>if (myURLsWithProtectionDomain.contains(url)) {<NE... | ? System.nanoTime() : 0; |
1,598,523 | public Object functionTemplateGetFunction(Object realm, Object templateObj) {<NEW_LINE>JSRealm jsRealm = (JSRealm) realm;<NEW_LINE>JSContext jsContext = jsRealm.getContext();<NEW_LINE>FunctionTemplate template = (FunctionTemplate) templateObj;<NEW_LINE>if (template.getFunctionObject(jsRealm) == null) {<NEW_LINE>Compile... | ObjectTemplate prototypeTemplate = template.getPrototypeTemplate(); |
603,575 | public void write(final java.nio.ByteBuffer buf) {<NEW_LINE>try {<NEW_LINE>int startPositionMark = buf.position();<NEW_LINE>buf.position(buf.position() + 1);<NEW_LINE>int unknownsCounter = 0;<NEW_LINE>if (unknownFields == null)<NEW_LINE>unknownsCounter = Integer.MAX_VALUE;<NEW_LINE>{<NEW_LINE>com.wowd.wobly.WoblyUtils.... | .put((byte) 7); |
162,015 | /*<NEW_LINE>* Transform SentenceSentiment's opinion mining to output that user can use.<NEW_LINE>*/<NEW_LINE>private static IterableStream<SentenceOpinion> toSentenceOpinionList(com.azure.ai.textanalytics.implementation.models.SentenceSentiment sentenceSentiment, List<DocumentSentiment> documentSentimentList) {<NEW_LIN... | (sentenceTarget.getConfidenceScores())); |
134,021 | public TraceState build() {<NEW_LINE>if (numEntries == 0) {<NEW_LINE>return empty();<NEW_LINE>}<NEW_LINE>if (reversedEntries.size() == 2) {<NEW_LINE>return ArrayBasedTraceState.create(<MASK><NEW_LINE>}<NEW_LINE>String[] entries = new String[numEntries * 2];<NEW_LINE>int pos = 0;<NEW_LINE>for (int i = reversedEntries.si... | new ArrayList<>(reversedEntries)); |
662,100 | public void activateClusterStateVersion(int clusterStateVersion, NodeInfo node, Waiter<ActivateClusterStateVersionRequest> externalWaiter) {<NEW_LINE>var waiter = new RPCActivateClusterStateVersionWaiter(externalWaiter);<NEW_LINE>Target connection = getConnection(node);<NEW_LINE>if (!connection.isValid()) {<NEW_LINE>lo... | add(new Int32Value(clusterStateVersion)); |
576,771 | public IPage<Job> findJobs(QueryRequest request, Job job) {<NEW_LINE>LambdaQueryWrapper<Job> queryWrapper = new LambdaQueryWrapper<>();<NEW_LINE>if (StringUtils.isNotBlank(job.getBeanName())) {<NEW_LINE>queryWrapper.eq(Job::getBeanName, job.getBeanName());<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotBlank(job.getMethodNam... | getMethodName, job.getMethodName()); |
1,158,580 | public PartitionGetResult partitionGet(PartitionGetParam partParam) {<NEW_LINE>if (partParam instanceof PartitionGetRowsParam) {<NEW_LINE>PartitionGetRowsParam param = (PartitionGetRowsParam) partParam;<NEW_LINE>PartitionKey pkey = param.getPartKey();<NEW_LINE>pkey = psContext.getMatrixMetaManager().getMatrixMeta(pkey.... | Int2IntOpenHashMap> cks = new HashMap(); |
776,589 | public boolean apply(Game game, Ability source) {<NEW_LINE>int highestNumber = 0;<NEW_LINE>int number = 0;<NEW_LINE>Permanent menacingOgre = game.getPermanent(source.getSourceId());<NEW_LINE>String message = "Choose a number.";<NEW_LINE>Map<Player, Integer> numberChosen = new HashMap<>();<NEW_LINE>// players choose num... | highestNumber, game, source, false); |
377,738 | public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) {<NEW_LINE>if (!isPackage(qualifiedPackageName, moduleName))<NEW_LINE>// most common case<NEW_LINE>return null;<NEW_LINE>try {<NEW_LINE>// TODO: Check if any conv... | fs.getPath(rel, qualifiedBinaryFileName); |
1,064,248 | final DeleteVolumeResult executeDeleteVolume(DeleteVolumeRequest deleteVolumeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVolumeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
384,528 | public // may be useful when troubleshooting heap corruption<NEW_LINE>void printLog(int count) {<NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE>int pos = (this.insertionPosition - count + i) % this.buffer0.length;<NEW_LINE>byte opcode = this.operation[pos];<NEW_LINE>switch(opcode) {<NEW_LINE>case FREE_OPERATION:<N... | , this.buffer1[pos]); |
1,122,777 | private void updateRedisMaster() throws ResourceNotFoundException {<NEW_LINE>List<RedisTbl> <MASK><NEW_LINE>MigrationCluster migrationCluster = getHolder();<NEW_LINE>RedisService redisService = migrationCluster.getRedisService();<NEW_LINE>String fromDc = migrationCluster.fromDc();<NEW_LINE>String destDc = migrationClus... | toUpdate = new LinkedList<>(); |
1,280,906 | protected RemoteOperationResult<ArrayList<RemoteFile>> run(OwnCloudClient client) {<NEW_LINE><MASK><NEW_LINE>OwnCloudVersion serverVersion = null;<NEW_LINE>// get 'fresh data' from the database<NEW_LINE>OCFile tempFile = getStorageManager().getFileByPath(mLocalFolder.getRemotePath());<NEW_LINE>if (tempFile != null) {<N... | RemoteOperationResult<ArrayList<RemoteFile>> result; |
1,377,215 | Entry<K, V> removeMapping(Object o) {<NEW_LINE>if (!(o instanceof Map.Entry)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Entry<K, V>[] tab = getTable();<NEW_LINE>Map.Entry<K, V> entry = (Map.Entry) o;<NEW_LINE>Object k = maskNull(entry.getKey());<NEW_LINE>int h = <MASK><NEW_LINE>int i = indexFor(h, tab.length);<NEW_LI... | hash(k.hashCode()); |
1,675,106 | private Map<String, RequestParameter> validateHeaderParams(RoutingContext routingContext) throws ValidationException {<NEW_LINE>// Validation process validate only params that are registered in the validation -> extra params are allowed<NEW_LINE>Map<String, RequestParameter> parsedParams = new HashMap<>();<NEW_LINE>Mul... | parsedParam.getName(), parsedParam); |
938,732 | private Map<String, Object> toD3Format(Iterator<Map<String, Object>> result) {<NEW_LINE>List<Map<String, Object>> nodes = new ArrayList<>();<NEW_LINE>List<Map<String, Object>> rels = new ArrayList<>();<NEW_LINE>int i = 0;<NEW_LINE>while (result.hasNext()) {<NEW_LINE>Map<String, Object> row = result.next();<NEW_LINE>nod... | "nodes", nodes, "links", rels); |
376,674 | public final void handleRequest(RESTRequest request, RESTResponse response) throws IOException {<NEW_LINE>if (!"GET".equals(request.getMethod())) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, "Request method was " + request.getMethod() + " but the validation e... | response.setResponseHeader("Accept", "GET"); |
1,706,644 | private void enforceVersioning(DocumentFile dir, int versionsToKeep) {<NEW_LINE>Log.i(TAG, String.format("Scanning directory %s for backup files", Uri.decode(dir.getUri().toString())));<NEW_LINE>List<BackupFile> files = new ArrayList<>();<NEW_LINE>for (DocumentFile docFile : dir.listFiles()) {<NEW_LINE>if (docFile.isFi... | ().getName())); |
42,091 | private void removeDeportedCells() {<NEW_LINE>ArrayList<GridRow> rowToRemove = new ArrayList<>();<NEW_LINE>for (Entry<GridRow, Set<CellView>> entry : gridViewSkin.deportedCells.entrySet()) {<NEW_LINE>ArrayList<CellView> <MASK><NEW_LINE>for (CellView cell : entry.getValue()) {<NEW_LINE>// If we're not editing and the Ta... | toRemove = new ArrayList<>(); |
831,473 | private static Bitmap blur(Bitmap bitmap, Context context, float blurRadius) {<NEW_LINE>Point previewSize = scaleKeepingAspectRatio(new Point(bitmap.getWidth(), bitmap<MASK><NEW_LINE>Point blurSize = scaleKeepingAspectRatio(new Point(previewSize.x / 2, previewSize.y / 2), MAX_BLUR_DIMENSION);<NEW_LINE>Bitmap small = Bi... | .getHeight()), PREVIEW_DIMENSION_LIMIT); |
1,038,880 | protected void fillTable(Listbox cb) {<NEW_LINE>ValueNamePair select = null;<NEW_LINE>String sql = "SELECT AD_Table_ID, TableName FROM AD_Table t " + "WHERE EXISTS (SELECT * FROM AD_Column c" + " WHERE t.AD_Table_ID=c.AD_Table_ID AND c.ColumnName='Posted')" + " AND IsView='N'";<NEW_LINE>try {<NEW_LINE>PreparedStatement... | tableName, new Integer(id)); |
1,837,622 | private // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>enlargeLabel = new javax.swing.JLabel();<NEW_LINE>enlargeText = new javax.swing.JTextField();<NEW_LINE>decreasingLabel = ... | 5, 11, 11, 11); |
1,535,323 | private void migrateAlarmsToMetadata() {<NEW_LINE>Context context = ContextManager.getContext();<NEW_LINE>if (!checkIfDatabaseExists(context, AlarmDatabase.NAME))<NEW_LINE>return;<NEW_LINE>AlarmDatabase alarmsDatabase = new AlarmDatabase();<NEW_LINE>DatabaseDao<TransitionalAlarm> dao = new DatabaseDao<TransitionalAlarm... | AlarmFields.TYPE, AlarmFields.TYPE_SINGLE); |
411,592 | private static Row toRow(FilterDifference difference, SpecifierContext currentContext, SpecifierContext referenceContext) {<NEW_LINE>Row.TypedRowBuilder ret = Row.builder(metadata().toColumnMap());<NEW_LINE>String hostname = difference.getHostname();<NEW_LINE><MASK><NEW_LINE>ret.put(COL_NODE, new Node(hostname)).put(CO... | String filtername = difference.getFilterName(); |
695,669 | public <Q> boolean visit(EditorContext<Q> ctx) {<NEW_LINE>Q toSet = ctx.getFromModel();<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>AbstractEditorDelegate<Q, ?> delegate = (AbstractEditorDelegate<Q, ?>) ctx.getEditorDelegate();<NEW_LINE>if (delegate != null) {<NEW_LINE>delegate.setObject<MASK><NEW_LINE>delegate.se... | (delegate.ensureMutable(toSet)); |
663,659 | public void onCreate(Bundle icicle) {<NEW_LINE>Logger.D(TAG, "onCreate+");<NEW_LINE>super.onCreate(icicle);<NEW_LINE>requestWindowFeature(Window.FEATURE_NO_TITLE);<NEW_LINE>setContentView(RhoExtManager.getResourceId("layout", "signature"));<NEW_LINE>Bundle extras <MASK><NEW_LINE>imageFormat = extras.getString(com.rho.s... | = getIntent().getExtras(); |
956,259 | public boolean internalInvertedFilterRow(Project project, int rowIndex, Row row) {<NEW_LINE>Cell cell = _cellIndex < 0 ? null : row.getCell(_cellIndex);<NEW_LINE>Properties bindings = ExpressionUtils.createBindings(project);<NEW_LINE>ExpressionUtils.bind(bindings, row, rowIndex, _columnName, cell);<NEW_LINE>Object <MAS... | value = _evaluable.evaluate(bindings); |
1,530,754 | private CToolchain.Builder createBaseArmeabiToolchain(boolean thumb, CppConfiguration.Tool... excludedTools) {<NEW_LINE>String toolchainName = "arm-linux-androideabi-4.9";<NEW_LINE>String targetPlatform = "arm-linux-androideabi";<NEW_LINE>CToolchain.Builder toolchain = // Compiler flags<NEW_LINE>CToolchain.newBuilder()... | "-fno-omit-frame-pointer").addCompilerFlag("-fno-strict-aliasing")); |
1,145,395 | public void playTuneinStation(Command command) {<NEW_LINE>if (command instanceof StringType) {<NEW_LINE>String stationId = command.toString();<NEW_LINE>List<MASK><NEW_LINE>SonosMusicService tuneinService = null;<NEW_LINE>// search for the TuneIn music service based on its name<NEW_LINE>if (allServices != null) {<NEW_LI... | <SonosMusicService> allServices = getAvailableMusicServices(); |
1,162,372 | static IllegalStateException ensureVersionCompatibility(Version remoteVersion, Version currentVersion, boolean isHandshake) {<NEW_LINE>// for handshakes we are compatible with N-2 since otherwise we can't figure out our initial version<NEW_LINE>// since we are compatible with N-1 and N+1 so we always send our minCompat... | isHandshake ? "handshake " : "") + "message from unsupported version: ["; |
877,773 | public static FileMeta createMetaIfNeed(String path, final boolean isSearhcBook) {<NEW_LINE>FileMeta fileMeta = AppDB.get().getOrCreate(path);<NEW_LINE>LOG.d("BooksService-createMetaIfNeed", path, fileMeta.getState());<NEW_LINE>try {<NEW_LINE>if (FileMetaCore.STATE_FULL != fileMeta.getState()) {<NEW_LINE>EbookMeta eboo... | path, CacheDir.ZipApp, true); |
995,026 | private List<Comparator> loadDefaultComparators() {<NEW_LINE>String PKG = "no.priv.garshol.duke.comparators.";<NEW_LINE>String[] compnames = new String[] { "DiceCoefficientComparator", "DifferentComparator", "ExactComparator", "JaroWinkler", "JaroWinklerTokenized", "Levenshtein", "NumericComparator", "PersonNameCompara... | = new ArrayList<Comparator>(); |
202,171 | public MultiCurrencyAmount currencyExposure(ResolvedFxNdf ndf, RatesProvider provider) {<NEW_LINE>if (provider.getValuationDate().isAfter(ndf.getPaymentDate())) {<NEW_LINE>return MultiCurrencyAmount.empty();<NEW_LINE>}<NEW_LINE>Currency ccySettle = ndf.getSettlementCurrency();<NEW_LINE>CurrencyAmount notionalSettle = n... | ).fxRate(ccySettle, ccyOther); |
1,769,867 | public void render(TileTank tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {<NEW_LINE>FluidStackInterp forRender = tile.getFluidForRender(partialTicks);<NEW_LINE>if (forRender == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Minecraft.getMinecraft().mcProfiler.startSection("bc");<... | ).bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); |
1,611,771 | protected void calcAsync() {<NEW_LINE>ExUtil.asyncRun(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>Map<Integer, ServiceSummary> summaryMap = new HashMap<Integer, ServiceSummary>();<NEW_LINE>Map<Integer, List<Integer>> loadTextMap = new HashMap<Integer<MASK><NEW_LINE>LongEnumer longEnumer = dataMap.k... | , List<Integer>>(); |
1,330,766 | public static Object fieldValueObject(HollowObjectTypeDataAccess typeAccess, int ordinal, int fieldPosition) {<NEW_LINE>HollowObjectSchema schema = typeAccess.getSchema();<NEW_LINE>switch(schema.getFieldType(fieldPosition)) {<NEW_LINE>case BOOLEAN:<NEW_LINE>return typeAccess.readBoolean(ordinal, fieldPosition);<NEW_LIN... | typeAccess.readString(ordinal, fieldPosition); |
1,372,901 | public List<Entity> search(String entityType, String searchStr, boolean searchAll, boolean returnSubType) throws Exception {<NEW_LINE>if (doc == null)<NEW_LINE>load();<NEW_LINE><MASK><NEW_LINE>xpath.setNamespaceContext(new WIMNamespaceContext());<NEW_LINE>if (returnSubType) {<NEW_LINE>// append entity types<NEW_LINE>}<... | XPath xpath = xPathFactory.newXPath(); |
541,435 | private ValidationTaskResult validatePrincipalLogin() {<NEW_LINE>String principal = mConf.getOrDefault(mPrincipalProperty, "");<NEW_LINE>String keytab = mConf.getOrDefault(mKeytabProperty, "");<NEW_LINE>if (principal.isEmpty() || keytab.isEmpty()) {<NEW_LINE>mMsg.append(String.format("Failed to find Kerberos principal ... | ("Kerberos login failed for %s with keytab %s.%n", principal, keytab)); |
606,979 | public Optional<ResponseInfoBean> readUserResponseInfo(final SessionLabel sessionLabel, final UserIdentity userIdentity, final ChaiUser theUser) throws ChaiUnavailableException, PwmUnrecoverableException {<NEW_LINE>final DomainConfig config = pwmDomain.getConfig();<NEW_LINE>LOGGER.trace(sessionLabel, () -> "beginning r... | , () -> "attempting read of response info via storage method: " + storageMethod); |
37,225 | private void toggleImageBackground() {<NEW_LINE>if (getFile() != null && (MIME_TYPE_PNG.equalsIgnoreCase(getFile().getMimeType()) || MIME_TYPE_SVG.equalsIgnoreCase(getFile().getMimeType())) && getActivity() != null && getActivity() instanceof PreviewImageActivity) {<NEW_LINE>PreviewImageActivity previewImageActivity = ... | R.drawable.backrepeat, null); |
433,514 | public V remove(long key) {<NEW_LINE>if (key == 0) {<NEW_LINE>if (!hasZeroValue)<NEW_LINE>return null;<NEW_LINE>hasZeroValue = false;<NEW_LINE>V oldValue = zeroValue;<NEW_LINE>zeroValue = null;<NEW_LINE>size--;<NEW_LINE>return oldValue;<NEW_LINE>}<NEW_LINE>int i = locateKey(key);<NEW_LINE>if (i < 0)<NEW_LINE>return nul... | [i] = valueTable[next]; |
401,337 | public void merge(ProspectiveOperation op) {<NEW_LINE>if (this.opType == OperationType.FILTER) {<NEW_LINE>this.opType = op.opType;<NEW_LINE>IfTree ifTree = this.treeMaker.If(((IfTree) this.correspondingTree).getCondition(), (StatementTree) op.correspondingTree, null);<NEW_LINE>this.correspondingTree = ifTree;<NEW_LINE>... | .correspondingTree).getStatements()); |
683,678 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>Log_result result = new Log_result();<NEW_LINE>if (e instanceof org.apache.thrift.transport.TTransportException) {<NEW_LINE><MASK><NEW_LINE>fb.close(... | _LOGGER.error("TTransportException inside handler", e); |
1,459,371 | public ActionResult useOnEntity(ItemStack itemstack, PlayerEntity entityhuman, LivingEntity entityliving, Hand enumhand) {<NEW_LINE>if (!(entityliving instanceof SheepEntity))<NEW_LINE>return ActionResult.PASS;<NEW_LINE>SheepEntity entitysheep = (SheepEntity) entityliving;<NEW_LINE>if (entitysheep.isAlive() && !entitys... | success(entityhuman.world.isClient); |
514,030 | public char[] shortReadableName(boolean showGenerics) {<NEW_LINE>StringBuilder nameBuffer = new StringBuilder(10);<NEW_LINE>if (isMemberType()) {<NEW_LINE>nameBuffer.append(CharOperation.concat(enclosingType().shortReadableName(showGenerics && !isStatic())<MASK><NEW_LINE>} else {<NEW_LINE>nameBuffer.append(this.type.so... | , this.sourceName, '.')); |
1,733,518 | public void updateMusicFolder(MusicFolder musicFolder) {<NEW_LINE>Triple<List<MusicFolder>, List<MusicFolder>, List<MusicFolder>> overlaps = getMusicFolderPathOverlaps(musicFolder, getAllMusicFolders(true, true, true).stream().filter(f -> !f.getId().equals(musicFolder.getId())).collect(toList()));<NEW_LINE>MusicFolder ... | findAny().orElse(null); |
45,791 | public void newRevision(BimServerClientInterface bimServerClientInterface, long poid, long roid, String userToken, long soid, SObjectType settings) throws ServerException, UserException {<NEW_LINE>try {<NEW_LINE>Long topicId = bimServerClientInterface.getRegistry().registerProgressOnRevisionTopic(SProgressTopicType.RUN... | setStart(runningService.getStartDate()); |
1,426,196 | public ResultStream doGet(final SortOrder sortOrder, int pageSize, int page) throws FrameworkException {<NEW_LINE>final List<GraphObjectMap> resultList = new LinkedList<>();<NEW_LINE>final GraphObjectMap info = new GraphObjectMap();<NEW_LINE>info.setProperty(new GenericProperty("modules"), VersionHelper.getModules());<... | getClass().getSimpleName()); |
790,163 | public CompletableFuture<?> start() {<NEW_LINE>LOG.info("Starting JSON-RPC service on {}:{}", config.getHost(), config.getPort());<NEW_LINE>LOG.debug("max number of active connections {}", maxActiveConnections);<NEW_LINE>this.tracer = GlobalOpenTelemetry.getTracer("org.hyperledger.besu.jsonrpc", "1.0.0");<NEW_LINE>fina... | vertx.createHttpServer(getHttpServerOptions()); |
304,859 | private void executeButtonActionPerformed(ActionEvent evt) {<NEW_LINE>// run the query, and show the results.<NEW_LINE>try {<NEW_LINE>if (connection == null) {<NEW_LINE>JOptionPane.showMessageDialog(this, getResourceConverter().getString("queryPanel.noConnection.alert", "No Mondrian connection. Select a Schema to conne... | getBuffer().toString()); |
65,650 | final AttachPolicyResult executeAttachPolicy(AttachPolicyRequest attachPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(attachPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,789,633 | public static EPCompiled read(File file) throws IOException {<NEW_LINE>JarFile jarFile = new JarFile(file);<NEW_LINE>Attributes attributes = jarFile.getManifest().getMainAttributes();<NEW_LINE>String compilerVersion = getAttribute(attributes, MANIFEST_COMPILER_VERSION);<NEW_LINE>if (compilerVersion == null) {<NEW_LINE>... | throw new IOException("Manifest is missing " + MANIFEST_COMPILER_VERSION); |
872,610 | public static void toJSON(OutputWriter jsonWriter, Stage stage) {<NEW_LINE>jsonWriter.add("name", stage.getName());<NEW_LINE>jsonWriter.add("counter", stage.getCounter());<NEW_LINE>jsonWriter.add("approval_type", stage.getApprovalType());<NEW_LINE>jsonWriter.add("approved_by", stage.getApprovedBy());<NEW_LINE>jsonWrite... | getCreatedTime().getTime()); |
1,143,637 | public void handle(ActionEvent event) {<NEW_LINE>Alert alert = new Alert(Alert.AlertType.INFORMATION);<NEW_LINE>Text text1 = new Text("Channel maps are used by trunking systems to define the transmit frequency " + "used for each channel number. A channel map is required so that the frequency for each call " + "channel... | -> alert.setResizable(false)); |
1,166,810 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
979,932 | public static DescribeMonitorGroupInstanceAttributeResponse unmarshall(DescribeMonitorGroupInstanceAttributeResponse describeMonitorGroupInstanceAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeMonitorGroupInstanceAttributeResponse.setRequestId(_ctx.stringValue("DescribeMonitorGroupInstanceAttributeRespo... | + "].Tags[" + j + "].Key")); |
1,791,748 | private void detectStaticFactory(ClassDescriptor desc, List<Method> allMethods) {<NEW_LINE>for (Method method : allMethods) {<NEW_LINE>if (!Modifier.isStatic(method.getModifiers())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>JsonCreator jsonCreator = getJsonCreator(method.getAnnotations());<NEW_LINE>if (jsonCreator == nu... | String[] { binding.name }; |
818,566 | public static void main(String[] args) throws InterruptedException {<NEW_LINE>// Create Siddhi Manager<NEW_LINE>SiddhiManager siddhiManager = new SiddhiManager();<NEW_LINE>// Siddhi Application<NEW_LINE>String siddhiApp = "" + "define stream StockEventStream (symbol string, price float, volume long); " + " " + "@info(n... | { "IBM", 200f, 400L }); |
949,511 | private void printModuleInstantiation(HDLNodeBuildIn node, int num, File root) throws IOException, HDLException {<NEW_LINE>String entityName = node.getHdlEntityName();<NEW_LINE>final String label = node.getElementAttributes().getLabel();<NEW_LINE>if (label != null && label.length() > 0)<NEW_LINE>out.print("// ").printl... | = new Separator(out, ",\n"); |
961,470 | /* (non-Javadoc)<NEW_LINE>* @see TableRowCore#refresh(boolean, boolean)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public List<TableCellCore> refresh(boolean bDoGraphics, boolean bVisible) {<NEW_LINE>// If this were called from a plugin, we'd have to refresh the sorted column<NEW_LINE>// even if we weren't visible<NEW_LIN... | refresh(bDoGraphics, bVisible, cellVisible); |
1,134,856 | private List<GHResponse> enrichDirectRoutesTime(List<GHResponse> routes) {<NEW_LINE>List<GHResponse> graphhopperRoutes = new ArrayList<>();<NEW_LINE>List<GHResponse> directRoutes = new ArrayList<>();<NEW_LINE>long graphHopperTravelTime = 0;<NEW_LINE>double graphHopperTravelDistance = 0;<NEW_LINE>double averageTravelTim... | .getBest().getTime(); |
914,122 | final PutPermissionResult executePutPermission(PutPermissionRequest putPermissionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putPermissionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,014,360 | public Object execute(CommandLine commandLine) throws Exception {<NEW_LINE>String file = commandLine.getValue(Options.FILE_OPTION);<NEW_LINE>String projectName = commandLine.getValue(Options.PROJECT_OPTION);<NEW_LINE>// only refresh the file.<NEW_LINE>if (!commandLine.hasOption(Options.VALIDATE_OPTION)) {<NEW_LINE>// g... | , problem.isWarning())); |
759,786 | public static void init(BiConsumer<Block, RenderType> consumer) {<NEW_LINE>consumer.accept(ModBlocks.defaultAltar, RenderType.cutout());<NEW_LINE>consumer.accept(ModBlocks.forestAltar, RenderType.cutout());<NEW_LINE>consumer.accept(ModBlocks.<MASK><NEW_LINE>consumer.accept(ModBlocks.mountainAltar, RenderType.cutout());... | plainsAltar, RenderType.cutout()); |
677,300 | public boolean moveToDefaultDirectory() throws IOException {<NEW_LINE>Optional<Path> targetDirectory = databaseContext.getFirstExistingFileDir(filePreferences);<NEW_LINE>if (targetDirectory.isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Optional<Path> oldFile = <MASK><NEW_LINE>if (oldFile.isEmpty()) {<NEW_LINE... | fileEntry.findIn(databaseContext, filePreferences); |
884,686 | final public int removeAll(final byte[] key) {<NEW_LINE>if (!isOverflowDirectory())<NEW_LINE>throw new UnsupportedOperationException("Only valid if page is an overflow directory");<NEW_LINE>if (isReadOnly()) {<NEW_LINE>DirectoryPage copy = (<MASK><NEW_LINE>return copy.removeAll(key);<NEW_LINE>}<NEW_LINE>// call removeA... | DirectoryPage) copyOnWrite(getIdentity()); |
863,668 | private Object sortList(Object valueList, TSDataType dataType, Integer[] index) {<NEW_LINE>switch(dataType) {<NEW_LINE>case BOOLEAN:<NEW_LINE>boolean[] boolValues = (boolean[]) valueList;<NEW_LINE>boolean[] sortedValues = new boolean[boolValues.length];<NEW_LINE>for (int i = 0; i < index.length; i++) {<NEW_LINE>sortedV... | throw new UnSupportedDataTypeException(MSG_UNSUPPORTED_DATA_TYPE + dataType); |
294,226 | public void draw(Graphics g, int trackPosition) {<NEW_LINE>// only draw spinners shortly before start time<NEW_LINE>int timeDiff = hitObject.getTime() - trackPosition;<NEW_LINE>final <MASK><NEW_LINE>if (timeDiff - fadeInTime > 0)<NEW_LINE>return;<NEW_LINE>boolean spinnerComplete = (rotations >= rotationsNeeded);<NEW_LI... | int fadeInTime = game.getFadeInTime(); |
1,368,663 | // @GuardedBy("AWT")<NEW_LINE>private void ensureNodesFilled() {<NEW_LINE>if (currentSubsequentNodes.size() < DESIRED_PREPARED_NODES_COUNT) {<NEW_LINE>final long currentRequest = stateId;<NEW_LINE>final Node from;<NEW_LINE>if (currentSubsequentNodes.isEmpty()) {<NEW_LINE>Node[] selected = this.comp.getExplorerManager()... | .getExplorerManager().getRootContext(); |
214,397 | public List<String> suggestForWord(String word, String leftContext, String rightContext, NgramLanguageModel lm) {<NEW_LINE>List<String> unRanked = getUnrankedSuggestions(word);<NEW_LINE>if (lm == null) {<NEW_LINE>Log.warn("No language model provided. Returning unraked results.");<NEW_LINE>return unRanked;<NEW_LINE>}<NE... | LmVocabulary vocabulary = lm.getVocabulary(); |
1,084,766 | public void importKey() {<NEW_LINE>KeyAsyncClient keyAsyncClient = createAsyncClient();<NEW_LINE>JsonWebKey jsonWebKeyToImport = new JsonWebKey();<NEW_LINE>// BEGIN: com.azure.security.keyvault.keys.KeyAsyncClient.importKey#String-JsonWebKey<NEW_LINE>keyAsyncClient.importKey("keyName", jsonWebKeyToImport).subscribe(key... | , keyVaultKey.getId())); |
1,378,613 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>inflater = UiUtilities.getInflater(app, nightMode);<NEW_LINE>View root = inflater.inflate(R.layout.fragment_import_duplicates, container, false);<NEW_LINE>Toolbar toolbar = root.find... | getActiveButtonsAndLinksTextColor(app, nightMode))); |
499,297 | private <T> Stream<Class<T>> prepareClass(Stream<String> types, Object key, @SuppressWarnings("unused") Class<T> witness) {<NEW_LINE>List<Class<?>> l = typesCache.get(key);<NEW_LINE>if (l != null) {<NEW_LINE>return l.stream().map(x -> (Class<T>) x);<NEW_LINE>}<NEW_LINE>List<Class<T>> list = new ArrayList<>();<NEW_LINE>... | > iterator = types.iterator(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.