content
stringlengths
40
137k
"void selectIcon(int index) {\n if (index < 0) {\n mState.selectedIconIndex = -1;\n return;\n } else {\n mState.selectedIconIndex = index;\n Bitmap selectionBitmap = mSelectionBitmap;\n Utilities.drawSelectedAllAppsBitmap(mSelectionCanvas, selectionBitmap.getWidth(), selectionBi...
"public void execute(Event<UIPageBrowseControlBar> event) throws Exception {\n UIPageBrowseControlBar uiBrowseControlBar = event.getSource();\n UIPageManagement pageManagement = uiBrowseControlBar.getParent();\n UIPageEditBar uiEditBar = pageManagement.getChild(UIPageEditBar.class);\n uiEditBar.savePage();\...
"private void callFunctionExpression(Context context, SwiftAST tree, List<Var> oList, Map<String, String> renames) throws UserException {\n FunctionCall f = FunctionCall.fromAST(context, tree, true);\n FunctionType concrete = TypeChecker.concretiseFunctionCall(context, f.function(), f.type(), f.args(), oList, fal...
"public ExecutionResult execute(Item item) {\n ComponentService service = ComponentsUtils.getComponentService();\n Properties props = getPropertiesFromFile();\n if (item instanceof ConnectionItem) {\n boolean modify = false;\n GenericConnectionItem genericConnectionItem = null;\n Connectio...
"private boolean haveConnectivity() {\n if (device == null) {\n return false;\n }\n RCDeviceListener.RCConnectivityStatus state = device.getConnectivityStatus();\n if (state == RCDeviceListener.RCConnectivityStatus.RCConnectivityStatusWiFi || state == RCDeviceListener.RCConnectivityStatus.RCConnectiv...
"public static String printSymmetryAxes(CeSymmResult symm, boolean elementary) {\n int id = 0;\n String script = \"String_Node_Str\";\n SymmetryAxes axes = symm.getAxes();\n List<Atom[]> repeats = SymmetryTools.toRepeatsAlignment(symm).getAtomArrays();\n List<Matrix4d> symmAxes = axes.getElementaryAxes()...
"public boolean isFilePlanDisplayed() {\n try {\n WebElement filePlanButton = drone.find(FILE_PLAN);\n String label = filePlanButton.getText();\n String filePlan = \"String_Node_Str\";\n if (StringUtils.isNotBlank(label) && filePlan.equalsIgnoreCase(label.trim())) {\n return tr...
"public void buildDataSource(DBInfo dbConnInfo) throws LoadConfigException {\n AppDBInfo appDBInfo = (AppDBInfo) dbConnInfo;\n LOG.info(dbConnInfo.toString());\n DataSource ds = null;\n if (dbConnInfo instanceof AppDBInfo) {\n AppDBInfo appDBInfo = (AppDBInfo) dbConnInfo;\n ds = this.dbConnect...
"private LevelDBQueueAdmin ensureTableExists(QueueName queueName) throws IOException {\n LevelDBQueueAdmin admin = queueName.isStream() ? streamAdmin : queueAdmin;\n String queueTableName = admin.getActualTableName(queueName);\n try {\n admin.create(queueName);\n } catch (Exception e) {\n thro...
"public static void main(String[] args) {\n boolean softPredictions = !args[1].equals(\"String_Node_Str\");\n InputData data = null;\n Set<Constraint> constraints = new HashSet<>();\n switch(args[2]) {\n case \"String_Node_Str\":\n double threshold = Double.parseDouble(args[4]);\n ...
"public void onTabUnselected(ActionBar.Tab tab) {\n if (enableLog)\n Log.d(TAG, \"String_Node_Str\" + tab);\n}\n"
"public static boolean checkHadoopSubitem(ResourcesManager manager, ItemRecord itemRecord) {\n Item item = itemRecord.getItem();\n if (item == null) {\n return false;\n }\n IHadoopClusterService hadoopClusterService = null;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopCluste...
"public void preSnapshotRun() {\n entityManager.preSnapshotRun();\n SpoutChunk spoutChunk;\n while ((spoutChunk = dirtyChunks.poll()) != null) {\n spoutChunk.setNotDirtyQueued();\n if (!spoutChunk.isLoaded()) {\n continue;\n }\n if (spoutChunk.isPopulated() && spoutChunk....
"public View getDropDownView(int position, View convertView, ViewGroup parent) {\n View v = inflater.inflate(R.layout.simple_spinner_dropdown_item_actionbar, parent, false);\n StudyRoomGroup studyRoomGroup = getItem(position);\n TextView name = v.findViewById(android.R.id.text1);\n TextView details = v.find...
"protected int getNumberOfTypes(CompilationUnit compilationUnit) {\n TypeDeclaration<?> typeDeclaration = compilationUnit.getType(0);\n if (typeDeclaration instanceof ClassOrInterfaceDeclaration) {\n ClassOrInterfaceDeclaration type = (ClassOrInterfaceDeclaration) compilationUnit.getType(0);\n NodeL...
"public void content(final ByteBuf data) {\n if (data.readableBytes() < frameLength) {\n return;\n }\n if (frameLength > 0) {\n final ByteBuf frame = data.readSlice(frameLength);\n frame.retain();\n part.add(new ZMTPFrame(frame));\n } else if (part == tail) {\n part.add(EM...
"private String regQuery(String key, String value, int mode) {\n StringBuilder result = new StringBuilder();\n try {\n ProcessBuilder pb = new ProcessBuilder(\"String_Node_Str\", \"String_Node_Str\", key, \"String_Node_Str\", value);\n Process pr = pb.start();\n BufferedReader input = new Buf...
"public void setHeatMapActive(int groupIndex, boolean addToNewSelectionType) {\n if (activeHeatMapID == groupIndex)\n return;\n int previouslyActiveHeatMapID = activeHeatMapID;\n activeHeatMapID = groupIndex;\n if (previouslyActiveHeatMapID != -1) {\n GLHeatMap heatMap = hashHeatMaps.get(activ...
"public HearthTreeNode finishAllEffects(Deck deckPlayer0, Deck deckPlayer1) throws HSException {\n return action_.perform(new HearthTreeNode(this.data_, this.action, this.score_, this.depth_, this.children_, this.numNodesTried_), deckPlayer0, deckPlayer1);\n}\n"
"public String checkCopy(String momlToBeChecked, NamedObj container, boolean hideVariables) throws IllegalActionException {\n _variableBuffer = new StringWriter();\n Workspace workspace = new Workspace(\"String_Node_Str\");\n MoMLParser parser = new MoMLParser(workspace);\n TypedCompositeActor parsedContain...
"public Object call() {\n getClientEngine().getProxyService().destroyDistributedObject(getServiceName(), name);\n return true;\n}\n"
"private void addData(SheetData data) {\n XlsContainer container = getCurrentContainer();\n container.setEmpty(false);\n int col = axis.getColumnIndexByCoordinate(data.getSizeInfo().getStartCoordinate());\n int span = axis.getColumnIndexByCoordinate(data.getSizeInfo().getEndCoordinate()) - col;\n applyTo...
"int indexupvalue(LuaString name, expdesc v) {\n int i;\n for (i = 0; i < f.nups; i++) {\n if (upvalues[i].k == v.k && upvalues[i].info == v.u.s.info) {\n _assert(f.upvalues[i] == name);\n return i;\n }\n }\n checklimit(f.nups + 1, LUAI_MAXUPVALUES, \"String_Node_Str\");\...
"private static boolean isValidJarFile(final String[] driverJarPath) {\n boolean a = false;\n for (String element : driverJarPath) {\n if (element == null || element.equals(\"String_Node_Str\")) {\n return a;\n }\n File jarFile = new File(driverJarPath[i]);\n a = jarFile.exi...
"public String getInstantiationSourceCode(Configuration config, ClassMeta classMeta, ConstructorMeta constructorMeta) {\n StringBuilder buf = new StringBuilder();\n if (constructorMeta == null) {\n appender.appendTabs(buf, 2);\n buf.append(classMeta.name);\n buf.append(\"String_Node_Str\");\n...
"public ProcessWrapper launchTranscode(DLNAResource dlna, DLNAMediaInfo media, OutputParams params) throws IOException {\n final String filename = dlna.getSystemName();\n setAudioAndSubs(filename, media, params);\n PipeIPCProcess ffVideoPipe;\n ProcessWrapperImpl ffVideo;\n PipeIPCProcess[] ffAudioPipe =...
"public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {\n boolean showUnzip = true;\n boolean showShare = true;\n for (File fi : getFiles()) {\n if (fi.isDirectory()) {\n showShare = false;\n else if (!fi.getExtension().equals(\"String_Node_Str\")) {\n showUn...
"public Map<String, String> getRackTopology(String clusterName, String topology) {\n ClusterRead cluster = clusterEntityMgr.toClusterRead(clusterName, true);\n Set<String> hosts = new HashSet<String>();\n List<NodeRead> nodes = new ArrayList<NodeRead>();\n for (NodeGroupRead nodeGroup : cluster.getNodeGroup...
"public void doConfig() {\n file = new Configuration(new File(plugin.getDataFolder(), \"String_Node_Str\"));\n file.load();\n if (new File(plugin.getDataFolder(), \"String_Node_Str\").exists()) {\n System.out.println(\"String_Node_Str\");\n } else {\n file.setProperty(\"String_Node_Str\", 1);\...
"public IExplosive getExplosiveType() {\n return ZhaPinRegistry.get(this.haoMa);\n}\n"
"public void tearDown() {\n ArchiveUtil.deleteAllFiles(new File(TEMP_FOLDER_NAME));\n ArchiveUtil.deleteAllFiles(new File(ARCHIVE_NAME));\n}\n"
"public void end() {\n if (isVisible) {\n ContentEmitterUtil.endContent(content, emitter);\n }\n generator.end(content, finished);\n}\n"
"public boolean isValid(String password) {\n if (account == null) {\n errorCode = 227;\n return false;\n }\n if (false && !password.startsWith(account.getPassword())) {\n errorCode = 227;\n return false;\n }\n errorCode = 227;\n return false;\n}\n"
"private StreamingMarshal getStreamingMarshal(final HttpServletRequest request) {\n final String acceptHeader = request.getHeader(HttpHeaders.ACCEPT);\n if (acceptHeader != null) {\n for (final String accept : Splitter.on(',').split(acceptHeader)) {\n try {\n final MediaType media...
"public static void main(String[] args) {\n System.out.println(\"String_Node_Str\");\n Scanner scan = new Scanner(System.in);\n System.out.println(\"String_Node_Str\");\n String isContinuous = scan.nextLine();\n isContinuous = isContinuous.toLowerCase();\n if (!isContinuous.equals(\"String_Node_Str\")...
"public String[] getData(TenantInfoBean tenant) {\n String[] data = new String[5];\n data[0] = tenant.getTenantDomain();\n data[1] = String.valueOf(tenant.getTenantId());\n data[2] = String.valueOf(tenant.isActive());\n data[3] = tenant.getEmail();\n data[4] = new Date(tenant.getCreatedDate()).toStrin...
"private void displayDefaultSecurityMessage() {\n if (mKeyguardUpdateMonitor.getMaxBiometricUnlockAttemptsReached()) {\n mSecurityMessageDisplay.setMessage(R.string.faceunlock_multiple_failures, true);\n } else {\n mSecurityMessageDisplay.setMessage(R.string.kg_pattern_instructions, false);\n }\n...
"public void testService() {\n try {\n QName qname = new QName(\"String_Node_Str\", \"String_Node_Str\");\n Service service = Service.create(new QName(\"String_Node_Str\", \"String_Node_Str\"));\n service.addPort(qname, SOAPBinding.SOAP11HTTP_BINDING, \"String_Node_Str\" + host + \"String_Node_S...
"public void detachServicePolicy(String policyMap, String portProfile) throws CloudRuntimeException {\n String command = VsmCommand.getServicePolicy(policyMap, portProfile, false);\n if (command != null) {\n command = command.concat(SSH_NETCONF_TERMINATOR);\n send(command);\n parseOkReply(rec...
"public ModelAndView list(final String kind) {\n Class reference = getAttributableUtil(kind).getDerivedSchemaClass();\n List<AbstractDerivedSchema> derivedAttributeSchemas = derivedSchemaDAO.findAll(reference);\n List<DerivedSchemaTO> derivedSchemaTOs = new ArrayList<DerivedSchemaTO>(derivedAttributeSchemas.si...
"private Set<Long> querySubRecordsByRecordConstraints(IDb db) throws IOException {\n Set<Long> recordIds = null;\n for (Map.Entry<String, List<GenericConstraint>> entry : recordConstraints.entrySet()) {\n if (recordIds != null && recordIds.isEmpty()) {\n return Collections.emptySet();\n }...
"public void processPacket(Packet p) {\n if (p instanceof Message) {\n final Message message = (Message) p;\n if (message.getType() == Message.Type.groupchat) {\n if (!StringUtils.parseResource(message.getFrom()).equalsIgnoreCase(conf.getString(\"String_Node_Str\", \"String_Node_Str\"))) {\n...
"public void prepareLoadData() {\n if (mView == null) {\n return;\n if (mView.isPagerFragment() && (!isViewInitialized() || !mView.isFragmentShowed()))\n return;\n if (isLoaded)\n return;\n isLoaded = true;\n loadData();\n}\n"
"protected void executeCommand(CommandEvent event) {\n Channel channel;\n if (event.getArgs().isEmpty())\n channel = event.getTextChannel();\n else\n channel = ArgsUtils.findChannel(event, event.getArgs());\n Guild guild = event.getGuild();\n if (channel == null)\n return;\n Embed...
"public void testWorkflowForkApp() throws Exception {\n File directory = tmpFolder.newFolder();\n Map<String, String> runtimeArgs = new HashMap<>();\n File firstFile = new File(directory, \"String_Node_Str\");\n File firstDoneFile = new File(directory, \"String_Node_Str\");\n runtimeArgs.put(\"String_Nod...
"public ITemplateSection[] createTemplateSections() {\n templateSections = new ITemplateSection[] { new ICEItemTemplate() };\n return templateSections;\n}\n"
"public Site getSite() {\n if (site == null) {\n site = Site.me().setDomain(\"String_Node_Str\").setSleepTime(0).addStartUrl(\"String_Node_Str\").addStartUrl(\"String_Node_Str\").addStartUrl(\"String_Node_Str\").setUserAgent(\"String_Node_Str\");\n }\n return site;\n}\n"
"private Attribute _deleteProperty(String attributeName) throws Exception {\n Attribute toDelete = _searchForAttribute(attributeName);\n if (toDelete == null) {\n return null;\n }\n if (toDelete.isDerived()) {\n throw new IllegalActionException(toDelete, \"String_Node_Str\");\n }\n Strin...
"public boolean checkJarInstalledFromPlatform(String uriPath) {\n if (uriJarInstalled.containsKey(uriPath)) {\n return uriJarInstalled.get(uriPath) != null;\n }\n String absolutePath = null;\n boolean jarFound = false;\n try {\n if (uriPath.startsWith(ExtensionModuleManager.URIPATH_PREFIX))...
"public void fromModelScaler() {\n ModelScaler modelScaler = scaleToolModel.getScaleTool().getModelScaler();\n for (int i = 0; i < size(); i++) set(i, new BodyScaleFactors());\n for (int order = 0; order < modelScaler.getScalingOrder().getSize(); order++) {\n if (modelScaler.getScalingOrder().getitem(or...
"public String[] getAppNames(final Class[] authModuleClass) {\n final Set<String> nameSet;\n try {\n nameSet = (Set<String>) AccessController.doPrivileged(new PrivilegedExceptionAction() {\n public Object run() throws Exception {\n HashMap map;\n Field field = Confi...
"protected void populateAvailableDbObjects() {\n DataSetDesign dataSetDesign = getDataSetDesign();\n DataSourceDesign curDataSourceDesign = dataSetDesign.getDataSourceDesign();\n if (curDataSourceDesign == prevDataSourceDesign) {\n if ((cachedSearchTxt == searchTxt.getText() || (cachedSearchTxt != null ...
"private String docXml(Element parent) {\n Element doc = parent.element(\"String_Node_Str\");\n doc.content().removeAll(doc.elements(\"String_Node_Str\"));\n String xml = doc.getText();\n StringWriter w = new StringWriter();\n MarkupParser parser = new MarkupParser(new ConfluenceDialect());\n HtmlDocu...
"protected EJBContextImpl createEjbInstanceAndContext() throws Exception {\n JCDIService.JCDIInjectionContext<?> jcdiCtx = null;\n Object instance = null;\n EJBContextImpl ctx = _constructEJBContextImpl(null);\n EjbInvocation ejbInv = null;\n boolean success = false;\n try {\n ejbInv = createEj...
"public void onLoaderReset(Loader<List<POIManager>> loader) {\n if (this.adapter != null) {\n this.adapter.clearAll();\n this.adapter.onPause();\n }\n}\n"
"private Boolean isInCluster() {\n return Optional.fromNullable(entity.getAttribute(RiakNode.RIAK_NODE_IN_CLUSTER)).or(Boolean.FALSE);\n}\n"
"public final boolean addSelectedToInventory(Player player, int slot) {\n PlayerInventory inventory = player.getInventory();\n int amountToAdd = selectedItem.getAmount(slot);\n for (ItemStack item : inventory.all(selectedItem.getItemStack().getType()).values()) {\n if (item.getDurability() == selectedIt...
"public boolean onJsConfirm(String url, String message) {\n if (mWebChromeClient == null) {\n return false;\n }\n JsResultReceiver result = new JsResultReceiver();\n Message confirm = obtainMessage(JS_DIALOG, result);\n confirm.getData().putString(\"String_Node_Str\", message);\n confirm.getDat...
"private void caleMergeMinWidth(List figures, List adjust, List hasAdjust) {\n if (adjust.isEmpty()) {\n return;\n }\n int size = figures.size();\n Map map = getOwner().getViewer().getVisualPartMap();\n int adjustMax = 0;\n int trueAdjustMax = 0;\n int adjustMaxNumber = 0;\n for (int i = ...
"private Authentication authenticateNewLogin(Authentication authentication) {\n Context newContext = null;\n Authentication output = null;\n if (authentication != null) {\n try {\n newContext = new Context();\n String name = authentication.getName();\n String password = ...
"private WrapperCommandStack getCommandStack() {\n return new WrapperCommandStack(getModel().getCommandStack());\n}\n"
"private boolean findValueMatcherOneByOne(IAggregationResultSet rs, List levelList, Map valueMap, int aggrIndex) throws IOException {\n int position = 0;\n if (rs.length() <= 0 || levelList.isEmpty())\n return true;\n while (position < rs.length()) {\n rs.seek(position);\n boolean match = ...
"public static FormatLocale registerFormatLocale(FormatLocale formatLocale, Locale locale) {\n String key = locale.toString();\n FormatLocale previous = mapLocaleToFormatLocale.put(key, formatLocale);\n return previous;\n}\n"
"public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {\n portletResp.setContentType(\"String_Node_Str\");\n PrintWriter writer = portletResp.getWriter();\n ModuleTestCaseDetails tcd = new ModuleTestCaseDetails();\n PortletSession ps = portletReq.getP...
"public void propertyChange(PropertyChangeEvent event) {\n if (event.getPropertyName().equals(PreviewLabel.BACKGROUND_COLOR_PROPERTY_NAME)) {\n preview.setBackground(template.getColor(ThemeData.EDITOR_BACKGROUND_COLOR));\n preview.setSelectionColor(template.getColor(ThemeData.EDITOR_SELECTED_BACKGROUND...
"public void isUniqueNodeTemplateName(String topologyId, String newNodeTemplateName, Map<String, NodeTemplate> nodeTemplates) {\n if (nodeTemplates.containsKey(newNodeTemplateName)) {\n log.debug(\"String_Node_Str\", newNodeTemplateName);\n throw new AlreadyExistException(\"String_Node_Str\" + newNodeT...
"protected void internalTransform(String phaseName, Map<String, String> options) {\n if (output)\n out.println(\"String_Node_Str\");\n soot.jbco.util.BodyBuilder.retrieveAllBodies();\n soot.jbco.util.BodyBuilder.retrieveAllNames();\n Scene scene = G.v().soot_Scene();\n scene.releaseActiveHierarchy...
"private NameserverDto generateNsDto() {\n NameserverDto nameserver = new NameserverDto();\n nameserver.setHandle(\"String_Node_Str\");\n nameserver.setLdhName(\"String_Node_Str\");\n nameserver.setUnicodeName(\"String_Node_Str\");\n nameserver.setPort43(\"String_Node_Str\");\n nameserver.setLang(\"St...
"SourceFrameDesc update(RawPacket pkt, long nowMs) {\n rateStatistics.update(pkt.getLength(), nowMs);\n long ts = pkt.getTimestamp();\n SourceFrameDesc frame = frames.get(ts);\n if (frame == null) {\n synchronized (frames) {\n frames.put(ts, frame = new SourceFrameDesc(this, ts));\n ...
"public void createInternalStream(String streamName, List<ColumnNameTypeValue> columns) {\n StreamDefinition newStream = QueryFactory.createStreamDefinition().name(streamName);\n for (ColumnNameTypeValue column : columns) {\n newStream.attribute(column.getColumn(), getSiddhiType(column.getType()));\n }\...
"public void testPerformance() {\n List<ResolvedTarget> targets = new LinkedList<>();\n ResolvedTarget t = null;\n final int numberOfApps = 10000;\n for (int i = 0; i < numberOfApps; i++) {\n t = new Target();\n t.setOrgName(\"String_Node_Str\");\n t.setSpaceName(\"String_Node_Str\");\n...
"public boolean isMixin() {\n if (selectors == null || selectors.size() != 1)\n return false;\n Selector first = selectors.get(0);\n if (first.isCombined())\n return false;\n SimpleSelector selector = first.getHead();\n return selector.isSingleClassSelector();\n}\n"
"public IProcessor generateJobFiles(IProgressMonitor monitor) throws Exception {\n LastGenerationInfo.getInstance().getUseDynamicMap().clear();\n LastGenerationInfo.getInstance().getUseRulesMap().clear();\n final Map<String, Object> argumentsMap = new HashMap<String, Object>(getArguments());\n argumentsMap....
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_month, container, false);\n offset = getArguments().getInt(Constants.OFFSET_ARGUMENT);\n AppCompatImageView prev = view.findViewById(R.id.prev);\n AppCompatIm...
"private static void fillSynonmsForOracle(IMetadataConnection iMetadataConnection, List<TdColumn> metadataColumns, NamedColumnSet table, String tableName) throws SQLException {\n String synSQL = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Nod...
"public void paint(Graphics g) {\n g.setColor(Color.LIGHT_GRAY);\n g.fillRect(0, 0, getWidth() - 1, getHeight() - 1);\n g.setColor(Color.black);\n g.drawRect(0, 0, getWidth() - 1, getHeight() - 1);\n g.setFont(WorkbenchFonts.getTitle2Font());\n FontMetrics fm = g.getFontMetrics();\n int y = fm.getH...
"public void subscribe(ObservableEmitter e) throws Exception {\n for (Object parentClass : REACT_CACHE.keySet()) {\n for (Method method : REACT_CACHE.get(parentClass)) {\n if (reaction.getType().equals(method.getAnnotation(React.class).reactionType())) {\n HashMap<String, Object> map...
"private void assert_new_preferences() {\n final Trace trace = context.getTrace();\n final LinkedList<Preference> o_rejects = new LinkedList<Preference>();\n trace.print(Category.VERBOSE, \"String_Node_Str\");\n Instantiation inst, next_inst;\n for (inst = this.newly_created_instantiations; inst != null;...
"public String createAndroidProfile() throws IOException {\n S_LOGGER.debug(\"String_Node_Str\");\n boolean hasSigning = false;\n try {\n StringBuilder builder = new StringBuilder(Utility.getProjectHome());\n builder.append(projectCode);\n builder.append(File.separatorChar);\n build...
"public void checkTypes(MarkerList markers, IContext context) {\n if (this.instance != null) {\n this.instance.checkTypes(markers, context);\n if (this.field != null && this.field.hasModifier(Modifiers.STATIC) && this.instance.getValueType() != CLASS_ACCESS) {\n markers.add(this.position, \"...
"public String getName() {\n return getOwnOption(\"String_Node_Str\", null, getIdentifier());\n}\n"
"public void menuShown(MenuEvent e) {\n IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection();\n boolean valid = selection.getFirstElement() instanceof WrapperForRelationLink;\n if (selection.getFirstElement() instanceof WrapperForRelationLink) {\n WrapperForRelationLink data...
"public void addValue(Data value) {\n if (value != null) {\n if (getMultiValues() == null) {\n setMultiValues(new CopyOnWriteArraySet<Data>() {\n public boolean add(Data e) {\n return e != null && super.add(e);\n }\n });\n }\n ...
"public void viewReady() {\n List<Tab> tabs = model.getTabs();\n if (tabs.isEmpty()) {\n view.closeTabTray();\n } else {\n view.showFocusedTab(model.getCurrentTabPosition());\n }\n}\n"
"private void createFile(AutoTypeImage imageType) throws FileNotFoundException {\n String suffix = imageType.getAbbreviatedType();\n suffix = suffix.compareTo(\"String_Node_Str\") == 0 ? \"String_Node_Str\" : suffix;\n className = \"String_Node_Str\" + suffix;\n String sumType = imageType.getSumType();\n ...
"private void drawTimeAxis(Canvas c, float labelBeginX, float labelBeginY, boolean drawOnXAxis) {\n if (drawOnXAxis) {\n AxisTickLabels.draw(c, axisTime, tmGridLabel, labelBeginX, labelBeginY, 0, 1, labelPaint, gridPaint, rulerBrightPaint);\n } else {\n drawAxis(c, labelBeginX, labelBeginY, drawOnXA...
"public static StyleEntry createStyleEntry(IStyle style) {\n StyleEntry entry = new StyleEntry();\n entry.setProperty(StyleConstant.BACKGROUND_COLOR_PROP, convertColor(style.getBackgroundColor()));\n float width = Float.parseFloat(style.getBorderBottomWidth());\n if (width > 0) {\n entry.setProperty(...
"public synchronized void authenticateKnownUser(Context context, String consumerKey, String consumerSecret, AuthProviderInfo authProviderInfo, UserProviderCredentials userProviderCredentials, SocializeAuthListener authListener) {\n if (assertInitialized(authListener)) {\n AuthProviderData authProviderData = t...
"protected boolean checkPageBreak() throws BirtException {\n boolean ret = false;\n if (!isInInlineStacking && context.isAutoPageBreak()) {\n int aHeight = getAllocatedHeight();\n while (aHeight + parent.getAbsoluteBP() > context.getMaxBP() + 3000) {\n parent.autoPageBreak();\n ...
"public String getChallengeLevel(Player player) {\n if (Settings.challengeLevels.isEmpty()) {\n return \"String_Node_Str\";\n }\n return Settings.challengeLevels.get(getLevelDone(player));\n}\n"
"private void createCaches() throws Exception {\n cacheProp = new CacheProperties(this);\n int cacheSize = cacheProp.maxCacheSize;\n int numberOfVictimsToSelect = cacheProp.numberOfVictimsToSelect;\n float loadFactor = DEFAULT_LOAD_FACTOR;\n idleTimeout = cacheProp.cacheIdleTimeoutInSeconds * 1000L;\n ...
"protected void handleDrop() {\n updateTargetRequest();\n updateTargetEditPart();\n if (DNDService.getInstance().performDrop(TemplateTransfer.getInstance().getTemplate(), getTargetEditPart(), DND.DROP_DEFAULT, new DNDLocation(getDropLocation()))) {\n return;\n }\n boolean isScalarparameter = false...
"public static void main(String[] args) {\n long[] seeds = { 11, 21, 31, 41, 51, 61, 71, 81, 91, 101 };\n double[] cs = { 1, 10, 100, 1000 };\n int depth = 3;\n int[] iterations = { 0, 2, 4, 6 };\n dataset = new RDFFileDataSet(\"String_Node_Str\", RDFFormat.NTRIPLES);\n createGeoDataSet(50, \"String_N...
"public boolean validate(CellType cellType, Object value) {\n ValidationType vtype = _validation.getValidationType();\n if (vtype == ValidationType.ANY) {\n return true;\n }\n if (vtype != ValidationType.TEXT_LENGTH && (value == null || (value instanceof String && ((String) value).length() == 0))) {\...
"public <T extends Object> void putList(String key, List<T> valueList) {\n if (valueList.isEmpty()) {\n putString(key, \"String_Node_Str\");\n return;\n }\n final StringBuilder sb = new StringBuilder(String.valueOf(valueList.get(0)));\n for (int k = 1; k < valueList.size(); k++) {\n sb....
"private void handlePost(MessageEvent e, HttpRequest request, String namespace, String id, IMap<String, String> m) {\n HttpResponseStatus status = NOT_ACCEPTABLE;\n ChannelBuffer content = request.getContent();\n if (content.readable()) {\n if (NS_METRICS.equals(namespace)) {\n status = metri...
"private void registerForCheckedIpEvent() {\n try {\n Method method = SagaManager.class.getMethod(\"String_Node_Str\", new Class[] { Object.class });\n SpringEventHandler eventHandler = new SpringEventHandler(IpCheckedResponse.class, \"String_Node_Str\", method, applicationContext);\n eventPubli...
"public void testSubstitutionGroupsUnmarshal() throws Exception {\n try {\n InputStream xsdStream = ClassLoader.getSystemResourceAsStream(SUBSTITUTION);\n jaxbContext = DynamicJAXBContextFactory.createContextFromXSD(xsdStream, null, null, null);\n InputStream xmlStream = ClassLoader.getSystemRes...
"public void coGroup(final Iterator<PactRecord> records1, final Iterator<PactRecord> records2, final Collector out) {\n this.context.increaseInputCounter();\n this.collector.configure(out, this.context);\n this.cachedIterator1.setIterator(records1);\n this.cachedIterator2.setIterator(records2);\n Iterato...
"public static String textFor(SniperStatus status) {\n return status.text;\n}\n"