idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
940,751
private void test(int substringSearchMethodId) {<NEW_LINE>String text = "abcdrenetestreneabdreneabcdd";<NEW_LINE>String pattern1 = "rene";<NEW_LINE>SubstringSearch substringSearch1 = createSubstringSearch(substringSearchMethodId, pattern1);<NEW_LINE>if (substringSearch1 == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>S...
(String.valueOf(offset));
269,919
final DescribeCopyJobResult executeDescribeCopyJob(DescribeCopyJobRequest describeCopyJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCopyJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F...
invoke(request, responseHandler, executionContext);
1,737,637
private Mono<PagedResponse<DedicatedHostInner>> listByHostGroupNextSinglePageAsync(String nextLink) {<NEW_LINE>if (nextLink == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>ret...
)).readOnly()));
948,855
public static Optional<PhotoDataBean> readPhotoDataFromLdap(final DomainConfig domainConfig, final ChaiProvider chaiProvider, final UserIdentity userIdentity) throws PwmUnrecoverableException, PwmOperationalException {<NEW_LINE>final LdapProfile ldapProfile = userIdentity.getLdapProfile(domainConfig.getAppConfig());<NE...
+ e.getMessage()));
1,386,121
public RelNode convert(RelNode rel) {<NEW_LINE>LogicalJoin join = (LogicalJoin) rel;<NEW_LINE>List<RelNode> newInputs = new ArrayList<>();<NEW_LINE>for (RelNode input : join.getInputs()) {<NEW_LINE>if (!(input.getConvention() instanceof EnumerableConvention)) {<NEW_LINE>input = convert(input, input.getTraitSet().replac...
), join.getJoinType());
746,148
public boolean acceptPatternMatch(TextSearchMatchAccess matchAccess) throws CoreException {<NEW_LINE>int start = matchAccess.getMatchOffset();<NEW_LINE>int length = matchAccess.getMatchLength();<NEW_LINE>// skip embedded FQNs (bug 130764):<NEW_LINE>if (start > 0) {<NEW_LINE>char before = matchAccess.getFileContentChar(...
, length, fNewValue), QUALIFIED_NAMES);
193,867
public void prepare(Progress progress) throws IOException {<NEW_LINE>if (prepared) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Artifact artifact = mrl.getDefaultArtifact();<NEW_LINE>mrl.prepare(artifact, progress);<NEW_LINE>Path root = mrl.getRepository().getResourceDirectory(artifact);<NEW_LINE>Path usagePath;<NEW_LINE>swi...
usagePath = Paths.get("test");
407,231
public CodeHookSpecification unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CodeHookSpecification codeHookSpecification = new CodeHookSpecification();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token =...
String currentParentElement = context.getCurrentParentElement();
1,048,385
public void updateSaleOrderLines(ProductCategory productCategory) throws AxelorException {<NEW_LINE>List<<MASK><NEW_LINE>impactedProductCategories.add(productCategory);<NEW_LINE>// fetch children<NEW_LINE>saleOrderLineRepository.all().// fetch children<NEW_LINE>filter("self.product.productCategory.id IN :productCategor...
ProductCategory> impactedProductCategories = fetchImpactedChildrenProductCategories(productCategory);
61,004
public List<IndexableField> createFields(ParseContext context, String name, Range range, boolean indexed, boolean docValued, boolean stored) {<NEW_LINE>assert range != null : "range cannot be null when creating fields";<NEW_LINE>List<IndexableField> <MASK><NEW_LINE>if (indexed) {<NEW_LINE>fields.add(getRangeField(name,...
fields = new ArrayList<>();
268,258
public String createAnalysisIssueSummary(PostAnalysisIssueVisitor.ComponentIssue componentIssue, FormatterFactory formatterFactory) {<NEW_LINE>final PostAnalysisIssueVisitor.LightIssue issue = componentIssue.getIssue();<NEW_LINE>String baseImageUrl = getBaseImageUrl();<NEW_LINE>Long effort = issue.effortInMinutes();<NE...
).format(document, formatterFactory);
453,083
public ObjectMapper createXmlMapper() {<NEW_LINE>ObjectMapper xmlMapper = initializeMapperBuilder(XmlMapper.builder()).defaultUseWrapper(false).enable(ToXmlGenerator.Feature.WRITE_XML_DECLARATION)./*<NEW_LINE>* In Jackson 2.12 the default value of this feature changed from true to false.<NEW_LINE>* https://github.com/F...
Feature.EMPTY_ELEMENT_AS_NULL).build();
674,313
private void readTileData(int tileNum, List<AbstractIlluminaPositionFileReader.PositionInfo> locs) {<NEW_LINE>int totalCycleCount = 0;<NEW_LINE>readHeader(tileNum);<NEW_LINE>if (cycleData[totalCycleCount].tileInfo == null) {<NEW_LINE>throw new PicardException("Could not find tile " + tileNum);<NEW_LINE>}<NEW_LINE>for (...
.getAbsolutePath()), e);
485,254
public void refresh() {<NEW_LINE>Map<String, ValidationToolFactory> map = new HashMap<>();<NEW_LINE>String libDir = PathUtils.concatPath(mConf.getString(PropertyKey.HOME), "lib");<NEW_LINE><MASK><NEW_LINE>List<File> files = new ArrayList<>();<NEW_LINE>try (DirectoryStream<Path> stream = Files.newDirectoryStream(Paths.g...
LOG.info("Loading validation tool jars from {}", libDir);
1,591,465
private void presentAuthUI() {<NEW_LINE><MASK><NEW_LINE>final IdentityManager identityManager = IdentityManager.getDefaultIdentityManager();<NEW_LINE>final boolean canCancel = this.authUIConfiguration.getCanCancel();<NEW_LINE>identityManager.login(this.loginCallingActivity, new DefaultSignInResultHandler() {<NEW_LINE><...
Log.d(LOG_TAG, "Presenting the SignIn UI.");
1,709,654
public void translate(ProxySession session, ServerSpawnObjectPacket packet) {<NEW_LINE>CachedEntity cachedEntity = session.getEntityCache().getByRemoteId(packet.getEntityId());<NEW_LINE>if (cachedEntity != null) {<NEW_LINE>log.trace("Cached entity already exists, cant spawn a new one");<NEW_LINE>return;<NEW_LINE>}<NEW_...
getType().name());
1,457,756
public static void main(String[] args) throws Exception {<NEW_LINE>Options options = null;<NEW_LINE>try {<NEW_LINE>options = Options.parse(args);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>System.err.println(e.getMessage());<NEW_LINE>System.exit(2);<NEW_LINE>}<NEW_LINE>// Try to use hardlinks to source se...
options.indexPaths[i]));
1,030,352
public static void main(String[] args) {<NEW_LINE>Exercise3 exercise3 = new Exercise3();<NEW_LINE>SeparateChainingHashTableLinkedListWithDeleteK<Integer, Integer> separateChainingHashTableLinkedListWithDeleteK = exercise3.new SeparateChainingHashTableLinkedListWithDeleteK<>(5, 10);<NEW_LINE>separateChainingHashTableLin...
4, 3, 2, 0 };
748,963
public static ListProjectResponse unmarshall(ListProjectResponse listProjectResponse, UnmarshallerContext _ctx) {<NEW_LINE>listProjectResponse.setRequestId(_ctx.stringValue("ListProjectResponse.RequestId"));<NEW_LINE>listProjectResponse.setPageIndex(_ctx.integerValue("ListProjectResponse.PageIndex"));<NEW_LINE>listProj...
("ListProjectResponse.Projects[" + i + "].Name"));
778,695
public static void invokeDiscovery(WebConversation wc, TestSettings settings, String action, List<validationData> expectations) throws Exception {<NEW_LINE>WebRequest request = null;<NEW_LINE>WebResponse response = null;<NEW_LINE>String thisMethod = "invokeDiscovery";<NEW_LINE>msgUtils.printMethodName(thisMethod);<NEW_...
"Exception cause: " + e.getCause());
99,114
private void createSharedFieldSetter(Field field) {<NEW_LINE>String setterName = "set" + MetaClassHelper.capitalize(field.getName());<NEW_LINE>Parameter[] params = new Parameter[] { new Parameter(field.getAst().getType(), "$spock_value") };<NEW_LINE>MethodNode setter = spec.getAst(<MASK><NEW_LINE>if (setter != null) {<...
).getMethod(setterName, params);
980,765
private Mono<Response<Flux<ByteBuffer>>> stopWithResponseAsync(String resourceGroupName, String accountName, String streamingEndpointName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and can...
error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
900,882
public void enterFileNameWithDotDot() throws IOException {<NEW_LINE>ViewInteraction radioButton = onView(allOf(withId(R.id.radioNewFile), withText("Select new file"), withParent(withId(R.id.radioGroup)), isDisplayed()));<NEW_LINE>radioButton.perform(click());<NEW_LINE>ViewInteraction checkBox = onView(allOf(withId(R.id...
(R.id.text));
873,640
protected Expression transformVariableExpression(VariableExpression ve) {<NEW_LINE>Variable v = ve.getAccessedVariable();<NEW_LINE>if (v instanceof DynamicVariable) {<NEW_LINE>Expression result = <MASK><NEW_LINE>if (result != null) {<NEW_LINE>setSourcePosition(result, ve);<NEW_LINE>if (inAnnotation) {<NEW_LINE>result =...
findStaticFieldOrPropertyAccessorImportFromModule(v.getName());
1,350,001
public static void parse(InputStream in, VersionCatalogBuilder builder) throws IOException {<NEW_LINE>StrictVersionParser strictVersionParser = new StrictVersionParser(Interners.newStrongInterner());<NEW_LINE>TomlParseResult result = Toml.parse(in);<NEW_LINE>assertNoParseErrors(result, builder);<NEW_LINE>TomlTable meta...
parseVersions(versionsTable, builder, strictVersionParser);
547,751
private void appendValue(StringBuilder builtBody, Object value) {<NEW_LINE>String valueString = value != null ? value.toString() : "-";<NEW_LINE>try {<NEW_LINE>long time = dateFormat.<MASK><NEW_LINE>builtBody.append("<td data-order=\"").append(time).append("\">").append(valueString);<NEW_LINE>} catch (ParseException e)...
parse(valueString).getTime();
961,200
public static GnuBuildIdValues fromProgram(Program program) {<NEW_LINE>MemoryBlock buildIdSection = program.getMemory().getBlock(BUILD_ID_SECTION_NAME);<NEW_LINE>if (buildIdSection == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try (ByteProvider bp = MemoryByteProvider.createMemoryBlockByteProvider(program.getMem...
long descLen = br.readNextUnsignedInt();
946,962
public void readImportSection() throws IOException {<NEW_LINE>if (log.isLoggable(Level.FINE))<NEW_LINE>log.fine("readImportSection");<NEW_LINE>int nImports = in.read4BE();<NEW_LINE>if (log.isLoggable(Level.FINE))<NEW_LINE>log.fine("Number of imports: " + nImports);<NEW_LINE>externalFuns = new ExtFun[nImports];<NEW_LINE...
":" + fun + "/" + arity);
1,061,470
public LoRaWANMulticastGet unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LoRaWANMulticastGet loRaWANMulticastGet = new LoRaWANMulticastGet();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep...
class).unmarshall(context));
1,205,237
private void doSend(String exchange, String routingKey, Message amqpMessage) {<NEW_LINE>if (ConfirmType.SIMPLE.equals(this.confirmType)) {<NEW_LINE>this.template.invoke(temp -> {<NEW_LINE>temp.<MASK><NEW_LINE>if (!temp.waitForConfirms(ACK_TIMEOUT)) {<NEW_LINE>throw new AmqpRejectAndDontRequeueException("Negative ack fo...
send(exchange, routingKey, amqpMessage);
1,805,127
private // replace single existing metadata value<NEW_LINE>void replaceSingleMetadataValue(DSpaceObject dso, DSpaceObjectService dsoService, MetadataField metadataField, MetadataValueRest metadataValue, String index) {<NEW_LINE>try {<NEW_LINE>List<MetadataValue> metadataValues = dsoService.getMetadata(dso, metadataFiel...
setLanguage(metadataValue.getLanguage());
916,228
private Mono<Response<RemediationInner>> createOrUpdateAtResourceWithResponseAsync(String resourceId, String remediationName, RemediationInner parameters) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cann...
error(new IllegalArgumentException("Parameter remediationName is required and cannot be null."));
1,634,463
public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new ViewTimeWindowSceneOne());<NEW_LINE>execs.add(new ViewTimeWindowSceneTwo());<NEW_LINE>execs.add(new ViewTimeJustSelectStar());<NEW_LINE>execs.add(new ViewTimeSum());<NEW...
, 123456789 + 10 * 1000));
1,740,837
private static void scheduleJob(final JobBuilder jobBuilder) {<NEW_LINE>try {<NEW_LINE>Scheduler sched = QuartzUtils.getScheduler();<NEW_LINE>Calendar calendar;<NEW_LINE>JobDetail job;<NEW_LINE>CronTrigger trigger;<NEW_LINE>boolean isNew = false;<NEW_LINE>try {<NEW_LINE>if ((job = sched.getJobDetail(jobBuilder.jobName,...
jobBuilder.jobGroup, jobBuilder.jobClass);
880,327
private List<BasicData> loadIrisData() {<NEW_LINE>try {<NEW_LINE>final InputStream istream = this.<MASK><NEW_LINE>if (istream == null) {<NEW_LINE>System.out.println("Cannot access data set, make sure the resources are available.");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>final DataSet ds = DataSet.load(istream);<N...
getClass().getResourceAsStream("/iris.csv");
1,523,938
private void fillSnapshotBlockDb(String sourceDir, String snapshotDir) throws IOException, RocksDBException {<NEW_LINE>logger.info("-- begin to fill latest block and genesis block to snapshot");<NEW_LINE>DBInterface sourceBlockIndexDb = DbTool.getDB(sourceDir, BLOCK_INDEX_DB_NAME);<NEW_LINE>DBInterface sourceBlockDb = ...
> VM_NEED_RECENT_BLKS ? latestBlockNum - VM_NEED_RECENT_BLKS : 0;
1,571,730
public A newInstance(@Nonnull Callable<T> factoryMethod) throws Exception {<NEW_LINE>UnitOfWork<?> uow = CurrentUnitOfWork.get();<NEW_LINE>AtomicReference<A> aggregateReference = new AtomicReference<>();<NEW_LINE>// a constructor may apply events, and the persistence of an aggregate must take precedence over publishing...
== null, () -> "The Unit of Work already has an Aggregate with the same identifier");
1,674,350
private static boolean hasNetworkEx(boolean checkCell, boolean checkWifi, boolean checkEthernet, boolean checkWimax, boolean checkBluetooth, boolean checkAny) {<NEW_LINE>if (!Capabilities.NETWORK_STATE_ENABLED) {<NEW_LINE>Logger.E(TAG, "HAS_NETWORK: Capability NETWORK_STATE disabled");<NEW_LINE>return false;<NEW_LINE>}...
Logger.I(TAG, "HAS_NETWORK: all networks are disconnected");
75,344
final PutFunctionEventInvokeConfigResult executePutFunctionEventInvokeConfig(PutFunctionEventInvokeConfigRequest putFunctionEventInvokeConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putFunctionEventInvokeConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex...
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
636,410
private void registerHotkeys() {<NEW_LINE>final ActionMap actionMap = ((JTextField) getEditor().getEditorComponent()).getActionMap();<NEW_LINE>final InputMap imap = ((JTextField) getEditor().getEditorComponent()).getInputMap();<NEW_LINE>setActionMap(actionMap);<NEW_LINE>setInputMap(JComponent.WHEN_FOCUSED, imap);<NEW_L...
(new CActionHotKey("PREVIOUS_ZOOM")));
1,656,562
public Map<String, Object> isPermissionableInheriting(String assetId) throws DotDataException, DotRuntimeException, PortalException, SystemException, DotSecurityException {<NEW_LINE>UserWebAPI userWebAPI = WebAPILocator.getUserWebAPI();<NEW_LINE>WebContext ctx = WebContextFactory.get();<NEW_LINE>HttpServletRequest requ...
find(assetId, user, respectFrontendRoles);
426,942
public void writeResponses(final SessionLabel sessionLabel, final UserIdentity userIdentity, final ChaiUser theUser, final String userGUID, final ResponseInfoBean responseInfoBean) throws PwmUnrecoverableException {<NEW_LINE>if (userGUID == null || userGUID.length() < 1) {<NEW_LINE>throw new PwmUnrecoverableException(n...
userGUID, responseSet.stringValue());
372,348
public static void main(String[] args) throws Exception {<NEW_LINE>Regression reg = new Regression();<NEW_LINE>double[] yvals = { 25.5, 31.2, 25.9, 38.4, 18.4, 26.7, 26.4, 25.9, 32.0, 25.2, 39.7, 35.7, 26.5 };<NEW_LINE>double[][] xvals = { { 1.74, 5.30, 10.8 }, { 6.32, 5.42, 9.4 }, { 6.22, 8.41, 7.2 }, { 10.52, 4.63, 8...
System.out.println("Vector<> data:");
1,162,000
public Object moduleCreateSyntheticModule(Object moduleName, Object[] exportNames, final long evaluationStepsCallback) {<NEW_LINE>JSFrameDescriptor frameDescBuilder = new JSFrameDescriptor(Undefined.instance);<NEW_LINE>List<Module.ExportEntry> localExportEntries = new ArrayList<>();<NEW_LINE>for (Object exportName : ex...
parsedModule, getModuleLoader(), evaluationStepsCallback);
1,016,260
public static void queryPhyDbNames(Set<String> schemaNames, Map<String, Set<String>> dbPhyDbNames, Map<String, Set<String>> dbAllPhyDbNames) {<NEW_LINE>Map<String, Set<String>> dbStorageInstIds = new HashMap<>();<NEW_LINE>try (Connection metaDbConn = MetaDbDataSource.getInstance().getConnection()) {<NEW_LINE>GroupDetai...
GeneralUtil.nestedException("Failed to get storage and phy db info", ex);
1,293,875
private void buildThumbnails() {<NEW_LINE>for (PostImageThumbnailView thumbnailView : thumbnailViews) {<NEW_LINE>relativeLayoutContainer.removeView(thumbnailView);<NEW_LINE>}<NEW_LINE>thumbnailViews.clear();<NEW_LINE>// Places the thumbnails below each other.<NEW_LINE>// The placement is done using the RelativeLayout B...
RelativeLayout.LayoutParams(size, size);
484,988
public Problem prepare(final RefactoringElementsBag refactoringElements) {<NEW_LINE>try {<NEW_LINE>if (cancelled) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ModificationResult modificationResult = new ModificationResult();<NEW_LINE>Node element = context.getElement();<NEW_LINE>if (element != null) {<NEW_LINE>switch(el...
(diff, fo, modificationResult));
105,253
public ActivityImpl parseIntermediateCatchEvent(Element intermediateEventElement, ScopeImpl scopeElement, ActivityImpl eventBasedGateway) {<NEW_LINE>ActivityImpl nestedActivity = createActivityOnScope(intermediateEventElement, scopeElement);<NEW_LINE>Element timerEventDefinition = intermediateEventElement.element(TIMER...
signalEventDefinition = intermediateEventElement.element(SIGNAL_EVENT_DEFINITION);
68,680
private byte evaluateFilter(int position, int index, int length) {<NEW_LINE>if (!filter.testLength(length)) {<NEW_LINE>return FILTER_FAILED;<NEW_LINE>}<NEW_LINE>int currentLength = dictionaryOffsetVector[index + 1] - dictionaryOffsetVector[index];<NEW_LINE>if (isCharType && length != currentLength) {<NEW_LINE>System.ar...
, length, (byte) ' ');
1,754,091
private void check(APIRecoverImageMsg msg, Map<String, Quota.QuotaPair> pairs) {<NEW_LINE>String currentAccountUuid = msg<MASK><NEW_LINE>String resourceTargetOwnerAccountUuid = new QuotaUtil().getResourceOwnerAccountUuid(msg.getImageUuid());<NEW_LINE>long imageNumQuota = pairs.get(ImageQuotaConstant.IMAGE_NUM).getValue...
.getSession().getAccountUuid();
1,214,345
private GeoBoundingBox resolveGeoBoundingBox() {<NEW_LINE>if (Double.isInfinite(top)) {<NEW_LINE>return null;<NEW_LINE>} else if (Double.isInfinite(posLeft)) {<NEW_LINE>return new GeoBoundingBox(new GeoPoint(top, negLeft), <MASK><NEW_LINE>} else if (Double.isInfinite(negLeft)) {<NEW_LINE>return new GeoBoundingBox(new G...
new GeoPoint(bottom, negRight));
1,090,838
public static DescribeAntChainTransactionStatisticsV2Response unmarshall(DescribeAntChainTransactionStatisticsV2Response describeAntChainTransactionStatisticsV2Response, UnmarshallerContext _ctx) {<NEW_LINE>describeAntChainTransactionStatisticsV2Response.setRequestId(_ctx.stringValue("DescribeAntChainTransactionStatist...
("DescribeAntChainTransactionStatisticsV2Response.Result[" + i + "].CreatTime"));
1,401,453
public void read(org.apache.thrift.protocol.TProtocol iprot, contiuneGetSummaries_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.t...
skip(iprot, schemeField.type);
1,804,972
public void saveExplicitGroup(ActionEvent ae) {<NEW_LINE>ExplicitGroup eg = selectedGroup;<NEW_LINE>if (getSelectedGroupAddRoleAssignees() != null) {<NEW_LINE>try {<NEW_LINE>for (RoleAssignee ra : getSelectedGroupAddRoleAssignees()) {<NEW_LINE>eg.add(ra);<NEW_LINE>}<NEW_LINE>} catch (GroupException ge) {<NEW_LINE>JsfHe...
, BundleUtil.getStringFromBundle("permission.roleNotSaved"));
523,367
protected void enableButtons() {<NEW_LINE>if (m_PAttributeButton != null) {<NEW_LINE>if (p_table == null)<NEW_LINE>return;<NEW_LINE>int row = p_table.getSelectionModel().getLeadSelectionIndex();<NEW_LINE>int rows = p_table.getRowCount();<NEW_LINE>if (p_table.getShowTotals())<NEW_LINE>rows = rows - 1;<NEW_LINE>if (row <...
Boolean.TRUE.equals(value);
945,633
protected void service(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws ServletException, IOException {<NEW_LINE>PrintWriter responseWriter = servletResponse.getWriter();<NEW_LINE>responseWriter.println(prependType("Entry"));<NEW_LINE>String operation = servletRequest.getParameter(OPERATIO...
int count = servletCount.getCount();
817,877
public static void handleFlagUsage(LombokNode<?, ?, ?> node, ConfigurationKey<FlagUsageType> key, String featureName) {<NEW_LINE>FlagUsageType fut = node.<MASK><NEW_LINE>if (fut == null && AllowHelper.isAllowable(key)) {<NEW_LINE>node.addError("Use of " + featureName + " is disabled by default. Please add '" + key.getK...
getAst().readConfiguration(key);
429,118
static protected String printTokenOnly(Token t) {<NEW_LINE>String retval = "";<NEW_LINE>for (; cline < t.beginLine; cline++) {<NEW_LINE>retval += "\n";<NEW_LINE>ccol = 1;<NEW_LINE>}<NEW_LINE>for (; ccol < t.beginColumn; ccol++) {<NEW_LINE>retval += " ";<NEW_LINE>}<NEW_LINE>if (t.kind == JavaCCParserConstants.STRING_LIT...
image.length() - 1);
622,425
public void translateToBedrock(CompoundTagBuilder builder, CompoundTag javaTag, String javaId) {<NEW_LINE>if (!javaId.contains("head") && !javaId.contains("skull"))<NEW_LINE>return;<NEW_LINE>String skullType = javaId.substring(0, javaId.indexOf("[")).replace("minecraft:", "");<NEW_LINE>if (javaId.contains("wall")) {<NE...
.indexOf("]"))));
1,007,039
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {<NEW_LINE>// Remove bridge default methods in interfaces; javac generates them again for implementing<NEW_LINE>// classes anyways.<NEW_LINE>if (isInterface && (access & (Opcodes.ACC_BRIDGE | Opcodes.ACC_ABSTRA...
? new InlineJacocoInit(result) : result;
1,781,930
public PCollection<Long> expand(PBegin input) {<NEW_LINE><MASK><NEW_LINE>boolean usesUnboundedFeatures = getTimestampFn() != null || getElementsPerPeriod() > 0 || getMaxReadTime() != null;<NEW_LINE>if (!isRangeUnbounded && !usesUnboundedFeatures) {<NEW_LINE>// This is the only case when we can use the bounded CountingS...
boolean isRangeUnbounded = getTo() < 0;
848,543
public Description matchMemberSelect(MemberSelectTree tree, VisitorState state) {<NEW_LINE>if (!state.isAndroidCompatible()) {<NEW_LINE>return Description.NO_MATCH;<NEW_LINE>}<NEW_LINE>Symbol symbol = ASTHelpers.getSymbol(tree);<NEW_LINE>// Match symbol's owner to android.R.string separately because couldn't get fully ...
+ preferred)).build();
670,651
final DeleteTransitGatewayConnectResult executeDeleteTransitGatewayConnect(DeleteTransitGatewayConnectRequest deleteTransitGatewayConnectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTransitGatewayConnectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get...
(super.beforeMarshalling(deleteTransitGatewayConnectRequest));
435,631
public com.amazonaws.services.chimesdkmeetings.model.UnauthorizedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.chimesdkmeetings.model.UnauthorizedException unauthorizedException = new com.amazonaws.services.chimesdkmeetings.model.UnauthorizedExceptio...
int originalDepth = context.getCurrentDepth();
1,200,491
public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map<String, List<CodegenOperation>> operations) {<NEW_LINE>if ((SPRING_BOOT.equals(library) && !useTags)) {<NEW_LINE>String basePath = resourcePath;<NEW_LINE>if (basePath.startsWith("/")) {<NEW_LINE>basePath = bas...
pos = basePath.indexOf("/");
956,334
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>getSerializedSize();<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>output.writeBytes(1, getGroupIdBytes());<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE><MASK><NE...
output.writeInt32(2, type_);
1,465,527
public static Object serialize(Object value) {<NEW_LINE>if (Cls.kindOf(value) != TypeKind.UNKNOWN || value instanceof Enum) {<NEW_LINE>return value;<NEW_LINE>} else if (value instanceof Var<?>) {<NEW_LINE>Var<?> var = (Var<?>) value;<NEW_LINE>return serialize(U.map(var.name(), var.get()));<NEW_LINE>} else if (value ins...
vals = (Object[]) value;
1,804,302
public FailureInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>FailureInfo failureInfo = new FailureInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE...
JsonToken token = context.getCurrentToken();
249,326
public synchronized void publish(LogRecord record) {<NEW_LINE>ThreadKey threadId = new ThreadKey();<NEW_LINE>SessionId sessionId = threadToSessionMap.get(threadId);<NEW_LINE>if (sessionId != null) {<NEW_LINE>List<LogRecord> records = perSessionRecords.get(sessionId);<NEW_LINE>if (records == null) {<NEW_LINE>records = n...
, new ArrayList<>());
26,878
@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Adds the license to the specified license group.", response = LicenseGroup.class)<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 304, message = "The license group already has the specified license ...
getObjectByUuid(License.class, licenseUuid);
468,882
public static String convert(final int n) {<NEW_LINE>// System.out.println("n = " + n);<NEW_LINE>if (n == 0) {<NEW_LINE>return "zero";<NEW_LINE>}<NEW_LINE>if (n < 0) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (n < 20) {<NEW_LINE>return units[n];<NEW_LINE>}<NEW_LINE>if (n < 100) {<NEW_LINE>return tens[n / 10] + ((n % 10 !...
return "minus " + convert(-n);
312,209
public ListNotebookExecutionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListNotebookExecutionsResult listNotebookExecutionsResult = new ListNotebookExecutionsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =...
int originalDepth = context.getCurrentDepth();
46,042
public Stream<CSVResult> csvParams(@Name("urlOrBinary") Object urlOrBinary, @Name("httpHeaders") Map<String, Object> httpHeaders, @Name("payload") String payload, @Name(value = "config", defaultValue = "{}") Map<String, Object> configMap) {<NEW_LINE>LoadCsvConfig config = new LoadCsvConfig(configMap);<NEW_LINE>Counting...
.extractCredentialsIfNeeded(url, true));
1,417,723
private static void printUsageAndExit() {<NEW_LINE>System.err.println(AfcClient.class.getName() + " [deviceid] <action> ...");<NEW_LINE>System.err.println(" Actions:");<NEW_LINE>System.err.println(" deviceinfo Prints device file system information.");<NEW_LINE>System.err.println(" rm [-f] <path> Deletes ...
System.err.println(" mkdir <dir> Creates the <dir> on the device.");
1,516,464
protected void configure() {<NEW_LINE>// Message body providers (both readers & writers)<NEW_LINE>bindSingletonWorker(ByteArrayProvider.class);<NEW_LINE>// bindSingletonWorker(DataSourceProvider.class);<NEW_LINE>bindSingletonWorker(FileProvider.class);<NEW_LINE>bindSingletonWorker(FormMultivaluedMapProvider.class);<NEW...
.class, applicationProperties, runtimeType));
646,885
protected StringBuilder replaceParameter(Map<String, ? extends Object> paramMap, boolean fromEncodedMap, boolean isTemplate, String string, StringBuilder builder, boolean encodeSlash) {<NEW_LINE>if (string.indexOf('{') == -1) {<NEW_LINE>return builder.append(string);<NEW_LINE>}<NEW_LINE>Matcher matcher = createUriParam...
stringValue = Encode.encodePathSaveEncodings(stringValue);
1,096,020
static ConfigOrigin mergeOrigins(Collection<? extends ConfigOrigin> stack) {<NEW_LINE>if (stack.isEmpty()) {<NEW_LINE>throw new ConfigException.BugOrBroken("can't merge empty list of origins");<NEW_LINE>} else if (stack.size() == 1) {<NEW_LINE>return stack.iterator().next();<NEW_LINE>} else if (stack.size() == 2) {<NEW...
remaining.size() - 1);
676,856
private void writeInternal(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {<NEW_LINE>if (!ctx.channel().isActive()) {<NEW_LINE>ReferenceCountUtil.release(msg);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (msg instanceof HttpRequestMessage) {<NEW_LINE>promise.addListener((future) -> {<NEW_LI...
throw new ZuulException("Received invalid message from client", true);
842,046
protected void paintIcon(Component c, Graphics2D g) {<NEW_LINE>if (!ignoreButtonState && c instanceof AbstractButton) {<NEW_LINE>ButtonModel model = ((AbstractButton) c).getModel();<NEW_LINE>if (model.isPressed() || model.isRollover()) {<NEW_LINE>// paint filled circle with cross<NEW_LINE>g.setColor(model.isPressed() ?...
Path2D.Float(Path2D.WIND_EVEN_ODD);
1,394,072
public ImportResult importItem(UUID jobId, IdempotentImportExecutor idempotentExecutor, TokensAndUrlAuthData authData, SocialActivityContainerResource data) throws Exception {<NEW_LINE>Blogger blogger = getOrCreateBloggerService(authData);<NEW_LINE>BlogList blogList = blogger.blogs().listByUser("self").execute();<NEW_L...
), activity, blogId, authData);
890,935
private static MapVersionInterpreter[] values() {<NEW_LINE>if (values == null) {<NEW_LINE>try (InputStream resource = ResourceController.getResourceController().getResource("/xml/mapVersions.xml").openStream()) {<NEW_LINE>DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();<NEW_LINE><MASK><NEW_LINE...
DocumentBuilder documentBuilder = domFactory.newDocumentBuilder();
276,532
public void updateGovernanceZone(String userId, String zoneGUID, boolean isMergeUpdate, GovernanceZoneProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException {<NEW_LINE>final String methodName = "updateGovernanceZone";<NEW_LINE>final String guidParameter = "zoneGUID"...
serverName, userId, zoneGUID, isMergeUpdate);
942,837
private KeyManagerFactory createAndInitKeyManagerFactory() throws Exception {<NEW_LINE>X509Certificate certHolder = readCertFile(cert);<NEW_LINE>Object keyObject = readPrivateKeyFile(privateKey);<NEW_LINE>char[] passwordCharArray = "".toCharArray();<NEW_LINE>if (!StringUtils.isEmpty(password)) {<NEW_LINE>passwordCharAr...
getInstance(KeyStore.getDefaultType());
778,039
final ListReceiptFiltersResult executeListReceiptFilters(ListReceiptFiltersRequest listReceiptFiltersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listReceiptFiltersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri...
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
270,155
public void serializeWithType(AWSCredentialsProvider credentialsProvider, JsonGenerator jsonGenerator, SerializerProvider serializers, TypeSerializer typeSerializer) throws IOException {<NEW_LINE>// BEAM-11958 Use deprecated Jackson APIs to be compatible with older versions of jackson<NEW_LINE>typeSerializer.writeTypeP...
jsonGenerator.writeStringField(ROLE_SESSION_NAME, sessionName);
706,428
/*<NEW_LINE>* @param password The incoming password.<NEW_LINE>* @param encryptedPassword The stored password digest.<NEW_LINE>* @return true if the password matches, false otherwise.<NEW_LINE>* @throws NoSuchAlgorithmException encryption exceptions.<NEW_LINE>* @throws InvalidKeySpe...
[i] ^ testHash[i];
435,304
public void findDatafeedsByJobIds(Collection<String> jobIds, ActionListener<Map<String, DatafeedConfig.Builder>> listener) {<NEW_LINE>SearchRequest searchRequest = client.prepareSearch(MlConfigIndex.indexName()).setIndicesOptions(IndicesOptions.lenientExpandOpen()).setSource(new SearchSourceBuilder().query(buildDatafee...
.getHits().getHits();
442,923
protected static boolean parseObjectOrDocumentTypeProperties(String fieldName, Object fieldNode, ParserContext parserContext, ObjectMapper.Builder builder) {<NEW_LINE>if (fieldName.equals("position")) {<NEW_LINE>builder.position(nodeIntegerValue(fieldNode));<NEW_LINE>return true;<NEW_LINE>} else if (fieldName.equals("d...
Dynamic.TRUE : Dynamic.FALSE);
790,864
public PointSensitivityBuilder presentValueSensitivityRatesStickyModel(ResolvedSwaption swaption, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities) {<NEW_LINE>validate(swaption, ratesProvider, swaptionVolatilities);<NEW_LINE>ZonedDateTime expiryDateTime = swaption.getExpiry();<NEW_LINE>double ...
.getLongShort().sign();
1,054,081
private Bundle handleForegroundLocationPermissions(Map<String, PermissionsResponse> result) {<NEW_LINE>PermissionsResponse accessFineLocation = result.get(Manifest.permission.ACCESS_FINE_LOCATION);<NEW_LINE>PermissionsResponse accessCoarseLocation = result.<MASK><NEW_LINE>Objects.requireNonNull(accessFineLocation);<NEW...
get(Manifest.permission.ACCESS_COARSE_LOCATION);
1,506,384
public AuthenticatedClientSessionEntity readObject(ObjectInput input) throws IOException, ClassNotFoundException {<NEW_LINE>AuthenticatedClientSessionEntity sessionEntity = new AuthenticatedClientSessionEntity(MarshallUtil.unmarshallUUID(input, false));<NEW_LINE>sessionEntity.setRealmId(MarshallUtil.unmarshallString(in...
(MarshallUtil.unmarshallString(input));
1,209,869
public void marshall(LoadBalancerTlsCertificate loadBalancerTlsCertificate, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (loadBalancerTlsCertificate == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(loadBa...
loadBalancerTlsCertificate.getIsAttached(), ISATTACHED_BINDING);
797,988
public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {<NEW_LINE>try {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>pm.beginTask("", 16);<NEW_LINE>RefactoringStatus result = Checks.validateModifiesFiles(ResourceUtil.getFiles(new ICompilationUnit[] { fCu }<MASK><NEW_LI...
), getValidationContext(), pm);
1,173,849
public static void main(String[] args) {<NEW_LINE>int n = 10;<NEW_LINE>double[][] matrix = new double[n][n];<NEW_LINE>for (double[] row : matrix) java.util.Arrays.fill(row, 100);<NEW_LINE>// Construct an optimal tour<NEW_LINE>int edgeCost = 5;<NEW_LINE>int[] optimalTour = { 2, 7, 6, 1, 9, 8, 5, 3, 4, 0, 2 };<NEW_LINE>f...
tourCost = computeTourCost(bestTour, matrix);
234,251
public void defineInterceptors() {<NEW_LINE>InputStream inputStream = getClass().getResourceAsStream("/prometheus/interceptors.yaml");<NEW_LINE>Interceptors interceptors = new Yaml().loadAs(inputStream, Interceptors.class);<NEW_LINE>for (Interceptor each : interceptors.getInterceptors()) {<NEW_LINE>if (null == each.get...
getConstructAdvice()).build();
1,048,486
public static void main(String[] args) throws IOException {<NEW_LINE>if (args.length != 1) {<NEW_LINE>System.out.println("Usage: " + GermanUppercasePhraseFinder.class.getSimpleName() + " <ngramIndexDir>");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>JLanguageTool lt = new JLanguageTool(Languages.getLanguageForShortCod...
0]).toPath());
1,654,767
public Node searchNode(Object key, EntityMetadata m, GraphDatabaseService graphDb, boolean skipProxy) {<NEW_LINE>Node node = null;<NEW_LINE>String idColumnName = ((AbstractAttribute) m.getIdAttribute()).getJPAColumnName();<NEW_LINE>final MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata()...
nodeIndex.get(idColumnName, key);
1,540,181
private void copyAndroidFiles() {<NEW_LINE>if (sourceNativeDir("android").exists()) {<NEW_LINE>File srcDir = new File(targetAndroidDir(), path<MASK><NEW_LINE>File resDir = new File(targetAndroidDir(), path("src", "main", "resources"));<NEW_LINE>{<NEW_LINE>Copy copy = (Copy) antProject().createTask("copy");<NEW_LINE>cop...
("src", "main", "java"));
1,327,472
public void trigger(String type, ReadableMap options) {<NEW_LINE>// Check system settings, if disabled and we're not explicitly ignoring then return immediatly<NEW_LINE>boolean ignoreAndroidSystemSettings = options.getBoolean("ignoreAndroidSystemSettings");<NEW_LINE>int hapticEnabledAndroidSystemSettings = Settings.Sys...
reactContext.getSystemService(Context.VIBRATOR_SERVICE);
243,436
private static Value parse(IndexSetting indexSetting, Object value) {<NEW_LINE>final Class<?> type = indexSetting.getType();<NEW_LINE>try {<NEW_LINE>if (type == Boolean.class) {<NEW_LINE>return parseAsBoolean(value);<NEW_LINE>}<NEW_LINE>if (type == double[].class) {<NEW_LINE>return parseAsDoubleArray(value);<NEW_LINE>}...
". This type is used by indexSetting " + indexSetting.getSettingName());