idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
613,298 | public ProductId retrieveProductIdBy(@NonNull final ProductQuery query) {<NEW_LINE>final IQueryBuilder<I_M_Product> queryBuilder;<NEW_LINE>if (query.isOutOfTrx()) {<NEW_LINE>queryBuilder = Services.get(IQueryBL.class).createQueryBuilderOutOfTrx(I_M_Product.class).setOption(IQuery.OPTION_ReturnReadOnlyRecords, true);<NE... | COLUMNNAME_AD_Org_ID, query.getOrgId()); |
204,423 | public void loadAddress(Register dst, AArch64Address address) {<NEW_LINE>assert dst.getRegisterCategory().equals(CPU);<NEW_LINE>int size = address.getBitMemoryTransferSize();<NEW_LINE>switch(address.getAddressingMode()) {<NEW_LINE>case IMMEDIATE_UNSIGNED_SCALED:<NEW_LINE>assert size != AArch64Address.ANY_SIZE;<NEW_LINE... | address.getBase(), scaledImmediate); |
457,468 | private void synchronizeName(Object inst) {<NEW_LINE>java.lang.reflect.Method getter;<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>getter = inst.getClass().getMethod("getDisplayName");<NEW_LINE>} catch (NoSuchMethodException me) {<NEW_LINE>// NOI18N<NEW_LINE>getter = inst.getClass().getMethod("getName");<N... | String) getter.invoke(inst); |
397,113 | public Object sqlToObject(String value, Database database) {<NEW_LINE>if (database instanceof AbstractDb2Database) {<NEW_LINE>return value.replaceFirst("^\"SYSIBM\".\"DATE\"\\('", "").replaceFirst("'\\)", "");<NEW_LINE>}<NEW_LINE>if (database instanceof DerbyDatabase) {<NEW_LINE>return value.replaceFirst("^DATE\\('", "... | ()).getTime()); |
1,596,751 | private static Collection<File> readModules(File cluster) {<NEW_LINE>if (cluster == null || !cluster.exists()) {<NEW_LINE>return Collections.emptySet();<NEW_LINE>}<NEW_LINE>Collection<File> res = new HashSet<File>();<NEW_LINE>// NOI18N<NEW_LINE>File config = new File(new File<MASK><NEW_LINE>if (config.listFiles() == nu... | (cluster, "config"), "Modules"); |
86,947 | private static Properties createProperties(File file, CommandSpec commandSpec) {<NEW_LINE>if (file == null) {<NEW_LINE>throw new NullPointerException("file is null");<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>Properties result = new Properties();<NEW_LINE>if (file.exists() && file.canRead()) {<NEW_LINE>InputStream in = null;... | Tracer tracer = CommandLine.tracer(); |
728,329 | private void init() {<NEW_LINE>exceptionUnmarshallers.add(new InvalidFirehoseDestinationExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidS3ConfigurationExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidDeliveryOptionsExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshaller... | .add(new TemplateDoesNotExistExceptionUnmarshaller()); |
574,109 | public void valueChanged(ListSelectionEvent e) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>JList<State> theList = (JList<<MASK><NEW_LINE>State st = (State) theList.getSelectedValue();<NEW_LINE>if (st == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DefaultListModel<String> stateListModel = new DefaultListModel<>(... | State>) e.getSource(); |
762,786 | final DeleteLifecyclePolicyResult executeDeleteLifecyclePolicy(DeleteLifecyclePolicyRequest deleteLifecyclePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteLifecyclePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,474,895 | protected void select_instances() {<NEW_LINE>List<Object> selected_violations = list.getSelectedValuesList();<NEW_LINE>if (selected_violations.size() <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>java.util.Set<app.freerouting.board.Item> selected_items = new java.util.TreeSet<app.freerouting.board.Item>();<NEW_LINE>for ... | selected_items.add(curr_violation.second_item); |
124,692 | public Plan visitPhysicalFilter(PhysicalFilter<? extends Plan> filter, CascadesContext context) {<NEW_LINE>Preconditions.checkArgument(filter.getPredicates() != BooleanLiteral.TRUE);<NEW_LINE>Plan child = filter.child();<NEW_LINE>// Forbidden filter-project, we must make filter-project -> project-filter.<NEW_LINE>Preco... | (!(child instanceof PhysicalProject)); |
1,705,975 | private void markupIMTConflictTables(Program program, TaskMonitor monitor) throws Exception {<NEW_LINE>if (get_kSectionIMTConflictTables() == UNSUPPORTED_SECTION) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ArtImageSection section = sectionList.get(get_kSectionIMTConflictTables());<NEW_LINE>monitor.setMessage("ART - markup ... | createDataAt(program, address, pointerSize); |
305,125 | private void init(Hashtable toCopy) {<NEW_LINE>super.copy(toCopy);<NEW_LINE>Hashtable f = (Hashtable) toCopy.get("from");<NEW_LINE>if (f != null) {<NEW_LINE>from.copy(f);<NEW_LINE>}<NEW_LINE>description = (String) toCopy.get("description");<NEW_LINE>location = (String) toCopy.get("location");<NEW_LINE>link = (String) t... | String) toCopy.get("created_time"); |
1,531,736 | private void editSelectedPolicyMapping() {<NEW_LINE>int selectedRow = jtPolicyMappings.getSelectedRow();<NEW_LINE>if (selectedRow != -1) {<NEW_LINE>PolicyMapping policyMapping = (PolicyMapping) jtPolicyMappings.getValueAt(selectedRow, 0);<NEW_LINE>Container container = getTopLevelAncestor();<NEW_LINE>DPolicyMappingChoo... | PolicyMappingsUtil.remove(policyMapping, policyMappings); |
237,625 | public Model<Label> train(Dataset<Label> examples, Map<String, Provenance> instanceProvenance, int invocationCount) {<NEW_LINE>if (invocationCount != INCREMENT_INVOCATION_COUNT) {<NEW_LINE>this.invocationCount = invocationCount;<NEW_LINE>}<NEW_LINE>ModelProvenance provenance = new ModelProvenance(DummyClassifierModel.c... | labelInfo.generateImmutableOutputInfo(), constLabel); |
1,721,618 | private Mono<Response<Flux<ByteBuffer>>> startWithResponseAsync(String resourceGroupName, String applicationGatewayName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentExc... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
729,334 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static com.sun.jdi.FloatValue mirrorOf(com.sun.jdi.VirtualMachine a, float b) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modu... | [] { a, b }); |
1,797,256 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>((WordPress) getActivity().getApplicationContext()).component().inject(this);<NEW_LINE>if (savedInstanceState == null) {<NEW_LINE>mCurrentUserId = getArguments().getLong(ARG_CURRENT_USER_ID);<NEW_LINE>mPersonId = get... | mPersonId = savedInstanceState.getLong(ARG_PERSON_ID); |
919,439 | final UpdateDomainMetadataResult executeUpdateDomainMetadata(UpdateDomainMetadataRequest updateDomainMetadataRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDomainMetadataRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkLink"); |
55,182 | public static void main(String[] args) {<NEW_LINE>if (args.length > 1) {<NEW_LINE>System.out.println("Test usage:\njava MNISTCUDNN [image]\nExiting...");<NEW_LINE>System.exit(EXIT_FAILURE);<NEW_LINE>}<NEW_LINE>String image_path;<NEW_LINE>network_t mnist = new network_t();<NEW_LINE>String name = MNISTCUDNN.class.getName... | image_path = get_path(third_image, name); |
1,206,627 | public static void convert(InterleavedS32 input, InterleavedS64 output) {<NEW_LINE>if (input.isSubimage() || output.isSubimage()) {<NEW_LINE>final int N = input.width * input.getNumBands();<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, input.height, y -> {<NEW_LINE>for (int y = 0; y < input.height; y++) {<NEW... | output.getIndex(0, y); |
371,645 | public static GetStackResponse unmarshall(GetStackResponse getStackResponse, UnmarshallerContext _ctx) {<NEW_LINE>getStackResponse.setRequestId(_ctx.stringValue("GetStackResponse.RequestId"));<NEW_LINE>List<StackInfoItem> stackInfo = new ArrayList<StackInfoItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetStac... | ("GetStackResponse.StackInfo[" + i + "].Duration")); |
679,048 | public void marshall(CreateIntegrationRequest createIntegrationRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createIntegrationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createIntegr... | createIntegrationRequest.getConnectionType(), CONNECTIONTYPE_BINDING); |
1,053,305 | void AddRange(char left, char right) {<NEW_LINE>onlyChar = 2;<NEW_LINE>int i;<NEW_LINE>char tempLeft1, tempLeft2, tempRight1, tempRight2;<NEW_LINE>if (left < 128) {<NEW_LINE>if (right < 128) {<NEW_LINE>for (; left <= right; left++) AddASCIIMove(left);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (; left < 128; left++) AddA... | curRE, "Non-ASCII characters used in regular expression.\n" + "Please make sure you use the correct Reader when you create the parser, " + "one that can handle your character set."); |
986,290 | public void readParams(AbstractSerializedData stream, boolean exception) {<NEW_LINE>flags = stream.readInt32(exception);<NEW_LINE>min = (flags & 1) != 0;<NEW_LINE>can_see_list = (flags & 4) != 0;<NEW_LINE>int magic = stream.readInt32(exception);<NEW_LINE>if (magic != 0x1cb5c415) {<NEW_LINE>if (exception) {<NEW_LINE>thr... | count = stream.readInt32(exception); |
752,652 | final ListProcessingJobsResult executeListProcessingJobs(ListProcessingJobsRequest listProcessingJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listProcessingJobsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,754,732 | public static DescribeTraceInfoNodeListResponse unmarshall(DescribeTraceInfoNodeListResponse describeTraceInfoNodeListResponse, UnmarshallerContext context) {<NEW_LINE>describeTraceInfoNodeListResponse.setRequestId(context.stringValue("DescribeTraceInfoNodeListResponse.RequestId"));<NEW_LINE>NodeListInfo nodeListInfo =... | ("DescribeTraceInfoNodeListResponse.NodeListInfo.EntityTypeList[" + i + "]")); |
981,662 | private List<IncidentInstance> doGetIncidents(String appId, String appInstanceId, String appComponentName, String appComponentInstanceId, Integer incidentTypeId, Long startTimestamp, Long endTimestamp, boolean selfHealing) {<NEW_LINE>List<CommonDefinition> definitions = getDefs(appId, appComponentName, Constant.INCIDEN... | andGmtLastOccurLessThan(new Date(endTimestamp)); |
818,316 | private void updateObjectCtorClosureSymbols(Location pos, BLangFunction currentFunction, BSymbol resolvedSymbol, BLangClassDefinition classDef, AnalyzerData data) {<NEW_LINE>classDef.hasClosureVars = true;<NEW_LINE>resolvedSymbol.closure = true;<NEW_LINE>if (currentFunction != null) {<NEW_LINE>currentFunction.closureVa... | new ClosureVarSymbol(resolvedSymbol, pos)); |
500,397 | public DescribeSignalingChannelResult describeSignalingChannel(DescribeSignalingChannelRequest describeSignalingChannelRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeSignalingChannelRequest);<NEW_LINE>AWSRequestMetrics awsReque... | awsRequestMetrics.endEvent(Field.ClientExecuteTime); |
392,258 | private double calculate(SessionsMutator sessionsMutator) {<NEW_LINE>if (sessionsMutator.all().isEmpty()) {<NEW_LINE>return 0.0;<NEW_LINE>}<NEW_LINE>long week = TimeUnit.DAYS.toMillis(7L);<NEW_LINE>long weekAgo = date - week;<NEW_LINE>long twoWeeksAgo = date - 2L * week;<NEW_LINE>long threeWeeksAgo = date - 3L * week;<... | (playtime2 / playtimeMsThreshold) + 1.0); |
931,508 | void applyAll(int y0, int y1, GrayU8 mask) {<NEW_LINE>init();<NEW_LINE>float maxWidth = srcImg.getWidth() - 1;<NEW_LINE>float maxHeight = srcImg.getHeight() - 1;<NEW_LINE>for (int y = y0; y < y1; y++) {<NEW_LINE>int indexDst = dstImg.startIndex + dstImg.stride * y + x0;<NEW_LINE>int indexMsk = mask.startIndex + mask.st... | mask.data[indexMsk] = 1; |
37,232 | static Object createMock(Class<?> type, List<Class<?>> additionalInterfaces, @Nullable List<Object> constructorArgs, IProxyBasedMockInterceptor interceptor, ClassLoader classLoader, boolean useObjenesis) {<NEW_LINE>Enhancer enhancer = new ConstructorFriendlyEnhancer();<NEW_LINE>enhancer.setClassLoader(classLoader);<NEW... | interfaces.add(ISpockMockObject.class); |
997,073 | public HttpResponse handle(HttpRequest request) {<NEW_LINE>try {<NEW_LINE>Path path = new Path(request.getUri());<NEW_LINE>String userId = userIdOrThrow(request);<NEW_LINE>switch(request.getMethod()) {<NEW_LINE>case GET:<NEW_LINE>return handleGET(request, path, userId);<NEW_LINE>case PATCH:<NEW_LINE>return handlePATCH(... | handlePOST(path, request, userId); |
727,675 | public void run() {<NEW_LINE>List<Node> prevSnapshot = null;<NEW_LINE>boolean wasInited = hierarchy.isInitialized();<NEW_LINE>boolean wasLeaf = hierarchy == Children.LEAF;<NEW_LINE>if (wasInited && !wasLeaf) {<NEW_LINE>prevSnapshot = hierarchy.snapshot();<NEW_LINE>}<NEW_LINE>hierarchy.detachFrom();<NEW_LINE>if (prevSna... | Node>emptyList(), prevSnapshot); |
1,133,702 | void processInitiativeMessage(JsonObject json) {<NEW_LINE>InitiativeList ilist = initiativeListener.initiativeList;<NEW_LINE>String currentInit = Integer.toString(ilist.getCurrent());<NEW_LINE>String currentRound = Integer.toString(ilist.getRound());<NEW_LINE>// If there is a mismatch between client and us don't perfor... | getToken().getName()); |
953,183 | public void validate() throws WizardValidationException {<NEW_LINE>// XXX this is little strange. Since this method is called first time the panel appears.<NEW_LINE>// So we have to do this null check (data are uninitialized)<NEW_LINE>String prjFolder = getData().getProjectFolder();<NEW_LINE>if (prjFolder != null) {<NE... | ).nameValue, message, message); |
1,478,050 | public static int[] karatsubaMultiply(int[] a, int[] b) {<NEW_LINE>if (a.length < b.length)<NEW_LINE>a = Arrays.copyOf(a, b.length);<NEW_LINE>if (a.length > b.length)<NEW_LINE>b = Arrays.copyOf(b, a.length);<NEW_LINE>int n = a.length;<NEW_LINE>int[] res = new int[n + n];<NEW_LINE>if (n <= 10) {<NEW_LINE>for (int i = 0;... | res, k, r.length); |
1,767,065 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String systemTopicName, 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_LIN... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
1,776,381 | protected void appendComponentSlot(XStringBuilder xsb, JsonStringBuilder jsb, SofaTracerSpan span) {<NEW_LINE>Map<String, String> tagWithStr = span.getTagsWithStr();<NEW_LINE>xsb.append(tagWithStr.get(CommonSpanTags.MSG_ID));<NEW_LINE>xsb.append(tagWithStr.get(CommonSpanTags.MSG_TOPIC));<NEW_LINE>xsb.append(tagWithStr.... | (tagWithStr.get("brokerAddr")); |
1,800,565 | public static void terminate(ILaunch l) throws DebugException, CoreException {<NEW_LINE><MASK><NEW_LINE>// try {<NEW_LINE>if (conf != null && conf.getType().getIdentifier().equals(BootLaunchConfigurationDelegate.TYPE_ID) && BootLaunchConfigurationDelegate.canUseLifeCycle(conf)) {<NEW_LINE>SpringApplicationLifeCycleClie... | ILaunchConfiguration conf = l.getLaunchConfiguration(); |
962,946 | protected Object doMapFromContext(DirContextOperations ctx) {<NEW_LINE>if (resultFilter != null && !resultFilter.needSelect(ctx.getNameInNamespace())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Map<String, Object> result = new HashMap<>();<NEW_LINE>result.put(LdapConstant.LDAP_DN_KEY, ctx.getNameInNamespace());<NEW_LI... | add(it.next()); |
1,306,639 | private static int createIsland(CommandContext<CommandSourceStack> ctx) throws CommandSyntaxException {<NEW_LINE>ServerPlayer player = EntityArgument.getPlayer(ctx, "player");<NEW_LINE>SkyblockSavedData data = SkyblockSavedData<MASK><NEW_LINE>UUID uuid = player.getUUID();<NEW_LINE>if (data.skyblocks.containsValue(uuid)... | .get(getSkyblockWorld(ctx)); |
866,071 | private void printStartupInfo() {<NEW_LINE>boolean corsEnabled = _config.getBoolean(WebServerConfig.WEBSERVER_HTTP_CORS_ENABLED_CONFIG);<NEW_LINE>String webApiUrlPrefix = _config.getString(WebServerConfig.WEBSERVER_API_URLPREFIX_CONFIG);<NEW_LINE>String uiUrlPrefix = _config.getString(WebServerConfig.WEBSERVER_UI_URLPR... | _config.getString(WebServerConfig.WEBSERVER_UI_DISKPATH_CONFIG); |
1,415,709 | private void showHeader() throws InstallException {<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>String settingsPath = FeatureUtilityProperties.getRepoPropertiesFile().getPath();<NEW_LINE><MASK><NEW_LINE>sb.append(PropertiesUtils.getMessage("MSG_FEATUREUTILITY_SETTTINGS")).append(InstallUtils.NEWLINE);<NEW_L... | sb.append(InstallUtils.NEWLINE); |
592,021 | public ODocument toNetworkStream() {<NEW_LINE>ODocument result = super.toNetworkStream();<NEW_LINE>result.setProperty("query", cfg.getQuery());<NEW_LINE>result.setProperty("updatable", cfg.isUpdatable());<NEW_LINE>List<Map<String, Object>> indexes = new ArrayList<>();<NEW_LINE>for (OViewConfig.OViewIndexConfig idx : cf... | properties = new HashMap<>(); |
1,472,824 | // BracesMatcherFactory implementation<NEW_LINE>public BracesMatcher createMatcher(final MatcherContext context) {<NEW_LINE>final JspBracesMatching[] ret = { null };<NEW_LINE>context.getDocument().render(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>TokenHierarchy<Document> hierarchy = TokenHierarchy... | context, ts.languagePath()); |
1,225,887 | public void scanShieldedTRC20NotesByOvk(OvkDecryptTRC20Parameters request, StreamObserver<org.tron.api.GrpcAPI.DecryptNotesTRC20> responseObserver) {<NEW_LINE>long startNum = request.getStartBlockIndex();<NEW_LINE>long endNum = request.getEndBlockIndex();<NEW_LINE>try {<NEW_LINE>checkSupportShieldedTRC20Transaction();<... | .onError(getRunTimeException(e)); |
861,704 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceObject = game.getObject(source);<NEW_LINE>if (controller == null || controller.getHand().isEmpty() || sourceObject == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Card... | getCard(target.getFirstTarget()); |
1,496,915 | public void onEnable() {<NEW_LINE>final PluginManager pm = getServer().getPluginManager();<NEW_LINE>final IEssentials ess = (IEssentials) pm.getPlugin("Essentials");<NEW_LINE>if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) {<NEW_LINE>getLogger().log(Level.WARNING, tl("versionMismatchA... | pm.registerEvents(playerListener, this); |
1,288,960 | public void updateASI() {<NEW_LINE>final Object sourceModel = getSourceModel();<NEW_LINE>final IAttributeSetInstanceAware asiAware = attributeSetInstanceAwareFactoryService.createOrNull(sourceModel);<NEW_LINE>if (asiAware == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (asiAware.getM_Product_ID() <= 0) {<NEW_LINE>re... | attributesRepo.retrieveAttributeIdByValueOrNull(HUAttributeConstants.ATTR_Expired); |
277,785 | private void analyzeShape() {<NEW_LINE>// Simple minded analysis for code assist & potential compatibility.<NEW_LINE>class ShapeComputer extends ASTVisitor {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean visit(TypeDeclaration type, BlockScope skope) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Overrid... | (new ShapeComputer(), null); |
513,468 | // Draws the bounding box around the detected faces.<NEW_LINE>public void paintComponent(Graphics g) {<NEW_LINE>float left = 0;<NEW_LINE>float top = 0;<NEW_LINE>int <MASK><NEW_LINE>int width = image.getWidth(this);<NEW_LINE>// Create a Java2D version of g.<NEW_LINE>Graphics2D g2d = (Graphics2D) g;<NEW_LINE>// Draw the ... | height = image.getHeight(this); |
1,439,858 | public String toEnumVarName(String name, String datatype) {<NEW_LINE>if (name.length() == 0) {<NEW_LINE>return "empty";<NEW_LINE>}<NEW_LINE>if (enumUnknownDefaultCase) {<NEW_LINE>if (name.equals(enumUnknownDefaultCaseName)) {<NEW_LINE>return camelize(name, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Reserved Name<NEW_LINE... | nameLowercase = StringUtils.lowerCase(name); |
365,900 | public GetProtocolsListResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetProtocolsListResult getProtocolsListResult = new GetProtocolsListResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | JsonToken token = context.getCurrentToken(); |
835,877 | public ViewHolderProvider onCreateViewHolder(ViewGroup parent, int viewType) {<NEW_LINE>logDebug("onCreateViewHolder");<NEW_LINE>Display display = ((Activity) context).getWindowManager().getDefaultDisplay();<NEW_LINE>DisplayMetrics outMetrics = new DisplayMetrics();<NEW_LINE>display.getMetrics(outMetrics);<NEW_LINE>Vie... | findViewById(R.id.file_explorer_filename); |
1,333,669 | public void testCriteriaQuery_Character(TestExecutionContext testExecCtx, TestExecutionResources testExecResources, Object managedComponentObject) throws Throwable {<NEW_LINE>final String testName = getTestName();<NEW_LINE>// Verify parameters<NEW_LINE>if (testExecCtx == null || testExecResources == null) {<NEW_LINE>As... | + testProps.get(key)); |
1,334,286 | private List<PrimaryStorageVO> allocateAll(PrimaryStorageAllocationSpec spec) {<NEW_LINE>class Result {<NEW_LINE><NEW_LINE>List<PrimaryStorageVO> result;<NEW_LINE><NEW_LINE>ErrorCode errorCode;<NEW_LINE>}<NEW_LINE>final Result ret = new Result();<NEW_LINE><MASK><NEW_LINE>allocatorChain.setName(String.format("allocate-p... | FlowChain allocatorChain = allocateBuilder.build(); |
1,604,164 | public Explanation.Code includes(final AclRule rule, final Map<String, String> resource, final String action) {<NEW_LINE>// evaluate type<NEW_LINE>if (rule.getResourceType() != null) {<NEW_LINE>String resType = resource.get("type");<NEW_LINE>if (null == resType || !rule.getResourceType().equals(resType)) {<NEW_LINE>ret... | action) : Explanation.Code.REJECTED; |
775,030 | private void checkType(Element type) {<NEW_LINE>if (type instanceof TypeElement) {<NEW_LINE>String name = type.getSimpleName().toString();<NEW_LINE>if (!names.contains(name)) {<NEW_LINE>names.add(name);<NEW_LINE>ModuleImportDescriptor moduleImport = getModuleImportDescriptor<MASK><NEW_LINE>if (moduleImport != null) {<N... | (name, (TypeElement) type); |
237,426 | public static DescribeBlockedRegionsResponse unmarshall(DescribeBlockedRegionsResponse describeBlockedRegionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBlockedRegionsResponse.setRequestId<MASK><NEW_LINE>List<InfoItem> infoList = new ArrayList<InfoItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("Descr... | (_ctx.stringValue("DescribeBlockedRegionsResponse.RequestId")); |
936,592 | private void searchServices(FileObject folder, Map<ServiceType, DataObject> services) {<NEW_LINE>FileObject[] fobjs = folder.getChildren();<NEW_LINE>for (int i = 0; i < fobjs.length; i++) {<NEW_LINE>if (!fobjs[i].isValid())<NEW_LINE>continue;<NEW_LINE>if (fobjs[i].isFolder()) {<NEW_LINE>searchServices(fobjs[i], service... | (ServiceType) inst.instanceCreate(); |
903,894 | // Main program does the requisite IO gymnastics<NEW_LINE>public static void main(final String[] args) {<NEW_LINE>F<String, BufferedReader> z = fileName -> {<NEW_LINE>try {<NEW_LINE>return new BufferedReader(new FileReader(new File(fileName)));<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>throw new Error(e);<N... | () -> f(reader)); |
537,296 | private InitiateAuthRequest initiateUserSrpAuthRequest(final Map<String, String> clientMetadata, AuthenticationDetails authenticationDetails, AuthenticationHelper authenticationHelper) {<NEW_LINE>userId = authenticationDetails.getUserId();<NEW_LINE>final InitiateAuthRequest initiateAuthRequest = new InitiateAuthRequest... | .getUserPoolId(), context)); |
337,173 | public static void addIbmClientAddressHeader(Message message, SIPConnection connection, ListeningPoint lpoint) throws IllegalArgumentException, SipParseException {<NEW_LINE>CharsBuffer ibmClientAddressBuffer = m_ibmClientAddressBuffers.get();<NEW_LINE>if (ibmClientAddressBuffer == null) {<NEW_LINE>ibmClientAddressBuffe... | SIPStackUtil.class, "SIPStackUtil addIbmClientAddressHeader", "IBM-Client-Address already added"); |
1,132,137 | public void decorateWithCastForReturn(AExpression userExpressionNode, AStatement parent, SemanticScope semanticScope, ScriptClassInfo scriptClassInfo) {<NEW_LINE>Location location = userExpressionNode.getLocation();<NEW_LINE>Class<?> valueType = semanticScope.getDecoration(userExpressionNode, Decorations.ValueType.clas... | (0), false, true); |
731,923 | private Comparator<Row> comparator(RelFieldCollation fieldCollation) {<NEW_LINE>final int nullComparison = fieldCollation.nullDirection.nullComparison;<NEW_LINE>final int x = fieldCollation.getFieldIndex();<NEW_LINE>switch(fieldCollation.direction) {<NEW_LINE>case ASCENDING:<NEW_LINE>return (o1, o2) -> {<NEW_LINE>final... | o2.getValues()[x]; |
351,388 | private static void createPyMethods() {<NEW_LINE>String clazz = className.substring(className.lastIndexOf(".") + 1);<NEW_LINE>String[] docItems = null;<NEW_LINE>for (List<String> functionDoc : functionDocs) {<NEW_LINE>String function = functionDoc.get(0);<NEW_LINE>String docReturn = "";<NEW_LINE>Map<String, String> <MA... | docParams = new LinkedHashMap<>(); |
1,740,163 | final ModifyFleetResult executeModifyFleet(ModifyFleetRequest modifyFleetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyFleetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
931,062 | public final <K> Map<K, ?> toMap(Supplier<? extends K> keySupplier1, Supplier<? extends K> keySupplier2, Supplier<? extends K> keySupplier3, Supplier<? extends K> keySupplier4, Supplier<? extends K> keySupplier5, Supplier<? extends K> keySupplier6, Supplier<? extends K> keySupplier7, Supplier<? extends K> keySupplier8,... | keySupplier4.get(), v4); |
1,583,498 | protected DataViewComponent createComponent() {<NEW_LINE>JFRModel model = getModel();<NEW_LINE>masterView = new SocketIOViewSupport.MasterViewSupport(model) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>void firstShown() {<NEW_LINE>changeAggregation(SocketIOViewSupport.Aggregation.ADDRESS_PORT, SocketIOViewSupport.Aggregatio... | this.setAggregation(primary, secondary); |
1,200,136 | protected JobResponse createJobResponse(Job job, RestUrlBuilder urlBuilder, String[] urlJobSegments) {<NEW_LINE>JobResponse response = new JobResponse();<NEW_LINE>response.setId(job.getId());<NEW_LINE>response.setCorrelationId(job.getCorrelationId());<NEW_LINE>response.setDueDate(job.getDuedate());<NEW_LINE>response.se... | setProcessInstanceId(job.getProcessInstanceId()); |
22,695 | public void sendBrowseStatus(int status, long browseId) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "sendBrowseStatus", new Object[] { Integer.valueOf(status), Long.valueOf(browseId) });<NEW_LINE>try {<NEW_LINE>ControlMessageFactory cmf;<NEW_LINE>ControlBrowseSta... | MPIO mpio = _messageProcessor.getMPIO(); |
903,442 | private TypeMirror type(String typeName) {<NEW_LINE>try {<NEW_LINE>typeName = typeName.trim();<NEW_LINE>if (cInfo != null && typeName.length() > 0) {<NEW_LINE>SourcePositions[] sourcePositions = new SourcePositions[1];<NEW_LINE>TreeUtilities tu = cInfo.getTreeUtilities();<NEW_LINE>// NOI18N<NEW_LINE>StatementTree stmt ... | ).parseType(typeName, enclClass); |
229,593 | public <T> T invokeMethod(Class<T> returnType, DISPID dispID, Object... args) {<NEW_LINE>assert COMUtils.comIsInitialized() : "COM not initialized";<NEW_LINE>VARIANT[] vargs;<NEW_LINE>if (null == args) {<NEW_LINE>vargs = new VARIANT[0];<NEW_LINE>} else {<NEW_LINE>vargs = new VARIANT[args.length];<NEW_LINE>}<NEW_LINE>fo... | .toVariant(args[i]); |
559,483 | /*<NEW_LINE>*<NEW_LINE>*/<NEW_LINE>public void trigger(TwitterContentHandle contentHandle, TwitterPaging paging, TwitterFetchStatusesFinishedCallback callback, ConnectionStatus connectionStatus, int priorityOffset) {<NEW_LINE>if (connectionStatus != null && !connectionStatus.isOnline()) {<NEW_LINE>if (callback != null)... | mFinishedCallbackMap.put(mFetchStatusesCallbackHandle, callback); |
1,349,678 | protected ReconcileResult reconcile(Set<AbstractMap.SimpleEntry<String, Long>> updatedMaxDateMap) {<NEW_LINE>logger.debug("Reconciling update timestamp for projects: " + updatedMaxDateMap.stream().map(AbstractMap.SimpleEntry::getKey).collect(Collectors.toList()));<NEW_LINE>return futureJdbi.useHandle(handle -> {<NEW_LI... | batch = handle.prepareBatch(updateProjectTimestampQuery); |
185,669 | protected ECCurve createCurve() {<NEW_LINE>BigInteger p = fromHex("BDB6F4FE3E8B1D9E0DA8C0D46F4C318CEFE4AFE3B6B8551F");<NEW_LINE>BigInteger a = fromHex("BB8E5E8FBC115E139FE6A814FE48AAA6F0ADA1AA5DF91985");<NEW_LINE>BigInteger b = fromHex("1854BEBDC31B21B7AEFC80AB0ECD10D5B1B3308E6DBF11C1");<NEW_LINE>BigInteger n = fromHex... | , n, h, true)); |
1,002,166 | public static DescribeScdnDomainConfigsResponse unmarshall(DescribeScdnDomainConfigsResponse describeScdnDomainConfigsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeScdnDomainConfigsResponse.setRequestId(_ctx.stringValue("DescribeScdnDomainConfigsResponse.RequestId"));<NEW_LINE>List<DomainConfig> domainConfigs ... | + "].FunctionArgs[" + j + "].ArgName")); |
818,196 | public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'pipe' is set<NEW_LINE>if (pipe == null) {<NEW_LINE><MASK><NEW_LINE>}... | throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"); |
95,810 | public void updateAdapter(List<App> apps) {<NEW_LINE>_apps = apps;<NEW_LINE>ArrayList<IconLabelItem> items = new ArrayList<>();<NEW_LINE>for (int i = 0; i < apps.size(); i++) {<NEW_LINE>App <MASK><NEW_LINE>items.add(new IconLabelItem(app.getIcon(), app.getLabel()).withIconSize(Setup.appSettings().getIconSize()).withTex... | app = apps.get(i); |
544,518 | private void doRun() {<NEW_LINE>while (true) {<NEW_LINE>DatagramPacket packet;<NEW_LINE>FileLockPacketPayload payload;<NEW_LINE>try {<NEW_LINE>packet = communicator.receive();<NEW_LINE>payload = communicator.decode(packet);<NEW_LINE>} catch (GracefullyStoppedException e) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>lock.lock... | addRequester(packet.getSocketAddress()); |
62,257 | private Request prepareRequest(CoapClient client, long c) {<NEW_LINE>if (!config.multipleObserveRequests && overallRequestsDownCounter.get() <= 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>countDown(overallRequestsDownCounter);<NEW_LINE>Request request;<NEW_LINE>int accept = TEXT_PLAIN;<NEW_LINE>byte[] payload = conf... | getOptions().setContentFormat(accept); |
1,285,705 | public NavigableSet<K> tailSet(K start, boolean startInclusive) {<NEW_LINE>boolean isInRange = true;<NEW_LINE>int result;<NEW_LINE>if (map.toEnd) {<NEW_LINE>result = (null != comparator()) ? comparator().compare(start, map.hi) : toComparable(start<MASK><NEW_LINE>isInRange = (map.hiInclusive || !startInclusive) ? result... | ).compareTo(map.hi); |
665,699 | private static void generateNewPartitionsForSplitWithPartitionSpec(ExecutionContext executionContext, PartitionInfo curPartitionInfo, List<PartitionGroupRecord> unVisiablePartitionGroups, SqlAlterTableGroupSplitPartition sqlAlterTableGroupSplitPartition, List<PartitionSpec> oldPartitions, List<PartitionSpec> newPartiti... | (i).getKey()); |
286,882 | private void insertNode(final DefaultMutableTreeNode nodeToInsert, DefaultMutableTreeNode rootNode) {<NEW_LINE>final Enumeration enumeration = rootNode.children();<NEW_LINE>ArrayList children = Collections.list(enumeration);<NEW_LINE>final int index = Collections.binarySearch(children, nodeToInsert, new Comparator<Defa... | ), virtualFile2.getPath()); |
940,756 | private boolean checkChild(ASTNode parent, ASTNode previous, ASTNode child) {<NEW_LINE>if ((parent.getFlags() & (ASTNode.RECOVERED | ASTNode.MALFORMED)) != 0 || (child.getFlags() & (ASTNode.RECOVERED | ASTNode.MALFORMED)) != 0)<NEW_LINE>return false;<NEW_LINE>int parentStart = parent.getStartPosition();<NEW_LINE>int pa... | = previousStart + previous.getLength(); |
117,059 | public <K, V, C extends Configuration<K, V>> Cache<K, V> createCache(String cacheName, C configuration) {<NEW_LINE>ClassLoader old = Thread.currentThread().getContextClassLoader();<NEW_LINE>try {<NEW_LINE>if (runsAsAnOsgiBundle) {<NEW_LINE>// override the context class loader with the CachingManager's classloader<NEW_L... | CacheException("Cache " + cacheName + " already exists"); |
31,527 | public void marshall(Robot robot, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (robot == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(robot.getArn(), ARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(ro... | robot.getLastDeploymentJob(), LASTDEPLOYMENTJOB_BINDING); |
1,004,750 | private ImmutableMap<String, ?> generateBootstrap(String zone, boolean supportIpv6) {<NEW_LINE>ImmutableMap.Builder<String, Object> nodeBuilder = ImmutableMap.builder();<NEW_LINE>nodeBuilder.put("id", "C2P-" + (rand.nextInt() & Integer.MAX_VALUE));<NEW_LINE>if (!zone.isEmpty()) {<NEW_LINE>nodeBuilder.put("locality", Im... | , ImmutableList.of("xds_v3")); |
1,318,509 | public static Map<DataKey, DataResource> readAttributes(CompiledResources resources) {<NEW_LINE>try (ZipInputStream zipStream = new ZipInputStream(Files.newInputStream(resources.getZip()))) {<NEW_LINE>Map<DataKey, DataResource> attributes = new LinkedHashMap<>();<NEW_LINE>for (ZipEntry entry = zipStream.getNextEntry();... | overwrite(value) : value)); |
1,636,516 | public void visit(ListItem listItem) {<NEW_LINE>Node child = listItem.getFirstChild();<NEW_LINE>if (child instanceof Paragraph) {<NEW_LINE>Node node = child.getFirstChild();<NEW_LINE>if (node instanceof Text) {<NEW_LINE>Text textNode = (Text) node;<NEW_LINE>Matcher matcher = REGEX_TASK_LIST_ITEM.matcher(textNode.getLit... | prependChild(new TaskListItemMarker(isChecked)); |
575,057 | public void debugLogStateOfPool() {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>StringBuilder currentState = new StringBuilder();<NEW_LINE>currentState.append(String.format("POOL STATUS: Current blacklist = %s,%n current hosts in pool = %s%n", blacklist.describeBlacklistedHosts(), currentPools.keySet().toString()));<... | .getValue().getPoolSize(); |
358,808 | // save<NEW_LINE>@PUT<NEW_LINE>@Path("/actions/{actionId}")<NEW_LINE>@JSONP<NEW_LINE>@NoCache<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON, "application/javascript" })<NEW_LINE>public final Response updateAction(@Context final HttpServletRequest request, @Context final HttpServletResponse response, @PathParam("actio... | DotPreconditions.notNull(workflowActionForm, "Expected Request body was empty."); |
802,683 | private void paintPageFast(RenderingContext c, PageBox page, DisplayListPageContainer pageOperations, int additionalTranslateX) {<NEW_LINE>page.paintBackground(c, 0, Layer.PAGED_MODE_PRINT);<NEW_LINE>c.setInPageMargins(true);<NEW_LINE>page.paintMarginAreas(c, 0, Layer.PAGED_MODE_PRINT);<NEW_LINE>c.setInPageMargins(fals... | painter.paint(c, pageOperations); |
736,252 | public void onClick(View v) {<NEW_LINE>final Builder builder = jobDispatcher.newJobBuilder().setTag(form.tag.get()).setRecurring(form.recurring.get()).setLifetime(form.persistent.get() ? Lifetime.FOREVER : Lifetime.UNTIL_NEXT_BOOT).setService(DemoJobService.class).setReplaceCurrent(form.replaceCurrent.get()).setRetrySt... | , form.getMaximumBackoffSeconds())); |
1,727,652 | static private // the ValueWithPath instance itself should not be.<NEW_LINE>ResultWithPath findInObject(AbstractConfigObject obj, ResolveContext context, Path path) throws NotPossibleToResolve {<NEW_LINE>// resolve ONLY portions of the object which are along our path<NEW_LINE>if (ConfigImpl.traceSubstitutionsEnabled())... | AbstractConfigObject) partiallyResolved.value, path); |
448,376 | private boolean checkClauses(IfNode root, IfNode[] clauses, boolean[] branchTaken) {<NEW_LINE>boolean result = true;<NEW_LINE>final Set<IfNode> ifNodes = new HashSet<IfNode>();<NEW_LINE>final Map<IfNode, Boolean> branches = new HashMap<IfNode, Boolean>();<NEW_LINE>for (int i = 0; i < clauses.length; i++) {<NEW_LINE>ifN... | out.printf("check-clauses: ifNode=%s not in set\n", current); |
1,018,849 | // IMPORTANT : ALWAYS INIT THE CHANNEL BEFORE FIRING NOTIFICATIONS !<NEW_LINE>public static void init(@NonNull Context context) {<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>String name = context.getString(R.string.updates_title);<NEW_LINE>int importance = NotificationManager.IMPORTANCE_DEFA... | NotificationChannel(ID, name, importance); |
966,213 | private static Map<Option, Field> processFields(Class<?> type, Set<Option> options) {<NEW_LINE>Map<Option, Field> map = new HashMap<Option, Field>();<NEW_LINE>for (Field f : type.getFields()) {<NEW_LINE>Arg arg = f.getAnnotation(Arg.class);<NEW_LINE>if (arg == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Option o = n... | map.put(o, f); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.