content
stringlengths
40
137k
"public void eigenvalues() {\n double[][] mat1 = { { 3, 0, 0 }, { 1, 3, 1 }, { 2, -1, 1 } };\n ComplexNumber[] evs1 = SquareMatrixOps.eigenvalues(new Matrix(mat1));\n ComplexNumber[] exp1 = { new ComplexNumber(3, 0), new ComplexNumber(2, 0), new ComplexNumber(2, 0) };\n for (ComplexNumber ev : evs1) {\n ...
"public static JSONObject fillOwner(Element e, JSONObject einfo) {\n JSONObject info = einfo;\n if (info == null) {\n info = new JSONObject();\n info.put(\"String_Node_Str\", getElementID(e));\n }\n if (e.getOwner() == null)\n info.put(\"String_Node_Str\", null);\n else\n info...
"private void setUpComponent(Component comp, IRecordInternal record, Object compColor, Object fgColor, Object compFont, Object compBorder, int visibleRowIndex) {\n if (tabIndex < 0) {\n TabIndexHelper.setUpTabIndexAttributeModifier(comp, tabIndex);\n } else {\n if (elementTabIndexes.size() > 0) {\n ...
"public void readMarshallable(WireIn wire) throws IllegalStateException {\n StringBuilder mountDesc = new StringBuilder();\n while (!wire.isEmpty()) {\n MountPoint mp = wire.readEventName(mountDesc).typedMarshallable();\n mounts.put(mountDesc.toString(), mp);\n }\n}\n"
"private final void render(IDeviceRenderer idr, Bounds bo, RadarSeries se, SeriesDefinition sd) throws ChartException {\n List<Series> rts = sd.getRunTimeSeries();\n int iThisSeriesIndex = rts.indexOf(se);\n if (iThisSeriesIndex == -1)\n iThisSeriesIndex = getSeriesIndex();\n int totalSeriesCnt = get...
"public void placeComponents(Composite parent) {\n Series series = seriesDefn.getDesignTimeSeries();\n linkSeries = new Link(parent, SWT.NONE);\n {\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n linkSeries.setLayoutData(gd);\n linkSeries.setText(\"String_Node_Str\" + seriesName ...
"private static MetricsContext getMetricCollector(Program program, String runId, MetricsCollectionService service) {\n if (service == null) {\n return null;\n }\n Map<String, String> tags = Maps.newHashMap();\n tags.put(Constants.Metrics.Tag.NAMESPACE, program.getNamespaceId());\n tags.put(Constan...
"private static NetworkPartitionRef[] convertNetworkPartitionToASStubNetworkPartition(List<NetworkPartitionReferenceBean> networkPartitionReferenceBeans) {\n List<NetworkPartitionRef> networkPartitionRefList = new ArrayList<NetworkPartitionRef>();\n for (NetworkPartitionReferenceBean networkPartitionReferenceBean...
"private AttributeType actionImportHierarchy(final String path, final char separator) {\n try {\n return Hierarchy.create(path, separator);\n } catch (final IOException e) {\n main.showErrorDialog(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), e);\n }\n r...
"private static void onPOBoxInfoRequest(EntityPlayer player) {\n MailAddress address = new MailAddress(player.getGameProfile());\n POBox pobox = PostRegistry.getOrCreatePOBox(player.worldObj, address);\n if (pobox == null) {\n return;\n }\n Proxies.net.sendToPlayer(new PacketPOBoxInfo(PacketId.POB...
"public void autoUnbondWhenEntering(BleDeviceState... states) {\n autoUnbond_onStateEnter = autoUnbond_onStateEnter != null ? autoUnbond_onStateEnter : 0x0;\n for (int i = 0; i < states.length; i++) {\n autoUnbond_stateEnter |= states[i].bit();\n }\n}\n"
"public Operation getBackupOperation() {\n return new TxnPrepareBackupOperation(name, itemId, pollOperation, transactionId);\n}\n"
"public void run() {\n File[] tmp = null;\n try {\n tmp = _getOmcBinaryPaths();\n } catch (ConnectException e) {\n _omcLogger.getSever(\"String_Node_Str\");\n _couldNotStartOMC = true;\n hasInitialized = false;\n return;\n }\n File omcBinary = tmp[0];\n final File wo...
"public double evaluateDouble(Evaluator evaluator) {\n List memberList = evaluateCurrentList(listCalc, evaluator);\n return (Double) avg(evaluator.push(false), memberList, calc);\n}\n"
"private void putChar(char c, boolean doshowcursor) {\n Dimension size;\n int rows = getRows();\n int columns = getColumns();\n int tm = getTopMargin();\n int bm = getBottomMargin();\n byte[] msg;\n if (debug > 4)\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c)...
"public void shouldDetectDifferentNullStrategy() {\n Mapper<Source, Destination> mapper = Mapping.from(Source.class).to(Destination.class).replaceCollection(Source::getIds, Destination::getIds).with(idBuilder()).mapper();\n assertThatThrownBy(() -> {\n AssertMapping.of(mapper).expectReplaceCollection(Sourc...
"private Class load(CharSequence name) {\n int hash = (int) (Compare.calcLongHashCode(name) & 0x7ffffff) % CACHE_SIZE;\n if (classWeakReference == null)\n classWeakReference = new WeakReference[CACHE_SIZE];\n WeakReference<Class> ref = classWeakReference[hash];\n if (ref != null) {\n Class cla...
"private Date parseDate(String dateString) {\n if (dateString.length() > 1) {\n Date date = new Date();\n String[] parts = dateString.split(\"String_Node_Str\");\n String[] yyyymmdd = parts[0].split(\"String_Node_Str\");\n String[] hhmmss = parts[1].split(\"String_Node_Str\");\n da...
"private static PkgLookupResult checkIfPackage(Environment env, TraversalRequest traversal, FileInfo rootInfo) throws MissingDepException, IOException, InterruptedException {\n Preconditions.checkArgument(rootInfo.type.exists() && !rootInfo.type.isFile(), \"String_Node_Str\", traversal, rootInfo);\n PackageLookup...
"Map<String, Set<String>> buildTree(List<PBDBItem> itemList) {\n if (itemList == null)\n throw new RuntimeException(\"String_Node_Str\");\n Map<String, String> result = new HashMap<String, String>();\n for (PBDBItem item : itemList) {\n if (item.isValid()) {\n String name = item.getNam...
"public boolean setVersion(String version) {\n if (version == null) {\n return false;\n }\n File file = getFile(version);\n if (file == null || !file.isFile()) {\n if (\"String_Node_Str\".equals(databaseVersion)) {\n return setDefaultVersion();\n } else {\n return ...
"public Mono<ListOrganizationsResponse> retrieveOrgId(String orgName) {\n if (\"String_Node_Str\".equals(orgName)) {\n OrganizationResource or = OrganizationResource.builder().entity(OrganizationEntity.builder().name(orgName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(ORG_UUID).bu...
"public void shutdown() {\n forge.getLockManager().performLocked(LockMode.READ, new Callable<Void>() {\n public Void call() throws Exception {\n logger.info(\"String_Node_Str\" + addon.getId() + \"String_Node_Str\");\n long start = System.currentTimeMillis();\n ...
"private Tableau _createTableau() throws IllegalActionException {\n Effigy effigy = GTEntityUtils.findToplevelEffigy(this);\n TextEffigy textEffigy;\n try {\n textEffigy = TextEffigy.newTextEffigy(effigy, \"String_Node_Str\");\n } catch (Exception e) {\n throw new IllegalActionException(this, ...
"protected final void executeLoop() {\n long lastSyncWriteTimestamp = System.currentTimeMillis();\n long lastSyncReadTimestamp = lastSyncWriteTimestamp;\n while (true) {\n if (this.shouldStopHard())\n break;\n if (this.shouldStopSoft()) {\n if (this.cancel)\n ...
"public int select0(int count) {\n if (count > size)\n return -1;\n if (count <= 3) {\n if (count == 1)\n return node1pos;\n else if (count == 2)\n return node2pos;\n else if (count == 3)\n return node3pos;\n else\n return -1;\n }\n...
"private void runPrivoxyShellCmd() throws Exception {\n int privoxyProcId = TorServiceUtils.findProcessId(privoxyPath);\n StringBuilder log = null;\n int attempts = 0;\n while (privoxyProcId == -1 && attempts < MAX_START_TRIES) {\n log = new StringBuilder();\n String[] cmds = { PRIVOXY_INSTALL...
"public FeatureVector getExpectedFeatureCounts(double[] params) {\n model.updateModelFromDoubles(params);\n FgModel feats = new FgModel(model);\n feats.zero();\n for (int i = 0; i < data.size(); i++) {\n FgExample ex = data.get(i);\n FgInferencer infLatPred = getInfLatPred(ex);\n Factor...
"public LTTngProjectNode getProject() {\n ILTTngProjectTreeNode projectNode = null;\n ILTTngProjectTreeNode parent = getParent();\n if (parent instanceof LTTngTraceFolderNode) {\n projectNode = parent.getParent();\n } else if (parent instanceof LTTngExperimentNode) {\n projectNode = parent.get...
"private void createTable(Composite mainComp) {\n int style = SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.FULL_SELECTION;\n resultsViewer = new TableViewer(mainComp, style);\n resultsViewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n resultsViewer.getTable().setHeaderVisible(tr...
"public static List<MappingField> getFieldsForUpdate(Entity<?> en, FieldMatcher fm, Object refer) {\n List<MappingField> re = new ArrayList<MappingField>(en.getMappingFields().size());\n for (MappingField mf : en.getMappingFields()) {\n if (mf.isPk()) {\n if (en.getPkType() == PkType.ID && mf.is...
"public String[] getDatastoreName() {\n return datastoreName.clone();\n}\n"
"private void setValueAndType(long lval) {\n if (!isValidXsdInt(lval)) {\n this.valueType = XSD_LONG;\n this.value = lval;\n } else {\n this.valueType = XSD_INT;\n this.value = new Integer((int) lval);\n }\n this.isDecimal = false;\n}\n"
"public void writeToParcel(Parcel out, int flags) {\n out.writeFloat(scaleX);\n out.writeFloat(scaleY);\n out.writeInt(orientation);\n out.writeInt(pageMargin);\n out.writeInt(pageLimit);\n out.writeInt(pagerId);\n}\n"
"public PublicWSDefinition discover(int operation) {\n if (operation == PublicWSProvider2.GET) {\n return new PublicWSDefinition() {\n public List getParameters() {\n return null;\n }\n public String getReturnType() {\n return IMAGE_MIME_TYPE;\n ...
"public static List<Mail> readMails(Mailbox mailbox, MailFolder mailFolder) throws MessagingException {\n List<Mail> mails = new ArrayList<>();\n Properties props = new Properties();\n props.put(\"String_Node_Str\", \"String_Node_Str\");\n props.put(\"String_Node_Str\", \"String_Node_Str\");\n props.put(...
"public void onItemClick(AdapterView<?> adapter, View v, int position, long arg3) {\n final String room = (String) recentAdapter.getRoomAtPosition(position);\n if (RoomsList.size() != 0) {\n new Thread() {\n public void run() {\n try {\n binder.getService().getC...
"public GetMessage withDetail(String detail) {\n return new GetMessage(queue, id, matchHidden, detail, wait, hide);\n}\n"
"static void handleElement(Element ele, Map cssStyles, IContent content, ActionContent action, int index) {\n IStyle cssStyle = (IStyle) cssStyles.get(ele);\n if (cssStyle != null) {\n if (\"String_Node_Str\".equals(cssStyle.getDisplay())) {\n return;\n }\n }\n String lTagName = ele...
"public static String parseArguments(String[] arguments) throws IOException {\n Level traceLevel = Level.WARNING;\n Queue<String> args = new LinkedList<>();\n for (String arg : arguments) {\n if (arg.length() > 0) {\n args.add(arg);\n }\n }\n AbortRetryIgnoreHandler handler = nul...
"private static void setDatabaseValue(DatabaseConnection connection, INode node, String repositoryValue) {\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getValueFromRepositoryName(connection, node, \"String_Node_Str\");\n if (value != null) {\n connection.setUsername(...
"private static void getImportFiles(String xsdFile, String newPath) {\n File file = new File(xsdFile);\n if (!file.exists()) {\n return;\n }\n String xsdFolder = file.getParent();\n SAXReader saxReader = new SAXReader();\n Document doc;\n try {\n URL url = file.toURI().toURL();\n ...
"public void setPartName(String typeTitle, Image icon) {\n String title = null;\n String type = null;\n if (typeTitle != null && typeTitle.contains(SEPARATOR)) {\n String[] tt = typeTitle.split(SEPARATOR);\n type = tt[0];\n title = tt[1];\n } else {\n title = typeTitle;\n }\n ...
"public static List<Boolean> getRestartStates(int uid, String restrictionName) {\n List<Boolean> listRestartRestriction = new ArrayList<Boolean>();\n Set<String> listRestriction = new HashSet<String>();\n if (restrictionName == null)\n listRestriction = mRestart.keySet();\n else if (mRestart.keySet()...
"public List<MethodInfo> findSetters(Class<?> parameterType) {\n String setterSignature = \"String_Node_Str\" + parameterType.getName().replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\";\n List<MethodInfo> methodInfos = new ArrayList<>();\n for (MethodInfo methodInfo : methodsInfo().metho...
"private boolean handleKey(Event event) {\n HasDataPresenter<T> presenter = getPresenter();\n int oldRow = getKeyboardSelectedRow();\n boolean isRtl = LocaleInfo.getCurrentLocale().isRTL();\n int keyCodeLineEnd = isRtl ? KeyCodes.KEY_LEFT : KeyCodes.KEY_RIGHT;\n int keyCodeLineStart = isRtl ? KeyCodes.KE...
"public List<IWizardPage> getWizardPages(ApplicationWizardDescriptor descriptor, CloudFoundryServer cloudServer, CloudFoundryApplicationModule applicationModule) {\n List<IWizardPage> defaultPages = new ArrayList<IWizardPage>();\n StandaloneDeploymentWizardPage deploymentPage = new StandaloneDeploymentWizardPage(...
"public void play(String uri) {\n final libvlc_exception_t ex = new libvlc_exception_t();\n String defaultLibraryPath = \"String_Node_Str\";\n if (Platform.isLinux())\n defaultLibraryPath = \"String_Node_Str\";\n libraryPath = libraryPath != null ? libraryPath : defaultLibraryPath;\n ArrayList<Str...
"public HConsistencyLevel get(OperationType op, String cfName) {\n switch(op) {\n case READ:\n return HConsistencyLevel.QUORUM;\n case WRITE:\n return HConsistencyLevel.QUORUM;\n }\n return HConsistencyLevel.ONE;\n}\n"
"public boolean checkGUI(Player player) {\n if (Config.hasSpout) {\n SpoutPlayer spoutPlayer = (SpoutPlayer) player;\n if (spoutPlayer.isSpoutCraftEnabled()) {\n popGUI(spoutPlayer);\n return true;\n }\n }\n return false;\n}\n"
"public List<ConceptClass> getAllConceptClasses(boolean includeRetired) throws DAOException {\n Criteria crit = sessionFactory.getCurrentSession().createCriteria(ConceptClass.class);\n if (includeRetired == false)\n crit.add(Expression.eq(\"String_Node_Str\", false));\n return crit.list();\n}\n"
"public synchronized T getNextVisible(final T id) {\n final InMemoryTreeNode<T> node = getNodeFromTreeOrThrowAllowRoot(id);\n if (!node.isVisible()) {\n return null;\n }\n final List<InMemoryTreeNode<T>> children = node.getChildren();\n if (!children.isEmpty()) {\n final InMemoryTreeNode<T>...
"public void run() {\n try {\n super.run();\n schema = ((XSDTreeContentProvider) page.getTreeViewer().getContentProvider()).getXsdSchema();\n IStructuredSelection selection = (IStructuredSelection) page.getTreeViewer().getSelection();\n XSDAnnotationsStructure struc = new XSDAnnotationsSt...
"public void testCommandExecution() throws Exception {\n Thread[] t = new Thread[10];\n List<ProcReturn> results = Collections.synchronizedList(new ArrayList<>(t.length));\n for (int i = 0; i < t.length; i++) {\n t[i] = newThread(i, results);\n }\n for (int i = 0; i < t.length; i++) {\n t[i...
"public void showTables(UUID roomId) {\n this.roomId = roomId;\n UUID chatRoomId = null;\n if (SessionHandler.getSession() != null) {\n btnQuickStart.setVisible(SessionHandler.isTestMode());\n gameChooser.init();\n chatRoomId = SessionHandler.getRoomChatId(roomId).orElse(null);\n }\n ...
"public DataObject createDataObject(Property property, Type aType) {\n DataObject created = aHelperContext.getDataFactory().create(aType);\n if (property.isMany()) {\n ((ListWrapper) getList(property)).add(created, true);\n } else {\n set(property, created);\n }\n _setModified(true);\n (...
"public void navigateTo(String viewName) {\n if (currentViewName == null || !currentViewName.equals(viewName)) {\n if (views.containsKey(viewName)) {\n contentHolder.setContent(views.get(viewName).getViewComponent());\n this.listeners.forEach(viewChangeListener -> viewChangeListener.befo...
"public String getLang() {\n if (lang == null) {\n lang = Strings2.firstWord(getText().substring(PREFIX.length()));\n }\n return lang;\n}\n"
"public ClassInfo getEnclosingSuperClassOf(ClassInfo classInfo, boolean membersOnly) {\n if (membersOnly && isLocalInnerClass()) {\n return null;\n }\n ClassInfo outer = enclosingClass;\n while (outer != null) {\n if (outer.isSubclassOf(classInfo)) {\n return outer;\n }\n ...
"public Object coerceToBean(Object val, Component comp, BindContext ctx) {\n if (val != null) {\n final Listbox lbx = (Listbox) comp;\n final ListModel<?> model = lbx.getModel();\n if (model != null) {\n final String varnm = (String) ((Listitem) val).getAttribute(BinderImpl.VAR);\n ...
"public void onBackPressed() {\n AsyncTask<Void, AsyncTaskProgress, Boolean> loginTask = loginListener.getAsyncTask();\n if (loginTask != null && !loginTask.isCancelled() && !(loginTask.getStatus() == Status.FINISHED)) {\n loginTask.cancel(true);\n }\n super.onBackPressed();\n}\n"
"private MumblerNode toSpecialForm() {\n SymbolConvertible symbol = (SymbolConvertible) this.list.get(0);\n switch(symbol.name) {\n case \"String_Node_Str\":\n return quote(this.list.get(1));\n case \"String_Node_Str\":\n return new IfNode(this.list.get(1).convert(), this.list....
"public void test() {\n String[] uniprotIDs = new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n for (String id : uniprotIDs) {\n try {\n testUniprot(id);\n Thread.sleep(1000);\n } cat...
"public void run() {\n Object[] params = { mBlog.getRemoteBlogId(), mBlog.getUsername(), mBlog.getPassword() };\n instantiateInterface().callAsync(mOptionsCallback, Method.GET_OPTIONS, params);\n instantiateInterface().callAsync(mCategoriesCallback, Method.GET_CATEGORIES, params);\n}\n"
"public boolean wasSuccessful() {\n return (getValidation(\"String_Node_Str\") == null || getValidation(\"String_Node_Str\").wasSuccessful());\n}\n"
"private void checkMessagingTopics(Set<String> problemKeys) {\n validateMessagingTopic(Constants.Audit.TOPIC, problemKeys);\n validateMessagingTopic(Constants.Notification.TOPIC, problemKeys);\n}\n"
"int appendString(FeatureExpr ctx, MJIEnv env, int objref, Conditional<String> conditionalS) {\n Conditional<Integer> condAref = env.getReferenceField(ctx, objref, \"String_Node_Str\");\n Map<Integer, FeatureExpr> arefMap = condAref.toMap();\n for (Integer aref : arefMap.keySet()) {\n FeatureExpr arefCt...
"private static <T> void addIfNotNull(T item, String itemString, ImmutableList.Builder<T> builder, RuleContext ruleContext, String attrName) {\n if (item == null) {\n ruleErrorConsumer.attributeError(attrName, \"String_Node_Str\" + itemString + \"String_Node_Str\" + attrName);\n } else {\n builder.a...
"public boolean isEnabled() {\n if (getSelectedElement() == null) {\n return false;\n }\n return super.isEnabled() && (getSelectedElement().isTemplateParameterValue());\n}\n"
"public int getValueAsInt() {\n if (this.value instanceof Number) {\n return ((Number) this.value).intValue();\n } else {\n throw new ClassCastException(\"String_Node_Str\");\n }\n}\n"
"public static void addStructures(PropertyHandle propHandle, List structures) throws SemanticException {\n if (structures == null || structures.isEmpty())\n return;\n if (propHandle == null)\n return;\n DesignElementHandle element = propHandle.getElementHandle();\n IPropertyDefn propDefn = pro...
"protected Router createRouter(long id, long accountID, boolean isVpc) {\n String accountIdStr = String.valueOf(accountID);\n String routerName = getRouterName(isVpc, id);\n RuleChain pre = api.addChain().name(getChainName(routerName, RuleChainCode.TR_PRE)).tenantId(accountUuid).create();\n RuleChain post =...
"public void visitGoto(SSAGotoInstruction instruction) {\n Assertions.UNREACHABLE(\"String_Node_Str\");\n breakBasicBlock(index);\n}\n"
"public void invalidateClass(Class myClass, boolean recurse) {\n IdentityMap identityMap = this.getIdentityMap(myClass);\n Enumeration keys = identityMap.keys();\n while (keys.hasMoreElements()) {\n CacheKey key = (CacheKey) keys.nextElement();\n Object obj = key.getObject();\n if (recurse...
"public TrackingNumber createTrackingNumber(Product product, Company company, LocalDate date) throws AxelorException {\n TrackingNumber trackingNumber = new TrackingNumber();\n if (product.getIsPerishable()) {\n trackingNumber.setPerishableExpirationDate(date.plusMonths(product.getPerishableNbrOfMonths()))...
"protected void onResume() {\n askForPermissions(requestCounter);\n mReachabilityReceiver.startListening();\n super.onResume();\n}\n"
"public StateMultiProcessStreamReceiver clone(String key) {\n return new StateMultiProcessStreamReceiver(streamId + key, processCount, latencyTracker);\n}\n"
"private void readHeader() throws IOException {\n waitForTheHeaderToBeBuilt(bytes);\n bytes.position(HEADER_OFFSET);\n Consumer<WireIn> nullConsumer = o -> {\n };\n Consumer<WireIn> dataConsumer = $ -> {\n wire.read().marshallable(header);\n };\n wire.readDocument(dataConsumer, nullConsumer)...
"public static double distance(EmpiricalCDF cdf1, EmpiricalCDF cdf2) {\n if (cdf1.numBins != cdf2.numBins || cdf1.min != cdf2.min || cdf1.max != cdf2.max) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n return IntStream.range(0, cdf1.numBins + 1).mapToDouble(i -> Math.abs(cdf1.probabi...
"protected Object call() throws Exception {\n ReplicatedMapService replicatedMapService = getService(ReplicatedMapService.SERVICE_NAME);\n ReplicatedRecordStore recordStore = replicatedMapService.getReplicatedRecordStore(parameters.name, true);\n Object returnValue = recordStore.put(serializationService.toObje...
"private void sendMessageToOfflineClient(String client, Client cc) {\n if (!cc.supportAPNS()) {\n logger.error(\"String_Node_Str\", client);\n if (offlineMode == PBAPNSMessage.OfflineModes.SendAfterOnline_VALUE) {\n message.setStatus(client, new PushStatus(PushStatus.WaitOnline));\n }...
"protected ICompletableFuture<Data> putAsyncInternal(final Data key, final Data value, final long ttl, final TimeUnit timeunit) {\n final NodeEngine nodeEngine = getNodeEngine();\n int partitionId = nodeEngine.getPartitionService().getPartitionId(key);\n PutOperation operation = new PutOperation(name, key, val...
"public void shutdown(String dbId) {\n Pair<Server, Thread> entry = serverControls.remove(dbId);\n if (entry != null) {\n try {\n Thread second = entry.getSecond();\n removeShutdownHook(second);\n Server first = entry.getFirst();\n first.shutdownWithCatalogs(Data...
"public int[] selectChannels(KeyValuePair<K, V> pair, int numberOfChannels) {\n switch(strategy) {\n case BROADCAST:\n return broadcast(numberOfChannels);\n case PARTITION_HASH:\n return partition(pair, numberOfChannels);\n case FORWARD:\n return robin(numberOfCh...
"public String getWor() {\n execute();\n setWorks(true);\n calls = numWorks / limit;\n rest = numWorks % limit;\n if (rest != 0) {\n calls++;\n }\n RetrievedWork[] wor = null;\n w = new ArrayList<RetrievedWork>();\n RetrievedWork resource;\n for (int i = 1; i <= calls; i++) {\n ...
"private static String buildUpdateLastUpdateSql(Set<Long> rawContactIds) {\n final String sql = \"String_Node_Str\" + Tables.CONTACTS + \"String_Node_Str\" + Contacts.CONTACT_LAST_UPDATED_TIMESTAMP + \"String_Node_Str\" + Clock.getInstance().currentTimeMillis() + \"String_Node_Str\" + Contacts._ID + \"String_Node_St...
"public SqlDatabase call(DatabaseInner inner) {\n return new SqlDatabaseImpl(inner.name(), (SqlServerImpl) sqlServer, inner, sqlServer.manager());\n}\n"
"private NetResponse fetch(final NetRequest request) throws ApiException {\n try {\n HttpResponse response = conn.exec(request);\n int statusCode = response.getStatusLine().getStatusCode();\n if (App.DEBUG) {\n log(\"String_Node_Str\" + request.url + \"String_Node_Str\" + request.post...
"public int hashCode() {\n final int prime = 31;\n int result = super.hashCode();\n result = prime * result + ((this.loadbalancer == null || this.loadbalancer.getOwnerUserId() == null) ? 0 : this.loadbalancer.getOwnerUserId().hashCode());\n result = prime * result + ((this.loadbalancer == null || this.loadb...
"public void StorePendingBlockUpdateRecord(net.minecraft.world.NextTickListEntry PendingBlockUpdate, long WorldTime) {\n net.minecraft.nbt.NBTTagCompound PendingBlockUpdateRecord = new net.minecraft.nbt.NBTTagCompound();\n PendingBlockUpdateRecord.setInteger(\"String_Node_Str\", PendingBlockUpdate.xCoord);\n P...
"protected IStatus run(IProgressMonitor monitor) {\n TacitFormComposite.setConsoleViewInFocus();\n TacitFormComposite.updateStatusMessage(getViewSite(), null, null, form);\n monitor.beginTask(\"String_Node_Str\", 100);\n Date dateObj = new Date();\n Display.getDefault().syncExec(new Runnable() {\n ...
"public void setFocused(HUDComponent component, boolean focused) {\n if (component != null) {\n component.changeTransparency(component.getTransparency(), focused ? focusedTransparency : ((component.getPreferredTransparency() != 1.0f) ? component.getPreferredTransparency() : unfocusedTransparency));\n }\n}\...
"private String getAbrvFromUnit(String t, String s) {\n int i = 0;\n Converter[] u;\n if (t == \"String_Node_Str\")\n u = volUnits;\n else\n u = weightUnits;\n while (i < u.length && !u[i].unit.equalsIgnoreCase(s)) {\n i++;\n }\n if (i >= u.length)\n return null;\n el...
"public static DelegateAccountPo agentToPojo(Consensus<Agent> bean) {\n if (null == bean) {\n return null;\n }\n DelegateAccountPo po = new DelegateAccountPo();\n po.setAddress(bean.getAddress());\n po.setDeposit(bean.getExtend().getDeposit().getValue());\n po.setStartTime(bean.getExtend().getS...
"private void addListeners() {\n if (WindowSystem.isGTK() && forceDrawLinksGtk) {\n table.addListener(SWT.Paint, new Listener() {\n public void handleEvent(Event event) {\n paintEvent(event);\n }\n });\n }\n ControlListener controlListener = new ControlListene...
"public int run(String[] args) throws Exception {\n if (args.length < 3) {\n System.out.println(\"String_Node_Str\");\n System.exit(0);\n }\n Configuration conf = new Configuration();\n String outputPath = args[1];\n String input_file_type = args[2];\n conf.setStrings(\"String_Node_Str\"...
"public void executeTask(final Map<String, Object> context) throws GenieException, IOException {\n final long start = System.nanoTime();\n try {\n final JobExecutionEnvironment jobExecEnv = (JobExecutionEnvironment) context.get(JobConstants.JOB_EXECUTION_ENV_KEY);\n final String jobWorkingDirectory ...
"public String getURL() {\n int selectedPrefix = prefixURLSpinner.getSelectedItemPosition();\n String url = profileLocation.getText().toString();\n if (url == null || url.length() == 0) {\n return url;\n }\n if (selectedPrefix < prefixURLSpinner.getCount() - 1) {\n url = prefixURLSpinner.ge...
"public void startTestJob(ITestJobPO testJob, Locale locale, boolean autoScreenshot) {\n TestExecution.getInstance().setStartedTestJob(testJob);\n m_testjobStartTime = new Date();\n try {\n final AtomicBoolean isTestExecutionFailed = new AtomicBoolean(false);\n final AtomicInteger testExecutionMe...
"private List<Class<?>> scanClassAndPutMetadata(InputStream bits, Reader reader, Map<String, EntityMetadata> entityMetadataMap, Map<String, Class<?>> entityNameToClassMap, String persistenceUnit, String client, Map<String, List<String>> clazzToPuMap, Map<String, IdDiscriptor> entityNameToKeyDiscriptorMap) throws IOExce...