content
stringlengths
40
137k
"public static void stopModule(Module mod, boolean isShuttingDown) {\n if (mod != null) {\n String moduleId = mod.getModuleId();\n String modulePackage = mod.getPackageName();\n List<Module> startedModulesCopy = new ArrayList<Module>();\n startedModulesCopy.addAll(getStartedModules());\n ...
"public Process run(int statisticsPort, int tracePort, String watchParam, IProgressMonitor monitor, IProcessMessageManager processMessageManager) throws ProcessorException {\n return run(new String[] { watchParam }, statisticsPort, tracePort, monitor, processMessageManager);\n}\n"
"public static void setupParameters(BaseCmd cmd, Map<String, String> params, List<ControlledEntity> entitiesToAccess) {\n Map<String, Object> unpackedParams = cmd.unpackParams(params);\n if (cmd instanceof BaseListCmd) {\n Object pageSizeObj = unpackedParams.get(ApiConstants.PAGE_SIZE);\n Long pageS...
"public boolean connect(Node... nodeList) {\n boolean returnValue = true;\n assert (nodeList.length > 1);\n Node fromNode = null;\n for (Node toNode : nodeList) {\n Preconditions.checkNotNull(toNode, \"String_Node_Str\");\n if (fromNode != null) {\n boolean success = edgeMap.put(fro...
"private void drawUnknownMutation(IMutation combination, int x) {\n drawQuestionMark(guiLeft + x, guiTop + textLayout.getLineY());\n drawProbabilityArrow(combination, guiLeft + x + 18, guiTop + textLayout.getLineY() + 4);\n drawQuestionMark(guiLeft + x + 32, guiTop + textLayout.getLineY());\n}\n"
"private void sendGoogle(ID roomID, String target, String searchString) {\n searchString = searchString.replace(' ', '+');\n sendMessage(roomID, (target != null ? target + \"String_Node_Str\" : \"String_Node_Str\") + NLS.bind(CustomMessages.getString(CustomMessages.Google), searchString));\n}\n"
"final void enqueueInner(TLCState state) {\n if (this.enqIndex == this.enqBuf.length) {\n try {\n String pstr = Integer.toString(this.hiPool);\n File file = new File(this.filePrefix + pstr);\n this.enqBuf = this.writer.doWork(this.enqBuf, file);\n this.hiPool++;\n ...
"public AutumnRPCResponse deserializeResponse(byte[] buf, Class defaultReturnType) throws AutumnSerializationException {\n try {\n JsonNode root = mapper.readTree(buf);\n if (root.isArray() && root.size() >= 2) {\n Class returnType = defaultReturnType;\n if (root.size() >= 3) {\n ...
"public void updateSlaOlaIndicators(SlaOrOlaIndicators slaOrOlaIndicators) throws Exception {\n DirectoryService directoryService = Framework.getService(DirectoryService.class);\n if (slaOrOlaIndicators != null) {\n Session session = directoryService.open(\"String_Node_Str\");\n if (session == null)...
"public List<String> getServiceList(String topologyName, String serviceNameMatching, List<String> knoxServiceList) {\n List<String> serviceList = new ArrayList<String>();\n String errMsg = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n if (serviceNameMatching == null || serviceNameMatching....
"public boolean execute(ScrollingMenuSign plugin, Player player, String[] args) {\n Level l = SMSLogger.getLogLevel();\n if (l.intValue() < Level.INFO.intValue()) {\n SMSConfig.setPluginConfiguration(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n SMSLogger.setLogLevel(Level.FINE);\n }...
"public void testIsWebAddress() {\n FileInfo httpFile = new FileInfo(\"String_Node_Str\", 0, -1, false, false, null);\n FileInfo httpsFile = new FileInfo(\"String_Node_Str\", 0, -1, false, false, null);\n FileInfo nonWebFile = new FileInfo(\"String_Node_Str\", 0, -1, false, false, null);\n assertTrue(httpFi...
"public final void draw(GL10 _gl, float _x, float _y, int _direction) {\n _gl.glLoadIdentity();\n _gl.glTranslatef(_x, _y, 0);\n _gl.glRotatef((float) _direction - 90.0f, 0.0f, 0.0f, 1.0f);\n _gl.glScalef(Options.scale, Options.scale, Options.scale);\n _gl.glBindTexture(GL10.GL_TEXTURE_2D, sprite[0]);\n ...
"private static void onModeCommand(Client client, String[] args) {\n if (!client.registrationCompleted()) {\n return;\n }\n if (args.length < 1 || args[0].length() < 1) {\n client.sendStandardFormat(Reply.ERR_NEEDMOREPARAMS.format(client.getSafeNickname(), MODE, \"String_Node_Str\"));\n re...
"public IExprDataResultSet loadExprDataResultSet() throws DataException {\n if (version == VersionManager.VERSION_2_0)\n throw new DataException(ResourceConstants.WRONG_VERSION);\n ExprMetaInfo[] exprMetas = loadExprMetaInfo();\n IExprDataResultSet exprDataResultSet = null;\n if (streamManager.isBase...
"private List getSelectValueList() throws BirtException {\n List selectValueList = new ArrayList();\n ReportItemHandle reportItem = DEUtil.getBindingHolder(currentItem);\n if (bindingName != null && reportItem != null) {\n selectValueList = SelectValueFetcher.getSelectValueList(expression.getText(), rep...
"private void processXmlElement(Property property, TypeInfo info) {\n if (helper.isAnnotationPresent(property.getElement(), XmlElement.class)) {\n XmlElement element = (XmlElement) helper.getAnnotation(property.getElement(), XmlElement.class);\n property.setIsRequired(element.required());\n prop...
"private static Path executeImageMagick(Path input, Path output, String inputFormat, String outputFormat) throws CommandException {\n String command = RodaCoreFactory.getRodaConfigurationAsString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n command = command.replace(\"String_Node_Str\", input...
"private void buildGroup(ServiceFunctionGroup sfg, boolean isAdd) {\n List<SfcServiceFunction> sfs = sfg.getSfcServiceFunction();\n SfName sfName = new SfName(sfs.get(0).getName());\n ServiceFunction sf = SfcProviderServiceFunctionAPI.readServiceFunction(sfName);\n SffName sffName = sf.getSfDataPlaneLocator...
"public Explanation explain() throws IOException {\n Explanation result = new Explanation(0, \"String_Node_Str\" + toString() + \"String_Node_Str\");\n Explanation totalExpl;\n if (matchEndCell == 0)\n totalExpl = ((SpansCell) cells.get(0)).spans.explain();\n else {\n float totalScore = 0.0f;\...
"public void testListenersNonSmartRoutingMultipleServer() throws InterruptedException {\n factory.newInstances(null, 3);\n ClientConfig clientConfig = getNonSmartClientConfig();\n client = factory.newHazelcastClient(clientConfig);\n testListenersInternal();\n}\n"
"public long getRemainingDownloadTime() {\n return (long) ((getTotalSize() - getCurrentSize()) / getDownloadSpeed());\n}\n"
"public void saveScreenshot() {\n if (!takeScreenshot) {\n return;\n }\n final FBO fboSceneFinal = getFBO(\"String_Node_Str\");\n if (fboSceneFinal == null) {\n return;\n }\n final ByteBuffer buffer = BufferUtils.createByteBuffer(fboSceneFinal.width * fboSceneFinal.height * 4);\n fboS...
"private List<interfaceDef> createRouterVMNetworks(StartRouterCommand cmd) throws InternalErrorException {\n List<interfaceDef> nics = new ArrayList<interfaceDef>();\n DomainRouter router = cmd.getRouter();\n String guestMac = router.getGuestMacAddress();\n String privateMac = router.getPrivateMacAddress();...
"public void testQuery19() throws InterruptedException {\n log.info(\"String_Node_Str\");\n String clusterName = \"String_Node_Str\";\n String clusterPassword = \"String_Node_Str\";\n Config cfg_1 = new Config();\n cfg_1.getGroupConfig().setName(clusterName).setPassword(clusterPassword);\n cfg_1.setPr...
"private TimeLine generateCustomTimeLine(double[] timeSlices) {\n int numberOfSlices = timeSlices.length;\n double firstSlice = timeSlices[0];\n double startTime = mrsd.getTime() - (firstSlice * DayInMillis * DaysInYear * timescaler);\n double endTime = mrsd.getTime();\n TimeLine timeLine = new TimeLine(...
"public void playMusic(Location location, int id) {\n this.player.playEffect(BukkitUtil.getLocation(location), Effect.RECORD_PLAY, id);\n}\n"
"public void activateSimppSettings() {\n LOG.debug(\"String_Node_Str\");\n if (_remoteController == null)\n throw new IllegalStateException(\"String_Node_Str\");\n synchronized (_remoteController) {\n for (Map.Entry<Object, Object> entry : _simppProps.entrySet()) {\n String key = (Stri...
"protected List getModelTargetConnections() {\n List targetjoins = new ArrayList();\n DatasetNodeEditPart datasetEditpart = (DatasetNodeEditPart) getParent();\n TabularCubeHandle cube = datasetEditpart.getCube();\n Iterator iter = cube.joinConditionsIterator();\n while (iter.hasNext()) {\n Dimensi...
"public ModelAndView errorHtml(HttpServletRequest request) {\n Map<String, Object> map = extract(new ServletRequestAttributes(request), false, false);\n int status = (Integer) map.get(\"String_Node_Str\");\n switch(status) {\n case 404:\n return new ModelAndView(new RedirectView(\"String_Node...
"public void update(long deltaTime) {\n float delta = deltaTime / (float) 1e9;\n float speed1 = (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) ? 4f : 16) * delta;\n float speed2 = (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) ? 11.25f : 45f) * delta;\n float speed3 = (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) ? 5f : 20)...
"public Object getKey() {\n return new TransactionLogKey(itemId, name);\n}\n"
"public void handleQueue(Node node) {\n BeanDefinitionBuilder queueConfigBuilder = createBeanBuilder(QueueConfig.class);\n final Node attName = node.getAttributes().getNamedItem(\"String_Node_Str\");\n final String name = getValue(attName);\n fillAttributeValues(node, queueConfigBuilder);\n for (org.w3c....
"public SootField getFieldUnsafe(String subsignature) {\n checkLevel(SIGNATURES);\n for (SootField field : fields.getElementsUnsorted()) {\n if (field.getSubSignature().equals(subsignature))\n return field;\n }\n return null;\n}\n"
"public BracePair findPair(boolean left, HighlighterIterator iterator, CharSequence fileText, FileType fileType) {\n BracePair pair = super.findPair(left, iterator, fileText, fileType);\n if (pair == DO_END || pair == FN_END) {\n iterator.advance();\n IElementType tokenType = iterator.getTokenType()...
"public static Vector3 multiply(Vector3 a, Vector3 b) {\n return new Vector3(a.x * b.x, a.y * b.y, a.z * b.z);\n}\n"
"private static Collection<SkyKey> createRecursiveTraversalKeys(Environment env, TraversalRequest traversal) throws MissingDepException, InterruptedException {\n DirectoryListingValue dirListing = (DirectoryListingValue) getDependentSkyValue(env, DirectoryListingValue.key(traversal.path));\n List<SkyKey> result =...
"public void systemReady() {\n synchronized (mMethodMap) {\n if (!mSystemReady) {\n mSystemReady = true;\n try {\n startInputInnerLocked();\n } catch (RuntimeException e) {\n Log.w(TAG, \"String_Node_Str\", e);\n }\n }\n }\n}\...
"public void initializeFrom(ILaunchConfiguration config) {\n this.hasPermissions = null;\n IProject previousProject = Oprofile.OprofileProject.getProject();\n IProject project = getProject(config);\n Oprofile.OprofileProject.setProject(project);\n try {\n if (!hasPermissions(project)) {\n ...
"private void initiateInstall() {\n try {\n mAppInfo = mPm.getApplicationInfo(pkgName, PackageManager.GET_UNINSTALLED_PACKAGES);\n } catch (NameNotFoundException e) {\n mAppInfo = null;\n }\n if (mAppInfo == null) {\n startInstallConfirm();\n } else {\n if (localLOGV)\n ...
"public void onFailure(Object inputObject, InputContext inputContext, FailureReason reason, PostProcess.InputAcknowledger inputAcknowledger) {\n LOG.info(\"String_Node_Str\" + reason.getMessage(), reason.getCause());\n FailurePolicy failurePolicy;\n inflight.decrementAndGet();\n try {\n flowletContex...
"public boolean onCommand(CommandSender cs, Command c, String l, String[] args) {\n if (cs instanceof Player) {\n if (plugin.checkPermissions((Player) (cs), \"String_Node_Str\", true)) {\n if (plugin.checkPermissions((Player) (cs), \"String_Node_Str\", true)) {\n isPlayerAdmin = true...
"public AnswerKey apply(AnswerKey input) {\n final ImmutableSet.Builder<AssessedResponse> newAssessedResponses = ImmutableSet.builder();\n newAssessedResponses.addAll(input.annotatedResponses());\n for (final AssessedResponse assessedResponse : input.annotatedResponses()) {\n if (assessedResponse.assess...
"protected void poll() throws Exception {\n List<S3ObjectSummary> objectSummaries = AwsUtils.listAllObjects(config.billingS3BucketName, config.billingS3BucketPrefix);\n logger.info(\"String_Node_Str\" + objectSummaries.size() + \"String_Node_Str\");\n TreeMap<DateTime, S3ObjectSummary> filesToProcess = Maps.ne...
"public void nestedProperties() {\n TokenStream tokenStream = new TokenStream(Wave(), PropertyKey(\"String_Node_Str\"), Accessor(), PropertyKey(\"String_Node_Str\"), Accessor(), PropertyKey(\"String_Node_Str\"), Wave());\n assertNotNull(NonTerminal.EVALUATION.buildAbstractSyntaxTree(tokenStream));\n}\n"
"public void finishTransaction(int eventIdentifier) {\n try {\n receiver.receive(broker.getMaster().first().finishTransaction(receiver.getSlaveContext(eventIdentifier)));\n } catch (ZooKeeperException e) {\n receiver.newMaster(null, e);\n throw e;\n } catch (ComException e) {\n rece...
"public void notifyScannedDevice(BluetoothDevice device, BluetoothAdapter.LeScanCallback scanner) {\n int oldSize = 0, newSize = 0;\n if (isDebugEnabled())\n oldSize = distinctBluetoothAddresses.size();\n distinctBluetoothAddresses.add(device.getAddress());\n if (isDebugEnabled()) {\n newSize ...
"private void updatePrimaryBlog(String blogId) {\n PushAccountSettingsPayload payload = new PushAccountSettingsPayload();\n payload.params = new HashMap<>();\n payload.params.put(\"String_Node_Str\", blogId);\n mDispatcher.dispatch(AccountActionBuilder.newPostSettingsAction(payload));\n}\n"
"public boolean tryShortCircuit(INDArrayIndex... indexes) {\n int pointIndex = 0;\n int interval = 0;\n int newAxis = 0;\n int numAll = 0;\n int numSpecified = 0;\n for (int i = 0; i < indexes.length; i++) {\n if (indexes[i] instanceof PointIndex) {\n pointIndex++;\n }\n ...
"public static String getFriendlyClassname(String type) {\n String result = type;\n if (type.startsWith(\"String_Node_Str\")) {\n int depth = 0;\n while (type.charAt(depth) == (int) '[') {\n ++depth;\n }\n result = type.substring(depth, type.length());\n if (result.st...
"public final boolean hasLocalPropertiesForExtendedElements() {\n if (!isSameType())\n return false;\n if (!allExtendedElements())\n return false;\n List elements = getElements();\n for (Iterator iter = elements.iterator(); iter.hasNext(); ) {\n DesignElementHandle elementHandle = (Desi...
"private IStrategoTerm newParseSpeed(File f, String pkg) {\n newResultSpeed = null;\n newExceptionSpeed = null;\n if (f == null)\n return null;\n String input = FileTools.tryLoadFileAsString(f.getAbsolutePath());\n try {\n newResultSpeed = (IStrategoTerm) newParserSpeed.parse(input, f.getAb...
"public TextRange getTextRange(Editor editor, DataContext context, int count) {\n LineRange lr = getLineRange(editor, context, count);\n int start = EditorHelper.getLineStartOffset(editor, lr.getStartLine());\n int end = EditorHelper.getLineEndOffset(editor, lr.getEndLine()) + 1;\n return new TextRange(star...
"public boolean addValue(String field, Object value) throws FieldTypeMismatchException {\n if (field != null && value != null && fields != null) {\n Field f = findField(field, fields);\n if (f != null) {\n f.addValue(value);\n } else {\n HashMap<String, Object> newValue = n...
"public List<IComponent> filterNeededComponents(Item item, RepositoryNode seletetedNode, ERepositoryObjectType type) {\n List<IComponent> neededComponents = new ArrayList<IComponent>();\n if (!(item instanceof NoSQLConnectionItem)) {\n return neededComponents;\n }\n NoSQLConnection connection = (NoSQ...
"private static void processRequest(ProcessingRequest pr, String acceptType) {\n HttpPost post = new HttpPost(endpointUrl + serviceId);\n post.setHeader(\"String_Node_Str\", \"String_Node_Str\");\n post.setHeader(\"String_Node_Str\", acceptType);\n post.setHeader(\"String_Node_Str\", \"String_Node_Str\");\n...
"private boolean isSavingNecessary() {\n ChunkProvider chunkProvider = CoreRegistry.get(ChunkProvider.class);\n int unloadedChunkCount = unloadedAndUnsavedChunkMap.size();\n int loadedChunkCount = chunkProvider.getAllChunks().size();\n double totalChunkCount = unloadedChunkCount + loadedChunkCount;\n dou...
"public String get() {\n if (formatString == null)\n return \"String_Node_Str\";\n String s = ChatColor.translateAlternateColorCodes('&', formatString);\n for (Map.Entry<String, String> stringStringEntry : modifiers.entrySet()) {\n String value = stringStringEntry.getValue();\n if (colored...
"public void handleEvent(Event event) {\n if (event.data instanceof ISelectDataComponent) {\n if (event.type == IChartDataSheet.EVENT_QUERY && event.detail == IChartDataSheet.DETAIL_UPDATE_COLOR) {\n refreshTableColor();\n }\n return;\n }\n if (event.type == CustomPreviewTable.M...
"private boolean isOracle() {\n if (this.connectionItem != null) {\n if (this.connectionItem instanceof DatabaseConnectionItem) {\n DatabaseConnectionItem dbConnItem = (DatabaseConnectionItem) this.connectionItem;\n DatabaseConnection dbConn = null;\n String dbtype = null;\n ...
"private void drawRight(Graphics g, int rowIndex, int colIndex, int x, int y, int w, int h, int[] data) {\n if (data[0] == 0 && data[1] == 0) {\n return;\n }\n int nTopWidth = 0;\n int nTopStyle = 0;\n int nTopX = -1;\n int nTopY = -1;\n if (rowIndex > 0) {\n int[] nTop = borderData[(...
"public void dialogFieldChanged(DialogField field) {\n if (field instanceof SelectionButtonDialogField)\n enableProjectSpecificSettings(((SelectionButtonDialogField) field).isSelected());\n}\n"
"public void checkTypes(MarkerList markers, IContext context) {\n if (this.instance != null) {\n this.instance.checkTypes(markers, context);\n }\n if (this.field != null) {\n this.instance = this.field.checkAccess(markers, this.position, this.instance, context);\n this.value = this.field.c...
"public MoveLine computeAnalyticDistribution(MoveLine moveLine) {\n List<AnalyticMoveLine> analyticMoveLineList = moveLine.getAnalyticMoveLineList();\n if (analyticMoveLineList != null && generalService.getGeneral().getAnalyticDistributionTypeSelect() != GeneralRepository.DISTRIBUTION_TYPE_FREE) {\n for (A...
"private static ClassNode[] inferClosureParamTypes(VariableScope scope, ClosureExpression closure) {\n int paramCount = closure.getParameters() == null ? 0 : closure.getParameters().length;\n if (paramCount == 0) {\n paramCount += 1;\n }\n ClassNode[] inferredTypes = new ClassNode[paramCount];\n V...
"private void dumpObject(JSONCharacterSink out, Object o, char separator, Collection<String> ignoredProps) {\n if (o == null) {\n out.append(\"String_Node_Str\");\n } else {\n Class oClass = o.getClass();\n JSONifier jsonifier;\n TypeConverter typeConverterFromClass = null;\n if...
"private void initializeRtpManager(RTPManager rtpManager, SessionAddress bindAddress) throws MediaException {\n selectedKeyProviderAlgorithm = selectKeyProviderAlgorithm(0);\n try {\n if (selectedKeyProviderAlgorithm != null && selectedKeyProviderAlgorithm.getProviderType() == KeyProviderAlgorithm.Provider...
"protected void updateOnEDT(Object arg) {\n if (arg == null || arg instanceof String) {\n Utils.fixedSetWebImageImage(mAvatar, AvatarLoader.load(mValue));\n String name = Utils.displayName(mValue);\n if (!name.equals(mNameLabel.getText())) {\n mNameLabel.setText(name);\n Co...
"private boolean releaseAll(long deadline) {\n long threadId = Thread.currentThread().getId();\n boolean removed = false;\n Iterator<Map.Entry<String, Entry>> iterator = entries.entrySet().iterator();\n while (iterator.hasNext()) {\n Map.Entry<String, Entry> me = iterator.next();\n Entry e = m...
"public void onEventEdited(ShelfEvent se) {\n model.resetModel(NavigationEnum.EVENT_PREVIEW, getLoggedUser(), null, null, null, null, se.getEvent());\n pushEvent(Events.EVENT_DISPLAYED_EVENT);\n}\n"
"public void kickAfkPlayers() {\n if (lastPlayerActivity.size() < 1) {\n return;\n }\n if (plugin.getServer().getOnlinePlayers().length < playerCountThreshold) {\n return;\n }\n long activityWindow = System.currentTimeMillis() - kickTimeout;\n for (String name : lastPlayerActivity.keySet...
"private void retrieveBuddyList() throws IOException {\n write(\"String_Node_Str\", \"String_Node_Str\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(getInputStream()));\n String input = reader.readLine();\n while (input == null || !input.startsWith(\"String_Node_Str\")) {\n in...
"public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {\n if (zone.equals(Zone.COMMAND)) {\n if (this.getSourceId() == null) {\n return true;\n }\n MageObject object = game.getObject(this.getSourceId());\n if (object != null && object instanceof Emblem)...
"private void initReceiverVertexToSourceEdgeIDMap(final ManagementGraph managementGraph) {\n final Iterator<ManagementVertex> it = new ManagementGraphIterator(managementGraph, true);\n while (it.hasNext()) {\n final ManagementVertex source = it.next();\n final int numberOfOutputGates = source.getNum...
"public void logMessage() {\n LOG.trace(\"String_Node_Str\");\n LOG.trace(\"String_Node_Str\" + this.getProtocolVersion() + \"String_Node_Str\" + this.getMethod() + \"String_Node_Str\" + this.getUri());\n for (String s : this.getHeaderNames()) {\n buf.append(s).append(\"String_Node_Str\").append(this.ge...
"private List<DispoItem> createItems(Map<String, DispoItem> exisitingItems, OperationReport report) {\n List<DispoItem> toReturn;\n Collection<DispoItemData> values = datIdToItem.values();\n for (DispoItemData item : values) {\n dataFactory.initDispoItem(item);\n item.setTotalPoints(String.valueO...
"protected void createItems() {\n int nItems = 3;\n int bonus = RingOfWealth.getBonus(Dungeon.hero, RingOfWealth.Wealth.class);\n bonus = Math.min(bonus, 10);\n while (Random.Float() < (0.3f + bonus * 0.05f)) {\n nItems++;\n }\n for (int i = 0; i < nItems; i++) {\n Heap.Type type = null;...
"public void testCreateMatrixFromV8Array() {\n V8Array array = v8.executeArrayScript(\"String_Node_Str\");\n List<? super Object> list = V8ObjectUtils.toList(array);\n assertEquals(3, list.size());\n assertEquals(3, ((List) list.get(0)).size());\n assertEquals(3, ((List) list.get(1)).size());\n assert...
"public synchronized long getQuantile(double q) {\n if (count == 0) {\n return 0L;\n }\n int buf0Size = Math.min(bufferSize, leafCount);\n int buf1Size = Math.max(0, leafCount - buf0Size);\n long sum = 0;\n long target = (long) (count * q);\n int i = 0;\n Arrays.sort(buffer[0], 0, buf0Siz...
"public void testSendRequest_GET() {\n delayTestFinish(TEST_FINISH_DELAY);\n RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, getTestBaseURL() + \"String_Node_Str\");\n builder.sendRequest(null, new RequestCallback() {\n\n public void onError(Request request, Throwable exception) {\n ...
"public void updateFromModel(FgModel model, boolean logDomain) {\n if (iter != null) {\n iter.reset();\n }\n ExpFamFactor f = this;\n int numConfigs = f.getVars().calcNumConfigs();\n if (numConfigs > 0) {\n for (int c = 0; c < numConfigs; c++) {\n int config = (iter != null) ? it...
"public boolean onDown(MotionEvent e) {\n if (mScroller != null && !mScroller.isFinished()) {\n mScroller.forceFinished(true);\n return false;\n }\n int pos = computeSelectedIndex(e.getX(), e.getY());\n if (pos >= 0 && pos < mAllImages.getCount()) {\n select(pos, true);\n } else {\n ...
"private void generateCoreElem(StringBuilder b, List<ElementDefinition> elements, ElementDefinition elem, int indent, String pathName, boolean asValue, TypeRefComponent type, boolean last, boolean complex) throws Exception {\n if (elem.getPath().endsWith(\"String_Node_Str\"))\n return;\n if (!complex && el...
"public <T> VertexEntity<T> replaceVertex(String databaseName, String graphName, String collectionName, String key, T vertex, Boolean waitForSync, Long ifMatchRevision, Long ifNoneMatchRevision) throws ArangoException {\n validateCollectionName(graphName);\n HttpResponseEntity res = httpManager.doPut(createGharia...
"public void buttonClick(ClickEvent event) {\n List<User> users = new ArrayList<User>();\n for (Group group : getSelectedItems()) {\n users.addAll(context.getOperationsService().findUsersByGroup(group.getId()));\n if (users.size() > 10) {\n break;\n }\n }\n if (users.size() =...
"public List<String> getSourceRootPathList(Project project, AnActionEvent event) {\n List<String> sourceRoots = Lists.newArrayList();\n for (VirtualFile virtualFile : getModuleRootManager(event).getSourceRoots(false)) {\n sourceRoots.add(StringUtils.normalizePath(virtualFile.getPath()).replace(projectPath,...
"private DataStore createDataStore(Object requestExecutor, Object secondCtorArg) {\n String requestExecutorInterfaceClassName = \"String_Node_Str\";\n Class requestExecutorInterfaceClass;\n try {\n requestExecutorInterfaceClass = ClassUtils.forName(requestExecutorInterfaceClassName);\n } catch (Throw...
"protected void loadAllWorlds(String overworldFolder, String unused, long seed, WorldType type, String generator) {\n this.convertMapIfNeeded(overworldFolder);\n this.setUserMessage(\"String_Node_Str\");\n List<Integer> idList = new LinkedList<Integer>(Arrays.asList(DimensionManager.getStaticDimensionIDs()));\...
"public static HelperContext getHelperContext() {\n ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();\n HelperContext hCtx = getHelperContext(contextClassLoader);\n if (hCtx != null) {\n return hCtx;\n }\n Object key = getDelegateMapKey(contextClassLoader);\n hCtx...
"private void moveFolderRepNode(IRepositoryNode sourceNode, IRepositoryNode targetNode) throws PersistenceException {\n IPath oldPath = null;\n List<String> jrxmlFileNames = null;\n List<JrxmlTempleteRepNode> jrxmlFileRepNodes = null;\n if (sourceNode instanceof JrxmlTempSubFolderNode) {\n oldPath = ...
"public static void main(String[] args) {\n double currentHeading = 0;\n final double latErrorFinal = 2 / 111131.745;\n final double lonErrorFinal = 2 / 78846.81;\n try {\n ArrayList<GpsMeasurement> wayPoints = WayPointUtil.createWayPointsFromLog(\"String_Node_Str\", RobobuggyConfigFile.getWaypointSo...
"public static Locale getLocale(HttpServletRequest request) {\n Locale locale = null;\n locale = getLocaleFromString(getParameter(request, PARAM_LOCALE));\n if (locale == null)\n locale = request.getLocale();\n if (locale == null)\n locale = webAppLocale;\n return locale;\n}\n"
"private boolean orderMatches(BooleanType diff, BooleanType base) {\n return (diff == null) || (base == null) || (diff.getValue() == base.getValue());\n}\n"
"void resetHistory() {\n dispatchNullFilterClick();\n HistoryAdapter adapter = mImageShow.getHistory();\n adapter.reset();\n ImagePreset original = new ImagePreset(adapter.getItem(0));\n mImageShow.setImagePreset(original);\n mPanelController.resetParameters();\n invalidateViews();\n}\n"
"public void autoAdjustAxisBounds(Axis2D axis) {\n axis.getAxisX().setMin(minX);\n axis.getAxisX().setMax(maxX + getBinSize());\n axis.getAxisY().setMin(minY);\n axis.getAxisY().setMax(maxY);\n}\n"
"public void paintHorizontalTicks(int y) {\n if (fXMin >= 0L && fXMax >= 0L) {\n int nbTicks = (int) (getWidth()) / MAX_WIDTH_BETWEEN_TICKS + 1;\n for (int i = 0; i < nbTicks; i++) {\n if (i % fDrawLabelEachNTicks == 0) {\n int x = i * MAX_WIDTH_BETWEEN_TICKS + fPadding + fVer...
"public void showError() {\n passwordTextInputLayout.setPasswordVisibilityToggleTintList(AppCompatResources.getColorStateList(getContext(), R.color.red_error_color));\n passwordTextInputLayout.setError(getResources().getString(R.string.wrong_password));\n}\n"
"public void init(final NodeEngine nodeEngine, Properties properties) {\n long mergeFirstRunDelay = node.getGroupProperties().MERGE_FIRST_RUN_DELAY_SECONDS.getLong() * 1000;\n mergeFirstRunDelay = mergeFirstRunDelay <= 0 ? 100 : mergeFirstRunDelay;\n ExecutionService executionService = nodeEngine.getExecutionS...
"public void run() {\n try {\n IDataPayload payload = message.getPayloadData();\n HttpHeaderAppendingVisitor visitor = new HttpHeaderAppendingVisitor();\n IDataPayload httpload = (IDataPayload) payload.accept(visitor);\n HttpTransportDestination destination = (HttpTransportDestination) me...
"protected MethodBinding[] augmentMethodBindings(MethodBinding[] methodBindings) {\n SourceTypeBinding binding = referenceContext.binding;\n if (binding != null && (binding.isAnnotationType() || binding.isInterface())) {\n return methodBindings;\n }\n boolean implementsGroovyLangObject = false;\n ...