idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
508,045
public Decision canForceAllocatePrimary(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) {<NEW_LINE>assert shardRouting.primary() : "must not call canForceAllocatePrimary on a non-primary shard routing " + shardRouting;<NEW_LINE>if (allocation.shouldIgnoreShardForNode(shardRouting.shardId(), n...
canForceAllocatePrimary(shardRouting, node, allocation);
368,176
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c1,c2".split(",");<NEW_LINE>String epl = "@name('s0') select " + "count(intBoxed, boolPrimitive) as c1," + "count(distinct intBoxed, boolPrimitive) as c2 " + "from SupportBean#length(3)";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE...
[] { 1L, 1L });
755,188
public Query rewrite(IndexReader reader) throws IOException {<NEW_LINE>ScoreTermQueue q = new ScoreTermQueue(MAX_NUM_TERMS);<NEW_LINE>// load up the list of possible terms<NEW_LINE>for (FieldVals f : fieldVals) {<NEW_LINE>addTerms(reader, f, q);<NEW_LINE>}<NEW_LINE>BooleanQuery.Builder bq = new BooleanQuery.Builder();<...
), BooleanClause.Occur.SHOULD);
731,868
final DescribeReplaceRootVolumeTasksResult executeDescribeReplaceRootVolumeTasks(DescribeReplaceRootVolumeTasksRequest describeReplaceRootVolumeTasksRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReplaceRootVolumeTasksRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu...
addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeReplaceRootVolumeTasks");
661,903
public GetEvidenceResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetEvidenceResult getEvidenceResult = new GetEvidenceResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token...
int originalDepth = context.getCurrentDepth();
1,265,100
public ListPricingRulesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListPricingRulesResult listPricingRulesResult = new ListPricingRulesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i...
)).unmarshall(context));
588,124
public void validate(Insert insert) {<NEW_LINE>for (ValidationCapability c : getCapabilities()) {<NEW_LINE><MASK><NEW_LINE>validateOptionalFeature(c, insert.getItemsList(), Feature.insertValues);<NEW_LINE>validateOptionalFeature(c, insert.getModifierPriority(), Feature.insertModifierPriority);<NEW_LINE>validateFeature(...
validateFeature(c, Feature.insert);
452,922
private File createLogFile() {<NEW_LINE>File newLogFile = null;<NEW_LINE>String appName = Application.getInstance().getString(R.string.application_title_full).replaceAll("\\s+", "");<NEW_LINE>try {<NEW_LINE>File sdCard = Application.getInstance().getApplicationContext().getExternalFilesDir(null);<NEW_LINE>if (sdCard ==...
sdCard.getAbsolutePath() + "/logs");
1,010,828
public static Consumer<OutputWriter> toJSON(MaterialConfig materialConfig) {<NEW_LINE>return materialWriter -> {<NEW_LINE>if (!materialConfig.errors().isEmpty()) {<NEW_LINE>materialWriter.addChild("errors", errorWriter -> {<NEW_LINE>HashMap<String, String> <MASK><NEW_LINE>errorMapping.put("materialName", "name");<NEW_L...
errorMapping = new HashMap<>();
323,691
public OBaseIndexEngine createIndexEngine(int indexId, String algorithm, String name, Boolean durableInNonTxMode, OStorage storage, int version, int apiVersion, @SuppressWarnings("SpellCheckingInspection") boolean multiValue, Map<String, String> engineProperties) {<NEW_LINE>if (algorithm == null) {<NEW_LINE>throw new O...
= new ORemoteIndexEngine(indexId, name);
1,711,667
private Iterable<String> queryStringIndex(final String key, final String prefix) throws DatastoreException {<NEW_LINE>List<ResultSetFuture> futures = queryClusters((cluster) -> {<NEW_LINE>BoundStatement boundStatement = new BoundStatement(cluster.psStringIndexPrefixQuery);<NEW_LINE>boundStatement.setBytesUnsafe(0, seri...
(2, serializeEndString(prefix));
239,700
public DenseMatrix gradient(DenseMatrix coef, int iter) {<NEW_LINE>if (coef.numRows() != p + q && coef.numRows() != p + q + 1) {<NEW_LINE>throw new RuntimeException("Error!coef is not comparable with the model");<NEW_LINE>}<NEW_LINE>double[] arCoef = new double[p];<NEW_LINE>double[] maCoef = new double[q];<NEW_LINE>dou...
get(p + q, 0);
1,125,134
final UpdateLFTagResult executeUpdateLFTag(UpdateLFTagRequest updateLFTagRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateLFTagRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateLFTagRequest> request = null;<NEW_LINE>Respo...
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
869,064
final UpdateDomainNameResult executeUpdateDomainName(UpdateDomainNameRequest updateDomainNameRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDomainNameRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,243,163
private void genCode() {<NEW_LINE>JbootApplication.setBootArg("jboot.datasource.url", dbUrl);<NEW_LINE>JbootApplication.setBootArg("jboot.datasource.user", dbUser);<NEW_LINE>JbootApplication.setBootArg("jboot.datasource.password", dbPassword);<NEW_LINE>String baseModelPackage = modelPackage + ".base";<NEW_LINE>String m...
(copyTableMetasByNames(tableMetas, sortOptionsTableNames));
379,086
private void showLine12(int line, int diffLength) {<NEW_LINE>assert SwingUtilities.isEventDispatchThread();<NEW_LINE>// System.out.println("showLine("+line+", "+diffLength+")");<NEW_LINE>this.linesComp1.setActiveLine(line);<NEW_LINE>this.linesComp2.setActiveLine(line);<NEW_LINE>linesComp1.repaint();<NEW_LINE>linesComp2...
jEditorPane1.getDocument(), line);
912,429
public void sync(MediaItemMetadata metadata, boolean useAltInfo) {<NEW_LINE>if (metadata == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (newTitle != null) {<NEW_LINE>title = newTitle;<NEW_LINE>}<NEW_LINE>String newInfo = null;<NEW_LINE>// Don't sync future translation because of not precise info<NEW...
String newTitle = metadata.getTitle();
679,364
public void marshall(ReputationOptions _reputationOptions, Request<?> request, String _prefix) {<NEW_LINE>String prefix;<NEW_LINE>if (_reputationOptions.getSendingEnabled() != null) {<NEW_LINE>prefix = _prefix + "SendingEnabled";<NEW_LINE>Boolean sendingEnabled = _reputationOptions.getSendingEnabled();<NEW_LINE>request...
, StringUtils.fromBoolean(reputationMetricsEnabled));
1,523,919
final DisassociateConnectionFromLagResult executeDisassociateConnectionFromLag(DisassociateConnectionFromLagRequest disassociateConnectionFromLagRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateConnectionFromLagRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC...
endClientExecution(awsRequestMetrics, request, response);
1,542,377
public static void main(String[] args) {<NEW_LINE>String d = "{\"ip\":\"50.112.119.64\",\"count\":27}$$${\\\"ip\\\":\\\"50.112.119.64\\\",\\\"count\\\":27}";<NEW_LINE>String e1 = "{\"ip\":\"11.112.119.64\",\"count\":27}";<NEW_LINE>String e2 = "{\"ip\":\"22.111.112.62\",\"count\":27}";<NEW_LINE>String e3 = "{\"ip\":\"33...
encodedString = CompressionUtils.compressAndBase64Encode(events);
1,686,784
private IRubyObject inspect(ThreadContext context, boolean recurse) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>ByteList bytes = new ByteList();<NEW_LINE>bytes.append((byte) '#').append((byte) '<');<NEW_LINE>bytes.append(getMetaClass().getName().getBytes());<NEW_LINE>bytes.append((byte) ':')<MASK><NEW_LINE>if (...
.append((byte) ' ');
1,303,347
public FlinkKafkaConsumerBase<Row> createKafkaTableSource(KafkaSourceTableInfo kafkaSourceTableInfo, TypeInformation<Row> typeInformation, Properties props) {<NEW_LINE>KafkaConsumer kafkaSrc;<NEW_LINE>if (kafkaSourceTableInfo.getTopicIsPattern()) {<NEW_LINE>DeserializationMetricWrapper deserMetricWrapper = createDeseri...
(tp, IsolationLevel.READ_UNCOMMITTED));
443,673
protected void matchReportReference(ASTNode reference, IJavaElement element, IJavaElement localElement, IJavaElement[] otherElements, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException {<NEW_LINE>if (this.isDeclarationOfReferencedTypesPattern) {<NEW_LINE>if ((element = findElement(element,...
element, elementBinding, accuracy, locator);
1,128,819
final GetContactMethodsResult executeGetContactMethods(GetContactMethodsRequest getContactMethodsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getContactMethodsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st...
endClientExecution(awsRequestMetrics, request, response);
430,903
private ArrayList<LayoutElementParcelable> listMediaCommon(Uri contentUri, @NonNull String[] projection, @Nullable String selection) {<NEW_LINE>final Context context = this.context.get();<NEW_LINE>if (context == null) {<NEW_LINE>cancel(true);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Cursor cursor = context.getContentR...
new File(path), showHiddenFiles);
1,303,809
public void execute(EventNotificationContext ctx) throws TemporaryEventNotificationException, PermanentEventNotificationException {<NEW_LINE>final HTTPEventNotificationConfig config = <MASK><NEW_LINE>final HttpUrl httpUrl = HttpUrl.parse(config.url());<NEW_LINE>if (httpUrl == null) {<NEW_LINE>throw new TemporaryEventNo...
(HTTPEventNotificationConfig) ctx.notificationConfig();
1,336,086
private void create(ItemCheckoutStatus[] checkouts) {<NEW_LINE>tableModel = new CheckoutsTableModel(checkouts);<NEW_LINE>// set up table sorter stuff<NEW_LINE>TableSortStateEditor tsse = new TableSortStateEditor();<NEW_LINE>tsse.addSortedColumn(CheckoutsTableModel.DATE_COL, SortDirection.DESCENDING);<NEW_LINE>tableMode...
.PROJECT_LOC_COL).setPreferredWidth(180);
1,244,192
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>// TODO Auto-generated method stub<NEW_LINE>PrintWriter writer = response.getWriter();<NEW_LINE>Enumeration<?> enu = request.getParameterNames();<NEW_LINE>while (enu.hasMoreElements()) {<NEW_LI...
+ request.getParameter(paraName));
1,540,484
public ExtensionJson toExtensionJson() {<NEW_LINE>var json = new ExtensionJson();<NEW_LINE>var extension = this.getExtension();<NEW_LINE>json.namespace = extension.getNamespace().getName();<NEW_LINE>json.name = extension.getName();<NEW_LINE>json.averageRating = extension.getAverageRating();<NEW_LINE>json.downloadCount ...
.qna = this.getQna();
832,925
private IndexDefinition descriptorToDefinition(final TokenRead tokenRead, IndexDescriptor index) {<NEW_LINE>try {<NEW_LINE>SchemaDescriptor schema = index.schema();<NEW_LINE>int[] entityTokenIds = schema.getEntityTokenIds();<NEW_LINE>boolean constraintIndex = index.isUnique();<NEW_LINE>String[] propertyNames = Property...
schema.entityType() + " entity-typed schema.");
15,185
public SymbolReference<? extends ResolvedValueDeclaration> solveSymbolInParentContext(String name) {<NEW_LINE>Optional<MASK><NEW_LINE>if (!optionalParentContext.isPresent()) {<NEW_LINE>return SymbolReference.unsolved(ResolvedValueDeclaration.class);<NEW_LINE>}<NEW_LINE>// First check if there are any pattern expression...
<Context> optionalParentContext = getParent();
413,632
public void testCaptureDebuggerWatchesPlugin() throws Throwable {<NEW_LINE>TraceThread thread;<NEW_LINE>long snap0, snap1;<NEW_LINE>try (UndoableTransaction tid = tb.startTransaction()) {<NEW_LINE>snap0 = tb.trace.getTimeManager().<MASK><NEW_LINE>snap1 = tb.trace.getTimeManager().createSnapshot("Second").getKey();<NEW_...
createSnapshot("First").getKey();
499,607
public InputStream openClassFile(String className) throws IOException {<NEW_LINE>// TODO(stu): handle primitives & not stdlib<NEW_LINE>if (className.contains(".")) {<NEW_LINE>int dollarPosition = className.indexOf("$");<NEW_LINE>if (dollarPosition >= 0) {<NEW_LINE>className = className.substring(0, dollarPosition);<NEW...
packages = className.split("\\.");
1,157,234
public ArrayList<MegaOffline> findByPath(String path) {<NEW_LINE>ArrayList<MegaOffline> listOffline = new ArrayList<MegaOffline>();<NEW_LINE>// Get the foreign key of the node<NEW_LINE>String selectQuery = "SELECT * FROM " + TABLE_OFFLINE + " WHERE " + KEY_OFF_PATH + " = '" + encrypt(path) + "'";<NEW_LINE>try (Cursor c...
(cursor.getString(2));
205,103
// visible for testing<NEW_LINE>protected void start(Map<String, String> props, ElasticsearchClient client) {<NEW_LINE>log.info("Starting ElasticsearchSinkTask.");<NEW_LINE>this.config = new ElasticsearchSinkConnectorConfig(props);<NEW_LINE>this.converter = new DataConverter(config);<NEW_LINE>this.existingMappings = ne...
indexCache = new HashSet<>();
808,397
public Answer execute(final RebootCommand command, final CitrixResourceBase citrixResourceBase) {<NEW_LINE>final Connection conn = citrixResourceBase.getConnection();<NEW_LINE>s_logger.debug("7. The VM " + command.getVmName() + " is in Starting state");<NEW_LINE>try {<NEW_LINE>Set<VM> vms = null;<NEW_LINE>try {<NEW_LIN...
conn, command.getVmName());
233,750
private SampleQueue createSampleQueue(int id, int type) {<NEW_LINE>int trackCount = sampleQueues.length;<NEW_LINE>boolean isAudioVideo = type == C.TRACK_TYPE_AUDIO || type == C.TRACK_TYPE_VIDEO;<NEW_LINE>HlsSampleQueue sampleQueue = new HlsSampleQueue(allocator, drmSessionManager, drmEventDispatcher, overridingDrmInitD...
copyOf(sampleQueuesEnabledStates, trackCount + 1);
356,599
private void processUnderFile(VirtualFile file) {<NEW_LINE>final MultiMap<VirtualFile, FileAnnotation> <MASK><NEW_LINE>synchronized (myLock) {<NEW_LINE>for (VirtualFile virtualFile : myFileAnnotationMap.keySet()) {<NEW_LINE>if (VfsUtilCore.isAncestor(file, virtualFile, true)) {<NEW_LINE>final Collection<FileAnnotation>...
annotations = new MultiMap<>();
341,981
private void init(long transferBlockSize) {<NEW_LINE>List<TorrentFile> files = torrent.getFiles();<NEW_LINE><MASK><NEW_LINE>long chunkSize = torrent.getChunkSize();<NEW_LINE>transferBlockSize = Math.min(transferBlockSize, chunkSize);<NEW_LINE>int chunksTotal = PieceUtils.calculateNumberOfChunks(totalSize, chunkSize);<N...
long totalSize = torrent.getSize();
1,549,734
private static void initializeFTS(SQLiteDatabase db) {<NEW_LINE>db.execSQL(SQL_CREATE_SEARCH_CONTENT_TABLE);<NEW_LINE>db.execSQL(SQL_CREATE_NGRAM_TABLE);<NEW_LINE>db.execSQL(SQL_CREATE_SEARCH_TASK_DELETE_TRIGGER);<NEW_LINE>db.execSQL(SQL_CREATE_SEARCH_TASK_DELETE_PROPERTY_TRIGGER);<NEW_LINE>// create indices<NEW_LINE>d...
.TASK_ID, FTSContentColumns.NGRAM_ID));
650,311
private Modifier resolveVisibility(TypeElement clazz) {<NEW_LINE>NestingKind nestingKind = clazz.getNestingKind();<NEW_LINE>if (nestingKind == NestingKind.ANONYMOUS || nestingKind == NestingKind.LOCAL) {<NEW_LINE>return Modifier.PRIVATE;<NEW_LINE>}<NEW_LINE>Set<Modifier<MASK><NEW_LINE>if (nestingKind == NestingKind.TOP...
> mods = clazz.getModifiers();
290,203
private void optionLegend() {<NEW_LINE>// Show help<NEW_LINE>Dialog dialog = new Dialog(ActivityApp.this);<NEW_LINE>dialog.requestWindowFeature(Window.FEATURE_LEFT_ICON);<NEW_LINE>dialog.setTitle(R.string.menu_legend);<NEW_LINE>dialog.setContentView(R.layout.legend);<NEW_LINE>dialog.setFeatureDrawableResource(Window.FE...
).setImageBitmap(getOnDemandCheckBox());
367,757
public void process(BeanArchiveIndexBuildItem beanArchiveIndexBuildItem, BuildProducer<ReflectiveClassBuildItem> reflectiveClass, BuildProducer<ServletInitParamBuildItem> initParamProducer, BuildProducer<ResteasyDeploymentCustomizerBuildItem> deploymentCustomizerProducer) {<NEW_LINE>validateControllers(beanArchiveIndex...
new ArrayList<>(classNames));
636,162
private byte[] removeSegmentation(final int mtuSize, final byte[] data) {<NEW_LINE>int srcOffset = 0;<NEW_LINE>int dstOffset = 0;<NEW_LINE>final int chunks = (data.length + (mtuSize - 1)) / mtuSize;<NEW_LINE>if (chunks > 1) {<NEW_LINE>final byte[] buffer = new byte[data.length - (chunks - 1)];<NEW_LINE>int length;<NEW_...
buffer.length - dstOffset, mtuSize);
701,294
private void addDestroyChildNodesCommand(ICompositeCommand cmd) {<NEW_LINE>View view = (View) getHost().getModel();<NEW_LINE>for (Iterator nit = view.getChildren().iterator(); nit.hasNext(); ) {<NEW_LINE>Node node = (Node) nit.next();<NEW_LINE>switch(OpenDDSDcpsLibVisualIDRegistry.getVisualID(node)) {<NEW_LINE>case Rdl...
(Node) cit.next();
925,866
public static void assertPeriodCounts(Timeline timeline, int... expectedPeriodCounts) {<NEW_LINE>int windowCount = timeline.getWindowCount();<NEW_LINE>assertThat(windowCount).isEqualTo(expectedPeriodCounts.length);<NEW_LINE>int[] accumulatedPeriodCounts = new int[windowCount + 1];<NEW_LINE>accumulatedPeriodCounts[0] = ...
[accumulatedPeriodCounts.length - 1]);
1,219,074
private void scanNonCollectableObjectsInternal(long memoryType) throws CorruptDataException {<NEW_LINE>GCHeapRegionIterator regionIterator = GCHeapRegionIterator.from();<NEW_LINE>while (regionIterator.hasNext()) {<NEW_LINE>GCHeapRegionDescriptor region = regionIterator.next();<NEW_LINE>if (new UDATA(region.getTypeFlags...
GCObjectIterator.fromJ9Object(object, true);
672,269
public void handleEvent(Event event) {<NEW_LINE>Rectangle area = lblImage.getBounds();<NEW_LINE>Rectangle carea = c.getBounds();<NEW_LINE>Point ptInDisplay = c.toDisplay(0, 0);<NEW_LINE>event.gc.setAdvanced(true);<NEW_LINE>event.gc.setAntialias(SWT.ON);<NEW_LINE>event.gc.setLineWidth(2);<NEW_LINE>if (new Rectangle(ptIn...
height - 11, 20, 20);
1,826,873
public Tuple2<Params, Iterable<String>> serializeModel(TableSummary summary) {<NEW_LINE>List<String> data = null;<NEW_LINE>if (summary != null) {<NEW_LINE>data = new ArrayList<>();<NEW_LINE>data.add(JsonConverter.toJson(summary.colNames));<NEW_LINE>data.add(String.valueOf(summary.count));<NEW_LINE>data.add(JsonConverte...
.toString(summary.squareSum));
1,763,127
public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent copyToCreature = game.getPermanent(source.getSourceId());<NEW_LINE>if (copyToCreature != null) {<NEW_LINE>Permanent copyFromCreature = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);<NEW_LINE>if (copyFromCreature != null) {<NEW_LINE>gam...
, source, new EmptyCopyApplier());
251,408
private void downloadAll(int downloadNum, boolean onlyNew) {<NEW_LINE>if (bookShelfBeans == null || mView.getContext() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AsyncTask.execute(() -> {<NEW_LINE>for (BookShelfBean bookShelfBean : new ArrayList<>(bookShelfBeans)) {<NEW_LINE>if (!bookShelfBean.getTag().equals(Book...
getBookInfoBean().getCoverUrl());
1,476,372
public Context addContext(String contextPath, String docBase, Host host) throws ServletException {<NEW_LINE>log.debug("Add context - path: {} docbase: {}", contextPath, docBase);<NEW_LINE>// instance a context<NEW_LINE>org.apache.catalina.Context ctx = embedded.<MASK><NEW_LINE>if (ctx != null) {<NEW_LINE>// grab the cu...
addWebapp(host, contextPath, docBase);
1,168,949
public void fire(SessionLocal session, int type, boolean beforeAction) {<NEW_LINE>if (rowBased || before != beforeAction || (typeMask & type) == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>load();<NEW_LINE>Connection c2 = session.createConnection(false);<NEW_LINE>boolean old = false;<NEW_LINE>if (type != Trigger.SELECT) ...
Value identity = session.getLastIdentity();
1,153,907
public void draw(String text) {<NEW_LINE>if (StringUtils.isNotBlank(text)) {<NEW_LINE>text = text.trim();<NEW_LINE>renderer.beginRendering(drawable.getSurfaceWidth(<MASK><NEW_LINE>Rectangle2D bounds = renderer.getBounds(text);<NEW_LINE>int width = (int) bounds.getWidth();<NEW_LINE>int height = (int) bounds.getHeight();...
), drawable.getSurfaceHeight());
1,469,679
public void save(GlowVillager entity, CompoundTag tag) {<NEW_LINE>super.save(entity, tag);<NEW_LINE>if (entity.getProfession() != null) {<NEW_LINE>tag.putInt("Profession", entity.getProfession().ordinal());<NEW_LINE>}<NEW_LINE>tag.putInt("Riches", entity.getRiches());<NEW_LINE>tag.putBool("Willing", entity.isWilling())...
"rewardExp", recipe.hasExperienceReward());
132,609
public VTMatch addMatch(VTMatchInfo info) {<NEW_LINE>AssociationDatabaseManager associationManager = session.getAssociationManagerDBM();<NEW_LINE>VTAssociationDB associationDB = associationManager.getOrCreateAssociationDB(info.getSourceAddress(), info.getDestinationAddress(), info.getAssociationType());<NEW_LINE>VTMatc...
info, this, associationDB, tagDB);
1,422,410
private static Map<String, MetadataFieldMapper.TypeParser> initBuiltInMetadataMappers() {<NEW_LINE>Map<MASK><NEW_LINE>// Use a LinkedHashMap for metadataMappers because iteration order matters<NEW_LINE>builtInMetadataMappers = new LinkedHashMap<>();<NEW_LINE>// _ignored first so that we always load it, even if only _id...
<String, MetadataFieldMapper.TypeParser> builtInMetadataMappers;
708,871
public static void main(String[] args) {<NEW_LINE>if (args.length == 0) {<NEW_LINE>args = new String[] { "C:\\temp\\downloads.config", "C:\\temp\\downloads-9-3-05.config", "C:\\temp\\merged.config" };<NEW_LINE>} else if (args.length != 3) {<NEW_LINE>System.out.println("Usage: newer_config_file older_config_file save_co...
HashWrapper wrapper = new HashWrapper(hash);
758,776
public BufferAggregator factorizeBuffered(ColumnSelectorFactory metricFactory) {<NEW_LINE>ColumnValueSelector<?> selector = metricFactory.makeColumnValueSelector(fieldName);<NEW_LINE>if (selector instanceof NilColumnValueSelector) {<NEW_LINE>return NoopBufferAggregator.instance();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if...
final String type = getTypeString(metricFactory);
772,316
List<String> toStringArray() {<NEW_LINE>List<String> ss = new ArrayList<>(moduleProps);<NEW_LINE>Set<String> keys = xxProps.keySet();<NEW_LINE>for (String name : keys) {<NEW_LINE>String value = xxProps.get(name);<NEW_LINE>if (value != null) {<NEW_LINE>ss.add("-XX" + name + "=" + value);<NEW_LINE>} else {<NEW_LINE>ss.ad...
"-" + name + "=" + value);
85,539
final DeleteOpsMetadataResult executeDeleteOpsMetadata(DeleteOpsMetadataRequest deleteOpsMetadataRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteOpsMetadataRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st...
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,132,042
private void apolloLoad(final Supplier<Context> context, final LoaderHandler<ApolloConfig> handler, final ApolloConfig config) {<NEW_LINE>if (config != null) {<NEW_LINE>check(config);<NEW_LINE>LOGGER.info("loader apollo config: {}", config);<NEW_LINE>String fileExtension = config.getFileExtension();<NEW_LINE>PropertyLo...
handler.finish(context, config);
1,586,932
public V fillAndGet(Object key) {<NEW_LINE>if (containsKey(key)) {<NEW_LINE>return this.get(key);<NEW_LINE>}<NEW_LINE>Type expectedType = null;<NEW_LINE>// The type should be a record or map for filling read.<NEW_LINE>if (this.type.getTag() == TypeTags.RECORD_TYPE_TAG) {<NEW_LINE>BRecordType recordType = (BRecordType) ...
) key, (V) value);
1,576,713
public void checkFile() throws MojoExecutionException {<NEW_LINE>resetExamination();<NEW_LINE>Manifest mf = null;<NEW_LINE>if (jarFile != null) {<NEW_LINE>JarFile jar = null;<NEW_LINE>try {<NEW_LINE>jar = new JarFile(jarFile);<NEW_LINE>mf = jar.getManifest();<NEW_LINE>} catch (Exception exc) {<NEW_LINE>throw new MojoEx...
io.getMessage(), io);
869,185
private static int parseLinearGradient(SvgContainer container, char[] ca, int start, int end) {<NEW_LINE>end = <MASK><NEW_LINE>if (end != -1) {<NEW_LINE>int endAttrs = closer(ca, start, end);<NEW_LINE>SvgGradient gradient = new SvgGradient(container, getAttrValue(ca, start, endAttrs, ATTR_ID));<NEW_LINE>gradient.data =...
findClosingTag(ca, start, end);
98,663
public void onMatchReturn(NullAway analysis, ReturnTree tree, VisitorState state) {<NEW_LINE>// Figure out the enclosing method node<NEW_LINE>TreePath enclosingMethodOrLambda = NullabilityUtil.<MASK><NEW_LINE>if (enclosingMethodOrLambda == null) {<NEW_LINE>throw new RuntimeException("no enclosing method, lambda or init...
findEnclosingMethodOrLambdaOrInitializer(state.getPath());
15,724
public static ListCompliancePacksResponse unmarshall(ListCompliancePacksResponse listCompliancePacksResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCompliancePacksResponse.setRequestId(_ctx.stringValue("ListCompliancePacksResponse.RequestId"));<NEW_LINE>CompliancePacksResult compliancePacksResult = new CompliancePac...
("ListCompliancePacksResponse.CompliancePacksResult.CompliancePacks[" + i + "].RiskLevel"));
244,506
public EventTypeList requestListOfEventTypesForTenant(String xSdsServiceToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/provisioning/webhooks/event_types";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams...
HashMap<String, Object>();
1,760,396
public static DescribeCdnDomainLogsResponse unmarshall(DescribeCdnDomainLogsResponse describeCdnDomainLogsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeCdnDomainLogsResponse.setRequestId(_ctx.stringValue("DescribeCdnDomainLogsResponse.RequestId"));<NEW_LINE>List<DomainLogDetail> domainLogDetails = new ArrayLis...
+ "].LogInfos[" + j + "].LogSize"));
1,558,705
public Request<BundleInstanceRequest> marshall(BundleInstanceRequest bundleInstanceRequest) {<NEW_LINE>if (bundleInstanceRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<BundleInstanceRequest> request = new DefaultRequest<MASK><NEW_LINE...
<BundleInstanceRequest>(bundleInstanceRequest, "AmazonEC2");
1,297,611
public void visit(BLangJoinClause joinClause, AnalyzerData data) {<NEW_LINE>boolean prevBreakEnv = data.breakToParallelQueryEnv;<NEW_LINE>BLangExpression collection = joinClause.collection;<NEW_LINE>if (collection.getKind() == NodeKind.QUERY_EXPR || (collection.getKind() == NodeKind.GROUP_EXPR && ((BLangGroupExpr) coll...
).accept(this, data);
616,060
public void lookupDestination(SIPUri suri, NaptrRequestListener listener) {<NEW_LINE>if (!_naptrAutoResolve) {<NEW_LINE>listener.error(new SipURIResolveException("Resolver service not initialized."));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean fix = fixNonStandardURI(suri);<NEW_LINE>SipURILookupCallbackImpl callback ...
()).append(">");
1,291,376
public WorksheetTaskWrapper<Void> doAction(String id, WorksheetContext ctx) {<NEW_LINE>ExampleActionTask task = null;<NEW_LINE>switch(id) {<NEW_LINE>case ACTION_BOTH_ID:<NEW_LINE>task = new ExampleActionTask(ExtensionResources.get(ExtensionResources.WORKSHEET_ACTION_BOTH), ctx.getConnectionName(), ctx.getCallback(), id...
getCallback(), id, false);
1,754,535
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>GroupId.V2 groupId = getGroupId();<NEW_LINE>GroupLinkInviteFriendsViewModel.Factory factory = new GroupLinkInviteFriendsViewModel.Factory(requireContext().getApplicationC...
getViewLifecycleOwner(), this::setBusy);
128,200
int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException {<NEW_LINE>final String jobIdString = options.getString(jobArg.getDest());<NEW_LINE>final String hostPattern = options.getString(hostArg.getD...
(",").join(domains);
1,840,643
public static String bash(String scriptName, CommandLine commandLine) {<NEW_LINE>if (scriptName == null) {<NEW_LINE>throw new NullPointerException("scriptName");<NEW_LINE>}<NEW_LINE>if (commandLine == null) {<NEW_LINE>throw new NullPointerException("commandLine");<NEW_LINE>}<NEW_LINE>scriptName = sanitizeScriptName(scr...
.commandName, descriptor.commandLine));
445,013
private static <N, E, K, V> N merge(DG<N, E, K, V> dg, N n, DG<N, E, K, V> ndg, boolean addEnds) {<NEW_LINE>if (ndg.containsNode(n))<NEW_LINE>return n;<NEW_LINE>ndg.addNode(n);<NEW_LINE>ndg.putAllProperties(n, dg.getProperties(n));<NEW_LINE>if (addEnds && dg.getEnds().contains(n))<NEW_LINE>ndg.addEnd(n);<NEW_LINE>Itera...
E edge = it.next();
1,643,307
private static void validatePageFile(final Path path, final CheckpointIO cpIo, final File v1PageFile) {<NEW_LINE>final int num = Integer.parseInt(v1PageFile.getName().substring("page.".length()));<NEW_LINE>try (final MmapPageIOV1 iov1 = new MmapPageIOV1(num, Ints.checkedCast(v1PageFile.length()), path)) {<NEW_LINE>fina...
long minSeqNum = cp.getMinSeqNum();
207,191
public ServiceStatus update(String userId, String json) {<NEW_LINE>JSONObject jsonObject = JSONObject.parseObject(json);<NEW_LINE>DashboardBoard board = new DashboardBoard();<NEW_LINE>board.setUserId(userId);<NEW_LINE>board.setName(jsonObject.getString("name"));<NEW_LINE>board.setCategoryId(jsonObject.getLong("category...
ServiceStatus.Status.Fail, "Duplicated name");
1,287,236
public static ValidationResult validateINDArrayTextFile(@NonNull File f) {<NEW_LINE>ValidationResult vr = Nd4jCommonValidator.isValidFile(f, "INDArray Text File", false);<NEW_LINE>if (vr != null && !vr.isValid()) {<NEW_LINE>vr.setFormatClass(INDArray.class);<NEW_LINE>return vr;<NEW_LINE>}<NEW_LINE>// TODO let's do this...
(f)).build();
1,377,730
protected Object handleFallback(Invocation inv, String fallback, String defaultFallback, Class<?>[] fallbackClass, Throwable ex) throws Throwable {<NEW_LINE>Object[] originArgs = inv.getArgs();<NEW_LINE>// Execute fallback function if configured.<NEW_LINE>Method fallbackMethod = extractFallbackMethod(inv, fallback, fal...
fallbackMethod.invoke(null, args);
1,444,663
public boolean apply(Game game, Ability source) {<NEW_LINE>Choice typeChoice = new ChoiceCreatureType(game.getObject(source));<NEW_LINE>typeChoice.setMessage("Choose creature type to return cards from your graveyard");<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Set<Card> toHand = ne...
0, Integer.MAX_VALUE, filter);
791,830
private void invokeConnectToBluetoothDevice() {<NEW_LINE>if (BuildConfig.BUILD_TYPE == "light") {<NEW_LINE>AlertDialog infoDialog = new AlertDialog.Builder(this).setMessage(Html.fromHtml(getResources().getString(R.string.label_upgrade_to_openScale_pro) + "<br><br> <a href=\"https://play.google.com/store/apps/details?id...
getString(BluetoothSettingsFragment.PREFERENCE_KEY_BLUETOOTH_DEVICE_NAME, "");
645,241
public void doWait() throws InterruptedException {<NEW_LINE>long millis = duration.toMillis();<NEW_LINE>if (millis > 0) {<NEW_LINE>Instant waitUntil = clock.<MASK><NEW_LINE>while (clock.now().isBefore(waitUntil)) {<NEW_LINE>synchronized (lock) {<NEW_LINE>if (skipNextWait) {<NEW_LINE>LOG.debug("Waiter has been notified ...
now().plusMillis(millis);
1,456,840
protected QuicSession createSession(SocketAddress remoteAddress, ByteBuffer cipherBuffer) throws IOException {<NEW_LINE>ByteBufferPool byteBufferPool = getByteBufferPool();<NEW_LINE>// TODO make the token validator configurable<NEW_LINE>QuicheConnection quicheConnection = QuicheConnection.tryAccept(connector.newQuicheC...
quicheConnection, this, remoteAddress, connector);
621,087
private void readMapIndex(MapIndex index, boolean onlyInitEncodingRules) throws IOException {<NEW_LINE>int defaultId = 1;<NEW_LINE>int oldLimit;<NEW_LINE>int encodingRulesSize = 0;<NEW_LINE>while (true) {<NEW_LINE>int t = codedIS.readTag();<NEW_LINE>int tag = WireFormat.getTagFieldNumber(t);<NEW_LINE>switch(tag) {<NEW_...
setName(codedIS.readString());
955,052
public int compareTo(LayoutDecision arg) {<NEW_LINE>ObjectFile.Element ourElement = getElement();<NEW_LINE>int ourElementIndex = ourElement == null ? -1 : ourElement.getOwner().getElements().indexOf(ourElement);<NEW_LINE>int ourKindOrdinal = getKind().ordinal();<NEW_LINE>ObjectFile.Element argElement = arg.getElement()...
getElements().indexOf(argElement);
1,378,691
public final GF2nPolynomial[] divide(GF2nPolynomial b) {<NEW_LINE>GF2nPolynomial[] result = new GF2nPolynomial[2];<NEW_LINE>GF2nPolynomial a = new GF2nPolynomial(this);<NEW_LINE>a.shrink();<NEW_LINE>GF2nPolynomial shift;<NEW_LINE>GF2nElement factor;<NEW_LINE>int bDegree = b.getDegree();<NEW_LINE>GF2nElement inv = (GF2n...
shift = b.scalarMultiply(factor);
1,318,762
private boolean tryRehash() {<NEW_LINE>long newCapacityLong = hashCapacity * 2L;<NEW_LINE>if (newCapacityLong > Integer.MAX_VALUE) {<NEW_LINE>throw new TrinoException(GENERIC_INSUFFICIENT_RESOURCES, "Size of hash table cannot exceed 1 billion entries");<NEW_LINE>}<NEW_LINE>int newCapacity = toIntExact(newCapacityLong);...
= (hashPosition + 1) & newMask;
425,825
private static <T> T callAction(AnAction action, String operation, Supplier<T> call) {<NEW_LINE>if (action instanceof UpdateInBackground || ApplicationManager.getApplication().isDispatchThread())<NEW_LINE>return call.get();<NEW_LINE>ProgressIndicator progress = Objects.requireNonNull(ProgressManager.getInstance().getPr...
long start = System.currentTimeMillis();
1,135,867
public void handleDelivery(String consumerTag, Envelope envelope, BasicProperties properties, byte[] body) throws IOException {<NEW_LINE>String decodedBody;<NEW_LINE>try {<NEW_LINE>decodedBody = new String(body, "UTF-8");<NEW_LINE>} catch (UnsupportedEncodingException e) {<NEW_LINE>// can't happen<NEW_LINE>throw new Ru...
SEVERE, "problem creating CrawlURI from json received via AMQP " + decodedBody, e);
1,476,300
public VirtualRouterOfferingInventory selectVirtualRouterOffering(L3NetworkInventory l3, List<VirtualRouterOfferingInventory> candidates) {<NEW_LINE>Map<String, List<String>> tags = VirtualRouterSystemTags.VYOS_OFFERING.getTags(candidates.stream().map(VirtualRouterOfferingInventory::getUuid).collect(Collectors.toList()...
) : candidates.get(0);
1,189,206
public void check(Database database, DatabaseChangeLog changeLog, ChangeSet changeSet, ChangeExecListener changeExecListener) throws PreconditionFailedException, PreconditionErrorException {<NEW_LINE>CustomPrecondition customPrecondition;<NEW_LINE>try {<NEW_LINE>// System.out.println(classLoader.toString());<NEW_LINE>t...
(), changeLog, this));
14,024
private static void bindSlowPoint(BoundStatement boundStatement, String agentRollupId, String agentId, String traceId, Trace.Header header, int adjustedTTL, boolean overall, boolean partial, boolean cassandra2x) throws IOException {<NEW_LINE>int i = bind(boundStatement, agentRollupId, agentId, traceId, header, overall,...
(header.getCaptureTime()));
1,694,427
public Request<ReleaseHostsRequest> marshall(ReleaseHostsRequest releaseHostsRequest) {<NEW_LINE>if (releaseHostsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<ReleaseHostsRequest> request = new DefaultRequest<MASK><NEW_LINE>request.addP...
<ReleaseHostsRequest>(releaseHostsRequest, "AmazonEC2");
791,780
public ArtifactSourceType unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ArtifactSourceType artifactSourceType = new ArtifactSourceType();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken t...
int originalDepth = context.getCurrentDepth();
1,431,163
private static void collectCoverageInformation(TestCase testCase) {<NEW_LINE>SameDiff sd = testCase.sameDiff();<NEW_LINE>// NOTE: Count on a per-test-case basis, not on a 'per function seen' basis<NEW_LINE>// i.e., don't double count if a SameDiff instance has multiple copies of the same op type<NEW_LINE>// Collect cov...
add(df.getClass());
1,839,767
private List<Result> partitionHits(Result result, String summaryClass) {<NEW_LINE>List<Result> parts = new ArrayList<>();<NEW_LINE>TinyIdentitySet<Query> queryMap = new TinyIdentitySet<>(4);<NEW_LINE>for (Iterator<Hit> i = hitIterator(result); i.hasNext(); ) {<NEW_LINE>Hit hit = i.next();<NEW_LINE>if (hit instanceof Fa...
idx = queryMap.indexOf(q);
983,258
private ParameterMap createValidationParameters(final Node node) {<NEW_LINE>final ParameterMap parameters = new ParameterMap();<NEW_LINE>parameters.insert("DEFAULT", name);<NEW_LINE>parameters.insert(PARAM_TYPE, getType().toString());<NEW_LINE>parameters.insert(PARAM_NODEHOST, nodehost, node.getNodeHost());<NEW_LINE>pa...
windowsdomain, node.getWindowsDomain());
1,689,829
public boolean execute(final OHttpRequest iRequest, OHttpResponse iResponse) throws Exception {<NEW_LINE>checkSyntax(iRequest.getUrl(), 1, "Syntax error: disconnect");<NEW_LINE>iRequest<MASK><NEW_LINE>iRequest.getData().commandDetail = null;<NEW_LINE>if (iRequest.getSessionId() != null) {<NEW_LINE>server.getHttpSession...
.getData().commandInfo = "Disconnect";