content stringlengths 40 137k |
|---|
"public long countFeedbacksByFeedbackType(long feedbackTypeId) {\n EntityManager entityManager = null;\n try {\n em = getEntityManagerFactory().createEntityManager();\n return getServiceFactory().getFeedbacksService().countFeedbacksByTypeId(em, feedbackTypeId);\n } catch (Exception ex) {\n ... |
"public byte getGoodMaternal() {\n if (maternal >= 0)\n return maternal;\n if (chr.isMT()) {\n return (byte) (Math.min(1, alts.length));\n }\n if (chr.isY()) {\n return (byte) -1;\n }\n return (byte) (Math.min(2, alts.length));\n}\n"
|
"private void rewriteServices(Map<QName, QName> servicesToRewrite, WSDLWriter writer, WSDLReader reader, final List<File> referencedFiles) throws WSDLException, FileNotFoundException {\n LOG.debug(\"String_Node_Str\");\n LOG.debug(\"String_Node_Str\" + referencedFiles);\n LOG.debug(\"String_Node_Str\" + servic... |
"public String editBulkItems() {\n Map sessionAttributes = ActionContext.getContext().getSession();\n try {\n String[] checkedItemsInSession = (String[]) sessionAttributes.get(\"String_Node_Str\");\n for (String value : checkedItemsInSession) {\n String modeOfService = sessionAttributes.g... |
"private String join(String[] name, int v) {\n StringBuffer out = new StringBuffer();\n boolean notFirst = false;\n for (int i = 0; i <= v && i < out.length(); i++) {\n if (notFirst)\n out.append(\"String_Node_Str\");\n out.append(name[i]);\n notFirst = true;\n }\n return ... |
"protected String[] doFindAdditionalTypesUsingRebinds(TreeLogger logger, CompilationUnitDeclaration cud) throws UnableToCompleteException {\n Set dependentTypeNames = new HashSet();\n Map requestedTypes = new HashMap();\n FindDeferredBindingSitesVisitor v = new FindDeferredBindingSitesVisitor(requestedTypes);\... |
"public String view(ModelMap model, String id, final RedirectAttributes redirectAttributes, HttpServletRequest request) {\n LOG.debug(\"String_Node_Str\", id);\n Document doc = docService.getDocument(id);\n model.addAttribute(\"String_Node_Str\", doc);\n List<HistoricTask> hts = this.localTaskSrvc.getDocApp... |
"public void pressed(KeyBindingEvent event, SpoutPlayer splayer, VPlayer vplayer) {\n if (!Permission.SHRIEK.has(splayer, true))\n return;\n vplayer.shriek();\n}\n"
|
"public final <T extends JsVisitable> T accept(T node) {\n return (T) doAccept(node);\n}\n"
|
"public boolean execute(ICommandSender sender, String[] args) throws Exception {\n if (args.length > 4) {\n throw new BadUsageException(getUsage());\n }\n IPlayer player = (IPlayer) sender;\n if (player.hasPermission(PermissionNames.USER_BIOME)) {\n IWorld world = player.getWorld();\n P... |
"public boolean isCellProperty() {\n return cell && isStandard();\n}\n"
|
"private int findNumberOfParameters(ASTNode node, TypeLookupResult result) {\n return (node instanceof MethodNode && ((MethodNode) node).getParameters() != null) ? ((MethodNode) node).getParameters().length : result.scope.getMethodCallNumberOfArguments();\n}\n"
|
"public void testTxnPutIfAbsent() throws TransactionException {\n Config config = new Config();\n final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);\n final HazelcastInstance h1 = factory.newHazelcastInstance(config);\n final HazelcastInstance h2 = factory.newHazelcastInstance(c... |
"public void test(File testFile) throws IOException {\n DataSet testSet = Files.readLines(testFile, Charsets.UTF_8, new DataSetLoader());\n System.out.println(\"String_Node_Str\" + testSet.sentences.size());\n System.out.println(\"String_Node_Str\" + testSet.tokenCount());\n int hit = 0, total = 0;\n Sto... |
"public static void addParameterSortBy(QueryDefinition queryDefn, ScalarParameterHandle parameter) {\n String sortBy = parameter.getSortByColumn();\n if (sortBy != null) {\n SortDefinition sort = new SortDefinition();\n sort.setExpression(sortBy);\n boolean direction = \"String_Node_Str\".equ... |
"public void doJoin(AtomicBoolean joined) {\n int tryCount = 0;\n long joinStartTime = Clock.currentTimeMillis();\n long maxJoinMillis = node.getGroupProperties().MAX_JOIN_SECONDS.getInteger() * 1000;\n while (node.isActive() && !joined.get() && (Clock.currentTimeMillis() - joinStartTime < maxJoinMillis)) {... |
"protected Void execute(PingCmd command) {\n WebTarget webResource = getBaseResource().path(\"String_Node_Str\");\n LOGGER.trace(\"String_Node_Str\", webResource);\n webResource.request().get().close();\n return null;\n}\n"
|
"public ChangeColumnValueAssert valueAtEndPoint() {\n if (changeColumnValueAssertAtEndPoint == null) {\n String string = \"String_Node_Str\" + info.descriptionText();\n changeColumnValueAssertAtEndPoint = new ChangeColumnValueAssert(this, valueAtEndPoint).as(string);\n }\n return changeColumnValu... |
"public void teleport(CommandSource source, String[] args, Player player, double x, double y, double z, float... direction) {\n if (player == null) {\n source.sendMessage(ChatComponent.create().setColor(ChatColor.RED).setText(\"String_Node_Str\" + args[1] + \"String_Node_Str\"));\n } else {\n float ... |
"protected ImportHistory process(String bind, String data) {\n XMLImporter importer = new XMLImporter(bind, data);\n ImporterListener listener = new ImporterListener(getConfiguration().getName());\n importer.addListener(listener);\n importer.run();\n return addHistory(listener);\n}\n"
|
"public static String parseDate(String timestamp, String fromFormat, String toFormat) {\n SimpleDateFormat from = new SimpleDateFormat(fromFormat, Locale.getDefault());\n SimpleDateFormat to = new SimpleDateFormat(toFormat, Locale.getDefault());\n try {\n Date date = from.parse(timestamp);\n retu... |
"protected void finalize() {\n for (FileChannel fc : streamFileChannels) {\n if (fc != null) {\n try {\n fc.close();\n } catch (IOException e) {\n }\n }\n }\n super.finalize();\n}\n"
|
"public EntityManagerFactory createEntityManagerFactory(String emName, Map map) {\n try {\n Map integration = map == null ? CollectionHelper.EMPTY_MAP : Collections.unmodifiableMap(map);\n Enumeration<URL> persistenceXml = Thread.currentThread().getContextClassLoader().getResources(\"String_Node_Str\")... |
"public Command getAcquireCommand() {\n Command acquire;\n acquire = new Command(Locale.get(\"String_Node_Str\"), Command.SCREEN, 3);\n acquire = new Command(\"String_Node_Str\", Command.SCREEN, 3);\n return acquire;\n}\n"
|
"public String getValueSoFar() {\n Assert.isNotNull(this.valueSoFar, \"String_Node_Str\");\n return this.valueSoFar;\n}\n"
|
"private Element appendContext(Element root) {\n context = root.addElement(\"String_Node_Str\");\n context.addAttribute(\"String_Node_Str\", MybatisConfigReader.DEFAULT_CONTEXT_ID);\n context.addAttribute(\"String_Node_Str\", MybatisConfigReader.TARGET_RUNTIME);\n return context;\n}\n"
|
"protected IValue resolveCall(MarkerList markers, IContext context) {\n int args = this.arguments.size();\n if (args == 1) {\n IValue op;\n if (this.instance != null) {\n op = Operators.getPriority(this.instance, this.name, this.arguments.getFirstValue());\n } else {\n o... |
"public DateFormat getDateFormat() {\n return dateFormat;\n}\n"
|
"public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n long messageId = generatedMessageId++;\n if (method.getName().equals(\"String_Node_Str\")) {\n endPoint.flush();\n return null;\n }\n times--;\n if (times == 0) {\n timestamp = Timer.timer().now();... |
"public void testTags() {\n NetworkDaoImpl dao = ComponentLocator.inject(NetworkDaoImpl.class);\n dao.expunge(1001l);\n NetworkVO network = new NetworkVO(1001, TrafficType.Control, GuestIpType.Direct, Mode.Dhcp, BroadcastDomainType.Native, 1, 1, 1, 1, 1001, \"String_Node_Str\", \"String_Node_Str\", false, true... |
"protected JSONObject loadDefaultConfigurations() {\n JSONObject globalJson = DefaultConfigurationManager.loadDefaultFile(AbstractDistribution.class, getDistribution().toLowerCase());\n if (getVersion() != null) {\n JSONObject versionJson = DefaultConfigurationManager.loadDefaultFile(this.getClass(), getVe... |
"public Icon getIcon(File iconType) throws IOException {\n if (iconType.isDirectory())\n return FileSystemView.getFileSystemView().getSystemIcon(iconType);\n String name = FilenameUtils.getName(iconType.getName());\n String ext = FilenameUtils.getExtension(iconType.getName());\n if (\"String_Node_Str... |
"public Vec3d getCouplerPosition(CouplerType coupler) {\n if (coupler == CouplerType.FRONT) {\n return predictRearBogeyPosition(pos, (float) (this.getDefinition().getLength() / 2 + Config.couplerRange + this.getDefinition().getBogeyRear())).add(pos.position).addVector(0, 1, 0);\n } else {\n return p... |
"public void testTwoTopLevelTypesInAFile() {\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\");\n}\n"
|
"public void setPosition(Vector3 position) {\n this.position = position;\n polyhedron.setPosition(position);\n getLocalTransform().reset().rotate(Vector3.AXIS_X, polyhedron.getRotationX()).rotate(Vector3.AXIS_Z, polyhedron.getRotationZ()).rotate(Vector3.AXIS_Y, polyhedron.getRotationY()).translate(getPosition(... |
"public void start(Squad squad) {\n World world = squad.getWorld();\n float radius = (float) world.getRandom().getRandomRange(100f, 150f);\n directionsToDefend.addAll(world.getAttackDirections(this.defendPosition, radius, 12));\n}\n"
|
"private Field[] fetchSFDescriptionField(String module, org.talend.salesforce.SforceManagement sforceManagement) {\n DescribeSObject d = new DescribeSObject();\n d.setSObjectType(module);\n SessionHeader sh = sforceManagement.getSessionHeader();\n DescribeSObjectResult r;\n try {\n r = sforceManag... |
"public List<ExportFileResource> getExportResources(ExportFileResource[] process, String... codeOptions) throws ProcessorException {\n for (int i = 0; i < process.length; i++) {\n ProcessItem processItem = (ProcessItem) process[i].getItem();\n String libPath = calculateLibraryPathFromDirectory(process[... |
"public int getBackgroundColor(DesignElementHandle handle) {\n Object obj = handle.getProperty(StyleHandle.BACKGROUND_COLOR_PROP);\n if (obj == null) {\n return 0xFFFFFF;\n }\n return color;\n}\n"
|
"public String getName() {\n final Element nameNode = ElementUtils.contains(getRoot(), NAME, 1);\n if (nameNode != null)\n return nameNode.getText();\n else\n return null;\n}\n"
|
"public void onResponseOk(ListOrganizations organizations, Response r) {\n if (organizations != null && organizations.size() > 0) {\n textOrgs.setText(view.getContext().getString(R.string.orgs_num, organizations.size()));\n } else {\n view.findViewById(R.id.orgs).setVisibility(View.GONE);\n v... |
"public boolean destroyTurret() {\n TileEntity ent = this.worldObj.getBlockTileEntity(this.xCoord + this.getTurretDirection().offsetX, this.yCoord + this.getTurretDirection().offsetY, this.zCoord + this.getTurretDirection().offsetZ);\n if (ent instanceof TileTurret) {\n this.cachedTurret = null;\n (... |
"void add(Node n, Context context) {\n if (!cc.continueProcessing()) {\n return;\n }\n int type = n.getType();\n String opstr = NodeUtil.opToStr(type);\n int childCount = n.getChildCount();\n Node first = n.getFirstChild();\n Node last = n.getLastChild();\n if (opstr != null && first != l... |
"public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(NetworkMonitorService.NEW_ENDPOINT)) {\n String address = (String) intent.getExtras().get(NetworkMonitorService.ENDPOINT_ADDRESS), hardware = (String) intent.getExtras().get(NetworkMonitorService.ENDPOINT_HARDWARE);\n ... |
"private static int[][] form(int n, int m) {\n int[][] d = new int[n + 1][m + 1];\n for (int i = 0; i <= n; i++) {\n d[i][0] = i * 2;\n }\n for (int j = 0; j <= m; j++) {\n d[0][j] = j;\n }\n return d;\n}\n"
|
"public ArrayList<File> filter(File[] file_list, boolean onlyDirs, boolean showHidden) {\n ArrayList<File> files = new ArrayList<File>();\n if (file_list != null) {\n for (File file : file_list) {\n if (onlyDirs && !file.isDirectory())\n continue;\n if (!showHidden && f... |
"public void handleEvent(Event event) {\n TreeItem item = (TreeItem) event.item;\n if (event.item.getData() instanceof CssStyleSheetHandle || event.item.getData() instanceof CssSharedStyleHandle) {\n Color gray = Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);\n if (!item.getForeground().e... |
"public void putGlobal(String whereSql, String clusterName, String tableName, List data) {\n if (StringUtil.isBlank(whereSql) || data == null || data.isEmpty()) {\n return;\n }\n try {\n String versionKey = _buildGlobalVersion(clusterName, tableName);\n int version = r.nextInt(10000);\n ... |
"public void showDialog(Deck deck) {\n this.deck = deck;\n for (String setCode : deck.getExpansionSetCodes()) {\n ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode);\n if (expansionInfo.hasBasicLands()) {\n this.setCodesland.add(expansionInfo.getCode());\n ... |
"protected void setUp() throws Exception {\n super.setUp();\n cells[0] = new CellArea(10, 10, 40, 40);\n cells[1] = new CellArea(50, 10, 40, 40);\n cells[2] = new CellArea(90, 10, 40, 40);\n cells[2].defineBorder(BorderInfo.RIGHT_BORDER, 6);\n cells[2].defineBorder(BorderInfo.RIGHT_BORDER, Color.orang... |
"public boolean equals(Object obj) {\n boolean ret = false;\n if (obj instanceof GridPlayer) {\n GridPlayer test = (GridPlayer) obj;\n ret = (id == test.id);\n }\n return ret;\n}\n"
|
"public void testIArrayLike11() throws Exception {\n testTypesWithExtraExterns(EXTERNS_WITH_IARRAYLIKE_DECLS, LINE_JOINER.join(\"String_Node_Str\", \"String_Node_Str\"), LINE_JOINER.join(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n}\n"
|
"public void notifyDataSetChanged() {\n super.notifyDataSetChanged();\n tabs.notifyDataSetChanged();\n for (int i = 0; i < fragments.size(); i++) {\n fragments.get(i).updateHeader(getPageTitle(i).toString());\n }\n}\n"
|
"public IResultObject fetch() throws IOException, DataException {\n if (rowBuffer == null) {\n prepareFirstFetch();\n }\n if (rowBufferSize == 0) {\n return null;\n }\n ValueIndex reObj = rowBuffer[0];\n IResultObject value = reObj.value;\n IResultObject readValue = subRowIterators[re... |
"public ValueResult execute(final GetValue cmd, final UserExecutionContext context) throws CommandException {\n LOG.debug(\"String_Node_Str\", cmd);\n final ValueResult valueResult = new ValueResult();\n String historyValue = null;\n if (cmd.getAmendmentId() != null) {\n final TypedQuery<Amendment> a... |
"public void testCopyFromFile() throws Exception {\n execute(\"String_Node_Str\" + \"String_Node_Str\");\n ensureYellow();\n execute(\"String_Node_Str\", new Object[] { copyFilePath + \"String_Node_Str\" });\n assertEquals(3L, response.rowCount());\n refresh();\n execute(\"String_Node_Str\");\n ass... |
"public String getTableComment(IMetadataConnection metadataConnection, ResultSet resultSet, String nameKey) throws SQLException {\n if (EDatabaseVersion4Drivers.ORACLE_8.getVersionValue().equals(metadataConnection.getDbVersionString())) {\n return ExtractMetaDataFromDataBase.getTableComment(nameKey, resultSet... |
"public void listenToValueChangesOfElement(final FlexibleElementDTO element, final Component component, final List<ValueEvent> modifications) {\n if (element instanceof ComputationElementDTO) {\n final Field<String> field = (Field<String>) component;\n components.put(element, field);\n elementsW... |
"public void layout(Object composite) {\n long overallTime = System.currentTimeMillis();\n _report(\"String_Node_Str\");\n long graphOverhead = overallTime;\n KNode parentNode = KimlUtil.createInitializedNode();\n KShapeLayout parentLayout = parentNode.getData(KShapeLayout.class);\n Options._configure... |
"private void processCurrentPacket() {\n if (currentDtvCcPacket.currentIndex != (currentDtvCcPacket.packetSize * 2 - 1)) {\n Log.w(TAG, \"String_Node_Str\" + (currentDtvCcPacket.packetSize * 2 - 1) + \"String_Node_Str\" + currentDtvCcPacket.currentIndex + \"String_Node_Str\" + currentDtvCcPacket.sequenceNumbe... |
"public static int moveItem(IInventory fromInventory, int slot, IInventory targetInventory, int maxAmount, ForgeDirection side) {\n int merged = 0;\n ItemStack stack = fromInventory.getStackInSlot(slot);\n if (stack == null) {\n return 0;\n }\n if (fromInventory instanceof ISidedInventory) {\n ... |
"private String getLoginSuccessResponse(HttpSession session, String responseType) {\n StringBuffer sb = new StringBuffer();\n int inactiveInterval = session.getMaxInactiveInterval();\n if (BaseCmd.RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {\n sb.append(\"String_Node_Str\");\n Enumeration... |
"public boolean getBoolean(DelayedCellSetter<T, ?>[] target) throws Exception {\n return ((BooleanDelayedCellSetter<T>) target[index]).consumeBoolean();\n}\n"
|
"public static ConfigOption[] createConfigOptionsFromJCommander(final Object createOptionsInstance) {\n ConfigOption[] opts = null;\n if (createOptionsInstance != null) {\n final JCommanderPrefixTranslator translator = new JCommanderPrefixTranslator();\n translator.addObject(createOptionsInstance);\... |
"private ClassNode configureSourceType(SourceTypeBinding type) {\n return new JDTClassNode(type, resolver);\n}\n"
|
"private void createInputLoopTable(TreeNode sourceNode, OutputTreeNode targetOutputNode) {\n TreeNode loopParentTreeNode = XmlMapUtil.getLoopParentNode((TreeNode) sourceNode);\n InputLoopNodesTable inputLoopNodesTable = null;\n AbstractInOutTree abstractTree = XmlMapUtil.getAbstractInOutTree(targetOutputNode);... |
"public boolean removeMapping(SchemaMapping mapping) {\n return mappings.remove(mapping);\n}\n"
|
"public ILoginTask[] getAllCommandlineTaskListInstance() {\n List<ILoginTask> commandlineTask = new ArrayList<ILoginTask>();\n ILoginTask[] allTask = getAllTaskListInstance();\n for (ILoginTask task : allTask) {\n if (task.isCommandlineTask()) {\n commandlineTask.add((LoginTask) task);\n ... |
"protected void mergeSystemIndicator(ItemRecord record, TDQIndicatorDefinitionItem siDefItem) {\n boolean isModified = false;\n IndicatorDefinition siDef = siDefItem.getIndicatorDefinition();\n Property siProp = siDefItem.getProperty();\n IndicatorDefinition indDef = (IndicatorDefinition) record.getElement(... |
"public void testNoProcedureCall() throws Exception {\n Map<String, String> content = ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n HttpResponse response = POST(\"String_Node_Str\", new Gson().toJson(content, new TypeToken<Map<String, String>>() {\n }.ge... |
"private boolean isStoredPlayerStatePaused() {\n switch(mStoredPState.mpState) {\n case PAUSED:\n case PREPARED_AUDIO:\n case PREPARED:\n return true;\n }\n return false;\n}\n"
|
"public JobPo getJob(String taskTrackerNodeGroup, String taskId) {\n return new SelectSql(getSqlTemplate()).select().all().from().table(getTableName(taskTrackerNodeGroup)).where(\"String_Node_Str\", taskId).and(\"String_Node_Str\", taskTrackerNodeGroup).single(RshHolder.JOB_PO_RSH);\n}\n"
|
"public Object resolveParameter(Annotation anno, Class<?> returnType) {\n final String name = ((ScopeParam) anno).value();\n final Scope[] ss = ((ScopeParam) anno).scopes();\n for (Scope s : ss) {\n switch(s) {\n case AUTO:\n if (ss.length == 1) {\n return _c... |
"public int getBound(DFAAppInfo program, InstructionHandle instr) {\n ContextMap<CallString, Pair<ValueMapping>> r = bounds.get(instr);\n if (r == null) {\n return -1;\n }\n int maxValue = -1;\n for (Iterator<CallString> k = r.keySet().iterator(); k.hasNext(); ) {\n CallString callString = ... |
"void parseResponse(JSONObject response) throws JSONException {\n FollowersModel model = new FollowersModel(1234567890, response);\n assertEquals(model.getTotalEmail(), 2930);\n assertEquals(model.getTotalWPCom(), 7925800);\n assertEquals(model.getTotal(), 7925800);\n assertEquals(model.getPage(), 1);\n ... |
"public synchronized boolean addSSRC(long ssrc) {\n for (long element : ssrcs) if (element == ssrc)\n return false;\n int[] newSSRCs = new int[ssrcs.length + 1];\n System.arraycopy(ssrcs, 0, newSSRCs, 0, ssrcs.length);\n newSSRCs[ssrcs.length] = ssrc;\n ssrcs = newSSRCs;\n return true;\n}\n"
|
"public DescribeRegionsResponseType DescribeRegions(DescribeRegionsType request) {\n DescribeRegionsResponseType reply = (DescribeRegionsResponseType) request.getReply();\n SystemConfiguration config = SystemConfiguration.getSystemConfiguration();\n reply.getRegionInfo().add(new RegionInfoType(\"String_Node_St... |
"private Sound[] fromAudioInputStream(AudioInputStream ais) throws IOException {\n this.notifyAll(\"String_Node_Str\");\n int channels = ais.getFormat().getChannels();\n int currentChannel = 0;\n Sound[] ret = new Sound[channels];\n int length = (int) ais.getFrameLength();\n for (int channel = 0; chan... |
"public void documentEnd() {\n if (currentChain != null) {\n currentChain.addGroup(currentGroup);\n if (isKnownChain(currentChain.getId(), currentModel) == null) {\n currentModel.add(currentChain);\n }\n } else if (!params.isHeaderOnly()) {\n logger.warn(\"String_Node_Str\")... |
"protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n super.onLayout(changed, left, top, right, bottom);\n boolean updateExpandHeight = mMaxExpandHeight == 0 && !mWasReset;\n updateMaxExpandHeight();\n if (updateExpandHeight) {\n applyExpansionToLayout();\n }\n ... |
"public static List<Map<String, CtVariable>> findAllVarMappingCombination(Map<VarAccessWrapper, List<CtVariable>> mappedVars, NGramManager managerngram) {\n if (mappedVars.isEmpty()) {\n return new ArrayList<Map<String, CtVariable>>();\n }\n List<VarAccessWrapper> varsNamesToCombine = new ArrayList<>(ma... |
"public void run() {\n mCalendarView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;\n mWeeksView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;\n for (AbstractViewHolder view : mViews) {\n view.onFinish(true);\n }\n if (!expanded) {\n CalendarManager manage... |
"private void parseRecord(ConsumerRecord record) {\n try {\n if (record.value() instanceof String) {\n String value = (String) record.value();\n CommandMessage message = MAPPER.readValue(value, CommandMessage.class);\n doControllerMsg((CommandMessage) message);\n } else... |
"public void onEntityTarget(EntityTargetEvent event) {\n if (NPCManager.isNPC(event.getTarget())) {\n event.setCancelled(true);\n }\n if (!(event instanceof NPCEntityTargetEvent)) {\n return;\n }\n NPCEntityTargetEvent e = (NPCEntityTargetEvent) event;\n HumanNPC npc = NPCManager.get(e.g... |
"public ExpandableView getChildAtPosition(float touchX, float touchY) {\n final int count = getChildCount();\n for (int childIdx = 0; childIdx < count; childIdx++) {\n ExpandableView slidingChild = (ExpandableView) getChildAt(childIdx);\n if (slidingChild.getVisibility() == GONE) {\n cont... |
"public void execute(UUID playerId) {\n getGameSession(playerId).sendPlayerManaType(data, manaTypePlayerId);\n}\n"
|
"private String getAccessURLs(Cartridge cartridge) {\n PortMapping[] portMappings = cartridge.getPortMappings();\n StringBuilder urlBuilder = new StringBuilder();\n if (accessURLs != null) {\n for (int i = 0; i < accessURLs.length; i++) {\n String url = accessURLs[i];\n if (url != ... |
"public void unsubscribe(URLServiceSubscription<?> subscription) {\n if (socket != null)\n socket.unsubscribe(subscription);\n}\n"
|
"public void setFundamental(DenseMatrix64F F, Point3D_F64 e2) {\n this.F = F;\n if (e2 != null)\n this.e2.set(e2);\n else {\n MultiViewOps.extractEpipoles(F, new Point3D_F64(), e2);\n }\n}\n"
|
"public boolean activate(Game game, boolean noMana) {\n Player controller = game.getPlayer(this.getControllerId());\n if (controller == null) {\n return false;\n }\n game.applyEffects();\n if (!getModes().choose(game, this)) {\n return false;\n }\n getSourceObject(game);\n if (cont... |
"public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {\n DataCenter dc = _dcDao.findById(network.getDataCenterId());\n NetworkOffering o... |
"private byte[] readStandard(DataInputStream in, PassthroughConnection ptc, KillableThread thread, byte[] buffer) {\n if (length == null) {\n return null;\n }\n if (length < 0) {\n compressed = true;\n length = -length;\n }\n setupBuffer(buffer);\n int pos = 0;\n while (pos < l... |
"private void addIgnoredVoxels(int x, int y, int z) {\n int[] pos = new int[] { x, y, z };\n Path invertedPath = path.invertPath();\n invertedPath.init(pos, grid.getWidth(), grid.getHeight(), grid.getDepth());\n while (invertedPath.next(pos)) {\n VoxelData vd = grid.getData(pos[0], pos[1], pos[2]);\n... |
"public void startRequest(MRCRequest rq) throws Throwable {\n if (master.getReplMasterUUID() != null && !master.getReplMasterUUID().equals(master.getConfig().getUUID().toString()))\n throw new DatabaseException(ExceptionType.REDIRECT);\n final XCap xcap = (XCap) rq.getRequestArgs();\n Capability writeCa... |
"public static String getLongLikeLabelText(Context context, int numLikes, boolean isLikedByCurrentUser) {\n if (isLikedByCurrentUser) {\n switch(numLikes) {\n case 1:\n return context.getString(R.string.reader_likes_only_you);\n case 2:\n return context.getS... |
"public double dYdP0() {\n return -1088.232716447743 + (1050.775747149553 + (-339.012934631828 + 36.52917025056327 * b) * b) * b;\n}\n"
|
"public static void threshold(String imageName) {\n BufferedImage image = UtilImageIO.loadImage(imageName);\n ImageFloat32 input = ConvertBufferedImage.convertFromSingle(image, null, ImageFloat32.class);\n ImageUInt8 binary = new ImageUInt8(input.width, input.height);\n ListDisplayPanel gui = new ListDispla... |
"public void printVariablesToFile(String path) {\n try {\n FileOutputStream fos = new FileOutputStream(path);\n OutputStreamWriter osw = new OutputStreamWriter(fos);\n BufferedWriter bw = new BufferedWriter(osw);\n if (size() > 0) {\n int numberOfVariables = solutionsList_.get(... |
"public void dumpControllerStateLocked(PrintWriter pw) {\n pw.println(\"String_Node_Str\");\n for (int i = 0; i < mTrackedJobs.size(); i++) {\n final JobStatus js = mTrackedJobs.get(i);\n if (js.shouldDump(filterUid)) {\n pw.println(String.valueOf(js.getJobId() + \"String_Node_Str\" + js.... |
"public int hashCode() {\n return new HashCodeBuilder().append(file).append(type).append(hints).toHashCode();\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.