content
stringlengths
40
137k
"public void exportMoveLine(MoveLineReport moveLineReport) throws AxelorException, IOException {\n moveLineReportService.setStatus(moveLineReport);\n switch(moveLineReport.getTypeSelect()) {\n case MoveLineReportRepository.EXPORT_SALES:\n this.exportMoveLineTypeSelect1006(moveLineReport, false);...
"private void setupModalPage() {\n if (userRequestTO != null) {\n switch(userRequestTO.getType()) {\n case CREATE:\n userTO = userRequestTO.getUserTO();\n break;\n case UPDATE:\n initialUserTO = userRestClient.read(userRequestTO.getUserMod().g...
"public static List<Identity> retrieveParticipantsFromGroups(List<Long> groupKeys, CourseGroupManager cgm) {\n return cgm.getParticipantsFromBusinessGroups(groupKeys);\n}\n"
"private void commonQueryExistDomain(String queryDomainName, String expectedLdhName, String expectedUnicodeName) throws Exception {\n mockMvc.perform(get(\"String_Node_Str\" + StringUtil.urlEncode(queryDomainName)).accept(MediaType.parseMediaType(\"String_Node_Str\"))).andExpect(status().isOk()).andExpect(content()....
"public void emptyListBox() {\n int listCount = listBox.getItemCount();\n for (int x = listCount; x > 0; x--) {\n listBox.removeItem(x - 1);\n }\n}\n"
"public static void handleOnPageBreak(IListGroupContent content, ExecutionContext context) {\n ReportItemDesign listGroupDesign = (ReportItemDesign) content.getGenerateBy();\n if (!needOnPageBreak(listGroupDesign, context)) {\n return;\n }\n try {\n ReportElementInstance list = new ReportEleme...
"protected final ResponseMessage wrapMessage(AtmosphereResponse res, String message) {\n Response.Builder builder = new Response.Builder();\n builder.body(message).status(res.getStatus(), res.getStatusMessage());\n Map<String, String> headers = res.headers();\n for (String s : headers.keySet()) {\n b...
"public void testAddTestsWithRemoteServerAddress() throws Exception {\n List<String> tests = tests();\n ActionSequenceBuilder builder = new ActionSequenceBuilder(actionFactory, null, null, new BrowserActionExecutorAction(null, null, null, null, null, 0, null, null), new FailureCheckerAction(null, null), new Uploa...
"private AtomicLong getCounterStorage(Id id) {\n final AtomicLong newCounter = new AtomicLong(0);\n final AtomicLong existingCounter = counters.putIfAbsent(id, newCounter);\n return existingCounter == null ? registry.gauge(id, newCounter) : existingCounter;\n}\n"
"private void computeWeights(StockMove stockMove) throws AxelorException {\n boolean weightsRequired = checkWeightsRequired(stockMove);\n StockConfig stockConfig = stockMove.getCompany().getStockConfig();\n Unit endUnit = stockConfig != null ? stockConfig.getCustomsWeightUnit() : null;\n if (weightsRequired...
"public Map<K, V> getAll(Set<? extends K> keys, ExpiryPolicy expiryPolicy) {\n final long start = System.nanoTime();\n ensureOpen();\n validateNotNull(keys);\n if (keys.isEmpty()) {\n return emptyMap();\n }\n final Set<Data> keySet = new HashSet<Data>(keys.size());\n for (K key : keys) {\n ...
"public TmfStringLocation clone() {\n TmfStringLocation clone = null;\n clone = (TmfStringLocation) super.clone();\n return clone;\n}\n"
"public static int invuln(Player player, String[] args) {\n if (!player.canUseCommand(\"String_Node_Str\"))\n return EXIT_FAIL;\n if (!vMinecraftSettings.getInstance().cmdEzModo())\n return EXIT_FAIL;\n if (vMinecraftSettings.getInstance().isEzModo(player.getName())) {\n player.sendMessage...
"public Object create(final String name) throws TypeException {\n TypeFactory factory = getTypeFactory(name);\n if (null == factory && null != m_parent) {\n factory = m_parent.getTypeFactory(name);\n }\n if (null == factory)\n return null;\n else {\n final Object object = factory.cre...
"public Object[] getElements(Object inputElement) {\n ArrayList<XSDElementDeclaration> values = (ArrayList<XSDElementDeclaration>) inputElement;\n return values.toArray(new XSDElementDeclaration[values.size()]);\n}\n"
"private void logIn(NetworkClient client, String playerId, String playerName) throws IllegalStateException, InterruptedException {\n int currentNumberOfPlayers = db.getNumberOfPlayers();\n client.logIn(playerId, playerName, null);\n Thread.sleep(40L);\n assertEquals(EPlayerState.LOGGED_IN, client.getState()...
"public Object visitLabeledStmtNode(LabeledStmtNode node, LinkedList args) {\n NameContext ctx = (NameContext) args.get(0);\n Environ env = (Environ) node.getDefinedProperty(ENVIRON_KEY);\n NameNode label = node.getName();\n String labelString = label.getIdent();\n Decl other = ctx.environ.lookup(labelSt...
"public void setUp() {\n ArchiveUtil.deleteAllFiles(new File(ARCHIVE_NAME));\n ArchiveUtil.deleteAllFiles(new File(TEMP_FOLDER_NAME));\n}\n"
"public void testPutTwoSignaturesOnce() {\n assertThat(invocationsCollector.getNotUploadedInvocations(jvmUuid1), hasSize(0));\n assertThat(invocationsCollector.getNotUploadedInvocations(jvmUuid2), hasSize(0));\n invocationsCollector.put(jvmUuid1, now - 100L, \"String_Node_Str\", now, EXACT_MATCH);\n invocat...
"public static int pay(Player player, Payment payment) {\n PlayerInventory inv = player.getInventory();\n int currencyID = payment.getItem().getTypeId();\n int current = payment.getPrice();\n int count = 0;\n outer: for (ItemStack i : inv.getContents()) {\n if (i != null && i.getTypeId() == curren...
"private void link(Plugin plugin, ManagedPlugin managedPlugin, Map<String, PluginComponentDescriptor> componentDescriptors) {\n for (IPluginLoadingCallback callback : SpringUtils.getBeansOfType(alienContext, IPluginLoadingCallback.class)) {\n callback.onPluginLoaded(managedPlugin);\n }\n for (PluginLink...
"public void setLabel(org.eclipse.birt.chart.model.component.Label lbl, String sUnits) {\n this.lblCurrent = lbl;\n this.sUnits = sUnits;\n this.fBackground = lblCurrent.getBackground();\n this.laCurrent = lblCurrent.getOutline();\n if (attributesContext.isVisibilityEnabled) {\n btnVisible.setSele...
"public void receive(int target, Iterator<Object> it) {\n Map<String, Integer> localwordCounts = new HashMap<>();\n while (it.hasNext()) {\n Object next = it.next();\n if (next instanceof List) {\n for (Object o : (List) next) {\n int count = 0;\n String valu...
"public static void main(final String[] args) {\n final Summoner summoner = Summoner.withAccountId(36321079).withRegion(Region.NORTH_AMERICA).get();\n final MatchHistory matchHistory = MatchHistory.forSummoner(summoner).get();\n final Map<Integer, String> championIdToNameMapping = new HashMap<>();\n for (fi...
"public boolean buildForLaunch(ILaunchConfiguration config, String mode, IProgressMonitor monitor) throws CoreException {\n int STEP = 100;\n try {\n monitor.beginTask(\"String_Node_Str\", 30);\n monitor.subTask(\"String_Node_Str\");\n IProject project = ResourceHelper.getProject(specName);\n...
"public static Repository getRepository(String repoURL) {\n String[] parts = parseRepositoryURL(repoURL);\n return getRepository(parts[0], parts[1], username, password, configFile);\n}\n"
"public ZonedDateTime getTodayDateTime() {\n ZonedDateTime todayDateTime = ZonedDateTime.now();\n String applicationMode = AppSettings.get().get(\"String_Node_Str\", \"String_Node_Str\");\n if (\"String_Node_Str\".equals(applicationMode)) {\n User user = AuthUtils.getUser();\n if (user != null &&...
"private Cell parseOutputStructure(Cell origCell, String outFile) {\n if (!(new File(outFile)).exists() || Utility.readStringFromFile(outFile).isEmpty()) {\n if (GAParameters.getParams().getVerbosity() >= 4)\n System.out.println(\"String_Node_Str\");\n return null;\n }\n String output ...
"public int getDirection(GameFacade gf) {\n if (gf.getMazeIndex() != currentMaze) {\n currentMaze = gf.getMazeIndex();\n nn = networkForMaze.get(currentMaze);\n if (CommonConstants.monitorSubstrates) {\n ((MsPacManTask) MMNEAT.task).substratesForMaze.get(currentMaze);\n }\n ...
"public boolean isTileColourAllowed(String tileColour) {\n return tileColours != null && tileColours.containsKey(tileColour) && tileColours.get(tileColour) > 0;\n}\n"
"public ProjectLocale getProjectLocale() {\n return (ProjectLocale) eDynamicGet(PropertiesPackage.PROPERTY_FILE_DESCRIPTOR__PROJECT_LOCALE, PropertiesPackage.Literals.PROPERTY_FILE_DESCRIPTOR__PROJECT_LOCALE, true, true);\n}\n"
"private ArrayList<KeyPredicate> parseKey(final String keyPredicate, final EdmEntityType entityType) throws UriParserException, EdmException {\n ArrayList<KeyPredicate> keyPredicates = new ArrayList<KeyPredicate>();\n for (final String key : keyPredicate.split(\"String_Node_Str\", -1)) {\n final Matcher ma...
"public TileEntity placeTrack() {\n PosRot pos = getPos();\n if (builder.info.railBedFill && BlockUtil.canBeReplaced(builder.world, pos.down(), false) && builder.info.railBed.getItem() != Items.AIR) {\n builder.world.setBlockState(pos.down(), BlockUtil.itemToBlockState(builder.info.railBed));\n }\n N...
"private void init(ProcessType process) {\n allRoutineItems.clear();\n ProjectManager projectManager = ProjectManager.getInstance();\n Project currentProject = projectManager.getCurrentProject();\n initModels(currentProject);\n Set<Project> referenceProjects = new HashSet<Project>();\n this.getAllRefe...
"protected void onTaskCompleted(boolean result) {\n if (result) {\n if (mAppLib.size() > 0) {\n mCurrentSelection = 0;\n }\n for (int i = 0; i < mImageViewIds.length; ++i) {\n ImageView iv = (ImageView) findViewById(mImageViewIds[i]);\n if (i < mAppLib.size()) {\...
"public int[] resolve(int specifiedWidth, int maxWidth) {\n assert (specifiedWidth <= maxWidth);\n int columnNumber = table.getColumnCount();\n int[] columns = new int[columnNumber];\n int columnWithWidth = 0;\n int colSum = 0;\n for (int j = 0; j < table.getColumnCount(); j++) {\n IColumn colu...
"public static void main(String[] args) throws Exception {\n if (args.length != 1) {\n System.out.println();\n System.out.println(\"String_Node_Str\");\n System.out.println();\n System.out.println(\"String_Node_Str\");\n return;\n }\n List<MozillaEntry> issues = loadIssues(ar...
"public void execute(Tuple input) {\n StatsComponentType componentId = StatsComponentType.valueOf(input.getSourceComponent());\n InfoMessage message = (InfoMessage) input.getValueByField(MESSAGE_FIELD);\n if (!Destination.WFM_STATS.equals(message.getDestination())) {\n collector.ack(input);\n ret...
"protected IQuery createOdiQuery() throws DataException {\n setCurrentDataSet(dataSetDesign);\n populatePreparedQuery();\n initializeResultClass(dataEngine, appContext);\n return new JointDataSetQuery(resultClass);\n}\n"
"public void shouldFetch_withVariantItemAttributeQueryOnIndex() throws Exception {\n final AttributeQuery query = mock(AttributeQuery.class);\n final Condition mockCondition = mock(Condition.class);\n when(mockCondition.getComparisonOperator()).thenReturn(Operators.EQUALS);\n final String itemId = randomId(...
"public static org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryR...
"public void testQueueSpecificationGenWithWordCount() throws Exception {\n ApplicationSpecification appSpec = new WordCountApp().configure();\n ApplicationSpecificationAdapter adapter = ApplicationSpecificationAdapter.create(new ReflectionSchemaGenerator());\n ApplicationSpecification newSpec = adapter.fromJso...
"public LibraryHandle getLibrary(String namespace) {\n Module library = module.getLibraryWithNamespace(namespace, IModuleNameScope.DIRECTLY_INCLUDED_LEVEL);\n if (library == null)\n return null;\n return (LibraryHandle) library.getHandle(library);\n}\n"
"public String getCoprocessorLocalJar() {\n final String coprocessorJar = getOptional(COPROCESSOR_LOCAL_JAR);\n if (StringUtils.isNotEmpty(coprocessorJar)) {\n return coprocessorJar;\n }\n return getFileName(getKylinHome() + File.separator + \"String_Node_Str\", COPROCESSOR_JAR_NAME_PATTERN);\n}\n"
"private void updateFormatField() {\n String displayFormat;\n IChoiceSet choiceSet = getFormatChoiceSet(getSelectedDataType());\n if (choiceSet == null) {\n displayFormat = DesignEngine.getMetaDataDictionary().getChoiceSet(DesignChoiceConstants.CHOICE_STRING_FORMAT_TYPE).findChoice(DesignChoiceConstants...
"public void init(WorkerContext<DTMasterParams, DTWorkerParams> context) {\n Properties props = context.getProps();\n try {\n SourceType sourceType = SourceType.valueOf(props.getProperty(CommonConstants.MODELSET_SOURCE_TYPE, SourceType.HDFS.toString()));\n this.modelConfig = CommonUtils.loadModelCon...
"public static DocumentFragment xpathDate(WordprocessingMLPackage wmlPackage, JaxbXmlPart sourcePart, Map<String, CustomXmlDataStoragePart> customXmlDataStorageParts, String storeItemId, String xpath, String prefixMappings, String sdtParent, String contentChild, NodeIterator dateNodeIt) {\n CustomXmlDataStoragePart ...
"public RPCResponse xtreemfs_replica_remove(InetSocketAddress server, UserCredentials credentials, String fileId, String osdUUID) {\n xtreemfs_replica_removeRequest rq = new xtreemfs_replica_removeRequest(fileId, osdUUID);\n RPCResponse<XCap> r = sendRequest(server, rq.getOperationNumber(), rq, new RPCResponseDec...
"public String getName() {\n return (String) getStateHelper().eval(PropertyKeys.name, getId());\n}\n"
"private void tweakLookAndFeel(JToolBar toolbar) {\n if (\"String_Node_Str\".equals(UIManager.getLookAndFeel().getID())) {\n MouseListener hoverListener = new MouseListener() {\n public void mouseExited(MouseEvent arg0) {\n ((JButton) arg0.getSource()).setBorderPainted(false);\n ...
"public void toBytes(ByteBuf buf) {\n buf.writeInt(dimlets.size());\n for (Map.Entry<Integer, DimletKey> me : dimlets.entrySet()) {\n buf.writeInt(me.getKey());\n DimletKey key = me.getValue();\n buf.writeInt(me.getKey());\n NetworkTools.writeString(buf, key.getName());\n buf.wr...
"private void setCellStatus(Cell cell, CellStatus status) {\n logger.fine(\"String_Node_Str\" + cell.getCellID() + \"String_Node_Str\" + status);\n synchronized (cell) {\n int currentStatus = cell.getStatus().ordinal();\n int requiredStatus = status.ordinal();\n if (currentStatus == requiredS...
"private void renderGeneNode(GL2 gl, PathwayVertexRep vertexRep) {\n float[] nodeColor;\n float width = pixelGLConverter.getGLWidthForPixelWidth(vertexRep.getWidth());\n float height = pixelGLConverter.getGLHeightForPixelHeight(vertexRep.getHeight());\n gl.glLineWidth(1);\n gl.glEnable(GL.GL_STENCIL_TEST...
"private void loadMainInfo(DataInputStream coreStream, ReportDocumentCoreInfo documentInfo) throws IOException {\n if (applicationClassLoader == null) {\n applicationClassLoader = createClassLoader(systemId);\n }\n Map originalParameters = IOUtil.readMap(coreStream, applicationClassLoader);\n documen...
"static void insertDeclarationsDetails(StringBuffer fileBuffer, List decls, String kind, int index) {\n if (!declsAboveVisibilityExist(decls))\n return;\n int insertIndex = findDetailsIndex(fileBuffer, index);\n String detailsHeading = \"String_Node_Str\" + \"String_Node_Str\" + kind.toUpperCase() + \"S...
"public static SecretKeySpec getSecretKey(String fileName) throws ForceEncryptionException {\n if (fileName == null || fileName.length() == 0) {\n fileName = PRIVATE_KEY_PATH;\n }\n InputStream is = AESUtil.class.getResourceAsStream(\"String_Node_Str\" + fileName);\n String key = null;\n if (is ==...
"public void handleData(final ITmfEvent event) {\n super.handleData(event);\n synchronized (fOrderList) {\n if (fOrderList.isEmpty() || !fOrderList.get(fOrderList.size() - 1).equals(foregroundName)) {\n fOrderList.add(foregroundName);\n }\n }\n ++nbEvents;\n}\n"
"private void checkParameters() {\n boolean checkColumnExist = false;\n IMetadataTable metadataTable = null;\n List<IMetadataTable> tables = getMetadataList();\n if (tables != null && tables.size() == 1) {\n metadataTable = tables.get(0);\n checkColumnExist = true;\n }\n boolean checkPre...
"public String[] getParameters() {\n return parameters == null ? null : copyOf(parameters, parameters.length);\n}\n"
"public void update(Observable o, Object arg) {\n if (arg instanceof JSONObject) {\n handleJson((JSONObject) arg);\n }\n if (o instanceof VisWebSocket) {\n getInstance().sync((VisWebSocket) o);\n if (currentJson == null)\n setCurrentJson();\n return;\n }\n if (o ins...
"protected String writeString(List<String> items) {\n int size = items.size();\n StringBuffer buf = new StringBuffer(size * 50);\n buf.append(\"String_Node_Str\");\n for (int i = 0; i < size; i++) {\n buf.append(items.get(i));\n if (i != size - 1) {\n String trim = ARG_DELIMITER.tri...
"public boolean findTarget(boolean doSet) {\n if (worldObj.isRemote) {\n return false;\n }\n boolean columnVisitListIsUpdated = false;\n if (visitList.isEmpty()) {\n createColumnVisitList();\n columnVisitListIsUpdated = true;\n }\n if (!doSet) {\n return !visitList.isEmpty(...
"public void run() {\n try {\n MsgType msgType = new MsgType();\n if (isAvailable) {\n if (isMissingField) {\n sendBusinessReject(message, BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING, \"String_Node_Str\");\n } else if (message.getHeader().isSetField(De...
"public static void spawn(CityLevel level) {\n if (!spawned && Dungeon.depth > 16 && Random.Int(20 - Dungeon.depth) == 0) {\n Imp npc = new Imp();\n do {\n npc.pos = level.randomRespawnCell();\n } while (npc.pos == -1 || level.heaps.get(npc.pos) != null || level.findMob(npc.pos) != nu...
"public void injectRDF(String _tripleFile, String _subRefNodeName, RexsterResourceContext _context) {\n final String sMETHOD = \"String_Node_Str\";\n String tripleFile = _tripleFile.trim();\n if (tripleFile.startsWith(FILE_SEPARATOR))\n tripleFile = tripleFile.substring(1);\n TransactionalGraph tranG...
"protected void setupDatabase(Database database) throws Exception {\n dropViewIfExists(null, NEW_VIEW_NAME, database);\n dropViewIfExists(TestContext.ALT_SCHEMA, NEW_VIEW_NAME, database);\n dropAndCreateTable(new CreateTableStatement(null, TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\...
"public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n try {\n if (null != selfRecords) {\n for (int x = 0, selfRecordsSize = selfRecords.size(); x < selfRecordsSize; x++) {\n UnmarshalRecord selfRecord = selfRecords.get(x);\n ...
"public ClassDescriptor getDescriptor(String entityName) {\n DatabaseSession session = getJpaSession();\n ClassDescriptor descriptor = session.getDescriptorForAlias(entityName);\n if (descriptor == null) {\n for (Object ajaxBSession : ((JAXBContext) getJAXBContext()).getXMLContext().getSessions()) {\n ...
"public List<ExperimentSample> getExperimentSamples() {\n List<ExperimentSample> samples = this.experiment.getExperimentSamples();\n List<ExperimentSample> result = new ArrayList<>(samples.size());\n for (ExperimentSample sample : samples) {\n result.add(new UnmodifiableExperimentSample(sample));\n }...
"protected final void engineUpdateAAD(ByteBuffer src) {\n if (src == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (!src.hasRemaining()) {\n return;\n }\n byte[] input;\n int inputOffset;\n int inputLen;\n if (src.hasArray()) {\n input = src.arr...
"public List<Pool> createPools(List<Pool> pools) {\n if (CollectionUtils.isNotEmpty(pools)) {\n poolCurator.saveOrUpdateAll(pools, false, false);\n for (Pool pool : pools) {\n if (pool != null && !updatedPoolIds.contains(pool.getId())) {\n log.debug(\"String_Node_Str\", pool);...
"private String makeLevelMemberCountSql(RolapLevel level, DataSource dataSource, boolean[] mustCount) {\n mustCount[0] = false;\n SqlQuery sqlQuery = SqlQuery.newQuery(dataSource, \"String_Node_Str\" + level);\n int levelDepth = level.getDepth();\n RolapLevel[] levels = (RolapLevel[]) hierarchy.getLevels();...
"public float getWordHeight() {\n if (bf == null)\n return fontSize;\n return bf.getFontDescriptor(BaseFont.AWT_ASCENT, fontSize) - bf.getFontDescriptor(BaseFont.AWT_DESCENT, fontSize) + bf.getFontDescriptor(BaseFont.AWT_LEADING, fontSize) + fontSize / 4f;\n}\n"
"public void onDestroy() {\n super.onDestroy();\n Log.d(TAG, \"String_Node_Str\");\n mIBusService.removeCallback(mIBusUpdateListener);\n releaseWakelock();\n if (mIBusBound) {\n unbindServices();\n }\n getActivity().unregisterReceiver(receiver);\n}\n"
"public void activateVision(IVampireVision vision) {\n if (vision != null && !isRemote() && ((GeneralRegistryImpl) VampirismAPI.vampireVisionRegistry()).getIdOfVision(vision) == -1) {\n throw new IllegalArgumentException(\"String_Node_Str\" + vision);\n }\n if (!Objects.equals(activatedVision, vision)) ...
"Bitmap screenshotApplicationsInner(IBinder appToken, int displayId, int width, int height, boolean includeFullDisplay, float frameScale, Bitmap.Config config) {\n final DisplayContent displayContent;\n synchronized (mWindowMap) {\n displayContent = getDisplayContentLocked(displayId);\n if (displayC...
"public void addObjectToCache(Object obj, Node node, XMLMapping selfRecordMapping) {\n if (obj == null || node.getNodeType() != Node.ELEMENT_NODE) {\n return;\n }\n AbstractSession session = context.getSession(obj);\n XMLDescriptor xmlDescriptor = (XMLDescriptor) session.getDescriptor(obj);\n DOMR...
"public void onCreate() {\n listener = new LocationListener() {\n\n public void onLocationChanged(Location location) {\n if (lastLocation == null) {\n lastLocation = location;\n }\n distanceInMeters += location.distanceTo(lastLocation);\n lastLocation...
"public Set<CartridgeSubscription> getCartridgeSubscription(String clusterId) {\n LookupDataHolder.getInstance().acquireReadLock();\n try {\n CartridgeSubscription cartridgeSubscription = LookupDataHolder.getInstance().getSubscriptionForAlias(tenantId, subscriptionAlias);\n return cartridgeSubscript...
"public void initialise() {\n final UITooltip tooltip = new UITooltip();\n boolean testBoolean = true;\n windowHeight = config.getRendering().getWindowHeight();\n windowWidth = config.getRendering().getWindowWidth();\n UIDropdown<Preset> videoQuality = find(\"String_Node_Str\", UIDropdown.class);\n if...
"private void updateAndStoreManifest(BuildRule rule, RuleKey key, ImmutableSet<SourcePath> inputs, ArtifactCache cache) throws IOException, InterruptedException {\n Preconditions.checkState(useManifestCaching(rule));\n Pair<RuleKey, ImmutableSet<SourcePath>> manifestKey = ruleKeyFactories.getUnchecked(rule.getPro...
"public void deletePeriod(long periodId) throws DataBaseException {\n EntityManager entityManager = null;\n EntityTransaction transaction = null;\n try {\n entityManager = getEntityManagerFactory().createEntityManager();\n transaction = entityManager.getTransaction();\n transaction.begin()...
"public void run() throws IOException {\n FileUtils.mkdir(outputDir.getAbsolutePath());\n final List<File> tests = FileUtils.getFiles(baseDir, includes, excludes);\n if (tests.isEmpty()) {\n logger.warn(\"String_Node_Str\");\n return;\n }\n logger.info(\"String_Node_Str\", tests.size());\n ...
"public void addText(String text) {\n this.text = text;\n}\n"
"protected String tab(final int n) {\n final StringBuilder sb = new StringBuilder();\n for (int i = 0; i < tabulations + n; i++) {\n str += TAB;\n }\n tabulations += n;\n return str;\n}\n"
"protected void saveOneColumn(Document document, IMetadataColumn metadataColumn, Element column) {\n super.saveOneColumn(document, metadataColumn, column);\n if (metadataColumn instanceof MetadataColumnExt) {\n MetadataColumnExt columnExt = (MetadataColumnExt) metadataColumn;\n Attr function = docum...
"private void repositionBlogInfoView() {\n if (mBlogInfoView == null) {\n return;\n }\n int scrollPos = mListView.getVerticalScrollOffset();\n mBlogInfoView.scaleMshotImageBasedOnScrollPos(scrollPos);\n int mshotBottom;\n if (mMshotSpacerView.getHeight() > 0) {\n mshotBottom = mMshotSpac...
"public void deleteRemovesAllGivenEntities() throws Exception {\n Collection<Entity> entities = createTestEntities();\n Collection<Key> keys = extractKeys(entities);\n for (Entity e : entities) {\n service.put(e);\n }\n for (Key k : keys) {\n service.delete(k);\n }\n assertStoreDoesNo...
"public void manager_should_return_empty_list_when_no_books() {\n BookManager bookManager = new BookManager(bookCollection());\n List<Book> books = bookManager.findAll();\n assertThat(books, hasSize(0));\n}\n"
"public void onClick(View view) {\n final String[] itemStrings = new String[inFriends.size()];\n for (int i = 0; i < inFriends.size(); i++) {\n itemStrings[i] = inFriends.get(i).getName();\n }\n AlertDialog.Builder builder = new AlertDialog.Builder(OrderEditActivity.this);\n builder.setTitle(\"Str...
"public synchronized Database removeResource(final String name) {\n assertNotClosed();\n final Path resourceFile = mDBConfig.getFile().resolve(DatabaseConfiguration.DatabasePaths.DATA.getFile()).resolve(name);\n if (Databases.hasOpenResourceManagers(resourceFile)) {\n throw new IllegalStateException(\"S...
"private void update() {\n ArrayList<TableView> tableList = new ArrayList<>();\n ArrayList<MatchView> matchList = new ArrayList<>();\n List<Table> allTables = new ArrayList<>(tables.values());\n Collections.sort(allTables, new TableListSorter());\n for (Table table : allTables) {\n if (table.getSt...
"public static int getY() {\n return (int) -((org.lwjgl.input.Mouse.getY() - Main.HEIGHT / 2) * WorldRenderer.scale - WorldRenderer.focalPoint.y);\n}\n"
"public void handleEvent(Event event) {\n switch(event.type) {\n case SWT.Dispose:\n case SWT.KeyDown:\n case SWT.MouseMove:\n {\n if (tip == null) {\n break;\n tip.dispose();\n tip = null;\n label = null;\...
"public StackDescription describeStack(User user, Stack stack, Credential credential) {\n AwsTemplate awsTemplate = (AwsTemplate) stack.getTemplate();\n AwsCredential awsCredential = (AwsCredential) credential;\n DescribeStacksResult stackResult = null;\n DescribeInstancesResult instancesResult = null;\n ...
"public void init(PageContentProvider provider, MediaSize mediaSize, Margins minMargins) {\n final boolean providerChanged = (mProvider == null) ? provider != null : !mProvider.equals(provider);\n final boolean mediaSizeChanged = (mMediaSize == null) ? mediaSize != null : !mMediaSize.equals(mediaSize);\n final...
"private PatchCameraBuilder buildPatchCameraWithLocalCheck() {\n PatchCameraBuilder patchCameraBuilder = null;\n try {\n patchCameraBuilder = new PatchCameraBuilder(cameraEdit.getCameraId());\n } catch (EvercamException e) {\n Log.e(TAG, e.toString());\n }\n String cameraName = cameraNameEd...
"public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((name == null) ? 0 : toGhName().hashCode());\n return result;\n}\n"
"public static void error(Exception exception, boolean display, boolean terminate) {\n String message = getErrorMessage(exception);\n Logging.error(message);\n if (display) {\n Threads.runLaterFx(0, () -> {\n Notifications.create().title(\"String_Node_Str\" + exception.getClass().getSimpleNam...
"public boolean rollbackTx() throws Exception {\n currentTx = null;\n return super.rollbackTx();\n}\n"