content
stringlengths
40
137k
"private KeyIdResult returnKeyIdsFromEmails(Intent data, String[] encryptionUserIds, boolean isOpportunistic) {\n boolean hasUserIds = (encryptionUserIds != null && encryptionUserIds.length > 0);\n HashSet<Long> keyIds = new HashSet<>();\n ArrayList<String> missingEmails = new ArrayList<>();\n ArrayList<Str...
"public void execute() {\n if (popupMenu != null) {\n popupMenu.hide();\n }\n SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();\n if (mode == COMMAND.PROPERTIES) {\n new FilePropertiesCommand(repositoryFile).execute();\n } else if (mode == COMMAND.DELETE) {\n TreeItem it...
"public void onClick(View v) {\n log.info(\"String_Node_Str\");\n mnemonicTextView.setText(\"String_Node_Str\");\n verifyMnemonicAndProceed(seed, true);\n}\n"
"public void plusOneDepth() {\n final List<TheRStackFrame> originalStack = new ArrayList<TheRStackFrame>();\n final MockTheRResolvingSession resolvingSession = new MockTheRResolvingSession();\n final TheRXStack stack = new TheRXStack(originalStack, resolvingSession, ExecutorServices.ILLEGAL_EXECUTOR);\n ori...
"private long getNowUnixTimeUs() {\n if (elapsedRealtimeOffsetMs != 0) {\n return (SystemClock.elapsedRealtime() + elapsedRealtimeOffsetMs) * 1000;\n } else {\n return System.currentTimeMillis() * 1000;\n }\n}\n"
"private boolean inMultiSelect() {\n return mCallback.isInMultiSelect();\n}\n"
"public synchronized void processImage(int sourceID, long frameID, final BufferedImage buffered, ImageBase input) {\n if (buffered != null) {\n original = ConvertBufferedImage.checkCopy(buffered, original);\n work = ConvertBufferedImage.checkDeclare(buffered, work);\n binary.reshape(work.getWidt...
"public boolean clearPlot(final World world, final Plot plot, final boolean isDelete) {\n PlotHelper.runners.put(plot, 1);\n final Plugin plugin = PlotMain.getMain();\n Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n PlotHelper.runners.remove(plo...
"private List<Schema> valueSchemas(ExhibitDescriptor descriptor) {\n List<Schema> schemas = Lists.newArrayList();\n for (AggConfig ac : config.aggregates) {\n ObsDescriptor fd = ac.getFrameDescriptor(descriptor);\n List<Schema.Field> fields = Lists.newArrayList();\n for (Map.Entry<String, Str...
"public void accountSelected(Account account) {\n errorView.removeAllViews();\n progress(false);\n SearchFieldDataSource dataSource = new JsonSearchFieldDataSource(app);\n int versionCode = 0;\n try {\n versionCode = app.getPackageManager().getPackageInfo(app.getPackageName(), 0).versionCode;\n ...
"public void attribute(String namespaceURI, String localName, String qName, String value) {\n try {\n writer.write(' ');\n writer.write(qName);\n writer.write('=');\n writer.write('\\\"');\n writeValue(value, true);\n writer.write('\\\"');\n } catch (IOException e) {\n ...
"public static void main(String[] args) throws Exception {\n Properties config = SimpleAccumuloConfig.loadConfig();\n SimpleAccumuloConfig saConf = SimpleAccumuloConfig.fromConfig(config);\n int nt = Integer.parseInt(config.getProperty(\"String_Node_Str\", \"String_Node_Str\"));\n int port = Integer.parseIn...
"public void testInvokingVarargs01_GtoJ() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + ...
"public List<String> getQualifiedInterfaceExtendsList() {\n List<String> result = new UniqueEList<String>();\n if (!isExternalInterface()) {\n String rootExtendsInterface = getGenModel().getRootExtendsInterface();\n if (rootExtendsInterface == null) {\n rootExtendsInterface = \"String_Nod...
"protected void parseImmunizationEvaluationProperties(JsonObject json, ImmunizationEvaluation res) throws IOException, FHIRFormatError {\n parseDomainResourceProperties(json, res);\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; ...
"public boolean emulateOP(long maxCycles) {\n int pc = readRegister(PC);\n long startCycles = cycles;\n if (cycles >= nextEventCycles) {\n executeEvents();\n }\n if (interruptsEnabled && servicedInterrupt == -1 && interruptMax >= 0) {\n pc = serviceInterrupt(pc);\n }\n if (cpuOff) {\n...
"public Object get(ResultSet rs, String colName) throws SQLException {\n File f = this.createTempFile();\n Clob clob = rs.getClob(colName);\n if (clob == null)\n return null;\n Files.write(f, clob.getCharacterStream());\n return new SimpleClob(f);\n}\n"
"public ChannelMap getChannels(final int mipmapLevel) throws IllegalArgumentException {\n final ChannelMap targetChannels = new ChannelMap();\n final double levelScale = (1.0 / Math.pow(2.0, mipmapLevel)) * levelZeroScale;\n final int levelWidth = (int) ((fullScaleWidth * levelScale) + 0.5);\n final int lev...
"public void updateEmptyShadeView(boolean visible) {\n int oldVisibility = mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();\n int newVisibility = visible ? VISIBLE : GONE;\n if (oldVisibility != newVisibility) {\n if (newVisibility != GONE) {\n if (mEmptyShadeView.willBe...
"private void readSingle(final DBObject dbObject, final MappedField mf, final Object entity, Class fieldType, Reference refAnn, EntityCache cache, Mapper mapr) {\n Class referenceObjClass = fieldType;\n DBRef dbRef = (DBRef) mf.getDbObjectValue(dbObject);\n if (dbRef != null) {\n Object resolvedObject =...
"public boolean performItemClick(View view, int position, long id) {\n if (view instanceof WrapperView) {\n view = ((WrapperView) view).item;\n }\n return super.performItemClick(view, position, id);\n}\n"
"public void createOneUnit(final TreeItem treeItem, IndicatorUnit indicatorUnit) {\n final TreeItem indicatorItem = new TreeItem(treeItem, SWT.NONE);\n final IndicatorUnit unit = indicatorUnit;\n IndicatorEnum type = indicatorUnit.getType();\n final IndicatorEnum indicatorEnum = type;\n indicatorItem.set...
"public TdReport findReport(IFile file) {\n if (file != null && FactoriesUtil.REP.equals(file.getFileExtension())) {\n TdReport report = allRepMap.get(file);\n if (report != null) {\n return report;\n }\n return readFromFile(file);\n }\n return null;\n}\n"
"private final void _triggerRateEvent(final Time currentTime, final boolean force) throws IllegalActionException {\n if (_debugging) {\n _debugToStdOut(String.format(\"String_Node_Str\", System.identityHashCode(this), currentTime.toString()));\n }\n int curIdx = 0;\n boolean updatedInputVarMdl = fals...
"public void replaceVarDeclaration(Var oldV, Var newV) {\n if (!this.variables.contains(oldV)) {\n throw new STCRuntimeError(\"String_Node_Str\" + oldV.toString() + \"String_Node_Str\");\n }\n throw new STCRuntimeError(\"String_Node_Str\" + oldV.toString() + \"String_Node_Str\" + \"String_Node_Str\");\n...
"public List<NamedObj> decoratedObjects() {\n CompositeEntity container = (CompositeEntity) getContainer();\n return _getEntitiesToDecorate(container);\n}\n"
"private Set commitDanglingTransactions() throws IOException {\n Set committedGtrids = new HashSet();\n Map danglingRecords = TransactionManagerServices.getJournal().collectDanglingRecords();\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + danglingRecords.size() + \"String_Node_Str\");\n ...
"private void createInsertAttachmentButton(ToolbarView toolbar, final ParticipantId user) {\n WaveRef waveRef = WaveRef.of(waveId);\n Preconditions.checkState(waveRef != null);\n final String waveRefToken = URL.encode(GwtWaverefEncoder.encodeToUriQueryString(waveRef));\n new ToolbarButtonViewBuilder().setIc...
"private List<SingleAnalysis> tryWordWithApostrophe(String word) {\n int index = word.indexOf('\\'');\n if (index < 0 || index == 0 || index == word.length() - 1) {\n return Collections.emptyList();\n }\n String stem = word.substring(0, index);\n String ending = word.substring(index + 1);\n Ste...
"private void checkEnumElementCycle(ErrorReporter reporter) {\n JSType referencedType = getReferencedType();\n if (referencedType instanceof EnumElementType && areIdentical(this, ((EnumElementType) referencedType).getPrimitiveType())) {\n handleTypeCycle(reporter);\n }\n}\n"
"public XAHdfsAuditEventDao getXAHdfsAuditEvent() {\n if (mHdfsDao == null) {\n mHdfsDao = new XAHdfsAuditEventDao(this);\n }\n return mHdfsDao;\n}\n"
"public void testRetryPolicy() {\n Context context = RuntimeEnvironment.application;\n File file = createRandomFile();\n ShadowLooper shadowLooper = Shadows.shadowOf(Looper.getMainLooper());\n Handler handler = new Handler();\n SizeBatchingStrategy strategy = mock(SizeBatchingStrategy.class);\n SizeBa...
"private void doComparePassword(boolean explicit) {\n final String currentPassword = mLockPasswordView.getPassword();\n if (currentPassword.equals(options.password)) {\n exitSuccessCompare();\n mAnalytics.increment(LockerAnalytics.PASSWORD_SUCCESS);\n } else if (explicit) {\n mAnalytics.in...
"private void tryAllDownloads() {\n int numRequeries = 0;\n long nextRequeryTime = System.currentTimeMillis() + getMinutesToWaitForRequery(numRequeries) * 60 * 1000;\n synchronized (this) {\n buckets = new RemoteFileDescGrouper(allFiles, incompleteFileManager);\n }\n while (true) {\n try {\...
"public void addValueHolder(AttributeDetails attributeDetails) {\n String attribute = attributeDetails.getAttributeName();\n RuntimeVisibleAnnotations annotations = null;\n if (attributeDetails.getGetterMethodName() == null || attributeDetails.getGetterMethodName().equals(\"String_Node_Str\") || attributeDetai...
"protected void prePrepare() throws QueryException {\n buildSelectionCriteria(session);\n checkDescriptor(session);\n if (getQueryMechanism().isExpressionQueryMechanism() && getDescriptor().getObjectBuilder().hasJoinedAttributes()) {\n getJoinedAttributeManager().processJoinedMappings();\n if (ge...
"public void valueChanged(TreeSelectionEvent e) {\n DefaultMutableTreeNode n = (DefaultMutableTreeNode) e.getPath().getLastPathComponent();\n if (n.getUserObject() instanceof Word) {\n Word word = (Word) n.getUserObject();\n System.out.println(word);\n final WordBrowser w = new WordBrowser(cm...
"public void setDelayTime(final long delayTime, final TimeUnit unit) {\n if (isDefunct.get()) {\n throw new IllegalStateException(\"String_Node_Str\" + loopName + \"String_Node_Str\");\n }\n loopLock.lock();\n try {\n delayTimeNanos = TimeUnit.NANOSECONDS.convert(delayTime, unit);\n if ...
"private boolean hasOnGoingMigrationMaster(Level level) {\n Address masterAddress = node.getMasterAddress();\n if (masterAddress == null) {\n return node.joined();\n }\n Operation operation = new HasOngoingMigration();\n OperationService operationService = nodeEngine.getOperationService();\n In...
"public Object getProperty(String name) {\n return svcProperties.getProperty(name);\n}\n"
"public static String executeRsyncAIP(AIP aip, boolean hasCompression, boolean syncHistory) throws CommandException {\n String dataTarget = RodaCoreFactory.getRodaConfigurationAsString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n if (dataTarget == null) {\n return PROPERTIES_ERROR_MESS...
"public void testBasicIV2() throws Exception {\n this.GEN_add_filter = true;\n this.genBasicIV();\n this.closeArchiveWriter();\n DataEngineContext deContext2 = newContext(DataEngineContext.MODE_UPDATE, fileName, fileName);\n myPreDataEngine = DataEngine.newDataEngine(deContext2);\n this.PRE_add_sort =...
"private void spreadFlames(int cell, float strength) {\n if (strength >= 0 && Level.passable[cell]) {\n affectedCells.add(cell);\n if (strength >= 1.5f) {\n visualCells.remove(cell);\n spreadFlames(cell + PathFinder.CIRCLE[left(direction)], strength - 1.5f);\n spreadFla...
"private void setPomForHDLight(IProgressMonitor monitor) {\n if (ProcessUtils.jarNeedsToContainContext()) {\n try {\n Model model = MODEL_MANAGER.readMavenModel(getPomFile());\n List<Plugin> plugins = new ArrayList<Plugin>(model.getBuild().getPlugins());\n out: for (Plugin plu...
"public ItemStack getActiveStack(ItemStack journalStack) {\n NBTTagCompound journalTag = journalStack.getTagCompound();\n if (journalTag != null) {\n NBTTagCompound stackTag = (NBTTagCompound) journalTag.getTag(ACTIVE_ITEMSTACK_TAG);\n if (stackTag != null) {\n return ItemStack.loadItemSt...
"public static byte zoomForBounds(Dimension dimension, BoundingBox boundingBox, int tileSize) {\n double dxMax = MercatorProjection.longitudeToPixelX(boundingBox.maxLongitude, (byte) 0, tileSize) / tileSize;\n double dxMin = MercatorProjection.longitudeToPixelX(boundingBox.minLongitude, (byte) 0, tileSize) / tile...
"public void onReceive(final Context context, Intent intent) {\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n String notificationDetailsJson = intent.getStringExtra(FlutterLocalNotificationsPlugin.NOTIFICATION_DETAILS);\n boolean repeat = intent.getBooleanExtra(Flu...
"protected boolean checkPerm(Channel channel, User sender) {\n if (Nexus.getInstance().isAdmin(sender)) {\n return true;\n }\n if (adminOnly()) {\n Nexus.getInstance().sendIRC().message(sender.getNick(), Colors.RED + \"String_Node_Str\");\n return false;\n }\n return true;\n}\n"
"public void testDecode() throws Exception {\n Gt06ProtocolDecoder decoder = new Gt06ProtocolDecoder(null);\n decoder.setDataManager(new TestDataManager());\n int[] buf1 = { 0x78, 0x78, 0x11, 0x01, 0x01, 0x23, 0x45, 0x67, 0x89, 0x01, 0x23, 0x45, 0x10, 0x0B, 0x32, 0x01, 0x00, 0x01, 0x71, 0x93, 0x0D, 0x0A };\n ...
"private void createPluginSipToAipLayout(PluginParameter parameter) {\n String value = job.getPluginParameters().get(parameter.getId());\n if (value == null) {\n value = parameter.getDefaultValue();\n }\n if (StringUtils.isNotBlank(value)) {\n Label pluginLabel = new Label(parameter.getName())...
"protected ParsedResult extract(String text, Date refDate, Matcher matcher, ChronoOptions options) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(refDate);\n if (matcher.group(2) == null && matcher.group(11) == null && matcher.group(6) == null)\n return null;\n ParsedResult result...
"public static GroupElementHandle getGroupElementHandle(List modelList) {\n ModuleHandle handle = SessionHandleAdapter.getInstance().getReportDesignHandle();\n if (handle == null) {\n return GroupElementFactory.newGroupElement(handle, Collections.EMPTY_LIST);\n }\n return GroupElementFactory.newGroup...
"public void setHome(msg_mission_item msg) {\n this.coordinate = new Coord2D(msg.x, msg.y);\n this.altitude = new Altitude(msg.z);\n myDrone.events.notifyDroneEvent(DroneEventsType.HOME);\n}\n"
"public synchronized void registerToRailway(int railway_number) {\n Railway myRailway = Country.getInstance().getRailway(railway_number);\n Station myStation = Country.getInstance().getStation(railway_number);\n myStation.removeTrain(this);\n dlog(\"String_Node_Str\" + this + \"String_Node_Str\" + myRailway...
"public boolean checkTrigger(GameEvent event, Game game) {\n if (event.getType() == EventType.UPKEEP_STEP_PRE) {\n Permanent enchantment = game.getPermanent(this.sourceId);\n if (enchantment != null && enchantment.getAttachedTo() != null) {\n Player player = game.getPlayer(enchantment.getAtt...
"public void onSuccess(HttpResponse<ArrayList<Repository>> response) {\n mView.hideLoading();\n if (isReLoad || readCacheFirst || repos == null) {\n repos = response.body();\n } else {\n repos.addAll(response.body());\n }\n if (response.body().size() > 0) {\n mView.showRepositories(r...
"public RestResponse<DeploymentTopologyDTO> updateSubstitution(String appId, String environmentId, String nodeId, String locationResourceTemplateId) {\n checkAuthorizations(appId, environmentId);\n DeploymentConfiguration deploymentConfiguration = deploymentTopologyService.updateSubstitution(environmentId, nodeId...
"public IValue resolve(MarkerList markers, IContext context) {\n this.value = this.value.resolve(markers, context);\n if (this.type == Types.VOID) {\n markers.add(this.position, \"String_Node_Str\");\n this.value.checkTypes(markers, context);\n return this;\n }\n if (!this.type.isResolv...
"private void renderRiserTube2D(IPrimitiveRenderer ipr, Object oSource, DataPointHints dpha, Location[] loaFront, Fill f, LineAttributes lia, ChartDimension cd, double dSeriesThickness, boolean bOffset, boolean bTransposed, boolean bDeferred, boolean bInverted, boolean bStacked, int zorder_hint) throws ChartException {...
"public boolean isTicketPathSet() {\n return (ticket == null) ? false : ticket.isTicketPathSet();\n}\n"
"public void write(String s) {\n try {\n reader.print(s);\n if (directWrite) {\n reader.flush();\n } catch (IOException e) {\n throw new RuntimeException(\"String_Node_Str\", e);\n }\n}\n"
"public void showAllSurvey(final List<Survey> surveys) {\n SurveyListAdapter surveyListAdapter = new SurveyListAdapter(getActivity(), surveys);\n lv_surveys_list.setAdapter(surveyListAdapter);\n lv_surveys_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(...
"public static void main(String[] args) {\n System.out.println(IntMap.getIntIndex(1, (byte) 0));\n System.out.println(IntMap.getIntIndex(2, (byte) 0));\n System.out.println(IntMap.getIntIndex(3, (byte) 0));\n System.out.println(IntMap.getIntIndex(4, (byte) 0));\n System.out.println(IntMap.getIntIndex(5, ...
"public String getText(Object element) {\n if (!(element instanceof MDMServerDef))\n return \"String_Node_Str\";\n return ((MDMServerDef) element).getDesc();\n}\n"
"private static SortedSet<TreeEntry> getSubtree(SortedSet<TreeEntry> tree, String path, boolean recursive) {\n SortedSet<TreeEntry> subTree = new TreeSet<TreeEntry>(tree.comparator());\n for (TreeEntry entry : tree) {\n String[] comps = entry.getName().split(\"String_Node_Str\");\n if (equals(comps,...
"private ResourceBundle getComponentResourceBundle(IComponent currentComp, String source, AbstractComponentsProvider provider) {\n try {\n AbstractComponentsProvider currentProvider = provider;\n if (currentProvider == null) {\n ComponentsProviderManager componentsProviderManager = Component...
"public void destroy() {\n if (shouldInitialize && initialized) {\n synchronized (initLock) {\n if (initialized) {\n ((MapLoaderLifecycleSupport) impl).destroy();\n initialized = false;\n }\n }\n }\n}\n"
"public static String vsToRef(String url) {\n if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"String_Node_Str\"))\n return \"String_Node_Str\";\n else if (url.equals(\"St...
"private IDataExtractionExtension getDataExtractionExtension(IDataExtractionOption option) throws EngineException {\n IDataExtractionExtension dataExtraction = null;\n String extension = option.getExtension();\n ExtensionManager extensionManager = ExtensionManager.getInstance();\n if (extension != null) {\n...
"public boolean buyShare(String playerName, Portfolio from, String companyName, int shares, int unit) {\n String errMsg = null;\n int price = 0;\n PublicCompanyI company = null;\n currentPlayer = GameManager.getCurrentPlayer();\n while (true) {\n if (!playerName.equals(currentPlayer.getName())) {\...
"public int compareTo(Var other) {\n int c;\n c = this.numStates - other.numStates;\n if (c != 0) {\n return c;\n }\n c = this.type.compareTo(other.type);\n if (c != 0) {\n return c;\n }\n c = this.name.compareTo(other.name);\n if (c != 0) {\n return c;\n }\n if (th...
"private void _propagatePort(CompositeActor container, IOPort currentPort, Map entityToFiringsPerIteration, Map externalRates, LinkedList remainingActors, LinkedList pendingActors) throws NotSchedulableException, IllegalActionException {\n ComponentEntity currentActor = (ComponentEntity) currentPort.getContainer();\...
"protected VertexScorer<Vertex, Double> getVertexScorer(Graph subgraph, Map<Vertex, Double> vertexPriors) {\n GraphJung<Graph> graphJung = new GraphJung<Graph>(subgraph);\n PageRankWithPriors<Vertex, Edge> pageRank = new PageRank<Vertex, Edge>(graphJung, edgeWeights, alpha);\n return new PRVertexScorer(pageRan...
"private void checkVariants(DomainDto domainDto, ValidationResult validationResult) {\n List<VariantDto> variants = domainDto.getVariants();\n if (null == variants) {\n return;\n }\n for (VariantDto variant : variants) {\n checkMaxLength(variant.getIdnTable(), MAX_LENGTH_255, \"String_Node_Str...
"synchronized int add(RemoteFileDesc rfd, boolean checkExisting) {\n repOk();\n File incompleteFile = null;\n try {\n incompleteFile = incompleteFileManager.getFile(rfd);\n } catch (IOException ioe) {\n return -1;\n }\n int n = buckets.size();\n Assert.that(incompletes.size() == n, \"...
"private void startTest() {\n addTower(0, 82, 120, 40);\n addTower(0, 75, 85, 40);\n addTower(0, 125, 105, 40);\n addTower(0, 94, 71, 40);\n changePlayerOfTower(82, 120, 1);\n changePlayerOfTower(75, 85, 1);\n changePlayerOfTower(125, 105, 1);\n changePlayerOfTower(94, 71, 1);\n}\n"
"public TemplateModel get(int i) throws TemplateModelException {\n try {\n return new SimpleScalar(firedEntireInputMatcher.group(i));\n } catch (Exception e) {\n throw new _TemplateModelException(e);\n }\n}\n"
"public static int computeNonScalarOffset(DataValueModel dvmodel, Class type) {\n int offset = 0;\n DataValueModel dvmodel2 = dvmodel.nestedModel(type);\n Map.Entry<String, FieldModel>[] entries2 = heapSizeOrderedFields(dvmodel2);\n for (Map.Entry<String, ? extends FieldModel> entry2 : entries2) {\n ...
"public static void handleOnCreate(ForeignContent content, ExecutionContext context) {\n try {\n ReportItemDesign textItemDesign = (ReportItemDesign) content.getGenerateBy();\n IDynamicTextInstance text = new DynamicTextInstance(content, context);\n if (handleJS(text, textItemDesign.getOnCreate(...
"static HttpMethod extractMethod(final HttpServletRequest httpRequest) throws ODataLibraryException {\n try {\n HttpMethod httpRequestMethod = HttpMethod.valueOf(httpRequest.getMethod());\n if (httpRequestMethod == HttpMethod.POST) {\n String xHttpMethod = httpRequest.getHeader(HttpHeader.X_...
"private boolean advance(final Consumer<? super String> action, final boolean all) {\n final int digits = digits();\n final String separator = getSeparator();\n if (normalized == null) {\n normalized = new DirectPosition2D();\n }\n boolean found = false;\n try {\n do {\n cell....
"public final void triggerImpact(int _damage) {\n health -= (int) ((float) _damage * (1 - 0.15 * (float) defence));\n if (health <= 0) {\n triggerDestroyed();\n }\n}\n"
"public static List<IComponent> filterNeededComponents(Item item, RepositoryNode seletetedNode, ERepositoryObjectType type) {\n EDatabaseComponentName name = EDatabaseComponentName.getCorrespondingComponentName(item, type);\n List<IComponent> neededComponents = new ArrayList<IComponent>();\n if (name == null) ...
"public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n String eventKey = ((ListElement) ((ListViewAdapter) adapterView.getAdapter()).getItem(position)).getKey();\n if (!eventKey.equals(\"String_Node_Str\")) {\n startActivity(ViewTeamActivity.newInstance(getActivity(), ev...
"protected void atFieldAssign(Expr expr, int op, ASTree left, ASTree right, boolean doDup) throws CompileError {\n CtField f = fieldAccess(left, false);\n boolean is_static = resultStatic;\n if (op != '=' && !is_static)\n bytecode.addOpcode(DUP);\n int fi;\n if (op == '=') {\n FieldInfo fin...
"public void execute(Runnable command) {\n super.execute(WrappedRunnable.wrap(LOG, command));\n}\n"
"public PmphGroup addEditorSelcetionGroup(String sessionId, List<PmphGroupMember> list, Long textbookId) throws CheckedServiceException {\n PmphUser pmphUser = SessionUtil.getPmphUserBySessionId(sessionId);\n if (null == pmphUser || null == pmphUser.getId()) {\n throw new CheckedServiceException(CheckedExc...
"private static boolean isParentInDesign(Param<?> p, Map<String, String> sample) throws InPUTException {\n Element parent = p.getParentElement();\n if (parent.isRootElement())\n return true;\n boolean flag = false;\n if (parent instanceof SParam || parent instanceof NParam) {\n if (SpotDesignI...
"public void manageSyntheticAccessIfNecessary(BlockScope currentScope) {\n if (binding.alwaysNeedsAccessMethod()) {\n syntheticAccessor = binding.getAccessMethod(true);\n return;\n }\n if (binding.isPrivate() && (currentScope.enclosingSourceType() != binding.declaringClass)) {\n if (curren...
"public static void init(Config config) {\n if (defaultInstance != null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n synchronized (initLock) {\n if (defaultInstance != null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n defaultInstanc...
"public List<Camera> getCameras() throws CameraException {\n if (!cameraList.isEmpty()) {\n return cameraList;\n }\n try {\n cameraService.setAllCamerasInactive();\n } catch (ServiceException e) {\n LOGGER.debug(\"String_Node_Str\", e);\n }\n cameraGphotoList = new ArrayList<>();\...
"private static byte[] readBytes(List<MPIBuffer> buffers, int length) {\n byte[] bytes = new byte[length];\n int currentRead = 0;\n int index = 0;\n while (currentRead < length) {\n ByteBuffer byteBuffer = buffers.get(index).getByteBuffer();\n int remaining = byteBuffer.remaining();\n i...
"public void setPrimaryClip(ClipData clip, String callingPackage) {\n synchronized (this) {\n if (clip != null && clip.getItemCount() <= 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n final int callingUid = Binder.getCallingUid();\n if (mAppOps.noteOp(App...
"private void freeze(int time) {\n if (!frozen) {\n frozen = true;\n timer = new Timer();\n int delay = DELAY;\n if (time == DAY) {\n delay = DELAY_DAY;\n } else if (time == NIGHT) {\n delay = DELAY_NIGHT;\n }\n timer.schedule(new TimeFreezer(thi...
"protected void openConnection() throws UnknownHostException, IOException {\n Log.d(BLUE, \"String_Node_Str\");\n BluetoothDevice device = findBluetoothDevice();\n if (Build.VERSION.SDK_INT < 9) {\n try {\n bluetoothSocket = device.createRfcommSocketToServiceRecord(UUID.fromString(UUID_SPP_DE...
"void init(int width) {\n if (width > 0) {\n mTicks = new int[width * 2];\n } else {\n mTicks = null;\n }\n mNumTicks = 0;\n mLastBin = 0;\n}\n"
"private List<MissionItem> getSublistToRotateUp() {\n int from = itens.indexOf(selection.get(0));\n int to = from;\n do {\n if (itens.size() < to + 2)\n return itens.subList(0, 0);\n }\n return itens.subList(from, to + 1);\n}\n"
"public void init(NutConfig config, ActionInfo ai) throws Throwable {\n method = ai.getMethod();\n moduleType = ai.getModuleType();\n if (Strings.isBlank(ai.getInjectName())) {\n moduleObj = Mirror.me(moduleType).born();\n } else {\n injectName = ai.getInjectName();\n}\n"
"public void initFromPipe(Class<? extends Pipe> pipeClass) {\n capacity = LIQUID_IN_PIPE;\n flowRate = fluidCapacities.get(pipeClass);\n travelDelay = MathUtils.clamp(Math.round(16F / (flowRate / BuildCraftTransport.pipeFluidsBaseFlowRate)), 1, MAX_TRAVEL_DELAY);\n}\n"
"public int[] createSegmentTree(int[] input) {\n NextPowerOf2 np2 = new NextPowerOf2();\n int nextPowOfTwo = np2.nextPowerOf2(input.length);\n int[] segmentTree = new int[nextPowOfTwo * 2 - 1];\n for (int i = 0; i < segmentTree.length; i++) {\n segmentTree[i] = Integer.MAX_VALUE;\n }\n construc...