idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
579,366
public static HttpCompliance from(String spec) {<NEW_LINE>Set<Violation> sections;<NEW_LINE>String[] elements = spec.split("\\s*,\\s*");<NEW_LINE>switch(elements[0]) {<NEW_LINE>case "0":<NEW_LINE>sections = noneOf(Violation.class);<NEW_LINE>break;<NEW_LINE>case "*":<NEW_LINE>sections = allOf(Violation.class);<NEW_LINE>...
__custom.getAndIncrement(), sections);
293,263
public Object doQuery(Object[] objs) {<NEW_LINE>try {<NEW_LINE>if (objs.length == 1) {<NEW_LINE>ArrayList<File> rFile = new ArrayList<File>();<NEW_LINE>ArrayList<File> rDir = new ArrayList<File>();<NEW_LINE>List<String> ls = new ArrayList<String>();<NEW_LINE>List<String> filters = ImUtils.getFilter(objs[0]);<NEW_LINE>S...
m_zipfile, m_parameters, rFile, rDir);
844,835
protected void loadEntities() {<NEW_LINE>log.debug("Loading entities");<NEW_LINE>entitiesManual = new HashMap<>();<NEW_LINE>entitiesAuto = new HashMap<>();<NEW_LINE>Transaction tx = persistence.createTransaction();<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>TypedQuery<LoggedEntity> q = em.createQuery("select e from sec$Lo...
EntityManager em = persistence.getEntityManager();
326,874
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>ThriftPluginConfig config = new ThriftPluginConfig(instrumentor.getProfilerConfig());<NEW_LINE>final...
boolean traceServiceResult = config.traceThriftServiceResult();
1,734,561
public static void main(String[] args) {<NEW_LINE>Map<Integer, TypeStat> map = new <MASK><NEW_LINE>init(map);<NEW_LINE>for (int codepoint = 0; codepoint <= 0x110000; codepoint++) {<NEW_LINE>int type = java.lang.Character.getType(codepoint);<NEW_LINE>if (!map.containsKey(type)) {<NEW_LINE>map.put(type, new TypeStat(type...
HashMap<Integer, TypeStat>();
59,124
private CharSequence generateStoreValue(final PrimitiveType primitiveType, final String valueSuffix, final String offsetStr, final ByteOrder byteOrder, final String indent) {<NEW_LINE>final String cppTypeName = cppTypeName(primitiveType);<NEW_LINE>final String byteOrderStr = formatByteOrderEncoding(byteOrder, primitive...
valueSuffix, byteOrderStr, offsetStr, cppTypeName);
1,517,313
private // sensitivity to the spread for a payment period with FLAT compounding type<NEW_LINE>double pvbpCompoundedFlat(RatePaymentPeriod paymentPeriod, RatesProvider provider) {<NEW_LINE>int nbCmp = paymentPeriod.getAccrualPeriods().size();<NEW_LINE>double[] rate = paymentPeriod.getAccrualPeriods().stream().mapToDoubl...
) * cpaAccumulatedBar[j + 1];
399,372
Guard anonfun_0(Guard pc_3, EventBuffer effects, EventHandlerReturnReason outcome, NamedTupleVS var_payload) {<NEW_LINE>PrimitiveVS<Machine> var_$tmp0 = new PrimitiveVS<Machine>().restrict(pc_3);<NEW_LINE>PrimitiveVS<Machine> var_$tmp1 = new PrimitiveVS<Machine>().restrict(pc_3);<NEW_LINE>PrimitiveVS<Integer> var_$tmp2...
temp_var_5 = var_$tmp3.restrict(pc_3);
1,731,303
private void addFileToRequestBundle(IBaseParameters theInputParameters, String theFileName, byte[] theBytes) {<NEW_LINE>byte[] bytes = theBytes;<NEW_LINE>String fileName = theFileName;<NEW_LINE>if (bytes.length > ourTransferSizeLimit) {<NEW_LINE>ourLog.info("File size is greater than {} - Going to use a local file refe...
.code(1544) + e);
118,335
public void onChange(Collection<File> createdFiles, Collection<File> modifiedFiles, Collection<File> deletedFiles) {<NEW_LINE>if (OpenAPIUtils.isDebugEnabled(tc)) {<NEW_LINE>Tr.debug(this, tc, "Received notification from FileMonitor: createdFiles=" + createdFiles + " : modifiedFiles=" + modifiedFiles + " : deletedFiles...
"Customization file was created : location=" + file.toString());
1,691,092
/* (non-Javadoc)<NEW_LINE>* @see org.netbeans.spi.editor.hints.Fix#implement()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public ChangeInfo implement() throws Exception {<NEW_LINE>FileObject template = <MASK><NEW_LINE>FileObject target;<NEW_LINE>FileObject root = myInfo.getClasspathInfo().getClassPath(PathKind.SOURCE).fin...
FileUtil.getConfigFile(getTemplate());
1,009,314
public void onCreate(Bundle icicle) {<NEW_LINE>super.onCreate(icicle);<NEW_LINE>locale = (Locale) getArguments().getSerializable(PassphraseRequiredActionBarActivity.LOCALE_EXTRA);<NEW_LINE>archive = getArguments().getBoolean(ARCHIVE, false);<NEW_LINE>DcEventCenter eventCenter = DcHelper.getEventCenter(getActivity());<N...
addObserver(DcContext.DC_EVENT_CONTACTS_CHANGED, this);
1,559,898
public HttpClient createClientForHttp1(String name) {<NEW_LINE>ExecutorService executor = executorFactory.getExecutorService(name, configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_SIZE)<MASK><NEW_LINE>HttpClient client = sslContextFactoryProvider.provideSslContextFactory().map(sslContextFactory -> new Http...
, configFactory.getBooleanProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_MONITORING));
896,562
public Object convert(Object src, Class destClass) {<NEW_LINE>if (java.sql.Time.class.isInstance(src)) {<NEW_LINE>Date date = convertSqlTimeToDate((java.sql.Time) src);<NEW_LINE>if (destClass.equals(java.sql.Date.class)) {<NEW_LINE>Calendar cal = Calendar.getInstance();<NEW_LINE>cal.setTime(date);<NEW_LINE>cal.set(Cale...
set(Calendar.MILLISECOND, 0);
1,166,287
// credit: https://leetcode.com/articles/minimum-ascii-delete-sum-for-two-strings/<NEW_LINE>public int minimumDeleteSum(String s1, String s2) {<NEW_LINE>int[][] dp = new int[s1.length() + 1][s2.length() + 1];<NEW_LINE>for (int i = s1.length() - 1; i >= 0; i--) {<NEW_LINE>dp[i][s2.length()] = dp[i + 1][s2.length()] + s1...
+ 1][j + 1];
1,290,331
public ServiceRegistry unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ServiceRegistry serviceRegistry = new ServiceRegistry();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep...
JsonToken token = context.getCurrentToken();
1,644,100
private ClassPath createCP(Project prj, HashSet<Project> parents) {<NEW_LINE>parents.add(prj);<NEW_LINE>List<ClassPath> list = new ArrayList<ClassPath>();<NEW_LINE>ProjectSourcesClassPathProvider cpp = prj.getLookup().lookup(ProjectSourcesClassPathProvider.class);<NEW_LINE>ClassPath[] cp = cpp.getProjectClassPaths(Clas...
c = createCP(sub, parents);
894,462
public String downloadAvatar(Long userId, String uuid) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'userId' is set<NEW_LINE>if (userId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'userId' when calling downloadAvatar");<NEW_...
final String[] localVarContentTypes = {};
108,543
public static KafkaConsumer acquireKafkaConsumerForConfig(KafkaStreamLevelStreamConfig kafkaStreamLevelStreamConfig) {<NEW_LINE>final ImmutableTriple<String, String, String> configKey = new ImmutableTriple<>(kafkaStreamLevelStreamConfig.getKafkaTopicName(), kafkaStreamLevelStreamConfig.getGroupId(), kafkaStreamLevelStr...
StringDeserializer.class.getName());
1,674,744
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien...
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
371,509
private void loadNode57() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerConfigurationType_UpdateCertificate_OutputArguments, new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArguments"), LocalizedText.NULL_VALUE, UInteger....
setInput(new StringReader(xml));
606,992
public CommonAttributeCountSearchResults findMatchesByCount() throws TskCoreException, NoCurrentCaseException, SQLException, CentralRepoException {<NEW_LINE>CorrelationCase correlationCase = this.getCorrelationCaseFromId(this.corrleationCaseId);<NEW_LINE>this.correlationCaseName = correlationCase.getDisplayName();<NEW_...
getCurrentCase(), mimeTypesToFilterOn, correlationCase);
1,322,244
public VertexLabel append() {<NEW_LINE>VertexLabel vertexLabel = <MASK><NEW_LINE>if (vertexLabel == null) {<NEW_LINE>throw new NotFoundException("Can't update vertex label '%s' " + "since it doesn't exist", this.name);<NEW_LINE>}<NEW_LINE>this.checkStableVars();<NEW_LINE>this.checkProperties(Action.APPEND);<NEW_LINE>th...
this.vertexLabelOrNull(this.name);
759,534
final UpdatePullRequestTitleResult executeUpdatePullRequestTitle(UpdatePullRequestTitleRequest updatePullRequestTitleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updatePullRequestTitleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_...
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,369,042
public CreateResourceGroupResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateResourceGroupResult createResourceGroupResult = new CreateResourceGroupResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()...
JsonToken token = context.getCurrentToken();
1,011,302
public void resolvePackageDirectives(CompilationUnitScope cuScope) {<NEW_LINE>if (this.binding == null) {<NEW_LINE>this.ignoreFurtherInvestigation = true;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.hasResolvedPackageDirectives)<NEW_LINE>return;<NEW_LINE>this.hasResolvedPackageDirectives = true;<NEW_LINE>Set<PackageB...
ref = this.opens[i];
899,071
public com.amazonaws.services.migrationhubconfig.model.ServiceUnavailableException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.migrationhubconfig.model.ServiceUnavailableException serviceUnavailableException = new com.amazonaws.services.migrationhubconfig.mo...
String currentParentElement = context.getCurrentParentElement();
654,205
private void scheduleRecurringTransaction(String transactionUID) {<NEW_LINE>ScheduledActionDbAdapter scheduledActionDbAdapter = ScheduledActionDbAdapter.getInstance();<NEW_LINE>Recurrence recurrence = RecurrenceParser.parse(mEventRecurrence);<NEW_LINE>ScheduledAction scheduledAction = new ScheduledAction(ScheduledActio...
Toast.LENGTH_SHORT).show();
699,951
protected void selectionBoxAction(final Rectangle rect, final boolean shiftMode) {<NEW_LINE>m_graph.getGraph().firePreEvent();<NEW_LINE>final NodeList selectedNodes = new NodeList();<NEW_LINE>for (final NodeCursor node = m_graph.getGraph().nodes(); node.ok(); node.next()) {<NEW_LINE>final NodeType zyNode = m_graph.getN...
.getGraph().unselectAll();
1,781,399
private GeneratorExpressionLoop generatorExpressionLoop() throws IOException {<NEW_LINE>if (nextToken() != Token.FOR)<NEW_LINE>codeBug();<NEW_LINE>int pos = ts.tokenBeg;<NEW_LINE>int lp = -1, rp = -1, inPos = -1;<NEW_LINE>GeneratorExpressionLoop pn = new GeneratorExpressionLoop(pos);<NEW_LINE>pushScope(pn);<NEW_LINE>tr...
setLength(ts.tokenEnd - pos);
1,769,611
public static void fetchViewers(final SiteModel site, final int offset, final FetchViewersCallback callback) {<NEW_LINE>RestRequest.Listener listener = new RestRequest.Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(JSONObject jsonObject) {<NEW_LINE>if (jsonObject != null && callback != null) ...
jsonArray = jsonObject.getJSONArray("viewers");
1,699,263
public void deserialize(ByteBuffer buffer) throws IllegalPathException {<NEW_LINE>this.devicePath = new PartialPath(readString(buffer));<NEW_LINE>int measurementSize = buffer.getInt();<NEW_LINE>this.measurements = new String[measurementSize];<NEW_LINE>for (int i = 0; i < measurementSize; i++) {<NEW_LINE>measurements[i]...
int rows = buffer.getInt();
910,752
private void addAllStaticMemberNames(final Env env) {<NEW_LINE>String prefix = env.getPrefix();<NEW_LINE>if (prefix != null && prefix.length() > 0) {<NEW_LINE>CompilationController controller = env.getController();<NEW_LINE>Set<? extends Element> excludes = env.getExcludes();<NEW_LINE>Set<ElementHandle<Element>> exclud...
>(excludes.size());
568,371
final GenerateCredentialReportResult executeGenerateCredentialReport(GenerateCredentialReportRequest generateCredentialReportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(generateCredentialReportRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri...
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,532,952
public ListThingTypesResult listThingTypes(ListThingTypesRequest listThingTypesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listThingTypesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(...
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,346,460
private void reserveCapacityWithChecking(String hostUuid, long requestCpu, long requestMemory) {<NEW_LINE>HostCapacityUpdater updater = new HostCapacityUpdater(hostUuid);<NEW_LINE>HostVO host = dbf.findByUuid(hostUuid, HostVO.class);<NEW_LINE>HostReservedCapacityExtensionPoint ext = exts.get(host.getHypervisorType());<...
setReservedCpuCapacity(extHc.getReservedCpuCapacity());
495,851
public static void finalizeOutputMaySortMayRStreamCodegen(CodegenBlock block, CodegenExpressionRef newEvents, CodegenExpressionRef newEventsSortKey, CodegenExpressionRef oldEvents, CodegenExpressionRef oldEventsSortKey, boolean selectRStream, boolean hasOrderBy) {<NEW_LINE>block.declareVar(EventBean.EPTYPEARRAY, "newEv...
ref("sortKeysNew"), MEMBER_EXPREVALCONTEXT));
377,889
public static ListInboundOrderSKUTagsResponse unmarshall(ListInboundOrderSKUTagsResponse listInboundOrderSKUTagsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listInboundOrderSKUTagsResponse.setRequestId(_ctx.stringValue("ListInboundOrderSKUTagsResponse.RequestId"));<NEW_LINE>listInboundOrderSKUTagsResponse.setPageSize...
("ListInboundOrderSKUTagsResponse.SkuTags[" + i + "].SKUId"));
146,364
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>logger.debug("Refreshing authentication token.");<NEW_LINE>HttpSession session = request.getSession();<NEW_LINE>StudioConfigAuth auth = (StudioConfigAuth) <MASK><NEW_LIN...
session.getAttribute(RequestAttributeKeys.AUTH_KEY);
698,926
public Map<String, Object> saveFileAction(String selectedItem, String wfActionAssign, String wfActionId, String wfActionComments, String wfConId, String wfPublishDate, String wfPublishTime, String wfExpireDate, String wfExpireTime, String wfNeverExpire, String whereToSend, String forcePush, String pathToMove) throws Do...
contentlet.setStringProperty("wfActionComments", wfActionComments);
355,943
private InventoryLineHU syncQtyFromInventoryLineToHU(@NonNull final InventoryLine inventoryLine, @NonNull final InventoryLineHU inventoryLineHU) {<NEW_LINE>final <MASK><NEW_LINE>if (qtyCountMinusBooked.signum() == 0) {<NEW_LINE>return inventoryLineHU;<NEW_LINE>}<NEW_LINE>final ProductId productId = inventoryLine.getPro...
Quantity qtyCountMinusBooked = inventoryLineHU.getQtyCountMinusBooked();
1,572,222
private void renderWithTemplateEngineOrRaw(Context context, Result result) {<NEW_LINE>// if content type is not yet set in result we copy it over from the<NEW_LINE>// request accept header<NEW_LINE>if (result.getContentType() == null) {<NEW_LINE>if (result.supportedContentTypes().contains(context.getAcceptContentType()...
"No template engine found for result content type " + result.getContentType());
27,944
private View buildView(LayoutInflater inflater) {<NEW_LINE>View view = inflater.inflate(R.layout.track_selection_dialog, null);<NEW_LINE>ViewGroup root = view.findViewById(R.id.root);<NEW_LINE>trackViews = new CheckedTextView[trackGroups.length][];<NEW_LINE>for (int groupIndex = 0; groupIndex < trackGroups.length; grou...
: android.R.layout.simple_list_item_single_choice;
1,484,523
public PartitionGetResult partitionGet(PartitionGetParam partParam) {<NEW_LINE>PartGetNodeAttrsParam param = (PartGetNodeAttrsParam) partParam;<NEW_LINE>ServerMatrix matrix = psContext.getMatrixStorageManager().<MASK><NEW_LINE>ServerPartition part = matrix.getPartition(partParam.getPartKey().getPartitionId());<NEW_LINE...
getMatrix(partParam.getMatrixId());
338,532
private void initializeLoggerForPluginId(String pluginId) {<NEW_LINE>if (alreadyInitialized(pluginId)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>synchronized (pluginId.intern()) {<NEW_LINE>if (alreadyInitialized(pluginId)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>synchronized (appenderCreationLock) {<NEW_LINE>FileAppender<I...
consoleAppender = new ConsoleAppender<>();
850,761
private void createGui() {<NEW_LINE>final JPanel topPanel = new JPanel(new BorderLayout());<NEW_LINE>final JPanel innerTopPanel = new JPanel(new BorderLayout());<NEW_LINE>final JPanel debuggerChooserPanel = new JPanel(new BorderLayout());<NEW_LINE>debuggerChooserPanel.setBorder(new TitledBorder("Address Space Debugger"...
(), new CModuleFilterHelp());
1,670,909
public void run() {<NEW_LINE>try {<NEW_LINE>if (env.exception.get() != null)<NEW_LINE>return;<NEW_LINE>if (splits.size() <= 2) {<NEW_LINE>addSplits(env, <MASK><NEW_LINE>splits.forEach(s -> env.latch.countDown());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int mid = splits.size() / 2;<NEW_LINE>// split the middle split point ...
new TreeSet<>(splits));
1,626,591
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see javax.enterprise.context.spi.AlterableContext#destroy(javax.enterprise.context.spi.Contextual)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void destroy(Contextual<?> contextual) {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "destroy(Contextual)", new...
Tr.exit(tc, "destroy(Contextual)");
686,667
final ListTriggersResult executeListTriggers(ListTriggersRequest listTriggersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTriggersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec...
endClientExecution(awsRequestMetrics, request, response);
142,544
private Optional<Row> constraintsToResult(BDD constraints, RoutingPolicy policy, ConfigAtomicPredicates configAPs) {<NEW_LINE>if (constraints.isZero()) {<NEW_LINE>return Optional.empty();<NEW_LINE>} else {<NEW_LINE>BDD <MASK><NEW_LINE>Bgpv4Route inRoute = satAssignmentToInputRoute(fullModel, configAPs);<NEW_LINE>Row re...
fullModel = constraintsToModel(constraints, configAPs);
1,453,575
public static DescribeBackupPoliciesResponse unmarshall(DescribeBackupPoliciesResponse describeBackupPoliciesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBackupPoliciesResponse.setRequestId(_ctx.stringValue("DescribeBackupPoliciesResponse.RequestId"));<NEW_LINE>PageInfo pageInfo = new PageInfo();<NEW_LINE>pag...
+ "].HealthClientUuidList[" + j + "]"));
3,036
public void onClick(View v) {<NEW_LINE>LayoutInflater l = context.getLayoutInflater();<NEW_LINE>View body = l.inflate(R.layout.album_grid_dialog, null, false);<NEW_LINE>GridView gridview = body.findViewById(R.id.images);<NEW_LINE>gridview.setAdapter(<MASK><NEW_LINE>final AlertDialog.Builder builder = new AlertDialog.Bu...
new ImageGridAdapter(context, users));
111,960
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) {<NEW_LINE>ug = ug.apply(UTranslate.dx(x));<NEW_LINE>final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder());<NEW_LINE>final Point2D p1 = new Point2D.Double(geo.getLeft(), 0);<NEW_LINE>final Point2D p2 = new Point2...
arrowColor, Arrows.asToDown());
1,715,584
public String webfinger(@RequestParam("resource") String resource, @RequestParam(value = "rel", required = false) String rel, Model model) {<NEW_LINE>if (!Strings.isNullOrEmpty(rel) && !rel.equals("http://openid.net/specs/connect/1.0/issuer")) {<NEW_LINE>logger.warn("Responding to webfinger request for non-OIDC relatio...
HttpCodeView.CODE, HttpStatus.NOT_FOUND);
1,115,672
public List<EndpointDefinition> loadServices(final String serviceName) {<NEW_LINE>if (debug)<NEW_LINE>logger.debug("Loading Service {}", serviceName);<NEW_LINE>final CountDownLatch countDownLatch = new CountDownLatch(1);<NEW_LINE>final AtomicReference<List<EndpointDefinition>> endPointsRef = new AtomicReference<>();<NE...
).build(), serviceName);
1,777,199
public void put(ByteDataArray serializedRepresentation, int ordinal) {<NEW_LINE>if (ordinal < 0 || ordinal > ORDINAL_MASK) {<NEW_LINE>throw new IllegalArgumentException(String.format("The given ordinal %s is out of bounds and not within the closed interval [0, %s]", ordinal, ORDINAL_MASK));<NEW_LINE>}<NEW_LINE>if (size...
.length(), MAX_BYTE_DATA_LENGTH));
1,439,968
public void valueChange(ValueChangeEvent evt) {<NEW_LINE>WSearchEditor source = (WSearchEditor) evt.getSource();<NEW_LINE>Object value = evt.getNewValue();<NEW_LINE>log.info("Value=" + value);<NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (source.equals(fUser)) {<NEW_LINE>// fUser<NEW_LINE>if (v...
Env.getCtx(), AD_User_ID);
627,360
final GetCloudFrontOriginAccessIdentityConfigResult executeGetCloudFrontOriginAccessIdentityConfig(GetCloudFrontOriginAccessIdentityConfigRequest getCloudFrontOriginAccessIdentityConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCloudFrontOriginAccessIdentityConfigRequest);<NEW_LIN...
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
472,887
private void plantSymlinkForestWithPartialMainRepository(ImmutableList.Builder<Path> plantedSymlinks, Map<Path, Path> mainRepoLinks) throws IOException, AbruptExitException {<NEW_LINE>if (siblingRepositoryLayout) {<NEW_LINE>execroot.createDirectory();<NEW_LINE>}<NEW_LINE>for (Map.Entry<Path, Path> entry : mainRepoLinks...
Path target = entry.getValue();
718,135
private void handleAsynchTimeOut(SipTransaction transaction) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceEntry(this, "handleAsynchTimeOut");<NEW_LINE>}<NEW_LINE>// get the tu from the original request, at this stage it is not found on the response<NEW_LINE>TransactionUserWrapper transact...
.getOriginalRequest().getTransactionUser();
1,342,311
void beanCachePutAllDirect(Collection<EntityBean> beans) {<NEW_LINE>Map<Object, Object> natKeys = null;<NEW_LINE>if (naturalKey != null) {<NEW_LINE>natKeys = new LinkedHashMap<>();<NEW_LINE>}<NEW_LINE>Map<Object, Object> map = new LinkedHashMap<>();<NEW_LINE>for (EntityBean bean : beans) {<NEW_LINE>CachedBeanData beanD...
natKeys.put(naturalKey, key);
775,558
public Destination unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Destination destination = new Destination();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentTok...
int originalDepth = context.getCurrentDepth();
1,437,342
private String prepareMessage() {<NEW_LINE>StringBuilder builder = new StringBuilder("<html>");<NEW_LINE>LayoutCodeInfoCollector notifications = myProcessor.getInfoCollector();<NEW_LINE>LOG.assertTrue(notifications != null);<NEW_LINE>if (notifications.isEmpty() && !myNoChangesDetected) {<NEW_LINE>if (myProcessChangesTe...
optimizeImportsNotification)).append("<br>");
89,188
final PutAttributesResult executePutAttributes(PutAttributesRequest putAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
805,774
public static Boolean isFullyPlayed(final Connection connection, final String title) {<NEW_LINE>boolean trace = LOGGER.isTraceEnabled();<NEW_LINE>Boolean result = true;<NEW_LINE>try {<NEW_LINE>String sql = "SELECT FILES.MOVIEORSHOWNAME " + "FROM FILES " + "LEFT JOIN " + MediaTableFilesStatus.TABLE_NAME + " ON " + "FILE...
"Searching " + TABLE_NAME + " with \"{}\"", sql);
1,676,552
private synchronized void init() throws IOException {<NEW_LINE>// Need the extra test, to avoid throwing an IOException from the Transcoder<NEW_LINE>if (imageInput == null) {<NEW_LINE>throw new IllegalStateException("input == null");<NEW_LINE>}<NEW_LINE>if (reader == null) {<NEW_LINE>WMFTranscoder transcoder = new WMFT...
= new OutputStreamWriter(output, "UTF8");
1,769,907
private Future<ReconcileResult<T>> internalDelete(Reconciliation reconciliation, String name) {<NEW_LINE>R resourceOp = operation().withName(name);<NEW_LINE>Future<ReconcileResult<T>> watchForDeleteFuture = resourceSupport.selfClosingWatch(reconciliation, resourceOp, resourceOp, deleteTimeoutMs(), "observe deletion of ...
map(ReconcileResult.deleted());
932,667
protected void updateUninstallUpgrade() {<NEW_LINE>final int[] selected = myPackagesTable.getSelectedRows();<NEW_LINE>boolean upgradeAvailable = false;<NEW_LINE>boolean canUninstall = selected.length != 0;<NEW_LINE>boolean canInstall = installEnabled();<NEW_LINE>boolean canUpgrade = true;<NEW_LINE>if (myPackageManageme...
final InstalledPackage pkg = (InstalledPackage) value;
41,065
final CreateTagsResult executeCreateTags(CreateTagsRequest createTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,494,657
public StringBuffer printExpression(int indent, StringBuffer output) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>output.append("new ");<NEW_LINE>this.type.print(0, output);<NEW_LINE>for (int i = 0; i < this.dimensions.length; i++) {<NEW_LINE>if (this.annotationsOnDimensions != null && this.annotationsOnDimensions[i] != null) {<...
].printExpression(0, output);
184,692
private Attribute putAttribute(ConceptManager conceptMgr) {<NEW_LINE>assert has().attribute().isa().isPresent() && has().attribute().isa().get().type().label().isPresent() && has().attribute().value().size() == 1 && has().attribute().value().iterator().next().isValueIdentity();<NEW_LINE>Label attributeTypeLabel = isa()...
).value(), true);
1,021,608
private void recoverAppState() {<NEW_LINE>modulesStatus.setDnsCryptState(STOPPED);<NEW_LINE>modulesStatus.setTorState(STOPPED);<NEW_LINE>modulesStatus.setItpdState(STOPPED);<NEW_LINE>if (modulesStatus.getMode() != null && modulesStatus.getMode() != UNDEFINED) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>loge("Restoring appli...
.getBoolean(FIX_TTL, false));
1,249,674
private void restore() {<NEW_LINE>SessionSettings settings = mState.mSettings;<NEW_LINE>if (settings == null) {<NEW_LINE>settings = new SessionSettings.Builder().withDefaultSettings(mContext).build();<NEW_LINE>} else {<NEW_LINE>updateTrackingProtection();<NEW_LINE>}<NEW_LINE>mState.mSession = createGeckoSession(setting...
-> listener.onSessionAdded(this));
1,727,431
public void initialize() throws ContainerInitializationException {<NEW_LINE>Timer.start("SPARK_COLD_START");<NEW_LINE>log.debug("First request, getting new server instance");<NEW_LINE>// trying to call init in case the embedded server had not been initialized.<NEW_LINE>Spark.init();<NEW_LINE>// adding this call to make...
"SparkFilter", embeddedServer.getSparkFilter());
793,412
public void runScript() throws IOException {<NEW_LINE>String startupScript = mlContext.getProperties(<MASK><NEW_LINE>List<String> args = new ArrayList<>();<NEW_LINE>String pythonVersion = mlContext.getProperties().getOrDefault(MLConstants.PYTHON_VERSION, "");<NEW_LINE>String pythonExec = "python" + pythonVersion;<NEW_L...
).get(MLConstants.STARTUP_SCRIPT_FILE);
1,195,432
private void controlChangeListener() {<NEW_LINE>Renderable before = active;<NEW_LINE>// switch (this.jtp.getTabComponentAt(this.jtp.getSelectedIndex()).getName()) {<NEW_LINE>switch(this.jtp.getTitleAt(this.jtp.getSelectedIndex())) {<NEW_LINE>case XYZ_TAB:<NEW_LINE>// TODO: XYZ Renderable<NEW_LINE>active = cornerRendera...
RenderableUtils.registerRenderable(this.active);
773,837
protected void log(Environment result) {<NEW_LINE>if (logger.isInfoEnabled()) {<NEW_LINE>logger.info(String.format("Located environment: name=%s, profiles=%s, label=%s, version=%s, state=%s", result.getName(), result.getProfiles() == null ? "" : Arrays.asList(result.getProfiles()), result.getLabel(), result.getVersion(...
, result.getState()));
1,616,175
// get a field of keyword type in the fields<NEW_LINE>private static void resolveKeywordFields(SearchContext searchContext, JSONObject fieldObject, String colName) {<NEW_LINE>String fieldType = (String) fieldObject.get("type");<NEW_LINE>// string-type field used keyword type to generate predicate<NEW_LINE>// if text fi...
JSONObject) fieldObject.get("fields");
1,356,283
public Message read() {<NEW_LINE>assert hasNext();<NEW_LINE>mNMessages = (mNMessages + 1) % mCheckMessagesPerSecond;<NEW_LINE>if (mNMessages % mCheckMessagesPerSecond == 0) {<NEW_LINE>RateLimitUtil.acquire(mCheckMessagesPerSecond);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (message == null) {<NEW_LINE>return null;<NEW_LIN...
Message message = mKafkaMessageIterator.next();
975,738
public DeckCardLists importDeck(String fileName, StringBuilder errorMessages, boolean saveAutoFixedFile) {<NEW_LINE>File f = new File(fileName);<NEW_LINE>DeckCardLists deckList = new DeckCardLists();<NEW_LINE>if (!f.exists()) {<NEW_LINE>logger.warn("Deckfile " + fileName + " not found.");<NEW_LINE>return deckList;<NEW_...
logger.fatal(null, ex);
379,452
public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>UnidbgPointer <MASK><NEW_LINE>UnidbgPointer jfieldID = context.getPointerArg(2);<NEW_LINE>ByteBuffer buffer = ByteBuffer.allocate(16);<NEW_LINE>buffer.order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>buffer.put(emulato...
clazz = context.getPointerArg(1);
953,674
protected void onFragmentCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>stateLayout.setEmptyText(R.string.no_search_results);<NEW_LINE>getLoadMore().initialize(getPresenter().getCurrentPage(), getPresenter().getPreviousTotal());<NEW_LINE>stateLayout.setOnReloadListener(this);<NEW_LINE>refre...
adapter.setListener(getPresenter());
1,097,144
public static DescribeCouponDetailResponse unmarshall(DescribeCouponDetailResponse describeCouponDetailResponse, UnmarshallerContext context) {<NEW_LINE>describeCouponDetailResponse.setRequestId(context.stringValue("DescribeCouponDetailResponse.RequestId"));<NEW_LINE>describeCouponDetailResponse.setCouponTemplateId(con...
(context.stringValue("DescribeCouponDetailResponse.ExpiredTime"));
1,493,027
private static void findSyntacticRelationsFromDependency(List<Mention> orderedMentions) {<NEW_LINE>if (orderedMentions.size() == 0)<NEW_LINE>return;<NEW_LINE>markListMemberRelation(orderedMentions);<NEW_LINE>SemanticGraph dependency = <MASK><NEW_LINE>// apposition<NEW_LINE>Set<Pair<Integer, Integer>> appos = Generics.n...
orderedMentions.get(0).enhancedDependency;
1,141,046
private void buildDestinationItem(@NonNull View view, final TargetPoint destination, int[] startTime, final TransportRouteResultSegment segment, double walkSpeed) {<NEW_LINE>OsmandApplication app = requireMyApplication();<NEW_LINE>Typeface typeface = FontCache.getRobotoMedium(app);<NEW_LINE>FrameLayout baseItemView = n...
segment, null, walkDist, walkSpeed);
1,047,283
public JsonArray filesTimeSeries(Dataverse d) {<NEW_LINE>Query query = em.createNativeQuery("select distinct date, count(id)\n" + "from (\n" + "select min(to_char(COALESCE(releasetime, createtime), 'YYYY-MM')) as date, filemetadata.id as id\n" + "from datasetversion, filemetadata\n" + "where datasetversion.id=filemetad...
"Dataverse") + "))\n ") + "group by filemetadata.id) as subq group by subq.date order by date;");
1,779,917
public void checkCurrentToken() {<NEW_LINE>HttpSession httpSession = request.getSession(false);<NEW_LINE>if (httpSession == null)<NEW_LINE>return;<NEW_LINE>SerializableKeycloakAccount account = (SerializableKeycloakAccount) httpSession.getAttribute(KeycloakAccount.class.getName());<NEW_LINE>if (account == null) {<NEW_L...
success = session.refreshExpiredToken(false);
916,058
public synchronized boolean saveRecentSearch(String query) {<NEW_LINE>// prevent duplicate entries<NEW_LINE>String historyEntry = queryMap.get(query);<NEW_LINE>if (historyEntry != null) {<NEW_LINE>searchHistory.remove(historyEntry);<NEW_LINE>}<NEW_LINE>// add new entry<NEW_LINE>String now = Instant.now().with(ChronoFie...
remove(searchHistory.lastKey());
196,841
public ImmutableMap<ShipmentScheduleId, List<I_M_ShipmentSchedule_QtyPicked>> retrieveOnShipmentLineRecordsByScheduleIds(@NonNull final Set<ShipmentScheduleId> scheduleIds) {<NEW_LINE>final boolean onShipmentLine = true;<NEW_LINE>final List<I_M_ShipmentSchedule_QtyPicked> records = queryBL.createQueryBuilder(I_M_Shipme...
.create().list();
850,416
<T> BindingImpl<T> createProvidedByBinding(Key<T> key, Scoping scoping, ProvidedBy providedBy, Errors errors) throws ErrorsException {<NEW_LINE>final Class<?> rawType = key.getTypeLiteral().getRawType();<NEW_LINE>final Class<? extends Provider<?>> providerType = providedBy.value();<NEW_LINE>// Make sure it's not the sa...
providerType, rawType).toException();
1,641,444
public void userLogout(final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/user/logout".replaceAll("\\{format\\}", "json");<NEW_LINE>// query params<NEW_LINE>List<Pair> queryPa...
0 ? contentTypes[0] : "application/json";
1,190,824
private void propagate_array_constraints() {<NEW_LINE>// find max depth<NEW_LINE>int max = 0;<NEW_LINE>for (TypeVariableBV var : typeVariableList) {<NEW_LINE>int depth = var.depth();<NEW_LINE>if (depth > max) {<NEW_LINE>max = depth;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (max > 1) {<NEW_LINE>// hack for J2ME library, report...
"java.lang.Cloneable"), max - 1));
1,402,341
private ProducerRecord<K, V> createProducerRecord(final Message<?> message) {<NEW_LINE>MessageHeaders messageHeaders = message.getHeaders();<NEW_LINE>String topic = this.topicExpression != null ? this.topicExpression.getValue(this.evaluationContext, message, String.class) : messageHeaders.get(KafkaHeaders.TOPIC, String...
KafkaHeaders.PARTITION_ID, Integer.class);
687,867
private void logFlavors(Transferable trans, Level level, boolean content) {<NEW_LINE>if (trans == null) {<NEW_LINE>log.log(level, " no clipboard contents");<NEW_LINE>} else {<NEW_LINE>if (content) {<NEW_LINE>java.awt.datatransfer.DataFlavor[<MASK><NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (int i = ...
] arr = trans.getTransferDataFlavors();
1,528,787
public void execute() throws UserException {<NEW_LINE>if (MailSystem.isValidEmailAddress(user.getUsername())) {<NEW_LINE>EmailMessage message = bimServer<MASK><NEW_LINE>String body = null;<NEW_LINE>String subject = null;<NEW_LINE>try {<NEW_LINE>InternetAddress addressFrom = new InternetAddress(bimServer.getServerSettin...
.getMailSystem().createMessage();
936,346
public <T> Flux<T> execute(RedisScript<T> script, List<K> keys, List<?> args, RedisElementWriter<?> argsWriter, RedisElementReader<T> resultReader) {<NEW_LINE>Assert.notNull(script, "RedisScript must not be null!");<NEW_LINE>Assert.notNull(argsWriter, "Argument Writer must not be null!");<NEW_LINE>Assert.notNull(result...
keysAndArgs(argsWriter, keys, args);
660,036
protected void validate() {<NEW_LINE>super.validate();<NEW_LINE>Assert.notNull(getClaims().get(OidcProviderMetadataClaimNames.JWKS_URI), "jwksUri cannot be null");<NEW_LINE>Assert.notNull(getClaims().get(OidcProviderMetadataClaimNames.SUBJECT_TYPES_SUPPORTED), "subjectTypes cannot be null");<NEW_LINE>Assert.isInstanceO...
(OidcProviderMetadataClaimNames.ID_TOKEN_SIGNING_ALG_VALUES_SUPPORTED), "idTokenSigningAlgorithms must be of type List");
1,638,469
public void openTorrent(String fileName, String save_path) {<NEW_LINE>String uc_filename = fileName.toUpperCase(Locale.US);<NEW_LINE>boolean is_remote = uc_filename.startsWith("HTTP://") || uc_filename.startsWith("HTTPS://") || uc_filename.startsWith("MAGNET:");<NEW_LINE>if (console != null) {<NEW_LINE>// System.out.pr...
"Adding torrent: " + fileName + " and saving to " + downloadDir);
1,493,869
// driver method<NEW_LINE>public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>System.out.println("Enter the size of the array: ");<NEW_LINE>int size = sc.nextInt();<NEW_LINE><MASK><NEW_LINE>int target = sc.nextInt();<NEW_LINE>int[] nums = new int[size];<NEW_LINE>System.out.pr...
System.out.println("Enter the target value: ");
124,923
protected boolean transform(UseOnContext context, BlockState original, boolean playSound) {<NEW_LINE>if (super.transform(context, original, playSound)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// shovel special case: campfires<NEW_LINE>if (original.getBlock() instanceof CampfireBlock && original.getValue(CampfireBlo...
SoundSource.BLOCKS, 1.0F, 1.0F);