content
stringlengths
40
137k
"public void removeAtIndex(int i) {\n System.arraycopy(array, i + 1, array, i, size - i - 1);\n array[size - 1] = null;\n size--;\n}\n"
"public boolean allocateResources(Node node, int cores, int memory) {\n if (jdbc.update(ALLOCATE_RESOURCES, cores, memory, cores, memory, node.getNodeId()) == 1) {\n return true;\n }\n return false;\n}\n"
"private void addUnmarshalValue(UnmarshalRecord unmarshalRecord, Object value, Object collection) {\n if (null == value) {\n return;\n }\n if (unmarshalRecord.isNil() && xmlCompositeDirectCollectionMapping.getNullPolicy().isNullRepresentedByXsiNil()) {\n return;\n }\n if (!isWhitespaceAware...
"public void localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt) {\n ChatRoom sourceChatRoom = evt.getChatRoom();\n ChatRoomsList chatRoomsList = mainFrame.getChatRoomsListPanel().getChatRoomsList();\n ChatRoomWrapper chatRoomWrapper = chatRoomsList.findChatRoomWrapperFromChatRoom(sourceChatRoom...
"private static void killProc() throws IOException {\n ProcessBuilder pb = null;\n BufferedReader in = new BufferedReader(new FileReader(\"String_Node_Str\"));\n String pid = in.readLine();\n in.close();\n if (Platform.isWindows()) {\n if (verifyPidName(pid)) {\n pb = new ProcessBuilder...
"public DataStoreLifeCycle getDataStoreLifeCycle() {\n return lifecycle;\n}\n"
"public void renderTileEntityAt(TileEntity t, double x, double y, double z, float f) {\n super.renderTileEntityAt(t, x, y, z, f);\n if (t instanceof TileRailGun) {\n TileRailGun tileEntity = (TileRailGun) t;\n GL11.glPushMatrix();\n GL11.glTranslatef((float) x + 0.5F, (float) y + 2.2F, (float...
"public boolean isInFaction(IPlayableFaction f) {\n return Objects.equals(currentFaction, f);\n}\n"
"protected List<String> readString(String stringList) {\n return new JobVMArgumentsUtil().readString(stringList);\n}\n"
"public Object getUpperBound() {\n return upperNumber;\n}\n"
"public IDataQueryDefinition[] build(IDataQueryDefinition parentQuery, ReportItemDesign design) {\n synchronized (report) {\n Object result = design.accept(queryBuilder, parentQuery);\n if (result == null) {\n return null;\n }\n IDataQueryDefinition[] queries = (IDataQueryDefin...
"public HearthTreeNode minionSummonEvent(PlayerSide thisMinionPlayerSide, PlayerSide summonedMinionPlayerSide, Minion summonedMinion, HearthTreeNode boardState) {\n if (!KnifeJuggler.triggerFilter.targetMatches(thisMinionPlayerSide, this, summonedMinionPlayerSide, summonedMinion, boardState.data_)) {\n return...
"public void registrationStateChanged(RegistrationStateChangeEvent evt) {\n if (logger.isDebugEnabled())\n logger.debug(\"String_Node_Str\" + evt.getOldState() + \"String_Node_Str\" + evt.getNewState());\n if (evt.getNewState() == RegistrationState.REGISTERING) {\n parentProvider.getConnection().add...
"public void focusLost(FocusEvent e) {\n if (e.getSource() instanceof JLongField) {\n JLongField jif = (JLongField) e.getSource();\n if (jif.getValue() == null)\n jif.setValue(0l);\n } else if (e.getSource() instanceof JDoubleField) {\n JDoubleField jdf = (JDoubleField) e.getSource...
"static Object[] getRelevantArgs2(ESupportedDrivers supportedDriver, Method method, Object[] args, AnnotatedElement annotatedElement) {\n IHowToGetHandle how = MethodReadingUtil.getDefinedParameter(method, IHowToGetHandle.class, args);\n if (how == null) {\n HowToGetMobileScreen howToGetMobileScreen = null...
"public void onHideAnimationEnd() {\n mSearchEdit.setText(\"String_Node_Str\");\n dismissAllowingStateLoss();\n}\n"
"public int getWindowXPositionLeft() {\n if (windowTimeWidth < histogramContent.getElementsTimeInterval()) {\n return histogramContent.getXPositionByPositionAndTimeInterval(windowCenterPosition, -(histogramContent.getElementsTimeInterval()));\n } else {\n return histogramContent.getXPositionByPositi...
"private int[] readTableFromParcel(Parcel in, String name, String what) {\n final int size = in.readInt();\n if (size < 0) {\n Slog.w(TAG, \"String_Node_Str\" + what + \"String_Node_Str\" + size);\n return BAD_TABLE;\n }\n if (size == 0) {\n return null;\n }\n final int[] table = ...
"private void performUserLeave() {\n mIsUserActive = false;\n mMasterFragment.onUserLeave();\n}\n"
"public static final void migrateActor(String host, int port, MobileActor.State actor) {\n actor.host = host;\n actor.port = port;\n OutgoingTheaterConnection out = getSocket(host, port);\n StageService.sendMessage(new Message(Message.SIMPLE_MESSAGE, out, 4, new Object[] { actor }));\n}\n"
"protected void initializeListView() {\n CMISApplication app = (CMISApplication) getApplication();\n CMIS cmis = app.getCMIS();\n if (cmis != null && cmis.getNetworkStatus() == NetworkStatus.OK) {\n setContentView(R.layout.nodes);\n } else {\n setContentView(R.layout.nodes_offline);\n }\n ...
"public static Object readPolicy(InputStream is) {\n try {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n dbf.setNamespaceAware(true);\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(is);\n NodeList nodes = doc.getChildNodes();\n ...
"protected void compactHitsAbsCount() {\n ArrayList<CollectorDoc> newHits = new ArrayList<CollectorDoc>(new Float((hits.size() * 0.75f)).intValue());\n if (hits.size() < 1)\n return;\n CollectorDoc currDoc = hits.get(0);\n float seenTimes = 0.0f;\n for (CollectorDoc d : hits) {\n if (d.doc ...
"public ReleaseDate scrapeReleaseDate() {\n SimpleDateFormat dateFormatToUse = data18ReleaseDateFormat;\n Element releaseDateElement = document.select(\"String_Node_Str\").first();\n if ((releaseDateElement != null && releaseDateElement.text() != null && releaseDateElement.text().contains(\"String_Node_Str\"))...
"private void authenticate(final Address target, final ClientConnection connection, final boolean asOwner, final AuthenticationFuture callback) {\n SerializationService ss = client.getSerializationService();\n final ClientClusterServiceImpl clusterService = (ClientClusterServiceImpl) client.getClientClusterServic...
"public void onOpened() {\n super.onOpened();\n WorldGeneratorPluginLibrary.setupTempEnvironmentForPlugins();\n PropertyLayout properties = find(\"String_Node_Str\", PropertyLayout.class);\n properties.setOrdering(PropertyOrdering.byLabel());\n properties.clear();\n SimpleUri generatorUri = config.get...
"public int size() {\n return buffer.get() == null ? 0 : (buffer.get().limit() - headerOffset) / recordSize;\n}\n"
"public void testCompileSaveAndRunEvoSuiteTestStepByStep() throws Exception {\n MutationSupporter.currentSupporter = new MutationSupporter();\n String classpath4BuildModel = new File(\"String_Node_Str\").getAbsolutePath() + File.pathSeparator + new File(\"String_Node_Str\").getAbsolutePath() + File.pathSeparator ...
"private String printLabeledOuterFromClause(String sql, int counter, Map<String, String> columnNameAliasMapCopy) {\n sql += \"String_Node_Str\" + counter + \"String_Node_Str\" + this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(this.labeledMappedAliasIdForOuterFromClause(columnNameAliasMapCopy));\n Map<String, Pro...
"private AbstractNode[] deleteNode(AbstractNode node) {\n AbstractNode[] descendants = new AbstractNode[node.size + 1];\n int i = 0;\n for (DescendantAndSelfIterator itr = new DescendantAndSelfIterator(treeStructure, node, Tautology.instance); itr.hasNext(); ) {\n AbstractNode descendant = itr.next();\n...
"public User update(Long id, UserDTO updated) {\n logger.debug(\"String_Node_Str\" + updated);\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n Object principal = authentication.getPrincipal();\n if (principal != null && principal instanceof User) {\n User l...
"private void checkSchema() {\n boolean canEditSchema = false;\n boolean noSchema = false;\n for (IElementParameter param : this.getElementParameters()) {\n if (param.isShow(getElementParameters()) && param.getFieldType().equals(EParameterFieldType.SCHEMA_TYPE)) {\n canEditSchema = true;\n ...
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n resultTextView = (TextView) findViewById(R.id.result_text_view);\n Button syncNow = (Button) findViewById(R.id.sync_now_button);\n final TimeSyncProxy sync = TimeSync.ge...
"SafeHtml getImageHtml(ImageResource res, VerticalAlignmentConstant valign, boolean isPlaceholder) {\n if (isPlaceholder) {\n image = SafeHtmlUtils.fromTrustedString(\"String_Node_Str\");\n } else {\n String vert = valign == HasVerticalAlignment.ALIGN_MIDDLE ? \"String_Node_Str\" : valign.getVertica...
"public String toManchesterSyntaxString(String baseURI, Map<String, String> prefixes) {\n if (hasLang)\n return \"String_Node_Str\" + literal + \"String_Node_Str\" + lang;\n else\n return literal;\n}\n"
"boolean isWrongSequence(SAMRecord record) {\n return (procesingUnmapped && !record.getReadUnmappedFlag()) || (!procesingUnmapped && (record.getReadUnmappedFlag() || (shard.contig.referenceName != null && !shard.contig.referenceName.isEmpty() && !shard.contig.referenceName.equals(record.getReferenceName()))));\n}\n"...
"private synchronized static double getBondEnergy(IBond bond, BondEnergies bondEnergy) {\n double energy = 0.0;\n if ((bond.getAtom(0).getFlag(0) == true && bond.getAtom(1).getFlag(999) == false) || (bond.getAtom(0).getFlag(0) == false && bond.getAtom(1).getFlag(999) == true)) {\n int val = bondEnergy.getE...
"public void update(float deltaTime) {\n Vector2 tPosition = Vector2.REUSABLE_STACK.pop();\n Vector2 tScale = Vector2.REUSABLE_STACK.pop();\n float rotation = 0;\n tPosition.set(entity.position);\n tScale.set(entity.scale);\n rotation += entity.rotation;\n Entity2D parent = entity.parent;\n whil...
"public void loadLibrary() throws ServiceException {\n if (!isLoaded) {\n try {\n System.loadLibrary(Core.NATIVE_LIBRARY_NAME);\n isLoaded = true;\n LOGGER.info(\"String_Node_Str\", Core.NATIVE_LIBRARY_NAME);\n } catch (UnsatisfiedLinkError e) {\n LOGGER.erro...
"public static short[] newNonMovingShortArray(int size) {\n if (!VM.runningVM) {\n return new short[size];\n }\n RVMArray arrayType = RVMArray.ShortArray;\n int headerSize = ObjectModel.computeArrayHeaderSize(arrayType);\n int align = ObjectModel.getAlignment(arrayType);\n int offset = ObjectMo...
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n if (xmlCompositeDirectCollectionMapping.hasValueConverter()) {\n if (xmlCompositeDirectColl...
"protected void onLayout(boolean changed, int l, int t, int r, int b) {\n final View child = getChildAt(0);\n final int childWidth = child.getMeasuredWidth();\n final LayoutParams childParams = (LayoutParams) child.getLayoutParams();\n final int available = r - l - getPaddingLeftWithForeground() - getPaddin...
"public boolean isAssignableFrom(IType type, ITypeContext typeContext) {\n if (!Types.isSuperType(this.getUpperBound().getConcreteType(typeContext), type)) {\n return false;\n }\n final IType lowerBound = this.getLowerBound();\n return lowerBound == null || Types.isAssignable(type, lowerBound.getConc...
"public String timestamp(double millis) {\n Calendar c = Calendar.getInstance();\n c.setTimeInMillis((long) millis);\n return X_String.toTimestamp(c.get(Calendar.YEAR), c.get(Calendar.MONTH) + 1, c.get(Calendar.DATE), c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.MINUTE), c.get(Calendar.MILLISECOND), c.getTimeZo...
"public FluidStack drain(FluidStack resource, boolean doDrain) {\n FluidStack drained = null;\n if (fluid != null && fluid.isFluidEqual(resource)) {\n if (tile instanceof TileBase)\n ((TileBase) tile).sync();\n drained = drain(resource.amount, doDrain);\n }\n return drained;\n}\n"
"public void loadChildren() {\n ColumnSet columnSet = SwitchHelpers.COLUMN_SET_SWITCH.doSwitch((EObject) getParent());\n if (columnSet != null) {\n List<TdColumn> columnList = null;\n if (FILTER_FLAG) {\n String columnFilter = ColumnHelper.getColumnFilter(columnSet);\n columnLi...
"public void propagateAction(GameAction action) {\n Level currentLevel = game.getCurrentLevel();\n CumulativeTurnManager tm = app.getTurnManager();\n EntityActionManager mainManager = null;\n Move moveAction;\n Combatable c = null;\n List<EntityActionManager> managers = null;\n if (currentLevel != ...
"private PatternBinding getBinding(String nameOrUriPattern) {\n Collection<List<PatternBinding>> values = bindingsCache.values();\n for (List<PatternBinding> bindings : values) {\n for (PatternBinding binding : bindings) {\n route = binding.getRoute();\n if (nameOrUriPattern.equals(ro...
"private void updateClusterConfiguration(final DescribeNetworksResponseType reply) {\n try {\n ClusterConfiguration config = Entities.uniqueResult(this.getSubject().getConfiguration());\n config.setNetworkMode(reply.getMode());\n config.setUseNetworkTags(reply.getUseVlans() == 1);\n confi...
"public static long[] getLongs(CkAttribute raw) {\n int dataLen = raw.getLength().intValue();\n long[] result = new long[dataLen / NativeLong.SIZE];\n for (int i = 0, o = 0; o < dataLen; i++, o += NativeLong.SIZE) {\n result[i] = getLongFromPointer(raw.getData(), o);\n }\n}\n"
"protected void onFinishInflate() {\n super.onFinishInflate();\n initViews();\n for (int i = 0; i < accounts.size(); i++) {\n HashMap<?, ?> defHash = (HashMap<?, ?>) accounts.get(i);\n String curBlogName = EscapeUtils.unescapeHtml(defHash.get(\"String_Node_Str\").toString());\n blogNames[i...
"private void init() {\n conditionSearchCi = (CommonItem) findViewById(R.id.conditionSearch);\n fillCommonItem(conditionSearchCi, R.drawable.condif, mRes.getString(R.string.conditionSearch));\n conditionSearchCi.showDivider(true);\n nearByCi = (CommonItem) findViewById(R.id.nearbyp);\n fillCommonItem(nea...
"public void blockDestroy(BlockBreakEvent event) {\n Player player = event.getPlayer();\n Location loc = BukkitUtil.getLocation(event.getBlock().getLocation());\n PlotArea area = loc.getPlotArea();\n if (area == null) {\n return;\n }\n Plot plot = area.getPlotAbs(loc);\n if (plot != null) {\...
"protected void printMsg(ChannelHandlerContext ctx, Object msg) {\n byte[] dd = (byte[]) msg;\n System.out.println(\"String_Node_Str\" + dd.length);\n try {\n APNSMessage event = MessageUtils.asT(APNSMessage.class, dd);\n if (event != null && event.aps != null) {\n System.out.println(\...
"private void nodeToStringBuffer(Element node, StringBuffer buffer) {\n buffer.append(\"String_Node_Str\").append(node.getNodeName());\n SortedMap<String, String> attributeMap = new TreeMap<String, String>();\n NamedNodeMap attributes = node.getAttributes();\n for (int i = 0; i < attributes.getLength(); i++...
"public void handle(T view, String key, LayoutParser parser) {\n if (!parser.isObject()) {\n return;\n }\n parser = parser.peek();\n int background = Color.TRANSPARENT;\n int progress = Color.TRANSPARENT;\n String value = parser.getString(\"String_Node_Str\");\n if (value != null) {\n ...
"public List<Schema> fillSchemaToCatalog(Connection dbConn, DatabaseMetaData dbJDBCMetadata, Catalog catalog, List<String> schemaFilter) throws Throwable {\n ResultSet schemaRs = null;\n try {\n if (dbJDBCMetadata.getDriverName().equals(DatabaseConstant.MSSQL_DRIVER_NAME_JDBC2_0)) {\n Method get...
"public boolean containsPoint(Point p) {\n GraphicsConfiguration config = screen.getDefaultConfiguration();\n Rectangle bounds = config.getBounds();\n if (bounds.contains(p)) {\n return true;\n }\n return false;\n}\n"
"private String findExpression(String columnBindingName, IBaseQueryDefinition queryDefn) {\n if (queryDefn == null) {\n return null;\n }\n if (queryDefn.getBindings().get(columnBindingName) == null) {\n return findExpression(columnBindingName, queryDefn.getParentQuery());\n }\n IBaseExpress...
"public void testEval() throws Exception {\n MyrrixIRStatistics stats = (MyrrixIRStatistics) new PrecisionRecallEvaluator().evaluate(new File(\"String_Node_Str\"));\n log.info(String.valueOf(stats));\n assertTrue(stats.getPrecision() > 0.2);\n assertTrue(stats.getRecall() > 0.2);\n assertTrue(stats.getNo...
"private void updateWeatherView(WeatherInfo weatherInfo) {\n if (WeatherSpider.isEmpty(weatherInfo)) {\n Toast.makeText(mActivity, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (!isVisible)\n return;\n isLoaded = true;\n if (weatherInfo.isNewData())\n Toa...
"public Map<String, Object> getDiscount(SaleOrder saleOrder, SaleOrderLine saleOrderLine, BigDecimal price) {\n PriceList priceList = saleOrder.getPriceList();\n if (priceList == null) {\n return null;\n }\n return null;\n}\n"
"public int getMaxAvaHeight() {\n if (parent != null) {\n return getContentHeight(parent.getMaxAvaHeight());\n } else {\n return context.getMaxBP();\n }\n}\n"
"public void addGroupify(int[] key, int representant, int count, Distribution distribution, int pcount) {\n final HashGroupifyEntry entry = addInternal(key, representant, count, pcount);\n if (distribution != null) {\n if (entry.distribution == null) {\n entry.distribution = distribution;\n ...
"public void setUp() throws Exception {\n this.etcd = new EtcdClient();\n this.etcd.setRetryHandler(new RetryWithExponentialBackOff(20, 4, 10000));\n}\n"
"public void execute() throws ResourceUnavailableException, InsufficientCapacityException {\n password = _mgr.generateRandomPassword();\n UserVm result = _userVmService.resetVMPassword(this, password);\n if (result != null) {\n UserVmResponse response = _responseGenerator.createUserVmResponse(result);\n...
"public void onTimePassed(TimerHandler pTimerHandler) {\n leftTime.setText(String.valueOf(timeBasedGameService.getRemainingTime()));\n}\n"
"private synchronized void start() {\n if (this.datagramTransport != null) {\n if ((this.connectThread == null) && (dtlsTransport == null)) {\n logger.warn(getClass().getName() + \"String_Node_Str\" + \"String_Node_Str\");\n }\n return;\n }\n int dtlsProtocol = this.dtlsProtocol...
"public boolean apply(Game game, Ability source) {\n boolean result = false;\n String cardName = \"String_Node_Str\";\n UUID targetPlayerId = null;\n if (source instanceof SpellAbility) {\n Card sourceCard = game.getCard(source.getSourceId());\n if (sourceCard != null) {\n cardName ...
"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 void configureStandardHostValve(StandardHostValve host) {\n if ((errorReportValveClass != null) && !\"String_Node_Str\".equals(errorReportValveClass)) {\n try {\n GlassFishValve valve = (GlassFishValve) loadInstance(errorReportValveClass);\n host.setErrorReportValve(valve);\n ...
"protected Command createButtonCommand(Button button) {\n FileItem repositoryFileItem = null;\n LinkRulesItem linkItem = null;\n Map<String, FileItem> repositoryFileItemMap = null;\n Map<String, LinkRulesItem> repositoryLinkRulesItemMap = null;\n String paramName = (String) button.getData(PARAMETER_NAME)...
"public Object getStringFor(PropertyRecord propRecord, ReadFromBuffer buffer) {\n int recordToFind = (int) propRecord.getPropBlock();\n Iterator<DynamicRecord> records = propRecord.getValueRecords().iterator();\n List<char[]> charList = new LinkedList<char[]>();\n int totalSize = 0;\n while (recordToFind...
"public void testConnectToNonSecureUrl() throws Exception {\n CloudFoundryOperations client = CloudFoundryPlugin.getDefault().getCloudFoundryClientFactory().getCloudFoundryClient(\"String_Node_Str\");\n CloudInfo cloudInfo = client.getCloudInfo();\n Assert.assertNotNull(cloudInfo);\n}\n"
"public void done() {\n File classFile = new File(packageDir, className.toLowerCase(Locale.getDefault()) + \"String_Node_Str\");\n BufferedWriter writer = null;\n try {\n try {\n if (!classFile.createNewFile()) {\n throw new RuntimeException(\"String_Node_Str\");\n }...
"private String removeQuotes(String fontName) {\n if (ptnWrappingQuotes.matcher(fontName).matches()) {\n return fontName.substring(1, fontName.length() - 1);\n }\n return fontName;\n}\n"
"public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) {\n unmarshalRecord.removeNullCapableValue(this);\n Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor();\n ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDesc...
"public void damage(int dmg, Object src) {\n if (!isAlive() || dmg < 0) {\n return;\n }\n if (this.buff(Frost.class) != null) {\n Buff.detach(this, Frost.class);\n }\n if (this.buff(MagicalSleep.class) != null) {\n Buff.detach(this, MagicalSleep.class);\n }\n Class<?> srcClass ...
"private static void loadAttribute(Artifact artifact, AttrData current, AttrData previous) throws OseeCoreException {\n IAttributeType attributeType = AttributeTypeManager.getTypeByGuid(current.attrTypeId);\n String value = current.value;\n if (isEnumOrBoolean(attributeType)) {\n value = Strings.intern(...
"private List<InstructorFeedbackResultsResponseRow> buildResponseRowsForQuestionForSingleParticipant(FeedbackQuestionAttributes question, List<FeedbackResponseAttributes> responses, String participantIdentifier, boolean isFirstGroupedByGiver) {\n List<InstructorFeedbackResultsResponseRow> responseRows = new ArrayLis...
"public void removeHead() {\n if (!head.getPositions().isEmpty()) {\n head.getPositions().removeLast();\n }\n}\n"
"public ListPattern getItems(int row, int column, int size) {\n ListPattern items = new ListPattern();\n for (int col = startColumn - size; col <= startColumn + size; ++col) {\n if (col >= 0 && col < _width) {\n for (int row = startRow - size; row <= startRow + size; ++row) {\n if...
"public org.hl7.fhir.dstu2.model.NamingSystem convertNamingSystem(org.hl7.fhir.dstu3.model.NamingSystem src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.NamingSystem tgt = new org.hl7.fhir.dstu2.model.NamingSystem();\n copyDomainResource(src, tgt)...
"int getAdaptiveCacheElementIndex(Cache<?, ?> cache) {\n int i = 0;\n for (AdaptiveCacheElement element : caches) {\n if (element.getCache() == cache) {\n return element;\n }\n i++;\n }\n return -1;\n}\n"
"public void drop(DropTargetEvent event) {\n DropTarget dropTarget = (DropTarget) event.getSource();\n Item targetItem = (Item) event.item;\n if (targetItem == null) {\n return;\n }\n Control control = dropTarget.getControl();\n LocalDraggedData draggedData = LocalDataTransfer.getInstance().get...
"public String readLine() throws IOException {\n if (isASCII && txt != null) {\n return txt.readLine();\n }\n if (!isASCII && bgzf != null) {\n String ans = \"String_Node_Str\";\n char c;\n while ((c = (char) bgzf.read()) < 255) {\n if (c != '\\n')\n ans +=...
"protected void addDrawingPoint(Vector2D point) {\n if (drawingPoints == null)\n drawingPoints = new ArrayList<Vector2D>();\n drawingPoints.add(point);\n delegate.updateStatus(\"String_Node_Str\" + point.x + \"String_Node_Str\" + point.y + \"String_Node_Str\");\n if (isSnapped && drawingPoints.size()...
"public boolean isInstance(Metric<?> metric) {\n return (metric instanceof MetricSDNMAmbiguity);\n}\n"
"public static void doLoadLogisimLibrary(Project proj) {\n Loader loader = proj.getLogisimFile().getLoader();\n JFileChooser chooser = loader.createChooser();\n chooser.setDialogTitle(Strings.get(\"String_Node_Str\"));\n chooser.setFileFilter(Loader.LOGISIM_FILTER);\n int check = chooser.showOpenDialog(p...
"protected int doRun() throws FlagUsageException, IOException {\n Compiler.setLoggingLevel(Level.parse(config.loggingLevel));\n List<SourceFile> externs = createExterns();\n compiler = createCompiler();\n B options = createOptions();\n List<JSModule> modules = null;\n Result result = null;\n setRun...
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (mImportOpHelper.handleActivityResult(requestCode, resultCode, data)) {\n return;\n }\n if (mEditOpHelper != null) {\n mEditOpHelper.handleActivityResult(requestCode, resultCode, data);\n }\n if (resultCod...
"public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {\n ArmorProperties prop = new ArmorProperties(0, 0.0, 0);\n ItemBackpack backpack = (ItemBackpack) armor.getItem();\n prop.Armor = backpack.getArmorDamageReductionAmount(armor);\n p...
"public BinaryRatingDao<ProfessorRatingEntity> getProfessorRatingDao() {\n if (professorRatingDao == null) {\n professorRatingDao = new SqlProfessorRatingDao();\n }\n return professorRatingDao;\n}\n"
"public void onMidiRPNReceived(MidiInputDevice sender, int cable, int channel, int function, int valueMSB, int valueLSB) {\n List<AbstractMidiFragment> midiFragments = getMidiFragments();\n for (AbstractMidiFragment fragment : midiFragments) {\n fragment.onMidiRPNReceived(sender, cable, channel, function, ...
"public List<PassedVar> getPassedOutputList() {\n ArrayList<PassedVar> res = new ArrayList<PassedVar>();\n assert (oList.size() == oListWriteOnly.size());\n for (int i = 0; i < oList.size(); i++) {\n Var out = oList.get(i);\n res.add(new PassedVar(out, oListWriteOnly.contains(out)));\n }\n ...
"public boolean execute(ICommandSender sender, String[] args) throws Exception {\n if (args.length > 1) {\n throw new BadUsageException(getUsage());\n }\n IPlayer player = (IPlayer) sender;\n IWorld world = player.getWorld();\n if (manager.isPlotWorld(world)) {\n if (manager.isEconomyEnable...
"public View getView(int position, View convertView, ViewGroup parent) {\n FlippingView v;\n if (convertView == null) {\n LayoutInflater inflater = LayoutInflater.from(mContext);\n v = inflater.inflate(R.layout.fragment_home_tickers_dashboard_item, parent, false);\n } else {\n v = convertV...
"private void updateSnapshot(CommoditySnapshotValue commoditySnapshotValue, GenericDao<CommoditySnapshot> snapshotDao, List<CommoditySnapshot> commoditySnapshots, boolean isReplace) {\n CommoditySnapshot commoditySnapshot = commoditySnapshots.get(0);\n commoditySnapshot.incrementValue(commoditySnapshotValue.getVa...
"public boolean performFinish() {\n String targetFile = page.getTargetFile();\n Object[] elements = page.getSelectedPatternsTree().getCheckedElements();\n List<Pattern> seletedPatterns = new ArrayList<Pattern>();\n for (Object element : elements) {\n if (element instanceof PatternRepNode) {\n ...
"public SingleLink parse(Reader reader) {\n return parseLinks(StaxUtil.newXMLEventReader(reader)).iterator().next();\n}\n"