idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,285,891
public void readDir(String directory, Promise promise) {<NEW_LINE>try {<NEW_LINE>File file = new File(directory);<NEW_LINE>if (!file.exists())<NEW_LINE>throw new Exception("Folder does not exist");<NEW_LINE>File[] files = file.listFiles();<NEW_LINE>WritableArray fileMaps = Arguments.createArray();<NEW_LINE>for (File ch...
"name", childFile.getName());
815,972
public Result<List<Map<String, Object>>> apiList() {<NEW_LINE>//<NEW_LINE>List<Map<FieldDef, String>> //<NEW_LINE>infoList = //<NEW_LINE>this.dataAccessLayer.//<NEW_LINE>listObjectBy(//<NEW_LINE>EntityDef.INFO, emptyCondition());<NEW_LINE>infoList = (infoList == null) ? Collections.emptyList() : infoList;<NEW_LINE>//<N...
.get(FieldDef.ID));
1,846,558
private void handleRunningEvent(TaskEvent taskEvent, TaskInstance taskInstance) {<NEW_LINE>Channel channel = taskEvent.getChannel();<NEW_LINE>try {<NEW_LINE>if (taskInstance != null) {<NEW_LINE>if (taskInstance.getState().typeIsFinished()) {<NEW_LINE>logger.warn("task is finish, running event is meaningless, taskInstan...
setHost(taskEvent.getWorkerAddress());
671,808
protected void masterOperation(final ClusterSearchShardsRequest request, final ClusterState state, final ActionListener<ClusterSearchShardsResponse> listener) {<NEW_LINE>ClusterState clusterState = clusterService.state();<NEW_LINE>String[] concreteIndices = indexNameExpressionResolver.concreteIndexNames(clusterState, r...
add(shard.currentNodeId());
345,022
public okhttp3.Call deleteObjectsCall(String repository, String branch, PathList pathList, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = pathList;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/repositories/{repository}/branches/{branch}/objects/delete...
= new ArrayList<Pair>();
995,358
private void createTableViewer(Composite composite) {<NEW_LINE>tableViewer = new TableViewer(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);<NEW_LINE>tableColumnLayout = new TableColumnLayout();<NEW_LINE>composite.setLayout(tableColumnLayout);<NEW_LINE>createColumns();<NEW_LINE>final Table table = tableViewer....
pack, serverId).schedule();
1,643,193
public Request<UpdateContactFlowContentRequest> marshall(UpdateContactFlowContentRequest updateContactFlowContentRequest) {<NEW_LINE>if (updateContactFlowContentRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(UpdateContactFlowContentRequest)");<NEW_LINE>}<NEW_LINE>Reques...
jsonWriter = JsonUtils.getJsonWriter(stringWriter);
652,990
public void verifySignAlgOnly(JsonWebSignature signature) throws JWTTokenValidationFailedException {<NEW_LINE>String algHeader = signature.getAlgorithmHeaderValue();<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Signing Algorithm from header: " + algHeader);<NEW_LINE>}<NEW_LINE>rpSpecifiedSigningAlgorithm ...
this.clientId, this.signingAlgorithm };
62,874
public DBRecord translateRecord(DBRecord oldRec) {<NEW_LINE>if (oldRec == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DBRecord rec = TypedefDBAdapter.SCHEMA.createRecord(oldRec.getKey());<NEW_LINE>rec.setLongValue(TYPEDEF_DT_ID_COL, oldRec.getLongValue(V0_TYPEDEF_DT_ID_COL));<NEW_LINE>// default TYPEDEF_FLAGS_COL...
nextID().getValue());
1,108,701
protected void processExtension(SchemaRep.Extension el) throws Schema2BeansException {<NEW_LINE>if (debug)<NEW_LINE>config.messageOut.println("extension el=" + el);<NEW_LINE>String uniqueName = (String) parentUniqueNames.peek();<NEW_LINE>String name = (String) parentTypes.peek();<NEW_LINE>String base = el.getBase();<NE...
complexType = (SchemaRep.ComplexType) baseDef;
203,719
private void addStyleRangeForScope(ArrayList<StyleRange> styleRanges, Scope scope, boolean inner, LineStyleEvent event) {<NEW_LINE>StyleRange styleRange = new StyleRange();<NEW_LINE>ThemeSetting setting = null;<NEW_LINE>ThemeSetting excludeSetting = null;<NEW_LINE>if (scope.parent != null)<NEW_LINE>excludeSetting = sco...
) - styleRange.start + startLineOffset);
541,476
public static void waitForKeyStores(LibertyServer server) throws Exception {<NEW_LINE>Log.info(thisClass, "waitForKeyStores", "Waiting for keystore configurations to be loaded");<NEW_LINE>ConfigElementList<KeyStore> keyStores = server.getServerConfiguration().getKeyStores();<NEW_LINE>if (keyStores == null) {<NEW_LINE>L...
info(thisClass, "waitForKeyStores", "**********************************************************************");
163,964
public void translateNode(PTransform<PCollection<KV<K, InputT>>, PCollection<KeyedWorkItem<K, InputT>>> transform, FlinkStreamingTranslationContext context) {<NEW_LINE>PCollection<KV<K, InputT>> <MASK><NEW_LINE>KvCoder<K, InputT> inputKvCoder = (KvCoder<K, InputT>) input.getCoder();<NEW_LINE>SingletonKeyedWorkItemCoder...
input = context.getInput(transform);
465,002
private Mono<Response<Void>> deleteContinuousWebJobSlotWithResponseAsync(String resourceGroupName, String name, String webJobName, String slot, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required an...
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
390,734
public void sessionPut(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE>boolean createSession = Boolean.parseBoolean<MASK><NEW_LINE>HttpSession session = request.getSession(createSession);<NEW_LINE>if (createSession)<NEW_LINE>System.out.println("Created a new session with sessionID=...
(request.getParameter("createSession"));
1,458,463
public void marshall(EntityRecognizerProperties entityRecognizerProperties, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (entityRecognizerProperties == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(entity...
entityRecognizerProperties.getTrainingEndTime(), TRAININGENDTIME_BINDING);
644,460
public static void main(String[] args) {<NEW_LINE>// Prepare our context and sockets<NEW_LINE>try (ZContext context = new ZContext()) {<NEW_LINE>LRUQueueArg arg = new LRUQueueArg();<NEW_LINE>Socket frontend = context.createSocket(SocketType.ROUTER);<NEW_LINE>Socket backend = context.createSocket(SocketType.ROUTER);<NEW...
addPoller(poller, handle_backend, arg);
552,546
private Tuple<T> giveArrayInstances(TypeTag tag, PrefabValues prefabValues, LinkedHashSet<TypeTag> typeStack) {<NEW_LINE>Class<T> type = tag.getType();<NEW_LINE>Class<?> componentType = type.getComponentType();<NEW_LINE>TypeTag componentTag = new TypeTag(componentType);<NEW_LINE><MASK><NEW_LINE>T red = (T) Array.newIns...
prefabValues.realizeCacheFor(componentTag, typeStack);
646,766
public static void initRemixer(Application app) {<NEW_LINE>if (initialized) {<NEW_LINE>// Guarantee that this is just called once.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>initialized = true;<NEW_LINE>if (app != null) {<NEW_LINE>app.registerActivityLifecycleCallbacks(RemixerActivityLifecycleCallbacks.getInstance());<NEW_LI...
class, R.layout.color_list_variable_widget);
1,471,930
static void invoke(ProblemReporter problemReporter, MessageSend messageSend, MethodBinding method, Scope scope) {<NEW_LINE>if (messageSend != null) {<NEW_LINE>try {<NEW_LINE>if (shortMethod != null)<NEW_LINE>Permit.invoke(initProblem, shortMethod, problemReporter, messageSend, method);<NEW_LINE>else if (longMethod != n...
Throwable t = e.getCause();
1,096,354
public final void filter(final Collection<IFacet<ModelType>> facets) {<NEW_LINE>//<NEW_LINE>// Initialize current filters<NEW_LINE>this.facetCategoryFilters = createFacetCategoryQueryFilters(facets);<NEW_LINE>//<NEW_LINE>// Create the GridTab query<NEW_LINE>// starting from our seed/base query<NEW_LINE>final MQuery que...
ModelType> filters = createFacetCategoriesFilter(null);
1,658,133
private static Map<String, String> createTypeToJsonTypeMap() {<NEW_LINE>Map<String, String> typeToJsonTypeMap = new HashMap<>();<NEW_LINE>typeToJsonTypeMap.put("String", "string");<NEW_LINE>typeToJsonTypeMap.put("Integer", "integer");<NEW_LINE>typeToJsonTypeMap.put("Long", "long");<NEW_LINE>typeToJsonTypeMap.put("BigDe...
typeToJsonTypeMap.put("Boolean", "boolean");
649,457
public void actionPerformed(final ActionEvent e) {<NEW_LINE>if (RP.isRequestProcessorThread()) {<NEW_LINE>Lookup lookup = node.getLookup();<NEW_LINE>org.netbeans.modules.web.webkit.debugging.api.css.Rule rule = lookup.lookup(org.netbeans.modules.web.webkit.debugging.api.css.Rule.class);<NEW_LINE>Resource resource = loo...
Level.INFO, null, ex);
1,090,726
public void refresh(TableCell cell) {<NEW_LINE>Object dataSource = cell.getDataSource();<NEW_LINE>int num = -1;<NEW_LINE>if (dataSource instanceof Download) {<NEW_LINE>Download dl = (Download) dataSource;<NEW_LINE>BuddyPluginBeta beta = BuddyPluginUtils.getBetaPlugin();<NEW_LINE>if (beta != null && beta.getEnableAutoDo...
Number) peek_data.get("m");
887,388
public void add(byte[] sequence, int start, int len, int outputSymbol) {<NEW_LINE>assert _serialized != null : "Automaton already built.";<NEW_LINE>assert _previous == null || len == 0 || ByteArray.compare(_previous, 0, _previousLength, sequence, start, start + len) <= 0 : "Input must be sorted: " + Arrays.toString(Arr...
1] = p + ConstantArcSizeFST.ARC_SIZE;
1,051,477
public static byte[] rotatePixels(byte[] input, int width, int height, int rotation) {<NEW_LINE>byte[] output = new byte[input.length];<NEW_LINE>boolean swap = (rotation == 90 || rotation == 270);<NEW_LINE>boolean yflip = (rotation == 90 || rotation == 180);<NEW_LINE>boolean xflip = (<MASK><NEW_LINE>for (int x = 0; x <...
rotation == 270 || rotation == 180);
973,094
public boolean match(long alias_hash) {<NEW_LINE>long hash = alias_hash();<NEW_LINE>if (hash == alias_hash) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (expr instanceof SQLAllColumnExpr) {<NEW_LINE>SQLTableSource resolvedTableSource = ((SQLAllColumnExpr) expr).getResolvedTableSource();<NEW_LINE>if (resolvedTableSour...
SQLPropertyExpr) expr).getResolvedTableSource();
1,784,965
public void onClick(View arg0) {<NEW_LINE>ParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);<NEW_LINE>ps.setScaleRange(0.7f, 1.3f);<NEW_LINE>ps.setSpeedRange(0.1f, 0.25f);<NEW_LINE>ps.setRotationSpeedRange(90, 180);<NEW_LINE>ps.setFadeOut(200, new AccelerateInterpolator());<NEW_LINE>ps.oneSho...
ps.setRotationSpeedRange(90, 180);
1,206,974
private void addDeprecationHeaders(SparkSpringController controller) {<NEW_LINE>boolean isDeprecated = controller.getClass(<MASK><NEW_LINE>if (!isDeprecated) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DeprecatedAPI deprecated = controller.getClass().getAnnotation(DeprecatedAPI.class);<NEW_LINE>String controllerBasePath, mi...
).isAnnotationPresent(DeprecatedAPI.class);
1,825,473
public static void register() {<NEW_LINE>final BeanManager beanManager = BeanManager.getInstance();<NEW_LINE>final LoginCheckMidware loginCheck = beanManager.getReference(LoginCheckMidware.class);<NEW_LINE>final CSRFMidware csrfMidware = beanManager.getReference(CSRFMidware.class);<NEW_LINE>final Activity1A0001Validati...
loginCheck::handle, csrfMidware::fill);
409,456
public boolean deleteAccountFromProject(long projectId, String accountName) {<NEW_LINE>Account caller = CallContext.current().getCallingAccount();<NEW_LINE>// check that the project exists<NEW_LINE>Project project = getProject(projectId);<NEW_LINE>if (project == null) {<NEW_LINE>InvalidParameterValueException ex = new ...
ex.addProxyObject(domainUuid, "domainId");
994,441
public void onModuleLoad() {<NEW_LINE>// Create a tab bar with three items.<NEW_LINE>TabBar bar = new TabBar();<NEW_LINE>bar.addTab("foo");<NEW_LINE>bar.addTab("bar");<NEW_LINE>bar.addTab("baz");<NEW_LINE>// Hook up a tab listener to do something when the user selects a tab.<NEW_LINE>bar.addSelectionHandler(new Selecti...
get().add(bar);
869,281
public String call() throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>WorkCompleted workCompleted = emc.find(wi.getWorkCompleted(), WorkCompleted.class);<NEW_LINE>if (null == workCompleted) {<NEW_L...
persist(review, CheckPersistType.all);
197,357
public PoolOriginationIdentitiesFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PoolOriginationIdentitiesFilter poolOriginationIdentitiesFilter = new PoolOriginationIdentitiesFilter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.g...
)).unmarshall(context));
588,856
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>int primaryColor = themeColorUtils.primaryColor(getContext());<NEW_LINE>user = getArguments().getParcelable(ARG_USER);<NEW_LINE>arbitraryDataProvider = new ArbitraryDataProvider(getContext().getContentResolver());<NEW_LINE>// Inflate the layout for the ...
wrap(passwordField.getBackground());
686,189
public void dispatch(DownloadManagerListener listener, int type, Object _value) {<NEW_LINE>Object[] value = (Object[]) _value;<NEW_LINE>DownloadManagerImpl dm = (DownloadManagerImpl) value[0];<NEW_LINE>if (type == LDT_STATECHANGED) {<NEW_LINE>listener.stateChanged(dm, ((Integer) value[1]).intValue());<NEW_LINE>} else i...
(DiskManagerFileInfo) value[1]);
451,698
private Answer migrateVmWithVolumesWithinCluster(VMInstanceVO vm, VirtualMachineTO to, Host srcHost, Host destHost, Map<VolumeInfo, DataStore> volumeToPool) throws AgentUnavailableException {<NEW_LINE>// Initiate migration of a virtual machine with its volumes.<NEW_LINE>try {<NEW_LINE>List<Pair<VolumeTO, StorageFilerTO...
destHost.getId(), command);
1,440,823
private void collectFragmentSpread(FieldCollectorNormalizedQueryParams parameters, List<CollectedField> result, FragmentSpread fragmentSpread, Set<GraphQLObjectType> possibleObjects, GraphQLCompositeType astTypeCondition) {<NEW_LINE>if (!conditionalNodes.shouldInclude(parameters.getCoercedVariableValues(), fragmentSpre...
), result, newAstTypeCondition, newPossibleObjects);
914,224
private static FlavorsConfig createConfig() {<NEW_LINE>FlavorConfigBuilder b = new FlavorConfigBuilder();<NEW_LINE>b.addFlavor("default", 2., 16., 400, 10, Flavor.Type.BARE_METAL, x86_64);<NEW_LINE>b.addFlavor("medium-disk", 6., 12., 56, 10, Flavor.Type.BARE_METAL, x86_64);<NEW_LINE>b.addFlavor("large", 4., 32., 1600, ...
Flavor.Type.BARE_METAL, x86_64);
679,224
/*<NEW_LINE>* update an existing jar file. Adds/replace files specified in relpathToFile map<NEW_LINE>*/<NEW_LINE>public static void update(InputStream in, OutputStream out, Map<String, File> relpathToFile) throws IOException {<NEW_LINE>ZipInputStream zis = null;<NEW_LINE>ZipOutputStream zos = null;<NEW_LINE>try {<NEW_...
setTime(e.getTime());
530,840
public // ***********************************************************************************<NEW_LINE>void fill(Automaton a, TIntHashSet alphabet) {<NEW_LINE>int max = max(alphabet);<NEW_LINE>int min = min(alphabet);<NEW_LINE>this.<MASK><NEW_LINE>HashMap<State, State> m = new HashMap<>();<NEW_LINE>Set<State> states = ...
setDeterministic(a.isDeterministic());
1,031,820
public void write(Encoder encoder, AnnotationProcessingData value) throws Exception {<NEW_LINE>HierarchicalNameSerializer hierarchicalNameSerializer = classNameSerializerSupplier.get();<NEW_LINE>SetSerializer<String> typesSerializer = new SetSerializer<>(hierarchicalNameSerializer);<NEW_LINE>MapSerializer<String, Set<S...
write(encoder, value.generatedResourcesDependingOnAllOthers);
1,718,228
protected void initASB(AnalysisEngineDescription aAnalysisEngineDescription, Map<String, Object> aAdditionalParams) throws ResourceInitializationException {<NEW_LINE>// add this analysis engine's name to the parameters sent to the ASB<NEW_LINE>Map<String, Object> asbParams = new HashMap<String, Object>(aAdditionalParam...
Resource.PARAM_RESOURCE_MANAGER, getResourceManager());
1,206,295
public QueryIterator execEvaluated(final Binding binding, final Node subject, final Node predicate, final PropFuncArg object, final ExecutionContext execCxt) {<NEW_LINE>if (!object.getArg(0).isLiteral() || !object.getArg(1).isLiteral()) {<NEW_LINE>return IterLib.noResults(execCxt);<NEW_LINE>}<NEW_LINE>String s = object...
getArg(1).getLiteralLexicalForm();
1,133,779
protected void wurstRenderLabelIfPresent(T entity, Text text, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {<NEW_LINE>double d = this.dispatcher.getSquaredDistanceToCamera(entity);<NEW_LINE>if (d > 4096)<NEW_LINE>return;<NEW_LINE>NameTagsHack nameTagsHack = WurstClient.INSTANCE.getHax(...
) (g * 255.0F) << 24;
1,004,439
public PPOrderIssueSchedule issue(@NonNull PPOrderIssueScheduleProcessRequest request) {<NEW_LINE>final PPOrderIssueScheduleId issueScheduleId = request.getIssueScheduleId();<NEW_LINE>PPOrderIssueSchedule <MASK><NEW_LINE>if (issueSchedule.getIssued() != null) {<NEW_LINE>throw new AdempiereException("Already issued");<N...
issueSchedule = issueScheduleRepository.getById(issueScheduleId);
1,273,787
public List<?> deserialize(final String topic, final byte[] bytes) {<NEW_LINE>if (bytes == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final String recordCsvString = new String(bytes, StandardCharsets.UTF_8);<NEW_LINE>final List<CSVRecord> csvRecords = CSVParser.parse(<MASK><NEW_LINE>if (csvRecords...
recordCsvString, csvFormat).getRecords();
557,287
private FileObject generateMavenTester(File testdir, String baseURL) throws IOException {<NEW_LINE>String[] replaceKeys1 = { "TTL_TEST_RESBEANS", "MSG_TEST_RESBEANS_INFO" };<NEW_LINE>String[] replaceKeys2 = { "MSG_TEST_RESBEANS_wadlErr", "MSG_TEST_RESBEANS_No_AJAX", "MSG_TEST_RESBEANS_Resource", "MSG_TEST_RESBEANS_See"...
MiscUtilities.copyFile(testdir, "images/pname.png");
226,714
public void Picture(@Asset final String path) {<NEW_LINE>if (MediaUtil.isExternalFile(container.$context(), path) && container.$form().isDeniedPermission(Manifest.permission.READ_EXTERNAL_STORAGE)) {<NEW_LINE>container.$form().askPermission(Manifest.permission.READ_EXTERNAL_STORAGE, new PermissionResultHandler() {<NEW_...
path == null) ? "" : path;
151,949
private JsonResponseUpsertItemBuilder syncJsonLocation(@NonNull final OrgId orgId, @NonNull final JsonRequestLocationUpsertItem locationUpsertItem, @NonNull final SyncAdvise parentSyncAdvise, @NonNull final ShortTermLocationIndex shortTermIndex) {<NEW_LINE>final ExternalIdentifier locationIdentifier = ExternalIdentifie...
existingLocation = shortTermIndex.extractAndMarkUsed(locationIdentifier);
629,238
public TcpOption newInstance(byte[] rawData, int offset, int length, Class<? extends TcpOption> dataClass) {<NEW_LINE>if (rawData == null || dataClass == null) {<NEW_LINE>StringBuilder sb = new StringBuilder(40);<NEW_LINE>sb.append("rawData: ").append(rawData).append(" dataClass: ").append(dataClass);<NEW_LINE>throw ne...
NullPointerException(sb.toString());
993,311
/* helper for printInstanceList. prints a single feature within an instance */<NEW_LINE>private static void printFeature(Object o, int fvi, double featureValue, String formatString) {<NEW_LINE>// print object n,w,c,e<NEW_LINE>char c1 = formatString.charAt(2);<NEW_LINE>if (c1 == 'w') {<NEW_LINE>// word<NEW_LINE>System....
c2 = formatString.charAt(1);
1,348,696
public static DescribeDataAssetsResponse unmarshall(DescribeDataAssetsResponse describeDataAssetsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDataAssetsResponse.setRequestId(_ctx.stringValue("DescribeDataAssetsResponse.RequestId"));<NEW_LINE>describeDataAssetsResponse.setPageSize(_ctx.integerValue("DescribeDa...
("DescribeDataAssetsResponse.Items[" + i + "].TotalCount"));
660,114
private void handleNonNormalizedNumberError(@NonNull String originalNumber, @NonNull String normalizedNumber, @NonNull Mode mode) {<NEW_LINE>try {<NEW_LINE>Phonenumber.PhoneNumber phoneNumber = PhoneNumberUtil.getInstance().parse(normalizedNumber, null);<NEW_LINE>new MaterialAlertDialogBuilder(requireContext()).setTitl...
(phoneNumber.getNationalNumber()));
1,775,566
public void restoreMessage(SIMPMessage msgItem, boolean commit) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "restoreMessage", new Object[] { msgItem });<NEW_LINE>int priority = msgItem.getPriority();<NEW_LINE>Reliability reliability = m...
(priority, reliability), true);
994,415
void sendHeartbeatSync(Node node) {<NEW_LINE>HeartbeatHandler heartbeatHandler = new HeartbeatHandler(localMember, node);<NEW_LINE>HeartBeatRequest req = new HeartBeatRequest();<NEW_LINE>req.setCommitLogTerm(request.commitLogTerm);<NEW_LINE>req.setCommitLogIndex(request.commitLogIndex);<NEW_LINE>req.setRegenerateIdenti...
"{}: Cannot send heartbeat to node {} due to network", memberName, node, e);
337,804
public boolean onPreDraw() {<NEW_LINE>// rotation fix, if not set, originalTitleY = Na<NEW_LINE><MASK><NEW_LINE>ViewCompat.setTranslationX(mLogo, 0);<NEW_LINE>originalTitleY = ViewCompat.getY(mLogo);<NEW_LINE>originalTitleX = ViewCompat.getX(mLogo);<NEW_LINE>originalTitleHeight = mLogo.getHeight();<NEW_LINE>finalTitleH...
ViewCompat.setTranslationY(mLogo, 0);
962,399
static void deleteSourceIndexAndTransferAliases(Client client, IndexMetadata sourceIndex, String targetIndex, ActionListener<Void> listener) {<NEW_LINE>String sourceIndexName = sourceIndex.getIndex().getName();<NEW_LINE>IndicesAliasesRequest aliasesRequest = new IndicesAliasesRequest().masterNodeTimeout(TimeValue.MAX_V...
)).writeIndex(null));
8,802
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>checkTableClass_result result = new checkTableClass_result();<NEW_LINE>if (e instanceof ThriftSecurityException) {<NEW_LINE>result.sec = (ThriftSecur...
_LOGGER.error("Exception inside handler", e);
489,796
private void startFloorFetch() throws IndexOutOfBoundsException {<NEW_LINE>BuildingModel building = mAnyplaceCache.getSelectedBuilding();<NEW_LINE>if (building != null) {<NEW_LINE>spinnerBuildings.setEnabled(false);<NEW_LINE>building.loadFloors(this, new FetchFloorsByBuidTask.FetchFloorsByBuidTaskListener() {<NEW_LINE>...
(List<FloorModel>) floors);
1,713,994
final UpdateApiResult executeUpdateApi(UpdateApiRequest updateApiRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateApiRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateApiRequest> request = null;<NE...
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
513,739
public static void bindEventFields(BoundStatement bound, IDeviceEvent event) throws SiteWhereException {<NEW_LINE>bound.setUUID(<MASK><NEW_LINE>bound.setUUID(FIELD_EVENT_ID, event.getId());<NEW_LINE>if (event.getAlternateId() != null) {<NEW_LINE>bound.setString(FIELD_ALTERNATE_ID, event.getAlternateId());<NEW_LINE>}<NE...
FIELD_DEVICE_ID, event.getDeviceId());
1,014,473
private Result queryDbRecord(@NonNull final HUTraceEventQuery huTraceEventQuery, @NonNull final EmptyResultSupplier emptyResultSupplier) {<NEW_LINE>final Result resultOut = emptyResultSupplier.newEmptyResult();<NEW_LINE>final IQueryBuilder<I_M_HU_Trace> queryBuilder = createQueryBuilderOrNull(huTraceEventQuery);<NEW_LI...
.addAll(recurseForwards(noRecursiveResult));
1,545,719
private List<ElementFilter> createTypeFilter(final EnclosingClass enclosingClass) {<NEW_LINE>List<ElementFilter> superTypeIndices = new ArrayList<>();<NEW_LINE>Expression superClass = enclosingClass.getSuperClass();<NEW_LINE>if (superClass != null) {<NEW_LINE>String superClsName = enclosingClass.extractUnqualifiedSuper...
QualifiedName.create(superClsName)));
464,876
public JanusGraphElement retrieve(Object elementId, JanusGraphTransaction tx) {<NEW_LINE>Preconditions.checkArgument(elementId != null, "Must provide elementId");<NEW_LINE>switch(this) {<NEW_LINE>case VERTEX:<NEW_LINE>Preconditions.checkArgument(elementId instanceof Long, "elementId [%s] must be of type Long", elementI...
.getVertex((Long) elementId);
1,351,788
private void start(ServerRequest req, ServerResponse res) {<NEW_LINE>long timeLimit = req.queryParams().first(TIME_LIMIT_PARAM_NAME).map(Long::valueOf).orElse(0L);<NEW_LINE>String parentLRA = req.queryParams().first(PARENT_LRA_PARAM_NAME).orElse("");<NEW_LINE>String lraUUID = UUID<MASK><NEW_LINE>URI lraId = coordinator...
.randomUUID().toString();
848,289
protected ConsoleReporter createInstance() {<NEW_LINE>final ConsoleReporter.Builder reporter = ConsoleReporter.forRegistry(getMetricRegistry());<NEW_LINE>if (hasProperty(DURATION_UNIT)) {<NEW_LINE>reporter.convertDurationsTo(getProperty(DURATION_UNIT, TimeUnit.class));<NEW_LINE>}<NEW_LINE>if (hasProperty(RATE_UNIT)) {<...
(CLOCK_REF, Clock.class));
588,389
public boolean visit(MySqlDeclareHandlerStatement x) {<NEW_LINE>String handleType = x.getHandleType().name();<NEW_LINE>print0(ucase ? "DECLARE " : "declare ");<NEW_LINE>print0(ucase ? handleType : handleType.toLowerCase());<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < x.getConditionValues().size(); i++) {<NEW_LINE>Cond...
print0(ucase ? " HANDLER FOR " : " handler for ");
1,692,362
protected Object doInBackground() throws Exception {<NEW_LINE>downloadTaskRunning = true;<NEW_LINE>AndroidSdkHandler mHandler = AndroidSdkHandler.getInstance(sdkFolder);<NEW_LINE>FileSystemFileOp fop = (FileSystemFileOp) FileOpUtils.create();<NEW_LINE>CustomSettings settings = new CustomSettings();<NEW_LINE>Downloader ...
mRepoManager = mHandler.getSdkManager(progress);
373,450
private boolean checkSquasher(FunctionDefinition squasher, Definition definition, Sort sort) {<NEW_LINE>if (squasher == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>ParametersLevel parametersLevel = UseTypechecking.typecheckLevel(null, squasher, definition, errorReporter);<NEW_LINE>if (parametersLevel == null) {<N...
() + " applies only to specific parameters", null));
1,218,601
final DescribeEndpointsResult executeDescribeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEndpointsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st...
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,278,751
// Create a bucket by using a S3Waiter object<NEW_LINE>public static void createBucket(S3Client s3Client, String bucketName, Region region) {<NEW_LINE>S3Waiter s3Waiter = s3Client.waiter();<NEW_LINE>try {<NEW_LINE>CreateBucketRequest bucketRequest = CreateBucketRequest.builder().bucket(bucketName).createBucketConfigura...
bucket(bucketName).build();
954,167
public View render(RenderedAdaptiveCard renderedCard, Context context, FragmentManager fragmentManager, ViewGroup viewGroup, BaseCardElement baseCardElement, ICardActionHandler cardActionHandler, HostConfig hostConfig, RenderArgs renderArgs) throws Exception {<NEW_LINE>TextBlock textBlock = Util.castTo(baseCardElement,...
textView, textBlock.GetStyle());
1,239,213
public Long duration(Date start, Date current, UnitStub unitStub) throws Exception {<NEW_LINE>EntityManager em = this.entityManagerContainer().get(Task.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Date> cq = cb.createQuery(Date.class);<NEW_LINE>Root<Task> root = cq.from(Task.cla...
= duration / (1000L * 60L);
1,212,662
private List<DataCheckEntity> computeAlertForRule(String domain, String type, String name, String monitor, List<Config> configs) {<NEW_LINE>List<DataCheckEntity> results = new ArrayList<DataCheckEntity>();<NEW_LINE>Pair<Integer, List<Condition>> conditionPair = m_ruleConfigManager.convertConditions(configs);<NEW_LINE>i...
> conditions = conditionPair.getValue();
1,244,230
public Process restrictProcess(String application, String flag) throws Exception {<NEW_LINE>EntityManager em = this.entityManagerContainer().get(Process.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Process> cq = <MASK><NEW_LINE>Root<Process> root = cq.from(Process.class);<NEW_LI...
cb.createQuery(Process.class);
288,125
private static boolean addJREPath(final File dir) {<NEW_LINE>if (dir != null && !dir.getPath().isEmpty() && FileUtils.canReadAndIsDir(dir)) {<NEW_LINE>final File[] dirFiles = dir.listFiles();<NEW_LINE>if (dirFiles != null) {<NEW_LINE>for (final File file : dirFiles) {<NEW_LINE>final <MASK><NEW_LINE>if (filePath.endsWit...
String filePath = file.getPath();
1,736,257
private static void trySelectWhereJoined4CoercionBack(RegressionEnvironment env, AtomicInteger milestone, String stmtText) {<NEW_LINE>env.compileDeployAddListenerMile(stmtText, "s0", milestone.getAndIncrement());<NEW_LINE>// intPrimitive, intBoxed, longBoxed, doubleBoxed<NEW_LINE>sendBean(env, "A", 1, 10, 200, 3000);<N...
, 0, -1, 0);
64,901
private void onVideoFileSelected(String filepath) {<NEW_LINE>mShortVideoTranscoder = new PLShortVideoTranscoder(this, filepath, Config.TRANSCODE_FILE_PATH);<NEW_LINE>mMediaFile = new PLMediaFile(filepath);<NEW_LINE>int bitrateInKbps = mMediaFile.getVideoBitrate() / 1000;<NEW_LINE>int videoWidthRaw = mMediaFile.getVideo...
int videoFrameRate = mMediaFile.getVideoFrameRate();
1,147,334
public void onBlockPistonRetract(BlockPistonRetractEvent event) {<NEW_LINE>if (event.isSticky()) {<NEW_LINE>EventDebounce.Entry entry = pistonRetractDebounce.getIfNotPresent(new BlockPistonRetractKey(event), event);<NEW_LINE>if (entry != null) {<NEW_LINE>Block piston = event.getBlock();<NEW_LINE>Cause cause = create(pi...
setCancelled(event.isCancelled());
1,066,018
public void acceptComment(final RequestContext context) {<NEW_LINE>context.renderJSON(StatusCodes.ERR);<NEW_LINE>final JSONObject requestJSONObject = context.requestJSON();<NEW_LINE>final JSONObject currentUser = Sessions.getUser();<NEW_LINE>final String userId = currentUser.optString(Keys.OBJECT_ID);<NEW_LINE>final St...
(langPropsService.get("sc403Label"));
211,271
public static AccessControlList parseGetBucketAcl(InputStream responseBody) throws ResponseParseException {<NEW_LINE>try {<NEW_LINE>Element root = getXmlRootElement(responseBody);<NEW_LINE>AccessControlList acl = new AccessControlList();<NEW_LINE>String id = root.getChild("Owner").getChildText("ID");<NEW_LINE>String di...
("AccessControlList").getChildText("Grant");
1,378,960
final DisassociateEnvironmentOperationsRoleResult executeDisassociateEnvironmentOperationsRole(DisassociateEnvironmentOperationsRoleRequest disassociateEnvironmentOperationsRoleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateEnvironmentOperationsRoleRequest);<NEW_LINE>AWSReque...
addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateEnvironmentOperationsRole");
1,524,814
private static PendingIntent createSnoozeIntent(Context context, long eventId, long startMillis, long endMillis, int notificationId) {<NEW_LINE>Intent intent = new Intent();<NEW_LINE>intent.putExtra(AlertUtils.EVENT_ID_KEY, eventId);<NEW_LINE>intent.putExtra(AlertUtils.EVENT_START_KEY, startMillis);<NEW_LINE>intent.put...
ContentUris.appendId(builder, startMillis);
1,396,978
private void printLocations(ClasspathLocation[] newLocations, ClasspathLocation[] oldLocations) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>System.out.println("JavaBuilder: New locations:");<NEW_LINE>for (// $NON-NLS-1$<NEW_LINE>int i = 0, length = newLocations.length; // $NON-NLS-1$<NEW_LINE>i < length; // $NON-NLS-1$<NEW_LINE...
[i].debugPathString());
1,146,853
protected boolean isMandatory(Field field) {<NEW_LINE>OneToMany oneToManyAnnotation = field.getAnnotation(OneToMany.class);<NEW_LINE>ManyToMany manyToManyAnnotation = field.getAnnotation(ManyToMany.class);<NEW_LINE>if (oneToManyAnnotation != null || manyToManyAnnotation != null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_...
field.getAnnotation(ManyToOne.class);
935,616
/*<NEW_LINE>* @see com.sitewhere.grpc.service.DeviceEventManagementGrpc.<NEW_LINE>* DeviceEventManagementImplBase#addStateChanges(com.sitewhere.grpc.service.<NEW_LINE>* GAddStateChangesRequest, io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void addStateChanges(GAddStateChangesRequest reque...
handleServerMethodExit(DeviceEventManagementGrpc.getAddStateChangesMethod());
1,294,192
protected Tuple3<Params, Iterable<String>, Iterable<Object>> serializeModel(TreeModelDataConverter modelData) {<NEW_LINE>List<String> serialized = new ArrayList<>();<NEW_LINE>int pStart = 0, pEnd = 0;<NEW_LINE>// toString partition of stringIndexerModel<NEW_LINE>if (modelData.stringIndexerModelSerialized != null) {<NEW...
.of(pStart, pEnd));
1,428,329
public ValueInstantiator constructValueInstantiator(DeserializationContext ctxt) throws JsonMappingException {<NEW_LINE>final DeserializationConfig config = ctxt.getConfig();<NEW_LINE>final JavaType delegateType = _computeDelegateType(ctxt, _creators[C_DELEGATE], _delegateArgs);<NEW_LINE>final JavaType arrayDelegateTyp...
.configureFromBigIntegerCreator(_creators[C_BIG_INTEGER]);
1,626,127
public String fireFactsValidate(MAcctSchema schema, List<Fact> facts, PO po) {<NEW_LINE>if (schema == null || facts == null || po == null || factsValidateListeners.size() == 0)<NEW_LINE>return null;<NEW_LINE>String propertyName = po.get_TableName() + "*";<NEW_LINE>List<FactsValidator> factsValidators = factsValidateLis...
() + po.getAD_Client_ID();
270,917
public Request<PutMetricDataRequest> marshall(PutMetricDataRequest putMetricDataRequest) {<NEW_LINE>if (putMetricDataRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(PutMetricDataRequest)");<NEW_LINE>}<NEW_LINE>Request<PutMetricDataRequest> request = new DefaultRequest<Pu...
, StringUtils.fromString(namespace));
326,874
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>ThriftPluginConfig config = new <MASK><NEW_LINE>final boolean traceServiceArgs = config.traceThriftS...
ThriftPluginConfig(instrumentor.getProfilerConfig());
909,451
public void build() {<NEW_LINE>// row<NEW_LINE>String[] protocols = { "HTTP", "HTTPS", "UDP", "DHT" };<NEW_LINE>String[] descs = { "HTTP", "HTTPS (SSL)", "UDP", "Decentralised" };<NEW_LINE>StringListParameterImpl protocol = new StringListParameterImpl(SCFG_SHARING_PROTOCOL, "ConfigView.section.sharing.protocol", protoc...
= new StringParameterImpl(SCFG_SHARING_TORRENT_COMMENT, "ConfigView.section.sharing.torrentcomment");
1,320,756
private AuthenticationInfo doAuthenticate(String username, HTTPHeaderAuthConfig config, String remoteAddr) {<NEW_LINE>LOG.debug("Attempting authentication for username <{}>", username);<NEW_LINE>try {<NEW_LINE>// Create already authenticated credentials to make sure the auth service backend doesn't try to<NEW_LINE>// a...
LOG.error("Unhandled authentication error", e);
1,781,678
private void enqueueFeedItems(@NonNull List<DownloadRequest> requests) {<NEW_LINE>List<FeedItem> feedItems = new ArrayList<>();<NEW_LINE>for (DownloadRequest request : requests) {<NEW_LINE>if (request.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {<NEW_LINE>long mediaId = request.getFeedfileId();<NEW_LINE>Feed...
> actuallyEnqueued = Collections.emptyList();
1,630,364
private void filterWhenSecurityEnabled(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain, UsernamePassword usernamePassword) throws IOException, ServletException {<NEW_LINE>if (usernamePassword == null) {<NEW_LINE>LOGGER.debug("Basic auth credentials are not provided in request.");<NEW_L...
authenticationProvider.authenticate(usernamePassword, null);
1,389,810
final UpdateBrokerStorageResult executeUpdateBrokerStorage(UpdateBrokerStorageRequest updateBrokerStorageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateBrokerStorageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest...
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
635,208
public static void load() {<NEW_LINE>String pkg = Scanner.cutOutLast(ServiceHandlingProxy.class.getName(), ".");<NEW_LINE>Set<String> classes = new Scanner(pkg).process(ServiceHandlingProxy.class.getClassLoader());<NEW_LINE>Set<String> custom = new Scanner(System.getProperty<MASK><NEW_LINE>classes.addAll(custom);<NEW_L...
("scouter.handler")).process();
853,209
final DeleteQuickConnectResult executeDeleteQuickConnect(DeleteQuickConnectRequest deleteQuickConnectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteQuickConnectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri...
(super.beforeMarshalling(deleteQuickConnectRequest));
1,693,596
private void initTypes(BinaryMapDataObject object) {<NEW_LINE>if (mapIndexFields == null) {<NEW_LINE>mapIndexFields = new MapIndexFields();<NEW_LINE>// mapIndexFields.mapIndex = object.getMapIndex();<NEW_LINE>mapIndexFields.downloadNameType = object.getMapIndex().getRule(FIELD_DOWNLOAD_NAME, null);<NEW_LINE>mapIndexFie...
FIELD_NAME + ":" + locale2, null);