idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
980,826 | void freeLocationListeners() {<NEW_LINE>if (MyDebug.LOG)<NEW_LINE>Log.d(TAG, "freeLocationListeners");<NEW_LINE>if (locationListeners != null) {<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {<NEW_LINE>// Android Lint claims we need location permission for LocationManager.removeUpdates().<NEW_LINE>// als... | Log.d(TAG, "location permission not available"); |
1,189,484 | public void onPreviewSizeChosen(final Size size, final int rotation) {<NEW_LINE>final float textSizePx = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, TEXT_SIZE_DIP, getResources().getDisplayMetrics());<NEW_LINE>borderedText = new BorderedText(textSizePx);<NEW_LINE>borderedText.setTypeface(Typeface.MONOSPACE);... | i("Initializing at size %dx%d", previewWidth, previewHeight); |
795,449 | public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'query' is set<NEW_LINE>if (query == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'query' when ca... | final String[] localVarAccepts = {}; |
351,457 | public void removeAttribute(String name) {<NEW_LINE>synchronized (getSynchronizer()) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceEntry(this, "removeAttribute", name);<NEW_LINE>}<NEW_LINE>if (m_appDescriptor != null && m_appDescriptor.isJSR289Application()) {<NEW_LINE>// TODO this is temp... | ).removeAttribute(this, name); |
1,283,592 | static String encodeValue(Object value) throws IOException {<NEW_LINE>ByteArrayOutputStream bos = new ByteArrayOutputStream();<NEW_LINE>try {<NEW_LINE>ObjectOutputStream oos = new ObjectOutputStream(bos);<NEW_LINE>oos.writeObject(value);<NEW_LINE>oos.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw (IOException... | StringBuffer(bArray.length * 2); |
1,344,978 | final ResetFpgaImageAttributeResult executeResetFpgaImageAttribute(ResetFpgaImageAttributeRequest resetFpgaImageAttributeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(resetFpgaImageAttributeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | endClientExecution(awsRequestMetrics, request, response); |
1,626,454 | protected boolean beforeDelete() {<NEW_LINE>// Clean own index<NEW_LINE>MIndex.cleanUp(get_TrxName(), getAD_Client_ID(), <MASK><NEW_LINE>// Clean ElementIndex<NEW_LINE>MContainerElement[] theseElements = getAllElements();<NEW_LINE>if (theseElements != null) {<NEW_LINE>for (int i = 0; i < theseElements.length; i++) {<NE... | get_Table_ID(), get_ID()); |
445,803 | private static String detectDefaultWebBrowser() {<NEW_LINE>// XXX hotfix for #233047<NEW_LINE>// assert !EventQueue.isDispatchThread();<NEW_LINE>// #233145<NEW_LINE>if (!XDG_SETTINGS_AVAILABLE) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>OutputProcessorFactory outputProcessorFactory = new OutputProcessorFactory();<NEW_... | silentDescriptor, "Detecting default web browser").run(); |
824,276 | public static void main(String[] args) throws Exception {<NEW_LINE>TypeId<?> fibonacci = TypeId.get("Lcom/google/dexmaker/examples/Fibonacci;");<NEW_LINE>String fileName = "Fibonacci.generated";<NEW_LINE>DexMaker dexMaker = new DexMaker();<NEW_LINE>dexMaker.declare(fibonacci, fileName, Modifier.PUBLIC, TypeId.OBJECT);<... | code.loadConstant(constant2, 2); |
203,431 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>waitForFlush_result result = new waitForFlush_result();<NEW_LINE>if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)... | .clientImpl.thrift.ThriftSecurityException) e; |
466,524 | public static ListDepartmentsResponse unmarshall(ListDepartmentsResponse listDepartmentsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDepartmentsResponse.setRequestId(_ctx.stringValue("ListDepartmentsResponse.RequestId"));<NEW_LINE>listDepartmentsResponse.setCode(_ctx.stringValue("ListDepartmentsResponse.Code"));<... | ("ListDepartmentsResponse.Data.Items[" + i + "].Name")); |
150,463 | protected void configureGraphicalViewer() {<NEW_LINE>super.configureGraphicalViewer();<NEW_LINE>DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());<NEW_LINE>getDiagramGraphicalViewer().setContextMenu(provider);<NEW_LINE>getSite().registerContextMenu(Actio... | DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer()); |
427,088 | public ExponentialHistogramAccumulation diff(ExponentialHistogramAccumulation previousCumulative, ExponentialHistogramAccumulation currentCumulative) {<NEW_LINE>double sum = currentCumulative.getSum<MASK><NEW_LINE>long zeroCount = currentCumulative.getZeroCount() - previousCumulative.getZeroCount();<NEW_LINE>DoubleExpo... | () - previousCumulative.getSum(); |
379,201 | public BlockPositionIterator collidableBlocksIterator(BoundingBox box) {<NEW_LINE>Vector3d position = Vector3d.from(box.getMiddleX(), box.getMiddleY() - (box.getSizeY() / 2), box.getMiddleZ());<NEW_LINE>// Expand volume by 1 in each direction to include moving blocks<NEW_LINE>double pistonExpand = session.getPistonCach... | / 2) + COLLISION_TOLERANCE + pistonExpand); |
1,512,520 | public static void main(String[] args) throws Exception {<NEW_LINE>WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();<NEW_LINE>MainDocumentPart wordDocumentPart = wordMLPackage.getMainDocumentPart();<NEW_LINE>// Get vbaProject.bin, and attach it to wordDocumentPart<NEW_LINE>java.io.InputSt... | .parts.WordprocessingML.VbaProjectBinaryPart(); |
330,796 | public Change createChange(IProgressMonitor pm) throws CoreException {<NEW_LINE>final Map<String, String> arguments = new HashMap<>();<NEW_LINE>String project = null;<NEW_LINE>IJavaProject javaProject = fField.getJavaProject();<NEW_LINE>if (javaProject != null) {<NEW_LINE>project = javaProject.getElementName();<NEW_LIN... | .elementToHandle(project, fField)); |
1,791,686 | private Object executeScriptEngine(MHRConcept concept, MRule rule, String columnType) {<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>Object result = null;<NEW_LINE>try {<NEW_LINE>String text = "";<NEW_LINE>if (rule.getScript() != null) {<NEW_LINE>text = rule.getScript().trim().replaceAll("\\bget", "pr... | "result", defaultValue, ScriptContext.ENGINE_SCOPE); |
1,526,386 | public Response findPermissonsOn(@PathParam("dvo") String dvo) {<NEW_LINE>try {<NEW_LINE>DvObject dvObj = findDvo(dvo);<NEW_LINE>if (dvObj == null) {<NEW_LINE>return notFound("DvObject " + dvo + " not found");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>User aUser = findUserOrDie();<NEW_LINE>JsonObjectBuilder bld = Json.createO... | INTERNAL_SERVER_ERROR, e.getMessage()); |
1,183,514 | public RelWriter explainTermsForDisplay(RelWriter pw) {<NEW_LINE>pw.item(RelDrdsWriter.REL_NAME, explainNodeName());<NEW_LINE>if (isUpdate()) {<NEW_LINE>pw.item("TYPE", "UPDATE");<NEW_LINE>StringBuilder stringBuilder = new StringBuilder();<NEW_LINE>for (int i = 0; i < getUpdateColumnList().size(); i++) {<NEW_LINE>strin... | pw.item("TYPE", "DELETE"); |
411,729 | // Actions -- Menu selections<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>JMenuItem source = (JMenuItem<MASK><NEW_LINE>if (source.getText().equals(NbBundle.getMessage(QueryBuilder.class, "PARSE_QUERY"))) {<NEW_LINE>// NOI18N<NEW_LINE>String currentQuery = this.getText();<NEW_LINE>if ((currentQuery !=... | ) (e.getSource()); |
379,882 | public Set instantiate() throws IOException {<NEW_LINE>WebFragmentXmlWizardPanel1 panel = (WebFragmentXmlWizardPanel1) panels[0];<NEW_LINE>FileObject dir = panel.getSelectedLocation();<NEW_LINE>WebModule wm = panel.getWebModule();<NEW_LINE>// for Java Library projects, we suppose that the lastest JavaEE is used<NEW_LIN... | Level.INFO, "Creation of web-fragment.xml failed", ioe); |
182,128 | public void run(RegressionEnvironment env) {<NEW_LINE>if (TEST_MVEL) {<NEW_LINE>tryParseMVEL(env, "\n\t 10 \n\n\t\t", Integer.class, 10);<NEW_LINE>tryParseMVEL(env, "10", Integer.class, 10);<NEW_LINE>tryParseMVEL(env, "5*5", Integer.class, 25);<NEW_LINE>tryParseMVEL(env, "\"abc\"", String.class, "abc");<NEW_LINE>tr... | " \"abc\" ", Object.class, "abc"); |
1,582,282 | final GetTagsResult executeGetTags(GetTagsRequest getTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetTagsRequest> request = null;<NEW_LINE>Respo... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,554,452 | private I_EDI_Desadv retrieveOrCreateDesadv(@NonNull final I_C_Order order) {<NEW_LINE>I_EDI_Desadv desadv = desadvDAO.retrieveMatchingDesadvOrNull(order.getPOReference(), InterfaceWrapperHelper.getContextAware(order));<NEW_LINE>if (desadv == null) {<NEW_LINE>desadv = InterfaceWrapperHelper.newInstance(I_EDI_Desadv.cla... | , order.getC_BPartner_ID())); |
1,101,172 | public Request<ListIdentityProvidersRequest> marshall(ListIdentityProvidersRequest listIdentityProvidersRequest) {<NEW_LINE>if (listIdentityProvidersRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListIdentityProvidersRequest)");<NEW_LINE>}<NEW_LINE>Request<ListIdentityP... | t.getMessage(), t); |
1,105,038 | protected String generateTypeTable(InitializrMetadata metadata, String linkHeader, boolean addTags) {<NEW_LINE>String[][] typeTable = new String[metadata.getTypes().getContent().size() + 1][];<NEW_LINE>if (addTags) {<NEW_LINE>typeTable[0] = new String[] { linkHeader, "Description", "Tags" };<NEW_LINE>} else {<NEW_LINE>... | [typeTable[0].length]; |
1,460,688 | private static void raw(PoloniexMarketDataServiceRaw dataService) throws IOException {<NEW_LINE>System.out.println("------------RAW------------");<NEW_LINE>System.out.println(dataService.getPoloniexCurrencyInfo());<NEW_LINE>System.out.println(poloniex.getExchangeSymbols());<NEW_LINE>System.out.<MASK><NEW_LINE>System.ou... | println(dataService.getAllPoloniexTickers()); |
1,738,053 | public static GetTaobaoOrderResponse unmarshall(GetTaobaoOrderResponse getTaobaoOrderResponse, UnmarshallerContext context) {<NEW_LINE>getTaobaoOrderResponse.setRequestId(context.stringValue("GetTaobaoOrderResponse.RequestId"));<NEW_LINE>getTaobaoOrderResponse.setSuccess(context.booleanValue("GetTaobaoOrderResponse.Suc... | ("GetTaobaoOrderResponse.Orders[" + i + "].articleItemCode")); |
557,711 | public final MLDataSet external2Memory() {<NEW_LINE>this.status.report(0, 0, "Importing to memory");<NEW_LINE>if (this.result == null) {<NEW_LINE>this.result = new BasicMLDataSet();<NEW_LINE>}<NEW_LINE>final double[] input = new double[<MASK><NEW_LINE>final double[] ideal = new double[this.codec.getIdealSize()];<NEW_LI... | this.codec.getInputSize()]; |
1,351,847 | public static int mulAddTo(int[] x, int[] y, int[] zz) {<NEW_LINE>long y_0 = y[0] & M;<NEW_LINE>long y_1 = y[1] & M;<NEW_LINE>long y_2 = y[2] & M;<NEW_LINE>long <MASK><NEW_LINE>long zc = 0;<NEW_LINE>for (int i = 0; i < 4; ++i) {<NEW_LINE>long c = 0, x_i = x[i] & M;<NEW_LINE>c += x_i * y_0 + (zz[i + 0] & M);<NEW_LINE>zz... | y_3 = y[3] & M; |
433,886 | public void updateVolumeDiskChain(long volumeId, String path, String chainInfo, String updatedDataStoreUUID) {<NEW_LINE>VolumeVO vol = _volsDao.findById(volumeId);<NEW_LINE>boolean needUpdate = false;<NEW_LINE>// Volume path is not getting updated in the DB, need to find reason and fix the issue.<NEW_LINE>if (vol.getPa... | pool = _storagePoolDao.findByUuid(updatedDataStoreUUID); |
1,571,740 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>icon = new javax.swing.JLabel();<NEW_LINE>problemDescription = new javax.swing.JTextPane();<NEW_LINE>showDetails = new java... | new java.awt.GridBagConstraints(); |
783,849 | public static void main(String[] args) {<NEW_LINE>Exercise30_DynamicMedianFinding.DynamicMedianFindingHeap<Integer> dynamicMedianFindingHeap = new Exercise30_DynamicMedianFinding().new DynamicMedianFindingHeap<>();<NEW_LINE>dynamicMedianFindingHeap.insert(1);<NEW_LINE>dynamicMedianFindingHeap.insert(2);<NEW_LINE>dynami... | dynamicMedianFindingHeap.findTheMedian() + " Expected: 6"); |
619,854 | public int readRawVarInt32() throws IOException {<NEW_LINE>byte tmp = nioBuffer.get();<NEW_LINE>if (tmp >= 0) {<NEW_LINE>return tmp;<NEW_LINE>}<NEW_LINE>int result = tmp & 0x7f;<NEW_LINE>if ((tmp = nioBuffer.get()) >= 0) {<NEW_LINE>result |= tmp << 7;<NEW_LINE>} else {<NEW_LINE>result |= (tmp & 0x7f) << 7;<NEW_LINE>if ... | nioBuffer.get()) << 28; |
467,535 | public static HashMap<String, Object> convertV2TIMConversationResultToMap(V2TIMConversationResult info) {<NEW_LINE>HashMap<String, Object> rinfo = new HashMap<String, Object>();<NEW_LINE>rinfo.put("nextSeq", String.valueOf(info.getNextSeq()));<NEW_LINE>rinfo.put("isFinished", info.isFinished());<NEW_LINE>List<V2TIMConv... | = new LinkedList<Object>(); |
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.getArn(), ARN_BINDING); |
268,708 | private static void configure(FleetControllerOptions options, FleetcontrollerConfig config) {<NEW_LINE>options.clusterName = config.cluster_name();<NEW_LINE>options.fleetControllerIndex = config.index();<NEW_LINE>options.fleetControllerCount = config.fleet_controller_count();<NEW_LINE>options.zooKeeperSessionTimeout = ... | .enableTwoPhaseClusterStateActivation = config.enable_two_phase_cluster_state_transitions(); |
585,639 | public void run() {<NEW_LINE>String appType = _analyticJob.getAppType().getName();<NEW_LINE>String analysisName = String.format("%s %s", appType, _analyticJob.getAppId());<NEW_LINE>long analysisStartTimeMillis = System.currentTimeMillis();<NEW_LINE>logger.info(String.format("Analyzing %s", analysisName));<NEW_LINE>long... | finishTimeInfo, appType, applicableFinishTime, jobFinishTime); |
1,846,821 | void diffProperties(final StructrTypeDefinition other) throws FrameworkException {<NEW_LINE>final Map<String, StructrPropertyDefinition> databaseProperties = getMappedProperties();<NEW_LINE>final Map<String, StructrPropertyDefinition> structrProperties = other.getMappedProperties();<NEW_LINE>final Set<String> propertie... | removeAll(databaseProperties.keySet()); |
537,463 | protected double[] estimateBandwidths(final double alpha, final int p, DataSet data, final List<Vec> centroids, final List<Double> centroidDistCache, final DistanceMetric dm, ExecutorService threadpool) {<NEW_LINE>final double[] bandwidths = new double[centroids.size()];<NEW_LINE>final CountDownLatch latch = new CountD... | closestDistances) stats.add(dist); |
1,401,381 | private String invokeService(String action, String stage, String file, String payload) {<NEW_LINE>s_logger.debug("Invoking rolling maintenance service for stage: " + stage + " and file " + file + " with action: " + action);<NEW_LINE>final OutputInterpreter.AllLinesParser parser = new OutputInterpreter.AllLinesParser();... | = new Script("/bin/systemctl", s_logger); |
1,243,946 | static void overrideBlackList(List<String> originList, String overrideStr) {<NEW_LINE>List<String> adds <MASK><NEW_LINE>String[] overrideItems = StringUtils.splitWithCommaOrSemicolon(overrideStr);<NEW_LINE>for (String overrideItem : overrideItems) {<NEW_LINE>if (StringUtils.isNotBlank(overrideItem)) {<NEW_LINE>if (over... | = new LinkedList<String>(); |
1,456,683 | private void sendContinuedSystemInfoData(final String id) {<NEW_LINE>try {<NEW_LINE>final URL url = new URL("https://sysinfo.structr.com/structr/rest/SystemInfoDataUpdate");<NEW_LINE>final Map<String, Object> data = new LinkedHashMap<>();<NEW_LINE>final URLConnection con = url.openConnection();<NEW_LINE>final HttpURLCo... | .getInstance().getDatabaseService(); |
1,592,774 | protected Control createDialogArea(Composite parent) {<NEW_LINE>Composite area = (Composite) super.createDialogArea(parent);<NEW_LINE>Composite container = createComposite(area, new GridLayout(1, false));<NEW_LINE>container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));<NEW_LINE>SearchBox search = new Sea... | .setContentProvider(new PackageContentProvider()); |
980,465 | protected void createFieldEditors() {<NEW_LINE>if (Platform.getOS().equals(Platform.OS_MACOSX)) {<NEW_LINE>addField(new BooleanFieldEditor(ITLA2TeXPreferenceConstants.HAVE_OS_OPEN_PDF, "Have your OS open PDFs", getFieldEditorParent()));<NEW_LINE>} else {<NEW_LINE>addField(new BooleanFieldEditor(ITLA2TeXPreferenceConsta... | , "&Specify dot command", getFieldEditorParent())); |
915,891 | public void deleteIdentifier(DvObject dvObject) throws Exception {<NEW_LINE>String handle = getDvObjectHandle(dvObject);<NEW_LINE>String authHandle = getAuthenticationHandle(dvObject);<NEW_LINE>String adminCredFile = System.getProperty("dataverse.handlenet.admcredfile");<NEW_LINE>int handlenetIndex = System.getProperty... | privkey = readPrivKey(key, adminCredFile); |
1,639,355 | public static List<Resource> findResourcesByExtension(File workingDir, String extension, List<String> paths) {<NEW_LINE>List<Resource> results = new ArrayList();<NEW_LINE>List<File> fileRoots = new ArrayList();<NEW_LINE>List<String> pathRoots = new ArrayList();<NEW_LINE>for (String path : paths) {<NEW_LINE>if (path.end... | get(uri).toFile(); |
1,272,207 | public Description matchMethod(MethodTree methodTree, VisitorState state) {<NEW_LINE>MethodSymbol methodSymbol = ASTHelpers.getSymbol(methodTree);<NEW_LINE>boolean isVarargs = methodSymbol.isVarArgs();<NEW_LINE>Set<MethodSymbol> superMethods = ASTHelpers.findSuperMethods(<MASK><NEW_LINE>// If there are no super methods... | methodSymbol, state.getTypes()); |
1,434,342 | public synchronized boolean register(ResolvedDependency dependencyToResolve) {<NEW_LINE>SameResolvedDependencyInAllVersions allVersions = getAllVersions(dependencyToResolve.getName());<NEW_LINE>if (allVersions.noValidVersionExists()) {<NEW_LINE>LOGGER.debug("{} doesn't exit in registry, add it.", dependencyToResolve);<... | ResolvedDependencyWithReferenceCount head = allVersions.headOfValidVersions(); |
1,838,092 | public boolean transform() {<NEW_LINE>System.out.println("[Stringer] [StringEncryptionTransformer] Starting");<NEW_LINE>int concat = concatStrings();<NEW_LINE>if (concat > 0)<NEW_LINE>System.out.<MASK><NEW_LINE>int count = count();<NEW_LINE>System.out.println("[Stringer] [StringEncryptionTransformer] Found " + count + ... | println("[Stringer] [StringEncryptionTransformer] Concatted " + concat + " strings"); |
491,220 | final GetReplicationConfigurationResult executeGetReplicationConfiguration(GetReplicationConfigurationRequest getReplicationConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getReplicationConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | invoke(request, responseHandler, executionContext); |
802,853 | public static BlockEncodingBuffer createBlockEncodingBuffers(DecodedBlockNode decodedBlockNode, ArrayAllocator bufferAllocator, boolean isNested) {<NEW_LINE>requireNonNull(decodedBlockNode, "decodedBlockNode is null");<NEW_LINE>requireNonNull(bufferAllocator, "bufferAllocator is null");<NEW_LINE>// decodedBlock could b... | ArrayBlockEncodingBuffer(decodedBlockNode, bufferAllocator, isNested); |
1,714,558 | public Map<String, Object> queryTopNLongestRunningProcessInstance(User loginUser, long projectCode, int size, String startTime, String endTime) {<NEW_LINE>Project <MASK><NEW_LINE>// check user access for project<NEW_LINE>Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode);<N... | project = projectMapper.queryByCode(projectCode); |
1,430,556 | public boolean next() {<NEW_LINE>if (lastParsedPos == tail) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (mapIter != null) {<NEW_LINE>if (mapIter.hasNext()) {<NEW_LINE>Map.Entry<String, Any> entry = mapIter.next();<NEW_LINE>key = entry.getKey();<NEW_LINE>value = entry.getValue();<NEW_LINE>return true;<NEW_LINE>} els... | JsonIterator iter = JsonIteratorPool.borrowJsonIterator(); |
1,048,962 | private void renameOldMasterPropsinZK(ServerContext context) {<NEW_LINE>// Rename all of the properties only set in ZooKeeper that start with "master." to rename and<NEW_LINE>// store them starting with "manager." instead.<NEW_LINE>var zooConfiguration = new ZooConfiguration(context, context.getZooCache(), new Configur... | throw new RuntimeException("Unable to upgrade system properties", e); |
1,416,044 | public void applicationMetaDataCreated(MetaDataEvent<ApplicationMetaData> event) throws MetaDataException {<NEW_LINE>String appName = event.getMetaData().getJ2EEName().getApplication();<NEW_LINE>try {<NEW_LINE>Collection<SecurityRole> securityRoles = event.getContainer().adapt(<MASK><NEW_LINE>if (!establishInitialTable... | SecurityRoles.class).getSecurityRoles(); |
1,409,872 | public void onCurrentFirmwareResultUpdate(LwM2mClient client, Long code) {<NEW_LINE>log.debug("[{}] Current fw result: {}", client.getEndpoint(), code);<NEW_LINE>LwM2MClientFwOtaInfo fwInfo = getOrInitFwInfo(client);<NEW_LINE>FirmwareUpdateResult result = FirmwareUpdateResult.fromUpdateResultFwByCode(code.intValue());<... | fwInfo.getRetryAttempts() + 1); |
194,466 | public void initAccessibility() {<NEW_LINE>this.getAccessibleContext().setAccessibleDescription(Util<MASK><NEW_LINE>nameField.getAccessibleContext().setAccessibleDescription(Util.THIS.getString("ACSD_nameField2"));<NEW_LINE>typeCombo.getAccessibleContext().setAccessibleDescription(Util.THIS.getString("ACSD_typeCombo"))... | .THIS.getString("ACSD_TreeEntityDeclCustomizer")); |
620,255 | public static ListMomentsResponse unmarshall(ListMomentsResponse listMomentsResponse, UnmarshallerContext context) {<NEW_LINE>listMomentsResponse.setRequestId(context.stringValue("ListMomentsResponse.RequestId"));<NEW_LINE>listMomentsResponse.setCode(context.stringValue("ListMomentsResponse.Code"));<NEW_LINE>listMoment... | (context.stringValue("ListMomentsResponse.Message")); |
1,101,223 | public void saveActionClass(final WorkflowActionClass actionClass) throws DotDataException, AlreadyExistException {<NEW_LINE>boolean isNew = true;<NEW_LINE>if (UtilMethods.isSet(actionClass.getId())) {<NEW_LINE>try {<NEW_LINE>final WorkflowActionClass test = this.findActionClass(actionClass.getId());<NEW_LINE>if (test ... | findAction(actionClass.getActionId()); |
610,122 | private List<com.intellij.formatting.Block> buildCallChildChildren(@NotNull ASTNode child, @NotNull IElementType childElementType, @Nullable Wrap callWrap, @Nullable Alignment callAlignment) {<NEW_LINE>List<com.intellij.formatting.Block> blockList = new ArrayList<>();<NEW_LINE>if (childElementType == ACCESS_EXPRESSION)... | .addAll(buildOperatorRuleChildren(child)); |
1,073,019 | public void showPreviewForKey(Keyboard.Key key, CharSequence label, Point previewPosition) {<NEW_LINE>mPreviewIcon.setVisibility(View.GONE);<NEW_LINE>mPreviewText.setVisibility(View.VISIBLE);<NEW_LINE>mPreviewIcon.setImageDrawable(null);<NEW_LINE>mPreviewText.setTextColor(mPreviewPopupTheme.getPreviewKeyTextColor());<N... | , View.MeasureSpec.UNSPECIFIED)); |
308,512 | private boolean isLoadAboveBalanceLowerLimitAfterChange(Load load, Broker broker, ChangeType changeType) {<NEW_LINE>double utilizationDelta = load == null ? 0 : load.expectedUtilizationFor(resource());<NEW_LINE>double brokerBalanceLowerLimit = broker.capacityFor(resource()) * _balanceLowerThreshold;<NEW_LINE>double bro... | ).expectedUtilizationFor(resource()); |
328,377 | public void visitField(FieldNode node) {<NEW_LINE>// Do not write fields back which are manually added due to optimization<NEW_LINE>if (!node.getName().startsWith("$")) {<NEW_LINE>visitAnnotations(node);<NEW_LINE>preVisitStatement(node);<NEW_LINE>// properties are stored twice in ClassNode, visitOnlyOnce<NEW_LINE>// vi... | printType(node.getOriginType()); |
175,758 | protected INDArray createWeightMatrix(NeuralNetConfiguration conf, INDArray weightView, boolean initializeParams) {<NEW_LINE>org.deeplearning4j.nn.conf.layers.Deconvolution2D layerConf = (org.deeplearning4j.nn.conf.layers.Deconvolution2D) conf.getLayer();<NEW_LINE>if (initializeParams) {<NEW_LINE>int[] kernel = layerCo... | 0], kernel[1] }; |
1,021,532 | private FullTextQuery createQuery(boolean forCount) {<NEW_LINE>QueryMetadata metadata = queryMixin.getMetadata();<NEW_LINE>org.<MASK><NEW_LINE>if (metadata.getWhere() != null) {<NEW_LINE>query = serializer.toQuery(metadata.getWhere(), metadata);<NEW_LINE>} else {<NEW_LINE>query = new MatchAllDocsQuery();<NEW_LINE>}<NEW... | apache.lucene.search.Query query; |
249,053 | private WorkflowTrace createHandshakeWorkflow(AliasedConnection connection) {<NEW_LINE>WorkflowTrace workflowTrace = this.createHelloWorkflow(connection);<NEW_LINE>List<ProtocolMessage> messages = new LinkedList<>();<NEW_LINE>if (config.getHighestProtocolVersion().isTLS13()) {<NEW_LINE>if (Objects.equals(config.getTls1... | add(new CertificateVerifyMessage(config)); |
1,154,416 | public AsyncFuture<DeleteSeries> deleteSeries(final DeleteSeries.Request request) {<NEW_LINE>final DateRange range = request.getRange();<NEW_LINE>final FindSeries.Request findIds = new FindSeries.Request(request.getFilter(), range, request.getLimit(), Features.DEFAULT);<NEW_LINE>return doto(c -> findSeriesIds(findIds).... | (Collectors.toList())); |
61,161 | public ListenableFuture<?> execute(RenameTable statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters, WarningCollector warningCollector) {<NEW_LINE>QualifiedObjectName tableName = createQualifiedObjectName(session, statement, state... | "Target catalog '%s' does not exist", target.getCatalogName()); |
1,529,605 | public static GetServiceListResponse unmarshall(GetServiceListResponse getServiceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getServiceListResponse.setRequestId(_ctx.stringValue("GetServiceListResponse.RequestId"));<NEW_LINE>getServiceListResponse.setHttpStatusCode(_ctx.integerValue("GetServiceListResponse.HttpS... | + "].Methods[" + j + "].Name")); |
998,872 | public StartSigningJobParameter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>StartSigningJobParameter startSigningJobParameter = new StartSi... | ().unmarshall(context)); |
1,578,952 | final GetRoomResult executeGetRoom(GetRoomRequest getRoomRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRoomRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Reques... | invoke(request, responseHandler, executionContext); |
1,032,621 | // Notifications<NEW_LINE>void updateNotification() {<NEW_LINE>final int notifyMode;<NEW_LINE>if (isPlaying()) {<NEW_LINE>notifyMode = NotifyMode.FOREGROUND;<NEW_LINE>} else if (recentlyPlayed()) {<NEW_LINE>notifyMode = NotifyMode.BACKGROUND;<NEW_LINE>} else {<NEW_LINE>notifyMode = NotifyMode.NONE;<NEW_LINE>}<NEW_LINE>... | logException(TAG, "Exception while attempting to show notification", e); |
1,415,984 | private static <T> UnmodifiableIterator<List<T>> partitionImpl(final Iterator<T> iterator, final int size, final boolean pad) {<NEW_LINE>checkNotNull(iterator);<NEW_LINE>checkArgument(size > 0);<NEW_LINE>return new UnmodifiableIterator<List<T>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LI... | list.subList(0, count); |
1,759,592 | public static boolean performPatch(File patch, File file) throws MissingResourceException {<NEW_LINE>List<ContextualPatch.PatchReport> report = null;<NEW_LINE>try (ProgressHandle ph = ProgressHandle.createHandle(NbBundle.getMessage(PatchAction.class, "MSG_AplyingPatch", new Object[] { patch.getName() }))) {<NEW_LINE>ph... | notify(ErrorManager.USER, ioex); |
351,213 | final DescribePrefixListsResult executeDescribePrefixLists(DescribePrefixListsRequest describePrefixListsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePrefixListsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | endClientExecution(awsRequestMetrics, request, response); |
1,808,319 | public static MAssetAddition createAsset(MProject project, MProduct product) {<NEW_LINE>MAssetAddition assetAddition = new MAssetAddition(project);<NEW_LINE>assetAddition.dump();<NEW_LINE><MASK><NEW_LINE>if (product != null) {<NEW_LINE>asset.setM_Product_ID(product.getM_Product_ID());<NEW_LINE>asset.setA_Asset_Group_ID... | MAsset asset = assetAddition.createAsset(); |
132,155 | protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {<NEW_LINE>requestStateUpdate();<NEW_LINE>GlStateManager.color(1, 1, 1);<NEW_LINE>bindGuiTexture();<NEW_LINE>int sx = (width - xSize) / 2;<NEW_LINE>int sy = (height - ySize) / 2;<NEW_LINE>drawTexturedModalRect(sx, sy, 0, 0, xSize, ySize);<NE... | = guiLeft + outputX - swid - 26; |
901,153 | private final void sumValues(List<MatchingDocs> matchingDocs) throws IOException {<NEW_LINE>// System.out.println("count matchingDocs=" + matchingDocs + " facetsField=" + facetsFieldName);<NEW_LINE>for (MatchingDocs hits : matchingDocs) {<NEW_LINE>BinaryDocValues dv = hits.context.reader().getBinaryDocValues(indexField... | = bytesRef.offset + bytesRef.length; |
267,817 | public Result editYb(UUID customerUUID, UUID configUUID) {<NEW_LINE>CustomerConfig existingConfig = customerConfigService.getOrBadRequest(customerUUID, configUUID);<NEW_LINE>if (existingConfig.getState().equals(ConfigState.QueuedForDeletion)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>CustomerConfig customerConfig = parseJs... | throw new PlatformServiceException(BAD_REQUEST, "Cannot edit config as it is queued for deletion."); |
79,786 | private void init() {<NEW_LINE>// WARNING: called from ctor so must not be overridden (i.e. must be private or final)<NEW_LINE>setLayout(new BorderLayout());<NEW_LINE>setBorder(makeBorder());<NEW_LINE>add(makeTitlePanel(), BorderLayout.NORTH);<NEW_LINE>JPanel mainPanel = new JPanel(new MigLayout("fillx, wrap 3, insets ... | .labelFor(jndiICF, "jms_initial_context_factory")); |
397,186 | final SendProjectSessionActionResult executeSendProjectSessionAction(SendProjectSessionActionRequest sendProjectSessionActionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(sendProjectSessionActionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendProjectSessionAction"); |
1,791,344 | protected void initHistoryJobHandlers() {<NEW_LINE>if (isAsyncHistoryEnabled) {<NEW_LINE>historyJobHandlers = new HashMap<>();<NEW_LINE>List<HistoryJsonTransformer> allHistoryJsonTransformers = new ArrayList<>(initDefaultHistoryJsonTransformers());<NEW_LINE>if (customHistoryJsonTransformers != null) {<NEW_LINE>allHisto... | customJobHandler.getType(), customJobHandler); |
1,120,244 | public AddressSet flowConstants(final Program program, Address flowStart, AddressSetView flowSet, final SymbolicPropogator symEval, final TaskMonitor monitor) throws CancelledException {<NEW_LINE>// follow all flows building up context<NEW_LINE>// use context to fill out addresses on certain instructions<NEW_LINE>Conte... | getName().equals(CODE_SPACE_NAME); |
1,730,724 | private ILogicExpression evaluatePartial(final ExpressionEvaluationContext ctx, final ILogicExpression expr) {<NEW_LINE>logger.trace("Partial evaluating {}", expr);<NEW_LINE>if (expr == null) {<NEW_LINE>throw new ExpressionEvaluationException("Cannot evaluate null expression");<NEW_LINE>} else if (expr.isConstant()) {<... | newRightExpression = evaluatePartial(ctx, rightExpression); |
476,289 | public CompletableFuture<@Nullable Void> apply(String[] childIDs, final Function<TYPE, CompletableFuture<Void>> addedAction, final Function<String, TYPE> supplyNewChild, final Consumer<TYPE> removedCallback) {<NEW_LINE>Set<String> arrayValues = Stream.of(childIDs).collect(Collectors.toSet());<NEW_LINE>// Add all entrie... | supplyNewChild.apply(k))); |
547,208 | public ResultSet executeQuery() throws SQLException {<NEW_LINE>ResultSet result;<NEW_LINE>try {<NEW_LINE>if (statementsCacheable && !statements.isEmpty()) {<NEW_LINE>resetParameters();<NEW_LINE>return statements.iterator().next().executeQuery();<NEW_LINE>}<NEW_LINE>clearPrevious();<NEW_LINE>LogicSQL logicSQL = createLo... | ), mergedResult, this, executionContext); |
1,627,911 | private void writeInputSummary(StringEscapeUtils.Builder builder) throws IOException {<NEW_LINE>builder.append("<h2>Input</h2>");<NEW_LINE>JadxDecompiler jadx = mainWindow.getWrapper().getDecompiler();<NEW_LINE>builder.append("<h3>Files</h3>");<NEW_LINE>builder.append("<ul>");<NEW_LINE>for (File inputFile : jadx.getArg... | getCanonicalFile().getAbsolutePath()); |
378,043 | final ListStreamsResult executeListStreams(ListStreamsRequest listStreamsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listStreamsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListStreams"); |
895,203 | private static String cacheFromJava(String javaCipherSuite, boolean boringSSL) {<NEW_LINE>String converted = j2oTls13.get(javaCipherSuite);<NEW_LINE>if (converted != null) {<NEW_LINE>return boringSSL ? converted : javaCipherSuite;<NEW_LINE>}<NEW_LINE>String openSslCipherSuite = toOpenSslUncached(javaCipherSuite, boring... | <String, String>(4); |
1,809,269 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
389,305 | private Object convertValueIfNeeded(Object value) {<NEW_LINE>if (value instanceof CompositeData) {<NEW_LINE>final CompositeData data = (CompositeData) value;<NEW_LINE>final Map<String, Object> values = new TreeMap<>();<NEW_LINE>for (final String key : data.getCompositeType().keySet()) {<NEW_LINE>values.put(key, convert... | list = new ArrayList<>(); |
1,537,093 | private void export() {<NEW_LINE>if (out.getFluidAmount() <= 0)<NEW_LINE>return;<NEW_LINE>IBlockState state = <MASK><NEW_LINE>if (state == null || state.getBlock() != BuildCraftFactory.energyHeaterBlock)<NEW_LINE>return;<NEW_LINE>EnumFacing curFace = state.getValue(BlockBuildCraftBase.FACING_PROP);<NEW_LINE>EnumFacing ... | worldObj.getBlockState(getPos()); |
1,651,332 | public void initLayer(@NonNull final OsmandMapTileView view) {<NEW_LINE>this.view = view;<NEW_LINE>app = view.getApplication();<NEW_LINE>rm = app.getResourceManager();<NEW_LINE>osmandRegions = rm.getOsmandRegions();<NEW_LINE>helper = new LocalIndexHelper(app);<NEW_LINE>paintDownloaded = getPaint(view.getResources().get... | setTextAlign(Paint.Align.CENTER); |
863,146 | public void readFromNBT(NBTTagCompound nbttagcompound) {<NEW_LINE>super.readFromNBT(nbttagcompound);<NEW_LINE>if (nbttagcompound.hasKey("box")) {<NEW_LINE>box.initialize(nbttagcompound.getCompoundTag("box"));<NEW_LINE>loadDefaultBoundaries = false;<NEW_LINE>} else if (nbttagcompound.hasKey("xSize")) {<NEW_LINE>// This ... | ySize = nbttagcompound.getInteger("ySize"); |
166,189 | protected CompletableFuture<Void> loadAsynchronously(String streamSegmentName) {<NEW_LINE>if (store == null) {<NEW_LINE>return CompletableFuture.completedFuture(null);<NEW_LINE>}<NEW_LINE>if (pendingCacheLoads.add(streamSegmentName)) {<NEW_LINE>return store.getStreamSegmentInfo(streamSegmentName, TIMEOUT).thenAcceptAsy... | policyType), (int) policyRate); |
491,151 | private void loadScript(final String hru, final int loadType) {<NEW_LINE>if (!isValid() || hasState(STATE_SCRIPT_LOADING) || isDestroy())<NEW_LINE>return;<NEW_LINE>addState(STATE_SCRIPT_LOADING);<NEW_LINE>if (hasState(STATE_HOT_RELOADING)) {<NEW_LINE>if (hotReloadGlobals == null) {<NEW_LINE>hotReloadGlobals = initGloba... | GlobalStateUtils.onGlobalPrepared(initData.url); |
1,624,350 | public static GrayU8 dilate8(GrayU8 input, int numTimes, @Nullable GrayU8 output) {<NEW_LINE>output = InputSanityCheck.declareOrReshape(input, output);<NEW_LINE>if (BoofConcurrency.USE_CONCURRENT) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>ImplBinaryInnerOps.dilate8(input, output);<NEW_LINE>}<NEW_LINE>ImplBinaryBorde... | ImplBinaryInnerOps_MT.dilate8(input, output); |
457,991 | private void fixSyncForDifferingDataTypes() {<NEW_LINE>boolean fixedSync = false;<NEW_LINE>List<DataType> dataTypes = dataTypeManager.getDataTypes(sourceArchive);<NEW_LINE>for (DataType dataType : dataTypes) {<NEW_LINE>DataTypeSyncInfo dataTypeSyncInfo = new DataTypeSyncInfo(dataType, sourceDTM);<NEW_LINE><MASK><NEW_LI... | DataType sourceDataType = dataTypeSyncInfo.getSourceDataType(); |
21,158 | protected void computeEnvironmentData(Object[][] environmentData) {<NEW_LINE>super.computeEnvironmentData(environmentData);<NEW_LINE>environmentData[1][0] = Bundle.RubyViews_Platform();<NEW_LINE>RubyHeapFragment fragment = (RubyHeapFragment) getContext().getFragment();<NEW_LINE>// NOI18N<NEW_LINE>RubyType gemPlatform =... | Heap heap = fragment.getHeap(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.