content
stringlengths
40
137k
"public void execute(String... params) {\n if (paramsEmpty(params)) {\n throw new MigrationException(\"String_Node_Str\");\n }\n String description = params[0];\n Properties variables = new Properties();\n variables.setProperty(\"String_Node_Str\", description);\n existingEnvironmentFile();\n ...
"public static void invalidateCache() {\n if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n log(\"String_Node_Str\");\n }\n ContactInfoCache.getInstance().invalidateCache();\n sTaskStack.clear();\n String[] numbersToUpdate = Cache.getNumbers();\n for (String number : numbersToUpdate) {\n ...
"public Number next() {\n if (index >= array.length) {\n throw new NoSuchElementException();\n }\n return array[index++];\n}\n"
"public void workflowStatus(HttpRequest request, HttpResponder responder, String appId, String workflowName) {\n programLifecycleHttpHandler.workflowStatus(RESTMigrationUtils.rewriteV2RequestToV3(request), responder, Constants.DEFAULT_NAMESPACE, appId, workflowName);\n}\n"
"public void setActiveGLSubView(AGLEventListener parentGLEventListener, AGLEventListener subGLEventListener) {\n for (IWorkbenchPage rcpView : PlatformUI.getWorkbench().getWorkbenchWindows()[0].getPages()) {\n if (!(rcpView instanceof GLRemoteRenderingView))\n continue;\n GLRemoteRenderingVi...
"static void e(String message) {\n if (!error && message != null && !message.isEmpty())\n return;\n Log.d(\"String_Node_Str\", \"String_Node_Str\" + message);\n}\n"
"private void resolveActions() {\n if (!hasGate())\n return;\n boolean oldBroadcastRedstone = broadcastRedstone;\n boolean[] oldBroadcastSignal = broadcastSignal;\n broadcastRedstone = false;\n broadcastSignal = new boolean[] { false, false, false, false };\n gate.startResolution();\n HashMa...
"public String getStringUnderCursor() {\n int pos = decompiledEditor.getCaretPosition();\n SyntaxDocument sDoc = ActionUtils.getSyntaxDocument(decompiledEditor);\n if (sDoc != null) {\n Token t = sDoc.getTokenAt(pos);\n String ident = null;\n if (t != null && (t.type == TokenType.IDENTIFIE...
"public boolean onOptionsItemSelected(MenuItem item) {\n switch(item.getItemId()) {\n case Id.menu.option.key_server:\n {\n startActivityForResult(new Intent(this, KeyServerQueryActivity.class), 0);\n return true;\n }\n case Id.menu.option.scanQRCode:...
"private void returnClient(Connection connection, TAsyncClient client) throws InterruptedException {\n if (!client.hasError()) {\n getQueue(connection).put(client);\n } else {\n AtomicInteger counter = _numberOfConnections.get(connection._host);\n if (counter != null) {\n counter.d...
"public Object getValueAt(int rowIndex, int columnIndex) {\n EncogProgram genome = (EncogProgram) list.get(rowIndex);\n RenderCommonExpression render = new RenderCommonExpression();\n switch(columnIndex) {\n case 0:\n return \"String_Node_Str\" + rowIndex;\n case 1:\n return...
"public Void copyAsync(Map<VolumeInfo, DataStore> volumeMap, VirtualMachineTO vmTo, Host srcHost, Host destHost, AsyncCompletionCallback<CopyCommandResult> callback) {\n Answer answer = null;\n String errMsg = null;\n try {\n VMInstanceVO instance = instanceDao.findById(vmTo.getId());\n if (insta...
"public static void createIDTypesAndMapping() {\n IDCategory geneIDCategory = IDCategory.registerCategory(\"String_Node_Str\");\n IDCategory sampleIDCategory = IDCategory.registerCategory(\"String_Node_Str\");\n IDType.registerType(\"String_Node_Str\", geneIDCategory, EColumnType.INT);\n IDType.registerType...
"public int hashCode() {\n return Util.hashCode(buffer);\n}\n"
"public DataSetViewData[] populateAllOutputColumns(DataSetHandle dataSetHandle, DataRequestSession session) throws BirtException {\n try {\n DataService.getInstance().registerSession(dataSetHandle, session);\n IResultMetaData metaData = session.getDataSetMetaData(dataSetHandle, false);\n if (met...
"public void check() throws Faults.CheckException, IllegalStateException {\n final Cluster.State currentState = this.stateMachine.getState();\n final List<Throwable> currentErrors = Lists.newArrayList(this.pendingErrors);\n this.pendingErrors.clear();\n try {\n if (Component.State.ENABLED.equals(this...
"public UnNamedArray<R> of(Class<?> aConvertableType) {\n property = property(aConvertableType);\n return this;\n}\n"
"public static TabManager create(FDroid parent, ViewPager pager) {\n if (hasApi(11)) {\n return new HoneycombTabManagerImpl(parent, pager);\n } else {\n return new OldTabManagerImpl(parent, pager);\n }\n}\n"
"public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\");\n int written = writeContents(sb, true);\n HierarchicalMap<K, V> ancestor = parent;\n while (ancestor != null) {\n written += ancestor.writeContents(sb, written == 0);\n ancestor = ancest...
"public static String[] getStyles() {\n ArrayList list = new ArrayList();\n list.add(CHOICE_NONE);\n Iterator iterator = DEUtil.getStyles();\n if (iterator != null) {\n while (iterator.hasNext()) {\n StyleHandle styleHandle = (StyleHandle) iterator.next();\n list.add(styleHandle...
"public int compare(Object arg0, Object arg1) {\n TimedEvent event1 = (TimedEvent) arg0;\n TimedEvent event2 = (TimedEvent) arg1;\n Actor actor1 = event1.contents instanceof IOPort ? (Actor) ((IOPort) event1.contents).getContainer() : (Actor) event1.contents;\n Actor actor2 = event2.contents instanceof IOPo...
"private void updateXMPPID(XMPPID newID, XMPPID oldID) {\n String newResource = newID.getResourceName();\n String oldResource = oldID.getResourceName();\n if (oldResource == null)\n oldID.setResourceName(newResource);\n else if (newResource != null)\n oldID.setResourceName(newResource);\n }...
"public boolean hasNext() {\n if (matcher.group(position) != null) {\n return true;\n } else {\n position += number;\n return false;\n }\n}\n"
"public boolean verify(Stanza stanza) {\n verifyCalled = true;\n if (name != null && !name.equals(stanza.getName()))\n return false;\n if (namespaceURI == null)\n return true;\n boolean elementNamespaceMatches = false;\n if (namespaceURI != null && namespaceURI.equals(stanza.getNamespacePre...
"public CollectionEntity renameCollection(String database, String name, String newName) throws ArangoException {\n validateCollectionName(newName);\n HttpResponseEntity res = httpManager.doPut(createEndpointUrl(database, API_COLLECTION, name, \"String_Node_Str\"), null, EntityFactory.toJsonString(new MapBuilder(\...
"protected void calcMinMax() {\n super.calcMinMax();\n float minLeft = mData.getYMin(AxisDependency.LEFT);\n float maxLeft = mData.getYMax(AxisDependency.LEFT);\n mXChartMax = mData.getXVals().size() - 1;\n mDeltaX = Math.abs(mXChartMax - mXChartMin);\n float leftRange = Math.abs(maxLeft - (mYAxis.isS...
"public static void assertBugReported(Class<?> classToTest, Detector2 detector, BugReporter bugReporter, Matcher<BugInstance> bugInstanceMatcher) throws Exception {\n detectorRunner.runDetectorOnClass(detector, classToTest, bugReporter);\n asserter.assertBugReported(bugReporter, bugInstanceMatcher);\n}\n"
"protected void _evaluate() throws IllegalActionException {\n if (_currentExpression == null || _currentExpression.trim().equals(\"String_Node_Str\")) {\n _setToken(null);\n return;\n }\n if (_dependencyLoop) {\n _dependencyLoop = false;\n throw new IllegalActionException(\"String_N...
"void exerciseLargeStrings(ChronicleMap<String, String> map, int run, int start, int finish, int entrySize) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n XMLEncoder xml = new XMLEncoder(baos);\n Map<String, String> map2 = new HashMap<>();\n Random rand = new Random(1);\n for (int i = 0;...
"public void createRefund(ActionRequest request, ActionResponse response) {\n Invoice invoice = request.getContext().asType(Invoice.class);\n InvoiceService is = Beans.get(InvoiceService.class);\n try {\n invoice = is.find(invoice.getId());\n Invoice refund = is.createRefund(invoice);\n re...
"public void channelRegistered(ChannelHandlerContext ctx) throws Exception {\n SocketChannel channel = (SocketChannel) ctx.channel();\n Attribute<Node> nodeAttribute = channel.attr(key);\n Node node = nodeAttribute.get();\n if (node.getPort() == 0) {\n Log.debug(\"String_Node_Str\");\n }\n Stri...
"private void _populateParentList(XMLDBModel model, DBModel dbModel, LinkedList<XMLDBModel> childHierarchy, XMLDBModel baseModel) {\n ArrayList<DBModel> parentsList = dbModel._parentsList;\n if (parentsList != null && parentsList.size() > 0) {\n childHierarchy.addFirst(model);\n for (DBModel parentD...
"public boolean createInstanceAndStartDependencyAtStartup(Group group, List<String> parentInstanceIds) throws TopologyInConsistentException {\n boolean initialStartup = true;\n List<String> instanceIdsToStart = new ArrayList<String>();\n for (String parentInstanceId : parentInstanceIds) {\n Instance par...
"public void align(boolean lastLine, LayoutContext context) {\n assert (parent instanceof BlockContainerArea);\n CSSValue align = ((BlockContainerArea) parent).getTextAlign();\n boolean isRightAligned = BidiAlignmentResolver.isRightAligned(parent.content, align, endParagraph);\n if ((isRightAligned || IStyl...
"public boolean performFinish() {\n if (mainPage.isCreateNewVersionJob()) {\n try {\n ProxyRepositoryFactory.getInstance().updateLockStatus();\n } catch (PersistenceException e1) {\n ExceptionHandler.process(e1);\n }\n ERepositoryStatus repositoryStatus = ProxyReposi...
"public void validate(final EntityInfoAggregator eia, final ODataEntryImpl entry) throws EntityProviderException {\n Collection<EntityPropertyInfo> propertyInfos = new ArrayList<EntityPropertyInfo>(eia.getPropertyInfos());\n propertyInfos.removeAll(eia.getKeyPropertyInfos());\n Map<String, Object> data = entry...
"static void renderText(Tile upperLeft, Tile lowerRight, String text, Display display, int priority, float dy, Paint fill, Paint stroke, boolean repeat, float repeatGap, float repeatStart, boolean rotate, Point[][] coordinates, List<MapElementContainer> currentLabels) {\n int wayNameWidth = (stroke == null) ? fill.g...
"public void importCSVToEdgesTable(File file, Character separator, Charset charset, String[] columnNames, AttributeType[] columnTypes, boolean createNewNodes) {\n if (columnNames == null || columnNames.length == 0) {\n return;\n }\n if (columnTypes == null || columnNames.length != columnTypes.length) {\...
"public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {\n if (sender instanceof Player) {\n Player player = (Player) sender;\n String playerName = sender.getName();\n if (args != null && args.length > 0) {\n playerName = args[0];\n }\n ...
"private void updateNodeData(NodeEntity node, boolean upgraded, String errorMessage) {\n node = clusterEntityMgr.getNodeWithNicsByMobId(node.getMoId());\n String nodeVmName = node.getVmName();\n if (upgraded) {\n if (node.canBeUpgrade()) {\n logger.info(\"String_Node_Str\" + nodeVmName);\n ...
"private List<Arg> canonicalizeAssignValue(GlobalConstants consts, ArgCV val) {\n if (val.isArrayMemberVal() || val.isArrayMember()) {\n Arg arr = byAlias.findCanonical(val.getInput(0));\n Arg ix = byValue.findCanonical(val.getInput(1));\n return Arrays.asList(arr, ix);\n } else if (val.isStr...
"public void write(PrintWriter out) {\n for (int word = 0; word < numWords; word++) {\n Formatter buffer = new Formatter(Locale.US);\n buffer.format(\"String_Node_Str\", vocabulary.lookupObject(word));\n for (int col = 0; col < numColumns; col++) {\n buffer.format(\"String_Node_Str\",...
"public Param apply(final ConfigOption input) {\n if (input.isPassword()) {\n return new Param(input.getName(), String.class, input.getDescription(), !input.isOptional(), \"String_Node_Str\", Collections.singletonMap(Parameter.IS_PASSWORD, Boolean.TRUE));\n }\n if (input.getType().isPrimitive() && input...
"protected void reduce(GenomeSJ key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n Iterator<Text> it = values.iterator();\n if (key.getType() == -1) {\n while (it.hasNext()) {\n bw.write(it.next().toString() + \"String_Node_Str\");\n count++;\n ...
"public void setUp() throws Exception {\n context = AdaptableContainer.from(new SymbolFactoryImpl(), new PropertyManager(), new Agent());\n conn = JdbcTools.connect(\"String_Node_Str\", \"String_Node_Str\");\n final SemanticMemoryDatabase db = new SemanticMemoryDatabase(\"String_Node_Str\", conn);\n db.stru...
"public void testParseTimeEntries() throws IOException {\n String xml = MyIOUtils.getResourceAsString(\"String_Node_Str\");\n List<TimeEntry> objects = RedmineXMLParser.parseTimeEntries(xml);\n for (TimeEntry timeEntry : objects) {\n System.out.println(timeEntry);\n }\n Integer objId = 2;\n Tim...
"protected void checkFnDeclaresParameters(final FunctionSignature functionSignature, final List<String> fnArgumentNames) throws RestAnnotationException {\n final FunctionArgument[] fnArguments = functionSignature.getArguments();\n for (final String fnArgumentName : fnArgumentNames) {\n boolean found = fals...
"public Map<String, AutoStartOrderUtil.Node> parse() {\n Map<String, AutoStartOrderUtil.Node> nodes = new HashMap<>();\n for (String deployableContainer : this.deployableContainers) {\n Map<String, Object> content = (Map<String, Object>) containerDefinition.get(deployableContainer);\n if (content ==...
"public boolean createFile() {\n if (!configFile.exists()) {\n saveFile(true);\n return true;\n }\n return false;\n}\n"
"protected void addPrefixedFiles(Vector v, ZipOutputStream zOut) throws IOException {\n for (int i = 0; i < v.size(); i++) {\n PrefixedFileSet fs = (PrefixedFileSet) v.elementAt(i);\n DirectoryScanner ds = fs.getDirectoryScanner(project);\n String prefix = fs.getPrefix();\n if (prefix.len...
"private void generateInlineAccessors(ClassFile classFile, final InlineAccessFieldBinding accessField, final ResolvedMember field) {\n final FieldBinding fieldBinding = factory.makeFieldBinding(field);\n generateMethod(classFile, accessField.reader, new BodyGenerator() {\n public void generate(CodeStream c...
"public Representation getRepresentation(HttpServerExchange exchange, RequestContext context, List<DBObject> embeddedData, long size) throws IllegalQueryParamenterException {\n final String requestPath = buildRequestPath(exchange);\n final Representation rep = createRepresentation(exchange, context, requestPath);...
"public static void setSeriesName(Chart chart) {\n List<SeriesDefinition> seriesDefinitions = getAllOrthogonalSeriesDefinitions(chart);\n String seriesText = Messages.getString(\"String_Node_Str\");\n SeriesDefinition sd;\n for (int i = 0; i < seriesDefinitions.size(); i++) {\n sd = seriesDefinitions...
"public void testSendsPushRequest() throws Exception {\n drain(testUP);\n final byte[] clientGUID = GUID.makeGuid();\n byte[] guid = GUID.makeGuid();\n RouterService.query(guid, \"String_Node_Str\");\n Message m = null;\n do {\n m = testUP.receive(TIMEOUT);\n } while (!(m instanceof QueryReq...
"public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n mPager = (ViewPager) view.findViewById(R.id.pager);\n mTitle = (TextView) view.findViewById(R.id.title);\n mAdapter = new PagerAdapter();\n mPager.setAdapter(mAdapter);\n view.findView...
"private void testClob() throws SQLException {\n if (config.memory || !config.big) {\n return;\n }\n deleteDb(\"String_Node_Str\");\n conn = getConnection(\"String_Node_Str\");\n Statement stat = conn.createStatement();\n stat.execute(\"String_Node_Str\");\n stat.execute(\"String_Node_Str\")...
"public static Sort parseSort(String string) {\n Sort[] sorts = Sort.values();\n for (Sort sort : sorts) if (General.asciiLowercase(sort.name()).contentEquals(string))\n return sort;\n return null;\n}\n"
"public static void response(BaseMessage responseMessage) {\n EventRecord.here(ServiceContext.class, EventType.MSG_REPLY, responseMessage.getCorrelationId(), responseMessage.getClass().getSimpleName()).debug();\n if (responseMessage instanceof ExceptionResponseType) {\n Logs.exhaust().trace(responseMessage...
"public Control newEditorOn(Composite parent, int columnIndex, final PropertyDescriptor<?> desc, final Rule rule, final ValueChangeListener listener, SizeChangeListener sizeListener) {\n if (columnIndex == 0)\n return addLabel(parent, desc);\n if (columnIndex == 1) {\n final MethodPicker picker = ne...
"public String getLabel() {\n return this.displayName;\n}\n"
"public void testOpenAndStartNewMatch() throws IllegalStateException, InterruptedException {\n openMatch(\"String_Node_Str\", \"String_Node_Str\", client1);\n client1.startMatch();\n Thread.sleep(50L);\n assertEquals(EPlayerState.IN_RUNNING_MATCH, client1.getState());\n}\n"
"public boolean groupHasFlag(String group, Flag flag) {\n return (this.groups.get(group) != null ? this.groups.get(group).contains(flag) : false);\n}\n"
"public void sync(Collection<String> names) throws IOException {\n writeFileNamesAndSync();\n if (shouldPerformGC()) {\n gc();\n }\n}\n"
"public PlotPanel createPlotPanel(Mondrian mondrian, MDialog plotDialog, DataSet dataSet, JList varNames) {\n int[] indices = varNames.getSelectedIndices();\n PlotPanel barChartsContainer = new PlotPanel();\n int numPlots = indices.length;\n barChartsContainer.setLayout(new GridLayout(1, numPlots));\n in...
"protected Object wrap(Object entity) {\n if ((entity != null) && (PersistenceWeavedRest.class.isAssignableFrom(entity.getClass()))) {\n if (!doesExist(null, entity)) {\n return entity;\n }\n ClassDescriptor descriptor = getJAXBDescriptorForClass(entity.getClass());\n if (entit...
"public void testLeafHeaders() throws Exception {\n ConnectionSettings.ENCODE_DEFLATE.setValue(true);\n ConnectionSettings.ACCEPT_DEFLATE.setValue(true);\n Properties headers = new Properties();\n headers.put(HeaderNames.X_ULTRAPEER, \"String_Node_Str\");\n HandshakeResponse client = HandshakeResponse.cr...
"public void expungeAllConnections() {\n AppConfig.runInBackground(() -> {\n if (!connections.isEmpty()) {\n for (SSHClient connection : connections.values()) {\n SshClientUtils.tryDisconnect(connection);\n }\n mConnections.clear();\n }\n });\n}\n"
"public void testProgram() {\n ProgramId programId = new ProgramId(\"String_Node_Str\", \"String_Node_Str\", ProgramType.MAPREDUCE, \"String_Node_Str\");\n Authorizable authorizable = Authorizable.fromEntityId(programId);\n Assert.assertEquals(programId.toString().replace(ApplicationId.DEFAULT_VERSION + \"Stri...
"public URL getURL(String folder, String fileName) {\n URL url = null;\n try {\n String realPath = context.getRealPath(folder + fileName);\n if (realPath == null) {\n url = context.getResource(folder + fileName);\n log.log(Level.FINE, \"String_Node_Str\", new Object[] { folder,...
"private boolean isAlphabetKey(Key key) {\n return (!key.repeatable) && (key.getPrimaryCode() > 0);\n}\n"
"public GuestVlan dedicateGuestVlanRange(DedicateGuestVlanRangeCmd cmd) {\n String vlan = cmd.getVlan();\n String accountName = cmd.getAccountName();\n Long domainId = cmd.getDomainId();\n Long physicalNetworkId = cmd.getPhysicalNetworkId();\n Long projectId = cmd.getProjectId();\n int startVlan, endV...
"public UploadedFile accept(final Representation entity) throws Exception {\n UploadedFile result;\n if ((entity != null) && MediaType.MULTIPART_FORM_DATA.equals(entity.getMediaType(), true)) {\n final DiskFileItemFactory factory = new DiskFileItemFactory();\n factory.setSizeThreshold(1000240);\n ...
"public void disable(String msg) throws RepositoryException {\n try {\n getDelegate().disable(msg);\n } finally {\n getMgr().autosave();\n }\n}\n"
"public void setList(List<? extends T> items) {\n if (items == null) {\n throw new NullPointerException();\n }\n this.items = items;\n notifyListener();\n}\n"
"protected void restartStudio() {\n isRestart = true;\n ConnectionBean iBean = getConnection();\n loginHelper.saveLastConnectionBean(iBean);\n String workspace = iBean.getWorkSpace();\n if (workspace != null) {\n workspace = workspace.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n }\n ...
"private void processSeeLinks(StringBuffer html, ParsedAnnotationInfo annInfo) {\n if (annInfo != null) {\n List<ParsedAnnotationTag> seeLinks = AnnotationsHelper.getAnnotationTag(annInfo, \"String_Node_Str\");\n if (seeLinks != null) {\n html.append(getTextInDiv(\"String_Node_Str\", \"Strin...
"public Material selectMaterialForRepresenter(Material mat) {\n Material tempMat = selectMaterial(mat);\n Random rand = new Random();\n if (!EarthMethods.isEarthbendable(tempMat) || !EarthMethods.isMetalbendable(player, tempMat)) {\n if (currentBlocks.size() < 1)\n return Material.DIRT;\n ...
"public void testIsSame() {\n ImportItem ImportItem1 = mock(ImportItem.class);\n Property property1 = mock(Property.class);\n when(itemRecord1.getProperty()).thenReturn(property1);\n when(property1.getId()).thenReturn(\"String_Node_Str\");\n when(property1.getLabel()).thenReturn(\"String_Node_Str\");\n ...
"public void start() {\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) {\n e1.printStackTrace();\n }\n frame = new JFrame();\n frame.setTi...
"public SearchProcessResult findPerson(int targetServer, PersonWrapper searchPersonWrapper, boolean lastResort) {\n if (targetServer == Server.MPI_LPI) {\n session.setMpiResultDisplayed(false);\n session.setLpiResultDisplayed(false);\n }\n if (targetServer == Server.MPI) {\n session.setMpi...
"private void createCrossAlternative(List<OptimizerNode> target, OptimizerNode subPlan1, OptimizerNode subPlan2, ShipStrategy ss1, ShipStrategy ss2, LocalStrategy ls, boolean keepFirstOrder, boolean keepSecondOrder, CostEstimator estimator) {\n GlobalProperties gp;\n LocalProperties lp;\n gp = PactConnection.g...
"public synchronized ExchangeRate getExchangeRate(String currency) {\n boolean rmcFlag = false;\n if (currency.equals(\"String_Node_Str\")) {\n currency = \"String_Node_Str\";\n rmcFlag = true;\n }\n boolean ethFlag = false;\n if (currency.equals(\"String_Node_Str\")) {\n if (ethRate...
"protected void initializeHome() throws Exception {\n if (isWebServiceEndpoint) {\n EjbBundleDescriptorImpl bundle = ejbDescriptor.getEjbBundleDescriptor();\n WebServicesDescriptor webServices = bundle.getWebServices();\n Collection myEndpoints = webServices.getEndpointsImplementedBy(ejbDescript...
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n PrintWriter writer = response.getWriter();\n ModuleManager manager = ModuleManager.getModuleManager();\n Logger logger = ModuleManager.getLogger();\n boolean isMultipart = ServletFileUpl...
"public void testTxnOwnerDies() throws TransactionException {\n Config config = new Config();\n final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(3);\n final HazelcastInstance h1 = factory.newHazelcastInstance(config);\n HazelcastInstance h2 = factory.newHazelcastInstance(config);\...
"public String getPerMatch() {\n Double match = Double.parseDouble(getNumMatch());\n Double percent = match / getSum();\n if (Double.isNaN(percent) || Double.isInfinite(percent)) {\n return PluginConstant.NA_STRING;\n }\n return StringFormatUtil.format(percent, StringFormatUtil.PERCENT).toString()...
"public ImagePlus call() {\n final int width = originalImage.getWidth();\n final int height = originalImage.getHeight();\n float[] sobelFilter_x = { 1f, 2f, 1f, 0f, 0f, 0f, -1f, -2f, -1f };\n float[] sobelFilter_y = { 1f, 0f, -1f, 2f, 0f, -2f, 1f, 0f, -1f };\n Convolver c = new Convolver();\n Gaussian...
"public void save(Server server) {\n String sql;\n if (server.getKey() == null) {\n sql = \"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\"...
"private Actor _getNextActorToFire() throws IllegalActionException {\n if (_eventQueue == null) {\n throw new IllegalActionException(\"String_Node_Str\");\n }\n Actor actorToFire = null;\n DEEvent lastFoundEvent = null, nextEvent = null;\n while (!_stopRequested) {\n if (_stopWhenQueueIsEmp...
"public void loadAll_NoCacheLoader() throws Exception {\n Cache<Integer, Integer> cache = getCacheManager().configureCache(getTestCacheName(), new MutableConfiguration<Integer, Integer>());\n HashSet<Integer> keys = new HashSet<Integer>();\n keys.add(1);\n CompletionListenerFuture future = new CompletionLis...
"public void run() {\n if (this.server != null) {\n ISelection selection = server.getViewer().getSelection();\n xobject = (TreeObject) ((IStructuredSelection) selection).getFirstElement();\n }\n if (xobject.getType() != TreeObject.JOB)\n return;\n try {\n XtentisPort port = Util....
"private void longToByteBuffer(long longToSerialize, ByteBuffer byteBuffer) throws IOException {\n if (SIZE_OF_LONG > byteBuffer.capacity()) {\n throw new IOException(\"String_Node_Str\" + byteBuffer.limit() + \"String_Node_Str\" + SIZE_OF_LONG + \"String_Node_Str\");\n }\n byteBuffer.limit(Long.SIZE);\...
"protected void beforeHookedMethod(MethodHookParam param) throws Throwable {\n if (!config.modEnabled) {\n return;\n }\n debug(String.valueOf(config.disableProximity));\n if (!config.disableProximity) {\n return;\n }\n int sensorType = (int) param.args[0];\n if (sensorType == Sensor.T...
"public K get(int index) {\n return pairs.get(index).getKey();\n}\n"
"public void openStartElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver) {\n this.addPositionalNodes(xPathFragment, namespaceResolver);\n if (isStartElementOpen) {\n outputStreamWrite(CLOSE_ELEMENT);\n }\n if (!isLastEventText) {\n if (numberOfTabs > 0) {\n ou...
"private void retrieveTypeFromDoc(AstNode varDeclaration) {\n Token varDecToken = varDeclaration.getToken();\n for (Trivia comment : varDecToken.getTrivia()) {\n for (String line : comment.getToken().getValue().split(\"String_Node_Str\" + PHPLexer.LINE_TERMINATOR + \"String_Node_Str\")) {\n retr...
"private Cell generateDescription(HierarchicalTableGenerator gen, Row row, ElementDefinition definition, ElementDefinition fallback, boolean used, String baseURL, String url, StructureDefinition profile, String corePath, boolean root, boolean logicalModel) throws IOException {\n Cell c = gen.new Cell();\n row.get...
"public void resized(int w, int h, Rect coveredInsets, Rect visibleInsets, boolean reportDraw) {\n SurfaceView surfaceView = mSurfaceView.get();\n if (surfaceView != null) {\n if (localLOGV)\n Log.v(\"String_Node_Str\", surfaceView + \"String_Node_Str\" + w + \"String_Node_Str\" + h + \"String_N...
"public void testPackUnPack() {\n System.out.println();\n System.out.println(\"String_Node_Str\");\n for (int i = 1; i < 32; i++) {\n System.out.println(\"String_Node_Str\" + i);\n int[] values = new int[32];\n int[] packed = new int[i];\n int[] unpacked = new int[32];\n int[...
"public static void main(String[] args) throws ConfigurationException {\n DBpediaGraphLoader.loadFromFiles(FileUtils.extractFilesFromArgs(args));\n PredObjOccsCounter.countAndPersistDBpediaGraphOccs();\n}\n"