content
stringlengths
40
137k
"int _getThenIncrementCurrentSharedMemoryAddress(TypedIOPort port) throws IllegalActionException {\n String type = targetType(port.getType());\n int portWidth = port.getWidth();\n int offset = 0;\n if (type.equals(\"String_Node_Str\") || type.equals(\"String_Node_Str\") || type.equals(\"String_Node_Str\") |...
"public static void update(Marker marker, PolygonPoint wp) {\n marker.setPosition(wp.coord);\n marker.setTitle(\"String_Node_Str\");\n marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n}\n"
"public boolean start(ApplicationContext startupContext) throws Exception {\n DeploymentContext dc = (DeploymentContext) startupContext;\n final DeployCommandParameters deployParams = dc.getCommandParameters(DeployCommandParameters.class);\n if (deployParams.origin == OpsParams.Origin.deploy || deployParams.or...
"private ClusterLevelNetworkPartitionContext addPartition(ClusterInstance clusterInstance, Cluster cluster, ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext, ChildLevelPartition childLevelPartition) throws PolicyValidationException, PartitionValidationException {\n if (clusterLevelNetworkParti...
"protected void addNodePassthruExceptionConstraints(CGNode node, IR ir) {\n List<ProgramCounter> peis = SSAPropagationCallGraphBuilder.getIncomingPEIs(ir, ir.getExitBlock());\n PointerKey exception = heapModel.getPointerKeyForExceptionalReturnValue(node);\n IClass c = node.getClassHierarchy().lookupClass(TypeR...
"private final void updateBattery(Intent intent) {\n mBatteryData.iconId = intent.getIntExtra(\"String_Node_Str\", 0);\n mBatteryData.iconLevel = intent.getIntExtra(\"String_Node_Str\", 0);\n mService.updateIcon(mBatteryIcon, mBatteryData, null);\n int plugged = intent.getIntExtra(\"String_Node_Str\", 0);\n...
"public void schedulJob(ExecutionGraph executionGraph) throws SchedulingException {\n final Map<InstanceType, InstanceTypeDescription> availableInstances = getInstanceManager().getMapOfAvailableInstanceTypes();\n for (int i = 0; i < executionGraph.getNumberOfStages(); i++) {\n final Map<InstanceType, Integ...
"public void run() {\n File groupFolder = groupsDir;\n if (!groupFolder.exists()) {\n groupFolder.mkdir();\n }\n File[] groupFiles = groupFolder.listFiles();\n if (groupFiles == null || groupFiles.length == 0) {\n groups.clear();\n return;\n }\n groups.clear();\n int numGrou...
"public void handleSelection(ControlSelectionEvent event) {\n handleValidatedValue(event);\n notifyValidValueSet(event.getControlDescriptor(), event.getSelectionData());\n}\n"
"public void componentResized(ComponentEvent e) {\n adjustSize();\n}\n"
"private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {\n accepted = false;\n setVisible(false);\n}\n"
"protected void onHandleIntent(Intent i) {\n Log.i(TAG, \"String_Node_Str\");\n if (i.hasExtra(PERIODIC_BACKGROUND_PROCESSING_REQUEST)) {\n processTasks();\n } else if (i.hasExtra(UI_REQUEST)) {\n String uiRequest = i.getStringExtra(UI_REQUEST);\n TaskController taskController = new TaskCo...
"public void scheduleTask() {\n if (status != PetState.Despawned && getOwner().isOnline()) {\n if (skills.getSkills().size() > 0) {\n for (MyPetGenericSkill skill : skills.getSkills()) {\n skill.schedule();\n }\n }\n if (status == PetState.Dead) {\n ...
"private void updateCaptures(int index, long cycles) {\n int low = 0;\n int hi = noCompare;\n if (index != -1) {\n low = index;\n hi = index + 1;\n }\n for (int i = 0, n = hi; i < n; i++) {\n int divisor = 1;\n int frqClk = 1;\n if (clockSource == SRC_SMCLK) {\n ...
"private void doDownloadFile(UserRequest ureq) {\n VFSContainer container = getFileContainer();\n VFSItem item = container.resolve(checkbox.getFilename());\n if (item instanceof VFSLeaf) {\n VFSMediaResource rsrc = new VFSMediaResource((VFSLeaf) item);\n rsrc.setDownloadable(true);\n ureq....
"public byte[] toBinary() throws IOException {\n SharedStreetsProto.SharedStreetsIntersection.Builder intersection = SharedStreetsProto.SharedStreetsIntersection.newBuilder();\n intersection.setId(this.getId());\n intersection.setNodeId(this.osmNodeId);\n intersection.setLon((float) this.point.getX());\n ...
"public static void main(String[] args) throws Exception {\n Logging.setLoggingDefaults(Level.WARN);\n CommandLineParser parser = new PosixParser();\n Options options = createCommandLineOptions();\n String deviceType = null;\n String port = null;\n Map<String, String> configuration = newHashMap();\n ...
"public boolean execute(ICommandSender sender, String[] args) throws Exception {\n if (args.length < 2 && args.length >= 3) {\n throw new BadUsageException(getUsage());\n }\n if (args[1].length() > 16 || !validUserPattern.matcher(args[1]).matches()) {\n throw new IllegalArgumentException(C(\"Stri...
"public void onViewCreated(View view, Bundle savedInstanceState) {\n Uri uri = getArguments().getParcelable(EXTRA_URI);\n GLSImporter importer = new GLSImporter();\n importer.totalObservable().subscribe(total -> {\n if (getActivity() != null)\n getActivity().runOnUiThread(() -> {\n ...
"public String getTicketValue() {\n return (ticket == null) ? \"String_Node_Str\" : ticket.getTicketValue();\n}\n"
"private void writeFile(String contents, String filePath) {\n try {\n fos = new FileOutputStream(filePath, false);\n fos.write(contents.getBytes());\n fos.close();\n } catch (IOException ioe) {\n Ajde.getDefault().getErrorHandler().handleError(\"String_Node_Str\" + filePath, ioe);\n ...
"public void getComponent(Composite parent) {\n init();\n cmpContent = new Composite(parent, SWT.NONE);\n {\n GridLayout glContent = new GridLayout(2, false);\n cmpContent.setLayout(glContent);\n GridData gd = new GridData(GridData.FILL_BOTH);\n cmpContent.setLayoutData(gd);\n }\...
"public void populateInputs(String line, boolean lenient) throws CommandLineParserException {\n CommandLine commandLine = getParser().parse(line, lenient);\n this.commandLineUtil.populateUIInputs(commandLine, inputs);\n}\n"
"public List<WorkflowModel> findAllWorkflowModels(String pWorkspaceId) {\n TypedQuery<WorkflowModel> query = em.createQuery(\"String_Node_Str\", WorkflowModel.class);\n return query.setParameter(\"String_Node_Str\", pWorkspaceId).getResultList();\n}\n"
"private static void functionString(ASTNode root, StringBuilder buf) {\n if (findNodeByPath(root, KW_CASE) != null) {\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) root.getChild(1), buf);\n ArrayList<Node> caseChildren = root.getChildren();\n int from = 2;\n int nchi...
"public LoopBound dfaLoopBound(BasicBlock headOfLoopBlock, ExecutionContext eCtx, LoopBound annotatedBound) {\n LoopBounds lbAnalysis = project.getDfaLoopBounds();\n if (lbAnalysis == null)\n return annotatedBound;\n MethodInfo methodInfo = headOfLoopBlock.getMethodInfo();\n int dfaUpperBound;\n t...
"private static boolean containsCalculatedMember(Member[] members) {\n for (int i = 0; i < members.length; i++) {\n if (members[i].isCalculated()) {\n return true;\n }\n }\n return false;\n}\n"
"protected String getLoginURL() throws XPathExpressionException {\n return UrlGenerationUtil.getLoginURL(publisherContext.getInstance());\n}\n"
"public URI fromString(String header) {\n try {\n return new URI(header);\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + header + \"String_Node_Str\", e);\n }\n}\n"
"public void testPreLaunchAsyncWithDebugUserAborts() throws Exception {\n ILaunchConfiguration configuration = mock(ILaunchConfiguration.class);\n String mode = ILaunchManager.RUN_MODE;\n IProgressMonitor monitor = mock(IProgressMonitor.class);\n RunTestsView runTestsView = mock(RunTestsView.class);\n IP...
"private void updateVertices() {\n clearVertices();\n final int bandPower = 6;\n final int bandPoints = (int) Math.pow(2, bandPower);\n final int bandMask = bandPoints - 2;\n final int sectionsInBand = (bandPoints / 2) - 1;\n final int totalPoints = sectionsInBand * bandPoints;\n final float sectio...
"public boolean handle(Object receive) throws Exception {\n if (receive instanceof HttpResponse) {\n HttpResponse response = (HttpResponse) receive;\n if (NettyUtil.isSuccessful(response.getStatus())) {\n Location location = to(response);\n if (location != null) {\n ...
"public void run(HttpResponse<JsonNode> response) {\n try {\n JSONObject respObject = response.getBody().getObject();\n if (respObject.has(\"String_Node_Str\") && respObject.getString(\"String_Node_Str\").equals(THING_TYPE_ACCOUNT)) {\n Topic account = parseAccount(respObject, thingTypes, tm...
"public void onCreate(Bundle savedInstanceState) {\n if (enableLog)\n Log.d(TAG, \"String_Node_Str\");\n super.onCreate(savedInstanceState);\n setContentView(R.layout.punch_pair_editor);\n Spinner taskSpinnerIn = (Spinner) findViewById(R.id.taskSpinnerIn);\n Spinner taskSpinnerOut = (Spinner) find...
"protected RestResult handleRequest(RestRequest restRequest) {\n RestResult result = null;\n if (restRequest != null) {\n RestOperation operation = restRequest.getOperation();\n Filter filter = restRequest.getFilter();\n Object item = restRequest.getContent();\n Uri uri = filter.buildU...
"public void initialiseClassView() throws Exception {\n list = new OWLFrameList2<OWLClass>(getOWLEditorKit(), new ButtonList(getOWLEditorKit()));\n setLayout(new BorderLayout());\n JScrollPane dlLearner = new JScrollPane(list);\n add(dlLearner);\n}\n"
"public int runMainWithExitCode(BuildId buildId, Path projectRoot, Optional<NGContext> context, ImmutableMap<String, String> clientEnvironment, String... args) throws IOException, InterruptedException {\n Verbosity verbosity = VerbosityParser.parse(args);\n Optional<String> color;\n if (context.isPresent() && ...
"public long getSeekOffset() {\n return (long) (seekOffset * playbackSpeed);\n}\n"
"private <T, E> T getResponse(final HttpResponse response, final Class<T> responseClass, final Class<E> dependentClass) {\n T obj = null;\n try {\n LOGGER.info(\"String_Node_Str\" + response.getStatusLine().getStatusCode());\n if (response.getStatusLine().getStatusCode() != HttpStatus.NO_CONTENT.val...
"private void _commitSave(boolean isNew, String id, ArrayList<String> parentsMaintainOldVersion, String newVersionName) throws Exception {\n String newName = _attributesListPanel.getModelName();\n _modelToSave.setName(newName);\n _updateDisplayedModel();\n if (isNew || id == null) {\n if (_modelToSav...
"public void run() {\n fireLabelProviderChanged(new LabelProviderChangedEvent(ProblemLabelDecorator.this, updateElements));\n}\n"
"private void redistributeGlobalBuffers() {\n final int totalNumberOfBuffers = GlobalBufferPool.getInstance().getTotalNumberOfBuffers();\n synchronized (this.taskMap) {\n if (this.taskMap.isEmpty()) {\n return;\n }\n final int numberOfTasks = this.taskMap.size() + (this.multicastEn...
"public void selectMenuItem(String namePath, final String operator) {\n String[] menuItems = MenuUtilBase.splitPath(namePath);\n if (menuItems.length == 0) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError());\n }\n IMenuItemComponent item = navigateToMenuItem(g...
"private Bitmap doParse(NetworkResponse response) {\n byte[] data = response.data;\n BitmapFactory.Options decodeOptions = new BitmapFactory.Options();\n Bitmap bitmap = null;\n if (mMaxWidth == 0 && mMaxHeight == 0) {\n decodeOptions.inPreferredConfig = mDecodeConfig;\n bitmap = BitmapFactory...
"public void onClick(View v) {\n resetOptStatus();\n}\n"
"String getPassword() {\n String password = null;\n try {\n database = myDatabaseHelper.getReadableDatabase();\n String[] columns = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n System.out.println(\"String_Node_Str\");\n cursor = database.query(\"String_Node_Str\", colum...
"public final void transformation(AST _t) throws RecognitionException, PtalonRuntimeException {\n PtalonAST transformation_AST_in = (_t == ASTNULL) ? null : (PtalonAST) _t;\n returnAST = null;\n ASTPair currentAST = new ASTPair();\n PtalonAST transformation_AST = null;\n boolean emptyStart = true;\n A...
"public void testTagsInOperations(String type) {\n ValidatableResponse vr = callEndpoint(type);\n vr.body(\"String_Node_Str\", containsInAnyOrder(\"String_Node_Str\", \"String_Node_Str\"));\n vr.body(\"String_Node_Str\", containsInAnyOrder(\"String_Node_Str\"));\n}\n"
"private boolean isSharedScale() {\n return rtc.getSharedScale() != null && rtc.getSharedScale().isShared();\n}\n"
"public void moveMember(final Node source, LibraryNode destination) {\n if (source == null || source.getModelObject() == null || source.getTLModelObject() == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (destination == null)\n throw new IllegalArgumentException(\"String_Node...
"public static TextFileChange calculateTextChanges(IFile file, Collection<PathPair> pathPairs) throws Exception {\n File nativeFile = ModelUtil.getLocation(file).makeAbsolute().toFile();\n if (nativeFile == null || !nativeFile.exists())\n throw new Exception(getString(\"String_Node_Str\", file.getFullPath(...
"public boolean Kick(User user) {\n if (isOwner(user)) {\n return false;\n }\n if (isMod(user)) {\n return false;\n }\n if (isOnline(user) != null) {\n user.leaveChannel();\n user.sendMessage(ChatColor.RED + \"String_Node_Str\");\n return true;\n } else {\n re...
"public void setStreamVolume(int streamType, int index, int flags) {\n ensureValidStreamType(streamType);\n syncRingerAndNotificationStreamVolume(streamType, index, false);\n setStreamVolumeInt(streamType, index, false, true);\n mVolumePanel.postVolumeChanged(streamType, flags);\n sendVolumeUpdate(stream...
"private Optional<String> determineCollectionFromId(final Optional<String> id) {\n return id.map(i -> MetadataUtils.determineCollectionFromId(i));\n}\n"
"public void loadSource() throws IOException {\n if (_source == null) {\n _source = AbsentTreeNode.instance;\n String fileName = fullName('.');\n if (SearchPath.systemClassSet.contains(fileName) || SearchPath.ptolemyCoreClassSet.contains(fileName)) {\n if (StaticResolution.traceLoadin...
"private static boolean isValidFileStore(String path) {\n File store = new File(path);\n if (!store.isDirectory()) {\n return false;\n }\n for (String f : store.list()) {\n if (\"String_Node_Str\".equals(f)) {\n return true;\n }\n }\n return false;\n}\n"
"public boolean hasPermission(Player player, String permission) {\n return nation.getPermissionsResolver().hasPermission(player, permission);\n}\n"
"public Message getFilteredMessage(final Properties props) {\n if (pattern != null) {\n final Message m = MessageFactory.getMessage();\n String text = this.getMessage().getPayload().toString();\n text = Utils.filterProperties(text, getMatcher(), new DefaultPropertyGetter(props));\n m.setP...
"public void destroyChatSession(UUID chatId) {\n if (chatId != null) {\n ChatSession chatSession = chatSessions.get(chatId);\n if (chatSession != null) {\n synchronized (chatSession) {\n if (chatSessions.containsKey(chatId)) {\n chatSessions.remove(chatId);\...
"public void testMultiNameClass() {\n test(\"String_Node_Str\", \"String_Node_Str\");\n test(\"String_Node_Str\", \"String_Node_Str\");\n}\n"
"static PasteBufferImpl create() {\n PasteBufferImpl pasteBuffer;\n if (UserAgent.isSafari() || QuirksConstants.FIREFOX_GREATER_THAN_VER_15) {\n pasteBuffer = new PasteBufferImplSafariAndNewFirefox();\n } else if (UserAgent.isFirefox() && !QuirksConstants.SANITIZES_PASTED_CONTENT) {\n pasteBuffer...
"public static void startDiscovery(InetAddress addr) throws IOException {\n INSTANCE.doStartDiscovery(addr);\n}\n"
"public static String[] getAggFunParameters(SeriesDefinition orthSD, SeriesDefinition baseSD, Query orthQuery) {\n if (baseSD.getGrouping() != null && baseSD.getGrouping().isEnabled()) {\n SeriesGrouping grouping = orthSD.getGrouping();\n if (grouping != null && grouping.isEnabled()) {\n ret...
"public void simulationTest() {\n Simulation s = new Simulation();\n ELDescriptionTree tree1 = new ELDescriptionTree(rs);\n ELDescriptionTree tree2 = new ELDescriptionTree(rs);\n ELDescriptionNode t1 = new ELDescriptionNode(tree1);\n ELDescriptionNode t2 = new ELDescriptionNode(tree2);\n TreeTuple tup...
"public X509Certificate[] getAcceptedIssuers() {\n synchronized (mIssuersLock) {\n if (mIssuers == null) {\n Set<TrustAnchor> anchors = mNetworkSecurityConfig.getTrustAnchors();\n X509Certificate[] issuers = new X509Certificate[anchors.size()];\n int i = 0;\n for (T...
"public void testLoadMultipleXmlFilesViaSamePackage() {\n outputResolver = generateSchema(new Class[] { Employee.class, Address.class }, CONTEXT_PATH, PATH, 1);\n String src = PATH + \"String_Node_Str\";\n String result = validateAgainstSchema(src, null, outputResolver);\n assertTrue(\"String_Node_Str\", re...
"private void execute(Player player, ParsedCommand cmd) throws SMSException {\n if (cmd.isRestricted()) {\n cmd.setStatus(ReturnStatus.CMD_OK);\n return;\n Cost.chargePlayer(player, cmd.getCosts());\n if (cmd.getCommand() == null || cmd.getCommand().isEmpty())\n return;\n StringBuilder ...
"public void feedTheNinja() throws Exception {\n Tortoise michelangelo = new Tortoise();\n michelangelo.likesTopping(Topping.Pepperoni);\n Pizza pizza = new Pizza();\n pizza.addTopping(_________);\n boolean likedIt = michealangelo.eatPizza(pizza);\n Assert.assertTrue(\"String_Node_Str\", likedIt);\n}\...
"protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) {\n super.onInitialLineParsed(httpHeader, ctx);\n if (httpHeader.isSkipRemainder()) {\n return;\n }\n final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection());\n final int statu...
"public void start() {\n startupHealthCheck();\n validateConfiguration();\n startDatabase();\n startWebServer();\n try {\n startRoundRobinDB();\n startOsgiContainer();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
"public Object execute(ExecutionEvent event) throws ExecutionException {\n ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();\n if (manager != null) {\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\n IProject productProject = root.getProject(\"String_Node_Str\")...
"public void newIndex(Comparable newValue, QueryableEntry record) {\n takeWriteLock();\n try {\n Data indexKey = record.getIndexKey();\n ConcurrentMap<Data, QueryableEntry> records = mapRecords.get(newValue);\n if (records == null) {\n records = new ConcurrentHashMap<Data, Queryabl...
"private void goToDiggablePosition() {\n super.getGrid().setMarked(movable.getPos(), false);\n ShortPoint2D diggablePos = getDiggablePosition();\n if (diggablePos != null) {\n if (super.goToPos(diggablePos)) {\n state = EDiggerState.GOING_TO_POS;\n super.getGrid().setMarked(diggabl...
"protected void requestProgressUpdate() {\n if (SearchGeocacheService.getInstance() != null && !SearchGeocacheService.getInstance().isCanceled()) {\n SearchGeocacheService.getInstance().sendProgressUpdate();\n}\n"
"protected void okPressed() {\n if (form.isCallAfterFormFinish()) {\n try {\n componentService.afterFormFinish(form.getName(), form.getComponentProperties());\n } catch (Throwable e) {\n ExceptionHandler.process(e);\n }\n }\n super.okPressed();\n}\n"
"public void updateMenuEntry(final String origMenuText, final String newMenuText, final SystemTrayMenuAction newCallback) {\n SwingUtil.invokeAndWait(new Runnable() {\n\n public void run() {\n Map<String, JMenuItem> menuEntries2 = GtkSystemTray.this.menuEntries;\n synchronized (menuEntri...
"protected boolean isTileStale(Tile tile, TileBitmap bitmap) {\n if (bitmap.isExpired())\n return true;\n return cacheTimeToLive != 0 && ((bitmap.getTimestamp() + cacheTimeToLive) < System.currentTimeMillis());\n}\n"
"public boolean replaceEvent(GameEvent event, Ability source, Game game) {\n game.informPlayers(\"String_Node_Str\");\n for (UUID playerId : game.getPlayerList()) {\n Player player = game.getPlayer(playerId);\n if (player != null) {\n TargetControlledPermanent target = new TargetControlle...
"public boolean onOptionsItemSelected(MenuItem item) {\n switch(item.getItemId()) {\n case R.id.actionToggleLineValues:\n {\n for (DataSet<?> set : mChart.getData().getDataSets()) {\n if (set instanceof LineDataSet)\n set.setDrawValues(!set.i...
"public void receive(SimulcastStream simStream) {\n if (simStream == null) {\n this.state = new State(null, null);\n return;\n }\n State oldState = this.state;\n SimulcastStream current = oldState.getCurrent();\n SimulcastStream next = oldState.getNext();\n if (current == simStream) {\n ...
"public static void addExperience(EntityPlayer player, PlayerInformation playerInfo, EntityLivingBase enemy) {\n int experience = 0;\n EnemyInfo enemyInfo = (EnemyInfo) enemy.getCapability(CapabilityEnemyInfo.ENEMY_INFO, null);\n if (enemyInfo != null) {\n int enemyLevel = enemyInfo.getEnemyLevel();\n ...
"public HE_Mesh createBase() {\n final HE_Mesh result = new HE_Mesh();\n if ((source == null) || (source.getNumberOfFaces() < 3)) {\n return result;\n }\n final HashMap<Long, Long> faceVertexCorrelation = new HashMap<Long, Long>();\n final Iterator<HE_Face> fItr = source.fItr();\n HE_Face f;\n ...
"private Model createModel(File pomFile) {\n FileInputStream fileInputStream = null;\n Exception ex = null;\n Model model = null;\n try {\n MavenXpp3Reader reader = new MavenXpp3Reader();\n fileInputStream = new FileInputStream(pomFile);\n model = reader.read(fileInputStream);\n ...
"public void paintContent(PaintTarget target) throws PaintException {\n super.paintContent(target);\n target.startTag(\"String_Node_Str\");\n target.addAttribute(\"String_Node_Str\", filtersVisible);\n target.addAttribute(\"String_Node_Str\", reRenderFilterFields);\n reRenderFilterFields = false;\n if...
"static public Class loadClass(Properties properties) throws ClassNotFoundException, IOException {\n String className = properties.getProperty(\"String_Node_Str\");\n if (className == null) {\n throw new IOException(\"String_Node_Str\");\n }\n Class<?> clazz = null;\n ClassLoader loader = Thread.c...
"public boolean isUnauthorized() {\n return entity != null && entity.isUnauthorized();\n}\n"
"private static Date toDateISO8601(String source) throws BirtException {\n Date resultDate = null;\n try {\n resultDate = DateFormatISO8601.parse(source, timeZone);\n return resultDate;\n } catch (ParseException e1) {\n throw new CoreException(ResourceConstants.CONVERT_FAILS, new Object[] ...
"public void execute(final CommandSender sender, final CommandArgs args) {\n float amount = 0;\n Player target = null;\n boolean self = false;\n if (0 < args.length && args.length < 2) {\n if (Utils.isPlayer(sender, true)) {\n target = (Player) sender;\n self = true;\n ...
"public void testSimpleTypeWithUnionTypes() {\n String f = \"String_Node_Str\";\n String xmlSchema = getSchema(f);\n List types = xsdHelper.define(xmlSchema);\n this.assertEquals(3, types.size());\n for (int i = 0; i < types.size(); i++) {\n Type type = (Type) types.get(i);\n if (type.getNa...
"public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, final int i) {\n if (i == VIEW_TYPES.HEADER && mHeader != null) {\n return new ViewHolder(mHeader);\n if (i == VIEW_TYPES.FIRST_VIEW && mHeader != null && mRecyclerView != null) {\n final RecyclerView.ViewHolder holder = mRecycl...
"private void doCalculate(int functionIndex) throws DataException {\n for (int i = 0; i < currentRowList.size(); i++) {\n if (!getFilterResult(currentRowList.get(i), functionIndex))\n continue;\n while (currentRowList.get(i).nextMeasures()) {\n Object[] para = getAccumulatorParame...
"private IStatus handleException(IProgressMonitor monitor, Exception e, String message) {\n monitor.done();\n System.out.println(message);\n e.printStackTrace();\n TacitFormComposite.updateStatusMessage(getViewSite(), message + e.getMessage(), IStatus.ERROR, form);\n return Status.CANCEL_STATUS;\n}\n"
"public static void initSessionAttributes() {\n Logger logger = GuiUtil.getLogger();\n if (logger.isLoggable(Level.INFO)) {\n logger.log(Level.INFO, GuiUtil.getCommonMessage(\"String_Node_Str\"));\n }\n ExternalContext externalCtx = FacesContext.getCurrentInstance().getExternalContext();\n Map<Str...
"public void visit(NodeTraversal t, Node n, Node parent) {\n if (n.isName()) {\n Var dep = jsScope.getVar(n.getString());\n if (dep == null) {\n def.unknownDependencies = true;\n } else {\n def.depends.add(dep);\n }\n }\n}\n"
"public void fetchstock(String stockName, boolean inBackground) {\n if (!inBackground)\n stockView.showLoading();\n fetchSubsciption = stockDataRepository.getStock(stockName).observeOn(AndroidSchedulers.mainThread(), true).subscribe(stock -> {\n stockView.onStockFetched(stock);\n }, throwable -> ...
"public Duration getSpeed() {\n Duration speed = Duration.valueOf(getString(\"String_Node_Str\", null));\n if (speed == null)\n speed = new Duration(((double) Settings.InteractDelayInTicks() / 20));\n return speed;\n}\n"
"protected SaveImageInBackgroundData doInBackground(SaveImageInBackgroundData... params) {\n if (params.length != 1)\n return null;\n if (isCancelled()) {\n params[0].clearImage();\n params[0].clearContext();\n return null;\n }\n Process.setThreadPriority(Process.THREAD_PRIORITY_...
"private void handleExceptions(Stack stack, List<ResourceRequestResult> failedResourceRequestResult) {\n for (ResourceRequestResult exception : failedResourceRequestResult) {\n List<Resource> resourceList = new ArrayList<>();\n LOGGER.error(\"String_Node_Str\", exception.getException().orNull().getMess...
"private List<BoundedSource<ResultOutputType>> split(long regionSize, long desiredBundleSizeBytes, byte[] startKey, byte[] stopKey) {\n Preconditions.checkState(desiredBundleSizeBytes > 0);\n int splitCount = (int) Math.ceil((double) (regionSize) / (double) (desiredBundleSizeBytes));\n if (splitCount < 2 || st...
"public void validateCustomParameters(ServiceOfferingVO serviceOffering, Map<String, String> customParameters) {\n if (customParameters.size() != 0) {\n if (serviceOffering.getCpu() == null) {\n String cpuNumber = customParameters.get(UsageEventVO.DynamicParameters.cpuNumber.name());\n i...