idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
855,291 | JSONObject writeItemsToJson(@NonNull JSONObject json) {<NEW_LINE>JSONArray jsonArray = new JSONArray();<NEW_LINE>if (!items.isEmpty()) {<NEW_LINE>try {<NEW_LINE>for (OsmNotesPoint point : items) {<NEW_LINE>JSONObject jsonObject = new JSONObject();<NEW_LINE>jsonObject.put(TEXT_KEY, point.getText());<NEW_LINE>jsonObject.... | AUTHOR_KEY, point.getAuthor()); |
868,302 | private void scanCompositeDatatype(Class<? extends ICompositeType> theClass, DatatypeDef theDatatypeDefinition) {<NEW_LINE>ourLog.debug("Scanning datatype class: {}", theClass.getName());<NEW_LINE>RuntimeCompositeDatatypeDefinition elementDef;<NEW_LINE>if (theClass.equals(ExtensionDt.class)) {<NEW_LINE>elementDef = new... | myClassToElementDefinitions.put(theClass, elementDef); |
640,690 | public Predicate toPredicate(Root<JobDetail> root, CriteriaQuery<?> query, CriteriaBuilder cb) {<NEW_LINE>List<Predicate> list = new ArrayList<Predicate>();<NEW_LINE>In<Object> in = cb.in(root.get("organ"));<NEW_LINE>list.add(cb.equal(root.get("orgi").as(String.class), user.getOrgi()));<NEW_LINE>list.add(cb.equal(root.... | in.value(Constants.CSKEFU_SYSTEM_NO_DAT); |
1,215,617 | private Map<String, List<GeneralStateTestCaseEipSpec>> generate(final BlockHeader blockHeader, final ReferenceTestWorldState initialWorldState, final Map<String, List<PostSection>> postSections, final StateTestVersionedTransaction versionedTransaction) {<NEW_LINE>BlockHeader safeHeader = blockHeader;<NEW_LINE>initialWo... | String eip = entry.getKey(); |
1,217,893 | final GetPolicyResult executeGetPolicy(GetPolicyRequest getPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetPolicyRequest> request = null;<NE... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,238,722 | public boolean eIsSet(int featureID) {<NEW_LINE>switch(featureID) {<NEW_LINE>case ModelPackage.MBRICKLET_LINEAR_POTI__LOGGER:<NEW_LINE>return LOGGER_EDEFAULT == null ? logger != null : !LOGGER_EDEFAULT.equals(logger);<NEW_LINE>case ModelPackage.MBRICKLET_LINEAR_POTI__UID:<NEW_LINE>return UID_EDEFAULT == null ? uid != n... | : !ENABLED_A_EDEFAULT.equals(enabledA); |
314,123 | public Client filter(Client client) {<NEW_LINE>ReadOnlyClient pseudoClient = new ReadOnlyClient(client);<NEW_LINE>// create all pseudo accounts<NEW_LINE>Map<Account, ReadOnlyAccount> account2pseudo = new HashMap<>();<NEW_LINE>Function<Account, ReadOnlyAccount> computeReadOnlyAccount = a -> {<NEW_LINE>ReadOnlyAccount pa... | p.getReferenceAccount(), computeReadOnlyAccount); |
1,710,576 | private static void compareWithJdk(Mode mode) {<NEW_LINE>MersenneTwister rand = new MersenneTwister(12345);<NEW_LINE>int toolong = 0;<NEW_LINE>for (int i = 0; i < 1000000; i++) {<NEW_LINE>double value = Double.longBitsToDouble(rand.nextLong());<NEW_LINE>String a = Double.toString(value);<NEW_LINE>// All of the longer s... | b, a, mode, "Jdk"); |
428,686 | public static void main(String[] args) throws IOException {<NEW_LINE>PrintWriter out;<NEW_LINE>String rules;<NEW_LINE>if (args.length > 0) {<NEW_LINE>rules = args[0];<NEW_LINE>} else {<NEW_LINE>rules = "edu/stanford/nlp/ling/tokensregex/demo/rules/colors.rules.txt";<NEW_LINE>}<NEW_LINE>if (args.length > 2) {<NEW_LINE>o... | println(annotation.toShorterString()); |
208,305 | public final void actionPerformed(@Nonnull final AnActionEvent event) {<NEW_LINE>final <MASK><NEW_LINE>final HierarchyBrowserBaseEx browser = (HierarchyBrowserBaseEx) dataContext.getData(myBrowserDataKey);<NEW_LINE>if (browser == null)<NEW_LINE>return;<NEW_LINE>final PsiElement selectedElement = browser.getSelectedElem... | DataContext dataContext = event.getDataContext(); |
1,020,607 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.games_info);<NEW_LINE>WindowManager.LayoutParams lp = new WindowManager.LayoutParams();<NEW_LINE>lp.copyFrom(getWindow().getAttributes());<NEW_LINE>lp.width = WindowManager.LayoutParams.MAT... | getWindow().setAttributes(lp); |
921,581 | public void handle(JsonNode packet) {<NEW_LINE>long channelId = packet.get("channel_id").asLong();<NEW_LINE>// if the message isn't from a server (or ephemeral)<NEW_LINE>// See https://github.com/discord/discord-api-docs/issues/2248<NEW_LINE>if (!packet.hasNonNull("guild_id")) {<NEW_LINE>// Check for EPHEMERAL messages... | optionalChannel = api.getTextChannelById(channelId); |
86,085 | public void editRow(int row, Object[] values) {<NEW_LINE>CommonDDBean ref = getEjbRef(row);<NEW_LINE>if (ref instanceof EjbRef) {<NEW_LINE>EjbRef param = (EjbRef) ref;<NEW_LINE>param.setEjbRefName((String) values[0]);<NEW_LINE>param.setEjbRefType((String) values[1]);<NEW_LINE>param.setHome((String) values[3]);<NEW_LINE... | ) > 0 ? desc : null); |
807,159 | private PResult handleStringMetaData(final PStringMetaData stringMetaData) {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Handle PStringMetaData={}", MessageFormatUtils.debugLog(stringMetaData));<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final Header agentInfo = ServerContext.getAgentInfo();<NEW_LINE>final S... | long agentStartTime = agentInfo.getAgentStartTime(); |
799,324 | public void testServletSubmitsManagedTaskThatLooksUpBMTBean(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE><MASK><NEW_LINE>Future<?> future = executor.submit(new Callable<Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void call() throws Exception {<NEW_LINE>Runnable ejbRun... | PrintWriter out = response.getWriter(); |
54,942 | public void run(final FlowTrigger trigger, Map data) {<NEW_LINE>VirtualRouterStruct s = new VirtualRouterStruct();<NEW_LINE>s.setInherentSystemTags(list(VirtualRouterSystemTags.DEDICATED_ROLE_VR.getTagFormat(), VirtualRouterSystemTags<MASK><NEW_LINE>s.setVirtualRouterVmSelector(new VirtualRouterVmSelector() {<NEW_LINE>... | .VR_LB_ROLE.getTagFormat())); |
490,031 | protected void runOneIteration() {<NEW_LINE>try {<NEW_LINE>LaunchingTasks launchingTasks = new LaunchingTasks(facadeService.getEligibleJobContext());<NEW_LINE>List<TaskRequest> taskRequests = launchingTasks.getPendingTasks();<NEW_LINE>if (!taskRequests.isEmpty()) {<NEW_LINE>AppConstraintEvaluator.getInstance().loadAppR... | log.error("Launch task error", throwable); |
1,605,082 | private List<HandlerMethodArgumentResolver> buildArgumentResolvers(boolean listCapable) {<NEW_LINE>List<HandlerMethodArgumentResolver> <MASK><NEW_LINE>resolvers.add(new PayloadExpressionArgumentResolver());<NEW_LINE>resolvers.add(new NullAwarePayloadArgumentResolver(this.argumentResolverMessageConverter));<NEW_LINE>res... | resolvers = new ArrayList<>(); |
1,417,351 | public void delete(final QualifiedName name, final List<String> partitionIds) {<NEW_LINE>validateDeletes(name, partitionIds != null ? partitionIds.size() : 0);<NEW_LINE>final MetacatRequestContext metacatRequestContext = MetacatContextManager.getContext();<NEW_LINE>registry.distributionSummary(this.partitionDeleteDistS... | record(partitionIds.size()); |
1,068,132 | public void sendAsync(String brokerAddr, Datagram request, long responseTimeout, ResponseFuture.Callback callback) throws ClientSendException {<NEW_LINE>final Channel channel = getOrCreateChannel(brokerAddr);<NEW_LINE>final ResponseFuture responseFuture = clientHandler.<MASK><NEW_LINE>request.getHeader().setOpaque(resp... | newResponse(channel, responseTimeout, callback); |
273,181 | // NOI18N<NEW_LINE>@Hint(displayName = "#DN_org.netbeans.modules.java.hints.ClassStructure.noopMethodInAbstractClass", description = "#DESC_org.netbeans.modules.java.hints.ClassStructure.noopMethodInAbstractClass", category = "class_structure", enabled = false, suppressWarnings = { "NoopMethodInAbstractClass" }, option... | , mth.getName())); |
1,079,046 | private void generateFieldsBuilderConstructor(JDefinedClass builderClass, JDefinedClass concreteBuilderClass, JDefinedClass instanceClass, JMethod instanceConstructor) {<NEW_LINE>// Locate the instance field since we'll need it to assign a value<NEW_LINE>JFieldVar instanceField = reflectionHelper.searchClassAndSuperCla... | instanceConstructorInvocation = JExpr._new(instanceClass); |
1,379,118 | public RerouteExplanation execute(RoutingAllocation allocation, boolean explain) {<NEW_LINE>final DiscoveryNode discoNode;<NEW_LINE>try {<NEW_LINE>discoNode = allocation.nodes().resolveNode(node);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>return explainOrThrowRejectedCommand(explain, allocation, e);<NEW_... | index + "][" + shardId + "], while no such shard has ever been active"); |
1,778,712 | public Object invoke(MethodInvocation methodInvocation) throws Throwable {<NEW_LINE>EntityManager em = emProvider.get();<NEW_LINE>// obtain a cached finder descriptor (or create a new one)<NEW_LINE>JpaFinderProxy.FinderDescriptor finderDescriptor = getFinderDescriptor(methodInvocation);<NEW_LINE>Object result = null;<N... | finderDescriptor, methodInvocation.getArguments()); |
1,506,547 | final CreateNotificationRuleResult executeCreateNotificationRule(CreateNotificationRuleRequest createNotificationRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createNotificationRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
798,214 | final GetDeploymentResult executeGetDeployment(GetDeploymentRequest getDeploymentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDeploymentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(getDeploymentRequest)); |
969,830 | public static void changeServerPorts(LibertyServer server, int httpPort, int httpsPort) throws Exception {<NEW_LINE>ServerConfiguration config = server.getServerConfiguration();<NEW_LINE>HttpEndpoint http = config.getHttpEndpoints().getById("defaultHttpEndpoint");<NEW_LINE>if (http == null) {<NEW_LINE>http = new HttpEn... | == -1 ? 0 : httpsPort); |
1,409,108 | public Object apply(ActionContext ctx, Object caller, Object[] sources) throws FrameworkException {<NEW_LINE>assertArrayHasMinLengthAndAllElementsNotNull(sources, 1);<NEW_LINE>String baseUrl = null;<NEW_LINE>String userParameter = null;<NEW_LINE>Boolean runWithXserver = false;<NEW_LINE>String xServerSettings = null;<NE... | page, parameterList, baos, xServerSettings); |
481,194 | public Response<Void> deleteByIdWithResponse(String id, String ifMatch, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID... | format("The resource ID '%s' is not valid. Missing path segment 'apiVersionSets'.", id))); |
386,198 | private void jbInit() throws Exception {<NEW_LINE>bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));<NEW_LINE>CPanel parameterPanel = dialog.getParameterPanel();<NEW_LINE>parameterPanel.setLayout(new BorderLayout());<NEW_LINE>CPanel parameterStdPanel = new CPanel(new GridBagLayout());<NEW_LINE>parame... | 5), 0, 0)); |
1,491,948 | public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) throws ApiException {<NEW_LINE>String basePath = null;<NEW_LINE>// Operation Servers<NEW_LINE>String[] localBasePaths = new String[] {};<NEW_LINE>// Determine Base Path to Use<NEW_LINE>if (localCustomBaseUrl != null) {<NEW_LINE>basePath = local... | localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); |
573,425 | private void dragChart(MouseEvent e) {<NEW_LINE>double deltaPxX = e.getX() - mouseDownStartX;<NEW_LINE>double deltaPxY = e.getY() - mouseDownStartY;<NEW_LINE>double deltaX = deltaPxX * mouseDownValPerPxX;<NEW_LINE>double deltaY = deltaPxY * mouseDownValPerPxY.get(0);<NEW_LINE>if (Double.isNaN(mouseDownMinX) || Double.i... | axis = rightYAxis.get(i); |
984,449 | public Void visitBinary(BinaryTree binaryTree, Void unused) {<NEW_LINE>ExpressionTree left = unwrap(binaryTree.getLeftOperand());<NEW_LINE>ExpressionTree right = unwrap(binaryTree.getRightOperand());<NEW_LINE>if (IS_ENABLED.matches(left, state) && sameLoggerAtSameLevel(logInvocation, left, state)) {<NEW_LINE>// `isEnab... | super.visitBinary(binaryTree, null); |
807,768 | public boolean add(final E e) {<NEW_LINE>boolean result = false;<NEW_LINE>final OneOrMore<E> values = backingMap.get(e);<NEW_LINE>// Skip the item if we are deduplicating and the item already exists<NEW_LINE>boolean skipItem = (deduplicate && null != values && values.contains(e));<NEW_LINE>if (!skipItem) {<NEW_LINE>if ... | remove(last.getKey()); |
649,647 | public Answer cloneVolumeFromBaseTemplate(final CopyCommand cmd) {<NEW_LINE>final Connection conn = hypervisorResource.getConnection();<NEW_LINE>final DataTO srcData = cmd.getSrcTO();<NEW_LINE>final DataTO destData = cmd.getDestTO();<NEW_LINE>final VolumeObjectTO volume = (VolumeObjectTO) destData;<NEW_LINE>VDI vdi = n... | (volume.getSize())); |
945,258 | private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {<NEW_LINE>boolean hasValue = in.readBoolean();<NEW_LINE>String vString = in.readUTF();<NEW_LINE>projectName = hasValue ? vString : null;<NEW_LINE>hasValue = in.readBoolean();<NEW_LINE>int vInteger = in.readInt();<NEW_LINE>tabSize ... | indexedSymlinks.put(canonical, indexed); |
1,369,591 | private static void handleUnchecked(Permissions collection, PatternBuilder patternBuilder, String urlPatternSpec) {<NEW_LINE>String httpMethodSpec = null;<NEW_LINE>BitSet noAuthMethods = patternBuilder.getNoAuthMethods();<NEW_LINE>if (!patternBuilder.otherConstraint.isAuthConstrained()) {<NEW_LINE><MASK><NEW_LINE>metho... | BitSet methods = patternBuilder.getMethodSet(); |
1,678,906 | public Result<List<Map<String, Object>>> apiHistory(@QueryParameter("id") String apiId) {<NEW_LINE>//<NEW_LINE>List<Map<FieldDef, String>> //<NEW_LINE>releaseList = //<NEW_LINE>this.dataAccessLayer.//<NEW_LINE>listObjectBy(//<NEW_LINE>EntityDef.RELEASE, DatawayUtils.conditionByApiId(apiId));<NEW_LINE>releaseList = (rel... | STATUS)).typeNum()); |
1,254,235 | protected MachineRecipe findNextRecipe(BlockMenu menu) {<NEW_LINE>if (!hasFreeSlot(menu)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>for (int slot : getInputSlots()) {<NEW_LINE>ItemStack item = menu.getItemInSlot(slot);<NEW_LINE>if (SlimefunUtils.isItemSimilar(item, gravel, true, false)) {<NEW_LINE>ItemStack output = ... | new ItemStack[] { output }); |
1,226,519 | public void run() {<NEW_LINE>if (skipRunningTask()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MembershipChangeSchedule schedule = getMembershipChangeSchedule();<NEW_LINE>if (schedule == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (logger.isFineEnabled()) {<NEW_LINE>logger.fine("Handling " + schedule);<NEW_LINE>}<NEW_L... | changedGroups = new ConcurrentHashMap<>(); |
1,153,104 | public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required pa... | HashMap<String, Object>(); |
1,752,840 | boolean validateSharedSettingsPath() {<NEW_LINE>String sharedSettingsPath = sharedSettingsTextField.getText().trim();<NEW_LINE>// Automatically valid if shared settings aren't selected<NEW_LINE>if (!sharedConfigCheckbox.isSelected()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (sharedSettingsPath.isEmpty()) {<NEW_LI... | (AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.EmptySettingsDirectory")); |
1,684,869 | int implRead(char[] cbuf, int off, int end) throws IOException {<NEW_LINE>// In order to handle surrogate pairs, this method requires that<NEW_LINE>// the invoker attempt to read at least two characters. Saving the<NEW_LINE>// extra character, if any, at a higher level is easier than trying<NEW_LINE>// to deal with it... | cbuf, off, end - off); |
628,632 | private void writeName(Writer code, StructInfo target, String readValue, String writerName, boolean external) throws IOException {<NEW_LINE>if (target.enumConstantNameSource != null) {<NEW_LINE>String constantNameType = extractReturnType(target.enumConstantNameSource);<NEW_LINE>StructInfo info = context.structs.get(con... | context.inlinedConverters.get(constantNameType); |
811,322 | public void generateProjectBuildScript(String projectName, InitSettings settings, BuildScriptBuilder buildScriptBuilder) {<NEW_LINE>buildScriptBuilder.repositories().mavenCentral("Use Maven Central for resolving dependencies.");<NEW_LINE>String pluginId = settings.getPackageName() + ".greeting";<NEW_LINE>String pluginC... | methodInvocation(null, "gradlePlugin.testSourceSets", functionalTestSourceSet); |
1,598,275 | public DebeziumSourceFunction<T> build() {<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.setProperty("connector.class", PostgresConnector.class.getCanonicalName());<NEW_LINE><MASK><NEW_LINE>// hard code server name, because we don't need to distinguish it, docs:<NEW_LINE>// Logical name that identifies a... | props.setProperty("plugin.name", pluginName); |
559,961 | public static JPopupMenu createPopup(TaskListTable table) {<NEW_LINE>JPopupMenu popup = new JPopupMenu();<NEW_LINE>// show source<NEW_LINE>Task t = table.getSelectedTask();<NEW_LINE>if (null != t) {<NEW_LINE>popup.add(getDefaultAction(t));<NEW_LINE>popup.addSeparator();<NEW_LINE>// task's custom actions<NEW_LINE>Action... | JRadioButtonMenuItem(new SwitchScopeAction(scope)); |
1,855,267 | public static void main(String[] args) {<NEW_LINE>// eagerly initialized multiton<NEW_LINE>LOGGER.info("Printing out eagerly initialized multiton contents");<NEW_LINE>LOGGER.info("KHAMUL={}", Nazgul.getInstance(NazgulName.KHAMUL));<NEW_LINE>LOGGER.info("MURAZOR={}", Nazgul.getInstance(NazgulName.MURAZOR));<NEW_LINE>LOG... | info("UVATHA={}", NazgulEnum.UVATHA); |
1,003,793 | public boolean addEntry(File file) {<NEW_LINE>if (file == null) {<NEW_LINE>log.warning("No File");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!file.exists() || file.isDirectory() || !file.canRead()) {<NEW_LINE>log.warning("not added - " + file + ", Exists=" + file.exists() + ", Directory=" + file.isDirectory());<NE... | Level.SEVERE, "(file)", ex); |
1,502,570 | final CreateServiceLinkedRoleResult executeCreateServiceLinkedRole(CreateServiceLinkedRoleRequest createServiceLinkedRoleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createServiceLinkedRoleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | CreateServiceLinkedRoleResult>(new CreateServiceLinkedRoleResultStaxUnmarshaller()); |
954,569 | final PutThirdPartyJobFailureResultResult executePutThirdPartyJobFailureResult(PutThirdPartyJobFailureResultRequest putThirdPartyJobFailureResultRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putThirdPartyJobFailureResultRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
332,401 | public FilterResult apply(String fileName, InputStream stream) throws IOException {<NEW_LINE>if (stream == null) {<NEW_LINE>return new FilterResult(null, false);<NEW_LINE>}<NEW_LINE>// Allow replacement of certain values in css<NEW_LINE>if (fileName.endsWith(CSS)) {<NEW_LINE>String applicationName = applicationConfig.n... | replaceHeaderVars(oldContents, applicationName, applicationVersion); |
1,189,403 | public CompletableFuture<Void> writeRegistersNamed(Map<String, byte[]> values) {<NEW_LINE>return model.gateFuture(thread.listRegisters().thenCompose(regs -> {<NEW_LINE>return requestElements(false);<NEW_LINE>}).thenCompose(__ -> {<NEW_LINE>Map<String, ? extends TargetObject> regs = getCachedElements();<NEW_LINE>Map<Dbg... | toWrite = new LinkedHashMap<>(); |
377,717 | public void deleteTaxClass(Long id, MerchantStore store, Language language) {<NEW_LINE>Validate.notNull(id, "TaxClass id cannot be null");<NEW_LINE>Validate.notNull(store, "MerchantStore cannot be null");<NEW_LINE>Validate.notNull(store.getCode(), "MerchantStore code cannot be null");<NEW_LINE>try {<NEW_LINE>TaxClass <... | model = taxClassService.getById(id); |
694,499 | protected double outsideDistance(final DistanceStyle distanceStyle, final double x, final double y, final double z) {<NEW_LINE>final double topDistance = distanceStyle.computeDistance(planetModel, topPlane, x, y, z, leftPlane, rightPlane);<NEW_LINE>final double leftDistance = distanceStyle.computeDistance(planetModel, ... | y, z, rightPlane, topPlane); |
1,318,670 | public static ActiveAggregateConfigRulesResponse unmarshall(ActiveAggregateConfigRulesResponse activeAggregateConfigRulesResponse, UnmarshallerContext _ctx) {<NEW_LINE>activeAggregateConfigRulesResponse.setRequestId(_ctx.stringValue("ActiveAggregateConfigRulesResponse.RequestId"));<NEW_LINE>OperateRuleResult operateRul... | = new ArrayList<OperateRuleItem>(); |
1,049,639 | UnmodifiableIterator<Entry<K, V>> entryIterator() {<NEW_LINE>return new UnmodifiableIterator<Entry<K, V>>() {<NEW_LINE><NEW_LINE>final Iterator<? extends Entry<K, ? extends ImmutableCollection<V>>> asMapItr = map.entrySet().iterator();<NEW_LINE><NEW_LINE>@CheckForNull<NEW_LINE>K currentKey = null;<NEW_LINE><NEW_LINE>It... | .getValue().iterator(); |
687,328 | private HttpPipeline createHttpPipeline() {<NEW_LINE>Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;<NEW_LINE>if (httpLogOptions == null) {<NEW_LINE>httpLogOptions = new HttpLogOptions();<NEW_LINE>}<NEW_LINE>if (clientOptions == null) {<NEW_LINE>clien... | add(new HttpLoggingPolicy(httpLogOptions)); |
1,652,775 | private RefundInvoiceCandidate createSingleRefundCandidate(@NonNull final AssignableInvoiceCandidate assignableCandidate, @NonNull final RefundContract refundContract, @NonNull final List<RefundConfig> refundConfigs) {<NEW_LINE>final I_C_Invoice_Candidate assignableInvoiceCandidateRecord = load(assignableCandidate.getI... | setC_DocTypeInvoice_ID(docTypeId.getRepoId()); |
22,308 | private void processObject(final ProcessingReport report, final FullData input) throws ProcessingException {<NEW_LINE>final SchemaTree tree = input.getSchema();<NEW_LINE>final JsonTree instance = input.getInstance();<NEW_LINE>final JsonNode schema = tree.getNode();<NEW_LINE>final JsonNode node = instance.getNode();<NEW... | data = input.withInstance(newInstance); |
823,292 | private void configureCommonWebAnnotation(TargetConfig targetConfig, AnnotationInfo webAnnotation, String targetConfigType) {<NEW_LINE>AnnotationValue asyncSupportedValue = webAnnotation.getValue("asyncSupported");<NEW_LINE>boolean asyncSupported = (null == asyncSupportedValue ? false : asyncSupportedValue.getBooleanVa... | smallIconValue.getStringValue() : null); |
1,693,439 | public static Set<Geocache> loadCaches(final Collection<String> geocodes, final EnumSet<LoadFlag> loadFlags) {<NEW_LINE>if (CollectionUtils.isEmpty(geocodes)) {<NEW_LINE>return new HashSet<>();<NEW_LINE>}<NEW_LINE>final Set<Geocache> result = new HashSet<<MASK><NEW_LINE>final Set<String> remaining = new HashSet<>(geoco... | >(geocodes.size()); |
151,969 | public boolean isGrayscale(Bitmap bitmap) {<NEW_LINE>int height = bitmap.getHeight();<NEW_LINE>int width = bitmap.getWidth();<NEW_LINE>// shrink to a more manageable (yet hopefully no more or less colorful) size<NEW_LINE>if (height > COMPACT_BITMAP_SIZE || width > COMPACT_BITMAP_SIZE) {<NEW_LINE>if (mTempCompactBitmap ... | 0, 0, width, height); |
1,469,339 | private void renderSword(@Nonnull EnumFacing facing, @Nonnull ItemStack sword, float swingProgress, boolean leftHand) {<NEW_LINE>// rotate to facing direction<NEW_LINE>GlStateManager.translate(0.5f, 0, 0.5f);<NEW_LINE>float offset = 270f;<NEW_LINE>if (facing.getFrontOffsetX() != 0) {<NEW_LINE>offset *= -1;<NEW_LINE>}<N... | renderItem(sword, TransformType.NONE); |
1,836,900 | public static ListMapRouteDetailsResponse unmarshall(ListMapRouteDetailsResponse listMapRouteDetailsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listMapRouteDetailsResponse.setRequestId(_ctx.stringValue("ListMapRouteDetailsResponse.RequestId"));<NEW_LINE>listMapRouteDetailsResponse.setCode(_ctx.stringValue("ListMapRo... | (_ctx.longValue("ListMapRouteDetailsResponse.TotalCount")); |
877,324 | public P convert(T thriftObj) {<NEW_LINE>Descriptor protoDesc = protoObj_.getDescriptorForType();<NEW_LINE>Map<? extends org.apache.thrift.TFieldIdEnum, FieldMetaData> fieldMap = FieldMetaData.getStructMetaDataMap(thriftObj.getClass());<NEW_LINE>for (Map.Entry<? extends TFieldIdEnum, FieldMetaData> e : fieldMap.entrySe... | fieldValue = thriftObj.getFieldValue(tFieldIdEnum); |
1,146,732 | public Path resolveSourcePath(SourcePath sourcePath) {<NEW_LINE>if (sourcePath instanceof PathSourcePath) {<NEW_LINE>return projectFilesystem.relativize(pathSourcePathResolverAdapter.getAbsolutePath(sourcePath)).getPath();<NEW_LINE>}<NEW_LINE>Preconditions.checkArgument(sourcePath instanceof BuildTargetSourcePath);<NEW... | resolver = actionGraphBuilderForNode.apply(node); |
116,058 | private void generatePatternBitmap() {<NEW_LINE>if (getBounds().width() <= 0 || getBounds().height() <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>bitmap = Bitmap.createBitmap(getBounds().width(), getBounds().height(), Config.ARGB_8888);<NEW_LINE><MASK><NEW_LINE>Rect r = new Rect();<NEW_LINE>boolean verticalStartWhite =... | Canvas canvas = new Canvas(bitmap); |
967,776 | private static boolean defineOwnPropertyIndex(JSDynamicObject thisObj, Number numericIndex, PropertyDescriptor desc) {<NEW_LINE>long index = validIntegerIndex(thisObj, numericIndex);<NEW_LINE>if (index == -1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (desc.isAccessorDescriptor()) {<NEW_LINE>return false;<NEW_LINE... | Object value = desc.getValue(); |
1,583,873 | Configuration toConfigurationNode(int instanceNumber, String subnetId, ConvertedConfiguration awsConfiguration, Region region, Warnings warnings) {<NEW_LINE>Subnet subnet = region.getSubnets().get(subnetId);<NEW_LINE>if (subnet == null) {<NEW_LINE>warnings.redFlag(String.format("Subnet \"%s\" for Elasticsearch domain \... | getAws().setSubnetId(subnetId); |
919,226 | public void init(ServletConfig servletConfig, JaxRsProviderFactoryService providerFactoryService) throws ServletException {<NEW_LINE>super.init(servletConfig, providerFactoryService);<NEW_LINE>LibertyJaxRsServerFactoryBean jaxRsServerFactory = new LibertyJaxRsServerFactoryBean(endpointInfo, <MASK><NEW_LINE>if (features... | jaxRsModuleMetaData, beanCustomizers, servletConfig, providerFactoryService); |
672,672 | public void execute(AdminCommandContext adminCommandContext) {<NEW_LINE>ActionReport actionReport = adminCommandContext.getActionReport();<NEW_LINE>// Get the Node Object and validate<NEW_LINE>Node node = nodes.getNode(nodeName);<NEW_LINE>if (node == null) {<NEW_LINE>actionReport.failure(logger, "No nodeName found with... | toString(server.getAdminPort()); |
1,303,567 | protected boolean validate(final String uri) {<NEW_LINE>if (uri.indexOf("://") != -1) {<NEW_LINE>final Protocol protocol = factory.forName(uri.substring(0, uri.indexOf("://")));<NEW_LINE>if (null == protocol) {<NEW_LINE>console.printf("Unknown protocol in URI %s%n", uri);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NE... | console.printf("Missing path in URI %s%n", uri); |
1,567,063 | protected void performContextAction(final Node[] nodes) {<NEW_LINE>if (!Subversion.getInstance().checkClientAvailable()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Context ctx = getContext(nodes);<NEW_LINE>final File[] roots = SvnUtils.getActionRoots(ctx);<NEW_LINE>if (roots == null || roots.length == 0)<NEW_LINE>return;<N... | boolean hasChanges = files.length > 0; |
1,504,713 | // Interpolate a color between values, potentially<NEW_LINE>int interpColor(float where) {<NEW_LINE>if (colors.size() == 0)<NEW_LINE>return 0;<NEW_LINE>if (colors.size() == 1)<NEW_LINE>return colors.get(0);<NEW_LINE>float pos = where * colors.size();<NEW_LINE>int aIdx = (int) Math.floor(pos);<NEW_LINE>int bIdx = (int) ... | ] iVals = new int[4]; |
347,896 | public KeyValue unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>KeyValue keyValue = new KeyValue();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == nu... | String currentParentElement = context.getCurrentParentElement(); |
304,534 | private void benchmarkSelected(String id, String selectedDevices, double refElapsed, double refElapsedMedian, double refFirstIteration) {<NEW_LINE>final String[] devices = selectedDevices.split(",");<NEW_LINE>for (String device : devices) {<NEW_LINE>final String[] indicies = device.split(":");<NEW_LINE>final int driver... | .parseInt(indicies[1]); |
144,680 | public static RecalibrationReport apply(final JavaPairRDD<GATKRead, Iterable<GATKVariant>> readsWithVariants, final SAMFileHeader header, final String referenceFileName, final RecalibrationArgumentCollection recalArgs) {<NEW_LINE>JavaRDD<RecalibrationTables> unmergedTables = readsWithVariants.mapPartitions(readsWithVar... | singletonIterator(bqsr.getRecalibrationTables()); |
1,237,919 | private static void drawAddress(Graphics2D g, int xpos, int ypos, int nrAddressBits) {<NEW_LINE>GraphicsUtil.switchToWidth(g, 1);<NEW_LINE>GraphicsUtil.drawText(g, "0", xpos + 22, ypos + 10, GraphicsUtil.H_LEFT, GraphicsUtil.V_CENTER);<NEW_LINE>GraphicsUtil.drawText(g, Integer.toString(nrAddressBits - 1), xpos + 22, yp... | xpos + 45, ypos + 30); |
1,475,299 | final SetActiveReceiptRuleSetResult executeSetActiveReceiptRuleSet(SetActiveReceiptRuleSetRequest setActiveReceiptRuleSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setActiveReceiptRuleSetRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LIN... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,635,092 | public CommandDataVersions generateCustomCommandData(Player player) {<NEW_LINE>if (!this.testPermission(player)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>CommandData customData = this.commandData.clone();<NEW_LINE>if (getAliases().length > 0) {<NEW_LINE>List<String> aliases = new ArrayList<>(Arrays.asList(getAliases... | ("default", new CommandOverload()); |
707,790 | private IQueryFilter<I_M_Tour_Instance> createTourInstanceMatcher(final ITourInstanceQueryParams params) {<NEW_LINE>Check.assumeNotNull(params, "params not null");<NEW_LINE>final IQueryBL queryBL = <MASK><NEW_LINE>final ICompositeQueryFilter<I_M_Tour_Instance> filters = queryBL.createCompositeQueryFilter(I_M_Tour_Insta... | Services.get(IQueryBL.class); |
405,047 | public static void main(final String[] args) {<NEW_LINE>BasicNetwork network = new BasicNetwork();<NEW_LINE>network.addLayer(new BasicLayer(null, true, 2));<NEW_LINE>network.addLayer(new BasicLayer(new ActivationSigmoid(), true, 5));<NEW_LINE>network.addLayer(new BasicLayer(new ActivationSigmoid(), false, 1));<NEW_LINE... | BasicData.combineXY(XOR_INPUT, XOR_IDEAL); |
1,524,333 | public static void PP_Order_BOMLine(MPPOrderBOMLine obl) {<NEW_LINE>String trxName = obl.get_TrxName();<NEW_LINE><MASK><NEW_LINE>//<NEW_LINE>String typeMRP = MPPMRP.TYPEMRP_Demand;<NEW_LINE>BigDecimal qty = obl.getQtyRequired().subtract(obl.getQtyDelivered());<NEW_LINE>if (obl.isCoProduct() || obl.isByProduct()) {<NEW_... | Properties ctx = obl.getCtx(); |
378,952 | private DateTimeResolutionResult parseEachUnit(String text) {<NEW_LINE>DateTimeResolutionResult ret = new DateTimeResolutionResult();<NEW_LINE>// handle "daily", "weekly"<NEW_LINE>Optional<Match> matched = Arrays.stream(RegExpUtility.getMatches(this.config.getPeriodicRegex(), text)).findFirst();<NEW_LINE>if (matched.is... | "Set: " + ret.getTimex()); |
674,993 | public Map<String, Map<String, AttributeAdapter>> attributeAdaptersForFunction() {<NEW_LINE>Map<String, Map<String, AttributeAdapter>> ret = new HashMap<>();<NEW_LINE>Map<String, AttributeAdapter> tfMappings = new LinkedHashMap<>();<NEW_LINE>val fields = DifferentialFunctionClassHolder.getInstance().getFieldsForFunctio... | onnxMappings = new HashMap<>(); |
263,165 | public float evaluate(int indexA, int indexB, float t) {<NEW_LINE>m_sweepA.getTransform(xfa, t);<NEW_LINE>m_sweepB.getTransform(xfb, t);<NEW_LINE>switch(m_type) {<NEW_LINE>case POINTS:<NEW_LINE>{<NEW_LINE>localPointA.set(m_proxyA.getVertex(indexA));<NEW_LINE>localPointB.set(m_proxyB.getVertex(indexB));<NEW_LINE>Transfo... | xfa.q, m_axis, normal); |
1,496,461 | private static void decode11(DataInput in, long[] tmp, long[] longs) throws IOException {<NEW_LINE>in.readLongs(tmp, 0, 22);<NEW_LINE>shiftLongs(tmp, 22, longs, 0, 5, MASK16_11);<NEW_LINE>for (int iter = 0, tmpIdx = 0, longsIdx = 22; iter < 2; ++iter, tmpIdx += 11, longsIdx += 5) {<NEW_LINE>long l0 = (tmp[tmpIdx + 0] &... | longs[longsIdx + 4] = l4; |
1,062,293 | final UpdateUserPoolDomainResult executeUpdateUserPoolDomain(UpdateUserPoolDomainRequest updateUserPoolDomainRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateUserPoolDomainRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
623,145 | public static boolean isDatabaseOK(Properties ctx) {<NEW_LINE>// Validate UUID supported<NEW_LINE>DB.validateSupportedUUIDFromDB();<NEW_LINE>// Check Version<NEW_LINE>String version = "?";<NEW_LINE>String sql = "SELECT Version FROM AD_System";<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_L... | "Start RUN_Migrate (in utils)\nSee: http://wiki.adempiere.net/maintain", title, JOptionPane.INFORMATION_MESSAGE); |
1,181,453 | /* (non-Javadoc)<NEW_LINE>* @see org.apache.jmeter.visualizers.request.RequestView#init()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void init() {<NEW_LINE>paneRaw = new JPanel(new BorderLayout(0, 5));<NEW_LINE>sampleDataField = JSyntaxTextArea.<MASK><NEW_LINE>sampleDataField.setEditable(false);<NEW_LINE>sampleData... | getInstance(20, 80, true); |
1,694,511 | public FieldList deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {<NEW_LINE>JsonArray fieldsArray = jsonElement.getAsJsonArray();<NEW_LINE>for (JsonElement fieldElement : fieldsArray) {<NEW_LINE>JsonObject fieldObject = fieldElement.getAsJ... | legacyType = LegacySQLTypeName.legacySQLTypeName(standardType); |
591,540 | public static GalenActionGenerateArguments parse(String[] args) {<NEW_LINE>args = ArgumentsUtils.processSystemProperties(args);<NEW_LINE>Options options = new Options();<NEW_LINE>options.addOption("e", "export", true, "Path to generated spec file");<NEW_LINE>options.addOption("G", "no-galen-extras", false, "Disable gal... | parser.parse(options, args); |
1,045,595 | private static // to the boundary of the merged component when a local maximum is encountered at index<NEW_LINE>void mergeComponents(final List<Component> components, final int[] colors, final int leftColor, final int rightColor, final int index) {<NEW_LINE>final int indexToKeep;<NEW_LINE>final int indexToMerge;<NEW_LI... | (indexToMerge).rightIndex] = indexToKeep; |
1,804,492 | private static Provider csvLineToProvider(Map<String, String> line) {<NEW_LINE>Provider d = new Provider();<NEW_LINE>// using remove instead of get here so that we can iterate over the remaining keys later<NEW_LINE>d.id = line.remove("id");<NEW_LINE>d.npi = toProviderNPI(d.id, loaded);<NEW_LINE>d.name = line.remove("na... | city = line.remove("city"); |
844,869 | static Property modelRefToProperty(springfox.documentation.schema.ModelReference modelRef) {<NEW_LINE>if (modelRef == null || "void".equalsIgnoreCase(modelRef.getType())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Property responseProperty;<NEW_LINE>if (modelRef.isCollection()) {<NEW_LINE>responseProperty = springfox.... | new IllegalStateException("ModelRef that is a map should have an itemModel")))); |
1,418,461 | private void loadPrev5min() {<NEW_LINE>Iterator<Integer> serverIds = serverObjMap<MASK><NEW_LINE>final List<Pack> result = new ArrayList<Pack>();<NEW_LINE>while (serverIds.hasNext()) {<NEW_LINE>int serverId = serverIds.next();<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param... | .keySet().iterator(); |
1,191,012 | protected void handleListenerSetup(final AsyncResult<DatagramSocket> listenResult, final CompletableFuture<InetSocketAddress> addressFuture) {<NEW_LINE>if (listenResult.failed()) {<NEW_LINE>Throwable cause = listenResult.cause();<NEW_LINE>LOG.error("An exception occurred when starting the peer discovery agent", cause);... | localAddress().port()); |
63,190 | public static PartClauseItem convertToPartClauseItem(PartitionInfo partInfo, RelDataType relRowType, RexNode partPred, PartPruneStepBuildingContext stepContext) {<NEW_LINE>if (partPred == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!(partPred instanceof RexCall)) {<NEW_LINE>PartClauseItem item = checkIfAlways... | partInfo, relRowType, partPredInfo, stepContext); |
1,332,078 | public static DescribeGroupedTagsResponse unmarshall(DescribeGroupedTagsResponse describeGroupedTagsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGroupedTagsResponse.setRequestId(_ctx.stringValue("DescribeGroupedTagsResponse.RequestId"));<NEW_LINE>describeGroupedTagsResponse.setSuccess(_ctx.booleanValue("Descr... | ("DescribeGroupedTagsResponse.GroupedFileds[" + i + "].Name")); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.