content stringlengths 40 137k |
|---|
"void deleteAll(NamespaceId namespaceId) throws Exception {\n Principal principal = authenticationContext.getPrincipal();\n authorizationEnforcer.enforce(namespaceId, principal, Action.ADMIN);\n if (NamespaceId.SYSTEM.equals(namespaceId)) {\n throw new UnauthorizedException(String.format(\"String_Node_S... |
"public boolean getEnabledState() {\n if (model != null && (model.getElemParameter().getName().equals(\"String_Node_Str\") || model.getElemParameter().getName().equals(\"String_Node_Str\"))) {\n if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {\n TableItem item = extendedTableView... |
"public void testFactorAddIdentical() {\n Tensor f1 = new Tensor(s, 2, 3);\n f1.fill(s.fromReal(1));\n f1.setValue(2, s.fromReal(2));\n f1.setValue(3, s.fromReal(3));\n Tensor f2 = new Tensor(s, 2, 3);\n f2.fill(2);\n f2.setValue(2, 5);\n f2.setValue(5, 7);\n System.out.println(\"String_Node_... |
"private void addMethodPermissions(EjbDescriptor ejb, Map mpToMethods, Vector excludedMethods, MethodPermissionNode mpNode, Node assemblyNode) {\n if (mpToMethods == null || mpToMethods.size() == 0) {\n return;\n }\n for (Object o : mpToMethods.entrySet()) {\n Map.Entry entry = (Map.Entry) o;\n ... |
"public boolean shouldContinueExecuting() {\n return this.entity.selfHoldingDrink(Drink.pinaColada);\n}\n"
|
"public static DebuggerTemplate createDebuggerTemplate(final AbstractSQLProvider provider, final String name, final String host, final int port) throws CouldntSaveDataException {\n Preconditions.checkNotNull(name, \"String_Node_Str\");\n Preconditions.checkArgument(!name.isEmpty(), \"String_Node_Str\");\n Prec... |
"public ArrayList<StudentData> getStudentsWithId(String googleId) {\n verifySameStudentOrAdmin(googleId);\n List<Student> students = Accounts.inst().getStudentsWithID(googleId);\n ArrayList<StudentData> returnList = new ArrayList<StudentData>();\n for (Student s : students) {\n returnList.add(new Stu... |
"private void commitAndSave() {\n ChatterboxWidget frame = (activeIsInterstitial ? null : activeFrame());\n if (frame != null) {\n try {\n controller.answerQuestion(this.model.getFormIndex(), frame.getData());\n } catch (InvalidDataException ide) {\n }\n }\n controller.saveAn... |
"public boolean hasNext() {\n return next != null;\n}\n"
|
"public int size() {\n return super.size();\n}\n"
|
"private Object[] getAccumulatorParameter(Row4Aggregation row, int funcIndex) {\n Object[] parameters = null;\n if (parameterColIndex[funcIndex] == -1) {\n parameters = new Object[1];\n if (measureIndexes[funcIndex] < 0) {\n return null;\n } else {\n parameters[0] = row.... |
"public void menuAboutToShow(IMenuManager manager) {\n if (data instanceof ColumnBindingInfo) {\n addMenu(manager, new HeaderShowAction(((ColumnBindingInfo) data).getName()));\n List<Object> actions = getActionsForTableHead(((ColumnBindingInfo) data).getName());\n for (Object act : actions) {\n ... |
"public static CertificatePair generateCertificate(String DN, SerialNum serial, int days, int keySize, KeyType type, PublicKey key, CertificatePair issuer) throws Exception {\n if ((KeyType.INTERMEDIATE == type || KeyType.CLIENT == type || KeyType.SERVER == type) && issuer == null)\n throw new IllegalArgument... |
"public void shouldEstablishConnectionWithRandomCaseResponseHeaders() throws Exception {\n final IoHandler handler = context.mock(IoHandler.class);\n context.checking(new Expectations() {\n {\n oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));\n atMost(1).of(handler).sessio... |
"private void addDomain(Domain domain) throws VirtException {\n String domainName = domain.getName();\n if (!domains.containsKey(domainName)) {\n for (Cluster cluster : domainConfig.getClusters().getCluster()) {\n for (VirtualMachineConfig vmc : cluster.getExtensionsByType(VirtualMachineConfig.c... |
"public JSONObject getAccountInfo(String idToken) throws GitkitClientException, GitkitServerException {\n try {\n JSONObject params = new JSONObject().put(\"String_Node_Str\", idToken);\n return invokeGoogle2LegOauthApi(\"String_Node_Str\", params);\n } catch (JSONException e) {\n throw new G... |
"protected <T> Iterator<T> _getRelateds(ObjectContext ctx, String name, Class<T> filterClass) throws RepositoryException {\n Node node = ctx.state.getNode();\n Iterator<Node> nodes = sessionWrapper.getReferents(node, name);\n return new ReferentCollectionIterator<T>(this, nodes, filterClass, name);\n}\n"
|
"private SortedSet<String> getAllResources(String query) {\n SortedSet<String> resources = new TreeSet<String>();\n query = getLimitedQuery(query, 1000, true);\n System.err.println(query);\n String result = selectCache.executeSelectQuery(endpoint, query);\n testedQueries.add(query);\n ResultSetRewinda... |
"public void mouseDragged(EditorMouseEvent event) {\n if (!VimPlugin.isEnabled())\n return;\n if (event.getArea() == EditorMouseEventArea.EDITING_AREA || event.getArea() == EditorMouseEventArea.LINE_NUMBERS_AREA) {\n dragEditor = event.getEditor();\n }\n}\n"
|
"public void widgetSelected(SelectionEvent e) {\n dataProperties();\n}\n"
|
"public void run(IProgressMonitor monitor) {\n TreeItem root = xmlViewer.getTree().getItem(0);\n List<HL7TreeNode> mappableNodes = new ArrayList<HL7TreeNode>();\n if (getManager().getHl7Component().isHL7Output()) {\n if (getManager() instanceof HL7OutputManager) {\n List<HL7TreeNode> mappable... |
"private void defineLayout(IPageLayout layout) {\n String editorArea = layout.getEditorArea();\n IFolderLayout topLeft = layout.createFolder(\"String_Node_Str\", IPageLayout.LEFT, (float) 0.26, editorArea);\n addLayoutView(topLeft, IReportPerspectiveExtra.LAYOUT_TOP_LEFT, PaletteView.ID);\n addLayoutView(to... |
"public static List<Category> parseCategories(String categoryRespStr) throws JSONException {\n if (categoryRespStr == null) {\n return null;\n }\n ArrayList<Category> resultList = null;\n JSONObject categories = new JSONObject(categoryRespStr);\n resultList = new ArrayList<Category>();\n Catego... |
"private void toInstructions(Collection<Unit> units, StmtVisitor stmtV) {\n Set<ClassConstant> monitorConsts = new HashSet<ClassConstant>();\n for (Unit u : units) {\n if (u instanceof MonitorStmt) {\n MonitorStmt monitorStmt = (MonitorStmt) u;\n if (monitorStmt.getOp() instanceof Cla... |
"private void buildToString(final CtClass ctClass, final List<String> fields) throws ModelXmlCompilingException {\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\" + ctClass.getName() + \"String_Node_Str\");\n boolean first = true;\n for (String field : fie... |
"private final String checkContentProviderPermissionLocked(ProviderInfo cpi, ProcessRecord r, int mode) {\n final int callingPid = (r != null) ? r.pid : Binder.getCallingPid();\n final int callingUid = (r != null) ? r.info.uid : Binder.getCallingUid();\n if (checkComponentPermission(cpi.readPermission, calling... |
"private void saveForUpdate(IResultIterator odiResult, int groupLevel, int[] subQueryInfo) throws DataException {\n try {\n OutputStream streamForGroupInfo = null;\n OutputStream streamForRowIndexInfo = null;\n OutputStream streamForParentIndexInfo = null;\n boolean isSubQuery = streamMan... |
"void calculate(PerformanceIndex clientIndex) {\n DateTime firstDataPoint = clientIndex.getFirstDataPoint();\n Interval interval = firstDataPoint != null ? new Interval(firstDataPoint, clientIndex.getReportInterval().toInterval().getEnd()) : clientIndex.getReportInterval().toInterval();\n List<ConsumerPriceInd... |
"private List<String> runInstancesInSubnet(Stack stack, AwsTemplate awsTemplate, DescribeStacksResult stackResult, AmazonEC2Client amazonEC2Client, String instanceArn, String email) throws IOException {\n String subnetId = null;\n String securityGroupId = null;\n List<Output> outputs = stackResult.getStacks().... |
"public void testSouthHemisphere() {\n double tol = 0.01;\n double sinTol = FastMath.sin(tol);\n SphericalPolygonsSet south = new SphericalPolygonsSet(Vector3D.MINUS_K, tol);\n UnitSphereRandomVectorGenerator random = new UnitSphereRandomVectorGenerator(3, new Well1024a(0x6b9d4a6ad90d7b0bl));\n for (int ... |
"private UUID getFromEnvOrGenerate(String varName) {\n String uuidString = clientEnv.getOrDefault(varName, \"String_Node_Str\");\n if (!uuidString.isEmpty()) {\n try {\n return UUID.fromString(uuidString);\n } catch (IllegalArgumentException e) {\n }\n }\n return id;\n}\n"
|
"protected void processAttribute(String attributeId, EntityData inData, EntityData outData, Message inputMessage, Model inputModel, ArrayList<EntityData> outDatas) {\n String transform = transformsByAttributeId.get(attributeId);\n Object value = inData.get(attributeId);\n ModelAttrib attribute = inputModel.get... |
"private void renderPanos() {\n if (getInputFolder(FeatureCache.FEATURE_FOLDER).exists()) {\n int result = JOptionPane.showConfirmDialog(tweed.frame(), \"String_Node_Str\", \"String_Node_Str\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.CANCEL_OPTION)\n return;\n }\n Fa... |
"private Image paintBackground(int width, int height, KnobColorProfile profile) {\n Display display = getDisplay();\n Image background = new Image(display, width, height);\n GC gc = new GC(background);\n gc.setBackground(getBackground());\n gc.fillRectangle(0, 0, width, height);\n double min = width;\... |
"public boolean hasChanges(Post otherPost) {\n return otherPost == null || !(StringUtils.equals(title, otherPost.title) && StringUtils.equals(description, otherPost.description) && StringUtils.equals(excerpt, otherPost.excerpt) && StringUtils.equals(keywords, otherPost.keywords) && StringUtils.equals(categories, oth... |
"public void onClick(ClickEvent event) {\n Filter filter = new Filter(new NotSimpleFilterParameter(RodaConstants.INDEX_UUID, ri.getId()));\n SelectRepresentationInformationDialog selectDialog = new SelectRepresentationInformationDialog(messages.moveItemTitle(), filter, false);\n selectDialog.setSingleSelection... |
"protected Path findWayAroundObstacle(EDirection direction, ShortPoint2D position, Path path) {\n if (state == ESoldierState.SEARCH_FOR_ENEMIES) {\n IStrategyGrid grid = super.getStrategyGrid();\n EDirection leftDir = direction.getNeighbor(-1);\n ShortPoint2D leftPos = leftDir.getNextHexPoint(po... |
"private void createIndicatorParameters(TreeItem indicatorItem, IndicatorUnit indicatorUnit) {\n TreeItem[] items = indicatorItem.getItems();\n if (indicatorItem != null && !indicatorItem.isDisposed()) {\n for (TreeItem treeItem : items) {\n if (DATA_PARAM.equals(treeItem.getData(DATA_PARAM))) {... |
"public ServiceResponse stop() throws RemoteException {\n LOG.info(\"String_Node_Str\");\n ServiceContext ctx = ServiceContext.getServiceContext();\n ShutdownTask task = new ShutdownTask(ctx, (ShutdownTaskResult) service);\n try {\n ShutdownTaskResponse response = task.execute().get();\n stopS... |
"private void generateVarargs(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException {\n int firstVarargIdx = getFirstVarargIdx();\n String arrayType = methodParameterTypes[firstVarargIdx];\n String cellType = stripOneArrayLevel(arrayType);\n String varargType = cellType;\n if (routineInf... |
"public Boolean apply(WebDriver webDriver) {\n try {\n WebElement element = webDriver.findElement(By.id(id));\n return element != null && isNotBlank(element.getAttribute(\"String_Node_Str\")) && element.getAttribute(\"String_Node_Str\").contains(dojoClass);\n } catch (StaleElementReferenceException ... |
"public boolean isMigrating(Request req) {\n final Data key = req.key;\n return key != null && partitionManager.isPartitionMigrating(getPartitionId(req), replica);\n}\n"
|
"protected void bindValues(SQLiteStatement stmt, Schoolmate entity) {\n stmt.clearBindings();\n String userId = entity.getUserId();\n if (userId != null) {\n stmt.bindString(1, userId);\n }\n Integer friendState = entity.getFriendState();\n if (friendState != null) {\n stmt.bindLong(3, f... |
"private void setFilterWidth(int index, int width) {\n Widget p = filters.get(getColKeyByIndex(index));\n if (p != null) {\n int w = Util.getRequiredWidth(tHead.getHeaderCell(index));\n if (w <= 0) {\n VScrollTableRow firstRow = scrollBody.getRowByRowIndex(scrollBody.getFirstRendered());\... |
"AnalysisResult getAnalysisResult() {\n if (isFinal() && !isJsoType()) {\n return AnalysisResult.NULLABLE_EXACT;\n }\n return AnalysisResult.NULLABLE_NOT_EXACT;\n}\n"
|
"synchronized public void unlockEntry(Object locker) throws IOException {\n assertOpen();\n if (!(locker instanceof NameEntry)) {\n throw new IOException(\"String_Node_Str\" + locker);\n }\n}\n"
|
"protected void process(WireIn inWire, WireOut outWire) {\n String s = Wires.fromSizePrefixedBlobs(inWire.bytes());\n if (YamlLogging.showServerReads() && inWire.hasMore())\n LOG.info(\"String_Node_Str\" + s);\n onMessageReceived();\n boolean processedData = false;\n while (inWire.hasMore()) {\n ... |
"private void placeComponents() {\n GridLayout glCMPTrigger = new GridLayout();\n glCMPTrigger.numColumns = 3;\n glCMPTrigger.horizontalSpacing = 16;\n glCMPTrigger.verticalSpacing = 5;\n slValues = new StackLayout();\n GridLayout glURL = new GridLayout();\n glURL.marginWidth = 2;\n glURL.margin... |
"public void doNormalTreeRefAnalysis(TreeReference treeRef) throws AnalysisInvalidException {\n if (treeRef.getContextType() == TreeReference.CONTEXT_INSTANCE) {\n addToResult(treeRef.getInstanceName());\n }\n}\n"
|
"public boolean execute() {\n IProject rootProject = ResourceManager.getRootProject();\n IFolder libraryFolder = rootProject.getFolder(ResourceManager.LIBRARIES_FOLDER_NAME);\n try {\n IFolder oldPatternFolder = libraryFolder.getFolder(DQStructureManager.PATTERNS);\n IFolder newPatternFolder = li... |
"public void performDrop(final DropTargetEvent event) {\n Artifact parentArtifact = getSelectedArtifact(event);\n if (parentArtifact == null && selectedBranch != null) {\n try {\n parentArtifact = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(selectedBranch);\n } catch (Exception ex... |
"public int perfInt(String name) {\n Monitor mon = findByName(name);\n if (mon == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + name);\n }\n if (mon instanceof IntegerMonitor) {\n return ((IntegerMonitor) mon).intValue();\n } else if (mon instanceof LongMonitor) {\n ... |
"private List<Base> opIs(List<Base> left, List<Base> right) {\n List<Base> result = new ArrayList<Base>();\n if (left.size() != 1 || right.size() != 1)\n result.add(new BooleanType(false).noExtensions());\n else {\n String tn = convertToString(right);\n if (left.get(0) instanceof org.hl7.f... |
"public static void populateTestRealmWithShortPrimaryKey(Realm testRealm, Short primaryFieldValue, String secondaryFieldValue, int numberOfPopulation, int iteratorBeginValue) {\n testRealm.beginTransaction();\n PrimaryKeyAsBoxedShort userObj = new PrimaryKeyAsBoxedShort();\n userObj.setId(primaryFieldValue);\n... |
"public World getWorld(final String name) {\n return getWorld(getentityId(name));\n}\n"
|
"protected void deployModels(File targetDir, String moduleName, DeployedModel deployedModel, ImportedModel importedModel, HashMap<String, String> deploymentMapping, ModelCellComponentServerState state) {\n URL modelURL = importedModel.getImportSettings().getModelURL();\n if (!modelURL.getProtocol().equalsIgnoreCa... |
"public void writePortableArray(String fieldName, Portable[] portables) throws IOException {\n setPosition(fieldName);\n final int len = portables == null ? 0 : portables.length;\n out.writeInt(len);\n if (len > 0) {\n final int offset = out.position();\n out.writeZeroBytes(len * 4);\n ... |
"protected String compute() {\n System.out.println(\"String_Node_Str\" + tumorType + \"String_Node_Str\" + analysisRun);\n String run = Settings.format(analysisRun);\n String runSpecificOutputPath = settings.getDataDirectory(run);\n FirehoseProvider firehoseProvider = settings.createFirehoseProvider(tumorTy... |
"public void onClick(View v) {\n ((BottomBarActivity) getActivity()).replaceFragment(new StatisticFragment(), StatisticFragment.class.getName());\n}\n"
|
"public void recomputeIndicators() {\n columnSetAnalysisHandler = new ColumnSetAnalysisHandler();\n columnSetAnalysisHandler.setAnalysis((Analysis) this.currentModelElement);\n stringDataFilter = columnSetAnalysisHandler.getStringDataFilter();\n analyzedColumns = columnSetAnalysisHandler.getAnalyzedColumns(... |
"public void run() {\n boolean changed = false;\n synchronized (ADDRESS_LOCK) {\n changed = setIncoming(false);\n }\n if (changed)\n networkManager.incomingStatusChanged();\n}\n"
|
"private Position decodeOld(Channel channel, SocketAddress remoteAddress, String sentence) {\n boolean simple = sentence.charAt(3) == ',' || sentence.charAt(6) == ',';\n String id;\n String location;\n String status;\n if (simple) {\n int beginIndex = sentence.indexOf(',') + 1;\n int endInd... |
"public void add(T item) {\n Node node = new Node(item);\n int index = Collections.binarySearch(mPoints, node);\n if (index < 0) {\n if (-index - 1 < mPoints.size())\n mPoints.add(-index - 1, node);\n else\n mPoints.add(node);\n } else {\n mPoints.add(index + 1, no... |
"public boolean onBreak(Player p, Block b, SlimefunItem item, UnregisterReason reason) {\n me.mrCookieSlime.Slimefun.holograms.AnimalGrowthAccelerator.getArmorStand(b).remove();\n for (int slot : getInputSlots()) {\n if (BlockStorage.getInventory(b).getItemInSlot(slot) != null) {\n b.getWorld().... |
"public static TagBase vanillaCompoundToCompound(NBTBase vanillaTag) {\n switch(vanillaTag.getTypeId()) {\n case 1:\n return new TagByte(((NBTTagByte) vanillaTag).g());\n case 2:\n return new TagShort(((NBTTagShort) vanillaTag).e());\n case 3:\n return new TagInt... |
"public void dumpObj(ObjDump dump) {\n dump.setCurrentMaterial(Color.blue, 0.5);\n dump.addAll(getCroppedMesh());\n}\n"
|
"private void onMouseHover(Event event) {\n Date hoverDate = getHoverDate(event);\n if (tip != null && !tip.isDisposed())\n tip.dispose();\n tip = new Shell(Display.getDefault().getActiveShell(), SWT.ON_TOP | SWT.TOOL);\n tip.setLayout(new FillLayout());\n final Composite container = new Composite... |
"private void testPrev(String appId, String entityType, String entityId, String namespace, String adapteId) throws Exception {\n String prevUrl = String.format(\"String_Node_Str\", appId, entityType, entityId, getToOffset(25));\n prevUrl = getUrlWithAdapterId(prevUrl, adapterId, \"String_Node_Str\");\n HttpRes... |
"public void flush(HashedVersion version) {\n transformedDeltas.remove(transformedDeltas.lowerKey(version));\n appliedDeltas.remove(appliedDeltas.lowerKey(version));\n if (LOG.isFineLoggable()) {\n LOG.fine(\"String_Node_Str\" + version);\n }\n}\n"
|
"public ProgramController run(Program program, ProgramOptions options) {\n ApplicationSpecification appSpec = program.getSpecification();\n Preconditions.checkNotNull(appSpec, \"String_Node_Str\");\n Type processorType = program.getType();\n Preconditions.checkNotNull(processorType, \"String_Node_Str\");\n ... |
"public void setVectorByPosition(int position, Vector vec) {\n baseVectors[position] = vec;\n}\n"
|
"public void metaContactAdded(MetaContactEvent evt) {\n this.refresh();\n}\n"
|
"public void testCreateByjSLPAndRemoveServicePrefixWithServiceService() throws ServiceLocationException {\n final String internalRep = \"String_Node_Str\";\n final ServiceURL sUrl = new ServiceURL(internalRep + \"String_Node_Str\", ServiceURL.LIFETIME_PERMANENT);\n final IServiceInfo serviceInfo = new JSLPServ... |
"private void initExpectedResults() {\n addExpectedResult(\"String_Node_Str\", VERSION_7_7_0, \"String_Node_Str\");\n for (ITeiidServerVersion version83 : VERSIONS_8_3) {\n addExpectedResult(\"String_Node_Str\", version83, \"String_Node_Str\");\n }\n for (ITeiidServerVersion version84 : VERSIONS_8_4)... |
"protected void doOldShow(String formName, boolean closeAll, boolean legacyV3Behavior) {\n IWebFormController controller = getApplication().getFormManager().getForm(formName);\n if (controller != null) {\n getApplication().getFormManager().showFormInContainer(formName, this, getTitle(), true, windowName);\... |
"public void testBootstrapAllFromMap1WithSubscription2() throws InterruptedException {\n AtomicInteger map1Updates = new AtomicInteger();\n AtomicInteger map2Updates = new AtomicInteger();\n final ConcurrentMap<String, String> map1 = tree1.acquireMap(name, String.class, String.class);\n assertNotNull(map1);... |
"public String getStringFromSingleElement(String tag, Element root) {\n Element e = (Element) root.getElementsByTagName(tag).item(0);\n Node n = (Node) e;\n return this.buildText(n);\n}\n"
|
"protected void createMasterPart(final IManagedForm managedForm, Composite parent) {\n FormToolkit toolkit = managedForm.getToolkit();\n Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR | Section.EXPANDED);\n GridDataFactory.fillDefaults().grab(true, false).span(1, 1).app... |
"protected void exportNamedRange(NBook book) {\n for (NName name : book.getNames()) {\n Name poiName = workbook.createName();\n poiName.setNameName(name.getName());\n String sheetName = name.getRefersToSheetName();\n if (sheetName != null) {\n poiName.setSheetIndex(workbook.get... |
"public void addFetchCommands(InjectionType type, Collection<? extends Command> commands) {\n runLocked(logAdminCommandsLock.readLock(), () -> {\n addCommands(type, commands);\n type.setLogCommands(this, true);\n });\n}\n"
|
"public void onStart(IContext context) throws JFException {\n console = context.getConsole();\n engine = context.getEngine();\n history = context.getHistory();\n indicators = context.getIndicators();\n Set subscribedInstruments = new HashSet();\n subscribedInstruments.add(instrument);\n context.set... |
"public FSEntry getEntryByPosixPath(final String posixPath, final FSFolder rootFolder) throws IllegalArgumentException {\n String[] components = posixPath.split(\"String_Node_Str\");\n int i = 0;\n FSEntry curEntry;\n LinkedList<String[]> visitedLinks = null;\n if (posixPath.startsWith(\"String_Node_Str\... |
"public Result invoke(Invoker<?> invoker, Invocation inv) throws RpcException {\n if (inv.getMethodName().equals(Constants.$INVOKE) && inv.getArguments() != null && inv.getArguments().length == 3 && !ProtocolUtils.isGeneric(invoker.getUrl().getParameter(Constants.GENERIC_KEY))) {\n String name = ((String) inv... |
"public void damage(Entity damager, int amount) {\n if (damager instanceof Explosion) {\n amount = 1;\n } else if (damager instanceof Rocket) {\n amount /= 2;\n } else if (damager instanceof Bullet) {\n amount = 0;\n } else {\n amount /= 10;\n }\n armor -= amount;\n if (... |
"public void serialize(ONCRPCBufferWriter writer) {\n object_data.serialize(writer);\n}\n"
|
"public void closeDataSource(DBInfo dbInfo) {\n if (dbInfo instanceof AppDBInfo) {\n dbConnectionPool.releaseDataSource(dbInfo.getDatasource());\n } else if (dbInfo instanceof EnvDBInfo) {\n }\n}\n"
|
"public BytecodeTransformer getBytecodeTransformer() {\n return new BytecodeTransformer() {\n public byte[] transform(String className, byte[] bytecode) {\n return bytecode;\n }\n public boolean requiresTransformation(String className) {\n return false;\n }\n };\n... |
"protected Collection<String> getNonTestSourceOutputLocations() {\n Collection<String> outputs = getSourceOutputLocations(false);\n Set<String> nonTestOutput = new HashSet<String>(outputs);\n try {\n IPath location = javaProject.getOutputLocation();\n location = getWorkspaceFullPath(location);\n ... |
"public void onResponseReceived(Request delRequest, Response delResponse) {\n if (delResponse.getStatusCode() == Response.SC_OK) {\n try {\n trashItems = JsonToRepositoryFileTreeConverter.getTrashFiles(delResponse.getText());\n } catch (Throwable t) {\n }\n fireRepositoryFileTr... |
"private void performADALINE(ProjectEGFile file, MLDataSet trainingData) {\n InputADALINE dialog = new InputADALINE();\n if (dialog.process()) {\n double learningRate = dialog.getLearningRate().getValue();\n MLTrain train = new TrainAdaline((BasicNetwork) file.getObject(), trainingData, learningRate... |
"public void onCreate(final Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n mClient = RetrofitForumClient.getClient(getActivity());\n mModeHelper = new ActionModeHelper(getActivity(), new ForumFragmentActionMode(), new View.OnClickListener() {\n public void onClick(final View view) ... |
"private void spawnItems(int x, int y, int z) {\n int[] id = OreDictionary.getOreIDs(this.smooshedStack);\n if (id.length > 0 && ItemSmashedOre.oreTypesFromOre.containsKey(OreDictionary.getOreName(id[0]))) {\n boolean doubleItems = worldObj.rand.nextInt(3) == 0;\n ItemStack items = new ItemStack(Ste... |
"public Object[][] createSizes() {\n List<Object[]> params = new ArrayList<>();\n for (int size : Arrays.asList(0, 1, 4, 15, 16, 17, 127, 128, 129, 1000, MAX_SIZE)) {\n Integer[] array = new Integer[size];\n Integer[] degenerateTreeArray = new Integer[size];\n for (int i = 0; i < array.length... |
"public void run() {\n try {\n SocketChannel socketChannel = null;\n for (; ; ) {\n try {\n socketChannel = SocketChannel.open(new InetSocketAddress(clientPort.host, clientPort.port));\n LOG.info(\"String_Node_Str\" + clientPort);\n socketChannel.... |
"private void prepareForComputationElement(final ComputationElementDTO computationElement, final IsModel model) {\n final Computation computation = computationElement.getComputationForModel(model);\n computations.put(computationElement, computation);\n for (final Dependency dependency : computation.getDependen... |
"public IPattern withType(IType type, MarkerList markers) {\n IClass tupleClass = TupleType.getTupleClass(this.patternCount);\n if (tupleClass == null || !tupleClass.isSubTypeOf(type)) {\n return null;\n }\n this.tupleType = type;\n for (int i = 0; i < this.patternCount; i++) {\n IType elem... |
"public org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Immunizatio... |
"public void doSaveAs() {\n final IReportProvider provider = getProvider();\n ModuleHandle model = getModel();\n if (provider != null && model != null) {\n if (model.getUserPropertyDefnHandle(IReportGraphicConstants.REPORT_CONFIG_FILE_NAME) == null) {\n UserPropertyDefn uDefn = new UserProper... |
"public long getNextSpanStartTime() {\n int nextIndex = index + 1;\n if (nextIndex >= list.size()) {\n return Long.MAX_VALUE;\n }\n return list.get(nextIndex).getSpanBo().getStartTime();\n}\n"
|
"public Date getModelValue(Long data) {\n return data == null ? null : new Date(data);\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.