content
stringlengths
40
137k
"public boolean isHandled(Class<?> klass) {\n if (PhaseListener.class.isAssignableFrom(klass)) {\n try {\n if (!_listeners.containsKey(klass.getName())) {\n _listeners.put(klass.getName(), (PhaseListener) klass.newInstance());\n }\n } catch (Exception e) {\n ...
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_custom_view_dagger);\n customView = (DaggerCustomView) findViewById(R.id.custom_view_dagger);\n}\n"
"public int findById(Dtos.BoardWithProjectsDto boardWithProjectsDto) {\n int id = 0;\n String boardId = boardWithProjectsDto.getBoard().getId();\n String projectId = boardWithProjectsDto.getProjectsOnBoard().getValues().get(0).getId();\n for (Dtos.BoardWithProjectsWithSelectedDto candidate : filterDataDto.g...
"private void fetchBlock(int blockId) throws IOException {\n long position = _blockPositions[blockId];\n int length = _blockLengths[blockId];\n _indexInput.seek(position);\n _indexInput.readBytes(_decompressionBuffer, 0, length);\n synchronized (_decompressor) {\n _decompressor.reset();\n _...
"public Map<String, String> getOptions(String worldName) {\n ConfigurationSection optionsSection = this.node.getConfigurationSection(formatPath(worldName, \"String_Node_Str\"));\n Map<String, String> worldOptions = new LinkedHashMap<>();\n putIfNotNull(worldOptions, \"String_Node_Str\", this.node.getString(for...
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object objectValue, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n Object fieldValue = xmlDirectMapping.getFieldValue(objectValue, session, marshalRecord);\n ...
"private void placeCursorToSelection() {\n String mainPart = \"String_Node_Str\" + currentSelection + \"String_Node_Str\";\n String assignmentPart = \"String_Node_Str\" + currentSelection + \"String_Node_Str\";\n if (getDocumentProvider() == null) {\n return;\n }\n IDocument doc = getDocumentProvi...
"public void withEntity(Entity entity, DatastoreService ds) throws Exception {\n Alias alias = new Alias(entity);\n StringBuilder a = new StringBuilder();\n a.append(\"String_Node_Str\").append(EscapeChars.toString(EscapeChars.forJSON(alias.getNickname()))).append(\"String_Node_Str\");\n a.append(\"String_N...
"private String getText(IAtsWorkPackage workPackage) {\n String result = \"String_Node_Str\";\n if (workPackage != null) {\n String activityId = Strings.isValid(workPackage.getActivityId()) ? workPackage.getActivityId() : \"String_Node_Str\";\n String activityName = Strings.isValid(workPackage.getAc...
"public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {\n this.setBrowserExclusive();\n br.getPage(downloadLink.getDownloadURL());\n if (br.containsHTML(\"String_Node_Str\"))\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\n String...
"protected void setDataWithOCAttributes(StudyBean study, DatasetBean dataset, OdmClinicalDataBean data, String odmVersion, Iterator iter, HashMap<Integer, String> oidPoses, String odmType) {\n String subprev = \"String_Node_Str\";\n HashMap<String, Integer> sepos = new HashMap<String, Integer>();\n String sepr...
"public void refreshStates(CallParticipantSecurityOnEvent event) {\n String securityString = event.getSecurityString();\n if (securityString != null) {\n securityStringLabel.setText(securityString);\n if (event.isSecurityVerified()) {\n sasVerificationButton.setImage(iconEncrVerified);\n ...
"public void onSlotChanged() {\n ItemStack item = player.inventory.mainInventory[containerIndex];\n if (valid && item != null && item.getItem() == containerWrapper.getContainerStack().getItem()) {\n player.inventory.mainInventory[containerIndex] = containerWrapper.getContainerStack();\n }\n}\n"
"public void process(CompilationUnitDeclaration cud, int index) {\n {\n this.parser.getMethodBodies(cud);\n if (cud.scope != null) {\n cud.scope.faultInTypes();\n }\n if (cud.scope != null) {\n cud.scope.verifyMethods(lookupEnvironment.methodVerifier());\n }\n...
"public void update() {\n this.x = owner.x;\n this.y = owner.y;\n this.visible = owner.visible;\n while (Keyboard.next()) {\n if (Keyboard.getEventKeyState()) {\n int keyCode = Keyboard.getEventKey();\n switch(keyCode) {\n case Keyboard.KEY_LSHIFT:\n ...
"public String getInformation(ItemStack self, ItemStack tool) {\n DrillHeadMaterial mat = DrillHeadMaterial.materials.get(getMyMaterial(self));\n String name = mat.locName;\n return I18n.hasKey(name) ? I18n.format(name) : mat.materialName;\n}\n"
"public void execute() throws IOException {\n AlignmentReader reader = null;\n PrintWriter writer = null;\n try {\n reader = new AlignmentReader(basename);\n reader.readHeader();\n final int numberOfReferences = reader.getNumberOfTargets();\n final DoubleIndexedIdentifier referenceI...
"public String getSwarm() throws P4JavaException {\n GetPropertyOptions propOpts = new GetPropertyOptions();\n String key = \"String_Node_Str\";\n propOpts.setName(key);\n List<IProperty> values = connection.getProperty(propOpts);\n for (IProperty prop : values) {\n if (key.equals(prop.getName()))...
"public ASTNode parse(IElementType root, PsiBuilder builder) {\n try {\n parseLight(root, builder);\n return builder.getTreeBuilt();\n } catch (ProcessCanceledException | BlockSupport.ReparsedSuccessfullyException ignore) {\n throw ignore;\n } catch (Exception ex) {\n crashing = tru...
"public void draw() {\n double tu1 = (this.viewX % 16.0) / 16.0;\n double tv1 = (this.viewZ % 16.0) / 16.0;\n double tu2 = tu1 + (this.viewW / 16.0);\n double tv2 = tv1 + (this.viewH / 16.0);\n GL11.glPushMatrix();\n GL11.glLoadIdentity();\n GL11.glTranslatef((float) this.mapMode.xTranslation, (flo...
"public void testFindGoodParameterValues() throws Exception {\n Map<String, ParameterRange> propertyRanges = Maps.newHashMap();\n propertyRanges.put(\"String_Node_Str\", new ParameterRange(0.0001, 0.1));\n propertyRanges.put(\"String_Node_Str\", new ParameterRange(10, 40));\n Callable<Number> evaluator = ne...
"public void startAutoContainers(BeforeSuite event, CubeConfiguration configuration) {\n for (String cubeId : configuration.getAutoStartContainers()) {\n if (configuration.shouldAllowToConnectToRunningContainers() && isCubeRunning(cubeId)) {\n controlEvent.fire(new PreRunningCube(cubeId));\n ...
"private void updateTitle() {\n titleLabel.setText(I18n.tr(\"String_Node_Str\", unfinishedList.size()));\n if (warningList.size() > 0) {\n titleLabel.setIcon(warningIcon);\n } else {\n titleLabel.setIcon(null);\n }\n}\n"
"public static final void copy(char[] src, int srcPos, char[] dest, int destPos, int length) {\n if (length != 0)\n System.arraycopy(src, srcPos, dest, destPos, length);\n}\n"
"public void doRequest_A$String$HttpMethod$Map$String_TwitterOAuth_POST() throws Exception {\n try {\n OAuthRealm realm = new OAuthRealm(\"String_Node_Str\");\n Properties props = new Properties();\n props.load(this.getClass().getClassLoader().getResourceAsStream(\"String_Node_Str\"));\n ...
"protected ParameterAnnotationMapping parseAnnotationLiterals(final Literal parameterName, final Literal functionArgumentName, final Literal defaultValue) throws RestAnnotationException {\n if (parameterName.getType() != Type.STRING) {\n throw new RestAnnotationException(getInvalidParameterNameErr());\n }\...
"private View getItemOutView(int position) {\n if (centerView != null && position >= (getChildCount() - 1) / 2) {\n position++;\n Log.d(\"String_Node_Str\", \"String_Node_Str\" + position + \"String_Node_Str\" + count + \"String_Node_Str\" + (count / 2));\n }\n return getChildAt(position);\n}\n"
"private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {\n final E[] elements = (E[]) in.readObject();\n final ListEventListener<E>[] listeners = (ListEventListener<E>[]) in.readObject();\n try {\n this.publisher = (ListEventPublisher) in.readObject();\n this.up...
"protected void drawHole(Canvas c) {\n if (mChart.isDrawHoleEnabled()) {\n float transparentCircleRadius = mChart.getTransparentCircleRadius();\n float holeRadius = mChart.getHoleRadius();\n float radius = mChart.getRadius();\n PointF center = mChart.getCenterCircleBox();\n if (tra...
"public void propagateBranchParadigm() throws SurveyException {\n if (parentBlock == null)\n return;\n if (branchParadigm.equals(BranchParadigm.ONE))\n propagateUp();\n for (Block sibling : parentBlock.subBlocks) {\n switch(sibling.branchParadigm) {\n case ONE:\n ...
"public void treeExpanded(TreeEvent e) {\n ExpandableComposite theSuitedComposite = getTheSuitedComposite(e);\n ScrolledForm form = masterPage.getForm();\n Composite comp = masterPage.getChartComposite();\n if (theSuitedComposite != null && !theSuitedComposite.isExpanded()) {\n theSuitedComposite.set...
"public void onChunkUnload(ChunkUnloadEvent event) {\n Entity[] entities = event.getChunk().getEntities();\n for (Entity entity : entities) {\n if (entity instanceof Wolf) {\n Wolf wolf = (Wolf) entity;\n if (wolf.isTamed()) {\n WolfTable wt = wolfManager.getWolfTable(w...
"public void putChild(String name, AVMNode node) {\n ChildKey key = new ChildKey(this, name);\n ChildEntry existing = AVMDAOs.Instance().fChildEntryDAO.get(key);\n if (existing != null) {\n AVMDAOs.Instance().fChildEntryDAO.delete(existing);\n }\n}\n"
"public void onFilter5Pressed() {\n try {\n if (changeActiveFilter(filterView5)) {\n filteredImgPath = filterThreshBinaryInvert(ivfullscreenImage.getId());\n ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath), ivfullscreenImage.getFitWidth(), ivfullscreenImage.getF...
"private int readMethod(int u) {\n u = readMethodDeclaration(u);\n int u0 = u;\n int code = 0;\n int exception = 0;\n exceptions = null;\n String signature = null;\n int anns = 0;\n int annDefault = 0;\n int paramAnns = 0;\n char[] c = buf;\n for (int attributeCount = readUnsignedShort(...
"public Object buildReadAllQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object> items, UriInfo uriInfo) {\n return response(context, items, uriInfo);\n}\n"
"public boolean updateAvailable() {\n String updateVersion = getUpdateVersion();\n if (updateVersion == null) {\n return false;\n }\n int currentNumber = Integer.parseInt(currentVersion.substring(0, 5).replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n int updateNumber = Integer.parseInt(upd...
"public static MinigamesAPI setupAPI(JavaPlugin plugin_) {\n ArenasConfig arenasconfig = new ArenasConfig(plugin_);\n MessagesConfig messagesconfig = new MessagesConfig(plugin_);\n ClassesConfig classesconfig = new ClassesConfig(plugin_);\n pinstances.put(plugin_, new PluginInstance(plugin_, arenasconfig, m...
"public boolean canConvert(Class type) {\n return IRubyObject.class.isAssignableFrom(type);\n}\n"
"public void doexport(TreeObject[] objs, IProgressMonitor monitor) {\n if (objs.length == 0)\n return;\n monitor.beginTask(\"String_Node_Str\", IProgressMonitor.UNKNOWN);\n Exports eps = new Exports();\n List<TreeObject> exports = new ArrayList<TreeObject>();\n XtentisPort port;\n try {\n ...
"public void tearDown() throws Exception {\n if (host != null)\n Streams.closeQuietly(host);\n RecordingSshjTool.reset();\n}\n"
"private void updateUiForNewPrinterCapabilities() {\n if (!mMediaSizeSpinnerAdapter.isEmpty()) {\n mIgnoreNextMediaSizeChange = true;\n mMediaSizeSpinnerAdapter.clear();\n }\n if (!mColorModeSpinnerAdapter.isEmpty()) {\n mIgnoreNextColorModeChange = true;\n mColorModeSpinnerAdapter....
"private String getSimpleText(RepositoryTreeNode node) {\n switch(node.getType()) {\n case REPO:\n File directory = ((Repository) node.getObject()).getDirectory();\n StringBuilder sb = new StringBuilder();\n sb.append(directory.getParentFile().getName());\n sb.appen...
"public void activate(ComponentContext context) throws Exception {\n RepositoryManager repoService = Framework.getService(RepositoryManager.class);\n Repository defaultRepository = repoService.getDefaultRepository();\n try {\n new DomainInit(defaultRepository.toString()).runUnrestricted();\n new ...
"protected void configure() {\n bind(Integer.class).annotatedWith(ParallelLevel.class).toInstance(Runtime.getRuntime().availableProcessors());\n ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat(\"String_Node_Str\").build();\n bind(ThreadFactory.class).toInstance(threadFactory);\n bind(...
"public void test_nest_var() {\n ZBlock p = P(\"String_Node_Str\");\n assertEquals(\"String_Node_Str\", p.ele(0).getText());\n assertEquals(\"String_Node_Str\", p.ele(1).getText());\n assertTrue(p.ele(1).getStyle().font().isBold());\n assertEquals(\"String_Node_Str\", p.ele(2).getText());\n}\n"
"public synchronized boolean addNewKubernetesHost(String kubernetesGroupId, KubernetesHost kubernetesHost) throws InvalidKubernetesHostException, NonExistingKubernetesGroupException {\n if (StringUtils.isEmpty(kubernetesGroupId) || kubernetesHost == null) {\n throw new InvalidKubernetesHostException(\"String_...
"private Collection<String> getInterfaces(final Config config) {\n final Collection<String> interfaces = new HashSet<String>();\n if (config.getNetworkConfig().getInterfaces().isEnabled()) {\n interfaces.addAll(config.getNetworkConfig().getInterfaces().getInterfaces());\n logger.log(Level.INFO, \"St...
"public String getUnlocalizedName(ItemStack stack) {\n return \"String_Node_Str\" + BlockCache.NAMES[ItemHelper.getItemDamage(stack)] + \"String_Node_Str\";\n}\n"
"public void onPreAdd(IoFilterChain parent, String name, NextFilter nextFilter) throws Exception {\n IoSessionEx sessionEx = (IoSessionEx) parent.getSession();\n IoBufferAllocatorEx<?> allocator = sessionEx.getBufferAllocator();\n emulatedPing = createTextMessage(allocator, EMULATED_PING_FRAME_PAYLOAD);\n e...
"public ClosureExpression getEnclosingClosure() {\n VariableScope scope = getEnclosingClosureScope();\n return (scope != null ? (ClosureExpression) scope.scopeNode : null);\n}\n"
"public void applyEditorValue() {\n String text = getControl().getText();\n onValueChanged(text, validate, property);\n validate = false;\n}\n"
"public void waitForComponent(int timeout, int delay) {\n IComponent component = getComponent();\n if (component == null || component.getRealComponent() == null) {\n long start = System.currentTimeMillis();\n do {\n RobotTiming.sleepWaitForComponentPollingDelay();\n } while (System...
"public List<List<PartUsageLink>> findPartUsagePaths(PartMasterKey pPartMKey) {\n List<PartUsageLink> usages = findPartUsages(pPartMKey.getWorkspace(), pPartMKey.getNumber());\n List<PartUsageLink[]> usagePaths = new ArrayList<PartUsageLink[]>();\n for (PartUsageLink usage : usages) {\n List<PartUsageLi...
"public synchronized void setQuery(Query query) {\n if (queryTaskContext != null)\n queryTaskContext.cancelTask();\n queryTaskContext = taskManager.runTask(new QueryTask(query));\n}\n"
"protected void refresh() {\n viewer.refresh(true);\n if (!viewer.getTree().isDisposed() && viewer.getInput() != null && viewer.getInput() instanceof GroupElementHandle) {\n GroupElementHandle handle = (GroupElementHandle) viewer.getInput();\n Object obj = handle.getElements().get(0);\n if (o...
"protected void okPressed() {\n if (fixedVersionText == null) {\n return;\n }\n boolean modified = false;\n String newVersion = null;\n for (ItemVersionObject object : checkedObjects) {\n newVersion = getNewVersionWithOption(object);\n if (!newVersion.equals(object.getOldVersion())) ...
"private boolean initPaymentProcess() {\n String clientId = arguments.getClientId();\n OAuth2Session session = new OAuth2Session(new DefaultApiClient(clientId));\n process = new ExternalPaymentProcess(session, new ExternalPaymentProcess.ParameterProvider() {\n public String getPatternId() {\n ...
"public static boolean removeSwipesAroundPoint(Location loc, double radius) {\n boolean removed = false;\n for (int ID : instances.keySet()) {\n AirSwipe aswipe = instances.get(ID);\n for (Vector vec : aswipe.elements.keySet()) {\n Location vectorLoc = aswipe.elements.get(vec);\n ...
"public void close() {\n try {\n archive.finish();\n } catch (IOException e) {\n logger.log(Level.SEVERE, \"String_Node_Str\", e);\n }\n}\n"
"public void dispose() {\n treeViewer.getBehaviorTree().reset();\n}\n"
"public boolean isHeaderRepeat() {\n if (headerRepeat != null) {\n return headerRepeat.booleanValue();\n }\n if (generateBy instanceof TableItemDesign) {\n Boolean constantValue = getConstantValue(((TableItemDesign) generateBy).isRepeatHeader());\n return constantValue == null ? false : co...
"public static <A extends ModelAction<K>, S extends ModelState<A, S, K>, K extends ProtocolKind> Set<A> getAllReachableActions(S start) {\n Set<S> all = new HashSet<>();\n all.add(start);\n all.addAll(getAllReachable(start));\n Set<A> as = new HashSet<>();\n for (S s : all) {\n as.addAll(s.getAllT...
"public void resolveTypes(List<Marker> markers, IContext context) {\n TupleType type = new TupleType();\n for (int i = 0; i < this.valueCount; i++) {\n IValue v = this.values[i];\n v.resolveTypes(markers, context);\n type.addType(v.getType());\n }\n type.getTheClass();\n this.tupleTy...
"public static void convert(Player player, Server server, WarpList lister) {\n File file = new File(\"String_Node_Str\");\n Connection conn = null;\n PreparedStatement ps = null;\n try {\n Class.forName(\"String_Node_Str\");\n conn = DriverManager.getConnection(WarpDataSource.DATABASE);\n ...
"private String getDateForDisplayInLabels(String date, StatsTimeframe timeframe) {\n String prefix = getString(R.string.stats_for);\n switch(timeframe) {\n case DAY:\n return String.format(prefix, StatsUtils.parseDate(date, StatsConstants.STATS_INPUT_DATE_FORMAT, StatsConstants.STATS_OUTPUT_DATE...
"public void setMethodContext(IMethodName newActiveMethodContext) {\n if (newActiveMethodContext == null) {\n newActiveMethodContext = NetworkUtils.CTX_NULL;\n }\n contextNode.observeState(newActiveMethodContext.getIdentifier());\n}\n"
"public AmendableWidget provideInjectionPoint(AmendmentController amendmentController, AmendableWidget root, DocumentController documentController) {\n final AmendableWidgetReference reference = amendmentController.getAmendment().getSourceReference();\n if (reference.isCreation()) {\n final AmendableWidget...
"public static List<Class<?>> getGenericClasses(Field collectionField) {\n List<Class<?>> genericClasses = new ArrayList<Class<?>>();\n if (collectionField == null) {\n return genericClasses;\n }\n Type[] parameters = ReflectUtils.getTypeArguments(collectionField);\n if (parameters != null) {\n ...
"public static PermissionManager getPermissionManager() {\n Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin(\"String_Node_Str\");\n if (!isAvailable()) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n return ((PermissionsEx) plugin).permissionsManager;\n}\n"
"public void mergConfigurations(Node target, Node source, PluginManager pluginManager) {\n for (Node sourceChildNode : source.getChildren()) {\n boolean isFilter = isFilterNode(sourceChildNode);\n boolean isMerged = false;\n for (Node targetChildNode : target.getChildren()) {\n if (is...
"public static RepositoryConnection openConnectionToTemporaryRepository(String ruleset) throws IOException, RepositoryException, RDFParseException, RepositoryConfigException, RDFHandlerException {\n File baseDir = FileUtil.createTempDir(\"String_Node_Str\");\n baseDir.deleteOnExit();\n try {\n singleton...
"public EdgeIterable getEdgesTree() {\n readLock();\n return dhns.newEdgeIterable(new EdgeIterator(structure, new TreeIterator(structure, false, Tautology.instance), false, Tautology.instance, Tautology.instance));\n}\n"
"public static org.hl7.fhir.dstu2016may.model.Parameters convertParameters(org.hl7.fhir.dstu3.model.Parameters src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Parameters tgt = new org.hl7.fhir.dstu2016may.model.Parameters();\n copyResource(...
"public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException {\n Nameable oldContainer = getContainer();\n super.setContainer(container);\n if (oldContainer != container) {\n Iterator vars = attributeList(Variable.class).iterator();\n while (vars.hasNext()...
"public void testImplementingInterface_JavaExtendingGroovyAndImplementingMethod_QualifiedParamPosition() {\n runNegativeTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"...
"private String applyFont(String fontName, int fontStyle, float fontSize, String text) {\n if (isIntrinsicFont(fontName)) {\n return applyIntrinsicFont(fontName, fontStyle, fontSize, text);\n } else {\n try {\n String fontPath = getFontPath(fontName);\n if (fontPath == null) {\...
"public void changeCustomConstraintValues(QName constraintName, List<String> newAllowedValues) {\n ParameterCheck.mandatory(\"String_Node_Str\", constraintName);\n ParameterCheck.mandatory(\"String_Node_Str\", newAllowedValues);\n NodeRef modelRef = getCustomModelRef(constraintName.getNamespaceURI());\n M2M...
"public boolean canPutInSlot(ItemStack me, int slotNum, ItemStack upgrade) {\n if (slotNum == 0) {\n ItemStack clone = upgrade.copy();\n clone.stackSize = 1;\n return UtilPlates.getPlate(clone) != null;\n }\n if (upgrade.getItem() instanceof IExosuitUpgrade) {\n IExosuitUpgrade upgr...
"protected void execute() throws ArchiverException {\n try {\n ModuleManagementTool mmt = new ModuleManagementTool();\n mmt.setVerbose(false);\n if (getDestFile() != null)\n getLogger().info(\"String_Node_Str\" + getDestFile());\n if (getDestDirectory() != null)\n ge...
"public void process(Context context) {\n Log.d(LOGTAG, \"String_Node_Str\");\n try {\n path = FileReadable.takePath(context, path);\n if (path == null) {\n Log.d(LOGTAG, \"String_Node_Str\");\n return;\n }\n makeExtension();\n StringBuilder text = new Stri...
"private void addToMeasurement(int index, String bodyName, int axis) {\n ModelScaler modelScaler = scaleToolModel.getScaleTool().getModelScaler();\n Measurement meas = modelScaler.getMeasurementSet().get(index);\n meas.setApply(true);\n BodyScaleSet bodyScaleSet = meas.getBodyScaleSet();\n int bodyScaleI...
"public void setup() throws IOException {\n {\n final TcpReplicationConfig tcpReplicationConfig = TcpReplicationConfig.of(8086, new InetSocketAddress(\"String_Node_Str\", 8087)).heartBeatInterval(1, SECONDS);\n clusterA = new ReplicatingClusterBuilder((byte) 1, 1024).tcpReplication(tcpReplicationConfig...
"private void executeTasks(final Set<Task<?>> tasks) {\n for (final Task<?> task : tasks) {\n task.execute();\n }\n}\n"
"public void onItemClicked(AbstractWheel wheel, int itemIndex, boolean isCurrentItem) {\n if (isCurrentItem) {\n final String currentValue = String.valueOf(mSpinnerWheel.getViewAdapter().getItem(itemIndex));\n showSoftInput(currentValue);\n } else {\n hideSoftInput();\n setCurrentItemI...
"private void compareOppositeElasticTransformations() {\n OpenDialog od = new OpenDialog(\"String_Node_Str\", \"String_Node_Str\");\n String path = od.getDirectory();\n String filename = od.getFileName();\n if ((path == null) || (filename == null)) {\n return;\n }\n final String directTransfFil...
"public static Transaction unwrap(TTransaction thriftTx) {\n return new Transaction(thriftTx.getReadPointer(), thriftTx.getTransactionId(), thriftTx.getWritePointer(), thriftTx.getInvalids() == null ? EMPTY_LONG_ARRAY : Longs.toArray(thriftTx.getInvalids()), thriftTx.getInProgress() == null ? EMPTY_LONG_ARRAY : Long...
"public Answer attachVolume(final AttachCommand cmd) {\n final DiskTO disk = cmd.getDisk();\n final VolumeObjectTO vol = (VolumeObjectTO) disk.getData();\n final PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO) vol.getDataStore();\n final String vmName = cmd.getVmName();\n final String serial = res...
"public ActionResult execute() throws EntityDoesNotExistException {\n String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID);\n Assumption.assertPostParamNotNull(Const.ParamsNames.COURSE_ID, courseId);\n String studentEmail = getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL);\n Assumption.a...
"private boolean _matchCompositeEntity(CompositeEntity lhsEntity, CompositeEntity hostEntity) {\n FastLinkedList<MarkedEntityList> lhsMarkedList = new FastLinkedList<MarkedEntityList>();\n ComponentEntity lhsNextActor = _findFirstChild(lhsEntity, lhsMarkedList, _match.keySet());\n boolean firstEntrance = !_mat...
"private static void writeLogonSectionHeader(BufferedWriter w) throws IOException {\n writeIniFileLine(LogonSectionHeader, w);\n}\n"
"public int getCount() {\n return count;\n}\n"
"public boolean onOptionsItemSelected(final MenuItem item) {\n switch(item.getItemId()) {\n case R.id.menu_refresh:\n refreshNotes();\n return true;\n case android.R.id.home:\n if (isLargeOrXLarge()) {\n return super.onOptionsItemSelected(item);\n ...
"private void duplicateSelected() {\n final Item selected = (Item) comboBox.getSelectedItem();\n if (selected != null) {\n if (selected.profile.isBuiltin()) {\n final T duplicate = manager.duplicate(selected.profile);\n editor.storeProfile(duplicate);\n manager.select(dupli...
"private int constructTargetIndexPermutations(int mergedReferenceIndex, final IndexedIdentifier mergedTargetIdentifiers, final Int2IntMap mergedTargetLengths, final AlignmentReaderImpl reader) {\n final int[] targetLengths = reader.getTargetLength();\n final int targetLengthCount = ArrayUtils.getLength(targetLeng...
"private String[] validateSelectedTypes(final String[] types) {\n if (types == null) {\n return new String[0];\n }\n for (int i = 0; i < types.length; ++i) {\n boolean bMatch = false;\n for (int j = 0; j < AVAILABLE_TYPES.length; ++j) {\n if (AVAILABLE_TYPES[j].equalsIgnoreCase(...
"private void fireStatusChanged(Status status) {\n synchronized (listeners) {\n for (int i = 0; i < listeners.size(); i++) {\n ((IContactListener) listeners.get(i)).statusChanged(status1);\n }\n }\n}\n"
"private double[] calculateMeasures(int[] counts) {\n double precision, recall, F1_score;\n if (counts.truePositives == 0) {\n if ((counts.falsePositives == 0) && (counts.falseNegatives == 0)) {\n precision = 1.0;\n recall = 1.0;\n F1_score = 1.0;\n } else {\n ...
"public void testAsWritable() throws OseeCoreException {\n ArtifactReadable guestUser = orcsApi.getQueryFactory(context).fromBranch(CoreBranches.COMMON).andIds(SystemUser.Guest).getResults().getExactlyOne();\n OrcsTransaction transaction = txFactory.createTransaction(CoreBranches.COMMON, userArtifact, testName.ge...
"private Table createTableThreadHeader(DiscrepancyNoteThread discNoteThread) throws BadElementException {\n Table table = new Table(2);\n table.setTableFitsPage(true);\n table.setCellsFitPage(true);\n table.setBorderWidth(1);\n table.setBorderColor(new java.awt.Color(0, 0, 0));\n table.setPadding(4);\...