content
stringlengths
40
137k
"public void startStreamingTwitter() {\n if (isStreamingTwitter()) {\n System.out.println(\"String_Node_Str\");\n return;\n }\n try {\n myStream = new TwitterStreamFactory().getInstance(myTwitter.getAuthorization());\n myStream.addListener(listener);\n myStream.addConnectionL...
"protected void loadDictionaryAsync() {\n Cursor cursor = mContext.getContentResolver().query(Words.CONTENT_URI, PROJECTION, \"String_Node_Str\" + Words.LOCALE + \"String_Node_Str\" + Words.LOCALE + \"String_Node_Str\", new String[] { mLocale }, null);\n if (cursor == null)\n throw new RuntimeException(\"S...
"public void setMimeType(String type) {\n mimeType = StringUtils.notNullStr(type);\n}\n"
"public List<Choice> getUnchosen() {\n List<Choice> unchosen = new ArrayList<>();\n for (Choice choice : this) {\n if (!choice.isChosen()) {\n unchosen.add(choice);\n }\n }\n return unchosen;\n}\n"
"public void moveObject(IRepositoryViewObject objectToMove, IRepositoryNode sourceNode, IRepositoryNode targetNode, IPath basePath) {\n IPath targetPath = WorkbenchUtils.getPath(targetNode);\n try {\n IPath makeRelativeTo = Path.EMPTY;\n if (!basePath.isEmpty()) {\n makeRelativeTo = targe...
"public boolean postfire() throws IllegalActionException {\n ObjectToken objectToken = (ObjectToken) input.get(0);\n DataSource input = (DataSource) objectToken.getValue();\n if (_player != null) {\n _player.removeControllerListener(this);\n }\n try {\n _player = Manager.createRealizedPlaye...
"private void fetchStockMedia(String searchQuery, int page) {\n if ((mIsFetching && page != 1) || !NetworkUtils.checkConnection(this)) {\n return;\n }\n if (TextUtils.isEmpty(searchQuery)) {\n mAdapter.clear();\n return;\n }\n if (page == 1) {\n mAdapter.clear();\n }\n s...
"private void transformiereDaten(List<GenericObjectHashMap> tablist) throws RemoteException {\n tablist.clear();\n int fehler = 0;\n for (GenericObjectHashMap source : quellDaten) {\n if (!source.getAttribute(\"String_Node_Str\").toString().isEmpty()) {\n continue;\n }\n Generic...
"private int spawnChildJVMForTest(Configuration.ConfigurationTest test, boolean jsoar) {\n List<String> arguments = new ArrayList<String>();\n URL baseURL = PerformanceTesting.class.getProtectionDomain().getCodeSource().getLocation();\n String jarPath = null;\n try {\n jarPath = new File(baseURL.toUR...
"public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n final ProgressStatusEventSet other = (ProgressStatusEventSet) obj;\n if ((this.totalStepCount == null) ? (other.totalStepCount != null) : !this.totalS...
"public void launch() {\n String command = format(\"String_Node_Str\", getMonitPidFile(), expandedInstallDir, remoteControlFilePath, getMonitPidFile());\n newScript(MutableMap.of(\"String_Node_Str\", false), LAUNCHING).updateTaskAndFailOnNonZeroResultCode().body.append(command).execute();\n}\n"
"protected void createFormContent(IManagedForm managedForm) {\n super.createFormContent(managedForm);\n form = managedForm.getForm();\n form.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n this.metadataSection.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n this.metadataSect...
"public ECPoint twicePlus(ECPoint b) {\n if (this.isInfinity()) {\n return b;\n }\n if (b.isInfinity()) {\n return twice();\n }\n ECFieldElement Y1 = this.y;\n if (Y1.isZero()) {\n return b;\n }\n int coord = curve.getCoordinateSystem();\n switch(coord) {\n case EC...
"protected void parse(String filename) {\n Pair<XmlHandler, HashMap<String, List<ComponentInfo<Adapter>>>> result = parse2(filename);\n if (result == null) {\n s_logger.info(\"String_Node_Str\" + filename);\n return;\n }\n XmlHandler handler = result.first();\n HashMap<String, List<Componen...
"public void run() {\n try {\n while (!Thread.interrupted()) {\n Random rnd = new Random();\n rnd.setSeed(System.currentTimeMillis());\n int due = rnd.nextInt(10);\n try {\n Thread.sleep(due);\n } catch (InterruptedException ex) {\n ...
"public Profile getUserProfile() throws Exception {\n if (userProfile == null && accessGrant != null) {\n userProfile = getProfile();\n }\n return userProfile;\n}\n"
"private int writeResultObject(Map valueMap) throws DataException, IOException {\n ByteArrayOutputStream tempBaos = new ByteArrayOutputStream();\n BufferedOutputStream tempBos = new BufferedOutputStream(tempBaos);\n DataOutputStream tempDos = new DataOutputStream(tempBos);\n for (IBinding binding : bindings...
"public void init(FilterConfig filterConfig) throws ServletException {\n if (filterConfig.getInitParameter(INIT_PARAM_PREFIX) != null) {\n simonPrefix = filterConfig.getInitParameter(INIT_PARAM_PREFIX);\n }\n String publishManager = filterConfig.getInitParameter(INIT_PARAM_PUBLISH_MANAGER);\n if (pub...
"public static void convertTypeRefComponent(org.hl7.fhir.r4.model.ElementDefinition.TypeRefComponent src, List<org.hl7.fhir.dstu2016may.model.ElementDefinition.TypeRefComponent> list) throws FHIRException {\n if (src == null)\n return;\n org.hl7.fhir.dstu2016may.model.ElementDefinition.TypeRefComponent tgt...
"public int getCellPositionInColumn(Module module, Cell target) {\n int pos = target.getColumn(module);\n if (pos > 0)\n return pos;\n pos = 1;\n TableRow row = (TableRow) target.getContainer();\n List<DesignElement> list = row.getContentsSlot();\n for (Iterator<DesignElement> iter = list.itera...
"public void mouseClicked(MouseEvent e) {\n if (e.getSource() instanceof CardPanel) {\n this.hideDialog();\n }\n}\n"
"public ImplementationArtifact parse(Node node, ParsingContextExecution context) {\n if (node instanceof ScalarNode) {\n String artifactReference = ((ScalarNode) node).getValue();\n Path artifactPath = Paths.get(artifactReference);\n String extension = Files.getFileExtension(artifactPath.getFile...
"public String getConnectOptions() {\n ConnectOptionsContext context = serviceDefaultsContext.getConnectOptionsContext();\n JSONObject jsonOptions = new JSONObject();\n try {\n if (context != null) {\n Map<String, Object> connectOptions = context.asOptionsMap();\n String[] sslCiphe...
"public static ColumnsInfo createTable(ITableContent table, int width, int dpi) {\n int tableWidth = getElementWidth(table, width, dpi);\n int columnCount = table.getColumnCount();\n if (columnCount == 0) {\n return null;\n }\n int[] columns = new int[columnCount];\n int unassignedCount = 0;\n ...
"public void setSessionKey(String sessionKey) {\n this.metadata.put(sessionKeyField, sessionKey);\n}\n"
"private static AbstractBuild getFirstUpstreamBuild(AbstractProject<?, ?> project, AbstractProject<?, ?> first) {\n RunList<? extends AbstractBuild> builds = project.getBuilds();\n for (AbstractBuild build : builds) {\n AbstractBuild upstream = getFirstUpstreamBuild(build, first);\n if (upstream != ...
"public Map<String, Object> listCapabilities(ListCapabilitiesCmd cmd) {\n Map<String, Object> capabilities = new HashMap<String, Object>();\n Account caller = CallContext.current().getCallingAccount();\n boolean securityGroupsEnabled = false;\n boolean elasticLoadBalancerEnabled = false;\n boolean KVMSna...
"public void fire() throws IllegalActionException {\n super.fire();\n prompt.update();\n shell.mainPrompt = ((StringToken) prompt.getToken()).stringValue();\n if ((input.numberOfSources() > 0) && input.hasToken(0)) {\n value = ((StringToken) input.get(0)).stringValue();\n }\n shell.setEditable(...
"public void actionPerformed(final ActionEvent event) {\n final String[] compatibleProductNames = getCompatibleProducts(product);\n if (compatibleProductNames.length == 0) {\n Dialogs.showError(\"String_Node_Str\");\n return;\n }\n final StringSelectorDialog dlg = new StringSelectorDialog(\"St...
"protected void execute(String script) throws Exception {\n Statement stmt = null;\n String allSQL = scripts.get(script);\n if (allSQL == null) {\n try {\n log.info(\"String_Node_Str\", script);\n File file = new File(getClass().getResource(script).toURI());\n allSQL = F...
"protected void onPostExecute(Boolean isSuccess) {\n customProgressDialog.dismiss();\n if (isSuccess) {\n if (!userDeletedSelf) {\n CustomSnackbar.show(activity, R.string.msg_share_updated);\n FetchShareListTask.launch(SharingActivity.evercamCamera.getCameraId(), activity);\n }...
"public List<Server> getFilteredListOfServers(List<Server> servers) {\n List<Server> output = super.getFilteredListOfServers(servers);\n if (this.zone != null && output.size() == servers.size()) {\n List<Server> local = new ArrayList<>();\n for (Server server : output) {\n if (this.zone.e...
"private void showStatsActivity(int remoteBlogId) {\n if (getActivity() == null || isRemoving()) {\n return;\n if (WordPress.getCurrentRemoteBlogId() != remoteBlogId) {\n int localBlogId = WordPress.wpDB.getLocalTableBlogIdForRemoteBlogId(remoteBlogId);\n WordPress.setCurrentBlog(localBlogId)...
"public void logAndIncrement(Logger logger, Level priority, String message) {\n if (guard.checkAndIncrement()) {\n logger.log(level, message, thr);\n }\n}\n"
"public void writeExpression(MethodWriter writer) throws BytecodeException {\n dyvil.tools.asm.Label elseStart = new dyvil.tools.asm.Label();\n dyvil.tools.asm.Label elseEnd = new dyvil.tools.asm.Label();\n Object commonFrameType = this.commonType.getFrameType();\n this.condition.writeInvJump(writer, elseSt...
"public void initialize() throws PermissionBackendException {\n Plugin plugin = PermissionsEx.getPlugin();\n String permissionFilename = config.getString(\"String_Node_Str\");\n if (permissionFilename == null) {\n permissionFilename = \"String_Node_Str\";\n config.set(\"String_Node_Str\", \"Strin...
"public void run() {\n try {\n while (http11 && !stopped) {\n handleRequest(mySocket);\n if (queue) {\n mySocket.setSoTimeout(MAX_POLL);\n if (unqueue)\n queue = false;\n handleRequest(mySocket);\n }\n ...
"private void checkAuthors() {\n String[] authors = getText().split(\"String_Node_Str\");\n setBackground(Color.WHITE);\n for (String author : authors) {\n try {\n if (!checkAuthor(author.trim())) {\n setBackground(Color.YELLOW);\n }\n } catch (SQLException ex...
"public static MapInterfaceConnector openTestWindow(IGraphicsGrid map) {\n ImageProvider.getInstance().startPreloading();\n JOGLPanel content = new JOGLPanel(new SoundPlayer() {\n public void playSound(int sound, float lvolume, float rvolume) {\n }\n public void setSoundDataRetriever(ISoundDa...
"List<FlowScope> branchedFlowThrough(Node source, FlowScope input) {\n FlowScope output = flowThrough(source, input);\n Node condition = null;\n FlowScope conditionFlowScope = null;\n BooleanOutcomePair conditionOutcomes = null;\n List<DiGraphEdge<Node, Branch>> branchEdges = getCfg().getOutEdges(source)...
"public OdooActivity parent() {\n return (OdooActivity) mContext;\n}\n"
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.encrypt);\n mSource = (ViewFlipper) findViewById(R.id.source);\n mSourceLabel = (TextView) findViewById(R.id.sourceLabel);\n mSourcePrevious = (ImageView) findViewById(R.id.sourcePrevious);\...
"protected static HttpHandler buildSecurityHandlerChain(final AccessManager accessManager, final IdentityManager identityManager, final List<AuthenticationMechanism> mechanisms) {\n HttpHandler handler;\n if (accessManager == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n ha...
"public synchronized MediaItem getMediaItem(String path) {\n Cursor cursor;\n MediaItem item = null;\n Bitmap thumbnail = null;\n byte[] blob;\n cursor = mDb.query(MEDIA_TABLE_NAME, new String[] { MEDIA_NAME, MEDIA_PATH, MEDIA_TIME, MEDIA_LENGTH, MEDIA_TYPE, MEDIA_WIDTH, MEDIA_HEIGHT, MEDIA_THUMBNAIL }, ...
"private void fillDataStore(String text) {\n dataStore.clear();\n int enIndex = text.indexOf(\"String_Node_Str\");\n int frIndex = text.indexOf(\"String_Node_Str\");\n if (enIndex >= 0 && frIndex >= 0) {\n if (enIndex < frIndex) {\n String enDesc = text.substring(enIndex + 4, frIndex - 1);...
"public boolean onMessage(int src, int destination, int target, int flags, Object object) {\n this.source = src;\n List<Object> dests = destinationMessages.get(destination);\n int size = dests.size();\n if (size > highWaterMark) {\n return false;\n }\n dests.add(object);\n if (dests.size() >...
"public void execute(Tuple tuple) {\n JSONObject message = null;\n try {\n LOG.trace(\"String_Node_Str\" + message);\n message = (JSONObject) tuple.getValueByField(\"String_Node_Str\");\n if (message == null || message.isEmpty())\n throw new Exception(\"String_Node_Str\");\n ...
"private void doCrawlLoop() throws IOFailure {\n String errorMessage = \"String_Node_Str\";\n long lastNonZeroActiveQueuesTime = System.currentTimeMillis();\n long lastTimeReceivedData = System.currentTimeMillis();\n boolean crawlIsEnded = false;\n try {\n crawlIsEnded = heritrixController.crawlIs...
"private void loadMTHFile() throws IOException {\n URL url = UTILITIES.getResourceURL(UTILITIES.getFullPath(new String[] { pathMethod.toString(), \"String_Node_Str\" }));\n if (url == null) {\n logger.severe(\"String_Node_Str\");\n return;\n } else {\n mth = UTILITIES.parseXmlFile(url.open...
"public void onManagementNodeLeft(List<ManagementServerHostVO> nodeList, long selfNodeId) {\n for (ManagementServerHostVO msHost : nodeList) {\n Transaction txn = Transaction.open(Transaction.CLOUD_DB);\n try {\n txn.start();\n List<SyncQueueItemVO> items = _queueMgr.getActiveQueu...
"public int lowY() {\n return lowY;\n}\n"
"public org.hl7.fhir.dstu2.model.Practitioner.PractitionerPractitionerRoleComponent convertPractitionerPractitionerRoleComponent(org.hl7.fhir.dstu3.model.Practitioner.PractitionerRoleComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Practiti...
"private static void generateBuildInfo(JobInfo jobInfo, IProgressMonitor progressMonitor, boolean isMainJob, IProcess currentProcess, String currentJobName, IProcessor processor) throws ProcessorException {\n if (isMainJob) {\n progressMonitor.subTask(Messages.getString(\"String_Node_Str\") + currentJobName);...
"private int getVisualTypeForHeight(float viewHeight) {\n boolean noExpandedChild = mExpandedChild == null;\n if (!noExpandedChild && viewHeight == mExpandedChild.getHeight()) {\n return VISIBLE_TYPE_EXPANDED;\n }\n if (!mUserExpanding && mIsChildInGroup && !isGroupExpanded()) {\n return VISIB...
"public ServiceOffering updateServiceOffering(UpdateServiceOfferingCmd cmd) {\n String displayText = cmd.getDisplayText();\n Long id = cmd.getId();\n String name = cmd.getServiceOfferingName();\n Boolean ha = cmd.getOfferHa();\n Long userId = UserContext.current().getCallerUserId();\n Long domainId = ...
"public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {\n String errorMsg = \"String_Node_Str\";\n char[] pwd = \"String_Node_Str\".toCharArray();\n try {\n File file = new File(\"String_Node_Str\");\n if (file.isFile() == false) {\n char...
"private void browse(final URI uri) {\n try {\n this.desktop.browse(uri);\n } catch (final IOException e) {\n throw new RuntimeException(e);\n }\n}\n"
"private boolean hasRoomWalls(Terrain terrain) {\n ArtResource ceilingResource = getCeilingResource(terrain);\n if (ceilingResource == null && terrain.getCompleteResource() == null) {\n Room room = kwdFile.getRoomByTerrain(terrain.getTerrainId());\n return room.getFlags().contains(Room.RoomFlag.HAS_...
"protected Data serializeCacheConfig(Object response) {\n if (null == response) {\n return nodeEngine.toData(response);\n }\n Data responseData = null;\n if (BuildInfo.UNKNOWN_HAZELCAST_VERSION == getClientVersion()) {\n boolean compatibilityEnabled = nodeEngine.getProperties().getBoolean(Grou...
"private static LibSVMModel trainSVMModel(svm_problem svmProb, double[] target, LibSVMParameters params) {\n if (!params.isVerbose()) {\n setNoOutput();\n }\n double[] prediction = new double[target.length];\n svm_parameter svmParams = params.getParams();\n double score = 0, bestScore = 0, bestC =...
"private ParametersParameterAccessor prepareAccessor(final Object[] originalParameters, final PartTree partTree) {\n if (!this.isRearrangeKnown) {\n this.prepareRearrange(partTree, this.queryMethod.getParameters().getBindableParameters());\n this.isRearrangeKnown = true;\n }\n Object[] parameters...
"private String getCompletedSingleSelect(Indicator indicator, String sqlGenericExpression, String colName, String table, List<String> whereExpression, String range) throws ParseException {\n String completedRange = replaceVariables(range, colName, table);\n String rangeColumn = \"String_Node_Str\" + completedRang...
"private Type resolveNameFromClass(Class owner, String name, Type[] args) {\n if (owner.isArray()) {\n if (name.equals(\"String_Node_Str\") && args == null)\n return Type.INT;\n else if (name.equals(\"String_Node_Str\") && args != null && args.length == 0)\n return Type.createType...
"public void run() {\n try {\n lastCleanup = Clock.currentTimeMillis();\n for (Map.Entry<K, NearCacheRecord> entry : cache.entrySet()) {\n if (entry.getValue().isExpired(maxIdleMillis, timeToLiveMillis)) {\n cache.remove(entry.getKey());\n }\n }\n } finall...
"public void fire() throws IllegalActionException {\n List<TimedEvent> eventsToFire = null;\n TimedEvent event = null;\n boolean iterate = true;\n while (iterate) {\n if (_stopRequested)\n return;\n _transferAllInputs();\n if (_eventsInExecution.size() > 0) {\n Tim...
"public void addChild(TestStructure testStructureChild, TranslationService translationService) throws SystemException {\n SVNClientManager clientManager = getSVNClientManager(testStructureChild.getRootElement());\n SVNWCClient wcClient = clientManager.getWCClient();\n File file = getFile(testStructureChild);\n...
"protected List<ProviderInfo<? extends Object>> prepareProviders(boolean custom, boolean busGlobal, Object[] providers, ProviderInfo<Application> application) {\n List<ProviderInfo<? extends Object>> theProviders = new ArrayList<ProviderInfo<? extends Object>>(providers.length);\n Map<String, Object> beanCustomiz...
"public void invCheck(Player player) {\n if (!parent.force) {\n Boolean playerCheck = parent.status.get(player.getName());\n if (playerCheck == null || playerCheck == false) {\n return;\n }\n }\n List<ItemStack> inv = Arrays.asList(player.getInventory().getContents());\n if (...
"protected Boolean doInBackground(Void... params) {\n AllDataAdapter allDataAdapter = (AllDataAdapter) getListAdapter();\n if (allDataAdapter == null || allDataAdapter.getCursor() == null)\n return false;\n Cursor data = allDataAdapter.getCursor();\n try {\n CSVWriter csvWriter = new CSVWriter...
"DetailledItem parseResult(String id, Document doc) throws IOException, OpacErrorException {\n List<NameValuePair> nvpairs;\n DetailedItem res = new DetailedItem();\n if (doc.select(\"String_Node_Str\").size() == 1) {\n String cover_url = doc.select(\"String_Node_Str\").first().absUrl(\"String_Node_Str\...
"public static int run(Path signalData, Path output, Float regularizationFactor, Boolean addIntercept, Boolean regularizeIntercept, Integer iterationsMaximum, Configuration baseConf) throws IOException, ClassNotFoundException, InterruptedException {\n Configuration conf = new Configuration(baseConf);\n float this...
"public void setCanSwim(boolean bool) {\n nav.e(bool);\n}\n"
"private void sendResetPasswordLink(HttpServerRequest request, String email, String resetCode, final Handler<Boolean> handler) {\n if (email == null || resetCode == null || email.trim().isEmpty() || resetCode.trim().isEmpty()) {\n handler.handle(false);\n return;\n }\n JsonObject json = new JsonO...
"private void setProcessName(String processName) {\n if (processName == null) {\n return;\n }\n if (this.processName == null) {\n processNameLock.lock();\n try {\n this.processName = processName;\n synchronized (loggers) {\n for (String oldLoggerName : ...
"public void update() {\n Vector2f mousePos = new Vector2f(Mouse.getX(), Display.getHeight() - Mouse.getY());\n if (intersects(mousePos)) {\n for (int i = (_items.size() - 1); i >= 0; i--) {\n UIListItem item = _items.get(i);\n if (item.isVisible()) {\n if (item.interse...
"public static void register(MetricsRegistry metricsRegistry) {\n checkNotNull(metricsRegistry, \"String_Node_Str\");\n OperatingSystemMXBean mxBean = ManagementFactory.getOperatingSystemMXBean();\n registerMethod(metricsRegistry, mxBean, \"String_Node_Str\", \"String_Node_Str\");\n registerMethod(metricsRe...
"public void undo() {\n List<IContext> removeList = new ArrayList<IContext>();\n for (IContext con : manager.getListContext()) {\n if (nameSet.contains(con.getName())) {\n removeList.add(con);\n }\n }\n manager.getListContext().removeAll(removeList);\n for (ContextParameterType d...
"private ObjectName registerWebModuleAndItsComponents(final ObjectName parentMBean, final MetadataImpl meta, final com.sun.enterprise.config.serverbeans.Application appConfig, final WebBundleDescriptor webBundleDescriptor) {\n final String xmlDesc = getDeploymentDescriptor(webBundleDescriptor);\n if (xmlDesc != n...
"public void testRedirect() {\n debug(\"String_Node_Str\");\n Connection c = new Connection(\"String_Node_Str\", PORT, new Properties(), new EmptyResponder());\n try {\n c.initialize();\n fail(\"String_Node_Str\");\n } catch (IOException e) {\n String hosts = c.headers().getProperty(Hea...
"public INDArray swap(INDArray x, INDArray y) {\n SimpleJCublas.swap(x, y);\n return y;\n}\n"
"private BundleDescription[] getReexportedBundles(final BundleDescription bundleDescription) {\n Assert.notNull(bundleDescription);\n if (!bundleDescription.isResolved()) {\n String resolverErrors = TargetPlatformImpl.dumpResolverErrors(bundleDescription);\n String bundleInfo = TargetPlatformImpl.ge...
"void sendRequest() {\n Call<List<Gift>> call = AppController.service.getGifts(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n call.enqueue(new Callback<List<Gift>>() {\n public void onResponse(Call<List<Gift>> call, Response<List<Gift>> response) {\n progressView.setVisibility...
"public int timerEvent() {\n if (state == EMovableState.DEAD) {\n return -1;\n }\n switch(state) {\n case GOING_SINGLE_STEP:\n case PLAYING_ACTION:\n case TAKE:\n case DROP:\n case PATHING:\n case WAITING:\n int remainingAnimationTime = animationStart...
"public void endRow() {\n synchronize();\n endContainer();\n}\n"
"public boolean onTouchEvent(MotionEvent ev) {\n if (DISABLE_TOUCH_INTERACTION) {\n return false;\n }\n if (getChildCount() <= 0)\n return super.onTouchEvent(ev);\n acquireVelocityTrackerAndAddMovement(ev);\n final int action = ev.getAction();\n switch(action & MotionEvent.ACTION_MASK) {...
"public boolean replaceEvent(GameEvent event, Ability source, Game game) {\n PreventionEffectData preventionData = preventDamageAction(event, source, game);\n if (preventionData.getPreventedDamage() > 0) {\n UUID redirectTo = source.getTargets().get(1).getFirstTarget();\n Permanent permanent = game....
"public void testReceivedMessageFromQueueWithNoReplyToReturnsNull() throws Exception {\n try (TestAmqpPeer testPeer = new TestAmqpPeer(testFixture.getAvailablePort())) {\n Connection connection = testFixture.establishConnecton(testPeer);\n connection.start();\n testPeer.expectBegin(true);\n ...
"public long append(long fd, long buf, int len) {\n if (fd == this.fd) {\n this.fd = -1;\n return -1;\n }\n return super.append(fd, buf, len);\n}\n"
"protected void handleRelationTag() {\n int iSourceVertexId = 0;\n int iTargetVertexId = 0;\n String sType = \"String_Node_Str\";\n for (int iAttributeIndex = 0; iAttributeIndex < attributes.getLength(); iAttributeIndex++) {\n sAttributeName = attributes.getLocalName(iAttributeIndex);\n if (\"...
"public void removeProject(Project project) {\n if (projects.getCurrentProject() == project) {\n if (!closeCurrentProject()) {\n return;\n }\n }\n projects.removeProject(project);\n}\n"
"public void afterTextChanged(Editable s) {\n if (!TextUtils.isEmpty(s)) {\n if (operationCode == 2) {\n if (room.getName() == null || !room.getName().equals(s.toString())) {\n if (!proceedButton.isEnabled()) {\n proceedButton.setEnabled(true);\n ...
"private int calculateRequestTimeout(MessageCap messageCap) {\n List<Integer> timeOuts = new ArrayList<Integer>();\n IParamDescriptionPO desc1 = m_currentCap.getParameterForUniqueId(COMP_SYSTEM_TIMEOUT);\n timeOuts.add(m_currentCap.getParameterList().indexOf(desc1));\n desc1 = m_currentCap.getParameterForUn...
"private final int computeOomAdjLocked(ProcessRecord app, int cachedAdj, ProcessRecord TOP_APP, boolean doingAll, long now) {\n if (mAdjSeq == app.adjSeq) {\n return app.curRawAdj;\n }\n if (app.thread == null) {\n app.adjSeq = mAdjSeq;\n app.curSchedGroup = Process.THREAD_GROUP_BG_NONINTE...
"public Void call() throws Exception {\n setPasswordForNode();\n return null;\n}\n"
"public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {\n if (getItemCount() == 0) {\n detachAndScrapAttachedViews(recycler);\n return;\n }\n if (getChildCount() == 0 && state.isPreLayout()) {\n return;\n }\n if (!state.isPreLayout()) {\n mFir...
"private void emitLocal(GeneratorAdapter gen, LocalBinding lb) {\n if (closes.contains(lb)) {\n gen.loadThis();\n gen.getField(fntype, lb.name, OBJECT_TYPE);\n else\n gen.visitVarInsn(OBJECT_TYPE.getOpcode(Opcodes.ILOAD), lb.idx);\n}\n"
"private static int parseTrun(TrackBundle trackBundle, int index, long decodeTime, int flags, ParsableByteArray trun, int trackRunStart) {\n trun.setPosition(Atom.HEADER_SIZE);\n int fullAtom = trun.readInt();\n int atomFlags = Atom.parseFullAtomFlags(fullAtom);\n Track track = trackBundle.track;\n Track...
"private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) {\n Chart helperModel = (Chart) EcoreUtil.copy(currentChart);\n ChartDimension oldDimension = currentChart.getDimension();\n ChartCacheManager.getInstance().cacheSeries(ChartUIUtil.getAllO...
"private static Collection parseCollectionV1(SBOLDocument SBOLDoc, IdentifiableDocument<QName> topLevel) {\n URI identity = topLevel.getIdentity();\n URI persistentIdentity = null;\n String displayId = null;\n String name = null;\n String description = null;\n Set<URI> members = new HashSet<>();\n ...
"public static void onCurrencySubtract(CurrencySubtractEvent event) {\n UUID target = event.getTarget();\n if (!NameManager.isAdminShop(target) || NameManager.isServerEconomyAccount(target)) {\n return;\n }\n if (SERVER_ECONOMY_ACCOUNT.isEmpty()) {\n event.setSubtracted(true);\n return;...