idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,469,531
final DeleteQueueResult executeDeleteQueue(DeleteQueueRequest deleteQueueRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteQueueRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi...
(super.beforeMarshalling(deleteQueueRequest));
265,015
public void initGUI() {<NEW_LINE>this.infoTextArea.setFont(infoTextArea.getFont().deriveFont(Font.BOLD));<NEW_LINE>this.infoTextArea.setLineWrap(true);<NEW_LINE>this.infoTextArea.setOpaque(false);<NEW_LINE>this.infoTextArea.setWrapStyleWord(true);<NEW_LINE>this.infoTextArea.setEditable(false);<NEW_LINE>this.northPanel....
this.northPanel.setOpaque(false);
267,001
public static List<double[]> independentHueSat(List<File> images) {<NEW_LINE>List<double[]> points = new ArrayList<>();<NEW_LINE>// The number of bins is an important parameter. Try adjusting it<NEW_LINE>TupleDesc_F64 histogramHue = new TupleDesc_F64(30);<NEW_LINE>TupleDesc_F64 histogramValue = new TupleDesc_F64(30);<N...
UtilFeature.combine(histogramList, null);
1,297,554
protected void hookMethod(CtClass ctClass) throws IOException, CannotCompileException, NotFoundException {<NEW_LINE>String src = getInvokeStaticSrc(NioFilesRenameHook.class, "checkFileRename", "$1,$2", Object.class, Object.class);<NEW_LINE>insertBefore(ctClass, "copy", "(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/n...
Object.class, String.class);
104,394
void encode(PgEncoder encoder) {<NEW_LINE>this.encoder = encoder;<NEW_LINE>if (cmd.isSuspended()) {<NEW_LINE>encoder.writeExecute(cmd.cursorId(<MASK><NEW_LINE>encoder.writeSync();<NEW_LINE>} else {<NEW_LINE>PgPreparedStatement ps = (PgPreparedStatement) cmd.preparedStatement();<NEW_LINE>if (cmd.isBatch()) {<NEW_LINE>if...
), cmd.fetch());
1,634,153
private static List<Integer> populateAllEOptions() {<NEW_LINE>List<Integer> allEOptions = new ArrayList<Integer>();<NEW_LINE>allEOptions.add(OptionNumberRegistry.IF_MATCH);<NEW_LINE>allEOptions.add(OptionNumberRegistry.ETAG);<NEW_LINE>allEOptions.add(OptionNumberRegistry.IF_NONE_MATCH);<NEW_LINE>allEOptions.add(OptionN...
allEOptions.add(OptionNumberRegistry.LOCATION_QUERY);
1,624,189
private void scheduleSyncMonitoring() {<NEW_LINE>executor.scheduleAtFixedRate(() -> {<NEW_LINE>log.debug("Running the Sync Monitoring.");<NEW_LINE>try {<NEW_LINE>for (Map.Entry<String, DruidServerHolder> e : servers.entrySet()) {<NEW_LINE>DruidServerHolder serverHolder = e.getValue();<NEW_LINE>if (!serverHolder.syncer....
1, 5, TimeUnit.MINUTES);
1,823,076
private void applyStartedShards(RoutingAllocation routingAllocation, List<ShardRouting> startedShardEntries) {<NEW_LINE>assert startedShardEntries<MASK><NEW_LINE>RoutingNodes routingNodes = routingAllocation.routingNodes();<NEW_LINE>for (ShardRouting startedShard : startedShardEntries) {<NEW_LINE>assert startedShard.in...
.isEmpty() == false : "non-empty list of started shard entries expected";
1,568,592
private double computeTumbleDrag() {<NEW_LINE>// Computed based on Sampo's experimentation as documented in the pdf.<NEW_LINE>// compute the fin and body tube projected areas<NEW_LINE>double aFins = 0.0;<NEW_LINE>double aBt = 0.0;<NEW_LINE>Rocket r = this.getConfiguration().getRocket();<NEW_LINE>Iterator<RocketComponen...
cDFin * aFins + cDBt * aBt);
1,147,193
public static void main(String[] args) throws IOException {<NEW_LINE>// exported as documented at https://dev.languagetool.org/developing-a-tagger-dictionary,<NEW_LINE>// then taking only the full form: awk '{print $1}' dictionary-nl.dump<NEW_LINE>String filename = "/home/dnaber/lt/dictionary-nl.dump";<NEW_LINE>Morfolo...
), null, null, 1);
766,444
private void flush(ClusterDO clusterDO) {<NEW_LINE>ZkConfigImpl zkConfig = PhysicalClusterMetadataManager.getZKConfig(clusterDO.getId());<NEW_LINE>if (ValidateUtils.isNull(zkConfig)) {<NEW_LINE>LOGGER.error("flush topic properties, get zk config failed, clusterId:{}.", clusterDO.getId());<NEW_LINE>return;<NEW_LINE>}<NE...
KafkaZookeeperUtils.getTopicProperties(zkConfig, topicName);
35,019
protected void addForeignKeyStatements(AddColumnStatement statement, Database database, List<Sql> returnSql) {<NEW_LINE>for (ColumnConstraint constraint : statement.getConstraints()) {<NEW_LINE>if (constraint instanceof ForeignKeyConstraint) {<NEW_LINE>ForeignKeyConstraint fkConstraint = (ForeignKeyConstraint) constrai...
generateSql(addForeignKeyConstraintStatement, database)));
1,262,249
public void itemStateChanged(ItemEvent e) {<NEW_LINE>if (e.getItem() == webcam) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (webcam == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final WebcamPanel tmp = panel;<NEW_LINE>remove(panel);<NEW_LINE>webcam.removeWebcamListener(this);<NEW_LINE>webcam = (Webcam) e.getItem();<NEW...
= new WebcamPanel(webcam, false);
1,355,515
final GetGroupsResult executeGetGroups(GetGroupsRequest getGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L...
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,281,644
public void deleteMember(String workspaceId, String userId) {<NEW_LINE>GroupExample groupExample = new GroupExample();<NEW_LINE>groupExample.createCriteria().andTypeEqualTo(UserGroupType.WORKSPACE);<NEW_LINE>List<Group> groups = groupMapper.selectByExample(groupExample);<NEW_LINE>List<String> groupIds = groups.stream()...
user = userMapper.selectByPrimaryKey(userId);
349,807
public static QueryOperationAuditInfoListResponse unmarshall(QueryOperationAuditInfoListResponse queryOperationAuditInfoListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryOperationAuditInfoListResponse.setRequestId(_ctx.stringValue("QueryOperationAuditInfoListResponse.RequestId"));<NEW_LINE>queryOperationAuditInfo...
("QueryOperationAuditInfoListResponse.Data[" + i + "].DomainName"));
428,625
public CamundaFormDefinition execute(CommandContext commandContext) {<NEW_LINE>String binding = camundaFormRef.getBinding();<NEW_LINE>String key = camundaFormRef.getKey();<NEW_LINE>CamundaFormDefinitionEntity definition = null;<NEW_LINE>CamundaFormDefinitionManager manager = commandContext.getCamundaFormDefinitionManag...
camundaFormRef.getVersion(), null);
1,769,123
ActionResult<Wo> execute(EffectivePerson effectivePerson, String workId, JsonElement jsonElement) throws Exception {<NEW_LINE>Work work = null;<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>try (EntityManagerContainer emc = EntityManagerC...
find(workId, Work.class);
1,687,780
public synchronized void addAPIProvider(OASProviderWrapper inDoc) {<NEW_LINE>if (OpenAPIUtils.isEventEnabled(tc)) {<NEW_LINE>Tr.event(tc, "Started merging OASProvider: " + inDoc.getOpenAPIProvider());<NEW_LINE>}<NEW_LINE>conflictsMap.clear();<NEW_LINE>inDoc.getJsonPathKeys().clear();<NEW_LINE>OASProviders.add(inDoc);<N...
String operationId = operation.getOperationId();
27,109
final CreateSuiteDefinitionResult executeCreateSuiteDefinition(CreateSuiteDefinitionRequest createSuiteDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createSuiteDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>...
endClientExecution(awsRequestMetrics, request, response);
1,735,199
public com.squareup.okhttp.Call throttlingBlacklistConditionIdDeleteAsync(String conditionId, String ifMatch, String ifUnmodifiedSince, final ApiCallback<Void> callback) throws ApiException {<NEW_LINE>ProgressResponseBody.ProgressListener progressListener = null;<NEW_LINE>ProgressRequestBody.ProgressRequestListener pro...
onUploadProgress(bytesWritten, contentLength, done);
1,709,754
public ResponseEntity<JsonOLCandCreateBulkResponse> createOrderLineCandidates(@RequestBody @NonNull final JsonOLCandCreateBulkRequest bulkRequest) {<NEW_LINE>try {<NEW_LINE>bulkRequest.validate();<NEW_LINE>final MasterdataProvider masterdataProvider = MasterdataProvider.builder().permissionService(permissionServiceFact...
warn("Got exception while processing {}", bulkRequest, ex);
717,960
public void drawAsOneDot(String prefix, String name) {<NEW_LINE>DotGraph dot = new DotGraph(name);<NEW_LINE>dot.setGraphLabel(name);<NEW_LINE>dot.setGraphAttribute("compound", "true");<NEW_LINE>dot.setGraphAttribute("rankdir", "LR");<NEW_LINE>Map<Unit, Integer> node = new HashMap<Unit, Integer>();<NEW_LINE>int id = 0;<...
+ node.get(dst));
330,784
public static WorkspaceEdit handleWillRenameFiles(RenameFilesParams params, IProgressMonitor monitor) {<NEW_LINE>List<FileRename> files = params.getFiles();<NEW_LINE>if (files == null || files.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>FileRename[] renameFiles = new FileRename[0];<NEW_LINE>FileRename[] rena...
renameFolders.length + moveFiles.length);
1,631,340
private Mono<Response<FileServiceItemsInner>> listWithResponseAsync(String resourceGroupName, String accountName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE...
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
44,698
final StartMigrationResult executeStartMigration(StartMigrationRequest startMigrationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startMigrationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field....
invoke(request, responseHandler, executionContext);
1,325,202
final CreateMembersResult executeCreateMembers(CreateMembersRequest createMembersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createMembersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien...
addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateMembers");
1,504,226
private SaturnJobReturn handleException(long timeoutSeconds, Exception e) {<NEW_LINE>SaturnJobReturn saturnJobReturn;<NEW_LINE>String errMsg = e.toString();<NEW_LINE>if (watchdog.isTimeout()) {<NEW_LINE>saturnJobReturn = new SaturnJobReturn(SaturnSystemReturnCode.SYSTEM_FAIL, String.format("execute job timeout(%sms), %...
"{}-{} force stopped, {}", jobName, item, errMsg);
1,722,054
public void actionPerformed(ActionEvent e) {<NEW_LINE>String root = ModelSupport.getResourceRoot(testStep);<NEW_LINE>File file = UISupport.getFileDialogs().open(this, "Set properties source", "properties", "Properties Files (*.properties)", root);<NEW_LINE>if (file != null) {<NEW_LINE>updatingSource = true;<NEW_LINE>te...
cnt = testStep.loadProperties(createMissing);
1,610,582
public void draw(GLAutoDrawable drawable, boolean idle, Position machineCoord, Position workCoord, Position focusMin, Position focusMax, double scaleFactor, Position mouseCoordinates, Position rotation) {<NEW_LINE>if (points.isEmpty() && startLine > 0 && endLine > 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Scale was ...
.y, point.z));
1,096,906
private void rewriteWhenBlockForExceptionCondition(WhenBlock block) {<NEW_LINE>List<Statement> tryStats = block.getAst();<NEW_LINE>List<Statement> <MASK><NEW_LINE>block.setAst(blockStats);<NEW_LINE>blockStats.add(new ExpressionStatement(setThrownException(ConstantExpression.NULL)));<NEW_LINE>// ensure variables remain ...
blockStats = new ArrayList<>();
1,381,453
public void update() {<NEW_LINE>if (externalMetricsSupplier != null) {<NEW_LINE>Set<CompactionExecutorId> seenIds = new HashSet<>();<NEW_LINE>synchronized (exCeMetricsMap) {<NEW_LINE>externalMetricsSupplier.get().forEach(ecm -> {<NEW_LINE>seenIds.add(ecm.ceid);<NEW_LINE>ExMetrics exm = exCeMetricsMap.computeIfAbsent(ec...
queued.set(ecm.queued);
1,019,944
private static void readGifExtensionBlock(SequentialReader reader, Metadata metadata) throws IOException {<NEW_LINE>byte extensionLabel = reader.getInt8();<NEW_LINE>short blockSizeBytes = reader.getUInt8();<NEW_LINE>long blockStartPos = reader.getPosition();<NEW_LINE>switch(extensionLabel) {<NEW_LINE>case (byte) 0x01:<...
plainTextBlock = readPlainTextBlock(reader, blockSizeBytes);
466,946
public synchronized void delete(@NonNull Context context, @NonNull Uri uri) {<NEW_LINE>waitUntilInitialized();<NEW_LINE>if (!isAuthority(uri)) {<NEW_LINE>Log.d(TAG, "Can't delete. Not the authority for uri: " + uri);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log.d(TAG, "Deleting " + getId(uri));<NEW_LINE>try {<NEW_LINE>Stor...
+ getId(uri), e);
1,259,876
private void createDashboard(VisualisCommonResponseRef dashboardCreateResponseRef, NodeRequestRef requestRef) throws ExternalOperationFailedException {<NEW_LINE>String url = getBaseUrl() + URLUtils.dashboardPortalUrl + "/" + dashboardCreateResponseRef.getDashboardId() + "/dashboards";<NEW_LINE>VisualisPostAction visual...
int) header.get("code");
806,443
private void createLinks(Composite composite) {<NEW_LINE>Composite links = new Composite(composite, SWT.NONE);<NEW_LINE>GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).applyTo(links);<NEW_LINE>GridLayoutFactory.fillDefaults().margins(5, 5).applyTo(links);<NEW_LINE>addSectionLabel(links, Messages.IntroLabelActi...
Messages.IntroOpenFile, Messages.IntroOpenFileText);
1,076,128
public int largestSumAfterKNegations(int[] nums, int k) {<NEW_LINE>int ans = 0;<NEW_LINE>Map<Integer, Integer> <MASK><NEW_LINE>for (int num : nums) {<NEW_LINE>ans += num;<NEW_LINE>counter.put(num, counter.getOrDefault(num, 0) + 1);<NEW_LINE>}<NEW_LINE>for (int i = -100; i < 0; ++i) {<NEW_LINE>if (counter.getOrDefault(i...
counter = new HashMap<>();
1,046,533
private void handleDictionaryBasedColumn(SegmentDirectory.Writer segmentWriter, ColumnMetadata columnMetadata, RangeIndexCreatorProvider indexCreatorProvider) throws IOException {<NEW_LINE>int numDocs = columnMetadata.getTotalDocs();<NEW_LINE>try (ForwardIndexReader forwardIndexReader = LoaderUtils.getForwardIndexReade...
.getDictId(i, readerContext));
139,928
static void createSampleDatabase(DBPDataSourceRegistry dsRegistry) {<NEW_LINE>DataSourceDescriptor dataSource = (DataSourceDescriptor) dsRegistry.getDataSource(SAMPLE_DB1_ID);<NEW_LINE>if (dataSource != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DataSourceProviderDescriptor genericDSProvider = DataSourceProviderRegis...
= new File(dbFolder, SAMPLE_DB_FILE_NAME);
177,336
public List<ValidateError> validate() {<NEW_LINE>List<ValidateError> errors = new ArrayList<>();<NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.knowledgeId, convLabelName("Knowledge Id"));<NEW_LI...
.updateUser, convLabelName("Update User"));
598,072
public static void writeParticle(ByteBuf buf, ParticleBuilder particle) throws IOException {<NEW_LINE>int particleId = GlowParticle.getId(particle.particle());<NEW_LINE>Object data = particle.data();<NEW_LINE>ByteBufUtils.writeVarInt(buf, particleId);<NEW_LINE>Class<?> dataType = particle.particle().getDataType();<NEW_...
).getRed() / 255.0F);
1,410,275
public static <T extends ArgumentType<?>> void serialize(FriendlyByteBuf buffer, T type) {<NEW_LINE>ArgumentTypes.Entry<T> entry = (ArgumentTypes.Entry<MASK><NEW_LINE>if (entry == null) {<NEW_LINE>LOGGER.error("Could not serialize {} ({}) - will not be sent to client!", type, type.getClass());<NEW_LINE>buffer.writeReso...
<T>) get(type);
1,218,011
public NodeValue exec(NodeValue v1, NodeValue v2, NodeValue v3, NodeValue v4) {<NEW_LINE>try {<NEW_LINE>if (!v1.isNumber()) {<NEW_LINE>throw new ExprEvalException("Not a Number: " + FmtUtils.stringForNode(v1.asNode()));<NEW_LINE>}<NEW_LINE>if (!v2.isNumber()) {<NEW_LINE>throw new ExprEvalException("Not a Number: " + Fm...
(v2.asNode()));
1,640,668
final RestoreDomainAccessResult executeRestoreDomainAccess(RestoreDomainAccessRequest restoreDomainAccessRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(restoreDomainAccessRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest...
false), new RestoreDomainAccessResultJsonUnmarshaller());
1,584,683
// FIXME This type-by-string has to go, in favor of passing a class parameter.<NEW_LINE>public DvObject findByGlobalId(String globalIdString, String typeString, Boolean altId) {<NEW_LINE>try {<NEW_LINE>GlobalId gid = new GlobalId(globalIdString);<NEW_LINE>DvObject foundDvObject = null;<NEW_LINE>try {<NEW_LINE>Query que...
logger.info("Invalid identifier: " + globalIdString);
168,198
public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> superobjs) {<NEW_LINE>List<String> toRemove = new ArrayList<>();<NEW_LINE>for (Map.Entry<String, ModelsMap> modelEntry : superobjs.entrySet()) {<NEW_LINE>// process enum in models<NEW_LINE>List<ModelMap> models = modelEntry.getValue().getModels()...
CodegenModel cm = mo.getModel();
1,505,966
public static void process(GrayU8 src, final int kerA, final int kerB, GrayS16 derivX, GrayS16 derivY) {<NEW_LINE>final byte[] data = src.data;<NEW_LINE>final short[] imgX = derivX.data;<NEW_LINE>final short[] imgY = derivY.data;<NEW_LINE>final int width = src.getWidth();<NEW_LINE>final int height = src.getHeight() - 1...
indexSrc + strideSrc - 1] & 0xFF;
196,218
@ApiOperation(value = "Get all alert conditions of this stream")<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 404, message = "Stream not found."), @ApiResponse(code = 400, message = "Invalid ObjectId.") })<NEW_LINE>public AlertConditionListSummary list(@ApiParam(name = "streamId", value = "The id of the stream ...
collect(Collectors.toList());
359,052
public void handle(OnlineUser user, JSONObject message) throws IOException {<NEW_LINE>if (message.get("t").equals("userInfo")) {<NEW_LINE>LogManager.LOGGER.fine("(WS) User info request from " + user.getUser().getUsername());<NEW_LINE>JSONObject json = new JSONObject();<NEW_LINE>if (user.getUser().isGuest()) {<NEW_LINE>...
getObjectId().toString());
437,657
public Optional<ProjectIssueIdentifier> parseIssueIdFromUrl(String issueUrl) {<NEW_LINE>URI <MASK><NEW_LINE>List<NameValuePair> parameters = URLEncodedUtils.parse(url, StandardCharsets.UTF_8);<NEW_LINE>Optional<String> optionalProjectId = parameters.stream().filter(parameter -> "id".equals(parameter.getName())).map(Nam...
url = URI.create(issueUrl);
523,164
public static void moveUpgradedFiles(TsFileResource resource) throws IOException {<NEW_LINE>List<TsFileResource> upgradedResources = resource.getUpgradedResources();<NEW_LINE>for (TsFileResource upgradedResource : upgradedResources) {<NEW_LINE>File upgradedFile = upgradedResource.getTsFile();<NEW_LINE>long partition = ...
.getParentFile().getParent();
1,583,765
public String initLoader(String className) throws Exception {<NEW_LINE>File modeDirectory = new File(folder, getTypeName());<NEW_LINE>if (modeDirectory.exists()) {<NEW_LINE>Messages.log("checking mode folder regarding " + className);<NEW_LINE>// If no class name specified, search the main <modename>.jar for the<NEW_LIN...
archives = Util.listJarFiles(modeDirectory);
1,686,077
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {<NEW_LINE>ServletContext context = this.getServletConfig().getServletContext();<NEW_LINE>response.setContentType("text/html");<NEW_LINE>PrintWriter out = response.getWriter();<NEW_LINE>try {<NEW_LINE>File...
setImageHandler(new WebHtmlResourceHandler("image?image={0}"));
1,714,103
protected static void death(Person person, long time) {<NEW_LINE>if (ENABLE_DEATH_BY_NATURAL_CAUSES) {<NEW_LINE>double roll = person.rand();<NEW_LINE>double likelihoodOfDeath = likelihoodOfDeath(person.ageInYears(time));<NEW_LINE>if (roll < likelihoodOfDeath) {<NEW_LINE>person.recordDeath(time, NATURAL_CAUSES);<NEW_LIN...
person.recordDeath(time, LOSS_OF_CARE);
1,252,534
// ================================================================//<NEW_LINE>// MotionEvent methods<NEW_LINE>// ================================================================//<NEW_LINE>// ----------------------------------------------------------------//<NEW_LINE>@Override<NEW_LINE>public boolean onTouchEvent(Moti...
int pointerIndex = event.getActionIndex();
1,770,909
public void computeStockMoveInvoicingStatus(StockMove stockMove) {<NEW_LINE>int invoicingStatus = StockMoveRepository.STATUS_NOT_INVOICED;<NEW_LINE>if (stockMove.getStockMoveLineList() != null && stockMove.getInvoiceSet() != null && !stockMove.getInvoiceSet().isEmpty()) {<NEW_LINE>BigDecimal totalInvoicedQty = stockMov...
).orElse(BigDecimal.ZERO);
955,064
public static void mergeDependencies(final Dependency dependency, final Dependency relatedDependency, final Set<Dependency> dependenciesToRemove, final boolean copyVulnsAndIds) {<NEW_LINE>dependency.addRelatedDependency(relatedDependency);<NEW_LINE>relatedDependency.getRelatedDependencies().stream().forEach(dependency:...
).forEach(dependency::addSoftwareIdentifier);
1,002,955
private LookupsState<LookupExtractorFactoryMapContainer> doLookupManagementOnNode(HostAndPortWithScheme node, Map<String, LookupExtractorFactoryMapContainer> nodeTierLookupsToBe) throws IOException, InterruptedException, ExecutionException {<NEW_LINE><MASK><NEW_LINE>LookupsState<LookupExtractorFactoryMapContainer> curr...
LOG.debug("Starting lookup sync for node [%s].", node);
1,053,406
public static void copyDirectory(final File sourceDir, final File newDir) throws IOException {<NEW_LINE>final File[] srcFiles = sourceDir.listFiles();<NEW_LINE>if (srcFiles == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (newDir.exists() && !newDir.isDirectory()) {<NEW_LINE>throw new IOException("Destination '" + new...
throw new IOException("Failed to list contents of " + sourceDir);
1,247,850
private void resetSelected() {<NEW_LINE>final List<Integer> <MASK><NEW_LINE>if (preferences.isChecked()) {<NEW_LINE>resetActions.add(RESET_PREFERENCES);<NEW_LINE>}<NEW_LINE>if (instances.isChecked()) {<NEW_LINE>resetActions.add(ProjectResetter.ResetAction.RESET_INSTANCES);<NEW_LINE>}<NEW_LINE>if (forms.isChecked()) {<N...
resetActions = new ArrayList<>();
954,177
private Optional<Long> doStep(Supplier<Long> step) {<NEW_LINE>if (closed)<NEW_LINE>throw new IllegalStateException(this + "' is closed");<NEW_LINE>if (!isValid())<NEW_LINE>return Optional.empty();<NEW_LINE>try {<NEW_LINE>return Optional.of(step.get());<NEW_LINE>} catch (TransientException | ActivationConflictException ...
+ Exceptions.toMessageString(e));
1,663,008
private springfox.documentation.schema.ModelProperty modelProperty(BeanPropertyDefinition jacksonProperty, ModelContext modelContext, String propertyName, BaseModelProperty beanModelProperty) {<NEW_LINE>LOG.debug("Adding property {} to model", propertyName);<NEW_LINE>ModelPropertyBuilder propertyBuilder = new ModelProp...
example(beanModelProperty.example());
737,650
private <T extends MessageWithID> ImmutableList<T> checkPayloadReference(@NotNull final ImmutableList<T> publishes, @NotNull final String queueId, final boolean shared) {<NEW_LINE>List<T> reducedList = null;<NEW_LINE>for (final T message : publishes) {<NEW_LINE>if (message instanceof PUBLISH) {<NEW_LINE>final PUBLISH p...
getQoS().getQosNumber());
1,364,793
public boolean finish(ManufOrder manufOrder) throws AxelorException {<NEW_LINE>if (manufOrder.getTypeSelect() != ManufOrderRepository.TYPE_MAINTENANCE) {<NEW_LINE>return super.finish(manufOrder);<NEW_LINE>} else {<NEW_LINE>if (manufOrder.getOperationOrderList() != null) {<NEW_LINE>for (OperationOrder operationOrder : m...
manufOrder.setStatusSelect(ManufOrderRepository.STATUS_FINISHED);
647,371
protected void populateBindings(Bindings bindings) {<NEW_LINE>final String label = getName();<NEW_LINE>final String fileName = getFilename();<NEW_LINE>final String scriptParameters = getParameters();<NEW_LINE>// Use actual class name for log<NEW_LINE>final Logger elementLogger = LoggerFactory.getLogger(getClass().getNa...
JMeterContext jmctx = JMeterContextService.getContext();
261,276
public void received(final Stack vmStack) {<NEW_LINE>ApplicationManager.getApplication().executeOnPooledThread(() -> {<NEW_LINE>InstanceRef exceptionToAddToFrame = exception;<NEW_LINE>// Check for async causal frames; fall back to using regular sync frames.<NEW_LINE>ElementList<Frame> elementList = vmStack.getAsyncCaus...
getKind() == FrameKind.Regular);
825,165
public int compareTo(ScriptFileReference other) {<NEW_LINE>try {<NEW_LINE>Path path1 = Paths.get(scriptFileURL.toURI());<NEW_LINE>String name1 = path1.getFileName().toString();<NEW_LINE>LOGGER.trace("o1 [{}], path1 [{}], name1 [{}]", scriptFileURL, path1, name1);<NEW_LINE>Path path2 = Paths.get(other.scriptFileURL.toUR...
LOGGER.error("URI syntax exception", e);
330,810
public static String timeSpan(Context context, long time_s) {<NEW_LINE>// Time in unit x<NEW_LINE>int time_x;<NEW_LINE>Resources res = context.getResources();<NEW_LINE>if (Math.abs(time_s) < TIME_MINUTE) {<NEW_LINE>time_x = (int) time_s;<NEW_LINE>return res.getQuantityString(R.plurals.time_span_seconds, time_x, time_x)...
Math.round(time_s / TIME_YEAR);
42,120
public void visit(BLangWaitForAllExpr.BLangWaitLiteral waitLiteral) {<NEW_LINE>visitTypedesc(waitLiteral.pos, waitLiteral.getBType(), Collections.emptyList());<NEW_LINE>BIRBasicBlock thenBB = new BIRBasicBlock(this.env.nextBBId(names));<NEW_LINE>addToTrapStack(thenBB);<NEW_LINE>BIRVariableDcl tempVarDcl = new BIRVariab...
enclFunc.localVars.add(tempVarDcl);
1,727,909
final GetUsageStatisticsResult executeGetUsageStatistics(GetUsageStatisticsRequest getUsageStatisticsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getUsageStatisticsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetUsageStatist...
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
386,261
private ClusterState applyCreateIndexRequestWithExistingMetadata(final ClusterState currentState, final CreateIndexClusterStateUpdateRequest request, final boolean silent, final IndexMetadata sourceMetadata, final BiConsumer<Metadata.Builder, IndexMetadata> metadataTransformer) throws Exception {<NEW_LINE>logger.info("...
getIndex().getName());
653,679
private static Optional<Method> findPublicCopyMethod(Method defaultKotlinMethod) {<NEW_LINE>Class<?<MASK><NEW_LINE>KClass<?> kotlinClass = JvmClassMappingKt.getKotlinClass(type);<NEW_LINE>KFunction<?> primaryConstructor = KClasses.getPrimaryConstructor(kotlinClass);<NEW_LINE>if (primaryConstructor == null) {<NEW_LINE>r...
> type = defaultKotlinMethod.getDeclaringClass();
299,744
public void run(RegressionEnvironment env) {<NEW_LINE>SupportDeploymentStateListener.reset();<NEW_LINE>SupportDeploymentStateListener listener = new SupportDeploymentStateListener();<NEW_LINE>env.deployment().addDeploymentStateListener(listener);<NEW_LINE>env.compileDeploy("@name('s0') select * from SupportBean");<NEW_...
getDeploymentStateListeners().hasNext());
678,300
public double treePred(IntIntVector splitFeatVec, IntDoubleVector splitValueVec, IntDoubleVector nodePredVec, IntDoubleVector ins) {<NEW_LINE>assert splitFeatVec.getDim() == splitValueVec.getDim() && splitValueVec.getDim() == nodePredVec.getDim();<NEW_LINE>int nid = 0;<NEW_LINE>int splitFeat = splitFeatVec.get(nid);<NE...
splitFeat = splitFeatVec.get(nid);
902,789
public void send(final String serverIP, Message msg) {<NEW_LINE>if (serverIP == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, String> params = new HashMap<String, String>(10);<NEW_LINE>params.put("statuses", msg.getData());<NEW_LINE>params.put("clientIP", NetUtils.localServer());<NEW_LINE>String url = "http:...
warn("[STATUS-SYNCHRONIZE] failed to request serviceStatus, remote server: " + serverIP, e);
353,326
private List<Node> provisionHosts(int count, NodeResources nodeResources) {<NEW_LINE>try {<NEW_LINE>Version osVersion = nodeRepository().osVersions().targetFor(NodeType.host).orElse(Version.emptyVersion);<NEW_LINE>List<Integer> provisionIndices = nodeRepository().database().readProvisionIndices(count);<NEW_LINE>List<No...
addNodes(hosts, Agent.DynamicProvisioningMaintainer);
486,640
public void extract(byte[] segmentBytes, Metadata metadata, JpegSegmentType segmentType) {<NEW_LINE>JpegDirectory directory = new JpegDirectory();<NEW_LINE>metadata.addDirectory(directory);<NEW_LINE>// The value of TAG_COMPRESSION_TYPE is determined by the segment type found<NEW_LINE>directory.setInt(JpegDirectory.TAG_...
TAG_IMAGE_WIDTH, reader.getUInt16());
1,487,766
public static void main(String[] args) throws Exception {<NEW_LINE>ConvertInputStreamToStringBigBenchmark test = new ConvertInputStreamToStringBigBenchmark();<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("1. apacheToInputStream : " + test.apacheToInputStream().length());<NEW_LINE>System.out.println("2. gu...
jdkScanner().length());
237,307
private int createComplementDataCommand(Date scheduleDate) {<NEW_LINE>Command command = new Command();<NEW_LINE>command.setScheduleTime(scheduleDate);<NEW_LINE>command.setCommandType(CommandType.COMPLEMENT_DATA);<NEW_LINE>command.setProcessDefinitionCode(processInstance.getProcessDefinitionCode());<NEW_LINE>Map<String,...
setTaskDependType(processInstance.getTaskDependType());
1,795,106
ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>// logger.debug(effectivePerson, "receive:{}.", jsonElement);<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW...
), wi.getAlias());
321,482
public List<JoinActiveTraceBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {<NEW_LINE>final String id = decodingContext.getApplicationId();<NEW_LINE>final long baseTimestamp = decodingContext.getBaseTimestamp();<NEW_LINE>final <MASK><NEW_LINE>final long initialTimestamp = baseTimest...
long timestampDelta = decodingContext.getTimestampDelta();
131,301
public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {<NEW_LINE>if (request.getRestApiVersion() == RestApiVersion.V_7) {<NEW_LINE>if (request.hasParam(INCLUDE_TYPE_NAME_PARAMETER)) {<NEW_LINE>request.param(INCLUDE_TYPE_NAME_PARAMETER);<NEW_LINE>deprecationLogg...
types = request.paramAsStringArrayOrEmptyIfAll("type");
51,453
public Result<Void> delete(final Iterable<com.google.cloud.datastore.Key> keys) {<NEW_LINE>for (com.google.cloud.datastore.Key key : keys) deferrer.undefer(ofy.getOptions(), Key.create(key));<NEW_LINE>final Future<Void> fut = datastore.delete(keys);<NEW_LINE>final Result<Void> adapted = new ResultAdapter<>(fut);<NEW_LI...
.create(key), null);
1,035,974
protected Optional<Relationship> findRelationship(String userId, String firstGUID, String secondGUID, String firstEntityTypeName, String relationshipTypeName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException {<NEW_LINE>final String methodName = "findRelationship";<NEW_LINE>invalidPa...
repositoryHelper.getTypeDefByName(userId, relationshipTypeName);
694,044
private void fillPlaceArray(PlayerEntity target) {<NEW_LINE>placePositions.clear();<NEW_LINE>BlockPos targetPos = target.getBlockPos();<NEW_LINE>switch(topPlacement.get()) {<NEW_LINE>case Full -><NEW_LINE>{<NEW_LINE>add(targetPos.add(0, 2, 0));<NEW_LINE>add(targetPos.add(1, 1, 0));<NEW_LINE>add(targetPos.add(-1, 1, 0))...
(0, 1, 1));
681,463
protected void startDiscovering() {<NEW_LINE>mIsDiscovering = true;<NEW_LINE>mDiscoveredEndpoints.clear();<NEW_LINE>DiscoveryOptions.Builder discoveryOptions = new DiscoveryOptions.Builder();<NEW_LINE>discoveryOptions.setStrategy(getStrategy());<NEW_LINE>mConnectionsClient.startDiscovery(getServiceId(), new EndpointDis...
.format("onEndpointLost(endpointId=%s)", endpointId));
496,759
public void read(org.apache.thrift.protocol.TProtocol prot, TSummary struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(5);<NEW_LINE>if (incoming.get(0)) {<NEW_LI...
.filesContaining = iprot.readI64();
535,117
public void init(IBatchConfig batchConfig) throws BatchContainerServiceException {<NEW_LINE>logger.log(Level.CONFIG, "Entering CLASSNAME.init(), batchConfig ={0}", batchConfig);<NEW_LINE>this.batchConfig = batchConfig;<NEW_LINE>schema = batchConfig.getDatabaseConfigurationBean().getSchema();<NEW_LINE>jndiName = batchCo...
DataSource) ctx.lookup(jndiName);
1,393,881
public boolean visit(SwitchStatement node) {<NEW_LINE>if (!hasChildrenChanges(node)) {<NEW_LINE>return doVisitUnchangedChildren(node);<NEW_LINE>}<NEW_LINE>int pos = <MASK><NEW_LINE>ChildListPropertyDescriptor property = SwitchStatement.STATEMENTS_PROPERTY;<NEW_LINE>if (getChangeKind(node, property) != RewriteEvent.UNCH...
rewriteRequiredNode(node, SwitchStatement.EXPRESSION_PROPERTY);
1,196,235
private void drawPlaceholder(Canvas canvas) {<NEW_LINE>if (!isInEditMode())<NEW_LINE>return;<NEW_LINE>canvas.getClipBounds(rect);<NEW_LINE>int width = rect.width();<NEW_LINE>int verticalBlockNumber = 7;<NEW_LINE>int horizontalBlockNumber = <MASK><NEW_LINE>float marginBlock = (1.0F - 0.1F);<NEW_LINE>float blockWidth = w...
getHorizontalBlockNumber(lastWeeks * 7, verticalBlockNumber);
578,130
protected void doRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {<NEW_LINE>if (req instanceof MultipartHttpServletRequest) {<NEW_LINE>// We need to manually fix config if it's "form-data" by jetty's requirement,<NEW_LINE>// as this jetty is an embedded one, there's no XML...
this.config, req, resp);
858,179
public static void logOut(Simplenote application) {<NEW_LINE>application.getSimperium().deauthorizeUser();<NEW_LINE>application.getAccountBucket().reset();<NEW_LINE>application.getNotesBucket().reset();<NEW_LINE>application.getTagsBucket().reset();<NEW_LINE>application.getPreferencesBucket().reset();<NEW_LINE>applicati...
.clear().apply();
946,326
public FulfillmentEstimationResponse estimateCostForFulfillmentGroup(FulfillmentGroup fulfillmentGroup, Set<FulfillmentOption> options) throws FulfillmentPriceException {<NEW_LINE>FulfillmentEstimationResponse response = new FulfillmentEstimationResponse();<NEW_LINE>HashMap<FulfillmentOption, Money> prices = new HashMa...
+= ". Underlying message was: " + e.getMessage();
1,332,398
private void resolveForInstallationV1LookupTable(EntityV1 entity, InputEntity input, Map<String, ValueReference> parameters, Map<EntityDescriptor, Entity> entities, MutableGraph<Entity> graph) {<NEW_LINE>final Set<String> lookupTableNames = input.extractors().stream().filter(e -> e.type().asString(parameters).equals(Ex...
data(), LookupTableEntity.class);
1,110,415
public static EnergyInventorySlot fillOrConvert(IEnergyContainer energyContainer, Supplier<Level> worldSupplier, @Nullable IContentsListener listener, int x, int y) {<NEW_LINE>Objects.requireNonNull(energyContainer, "Energy container cannot be null");<NEW_LINE>Objects.requireNonNull(worldSupplier, "World supplier canno...
), stack).isZero();
65,021
public void stop() {<NEW_LINE>stopping = true;<NEW_LINE>taskExecutor.shutdown();<NEW_LINE>List<ListenableFuture<Void>> shutdownFutures = new ArrayList<>();<NEW_LINE>synchronized (tasks) {<NEW_LINE>for (ThreadingTaskRunnerWorkItem taskWorkItem : tasks.values()) {<NEW_LINE>shutdownFutures.add(scheduleTaskShutdown(taskWor...
() - start.getMillis();
1,304,653
public RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException {<NEW_LINE>final String id = request.param(MONITORING_ID);<NEW_LINE>if (Strings.isEmpty(id)) {<NEW_LINE>throw new IllegalArgumentException("no [" + MONITORING_ID + "] for monitoring bulk request");<NEW_LINE>}<NEW_LINE>f...
long timestamp = System.currentTimeMillis();
1,366,387
public int backfill(String schemaName, String tableName, ExecutionContext baseEc, Map<String, Set<String>> sourcePhyTables, Map<String, String> sourceTargetGroupMap) {<NEW_LINE>final long batchSize = baseEc.getParamManager().getLong(ConnectionParams.SCALEOUT_BACKFILL_BATCH_SIZE);<NEW_LINE>final long speedMin = baseEc.g...
).getLong(ConnectionParams.SCALEOUT_BACKFILL_PARALLELISM);
1,390,183
private org.opendope.xpaths.Xpaths.Xpath createNewXPathObject(String newPath, org.opendope.xpaths.Xpaths.Xpath xpathObj, int index) {<NEW_LINE>// org.opendope.xpaths.Xpaths.Xpath newXPathObj = XmlUtils<NEW_LINE>// .deepCopy(xpathObj);<NEW_LINE>org.opendope.xpaths.Xpaths.Xpath newXPathObj = new org.opendope.xpaths.Xpath...
log.warn("New xpath entry overwrites existing different xpath " + newXPathId);
1,542,713
public void addStatesForHalfLabelsConnectedAsIn(InstanceList trainingSet) {<NEW_LINE><MASK><NEW_LINE>boolean[][] connections = labelConnectionsIn(trainingSet);<NEW_LINE>for (int i = 0; i < numLabels; i++) {<NEW_LINE>@Var<NEW_LINE>int numDestinations = 0;<NEW_LINE>for (int j = 0; j < numLabels; j++) if (connections[i][j...
int numLabels = outputAlphabet.size();