content
stringlengths
40
137k
"public void defineSymbol(String name, Class<?> type, boolean allowSameRedefine) throws IllegalStateException {\n if (type == null && strict) {\n throw new IllegalStateException(Errors.format(Errors.PARAM_TYPE_MISSING, name));\n }\n if (currentSymbols.containsKey(name)) {\n Class<?> old = current...
"public static void mergeTiffImagesEx(RandomAccessOutputStream merged, File... images) throws IOException {\n if (images != null && images.length > 1) {\n FileInputStream fis1 = new FileInputStream(images[0]);\n RandomAccessInputStream image1 = new FileCacheRandomAccessInputStream(fis1);\n List<...
"public Long[] getLatestActivity(String device) {\n String query = null;\n try {\n String ipaddr = LeaseData.sharedData().lookup(device);\n if (ipaddr != null) {\n if (lastactivity > 0) {\n final String s = String.format(\"String_Node_Str\", lastactivity * 1000000);\n ...
"private void processEditMetadataOne(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException {\n String buttonPressed = UIUtil.getSubmitButton(request, \"String_Node_Str\");\n if (buttonPressed.equals...
"public void testCreateProducerOrdered() throws Exception {\n final MessageProducer producer = messageSessionFactory.createProducer(true);\n assertNotNull(producer);\n assertTrue(producer.getPartitionSelector() instanceof RoundRobinPartitionSelector);\n assertTrue(producer.isOrdered());\n assertTrue(this...
"private ScoredResult.Builder handleDocResult(IndexSearcher is, SortRequest sortRequest, boolean sorting, ScoreDoc[] results, int i) throws IOException {\n int docId = results[i].doc;\n Document d = is.doc(docId, fetchSet);\n ScoredResult.Builder srBuilder = ScoredResult.newBuilder();\n srBuilder.setScore(r...
"public void startLabel(ILabelContent label) {\n Object design = label.getGenerateBy();\n IContent container = label;\n while (design == null) {\n container = (IContent) container.getParent();\n design = ((IContent) container).getGenerateBy();\n }\n HyperlinkDef url = parseHyperLink(label);...
"private static void tOverlapCheckGrey(boolean deleteCorrupt) {\n debug(\"String_Node_Str\" + \"String_Node_Str\" + deleteCorrupt + \"String_Node_Str\");\n final int RATE = 500;\n uploader1.setRate(RATE);\n uploader2.setRate(RATE / 100);\n uploader2.setCorruption(true);\n RemoteFileDesc rfd1 = newRFD(...
"public static boolean isReachable(InetAddress addr, int timeout) throws IOException {\n try {\n timeoutMillis = timeoutMillis / 1000;\n return (Boolean) Groovyness.eval(String.format(\"String_Node_Str\", timeoutMillis, addr.getHostAddress()));\n } catch (ScriptExecutionFailedException ex) {\n ...
"private <T extends Number & Comparable<T>> List<T> computeSplitValues(OWLDataProperty dp) {\n Set<T> valuesSet = new TreeSet<T>();\n Map<OWLIndividual, SortedSet<T>> ind2Values = reasoner.getNumericDatatypeMembers(dp);\n for (Entry<OWLIndividual, SortedSet<T>> e : ind2Values.entrySet()) {\n valuesSet.a...
"public void split(TileAntennaPart splitPoint) {\n TileAntenna base = this.base;\n kill();\n if (splitPoint != base) {\n base.doInitScan();\n }\n}\n"
"protected void downloadClaFile() throws IOException {\n String filename = getFilename(\"String_Node_Str\");\n URL url = new URL(scopDownloadURL + filename);\n downloadFileFromRemote(url, new File(getClaFilename()));\n}\n"
"public void widgetSelected(SelectionEvent e) {\n try {\n KeyWrapper[] selectedKeys = getSelectedKeys();\n if (selectedKeys.length == 0) {\n return;\n List<String> topChilds = getTopChildrenNames();\n List<String> fieldNames = getFieldNames(selectedKeys[0].getSourceKey());\n ...
"public List<EcodDomain> getAllDomains() throws IOException {\n domainsFileLock.readLock().lock();\n try {\n while (allDomains == null) {\n domainsFileLock.readLock().unlock();\n ensureDomainsFileInstalled();\n domainsFileLock.readLock().lock();\n }\n return a...
"public String loadUpdateStatusComplete() {\n Map sessionAttributes = ActionContext.getContext().getSession();\n Orders orderEntity = orderService.findOrdersById(orderStatusLogsService.findOrderItemById((Integer) sessionAttributes.get(\"String_Node_Str\")).getOrderId());\n order = transformToOrderFormBean(orde...
"public void addRestrictionToCategoriesGrid(final ViewDefinitionState viewDefinitionState) {\n GridComponent categoriesGrid = (GridComponent) viewDefinitionState.getComponentByReference(\"String_Node_Str\");\n Restriction[] categoryRestrictions = new Restriction[DISABLED_CATEGORIES.size()];\n int index = 0;\n ...
"private synchronized void _reacquireReadPermissions(int count) {\n if (count == 0)\n return;\n Thread current = Thread.currentThread();\n AccessRecord record = null;\n if (current == _lastReader) {\n record = _lastReaderRecord;\n } else {\n record = _getAccessRecord(current, false);...
"public void screenOnStoppedLw() {\n if (!mKeyguardMediator.isShowingAndNotHidden() && mPowerManager.isScreenOn()) {\n long curTime = SystemClock.uptimeMillis();\n mPowerManager.userActivity(curTime, false, LocalPowerManager.OTHER_EVENT);\n }\n}\n"
"private void copyODMMappingXMLtoResources(ResourceLoader resourceLoader) {\n ByteArrayInputStream[] listSrcFiles = new ByteArrayInputStream[10];\n String[] fileNames = { \"String_Node_Str\" };\n try {\n listSrcFiles[0] = (ByteArrayInputStream) resourceLoader.getResource(\"String_Node_Str\" + File.separ...
"public void searchRecords(int congress, String senText, String repText, int progressSize, String politicalAffiliation) throws IOException, NullPointerException {\n if ((null == senText || senText.isEmpty()) && (null == repText || repText.isEmpty()))\n return;\n String memText = (null == senText || senText...
"public void setup() {\n this.jobRepository = Mockito.mock(JpaJobRepository.class);\n this.jobRequestRepository = Mockito.mock(JpaJobRequestRepository.class);\n this.jobExecutionRepository = Mockito.mock(JpaJobExecutionRepository.class);\n this.service = new JpaJobSearchServiceImpl(this.jobRepository, this....
"protected boolean checkFieldsValue() {\n String xmlXsdFilePathText = fileFieldXml.getText();\n if (xmlXsdFilePathText == \"String_Node_Str\") {\n updateStatus(IStatus.ERROR, Messages.getString(\"String_Node_Str\"));\n return false;\n }\n if (!valid) {\n if (isContextMode()) {\n ...
"protected void process(Entity e) {\n Physics physics = pm.get(e);\n float dx = 0;\n float dy = 0;\n if (Gdx.input.isKeyPressed(Input.Keys.A))\n dx = -1;\n if (Gdx.input.isKeyPressed(Input.Keys.D))\n dx = 1;\n if (Gdx.input.isKeyPressed(Input.Keys.S))\n dy = -1;\n if (Gdx.input...
"protected void dispatch(String networkName, String nodeName, String source, EventList events, int retriesLeft) throws Exception {\n Node node = getNode(networkName, nodeName);\n if (retriesLeft == -1) {\n retriesLeft = node.getMaxRetries();\n }\n EventList retries = process(networkName, nodeName, no...
"public void processRequest() throws Exception {\n resetPanel();\n panel.setStudyInfoShown(false);\n panel.setOrderedData(true);\n FormProcessor fp = new FormProcessor(request);\n String module = fp.getString(MODULE);\n session.setAttribute(MODULE, module);\n String action = request.getParameter(\"...
"public float calculateSquareRootIterative(int number) {\n float candidate = 1f;\n while (candidate * candidate <= number) {\n candidate++;\n }\n candidate--;\n if (isGoodResultForSqrt(number, candidate * candidate)) {\n return candidate;\n }\n float top = candidate + 1;\n float bo...
"public void notifyChanged(Notification notification) {\n if (notification.getEventType() != Notification.REMOVING_ADAPTER) {\n int featureID = notification.getFeatureID(Properties.class);\n if (featureID == PropertiesPackage.PROPERTY__INFORMATIONS) {\n return;\n } else if (featureID ...
"public void testRpcMetaQuery() throws Exception {\n RpcProxyFactoryBean proxyBean = new RpcProxyFactoryBean();\n proxyBean.setServiceInterface(RpcServiceMetaService.class);\n proxyBean.setPort(servicePort);\n proxyBean.afterPropertiesSet();\n Object object = proxyBean.getObject();\n Assert.assertTrue...
"public ExecutionResult executeInVR(String routerIP, String script, String args) {\n return executeInVR(routerIP, script, args, 120);\n}\n"
"private void emitCopyMethod(JavaWriter writer) throws IOException {\n writer.beginMethod(className, \"String_Node_Str\", EnumSet.of(Modifier.PUBLIC, Modifier.STATIC), \"String_Node_Str\", \"String_Node_Str\", className, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Nod...
"public Object resolveVariable(XelContext ctx, Object base, Object onm) {\n if (base != null) {\n Object o = ((ExecutionCtrl) _exec).getExtraXelVariable(ctx, base, onm);\n if (o != null)\n return o;\n final Page page = ((ExecutionCtrl) _exec).getCurrentPage();\n return page != ...
"public static void main(final String[] args) {\n try {\n final Config config = parseParams(args);\n try (final DBStore store = DBStore.newBuilder().build()) {\n final QueryContext ctx = new SirixQueryContext(store);\n final String file = config.getValue(\"String_Node_Str\");\n ...
"public static ResourcesUtil createInstance() {\n if (resourcesUtil == null) {\n synchronized (ResourcesUtil.class) {\n if (resourcesUtil == null) {\n resourcesUtil = new ResourcesUtil();\n }\n }\n }\n return resourcesUtil;\n}\n"
"public String getFileName() {\n return this.id + ext;\n}\n"
"public void testConditionalExpression() {\n IConditionalExpression ce1 = new ConditionalExpression(\"String_Node_Str\", 1, \"String_Node_Str\");\n IConditionalExpression ce2 = new ConditionalExpression(\"String_Node_Str\", 1, \"String_Node_Str\");\n IConditionalExpression ce3 = new ConditionalExpression(\"Str...
"private void aliasSearch(PDGNode currentNode, boolean visitedFromLoopbackFlow, ReachingAliasSet reachingAliasSet) {\n CFGNode currentCFGNode = currentNode.getCFGNode();\n for (GraphEdge edge : currentCFGNode.outgoingEdges) {\n Flow flow = (Flow) edge;\n if (!visitedFromLoopbackFlow || (visitedFromL...
"public void createControl(Composite parent, FormToolkit toolkit) {\n Section createSection = createSection(parent, toolkit);\n Composite composite = createContentComposite(toolkit, createSection);\n createTable(composite);\n}\n"
"public void handleEvent(Event event) {\n MessageBox messageBox = new MessageBox(parent.getShell(), SWT.APPLICATION_MODAL | SWT.OK | SWT.CANCEL);\n messageBox.setText(Messages.getString(\"String_Node_Str\"));\n messageBox.setMessage(Messages.getString(\"String_Node_Str\"));\n if (messageBox.open() == SWT.OK...
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.tab_installer, container, false);\n txtInstallError = (TextView) v.findViewById(R.id.framework_install_errors);\n txtKnownIssue = (TextView) v.findViewById(R.id.framework_kn...
"private void assignCornerElevations() {\n Deque<Corner> queue = new LinkedList<>();\n for (Corner c : corners) {\n c.water = isWater(c.loc);\n if (c.border) {\n c.elevation = 0;\n queue.add(c);\n } else {\n c.elevation = Double.MAX_VALUE;\n }\n }\n ...
"public static Bounds getBounds(final Dataset image) {\n final double[] xform = image.GetGeoTransform();\n SpatialReference srs = new SpatialReference(image.GetProjection());\n SpatialReference dst = new SpatialReference(EPSG4326);\n CoordinateTransformation tx = new CoordinateTransformation(srs, dst);\n ...
"public String getCompletionStatus() {\n return getStatus().equals(Status.Active) && !CollectionUtils.isEmpty(warnings) ? \"String_Node_Str\" : null;\n}\n"
"public void testConnect() throws Exception {\n try {\n client.connect(\"String_Node_Str\", getListenerPort());\n fail(\"String_Node_Str\");\n } catch (FTPConnectionClosedException e) {\n }\n}\n"
"public boolean novel(final TermLink termLink, final long currentTime) {\n final Term bTerm = termLink.target;\n if (bTerm.equals(targetTask.getSentence().getContent())) {\n return false;\n }\n String linkKey = termLink.getKey();\n int next, i;\n for (i = 0; i < counter; i++) {\n next = ...
"public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {\n if (context.hasFailureDescription()) {\n context.setRollbackOnly();\n context.completeStep();\n return;\n }\n final Set<String> outstanding = new HashSet<String>(hostProxies....
"private static ModelElement getModelElement(IFile file) {\n ModelElement findModelElement = null;\n if (FactoriesUtil.PROV.equalsIgnoreCase(file.getFileExtension())) {\n TypedReturnCode<TdDataProvider> returnValue = PrvResourceFileHelper.getInstance().findProvider(file);\n findModelElement = return...
"protected void doRun() {\n List<Object> selectedObject = getSelectedObject();\n int size = selectedObject.size();\n if (size > 0) {\n if (hasOpenedObject(selectedObject)) {\n warn();\n return;\n }\n if (!MessageDialog.openConfirm(getShell(), Messages.RemoveFromReposi...
"public void testRDFServingModel() throws Exception {\n Map<String, Object> overlayConfig = new HashMap<>();\n overlayConfig.put(\"String_Node_Str\", \"String_Node_Str\");\n overlayConfig.put(\"String_Node_Str\", RDFServingModelManager.class.getName());\n overlayConfig.put(\"String_Node_Str\", \"String_Node...
"public static <T, P> Collection<Pair<T, Integer>> computeNewSeeds(TabulationResult<T, P> tabulation, PartiallyBalancedTabulationProblem<T, P> problem) {\n Collection<Pair<T, Integer>> result = HashSetFactory.make();\n ISupergraph<T, P> supergraph = tabulation.getProblem().getSupergraph();\n for (PathEdge<T> e...
"private CloseableHttpResponse forward(CloseableHttpClient httpclient, String verb, String uri, HttpServletRequest request, MultiValueMap<String, String> headers, MultiValueMap<String, String> params, InputStream requestEntity) throws Exception {\n Map<String, Object> info = this.helper.debug(verb, uri, headers, par...
"public void accept(Event<StackStatusUpdateRequest> event) {\n StackStatusUpdateRequest statusUpdateRequest = event.getData();\n final CloudPlatform cloudPlatform = statusUpdateRequest.getCloudPlatform();\n StatusRequest statusRequest = statusUpdateRequest.getStatusRequest();\n long stackId = statusUpdateRe...
"public void load(int cellRequestCount, List<GroupingSet> groupingSets, List<StarPredicate> compoundPredicateList, List<Future<Map<Segment, SegmentWithData>>> segmentFutures) {\n for (GroupingSet groupingSet : groupingSets) {\n for (Segment segment : groupingSet.getSegments()) {\n cacheMgr.segmentI...
"public void testMultipleRuns() throws Exception {\n for (int i = 0; i < 3; i++) {\n String path = Paths.get(String.format(\"String_Node_Str\", Paths.get(\"String_Node_Str\").toAbsolutePath().toString(), SCRIPT_PATH, \"String_Node_Str\")).toString();\n Socket client = new Socket();\n client.conn...
"protected void drawGridBackground(Canvas c) {\n if (mDrawGridBackground) {\n c.drawRect(mViewPortHandler.getContentRect(), mGridBackgroundPaint);\n }\n if (mDrawBorders) {\n c.drawRect(mViewPortHandler.getContentRect(), mBorderPaint);\n }\n}\n"
"public void Area(String[] args, User user) {\n if (args.length == 0) {\n user.sendMessage(ChatColor.YELLOW + \"String_Node_Str\");\n return;\n }\n if (args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n plugin.lotListener.checkPlayer(user.getName());\n if (!plugin.lotListener.corner...
"private static void jsLoadedCallback(ImageData pixels, int width, int height, int oWidth, int oHeight, UniCallback<Image> onComplete) {\n Image image = new Image(width, height, oWidth, oHeight);\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) image.setPixel(x, y, new Color(pixels.ge...
"public boolean containsAnnotations() {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n}\n"
"public void onResume() {\n super.onResume();\n if (isFirstLoad) {\n if (UserAPI.isLoggedIn()) {\n String nameString = SharedUtil.readString(Consts.Key_User_Name, \"String_Node_Str\");\n if (!TextUtils.isEmpty(nameString)) {\n userName.setText(nameString);\n ...
"private void initalize(PageDef page) {\n axis = new AxisProcessor();\n axis.addCoordinate(page.contentwidth);\n setCacheSize();\n Rule rule = new Rule(0, page.contentwidth);\n cache = new DataCache(MAX_COLUMN, MAX_ROW, emitter);\n engine = new StyleEngine(this);\n containers.push(createContainer(r...
"private static TypeArgument makeTypeArgument(String s) {\n switch(s.charAt(0)) {\n case '*':\n return WILDCARD;\n case '+':\n case '-':\n {\n TypeSignature sig = TypeSignature.make(s.substring(1));\n return new TypeArgument(sig, WildcardIndica...
"public void actionPerformed(ActionEvent event) {\n serialport.removeAllItems();\n List<String> ports = SerialDataHandler.getSerialPorts();\n for (String port : ports) serialport.addItem(port);\n if (ports.contains(service.getSerialPort()))\n serialport.setSelectedItem(service.getSerialPort());\n}\n"...
"public void testFindPaginatedResourcesReturnsBadRequestForAnInvalidPageNumber() {\n this.request(\"String_Node_Str\").jsonPost(new Sample(\"String_Node_Str\"));\n this.request(\"String_Node_Str\").jsonPost(new Sample(\"String_Node_Str\"));\n this.request(\"String_Node_Str\").setQueryParameter(\"String_Node_St...
"protected Boolean doInBackground(View... views) {\n final View poem = views[0];\n boolean result = false;\n if (App.isExternalStorageWritable()) {\n final Bitmap bitmap = Bitmap.createBitmap(getResources().getDimensionPixelSize(R.dimen.share_width_px), getResources().getDimensionPixelSize(R.dimen.share...
"private final <TL extends TopLevel> void addTopLevel(TL newTopLevel, Map<URI, TL> instancesMap, String typeName, Map<URI, ? extends Identified>... maps) throws SBOLValidationException {\n boolean childrenCompliant = true;\n try {\n newTopLevel.checkDescendantsURIcompliance();\n } catch (SBOLValidationE...
"public void testNegative() {\n List<SAMValidationError> errors = codec.decode(\"String_Node_Str\").isValid(null, -1);\n Assert.assertEquals(errors.size(), 1);\n Assert.assertEquals(errors.get(0).getType(), SAMValidationError.Type.ADJACENT_INDEL_IN_CIGAR);\n errors = codec.decode(\"String_Node_Str\").isVali...
"public Data createData(Object txt, StyleEntry entry) {\n int type = SheetData.STRING;\n if (SheetData.NUMBER == ExcelUtil.getType(txt)) {\n String format = ExcelUtil.getPattern(txt, entry.getProperty(StyleConstant.NUMBER_FORMAT_PROP));\n format = ExcelUtil.formatNumberPattern(format, dataLocale);\n...
"private synchronized final void sendIntent() {\n Intent intent = new Intent(Intent.ACTION_HEADSET_PLUG);\n intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);\n int state = 0;\n int microphone = 0;\n if ((mHeadsetState & BIT_HEADSET) != (mPrevHeadsetState & BIT_HEADSET)) {\n microphone = 1;\n ...
"public void dropInstances(ZooClassProxy def) {\n SchemaIndexEntry sie = schemaIndex.getSchema(def.getSchemaId());\n for (int i = 0; i < sie.getObjectIndexVersionCount(); i++) {\n PagedPosIndex oi = sie.getObjectIndexVersion(i);\n PagedPosIndex.ObjectPosIterator it = oi.iteratorObjects();\n D...
"public void onInteract(PlayerInteractEntityEvent event) {\n PluginConfig config = Settings.getConfig();\n Player eventCaller = event.getPlayer();\n Entity clickedEntity = event.getRightClicked();\n if (clickedEntity instanceof Player) {\n Player clickedPlayer = (Player) clickedEntity;\n if (!...
"public void removeNamespace(String prefix) {\n if (null != prefixesToNamespaces) {\n prefixesToNamespaces.remove(prefix);\n }\n}\n"
"private void initialize(Instance instance) {\n int h = numLatentOption.getValue();\n c = new double[h];\n r = new double[h];\n for (int j = 0; j < h; j++) {\n c[j] = this.random.nextGaussian();\n r[j] = this.random.nextDouble();\n }\n Instances ds = new Instances();\n List<Attribute>...
"protected void handleBombTarget(BombTarget target) {\n if (target != null) {\n if (target.getOwner().equals(getTeam())) {\n if (target.bombActive()) {\n Bomb bomb = target.getBomb();\n bomb.disarm(this);\n game.emitSound(getId(), SoundType.BOMB_DISARM, ...
"protected static String getDefaultLogPath() {\n return Kit.getApplication().getApplicationContext().getFilesDir().getAbsolutePath() + File.separator + \"String_Node_Str\" + File.separator + \"String_Node_Str\";\n}\n"
"public void run() {\n if (ask) {\n AlertDialog.Builder updateDialog = new AlertDialog.Builder(mContext);\n updateDialog.setTitle(R.string.update_available).setMessage(R.string.lists_outdated).setPositiveButton(R.string.update, new DialogInterface.OnClickListener() {\n public void onClick(Di...
"public void notifySoilMoisture(boolean enable) {\n if (timerTaskNotifySoilMoisture != null) {\n timerTaskNotifySoilMoisture.cancel();\n timerTaskNotifySoilMoisture = null;\n timer.purge();\n }\n if (enable && isConnected()) {\n timerTaskNotifySoilMoisture = new TimerTask() {\n ...
"protected boolean canSort() {\n return false;\n}\n"
"public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {\n String effectiveName = getEffectiveName(namespaceURI, localName);\n processingStack.get(depth).isNotEmpty = true;\n processingStack.get(depth).currentName = effectiveName;\n try {\n bool...
"public String getText() {\n String comboBoxText;\n if (isEditable()) {\n comboBoxText = TesterUtil.getRenderedText(getComboBoxEditorComponent(m_comboBox), true);\n } else {\n final int selIndex = getSelectedIndex();\n if (selIndex == -1) {\n try {\n comboBoxText ...
"public final Response handle(String originalCommand, OsuApiUser apiUser, UserData userData) throws UserException, IOException, SQLException, InterruptedException {\n String lowerCase = originalCommand.toLowerCase();\n if (lowerCase.equals(alias)) {\n return handleArgument(\"String_Node_Str\", apiUser, use...
"private List<SAMReadGroupRecord> mergeReadGroups(final Collection<SAMFileReader> readers) {\n final HashSet<String> idsThatAreAlreadyTaken = new HashSet<String>();\n final List<HeaderRecordAndFileReader<SAMReadGroupRecord>> readGroupsToProcess = new LinkedList<HeaderRecordAndFileReader<SAMReadGroupRecord>>();\n ...
"public synchronized void updateGame(GameView game) {\n if (playerId == null || game.getHand() == null) {\n this.handContainer.setVisible(false);\n } else {\n handCards.clear();\n handCards.put(YOUR_HAND, game.getHand());\n if (game.getOpponentHands() != null) {\n for (Map.E...
"public boolean addressTryCompareAndSwap(ObjectReference objref, Address expected, Address newValue, Word offset, Word unused, int mode) {\n if (org.jikesrvm.VM.BuildForIA32) {\n return Magic.attemptAddress(objref.toObject(), offset.toOffset(), expected, newValue);\n } else {\n Address oldValue;\n ...
"public void onTestStart(ITestResult paramITestResult) {\n Object instance = paramITestResult.getInstance();\n ReportModelBuilder builder = new ReportModelBuilder(scenarioCollectionModel);\n builder.setTestClass(instance.getClass());\n if (instance instanceof ScenarioTestBase<?, ?, ?>) {\n ScenarioTe...
"public boolean apply(EAttribute input) {\n return input != null && !input.isDerived() && !input.isTransient();\n}\n"
"public static boolean AuthorizeAccessForUser(String aPathName, String aPathOwnerName, FsAction access, String user, Set<String> groups) throws RangerAccessControlException {\n boolean accessGranted = false;\n if (aPathName != null && aPathOwnerName != null && access != null && user != null && groups != null) {\n...
"private soot.Value getAssignLocal(polyglot.ast.Assign assign) {\n if ((assign.left() instanceof polyglot.ast.Field) && (needsPrivateAccessor((polyglot.ast.Field) assign.left()) || needsProtectedAccessor((polyglot.ast.Field) assign.left()))) {\n return handlePrivateFieldSet(assign);\n }\n if (assign.ope...
"public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) {\n Permanent permanent = game.getPermanent(id);\n Player player = game.getPlayer(id);\n if (source != null) {\n MageObject targetSource = game.getObject(source.getSourceId());\n if (permanent != null) {\n ...
"void addToCluster(SquareNode seed, List<SquareNode> graph) {\n open.clear();\n open.add(seed);\n while (!open.isEmpty()) {\n SquareNode n = open.remove(open.size() - 1);\n for (int i = 0; i < n.corners.size(); i++) {\n SquareEdge edge = n.edges[i];\n if (edge == null)\n ...
"public void run() {\n int msgCount = 0;\n Thread me = Thread.currentThread();\n for (; ; ) {\n if (me.isInterrupted())\n break;\n Serializable aMsg = (Serializable) queue.peekQueue();\n if (me.isInterrupted() || aMsg == null)\n break;\n try {\n debu...
"public void decoratePage(Page page, HttpEvent evt, String path, Response response, boolean chunked) {\n if (file.lastModified() != lastModified) {\n try {\n load();\n } catch (Exception ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n ResponseHeaders h = page.getRes...
"private void reschedule() {\n nextRunTime = ClockWrapper.getAccurateTime() + recurringDelay;\n executing = false;\n switch(priority) {\n case High:\n synchronized (highPriorityLock) {\n if (running) {\n ClockWrapper.stopForcingUpdate();\n ...
"public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) {\n return rule.fromBlock.getFireSpreadSpeed(new UCWBlockAccess(world, false), pos, face);\n}\n"
"private Map getCurrentValueOnEdge(String aggrName) throws OLAPException {\n if (!this.dimensionPrepared) {\n this.prepareDimensionCursor();\n this.dimensionPrepared = true;\n }\n Relationship relation = (Relationship) this.relationMap.get(aggrName);\n List pageLevelList = relation.getLevelLis...
"public Future<Void> query(String collection, CursorId cursorId, QueryCriteria filter, Projection projection, int maxResults) {\n return submit(new QueryCallable(wrapper, reportFactory.createQueryReport(), collection, cursorId, filter, projection, maxResults));\n}\n"
"private static boolean containsOverlaps(List<CodeReplacement> replacements) {\n Preconditions.checkState(ORDER_CODE_REPLACEMENTS.isOrdered(replacements));\n int start = -1;\n for (CodeReplacement replacement : replacements) {\n if (replacement.getStartPosition() < start) {\n return true;\n ...
"public void handle(Buffer buff) {\n if (failed) {\n return;\n }\n if (bodyLimit != -1 && (body.length() + buff.length()) > bodyLimit) {\n failed = true;\n context.fail(413);\n } else {\n body.appendBuffer(buff);\n }\n}\n"
"private Object wrapPlugin(String pluginId, Object plugin) {\n Caller caller = getCaller(pluginId);\n if (plugin instanceof Action) {\n return new WrappedAction((Action) plugin, caller);\n } else if (plugin instanceof BatchSource) {\n return new WrappedBatchSource<>((BatchSource) plugin, caller, ...
"protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n final int width = MeasureSpec.getSize(widthMeasureSpec);\n mBrightnessView.measure(exactly(width), MeasureSpec.UNSPECIFIED);\n final int brightnessHeight = mBrightnessView.getMeasuredHeight() + mBrightnessPaddingTop;\n mFooter.getVie...
"public boolean accepts(ARXNode node) {\n return filterClone.isAllowed(lattice, node);\n}\n"
"public void onPrepareOptionsMenu(Menu menu) {\n menu.clear();\n menu.add(Menu.NONE, MENU_ITEM_SEARCH, Menu.NONE, getString(R.string.search)).setIcon(new IconDrawable(getActivity(), Iconify.IconValue.fa_search).colorRes(R.color.black).actionBarSize()).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n menu.ad...