content
stringlengths
40
137k
"public int getShiftX() {\n return shiftX;\n}\n"
"public void finish(FullQueryBuilder<?, ?> criteriaBuilder, EntityViewConfiguration entityViewConfiguration, int tupleOffset, String correlationRoot) {\n ObjectBuilder builder = evm.createObjectBuilder((ViewType<?>) managedViewType, null, viewName, correlationRoot, criteriaBuilder, entityViewConfiguration, tupleOffs...
"public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n RestApiMethodMetadata methodMetaDataCache = cachedMethodMetaData.get(method);\n try {\n if (methodMetaDataCache != null) {\n return methodMetaDataCache.invoke(baseUrl, args);\n } else {\n ret...
"public Object calculate(Object value) {\n if (value == null) {\n return new Double(-1);\n }\n if (intervalStart == null) {\n return new Double(Math.floor(DateTimeUtil.diffMinute(defaultStart, (Date) value) / getDateIntervalRange()));\n } else {\n if (DateTimeUtil.diffMinute((Date) inte...
"protected void checkForConnections(World world, int x, int y, int z) {\n boolean wasConnected = isConnected;\n if (out == ForgeDirection.UNKNOWN) {\n wasConnected = false;\n isConnected = false;\n } else {\n TileEntity te = world.getBlockTileEntity(x + out.offsetX, y + out.offsetY, z + ou...
"public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {\n mCurrentMode = 1 - tab.getPosition();\n firstLoad = true;\n startLoading();\n}\n"
"private static void copyMaskPixel(Mask[] selectedMasks, Product sourceProduct, Product[] maskPixelTargetProducts) {\n if (_MultiSizeIssue.isMultiSize(sourceProduct)) {\n final Product resampledProduct = _MultiSizeIssue.maybeResample(sourceProduct);\n if (resampledProduct != null) {\n source...
"public void reinit(Context context, String name) {\n manager = new CookieManager(null, null);\n preferences = ion.getContext().getSharedPreferences(ion.getName() + \"String_Node_Str\", Context.MODE_PRIVATE);\n Map<String, ?> allPrefs = preferences.getAll();\n for (String key : allPrefs.keySet()) {\n ...
"public void jailPlayer(CommandSender sender, String[] args) {\n args[0] = args[0].toLowerCase();\n Player player = this.getServer().getPlayer(args[0]);\n if (player == null) {\n sender.sendMessage(ChatColor.RED + \"String_Node_Str\" + args[0] + \"String_Node_Str\");\n return;\n }\n if (jai...
"public void run() {\n if (!isAdded()) {\n return;\n }\n mDomHasLoaded = true;\n mWebView.execJavaScriptFromString(\"String_Node_Str\");\n mWebView.execJavaScriptFromString(\"String_Node_Str\" + Utils.escapeQuotes(mTitlePlaceholder) + \"String_Node_Str\");\n mWebView.execJavaScriptFromString(\"...
"private void warnLicensing(final Switch onOff) {\n new AlertDialog.Builder(getActivity()).setTitle(R.string.alert_nopro_title).setMessage(R.string.alert_nopro_content).setNeutralButton(R.string.dialog_ok, new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n ...
"private double getMarginalLogLikelihoodForExample(int i) {\n FgExample ex = data.get(i);\n FeatureTemplateList fts = data.getTemplates();\n FgInferencer infLat = getInfLat(ex);\n FactorGraph fgLat = ex.updateFgLat(model, infLat.isLogDomain());\n infLat.run();\n double numerator = infLat.isLogDomain()...
"public void checkAddTextArtefact() {\n Object[] retval = prepareVerification(TEXT_ARTEFACT_BINDER, null, TEXT_ARTEFACT_PAGE, null, TEXT_ARTEFACT_STRUCTURE, null, TextArtefact.class, TEXT_ARTEFACT_TITLE, TEXT_ARTEFACT_DESCRIPTION, TEXT_ARTEFACT_TAGS, null);\n Binder binder = (Binder) retval[0];\n Binder.Page p...
"public void widgetSelected(SelectionEvent e) {\n if (tocButton.getSelection()) {\n initAnchorChooser(targetReportHandle, true);\n } else if (targetBookmarkButton.getSelection()) {\n initAnchorChooser(targetReportHandle, false);\n }\n}\n"
"private List<SourceFile> createSourceInputs(List<String> files, List<String> zips, List<JsonFileSpec> jsonFiles) throws FlagUsageException, IOException {\n if (isInTestMode()) {\n return inputsSupplierForTesting != null ? inputsSupplierForTesting.get() : null;\n }\n if (files.isEmpty() && jsonFiles == ...
"private boolean withdraw(final int itemID, final int count) {\n if (count < 0) {\n throw new IllegalArgumentException(\"String_Node_Str\" + count + \"String_Node_Str\");\n }\n if (!bank.isOpen() || isPaused() || !isActive() || !isRunning()) {\n return false;\n }\n final RSItem item = bank....
"public final boolean suspendAll() {\n boolean needWait = false;\n synchronized (this) {\n if (this.finish)\n return false;\n this.stop = true;\n needWait = this.numWaiting < TLCGlobals.getNumWorkers();\n }\n while (needWait) {\n synchronized (this.mu) {\n t...
"protected void syncUp(HBaseTestingUtility ut) throws Exception {\n ToolRunner.run(ut.getConfiguration(), new ReplicationSyncUp(), new String[0]);\n}\n"
"public void processAction(ActionRequest portletReq, ActionResponse portletResp) throws PortletException, IOException {\n LOGGER.entering(LOG_CLASS, \"String_Node_Str\");\n portletResp.setRenderParameters(portletReq.getParameterMap());\n long tid = Thread.currentThread().getId();\n portletReq.setAttribute(T...
"Integer getLine() {\n return label.info == null ? label.line : (Integer) label.info;\n}\n"
"void groupSeries() {\n SessionHandle sessionHandle = getDesignEngine().newSessionHandle((ULocale) null);\n ReportDesignHandle designHandle = null;\n String path = \"String_Node_Str\";\n try {\n designHandle = sessionHandle.openDesign(path + \"String_Node_Str\");\n ExtendedItemHandle eih = (Ex...
"public void testTokenEscaping() {\n final String shouldBeEncoded = \"String_Node_Str\";\n final String shouldBeEncodedAs = \"String_Node_Str\";\n delayTestFinish(5000);\n History.addHistoryListener(new HistoryListener() {\n public void onHistoryChanged(String token) {\n assertEquals(escTo...
"protected int getSourceIndex(int mutationIndex) {\n return mutationIndex + startIndex;\n}\n"
"private Route route(ArrayList<Integer> route, int current, ID target, Random rand, Node[] nodes, HashMap<Integer, Integer> from) {\n route.add(current);\n if (this.idSpace.getPartitions()[current].contains(target)) {\n return new RouteImpl(route, true);\n }\n double currentDist = this.idSpace.getPar...
"public SpecifierTree EXPORT_SPECIFIER() {\n return b.<SpecifierTree>nonterminal(Kind.EXPORT_SPECIFIER).is(b.firstOf(f.exportSpecifier(f.identifierReference(b.token(JavaScriptKeyword.DEFAULT)), b.token(EcmaScriptLexer.AS), IDENTIFIER_NAME()), f.exportSpecifier(f.identifierReference(b.token(JavaScriptKeyword.DEFAULT)...
"int checkAllowBackgroundLocked(int uid, String packageName, int callingPid) {\n UidRecord uidRec = mActiveUids.get(uid);\n if (!mLenientBackgroundCheck) {\n if (!allowWhenForeground || uidRec == null || uidRec.curProcState >= ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND) {\n if (mAppOpsSe...
"private Endpoint getPinnedEndpoint() {\n Endpoint endpoint = getEndpoint();\n return endpoint != null ? endpoint.getPinnedEndpoint() : null;\n}\n"
"public void markPage(int pageNum, int mark) {\n pageAllocateTable[pageNum] = mark;\n}\n"
"protected Control createDialogArea(Composite parent) {\n boolean advancedMode = Activator.getDefault().getPreferenceStore().getBoolean(ADVANCED_MODE_PREFERENCE);\n final Composite main = new Composite(parent, SWT.NONE);\n main.setLayout(new GridLayout(1, false));\n GridDataFactory.fillDefaults().grab(true,...
"public static long nextValue(Long oldVersion) {\n long newVersion = oldVersion == null ? 1 : oldVersion + 1;\n return newVersion;\n}\n"
"void testMLCP(MLCP mlcp) {\n KKTSolver solver = new KKTSolver();\n if (mlcp.M == null) {\n throw new TestException(\"String_Node_Str\");\n }\n int Mtype = Matrix.INDEFINITE;\n if (mlcp.M.isSymmetric(0)) {\n Mtype = Matrix.SYMMETRIC;\n }\n int sizeM = mlcp.M.rowSize();\n VectorNd v...
"protected ClassNode findDeclaringType(Expression node, VariableScope scope, TypeConfidence[] confidence) {\n if (node instanceof ClassExpression || node instanceof ConstructorCallExpression) {\n return node.getType();\n } else if (node instanceof FieldExpression) {\n return ((FieldExpression) node)...
"private void cleanup() {\n try {\n if (this.session.get() != null) {\n this.session.clear();\n }\n this.delegate = null;\n if (this.em != null) {\n this.em.close();\n }\n this.em = null;\n } finally {\n outstanding.remove(this.txUuid);\n }...
"void updateCpuStatsNow() {\n synchronized (mProcessCpuTracker) {\n mProcessCpuMutexFree.set(false);\n final long now = SystemClock.uptimeMillis();\n boolean haveNewCpuStats = false;\n if (MONITOR_CPU_USAGE && mLastCpuTime.get() < (now - MONITOR_CPU_MIN_TIME)) {\n mLastCpuTime....
"protected static String makeCQLforDeleteUUIDFromStaticTable(CDefinition def, UUID uuid, long timestamp) {\n return String.format(TEMPLATE_DELETE, makeTableName(def, null), timestamp, \"String_Node_Str\" + uuid.toString());\n}\n"
"public String toString() {\n return \"String_Node_Str\" + getViewInstances();\n}\n"
"public void setMandatory(boolean mandatory) {\n this.mandatory = getBooleanAsCharacter(mandatory);\n}\n"
"public void createControl(Composite parent) {\n ChartUIUtil.bindHelp(parent, ChartHelpContextIds.SUBTASK_CHART);\n Chart defChart = ChartDefaultValueUtil.getDefaultValueChart(getChart());\n init();\n cmpContent = new Composite(parent, SWT.NONE);\n {\n GridLayout glContent = new GridLayout(3, true...
"public Collection<EventRequest> getRequestsByLocation(String location) {\n return queryRequestView(VIEW_BY_LOCATION, location.toLowerCase());\n}\n"
"protected boolean isHidden() {\n if (content != null) {\n IStyle style = content.getComputedStyle();\n String formats = style.getVisibleFormat();\n String format = context.getFormat();\n if (CSSConstants.CSS_NONE_VALUE.equalsIgnoreCase(style.getDisplay()) || (formats != null && formats.l...
"public void setValue(float v) {\n if (v != value.get().floatValue()) {\n value.set(v);\n onChange(v);\n }\n}\n"
"public void validate(ValidationHelper helper, Context context, String key, Callback t) {\n String message;\n for (String urlTemplate : t.keySet()) {\n if (urlTemplate.isEmpty()) {\n message = Tr.formatMessage(tc, \"String_Node_Str\");\n helper.addValidationEvent(new ValidationEvent(V...
"void fillQuickActionMenu(final QuickAction qa, final EditorView view) {\n ActionItem changeData = new ActionItem();\n changeData.setTitle(\"String_Node_Str\");\n changeData.setIcon(mContext.getResources().getDrawable(R.drawable.production));\n changeData.setOnClickListener(new OnClickListener() {\n ...
"private void ack(final ChannelHandlerContext ctx, PBAPNSEvent cc, final String result) {\n PBAPNSMessage.Builder builder = PBAPNSMessage.newBuilder();\n builder.setAps(PBAPNSBody.newBuilder().setAlert(\"String_Node_Str\").setBadge(0));\n PBAPNSUserInfo.Builder infoBuilder = PBAPNSUserInfo.newBuilder().setKey(...
"public void migrate(Module jcrModule, AssetItem jcrAssetItem) {\n Path path = migrationPathManager.generatePathForAsset(jcrModule, jcrAssetItem);\n final org.kie.commons.java.nio.file.Path nioPath = paths.convert(path);\n Map<String, Object> attrs;\n try {\n attrs = ioService.readAttributes(nioPath)...
"public void create(String[][] factTableJointColumnNames, String[][] DimJointColumnNames, IDimension[] dimension, IDatasetIterator iterator, String[] measureColumnName, long cacheSize, StopSign stopSign, boolean suppressInvalidFacttableRow) throws IOException, BirtException {\n IDocumentObject documentObject = docum...
"private void applyMixinAttributes(ClassNode targetClass, ClassNode mixinClass) {\n if (this.config.shouldSetSourceFile()) {\n targetClass.sourceFile = mixin.getClassNode().sourceFile;\n }\n}\n"
"public void serviceResolvedAction(ServiceEvent iServiceEvent) {\n getLogger().debug(\"String_Node_Str\" + iServiceEvent.getInfo());\n try {\n Server tServer = Topology.getInstance().getServer(iServiceEvent.getName());\n if (tServer != null) {\n tServer.setState(State.ONLINE);\n ...
"public void testEventFromSystemBundle() {\n BundleEvent event = getBundleEvent(SYSTEM_BUNDLE_INDEX);\n this.regionBundleEventHook.event(event, this.bundleContexts);\n assertContextPresent(0, 1, 2);\n}\n"
"public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n ConnectionInfo connectionInfo = ((MainActivity) getActivity()).getConnectionInfo();\n mayContinue = true;\n if (!connectionInfo.isHostNameMatching()) {\n mayContinue = false;\n ...
"public void run() {\n Bitmap resizedBitmap = Bitmap.createScaledBitmap(draw, 85, 85, true);\n draw.recycle();\n iv.setImageBitmap(resizedBitmap);\n vs.setDisplayedChild(1);\n}\n"
"public ResultSet executeSparqlQuery(SparqlQuery query) {\n String result = getCacheEntry(query.getQueryString());\n if (result != null) {\n return SparqlQuery.JSONtoResultSet(result);\n } else {\n ResultSet rs = query.send();\n if (rs != null) {\n String json = SparqlQuery.getA...
"protected boolean checkNormalTileLay(TileI tile, boolean update) {\n if (tileLaysPerColour.isEmpty())\n return false;\n String colour = tile.getColourName();\n Integer oldAllowedNumberObject = tileLaysPerColour.get(colour);\n if (oldAllowedNumberObject == null)\n return false;\n int oldAll...
"public static boolean verify(String url, String queryString, String authorizationHeader, OAuthConsumer consumer, OAuthAccessToken accessToken, HttpMethod httpMethod, SignatureMethod signatureMethod) {\n if (authorizationHeader == null) {\n return false;\n }\n if (httpMethod.equals(HttpMethod.POST)) {\n...
"protected Object getImplClass(CAPTestResponseMessage response) {\n Object implClass = null;\n final MessageCap messageCap = m_capTestMessage.getMessageCap();\n IComponentIdentifier ci = messageCap.getCi();\n if (LOG.isInfoEnabled()) {\n LOG.info(\"String_Node_Str\" + (ci == null ? \"String_Node_Str\...
"public static WhoisResources unMarshalError(final InputStream inputStream) {\n try {\n return (WhoisResources) streamingRestClient.unmarshaller.unmarshal(inputStream);\n } catch (JAXBException e) {\n throw new StreamingException(e);\n }\n}\n"
"public Node cloneNode(Node node, IProcess process, Map<String, List<? extends IElementParameter>> paraMap, boolean lockByOther) {\n NodePart nodePart = new NodePart();\n IJobletProviderService service = (IJobletProviderService) GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);\n boo...
"private boolean isAggregatable(ITextContent text) {\n Object generateBy = text.getGenerateBy();\n DataItemDesign data = (DataItemDesign) generateBy;\n if (data.getQuery() != null) {\n return false;\n }\n IElement parent = text.getParent();\n while (parent != null) {\n if (parent instanc...
"public void onEvent(final Presence presence) {\n updatePageState();\n}\n"
"public void run() {\n while (!Thread.interrupted()) {\n Callable<SpoutWorld> task;\n try {\n task = queue.take();\n task.call();\n } catch (InterruptedException ignore) {\n break;\n } catch (Exception e) {\n e.printStackTrace();\n }\n ...
"protected ActionResult execute() throws EntityDoesNotExistException {\n String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID);\n String feedbackSessionName = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME);\n String previewStudentEmail = getRequestParamValue(Const.ParamsNames.PREVI...
"private AttributeContainer.Restriction createRestrictions(final FSimpleType type) {\n AttributeContainer.Restriction restrictions = new AttributeContainer.Restriction();\n FSchemaRestrictions schemaRestrictions = type.getRestrictions();\n List<Integer> validFacets = type.getValidFacets();\n for (Integer fa...
"private Long extract(Account caller, Long templateId, String url, Long zoneId, String mode, Long eventId, boolean isISO, AsyncJobVO job, AsyncJobManager mgr) {\n String desc = Upload.Type.TEMPLATE.toString();\n if (isISO) {\n desc = \"String_Node_Str\";\n }\n eventId = eventId == null ? 0 : eventId;...
"public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {\n String name = null;\n String value = null;\n Duration duration = new Duration(-1d);\n Action action = Action.SET_VALUE;\n Type type = Type.PLAYER;\n for (String arg : scriptEntry.getArguments()) {\n if (aH.matc...
"public void serializeTest() throws Exception {\n long rqId = 78347834L;\n String entityId = \"String_Node_Str\";\n String command = \"String_Node_Str\";\n ChangeValue key1 = new ChangeValue(\"String_Node_Str\", 78.9f, DataTypeInfo.FLOAT);\n ChangeValue key2 = new ChangeValue(\"String_Node_Str\", \"Strin...
"public static List<TdTable> getTables(Schema schema) {\n TaggedValue tv = TaggedValueHelper.getTaggedValue(TaggedValueHelper.TABLE_FILTER, schema.getTaggedValue());\n String tableFilter = tv == null ? null : tv.getValue();\n return TableHelper.getTables(schema.getOwnedElement(), tableFilter);\n}\n"
"void handleAddProperty() {\n assert (!this.propertiesViewer.getSelection().isEmpty());\n if (this.parameterMap == null)\n this.parameterMap = new LinkedHashMap();\n Set<String> keys = new HashSet<String>();\n for (Object key : parameterMap.keySet()) {\n keys.add((String) key);\n }\n Add...
"public ModelAndView list() {\n List<ConnectorInstance> connectorInstances = connectorInstanceDAO.findAll();\n List<ConnectorInstanceTO> connectorInstanceTOs = new ArrayList<ConnectorInstanceTO>();\n for (ConnectorInstance connector : connectorInstances) {\n connectorInstanceTOs.add(binder.getConnectorI...
"private void animatePlacardViewToCenter() {\n CALayer welcomeLayer = placardView.getLayer();\n CAKeyframeAnimation bounceAnimation = CAKeyframeAnimation.create(\"String_Node_Str\");\n bounceAnimation.setRemovedOnCompletion(false);\n double animationDuration = 1.5;\n UIBezierPath bouncePath = new UIBezie...
"public void onAnimationUpdate(ValueAnimator animation) {\n mRevealValue = animation.getAnimatedFraction();\n mScale.reset();\n mScale.setScale(1, 1.f * mRevealValue, 0, mUseableGraphHeight + mTopPadding);\n mGraph.invalidate();\n}\n"
"public void grow(byte[][] map_raw, Square[][] map, int x, int y) {\n squares.add(map[y][x]);\n map[y][x].setObstacle(this);\n int w = map[0].length;\n int h = map.length;\n int nw, wn, ne, en, se, es, sw, ws;\n if (isEmpty(x - 1, y - 1, w, h, map_raw, map)) {\n nw++;\n wn++;\n }\n ...
"protected void parsePayload(ParsableByteArray data, long timeUs) throws ParserException {\n int packetType = data.readUnsignedByte();\n int compositionTimeMs = data.readUnsignedInt24();\n compositionTimeMs = (compositionTimeMs & 0x800000L) >>> 23 == 1 ? (compositionTimeMs | 0xff000000) : compositionTimeMs;\n ...
"static Class getMostSpecificCommonType(Class c1, Class c2) {\n if (c1 == c2) {\n return c1;\n }\n if (c2.isPrimitive()) {\n if (c2 == Byte.TYPE)\n c2 = Byte.class;\n else if (c2 == Short.TYPE)\n c2 = Short.class;\n else if (c2 == Character.TYPE)\n c...
"public boolean canBlockStay(World world, int x, int y, int z) {\n if (world.getBlock(x, y, z) != this)\n return super.canBlockStay(world, x, y, z);\n if (world.getBlock(x, y - 1, z).canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this) && world.getBlock(x, y - 1, z).isFertile(world, x, y - 1, z)) {...
"public void addCacheResource(String name, Closeable resource) {\n Set<Closeable> cacheResources = resources.get(name);\n if (cacheResources == null) {\n synchronized (resources) {\n cacheResources = resources.get(name);\n if (cacheResources == null) {\n cacheResources ...
"public String getConfig() {\n return service.instance.getConfig().findReplicatedMapConfig(managedObject.getName()).toString();\n}\n"
"protected void drawDataSet(Canvas c, IPieDataSet dataSet) {\n float angle = 0;\n float rotationAngle = mChart.getRotationAngle();\n float phaseX = mAnimator.getPhaseX();\n float phaseY = mAnimator.getPhaseY();\n final RectF circleBox = mChart.getCircleBox();\n final int entryCount = dataSet.getEntryC...
"protected boolean onBlockActivatedDefaultWrench(World world, int x, int y, int z, EntityPlayer player) {\n WrenchUsage wrenchUsed = testWrenchUsage(x, y, z, player);\n if (wrenchUsed == WrenchUsage.NORMAL) {\n rotateBlock(world, x, y, z);\n return true;\n } else if (wrenchUsed == WrenchUsage.SNE...
"private List<ChessCoordinate> getVerticalPathSpaces(int maxSteps) {\n int least = Math.min(mOrigin.y, mDestination.y);\n int most = Math.max(mOrigin.y, mDestination.y);\n List<ChessCoordinate> spaces = new ArrayList<>();\n for (int y = least + 1; y <= most; y++) {\n if (Math.abs(mOrigin.y - y) <= ma...
"public boolean affectEntity(float radius, Entity entity, boolean doExplosion) {\n boolean explosionCreated = false;\n if (entity == this.controller) {\n return false;\n }\n if (entity instanceof IExplosiveIgnore) {\n if (((IExplosiveIgnore) entity).canIgnore(this)) {\n return false...
"private void getMonitorAttributes(AdminCommandContext ctxt) {\n String s = \"String_Node_Str\" + mr.toString();\n if (Boolean.parseBoolean(System.getenv(\"String_Node_Str\"))) {\n KernelLoggerInfo.getLogger().info(s);\n } else {\n KernelLoggerInfo.getLogger().fine(s);\n }\n mr.execute();\n...
"private void postLovesNow() {\n if (postLovesTimeout != null)\n postLovesTimeout.cancel();\n if (!lovesToPost)\n return;\n lovesToPost = false;\n Playlist lovesPl;\n synchronized (this) {\n Long lovePlid = myPlaylistIdsByTitle.get(\"String_Node_Str\");\n lovesPl = playlists.g...
"public void draw(SpriteBatch batch) {\n if (renderer != null && currentFrameAnimation != null) {\n float screenWidth = Gdx.graphics.getWidth();\n float screenHeight = Gdx.graphics.getHeight();\n float width = HEIGHT / renderer.getHeight() * renderer.getWidth();\n RectangleRenderer.draw(b...
"public Point[] place(int count, Point center, double maxX, double maxY) {\n Random rnd = new Random();\n double dx = 0;\n double dy = 0;\n int i = 0;\n Point[] ret = new Point[count];\n if (getInCenter()) {\n ret[0] = new Point(center.getX(), center.getY());\n i++;\n }\n int tries...
"private static AbstractAlgorithm createPartialFull(final Lattice lattice, final INodeChecker checker, final FLASHStrategy strategy) {\n int binaryAnonymityProperty = Node.PROPERTY_K_ANONYMOUS;\n NodeTrigger binaryTriggerSkip = new NodeTrigger() {\n public boolean appliesTo(Node node) {\n return...
"public boolean matches(Pattern givenPattern) {\n if (!(givenPattern instanceof ItemSquarePattern))\n return false;\n return this.equalPrimitive((ItemSquarePattern) givenPattern);\n}\n"
"public void messageReceived(MessageReceivedEvent evt) {\n Contact protocolContact = evt.getSourceContact();\n Date date = evt.getTimestamp();\n Message message = evt.getSourceMessage();\n MetaContact metaContact = mainFrame.getContactList().findMetaContactByContact(protocolContact);\n PresenceStatus con...
"protected void accept(SelectionKey key) throws IOException {\n ServerSocketChannel serverSocketChannel = (ServerSocketChannel) key.channel();\n SocketChannel socketChannel = serverSocketChannel.accept();\n Socket socket = socketChannel.socket();\n socket.setKeepAlive(true);\n if (s_logger.isTraceEnabled...
"protected void onGraphDraw(Canvas _Canvas) {\n super.onGraphDraw(_Canvas);\n if (!mPieData.isEmpty()) {\n float innerStartAngle = 0;\n float innerSweepAngle = 0;\n int amountOfPieSlices = mPieData.size();\n for (int pieIndex = 0; pieIndex < amountOfPieSlices; pieIndex++) {\n ...
"private void createJTreeNode(Cell cell) {\n DefaultMutableTreeNode ret = new DefaultMutableTreeNode(cell) {\n public String toString() {\n Cell cell = (Cell) getUserObject();\n return \"String_Node_Str\" + cell.getCellID().toString();\n }\n };\n cellNodes.put(cell, ret);\n ...
"public static void main(String[] args) {\n DoubleProblem problem;\n Algorithm algorithm;\n MutationOperator mutation;\n DifferentialEvolutionCrossover crossover;\n String problemName;\n if (args.length == 1) {\n problemName = args[0];\n } else {\n problemName = \"String_Node_Str\";\n...
"private void startMatch(TournamentPairing pair, MatchOptions matchOptions) {\n try {\n TableManager tableManager = TableManager.instance;\n Table table = tableManager.createTable(GamesRoomManager.instance.getMainRoomId(), matchOptions);\n table.setTournamentSubTable(true);\n table.setTou...
"public void tick(float elapsed) {\n for (int ii = _alwaysTick.size() - 1; ii >= 0; ii--) {\n _alwaysTick.get(ii).tick(elapsed);\n }\n if (!_visible.isEmpty()) {\n for (SceneElement element : _visible) {\n element.tick(elapsed);\n }\n _visible.clear();\n }\n Vector3...
"public void run() {\n if (player.getHealth() > 0)\n xPlayer.setLocation(player.getLocation());\n if (xAuthSettings.protectLoc)\n player.teleport(getLocationToTeleport(player.getWorld()));\n}\n"
"private void doFetchPrevious() {\n hasPreviousTriples = false;\n while (iterator.hasPrevious()) {\n TripleID previous = iterator.previous();\n if (previous.match(pattern)) {\n hasPreviousTriples = true;\n hasMoreTriples = true;\n previousTriple.assign(previous);\n ...
"void move() {\n if (ableToMove) {\n if (up) {\n GameScreen.yRate = (playerSpeed);\n y += playerSpeed;\n Level.grassY -= playerSpeed;\n } else if (down) {\n GameScreen.yRate = -playerSpeed;\n y -= playerSpeed;\n Level.grassY += playerSpe...
"private void copyRemote(String localFile, String destDir) throws IOException {\n SSHClient ssh = new SSHClient(remoteHost, remoteUser, remotePwd);\n try {\n ssh.scpFileToRemote(localFile, destDir);\n } catch (IOException e) {\n throw e;\n } catch (Exception e) {\n throw new IOException...
"public void testImportAliasing() {\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\" + \"String...
"protected PropertyGetter newGetter(Class c, Method m, Field f) {\n return new ReflectionPropertyGetter(c, m, f, this);\n}\n"
"public static boolean detectClusterChangeOfProcess(HadoopClusterConnection hcConnection, IProcess process) {\n String distribution = hcConnection.getDistribution();\n String version = hcConnection.getDfVersion();\n String customJars = hcConnection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CLU...