content stringlengths 40 137k |
|---|
"boolean isSelected(String className, ProtectionDomain protectionDomain) {\n CodeSource codeSource = protectionDomain.getCodeSource();\n if (codeSource == null || isIneligibleForSelection(className) || !canAccessJMockitFromClassToBeMeasured(protectionDomain)) {\n return false;\n }\n URL location = fi... |
"public TransactionParser getParser(String name, String namespace, KXmlParser parser) {\n if (StockXmlParsers.STOCK_XML_NAMESPACE.equals(namespace)) {\n return new StockXmlParsers(parser, CommCareApplication._().getUserStorage(Stock.STORAGE_KEY, Stock.class));\n } else if (name.toLowerCase().equals(\"Strin... |
"public BufferProvider getBufferProvider(final JobID jobID, final ChannelID sourceChannelID) throws IOException, InterruptedException {\n final TransferEnvelopeReceiverList receiverList = getReceiverList(jobID, sourceChannelID);\n if (receiverList.hasLocalReceivers() && !receiverList.hasRemoteReceivers()) {\n ... |
"public void tearDown() throws Exception {\n if (app != null)\n Entities.destroyAll(app.getManagementSupport().getManagementContext());\n if (pseudoBrooklynPropertiesFile != null)\n pseudoBrooklynPropertiesFile.delete();\n if (pseudoBrooklynCatalogFile != null)\n pseudoBrooklynCatalogFile.... |
"public double evaluateDouble(Evaluator evaluator) {\n List memberList = evaluateCurrentList(listCalc, evaluator);\n return (Double) (max ? max(evaluator.push(false), memberList, calc) : min(evaluator.push(false), memberList, calc));\n}\n"
|
"private void internalRun() {\n ImhotepRequest protoRequest = null;\n try {\n final InputStream is = Streams.newBufferedInputStream(socket.getInputStream());\n final OutputStream os = Streams.newBufferedOutputStream(socket.getOutputStream());\n final int ndcDepth = NDC.getDepth();\n fi... |
"public String toString(String path, boolean pcode, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo[] method_info, Stack<GraphTargetItem> scopeStack, boolean isStaticInitializer, boolean hilight, List<String> fullyQualifiedNames, Traits initTraits) {\n String s = \"Stri... |
"public List<?> getResultList() {\n log.info(\"String_Node_Str\" + query);\n List results = null;\n EntityMetadata m = getEntityMetadata();\n Client client = persistenceDelegeator.getClient(m);\n if (!m.isRelationViaJoinTable() && (m.getRelationNames() == null || (m.getRelationNames().isEmpty()))) {\n ... |
"private static int[] getStrides(int[] dims) {\n int rightmost = dims.length - 1;\n int[] strides = new int[dims.length];\n if (dims.length > 0) {\n strides[rightmost] = 1;\n for (int i = rightmost - 1; i >= 0; i--) {\n strides[i] = dims[i + 1] * strides[i + 1];\n }\n }\n ... |
"protected void initialize() {\n setStacked(false);\n setVisible(true);\n final Label la = LabelImpl.create();\n LineAttributes lia = LineAttributesImpl.create(ColorDefinitionImpl.BLACK(), LineStyle.SOLID_LITERAL, 1);\n la.setOutline(lia);\n lia.setVisible(false);\n setLabel(la);\n setSeriesIden... |
"public static Plugin findByCommand(String command) {\n for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {\n Map<String, Map<String, Object>> commands = plugin.getDescription().getCommands();\n if (commands != null) {\n Iterator<Map.Entry<String, Map<String, Object>>> commandIter... |
"public void setSelected(boolean selected) {\n _isSelected = selected;\n if (_isSelected) {\n _label.setColor(Color.orange);\n } else {\n _label.setColor(Color.black);\n }\n}\n"
|
"public ReportArtEntity generateReportArt(ReportArtEntity report) {\n log.debug(\"String_Node_Str\");\n final Map<String, BucketUsageArtEntity> bucketUsageEntities = new HashMap<String, BucketUsageArtEntity>();\n final Map<S3ObjectKey, S3ObjectData> objectData = new HashMap<S3ObjectKey, S3ObjectData>();\n f... |
"public void setHexModel(MapHex model) {\n this.model = model;\n currentTile = model.getCurrentTile();\n hexName = model.getId();\n currentTileId = model.getCurrentTile().getNb();\n currentTileOrientation = model.getCurrentTileRotation();\n currentGUITile = new GUITile(currentTiled, this);\n curren... |
"private void show_edit_dialog(int position) {\n poser = position;\n final LayoutInflater inflater = LayoutInflater.from(activity_context);\n final View edit_rss_dialog = inflater.inflate(R.layout.add_rss_dialog, null);\n final List<List<String>> content = read_csv_to_list(new String[] { storage + \"String_... |
"public static boolean isValidName(String name) {\n return isValidArtifactId(name);\n}\n"
|
"public static String toHexString(byte[] coded, int offsetStart, int offsetEnd) {\n if (coded == null) {\n return \"String_Node_Str\";\n }\n StringBuilder result = new StringBuilder(length * 3);\n for (int i = 0; i < length; i++) {\n int c = coded[i + offset];\n if (c < 0) {\n ... |
"public Object visitForeign(IForeignContent foreign, Object value) {\n if (IForeignContent.HTML_TYPE.equals(foreign.getRawType())) {\n if (converter == null) {\n converter = new HTML2Content(foreign.getReportContent().getDesign().getReportDesign());\n }\n converter.html2Content(foreig... |
"void doAfterTextChanged() {\n if (mBlockCompletion)\n return;\n if (DEBUG)\n Log.v(TAG, \"String_Node_Str\" + mOpenBefore + \"String_Node_Str\" + isPopupShowing());\n if (mOpenBefore && !isPopupShowing()) {\n return;\n }\n performFiltering(getText(), mLastKeyCode);\n}\n"
|
"protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n setMeasuredDimension(mBitmap.getWidth(), mBitmap.getHeight());\n}\n"
|
"public void createOrUpdate(Product p) {\n Product existing = lookupById(p.getOwner(), p.getProductId());\n if (existing == null) {\n create(p);\n } else {\n merge(p);\n }\n}\n"
|
"public Vector solve() {\n Matrix J = objective.getJ();\n Vector y = objective.getY();\n int n = J.getColumnDimension();\n switch(method) {\n case CHOLESKY_DECOMPOSITION:\n CholeskyDecomposition choleskyDecomposition = new CholeskyDecomposition(J.transpose().multiply(J));\n try ... |
"protected Type _getTypeForName(String name) throws IllegalActionException {\n if (_scope != null) {\n type = _scope.getType(name);\n if (type != null && !(type instanceof ObjectType)) {\n return type;\n }\n }\n if (Constants.get(name) != null) {\n return Constants.get(na... |
"private TreeSet<Integer> computeTriggerLocations(int offset, ASTNode completionNode, ASTNode completionNodeParent, int length) {\n TreeSet<Integer> triggerlocations = Sets.newTreeSet();\n int emptyPrefix = offset - length;\n triggerlocations.add(emptyPrefix);\n int triggerOffset = Math.min(prefs.minPrefixL... |
"public void destroy() {\n threadService.runActionLater(() -> {\n ObservableList<Tab> tabs = this.getTabPane().getTabs();\n tabs.remove(this);\n threadService.start(() -> {\n Optional.ofNullable(process).ifPresent(Process::destroy);\n process.exitValue();\n });\n ... |
"protected HighlightRuleDesign createHighlightRule(StructureHandle ruleHandle, String defaultStr) {\n HighlightRuleDesign rule = new HighlightRuleDesign();\n if (isListStyle) {\n rule.setExpression(ruleHandle.getOperator(), ruleHandle.getValue1List());\n } else {\n rule.setExpression(ruleHandle.g... |
"public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n XMLField field = null;\n Object value = this.getStringBuffer().toString();\n resetStringBuffer();\n boolean isSwaRef = false;\n if (isCollection) {\n isSwaRef = ((XMLBinaryDataCollectionMapping) ma... |
"public EveObject execute(Map<String, EveObject> parameters) {\n String className = parameters.get(\"String_Node_Str\").getStringValue();\n try {\n Class<?> cl = Class.forName(className);\n EveObject ctorFunc = EJIHelper.createEJIConstructor(cl);\n EveObject pkgContainer = resolveJavaPackageC... |
"public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {\n try {\n SingleMassArgs args = (SingleMassArgs) this.getProcessArgs();\n RampartConfiguration config = new RampartConfiguration();\n config.load(args.getConfig());\n args.v... |
"public void start(int period) {\n this.period = period;\n log.info(\"String_Node_Str\");\n schedulerHandler = timer.scheduleAtFixedRate(this, period, period, TimeUnit.MINUTES);\n}\n"
|
"public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n if (getArguments() != null) {\n adapter = new CommitFilesAdapter(LayoutInflater.from(getActivity()));\n issueInfo = (IssueInfo) getArguments().getParcelable(INFO);\n recyclerV... |
"public static PartitionName toPartitionName(TableInfo tableInfo, List<Assignment> partitionProperties, Object[] parameters) {\n Preconditions.checkArgument(tableInfo.isPartitioned(), \"String_Node_Str\", tableInfo.ident().fqn());\n Preconditions.checkArgument(partitionProperties.size() == tableInfo.partitionedBy... |
"public void execute(ICommandSender sender, String[] args) {\n if (args.length < 5) {\n sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + \"String_Node_Str\"));\n return;\n } else if (args.length > 5) {\n sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + ... |
"public String customerEditExecute() {\n validateOnSubmit(customer);\n if (hasActionErrors()) {\n return INPUT;\n customerService.updateCustomer(transformToEntityBean(customer));\n clearErrorsAndMessages();\n addActionMessage(\"String_Node_Str\");\n return SUCCESS;\n}\n"
|
"public Member set(int index, Member element) {\n return list.get(index).set(column, element);\n}\n"
|
"protected void doHiveDistributionModify() {\n IHDistribution newHiveDistribution = getCurrentHiveDistribution(false);\n if (newHiveDistribution == null) {\n return;\n }\n String distributionObj = getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_DISTRIBUTION);\n IHDistribut... |
"private GiraphConfiguration getConfiguration() {\n GiraphConfiguration conf = new GiraphConfiguration();\n conf.setComputationClass(KwayPartitioningComputation.class);\n conf.setMasterComputeClass(KwayPartitioningMasterComputation.class);\n conf.setVertexInputFormatClass(IntIntNullTextVertexInputFormat.cla... |
"private void addJava2SecurityPropertiesToBootstrapFile(RemoteFile f) throws Exception {\n java.io.OutputStream w = f.openForWriting(true);\n try {\n w.write(\"String_Node_Str\".getBytes());\n w.write(\"String_Node_Str\".getBytes());\n w.write(\"String_Node_Str\".getBytes());\n w.write... |
"public static void determineIconSize(int trayType) {\n if (SystemTray.AUTO_TRAY_SIZE) {\n if (OS.isWindows()) {\n trayScale = SystemTray.DEFAULT_WINDOWS_SIZE;\n menuScale = SystemTray.DEFAULT_MENU_SIZE;\n } else {\n if (trayType == SystemTray.TYPE_SWING || trayType == ... |
"public boolean apply(Game game, Ability source) {\n MageObject sourceObject = game.getObject(source.getSourceId());\n Player targetPlayer = game.getPlayer(source.getFirstTarget());\n String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);\n if (sourc... |
"private void moveOutputToNextAvailableSpot(ScriptTask task) {\n OutputModel outputModel = task.getScriptModel().getOutputModel();\n File oldFile = outputModel.getFile();\n if (oldFile != null && oldFile.exists() && oldFile.isFile() && oldFile.canRead()) {\n String outputExtension = \"String_Node_Str\" ... |
"public void resetTitle() {\n this.net().sendPacket(new PlayOutTitle.Reset());\n}\n"
|
"public void testFindWithOutClusterId() {\n final Specification<Job> spec = JobSpecs.find(ID, JOB_NAME, USER_NAME, JobStatus.INIT, TAGS, CLUSTER_NAME, null);\n spec.toPredicate(this.root, this.cq, this.cb);\n Mockito.verify(this.cb, Mockito.times(1)).like(this.root.get(Job_.id), ID);\n Mockito.verify(this.c... |
"public String getText(Mode mode) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\").append(filter.getMessage());\n return sb.toString();\n}\n"
|
"<T> Journal<T> reader(JournalMetadata<T> metadata) throws JournalException {\n if (closed == TRUE) {\n LOG.info().$(\"String_Node_Str\");\n throw FactoryClosedException.INSTANCE;\n }\n String name = metadata.getName();\n Entry e = entries.get(name);\n long thread = Thread.currentThread().g... |
"public void execute(String commandExec) throws BuildException {\n log(\"String_Node_Str\" + commandExec);\n String installDirectory = getInstallDir();\n if (installDirectory == null) {\n log(\"String_Node_Str\", Project.MSG_WARN);\n return;\n }\n File f = new File(installDirectory);\n i... |
"public static String sanitize(String main) {\n return main.replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").replace... |
"public String getNextOghatTime(Context context, Clock clock, boolean changeDate) {\n Coordinate coordinate = getCoordinate(context);\n if (coordinate != null) {\n char[] digits = preferredDigits(context);\n boolean clockIn24 = clockIn24(context);\n if (prayTimesCalculator == null) {\n ... |
"public List<VMTemplateStoragePoolVO> listByTemplateStatus(long templateId, long datacenterId, long podId, VMTemplateStoragePoolVO.Status downloadState) {\n TransactionLegacy txn = TransactionLegacy.currentTxn();\n PreparedStatement pstmt = null;\n List<VMTemplateStoragePoolVO> result = new ArrayList<VMTemplat... |
"private void scheduleRefresh() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n timer = new Timer();\n refreshed = true;\n timer.schedule(new TimerTask() {\n public void run() {\n refreshed = false;\n }\n }, 1000 * 60 * 5, 1000 * 60 * 5);\n}\n"
|
"public static <K, V extends Comparable<? super V>> SortedSet<Entry<K, V>> sortMapByValueDescending(Map<K, V> map) {\n SortedSet<Entry<K, V>> sorted = new TreeSet<>(new Comparator<Entry<K, V>>() {\n public int compare(Entry<K, V> e1, Entry<K, V> e2) {\n int r = e2.getValue().compareTo(e1.getValue()... |
"protected void doRun() throws EngineException {\n doValidateParameters();\n loadDesign();\n prepareDesign();\n startFactory();\n openReportDocument();\n try {\n ReportRunnable report = executionContext.getRunnable();\n writer.saveDesign(report);\n writer.saveParamters(inputValues... |
"public void execute(OperationParams params) throws Exception {\n if (parameters.size() != 1) {\n throw new ParameterException(\"String_Node_Str\");\n }\n String inputStoreName = parameters.get(0);\n File configFile = (File) params.getContext().get(ConfigOptions.PROPERTIES_FILE_CONTEXT);\n if (inp... |
"public void objectToXMLStringWriter(Object objectToWrite) throws Exception {\n StringWriter writer = new StringWriter();\n XMLDescriptor desc = null;\n if (objectToWrite instanceof XMLRoot) {\n desc = (XMLDescriptor) xmlContext.getSession(0).getProject().getDescriptor(((XMLRoot) objectToWrite).getObjec... |
"protected void start(boolean isFirst) {\n if (emitter != null) {\n context.getPageBufferManager().startContainer(content, isFirst, emitter, true);\n }\n}\n"
|
"public List typeConstraintList() {\n try {\n _workspace.getReadAccess();\n List result = new LinkedList();\n Iterator inPorts = inputPortList().iterator();\n while (inPorts.hasNext()) {\n TypedIOPort inport = (TypedIOPort) inPorts.next();\n boolean isUndeclared = in... |
"private CameraView estimateFeatureLocations(CameraView viewRoot) {\n CameraMotion best = null;\n double bestScore = 0;\n Rodrigues_F64 rod = new Rodrigues_F64();\n for (CameraMotion e : viewRoot.connections) {\n ConvertRotation3D_F64.matrixToRodrigues(e.a_to_b.R, rod);\n double score = e.feat... |
"public void testCreateInsertColumnFamilyQuery() {\n EntityManagerFactoryImpl emf = getEntityManagerFactory();\n EntityManager em = new EntityManagerImpl(emf, PersistenceUnitTransactionType.RESOURCE_LOCAL, PersistenceContextType.EXTENDED);\n String colFamilySql = \"String_Node_Str\";\n q = em.createNativeQu... |
"public ObjectDataInput initDataSerializableInputAndSkipTheHeader(Data data) throws IOException {\n ObjectDataInput input = createObjectDataInput(data);\n byte header = input.readByte();\n if (header == IDENTIFIED_DATA_SERIALIZABLE_HEADER_VALUE) {\n if (input.skipBytes(FACTORY_AND_CLASS_ID_BYTE_LENGTH) ... |
"public static List<FOXTreeNode> getFoxTreeNodes(String filePath, String selectedEntity, boolean forMDM) {\n List<String> attList = new ArrayList<String>();\n attList.add(selectedEntity);\n List<FOXTreeNode> list = new ArrayList<FOXTreeNode>();\n try {\n XSDSchema xsdSchema = TreeUtil.getXSDSchema(fi... |
"public Address pickAddress() throws Exception {\n String currentAddress = null;\n try {\n final Config config = node.getConfig();\n final String localAddress = System.getProperty(\"String_Node_Str\");\n if (localAddress != null) {\n currentAddress = InetAddress.getByName(localAddr... |
"private InformationLossDefault convert(InformationLoss<?> other) {\n if (other == null)\n return null;\n if (!(other instanceof InformationLossDefault)) {\n throw new IllegalStateException(\"String_Node_Str\" + this.getClass().getSimpleName() + \"String_Node_Str\" + other.getClass().getSimpleName()... |
"public static Point AdjustSize(final Point originalSize, final Point requiredSize) {\n Point newSize = new Point(originalSize.x, originalSize.y);\n if (originalSize.x <= requiredSize.x && originalSize.y <= requiredSize.y) {\n newSize.x = originalSize.x;\n newSize.y = originalSize.y;\n } else {\n... |
"public void dumpDot(PrintWriter out) {\n out.write(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n out.write(\"String_Node_Str\");\n for (Node n : cart) {\n out.println(\"String_Node_Str\" + n.hashCode() + \"String_Node_Str\" + n.toString() + \"String_Node_Str\" + dumpDotNodeColor(n... |
"public int getLightOpacity(IBlockState state, IBlockAccess world, BlockPos pos) {\n return base.getLightOpacity(new UCWBlockAccess(world, false), pos);\n}\n"
|
"public boolean onTouchEvent(MotionEvent event) {\n mScaleDetector.onTouchEvent(event);\n boolean val = mGestureDetector.onTouchEvent(event);\n if (event.getAction() == MotionEvent.ACTION_UP && !mIsZooming && mCurrentFlingDirection == Direction.NONE) {\n if (mCurrentScrollDirection == Direction.RIGHT ||... |
"byte[] expandChunkData(byte[] input, int inputLength, byte[] buffer) {\n if (buffer.length < 163840 || inputLength > 32768) {\n return null;\n }\n inflate.reset();\n inflate.setInput(input, 0, inputLength);\n int outputOffset = 32768;\n int outputLength = 131072 - outputOffset;\n int expand... |
"public int proc(Armor armor, Char attacker, Char defender, int damage) {\n int realDamage = damage - Random.NormalIntRange(armor.DRMin(), armor.DRMax());\n if (realDamage <= 0) {\n return 0;\n }\n int level = Math.max(0, armor.level());\n float percent = (level + 1) / (float) (level + 6);\n in... |
"private GroupDefinition createOrthogonalGroupingDefinition(SeriesDefinition orthSD) {\n if (ChartReportItemUtil.isYGroupingDefined(orthSD)) {\n DataType dataType = null;\n GroupingUnitType groupUnit = null;\n double groupIntervalRange = 0;\n String yGroupExpr = orthSD.getQuery().getDefin... |
"public String getInvalidRowsStatement() {\n IndicatorDefinition indicatorDefinition = this.indicator.getIndicatorDefinition();\n if (indicatorDefinition instanceof UDIndicatorDefinition) {\n EList<TdExpression> list = ((UDIndicatorDefinition) indicatorDefinition).getViewInvalidRowsExpression();\n r... |
"public void update(Brain brain, TimeStep timeStep) {\n this.updateEval.update(timeStep);\n if (this.updateEval.isTime()) {\n ActionEvaluator newEvaluator = Evaluators.evaluate(brain, evaluators);\n boolean isFinished = isFinished(brain);\n if (this.currentActiveEvaluator == null || isFinishe... |
"public int getBackgroundColor(DesignElementHandle handle) {\n Object obj = handle.getProperty(StyleHandle.BACKGROUND_COLOR_PROP);\n int color = handle.getPropertyHandle(StyleHandle.BACKGROUND_COLOR_PROP).getIntValue();\n if (obj == null) {\n return SWT.COLOR_LIST_BACKGROUND;\n }\n return color;\n... |
"public void testAttachDetachOrder() {\n HasWidgetsTester.testAll(new AbsolutePanel());\n}\n"
|
"public void sendAsyncQuery(RPCElement elem) throws TransportException {\n Reply reply = new Reply();\n Vector<Error> errors = new Vector<Error>();\n if (elem instanceof Hello) {\n ArrayList<Capability> capabilities = ((Hello) elem).getCapabilities();\n capabilities.retainAll(this.supportedCapabi... |
"public Set identifierSet() throws IllegalActionException {\n try {\n ;\n Set<String> out = _getParameters();\n out.addAll(_variables.keySet());\n return out;\n } catch (PtalonScopeException e) {\n throw new IllegalActionException(\"String_Node_Str\");\n }\n}\n"
|
"private void initAttributes(Context context, AttributeSet attributeSet) {\n TypedArray attr = getTypedArray(context, attributeSet, R.styleable.FlatButton);\n if (attr == null) {\n return;\n }\n try {\n GradientDrawable drawablePressed = (GradientDrawable) getGradientDrawable(R.drawable.rect_p... |
"protected void endCell(IContent content, boolean finished, IContentEmitter emitter, boolean visible) {\n AbstractNode current = (AbstractNode) currentNode;\n if (!current.isFirst) {\n current.setFinished(false);\n } else {\n current.setFinished(finished);\n }\n if (currentNode.isStarted())... |
"public static void synchronizeVdb(final IFile theVdb, boolean extractMissingModels, boolean updateValidationVersion) {\n if (!theVdb.exists())\n return;\n IProject theProject = theVdb.getProject();\n VdbElement manifest = VdbUtil.getVdbManifest(theVdb);\n if (manifest == null)\n return;\n ... |
"protected void handleCommand(String command) {\n if (command.contains(\"String_Node_Str\")) {\n namespace = command.split(\"String_Node_Str\")[0];\n command = command.substring(command.indexOf(\"String_Node_Str\") + 2);\n }\n if (echo) {\n if (Thread.currentThread().getName().toLowerCase(... |
"public void setExpectedState(ExpectedSlotStatus slotStatus) {\n Preconditions.checkNotNull(slotStatus, \"String_Node_Str\");\n if (isDomainCreated()) {\n List<ReplaceableAttribute> attributes = newArrayList();\n attributes.add(new ReplaceableAttribute(\"String_Node_Str\", slotStatus.getStatus().toS... |
"public boolean accept(File dir, String name) {\n return Regex.match(\"String_Node_Str\", name);\n}\n"
|
"public void paintComponent(Graphics g) {\n super.paintComponent(g);\n Graphics2D g2d = (Graphics2D) g;\n int w = canvasWidth / data.M();\n int h = canvasHeight / data.N();\n for (int i = 0; i < data.N(); i++) for (int j = 0; j < data.M(); j++) {\n if (data.open[i][j]) {\n if (data.isMi... |
"public BoardState useOn(int thisCardIndex, int playerIndex, int minionIndex, BoardState boardState) {\n if (hasBeenUsed_ && hasAttacked_) {\n return null;\n }\n if (playerIndex == 0) {\n if (isInHand_ && boardState.getNumMinions_p0() < 7) {\n if (minionIndex == 0) {\n r... |
"public static String cdmaCheckAndProcessPlusCodeByNumberFormat(String dialStr, int numFormat) {\n String retStr = dialStr;\n if (dialStr != null && dialStr.lastIndexOf(PLUS_SIGN_STRING) != -1) {\n if ((currFormat == defaultFormt) && (currFormat == FORMAT_NANP)) {\n String postDialStr = null;\n ... |
"public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock) {\n super.onNeighborBlockChange(world, pos, state, neighborBlock);\n TileEntity tileEntity = world.getTileEntity(pos);\n if (tileEntity instanceof TileAlveary) {\n TileAlveary tileAlveary = (TileAlveary... |
"private static synchronized DynamicClassLoader findLoader(String index, ClassLoader parentLoader, boolean showDownloadIfNotExist) {\n IConfigurationElement current = findIndex(index);\n if (current != null) {\n String parentKey = current.getAttribute(PARENT_ATTR);\n ClassLoader parentClassLoader = ... |
"public void save(IProgressMonitor monitor, int totalWork) throws Exception {\n monitor.subTask(DdlImporterI18n.SAVING_MODEL_MSG);\n if (!model.exists()) {\n ModelAnnotation modelAnnotation = model.getModelAnnotation();\n modelAnnotation.setPrimaryMetamodelUri(RelationalPackage.eNS_URI);\n mo... |
"public View prepareDecorView(View v) {\n return ContextMenuDecorView.prepareDecorView(this, v, this, 0);\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n if (getIntent().hasExtra(QBServiceConsts.EXTRA_ROOM_JID)) {\n dialogId = getIntent().getStringExtra(QBServiceConsts.EXTRA_ROOM_JID);\n }\n dialog = (QBDialog) getIntent().getExtras().getSerializable(QBServiceCo... |
"private static ReaderTagList parseTags(JSONObject jsonObject, String name, ReaderTagType topicType) {\n ReaderTagList topics = new ReaderTagList();\n if (jsonObject == null) {\n return topics;\n JSONObject jsonTopics = jsonObject.optJSONObject(name);\n if (jsonTopics == null)\n return topics;... |
"protected void doPost(HttpServletRequest theReq, HttpServletResponse theResp) throws ServletException, IOException {\n if (DEBUGMODE) {\n myTemplateEngine.getCacheManager().clearAllCaches();\n }\n try {\n GenericClient client = (GenericClient) myCtx.newRestfulGenericClient(myServerBase);\n ... |
"public static void save(String name, IAggregationResultSet[] resultSets, IDocArchiveWriter writer) throws IOException {\n if (writer == null || name == null)\n return;\n RAOutputStream outputStream = writer.createRandomAccessStream(name);\n DataOutputStream dataOutputStream = new DataOutputStream(outpu... |
"public GameState put(int x, int y, GameState s) {\n if (board[x][y] == GameState.EMPTY) {\n board[x][y] = s;\n this.x = x;\n this.y = y;\n this.player = s;\n moveCount++;\n return GameState.VALID_MOVE;\n } else {\n return GameState.INVALID_MOVE;\n }\n}\n"
|
"public void onTap(Position position, boolean editable) {\n if (!editable || values.isEmpty())\n return;\n ValueSet cellValues = target.getCellValues(position);\n if (cellValues.containsAny(values)) {\n cellValues.removeAll(values);\n target.setCellValues(position, cellValues);\n } else... |
"private void loadDefaultKeyStore() {\n this.container.setCursor(new Cursor(Cursor.WAIT_CURSOR));\n try {\n new SimpleKeyStoreManagerWorker(this, null, false).execute();\n } catch (final Exception e) {\n Logger.getLogger(\"String_Node_Str\").severe(\"String_Node_Str\" + e);\n UIUtils.showE... |
"public static DBConnectionParameter createConnectionParam(Connection conn) {\n DBConnectionParameter connectionParam = new DBConnectionParameter();\n Properties properties = new Properties();\n properties.setProperty(TaggedValueHelper.USER, JavaSqlFactory.getUsername(conn));\n properties.setProperty(Tagged... |
"public static boolean adminChat(Player player, String message) {\n if (player.isAdmin() || player.canUseCommand(\"String_Node_Str\")) {\n String adminchat = Colors.DarkPurple + \"String_Node_Str\" + getName(player) + Colors.DarkPurple + \"String_Node_Str\";\n if (message.startsWith(\"String_Node_Str\"... |
"public String getInvalidRowsStatement() throws TalendException {\n if (this.indicator == null || !(this.indicator instanceof PatternMatchingIndicator)) {\n throw new TalendException(\"String_Node_Str\" + analysis.getName());\n }\n String regexPatternString = dbmsLanguage.getRegexPatternString((PatternM... |
"public void readClassInfoFromClassfileHeader(final InputStream inputStream, boolean verbose) throws IOException {\n final DataInputStream inp = new DataInputStream(new BufferedInputStream(inputStream, 1024));\n if (inp.readInt() != 0xCAFEBABE) {\n return;\n }\n inp.readUnsignedShort();\n inp.read... |
"public void testSendOrderedMessageServerError() throws Exception {\n final String topic = \"String_Node_Str\";\n final byte[] data = \"String_Node_Str\".getBytes();\n final Message message = new Message(topic, data);\n final String url = \"String_Node_Str\";\n final Partition partition = new Partition(\... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.