content stringlengths 40 137k |
|---|
"public E alterAndGet(IFunction<E, E> function) {\n isNotNull(function, \"String_Node_Str\");\n ClientMessage request = AtomicReferenceAlterAndGetCodec.encodeRequest(name, toData(function));\n ClientMessage response = invoke(request);\n return toObject(AtomicReferenceAlterAndGetCodec.decodeResponse(response... |
"private void unbindServices(boolean doServiceStop) {\n Context applicationContext = getActivity();\n if (mIBusBound) {\n try {\n Log.d(TAG, \"String_Node_Str\");\n mIBusService.disable();\n applicationContext.unbindService(mIBusConnection);\n applicationContext.... |
"public IProcess debugApp(String workDir, EPlatformType platformType, ILaunch launch, boolean onDevice) throws Exception {\n String platformName = convertDescFromPlatform(platformType);\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\");\n sb.append(platformName);\n if (onDevice) ... |
"public void openTrace() throws JniException {\n if (tracepath == \"String_Node_Str\") {\n throw new JniTraceException(\"String_Node_Str\");\n }\n if (thisTracePtr.getPointer() != NULL) {\n closeTrace();\n }\n int newLibraryId = initializeLibrary();\n if (newLibraryId != -1) {\n l... |
"public void execute(final Writer writer, final DevelopmentComponent component) throws ParseErrorException, MethodInvocationException, ResourceNotFoundException, IOException {\n final Context context = new VelocityContext();\n context.put(\"String_Node_Str\", component);\n context.put(\"String_Node_Str\", bund... |
"private void _saveMenuActionPerformed(ActionEvent e) {\n URL layoutURL = _mainFrame.getLayoutURL();\n if (layoutURL != null) {\n _mainFrame.saveLayoutAs(new File(layoutURL.getPath()));\n } else {\n _saveAsMenuActionPerformed(e);\n }\n}\n"
|
"protected void createPages() {\n super.createPages();\n XSDEditorInput2 editorInput = (XSDEditorInput2) getEditorInput();\n TreeObject treeObject = editorInput.getTreeObject();\n xobjectEditorinput = new XObjectEditorInput2(editorInput.getViewObject(), treeObject, treeObject.getDisplayName());\n IFile x... |
"public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean debug) {\n LoreKey key = ItemLorePage.getLore(stack);\n if (key != null) {\n Lore data = LoreLoader.INSTANCE.getLore(key);\n if (data == null) {\n LoreExpansion.logger.warn(\"String_Node_Str\");\n ... |
"public void drawForegroundLayer(int var2, int var3, float var1) {\n this.tFX.drawTextBox();\n this.tFZ.drawTextBox();\n if (tileEntity.getTier() >= 1) {\n this.tFY.drawTextBox();\n this.fontRenderer.drawString(\"String_Node_Str\", 12, 68, 4210752);\n this.tFGaoDu.drawTextBox();\n t... |
"protected void win(Player winner) {\n if (myListener != null) {\n myListener.on_win(this, winner);\n }\n}\n"
|
"protected Element invokeInternal(Element requestElement, Document document) throws Exception {\n System.out.println(\"String_Node_Str\");\n StudyBean studyBean = new StudyBean();\n studyBean.setIdentifier(\"String_Node_Str\");\n try {\n NodeList nlist = requestElement.getElementsByTagNameNS(CONNECTO... |
"public static String formatFiatWithUnit(CurrencyValue fiat) {\n try {\n return FIAT_FORMAT.format(fiat.getValue()) + \"String_Node_Str\" + fiat.getCurrency();\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n return \"String_Node_Str\";\n }\n}\n"
|
"private static void clearTestMethodArguments(ITestResult testResult) {\n Method method = testResult.getMethod().getConstructorOrMethod().getMethod();\n if (!isMethodWithParametersProvidedByTestNG(method)) {\n testResult.setParameters(NO_ARGS);\n }\n}\n"
|
"private JsonNode exampleNode(JsonType jsonType, String specifiedExample, String specifiedExample2, Context context) {\n if (jsonType instanceof JsonClassType) {\n TypeDefinition typeDefinition = ((JsonClassType) jsonType).getTypeDefinition();\n if (typeDefinition instanceof ObjectTypeDefinition) {\n ... |
"private static Realm createAndValidate(String absolutePath, byte[] key, boolean validateSchema, boolean autoRefresh) {\n Map<Integer, Realm> realms = realmsCache.get();\n Realm realm = realms.get(absolutePath);\n if (realm != null) {\n return realm;\n }\n realm = new Realm(absolutePath, key, auto... |
"public static void launchWeka() {\n IJ.log(\"String_Node_Str\" + ClassLoader.getSystemClassLoader());\n weka.gui.GUIChooser chooser = new weka.gui.GUIChooser();\n for (WindowListener wl : chooser.getWindowListeners()) {\n chooser.removeWindowListener(wl);\n }\n chooser.setVisible(true);\n}\n"
|
"public BingRule fulfilledBingRule(Event event) {\n if (null == event) {\n Log.e(LOG_TAG, \"String_Node_Str\");\n return null;\n }\n if (!mIsInitialized) {\n Log.e(LOG_TAG, \"String_Node_Str\");\n return null;\n }\n if (0 == mRules.size()) {\n Log.e(LOG_TAG, \"String_No... |
"protected void createAnimators(ViewGroup sceneRoot, TransitionValuesMaps startValues, TransitionValuesMaps endValues, ArrayList<TransitionValues> startValuesList, ArrayList<TransitionValues> endValuesList) {\n if (DBG) {\n Log.d(LOG_TAG, \"String_Node_Str\" + this);\n }\n ArrayMap<Animator, AnimationIn... |
"public Builder config(final String subnet, final String ipRange, final String gateway) {\n final IpamConfig config = new IpamConfig();\n config.subnet(subnet);\n config.ipRange(ipRange);\n config.gateway(gateway);\n configs.add(config);\n return this;\n}\n"
|
"public T mapRow(ResultSet rs, int rowNum) throws SQLException {\n return (T) OrmUtil.convertRow2Bean(rs, bean.getClass());\n}\n"
|
"protected String makeIdentifierBasedOnHistory(Context context, DSpaceObject dso, VersionHistory history) throws AuthorizeException, SQLException, DOIIdentifierException {\n if (!(dso instanceof Item)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n Item item = (Item) dso;\n Versio... |
"protected void setupAnimator() {\n mHeaderAnimator.setupAnimator(mHeader, mMinHeightHeader);\n}\n"
|
"public org.hl7.fhir.dstu2.model.Communication convertCommunication(org.hl7.fhir.dstu3.model.Communication src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Communication tgt = new org.hl7.fhir.dstu2.model.Communication();\n copyDomainResource(src,... |
"public List<QuantityManager> getQuantityManagers() throws IllegalActionException {\n _qmList = new ArrayList<QuantityManager>();\n List<ResourceAttributes> list = this.attributeList(ResourceAttributes.class);\n for (ResourceAttributes attribute : list) {\n if (attribute.enabled()) {\n if ((Q... |
"public void updateHeader(String newWeekHeader) {\n if (!newWeekHeader.equals(mHeader)) {\n mHeader = newWeekHeader;\n onRefreshStart();\n }\n}\n"
|
"public void append0() {\n int blockIndex = size / BITS_IN_BLOCK;\n int indexInBlock = size % BITS_IN_BLOCK;\n int cacheBlockIndex = size / BITS_IN_COUNTCACHE0;\n int indexInCacheBlock = size % BITS_IN_COUNTCACHE0;\n if (blockIndex >= longs.length) {\n extendLongsAndCountCache0();\n }\n if (... |
"public org.hl7.fhir.dstu2.model.ValueSet.ValueSetCodeSystemComponent convertCodeSystem(org.hl7.fhir.dstu3.model.CodeSystem src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.ValueSet.ValueSetCodeSystemComponent tgt = new org.hl7.fhir.dstu2.model.Value... |
"public void start() throws ServiceRegistrationException {\n Clusters.getInstance().registerDisabled(this);\n try {\n ListenerRegistry.getInstance().register(ClockTick.class, Cluster.this);\n ListenerRegistry.getInstance().register(Hertz.class, Cluster.this);\n } catch (Exception ex1) {\n ... |
"public boolean execute(CommandSender sender, String identifier, String[] args) {\n if (args != null) {\n try {\n plugin.loadConfig(args[0]);\n } catch (Exception e) {\n sender.sendMessage(\"String_Node_Str\");\n }\n }\n return true;\n}\n"
|
"private void resizeTo(long newCapacity) {\n final long oldCapacity = capacity();\n final long oldAllocatedSize = HEADER_SIZE + oldCapacity * slotLength;\n final MemoryAllocator oldMalloc;\n final long oldAddress;\n if (auxMalloc != null) {\n oldAddress = move(baseAddress, oldCapacity, malloc, aux... |
"public void onCollectionUpdate(final Object collection, final Serializable key) throws CallbackException {\n try {\n Iterable<Object> iter = (collection instanceof Iterable ? (Iterable) collection : Lists.newArrayList(collection));\n String summary = Iterables.toString(Iterables.transform(iter, Classe... |
"private void startCameraPreview() {\n if (mCameraDevice == null) {\n return;\n }\n if (mUI.getSurfaceTexture() == null) {\n return;\n }\n synchronized (mRendererLock) {\n if (mCameraTexture == null)\n return;\n if (mCameraState != PREVIEW_STOPPED)\n stop... |
"public void setup() throws Exception {\n workFolder = FileUtils.createTmpFolder(\"String_Node_Str\", \"String_Node_Str\");\n CodeGeneratorActivator.getDefault().getPreferenceStore().setValue(IComponentPreferenceConstant.INSTALLED_USER_COMPONENTS, new JSONArray().toString());\n final Project currentProject = P... |
"protected String[][] walkTokens() throws IOException {\n List<String> wordList = new ArrayList<>();\n List<String> posList = new ArrayList<>();\n while (input.incrementToken()) {\n CharTermAttribute textAtt = input.getAttribute(CharTermAttribute.class);\n OffsetAttribute offsetAtt = input.getAtt... |
"public HashCollection<String, String> getBranchViewFeatureValues(BranchId branch) {\n HashCollection<String, String> toReturn = new HashCollection<>();\n List<ApplicabilityToken> result = getViewApplicabilityTokens(viewId, branch);\n for (ApplicabilityToken app : result) {\n if (!app.getName().equals(\... |
"protected BaseRecyclerAdapter<InputWrapper, ? extends BaseRecyclerViewHolder> initAdapter() {\n adapter = new BaseRecyclerAdapter<InputWrapper, FragmentTxDetail.DetailOutputHolder>(getActivity()) {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"String_Node_Str\");\n\n protected FragmentT... |
"final void activityStoppedLocked(ActivityRecord r, Bundle icicle, Bitmap thumbnail, CharSequence description) {\n if (r.state != ActivityState.STOPPING) {\n Slog.i(TAG, \"String_Node_Str\" + r);\n mHandler.removeMessages(STOP_TIMEOUT_MSG, r);\n return;\n }\n if (DEBUG_SAVED_STATE)\n ... |
"public void wipeCache(String type, String event, String name) throws IOException {\n Broadcaster.TYPE wipeType = Broadcaster.TYPE.getType(type);\n EVENT wipeEvent = Broadcaster.EVENT.getEvent(event);\n final String log = \"String_Node_Str\" + wipeType + \"String_Node_Str\" + wipeEvent + \"String_Node_Str\" + ... |
"private static void initDB(String dbPropsFile, String rootPassword, String[] databases, boolean dryRun) {\n Properties dbProperties = new Properties();\n try (FileInputStream f_stream = new FileInputStream(new File(dbPropsFile))) {\n dbProperties.load(f_stream);\n } catch (IOException e) {\n Sys... |
"public boolean isTriggerActive(TileEntity target, ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters) {\n return target instanceof TileKineticEnergyBufferBase && ((TileKineticEnergyBufferBase) target).getEnergyStored(ForgeDirection.UNKNOWN) == 0;\n}\n"
|
"private static Calc compileTo(ExpCompiler compiler, Exp exp, Class clazz) {\n if (clazz == String.class) {\n return compiler.compileString(exp);\n } else if (clazz == Date.class) {\n return compiler.compileDateTime(exp);\n } else if (clazz == boolean.class) {\n return compiler.compileBool... |
"public static Coord2D newCoordFromBearingAndDistance(Coord2D origin, double bearing, double distance) {\n double lat = origin.getY();\n double lon = origin.getX();\n double lat1 = Math.toRadians(lat);\n double lon1 = Math.toRadians(lon);\n double brng = Math.toRadians(bearing);\n double dr = distance... |
"protected void onImpact() {\n if (!this.world.isRemote) {\n newExplosion(world, shootingEntity, posX, posY, posZ, explosionSize, true, world.getGameRules().getBoolean(\"String_Node_Str\"));\n this.setDead();\n }\n}\n"
|
"static void command(RealAdminToolsPlugin plugin, CommandSender sender, String[] args) {\n String subCommand = args.length > 0 ? args[0].toLowerCase() : \"String_Node_Str\";\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(plugin.getDataFolder().getPath() + File.separator + \"String_Node... |
"public String toString() {\n return \"String_Node_Str\" + host + \"String_Node_Str\" + port + \"String_Node_Str\";\n}\n"
|
"protected void storeKeyPair(String alias, KeyPair keyPair) throws ResourceException {\n try {\n JsonValue keyPairValue = new JsonValue(new HashMap<String, Object>());\n keyPairValue.put(\"String_Node_Str\", toPem(keyPair));\n JsonValue encrypted = getCryptoService().encrypt(keyPairValue, crypto... |
"public XMLDirectMapping generateDirectMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo) {\n XMLDirectMapping mapping = new XMLDirectMapping();\n mapping.setAttributeName(property.getPropertyName());\n if (property.isMethodProperty()) {\n if (property.getSetMethodName() !... |
"public boolean derivedTask(final Task task, final boolean revised, final boolean single, Sentence occurence, Sentence occurence2) {\n if (task.sentence.content instanceof Operation) {\n if (((Operation) task.sentence.content).getPredicate() == memory.getOperator(\"String_Node_Str\") && task.sentence.punctuat... |
"protected Operation prepareOperation() {\n return new CacheCreateConfigOperation(cacheConfig, createAlsoOnOthers);\n}\n"
|
"public ChannelFuture answer(HttpResponse output, MessageEvent e, final boolean close, final StartStopListenerDelegate startStopListenerDelegate) throws IOException {\n ChannelFuture future = null;\n long CLoverride = -2;\n StringBuilder response = new StringBuilder();\n DLNAResource dlna = null;\n boole... |
"public void post(Runnable thread) {\n scheduler.execute(thread);\n}\n"
|
"public void onValueChange(ValueChangeEvent<String> event) {\n try {\n value.setNumericValue(Long.valueOf(event.getValue()));\n } catch (NumberFormatException nfe) {\n if (allowEmptyValues) {\n value.setNumericValue((Long) null);\n tb.setValue(\"String_Node_Str\");\n } e... |
"public void testHandleRESTOperation() throws Exception {\n RESTResource resource = new RESTResource(\"String_Node_Str\") {\n public Set<VerbType> getSupportedVerbs() {\n return new TreeSet(Arrays.asList(VerbType.values()));\n }\n };\n resource.addOperation(VerbType.update, new MockRES... |
"public void testGetDocumentWithLargeJSON() {\n Map<String, Object> props = new HashMap<String, Object>();\n props.put(\"String_Node_Str\", \"String_Node_Str\");\n final String content;\n {\n char[] chars = new char[2 * 1024 * 1024 + 10 * 1024];\n Arrays.fill(chars, 'a');\n content = ne... |
"public void search(int offset, String searchTitle, HttpServletResponse response) throws IOException {\n String url = \"String_Node_Str\" + searchTitle;\n VideoSearchBean videoSearchBean = null;\n int count = 0;\n if (searchTitle.equals(\"String_Node_Str\")) {\n videoSearchBean = new VideoSearchBean(... |
"public void setGranularityEnabled(boolean enabled) {\n mGranularityEnabled = enabled;\n}\n"
|
"public void run(final Composite composite) {\n disposeChildren(composite);\n SwtFactory.createStyledText(composite, text, SWT.COLOR_BLACK, true);\n final Composite templates = SwtFactory.createGridComposite(composite, 1, 0, 12, 0, 0);\n for (int i = 0; i < Math.min(patterns.length, 3); ++i) {\n fina... |
"public String generateRequestParameters(String actionName) {\n parameterMap.clear();\n setAction();\n init();\n String requestParams = ACTION_PARAMETER_VALUE + \"String_Node_Str\" + actionName;\n StringBuilder bufferAppender = new StringBuilder();\n bufferAppender.append(requestParams);\n for (Obj... |
"private void initializeButtonContainer() {\n if (mIconPosition == POSITION_TOP || mIconPosition == POSITION_BOTTOM) {\n this.setOrientation(LinearLayout.VERTICAL);\n } else {\n this.setOrientation(LinearLayout.HORIZONTAL);\n }\n LayoutParams containerParams = new LayoutParams(LayoutParams.WRA... |
"public void delete(int cameraID) throws PersistenceException {\n String sql = \"String_Node_Str\";\n PreparedStatement stmt = null;\n try {\n stmt = con.prepareStatement(sql);\n stmt.setInt(1, cameraID);\n stmt.execute();\n } catch (SQLException e) {\n throw new PersistenceExcep... |
"private void resizeScrolledComposite() {\n final int newWidth = scrolledContent.getSize().x;\n final Point newSize = scrolledContent.computeSize(newWidth, SWT.DEFAULT);\n scrollingComposite.setMinHeight(newSize.y);\n}\n"
|
"private boolean getData() {\n boolean isAllDetailsFilled = true;\n if (etStaffId.getText().toString().length() > 0 && tvSelectDate.getText().toString().length() > 0 && etBranchId.getText().toString().length() > 0) {\n staffId = Integer.parseInt(etStaffId.getEditableText().toString());\n date = tvSe... |
"private void createColumnFamilies(List<TableInfo> tableInfos, KsDef ksDef) throws Exception {\n for (TableInfo tableInfo : tableInfos) {\n createOrUpdateColumnFamily(tableInfo, ksDef);\n createInvertedIndexTable(tableInfo, ksDef);\n }\n}\n"
|
"public void sendToServer(FMLProxyPacket pkt) {\n channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER);\n channels.get(Side.CLIENT).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);\n}\n"
|
"public void run() {\n int read = -1, size = 0;\n byte[] chunk = new byte[CHUNK_SIZE];\n try {\n while ((read = mReader.read(chunk, 0, CHUNK_SIZE)) > 0) {\n mBuffer.append(chunk, read);\n }\n if (mBuffer.isEmpty() == false) {\n if (mBuffer.indexOf(CONTENT_TEXT_HTML) !... |
"public void visitArrayField(Field f, Object obj) {\n try {\n JsonObject jsonObject = json.getAsJsonObject();\n String fName = f.getName();\n JsonArray jsonChild = (JsonArray) jsonObject.get(fName);\n if (jsonChild != null) {\n Object array = visitChildAsArray(f.getType(), json... |
"private boolean isSAPBWTable(RepositoryNode theNode) {\n ERepositoryObjectType nodeType = (ERepositoryObjectType) theNode.getProperties(EProperties.CONTENT_TYPE);\n if (nodeType == ERepositoryObjectType.METADATA_CON_TABLE) {\n node = theNode.getParent();\n nodeType = (ERepositoryObjectType) node.ge... |
"public void onBrowserEvent(Event event) {\n int eventType = DOM.eventGetType(event);\n switch(eventType) {\n case Event.ONCLICK:\n {\n Element e = DOM.eventGetTarget(event);\n if (shouldTreeDelegateFocusToElement(e)) {\n } else {\n ... |
"protected void __handleCommonListBox(Collection selectionList) throws Exception {\n JspWriter writer = pageContext.getOut();\n String encParamId = ParameterAccessor.htmlEncode(param.getId());\n String encParamName = ParameterAccessor.htmlEncode(param.getName());\n String displayTextId = encParamId + \"Stri... |
"private List<Experiment> findExperiments(String searchString) throws IOException, JAXBException {\n JaxbObject<ExperimentList> jaxb = new JaxbObject<ExperimentList>();\n ExperimentList list = (ExperimentList) findObject(searchString, \"String_Node_Str\", jaxb, new ExperimentList());\n if (list != null)\n ... |
"private Task createAndRegisterTask(final ExecutionVertexID id, final Configuration jobConfiguration, final RuntimeEnvironment environment, final CheckpointState initialCheckpointState, final Set<ChannelID> activeOutputChannels) throws InsufficientResourcesException, IOException {\n if (id == null) {\n throw ... |
"public void testSortWithExpr2() throws Exception {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition dim1 = column... |
"public List<KeyVersion> getKeyVersions(String name) throws IOException {\n List<KeyVersion> keys = null;\n return keys;\n}\n"
|
"private float getBigramProbability(WordSequence wordSequence) {\n String firstWord = wordSequence.getWord(0);\n if (numberBigrams == 0 || firstWord == null) {\n return getUnigramProbability(wordSequence.getNewest());\n }\n if (!hasUnigram(wordSequence.getWord(1))) {\n throw new Error(\"String... |
"private <T> void createInlinedEntities(final T jpaEntity, final EdmEntitySet entitySet, final ODataEntry entryValues, String jpaEntityName) throws ODataException {\n if (jpaEntity == null)\n return;\n Map<String, Object> relatedPropertyValueMap = new HashMap<String, Object>();\n Map<String, Class<?>> r... |
"private Response generateBinaryDataResponse(JobId jobId, Optional<BinaryData> maybeBinaryData) {\n if (maybeBinaryData.isPresent()) {\n final BinaryData binaryData = maybeBinaryData.get();\n final StreamingOutput body = outputStream -> IOUtils.copy(binaryData.getData(), outputStream);\n final R... |
"public Representation createResourceSet(JsonRepresentation entity) throws NotFoundException, ServerException, BadRequestException {\n ResourceSetDescription resourceSetDescription = new ResourceSetDescription(null, getClientId(), getResourceOwnerId(), validator.validate(toMap(entity)));\n OAuth2Request oAuth2Req... |
"public void testMemberRemoved() throws Exception {\n HazelcastClient client = mock(HazelcastClient.class);\n InetSocketAddress inetSocketAddress = new InetSocketAddress(\"String_Node_Str\", 5701);\n final Connection connection = mock(Connection.class);\n final List<LifecycleState> lifecycleEvents = new Arr... |
"public boolean searchLibrary(TargetCardInLibrary target, Game game, UUID targetPlayerId) {\n Library searchedLibrary = null;\n String searchInfo = null;\n if (targetPlayerId.equals(playerId)) {\n searchInfo = getLogName() + \"String_Node_Str\";\n searchedLibrary = library;\n } else {\n ... |
"public TemplateModelRoot get(RequestParameters params, HttpServletRequest req, HttpServletResponse resp) {\n Configuration[] configs = null;\n try {\n configs = AdminConfigManager.getConfigurations();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InvalidSyntaxException e) {\n ... |
"private UserAccountBean createUserAccount(HttpServletRequest request, Auth0User user, Map<String, Object> userContextMap) throws Exception {\n HashMap<String, String> map = new HashMap<>();\n map.put(\"String_Node_Str\", user.getNickname());\n if (StringUtils.isNotEmpty(user.getGivenName()))\n map.put(... |
"private int findInsertionPoint(DefaultMutableTreeNode parent, int index) {\n int high = parent.getChildCount() - 1;\n if (high < 0) {\n return 0;\n }\n int low = 0;\n while (low <= high) {\n final int mid = low + ((high - low) >> 1);\n DefaultMutableTreeNode midChild = (DefaultMutab... |
"public String discoverDevices(String IPAddress, String discoveryMethod) {\n if (_debugging) {\n System.out.println(\"String_Node_Str\" + IPAddress + \"String_Node_Str\");\n }\n _ipMap.clear();\n _hostIP = IPAddress;\n String baseIP;\n if (IPAddress.lastIndexOf(\"String_Node_Str\") > 0) {\n ... |
"public void onCombust(EntityCombustEvent event) {\n Map<String, dObject> context = new HashMap<String, dObject>();\n dEntity entity = new dEntity(event.getEntity());\n Duration dura = new Duration((long) event.getDuration());\n context.put(\"String_Node_Str\", entity);\n context.put(\"String_Node_Str\",... |
"public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {\n Throwable cause = e.getCause();\n HttpResponse response = null;\n if (cause instanceof InvalidJsonException) {\n LOG.error(cause.getMessage());\n response = new DefaultHttpResponse(HTTP_1_1, NOT_ACCEPTA... |
"public void handleJob(final Message<File> message) throws IOException {\n final DepositDirectoryConfiguration depositDirectoryConfiguration = message.getHeaders().get(DIRECTORY_CONFIG_HEADER_NAME, DepositDirectoryConfiguration.class);\n final String applicationName = depositDirectoryConfiguration.getApplicationN... |
"protected static double computeLoudestFreq(FrequenciesState fs) {\n double max = 0;\n for (int i = 0; i < fs.getState().length; i++) {\n double val = fs.getState()[i].abs();\n max = (max < val ? val : max);\n }\n return freq;\n}\n"
|
"public void handle(ParserContext parserContext, String attributeKey, String attributeValue, T view) {\n view.setProgress((int) ParseHelper.parseDouble(attributeValue));\n}\n"
|
"private static CMSTypedStream getSignedInputStream(BodyPart bodyPart, String defaultContentTransferEncoding, File backingFile) throws MessagingException {\n try {\n OutputStream out = new BufferedOutputStream(new FileOutputStream(backingFile));\n SMIMEUtil.outputBodyPart(out, true, bodyPart, defaultCo... |
"private ServiceInfo createServiceInfoFromIServiceInfo(IServiceInfo serviceInfo) {\n if (serviceInfo == null)\n return null;\n final IServiceID sID = serviceInfo.getServiceID();\n final Hashtable props = new Hashtable();\n final IServiceProperties svcProps = serviceInfo.getServiceProperties();\n i... |
"public void force() throws IOException {\n getNewDirectBuffer();\n fileChannel.force(false);\n}\n"
|
"public void genTimings(long now, double distance) {\n tickStarted = now;\n timeToDest = (int) Math.ceil(distance / speed);\n tickFinished = now + timeToDest;\n}\n"
|
"public InferredEdge getEdge(int id) {\n final Edge edge = graph.getEdgeById(id);\n VertexPair key = new VertexPair(edge.getFromVertex(), edge.getToVertex());\n InferredEdge edgeInfo = edgeToInfo.get(key);\n if (edgeInfo == null) {\n edgeInfo = new InferredEdge(edge, id, this);\n edgeToInfo.pu... |
"public int size() {\n return (Integer) invoke(new ClientReplicatedMapSizeRequest(getName()));\n}\n"
|
"public void run() {\n boolean connected = true;\n clientInfo.setForward(false);\n clientInfo.setHostname(null);\n LocalSocket clientSocket = new LocalSocket(socketToClient, this);\n if (!clientSocket.success) {\n printLogMessage(\"String_Node_Str\");\n return;\n }\n String kickMessag... |
"protected void initializeSelection(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n logger.debug(\"String_Node_Str\");\n request.getRequestDispatcher(idpSelectionPath).forward(request, response);\n}\n"
|
"public static List<String> getTableNamesFromQuery(ResultSet resultSet) throws SQLException {\n List<String> itemTablesName = new ArrayList<String>();\n tableCommentsMap.clear();\n while (resultSet.next()) {\n String nameKey = resultSet.getString(1).trim();\n String tableComment = getTableComment... |
"public BigDecimal getFeeForCurrencyPairTrade(CurrencyPair pair) {\n for (CurrencyPair currencyPair : _supportedCurrencyPairs) {\n if (currencyPair.getCurrency().equals(pair.getCurrency()) && currencyPair.getPaymentCurrency().equals(pair.getPaymentCurrency())) {\n return currencyPairFeeTrade.get(cu... |
"private void openUserProfile() {\n openPage(ConstantUtil.USER_PROFILE_SELF_FAKE_URL, getString(R.string.personal_center));\n}\n"
|
"public List<TaskInfo> getTaskInfo(RunId runId) {\n List<TaskInfo> taskInfos = Lists.newArrayList();\n String startedTasksParentPath = ZooKeeperConstants.getStartedTasksParentPath();\n String completedTaskParentPath = ZooKeeperConstants.getCompletedTaskParentPath();\n try {\n String runPath = ZooKeep... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.