content
stringlengths
40
137k
"protected Map<String, PluginParameter> getDefaultParameters() {\n return pluginParameters.entrySet().stream().collect(Collectors.toMap(e -> e.getKey(), e -> new PluginParameter(e.getValue())));\n}\n"
"public void onLoad(ClassPool pool, String name) throws NotFoundException, CannotCompileException {\n CtClass clazz = pool.get(name);\n clazz.setModifiers(clazz.getModifiers() & ~Modifier.FINAL);\n for (CtMethod method : clazz.getDeclaredMethods()) {\n method.setModifiers(method.getModifiers() & ~Modifi...
"public T get() {\n long currentTime = timeProvider.getTime();\n float time = ((float) (currentTime - lastTime)) * speed;\n transition.update((int) (time * 1000f));\n lastTime = currentTime;\n return transition.get();\n}\n"
"public void fire() throws IllegalActionException {\n if (input.hasToken(0)) {\n ObjectToken inputToken = (ObjectToken) input.get(0);\n Image inputObject = (Image) inputToken.getValue();\n if (!(inputObject instanceof Image)) {\n throw new IllegalActionException(this, \"String_Node_St...
"public void onMenuTabReSelected(int menuItemId) {\n TabSelected(menuItemId);\n if (menuItemId == R.id.bottomBarHome) {\n if (getSupportFragmentManager().getBackStackEntryCount() > 1) {\n onBackPressed();\n }\n } else if (menuItemId == R.id.bottomBarMyGifts) {\n } else if (menuItemI...
"public boolean isPojo() {\n if (this.klass.isPrimitive() || this.isEnum())\n return false;\n if (this.isStringLike() || this.isDateTimeLike())\n return false;\n if (this.isPrimitiveNumber() || this.isBoolean() || this.isChar())\n return false;\n return !isContainer();\n}\n"
"public void memberPresenceChanged(ChatRoomMemberPresenceChangeEvent evt) {\n ChatRoom sourceChatRoom = (ChatRoom) evt.getSource();\n if (!sourceChatRoom.equals(chatRoomWrapper.getChatRoom()))\n return;\n String eventType = evt.getEventType();\n ChatRoomMember chatRoomMember = evt.getChatRoomMember()...
"public Profile[] findAssociatedProfile(ManagedEntity entity) throws RuntimeFault, RemoteException {\n ManagedObjectReference[] mors = getVimService().findAssociatedProfile(getMOR(), entity.getMOR());\n return convert2Profiles(mors);\n}\n"
"private void testBackupMigrationAndRecovery(int nodeCount, int backupCount, int mapSize) throws Exception {\n TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(nodeCount);\n final String name = MAP_NAME;\n final Config config = new Config();\n config.setProperty(GroupProperties.PROP...
"public boolean shouldBackup() {\n return successful;\n}\n"
"public static boolean isAbsoluteUrl(String ref) {\n return ref != null && ref.startsWith(\"String_Node_Str\") || ref.startsWith(\"String_Node_Str\") || ref.startsWith(\"String_Node_Str\") || ref.startsWith(\"String_Node_Str\");\n}\n"
"public void removeFromMap(Map map, Object key) {\n if (clustered) {\n ILock lock = null;\n try {\n IMap imap = (IMap) map;\n lock = acquireDistributedLock(imap.getName());\n imap.delete(key);\n } finally {\n releaseDistributedLock(lock);\n }\n ...
"private void buildLazyStore(File lazyFile, String sourcePath, Templates preFilter, boolean removeDoctypeDecl, boolean stripWhitespace) throws IOException {\n Path.createPath(lazyFile.getParent());\n Configuration config = new Configuration();\n LazyTreeBuilder lazyBuilder = new LazyTreeBuilder(config);\n S...
"public static boolean isPrime(Integer possiblePrime) {\n List<Integer> primes = new ArrayList<Integer>(asList(2));\n for (int nextPrime = 2; nextPrime <= possiblePrime; ) {\n nextPrime = nextPrime(nextPrime, primes);\n primes.add(valueOf(nextPrime));\n }\n return primes.contains(possiblePrime...
"public static Client getInstance(String aApplicationUrl, String aDefaultDatasourceName) throws Exception {\n if (aApplicationUrl != null) {\n if (aApplicationUrl.endsWith(H2DB_FILE_SUFFIX) && (new File(aApplicationUrl)).exists()) {\n aDefaultDatasourceName = \"String_Node_Str\" + Math.abs(aApplica...
"public long durationOfLastDelay() {\n return marked ? duration : 0;\n}\n"
"public Iterator<Score> iterator() {\n return toList().iterator();\n}\n"
"public void loadProperties(AppConfig config) {\n String sCommerceID = config.getProperty(\"String_Node_Str\");\n String sCommerceTerminal = config.getProperty(\"String_Node_Str\");\n String sCommerceSign = config.getProperty(\"String_Node_Str\");\n String sCommerceSHA = config.getProperty(\"String_Node_Str...
"protected AuthenticationResult mapToAuthenticationResult(AuthStatus status, JaspiRequest jaspiRequest, Subject clientSubject) {\n if (tc.isEntryEnabled())\n Tr.entry(tc, \"String_Node_Str\", \"String_Node_Str\" + status);\n AuthenticationResult authResult = null;\n String pretty = \"String_Node_Str\";\...
"public synchronized List<TdColumn> returnMetadataColumnsFormTable(IMetadataConnection metadataConnection, String tableLabel, boolean... dontCreateClose) {\n List<TdColumn> metadataColumns = new ArrayList<TdColumn>();\n boolean needCreateAndClose = dontCreateClose.length == 0 || !dontCreateClose[0];\n DriverSh...
"public String invokePlan(final CSARID csarID, final QName serviceTemplateId, int serviceTemplateInstanceID, final TPlanDTO givenPlan) throws UnsupportedEncodingException {\n final TPlan storedPlan = ServiceProxy.toscaReferenceMapper.getPlanForCSARIDAndPlanID(csarID, givenPlan.getId());\n if ((null == storedPlan)...
"public final CounterSample sampleAndReset() {\n return new CounterSample(counter.sampleAndReset());\n}\n"
"public void trashConnections(Connection connection, Client client) {\n BlockingQueue<Client> blockingQueue;\n synchronized (_connMap) {\n blockingQueue = _connMap.put(connection, getNewQueue());\n try {\n blockingQueue.put(client);\n } catch (InterruptedException e) {\n ...
"public void onWindowFocusChanged(boolean hasWindowFocus) {\n super.onWindowFocusChanged(hasWindowFocus);\n if (hasWindowFocus) {\n if (mBlink != null) {\n mBlink.uncancel();\n if (isFocused()) {\n mShowCursor = SystemClock.uptimeMillis();\n makeBlink();\...
"public void runTest() {\n junit.framework.Test test;\n showBusyCursor();\n if ((test = getSelectedTest()) == null) {\n return;\n }\n try {\n if (getExecutor().getSession().getDatasourceLogin() instanceof DatabaseLogin && getExecutor().getSession().getLogin().getConnector() instanceof Defau...
"public static void reverseQualities(final byte[] quals) {\n reverse(quals, 0, quals.length);\n}\n"
"public String sendGetDDO(String ontid) throws SDKException, ConnectorException, IOException {\n if (contractAddress == null) {\n throw new SDKException(ErrorCode.NullCodeHash);\n }\n byte[] parabytes = buildParams(ontid.getBytes());\n Transaction tx = sdk.vm().makeInvokeCodeTransaction(contractAddre...
"public void onBucketEmptyEvent(PlayerBucketEmptyEvent event) {\n IPlayer player = plugin.wrapPlayer(event.getPlayer());\n Location location = new Location(player.getWorld(), BukkitUtil.locationToVector(event.getBlockClicked().getLocation()));\n if (!player.hasPermission(PermissionNames.ADMIN_BUILDANYWHERE) &&...
"protected IStatus run(IProgressMonitor monitor) {\n NaiveBayesClassifier nbc = new NaiveBayesClassifier();\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n isPreprocessEnabled = preprocessEnabled.getSelection();\n pp_outputPath = CommonUiActivator.getDefault()...
"public void insertFinished(Object context) {\n try {\n if (context == null) {\n String msg = \"String_Node_Str\";\n Logging.logMessage(Logging.LEVEL_ERROR, this, msg);\n dbInterface.replication_runtime_failure(msg);\n }\n Status<Request> rq = (Status<Request>) c...
"protected void createActions() {\n ImportTreeFromXml importAction = new ImportTreeFromXml(this, getGraphicalViewer().getControl().getShell());\n importAction.setMapperManager(getMapperManager());\n getActionRegistry().registerAction(importAction);\n getSelectionActions().add(importAction.getId());\n Cre...
"public NetworkFile createFile(SrvSession sess, TreeConnection tree, FileOpenParams params) throws IOException {\n sess.beginWriteTransaction(transactionService);\n try {\n ContentContext ctx = (ContentContext) tree.getContext();\n NodeRef deviceRootNodeRef = ctx.getRootNode();\n String path ...
"private void writeInventory(String name, ItemStack[] stacks) {\n try {\n NBTInputStream in = new NBTInputStream(new FileInputStream(new File(dataDir, name + \"String_Node_Str\")));\n CompoundTag tag = (CompoundTag) in.readTag();\n in.close();\n ArrayList tagList = new ArrayList<Tag>();\n...
"public Object[] getData(long millis) {\n World world = DimensionManager.getWorld(dim);\n if (world == null) {\n return null;\n }\n if (!world.getChunkProvider().chunkExists(coordinate.getX() >> 4, coordinate.getZ() >> 4)) {\n return null;\n }\n TileEntity te = world.getTileEntity(coordi...
"boolean hasActiveMaster() {\n try {\n if (ZKUtil.checkExists(watcher, watcher.getZNodePaths().masterAddressZNode) >= 0) {\n return true;\n }\n } catch (KeeperException ke) {\n LOG.info(\"String_Node_Str\" + \"String_Node_Str\" + ke);\n }\n return false;\n}\n"
"private void placeComponents() {\n GridLayout glContent = new GridLayout(2, false);\n glContent.marginHeight = 2;\n glContent.marginWidth = 2;\n this.setLayout(glContent);\n Group grpLine = new Group(this, SWT.NONE);\n {\n GridLayout glGroup = new GridLayout(2, true);\n glGroup.horizont...
"private List<RDBRow> dbQuery(Connection connection, String tableName, String minId, String maxId, String indexedProperty, long startValue, int limit) throws SQLException {\n String t = \"String_Node_Str\" + tableName + \"String_Node_Str\";\n if (indexedProperty != null) {\n if (MODIFIED.equals(indexedProp...
"public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n if (dy == 0) {\n final int childHeight = getHeight() - getPaddingTop() - getPaddingBottom() - getOverlapOffset();\n mCurrentScrollY = getCurrentPosition() * childHeight;\n } else {\n ...
"public boolean performDrop(Object data) {\n if (data instanceof Object[] && ((Object[]) data)[0] instanceof ThemeHandle) {\n if (getCurrentTarget() instanceof ModuleHandle) {\n if (Policy.TRACING_DND_DRAG) {\n System.out.println(\"String_Node_Str\" + getCurrentTarget());\n ...
"public synchronized void sendBuildEvent(BuildEvent event, final ArtifactGroupNamer namer) {\n BuildEventConverters converters = new BuildEventConverters() {\n public PathConverter pathConverter() {\n return pathConverter;\n }\n public ArtifactGroupNamer artifactGroupNamer() {\n ...
"public void approveOrRejectDoc(boolean approved, String comment, String taskId) {\n LOG.debug(\"String_Node_Str\" + approved);\n UserDetails userDetails = userService.currentUser();\n try {\n identityService.setAuthenticatedUserId(userDetails.getUsername());\n Task task = taskService.createTaskQ...
"public SourceValidity getValidity() {\n DSpaceObject dso = null;\n if (this.validity == null) {\n try {\n dso = URIUtil.resolve(objectModel);\n DSpaceValidity validity = new DSpaceValidity();\n validity.add(dso);\n this.validity = validity.complete();\n }...
"private DataSource createDruidDataSource(Config config) {\n DruidDataSource dataSource = new DruidDataSource();\n Class<DruidDataSource> clazz = DruidDataSource.class;\n for (Map.Entry<String, Class<?>> entry : FIELDS.entrySet()) {\n String field = entry.getKey();\n String value = config.getPara...
"public void writeStatement(MethodWriter writer) {\n writer.visitLabel(this.start, false);\n int count = 0;\n for (Entry<String, Variable> entry : this.variables.entrySet()) {\n Variable var = entry.getValue();\n writer.addLocal(var.index, var.type);\n count++;\n }\n String label;\n ...
"public static UUID getUUID(String name) {\n if (nameExists(name)) {\n return uuidMap.get(name);\n }\n UUID uuid;\n if ((uuid = getUuidOnlinePlayer(name)) != null) {\n return uuid;\n }\n if ((uuid = getUuidOfflinePlayer(name)) != null) {\n return uuid;\n }\n if (online) {\n ...
"public boolean hasModifications() {\n if (mScaleFactor != 1.0f) {\n return true;\n }\n if (mRotation != 0) {\n return true;\n }\n if (mStraightenRotation != 0) {\n return true;\n }\n Rect cropBounds = GeometryMath.roundNearest(mCropBounds);\n Rect photoBounds = GeometryMath...
"public void onClick(View v) {\n try {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"String_Node_Str\")));\n } catch (Exception e) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"String_Node_Str\")));\n }\n}\n"
"public void initialize(String currentPerspective) {\n this.currentPerspective = currentPerspective;\n nodeAndProject = new HashMap<Object, List<Project>>();\n IRepositoryNode curParentNode = null;\n String urlBranch = null;\n if (ProjectManager.getInstance().getCurrentBranchURL(project) != null) {\n ...
"protected void updateChildrenPosition() throws BirtException {\n if (repeatList != null && repeatList.size() > 0) {\n if (!inHeaderBand) {\n if (getRepeatedHeight() < getMaxAvaHeight()) {\n for (int i = 0; i < repeatList.size(); i++) {\n ContainerArea row = (Conta...
"public void sendToken(Receiver source, Receiver receiver, Token token) throws IllegalActionException {\n if (getDirector() instanceof DEDirector && token == null) {\n return;\n }\n Time currentTime = getDirector().getModelTime();\n if (_nextTimeFree == null || _tokens.size() == 0 || currentTime.comp...
"public void testGetWithNoProvider() throws Exception {\n Object safe = \"String_Node_Str\";\n Assert.assertSame(safe, this.mocker.getComponentUnderTest().get(safe));\n}\n"
"public IRunnableWithProgress info(final OpInfo info) {\n return new OpInfoRunner(info);\n}\n"
"public Group add(IPrimitive<?> child, Layout layout, double dx, double dy) {\n if (null == child.getID()) {\n child.setID(UUID.uuid());\n }\n layout_keys.add(child.getID());\n layout_values.add(layout);\n layout_x.add(dx);\n layout_y.add(dy);\n Group result = group.add(child);\n result.m...
"public String getAttribute(Attribute attribute) {\n if (attribute == null)\n return \"String_Node_Str\";\n if (attribute.startsWith(\"String_Node_Str\")) {\n return new Element(item.getItemStack().getDurability() > 0).getAttribute(attribute.fulfill(1));\n }\n if (item.getMaterial().getData() ...
"public static Column getPutColumn(Column dataColumn) {\n return new Column(dataColumn.getFamily(), concatQualifierWithSuffix(dataColumn.getQualifier(), PUT_QUALIFIER_SUFFIX_BYTES));\n}\n"
"public void transitionToOpen() {\n if (!isOpen) {\n mBackground.startTransition(TRANSITION_DURATION * 2);\n flipit();\n isOpen = true;\n }\n}\n"
"public void testIfUnmodifiedSinceAfterLastModified() {\n initiateWebApplication(LastModifiedResource.class);\n ClientResponse response = resource(\"String_Node_Str\").header(\"String_Node_Str\", \"String_Node_Str\").get(ClientResponse.class);\n assertEquals(200, response.getStatus());\n}\n"
"private void parseStatement(List<Statement> list, boolean isTopLevel) {\n if (token.kind == TokenKind.DEF && parsingMode == SKYLARK) {\n if (!isTopLevel) {\n reportError(lexer.createLocation(token.left, token.right), \"String_Node_Str\");\n }\n parseFunctionDefStatement(list);\n }...
"protected void createSetterMethod(ClassNode declaringClass, PropertyNode propertyNode, String setterName, Statement setterBlock, List<AnnotationNode> annotations) {\n Parameter[] setterParameterTypes = { new Parameter(propertyNode.getType(), \"String_Node_Str\") };\n int mod = propertyNode.getModifiers() | Opcod...
"public CoinDataResult getCoinData(byte[] address, Na amount, int size) throws NulsException {\n CoinDataResult coinDataResult = new CoinDataResult();\n List<Coin> rawCoinList = storageService.getCoinList(address);\n List<Coin> coinList = new ArrayList<>();\n if (rawCoinList.isEmpty()) {\n coinDataRe...
"public boolean luaStackCall(LuaState vm) {\n switch(id) {\n case PRINT:\n {\n int n = vm.gettop();\n for (int i = 2; i <= n; i++) {\n if (i > 2)\n stdout.print(\"String_Node_Str\");\n stdout.print(vm.tostrin...
"public void testImportRecordFailureWithFilename() throws IOException, ImporterException {\n Importer importer = mock(Importer.class);\n EventSink es = mock(EventSink.class);\n OwnerResource thisOwnerResource = new OwnerResource(ownerCurator, null, null, null, null, i18n, es, null, null, null, importer, null, ...
"private void testTwoWriters() throws Exception {\n deleteDb(\"String_Node_Str\");\n String url = \"String_Node_Str\" + baseDir + \"String_Node_Str\";\n final String writeUrl = url + \"String_Node_Str\";\n final boolean[] stop = new boolean[1];\n Connection conn = DriverManager.getConnection(writeUrl, \"...
"private Jaxb2Marshaller getJaxb2Marshaller() {\n if (!(properties.get(KARAKU_WS_CLIENT_ENABLED).equals(\"String_Node_Str\"))) {\n return null;\n }\n Pattern pattern = Pattern.compile(properties.get(KARAKU_WS_CLIENT_PACKAGES_TO_SCAN, DEFAULT_PACKAGES_TO_SCAN_EXPRESSION));\n Package[] packages = Packa...
"public RequestBuilder newRequest(String method, String url) {\n return new RequestBuilder().sessionContext(context).url(url).method(method);\n}\n"
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n switch(requestCode) {\n case LOCATION_REQUEST:\n final double latitude = intent.getDoubleExtra(LocationActiv...
"protected void _splitSpanCell(int height, boolean force) throws BirtException {\n if (cells.length != children.size()) {\n for (int i = 0; i < cells.length; i++) {\n if (cells[i] instanceof DummyCell) {\n int oh = ((DummyCell) cells[i]).getCell().getHeight();\n int ch...
"private WritableByteChannel createByteChannel(Configuration configuration, Progressable progressable, Bigquery bigquery, Job outputJob, String projectId, int writeBufferSize) throws IOException {\n if (configuration.getBoolean(BigQueryConfiguration.ENABLE_ASYNC_WRITE, BigQueryConfiguration.ENABLE_ASYNC_WRITE_DEFAUL...
"public void reduce(final LongWritable key, final Iterable<Holder> values, final Reducer<LongWritable, Holder, NullWritable, FaunusVertex>.Context context) throws IOException, InterruptedException {\n this.vertex.reuse(key.get());\n for (final Holder holder : values) {\n final char tag = holder.getTag();\n...
"public void testChangeTransportMechanism() throws Exception {\n init();\n serverConfigurationManager = new ServerConfigurationManager(gatewayContextWrk);\n String carbonHome = System.getProperty(ServerConstants.CARBON_HOME);\n File axis2xmlFile = new File(carbonHome + File.separator + \"String_Node_Str\" +...
"public void deserialize(ByteBuf buffer) {\n for (int i = 0; i < tankNames.length; i++) {\n tanks[i] = null;\n boolean hasReactant = buffer.readBoolean();\n if (hasReactant) {\n String reactantName = ByteBufUtils.readUTF8String(buffer);\n int amount = buffer.readInt();\n ...
"public void initPath(ItemRecord resource, String destination) {\n this.resource = resource;\n if (resource != null) {\n IPath itemResPath = new Path(resource.getFile().getAbsolutePath());\n IPath propResPath = new Path(resource.getPropertyFilePath());\n Object propOBJ = EObjectHelper.retriev...
"private void ensureAnimatorSet() {\n if (!mHasAnimatorSet) {\n mAnimatedVectorState.prepareLocalAnimators(mAnimatorSet, mRes);\n mHasAnimatorSet = true;\n mRes = null;\n }\n}\n"
"public void shouldDeployAWarServiceInANode() throws Exception {\n Service service = servicesManager.createService(spec);\n ServiceInstance instance = service.getInstances().get(0);\n String url = instance.getNativeUri();\n System.out.println(\"String_Node_Str\" + url);\n npm.upgradeNode(instance.getNode...
"private ICubeQueryDefinition createCubeQueryDefinition() {\n ICubeQueryDefinition cubeQuery = new CubeElementFactory().createCubeQuery(\"String_Node_Str\");\n IEdgeDefinition columnEdge = cubeQuery.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n cubeQuery.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimen...
"protected IWResourceBundle getResourceBundle() {\n return this.getResourceBundle(this.getBundle(SocialConstants.IW_BUNDLE_IDENTIFIER));\n}\n"
"public static LibraryMemberInterface newLibraryMember(final LibraryMember mbr) {\n LibraryMemberInterface lm = null;\n if (mbr == null)\n return lm;\n Node n = Node.GetNode(mbr);\n if (n instanceof LibraryMemberInterface)\n return (LibraryMemberInterface) n;\n if (n instanceof ContextualFa...
"public void fillContextMenu(IMenuManager menu) {\n TreeSelection treeSelection = ((TreeSelection) this.getContext().getSelection());\n List<IFile> selectedFiles = new ArrayList<IFile>();\n if (treeSelection.size() == 1) {\n Object obj = treeSelection.getFirstElement();\n if (obj instanceof IFold...
"private List<HostVO> searchForServers(Long startIndex, Long pageSize, Object name, Object type, Object state, Object zone, Object pod, Object cluster, Object id, Object keyword, Object resourceState, Object haHosts) {\n Filter searchFilter = new Filter(HostVO.class, \"String_Node_Str\", Boolean.TRUE, startIndex, pa...
"private void performPushImage(final ImagePush wizard) {\n final Job pushImageJob = new Job(DVMessages.getFormattedString(PUSH_IMAGE_JOB_TITLE, wizard.getImageTag())) {\n\n protected IStatus run(final IProgressMonitor monitor) {\n final String tag = wizard.getImageTag();\n monitor.beginT...
"public void playNote(int instrument, int pitch) throws Exception {\n Preconditions.checkArgument(instrument >= MIN_INST && instrument <= MAX_INST, \"String_Node_Str\");\n Preconditions.checkArgument(pitch >= MIN_PITCH && pitch <= MAX_PITCH, \"String_Node_Str\");\n Preconditions.checkArgument(ticker++ <= MAX_T...
"public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n final Account account = accountAdapter.getItem(which);\n createContact(account);\n}\n"
"public Collection<IAtsInsertionActivity> getInput() {\n if (insertionWidget != null && insertionWidget.get() != null) {\n Object obj = insertionWidget.getWidget().getSelected();\n if (obj != null && obj instanceof IAtsInsertion) {\n return Collections.castAll(AtsClientService.get().getProgr...
"public void addPopupMenus() {\n LegendEntryPopupMenuFactory popupManager = new LegendEntryPopupMenuFactory(plotUser);\n for (int index = 0; index < subPlots.size(); index++) {\n AbstractPlottingPackage plot = subPlots.get(index);\n for (LegendEntry entry : plot.getLegendManager().getLegendEntryList...
"public void close() throws IOException {\n super.close();\n final SimpleDataFileMetadata md2 = new SimpleDataFileMetadata(md);\n if (md2.getContentLength() < 0)\n md2.setContentLength(f.length());\n new FileToUpload(dest, FileUtils.createInputStream(f), md2).upload();\n if (!f.delete())\n ...
"public static Script newInstance(JsonNode config) throws JsonNodeException {\n if (config == null || config.isNull()) {\n return null;\n }\n for (ScriptFactory factory : FACTORIES) {\n Script script = factory.newInstance(config);\n if (script != null) {\n return script;\n ...
"String buildCommaSeparatedListOfCells(String refSheetName, List cells) {\n StringBuilder buf = new StringBuilder();\n for (int i = 0; i < cells.size() - 1; i++) {\n String cell = (String) cells.get(i);\n listOfCells += getRefCellName(refSheetName, cell) + \"String_Node_Str\";\n }\n listOfCell...
"void setConsumeBubble(Config.BubbleAction bubbleType, String label, String packageName, String activityClassName) {\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n switch(bubbleType) {\n case ConsumeLeft:\n editor.putString(PREFERENCE_LEFT_CONSUME_BUBBLE_LABEL, label);\n ...
"protected void advanceExpunge(VMInstanceVO vm) throws ResourceUnavailableException, OperationTimedoutException, ConcurrentOperationException {\n if (vm == null || vm.getRemoved() != null) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + vm);\n }\n return;\n...
"protected void startEverything() {\n tracker.dropAllTracks();\n createModelMatcher(maxIterations, 4);\n distortAlg = new MotionStabilizePointKey<I, T>(tracker, modelMatcher, modelRefiner, fitModel, thresholdKeyFrame, thresholdReset, pruneThreshold, largeMotionThreshold);\n totalKeyFrames = 0;\n I image ...
"public Proc launch(ProcStarter starter) throws IOException {\n if (!waitUntilContainerIsReady()) {\n throw new IOException(\"String_Node_Str\" + \"String_Node_Str\" + containerName + \"String_Node_Str\" + podName + \"String_Node_Str\" + \"String_Node_Str\");\n }\n final CountDownLatch started = new Cou...
"private boolean validateDiscoveredHosts(VmwareContext context, ManagedObjectReference morCluster, List<ManagedObjectReference> morHosts) throws Exception {\n if (morCluster == null) {\n for (ManagedObjectReference morHost : morHosts) {\n ManagedObjectReference morParent = (ManagedObjectReference) ...
"public String toString() {\n final byte[] ba = new byte[SIZE];\n longToByteArray(this.lowerPart, ba, 0);\n longToByteArray(this.upperPart, ba, SIZE_OF_LONG);\n return StringUtils.byteToHexString(ba);\n}\n"
"public void addURI(URI uri) {\n if (uri != null && !uriList.contains(uri)) {\n uriList.add(uri);\n }\n}\n"
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_details, container, false);\n final ImageView albumImage = (ImageView) rootView.findViewById(R.id.details_album_image);\n ImageView backgroundImage = (ImageV...
"public int compare(T o1, T o2) {\n double fitness1 = evaluator.getFitness(o1);\n double fitness2 = evaluator.getFitness(o2);\n if (fitness1 > fitness2) {\n return reverse ? 1 : -1;\n } else if (fitness1 == fitness2) {\n return 0;\n } else {\n return 1;\n }\n}\n"
"public void endProcess(int events) {\n long runningTime = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - getStartTime());\n long processTime = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - startProcessTime);\n long throughput = 0L;\n if (events > 0 && processTime > 0)\n ...
"public void run() {\n response = new MapEntrySet();\n MapEntrySimple entry;\n final RecordStore recordStore = mapService.getRecordStore(getPartitionId(), name);\n final Map<Data, Record> records = recordStore.getReadonlyRecordMap();\n for (final Map.Entry<Data, Record> recordEntry : records.entrySet()) ...
"public void processMessage(Message message) throws Exception {\n String realMessage = new String(message.getBody());\n logger.info(\"String_Node_Str\" + realMessage + \"String_Node_Str\");\n if (Objects.equals(realMessage, FAIL_MESSAGE)) {\n throw new Exception(\"String_Node_Str\");\n }\n}\n"
"public void migrate(Module jcrModule, AssetItem jcrAssetItem) {\n if (!AssetFormats.DECISION_TABLE_GUIDED.equals(jcrAssetItem.getFormat())) {\n throw new IllegalArgumentException(\"String_Node_Str\" + jcrAssetItem.getName() + \"String_Node_Str\" + jcrAssetItem.getFormat() + \"String_Node_Str\");\n }\n ...