content stringlengths 40 137k |
|---|
"private String constructJsonForDefaultMapping(Object eventObj) {\n StringBuilder sb = new StringBuilder();\n int numberOfOuterObjects;\n if (enclosingElement != null) {\n String[] nodeNames = enclosingElement.split(\"String_Node_Str\");\n if (DEFAULT_ENCLOSING_ELEMENT.equals(nodeNames[0])) {\n ... |
"private void packTable() {\n final Table table = getTable();\n final TableColumn[] columns = table.getColumns();\n final int columnCount = columns.length;\n if ((m_columnWidths != null && m_columnWidths.length > 0) && m_columnCount == columns.length) {\n columns[0].setWidth(m_columnWidths[0]);\n ... |
"public void ingest(Context context, DSpaceObject dso, List ml) throws CrosswalkException, IOException, SQLException, AuthorizeException {\n if (dso.getType() == Constants.SITE)\n throw new CrosswalkObjectNotSupported(\"String_Node_Str\");\n if (!ml.isEmpty())\n AuthorizeManager.removeAllPolicies(co... |
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n MageObject sourceObject = game.getObject(source.getSourceId());\n if (controller.getLibrary().hasCards()) {\n Card card = controller.getLibrary().getFromTop(game);\n Cards cards = ... |
"public double heroHealthScore_p1(double heroHealth, double heroArmor) {\n double toRet = -enemy_wHeroHealth_ * (heroHealth + heroArmor);\n if (heroHealth <= 0) {\n toRet += 100000.0;\n }\n return toRet;\n}\n"
|
"public void buddyIconUpdated(IconService iconService, Screenname screenname, ExtraInfoData extraInfoData, ByteBlock byteBlock) {\n if (byteBlock != null) {\n if (screenname.getFormatted().equals(uin)) {\n synchronized (this) {\n byte[] img = byteBlock.toByteArray();\n ... |
"public boolean promptAboutTorrentWithBannedExtensions(Torrent torrent, Set<String> bannedExtensions) {\n String extensions = StringUtils.explode(bannedExtensions, \"String_Node_Str\");\n String warning = I18n.tr(\"String_Node_Str\", extensions);\n String prompt = I18n.tr(\"String_Node_Str\");\n final Multi... |
"public void doPaintTo(GlimpseContext context) {\n if (this.pickSupportEnabled) {\n if (this.pickFrameBuffer == null) {\n this.pickFrameBuffer = new GLSimpleFrameBufferObject(WIDTH_BUFFER * 2 + 1, HEIGHT_BUFFER * 2 + 1, context.getGLContext());\n }\n pickIcons(context);\n }\n GL... |
"protected IFigure getFigure(View view) {\n MergeViewerSide side = getSide(view);\n GraphicalEditPart originEditPart = (GraphicalEditPart) getViewer(side).getEditPart(view);\n if (originEditPart != null) {\n return originEditPart.getFigure();\n }\n return null;\n}\n"
|
"public void setup() throws Exception {\n super.setup();\n lightRules = new LightPropagationRules();\n blockManager = new BlockManagerImpl(new NullWorldAtlas(), Lists.<String>newArrayList(), Maps.<String, Short>newHashMap(), true, new DefaultBlockFamilyFactoryRegistry());\n CoreRegistry.put(BlockManager.cla... |
"public static boolean checkConcept(XSDElementDeclaration decl) {\n boolean isConcept = false;\n EList<XSDIdentityConstraintDefinition> list = decl.getIdentityConstraintDefinitions();\n for (Iterator<XSDIdentityConstraintDefinition> iter = list.iterator(); iter.hasNext(); ) {\n XSDIdentityConstraintDefi... |
"public int getSpanCount(String field) {\n Entry ent = (Entry) entries.get(field);\n return (ent == null) ? 0 : ent.spans.size();\n}\n"
|
"public void onPageSelected(int pos) {\n mCalc.getCurrUnitType().clearUnitSelection();\n mCalc.setCurrentUnitTypePos(pos);\n if (mCalc.getCurrUnitType().containsDynamicUnits())\n mCalc.refreshAllDynamicUnits(false);\n int currUnitTypePos = mUnitTypeViewPager.getCurrentItem();\n clearUnitSelection(... |
"public Object coerceToBean(Object val, Component comp, BindContext ctx) {\n if (val != null) {\n final Combobox lbx = (Combobox) comp;\n final ListModel<?> model = lbx.getModel();\n if (model != null) {\n final String varnm = (String) ((Comboitem) val).getAttribute(BinderImpl.VAR);\n... |
"public void registerDeath(PlayerDeathEvent e) {\n if (e.getEntity() != getPlayer())\n return;\n AutoRefPlayer.DamageCause dc = AutoRefPlayer.DamageCause.fromDamageEvent(e.getEntity().getLastDamageCause());\n deaths.put(dc, 1 + deaths.get(dc));\n ++totalDeaths;\n AutoRefMatch match = getTeam().get... |
"public void responseAvailable(RPCResponse<InternalReadLocalResponse> r) {\n InternalReadLocalResponse internalReadLocalResponse = null;\n try {\n internalReadLocalResponse = r.get();\n ObjectData metadata = internalReadLocalResponse.getData();\n InternalObjectData data = new InternalObjectDa... |
"public static void main(String[] args) {\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n }\n final JFrame runnerFrame = new JFrame(\"String_Node_Str\");\n runnerFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n runnerFrame.setPre... |
"public void buyShare(Certificate share) throws NullPointerException {\n if (hasBoughtStockThisTurn)\n return;\n for (int i = 0; i < companiesSoldThisTurn.size(); i++) {\n if (share.company.getName().equalsIgnoreCase(companiesSoldThisTurn.get(i).toString()))\n return;\n }\n if (port... |
"private void createTypeTreeComp(Composite parent) {\n Composite TypeSash = new Composite(parent, SWT.NONE);\n TypeSash.setLayout(new GridLayout());\n TypeSash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n TypeSash.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_WHITE));\n Label... |
"protected HearthTreeNode createNodeWithChildren(HearthTreeNode boardState, Collection<HearthTreeNode> children) {\n if (children != null) {\n boardState.addChildren(children);\n }\n return boardState;\n}\n"
|
"protected boolean updateLocationTree(String path) {\n if (this.locationPaths == null) {\n this.locationPaths = new ArrayList<TreeParent>();\n }\n if (!path.equals(\"String_Node_Str\")) {\n if (checkExistensence(path)) {\n return false;\n }\n TreeParent node = new TreePar... |
"public List<UserDetails> searchUsers(String text, Boolean entandoUser) throws ApsSystemException {\n if (!isActive()) {\n return super.searchUsers(text);\n }\n try {\n if (entandoUser == null) {\n return this.searchUsers(text);\n }\n IUserDAO userDAO = (entandoUser) ? su... |
"private void processHandlers() {\n while (!eventHandlersQueue.isEmpty()) {\n EventHandlerQueueObject object = eventHandlersQueue.poll();\n if (object == null)\n break;\n switch(object.eventType) {\n case UPDATE:\n if (object.action == EventQueueAction.ADD_HA... |
"public void process_connect_threshold() {\n SquaresIntoCrossClusters alg = new SquaresIntoCrossClusters(0.2, -1);\n List<Polygon2D_F64> squares = new ArrayList<Polygon2D_F64>();\n squares.add(createSquare(5, 6));\n squares.add(createSquare(6.20001, 7));\n squares.add(createSquare(6.1999999, 5));\n Li... |
"public static Block getPlant(ItemSeeds seed) {\n if (seed == null) {\n return null;\n } else if (seed == Items.melon_seeds) {\n return Crops.melon;\n } else if (seed == Items.pumpkin_seeds) {\n return Crops.pumpkin;\n } else {\n return seed.getPlant(null, 0, 0, 0);\n }\n}\n"
|
"protected BusinessGroup getBusinessGroupWhereEnrolled(Identity identity, List<Long> groupKeys, List<Long> areaKeys, CourseGroupManager cgm) {\n if (groupKeys != null && !groupKeys.isEmpty()) {\n SearchBusinessGroupParams params = new SearchBusinessGroupParams();\n params.setAttendee(true);\n pa... |
"protected void setColumnList(DesignElementHandle handle) {\n if (handle instanceof DataSetHandle) {\n columnList = Arrays.asList(DataSetProvider.getCurrentInstance().getColumns((DataSetHandle) handle, false));\n } else if (handle instanceof TabularCubeHandle || handle instanceof TabularHierarchyHandle) {\... |
"public void load(Element element) throws XMLException {\n String att_name, att_var, ch_name;\n Element el;\n att_name = NCLElementAttributes.ID.toString();\n if (!(att_var = element.getAttribute(att_name)).isEmpty())\n setId(att_var);\n att_name = NCLElementAttributes.TITLE.toString();\n if (!... |
"public void testEven4ParityLinearRankSelection() {\n final int LOWER_SUCCESS = 50;\n final int UPPER_SUCCESS = 50;\n Evolver evolver = getEvolver();\n final EvenParity model = new EvenParity(evolver, 4);\n setupModel(model);\n model.setProgramSelector(new LinearRankSelector(evolver));\n final int ... |
"protected MutableConfiguration<Integer, String> newMutableConfiguration() {\n return new MutableConfiguration<Integer, String>().setTypes(Integer.class, String.class);\n}\n"
|
"private void extractFiles() throws IOException {\n Common.pushFileFromRAW(mContext, Const.RecoveryCollectionFile, R.raw.recovery_sums, mVersionChanged);\n Common.pushFileFromRAW(mContext, Const.KernelCollectionFile, R.raw.kernel_sums, mVersionChanged);\n Const.Busybox = new File(mContext.getFilesDir(), \"Stri... |
"public <T> T _deserialize(Object object, Class<T> clazz, int depth) {\n if (object == null)\n return null;\n if (depth++ >= maxdeep) {\n log.warn(\"String_Node_Str\" + (depth - 1) + \"String_Node_Str\" + clazz);\n return null;\n }\n if (isBaseType(clazz))\n return (T) object;\n ... |
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n XMLMarshaller marshaller = marshalRecord.getMarshaller();\n Converter converter = xmlCompositeC... |
"public List<Mana> getNetMana(Game game) {\n List<Mana> newNetMana = new ArrayList<>();\n newNetMana.addAll(conditionalManaEffect.getNetMana(game, this));\n return newNetMana;\n}\n"
|
"private Object deserializePayload(byte[] bytes, MimeType contentType) {\n Class<?> targetType = null;\n try {\n if (contentType.equals(TEXT_PLAIN)) {\n return new String(bytes, \"String_Node_Str\");\n }\n String className = JavaClassMimeTypeConversion.classNameFromMimeType(content... |
"public static void main(String[] args) throws IOException, StructureException, StructureAlignmentException, InterruptedException, ExecutionException {\n List<String> names = Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n AtomCache cache =... |
"public boolean isValid() {\n if (this.validity == this.born || this.validity == 0) {\n this.validity = System.currentTimeMillis() + Settings.getConfig().validityStart;\n this.changes();\n }\n return this.validity >= System.currentTimeMillis();\n}\n"
|
"protected synchronized <L extends SocializeListener> void doInitAsync(final Activity context, final SocializeListener listener, final String delegateBean, final Method method, final Object[] args) throws Throwable {\n final SocializeService service = getSocialize();\n if (!service.isInitialized(context)) {\n ... |
"public void testArgumentGeneration() throws ParserConfigurationException, TransformerException {\n Argument argument = new Argument(\"String_Node_Str\");\n argument.setDescription(\"String_Node_Str\");\n argument.setDataType(Argument.DataType.BOOLEAN);\n argument.setValidation(\"String_Node_Str\");\n Do... |
"protected void startUp() {\n CConfiguration cConf = CConfiguration.create();\n cConf.setBoolean(Constants.Security.SSL_ENABLED, true);\n URL certUrl = getClass().getClassLoader().getResource(\"String_Node_Str\");\n Assert.assertNotNull(certUrl);\n Configuration configuration = new Configuration();\n ... |
"protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache) {\n Map<String, Object> model = new HashMap<String, Object>(1);\n try {\n JSONObject json = new JSONObject(new JSONTokener(req.getContent().getContent()));\n customEmailMappingService.addCustomMapping(json.g... |
"public static Class<?>[] getGenericTypes(Field f) {\n String gts = f.toGenericString();\n Matcher m = PTN.matcher(gts);\n if (m.find()) {\n String s = m.group(2);\n String[] ss = Strings.splitIgnoreBlank(s);\n if (ss.length > 0) {\n Class<?>[] re = new Class<?>[ss.length];\n ... |
"public Data poll(Request request) {\n try {\n setCurrentTake();\n Data value = blCurrentTake.remove();\n if (request.txnId != -1) {\n MemberImpl backup = null;\n if (request.caller.equals(thisAddress)) {\n backup = getNextMemberAfter(thisAddress, true, 1);\n... |
"public boolean writeTo(ByteBuffer bb) {\n if (value != null) {\n IOUtil.copyToHeapBuffer(value, bb);\n }\n if (lastOne != null) {\n IOUtil.copyToHeapBuffer(lastOne, bb);\n }\n return !(value != null && value.hasRemaining()) || (lastOne != null && lastOne.hasRemaining());\n}\n"
|
"private void addListeners() {\n addStatusListListener();\n view.getSaveButton().addListener(Events.OnClick, new Listener<ButtonEvent>() {\n public void handleEvent(ButtonEvent be) {\n updateModel();\n dataChanged = false;\n }\n });\n Listener<BaseEvent> dataChangedListen... |
"public void updateXML(Object obj, Node associatedNode) {\n if (obj instanceof XMLRoot) {\n obj = ((XMLRoot) obj).getObject();\n }\n AbstractSession session = context.getSession(obj);\n if (objNode == associatedNode) {\n DOMRecord root = new DOMRecord((Element) associatedNode);\n root.s... |
"static boolean check(String source, int lineNumber) {\n Context cx = Context.enter();\n Debugger oldDebugger = cx.getDebugger();\n Object oldContext = cx.getDebuggerContextData();\n boolean oldGenerate = cx.isGeneratingDebug();\n int oldLevel = cx.getOptimizationLevel();\n try {\n BreakableSou... |
"public void handleSelectionUpdate(ISelectionDelta selectionDelta, boolean scrollToSelection, String info) {\n if (selectionDelta.getIDType() == mappingDataDomain.getStorageIDType()) {\n for (SelectionDeltaItem item : selectionDelta.getAllItems()) {\n if (item.getSelectionType() == SelectionType.MO... |
"private String getCloseAfterSummary(int period) {\n if (period == 0)\n return getString(R.string.never);\n return getResources().getQuantityString(R.plurals.days_quantity, period, period);\n}\n"
|
"protected void fixSkirts(DrawContext dc, RowColRectTile tile, Map<RectTileKey, RowColRectTile> tileMap) {\n int row = tile.getRow();\n int column = tile.getColumn();\n int level = tile.getLevel();\n int sRow = row / 2;\n int sColumn = column / 2;\n int sLevel = level - 1;\n boolean topHalf = row %... |
"public static UUID getGuidForAsset(ColuAsset coluAsset, byte[] publicKeyBytes) {\n ByteWriter byteWriter = new ByteWriter(36);\n byteWriter.putBytes(addressBytes);\n byteWriter.putRawStringUtf8(coluAsset.id);\n Sha256Hash accountId = HashUtils.sha256(byteWriter.toBytes());\n return getGuidFromByteArray(... |
"public void testPrimitiveLikeTypeNames_GRE891() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str... |
"public void setListening(boolean listening) {\n if (listening == mBatteryListening) {\n return;\n }\n mBatteryListening = listening;\n if (mBatteryListening) {\n TunerService.get(getContext()).addTunable(this, STATUS_BAR_SHOW_BATTERY_PERCENT, STATUS_BAR_BATTERY_STYLE);\n mBatteryContro... |
"public int getCustomFieldKey(String morType, String fieldName) throws Exception {\n List<CustomFieldDef> fields = getFields();\n if (fields != null) {\n for (CustomFieldDef field : fields) {\n if (field.getName().equals(fieldName) && field.getManagedObjectType().equals(morType))\n ... |
"public static JiQi get(int id) {\n if (id < JiQi.values().length && id > 0) {\n return JiQi.values()[id];\n }\n return null;\n}\n"
|
"public boolean parse(ParserManager pm, IToken token) throws SyntaxError {\n int type = token.type();\n if (this.mode == 0 || type == Tokens.SEMICOLON) {\n pm.popParser(true);\n return true;\n }\n if (this.isInMode(VALUE)) {\n if (type == Tokens.OPEN_PARENTHESIS) {\n this.mod... |
"public boolean emulateSpecialRecipeResultShiftClick(CraftingInventory inventory, Player player) {\n ItemStack[] matrix = inventory.getMatrix();\n for (int i = 0; i < matrix.length; i++) {\n matrix[i] = matrix[i] == null ? new ItemStack(Material.AIR) : matrix[i].clone();\n }\n Map.Entry<ItemScriptCon... |
"public void Int() {\n Enter();\n final double RoundFactor = 10e+13;\n final double IntPart = Math.floor(Math.abs(Math.rint(X * RoundFactor) / RoundFactor));\n if (InvState) {\n SetX((Math.abs(X) - IntPart) * Math.signum(X));\n } else {\n SetX(IntPart * Math.signum(X));\n }\n}\n"
|
"public MqttMessage getMessage() {\n try {\n boolean elapsed = !m_latch.await(1, TimeUnit.SECONDS);\n if (elapsed && checkElapsed) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return m_m... |
"public SortedSet<ChannelContentKey> getEarliest(DirectionQuery tagQuery) {\n Iterable<ChannelConfig> channels = getChannels(tagQuery.getTagName());\n Traces traces = ActiveTraces.getLocal();\n traces.add(\"String_Node_Str\", tagQuery.getTagName());\n SortedSet<ChannelContentKey> orderedKeys = Collections.s... |
"private String generateNewQuery() {\n ExtractMetaDataUtils extractMeta = ExtractMetaDataUtils.getInstance();\n if (realDBType != null) {\n dbType = realDBType;\n }\n if (node != null && node instanceof INode) {\n process = ((INode) node).getProcess();\n }\n if (this.realTableId != null ... |
"public void partHidden(IWorkbenchPartReference partRef) {\n IWorkbenchPart activePart = partRef.getPart(false);\n if (!(activePart instanceof CaleydoViewPart)) {\n return;\n AGLViewPart glViewPart = (AGLViewPart) activePart;\n GeneralManager.get().getViewGLCanvasManager().unregisterGLCanvasFromAnima... |
"private void attemptRestart(int oldPeriodIndex, Timeline oldTimeline, Timeline newTimeline) {\n int newPeriodIndex = resolveSubsequentPeriod(oldPeriodIndex, oldTimeline, newTimeline);\n if (newPeriodIndex == C.INDEX_UNSET) {\n return false;\n }\n releasePeriodHoldersFrom(playingPeriodHolder != null ... |
"public void NewWaveScreen() {\n if (NewWaveScene == null) {\n NewWaveScene = new Scene();\n base.theWave.mWaveNumberMenuItem = new ChangeableTextMenuItem(GestureDefence.MENU_WAVE_NUMBER, base.mFont, \"String_Node_Str\" + base.theWave.getWaveNumber(), (\"String_Node_Str\").length());\n NewWaveSc... |
"private Node parseAndRecordParamTypeNode(JsDocToken token) {\n Preconditions.checkArgument(token == JsDocToken.LC);\n int lineno = stream.getLineno();\n int startCharno = stream.getCharno();\n Node typeNode = parseParamTypeExpressionAnnotation(token);\n if (typeNode != null) {\n int endLineno = s... |
"public void onClick(View view) {\n if (view.getId() == R.id.defaultTheme) {\n new FinestWebView.Builder(this).titleDefault(\"String_Node_Str\").show(\"String_Node_Str\");\n } else if (view.getId() == R.id.redTheme) {\n new FinestWebView.Builder(this).titleDefault(\"String_Node_Str\").statusBarColor... |
"private void buildIndex(Map<Relation, Set<Relation>> itemRelations, Project project, IProgressMonitor monitor) {\n modified = true;\n if (!project.getEmfProject().getItemsRelations().isEmpty()) {\n loadRelations(itemRelations, project);\n if (loaded) {\n return;\n }\n }\n IP... |
"private boolean checkForBinary(final int oldPosition, final String rem_expr) {\n boolean isBinary = false;\n Matcher matcher1 = AND_SUB.matcher(rem_expr);\n if (matcher1.find()) {\n String token = matcher1.group(1);\n curPosition = curPosition + token.length();\n tokens.appendToken(oldPos... |
"public void send(Object msg) throws IllegalActionException {\n synchronized (_actor) {\n if (_wsFailed != null) {\n throw new IllegalActionException(_actor, _wsFailed, \"String_Node_Str\" + _numberOfTries + \"String_Node_Str\");\n }\n if (!(msg instanceof String)) {\n if (... |
"public boolean isItemValidForSlot(int slotIndex, ItemStack itemstack) {\n ISidedInventory inventory = getStructureInventory();\n if (inventory == null)\n return false;\n if (!inventory.isItemValidForSlot(slotIndex, itemstack))\n return false;\n if (slotIndex == SLOT_QUEEN && PluginApiculture.... |
"public void setString(String value) throws Exception {\n try {\n Object object = convertToObject(value);\n setter.invoke(null, new Object[] { object });\n } catch (InvocationTargetException e) {\n ex = e;\n } catch (IllegalArgumentException e) {\n ex = e;\n } catch (IllegalAcces... |
"private PdfAction createPdfAction(String hyperlink, String bookmark, String target) {\n if (\"String_Node_Str\".equalsIgnoreCase(target)) {\n return new PdfAction(hyperlink);\n } else {\n if (type == IHyperlinkAction.ACTION_BOOKMARK) {\n return PdfAction.gotoLocalPage(bookmark, false);\n... |
"public void testUnregister() {\n OpenPushHelper helper = OpenPushHelperKeeper.getNewInstance(Robolectric.application);\n Options.Builder builder = new Options.Builder();\n final String providerName = \"String_Node_Str\";\n builder.addProviders(new MockPushProvider(Robolectric.application, providerName));\n... |
"public static String run(String db1, String db2) {\n PersistenceManager pm1 = null;\n PersistenceManager pm2 = null;\n try {\n out = new StringBuilder();\n ZooJdoProperties props1 = new ZooJdoProperties(db1);\n PersistenceManagerFactory pmf1 = JDOHelper.getPersistenceManagerFactory(props1... |
"protected ICompletableFuture<Data> getAsyncInternal(final Data key) {\n final NodeEngine nodeEngine = getNodeEngine();\n final MapService mapService = getService();\n int partitionId = nodeEngine.getPartitionService().getPartitionId(key);\n final boolean nearCacheEnabled = mapConfig.isNearCacheEnabled();\n... |
"private List onQuery(EntityMetadata m, Client client) {\n QueryTranslator translator = new QueryTranslator();\n translator.translate(getKunderaQuery(), m);\n List<String> columns = getTranslatedColumns(m, getKunderaQuery().getResult());\n Map<Boolean, Filter> filter = translator.getFilter();\n if (trans... |
"protected String getAttr(int row, int column, String attr) {\n Element elem = getElement(row, column);\n return DOM.getElementAttribute(elem, attr);\n}\n"
|
"public void setTimeIntervalMax(String timeIntervalMax) {\n if (timeFormat.equals(TimeFormat.DATE) || timeFormat.equals(TimeFormat.DATETIME)) {\n try {\n this.timeIntervalMax = DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMax);\n } catch (Exception ex) {\n report.logIss... |
"public static int getWidgetTop(Widget aWidget) {\n Element element = aWidget.getElement();\n if (aWidget.getParent() instanceof FieldSet) {\n element = aWidget.getParent().getElement();\n } else if (aWidget.getParent() instanceof BorderLayoutContainer && aWidget.getParent().getParent() instanceof Layou... |
"protected List<String> getErrors() {\n synchronized (_errors) {\n final ArrayList<String> result = _errors;\n _errors = new ArrayList<String>();\n return result;\n }\n}\n"
|
"private void setTile(final String k, final MrsTileReader<T> reader, final long tileid) {\n if (zoomLevel > reader.getZoomlevel()) {\n int zl = reader.getZoomlevel();\n TMSUtils.Tile t = TMSUtils.calculateTile(TMSUtils.tileid(tileid, zoomLevel), zoomLevel, zl, tilesize);\n TileIdWritable id = ne... |
"public boolean equals(Object o) {\n if (!(o instanceof PushRequestedFile))\n return false;\n PushRequestedFile prf = (PushRequestedFile) o;\n return Arrays.equals(clientGUID, prf.clientGUID) && filename.equals(prf.filename) && index == prf.index;\n}\n"
|
"public Builder setApplicationSpecifiedCompletions(CompletionInfo[] infos) {\n for (CompletionInfo info : infos) {\n if (null != info)\n addWord(info.getText());\n }\n return this;\n}\n"
|
"public Image getImage(Object element) {\n if (element instanceof Operator) {\n return IMAGE_OPERATOR;\n } else if (element instanceof ILocalizableInfo[]) {\n ILocalizableInfo info = ((ILocalizableInfo[]) element)[1];\n if (info instanceof IMethodInfo) {\n if (((IMethodInfo) info).... |
"public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n mSmsTextView = (TextView) view.findViewById(R.id.sms_text_view);\n RequestPermissions.requestRuntimePermission(getActivity(), new String[] { Manifest.permission.RECEIVE_SMS }, new RequestPermis... |
"public String getLibrary() {\n return (String) getAttribute(LIBRARY_TAG);\n}\n"
|
"public static Object get(JsValue value, Class type, String msgPrefix) {\n double doubleVal;\n if (value.isNull()) {\n return null;\n }\n if (value.isUndefined()) {\n throw new HostedModeException(msgPrefix + \"String_Node_Str\" + type.getName());\n }\n if (value.isWrappedJavaObject()) {... |
"public void run(IProgressMonitor monitor) {\n monitorWrap = new EventLoopProgressMonitor(monitor);\n List<ConceptTarget> addedObjects = new ArrayList<ConceptTarget>(event.addedObjects);\n MDMLinker.this.createFieldsLinkWithProgressMonitor(monitorWrap, addedObjects.size(), addedObjects, event.index, addedObjec... |
"private ClassLoader getClassLoader(IMetadataConnection metadataConn) {\n IHadoopDistributionService hadoopService = getHadoopDistributionService();\n if (hadoopService != null) {\n String distribution = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_IMPALA_DISTRIBUTION);\n Strin... |
"private void updateList(LinkedHashMap<String, String> changeTable, Hashtable<String, String> conflictTable, AbstractPipelineInput input) {\n DITAOTJavaLogger logger = new DITAOTJavaLogger();\n String tempDir = ((PipelineHashIO) input).getAttribute(Constants.ANT_INVOKER_PARAM_TEMPDIR);\n if (!new File(tempDir)... |
"public void handle(Request request, Response response) {\n Document xml = JDUtilities.parseXmlString(\"String_Node_Str\", false);\n response.setReturnType(\"String_Node_Str\");\n response.setReturnStatus(Response.OK);\n if (request.getRequestUrl().equals(\"String_Node_Str\")) {\n Vector<String> comm... |
"public static boolean containsFieldValues(PrestoDataProvider dataProvider, PrestoSchemaProvider schemaProvider, PrestoContextRules rules, PrestoField defaultField, ObjectNode config) {\n List<? extends Object> values = HasFieldValues.getValues(dataProvider, schemaProvider, rules, defaultField, config);\n Set<Str... |
"protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n int widthMode = MeasureSpec.getMode(widthMeasureSpec);\n int heightMode = MeasureSpec.getMode(heightMeasureSpec);\n int widthSize = MeasureSpec.getSize(widthMeasureSpec);\n i... |
"protected void renameGUINode(IPersistentObject po) {\n getMainTreeViewer().refresh(true);\n createPartName();\n}\n"
|
"private List<ModelField> getFieldsByGetters(Class clazz) {\n List<ModelField> fields = new ArrayList<ModelField>();\n try {\n final BeanInfo beanInfo = Introspector.getBeanInfo(clazz, Introspector.USE_ALL_BEANINFO);\n for (PropertyDescriptor property : beanInfo.getPropertyDescriptors()) {\n ... |
"private void workflow(IActivity lastActivity, String returnCode, Hashtable returnVals) {\n if (stack.size() != 0) {\n IActivity activity = stack.pop();\n this.currentActivity = activity;\n activity.resume(context);\n } else {\n if (lastActivity == this.splashScreen) {\n cur... |
"public static void fillDataObject(BiMap<? extends Long, ? extends EObject> mapResult, EObject eObject, DataObject dataObject) {\n for (EStructuralFeature eStructuralFeature : eObject.eClass().getEAllStructuralFeatures()) {\n Object eGet = eObject.eGet(eStructuralFeature);\n if (eStructuralFeature.getE... |
"public synchronized void waitForResult(long timeoutMs) {\n try {\n wait(timeoutMs);\n if (!completed) {\n throw new RuntimeException(String.format(\"String_Node_Str\", TimeUnit.MILLISECONDS.toSeconds(timeoutMs)));\n }\n } catch (InterruptedException e) {\n e.printStackTrace... |
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object objectValue, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n XMLMarshaller marshaller = marshalRecord.getMarshaller();\n Converter converter = xmlComp... |
"public final void internalSetDeleted() throws OseeCoreException {\n internalSetModType(ModificationType.DELETED);\n for (Attribute<?> attribute : getAttributes()) {\n attribute.setArtifactDeleted();\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.